ino-cesium 0.0.22-beta.0 → 0.0.22-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ino-cesium-full.js +1 -1
- package/dist/ino-cesium.d.ts +4 -2
- package/dist/ino-cesium.js +3 -3
- package/package.json +8 -8
package/dist/ino-cesium-full.js
CHANGED
|
@@ -52,7 +52,7 @@ function(){var t,i,n,r,o,a,s,c,l=function(){var e={defaultNoDataValue:-340279993
|
|
|
52
52
|
* Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5
|
|
53
53
|
* Copyright (c) Steve Sanderson
|
|
54
54
|
* MIT license
|
|
55
|
-
*/;var OBSERVABLES_PROPERTY="__knockoutObservables",SUBSCRIBABLE_PROPERTY="__knockoutSubscribable";function track(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,n=getAllObservablesForObject(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach(function(t){if(t!==OBSERVABLES_PROPERTY&&t!==SUBSCRIBABLE_PROPERTY&&!(t in n)){var r=e[t],o=r instanceof Array,a=i.isObservable(r)?r:o?i.observableArray(r):i.observable(r);Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:a,set:i.isWriteableObservable(a)?a:void 0}),n[t]=a,o&¬ifyWhenPresentOrFutureArrayValuesMutate(i,a)}}),e}function getAllObservablesForObject(e,t){var i=e[OBSERVABLES_PROPERTY];return!i&&t&&(i={},Object.defineProperty(e,OBSERVABLES_PROPERTY,{value:i})),i}function defineComputedProperty(e,t,i){var n={owner:e,deferEvaluation:!0};if("function"==typeof i)n.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.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".');n.read=i.get,n.write=i.set}return e[t]=this.computed(n),track.call(this,e,[t]),e}function notifyWhenPresentOrFutureArrayValuesMutate(e,t){var i=null;e.computed(function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=startWatchingArrayInstance(e,t,n))})}function startWatchingArrayInstance(e,t,i){return getSubscribableForArray(e,i).subscribe(t)}function getSubscribableForArray(e,t){var i=t[SUBSCRIBABLE_PROPERTY];if(!i){i=new e.subscribable,Object.defineProperty(t,SUBSCRIBABLE_PROPERTY,{value:i});var n={};wrapStandardArrayMutators(t,i,n),addKnockoutArrayMutators(e,t,i,n)}return i}function wrapStandardArrayMutators(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(n){var r=e[n];e[n]=function(){var e=r.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}})}function addKnockoutArrayMutators(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;n.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),o}})})}function getObservable(e,t){if(!e)return null;var i=getAllObservablesForObject(e,!1);return i&&i[t]||null}function valueHasMutated(e,t){var i=getObservable(e,t);i&&i.valueHasMutated()}function attachToKo(e){e.track=track,e.getObservable=getObservable,e.valueHasMutated=valueHasMutated,e.defineProperty=defineComputedProperty}var knockout_es5={attachToKo:attachToKo};const svgNS$1="http://www.w3.org/2000/svg",svgClassName="cesium-svgPath-svg",SvgPathBindingHandler={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){const n=document.createElementNS(svgNS$1,"svg:svg");n.setAttribute("class",svgClassName);const r=document.createElementNS(svgNS$1,"path");return n.appendChild(r),e.virtualElements.setDomNodeChildren(t,[n]),e.computed({read:function(){const t=e.unwrap(i());r.setAttribute("d",e.unwrap(t.path));const o=e.unwrap(t.width),a=e.unwrap(t.height);n.setAttribute("width",o),n.setAttribute("height",a),n.setAttribute("viewBox",`0 0 ${o} ${a}`),t.css&&n.setAttribute("class",`${svgClassName} ${e.unwrap(t.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};function ClockViewModel(e){defined$1(e)||(e=new Clock),this._clock=e,this._eventHelper=new EventHelper,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=knockout.observable(JulianDate.now()),this.systemTime.equalityComparer=JulianDate.equals,this.startTime=knockout.observable(e.startTime),this.startTime.equalityComparer=JulianDate.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=knockout.observable(e.stopTime),this.stopTime.equalityComparer=JulianDate.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=knockout.observable(e.currentTime),this.currentTime.equalityComparer=JulianDate.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=knockout.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=knockout.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=knockout.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=knockout.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=knockout.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),knockout.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}function Command(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,DeveloperError$1.throwInstantiationError()}knockout_es5.attachToKo(knockout),SvgPathBindingHandler.register(knockout),Object.defineProperties(ClockViewModel.prototype,{clock:{get:function(){return this._clock}}}),ClockViewModel.prototype.synchronize=function(){const e=this._clock;this.systemTime=JulianDate.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},ClockViewModel.prototype.isDestroyed=function(){return!1},ClockViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject$1(this)};const InspectorShared={};function ToggleButtonViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("command is required.");this._command=e,t=t??Frozen.EMPTY_OBJECT,this.toggled=t.toggled??!1,this.tooltip=t.tooltip??"",knockout.track(this,["toggled","tooltip"])}function createCommand(e,t){if(!defined$1(e))throw new DeveloperError$1("func is required.");t=t??!0;const i=new Event$1,n=new Event$1;function r(){if(!r.canExecute)throw new DeveloperError$1("Cannot execute command, canExecute is false.");const t={args:arguments,cancel:!1};let o;return i.raiseEvent(t),t.cancel||(o=e.apply(null,arguments),n.raiseEvent(o)),o}return r.canExecute=t,knockout.track(r,["canExecute"]),Object.defineProperties(r,{beforeExecute:{value:i},afterExecute:{value:n}}),r}function subscribeAndEvaluate(e,t,i,n,r){return i.call(n,e[t]),knockout.getObservable(e,t).subscribe(i,n,r)}InspectorShared.createCheckbox=function(e,t,i){Check.typeOf.string("labelText",e),Check.typeOf.string("checkedBinding",t);const n=document.createElement("div"),r=document.createElement("label"),o=document.createElement("input");o.type="checkbox";let a=`checked: ${t}`;return defined$1(i)&&(a+=`, enable: ${i}`),o.setAttribute("data-bind",a),r.appendChild(o),r.appendChild(document.createTextNode(e)),n.appendChild(r),n},InspectorShared.createSection=function(e,t,i,n){Check.defined("panel",e),Check.typeOf.string("headerText",t),Check.typeOf.string("sectionVisibleBinding",i),Check.typeOf.string("toggleSectionVisibilityBinding",n);const r=document.createElement("div");r.className="cesium-cesiumInspector-section",r.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${i} }`),e.appendChild(r);const o=document.createElement("h3");o.className="cesium-cesiumInspector-sectionHeader",o.appendChild(document.createTextNode(t)),o.setAttribute("data-bind",`click: ${n}`),r.appendChild(o);const a=document.createElement("div");return a.className="cesium-cesiumInspector-sectionContent",r.appendChild(a),a},InspectorShared.createRangeInput=function(e,t,i,n,r,o){Check.typeOf.string("rangeText",e),Check.typeOf.string("sliderValueBinding",t),Check.typeOf.number("min",i),Check.typeOf.number("max",n),o=o??t;const a=document.createElement("input");a.setAttribute("data-bind",`value: ${o}`),a.type="number";const s=document.createElement("input");s.type="range",s.min=i,s.max=n,s.step=r??"any",s.setAttribute("data-bind",`valueUpdate: "input", value: ${t}`);const c=document.createElement("div");c.appendChild(s);const l=document.createElement("div");return l.className="cesium-cesiumInspector-slider",l.appendChild(document.createTextNode(e)),l.appendChild(a),l.appendChild(c),l},InspectorShared.createRangeInputWithDynamicMinMax=function(e,t,i,n){Check.typeOf.string("rangeText",e),Check.typeOf.string("sliderValueBinding",t),n=n??t;const r=document.createElement("input");r.setAttribute("data-bind",`value: ${n}`),r.type="number";const o=document.createElement("input");o.type="range",o.step=i??"any",o.setAttribute("data-bind",`valueUpdate: "input", value: ${t}, attr: { min: ${t}Min, max: ${t}Max }`);const a=document.createElement("div");a.appendChild(o);const s=document.createElement("div");return s.className="cesium-cesiumInspector-slider",s.appendChild(document.createTextNode(e)),s.appendChild(r),s.appendChild(a),s},InspectorShared.createButton=function(e,t,i){Check.typeOf.string("buttonText",e),Check.typeOf.string("clickedBinding",t);const n=document.createElement("button");n.type="button",n.textContent=e,n.className="cesium-cesiumInspector-pickButton";let r=`click: ${t}`;return defined$1(i)&&(r+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${i}}`),n.setAttribute("data-bind",r),n},Object.defineProperties(ToggleButtonViewModel.prototype,{command:{get:function(){return this._command}}});const svgNS="http://www.w3.org/2000/svg",xlinkNS="http://www.w3.org/1999/xlink";let widgetForDrag;const gradientEnabledColor0=Color.fromCssColorString("rgba(247,250,255,0.384)"),gradientEnabledColor1=Color.fromCssColorString("rgba(143,191,255,0.216)"),gradientEnabledColor2=Color.fromCssColorString("rgba(153,197,255,0.098)"),gradientEnabledColor3=Color.fromCssColorString("rgba(255,255,255,0.086)"),gradientDisabledColor0=Color.fromCssColorString("rgba(255,255,255,0.267)"),gradientDisabledColor1=Color.fromCssColorString("rgba(255,255,255,0)"),gradientKnobColor=Color.fromCssColorString("rgba(66,67,68,0.3)"),gradientPointerColor=Color.fromCssColorString("rgba(0,0,0,0.5)");function getElementColor(e){return Color.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}const svgIconsById={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 svgFromObject(e){const t=document.createElementNS(svgNS,e.tagName);for(const i in e)if(e.hasOwnProperty(i)&&"tagName"!==i)if("children"===i){const i=e.children.length;for(let n=0;n<i;++n)t.appendChild(svgFromObject(e.children[n]))}else 0===i.indexOf("xlink:")?t.setAttributeNS(xlinkNS,i.substring(6),e[i]):"textContent"===i?t.textContent=e[i]:t.setAttribute(i,e[i]);return t}function svgText(e,t,i){const n=document.createElementNS(svgNS,"text");n.setAttribute("x",e),n.setAttribute("y",t),n.setAttribute("class","cesium-animation-svgText");const r=document.createElementNS(svgNS,"tspan");return r.textContent=i,n.appendChild(r),n}function setShuttleRingPointer(e,t,i){e.setAttribute("transform",`translate(100,100) rotate(${i})`),t.setAttribute("transform",`rotate(${i})`)}const makeColorStringScratch=new Color;function makeColorString(e,t){const i=t.alpha,n=1-i;return makeColorStringScratch.red=e.red*n+t.red*i,makeColorStringScratch.green=e.green*n+t.green*i,makeColorStringScratch.blue=e.blue*n+t.blue*i,makeColorStringScratch.toCssColorString()}function rectButton(e,t,i){const n=svgIconsById[i];return svgFromObject({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:i,tagName:n.tagName,transform:n.transform,d:n.d},{tagName:"title",textContent:""}]})}function wingButton(e,t,i){const n=svgIconsById[i],r=svgIconsById.animation_pathWingButton;return svgFromObject({tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:r.tagName,d:r.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:r.tagName,d:r.d},{class:"cesium-animation-buttonPath",id:i,tagName:n.tagName,transform:n.transform,d:n.d},{tagName:"title",textContent:""}]})}function setShuttleRingFromMouseOrTouch(e,t){const i=e._viewModel,n=i.shuttleRingDragging;if(!n||widgetForDrag===e)if("mousedown"===t.type||n&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||n&&"touchmove"===t.type&&1===t.touches.length){const r=e._centerX,o=e._centerY,a=e._svgNode.getBoundingClientRect();let s,c;if("touchstart"===t.type||"touchmove"===t.type?(s=t.touches[0].clientX,c=t.touches[0].clientY):(s=t.clientX,c=t.clientY),!n&&(s>a.right||s<a.left||c<a.top||c>a.bottom))return;const l=e._shuttleRingPointer.getBoundingClientRect(),d=s-r-a.left,u=c-o-a.top;let h=180*Math.atan2(u,d)/Math.PI+90;h>180&&(h-=360);const p=i.shuttleRingAngle;n||s<l.right&&s>l.left&&c>l.top&&c<l.bottom?(widgetForDrag=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=h):h<p?i.slower():h>p&&i.faster(),t.preventDefault()}else e===widgetForDrag&&(widgetForDrag=void 0),i.shuttleRingDragging=!1}function SvgButton(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;const i=this;this._clickFunction=function(){const e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[subscribeAndEvaluate(t,"toggled",this.setToggled,this),subscribeAndEvaluate(t,"tooltip",this.setTooltip,this),subscribeAndEvaluate(t.command,"canExecute",this.setEnabled,this)]}function Animation$1(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("viewModel is required.");e=getElement(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 i=e.ownerDocument,n=document.createElement("style");n.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); }",i.head.insertBefore(n,i.head.childNodes[0]);const r=document.createElement("div");r.className="cesium-animation-theme",r.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=r,this._themeNormal=r.childNodes[0],this._themeHover=r.childNodes[1],this._themeSelect=r.childNodes[2],this._themeDisabled=r.childNodes[3],this._themeKnob=r.childNodes[4],this._themePointer=r.childNodes[5],this._themeSwoosh=r.childNodes[6],this._themeSwooshHover=r.childNodes[7];const o=document.createElementNS(svgNS,"svg:svg");this._svgNode=o,o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",xlinkNS);const a=document.createElementNS(svgNS,"g");this._topG=a,this._realtimeSVG=new SvgButton(wingButton(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new SvgButton(rectButton(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new SvgButton(rectButton(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new SvgButton(rectButton(84,99,"animation_pathPause"),t.pauseViewModel);const s=document.createElementNS(svgNS,"g");s.appendChild(this._realtimeSVG.svgElement),s.appendChild(this._playReverseSVG.svgElement),s.appendChild(this._playForwardSVG.svgElement),s.appendChild(this._pauseSVG.svgElement);const c=svgFromObject({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;const l=svgIconsById.animation_pathSwooshFX,d=svgIconsById.animation_pathPointer,u=svgFromObject({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:l.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:l.d},{tagName:l.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:l.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=u,this._shuttleRingPointer=svgFromObject({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:d.tagName,d:d.d});const h=svgFromObject({tagName:"g",transform:"translate(100,100)"});this._knobOuter=svgFromObject({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});const p=svgFromObject({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=svgText(0,-24,""),this._knobTime=svgText(0,-7,""),this._knobStatus=svgText(0,-41,"");const A=svgFromObject({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:61}),m=document.createElementNS(svgNS,"g");m.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(r),a.appendChild(m),a.appendChild(h),a.appendChild(s),m.appendChild(c),m.appendChild(u),m.appendChild(this._shuttleRingPointer),h.appendChild(this._knobOuter),h.appendChild(p),h.appendChild(this._knobDate),h.appendChild(this._knobTime),h.appendChild(this._knobStatus),h.appendChild(A),o.appendChild(a),e.appendChild(o);const f=this;function g(e){setShuttleRingFromMouseOrTouch(f,e)}this._mouseCallback=g,c.addEventListener("mousedown",g,!0),c.addEventListener("touchstart",g,!0),u.addEventListener("mousedown",g,!0),u.addEventListener("touchstart",g,!0),i.addEventListener("mousemove",g,!0),i.addEventListener("touchmove",g,!0),i.addEventListener("mouseup",g,!0),i.addEventListener("touchend",g,!0),i.addEventListener("touchcancel",g,!0),this._shuttleRingPointer.addEventListener("mousedown",g,!0),this._shuttleRingPointer.addEventListener("touchstart",g,!0),this._knobOuter.addEventListener("mousedown",g,!0),this._knobOuter.addEventListener("touchstart",g,!0);const C=this._knobTime.childNodes[0],y=this._knobDate.childNodes[0],_=this._knobStatus.childNodes[0];let E;this._subscriptions=[subscribeAndEvaluate(t.pauseViewModel,"toggled",function(e){E!==e&&(E=e,E?f._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):f._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),subscribeAndEvaluate(t,"shuttleRingAngle",function(e){setShuttleRingPointer(f._shuttleRingPointer,f._knobOuter,e)}),subscribeAndEvaluate(t,"dateLabel",function(e){y.textContent!==e&&(y.textContent=e)}),subscribeAndEvaluate(t,"timeLabel",function(e){C.textContent!==e&&(C.textContent=e)}),subscribeAndEvaluate(t,"multiplierLabel",function(e){_.textContent!==e&&(_.textContent=e)})],this.applyThemeChanges(),this.resize()}SvgButton.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);const e=this._subscriptions;for(let t=0,i=e.length;t<i;t++)e[t].dispose();destroyObject$1(this)},SvgButton.prototype.isDestroyed=function(){return!1},SvgButton.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")}},SvgButton.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))},SvgButton.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(Animation$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Animation$1.prototype.isDestroyed=function(){return!1},Animation$1.prototype.destroy=function(){defined$1(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 i=this._subscriptions;for(let e=0,t=i.length;e<t;e++)i[e].dispose();return destroyObject$1(this)},Animation$1.prototype.resize=function(){const e=this._container.clientWidth,t=this._container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;const i=this._svgNode,n=200,r=132;let o=e,a=t;0===e&&0===t?(o=n,a=r):0===e?(a=t,o=n*(t/r)):0===t&&(o=e,a=r*(e/n));const s=o/n,c=a/r;i.style.cssText=`width: ${o}px; height: ${a}px; position: absolute; bottom: 0; left: 0; overflow: hidden;`,i.setAttribute("width",o),i.setAttribute("height",a),i.setAttribute("viewBox",`0 0 ${o} ${a}`),this._topG.setAttribute("transform",`scale(${s},${c})`),this._centerX=Math.max(1,100*s),this._centerY=Math.max(1,100*c),this._lastHeight=e,this._lastWidth=t},Animation$1.prototype.applyThemeChanges=function(){const e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(defined$1(this._observer))return;const t=this;return t._observer=new MutationObserver(function(){e.body.contains(t._container)&&(t._observer.disconnect(),t._observer=void 0,t.applyThemeChanges())}),void t._observer.observe(e,{childList:!0,subtree:!0})}const t=getElementColor(this._themeNormal),i=getElementColor(this._themeHover),n=getElementColor(this._themeSelect),r=getElementColor(this._themeDisabled),o=getElementColor(this._themeKnob),a=getElementColor(this._themePointer),s=getElementColor(this._themeSwoosh),c=getElementColor(this._themeSwooshHover),l=svgFromObject({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(t,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(t,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(t,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(t,gradientEnabledColor3)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(i,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(i,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(i,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(i,gradientEnabledColor3)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(n,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(n,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(n,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(n,gradientEnabledColor3)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(r,gradientDisabledColor0)},{tagName:"stop",offset:"75%","stop-color":makeColorString(r,gradientDisabledColor1)}]},{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":s.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":s.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":makeColorString(a,gradientPointerColor)},{tagName:"stop",offset:"100%","stop-color":makeColorString(a,gradientPointerColor)}]},{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":makeColorString(o,gradientEnabledColor0)},{tagName:"stop",offset:"60%","stop-color":makeColorString(o,gradientKnobColor)},{tagName:"stop",offset:"85%","stop-color":makeColorString(o,gradientEnabledColor1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":makeColorString(o,gradientKnobColor)},{tagName:"stop",offset:"60%","stop-color":makeColorString(o,gradientEnabledColor0)},{tagName:"stop",offset:"85%","stop-color":makeColorString(o,gradientEnabledColor3)}]}]});defined$1(this._defsElement)?this._svgNode.replaceChild(l,this._defsElement):this._svgNode.appendChild(l),this._defsElement=l};const monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],realtimeShuttleRingAngle=15,maxShuttleRingAngle=105;function numberComparator(e,t){return e-t}function getTypicalMultiplierIndex(e,t){const i=binarySearch(t,e,numberComparator);return i<0?~i:i}function angleToMultiplier(e,t){if(Math.abs(e)<=realtimeShuttleRingAngle)return e/realtimeShuttleRingAngle;const i=realtimeShuttleRingAngle,n=maxShuttleRingAngle;let r;let o;return e>0?(r=Math.log(t[t.length-1]),o=(r-0)/(n-i),Math.exp(0+o*(e-i))):(r=Math.log(-t[0]),o=(r-0)/(n-i),-Math.exp(0+o*(Math.abs(e)-i)))}function multiplierToAngle(e,t,i){if(i.clockStep===ClockStep$1.SYSTEM_CLOCK)return realtimeShuttleRingAngle;if(Math.abs(e)<=1)return e*realtimeShuttleRingAngle;const n=t[t.length-1];e>n?e=n:e<-n&&(e=-n);const r=realtimeShuttleRingAngle,o=maxShuttleRingAngle;let a;let s;return e>0?(a=Math.log(n),s=(a-0)/(o-r),(Math.log(e)-0)/s+r):(a=Math.log(-t[0]),s=(a-0)/(o-r),-((Math.log(Math.abs(e))-0)/s+r))}function AnimationViewModel(e){if(!defined$1(e))throw new DeveloperError$1("clockViewModel is required.");const t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=AnimationViewModel.defaultDateFormatter,this._timeFormatter=AnimationViewModel.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,knockout.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(AnimationViewModel.defaultTicks),this.timeLabel=void 0,knockout.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,knockout.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,knockout.defineProperty(this,"multiplierLabel",function(){const e=t._clockViewModel;if(e.clockStep===ClockStep$1.SYSTEM_CLOCK)return"Today";const i=e.multiplier;return i%1==0?`${i.toFixed(0)}x`:`${i.toFixed(3).replace(/0{0,3}$/,"")}x`}),this.shuttleRingAngle=void 0,knockout.defineProperty(this,"shuttleRingAngle",{get:function(){return multiplierToAngle(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,maxShuttleRingAngle),-maxShuttleRingAngle);const i=t._allShuttleRingTicks,n=t._clockViewModel;if(n.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)===maxShuttleRingAngle)return void(n.multiplier=e>0?i[i.length-1]:i[0]);let r=angleToMultiplier(e,i);if(t.snapToTicks)r=i[getTypicalMultiplierIndex(r,i)];else if(0!==r){const e=Math.abs(r);if(e>100){const t=e.toFixed(0).length-2,i=Math.pow(10,t);r=Math.round(r/i)*i|0}else e>realtimeShuttleRingAngle?r=Math.round(r):e>1?r=+r.toFixed(1):e>0&&(r=+r.toFixed(2))}n.multiplier=r}}),this._canAnimate=void 0,knockout.defineProperty(this,"_canAnimate",function(){const e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===ClockRange$1.UNBOUNDED)return!0;const n=e.multiplier,r=e.currentTime,o=e.startTime;let a=!1;if(i===ClockRange$1.LOOP_STOP)a=JulianDate.greaterThan(r,o)||r.equals(o)&&n>0;else{const t=e.stopTime;a=JulianDate.greaterThan(r,o)&&JulianDate.lessThan(r,t)||r.equals(o)&&n>0||r.equals(t)&&n<0}return a||(e.shouldAnimate=!1),a}),this._isSystemTimeAvailable=void 0,knockout.defineProperty(this,"_isSystemTimeAvailable",function(){const e=t._clockViewModel;if(e.clockRange===ClockRange$1.UNBOUNDED)return!0;const i=e.systemTime;return JulianDate.greaterThanOrEquals(i,e.startTime)&&JulianDate.lessThanOrEquals(i,e.stopTime)}),this._isAnimating=void 0,knockout.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});const i=createCommand(function(){const e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)});this._pauseViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed(function(){return!t._isAnimating}),tooltip:"Pause"});const n=createCommand(function(){const e=t._clockViewModel,i=e.multiplier;i>0&&(e.multiplier=-i),e.shouldAnimate=!0});this._playReverseViewModel=new ToggleButtonViewModel(n,{toggled:knockout.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});const r=createCommand(function(){const e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0});this._playForwardViewModel=new ToggleButtonViewModel(r,{toggled:knockout.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==ClockStep$1.SYSTEM_CLOCK}),tooltip:"Play Forward"});const o=createCommand(function(){t._clockViewModel.clockStep=ClockStep$1.SYSTEM_CLOCK},knockout.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new ToggleButtonViewModel(o,{toggled:knockout.computed(function(){return e.clockStep===ClockStep$1.SYSTEM_CLOCK}),tooltip:knockout.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=createCommand(function(){const e=t._clockViewModel,i=t._allShuttleRingTicks,n=getTypicalMultiplierIndex(e.multiplier,i)-1;n>=0&&(e.multiplier=i[n])}),this._faster=createCommand(function(){const e=t._clockViewModel,i=t._allShuttleRingTicks,n=getTypicalMultiplierIndex(e.multiplier,i)+1;n<i.length&&(e.multiplier=i[n])})}function BaseLayerPickerViewModel(e){const t=(e=e??Frozen.EMPTY_OBJECT).globe,i=e.imageryProviderViewModels??Frozen.EMPTY_ARRAY,n=e.terrainProviderViewModels??Frozen.EMPTY_ARRAY;if(!defined$1(t))throw new DeveloperError$1("globe is required");this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=n.slice(0),this.dropDownVisible=!1,knockout.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);const r=knockout.getObservable(this,"imageryProviderViewModels"),o=knockout.pureComputed(function(){const e=r(),t={};let i;for(i=0;i<e.length;i++){const n=e[i],r=n.category;defined$1(t[r])?t[r].push(n):t[r]=[n]}const n=Object.keys(t),o=[];for(i=0;i<n.length;i++){const e=n[i];o.push({name:e,providers:t[e]})}return o});this._imageryProviders=o;const a=knockout.getObservable(this,"terrainProviderViewModels"),s=knockout.pureComputed(function(){const e=a(),t={};let i;for(i=0;i<e.length;i++){const n=e[i],r=n.category;defined$1(t[r])?t[r].push(n):t[r]=[n]}const n=Object.keys(t),r=[];for(i=0;i<n.length;i++){const e=n[i];r.push({name:e,providers:t[e]})}return r});this._terrainProviders=s,this.buttonTooltip=void 0,knockout.defineProperty(this,"buttonTooltip",function(){const e=this.selectedImagery,t=this.selectedTerrain,i=defined$1(e)?e.name:void 0,n=defined$1(t)?t.name:void 0;return defined$1(i)&&defined$1(n)?`${i}\n${n}`:defined$1(i)?i:n}),this.buttonImageUrl=void 0,knockout.defineProperty(this,"buttonImageUrl",function(){const e=this.selectedImagery;if(defined$1(e))return e.iconUrl}),this.selectedImagery=void 0;const c=knockout.observable();this._currentImageryLayers=[],knockout.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(e){if(c()===e)return void(this.dropDownVisible=!1);let t;const i=this._currentImageryLayers,n=i.length,r=this._globe.imageryLayers;let o=!1;for(t=0;t<n;t++){const e=r.length;for(let n=0;n<e;n++){const e=r.get(n);if(e===i[t]){r.remove(e),o=!0;break}}}if(defined$1(e)){const i=e.creationCommand();if(Array.isArray(i)){const e=i.length;for(this._currentImageryLayers=[],t=e-1;t>=0;t--){const e=ImageryLayer.fromProviderAsync(i[t]);r.add(e,0),this._currentImageryLayers.push(e)}}else{this._currentImageryLayers=[];const t=ImageryLayer.fromProviderAsync(i);if(t.name=e.name,o)r.add(t,0);else{const e=r.get(0);defined$1(e)&&r.remove(e),r.add(t,0)}this._currentImageryLayers.push(t)}}c(e),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;const l=knockout.observable();knockout.defineProperty(this,"selectedTerrain",{get:function(){return l()},set:function(e){if(l()===e)return void(this.dropDownVisible=!1);let t;if(defined$1(e)&&(t=e.creationCommand()),defined$1(t)&&!defined$1(t.then))this._globe.depthTestAgainstTerrain=!(t instanceof EllipsoidTerrainProvider),this._globe.terrainProvider=t;else if(defined$1(t)){let e=!1;const i=this._globe.terrainProviderChanged.addEventListener(()=>{e=!0,i()}),n=new Terrain(t).readyEvent.addEventListener(t=>{e||(this._globe.depthTestAgainstTerrain=!(t instanceof EllipsoidTerrainProvider),this._globe.terrainProvider=t,n())})}l(e),this.dropDownVisible=!1}});const d=this;this._toggleDropDown=createCommand(function(){d.dropDownVisible=!d.dropDownVisible}),this.selectedImagery=e.selectedImageryProviderViewModel??i[0],this.selectedTerrain=e.selectedTerrainProviderViewModel}function BaseLayerPicker(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");e=getElement(e);const i=new BaseLayerPickerViewModel(t),n=document.createElement("button");n.type="button",n.className="cesium-button cesium-toolbar-button",n.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(n);const r=document.createElement("img");r.setAttribute("draggable","false"),r.className="cesium-baseLayerPicker-selected",r.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),n.appendChild(r);const o=document.createElement("div");o.className="cesium-baseLayerPicker-dropDown",o.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(o);const a=document.createElement("div");a.className="cesium-baseLayerPicker-sectionTitle",a.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),a.innerHTML="Imagery",o.appendChild(a);const s=document.createElement("div");s.className="cesium-baseLayerPicker-section",s.setAttribute("data-bind","foreach: _imageryProviders"),o.appendChild(s);const c=document.createElement("div");c.className="cesium-baseLayerPicker-category",s.appendChild(c);const l=document.createElement("div");l.className="cesium-baseLayerPicker-categoryTitle",l.setAttribute("data-bind","text: name"),c.appendChild(l);const d=document.createElement("div");d.className="cesium-baseLayerPicker-choices",d.setAttribute("data-bind","foreach: providers"),c.appendChild(d);const u=document.createElement("div");u.className="cesium-baseLayerPicker-item",u.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(u);const h=document.createElement("img");h.className="cesium-baseLayerPicker-itemIcon",h.setAttribute("data-bind","attr: { src: iconUrl }"),h.setAttribute("draggable","false"),u.appendChild(h);const p=document.createElement("div");p.className="cesium-baseLayerPicker-itemLabel",p.setAttribute("data-bind","text: name"),u.appendChild(p);const A=document.createElement("div");A.className="cesium-baseLayerPicker-sectionTitle",A.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),A.innerHTML="Terrain",o.appendChild(A);const m=document.createElement("div");m.className="cesium-baseLayerPicker-section",m.setAttribute("data-bind","foreach: _terrainProviders"),o.appendChild(m);const f=document.createElement("div");f.className="cesium-baseLayerPicker-category",m.appendChild(f);const g=document.createElement("div");g.className="cesium-baseLayerPicker-categoryTitle",g.setAttribute("data-bind","text: name"),f.appendChild(g);const C=document.createElement("div");C.className="cesium-baseLayerPicker-choices",C.setAttribute("data-bind","foreach: providers"),f.appendChild(C);const y=document.createElement("div");y.className="cesium-baseLayerPicker-item",y.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(y);const _=document.createElement("img");_.className="cesium-baseLayerPicker-itemIcon",_.setAttribute("data-bind","attr: { src: iconUrl }"),_.setAttribute("draggable","false"),y.appendChild(_);const E=document.createElement("div");E.className="cesium-baseLayerPicker-itemLabel",E.setAttribute("data-bind","text: name"),y.appendChild(E),knockout.applyBindings(i,n),knockout.applyBindings(i,o),this._viewModel=i,this._container=e,this._element=n,this._dropPanel=o,this._closeDropDown=function(e){n.contains(e.target)||o.contains(e.target)||(i.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function ProviderViewModel(e){if(!defined$1(e.name))throw new DeveloperError$1("options.name is required.");if(!defined$1(e.tooltip))throw new DeveloperError$1("options.tooltip is required.");if(!defined$1(e.iconUrl))throw new DeveloperError$1("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new DeveloperError$1("options.creationFunction is required.");let t=e.creationFunction;defined$1(t.canExecute)||(t=createCommand(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=e.category??"",knockout.track(this,["name","tooltip","iconUrl"])}function createDefaultImageryProviderViewModels(){const e=[],t=devicePixelRatio>=2;return e.push(new ProviderViewModel({name:"Bing Maps Aerial",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImageryAsync({style:IonWorldImageryStyle$1.AERIAL})}})),e.push(new ProviderViewModel({name:"Bing Maps Aerial with Labels",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImageryAsync({style:IonWorldImageryStyle$1.AERIAL_WITH_LABELS})}})),e.push(new ProviderViewModel({name:"Bing Maps Roads",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImageryAsync({style:IonWorldImageryStyle$1.ROAD})}})),e.push(new ProviderViewModel({name:"ArcGIS World Imagery",iconUrl:buildModuleUrl("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 ArcGisMapServerImageryProvider.fromBasemapType(ArcGisBaseMapType$1.SATELLITE,{enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"ArcGIS World Hillshade",iconUrl:buildModuleUrl("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 ArcGisMapServerImageryProvider.fromBasemapType(ArcGisBaseMapType$1.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"Esri World Ocean",iconUrl:buildModuleUrl("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 ArcGisMapServerImageryProvider.fromBasemapType(ArcGisBaseMapType$1.OCEANS,{enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"OpenStreetMap",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({url:"https://tile.openstreetmap.org/"})}})),e.push(new ProviderViewModel({name:"Stadia x Stamen Watercolor",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({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 ProviderViewModel({name:"Stadia x Stamen Toner",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({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 ProviderViewModel({name:"Stadia Alidade Smooth",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({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 ProviderViewModel({name:"Stadia Alidade Smooth Dark",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({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 ProviderViewModel({name:"Sentinel-2",iconUrl:buildModuleUrl("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 IonImageryProvider.fromAssetId(3954)}})),e.push(new ProviderViewModel({name:"Blue Marble",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3845)}})),e.push(new ProviderViewModel({name:"Earth at night",iconUrl:buildModuleUrl("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 IonImageryProvider.fromAssetId(3812)}})),e.push(new ProviderViewModel({name:"Natural Earth II",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",category:"Cesium ion",creationFunction:function(){return TileMapServiceImageryProvider.fromUrl(buildModuleUrl("Assets/Textures/NaturalEarthII"))}})),e.push(new ProviderViewModel({name:"Google Maps Satellite",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleSatellite.png"),tooltip:"Imagery from Google Maps",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830182)}})),e.push(new ProviderViewModel({name:"Google Maps Satellite with Labels",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleSatelliteLabels.png"),tooltip:"Imagery with place labels from Google Maps",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830183)}})),e.push(new ProviderViewModel({name:"Google Maps Roadmap",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleRoadmap.png"),tooltip:"Labeled roads and other features on a base landscape from Google Maps",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830184)}})),e.push(new ProviderViewModel({name:"Google Maps Labels Only",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleLabels.png"),tooltip:"Place labels from Google Maps to combine with other imagery such as Sentinel-2",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830185)}})),e.push(new ProviderViewModel({name:"Google Maps Contour",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleContour.png"),tooltip:"Hillshade mapping, contour lines, natural features (roadmap features hidden) from Google Maps",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830186)}})),e}function createDefaultTerrainProviderViewModels(){const e=[];return e.push(new ProviderViewModel({name:"WGS84 Ellipsoid",iconUrl:buildModuleUrl("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new EllipsoidTerrainProvider({ellipsoid:Ellipsoid.WGS84})}})),e.push(new ProviderViewModel({name:"Cesium World Terrain",iconUrl:buildModuleUrl("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 createWorldTerrainAsync({requestWaterMask:!0,requestVertexNormals:!0})}})),e}function frustumStatisticsToString(e){let t;if(defined$1(e)){t="Command Statistics";const i=e.commandsInFrustums;for(const e in i)if(i.hasOwnProperty(e)){let n,r=parseInt(e,10);if(7===r)n="1, 2 and 3";else{const e=[];for(let t=2;t>=0;t--){const i=Math.pow(2,t);r>=i&&(e.push(t+1),r-=i)}n=e.reverse().join(" and ")}t+=`<br> ${i[e]} in frustum ${n}`}t+=`<br>Total: ${e.totalCommands}`}return t}function boundDepthFrustum(e,t,i){let n=Math.min(i,t);return n=Math.max(n,e),n}AnimationViewModel.defaultDateFormatter=function(e,t){const i=JulianDate.toGregorianDate(e);return`${monthNames[i.month-1]} ${i.day} ${i.year}`},AnimationViewModel.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],AnimationViewModel.defaultTimeFormatter=function(e,t){const i=JulianDate.toGregorianDate(e),n=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?`${i.hour.toString().padStart(2,"0")}:${i.minute.toString().padStart(2,"0")}:${i.second.toString().padStart(2,"0")}.${n.toString().padStart(3,"0")}`:`${i.hour.toString().padStart(2,"0")}:${i.minute.toString().padStart(2,"0")}:${i.second.toString().padStart(2,"0")} UTC`},AnimationViewModel.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},AnimationViewModel.prototype.setShuttleRingTicks=function(e){if(!defined$1(e))throw new DeveloperError$1("positiveTicks is required.");let t,i,n;const r={},o=this._sortedFilteredPositiveTicks;for(o.length=0,t=0,i=e.length;t<i;++t)n=e[t],r.hasOwnProperty(n)||(r[n]=!0,o.push(n));o.sort(numberComparator);const a=[];for(i=o.length,t=i-1;t>=0;--t)n=o[t],0!==n&&a.push(-n);addAllToArray(a,o),this._allShuttleRingTicks=a},Object.defineProperties(AnimationViewModel.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 DeveloperError$1("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new DeveloperError$1("timeFormatter must be a function");this._timeFormatter=e}}}),AnimationViewModel._maxShuttleRingAngle=maxShuttleRingAngle,AnimationViewModel._realtimeShuttleRingAngle=realtimeShuttleRingAngle,Object.defineProperties(BaseLayerPickerViewModel.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),Object.defineProperties(BaseLayerPicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),BaseLayerPicker.prototype.isDestroyed=function(){return!1},BaseLayerPicker.prototype.destroy=function(){return FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._element),knockout.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),destroyObject$1(this)},Object.defineProperties(ProviderViewModel.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});const scratchPickRay=new Ray,scratchPickCartesian=new Cartesian3$1;function CesiumInspectorViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("scene is required");if(!defined$1(t))throw new DeveloperError$1("performanceContainer is required");const i=this,n=e.canvas,r=new ScreenSpaceEventHandler(n);this._eventHandler=r,this._scene=e,this._canvas=n,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;const o=this._scene.globe;let a;function s(e){const t=i._scene.pick({x:e.position.x,y:e.position.y});defined$1(t)&&(i.primitive=defined$1(t.collection)?t.collection:t.primitive),i._scene.requestRender(),i.pickPrimitiveActive=!1}function c(e){let t;const n=o.ellipsoid,r=i._scene.camera.getPickRay(e.position,scratchPickRay),a=o.pick(r,i._scene,scratchPickCartesian);if(defined$1(a)){const e=n.cartesianToCartographic(a),i=o._surface.tileProvider._tilesToRenderByTextureCount;for(let n=0;!t&&n<i.length;++n){const r=i[n];if(defined$1(r))for(let i=0;!t&&i<r.length;++i){const n=r[i];Rectangle.contains(n.rectangle,e)&&(t=n)}}}i.tile=t,i.pickTileActive=!1}o.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",knockout.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=createCommand(function(){i.dropDownVisible=!i.dropDownVisible}),this._toggleGeneral=createCommand(function(){i.generalVisible=!i.generalVisible}),this._togglePrimitives=createCommand(function(){i.primitivesVisible=!i.primitivesVisible}),this._toggleTerrain=createCommand(function(){i.terrainVisible=!i.terrainVisible}),this._frustumsSubscription=knockout.getObservable(this,"frustums").subscribe(function(e){i._scene.debugShowFrustums=e,i._scene.requestRender()}),this._frustumPlanesSubscription=knockout.getObservable(this,"frustumPlanes").subscribe(function(e){i._scene.debugShowFrustumPlanes=e,i._scene.requestRender()}),this._performanceSubscription=knockout.getObservable(this,"performance").subscribe(function(e){e?i._performanceDisplay=new PerformanceDisplay({container:i._performanceContainer}):i._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=createCommand(function(){return i._primitive.debugShowBoundingVolume=i.primitiveBoundingSphere,i._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=knockout.getObservable(this,"primitiveBoundingSphere").subscribe(function(){i._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=createCommand(function(){if(i.primitiveReferenceFrame){const e=i._primitive.modelMatrix;i._modelMatrixPrimitive=new DebugModelMatrixPrimitive({modelMatrix:e}),i._scene.primitives.add(i._modelMatrixPrimitive)}else defined$1(i._modelMatrixPrimitive)&&(i._scene.primitives.remove(i._modelMatrixPrimitive),i._modelMatrixPrimitive=void 0);return i._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=knockout.getObservable(this,"primitiveReferenceFrame").subscribe(function(){i._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=createCommand(function(){return i.filterPrimitive?i._scene.debugCommandFilter=function(e){return!(!defined$1(i._modelMatrixPrimitive)||e.owner!==i._modelMatrixPrimitive._primitive)||!!defined$1(i._primitive)&&(e.owner===i._primitive||e.owner===i._primitive._billboardCollection||e.owner.primitive===i._primitive)}:i._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=knockout.getObservable(this,"filterPrimitive").subscribe(function(){i._doFilterPrimitive(),i._scene.requestRender()}),this._wireframeSubscription=knockout.getObservable(this,"wireframe").subscribe(function(e){o._surface.tileProvider._debug.wireframe=e,i._scene.requestRender()}),this._depthFrustumSubscription=knockout.getObservable(this,"depthFrustum").subscribe(function(e){i._scene.debugShowDepthFrustum=e,i._scene.requestRender()}),this._incrementDepthFrustum=createCommand(function(){const e=i.depthFrustum+1;return i.depthFrustum=boundDepthFrustum(1,i._numberOfFrustums,e),i._scene.requestRender(),!0}),this._decrementDepthFrustum=createCommand(function(){const e=i.depthFrustum-1;return i.depthFrustum=boundDepthFrustum(1,i._numberOfFrustums,e),i._scene.requestRender(),!0}),this._suspendUpdatesSubscription=knockout.getObservable(this,"suspendUpdates").subscribe(function(e){o._surface._debug.suspendLodUpdate=e,e||(i.filterTile=!1)}),this._showTileCoordinates=createCommand(function(){return i.tileCoordinates&&!defined$1(a)?a=e.imageryLayers.addImageryProvider(new TileCoordinatesImageryProvider({tilingScheme:e.terrainProvider.tilingScheme})):!i.tileCoordinates&&defined$1(a)&&(e.imageryLayers.remove(a),a=void 0),!0}),this._tileCoordinatesSubscription=knockout.getObservable(this,"tileCoordinates").subscribe(function(){i._showTileCoordinates(),i._scene.requestRender()}),this._tileBoundingSphereSubscription=knockout.getObservable(this,"tileBoundingSphere").subscribe(function(){i._showTileBoundingSphere(),i._scene.requestRender()}),this._showTileBoundingSphere=createCommand(function(){return i.tileBoundingSphere?o._surface.tileProvider._debug.boundingSphereTile=i._tile:o._surface.tileProvider._debug.boundingSphereTile=void 0,i._scene.requestRender(),!0}),this._doFilterTile=createCommand(function(){return i.filterTile?(i.suspendUpdates=!0,o._surface._tilesToRender=[],defined$1(i._tile)&&i._tile.renderable&&o._surface._tilesToRender.push(i._tile)):i.suspendUpdates=!1,!0}),this._filterTileSubscription=knockout.getObservable(this,"filterTile").subscribe(function(){i.doFilterTile(),i._scene.requestRender()}),this._pickPrimitive=createCommand(function(){i.pickPrimitiveActive=!i.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=knockout.getObservable(this,"pickPrimitiveActive").subscribe(function(e){e?r.setInputAction(s,ScreenSpaceEventType$1.LEFT_CLICK):r.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)}),this._pickTile=createCommand(function(){i.pickTileActive=!i.pickTileActive}),this._pickTileActiveSubscription=knockout.getObservable(this,"pickTileActive").subscribe(function(e){e?r.setInputAction(c,ScreenSpaceEventType$1.LEFT_CLICK):r.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){i._update()})}function CesiumInspector(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("scene is required.");e=getElement(e);const i=document.createElement("div"),n=new CesiumInspectorViewModel(t,i);this._viewModel=n,this._container=e;const r=document.createElement("div");this._element=r;const o=document.createElement("div");o.textContent="Cesium Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleDropDown"),r.appendChild(o),r.className="cesium-cesiumInspector",r.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);const a=document.createElement("div");a.className="cesium-cesiumInspector-dropDown",r.appendChild(a);const s=InspectorShared.createSection,c=InspectorShared.createCheckbox,l=s(a,"General","generalVisible","toggleGeneral"),d=c("Show Frustums","frustums"),u=document.createElement("div");u.className="cesium-cesiumInspector-frustumStatistics",u.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),d.appendChild(u),l.appendChild(d),l.appendChild(c("Show Frustum Planes","frustumPlanes")),l.appendChild(c("Performance Display","performance")),i.className="cesium-cesiumInspector-performanceDisplay",l.appendChild(i);const h=document.createElement("div");h.className="cesium-cesiumInspector-shaderCache",h.setAttribute("data-bind","html: shaderCacheText"),l.appendChild(h);const p=document.createElement("div");l.appendChild(p);const A=document.createElement("span");A.setAttribute("data-bind",'html: " Frustum:"'),p.appendChild(A);const m=document.createElement("span");m.setAttribute("data-bind","text: depthFrustumText"),p.appendChild(m);const f=document.createElement("input");f.type="button",f.value="-",f.className="cesium-cesiumInspector-pickButton",f.setAttribute("data-bind","click: decrementDepthFrustum"),p.appendChild(f);const g=document.createElement("input");g.type="button",g.value="+",g.className="cesium-cesiumInspector-pickButton",g.setAttribute("data-bind","click: incrementDepthFrustum"),p.appendChild(g);const C=s(a,"Primitives","primitivesVisible","togglePrimitives"),y=document.createElement("div");y.className="cesium-cesiumInspector-pickSection",C.appendChild(y);const _=document.createElement("input");_.type="button",_.value="Pick a primitive",_.className="cesium-cesiumInspector-pickButton",_.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let E=document.createElement("div");E.className="cesium-cesiumInspector-center",E.appendChild(_),y.appendChild(E),y.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),y.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),y.appendChild(this._primitiveOnly);const b=s(a,"Terrain","terrainVisible","toggleTerrain"),I=document.createElement("div");I.className="cesium-cesiumInspector-pickSection",b.appendChild(I);const S=document.createElement("input");S.type="button",S.value="Pick a tile",S.className="cesium-cesiumInspector-pickButton",S.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),E=document.createElement("div"),E.appendChild(S),E.className="cesium-cesiumInspector-center",I.appendChild(E);const T=document.createElement("div");I.appendChild(T);const v=document.createElement("input");v.type="button",v.value="Parent",v.className="cesium-cesiumInspector-pickButton",v.setAttribute("data-bind","click: selectParent");const x=document.createElement("input");x.type="button",x.value="NW",x.className="cesium-cesiumInspector-pickButton",x.setAttribute("data-bind","click: selectNW");const w=document.createElement("input");w.type="button",w.value="NE",w.className="cesium-cesiumInspector-pickButton",w.setAttribute("data-bind","click: selectNE");const D=document.createElement("input");D.type="button",D.value="SW",D.className="cesium-cesiumInspector-pickButton",D.setAttribute("data-bind","click: selectSW");const B=document.createElement("input");B.type="button",B.value="SE",B.className="cesium-cesiumInspector-pickButton",B.setAttribute("data-bind","click: selectSE");const P=document.createElement("div");P.className="cesium-cesiumInspector-tileText",T.className="cesium-cesiumInspector-frustumStatistics",T.appendChild(P),T.setAttribute("data-bind","visible: hasPickedTile"),P.setAttribute("data-bind","html: tileText");const $=document.createElement("div");$.className="cesium-cesiumInspector-relativeText",$.textContent="Select relative:",T.appendChild($);const M=document.createElement("table"),R=document.createElement("tr"),O=document.createElement("tr"),F=document.createElement("td");F.appendChild(v);const N=document.createElement("td");N.appendChild(x);const L=document.createElement("td");L.appendChild(w),R.appendChild(F),R.appendChild(N),R.appendChild(L);const k=document.createElement("td"),Q=document.createElement("td");Q.appendChild(D);const U=document.createElement("td");U.appendChild(B),O.appendChild(k),O.appendChild(Q),O.appendChild(U),M.appendChild(R),M.appendChild(O),T.appendChild(M),I.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),I.appendChild(c("Show only selected","filterTile","hasPickedTile")),b.appendChild(c("Wireframe","wireframe")),b.appendChild(c("Suspend LOD update","suspendUpdates")),b.appendChild(c("Show tile coordinates","tileCoordinates")),knockout.applyBindings(n,this._element)}function getPickTileset(e){return function(t){const i=e._scene.pick(t.position);defined$1(i)&&i.primitive instanceof Cesium3DTileset&&(e.tileset=i.primitive),e.pickActive=!1}}function selectTilesetOnHover(e,t){t?e._eventHandler.setInputAction(function(t){const i=e._scene.pick(t.endPosition);defined$1(i)&&i.primitive instanceof Cesium3DTileset&&(e.tileset=i.primitive)},ScreenSpaceEventType$1.MOUSE_MOVE):(e._eventHandler.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE),e.picking=e.picking)}Object.defineProperties(CesiumInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(e){const t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,defined$1(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,defined$1(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(defined$1(e)){this.hasPickedTile=!0;if(e!==this._tile){this.tileText=`L: ${e.level} X: ${e.x} Y: ${e.y}`,this.tileText+=`<br>SW corner: ${e.rectangle.west}, ${e.rectangle.south}`,this.tileText+=`<br>NE corner: ${e.rectangle.east}, ${e.rectangle.north}`;const t=e.data;defined$1(t)&&defined$1(t.tileBoundingRegion)?this.tileText+=`<br>Min: ${t.tileBoundingRegion.minimumHeight} Max: ${t.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}}),CesiumInspectorViewModel.prototype._update=function(){this.frustums&&(this.frustumStatisticText=frustumStatisticsToString(this._scene.debugFrustumStatistics));const e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=boundDepthFrustum(1,e,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${e}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`},CesiumInspectorViewModel.prototype.isDestroyed=function(){return!1},CesiumInspectorViewModel.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),destroyObject$1(this)},Object.defineProperties(CesiumInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),CesiumInspector.prototype.isDestroyed=function(){return!1},CesiumInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject$1(this)};const stringOptions={maximumFractionDigits:3};function formatMemoryString(e){const t=e/1048576;return t<1?t.toLocaleString(void 0,stringOptions):Math.round(t).toLocaleString()}function getStatistics(e,t){if(!defined$1(e))return"";const i=t?e._statisticsPerPass[Cesium3DTilePass$1.PICK]:e._statisticsPerPass[Cesium3DTilePass$1.RENDER];let n='<ul class="cesium-cesiumInspector-statistics">';return n+=`<li><strong>Visited: </strong>${i.visited.toLocaleString()}</li><li><strong>Selected: </strong>${i.selected.toLocaleString()}</li><li><strong>Commands: </strong>${i.numberOfCommands.toLocaleString()}</li>`,n+="</ul>",t||(n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Requests: </strong>${i.numberOfPendingRequests.toLocaleString()}</li><li><strong>Attempted: </strong>${i.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>Processing: </strong>${i.numberOfTilesProcessing.toLocaleString()}</li><li><strong>Content Ready: </strong>${i.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>Total: </strong>${i.numberOfTilesTotal.toLocaleString()}</li>`,n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Features Selected: </strong>${i.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>Features Loaded: </strong>${i.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>Points Selected: </strong>${i.numberOfPointsSelected.toLocaleString()}</li><li><strong>Points Loaded: </strong>${i.numberOfPointsLoaded.toLocaleString()}</li><li><strong>Triangles Selected: </strong>${i.numberOfTrianglesSelected.toLocaleString()}</li>`,n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Tiles styled: </strong>${i.numberOfTilesStyled.toLocaleString()}</li><li><strong>Features styled: </strong>${i.numberOfFeaturesStyled.toLocaleString()}</li>`,n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Children Union Culled: </strong>${i.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Geometry Memory (MB): </strong>${formatMemoryString(i.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${formatMemoryString(i.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${formatMemoryString(i.batchTableByteLength)}</li>`,n+="</ul>"),n}function getResourceCacheStatistics(){const e=ResourceCache.statistics;return`\n <ul class="cesium-cesiumInspector-statistics">\n <li><strong>Geometry Memory (MB): </strong>${formatMemoryString(e.geometryByteLength)}</li>\n <li><strong>Texture Memory (MB): </strong>${formatMemoryString(e.texturesByteLength)}</li>\n </ul>\n `}const colorBlendModes=[{text:"Highlight",value:Cesium3DTileColorBlendMode$1.HIGHLIGHT},{text:"Replace",value:Cesium3DTileColorBlendMode$1.REPLACE},{text:"Mix",value:Cesium3DTileColorBlendMode$1.MIX}],highlightColor=new Color(1,1,0,.4),scratchColor=new Color,oldColor=new Color;function Cesium3DTilesInspectorViewModel(e,t){Check.typeOf.object("scene",e),Check.typeOf.object("performanceContainer",t);const i=this,n=e.canvas;this._eventHandler=new ScreenSpaceEventHandler(n),this._scene=e,this._performanceContainer=t,this._canvas=n,this._performanceDisplay=new PerformanceDisplay({container:t}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,knockout.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=knockout.observable({}),this.properties=[],knockout.defineProperty(this,"properties",function(){const e=[],t=i._properties();for(const i in t)t.hasOwnProperty(i)&&e.push(i);return e});const r=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return r()},set:function(e){r(e),defined$1(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;const o=knockout.observable();knockout.defineProperty(this,"colorBlendMode",{get:function(){return o()},set:function(e){o(e),defined$1(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=Cesium3DTileColorBlendMode$1.HIGHLIGHT;const a=knockout.observable(),s=knockout.observable();knockout.defineProperty(this,"picking",{get:function(){return s()},set:function(t){s(t),t?i._eventHandler.setInputAction(function(t){const n=e.pick(t.endPosition);if(n instanceof Cesium3DTileFeature?(i.feature=n,i.tile=n.content.tile):defined$1(n)&&defined$1(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),defined$1(i._tileset)){if(a&&defined$1(n)&&defined$1(n.content)){let r;e.pickPositionSupported&&(r=e.pickPosition(t.endPosition),defined$1(r)&&(i._tileset.debugPickPosition=r)),i._tileset.debugPickedTile=n.content.tile}else i._tileset.debugPickedTile=void 0;i._scene.requestRender()}},ScreenSpaceEventType$1.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE))}}),this.picking=!0;const c=knockout.observable();knockout.defineProperty(this,"colorize",{get:function(){return c()},set:function(e){c(e),defined$1(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;const l=knockout.observable();knockout.defineProperty(this,"wireframe",{get:function(){return l()},set:function(e){l(e),defined$1(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;const d=knockout.observable();knockout.defineProperty(this,"showBoundingVolumes",{get:function(){return d()},set:function(e){d(e),defined$1(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;const u=knockout.observable();knockout.defineProperty(this,"showContentBoundingVolumes",{get:function(){return u()},set:function(e){u(e),defined$1(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;const h=knockout.observable();knockout.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),defined$1(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;const p=knockout.observable();knockout.defineProperty(this,"freezeFrame",{get:function(){return p()},set:function(e){p(e),defined$1(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1,knockout.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return a()},set:function(e){a(e),defined$1(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;const A=knockout.observable();knockout.defineProperty(this,"showGeometricError",{get:function(){return A()},set:function(e){A(e),defined$1(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;const m=knockout.observable();knockout.defineProperty(this,"showRenderingStatistics",{get:function(){return m()},set:function(e){m(e),defined$1(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;const f=knockout.observable();knockout.defineProperty(this,"showMemoryUsage",{get:function(){return f()},set:function(e){f(e),defined$1(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;const g=knockout.observable();knockout.defineProperty(this,"showUrl",{get:function(){return g()},set:function(e){g(e),defined$1(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;const C=knockout.observable();knockout.defineProperty(this,"maximumScreenSpaceError",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),defined$1(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;const y=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return y()},set:function(e){e=Number(e),isNaN(e)||(y(e),defined$1(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,knockout.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(y(),1/6)},set:function(e){const t=Math.pow(e,6);y(t),defined$1(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=t)}});const _=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return _()},set:function(e){e=Number(e),isNaN(e)||(_(e),defined$1(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=24;const E=getPickTileset(this),b=knockout.observable();knockout.defineProperty(this,"pickActive",{get:function(){return b()},set:function(e){b(e),e?i._eventHandler.setInputAction(E,ScreenSpaceEventType$1.LEFT_CLICK):i._eventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)}});const I=knockout.observable();knockout.defineProperty(this,"pointCloudShading",{get:function(){return I()},set:function(e){I(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;const S=knockout.observable();knockout.defineProperty(this,"geometricErrorScale",{get:function(){return S()},set:function(e){e=Number(e),isNaN(e)||(S(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;const T=knockout.observable();knockout.defineProperty(this,"maximumAttenuation",{get:function(){return T()},set:function(e){e=Number(e),isNaN(e)||(T(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;const v=knockout.observable();knockout.defineProperty(this,"baseResolution",{get:function(){return v()},set:function(e){e=Number(e),isNaN(e)||(v(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;const x=knockout.observable();knockout.defineProperty(this,"eyeDomeLighting",{get:function(){return x()},set:function(e){x(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;const w=knockout.observable();knockout.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;const D=knockout.observable();knockout.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return D()},set:function(e){e=Number(e),isNaN(e)||(D(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;const B=knockout.observable();knockout.defineProperty(this,"skipLevelOfDetail",{get:function(){return B()},set:function(e){B(e),defined$1(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;const P=knockout.observable();knockout.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return P()},set:function(e){e=Number(e),isNaN(e)||(P(e),defined$1(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;const $=knockout.observable();knockout.defineProperty(this,"baseScreenSpaceError",{get:function(){return $()},set:function(e){e=Number(e),isNaN(e)||($(e),defined$1(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;const M=knockout.observable();knockout.defineProperty(this,"skipLevels",{get:function(){return M()},set:function(e){e=Number(e),isNaN(e)||(M(e),defined$1(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;const R=knockout.observable();knockout.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return R()},set:function(e){R(e),defined$1(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;const O=knockout.observable();knockout.defineProperty(this,"loadSiblings",{get:function(){return O()},set:function(e){O(e),defined$1(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener(function(){i._update()}),defined$1(this._tileset)||selectTilesetOnHover(this,!0)}function hasFeatures(e){if(!defined$1(e))return!1;if(e.featuresLength>0)return!0;const t=e.innerContents;if(defined$1(t)){const e=t.length;for(let i=0;i<e;++i)if(!hasFeatures(t[i]))return!1;return!0}return!1}function Cesium3DTilesInspector(e,t){Check.defined("container",e),Check.typeOf.object("scene",t),e=getElement(e);const i=document.createElement("div"),n=document.createElement("div");n.setAttribute("data-bind","visible: performance");const r=new Cesium3DTilesInspectorViewModel(t,n);this._viewModel=r,this._container=e,this._element=i;const o=document.createElement("div");o.textContent="3D Tiles Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),i.appendChild(o),i.className="cesium-cesiumInspector cesium-3DTilesInspector",i.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);const a=document.createElement("div");a.className="cesium-cesiumInspector-dropDown",i.appendChild(a);const s=InspectorShared.createSection,c=InspectorShared.createCheckbox,l=InspectorShared.createRangeInput,d=InspectorShared.createButton,u=s(a,"Tileset","tilesetVisible","toggleTileset"),h=s(a,"Display","displayVisible","toggleDisplay"),p=s(a,"Update","updateVisible","toggleUpdate"),A=s(a,"Logging","loggingVisible","toggleLogging"),m=s(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),f=s(a,"Style","styleVisible","toggleStyle"),g=s(a,"Optimization","optimizationVisible","toggleOptimization"),C=document.createElement("div");C.className="field-group";const y=document.createElement("label");y.className="field-label",y.appendChild(document.createTextNode("Properties: "));const _=document.createElement("div");_.setAttribute("data-bind","text: properties"),C.appendChild(y),C.appendChild(_),u.appendChild(C),u.appendChild(d("Pick Tileset","togglePickTileset","pickActive")),u.appendChild(d("Trim Tiles Cache","trimTilesCache")),u.appendChild(c("Enable Picking","picking")),h.appendChild(c("Colorize","colorize"));const E=h.appendChild(c("Wireframe","wireframe","_tileset === undefined || hasEnabledWireframe")),b=document.createElement("p");b.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),b.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),b.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",E.appendChild(b),h.appendChild(c("Bounding Volumes","showBoundingVolumes")),h.appendChild(c("Content Volumes","showContentBoundingVolumes")),h.appendChild(c("Request Volumes","showRequestVolumes")),h.appendChild(c("Point Cloud Shading","pointCloudShading"));const I=document.createElement("div");I.setAttribute("data-bind","visible: pointCloudShading"),I.appendChild(l("Geometric Error Scale","geometricErrorScale",0,2,.01)),I.appendChild(l("Maximum Attenuation","maximumAttenuation",0,32,1)),I.appendChild(l("Base Resolution","baseResolution",0,1,.01)),I.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),h.appendChild(I);const S=document.createElement("div");S.setAttribute("data-bind","visible: eyeDomeLighting"),S.appendChild(l("EDL Strength","eyeDomeLightingStrength",0,2,.1)),S.appendChild(l("EDL Radius","eyeDomeLightingRadius",0,4,.1)),I.appendChild(S),p.appendChild(c("Freeze Frame","freezeFrame")),p.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));const T=document.createElement("div");T.appendChild(l("Maximum Screen Space Error","maximumScreenSpaceError",0,128,1)),p.appendChild(T);const v=document.createElement("div");v.setAttribute("data-bind","visible: dynamicScreenSpaceError"),v.appendChild(l("Screen Space Error Density","dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"dynamicScreenSpaceErrorDensity")),v.appendChild(l("Screen Space Error Factor","dynamicScreenSpaceErrorFactor",1,32,.1)),p.appendChild(v),A.appendChild(c("Performance","performance")),A.appendChild(n),A.appendChild(c("Statistics","showStatistics"));const x=document.createElement("div");x.className="cesium-3dTilesInspector-statistics",x.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),A.appendChild(x),A.appendChild(c("Pick Statistics","showPickStatistics"));const w=document.createElement("div");w.className="cesium-3dTilesInspector-statistics",w.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),A.appendChild(w),A.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));const D=document.createElement("div");D.className="cesium-3dTilesInspector-statistics",D.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),A.appendChild(D);const B=document.createElement("div");f.appendChild(B),B.appendChild(document.createTextNode("Color Blend Mode: "));const P=document.createElement("select");P.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),B.appendChild(P);const $=document.createElement("textarea");$.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),B.className="cesium-cesiumInspector-styleEditor",B.appendChild($);const M=d("Compile (Ctrl+Enter)","compileStyle");B.appendChild(M);const R=document.createElement("div");R.className="cesium-cesiumInspector-error",R.setAttribute("data-bind","text: editorError"),B.appendChild(R),m.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),m.appendChild(c("Geometric Error","showGeometricError")),m.appendChild(c("Rendering Statistics","showRenderingStatistics")),m.appendChild(c("Memory Usage (MB)","showMemoryUsage")),m.appendChild(c("Url","showUrl")),g.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));const O=document.createElement("div");O.appendChild(l("Skip SSE Factor","skipScreenSpaceErrorFactor",1,50,1)),g.appendChild(O);const F=document.createElement("div");F.appendChild(l("SSE before skipping LOD","baseScreenSpaceError",0,4096,1)),g.appendChild(F);const N=document.createElement("div");N.appendChild(l("Min. levels to skip","skipLevels",0,10,1)),g.appendChild(N),g.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),g.appendChild(c("Load siblings of visible tiles","loadSiblings")),knockout.applyBindings(r,i)}function FullscreenButtonViewModel(e,t){defined$1(t)||(t=document.body),t=getElement(t);const i=this,n=knockout.observable(Fullscreen.fullscreen),r=knockout.observable(Fullscreen.enabled),o=t.ownerDocument;this.isFullscreen=void 0,knockout.defineProperty(this,"isFullscreen",{get:function(){return n()}}),this.isFullscreenEnabled=void 0,knockout.defineProperty(this,"isFullscreenEnabled",{get:function(){return r()},set:function(e){r(e&&Fullscreen.enabled)}}),this.tooltip=void 0,knockout.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?n()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=createCommand(function(){Fullscreen.fullscreen?Fullscreen.exitFullscreen():Fullscreen.requestFullscreen(i._fullscreenElement)},knockout.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=getElement(e)??o.body,this._callback=function(){n(Fullscreen.fullscreen)},o.addEventListener(Fullscreen.changeEventName,this._callback)}Object.defineProperties(Cesium3DTilesInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return colorBlendModes}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,defined$1(e)){this._properties(e.properties);const t=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],i=t.length;for(let e=0;e<i;++e){const i=t[e];this[i]=this[i]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings,this.hasEnabledWireframe=e._enableDebugWireframe;const n=e.pointCloudShading;this.pointCloudShading=n.attenuation,this.geometricErrorScale=n.geometricErrorScale,this.maximumAttenuation=n.maximumAttenuation?n.maximumAttenuation:0,this.baseResolution=n.baseResolution?n.baseResolution:0,this.eyeDomeLighting=n.eyeDomeLighting,this.eyeDomeLightingStrength=n.eyeDomeLightingStrength,this.eyeDomeLightingRadius=n.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=getStatistics(e,!1),this._pickStatisticsText=getStatistics(e,!0),this._resourceCacheStatisticsText=getResourceCacheStatistics(),selectTilesetOnHover(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature===e)return;const t=this._feature;defined$1(t)&&!t.content.isDestroyed()&&(!this.colorize&&defined$1(this._style)?t.color=defined$1(this._style.color)?this._style.color.evaluateColor(t,scratchColor):Color.WHITE:t.color=oldColor,this._scene.requestRender()),defined$1(e)&&(Color.clone(e.color,oldColor),e.color=highlightColor,this._scene.requestRender()),this._feature=e}},tile:{get:function(){return this._tile},set:function(e){if(this._tile===e)return;const t=this._tile;!defined$1(t)||t.isDestroyed()||hasFeatures(t.content)||(t.color=oldColor,this._scene.requestRender()),defined$1(e)&&!hasFeatures(e.content)&&(Color.clone(e.color,oldColor),e.color=highlightColor,this._scene.requestRender()),this._tile=e}}}),Cesium3DTilesInspectorViewModel.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive},Cesium3DTilesInspectorViewModel.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},Cesium3DTilesInspectorViewModel.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible},Cesium3DTilesInspectorViewModel.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},Cesium3DTilesInspectorViewModel.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible},Cesium3DTilesInspectorViewModel.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible},Cesium3DTilesInspectorViewModel.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible},Cesium3DTilesInspectorViewModel.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible},Cesium3DTilesInspectorViewModel.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible},Cesium3DTilesInspectorViewModel.prototype.trimTilesCache=function(){defined$1(this._tileset)&&this._tileset.trimLoadedTiles()},Cesium3DTilesInspectorViewModel.prototype.compileStyle=function(){const e=this._tileset;if(defined$1(e)&&this.styleString!==JSON.stringify(e.style)){this._editorError="";try{0===this.styleString.length&&(this.styleString="{}"),this._style=new Cesium3DTileStyle(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(e){this._editorError=e.toString()}this.feature=this._feature,this.tile=this._tile}},Cesium3DTilesInspectorViewModel.prototype.styleEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();const e=t.target,i=e.selectionStart,n=e.selectionEnd;let r=n;const o=e.value.slice(i,n).split("\n"),a=o.length;let s;if(t.shiftKey)for(s=0;s<a;++s)" "===o[s][0]&&(" "===o[s][1]?(o[s]=o[s].substr(2),r-=2):(o[s]=o[s].substr(1),r-=1));else for(s=0;s<a;++s)o[s]=` ${o[s]}`,r+=2;const c=o.join("\n");e.value=e.value.slice(0,i)+c+e.value.slice(n),e.selectionStart=i!==n?i:r,e.selectionEnd=r}else!t.ctrlKey||10!==t.keyCode&&13!==t.keyCode||this.compileStyle();return!0},Cesium3DTilesInspectorViewModel.prototype._update=function(){const e=this._tileset;if(this.performance&&this._performanceDisplay.update(),defined$1(e)){if(e.isDestroyed())return this.tile=void 0,this.feature=void 0,void(this.tileset=void 0);const t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=getStatistics(e,!1),this._pickStatisticsText=getStatistics(e,!0),this._resourceCacheStatisticsText=getResourceCacheStatistics())},Cesium3DTilesInspectorViewModel.prototype.isDestroyed=function(){return!1},Cesium3DTilesInspectorViewModel.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();const e=this;return this._definedProperties.forEach(function(t){knockout.getObservable(e,t).dispose()}),destroyObject$1(this)},Cesium3DTilesInspectorViewModel.getStatistics=getStatistics,Object.defineProperties(Cesium3DTilesInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Cesium3DTilesInspector.prototype.isDestroyed=function(){return!1},Cesium3DTilesInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject$1(this)},Object.defineProperties(FullscreenButtonViewModel.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new DeveloperError$1("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),FullscreenButtonViewModel.prototype.isDestroyed=function(){return!1},FullscreenButtonViewModel.prototype.destroy=function(){document.removeEventListener(Fullscreen.changeEventName,this._callback),destroyObject$1(this)};const 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",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";function FullscreenButton(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");const i=new FullscreenButtonViewModel(t,e=getElement(e));i._exitFullScreenPath=exitFullScreenPath,i._enterFullScreenPath=enterFullScreenPath;const n=document.createElement("button");n.type="button",n.className="cesium-button cesium-fullscreenButton",n.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(n),knockout.applyBindings(i,n),this._container=e,this._viewModel=i,this._element=n}Object.defineProperties(FullscreenButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),FullscreenButton.prototype.isDestroyed=function(){return!1},FullscreenButton.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject$1(this)};const DEFAULT_HEIGHT=1e3;function GeocoderViewModel(e){if(!defined$1(e)||!defined$1(e.scene))throw new DeveloperError$1("options.scene is required.");defined$1(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new IonGeocoderService({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 Event$1,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=handleArrowDown,this._handleArrowUp=handleArrowUp;const t=this;this._suggestionsVisible=knockout.pureComputed(function(){const e=knockout.getObservable(t,"_suggestions")().length>0,i=knockout.getObservable(t,"_showSuggestions")();return e&&i}),this._searchCommand=createCommand(function(e){return e=e??GeocodeType$1.SEARCH,t._focusTextbox=!1,defined$1(t._selectedSuggestion)?(t.activateSuggestion(t._selectedSuggestion),!1):(t.hideSuggestions(),t.isSearchInProgress?void cancelGeocode(t):geocode(t,t._geocoderServices,e))}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(e,t){const i="ArrowDown"===t.key||"Down"===t.key||40===t.keyCode,n="ArrowUp"===t.key||"Up"===t.key||38===t.keyCode;return(i||n)&&t.preventDefault(),!0},this.handleKeyUp=function(e,i){const n="ArrowDown"===i.key||"Down"===i.key||40===i.keyCode,r="ArrowUp"===i.key||"Up"===i.key||38===i.keyCode,o="Enter"===i.key||13===i.keyCode;return r?handleArrowUp(t):n?handleArrowDown(t):o&&t._searchCommand(),!0},this.activateSuggestion=function(e){t.hideSuggestions(),t._searchText=e.displayName;const i=e.destination;clearSuggestions(t),t.destinationFound(t,i)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(e,i){e!==t._selectedSuggestion&&(t._selectedSuggestion=e)},this.keepExpanded=!1,this.autoComplete=e.autocomplete??!0,this.destinationFound=e.destinationFound??GeocoderViewModel.flyToDestination,this._focusTextbox=!1,knockout.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);const i=knockout.getObservable(this,"_searchText");i.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=i.subscribe(function(){GeocoderViewModel._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,knockout.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,knockout.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){if("string"!=typeof e)throw new DeveloperError$1("value must be a valid string.");this._searchText=e}}),this.flightDuration=void 0,knockout.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){if(defined$1(e)&&e<0)throw new DeveloperError$1("value must be positive.");this._flightDuration=e}})}function handleArrowUp(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 i=t-1;e._selectedSuggestion=e._suggestions[i],GeocoderViewModel._adjustSuggestionsScroll(e,i)}function handleArrowDown(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],GeocoderViewModel._adjustSuggestionsScroll(e,i)}function computeFlyToLocationForCartographic(e,t){const i=defined$1(t)?t.availability:void 0;return defined$1(i)?sampleTerrainMostDetailed(t,[e]).then(function(t){return(e=t[0]).height+=DEFAULT_HEIGHT,e}):(e.height+=DEFAULT_HEIGHT,Promise.resolve(e))}function flyToDestination(e,t){const i=e._scene,n=i.ellipsoid,r=i.camera,o=i.terrainProvider;let a,s=t;return t instanceof Rectangle?CesiumMath.equalsEpsilon(t.south,t.north,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(t.east,t.west,CesiumMath.EPSILON7)?t=Rectangle.center(t):a=computeFlyToLocationForRectangle(t,i):t=n.cartesianToCartographic(t),defined$1(a)||(a=computeFlyToLocationForCartographic(t,o)),a.then(function(e){s=n.cartographicToCartesian(e)}).finally(function(){r.flyTo({destination:s,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:Matrix4$1.IDENTITY})})}async function attemptGeocode(e,t,i){try{return{state:"fulfilled",value:await e.geocode(t,i),credits:e.credit}}catch(e){return{state:"rejected",reason:e}}}async function geocode(e,t,i){const n=e._searchText;if(hasOnlyWhitespace(n))return void e.showSuggestions();let r,o;for(e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1,r=0;r<t.length;r++){if(e._wasGeocodeCancelled)return;if(o=await attemptGeocode(t[r],n,i),defined$1(o)&&"fulfilled"===o.state&&o.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,clearCredits(e);const a=o.value;if("fulfilled"===o.state&&defined$1(a)&&a.length>0){e._searchText=a[0].displayName,e.destinationFound(e,a[0].destination);return void(defined$1(updateCredits(e,GeocoderService.getCreditsFromResult(a[0])))||updateCredit(e,t[r].credit))}e._searchText=`${n} (not found)`}function updateCredit(e,t){!defined$1(t)||e._scene.isDestroyed()||e._scene.frameState.creditDisplay.isDestroyed()||(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function updateCredits(e,t){return defined$1(t)&&t.forEach(t=>updateCredit(e,t)),t}function clearCredits(e){e._scene.isDestroyed()||e._scene.frameState.creditDisplay.isDestroyed()||e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function adjustSuggestionsScroll(e,t){const i=getElement(e._viewContainer),n=i.getElementsByClassName("search-results")[0],r=i.getElementsByTagName("li")[t];if(0===t)return void(n.scrollTop=0);const o=r.offsetTop;o+r.clientHeight>n.clientHeight?n.scrollTop=o+r.clientHeight:o<n.scrollTop&&(n.scrollTop=o)}function cancelGeocode(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function hasOnlyWhitespace(e){return/^\s*$/.test(e)}function clearSuggestions(e){knockout.getObservable(e,"_suggestions").removeAll()}async function updateSearchSuggestions(e){if(!e.autoComplete)return;const t=e._searchText;if(clearSuggestions(e),clearCredits(e),!hasOnlyWhitespace(t))for(const i of e._geocoderServices){const n=await i.geocode(t,GeocodeType$1.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(n),n.length>0){let t=!0;n.forEach(i=>{const n=GeocoderService.getCreditsFromResult(i);t=t&&!defined$1(n),updateCredits(e,n)}),t&&updateCredit(e,i.credit)}if(e._suggestions.length>=5)return}}Object.defineProperties(GeocoderViewModel.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}}}),GeocoderViewModel.prototype.destroy=function(){this._suggestionSubscription.dispose()},GeocoderViewModel.flyToDestination=flyToDestination,GeocoderViewModel._updateSearchSuggestions=updateSearchSuggestions,GeocoderViewModel._adjustSuggestionsScroll=adjustSuggestionsScroll,GeocoderViewModel.prototype.isDestroyed=function(){return!1},GeocoderViewModel.prototype.destroy=function(){return clearCredits(this),destroyObject$1(this)};const 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",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";function Geocoder(e){if(!defined$1(e)||!defined$1(e.container))throw new DeveloperError$1("options.container is required.");if(!defined$1(e.scene))throw new DeveloperError$1("options.scene is required.");const t=getElement(e.container),i=new GeocoderViewModel(e);i._startSearchPath=startSearchPath,i._stopSearchPath=stopSearchPath;const n=document.createElement("form");n.setAttribute("data-bind","submit: search");const r=document.createElement("input");r.type="search",r.className="cesium-geocoder-input",r.setAttribute("placeholder","Enter an address or landmark..."),r.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(){r.select()},0)},r.addEventListener("focus",this._onTextBoxFocus,!1),n.appendChild(r),this._textBox=r;const o=document.createElement("span");o.className="cesium-geocoder-searchButton",o.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),n.appendChild(o),t.appendChild(n);const a=document.createElement("div");a.className="search-results",a.setAttribute("data-bind","visible: _suggestionsVisible");const s=document.createElement("ul");s.setAttribute("data-bind","foreach: _suggestions");const c=document.createElement("li");s.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),a.appendChild(s),t.appendChild(a),knockout.applyBindings(i,n),knockout.applyBindings(i,a),this._container=t,this._searchSuggestionsContainer=a,this._viewModel=i,this._form=n,this._onInputBegin=function(e){let n=e.target;"function"==typeof e.composedPath&&(n=e.composedPath()[0]),t.contains(n)||(i._focusTextbox=!1,i.hideSuggestions())},this._onInputEnd=function(e){i._focusTextbox=!0,i.showSuggestions()},FeatureDetection.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))}function HomeButtonViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("scene is required.");this._scene=e,this._duration=t;const i=this;this._command=createCommand(function(){i._scene.camera.flyHome(i._duration)}),this.tooltip="View Home",knockout.track(this,["tooltip"])}function HomeButton(e,t,i){if(!defined$1(e))throw new DeveloperError$1("container is required.");e=getElement(e);const n=new HomeButtonViewModel(t,i);n._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 r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-home-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(r),knockout.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}function expandItemsHandler(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent="+"===t.currentTarget.textContent?"-":"+"}function trackSublayer(e,t){knockout.track(e);for(let t=0;t<e.sublayers.length;t++)trackSublayer(e.sublayers[t])}function isFullModel(e){return"FullModel"===e.modelName}function isOverview(e){return"Overview"===e.modelName}function isTopLayer(e){return isOverview(e)||isFullModel(e)}function addTopLayer(e,t){if(isTopLayer(e)){e.visibility=!1;for(let t=0;t<e.sublayers.length;t++)e.sublayers[t].visibility=!0;const i={name:e.name,modelName:e.modelName,disable:knockout.observable(!1),index:t.sublayers.length};return t.topLayers.push(i),t.sublayers.push(e),i}}function handleTopLayerSelector(e,t){if(isTopLayer(e)){t.sublayers.forEach(e=>e.visibility=!1),t.sublayers[e.index].visibility=!0;const i=document.getElementById("bsl-wrapper");isFullModel(e)?(t.currentLevel=t.selectedLevel,i.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",i.style.display="none")}}async function setLevels(e,t){try{const i=e.getAttributeNames();for(let n=0;n<i.length;n++)if("BldgLevel"===i[n]){const r=e.getAttributeValues(i[n]);for(let e=0;e<r.length;e++)t.push(r[e])}t.sort((e,t)=>e-t),t.unshift("All")}catch(e){console.log(`There was an error getting attributes: ${e}`)}}function I3SBuildingSceneLayerExplorerViewModel(e){const t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:knockout.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:knockout.observable(!0),index:-1}],currentLayer:knockout.observable(),expandClickHandler:expandItemsHandler,setOptionDisable:function(e,t){knockout.applyBindingsToNode(e,{disable:t.disable},t)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(e){handleTopLayerSelector(e,t.viewModel)});const i=e.sublayers;for(let e=0;e<i.length;e++){trackSublayer(i[e],this.viewModel);const t=addTopLayer(i[e],this.viewModel);defined$1(t)&&(isOverview(t)||!defined$1(this.viewModel.defaultLayer)&&isFullModel(t))&&(this.viewModel.defaultLayer=t)}if(1===this.viewModel.topLayers.length&&i.length>0){e.show=!1;const t={name:"Full Model",modelName:"FullModel",visibility:e.show,sublayers:e.sublayers};this.viewModel.defaultLayer=addTopLayer(t,this.viewModel),this.viewModel.currentLayer.subscribe(function(t){e.show=isFullModel(t)})}else 1===this.viewModel.topLayers.length&&(this.viewModel.topLayers[0].name="Building layers not found");return setLevels(e,this.levels),this.viewModel.currentLevel.subscribe(function(t){"All"!==t?e.filterByAttributes([{name:"BldgLevel",values:[t]}]):e.filterByAttributes()}),this.viewModel}function I3SBuildingSceneLayerExplorer(e,t){const i=document.getElementById(e);Check.defined("container",i),Check.defined("i3sProvider",t);const n=document.createElement("div");n.classList.add("cesium-viewer-i3s-explorer"),n.innerHTML='\n <h3>Building explorer</h3>\n <select\n data-bind="options: topLayers, optionsText: \'name\', optionsAfterRender: setOptionDisable, value: currentLayer"\n ></select>\n <div id="bsl-wrapper">\n <h3>Select Level</h3>\n <select data-bind="options: levels, value: currentLevel"></select>\n <h3>Disciplines & Categories</h3>\n <ul class="layersList" data-bind="foreach: sublayers">\n <ul class="layersList" data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">\n <li>\n <div class="li-wrapper">\n <span\n class="expandItem"\n data-bind="click: $root.expandClickHandler"\n >+</span\n >\n <input\n type="checkbox"\n data-bind="checked: visibility, valueUpdate: \'input\', attr: { id: name}"\n />\n <label data-bind="attr: { for: name}">\n <span data-bind="text: name"></span>\n </label>\n </div>\n <ul class="nested" data-bind="attr: { id: name + \'-expander\'}">\n <li data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">\n <div class="li-wrapper">\n <input\n type="checkbox"\n data-bind="checked: visibility, valueUpdate: \'input\', attr: { id: name}"\n />\n <label data-bind="attr: { for: name}">\n <span data-bind="text: name"></span>\n </label>\n </div>\n </li>\n </ul>\n </li>\n </ul>\n </ul>\n </div>',i.appendChild(n);const r=new I3SBuildingSceneLayerExplorerViewModel(t);knockout.track(r),knockout.applyBindings(r,i),defined$1(r.defaultLayer)&&(r.currentLayer=r.defaultLayer)}Object.defineProperties(Geocoder.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}}),Geocoder.prototype.isDestroyed=function(){return!1},Geocoder.prototype.destroy=function(){const e=this._container;return FeatureDetection.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(),knockout.cleanNode(this._form),knockout.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),destroyObject$1(this)},Object.defineProperties(HomeButtonViewModel.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(defined$1(e)&&e<0)throw new DeveloperError$1("value must be positive.");this._duration=e}}}),Object.defineProperties(HomeButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),HomeButton.prototype.isDestroyed=function(){return!1},HomeButton.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject$1(this)};const cameraEnabledPath="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",cameraDisabledPath="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function InfoBoxViewModel(){this._cameraClicked=new Event$1,this._closeClicked=new Event$1,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",knockout.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,knockout.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?cameraDisabledPath:cameraEnabledPath}}),knockout.defineProperty(this,"_bodyless",{get:function(){return!defined$1(this.description)||0===this.description.length}})}function InfoBox(e){Check.defined("container",e),e=getElement(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 i=document.createElement("div");i.className="cesium-infoBox-title",i.setAttribute("data-bind","text: titleText"),t.appendChild(i);const n=document.createElement("button");n.type="button",n.className="cesium-button cesium-infoBox-camera",n.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(n);const r=document.createElement("button");r.type="button",r.className="cesium-infoBox-close",r.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),r.innerHTML="×",t.appendChild(r);const o=document.createElement("iframe");o.className="cesium-infoBox-iframe",o.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),o.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),o.setAttribute("allowfullscreen",!0),t.appendChild(o);const a=new InfoBoxViewModel;knockout.applyBindings(a,t),this._container=e,this._element=t,this._frame=o,this._viewModel=a,this._descriptionSubscription=void 0;const s=this;o.addEventListener("load",function(){const e=o.contentDocument,i=e.createElement("link");i.href=buildModuleUrl("Widgets/InfoBox/InfoBoxDescription.css"),i.rel="stylesheet",i.type="text/css";const n=e.createElement("div");n.className="cesium-infoBox-description",e.head.appendChild(i),e.body.appendChild(n),s._descriptionSubscription=subscribeAndEvaluate(a,"description",function(e){o.style.height="5px",n.innerHTML=e;let i=null;const r=n.firstElementChild;if(null!==r&&1===n.childNodes.length){const e=window.getComputedStyle(r);if(null!==e){const t=e["background-color"],n=Color.fromCssColorString(t);defined$1(n)&&0!==n.alpha&&(i=e["background-color"])}}t.style["background-color"]=i;const a=n.getBoundingClientRect().height;o.style.height=`${a}px`})}),o.setAttribute("src","about:blank")}function PerformanceWatchdogViewModel(e){if(!defined$1(e)||!defined$1(e.scene))throw new DeveloperError$1("options.scene is required.");this._scene=e.scene,this.lowFrameRateMessage=e.lowFrameRateMessage??"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.",this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,knockout.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);const t=this;this._dismissMessage=createCommand(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});const i=FrameRateMonitor.fromScene(e.scene);this._unsubscribeLowFrameRate=i.lowFrameRate.addEventListener(function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=i.nominalFrameRate.addEventListener(function(){t.showingLowFrameRateMessage=!1})}function PerformanceWatchdog(e){if(!defined$1(e)||!defined$1(e.container))throw new DeveloperError$1("options.container is required.");if(!defined$1(e.scene))throw new DeveloperError$1("options.scene is required.");const t=getElement(e.container),i=new PerformanceWatchdogViewModel(e),n=document.createElement("div");n.className="cesium-performance-watchdog-message-area",n.setAttribute("data-bind","visible: showingLowFrameRateMessage");const r=document.createElement("button");r.setAttribute("type","button"),r.className="cesium-performance-watchdog-message-dismiss",r.innerHTML="×",r.setAttribute("data-bind","click: dismissMessage"),n.appendChild(r);const o=document.createElement("div");o.className="cesium-performance-watchdog-message",o.setAttribute("data-bind","html: lowFrameRateMessage"),n.appendChild(o),t.appendChild(n),knockout.applyBindings(i,n),this._container=t,this._viewModel=i,this._element=n}function NavigationHelpButtonViewModel(){this.showInstructions=!1;const e=this;this._command=createCommand(function(){e.showInstructions=!e.showInstructions}),this._showClick=createCommand(function(){e._touch=!1}),this._showTouch=createCommand(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",knockout.track(this,["tooltip","showInstructions","_touch"])}function NavigationHelpButton(e){if(!defined$1(e)||!defined$1(e.container))throw new DeveloperError$1("options.container is required.");const t=getElement(e.container),i=new NavigationHelpButtonViewModel,n=e.instructionsInitiallyVisible??!1;i.showInstructions=n,i._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 r=document.createElement("span");r.className="cesium-navigationHelpButton-wrapper",t.appendChild(r);const o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),r.appendChild(o);const a=document.createElement("div");a.className="cesium-navigation-help",a.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),r.appendChild(a);const s=document.createElement("button");s.type="button",s.className="cesium-navigation-button cesium-navigation-button-left",s.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');const c=document.createElement("img");c.src=buildModuleUrl("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",s.appendChild(c),s.appendChild(document.createTextNode("Mouse"));const l=document.createElement("button");l.type="button",l.className="cesium-navigation-button cesium-navigation-button-right",l.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');const d=document.createElement("img");d.src=buildModuleUrl("Widgets/Images/NavigationHelp/Touch.svg"),d.className="cesium-navigation-button-icon",d.style.width="25px",d.style.height="25px",l.appendChild(d),l.appendChild(document.createTextNode("Touch")),a.appendChild(s),a.appendChild(l);const u=document.createElement("div");u.className="cesium-click-navigation-help cesium-navigation-help-instructions",u.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),u.innerHTML=` <table> <tr> <td><img src="${buildModuleUrl("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="${buildModuleUrl("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="${buildModuleUrl("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>`,a.appendChild(u);const h=document.createElement("div");h.className="cesium-touch-navigation-help cesium-navigation-help-instructions",h.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),h.innerHTML=` <table> <tr> <td><img src="${buildModuleUrl("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="${buildModuleUrl("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="${buildModuleUrl("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="${buildModuleUrl("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>`,a.appendChild(h),knockout.applyBindings(i,r),this._container=t,this._viewModel=i,this._wrapper=r,this._closeInstructions=function(e){r.contains(e.target)||(i.showInstructions=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}function ProjectionPickerViewModel(e){if(!defined$1(e))throw new DeveloperError$1("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof OrthographicFrustum,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,knockout.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);const t=this;knockout.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=createCommand(function(){t.sceneMode===SceneMode$2.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new EventHelper,this._eventHelper.add(e.morphComplete,function(e,i,n,r){t.sceneMode=n,t._orthographic=n===SceneMode$2.SCENE2D||t._scene.camera.frustum instanceof OrthographicFrustum}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=defined$1(e.camera._currentFlight)}),this._switchToPerspective=createCommand(function(){t.sceneMode!==SceneMode$2.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=createCommand(function(){t.sceneMode!==SceneMode$2.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=SceneMode$2}InfoBoxViewModel.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(InfoBoxViewModel.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),Object.defineProperties(InfoBox.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),InfoBox.prototype.isDestroyed=function(){return!1},InfoBox.prototype.destroy=function(){const e=this._container;return knockout.cleanNode(this._element),e.removeChild(this._element),defined$1(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),destroyObject$1(this)},Object.defineProperties(PerformanceWatchdogViewModel.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),PerformanceWatchdogViewModel.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),destroyObject$1(this)},Object.defineProperties(PerformanceWatchdog.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),PerformanceWatchdog.prototype.isDestroyed=function(){return!1},PerformanceWatchdog.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject$1(this)},Object.defineProperties(NavigationHelpButtonViewModel.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),Object.defineProperties(NavigationHelpButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),NavigationHelpButton.prototype.isDestroyed=function(){return!1},NavigationHelpButton.prototype.destroy=function(){return FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject$1(this)},Object.defineProperties(ProjectionPickerViewModel.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}}}),ProjectionPickerViewModel.prototype.isDestroyed=function(){return!1},ProjectionPickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject$1(this)};const 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",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";function ProjectionPicker(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("scene is required.");e=getElement(e);const i=new ProjectionPickerViewModel(t);i._perspectivePath=perspectivePath,i._orthographicPath=orthographicPath;const n=document.createElement("span");n.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(n);const r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.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'),r.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',n.appendChild(r);const o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",o.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 }'),n.appendChild(o);const a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",a.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 }'),n.appendChild(a),knockout.applyBindings(i,n),this._viewModel=i,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(i.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function SceneModePickerViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("scene is required.");this._scene=e;const i=this;this._eventHelper=new EventHelper,this._eventHelper.add(e.morphStart,function(e,t,n,r){i.sceneMode=n,i.dropDownVisible=!1}),this._duration=t??2,this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",knockout.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,knockout.defineProperty(this,"selectedTooltip",function(){const e=i.sceneMode;return e===SceneMode$2.SCENE2D?i.tooltip2D:e===SceneMode$2.SCENE3D?i.tooltip3D:i.tooltipColumbusView}),this._toggleDropDown=createCommand(function(){i.dropDownVisible=!i.dropDownVisible}),this._morphTo2D=createCommand(function(){e.morphTo2D(i._duration)}),this._morphTo3D=createCommand(function(){e.morphTo3D(i._duration)}),this._morphToColumbusView=createCommand(function(){e.morphToColumbusView(i._duration)}),this._sceneMode=SceneMode$2}Object.defineProperties(ProjectionPicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),ProjectionPicker.prototype.isDestroyed=function(){return!1},ProjectionPicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject$1(this)},Object.defineProperties(SceneModePickerViewModel.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new DeveloperError$1("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}}}),SceneModePickerViewModel.prototype.isDestroyed=function(){return!1},SceneModePickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject$1(this)};const 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",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",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";function SceneModePicker(e,t,i){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("scene is required.");e=getElement(e);const n=new SceneModePickerViewModel(t,i);n._globePath=globePath,n._flatMapPath=flatMapPath,n._columbusViewPath=columbusViewPath;const r=document.createElement("span");r.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(r);const o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.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'),o.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',r.appendChild(o);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.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 }'),r.appendChild(a);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.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),r.appendChild(s);const c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),r.appendChild(c),knockout.applyBindings(n,r),this._viewModel=n,this._container=e,this._wrapper=r,this._closeDropDown=function(e){r.contains(e.target)||(n.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(SceneModePicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SceneModePicker.prototype.isDestroyed=function(){return!1},SceneModePicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject$1(this)};const screenSpacePos=new Cartesian2,offScreen="-1000px";function SelectionIndicatorViewModel(e,t,i){if(!defined$1(e))throw new DeveloperError$1("scene is required.");if(!defined$1(t))throw new DeveloperError$1("selectionIndicatorElement is required.");if(!defined$1(i))throw new DeveloperError$1("container is required.");this._scene=e,this._screenPositionX=offScreen,this._screenPositionY=offScreen,this._tweens=e.tweens,this._container=i??document.body,this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,knockout.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,knockout.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&defined$1(this.position)}}),knockout.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(t,i){return SceneTransforms.worldToWindowCoordinates(e,t,i)}}function SelectionIndicator(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");e=getElement(e),this._container=e;const i=document.createElement("div");i.className="cesium-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;const n="http://www.w3.org/2000/svg",r=document.createElementNS(n,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");const o=document.createElementNS(n,"g");o.setAttribute("transform","translate(80,80)"),r.appendChild(o);const a=document.createElementNS(n,"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"),o.appendChild(a),i.appendChild(r);const s=new SelectionIndicatorViewModel(t,this._element,this._container);this._viewModel=s,knockout.applyBindings(this._viewModel,this._element)}function TimelineHighlightRange(e,t,i){this._color=e,this._height=t,this._base=i??0}function TimelineTrack(e,t,i,n){this.interval=e,this.height=t,this.color=i||new Color(.5,.5,.5,1),this.backgroundColor=n||new Color(0,0,0,0)}SelectionIndicatorViewModel.prototype.update=function(){if(this.showSelection&&defined$1(this.position)){const e=this.computeScreenSpacePosition(this.position,screenSpacePos);if(defined$1(e)){const t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=this._selectionIndicatorElement.clientWidth,o=.5*r;e.x=Math.min(Math.max(e.x,-r),i+r)-o,e.y=Math.min(Math.max(e.y,-r),n+r)-o,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}else this._screenPositionX=offScreen,this._screenPositionY=offScreen}},SelectionIndicatorViewModel.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:EasingFunction$1.EXPONENTIAL_OUT})},SelectionIndicatorViewModel.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:EasingFunction$1.EXPONENTIAL_OUT})},Object.defineProperties(SelectionIndicatorViewModel.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(SelectionIndicator.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SelectionIndicator.prototype.isDestroyed=function(){return!1},SelectionIndicator.prototype.destroy=function(){const e=this._container;return knockout.cleanNode(this._element),e.removeChild(this._element),destroyObject$1(this)},TimelineHighlightRange.prototype.getHeight=function(){return this._height},TimelineHighlightRange.prototype.getBase=function(){return this._base},TimelineHighlightRange.prototype.getStartTime=function(){return this._start},TimelineHighlightRange.prototype.getStopTime=function(){return this._stop},TimelineHighlightRange.prototype.setRange=function(e,t){this._start=e,this._stop=t},TimelineHighlightRange.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){const i=JulianDate.secondsDifference(this._start,e.epochJulian);let n=Math.round(e.timeBarWidth*e.getAlpha(i));const r=JulianDate.secondsDifference(this._stop,e.epochJulian);let o=Math.round(e.timeBarWidth*e.getAlpha(r))-n;n<0&&(o+=n,n=0),n+o>e.timeBarWidth&&(o=e.timeBarWidth-n),o>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${n.toString()}px; width: ${o.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t},TimelineTrack.prototype.render=function(e,t){const i=this.interval.start,n=this.interval.stop,r=t.startJulian,o=JulianDate.addSeconds(t.startJulian,t.duration,new JulianDate);if(JulianDate.lessThan(i,r)&&JulianDate.greaterThan(n,o))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(JulianDate.lessThanOrEquals(i,o)&&JulianDate.greaterThanOrEquals(n,r)){let r,o,a;for(r=0;r<t.timeBarWidth;++r){const e=JulianDate.addSeconds(t.startJulian,r/t.timeBarWidth*t.duration,new JulianDate);!defined$1(o)&&JulianDate.greaterThanOrEquals(e,i)?o=r:!defined$1(a)&&JulianDate.greaterThanOrEquals(e,n)&&(a=r)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),defined$1(o)&&(defined$1(a)||(a=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(o,t.y,Math.max(a-o,1),this.height))}};let timelineWheelDelta=1e12;const timelineMouseMode={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},timelineTouchMode={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},timelineTicScales=[.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],timelineMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Timeline$1(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("clock is required.");const i=(e=getElement(e)).ownerDocument;this.container=e;const n=i.createElement("div");n.className="cesium-timeline-main",e.appendChild(n),this._topDiv=n,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=timelineMouseMode.none,this._touchMode=timelineTouchMode.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=createMouseDownCallback(this),this._onMouseUp=createMouseUpCallback(this),this._onMouseMove=createMouseMoveCallback(this),this._onMouseWheel=createMouseWheelCallback(this),this._onTouchStart=createTouchStartCallback(this),this._onTouchMove=createTouchMoveCallback(this),this._onTouchEnd=createTouchEndCallback(this);const r=this._timeBarEle;i.addEventListener("mouseup",this._onMouseUp,!1),i.addEventListener("mousemove",this._onMouseMove,!1),r.addEventListener("mousedown",this._onMouseDown,!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),r.addEventListener("mousewheel",this._onMouseWheel,!1),r.addEventListener("touchstart",this._onTouchStart,!1),r.addEventListener("touchmove",this._onTouchMove,!1),r.addEventListener("touchend",this._onTouchEnd,!1),r.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function twoDigits(e){return e<10?`0${e.toString()}`:e.toString()}function createMouseDownCallback(e){return function(t){e._mouseMode!==timelineMouseMode.touchOnly&&(0===t.button?(e._mouseMode=timelineMouseMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=timelineMouseMode.zoom:e._mouseMode=timelineMouseMode.slide)),t.preventDefault()}}function createMouseUpCallback(e){return function(t){e._mouseMode=timelineMouseMode.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function createMouseMoveCallback(e){return function(t){let i;if(e._mouseMode===timelineMouseMode.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===timelineMouseMode.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){const t=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(JulianDate.addSeconds(e._startJulian,t,new JulianDate),JulianDate.addSeconds(e._endJulian,t,new JulianDate))}}else e._mouseMode===timelineMouseMode.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}function createMouseWheelCallback(e){return function(t){let i=t.wheelDeltaY||t.wheelDelta||-t.detail;timelineWheelDelta=Math.max(Math.min(Math.abs(i),timelineWheelDelta),1),i/=timelineWheelDelta,e.zoomFrom(Math.pow(1.05,-i))}}function createTouchStartCallback(e){return function(t){const i=t.touches.length;let n,r;const o=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=timelineMouseMode.touchOnly,1===i?(n=JulianDate.secondsDifference(e._scrubJulian,e._startJulian),r=Math.round(n*e._topDiv.clientWidth/e._timeBarSecondsSpan+o),Math.abs(t.touches[0].clientX-r)<50?(e._touchMode=timelineTouchMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===i?"-16px 0":"0 0")):(e._touchMode=timelineTouchMode.singleTap,e._touchState.centerX=t.touches[0].clientX-o)):2===i?(e._touchMode=timelineTouchMode.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-o,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=timelineTouchMode.ignore}}function createTouchEndCallback(e){return function(t){const i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap?(e._touchMode=timelineTouchMode.scrub,e._onTouchMove(t)):e._touchMode===timelineTouchMode.scrub&&e._onTouchMove(t),e._mouseMode=timelineMouseMode.touchOnly,1!==i?e._touchMode=i>0?timelineTouchMode.ignore:timelineTouchMode.none:e._touchMode===timelineTouchMode.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function createTouchMoveCallback(e){return function(t){let i,n,r,o,a,s,c=1;const l=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap&&(e._touchMode=timelineTouchMode.slideZoom),e._mouseMode=timelineMouseMode.touchOnly,e._touchMode===timelineTouchMode.scrub?(t.preventDefault(),1===t.changedTouches.length&&(n=t.changedTouches[0].clientX-l,n>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===timelineTouchMode.slideZoom&&(r=t.touches.length,2===r?(o=.5*(t.touches[0].clientX+t.touches[1].clientX)-l,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===r&&(o=t.touches[0].clientX-l,a=0),defined$1(o)&&(a>0&&e._touchState.spanX>0?(c=e._touchState.spanX/a,s=JulianDate.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-o*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new JulianDate)):(i=e._touchState.centerX-o,s=JulianDate.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new JulianDate)),e.zoomTo(s,JulianDate.addSeconds(s,e._timeBarSecondsSpan*c,new JulianDate)),e._touchState.centerX=o,e._touchState.spanX=a))}}var media,hasRequiredMedia,src,hasRequiredSrc;function requireMedia(){return hasRequiredMedia?media:(hasRequiredMedia=1,media={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"})}function requireSrc(){if(hasRequiredSrc)return src;hasRequiredSrc=1;const{webm:e,mp4:t}=requireMedia(),i=()=>"undefined"!=typeof navigator&&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,n=()=>"wakeLock"in navigator;return src=class{constructor(){if(this.enabled=!1,n()){this._wakeLock=null;const e=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else i()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",e),this._addSourceToVideo(this.noSleepVideo,"mp4",t),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(e,t,i){var n=document.createElement("source");n.src=i,n.type=`video/${t}`,e.appendChild(n)}get isEnabled(){return this.enabled}enable(){if(n())return navigator.wakeLock.request("screen").then(e=>{this._wakeLock=e,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",()=>{console.log("Wake Lock released.")})}).catch(e=>{throw this.enabled=!1,console.error(`${e.name}, ${e.message}`),e});if(i())return 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();return this.noSleepVideo.play().then(e=>(this.enabled=!0,e)).catch(e=>{throw this.enabled=!1,e})}disable(){n()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):i()?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}},src}Timeline$1.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},Timeline$1.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},Timeline$1.prototype.isDestroyed=function(){return!1},Timeline$1.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),destroyObject$1(this)},Timeline$1.prototype.addHighlightRange=function(e,t,i){const n=new TimelineHighlightRange(e,t,i);return this._highlightRanges.push(n),this.resize(),n},Timeline$1.prototype.addTrack=function(e,t,i,n){const r=new TimelineTrack(e,t,i,n);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},Timeline$1.prototype.zoomTo=function(e,t){if(!defined$1(e))throw new DeveloperError$1("startTime is required.");if(!defined$1(t))throw new DeveloperError$1("stopTime is required");if(JulianDate.lessThanOrEquals(t,e))throw new DeveloperError$1("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=JulianDate.secondsDifference(t,e),this._clock&&this._clock.clockRange!==ClockRange$1.UNBOUNDED){const e=this._clock.startTime,t=this._clock.stopTime,i=JulianDate.secondsDifference(t,e),n=JulianDate.secondsDifference(e,this._startJulian),r=JulianDate.secondsDifference(t,this._endJulian);this._timeBarSecondsSpan>=i?(this._timeBarSecondsSpan=i,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):n>0?(this._endJulian=JulianDate.addSeconds(this._endJulian,n,new JulianDate),this._startJulian=e,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian)):r<0&&(this._startJulian=JulianDate.addSeconds(this._startJulian,r,new JulianDate),this._endJulian=t,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();const i=document.createEvent("Event");i.initEvent("setzoom",!0,!0),i.startJulian=this._startJulian,i.endJulian=this._endJulian,i.epochJulian=this._epochJulian,i.totalSpan=this._timeBarSecondsSpan,i.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(i)},Timeline$1.prototype.zoomFrom=function(e){let t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;const i=this._timeBarSecondsSpan-t;this.zoomTo(JulianDate.addSeconds(this._startJulian,t-t*e,new JulianDate),JulianDate.addSeconds(this._endJulian,i*e-i,new JulianDate))},Timeline$1.prototype.makeLabel=function(e){const t=JulianDate.toGregorianDate(e),i=t.millisecond;let n=" UTC";if(i>0&&this._timeBarSecondsSpan<3600){for(n=Math.floor(i).toString();n.length<3;)n=`0${n}`;n=`.${n}`}return`${timelineMonthNames[t.month-1]} ${t.day} ${t.year} ${twoDigits(t.hour)}:${twoDigits(t.minute)}:${twoDigits(t.second)}${n}`},Timeline$1.prototype.smallestTicInPixels=7,Timeline$1.prototype._makeTics=function(){const e=this._timeBarEle,t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),n=i-8;let r;const o=this;this._needleEle.style.left=`${i.toString()}px`;let a="";const s=.01,c=31536e6,l=1e-10;let d=0,u=this._timeBarSecondsSpan;u<s?(u=s,this._timeBarSecondsSpan=s,this._endJulian=JulianDate.addSeconds(this._startJulian,s,new JulianDate)):u>c&&(u=c,this._timeBarSecondsSpan=c,this._endJulian=JulianDate.addSeconds(this._startJulian,c,new JulianDate));let h=this._timeBarEle.clientWidth;h<10&&(h=10);const p=this._startJulian,A=Math.min(u/h*1e-5,.4);let m;const f=JulianDate.toGregorianDate(p);m=u>31536e4?JulianDate.fromDate(new Date(Date.UTC(100*Math.floor(f.year/100),0))):u>31536e3?JulianDate.fromDate(new Date(Date.UTC(10*Math.floor(f.year/10),0))):u>86400?JulianDate.fromDate(new Date(Date.UTC(f.year,0))):JulianDate.fromDate(new Date(Date.UTC(f.year,f.month,f.day)));const g=JulianDate.secondsDifference(this._startJulian,JulianDate.addSeconds(m,A,new JulianDate));let C=g+u;function y(e){return Math.floor(g/e)*e}function _(e,t){return Math.ceil(e/t+.5)*t}function E(e){return(e-g)/u}function b(e,t){return e-t*Math.round(e/t)}this._epochJulian=m,this._rulerEle.innerHTML=this.makeLabel(JulianDate.addSeconds(this._endJulian,-.01,new JulianDate));let I=this._rulerEle.offsetWidth+20;I<30&&(I=180);const S=d;d-=l;const T={startTime:g,startJulian:p,epochJulian:m,duration:u,timeBarWidth:h,getAlpha:E};this._highlightRanges.forEach(function(e){a+=e.render(T)});let v=0,x=0,w=0,D=I/h;D>1&&(D=1),D*=this._timeBarSecondsSpan;let B=-1,P=-1;const $=timelineTicScales.length;let M;for(M=0;M<$;++M){const e=timelineTicScales[M];if(++B,v=e,e>D&&e>d)break;P<0&&h*(e/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(P=B)}if(B>0){for(;B>0;)if(--B,Math.abs(b(v,timelineTicScales[B]))<1e-5){timelineTicScales[B]>=d&&(x=timelineTicScales[B]);break}if(P>=0)for(;P<B;){if(Math.abs(b(x,timelineTicScales[P]))<1e-5&&timelineTicScales[P]>=d){w=timelineTicScales[P];break}++P}}d=S,d>l&&w<1e-5&&Math.abs(d-v)>l&&(w=d,d<=v+l&&(x=0));let R,O=-999999;if(h*(w/this._timeBarSecondsSpan)>=3)for(r=y(w);r<=C;r=_(r,w))a+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(h*E(r)).toString()}px;"></span>`;if(h*(x/this._timeBarSecondsSpan)>=3)for(r=y(x);r<=C;r=_(r,x))a+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(h*E(r)).toString()}px;"></span>`;if(h*(v/this._timeBarSecondsSpan)>=2){this._mainTicSpan=v,C+=v,r=y(v);const e=JulianDate.computeTaiMinusUtc(m);for(;r<=C;){let t=JulianDate.addSeconds(p,r-g,new JulianDate);if(v>2.1){const i=JulianDate.computeTaiMinusUtc(t);Math.abs(i-e)>.1&&(r+=i-e,t=JulianDate.addSeconds(p,r-g,new JulianDate))}const i=Math.round(h*E(r)),n=this.makeLabel(t);this._rulerEle.innerHTML=n,R=this._rulerEle.offsetWidth,R<10&&(R=I);const o=i-(R/2-1);o>O?(O=o+R+5,a+=`<span class="cesium-timeline-ticMain" style="left: ${i.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${o.toString()}px;">${n}</span>`):a+=`<span class="cesium-timeline-ticSub" style="left: ${i.toString()}px;"></span>`,r=_(r,v)}}else this._mainTicSpan=-1;a+=`<span class="cesium-timeline-icon16" style="left:${n}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=a,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),T.y=0,this._trackList.forEach(function(e){e.render(o._context,T),T.y+=e.height})},Timeline$1.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;const e=this._scrubElement;if(defined$1(this._scrubElement)){const t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=`${i}px`)}defined$1(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(JulianDate.addSeconds(this._startJulian,this._timelineDrag,new JulianDate),JulianDate.addSeconds(this._endJulian,this._timelineDrag,new JulianDate)))},Timeline$1.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=JulianDate.addSeconds(this._startJulian,t,new JulianDate),this._scrubElement){const t=e-8;this._scrubElement.style.left=`${t.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}const i=document.createEvent("Event");i.initEvent("settime",!0,!0),i.clientX=e,i.timeSeconds=t,i.timeJulian=this._scrubJulian,i.clock=this._clock,this._topDiv.dispatchEvent(i)},Timeline$1.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 i=1;this._trackList.forEach(function(e){i+=e.height}),this._trackListEle.style.height=`${i.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var srcExports=requireSrc(),NoSleep=getDefaultExportFromCjs(srcExports);function lockScreen(e){let t=!1;const i=window.screen;return defined$1(i)&&(defined$1(i.lockOrientation)?t=i.lockOrientation(e):defined$1(i.mozLockOrientation)?t=i.mozLockOrientation(e):defined$1(i.msLockOrientation)?t=i.msLockOrientation(e):defined$1(i.orientation&&i.orientation.lock)&&(t=i.orientation.lock(e))),t}function unlockScreen(){const e=window.screen;defined$1(e)&&(defined$1(e.unlockOrientation)?e.unlockOrientation():defined$1(e.mozUnlockOrientation)?e.mozUnlockOrientation():defined$1(e.msUnlockOrientation)?e.msUnlockOrientation():defined$1(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function toggleVR(e,t,i,n){n()||(i()?(t.useWebVR=!1,e._locked&&(unlockScreen(),e._locked=!1),e._noSleep.disable(),Fullscreen.exitFullscreen(),i(!1)):(Fullscreen.fullscreen||Fullscreen.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=lockScreen("landscape")),t.useWebVR=!0,i(!0)))}function VRButtonViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("scene is required.");const i=this,n=knockout.observable(Fullscreen.enabled),r=knockout.observable(!1);this.isVRMode=void 0,knockout.defineProperty(this,"isVRMode",{get:function(){return r()}}),this.isVREnabled=void 0,knockout.defineProperty(this,"isVREnabled",{get:function(){return n()},set:function(e){n(e&&Fullscreen.enabled)}}),this.tooltip=void 0,knockout.defineProperty(this,"tooltip",function(){return n()?r()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});const o=knockout.observable(!1);this._isOrthographic=void 0,knockout.defineProperty(this,"_isOrthographic",{get:function(){return o()}}),this._eventHelper=new EventHelper,this._eventHelper.add(e.preRender,function(){o(e.camera.frustum instanceof OrthographicFrustum)}),this._locked=!1,this._noSleep=new NoSleep,this._command=createCommand(function(){toggleVR(i,e,r,o)},knockout.getObservable(this,"isVREnabled")),this._vrElement=getElement(t)??document.body,this._callback=function(){!Fullscreen.fullscreen&&r()&&(e.useWebVR=!1,i._locked&&(unlockScreen(),i._locked=!1),i._noSleep.disable(),r(!1))},document.addEventListener(Fullscreen.changeEventName,this._callback)}Object.defineProperties(VRButtonViewModel.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new DeveloperError$1("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),VRButtonViewModel.prototype.isDestroyed=function(){return!1},VRButtonViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Fullscreen.changeEventName,this._callback),destroyObject$1(this)};const 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",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";function VRButton(e,t,i){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("scene is required.");e=getElement(e);const n=new VRButtonViewModel(t,i);n._exitVRPath=exitVRPath,n._enterVRPath=enterVRPath;const r=document.createElement("button");r.type="button",r.className="cesium-button cesium-vrButton",r.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(r),knockout.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(VRButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),VRButton.prototype.isDestroyed=function(){return!1},VRButton.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject$1(this)};const boundingSphereScratch=new BoundingSphere;function onTimelineScrubfunction(e){const t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function getCesium3DTileFeatureDescription(e){const t=e.getPropertyIds();let i="";return t.forEach(function(t){const n=e.getProperty(t);defined$1(n)&&(i+=`<tr><th>${t}</th><td>${n}</td></tr>`)}),i.length>0&&(i=`<table class="cesium-infoBox-defaultTable"><tbody>${i}</tbody></table>`),i}function getCesium3DTileFeatureName(e){let t;const i=[],n=e.getPropertyIds();for(t=0;t<n.length;t++){const r=n[t];/^name$/i.test(r)?i[0]=e.getProperty(r):/name/i.test(r)?i[1]=e.getProperty(r):/^title$/i.test(r)?i[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?i[3]=e.getProperty(r):/element/i.test(r)?i[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(i[5]=e.getProperty(r))}const r=i.length;for(t=0;t<r;t++){const e=i[t];if(defined$1(e)&&""!==e)return e}return"Unnamed Feature"}function pickEntity(e,t){const i=e.scene.pick(t.position);if(defined$1(i)){const e=i.id??i.primitive.id;if(e instanceof Entity)return e;if(i instanceof Cesium3DTileFeature)return new Entity({name:getCesium3DTileFeatureName(i),description:getCesium3DTileFeatureDescription(i),feature:i})}if(defined$1(e.scene.globe))return pickImageryLayerFeature(e,t.position)}const scratchStopTime=new JulianDate;function linkTimelineToDataSourceClock(e,t){if(defined$1(t)){const i=t.clock;if(defined$1(i)&&defined$1(e)){const t=i.startTime;let n=i.stopTime;JulianDate.equals(t,n)&&(n=JulianDate.addSeconds(t,CesiumMath.EPSILON2,scratchStopTime)),e.updateFromClock(),e.zoomTo(t,n)}}}const cartesian3Scratch=new Cartesian3$1;function pickImageryLayerFeature(e,t){const i=e.scene,n=i.camera.getPickRay(t),r=i.imageryLayers.pickImageryLayerFeatures(n,i);if(!defined$1(r))return;const o=new Entity({id:"Loading...",description:"Loading feature information..."});return r.then(function(t){if(e.selectedEntity!==o)return;if(!defined$1(t)||0===t.length)return void(e.selectedEntity=createNoFeaturesEntity());const i=t[0],n=new Entity({id:i.name,description:i.description});if(defined$1(i.position)){const t=e.scene.ellipsoid.cartographicToCartesian(i.position,cartesian3Scratch);n.position=new ConstantPositionProperty(t)}e.selectedEntity=n},function(){e.selectedEntity===o&&(e.selectedEntity=createNoFeaturesEntity())}),o}function createNoFeaturesEntity(){return new Entity({id:"None",description:"No features found."})}function enableVRUI(e,t){const i=e._geocoder,n=e._homeButton,r=e._sceneModePicker,o=e._projectionPicker,a=e._baseLayerPicker,s=e._animation,c=e._timeline,l=e._fullscreenButton,d=e._infoBox,u=e._selectionIndicator,h=t?"hidden":"visible";if(defined$1(i)&&(i.container.style.visibility=h),defined$1(n)&&(n.container.style.visibility=h),defined$1(r)&&(r.container.style.visibility=h),defined$1(o)&&(o.container.style.visibility=h),defined$1(a)&&(a.container.style.visibility=h),defined$1(s)&&(s.container.style.visibility=h),defined$1(c)&&(c.container.style.visibility=h),defined$1(l)&&l.viewModel.isFullscreenEnabled&&(l.container.style.visibility=h),defined$1(d)&&(d.container.style.visibility=h),defined$1(u)&&(u.container.style.visibility=h),e._container){const i=t||!defined$1(l)?0:l.container.clientWidth;e._vrButton.container.style.right=`${i}px`,e.forceResize()}}function Viewer(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(e=getElement(e),!1===(t=t??Frozen.EMPTY_OBJECT).globe&&defined$1(t.baseLayer)&&!1!==t.baseLayer)throw new DeveloperError$1("Cannot use baseLayer when globe is disabled.");const i=!(defined$1(t.globe)&&!1===t.globe||defined$1(t.baseLayerPicker)&&!1===t.baseLayerPicker);if(!i&&defined$1(t.selectedImageryProviderViewModel))throw new DeveloperError$1("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.baseLayer instead or set options.baseLayerPicker to true.");if(!i&&defined$1(t.selectedTerrainProviderViewModel))throw new DeveloperError$1("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");const n=this,r=document.createElement("div");r.className="cesium-viewer",e.appendChild(r);const o=document.createElement("div");o.className="cesium-viewer-cesiumWidgetContainer",r.appendChild(o);const a=document.createElement("div");a.className="cesium-viewer-bottom",r.appendChild(a);const s=t.scene3DOnly??!1;let c,l,d=!1;defined$1(t.clockViewModel)?(l=t.clockViewModel,c=l.clock):(c=new Clock,l=new ClockViewModel(c),d=!0);const u=new CesiumWidget(o,{baseLayer:!(i&&defined$1(t.selectedImageryProviderViewModel)||defined$1(t.baseLayer)||defined$1(t.imageryProvider))&&void 0,clock:c,shouldAnimate:t.shouldAnimate,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,ellipsoid:t.ellipsoid,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,automaticallyTrackDataSourceClocks:t.automaticallyTrackDataSourceClocks,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:defined$1(t.creditContainer)?t.creditContainer:a,creditViewport:t.creditViewport,dataSources:t.dataSources,scene3DOnly:s,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),h=u.scene,p=new EventHelper;let A,m;if(p.add(c.onTick,Viewer.prototype._onTick,this),!defined$1(t.selectionIndicator)||!1!==t.selectionIndicator){const e=document.createElement("div");e.className="cesium-viewer-selectionIndicatorContainer",r.appendChild(e),A=new SelectionIndicator(e,h)}if(!defined$1(t.infoBox)||!1!==t.infoBox){const e=document.createElement("div");e.className="cesium-viewer-infoBoxContainer",r.appendChild(e),m=new InfoBox(e);const t=m.viewModel;p.add(t.cameraClicked,Viewer.prototype._onInfoBoxCameraClicked,this),p.add(t.closeClicked,Viewer.prototype._onInfoBoxClockClicked,this)}const f=document.createElement("div");let g,C,y,_,E,b,I,S,T,v,x,w,D,B,P;if(f.className="cesium-viewer-toolbar",r.appendChild(f),!defined$1(t.geocoder)||!1!==t.geocoder){const e=document.createElement("div");let i;e.className="cesium-viewer-geocoderContainer",f.appendChild(e),"string"==typeof t.geocoder?i=[new IonGeocoderService({scene:h,geocodeProviderType:t.geocoder})]:defined$1(t.geocoder)&&"boolean"!=typeof t.geocoder&&(i=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),g=new Geocoder({container:e,geocoderServices:i,scene:h}),p.add(g.viewModel.search.beforeExecute,Viewer.prototype._clearObjects,this)}if(defined$1(t.homeButton)&&!1===t.homeButton||(C=new HomeButton(f,h),defined$1(g)&&p.add(C.viewModel.command.afterExecute,function(){const e=g.viewModel;e.searchText="",e.isSearchInProgress&&e.search()}),p.add(C.viewModel.command.beforeExecute,Viewer.prototype._clearTrackedObject,this)),!0===t.sceneModePicker&&s)throw new DeveloperError$1("options.sceneModePicker is not available when options.scene3DOnly is set to true.");if(s||defined$1(t.sceneModePicker)&&!1===t.sceneModePicker||(y=new SceneModePicker(f,h)),t.projectionPicker&&(_=new ProjectionPicker(f,h)),i){const e=t.imageryProviderViewModels??createDefaultImageryProviderViewModels(),i=t.terrainProviderViewModels??createDefaultTerrainProviderViewModels();E=new BaseLayerPicker(f,{globe:h.globe,imageryProviderViewModels:e,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:i,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel});b=f.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}if(defined$1(t.baseLayer)&&!1!==t.baseLayer&&(i&&(E.viewModel.selectedImagery=void 0),h.imageryLayers.removeAll(),h.imageryLayers.add(t.baseLayer)),defined$1(t.terrainProvider)&&(i&&(E.viewModel.selectedTerrain=void 0),h.terrainProvider=t.terrainProvider),defined$1(t.terrain)){if(defined$1(t.terrainProvider))throw new DeveloperError$1("Specify either options.terrainProvider or options.terrain.");i&&(h.globe.depthTestAgainstTerrain=!0),h.setTerrain(t.terrain)}if(!defined$1(t.navigationHelpButton)||!1!==t.navigationHelpButton){let e=!0;try{if(defined$1(window.localStorage)){const t=window.localStorage.getItem("cesium-hasSeenNavHelp");defined$1(t)&&Boolean(t)?e=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch(e){}I=new NavigationHelpButton({container:f,instructionsInitiallyVisible:t.navigationInstructionsInitiallyVisible??e})}if(!defined$1(t.animation)||!1!==t.animation){const e=document.createElement("div");e.className="cesium-viewer-animationContainer",r.appendChild(e),S=new Animation$1(e,new AnimationViewModel(l))}if(!defined$1(t.timeline)||!1!==t.timeline){const e=document.createElement("div");e.className="cesium-viewer-timelineContainer",r.appendChild(e),T=new Timeline$1(e,c),T.addEventListener("settime",onTimelineScrubfunction,!1),T.zoomTo(c.startTime,c.stopTime)}if(defined$1(t.fullscreenButton)&&!1===t.fullscreenButton||(w=document.createElement("div"),w.className="cesium-viewer-fullscreenContainer",r.appendChild(w),v=new FullscreenButton(w,t.fullscreenElement),x=subscribeAndEvaluate(v.viewModel,"isFullscreenEnabled",function(e){w.style.display=e?"block":"none",defined$1(T)&&(T.container.style.right=`${w.clientWidth}px`,T.resize())})),t.vrButton){const e=document.createElement("div");e.className="cesium-viewer-vrContainer",r.appendChild(e),D=new VRButton(e,h,t.fullScreenElement),B=subscribeAndEvaluate(D.viewModel,"isVREnabled",function(t){e.style.display=t?"block":"none",defined$1(v)&&(e.style.right=`${w.clientWidth}px`),defined$1(T)&&(T.container.style.right=`${e.clientWidth}px`,T.resize())}),P=subscribeAndEvaluate(D.viewModel,"isVRMode",function(e){enableVRUI(n,e)})}this._baseLayerPickerDropDown=b,this._fullscreenSubscription=x,this._vrSubscription=B,this._vrModeSubscription=P,this._dataSourceChangedListeners={},this._container=e,this._bottomContainer=a,this._element=r,this._cesiumWidget=u,this._selectionIndicator=A,this._infoBox=m,this._clockViewModel=l,this._destroyClockViewModel=d,this._toolbar=f,this._homeButton=C,this._sceneModePicker=y,this._projectionPicker=_,this._baseLayerPicker=E,this._navigationHelpButton=I,this._animation=S,this._timeline=T,this._fullscreenButton=v,this._vrButton=D,this._geocoder=g,this._eventHelper=p,this._lastWidth=0,this._lastHeight=0,this._enableInfoOrSelection=defined$1(m)||defined$1(A),this._selectedEntity=void 0,this._selectedEntityChanged=new Event$1;const $=this._cesiumWidget.dataSources,M=this._cesiumWidget.dataSourceDisplay;p.add($.dataSourceAdded,Viewer.prototype._onDataSourceAdded,this),p.add($.dataSourceRemoved,Viewer.prototype._onDataSourceRemoved,this),p.add(h.postUpdate,Viewer.prototype.resize,this);const R=$.length;for(let e=0;e<R;e++)this._dataSourceAdded($,$.get(e));this._dataSourceAdded(void 0,M.defaultDataSource),p.add($.dataSourceAdded,Viewer.prototype._dataSourceAdded,this),p.add($.dataSourceRemoved,Viewer.prototype._dataSourceRemoved,this),u.screenSpaceEventHandler.setInputAction(function(e){n.selectedEntity=pickEntity(n,e)},ScreenSpaceEventType$1.LEFT_CLICK),u.screenSpaceEventHandler.setInputAction(function(e){const t=pickEntity(n,e);defined$1(t)?Property.getValueOrUndefined(t.position,n.clock.currentTime)?n.trackedEntity=t:n.zoomTo(t):defined$1(n.trackedEntity)&&(n.trackedEntity=void 0)},ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK),u._canAnimateUpdateCallback=this._updateCanAnimate(this)}function viewerCesium3DTilesInspectorMixin(e){Check.typeOf.object("viewer",e);const t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);const i=new Cesium3DTilesInspector(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return i}}})}function viewerCesiumInspectorMixin(e){if(!defined$1(e))throw new DeveloperError$1("viewer is required.");const t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);const i=new CesiumInspector(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return i}}})}function viewerDragDropMixin(e,t){if(!defined$1(e))throw new DeveloperError$1("viewer is required.");if(e.hasOwnProperty("dropTarget"))throw new DeveloperError$1("dropTarget is already defined by another mixin.");if(e.hasOwnProperty("dropEnabled"))throw new DeveloperError$1("dropEnabled is already defined by another mixin.");if(e.hasOwnProperty("dropError"))throw new DeveloperError$1("dropError is already defined by another mixin.");if(e.hasOwnProperty("clearOnDrop"))throw new DeveloperError$1("clearOnDrop is already defined by another mixin.");if(e.hasOwnProperty("flyToOnDrop"))throw new DeveloperError$1("flyToOnDrop is already defined by another mixin.");t=t??Frozen.EMPTY_OBJECT;let i=!0,n=t.flyToOnDrop??!0;const r=new Event$1;let o=t.clearOnDrop??!0,a=t.dropTarget??e.container,s=t.clampToGround??!0,c=t.proxy;function l(t){stop(t),o&&(e.entities.removeAll(),e.dataSources.removeAll());const i=t.dataTransfer.files,n=i.length;for(let t=0;t<n;t++){const n=i[t],r=new FileReader;r.onload=createOnLoadCallback(e,n,c,s),r.onerror=createDropErrorCallback(e,n),r.readAsText(n)}}a=getElement(a),Object.defineProperties(e,{dropTarget:{get:function(){return a},set:function(e){if(!defined$1(e))throw new DeveloperError$1("value is required.");unsubscribe(a,l),a=e,subscribe(a,l)}},dropEnabled:{get:function(){return i},set:function(e){e!==i&&(e?subscribe(a,l):unsubscribe(a,l),i=e)}},dropError:{get:function(){return r}},clearOnDrop:{get:function(){return o},set:function(e){o=e}},flyToOnDrop:{get:function(){return n},set:function(e){n=e}},proxy:{get:function(){return c},set:function(e){c=e}},clampToGround:{get:function(){return s},set:function(e){s=e}}}),subscribe(a,l),e.destroy=wrapFunction(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=l}function stop(e){e.stopPropagation(),e.preventDefault()}function unsubscribe(e,t){const i=e;defined$1(i)&&(i.removeEventListener("drop",t,!1),i.removeEventListener("dragenter",stop,!1),i.removeEventListener("dragover",stop,!1),i.removeEventListener("dragexit",stop,!1))}function subscribe(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",stop,!1),e.addEventListener("dragover",stop,!1),e.addEventListener("dragexit",stop,!1)}function createOnLoadCallback(e,t,i,n){const r=e.scene;return function(o){const a=t.name;try{let s;if(/\.czml$/i.test(a))s=CzmlDataSource.load(JSON.parse(o.target.result),{sourceUri:a});else if(/\.geojson$/i.test(a)||/\.json$/i.test(a)||/\.topojson$/i.test(a))s=GeoJsonDataSource.load(JSON.parse(o.target.result),{sourceUri:a,clampToGround:n});else if(/\.(kml|kmz)$/i.test(a))s=KmlDataSource.load(t,{sourceUri:a,proxy:i,camera:r.camera,canvas:r.canvas,clampToGround:n,screenOverlayContainer:e.container});else{if(!/\.gpx$/i.test(a))return void e.dropError.raiseEvent(e,a,`Unrecognized file: ${a}`);s=GpxDataSource.load(t,{sourceUri:a,proxy:i})}defined$1(s)&&e.dataSources.add(s).then(function(t){e.flyToOnDrop&&e.flyTo(t)}).catch(function(t){e.dropError.raiseEvent(e,a,t)})}catch(t){e.dropError.raiseEvent(e,a,t)}}}function createDropErrorCallback(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}function viewerPerformanceWatchdogMixin(e,t){if(!defined$1(e))throw new DeveloperError$1("viewer is required.");t=t??Frozen.EMPTY_OBJECT;const i=new PerformanceWatchdog({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return i}}})}function formatShaderString(e){const t=e.split("\n");let i;for(i=0;i<t.length&&!t[i].match(/\S/);i++);if(i===t.length)return"";let n="";const r=/^\s*/,o=t[i].match(r)[0].length;for(let e=i;e<t.length;e++){let i=t[e];i.match(r)[0].length>=o&&(i=i.slice(o)),n+=`${i}\n`}return n}function VoxelInspectorViewModel(e){Check.typeOf.object("scene",e),this._scene=e,this._voxelPrimitive=void 0,this._customShaderCompilationRemoveCallback=void 0,this._definedProperties=[],this._getPrimitiveFunctions=[],this._modelMatrixReady=!1;const t=this;function i(i){const{name:n,initialValue:r}=i;t._definedProperties.push(n);let o=i.setPrimitiveFunction;!0===o&&(o=function(e){t._voxelPrimitive[n]=e});let a=i.getPrimitiveFunction;!0===a&&(a=function(){t[n]=t._voxelPrimitive[n]}),defined$1(a)&&t._getPrimitiveFunctions.push(a);const s=knockout.observable();return knockout.defineProperty(t,n,{get:function(){return s()},set:function(i){"number"==typeof r&&"string"==typeof i&&(i=Number(i),isNaN(i)&&(i=r)),"boolean"==typeof r&&"number"==typeof i&&(i=1===i),s(i),defined$1(o)&&defined$1(t._voxelPrimitive)&&(o(i),e.requestRender())}}),t[n]=r,s}function n(e,i){return function(n){const r=t._voxelPrimitive[e].clone();r[i]=n,t._voxelPrimitive[e]=r}}i({name:"inspectorVisible",initialValue:!0}),i({name:"displayVisible",initialValue:!1}),i({name:"transformVisible",initialValue:!1}),i({name:"boundsVisible",initialValue:!1}),i({name:"clippingVisible",initialValue:!1}),i({name:"shaderVisible",initialValue:!1}),i({name:"shaderString",initialValue:"",getPrimitiveFunction:function(){const e=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=formatShaderString(e)}}),i({name:"shaderCompilationMessage",initialValue:""}),i({name:"shaderCompilationSuccess",initialValue:!0}),i({name:"depthTest",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"show",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"disableUpdate",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"debugDraw",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"jitter",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"nearestSampling",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"screenSpaceError",initialValue:4,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"stepSize",initialValue:1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"shapeIsBox",getPrimitiveFunction:function(){const e=t._voxelPrimitive.shape;t.shapeIsBox=e===VoxelShapeType$1.BOX}}),i({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){const e=t._voxelPrimitive.shape;t.shapeIsEllipsoid=e===VoxelShapeType$1.ELLIPSOID}}),i({name:"shapeIsCylinder",getPrimitiveFunction:function(){const e=t._voxelPrimitive.shape;t.shapeIsCylinder=e===VoxelShapeType$1.CYLINDER}}),i({name:"clippingBoxMaxXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxXMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingBoxMaxXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxXMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingBoxMaxX",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMaxX=t._voxelPrimitive.maxClippingBounds.x}}),i({name:"clippingBoxMinXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinXMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingBoxMinXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinXMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingBoxMinX",initialValue:0,setPrimitiveFunction:n("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMinX=t._voxelPrimitive.minClippingBounds.x}}),i({name:"clippingBoxMaxYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxYMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingBoxMaxYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxYMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingBoxMaxY",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMaxY=t._voxelPrimitive.maxClippingBounds.y}}),i({name:"clippingBoxMinYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinYMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingBoxMinYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinYMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingBoxMinY",initialValue:0,setPrimitiveFunction:n("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMinY=t._voxelPrimitive.minClippingBounds.y}}),i({name:"clippingBoxMaxZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxZMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingBoxMaxZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxZMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingBoxMaxZ",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMaxZ=t._voxelPrimitive.maxClippingBounds.z}}),i({name:"clippingBoxMinZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinZMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingBoxMinZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinZMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingBoxMinZ",initialValue:0,setPrimitiveFunction:n("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMinZ=t._voxelPrimitive.minClippingBounds.z}}),i({name:"clippingEllipsoidMaxLongitudeMin",initialValue:-CesiumMath.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingEllipsoidMaxLongitudeMax",initialValue:CesiumMath.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingEllipsoidMaxLongitude",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitude=t._voxelPrimitive.maxClippingBounds.x}}),i({name:"clippingEllipsoidMinLongitudeMin",initialValue:-CesiumMath.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingEllipsoidMinLongitudeMax",initialValue:CesiumMath.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingEllipsoidMinLongitude",initialValue:0,setPrimitiveFunction:n("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitude=t._voxelPrimitive.minClippingBounds.x}}),i({name:"clippingEllipsoidMaxLatitudeMin",initialValue:-CesiumMath.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingEllipsoidMaxLatitudeMax",initialValue:CesiumMath.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingEllipsoidMaxLatitude",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitude=t._voxelPrimitive.maxClippingBounds.y}}),i({name:"clippingEllipsoidMinLatitudeMin",initialValue:-CesiumMath.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingEllipsoidMinLatitudeMax",initialValue:CesiumMath.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingEllipsoidMinLatitude",initialValue:0,setPrimitiveFunction:n("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitude=t._voxelPrimitive.minClippingBounds.y}}),i({name:"clippingEllipsoidMaxHeightMin",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingEllipsoidMaxHeightMax",initialValue:1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingEllipsoidMaxHeight",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),i({name:"clippingEllipsoidMinHeightMin",initialValue:-1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingEllipsoidMinHeightMax",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingEllipsoidMinHeight",initialValue:0,setPrimitiveFunction:n("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMinHeight=t._voxelPrimitive.minClippingBounds.z}}),i({name:"clippingCylinderMaxRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingCylinderMaxRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingCylinderMaxRadius",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMaxRadius=t._voxelPrimitive.maxClippingBounds.x}}),i({name:"clippingCylinderMinRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingCylinderMinRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingCylinderMinRadius",initialValue:0,setPrimitiveFunction:n("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMinRadius=t._voxelPrimitive.minClippingBounds.x}}),i({name:"clippingCylinderMaxAngleMin",initialValue:-CesiumMath.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingCylinderMaxAngleMax",initialValue:CesiumMath.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingCylinderMaxAngle",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMaxAngle=t._voxelPrimitive.maxClippingBounds.y}}),i({name:"clippingCylinderMinAngleMin",initialValue:-CesiumMath.PI}),i({name:"clippingCylinderMinAngleMax",initialValue:CesiumMath.PI}),i({name:"clippingCylinderMinAngle",initialValue:0,setPrimitiveFunction:n("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMinAngle=t._voxelPrimitive.minClippingBounds.y}}),i({name:"clippingCylinderMaxHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingCylinderMaxHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingCylinderMaxHeight",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),i({name:"clippingCylinderMinHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingCylinderMinHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingCylinderMinHeight",initialValue:0,setPrimitiveFunction:n("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMinHeight=t._voxelPrimitive.minClippingBounds.z}}),i({name:"translationX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.translationX=Matrix4$1.getTranslation(t._voxelPrimitive.modelMatrix,new Cartesian3$1).x}}),i({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.translationY=Matrix4$1.getTranslation(t._voxelPrimitive.modelMatrix,new Cartesian3$1).y}}),i({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.translationZ=Matrix4$1.getTranslation(t._voxelPrimitive.modelMatrix,new Cartesian3$1).z}}),i({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.scaleX=Matrix4$1.getScale(t._voxelPrimitive.modelMatrix,new Cartesian3$1).x}}),i({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.scaleY=Matrix4$1.getScale(t._voxelPrimitive.modelMatrix,new Cartesian3$1).y}}),i({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.scaleZ=Matrix4$1.getScale(t._voxelPrimitive.modelMatrix,new Cartesian3$1).z}}),i({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)}}),i({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)}}),i({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)}})}Object.defineProperties(Viewer.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._cesiumWidget.dataSourceDisplay}},entities:{get:function(){return this._cesiumWidget.entities}},dataSources:{get:function(){return this._cesiumWidget.dataSources}},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._cesiumWidget.allowDataSourcesToSuspendAnimation},set:function(e){this._cesiumWidget.allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._cesiumWidget.trackedEntity},set:function(e){this._cesiumWidget.trackedEntity=e}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;const t=defined$1(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;defined$1(e)?defined$1(t)&&t.animateAppear():defined$1(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._cesiumWidget.trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._cesiumWidget.clockTrackedDataSource},set:function(e){this._cesiumWidget.clockTrackedDataSource!==e&&(this._cesiumWidget.clockTrackedDataSource=e,linkTimelineToDataSourceClock(this._timeline,e))}}}),Viewer.prototype.extend=function(e,t){if(!defined$1(e))throw new DeveloperError$1("mixin is required.");e(this,t)},Viewer.prototype.resize=function(){const e=this._cesiumWidget,t=this._container,i=t.clientWidth,n=t.clientHeight,r=defined$1(this._animation),o=defined$1(this._timeline);if(e.resize(),i===this._lastWidth&&n===this._lastHeight)return;const a=n-125,s=this._baseLayerPickerDropDown;if(defined$1(s)&&(s.style.maxHeight=`${a}px`),defined$1(this._geocoder)){this._geocoder.searchSuggestionsContainer.style.maxHeight=`${a}px`}defined$1(this._infoBox)&&(this._infoBox.viewModel.maxHeight=a);const c=this._timeline;let l,d=0,u=5,h=3,p=0;if(r&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){const e=this._lastWidth;l=this._animation.container,i>900?(d=169,e<=900&&(l.style.width="169px",l.style.height="112px",this._animation.resize())):i>=600?(d=136,(e<600||e>900)&&(l.style.width="136px",l.style.height="90px",this._animation.resize())):(d=106,(e>600||0===e)&&(l.style.width="106px",l.style.height="70px",this._animation.resize())),u=d+5}if(o&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){const e=this._fullscreenButton,t=this._vrButton,i=c.container,n=i.style;h=i.clientHeight+3,n.left=`${d}px`;let r=0;defined$1(e)&&(r+=e.container.clientWidth),defined$1(t)&&(r+=t.container.clientWidth),n.right=`${r}px`,c.resize()}!o&&defined$1(this._fullscreenButton)&&(p=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${u}px`,this._bottomContainer.style.bottom=`${h}px`,this._bottomContainer.style.right=`${p}px`,this._lastWidth=i,this._lastHeight=n},Viewer.prototype.forceResize=function(){this._lastWidth=0,this.resize()},Viewer.prototype.render=function(){this._cesiumWidget.render()},Viewer.prototype.isDestroyed=function(){return!1},Viewer.prototype.destroy=function(){return defined$1(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK)),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),defined$1(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),defined$1(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),defined$1(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),defined$1(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),defined$1(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),defined$1(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),defined$1(this._timeline)&&(this._timeline.removeEventListener("settime",onTimelineScrubfunction,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),defined$1(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),defined$1(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),defined$1(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),defined$1(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._cesiumWidget=this._cesiumWidget.destroy(),destroyObject$1(this)},Viewer.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Viewer.prototype._onEntityCollectionChanged,this)},Viewer.prototype._dataSourceRemoved=function(e,t){const i=t.entities;i.collectionChanged.removeEventListener(Viewer.prototype._onEntityCollectionChanged,this),defined$1(this.selectedEntity)&&i.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)},Viewer.prototype._updateCanAnimate=function(e){return function(t){e._clockViewModel.canAnimate=t}},Viewer.prototype._onTick=function(e){const t=e.currentTime;let i,n=!1;const r=this.selectedEntity,o=defined$1(r)&&this._enableInfoOrSelection;if(o&&r.isShowing&&r.isAvailable(t)){this._cesiumWidget.dataSourceDisplay.getBoundingSphere(r,!0,boundingSphereScratch)!==BoundingSphereState.FAILED?i=boundingSphereScratch.center:defined$1(r.position)&&(i=r.position.getValue(t,i)),n=defined$1(i)}const a=defined$1(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;defined$1(a)&&(a.position=Cartesian3$1.clone(i,a.position),a.showSelection=o&&n,a.update());const s=defined$1(this._infoBox)?this._infoBox.viewModel:void 0;defined$1(s)&&(s.showInfo=o,s.enableCamera=n,s.isCameraTracking=this.trackedEntity===this.selectedEntity,o?(s.titleText=r.name??r.id,s.description=Property.getValueOrDefault(r.description,t,"")):(s.titleText="",s.description=""))},Viewer.prototype._onEntityCollectionChanged=function(e,t,i){const n=i.length;for(let e=0;e<n;e++){const t=i[e];this.selectedEntity===t&&(this.selectedEntity=void 0)}},Viewer.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{defined$1(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}},Viewer.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},Viewer.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},Viewer.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},Viewer.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&linkTimelineToDataSourceClock(this.timeline,e)},Viewer.prototype._onDataSourceAdded=function(e,t){this._cesiumWidget._automaticallyTrackDataSourceClocks&&t===this.clockTrackedDataSource&&linkTimelineToDataSourceClock(this._timeline,t);const i=t.entities.id,n=this._eventHelper.add(t.changedEvent,Viewer.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=n},Viewer.prototype._onDataSourceRemoved=function(e,t){const i=t.entities.id;this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0},Viewer.prototype.zoomTo=function(e,t){return this._cesiumWidget.zoomTo(e,t)},Viewer.prototype.flyTo=function(e,t){return this._cesiumWidget.flyTo(e,t)};const scratchTranslation=new Cartesian3$1,scratchScale=new Cartesian3$1,scratchHeadingPitchRoll=new HeadingPitchRoll,scratchRotation=new Matrix3$1;function setModelMatrix(e){const t=Cartesian3$1.fromElements(e.translationX,e.translationY,e.translationZ,scratchTranslation),i=Cartesian3$1.fromElements(e.scaleX,e.scaleY,e.scaleZ,scratchScale),n=scratchHeadingPitchRoll;n.heading=e.angleX,n.pitch=e.angleY,n.roll=e.angleZ;const r=Matrix3$1.fromHeadingPitchRoll(n,scratchRotation),o=Matrix3$1.multiplyByScale(r,i,r);e._voxelPrimitive.modelMatrix=Matrix4$1.fromRotationTranslation(o,t,e._voxelPrimitive.modelMatrix)}function VoxelInspector(e,t){Check.defined("container",e),Check.typeOf.object("scene",t),e=getElement(e);const i=document.createElement("div"),n=new VoxelInspectorViewModel(t);this._viewModel=n,this._container=e,this._element=i;const r=document.createElement("div");r.textContent="Voxel Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),i.appendChild(r),i.className="cesium-cesiumInspector cesium-VoxelInspector",i.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);const o=document.createElement("div");o.className="cesium-cesiumInspector-dropDown",i.appendChild(o);const{createSection:a,createCheckbox:s,createRangeInput:c,createButton:l}=InspectorShared,d=a(o,"Display","displayVisible","toggleDisplay"),u=a(o,"Transform","transformVisible","toggleTransform"),h=a(o,"Clipping","clippingVisible","toggleClipping"),p=a(o,"Shader","shaderVisible","toggleShader");d.appendChild(s("Depth Test","depthTest")),d.appendChild(s("Show","show")),d.appendChild(s("Disable Update","disableUpdate")),d.appendChild(s("Debug Draw","debugDraw")),d.appendChild(s("Jitter","jitter")),d.appendChild(s("Nearest Sampling","nearestSampling")),d.appendChild(c("Screen Space Error","screenSpaceError",0,128)),d.appendChild(c("Step Size","stepSize",0,2));const A=CesiumMath.PI;u.appendChild(c("Translation X","translationX",-10,10)),u.appendChild(c("Translation Y","translationY",-10,10)),u.appendChild(c("Translation Z","translationZ",-10,10)),u.appendChild(c("Scale X","scaleX",0,10)),u.appendChild(c("Scale Y","scaleY",0,10)),u.appendChild(c("Scale Z","scaleZ",0,10)),u.appendChild(c("Heading","angleX",-A,+A)),u.appendChild(c("Pitch","angleY",-A,+A)),u.appendChild(c("Roll","angleZ",-A,+A)),makeCoordinateRangeWithDynamicMinMax("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ","shapeIsBox",h),makeCoordinateRangeWithDynamicMinMax("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight","shapeIsEllipsoid",h),makeCoordinateRangeWithDynamicMinMax("Max Radius","Min Radius","Max Angle","Min Angle","Max Height","Min Height","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxAngle","clippingCylinderMinAngle","clippingCylinderMaxHeight","clippingCylinderMinHeight","shapeIsCylinder",h);const m=document.createElement("div");p.appendChild(m);const f=document.createElement("textarea");f.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),m.className="cesium-cesiumInspector-styleEditor",m.appendChild(f);const g=l("Compile (Ctrl+Enter)","compileShader");m.appendChild(g);const C=document.createElement("label");C.style.display="block",C.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),m.appendChild(C),knockout.applyBindings(n,i)}function makeCoordinateRangeWithDynamicMinMax(e,t,i,n,r,o,a,s,c,l,d,u,h,p){const A=InspectorShared.createRangeInputWithDynamicMinMax,m=p.appendChild(document.createElement("div"));m.setAttribute("data-bind",`if: ${h}`),m.appendChild(A(e,a)),m.appendChild(A(t,s)),m.appendChild(A(i,c)),m.appendChild(A(n,l)),m.appendChild(A(r,d)),m.appendChild(A(o,u))}function viewerVoxelInspectorMixin(e){Check.typeOf.object("viewer",e);const t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);const i=new VoxelInspector(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return i}}})}Object.defineProperties(VoxelInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},voxelPrimitive:{get:function(){return this._voxelPrimitive},set:function(e){if(defined$1(this._customShaderCompilationRemoveCallback)&&this._customShaderCompilationRemoveCallback(),!defined$1(e))return;this._voxelPrimitive=e;const t=this;t._customShaderCompilationRemoveCallback=t._voxelPrimitive.customShaderCompilationEvent.addEventListener(function(e){const i=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=formatShaderString(i),defined$1(e)?(t.shaderCompilationMessage=e.message,t.shaderCompilationSuccess=!1):(t.shaderCompilationMessage="Shader compiled successfully!",t.shaderCompilationSuccess=!0)}),t._modelMatrixReady=!1;for(let e=0;e<t._getPrimitiveFunctions.length;e++)t._getPrimitiveFunctions[e]();t._modelMatrixReady=!0,setModelMatrix(t)}}}),VoxelInspectorViewModel.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},VoxelInspectorViewModel.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},VoxelInspectorViewModel.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible},VoxelInspectorViewModel.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible},VoxelInspectorViewModel.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible},VoxelInspectorViewModel.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible},VoxelInspectorViewModel.prototype.compileShader=function(){defined$1(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new CustomShader({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))},VoxelInspectorViewModel.prototype.shaderEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();const e=t.target,i=e.selectionStart,n=e.selectionEnd;let r=n;const o=e.value.slice(i,n).split("\n"),a=o.length;let s;if(t.shiftKey)for(s=0;s<a;++s)" "===o[s][0]&&(" "===o[s][1]?(o[s]=o[s].substr(2),r-=2):(o[s]=o[s].substr(1),r-=1));else for(s=0;s<a;++s)o[s]=` ${o[s]}`,r+=2;const c=o.join("\n");e.value=e.value.slice(0,i)+c+e.value.slice(n),e.selectionStart=i!==n?i:r,e.selectionEnd=r}else!t.ctrlKey||10!==t.keyCode&&13!==t.keyCode||this.compileShader();return!0},VoxelInspectorViewModel.prototype.isDestroyed=function(){return!1},VoxelInspectorViewModel.prototype.destroy=function(){const e=this;return this._definedProperties.forEach(function(t){knockout.getObservable(e,t).dispose()}),destroyObject$1(this)},Object.defineProperties(VoxelInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),VoxelInspector.prototype.isDestroyed=function(){return!1},VoxelInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject$1(this)};const VERSION="1.134.0";var Cesium=Object.freeze({__proto__:null,AlphaMode:AlphaMode$1,AlphaPipelineStage:AlphaPipelineStage,AnchorPointDirect:AnchorPointDirect,AnchorPointIndirect:AnchorPointIndirect,Animation:Animation$1,AnimationViewModel:AnimationViewModel,Appearance:Appearance,ApproximateTerrainHeights:ApproximateTerrainHeights,ArcGISTiledElevationTerrainProvider:ArcGISTiledElevationTerrainProvider,ArcGisBaseMapType:ArcGisBaseMapType$1,ArcGisMapServerImageryProvider:ArcGisMapServerImageryProvider,ArcGisMapService:ArcGisMapService,ArcType:ArcType$1,ArticulationStageType:ArticulationStageType$1,AssociativeArray:AssociativeArray,Atmosphere:Atmosphere,AtmospherePipelineStage:AtmospherePipelineStage,AttributeCompression:AttributeCompression,AttributeType:AttributeType$1,AutoExposure:AutoExposure,AutomaticUniforms:AutomaticUniforms,Axis:Axis$1,AxisAlignedBoundingBox:AxisAlignedBoundingBox,Azure2DImageryProvider:Azure2DImageryProvider,B3dmLoader:B3dmLoader,B3dmParser:B3dmParser,BaseLayerPicker:BaseLayerPicker,BaseLayerPickerViewModel:BaseLayerPickerViewModel,BatchTable:BatchTable,BatchTableHierarchy:BatchTableHierarchy,BatchTexture:BatchTexture,BatchTexturePipelineStage:BatchTexturePipelineStage,Billboard:Billboard,BillboardCollection:BillboardCollection,BillboardGraphics:BillboardGraphics,BillboardLoadState:BillboardLoadState,BillboardTexture:BillboardTexture,BillboardVisualizer:BillboardVisualizer,BingMapsGeocoderService:BingMapsGeocoderService,BingMapsImageryProvider:BingMapsImageryProvider,BingMapsStyle:BingMapsStyle$1,BlendEquation:BlendEquation$1,BlendFunction:BlendFunction$1,BlendOption:BlendOption$1,BlendingState:BlendingState$2,BoundingRectangle:BoundingRectangle,BoundingSphere:BoundingSphere,BoundingSphereState:BoundingSphereState,BoundingVolumeSemantics:BoundingVolumeSemantics,BoxEmitter:BoxEmitter,BoxGeometry:BoxGeometry$1,BoxGeometryUpdater:BoxGeometryUpdater,BoxGraphics:BoxGraphics,BoxOutlineGeometry:BoxOutlineGeometry,BrdfLutGenerator:BrdfLutGenerator,Buffer:Buffer$1,BufferLoader:BufferLoader,BufferUsage:BufferUsage$2,CPUStylingPipelineStage:CPUStylingPipelineStage,CallbackPositionProperty:CallbackPositionProperty,CallbackProperty:CallbackProperty,Camera:Camera,CameraEventAggregator:CameraEventAggregator,CameraEventType:CameraEventType$1,CameraFlightPath:CameraFlightPath,Cartesian2:Cartesian2,Cartesian3:Cartesian3$1,Cartesian4:Cartesian4,CartesianRectangle:CartesianRectangle,Cartographic:Cartographic,CartographicGeocoderService:CartographicGeocoderService,CatmullRomSpline:CatmullRomSpline,Cesium3DContentGroup:Cesium3DContentGroup,Cesium3DTile:Cesium3DTile,Cesium3DTileBatchTable:Cesium3DTileBatchTable,Cesium3DTileColorBlendMode:Cesium3DTileColorBlendMode$1,Cesium3DTileContent:Cesium3DTileContent,Cesium3DTileContentFactory:Cesium3DTileContentFactory,Cesium3DTileContentState:Cesium3DTileContentState$1,Cesium3DTileContentType:Cesium3DTileContentType$1,Cesium3DTileFeature:Cesium3DTileFeature,Cesium3DTileFeatureTable:Cesium3DTileFeatureTable,Cesium3DTileOptimizationHint:Cesium3DTileOptimizationHint$1,Cesium3DTileOptimizations:Cesium3DTileOptimizations,Cesium3DTilePass:Cesium3DTilePass$1,Cesium3DTilePassState:Cesium3DTilePassState,Cesium3DTilePointFeature:Cesium3DTilePointFeature,Cesium3DTileRefine:Cesium3DTileRefine$1,Cesium3DTileStyle:Cesium3DTileStyle,Cesium3DTileStyleEngine:Cesium3DTileStyleEngine,Cesium3DTilesInspector:Cesium3DTilesInspector,Cesium3DTilesInspectorViewModel:Cesium3DTilesInspectorViewModel,Cesium3DTilesVoxelProvider:Cesium3DTilesVoxelProvider,Cesium3DTileset:Cesium3DTileset,Cesium3DTilesetBaseTraversal:Cesium3DTilesetBaseTraversal,Cesium3DTilesetCache:Cesium3DTilesetCache,Cesium3DTilesetGraphics:Cesium3DTilesetGraphics,Cesium3DTilesetHeatmap:Cesium3DTilesetHeatmap,Cesium3DTilesetMetadata:Cesium3DTilesetMetadata,Cesium3DTilesetMostDetailedTraversal:Cesium3DTilesetMostDetailedTraversal,Cesium3DTilesetSkipTraversal:Cesium3DTilesetSkipTraversal,Cesium3DTilesetStatistics:Cesium3DTilesetStatistics,Cesium3DTilesetTraversal:Cesium3DTilesetTraversal,Cesium3DTilesetVisualizer:Cesium3DTilesetVisualizer,CesiumInspector:CesiumInspector,CesiumInspectorViewModel:CesiumInspectorViewModel,CesiumTerrainProvider:CesiumTerrainProvider,CesiumWidget:CesiumWidget,Check:Check,CheckerboardMaterialProperty:CheckerboardMaterialProperty,CircleEmitter:CircleEmitter,CircleGeometry:CircleGeometry,CircleOutlineGeometry:CircleOutlineGeometry,ClassificationModelDrawCommand:ClassificationModelDrawCommand,ClassificationPipelineStage:ClassificationPipelineStage,ClassificationPrimitive:ClassificationPrimitive,ClassificationType:ClassificationType$1,ClearCommand:ClearCommand,ClippingPlane:ClippingPlane,ClippingPlaneCollection:ClippingPlaneCollection,ClippingPolygon:ClippingPolygon,ClippingPolygonCollection:ClippingPolygonCollection,Clock:Clock,ClockRange:ClockRange$1,ClockStep:ClockStep$1,ClockViewModel:ClockViewModel,CloudCollection:CloudCollection,CloudType:CloudType$1,Color:Color,ColorBlendMode:ColorBlendMode$1,ColorGeometryInstanceAttribute:ColorGeometryInstanceAttribute,ColorMaterialProperty:ColorMaterialProperty,Command:Command,ComponentDatatype:ComponentDatatype$1,Composite3DTileContent:Composite3DTileContent,CompositeEntityCollection:CompositeEntityCollection,CompositeMaterialProperty:CompositeMaterialProperty,CompositePositionProperty:CompositePositionProperty,CompositeProperty:CompositeProperty,CompressedTextureBuffer:CompressedTextureBuffer,ComputeCommand:ComputeCommand,ComputeEngine:ComputeEngine,ConditionsExpression:ConditionsExpression,ConeEmitter:ConeEmitter,ConstantPositionProperty:ConstantPositionProperty,ConstantProperty:ConstantProperty,ConstantSpline:ConstantSpline,ContentMetadata:ContentMetadata,Context:Context$1,ContextLimits:ContextLimits,CoplanarPolygonGeometry:CoplanarPolygonGeometry,CoplanarPolygonGeometryLibrary:CoplanarPolygonGeometryLibrary,CoplanarPolygonOutlineGeometry:CoplanarPolygonOutlineGeometry,CornerType:CornerType$1,CorrelationGroup:CorrelationGroup,CorridorGeometry:CorridorGeometry,CorridorGeometryLibrary:CorridorGeometryLibrary,CorridorGeometryUpdater:CorridorGeometryUpdater,CorridorGraphics:CorridorGraphics,CorridorOutlineGeometry:CorridorOutlineGeometry,Credit:Credit,CreditDisplay:CreditDisplay,CubeMap:CubeMap$1,CubeMapFace:CubeMapFace,CubicRealPolynomial:CubicRealPolynomial,CullFace:CullFace$1,CullingVolume:CullingVolume,CumulusCloud:CumulusCloud,CustomDataSource:CustomDataSource,CustomHeightmapTerrainProvider:CustomHeightmapTerrainProvider,CustomShader:CustomShader,CustomShaderMode:CustomShaderMode$1,CustomShaderPipelineStage:CustomShaderPipelineStage,CustomShaderTranslucencyMode:CustomShaderTranslucencyMode$1,CylinderGeometry:CylinderGeometry,CylinderGeometryLibrary:CylinderGeometryLibrary,CylinderGeometryUpdater:CylinderGeometryUpdater,CylinderGraphics:CylinderGraphics,CylinderOutlineGeometry:CylinderOutlineGeometry,CzmlDataSource:CzmlDataSource,DataSource:DataSource,DataSourceClock:DataSourceClock,DataSourceCollection:DataSourceCollection,DataSourceDisplay:DataSourceDisplay,DebugAppearance:DebugAppearance,DebugCameraPrimitive:DebugCameraPrimitive,DebugInspector:DebugInspector,DebugModelMatrixPrimitive:DebugModelMatrixPrimitive,DefaultProxy:DefaultProxy,DepthFunction:DepthFunction$1,DepthPlane:DepthPlane,DequantizationPipelineStage:DequantizationPipelineStage,DerivedCommand:DerivedCommand,DeveloperError:DeveloperError$1,DeviceOrientationCameraController:DeviceOrientationCameraController,DirectionalLight:DirectionalLight,DiscardEmptyTileImagePolicy:DiscardEmptyTileImagePolicy,DiscardMissingTileImagePolicy:DiscardMissingTileImagePolicy,DistanceDisplayCondition:DistanceDisplayCondition,DistanceDisplayConditionGeometryInstanceAttribute:DistanceDisplayConditionGeometryInstanceAttribute,DoubleEndedPriorityQueue:DoubleEndedPriorityQueue,DoublyLinkedList:DoublyLinkedList,DracoLoader:DracoLoader,DrawCommand:DrawCommand$1,DynamicAtmosphereLightingType:DynamicAtmosphereLightingType$1,DynamicEnvironmentMapManager:DynamicEnvironmentMapManager,DynamicGeometryBatch:DynamicGeometryBatch,DynamicGeometryUpdater:DynamicGeometryUpdater$1,EarthOrientationParameters:EarthOrientationParameters,EarthOrientationParametersSample:EarthOrientationParametersSample,EasingFunction:EasingFunction$1,EllipseGeometry:EllipseGeometry,EllipseGeometryLibrary:EllipseGeometryLibrary,EllipseGeometryUpdater:EllipseGeometryUpdater,EllipseGraphics:EllipseGraphics,EllipseOutlineGeometry:EllipseOutlineGeometry,Ellipsoid:Ellipsoid,EllipsoidGeodesic:EllipsoidGeodesic,EllipsoidGeometry:EllipsoidGeometry,EllipsoidGeometryUpdater:EllipsoidGeometryUpdater,EllipsoidGraphics:EllipsoidGraphics,EllipsoidOutlineGeometry:EllipsoidOutlineGeometry,EllipsoidPrimitive:EllipsoidPrimitive,EllipsoidRhumbLine:EllipsoidRhumbLine,EllipsoidSurfaceAppearance:EllipsoidSurfaceAppearance,EllipsoidTangentPlane:EllipsoidTangentPlane,EllipsoidTerrainProvider:EllipsoidTerrainProvider,EllipsoidalOccluder:EllipsoidalOccluder,Empty3DTileContent:Empty3DTileContent,EncodedCartesian3:EncodedCartesian3,Entity:Entity,EntityCluster:EntityCluster,EntityCollection:EntityCollection,EntityView:EntityView,Event:Event$1,EventHelper:EventHelper,Expression:Expression,ExpressionNodeType:ExpressionNodeType$1,ExtrapolationType:ExtrapolationType$1,FeatureDetection:FeatureDetection,FeatureIdPipelineStage:FeatureIdPipelineStage,Fog:Fog,ForEach:ForEach,FrameRateMonitor:FrameRateMonitor,FrameState:FrameState,Framebuffer:Framebuffer,FramebufferManager:FramebufferManager,Frozen:Frozen,FrustumCommands:FrustumCommands,FrustumGeometry:FrustumGeometry,FrustumOutlineGeometry:FrustumOutlineGeometry,Fullscreen:Fullscreen,FullscreenButton:FullscreenButton,FullscreenButtonViewModel:FullscreenButtonViewModel,GaussianSplat3DTileContent:GaussianSplat3DTileContent,GaussianSplatPrimitive:GaussianSplatPrimitive,GaussianSplatRenderResources:GaussianSplatRenderResources,GaussianSplatSorter:GaussianSplatSorter,GaussianSplatTextureGenerator:GaussianSplatTextureGenerator,GeoJsonDataSource:GeoJsonDataSource,GeoJsonLoader:GeoJsonLoader,GeocodeType:GeocodeType$1,Geocoder:Geocoder,GeocoderService:GeocoderService,GeocoderViewModel:GeocoderViewModel,GeographicProjection:GeographicProjection,GeographicTilingScheme:GeographicTilingScheme,Geometry:Geometry,Geometry3DTileContent:Geometry3DTileContent,GeometryAttribute:GeometryAttribute,GeometryAttributes:GeometryAttributes,GeometryFactory:GeometryFactory,GeometryInstance:GeometryInstance,GeometryInstanceAttribute:GeometryInstanceAttribute,GeometryOffsetAttribute:GeometryOffsetAttribute$1,GeometryPipeline:GeometryPipeline$1,GeometryPipelineStage:GeometryPipelineStage,GeometryType:GeometryType$1,GeometryUpdater:GeometryUpdater,GeometryUpdaterSet:GeometryUpdaterSet,GeometryVisualizer:GeometryVisualizer,GetFeatureInfoFormat:GetFeatureInfoFormat,Globe:Globe,GlobeDepth:GlobeDepth,GlobeSurfaceShaderSet:GlobeSurfaceShaderSet,GlobeSurfaceTile:GlobeSurfaceTile,GlobeSurfaceTileProvider:GlobeSurfaceTileProvider,GlobeTranslucency:GlobeTranslucency,GlobeTranslucencyFramebuffer:GlobeTranslucencyFramebuffer,GlobeTranslucencyState:GlobeTranslucencyState,GltfBufferViewLoader:GltfBufferViewLoader,GltfDracoLoader:GltfDracoLoader,GltfGpmLoader:GltfGpmLoader,GltfGpmLocal:GltfGpmLocal,GltfImageLoader:GltfImageLoader,GltfIndexBufferLoader:GltfIndexBufferLoader,GltfJsonLoader:GltfJsonLoader,GltfLoader:GltfLoader,GltfLoaderUtil:GltfLoaderUtil,GltfMeshPrimitiveGpmLoader:GltfMeshPrimitiveGpmLoader,GltfSpzLoader:GltfSpzLoader,GltfStructuralMetadataLoader:GltfStructuralMetadataLoader,GltfTextureLoader:GltfTextureLoader,GltfVertexBufferLoader:GltfVertexBufferLoader,Google2DImageryProvider:Google2DImageryProvider,GoogleEarthEnterpriseImageryProvider:GoogleEarthEnterpriseImageryProvider,GoogleEarthEnterpriseMapsProvider:GoogleEarthEnterpriseMapsProvider,GoogleEarthEnterpriseMetadata:GoogleEarthEnterpriseMetadata,GoogleEarthEnterpriseTerrainData:GoogleEarthEnterpriseTerrainData,GoogleEarthEnterpriseTerrainProvider:GoogleEarthEnterpriseTerrainProvider,GoogleEarthEnterpriseTileInformation:GoogleEarthEnterpriseTileInformation,GoogleGeocoderService:GoogleGeocoderService,GoogleMaps:GoogleMaps,GpxDataSource:GpxDataSource,GregorianDate:GregorianDate,GridImageryProvider:GridImageryProvider,GridMaterialProperty:GridMaterialProperty,GroundGeometryUpdater:GroundGeometryUpdater,GroundPolylineGeometry:GroundPolylineGeometry,GroundPolylinePrimitive:GroundPolylinePrimitive,GroundPrimitive:GroundPrimitive,GroupMetadata:GroupMetadata,HeadingPitchRange:HeadingPitchRange,HeadingPitchRoll:HeadingPitchRoll,Heap:Heap,HeightReference:HeightReference$1,HeightmapEncoding:HeightmapEncoding$1,HeightmapTerrainData:HeightmapTerrainData,HeightmapTessellator:HeightmapTessellator,HermitePolynomialApproximation:HermitePolynomialApproximation,HermiteSpline:HermiteSpline,HilbertOrder:HilbertOrder,HomeButton:HomeButton,HomeButtonViewModel:HomeButtonViewModel,HorizontalOrigin:HorizontalOrigin$1,I3SBuildingSceneLayerExplorer:I3SBuildingSceneLayerExplorer,I3SBuildingSceneLayerExplorerViewModel:I3SBuildingSceneLayerExplorerViewModel,I3SDataProvider:I3SDataProvider,I3SDecoder:I3SDecoder,I3SFeature:I3SFeature,I3SField:I3SField,I3SGeometry:I3SGeometry,I3SLayer:I3SLayer,I3SNode:I3SNode,I3SStatistics:I3SStatistics,I3SSublayer:I3SSublayer,I3SSymbology:I3SSymbology,I3dmLoader:I3dmLoader,I3dmParser:I3dmParser,ITwinData:ITwinData,ITwinPlatform:ITwinPlatform,Iau2000Orientation:Iau2000Orientation,Iau2006XysData:Iau2006XysData,Iau2006XysSample:Iau2006XysSample,IauOrientationAxes:IauOrientationAxes,IauOrientationParameters:IauOrientationParameters,ImageBasedLighting:ImageBasedLighting,ImageBasedLightingPipelineStage:ImageBasedLightingPipelineStage,ImageMaterialProperty:ImageMaterialProperty,Imagery:Imagery,ImageryConfiguration:ImageryConfiguration,ImageryCoverage:ImageryCoverage,ImageryFlags:ImageryFlags,ImageryInput:ImageryInput,ImageryLayer:ImageryLayer,ImageryLayerCollection:ImageryLayerCollection,ImageryLayerFeatureInfo:ImageryLayerFeatureInfo,ImageryPipelineStage:ImageryPipelineStage,ImageryProvider:ImageryProvider,ImageryState:ImageryState$1,Implicit3DTileContent:Implicit3DTileContent,ImplicitAvailabilityBitstream:ImplicitAvailabilityBitstream,ImplicitMetadataView:ImplicitMetadataView,ImplicitSubdivisionScheme:ImplicitSubdivisionScheme$1,ImplicitSubtree:ImplicitSubtree,ImplicitSubtreeCache:ImplicitSubtreeCache,ImplicitSubtreeMetadata:ImplicitSubtreeMetadata,ImplicitTileCoordinates:ImplicitTileCoordinates,ImplicitTileset:ImplicitTileset,IndexDatatype:IndexDatatype$1,InfoBox:InfoBox,InfoBoxViewModel:InfoBoxViewModel,InspectorShared:InspectorShared,InstanceAttributeSemantic:InstanceAttributeSemantic$1,InstancingPipelineStage:InstancingPipelineStage,InterpolationAlgorithm:InterpolationAlgorithm,InterpolationType:InterpolationType$1,Intersect:Intersect$1,IntersectionTests:IntersectionTests,Intersections2D:Intersections2D,Interval:Interval,InvertClassification:InvertClassification,Ion:Ion,IonGeocodeProviderType:IonGeocodeProviderType$1,IonGeocoderService:IonGeocoderService,IonImageryProvider:IonImageryProvider,IonResource:IonResource,IonWorldImageryStyle:IonWorldImageryStyle$1,Iso8601:Iso8601,JobScheduler:JobScheduler,JobType:JobType$1,JsonMetadataTable:JsonMetadataTable,JulianDate:JulianDate,KTX2Transcoder:KTX2Transcoder,KeyboardEventModifier:KeyboardEventModifier$1,KeyframeNode:KeyframeNode,KmlCamera:KmlCamera,KmlDataSource:KmlDataSource,KmlLookAt:KmlLookAt,KmlTour:KmlTour,KmlTourFlyTo:KmlTourFlyTo,KmlTourWait:KmlTourWait,Label:Label,LabelCollection:LabelCollection,LabelGraphics:LabelGraphics,LabelStyle:LabelStyle$1,LabelVisualizer:LabelVisualizer,LagrangePolynomialApproximation:LagrangePolynomialApproximation,LeapSecond:LeapSecond,Light:Light,LightingModel:LightingModel$1,LightingPipelineStage:LightingPipelineStage,LinearApproximation:LinearApproximation,LinearSpline:LinearSpline,ManagedArray:ManagedArray,MapMode2D:MapMode2D$1,MapProjection:MapProjection,MapboxImageryProvider:MapboxImageryProvider,MapboxStyleImageryProvider:MapboxStyleImageryProvider,MappedPositions:MappedPositions,Material:Material$4,MaterialAppearance:MaterialAppearance,MaterialPipelineStage:MaterialPipelineStage,MaterialProperty:MaterialProperty,Math:CesiumMath,Matrix2:Matrix2,Matrix3:Matrix3$1,Matrix4:Matrix4$1,Megatexture:Megatexture,MeshPrimitiveGpmLocal:MeshPrimitiveGpmLocal,MetadataClass:MetadataClass,MetadataClassProperty:MetadataClassProperty,MetadataComponentType:MetadataComponentType$1,MetadataEntity:MetadataEntity,MetadataEnum:MetadataEnum,MetadataEnumValue:MetadataEnumValue,MetadataPicking:MetadataPicking$1,MetadataPickingPipelineStage:MetadataPickingPipelineStage,MetadataPipelineStage:MetadataPipelineStage,MetadataSchema:MetadataSchema,MetadataSchemaLoader:MetadataSchemaLoader,MetadataSemantic:MetadataSemantic$1,MetadataTable:MetadataTable,MetadataTableProperty:MetadataTableProperty,MetadataType:MetadataType$1,MipmapHint:MipmapHint$1,Model:Model,Model3DTileContent:Model3DTileContent,ModelAlphaOptions:ModelAlphaOptions,ModelAnimation:ModelAnimation,ModelAnimationChannel:ModelAnimationChannel,ModelAnimationCollection:ModelAnimationCollection,ModelAnimationLoop:ModelAnimationLoop$1,ModelAnimationState:ModelAnimationState$1,ModelArticulation:ModelArticulation,ModelArticulationStage:ModelArticulationStage,ModelClippingPlanesPipelineStage:ModelClippingPlanesPipelineStage,ModelClippingPolygonsPipelineStage:ModelClippingPolygonsPipelineStage,ModelColorPipelineStage:ModelColorPipelineStage,ModelComponents:ModelComponents,ModelDrawCommand:ModelDrawCommand,ModelDrawCommands:ModelDrawCommands,ModelFeature:ModelFeature,ModelFeatureTable:ModelFeatureTable,ModelGraphics:ModelGraphics,ModelImagery:ModelImagery,ModelImageryMapping:ModelImageryMapping,ModelLightingOptions:ModelLightingOptions,ModelMatrixUpdateStage:ModelMatrixUpdateStage,ModelNode:ModelNode,ModelPrimitiveImagery:ModelPrimitiveImagery,ModelReader:ModelReader,ModelRenderResources:ModelRenderResources,ModelRuntimeNode:ModelRuntimeNode,ModelRuntimePrimitive:ModelRuntimePrimitive,ModelSceneGraph:ModelSceneGraph,ModelSilhouettePipelineStage:ModelSilhouettePipelineStage,ModelSkin:ModelSkin,ModelSplitterPipelineStage:ModelSplitterPipelineStage,ModelStatistics:ModelStatistics,ModelType:ModelType$1,ModelUtility:ModelUtility,ModelVisualizer:ModelVisualizer,Moon:Moon,MorphTargetsPipelineStage:MorphTargetsPipelineStage,MorphWeightSpline:MorphWeightSpline,MortonOrder:MortonOrder,Multiple3DTileContent:Multiple3DTileContent,MultisampleFramebuffer:MultisampleFramebuffer,NavigationHelpButton:NavigationHelpButton,NavigationHelpButtonViewModel:NavigationHelpButtonViewModel,NearFarScalar:NearFarScalar,NeverTileDiscardPolicy:NeverTileDiscardPolicy,NodeRenderResources:NodeRenderResources,NodeStatisticsPipelineStage:NodeStatisticsPipelineStage,NodeTransformationProperty:NodeTransformationProperty,OIT:OIT,Occluder:Occluder,OffsetGeometryInstanceAttribute:OffsetGeometryInstanceAttribute,OpenCageGeocoderService:OpenCageGeocoderService,OpenStreetMapImageryProvider:OpenStreetMapImageryProvider,OrderedGroundPrimitiveCollection:OrderedGroundPrimitiveCollection,OrientedBoundingBox:OrientedBoundingBox,OrthographicFrustum:OrthographicFrustum,OrthographicOffCenterFrustum:OrthographicOffCenterFrustum,Packable:Packable,PackableForInterpolation:PackableForInterpolation,Particle:Particle,ParticleBurst:ParticleBurst,ParticleEmitter:ParticleEmitter,ParticleSystem:ParticleSystem,Pass:Pass$1,PassState:PassState,PathGraphics:PathGraphics,PathVisualizer:PathVisualizer,PeliasGeocoderService:PeliasGeocoderService,PerInstanceColorAppearance:PerInstanceColorAppearance,PerformanceDisplay:PerformanceDisplay,PerformanceWatchdog:PerformanceWatchdog,PerformanceWatchdogViewModel:PerformanceWatchdogViewModel,PerspectiveFrustum:PerspectiveFrustum,PerspectiveOffCenterFrustum:PerspectiveOffCenterFrustum,PickDepth:PickDepth,PickDepthFramebuffer:PickDepthFramebuffer,PickFramebuffer:PickFramebuffer,PickedMetadataInfo:PickedMetadataInfo,Picking:Picking,PickingPipelineStage:PickingPipelineStage,PinBuilder:PinBuilder,PixelDatatype:PixelDatatype$1,PixelFormat:PixelFormat$1,Plane:Plane,PlaneGeometry:PlaneGeometry,PlaneGeometryUpdater:PlaneGeometryUpdater,PlaneGraphics:PlaneGraphics,PlaneOutlineGeometry:PlaneOutlineGeometry,PntsLoader:PntsLoader,PntsParser:PntsParser,PointCloud:PointCloud,PointCloudEyeDomeLighting:PointCloudEyeDomeLighting,PointCloudShading:PointCloudShading,PointCloudStylingPipelineStage:PointCloudStylingPipelineStage,PointGraphics:PointGraphics,PointPrimitive:PointPrimitive,PointPrimitiveCollection:PointPrimitiveCollection,PointVisualizer:PointVisualizer,PolygonGeometry:PolygonGeometry,PolygonGeometryLibrary:PolygonGeometryLibrary,PolygonGeometryUpdater:PolygonGeometryUpdater,PolygonGraphics:PolygonGraphics,PolygonHierarchy:PolygonHierarchy,PolygonOutlineGeometry:PolygonOutlineGeometry,PolygonPipeline:PolygonPipeline,Polyline:Polyline,PolylineArrowMaterialProperty:PolylineArrowMaterialProperty,PolylineCollection:PolylineCollection,PolylineColorAppearance:PolylineColorAppearance,PolylineDashMaterialProperty:PolylineDashMaterialProperty,PolylineGeometry:PolylineGeometry,PolylineGeometryUpdater:PolylineGeometryUpdater,PolylineGlowMaterialProperty:PolylineGlowMaterialProperty,PolylineGraphics:PolylineGraphics,PolylineMaterialAppearance:PolylineMaterialAppearance,PolylineOutlineMaterialProperty:PolylineOutlineMaterialProperty,PolylinePipeline:PolylinePipeline,PolylineVisualizer:PolylineVisualizer,PolylineVolumeGeometry:PolylineVolumeGeometry,PolylineVolumeGeometryLibrary:PolylineVolumeGeometryLibrary,PolylineVolumeGeometryUpdater:PolylineVolumeGeometryUpdater,PolylineVolumeGraphics:PolylineVolumeGraphics,PolylineVolumeOutlineGeometry:PolylineVolumeOutlineGeometry,PositionProperty:PositionProperty,PositionPropertyArray:PositionPropertyArray,PostProcessStage:PostProcessStage,PostProcessStageCollection:PostProcessStageCollection,PostProcessStageComposite:PostProcessStageComposite,PostProcessStageLibrary:PostProcessStageLibrary,PostProcessStageSampleMode:PostProcessStageSampleMode,PostProcessStageTextureCache:PostProcessStageTextureCache,PpeMetadata:PpeMetadata,PpeSource:PpeSource$1,PpeTexture:PpeTexture,Primitive:Primitive$3,PrimitiveCollection:PrimitiveCollection,PrimitiveLoadPlan:PrimitiveLoadPlan,PrimitiveOutlineGenerator:PrimitiveOutlineGenerator,PrimitiveOutlinePipelineStage:PrimitiveOutlinePipelineStage,PrimitivePipeline:PrimitivePipeline,PrimitiveRenderResources:PrimitiveRenderResources,PrimitiveState:PrimitiveState$1,PrimitiveStatisticsPipelineStage:PrimitiveStatisticsPipelineStage,PrimitiveType:PrimitiveType$1,ProjectionPicker:ProjectionPicker,ProjectionPickerViewModel:ProjectionPickerViewModel,Property:Property,PropertyArray:PropertyArray,PropertyAttribute:PropertyAttribute,PropertyAttributeProperty:PropertyAttributeProperty,PropertyBag:PropertyBag,PropertyTable:PropertyTable,PropertyTexture:PropertyTexture,PropertyTextureProperty:PropertyTextureProperty,ProviderViewModel:ProviderViewModel,Proxy:Proxy$1,QuadraticRealPolynomial:QuadraticRealPolynomial,QuadtreeOccluders:QuadtreeOccluders,QuadtreePrimitive:QuadtreePrimitive,QuadtreeTile:QuadtreeTile,QuadtreeTileLoadState:QuadtreeTileLoadState$1,QuadtreeTileProvider:QuadtreeTileProvider,QuantizedMeshTerrainData:QuantizedMeshTerrainData,QuarticRealPolynomial:QuarticRealPolynomial,Quaternion:Quaternion,QuaternionSpline:QuaternionSpline,Queue:Queue,Ray:Ray,Rectangle:Rectangle,RectangleCollisionChecker:RectangleCollisionChecker,RectangleGeometry:RectangleGeometry,RectangleGeometryLibrary:RectangleGeometryLibrary,RectangleGeometryUpdater:RectangleGeometryUpdater,RectangleGraphics:RectangleGraphics,RectangleOutlineGeometry:RectangleOutlineGeometry,ReferenceFrame:ReferenceFrame$1,ReferenceProperty:ReferenceProperty,RenderState:RenderState$1,Renderbuffer:Renderbuffer,RenderbufferFormat:RenderbufferFormat$1,Request:Request,RequestErrorEvent:RequestErrorEvent,RequestScheduler:RequestScheduler,RequestState:RequestState$1,RequestType:RequestType$1,Resource:Resource,ResourceCache:ResourceCache,ResourceCacheKey:ResourceCacheKey,ResourceCacheStatistics:ResourceCacheStatistics,ResourceLoader:ResourceLoader,ResourceLoaderState:ResourceLoaderState$1,Rotation:Rotation,RuntimeError:RuntimeError,S2Cell:S2Cell,SDFSettings:SDFSettings$1,SampledPositionProperty:SampledPositionProperty,SampledProperty:SampledProperty,Sampler:Sampler,ScaledPositionProperty:ScaledPositionProperty,Scene:Scene,SceneFramebuffer:SceneFramebuffer,SceneMode:SceneMode$2,SceneMode2DPipelineStage:SceneMode2DPipelineStage,SceneModePicker:SceneModePicker,SceneModePickerViewModel:SceneModePickerViewModel,SceneTransforms:SceneTransforms,SceneTransitioner:SceneTransitioner,ScreenSpaceCameraController:ScreenSpaceCameraController,ScreenSpaceEventHandler:ScreenSpaceEventHandler,ScreenSpaceEventType:ScreenSpaceEventType$1,SelectedFeatureIdPipelineStage:SelectedFeatureIdPipelineStage,SelectionIndicator:SelectionIndicator,SelectionIndicatorViewModel:SelectionIndicatorViewModel,SensorVolumePortionToDisplay:SensorVolumePortionToDisplay,ShaderBuilder:ShaderBuilder,ShaderCache:ShaderCache,ShaderDestination:ShaderDestination$1,ShaderFunction:ShaderFunction,ShaderProgram:ShaderProgram$1,ShaderSource:ShaderSource$1,ShaderStruct:ShaderStruct,ShadowMap:ShadowMap,ShadowMapShader:ShadowMapShader,ShadowMode:ShadowMode$1,ShadowVolumeAppearance:ShadowVolumeAppearance,SharedContext:SharedContext,ShowGeometryInstanceAttribute:ShowGeometryInstanceAttribute,Simon1994PlanetaryPositions:Simon1994PlanetaryPositions,SimplePolylineGeometry:SimplePolylineGeometry,SingleTileImageryProvider:SingleTileImageryProvider,SkinningPipelineStage:SkinningPipelineStage,SkyAtmosphere:SkyAtmosphere,SkyBox:SkyBox,SpatialNode:SpatialNode,Spdcf:Spdcf,SpecularEnvironmentCubeMap:SpecularEnvironmentCubeMap,SphereEmitter:SphereEmitter,SphereGeometry:SphereGeometry,SphereOutlineGeometry:SphereOutlineGeometry,Spherical:Spherical,Spline:Spline,SplitDirection:SplitDirection$1,Splitter:Splitter,StaticGeometryColorBatch:StaticGeometryColorBatch,StaticGeometryPerMaterialBatch:StaticGeometryPerMaterialBatch,StaticGroundGeometryColorBatch:StaticGroundGeometryColorBatch,StaticGroundGeometryPerMaterialBatch:StaticGroundGeometryPerMaterialBatch,StaticGroundPolylinePerMaterialBatch:StaticGroundPolylinePerMaterialBatch,StaticOutlineGeometryBatch:StaticOutlineGeometryBatch,StencilConstants:StencilConstants$1,StencilFunction:StencilFunction$1,StencilOperation:StencilOperation$1,SteppedSpline:SteppedSpline,Stereographic:Stereographic,StorageType:StorageType$1,StripeMaterialProperty:StripeMaterialProperty,StripeOrientation:StripeOrientation$1,StructuralMetadata:StructuralMetadata,StyleCommandsNeeded:StyleCommandsNeeded$1,StyleExpression:StyleExpression,Sun:Sun,SunLight:SunLight,SunPostProcess:SunPostProcess,SupportedImageFormats:SupportedImageFormats,SvgPathBindingHandler:SvgPathBindingHandler,TaskProcessor:TaskProcessor,Terrain:Terrain,TerrainData:TerrainData,TerrainEncoding:TerrainEncoding,TerrainFillMesh:TerrainFillMesh,TerrainMesh:TerrainMesh,TerrainOffsetProperty:TerrainOffsetProperty,TerrainProvider:TerrainProvider,TerrainQuantization:TerrainQuantization$1,TerrainState:TerrainState$1,Texture:Texture,Texture3D:Texture3D,TextureAtlas:TextureAtlas,TextureCache:TextureCache,TextureMagnificationFilter:TextureMagnificationFilter$1,TextureManager:TextureManager,TextureMinificationFilter:TextureMinificationFilter$1,TexturePacker:TexturePacker,TextureUniform:TextureUniform,TextureWrap:TextureWrap$1,TileAvailability:TileAvailability,TileBoundingRegion:TileBoundingRegion,TileBoundingS2Cell:TileBoundingS2Cell,TileBoundingSphere:TileBoundingSphere,TileBoundingVolume:TileBoundingVolume,TileCoordinatesImageryProvider:TileCoordinatesImageryProvider,TileDiscardPolicy:TileDiscardPolicy,TileEdge:TileEdge,TileImagery:TileImagery,TileMapServiceImageryProvider:TileMapServiceImageryProvider,TileMetadata:TileMetadata,TileOrientedBoundingBox:TileOrientedBoundingBox,TileProviderError:TileProviderError,TileReplacementQueue:TileReplacementQueue,TileSelectionResult:TileSelectionResult,TileState:TileState$1,Tileset3DTileContent:Tileset3DTileContent,TilesetMetadata:TilesetMetadata,TilesetPipelineStage:TilesetPipelineStage,TilingScheme:TilingScheme,TimeConstants:TimeConstants$1,TimeDynamicImagery:TimeDynamicImagery,TimeDynamicPointCloud:TimeDynamicPointCloud,TimeInterval:TimeInterval,TimeIntervalCollection:TimeIntervalCollection,TimeIntervalCollectionPositionProperty:TimeIntervalCollectionPositionProperty,TimeIntervalCollectionProperty:TimeIntervalCollectionProperty,TimeStandard:TimeStandard$1,Timeline:Timeline$1,TimelineHighlightRange:TimelineHighlightRange,TimelineTrack:TimelineTrack,Tipsify:Tipsify,ToggleButtonViewModel:ToggleButtonViewModel,Tonemapper:Tonemapper$1,TrackingReferenceFrame:TrackingReferenceFrame$1,Transforms:Transforms$2,TranslationRotationScale:TranslationRotationScale,TranslucentTileClassification:TranslucentTileClassification,TridiagonalSystemSolver:TridiagonalSystemSolver,TrustedServers:TrustedServers,TweenCollection:TweenCollection,UniformState:UniformState,UniformType:UniformType$1,UrlTemplateImageryProvider:UrlTemplateImageryProvider,VERSION:VERSION,VRButton:VRButton,VRButtonViewModel:VRButtonViewModel,VRTheWorldTerrainProvider:VRTheWorldTerrainProvider,VaryingType:VaryingType$1,Vector3DTileBatch:Vector3DTileBatch,Vector3DTileClampedPolylines:Vector3DTileClampedPolylines,Vector3DTileContent:Vector3DTileContent,Vector3DTileGeometry:Vector3DTileGeometry,Vector3DTilePoints:Vector3DTilePoints,Vector3DTilePolygons:Vector3DTilePolygons,Vector3DTilePolylines:Vector3DTilePolylines,Vector3DTilePrimitive:Vector3DTilePrimitive,VelocityOrientationProperty:VelocityOrientationProperty,VelocityVectorProperty:VelocityVectorProperty,VertexArray:VertexArray$1,VertexArrayFacade:VertexArrayFacade,VertexAttributeSemantic:VertexAttributeSemantic$1,VertexFormat:VertexFormat$1,VerticalExaggeration:VerticalExaggeration,VerticalExaggerationPipelineStage:VerticalExaggerationPipelineStage,VerticalOrigin:VerticalOrigin$1,VideoSynchronizer:VideoSynchronizer,View:View,Viewer:Viewer,ViewportQuad:ViewportQuad,Visibility:Visibility$1,Visualizer:Visualizer,VoxelBoundsCollection:VoxelBoundsCollection,VoxelBoxShape:VoxelBoxShape,VoxelCell:VoxelCell,VoxelContent:VoxelContent,VoxelCylinderShape:VoxelCylinderShape,VoxelEllipsoidShape:VoxelEllipsoidShape,VoxelInspector:VoxelInspector,VoxelInspectorViewModel:VoxelInspectorViewModel,VoxelMetadataOrder:VoxelMetadataOrder$1,VoxelPrimitive:VoxelPrimitive,VoxelProvider:VoxelProvider,VoxelRenderResources:VoxelRenderResources,VoxelShape:VoxelShape,VoxelShapeType:VoxelShapeType$1,VoxelTraversal:VoxelTraversal,VulkanConstants:VulkanConstants$1,WallGeometry:WallGeometry,WallGeometryLibrary:WallGeometryLibrary,WallGeometryUpdater:WallGeometryUpdater,WallGraphics:WallGraphics,WallOutlineGeometry:WallOutlineGeometry,WebGLConstants:WebGLConstants$1,WebMapServiceImageryProvider:WebMapServiceImageryProvider,WebMapTileServiceImageryProvider:WebMapTileServiceImageryProvider,WebMercatorProjection:WebMercatorProjection,WebMercatorTilingScheme:WebMercatorTilingScheme,WindingOrder:WindingOrder$1,WireframeIndexGenerator:WireframeIndexGenerator,WireframePipelineStage:WireframePipelineStage,_shadersAcesTonemappingStage:AcesTonemapping,_shadersAdditiveBlend:AdditiveBlend,_shadersAdjustTranslucentFS:AdjustTranslucentFS,_shadersAllMaterialAppearanceFS:AllMaterialAppearanceFS,_shadersAllMaterialAppearanceVS:AllMaterialAppearanceVS,_shadersAmbientOcclusionGenerate:AmbientOcclusionGenerate,_shadersAmbientOcclusionModulate:AmbientOcclusionModulate,_shadersAspectRampMaterial:AspectRampMaterial,_shadersAtmosphereCommon:AtmosphereCommon,_shadersAtmosphereStageFS:AtmosphereStageFS,_shadersAtmosphereStageVS:AtmosphereStageVS,_shadersBasicMaterialAppearanceFS:BasicMaterialAppearanceFS,_shadersBasicMaterialAppearanceVS:BasicMaterialAppearanceVS,_shadersBillboardCollectionFS:BillboardCollectionFS,_shadersBillboardCollectionVS:BillboardCollectionVS,_shadersBlackAndWhite:BlackAndWhite,_shadersBloomComposite:BloomComposite,_shadersBrdfLutGeneratorFS:BrdfLutGeneratorFS,_shadersBrightPass:BrightPass,_shadersBrightness:Brightness,_shadersBumpMapMaterial:BumpMapMaterial,_shadersCPUStylingStageFS:CPUStylingStageFS,_shadersCPUStylingStageVS:CPUStylingStageVS,_shadersCheckerboardMaterial:CheckerboardMaterial,_shadersCloudCollectionFS:CloudCollectionFS,_shadersCloudCollectionVS:CloudCollectionVS,_shadersCloudNoiseFS:CloudNoiseFS,_shadersCloudNoiseVS:CloudNoiseVS,_shadersCompareAndPackTranslucentDepth:CompareAndPackTranslucentDepth,_shadersCompositeOITFS:CompositeOITFS,_shadersCompositeTranslucentClassification:CompositeTranslucentClassification,_shadersComputeIrradianceFS:ComputeIrradianceFS,_shadersComputeRadianceMapFS:ComputeRadianceMapFS,_shadersContrastBias:ContrastBias,_shadersConvolveSpecularMapFS:ConvolveSpecularMapFS,_shadersConvolveSpecularMapVS:ConvolveSpecularMapVS,_shadersCustomShaderStageFS:CustomShaderStageFS,_shadersCustomShaderStageVS:CustomShaderStageVS,_shadersCzmBuiltins:CzmBuiltins,_shadersDepthOfField:DepthOfField,_shadersDepthPlaneFS:DepthPlaneFS,_shadersDepthPlaneVS:DepthPlaneVS,_shadersDepthView:DepthView,_shadersDepthViewPacked:DepthViewPacked,_shadersDotMaterial:DotMaterial,_shadersEdgeDetection:EdgeDetection,_shadersElevationBandMaterial:ElevationBandMaterial,_shadersElevationContourMaterial:ElevationContourMaterial,_shadersElevationRampMaterial:ElevationRampMaterial,_shadersEllipsoidFS:EllipsoidFS,_shadersEllipsoidSurfaceAppearanceFS:EllipsoidSurfaceAppearanceFS,_shadersEllipsoidSurfaceAppearanceVS:EllipsoidSurfaceAppearanceVS,_shadersEllipsoidVS:EllipsoidVS,_shadersFXAA:FXAA,_shadersFXAA3_11:FXAA3_11,_shadersFadeMaterial:FadeMaterial,_shadersFeatureIdStageFS:FeatureIdStageFS,_shadersFeatureIdStageVS:FeatureIdStageVS,_shadersFilmicTonemapping:FilmicTonemapping,_shadersGaussianBlur1D:GaussianBlur1D,_shadersGeometryStageFS:GeometryStageFS,_shadersGeometryStageVS:GeometryStageVS,_shadersGlobeFS:GlobeFS,_shadersGlobeVS:GlobeVS,_shadersGridMaterial:GridMaterial,_shadersGroundAtmosphere:GroundAtmosphere,_shadersHSBToRGB:czm_HSBToRGB,_shadersHSLToRGB:czm_HSLToRGB,_shadersImageBasedLightingStageFS:ImageBasedLightingStageFS,_shadersInstancingStageCommon:InstancingStageCommon,_shadersInstancingStageVS:InstancingStageVS,_shadersIntersectBox:IntersectBox,_shadersIntersectCylinder:IntersectCylinder,_shadersIntersectDepth:IntersectDepth,_shadersIntersectEllipsoid:IntersectEllipsoid,_shadersIntersectLongitude:IntersectLongitude,_shadersIntersectPlane:IntersectPlane,_shadersIntersection:Intersection,_shadersIntersectionUtils:IntersectionUtils,_shadersLegacyInstancingStageVS:LegacyInstancingStageVS,_shadersLensFlare:LensFlare,_shadersLightingStageFS:LightingStageFS,_shadersMaterialStageFS:MaterialStageFS,_shadersMegatexture:Megatexture$1,_shadersMetadataStageFS:MetadataStageFS,_shadersMetadataStageVS:MetadataStageVS,_shadersModelClippingPlanesStageFS:ModelClippingPlanesStageFS,_shadersModelClippingPolygonsStageFS:ModelClippingPolygonsStageFS,_shadersModelClippingPolygonsStageVS:ModelClippingPolygonsStageVS,_shadersModelColorStageFS:ModelColorStageFS,_shadersModelFS:ModelFS,_shadersModelSilhouetteStageFS:ModelSilhouetteStageFS,_shadersModelSilhouetteStageVS:ModelSilhouetteStageVS,_shadersModelSplitterStageFS:ModelSplitterStageFS,_shadersModelVS:ModelVS,_shadersModifiedReinhardTonemapping:ModifiedReinhardTonemapping,_shadersMorphTargetsStageVS:MorphTargetsStageVS,_shadersNightVision:NightVision,_shadersNormalMapMaterial:NormalMapMaterial,_shadersOctree:Octree,_shadersPassThrough:PassThrough,_shadersPassThroughDepth:PassThroughDepth,_shadersPbrNeutralTonemapping:PbrNeutralTonemapping,_shadersPerInstanceColorAppearanceFS:PerInstanceColorAppearanceFS,_shadersPerInstanceColorAppearanceVS:PerInstanceColorAppearanceVS,_shadersPerInstanceFlatColorAppearanceFS:PerInstanceFlatColorAppearanceFS,_shadersPerInstanceFlatColorAppearanceVS:PerInstanceFlatColorAppearanceVS,_shadersPointCloudEyeDomeLighting:PointCloudEyeDomeLightingShader,_shadersPointCloudStylingStageVS:PointCloudStylingStageVS,_shadersPointPrimitiveCollectionFS:PointPrimitiveCollectionFS,_shadersPointPrimitiveCollectionVS:PointPrimitiveCollectionVS,_shadersPolygonSignedDistanceFS:PolygonSignedDistanceFS,_shadersPolylineArrowMaterial:PolylineArrowMaterial,_shadersPolylineColorAppearanceVS:PolylineColorAppearanceVS,_shadersPolylineCommon:PolylineCommon,_shadersPolylineDashMaterial:PolylineDashMaterial,_shadersPolylineFS:PolylineFS$1,_shadersPolylineGlowMaterial:PolylineGlowMaterial,_shadersPolylineMaterialAppearanceVS:PolylineMaterialAppearanceVS,_shadersPolylineOutlineMaterial:PolylineOutlineMaterial,_shadersPolylineShadowVolumeFS:PolylineShadowVolumeFS,_shadersPolylineShadowVolumeMorphFS:PolylineShadowVolumeMorphFS,_shadersPolylineShadowVolumeMorphVS:PolylineShadowVolumeMorphVS,_shadersPolylineShadowVolumeVS:PolylineShadowVolumeVS,_shadersPolylineVS:PolylineVS,_shadersPrimitiveGaussianSplatFS:GaussianSplatFS,_shadersPrimitiveGaussianSplatVS:GaussianSplatVS,_shadersPrimitiveOutlineStageFS:PrimitiveOutlineStageFS,_shadersPrimitiveOutlineStageVS:PrimitiveOutlineStageVS,_shadersRGBToHSB:czm_RGBToHSB,_shadersRGBToHSL:czm_RGBToHSL,_shadersRGBToXYZ:czm_RGBToXYZ,_shadersReinhardTonemapping:ReinhardTonemapping,_shadersReprojectWebMercatorFS:ReprojectWebMercatorFS,_shadersReprojectWebMercatorVS:ReprojectWebMercatorVS,_shadersRimLightingMaterial:RimLightingMaterial,_shadersSelectedFeatureIdStageCommon:SelectedFeatureIdStageCommon,_shadersShadowVolumeAppearanceFS:ShadowVolumeAppearanceFS,_shadersShadowVolumeAppearanceVS:ShadowVolumeAppearanceVS,_shadersShadowVolumeFS:ShadowVolumeFS,_shadersSilhouette:Silhouette,_shadersSkinningStageVS:SkinningStageVS,_shadersSkyAtmosphereCommon:SkyAtmosphereCommon,_shadersSkyAtmosphereFS:SkyAtmosphereFS,_shadersSkyAtmosphereVS:SkyAtmosphereVS,_shadersSkyBoxFS:SkyBoxFS,_shadersSkyBoxVS:SkyBoxVS,_shadersSlopeRampMaterial:SlopeRampMaterial,_shadersStripeMaterial:StripeMaterial,_shadersSunFS:SunFS,_shadersSunTextureFS:SunTextureFS,_shadersSunVS:SunVS,_shadersTexturedMaterialAppearanceFS:TexturedMaterialAppearanceFS,_shadersTexturedMaterialAppearanceVS:TexturedMaterialAppearanceVS,_shadersVector3DTileClampedPolylinesFS:Vector3DTileClampedPolylinesFS,_shadersVector3DTileClampedPolylinesVS:Vector3DTileClampedPolylinesVS,_shadersVector3DTilePolylinesVS:Vector3DTilePolylinesVS,_shadersVectorTileVS:VectorTileVS,_shadersVerticalExaggerationStageVS:VerticalExaggerationStageVS,_shadersViewportQuadFS:ViewportQuadFS,_shadersViewportQuadVS:ViewportQuadVS,_shadersVoxelFS:VoxelFS,_shadersVoxelUtils:VoxelUtils,_shadersVoxelVS:VoxelVS,_shadersWater:WaterMaterial,_shadersWaterMaskMaterial:WaterMaskMaterial,_shadersXYZToRGB:czm_XYZToRGB,_shadersacesTonemapping:czm_acesTonemapping,_shadersalphaWeight:czm_alphaWeight,_shadersantialias:czm_antialias,_shadersapplyHSBShift:czm_applyHSBShift,_shadersapproximateSphericalCoordinates:czm_approximateSphericalCoordinates,_shadersapproximateTanh:czm_approximateTanh,_shadersbackFacing:czm_backFacing,_shadersbranchFreeTernary:czm_branchFreeTernary,_shaderscascadeColor:czm_cascadeColor,_shaderscascadeDistance:czm_cascadeDistance,_shaderscascadeMatrix:czm_cascadeMatrix,_shaderscascadeWeights:czm_cascadeWeights,_shadersclipPolygons:czm_clipPolygons,_shaderscolumbusViewMorph:czm_columbusViewMorph,_shaderscomputeAtmosphereColor:czm_computeAtmosphereColor,_shaderscomputeGroundAtmosphereScattering:czm_computeGroundAtmosphereScattering,_shaderscomputePosition:czm_computePosition,_shaderscomputeScattering:czm_computeScattering,_shadersconvertLocalToBoxUv:convertLocalToBoxUv,_shadersconvertLocalToCylinderUv:convertLocalToCylinderUv,_shadersconvertLocalToEllipsoidUv:convertLocalToEllipsoidUv,_shaderscosineAndSine:czm_cosineAndSine,_shadersdecompressTextureCoordinates:czm_decompressTextureCoordinates,_shadersdegreesPerRadian:czm_degreesPerRadian,_shadersdepthClamp:czm_depthClamp,_shadersdepthRange:czm_depthRange,_shadersdepthRangeStruct:czm_depthRangeStruct,_shaderseastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates,_shadersellipsoidContainsPoint:czm_ellipsoidContainsPoint,_shadersellipsoidTextureCoordinates:czm_ellipsoidTextureCoordinates,_shadersepsilon1:czm_epsilon1,_shadersepsilon2:czm_epsilon2,_shadersepsilon3:czm_epsilon3,_shadersepsilon4:czm_epsilon4,_shadersepsilon5:czm_epsilon5,_shadersepsilon6:czm_epsilon6,_shadersepsilon7:czm_epsilon7,_shadersequalsEpsilon:czm_equalsEpsilon,_shaderseyeOffset:czm_eyeOffset,_shaderseyeToWindowCoordinates:czm_eyeToWindowCoordinates,_shadersfastApproximateAtan:czm_fastApproximateAtan,_shadersfog:czm_fog,_shadersgammaCorrect:czm_gammaCorrect,_shadersgeodeticSurfaceNormal:czm_geodeticSurfaceNormal,_shadersgetDefaultMaterial:czm_getDefaultMaterial,_shadersgetDynamicAtmosphereLightDirection:czm_getDynamicAtmosphereLightDirection,_shadersgetLambertDiffuse:czm_getLambertDiffuse,_shadersgetSpecular:czm_getSpecular,_shadersgetWaterNoise:czm_getWaterNoise,_shadershue:czm_hue,_shadersinfinity:czm_infinity,_shadersinverseGamma:czm_inverseGamma,_shadersisEmpty:czm_isEmpty,_shadersisFull:czm_isFull,_shaderslatitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction,_shaderslineDistance:czm_lineDistance,_shaderslinearToSrgb:czm_linearToSrgb,_shadersluminance:czm_luminance,_shadersmaterial:czm_material,_shadersmaterialInput:czm_materialInput,_shadersmaximumComponent:czm_maximumComponent,_shadersmetersPerPixel:czm_metersPerPixel,_shadersmodelMaterial:czm_modelMaterial,_shadersmodelToWindowCoordinates:czm_modelToWindowCoordinates,_shadersmodelVertexOutput:czm_modelVertexOutput,_shadersmultiplyWithColorBalance:czm_multiplyWithColorBalance,_shadersnearFarScalar:czm_nearFarScalar,_shadersoctDecode:czm_octDecode,_shadersoneOverPi:czm_oneOverPi,_shadersoneOverTwoPi:czm_oneOverTwoPi,_shaderspackDepth:czm_packDepth,_shaderspassCesium3DTile:czm_passCesium3DTile,_shaderspassCesium3DTileClassification:czm_passCesium3DTileClassification,_shaderspassCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow,_shaderspassClassification:czm_passClassification,_shaderspassCompute:czm_passCompute,_shaderspassEnvironment:czm_passEnvironment,_shaderspassGaussianSplats:czm_passGaussianSplats,_shaderspassGlobe:czm_passGlobe,_shaderspassOpaque:czm_passOpaque,_shaderspassOverlay:czm_passOverlay,_shaderspassTerrainClassification:czm_passTerrainClassification,_shaderspassTranslucent:czm_passTranslucent,_shaderspassVoxels:czm_passVoxels,_shaderspbrLighting:czm_pbrLighting,_shaderspbrNeutralTonemapping:czm_pbrNeutralTonemapping,_shadersphong:czm_phong,_shaderspi:czm_pi,_shaderspiOverFour:czm_piOverFour,_shaderspiOverSix:czm_piOverSix,_shaderspiOverThree:czm_piOverThree,_shaderspiOverTwo:czm_piOverTwo,_shadersplaneDistance:czm_planeDistance,_shaderspointAlongRay:czm_pointAlongRay,_shadersradiansPerDegree:czm_radiansPerDegree,_shadersray:czm_ray,_shadersrayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval,_shadersraySegment:czm_raySegment,_shadersraySphereIntersectionInterval:czm_raySphereIntersectionInterval,_shadersreadDepth:czm_readDepth,_shadersreadNonPerspective:czm_readNonPerspective,_shadersreverseLogDepth:czm_reverseLogDepth,_shadersround:czm_round,_shaderssaturation:czm_saturation,_shaderssceneMode2D:czm_sceneMode2D,_shaderssceneMode3D:czm_sceneMode3D,_shaderssceneModeColumbusView:czm_sceneModeColumbusView,_shaderssceneModeMorphing:czm_sceneModeMorphing,_shadersshadowDepthCompare:czm_shadowDepthCompare,_shadersshadowParameters:czm_shadowParameters,_shadersshadowVisibility:czm_shadowVisibility,_shaderssignNotZero:czm_signNotZero,_shaderssolarRadius:czm_solarRadius,_shaderssphericalHarmonics:czm_sphericalHarmonics,_shaderssrgbToLinear:czm_srgbToLinear,_shaderstangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix,_shaderstextureCube:czm_textureCube,_shadersthreePiOver2:czm_threePiOver2,_shaderstransformPlane:czm_transformPlane,_shaderstranslateRelativeToEye:czm_translateRelativeToEye,_shaderstranslucentPhong:czm_translucentPhong,_shaderstranspose:czm_transpose,_shaderstwoPi:czm_twoPi,_shadersunpackClippingExtents:czm_unpackClippingExtents,_shadersunpackDepth:czm_unpackDepth,_shadersunpackFloat:czm_unpackFloat,_shadersunpackUint:czm_unpackUint,_shadersvalueTransform:czm_valueTransform,_shadersvertexLogDepth:czm_vertexLogDepth,_shaderswebMercatorMaxLatitude:czm_webMercatorMaxLatitude,_shaderswindowToEyeCoordinates:czm_windowToEyeCoordinates,_shaderswriteDepthClamp:czm_writeDepthClamp,_shaderswriteLogDepth:czm_writeLogDepth,_shaderswriteNonPerspective:czm_writeNonPerspective,addAllToArray:addAllToArray,addBuffer:addBuffer,addDefaults:addDefaults,addExtensionsRequired:addExtensionsRequired,addExtensionsUsed:addExtensionsUsed,addPipelineExtras:addPipelineExtras,addToArray:addToArray,appendForwardSlash:appendForwardSlash,arrayRemoveDuplicates:arrayRemoveDuplicates,barycentricCoordinates:barycentricCoordinates,binarySearch:binarySearch,buildModuleUrl:buildModuleUrl,buildVoxelDrawCommands:buildVoxelDrawCommands,clone:clone$1,combine:combine$2,computeFlyToLocationForRectangle:computeFlyToLocationForRectangle,createBillboardPointCallback:createBillboardPointCallback,createCommand:createCommand,createDefaultImageryProviderViewModels:createDefaultImageryProviderViewModels,createDefaultTerrainProviderViewModels:createDefaultTerrainProviderViewModels,createElevationBandMaterial:createElevationBandMaterial,createGooglePhotorealistic3DTileset:createGooglePhotorealistic3DTileset,createGuid:createGuid,createMaterialPropertyDescriptor:createMaterialPropertyDescriptor,createOsmBuildingsAsync:createOsmBuildingsAsync,createPropertyDescriptor:createPropertyDescriptor,createRawPropertyDescriptor:createRawPropertyDescriptor,createTangentSpaceDebugPrimitive:createTangentSpaceDebugPrimitive,createTaskProcessorWorker:createTaskProcessorWorker,createUniform:createUniform$1,createUniformArray:createUniformArray,createWorldBathymetryAsync:createWorldBathymetryAsync,createWorldImageryAsync:createWorldImageryAsync,createWorldTerrainAsync:createWorldTerrainAsync,decodeGoogleEarthEnterpriseData:decodeGoogleEarthEnterpriseData,decodeVectorPolylinePositions:decodeVectorPolylinePositions,defer:defer,defined:defined$1,demodernizeShader:demodernizeShader,deprecationWarning:deprecationWarning,destroyObject:destroyObject$1,exportKml:exportKml,findAccessorMinMax:findAccessorMinMax,findContentMetadata:findContentMetadata,findGroupMetadata:findGroupMetadata,findTileMetadata:findTileMetadata,forEachTextureInMaterial:forEachTextureInMaterial,formatError:formatError,freezeRenderState:freezeRenderState,getAbsoluteUri:getAbsoluteUri,getAccessorByteStride:getAccessorByteStride,getBaseUri:getBaseUri,getBinaryAccessor:getBinaryAccessor,getClipAndStyleCode:getClipAndStyleCode,getClippingFunction:getClippingFunction,getComponentReader:getComponentReader,getElement:getElement,getExtensionFromUri:getExtensionFromUri,getFilenameFromUri:getFilenameFromUri,getImageFromTypedArray:getImageFromTypedArray,getImagePixels:getImagePixels,getJsonFromTypedArray:getJsonFromTypedArray,getMagic:getMagic,getMeshPrimitives:getMeshPrimitives,getMetadataClassProperty:getMetadataClassProperty,getMetadataProperty:getMetadataProperty,getStringFromTypedArray:getStringFromTypedArray,getTimestamp:getTimestamp,hasExtension:hasExtension,heightReferenceOnEntityPropertyChanged:heightReferenceOnEntityPropertyChanged,isBitSet:isBitSet,isBlobUri:isBlobUri,isCrossOriginUrl:isCrossOriginUrl,isDataUri:isDataUri,isLeapYear:isLeapYear,knockout:knockout,knockout_3_5_1:knockout,knockout_es5:knockout_es5,loadAndExecuteScript:loadAndExecuteScript,loadCubeMap:loadCubeMap$1,loadImageFromTypedArray:loadImageFromTypedArray,loadKTX2:loadKTX2,mergeSort:mergeSort,moveTechniqueRenderStates:moveTechniqueRenderStates,moveTechniquesToExtension:moveTechniquesToExtension,numberOfComponentsForType:numberOfComponentsForType,objectToQuery:objectToQuery,oneTimeWarning:oneTimeWarning,parseBatchTable:parseBatchTable,parseFeatureMetadataLegacy:parseFeatureMetadataLegacy,parseGlb:parseGlb,parseResponseHeaders:parseResponseHeaders,parseStructuralMetadata:parseStructuralMetadata,pickModel:pickModel,pointInsideTriangle:pointInsideTriangle,preprocess3DTileContent:preprocess3DTileContent,processVoxelProperties:processVoxelProperties,queryToObject:queryToObject,readAccessorPacked:readAccessorPacked,removeExtension:removeExtension,removeExtensionsRequired:removeExtensionsRequired,removeExtensionsUsed:removeExtensionsUsed,removePipelineExtras:removePipelineExtras,removeUnusedElements:removeUnusedElements,resizeImageToNextPowerOfTwo:resizeImageToNextPowerOfTwo,sampleTerrain:sampleTerrain,sampleTerrainMostDetailed:sampleTerrainMostDetailed,scaleToGeodeticSurface:scaleToGeodeticSurface,srgbToLinear:srgbToLinear$1,subdivideArray:subdivideArray,subscribeAndEvaluate:subscribeAndEvaluate,updateAccessorComponentTypes:updateAccessorComponentTypes,updateVersion:updateVersion,usesExtension:usesExtension,viewerCesium3DTilesInspectorMixin:viewerCesium3DTilesInspectorMixin,viewerCesiumInspectorMixin:viewerCesiumInspectorMixin,viewerDragDropMixin:viewerDragDropMixin,viewerPerformanceWatchdogMixin:viewerPerformanceWatchdogMixin,viewerVoxelInspectorMixin:viewerVoxelInspectorMixin,webGLConstantToGlslType:webGLConstantToGlslType,wrapFunction:wrapFunction,writeTextToCanvas:writeTextToCanvas});let autoFitScale=1;const initCesium=(e,t)=>{t||(t={token:""}),t.token&&(Ion.defaultAccessToken=t.token),Camera.DEFAULT_VIEW_RECTANGLE=Rectangle.fromDegrees(90,-20,110,90);const i=new Viewer(e,{...DefaultViewerOptions,...t});return i.imageryLayers.remove(i.imageryLayers.get(0)),i._cesiumWidget._creditContainer.style.display="none",i.scene.postProcessStages.fxaa.enabled=!0,i.scene.msaaSamples=8,i.scene.globe.baseColor=Color.fromCssColorString("rgba(0,0,255,0.5)"),i.scene.globe.depthTestAgainstTerrain=!0,i.scene.globe.showGroundAtmosphere=!0,i.scene.globe.enableLighting=!1,i.scene.screenSpaceCameraController.maximumTiltAngle=Math.PI/2,console.log("%c%s","color: GREEN; font-size: 20px",`Cesium ${VERSION}`),i},setGlobeEnabled=(e,t)=>{const i=t?1:0;e.scene.skyBox.show=t,e.scene.skyAtmosphere.show=t,e.scene.globe.dynamicAtmosphereLighting=t,e.scene.globe.dynamicAtmosphereLightingFromSun=t,e.scene.globe.translucency.backFaceAlpha=i,e.scene.globe.baseColor=Color.fromCssColorString(`rgba(121, 121, 255,${i})`),e.scene.globe.showGroundAtmosphere=t,t?(e.scene.backgroundColor=Color.fromCssColorString(`rgba(255,255,255,${i})`),e.scene.globe.material=void 0,e.scene.globe.translucency.enabled=!1):(e.scene.globe.translucency.enabled=!1,e.scene.globe.undergroundColor=Color.fromCssColorString(`rgba(0, 0, 0,${i})`),e.scene.backgroundColor=Color.fromCssColorString(`rgba(0,0,0,${i})`),e.scene.globe.material=new Material$4({fabric:{type:"Color",uniforms:{color:Color.fromCssColorString(`rgba(0, 0, 0,${i})`)}}}))},setGlobeOpatity=(e,t)=>{t.scene.globe.translucency.enabled=!0,t.scene.globe.translucency.frontFaceAlpha=e,t.scene.globe.translucency.backFaceAlpha=e},setCesiumForAutoFitScale=e=>{autoFitScale=e},getCesiumForAutoFitScale=()=>autoFitScale,DefaultViewerOptions={animation:!1,baseLayerPicker:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!0,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,scene3DOnly:!0,navigation:!1,navigationInstructionsInitiallyVisible:!1,showRenderLoopErrors:!0,orderIndependentTranslucency:!1,contextOptions:{webgl:{alpha:!0}}},makePositionsForClockwise=e=>{let t=0;for(let i=0;i<e.length;i++){const n=e[i],r=e[(i+1)%e.length];t+=Cartesian3$1.cross(n,r,new Cartesian3$1).z}return t>0?e.reverse():e},makePositionsForAntiClockwise=e=>{let t=0;for(let i=0;i<e.length;i++){const n=e[i],r=e[(i+1)%e.length];t+=Cartesian3$1.cross(n,r,new Cartesian3$1).z}return t<0?e.reverse():e},makePositionsToLnglats=e=>e.map(e=>makePositiontoLnglat(e)),makePositiontoLnglat=e=>{const t=Cartographic.fromCartesian(e);return{longitude:CesiumMath.toDegrees(t.longitude),latitude:CesiumMath.toDegrees(t.latitude),height:t.height}},makeLnglatsToPositions=e=>e.map(e=>Cartesian3$1.fromDegrees(e.longitude,e.latitude,e.height)),makeLnglatToPosition=e=>Cartesian3$1.fromDegrees(e.longitude,e.latitude,e.height),makePositionsClose=e=>{const t=e[0],i=e[e.length-1];return t.x===i.x&&t.y===i.y&&t.z===i.z?e:[...e,e[0]]},makeLnglatsToPointGeojson=e=>{const t=[];return e.forEach(e=>{t.push({type:"Feature",geometry:{type:"Point",coordinates:[e.longitude,e.latitude]},properties:{height:e.height}})}),{type:"FeatureCollection",features:t}},makeLnglatsToLineGeojson=e=>{const t=[];return e.forEach((i,n)=>{0!==n&&t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[e[n-1].longitude,e[n-1].latitude],[i.longitude,i.latitude]]},properties:{height:i.height}})}),{type:"FeatureCollection",features:t}},makeLnglatsToPolygonGeojson=e=>{const t=[];return t.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e.map(e=>[e.longitude,e.latitude])]},properties:{heights:e.map(e=>e.height)}}),{type:"FeatureCollection",features:t}},makeYawPitchRollToHeadingPitchRoll=e=>({heading:CesiumMath.toRadians(e.yaw+(e.offsetYaw||0)),pitch:CesiumMath.toRadians(e.pitch),roll:CesiumMath.toRadians(e.roll)}),setViewToLnglat=e=>{const{lng:t,lat:i,height:n,viewer:r}=e;r.scene.camera.setView({destination:Cartesian3$1.fromDegrees(t,i,n||1e4)})},flyToLnglat=e=>{const{lng:t,lat:i,height:n,viewer:r}=e;r.scene.camera.flyTo({destination:Cartesian3$1.fromDegrees(t,i,n||1e4)})},flyToPosition=e=>{const{position:t,viewer:i}=e;i.scene.camera.flyTo({destination:t})};function getCameraView(e){const t=e.camera.heading,i=e.camera.pitch,n=e.camera.roll;return{destination:new Cartesian3$1(e.camera.position.x,e.camera.position.y,e.camera.position.z),orientation:{heading:t,pitch:i,roll:n}}}function flyToCameraView(e,t){e&&t.scene.camera.flyTo({...e})}function flyToDataSource(e,t){const i=t.dataSources.getByName(e);i.length>0&&t.flyTo(i[0])}function flyToImagery(e,t){e&&t.flyTo(e)}function flyToCesium3DTile(e,t){t.flyTo(e)}function flyToFromSphere(e,t){const i=new BoundingSphere(new Cartesian3$1(e[0],e[1],e[2]),e[3]);t.camera.flyToBoundingSphere(i,{offset:new HeadingPitchRange(3.5,-.5,200),duration:2})}const flyToRectangleBounds=(e,t,i,n,r)=>{if(i<=e||n<=t)return void console.error("无效的边界坐标:东必须大于西,北必须大于南");const o={destination:Rectangle.fromDegrees(e,t,i,n),duration:3,orientation:{heading:CesiumMath.toRadians(0),pitch:CesiumMath.toRadians(-90),roll:0}};r.camera.flyTo(o)},flyToNorth=e=>{e.camera.flyTo({destination:e.scene.camera.position,orientation:{heading:CesiumMath.toRadians(0),pitch:CesiumMath.toRadians(-90),roll:0},duration:1.5})};function getScreenCenterPoint(e){const t=e.scene.canvas,i=t.clientWidth/2,n=t.clientHeight/2;return e.scene.pickPosition(new Cartesian2(i,n))}const flyByRotatePoint=e=>{let t=!1;let i;const n=e.camera;let r=n.pitch,o=0,a=!1;function s(){if(!t||!i)return;let c=n.heading;a?c+=.005:c-=.005,e.camera.setView({destination:i,orientation:{heading:c,pitch:r}}),e.camera.moveBackward(o),requestAnimationFrame(s)}return{start:(c,l)=>{i=c||getScreenCenterPoint(e),r=n.pitch,a=!!l,o=Cartesian3$1.distance(n.position,i),t=!0,s(),e.scene.screenSpaceCameraController.enableInputs=!1},end:()=>{t=!1,e.scene.screenSpaceCameraController.enableInputs=!0}}},flyByRotateOut=e=>{let t=!1;let i=!1;function n(){if(!t)return;let r=e.camera.heading;i?r+=.001:r-=.001,e.camera.setView({orientation:{heading:r,pitch:e.camera.pitch}}),requestAnimationFrame(n)}t=!0;return{start:e=>{t=!0,i=!!e,n()},end:()=>{t=!1}}};function twinkleModel(e){e.show=!1,setTimeout(()=>{e.show=!0,setTimeout(()=>{e.show=!1,setTimeout(()=>{e.show=!0},300)},300)},300)}const setCameraAutoBackTiltToZero=(e,t)=>{console.log("sdfjdsklf"),t||(t=1e5);let i=!1;e.camera.moveEnd.addEventListener(function(){if(i)return;const n=e.camera,r=e.camera.positionCartographic.height;console.log("cameraEnd",r);const o=n.heading,a=n.roll;if(r>t){i=!0;const t=e.camera.computeViewRectangle();if(!t)return void(i=!0);const n={longitude:0,latitude:0},s=Rectangle.center(t);n.longitude=CesiumMath.toDegrees(s.longitude),n.latitude=CesiumMath.toDegrees(s.latitude),e.camera.flyTo({destination:makeLnglatToPosition(new Cartographic(n.longitude,n.latitude,r)),orientation:{heading:o,pitch:-1.5,roll:a},duration:1,complete:()=>{}})}else i=!1,e.scene.screenSpaceCameraController.maximumTiltAngle=Math.PI/2})},initCesiumEvent=(e,t)=>{const i=e.scene,n=new ScreenSpaceEventHandler(i.canvas);n.setInputAction(n=>{if(t.LEFT_POSITION){const r=i.pickPosition(n.position);leftPositionListener(n.position,r,t.LEFT_POSITION,e)}t.PICK_FEATURE&&pickFeaturesListener(e,n.position,t.PICK_FEATURE),e._element.style.cursor="default"},ScreenSpaceEventType$1.LEFT_CLICK),n.setInputAction(n=>{if(t.MOVE_POSITION){const r=i.pickPosition(n.endPosition);leftPositionListener(n.endPosition,r,t.MOVE_POSITION,e)}t.MOVE_PICK_FEATURE&&pickFeaturesListener(e,n.endPosition,t.MOVE_PICK_FEATURE)},ScreenSpaceEventType$1.MOUSE_MOVE)},pickFeaturesListener=(e,t,i)=>{const n=e.scene.pickPosition(t),r=e.scene.pick(t),o={};if(r){if(e._element.style.cursor="pointer",r instanceof Cesium3DTileFeature){r.getPropertyIds().forEach(e=>{o[e]=r.getProperty(e)})}else r.id instanceof Cesium3DTileContent?(e._element.style.cursor="pointer",Object.assign(o,{name:"sdfjldks"})):r.id instanceof Entity?e._element.style.cursor="pointer":r.primitive&&Object.assign(o,r.primitive.properties);i({position:n,...r},o)}else i(void 0,{})},leftPositionListener=(e,t,i,n)=>{t||(t=Cartesian3$1.fromDegrees(0,0,0));const r=Cartographic.fromCartesian(t);i({windowPosition:e,position:t,lnglat:{lng:CesiumMath.toDegrees(r.longitude),lat:CesiumMath.toDegrees(r.latitude),height:r.height},cameraView:getCameraView(n)})},numberId=()=>`${Date.now()}${Math.round(9999999999*Math.random()+1)}`,getInoCesiumBaseUrl=()=>window.INO_CESIUM_BASE_URL,delayTime=e=>new Promise(t=>setTimeout(t,e));class Tooltip{static tooltip;_title;_div;_message;constructor(e){const t=document.createElement("DIV");t.id="tooltip",t.className="twipsy right";const i=document.createElement("DIV");i.className="twipsy-inner",t.appendChild(i),this._div=t,this._title=i,this._message="";const n=e._element.getElementsByClassName("cesium-widget")[0];if(!n)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");n.appendChild(t),t.onmousemove=e=>{this.showAt({x:e.clientX,y:e.clientY},this._message)}}showAt(e,t){e&&t&&(this.setVisible(!0),this._title.innerHTML=t,this._div.style.left=`${e.x+10}px`,this._div.style.top=e.y-this._div.clientHeight/2+"px",this._message=t)}setVisible(e){this._div.style.display=e?"block":"none"}static createToolTip(e){return Tooltip.tooltip||(Tooltip.tooltip=new Tooltip(e)),Tooltip.tooltip}destroy(){Tooltip.tooltip&&(this._div&&this._div.parentNode.removeChild(this._div),Tooltip.tooltip=null)}}class Popup{static popup;_div;viewer;offset=new Cartesian2(140,150);position=Cartesian3$1.ZERO;constructor(e,t,i){this.viewer=e,i&&(this.offset=i),this._div=t,this._div.style.position="absolute",this._div.style.left="0",this._div.style.top="0",this._div.style.display="none";const n=e._element.getElementsByClassName("cesium-widget")[0];if(!n)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");n.appendChild(t),this.renderPosition()}showAt(e){this.position=e,e&&this.setVisible(!0)}setVisible(e){this._div.style.display=e?"block":"none"}renderPosition(){this.viewer.scene.postRender.addEventListener(()=>{if(!this.position.equals(Cartesian3$1.ZERO)){const e=this.viewer.scene.cartesianToCanvasCoordinates(this.position);this._div.style.left=e.x-this.offset.x+"px",this._div.style.top=e.y-this.offset.y+"px"}})}static createPupup(e,t,i){return Popup.popup||(Popup.popup=new Popup(e,t,i)),Popup.popup}destroy(){Popup.popup&&(this._div&&this._div.parentNode.removeChild(this._div),Popup.popup=null)}}const randomPointToGeoJson=(e,t=[-180,180],i=[-90,90])=>{const n=[];for(let r=0;r<e;r++){const e=randomInRange(t),r=randomInRange(i);n.push({type:"Feature",geometry:{type:"Point",coordinates:[e,r]},properties:{}})}return{type:"FeatureCollection",features:n}};function randomInRange(e){const[t,i]=e;return Math.random()*(i-t)+t}function randomColor(){return`rgba(${Math.round(255*Math.random())},${Math.round(255*Math.random())},${Math.round(255*Math.random())},${Math.random()})`}const randomPolylineToGeoJson=(e,t=[-180,180],i=[-90,90])=>{const n=[];for(let r=0;r<e;r++){const e=Math.floor(randomInRange([3,10])),r=[];for(let n=0;n<e;n++){const e=randomInRange(t),n=randomInRange(i);r.push([e,n])}n.push({type:"Feature",geometry:{type:"LineString",coordinates:r},properties:{}})}return{type:"FeatureCollection",features:n}},randomPolygonToGeoJson=(e,t=[-180,180],i=[-90,90])=>{const n=[];for(let r=0;r<e;r++){const e=createRandomPolygon(t,i);n.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e]}})}return{type:"FeatureCollection",features:n}};function createRandomPolygon(e,t){const i=Math.floor(randomInRange([3,10])),n=randomInRange(e),r=randomInRange(t),o=randomInRange([1,5]),a=[];for(let e=0;e<i;e++){const t=e/i*2*Math.PI,s=randomInRange([.8*o,o]),c=n+s*Math.cos(t),l=r+s*Math.sin(t);a.push([c,l])}return a.push(a[0]),a}const createEagleEye=(e,t)=>{let i=!1;const n=new Viewer(e,{...DefaultViewerOptions,scene3DOnly:!1});n.scene.mode=2;const r=n.scene.screenSpaceCameraController;r.enableRotate=!1,r.enableTranslate=!1,r.enableZoom=!1,r.enableTilt=!1,r.enableLook=!1,t.entities.add({position:Cartesian3$1.fromDegrees(0,0),label:{text:new CallbackProperty(()=>(o(),""),!0)}});const o=function(){i||n.camera.flyTo({destination:t.camera.position,orientation:{heading:t.camera.heading,pitch:t.camera.pitch,roll:t.camera.roll},duration:0})};return{viewer:n,open:()=>{i=!1},close:()=>{i=!0}}},createRollerShutterHandler=e=>{const t=[],i=t=>{e.scene.splitPosition=t},n=(e,i)=>{t.push(e),e.splitDirection=i};return{set:()=>{i(.5),function(){let t=document.getElementById("vertical-slider");if(t)return void(t.style.display="block");t=document.createElement("div"),t.id="vertical-slider";const i=e._element.getElementsByClassName("cesium-widget")[0];if(!i)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");i.appendChild(t)}(),function(){const t=document.getElementById("vertical-slider");function i(){document.removeEventListener("mousemove",r,!1)}function n(){document.addEventListener("mousemove",r,!1)}function r(i){i.preventDefault?i.preventDefault():i.returnValue=!1,t.style.left=`${i.clientX}px`;const n=i.clientX/t.parentElement.offsetWidth;e.scene.splitPosition=n}t.addEventListener("mousedown",n,!1),document.addEventListener("mouseup",i,!1)}()},remove:()=>{t.forEach(e=>{n(e,SplitDirection$1.NONE)});document.getElementById("vertical-slider").style.display="none"},setSplitPosition:i,setSplitDirection:n}},createSplitScreenHandler=e=>{const t=e;let i;const n={},r=()=>{const e=t.container;e.style.display="flex";e.getElementsByClassName("cesium-viewer")[0].style.width="50%";const r=document.createElement("div");r.style={width:"50%",height:"100%"},r.id="right-screen-viewer",e.appendChild(r),i=initCesium(r.id),n[1]=i,a(),t.camera.changed.addEventListener(()=>o(t,i)),t.scene.preRender.addEventListener(()=>o(t,i)),t.camera.percentageChanged=.01,i.camera.changed.addEventListener(()=>o(i,t)),i.scene.preRender.addEventListener(()=>o(i,t)),i.camera.percentageChanged=.01,i._splitNumber=1};function o(e,t){const i=Cartographic.toCartesian(e.camera.positionCartographic);t.camera.setView({destination:new Cartesian3$1(i.x,i.y,i.z),orientation:{direction:e.scene.camera._direction,up:e.scene.camera.up,heading:e.scene.camera.heading,pitch:e.scene.camera.pitch,roll:e.scene.camera.roll}})}const a=()=>{t.imageryLayers._layers.forEach(e=>{e.splitScreenBaseLayer&&i.imageryLayers.addImageryProvider(e.imageryProvider)})};return{set:()=>{r(),function(){let t=document.getElementById("split-screen-slider");if(t)return void(t.style.display="block");t=document.createElement("div"),t.id="split-screen-slider";const i=e._element.getElementsByClassName("cesium-widget")[0];if(!i)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");i.appendChild(t)}(),t._splitNumber=-1,n[-1]=t},viewerMap:n,getViewerFromKey:e=>n[e],remove:()=>{document.getElementById("split-screen-slider").style.display="none";t.container.getElementsByClassName("cesium-viewer")[0].style.width="100%",i.container.remove(),delete n[1]},setLayer:(e,t)=>{},updateBaseLayers:a}};var earthRadius=6371008.8,factors={centimeters:100*earthRadius,centimetres:100*earthRadius,degrees:360/(2*Math.PI),feet:3.28084*earthRadius,inches:39.37*earthRadius,kilometers:earthRadius/1e3,kilometres:earthRadius/1e3,meters:earthRadius,metres:earthRadius,miles:earthRadius/1609.344,millimeters:1e3*earthRadius,millimetres:1e3*earthRadius,nauticalmiles:earthRadius/1852,radians:1,yards:1.0936*earthRadius};function feature(e,t,i={}){const n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=t||{},n.geometry=e,n}function point(e,t,i={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!isNumber(e[0])||!isNumber(e[1]))throw new Error("coordinates must contain numbers");return feature({type:"Point",coordinates:e},t,i)}function polygon(e,t,i={}){for(const t of e){if(t.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(t[t.length-1].length!==t[0].length)throw new Error("First and last Position are not equivalent.");for(let e=0;e<t[t.length-1].length;e++)if(t[t.length-1][e]!==t[0][e])throw new Error("First and last Position are not equivalent.")}return feature({type:"Polygon",coordinates:e},t,i)}function lineString(e,t,i={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return feature({type:"LineString",coordinates:e},t,i)}function featureCollection(e,t={}){const i={type:"FeatureCollection"};return t.id&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.features=e,i}function multiPoint(e,t,i={}){return feature({type:"MultiPoint",coordinates:e},t,i)}function radiansToLength(e,t="kilometers"){const i=factors[t];if(!i)throw new Error(t+" units is invalid");return e*i}function lengthToRadians(e,t="kilometers"){const i=factors[t];if(!i)throw new Error(t+" units is invalid");return e/i}function radiansToDegrees(e){return 180*(e%(2*Math.PI))/Math.PI}function degreesToRadians(e){return e%360*Math.PI/180}function isNumber(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function getCoord(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return[...e.geometry.coordinates];if("Point"===e.type)return[...e.coordinates]}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return[...e];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function getCoords(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function getGeom(e){return"Feature"===e.type?e.geometry:e}function bearing(e,t,i={}){if(!0===i.final)return calculateFinalBearing(e,t);const n=getCoord(e),r=getCoord(t),o=degreesToRadians(n[0]),a=degreesToRadians(r[0]),s=degreesToRadians(n[1]),c=degreesToRadians(r[1]),l=Math.sin(a-o)*Math.cos(c),d=Math.cos(s)*Math.sin(c)-Math.sin(s)*Math.cos(c)*Math.cos(a-o);return radiansToDegrees(Math.atan2(l,d))}function calculateFinalBearing(e,t){let i=bearing(t,e);return i=(i+180)%360,i}function destination(e,t,i,n={}){const r=getCoord(e),o=degreesToRadians(r[0]),a=degreesToRadians(r[1]),s=degreesToRadians(i),c=lengthToRadians(t,n.units),l=Math.asin(Math.sin(a)*Math.cos(c)+Math.cos(a)*Math.sin(c)*Math.cos(s));return point([radiansToDegrees(o+Math.atan2(Math.sin(s)*Math.sin(c)*Math.cos(a),Math.cos(c)-Math.sin(a)*Math.sin(l))),radiansToDegrees(l)],n.properties)}function distance(e,t,i={}){var n=getCoord(e),r=getCoord(t),o=degreesToRadians(r[1]-n[1]),a=degreesToRadians(r[0]-n[0]),s=degreesToRadians(n[1]),c=degreesToRadians(r[1]),l=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(c);return radiansToLength(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),i.units)}function coordEach(e,t,i){if(null!==e)for(var n,r,o,a,s,c,l,d,u=0,h=0,p=e.type,A="FeatureCollection"===p,m="Feature"===p,f=A?e.features.length:1,g=0;g<f;g++){s=(d=!!(l=A?e.features[g].geometry:m?e.geometry:e)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var C=0;C<s;C++){var y=0,_=0;if(null!==(a=d?l.geometries[C]:l)){c=a.coordinates;var E=a.type;switch(u=!i||"Polygon"!==E&&"MultiPolygon"!==E?0:1,E){case null:break;case"Point":if(!1===t(c,h,g,y,_))return!1;h++,y++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(!1===t(c[n],h,g,y,_))return!1;h++,"MultiPoint"===E&&y++}"LineString"===E&&y++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(r=0;r<c[n].length-u;r++){if(!1===t(c[n][r],h,g,y,_))return!1;h++}"MultiLineString"===E&&y++,"Polygon"===E&&_++}"Polygon"===E&&y++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(_=0,r=0;r<c[n].length;r++){for(o=0;o<c[n][r].length-u;o++){if(!1===t(c[n][r][o],h,g,y,_))return!1;h++}_++}y++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===coordEach(a.geometries[n],t,i))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function featureEach(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var i=0;i<e.features.length&&!1!==t(e.features[i],i);i++);}function geomEach(e,t){var i,n,r,o,a,s,c,l,d,u,h=0,p="FeatureCollection"===e.type,A="Feature"===e.type,m=p?e.features.length:1;for(i=0;i<m;i++){for(s=p?e.features[i].geometry:A?e.geometry:e,l=p?e.features[i].properties:A?e.properties:{},d=p?e.features[i].bbox:A?e.bbox:void 0,u=p?e.features[i].id:A?e.id:void 0,a=(c=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,r=0;r<a;r++)if(null!==(o=c?s.geometries[r]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,l,d,u))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,l,d,u))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,l,d,u))return!1;h++}}function geomReduce(e,t,i){var n=i;return geomEach(e,function(e,r,o,a,s){n=0===r&&void 0===i?e:t(n,e,r,o,a,s)}),n}function area(e){return geomReduce(e,(e,t)=>e+calculateArea(t),0)}function calculateArea(e){let t,i=0;switch(e.type){case"Polygon":return polygonArea(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)i+=polygonArea(e.coordinates[t]);return i;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function polygonArea(e){let t=0;if(e&&e.length>0){t+=Math.abs(ringArea(e[0]));for(let i=1;i<e.length;i++)t-=Math.abs(ringArea(e[i]))}return t}var FACTOR=earthRadius*earthRadius/2,PI_OVER_180=Math.PI/180;function ringArea(e){const t=e.length-1;if(t<=2)return 0;let i=0,n=0;for(;n<t;){const r=e[n],o=e[n+1===t?0:n+1],a=e[n+2>=t?(n+2)%t:n+2],s=r[0]*PI_OVER_180,c=o[1]*PI_OVER_180;i+=(a[0]*PI_OVER_180-s)*Math.sin(c),n++}return i*FACTOR}function bbox(e,t={}){if(null!=e.bbox&&!0!==t.recompute)return e.bbox;const i=[1/0,1/0,-1/0,-1/0];return coordEach(e,e=>{i[0]>e[0]&&(i[0]=e[0]),i[1]>e[1]&&(i[1]=e[1]),i[2]<e[0]&&(i[2]=e[0]),i[3]<e[1]&&(i[3]=e[1])}),i}function bboxPolygon(e,t={}){const i=Number(e[0]),n=Number(e[1]),r=Number(e[2]),o=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");const a=[i,n];return polygon([[a,[r,n],[r,o],[i,o],a]],t.properties,{bbox:e,id:t.id})}const epsilon=11102230246251565e-32,splitter=134217729,resulterrbound=(3+8*epsilon)*epsilon;function sum(e,t,i,n,r){let o,a,s,c,l=t[0],d=n[0],u=0,h=0;d>l==d>-l?(o=l,l=t[++u]):(o=d,d=n[++h]);let p=0;if(u<e&&h<i)for(d>l==d>-l?(a=l+o,s=o-(a-l),l=t[++u]):(a=d+o,s=o-(a-d),d=n[++h]),o=a,0!==s&&(r[p++]=s);u<e&&h<i;)d>l==d>-l?(a=o+l,c=a-o,s=o-(a-c)+(l-c),l=t[++u]):(a=o+d,c=a-o,s=o-(a-c)+(d-c),d=n[++h]),o=a,0!==s&&(r[p++]=s);for(;u<e;)a=o+l,c=a-o,s=o-(a-c)+(l-c),l=t[++u],o=a,0!==s&&(r[p++]=s);for(;h<i;)a=o+d,c=a-o,s=o-(a-c)+(d-c),d=n[++h],o=a,0!==s&&(r[p++]=s);return 0===o&&0!==p||(r[p++]=o),p}function estimate(e,t){let i=t[0];for(let n=1;n<e;n++)i+=t[n];return i}function vec(e){return new Float64Array(e)}const ccwerrboundA=(3+16*epsilon)*epsilon,ccwerrboundB=(2+12*epsilon)*epsilon,ccwerrboundC=(9+64*epsilon)*epsilon*epsilon,B=vec(4),C1=vec(8),C2=vec(12),D=vec(16),u=vec(4);function orient2dadapt(e,t,i,n,r,o,a){let s,c,l,d,h,p,A,m,f,g,C,y,_,E,b,I,S,T;const v=e-r,x=i-r,w=t-o,P=n-o;E=v*P,p=splitter*v,A=p-(p-v),m=v-A,p=splitter*P,f=p-(p-P),g=P-f,b=m*g-(E-A*f-m*f-A*g),I=w*x,p=splitter*w,A=p-(p-w),m=w-A,p=splitter*x,f=p-(p-x),g=x-f,S=m*g-(I-A*f-m*f-A*g),C=b-S,h=b-C,B[0]=b-(C+h)+(h-S),y=E+C,h=y-E,_=E-(y-h)+(C-h),C=_-I,h=_-C,B[1]=_-(C+h)+(h-I),T=y+C,h=T-y,B[2]=y-(T-h)+(C-h),B[3]=T;let $=estimate(4,B),M=ccwerrboundB*a;if($>=M||-$>=M)return $;if(h=e-v,s=e-(v+h)+(h-r),h=i-x,l=i-(x+h)+(h-r),h=t-w,c=t-(w+h)+(h-o),h=n-P,d=n-(P+h)+(h-o),0===s&&0===c&&0===l&&0===d)return $;if(M=ccwerrboundC*a+resulterrbound*Math.abs($),$+=v*d+P*s-(w*l+x*c),$>=M||-$>=M)return $;E=s*P,p=splitter*s,A=p-(p-s),m=s-A,p=splitter*P,f=p-(p-P),g=P-f,b=m*g-(E-A*f-m*f-A*g),I=c*x,p=splitter*c,A=p-(p-c),m=c-A,p=splitter*x,f=p-(p-x),g=x-f,S=m*g-(I-A*f-m*f-A*g),C=b-S,h=b-C,u[0]=b-(C+h)+(h-S),y=E+C,h=y-E,_=E-(y-h)+(C-h),C=_-I,h=_-C,u[1]=_-(C+h)+(h-I),T=y+C,h=T-y,u[2]=y-(T-h)+(C-h),u[3]=T;const R=sum(4,B,4,u,C1);E=v*d,p=splitter*v,A=p-(p-v),m=v-A,p=splitter*d,f=p-(p-d),g=d-f,b=m*g-(E-A*f-m*f-A*g),I=w*l,p=splitter*w,A=p-(p-w),m=w-A,p=splitter*l,f=p-(p-l),g=l-f,S=m*g-(I-A*f-m*f-A*g),C=b-S,h=b-C,u[0]=b-(C+h)+(h-S),y=E+C,h=y-E,_=E-(y-h)+(C-h),C=_-I,h=_-C,u[1]=_-(C+h)+(h-I),T=y+C,h=T-y,u[2]=y-(T-h)+(C-h),u[3]=T;const O=sum(R,C1,4,u,C2);E=s*d,p=splitter*s,A=p-(p-s),m=s-A,p=splitter*d,f=p-(p-d),g=d-f,b=m*g-(E-A*f-m*f-A*g),I=c*l,p=splitter*c,A=p-(p-c),m=c-A,p=splitter*l,f=p-(p-l),g=l-f,S=m*g-(I-A*f-m*f-A*g),C=b-S,h=b-C,u[0]=b-(C+h)+(h-S),y=E+C,h=y-E,_=E-(y-h)+(C-h),C=_-I,h=_-C,u[1]=_-(C+h)+(h-I),T=y+C,h=T-y,u[2]=y-(T-h)+(C-h),u[3]=T;const F=sum(O,C2,4,u,D);return D[F-1]}function orient2d(e,t,i,n,r,o){const a=(t-o)*(i-r),s=(e-r)*(n-o),c=a-s,l=Math.abs(a+s);return Math.abs(c)>=ccwerrboundA*l?c:-orient2dadapt(e,t,i,n,r,o,l)}function pointInPolygon(e,t){var i,n,r,o,a,s,c,l,d,u=0,h=e[0],p=e[1],A=t.length;for(i=0;i<A;i++){n=0;var m=t[i],f=m.length-1;if((l=m[0])[0]!==m[f][0]&&l[1]!==m[f][1])throw new Error("First and last coordinates in a ring must be the same");for(o=l[0]-h,a=l[1]-p;n<f;n++){if(s=(d=m[n+1])[0]-h,c=d[1]-p,0===a&&0===c){if(s<=0&&o>=0||o<=0&&s>=0)return 0}else if(c>=0&&a<=0||c<=0&&a>=0){if(0===(r=orient2d(o,s,a,c,0,0)))return 0;(r>0&&c>0&&a<=0||r<0&&c<=0&&a>0)&&u++}l=d,a=c,o=s}}return u%2!=0}function booleanPointInPolygon(e,t,i={}){if(!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");const n=getCoord(e),r=getGeom(t),o=r.type,a=t.bbox;let s=r.coordinates;if(a&&!1===inBBox(n,a))return!1;"Polygon"===o&&(s=[s]);let c=!1;for(var l=0;l<s.length;++l){const e=pointInPolygon(n,s[l]);if(0===e)return!i.ignoreBoundary;e&&(c=!0)}return c}function inBBox(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}function booleanPointOnLine(e,t,i={}){const n=getCoord(e),r=getCoords(t);for(let e=0;e<r.length-1;e++){let t=!1;if(i.ignoreEndVertices&&(0===e&&(t="start"),e===r.length-2&&(t="end"),0===e&&e+1===r.length-1&&(t="both")),isPointOnLineSegment(r[e],r[e+1],n,t,void 0===i.epsilon?null:i.epsilon))return!0}return!1}function isPointOnLineSegment(e,t,i,n,r){const o=i[0],a=i[1],s=e[0],c=e[1],l=t[0],d=t[1],u=l-s,h=d-c,p=(i[0]-s)*h-(i[1]-c)*u;if(null!==r){if(Math.abs(p)>r)return!1}else if(0!==p)return!1;return Math.abs(u)===Math.abs(h)&&0===Math.abs(u)?!n&&(i[0]===e[0]&&i[1]===e[1]):n?"start"===n?Math.abs(u)>=Math.abs(h)?u>0?s<o&&o<=l:l<=o&&o<s:h>0?c<a&&a<=d:d<=a&&a<c:"end"===n?Math.abs(u)>=Math.abs(h)?u>0?s<=o&&o<l:l<o&&o<=s:h>0?c<=a&&a<d:d<a&&a<=c:"both"===n&&(Math.abs(u)>=Math.abs(h)?u>0?s<o&&o<l:l<o&&o<s:h>0?c<a&&a<d:d<a&&a<c):Math.abs(u)>=Math.abs(h)?u>0?s<=o&&o<=l:l<=o&&o<=s:h>0?c<=a&&a<=d:d<=a&&a<=c}function booleanWithin(e,t){var i=getGeom(e),n=getGeom(t),r=i.type,o=n.type;switch(r){case"Point":switch(o){case"MultiPoint":return isPointInMultiPoint(i,n);case"LineString":return booleanPointOnLine(i,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return booleanPointInPolygon(i,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"MultiPoint":return isMultiPointInMultiPoint(i,n);case"LineString":return isMultiPointOnLine(i,n);case"Polygon":case"MultiPolygon":return isMultiPointInPoly(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"LineString":return isLineOnLine(i,n);case"Polygon":case"MultiPolygon":return isLineInPoly(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Polygon":case"MultiPolygon":return isPolyInPoly(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+r+" geometry not supported")}}function isPointInMultiPoint(e,t){var i,n=!1;for(i=0;i<t.coordinates.length;i++)if(compareCoords(t.coordinates[i],e.coordinates)){n=!0;break}return n}function isMultiPointInMultiPoint(e,t){for(var i=0;i<e.coordinates.length;i++){for(var n=!1,r=0;r<t.coordinates.length;r++)compareCoords(e.coordinates[i],t.coordinates[r])&&(n=!0);if(!n)return!1}return!0}function isMultiPointOnLine(e,t){for(var i=!1,n=0;n<e.coordinates.length;n++){if(!booleanPointOnLine(e.coordinates[n],t))return!1;i||(i=booleanPointOnLine(e.coordinates[n],t,{ignoreEndVertices:!0}))}return i}function isMultiPointInPoly(e,t){for(var i=!0,n=!1,r=0;r<e.coordinates.length;r++){if(!(n=booleanPointInPolygon(e.coordinates[r],t))){i=!1;break}n=booleanPointInPolygon(e.coordinates[r],t,{ignoreBoundary:!0})}return i&&n}function isLineOnLine(e,t){for(var i=0;i<e.coordinates.length;i++)if(!booleanPointOnLine(e.coordinates[i],t))return!1;return!0}function isLineInPoly(e,t){if(!doBBoxOverlap(bbox(t),bbox(e)))return!1;for(var i=!1,n=0;n<e.coordinates.length;n++){if(!booleanPointInPolygon(e.coordinates[n],t))return!1;if(i||(i=booleanPointInPolygon(e.coordinates[n],t,{ignoreBoundary:!0})),!i&&n<e.coordinates.length-1)i=booleanPointInPolygon(getMidpoint(e.coordinates[n],e.coordinates[n+1]),t,{ignoreBoundary:!0})}return i}function isPolyInPoly(e,t){var i=bbox(e);if(!doBBoxOverlap(bbox(t),i))return!1;for(var n=0;n<e.coordinates[0].length;n++)if(!booleanPointInPolygon(e.coordinates[0][n],t))return!1;return!0}function doBBoxOverlap(e,t){return!(e[0]>t[0])&&(!(e[2]<t[2])&&(!(e[1]>t[1])&&!(e[3]<t[3])))}function compareCoords(e,t){return e[0]===t[0]&&e[1]===t[1]}function getMidpoint(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}function centroid(e,t={}){let i=0,n=0,r=0;return coordEach(e,function(e){i+=e[0],n+=e[1],r++},!0),point([i/r,n/r],t.properties)}function circle(e,t,i={}){const n=i.steps||64,r=i.properties?i.properties:!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{},o=[];for(let r=0;r<n;r++)o.push(destination(e,t,-360*r/n,i).geometry.coordinates);return o.push(o[0]),polygon([o],r)}function envelope(e){return bboxPolygon(bbox(e))}function pointGrid(e,t,i={}){i.mask&&!i.units&&(i.units="kilometers");for(var n=[],r=e[0],o=e[1],a=e[2],s=e[3],c=t/distance([r,o],[a,o],i)*(a-r),l=t/distance([r,o],[r,s],i)*(s-o),d=a-r,u=s-o,h=Math.floor(d/c),p=(u-Math.floor(u/l)*l)/2,A=r+(d-h*c)/2;A<=a;){for(var m=o+p;m<=s;){var f=point([A,m],i.properties);i.mask?booleanWithin(f,i.mask)&&n.push(f):n.push(f),m+=l}A+=c}return featureCollection(n)}function lineArc(e,t,i,n,r={}){const o=r.steps||64,a=convertAngleTo360(i),s=convertAngleTo360(n),c=Array.isArray(e)||"Feature"!==e.type?{}:e.properties;if(a===s)return lineString(circle(e,t,r).geometry.coordinates[0],c);const l=a,d=a<s?s:s+360;let u=l;const h=[];let p=0;const A=(d-l)/o;for(;u<=d;)h.push(destination(e,t,u,r).geometry.coordinates),p++,u=l+p*A;return lineString(h,c)}function convertAngleTo360(e){let t=e%360;return t<0&&(t+=360),t}function pointsWithinPolygon(e,t){const i=[];return featureEach(e,function(e){let n=!1;if("Point"===e.geometry.type)geomEach(t,function(t){booleanPointInPolygon(e,t)&&(n=!0)}),n&&i.push(e);else{if("MultiPoint"!==e.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var r=[];geomEach(t,function(t){coordEach(e,function(e){booleanPointInPolygon(e,t)&&(n=!0,r.push(e))})}),n&&i.push(multiPoint(r,e.properties))}}),featureCollection(i)}const calcSpaceDistance=(e,t)=>{const i=Cartographic.fromCartesian(e),n=Cartographic.fromCartesian(t),r=new EllipsoidGeodesic;r.setEndPoints(i,n);let o=r.surfaceDistance;return o=Math.sqrt(o**2+(n.height-i.height)**2),o};function calcSpaceDistances(e){let t=0;return e.forEach((i,n)=>{if(n===e.length-1)return;const r=calcSpaceDistance(i,e[n+1]);t+=r}),t}function calcGeodesicDistance(e,t,i){const{EllipsoidGeodesic:n,Ellipsoid:r}=Cesium;return new n((i=i||r.WGS84).cartesianToCartographic(e),i.cartesianToCartographic(t)).surfaceDistance}function calcGeodesicDistances(e){let t=0;return e.forEach((i,n)=>{if(n===e.length-1)return;const r=calcGeodesicDistance(i,e[n+1]);t+=r}),t}const calcPoistionCenter=e=>{if(e.length<4)return BoundingSphere.fromPoints(e).center;const t=polygon([e.map(e=>[e.x,e.y])]),i=BoundingSphere.fromPoints(e).center,n=centroid(t);return new Cartesian3$1(n.geometry.coordinates[0],n.geometry.coordinates[1],i.z)};function calcArea(e){let t=0;const{CoplanarPolygonGeometry:i,VertexFormat:n,defined:r,Cartesian3:o}=Cesium,a=i.createGeometry(i.fromPositions({positions:e,vertexFormat:n.POSITION_ONLY}));if(r(a)){const e=a.indices,i=a.attributes.position.values;for(let n=0;n<e.length;n+=3){const r=e[n],a=e[n+1],s=e[n+2];t+=calcTriangleArea(o.unpack(i,3*r,{}),o.unpack(i,3*a,{}),o.unpack(i,3*s,{}))}}return t}const calcTriangleArea=(e,t,i)=>{const{Cartesian3:n}=Cesium,r=n.subtract(e,t,{}),o=n.subtract(i,t,{}),a=n.cross(r,o,r);return.5*n.magnitude(a)},calcTerrainHeightFromPositions=async(e,t)=>{const i=t.map(e=>Cartographic.fromCartesian(e));return await sampleTerrainMostDetailed(e,i)},calcSceneHeightFromPositions=async(e,t)=>await e.scene.clampToHeightMostDetailed(t),clacPositionsForParabola=(e,t,i,n)=>{const r=[],o=Cartographic.fromCartesian(e),a=Cartographic.fromCartesian(t),s=180*o.longitude/Math.PI,c=180*o.latitude/Math.PI,l=180*a.longitude/Math.PI,d=180*a.latitude/Math.PI,u=Math.sqrt((s-l)*(s-l)+(c-d)*(c-d))*i,h=Cartesian3$1.clone(e),p=Cartesian3$1.clone(t),A=Cartesian3$1.distance(h,Cartesian3$1.ZERO),m=Cartesian3$1.distance(p,Cartesian3$1.ZERO);if(Cartesian3$1.normalize(h,h),Cartesian3$1.normalize(p,p),!Cartesian3$1.distance(h,p))return r;const f=Cartesian3$1.angleBetween(h,p);r.push(e);for(let e=1;e<n-1;e++){const t=1*e/(n-1),i=1-t,o=Math.sin(i*f)/Math.sin(f),a=Math.sin(t*f)/Math.sin(f),s=Cartesian3$1.multiplyByScalar(h,o,new Cartesian3$1),c=Cartesian3$1.multiplyByScalar(p,a,new Cartesian3$1);let l=Cartesian3$1.add(s,c,new Cartesian3$1);const d=t*Math.PI,g=A*i+m*t+Math.sin(d)*u;l=Cartesian3$1.multiplyByScalar(l,g,l),r.push(l)}return r.push(t),r},calcZoomFromCameraHeight=e=>{const t=e.positionCartographic.height,i=-40467.74;return Math.round(i+80955.31/(1+(t/91610.74)**7096758e-11))},calcCameraHeightFromZoom=e=>e,calcLerpPosition=(e,t)=>{const i=[];let n=0,r=0,o=0;const a=[];for(let t=0;t<e.length-1;++t)n+=Cartesian3$1.distance(e[t],e[t+1]);for(let t=0;t<e.length;t++)0===t?r=0:(o+=Cartesian3$1.distance(e[t-1],e[t]),r=o/n),i.push(r);const s=new LinearSpline({times:i,points:e});for(let e=0;e<=t;e++){const i=s.evaluate(e/t);a.push(i)}return a},calcBoundingSphereFromPositions=e=>{const t=new BoundingSphere(Cartesian3$1.ZERO,0);return BoundingSphere.fromPoints(e,t),t};class BasePrimitive{_primitive;_promise;appearance;geometryInstance;drawCommand;shapePositions;needUpdate=!1;constructor(){this._primitive=void 0,this.appearance=void 0,this.geometryInstance=void 0,this._promise=null,this.drawCommand=null,this.needUpdate=!1,this.shapePositions=[]}update(e){const t=this.getPrimitive();if(t){this._primitive=t;this._primitive.update(e)}}then(e=null){return this._promise?.then(e)}catch(e=null){return this._promise?.catch(e)}isDestroyed(){return!!this._primitive}destroy(){this._primitive=void 0}setShapePositions(e){this.shapePositions=e}}class BaseMaterialProperty{_definitionChanged=new Event$1;get definitionChanged(){return this._definitionChanged}get isConstant(){return!1}}const BoxGeometry=BoxGeometry$1,Cartesian3=Cartesian3$1,defaultValue=void 0,defined=defined$1,destroyObject=destroyObject$1,DeveloperError=DeveloperError$1,GeometryPipeline=GeometryPipeline$1,Matrix3=Matrix3$1,Matrix4=Matrix4$1,Transforms$1=Transforms$2,VertexFormat=VertexFormat$1,BufferUsage=BufferUsage$2,CubeMap=CubeMap$1,DrawCommand=DrawCommand$1,loadCubeMap=loadCubeMap$1,RenderState=RenderState$1,VertexArray=VertexArray$1,BlendingState=BlendingState$2,SceneMode=SceneMode$2,ShaderProgram=ShaderProgram$1,ShaderSource=ShaderSource$1,skyboxMatrix3=new Matrix3;class SkyBoxOnGround{constructor(e){defined$1(Matrix4$1.getRotation)||(Matrix4$1.getRotation=Matrix4$1.getMatrix3),this.sources=e.sources,this._sources=void 0,this.show=defaultValue(e.show,!0),this._command=new DrawCommand({modelMatrix:Matrix4.clone(Matrix4.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}update(e,t){const i=this;if(!this.show)return;if(e.mode!==SceneMode.SCENE3D&&e.mode!==SceneMode.MORPHING)return;if(!e.passes.render)return;const n=e.context;if(this._sources!==this.sources){this._sources=this.sources;const e=this.sources;if(!(defined(e.positiveX)&&defined(e.negativeX)&&defined(e.positiveY)&&defined(e.negativeY)&&defined(e.positiveZ)&&defined(e.negativeZ)))throw new DeveloperError("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof e.positiveX!=typeof e.negativeX||typeof e.positiveX!=typeof e.positiveY||typeof e.positiveX!=typeof e.negativeY||typeof e.positiveX!=typeof e.positiveZ||typeof e.positiveX!=typeof e.negativeZ)throw new DeveloperError("this.sources properties must all be the same type.");"string"==typeof e.positiveX?loadCubeMap(n,this._sources).then(e=>{i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new CubeMap({context:n,source:e}))}const r=this._command;if(r.modelMatrix=Transforms$1.eastNorthUpToFixedFrame(e.camera._positionWC),!defined(r.vertexArray)){r.uniformMap={u_cubeMap:()=>i._cubeMap,u_rotateMatrix:()=>Matrix4.getRotation(r.modelMatrix,skyboxMatrix3)};const e=BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2),vertexFormat:VertexFormat.POSITION_ONLY})),t=this._attributeLocations=GeometryPipeline.createAttributeLocations(e);r.vertexArray=VertexArray.fromGeometry({context:n,geometry:e,attributeLocations:t,bufferUsage:BufferUsage._DRAW}),r.renderState=RenderState.fromCache({blending:BlendingState.ALPHA_BLEND})}if(!defined(r.shaderProgram)||this._useHdr!==t){const e=new ShaderSource({defines:[t?"HDR":""],sources:["precision highp float;\n\nuniform samplerCube u_cubeMap;\nin vec3 v_texCoord;\nout vec4 fragColor;\n\nvoid main() {\n vec4 color = texture(u_cubeMap, normalize(v_texCoord));\n fragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n}"]});r.shaderProgram=ShaderProgram.fromCache({context:n,vertexShaderSource:"#version 300 es\n\nprecision highp float;\n\nin vec3 position;\nout vec3 v_texCoord;\n\nuniform mat3 u_rotateMatrix;\n\nvoid main() {\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position;\n}\n",fragmentShaderSource:e,attributeLocations:this._attributeLocations}),this._useHdr=t}return defined(this._cubeMap)?r:void 0}isDestroyed(){return!1}destroy(){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(),destroyObject(this)}}const createSkyBox=e=>{const{viewer:t,sources:i}=e;return t.scene.skyBox=new SkyBox({sources:i}),t.scene.skyBox},createSkyBoxOnGround=e=>{let{viewer:t,sources:i}=e;const n=e.height?e.height:225705,r=t.scene.skyBox,o=t.scene.skyAtmosphere.show;i||(i={positiveX:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/px.jpg`,negativeX:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/nx.jpg`,positiveY:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/py.jpg`,negativeY:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/ny.jpg`,positiveZ:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/pz.jpg`,negativeZ:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/nz.jpg`});const a=new SkyBoxOnGround({sources:i});t.scene.postRender.addEventListener(()=>{const e=t.camera.position;Cartographic.fromCartesian(e).height<n?(t.scene.skyBox=a,t.scene.skyAtmosphere.show=!1):(t.scene.skyBox=r,t.scene.skyAtmosphere.show=o)})},createRoamHandler=e=>{const t=[];let i,n;e.clock.shouldAnimate=!0;const r={},o=(t,r)=>{if(a(),t.entity.cylinder){const i=t.entity.cylinder;i.roamId=t.id,t.entity.cylinder=void 0,n=e.entities.add({position:t.property,cylinder:i})}e.trackedEntity=t.entity,r&&(i=t)},a=()=>{if(n){e.entities.remove(n);const i=t.find(e=>e.id===n.cylinder.roamId);i&&(i.entity.cylinder=n.cylinder),n=void 0}},s=()=>{e.trackedEntity=void 0,i=void 0,a()},c=i=>{e.trackedEntity?.id===i.entity.id&&s(),e.entities.remove(i.entity);const n=t.findIndex(e=>e.id===i.id);n>-1&&t.splice(n,1)},l=(e,t)=>{const i=e.property.getValue(t);if(i&&(e.status="ROAMING",p.roaming&&p.roaming(e,{time:t,position:i})),e.stopTime.secondsOfDay<t.secondsOfDay&&"END"!==e.status&&(e.status="END",p.end&&p.end(e),e.loop?d(e):s()),e.flyParams.hpr){const n=r[e.id].find(e=>e.time>t.secondsOfDay);n&&h(e,n,i)}},d=t=>{const{property:i,startTime:n,stopTime:r}=u(t);t.stopTime=r,t.startTime=n,t.property=i,t.flyParams.hpr||(t.entity.orientation=new VelocityOrientationProperty(i)),t.entity.position=i,t.status="START",e.clock.currentTime=n,e.clock.multiplier=1,p.reStart&&p.reStart(t)},u=e=>{const t=[],{positions:i,flyParams:n}=e,o=new SampledPositionProperty;let a=0;const s=JulianDate.now();let c=s.clone();return i.forEach((e,r)=>{let l=JulianDate.now();if(r){let t=0;if(n.speed){t=Cartesian3$1.distance(e,i[r-1])/(1e3*n.speed/3600)}n.times&&(t=(n.times[r]-n.times[r-1])/1e3),a+=t,l=JulianDate.addSeconds(s,a,new JulianDate)}else l=s;c=l,o.addSample(l,e),n.hpr&&t.push({time:l.secondsOfDay,heading:n.hpr[r].heading,pitch:n.hpr[r].pitch,roll:n.hpr[r].roll})}),r[e.id]=t,{property:o,startTime:s,stopTime:c}},h=(e,t,i)=>{if(!i)return;const{heading:n,pitch:r,roll:o}=t,a=new HeadingPitchRoll(n,r,o);e.entity.orientation=Transforms.headingPitchRollQuaternion(i,a)};e.scene.preRender.addEventListener((n,r)=>{if(t.forEach(e=>{l(e,r)}),!i)return;const o=i.entity.computeModelMatrix(e.clock.currentTime);o&&e.camera.lookAtTransform(o,new Cartesian3$1(...[-20,0,5]))});const p={};return{set:i=>{const{entity:n}=i;i.id=numberId(),e.entities.add(n);const{property:r,startTime:o,stopTime:a}=u(i);i.flyParams.hpr||(n.orientation=new VelocityOrientationProperty(r)),n.position=r;const s={...i,startTime:o,stopTime:a,property:r,status:"START"};return e.clock.currentTime=o,e.clock.multiplier=1,t.push(s),s.status="START",p.start&&p.start(s),s},tracked:o,stopTracked:s,remove:c,frameRoam:l,trackedByEntityId:(e,i)=>{const n=t.find(t=>t.entity.id===e);n&&o(n,i)},removeAll:()=>{t.forEach(e=>{c(e)}),t.length=0},Event:p,lockCameraView:e=>{i=e},updateRoamAttitude:(e,t)=>{"UP"!==t&&"DOWN"!==t||(e.entity.orientation=void 0),"front"!==t&&"back"!==t||(e.entity.orientation=new VelocityOrientationProperty(e.property))}}};var FlyAttitude=(e=>(e.UP="UP",e.DOWN="DOWN",e.LEFT="left",e.RIGHT="right",e.FRONT="front",e.BACK="back",e))(FlyAttitude||{}),RoamStatus=(e=>(e.END="END",e.START="START",e.ROAMING="ROAMING",e))(RoamStatus||{});let barWidth=100,distanceLabel="",lastCameraHeight="0";const createBottomStatusBar=e=>{const{viewer:t}=e,i=document.createElement("div");i.className="bottom-status-bar";const n=document.createElement("div");n.className="scale-bar",n.innerHTML="";const r=document.createElement("div");r.className="scale-label",r.innerHTML="",n.appendChild(r),i.appendChild(n);const o=document.createElement("div");o.id="bottom-status-bar-camera",e.clickCopy&&(o.style.pointerEvents="auto",o.style.cursor="pointer"),i.appendChild(o),o.style.display="flex";const a=document.createElement("div"),s=document.createElement("div"),c=t._element.getElementsByClassName("cesium-widget")[0];if(!c)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");c.appendChild(i),initCesiumEvent(t,{MOVE_POSITION(i){o.innerHTML=`\n 经度:${i.lnglat.lng.toFixed(6)} \n 纬度:${i.lnglat.lat.toFixed(6)} \n 高程:${i.lnglat.height.toFixed(2)} \n `,e.clickCopy&&getCameraView(t),o.appendChild(s),o.appendChild(a)}}),e.clickCopy&&document.addEventListener("click",e=>{e.target.id});let l=Date.now(),d=0;const u=()=>{requestAnimationFrame(()=>{if(d+=1,d>=30){const e=Date.now(),t=e-l,i=Math.round(1e3/(t/d));l=e,d=0,a.innerHTML=`${i} FPS`}e.hpr?s.innerHTML=`\n 方位角:${CesiumMath.toDegrees(t.camera.heading).toFixed(1)}° \n 俯仰角:${CesiumMath.toDegrees(t.camera.pitch).toFixed(1)}° \n 翻滚角:${CesiumMath.toDegrees(t.camera.roll).toFixed(1)}° \n `:s.innerHTML="",s.innerHTML+=`\n 视高:${t.camera.positionCartographic.height.toFixed(0)}m \n `;const i=cesiumScale(t);r.innerHTML=`${i.distanceLabel}`,u()})};u()},cesiumScale=e=>{const t=e.camera.positionCartographic.height.toFixed(0);if(t===lastCameraHeight)return{barWidth:barWidth,distanceLabel:distanceLabel};lastCameraHeight=t;const i=new EllipsoidGeodesic,n=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7],r=e.scene,o=r.canvas.clientWidth,a=r.canvas.clientHeight,s=r.camera.getPickRay(new Cartesian2(o/2|0,a-1)),c=r.camera.getPickRay(new Cartesian2(1+o/2|0,a-1)),l=r.globe,d=l.pick(s,r),u=l.pick(c,r);if(!defined$1(d)||!defined$1(u))return{barWidth:barWidth,distanceLabel:distanceLabel};const h=l.ellipsoid.cartesianToCartographic(d),p=l.ellipsoid.cartesianToCartographic(u);i.setEndPoints(h,p);const A=i.surfaceDistance;let m;for(let e=n.length-1;!defined$1(m)&&e>=0;--e)n[e]/A<100&&(m=n[e]);if(defined$1(m)){const e=m>=1e3?`${(m/1e3).toString()} km`:`${m.toString()} m`;barWidth=m/A|0,distanceLabel=e}else barWidth=0,distanceLabel="1 m";return{barWidth:barWidth,distanceLabel:distanceLabel}},createOpenAnim=e=>new Promise(t=>{const{viewer:i,center:n}=e;let r=n.lng,o=1,a=null;const s=e=>{null===a&&(a=e);r-=(e-a)/2e4*2,r<-180&&(r=180,o+=1),2===o&&r>n.lng?i.camera.flyTo({destination:Cartesian3$1.fromDegrees(n.lng,n.lat,3e7),duration:2,orientation:{heading:CesiumMath.toRadians(360),pitch:CesiumMath.toRadians(-90),roll:0},easingFunction:EasingFunction$1.LINEAR_NONE,complete:()=>{i.camera.flyTo({destination:Cartesian3$1.fromDegrees(n.lng,n.lat,n.height),duration:3,orientation:{heading:CesiumMath.toRadians(2.8),pitch:CesiumMath.toRadians(-90),roll:6.282253919167732},complete:()=>{t(!0)}})}}):(i.camera.setView({destination:Cartesian3$1.fromDegrees(r,n.lat,3e7),orientation:{heading:CesiumMath.toRadians(360),pitch:CesiumMath.toRadians(-90),roll:0}}),requestAnimationFrame(s))};requestAnimationFrame(s)}),makeGridToInstanceForBox=(e,t,i)=>{const n=new Float64Array(24);for(let t=0;t<8;t++)n[3*t]=e[t].x,n[3*t+1]=e[t].y,n[3*t+2]=e[t].z;return new GeometryInstance({geometry:new Geometry({indices:new Uint16Array([0,1,2,0,2,3,4,6,5,4,7,6,0,4,1,1,4,5,1,5,2,2,5,6,2,6,3,3,6,7,3,7,0,0,7,4]),attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:n})},primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:BoundingSphere.fromVertices(n)}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(t)},id:`${i}`})},makeGridToInstanceForLine=(e,t,i)=>{const[n,r,o,a,s,c,l,d]=e;return new GeometryInstance({geometry:new PolylineGeometry({positions:[n,r,r,o,o,a,a,n,s,c,c,l,l,d,d,s,n,s,s,c,c,r,r,n,a,d,d,l,l,o,o,a,n,a,a,d,d,s,s,n,r,c,c,l,l,o,o,r],width:2,vertexFormat:PolylineColorAppearance.VERTEX_FORMAT}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(t)},id:`${i}`})},makeGridFromElevationExtrema=(e,t)=>[Cartesian3$1.fromDegrees(e.longitude,e.latitude,t.height),Cartesian3$1.fromDegrees(e.longitude,t.latitude,t.height),Cartesian3$1.fromDegrees(t.longitude,t.latitude,t.height),Cartesian3$1.fromDegrees(t.longitude,e.latitude,t.height),Cartesian3$1.fromDegrees(e.longitude,e.latitude,e.height),Cartesian3$1.fromDegrees(e.longitude,t.latitude,e.height),Cartesian3$1.fromDegrees(t.longitude,t.latitude,e.height),Cartesian3$1.fromDegrees(t.longitude,e.latitude,e.height)],mekeGridPolygonAndHeight=(e,t,i,n,r,o)=>[Cartesian3$1.fromDegrees(e,e,r),Cartesian3$1.fromDegrees(t,t,r),Cartesian3$1.fromDegrees(i,i,r),Cartesian3$1.fromDegrees(n,n,r),Cartesian3$1.fromDegrees(e,e,o),Cartesian3$1.fromDegrees(t,t,o),Cartesian3$1.fromDegrees(i,i,o),Cartesian3$1.fromDegrees(n,n,o)],x_PI=3e3*Math.PI/180,PI=Math.PI,a=6378245,ee=.006693421622965943,outOfChina=(e,t)=>!(e>72.004&&e<137.8347&&t>.8293&&t<55.8271),transformlat=(e,t)=>{let i=2*e-100+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return i+=2*(20*Math.sin(6*e*PI)+20*Math.sin(2*e*PI))/3,i+=2*(20*Math.sin(t*PI)+40*Math.sin(t/3*PI))/3,i+=2*(160*Math.sin(t/12*PI)+320*Math.sin(t*PI/30))/3,i},transformlng=(e,t)=>{let i=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return i+=2*(20*Math.sin(6*e*PI)+20*Math.sin(2*e*PI))/3,i+=2*(20*Math.sin(e*PI)+40*Math.sin(e/3*PI))/3,i+=2*(150*Math.sin(e/12*PI)+300*Math.sin(e/30*PI))/3,i},wgs84togcj02=(e,t)=>{if(outOfChina(e,t))return[e,t];let i=transformlat(e-105,t-35),n=transformlng(e-105,t-35);const r=t/180*PI;let o=Math.sin(r);o=1-ee*o*o;const s=Math.sqrt(o);i=180*i/(a*(1-ee)/(o*s)*PI),n=180*n/(a/s*Math.cos(r)*PI);return[e+n,t+i]},gcj02towgs84=(e,t)=>{if(outOfChina(e,t))return[e,t];let i=transformlat(e-105,t-35),n=transformlng(e-105,t-35);const r=t/180*PI;let o=Math.sin(r);o=1-ee*o*o;const s=Math.sqrt(o);i=180*i/(a*(1-ee)/(o*s)*PI),n=180*n/(a/s*Math.cos(r)*PI);return[2*e-(e+n),2*t-(t+i)]},gcj02tobd09=(e,t)=>{const i=e,n=t,r=Math.sqrt(i*i+n*n)+2e-5*Math.sin(n*x_PI),o=Math.atan2(n,i)+3e-6*Math.cos(i*x_PI);return[r*Math.cos(o)+.0065,r*Math.sin(o)+.006]},bd09togcj02=(e,t)=>{const i=e-.0065,n=t-.006,r=Math.sqrt(i*i+n*n)-2e-5*Math.sin(n*x_PI),o=Math.atan2(n,i)-3e-6*Math.cos(i*x_PI);return[r*Math.cos(o),r*Math.sin(o)]},bd09towgs84=(e,t)=>{const[i,n]=bd09togcj02(e,t);return gcj02towgs84(i,n)},wgs84tobd09=(e,t)=>{const[i,n]=wgs84togcj02(e,t);return gcj02tobd09(i,n)};class CoordinateTransformer{static wgs84ToGcj02(e){const[t,i]=wgs84togcj02(e.lng,e.lat);return{lng:t,lat:i}}static gcj02ToWgs84(e){const[t,i]=gcj02towgs84(e.lng,e.lat);return{lng:t,lat:i}}static gcj02ToBd09(e){const[t,i]=gcj02tobd09(e.lng,e.lat);return{lng:t,lat:i}}static bd09ToGcj02(e){const[t,i]=bd09togcj02(e.lng,e.lat);return{lng:t,lat:i}}static bd09ToWgs84(e){const[t,i]=bd09towgs84(e.lng,e.lat);return{lng:t,lat:i}}static wgs84ToBd09(e){const[t,i]=wgs84tobd09(e.lng,e.lat);return{lng:t,lat:i}}}let eventHandler;const pickPoint=e=>new Promise(t=>{document.body.style.cursor="pointer",e._element.style.cursor="pointer",eventHandler||(eventHandler=new ScreenSpaceEventHandler(e.scene.canvas)),eventHandler.setInputAction(async i=>{const n=e.scene.pickPosition(i.position);await e.scene.clampToHeightMostDetailed([n]);const r=makePositiontoLnglat(n);e._element.style.cursor="default",eventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK),t({position:n,lnglat:r})},ScreenSpaceEventType$1.LEFT_CLICK)}),getFeaturesFromTileContent=(e,t)=>{const i={},n=t.getFeature(e);return n?getFeaturesFromTileFeature(n):i},getFeaturesFromTileFeature=e=>{const t={};return e.getPropertyIds().forEach(i=>{t[i]=e.getProperty(i)}),t},loadTianDiTu=e=>{const{viewer:t,token:i}=e,n=e.vec?"vec":"img",r=[],o=t.imageryLayers.addImageryProvider(new WebMapTileServiceImageryProvider({url:`//t{s}.tianditu.gov.cn/${n}_w/wmts?tk=${i}`,layer:n,style:"default",tileMatrixSetID:"w",format:"tiles",maximumLevel:18,subdomains:["0","1","2","3","4","5","6","7"]}));if(r.push(o),e.label){const e=t.imageryLayers.addImageryProvider(new WebMapTileServiceImageryProvider({url:`//t{s}.tianditu.gov.cn/cia_w/wmts?tk=${i}`,layer:"cia",style:"default",tileMatrixSetID:"w",format:"tiles",maximumLevel:18,subdomains:["0","1","2","3","4","5","6","7"]}));r.push(e)}return{layers:r,remove:()=>{r.forEach(e=>{t.imageryLayers.remove(e)})},setOpacity:e=>{r.forEach(t=>{t.alpha=e})}}};function setImageLayerTheme(e,t){t||(t={}),console.log(t.filterColor);const i=e.imageryLayers.get(0);if(!i)return;i.brightness=t.brightness??.6,i.contrast=t.contrast??1.8,i.gamma=t.gamma??.3,i.hue=t.hue??1,i.saturation=t.saturation||0;const n=e.scene.globe._surfaceShaderSet.baseFragmentShaderSource.sources;for(let e=0;e<n.length;e++){const i="color = czm_saturation(color, textureSaturation);\n#endif\n";let r="color = czm_saturation(color, textureSaturation);\n#endif\n";t.invertColor||(r+="\n color.r = 1.0 - color.r;\n color.g = 1.0 - color.g;\n color.b = 1.0 - color.b;\n "),t.filterColor||(t.filterColor=Color.fromCssColorString("rgba(100,138,230,0.5)")),r+=`\n color.r = color.r * ${t.filterColor.red.toFixed(2)};\n color.g = color.g * ${t.filterColor.green.toFixed(2)};\n color.b = color.b * ${t.filterColor.blue.toFixed(2)};\n // color.a = color.a * ${t.filterColor.alpha.toFixed(2)};\n `,n[e]=n[e].replace(i,r)}e.scene.requestRender()}const defaultOptions$c={cacheBytes:4294967296,maximumCacheOverflowBytes:5368709120},load3dTiles=async e=>{const{viewer:t,url:i,options:n}=e,r=await Cesium3DTileset.fromUrl(i,{...defaultOptions$c,...n});t.scene.primitives.add(r);return{tileset:r,setHeightOffset:e=>{setHeightOffsetFor3dTiles(r,e)},remove:()=>{t.scene.primitives.remove(r)},flyTo:()=>{t.flyTo(r)}}},setHeightOffsetFor3dTiles=(e,t)=>{setTranslateFor3dTiles(e,Cartesian3$1.fromElements(0,0,t,new Cartesian3$1))},getAllFeaturesFrom3dTiles=async e=>{const t=[];function i(e){if(console.log(e),!e.content||!e.content.featuresLength)return;const n=e.content;for(let e=0;e<n.featuresLength;e++)t.push(n.getFeature(e));e.children?.forEach(i)}return new Promise(n=>{e.allTilesLoaded.addEventListener(()=>{i(e.root),n(t)})})},getAllTilesFrom3dTiles=e=>{const t=[];function i(e){t.push(e),e.children?.forEach(i)}return new Promise(n=>{e.allTilesLoaded.addEventListener(()=>{i(e.root),n(t)})})},setTranslateFor3dTiles=(e,t)=>{if(t.equals(Cartesian3$1.ZERO))return;const i=e.boundingSphere.center,n=Transforms$2.eastNorthUpToFixedFrame(i),r=Matrix4$1.multiplyByPoint(n,t,new Cartesian3$1),o=Cartesian3$1.subtract(r,i,new Cartesian3$1),a=Matrix4$1.fromTranslation(o);e.modelMatrix=Matrix4$1.multiply(a,e.modelMatrix,new Matrix4$1)},serScaleFor3dTiles=(e,t)=>{if(t.equals(Cartesian3$1.ZERO)||t.equals(Cartesian3$1.ONE))return;const i=e.boundingSphere.center,n=Transforms$2.eastNorthUpToFixedFrame(i),r=Matrix4$1.inverse(n,new Matrix4$1),o=Matrix4$1.fromScale(t),a=Matrix4$1.multiply(o,r,new Matrix4$1),s=Matrix4$1.multiply(n,a,new Matrix4$1);e.modelMatrix=Matrix4$1.multiply(s,e.modelMatrix,new Matrix4$1)},setRotateFor3dTiles=(e,t)=>{const{x:i,y:n,z:r}=t,o=e.boundingSphere.center,a=Transforms$2.eastNorthUpToFixedFrame(o),s=Matrix4$1.inverse(a,new Matrix4$1),c=Matrix4$1.clone(Matrix4$1.IDENTITY);if(0!==i){const e=Matrix4$1.fromRotation(Matrix3$1.fromRotationX(CesiumMath.toRadians(i)));Matrix4$1.multiply(e,c,c)}if(0!==n){const e=Matrix4$1.fromRotation(Matrix3$1.fromRotationY(CesiumMath.toRadians(n)));Matrix4$1.multiply(e,c,c)}if(0!==r){const e=Matrix4$1.fromRotation(Matrix3$1.fromRotationZ(CesiumMath.toRadians(r)));Matrix4$1.multiply(e,c,c)}const l=Matrix4$1.multiply(c,s,new Matrix4$1),d=Matrix4$1.multiply(a,l,new Matrix4$1);e.modelMatrix=Matrix4$1.multiply(d,e.modelMatrix,new Matrix4$1)},TransformsFor3dtiles={translate:setTranslateFor3dTiles,scale:serScaleFor3dTiles,rotate:setRotateFor3dTiles},loadTerrain=async e=>{const{viewer:t,url:i}=e,n=await CesiumTerrainProvider.fromUrl(i,{requestWaterMask:!0,requestVertexNormals:!0});t.scene.terrainProvider=n;return{terrainProvider:n,remove:()=>{t.scene.terrainProvider=new EllipsoidTerrainProvider}}},removeTerrain=e=>{e.scene.terrainProvider=new EllipsoidTerrainProvider},loadTerrainFromCesium=async()=>await CesiumTerrainProvider.fromIonAssetId(1,{requestWaterMask:!0,requestVertexNormals:!0}),loadModel=()=>{},loads3m=()=>{},loadI3s=async e=>{const{viewer:t,url:i,options:n}=e,r=await I3SDataProvider.fromUrl(i,n);t.scene.primitives.add(r);return{i3sProvider:r,setHeightOffset:e=>{r.layers.forEach(t=>{const i=t.tileset;i&&setHeightOffsetFor3dTiles(i,e)})},remove:()=>{t.scene.primitives.remove(r)},flyTo:e=>{const i=Rectangle.center(r.extent);i.height=e;let n=r.data;defined$1(n.layers)&&n.layers.length>0&&(n=n.layers[0]),defined$1(n.fullExtent)&&defined$1(n.fullExtent.zmax)&&(i.height+=n.fullExtent.zmax);const o=Ellipsoid.WGS84.cartographicToCartesian(i);t.camera.flyTo({destination:o,orientation:{}})}}},fragmentShaderSource$8="\n uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n uniform vec4 highlight;\n void main() {\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (czm_selected()) {\n vec3 highlighted = highlight.a * highlight.rgb + (1.0 - highlight.a) * color.rgb;\n out_FragColor = mix(color, vec4(highlighted,0.5), 0.3);\n } else {\n out_FragColor = color;\n }\n }\n ",createHighLightStage=(e,t=Color.YELLOW)=>{const i=e.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$8,uniforms:{highlight:()=>t}}));i.selected=[];return{stage:i,remove:()=>{e.scene.postProcessStages.remove(i)}}},fragmentShaderText="\n uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n in vec2 v_textureCoordinates;\n void main() { float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (depth < 1.0 - 0.000001) {\n out_FragColor = color;\n } else {\n out_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n }\n }",mixFragmentShaderText="\n uniform sampler2D colorTexture;\n uniform sampler2D redTexture;\n uniform sampler2D silhouetteTexture;\n in vec2 v_textureCoordinates;\n\n void main() {\n vec4 redColor = texture(redTexture, v_textureCoordinates);\n vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (redColor.r == 1.0) {\n out_FragColor = mix(color, vec4(5.0, 0.0, 0.0, 1.0), silhouetteColor.a);\n } else {\n out_FragColor = color;\n }\n }",createSkylineStage=e=>{const t=PostProcessStageLibrary.createEdgeDetectionStage(),i=new PostProcessStage({name:"skyline",fragmentShader:fragmentShaderText}),n=new PostProcessStageComposite({stages:[t,i,new PostProcessStage({name:"mix",fragmentShader:mixFragmentShaderText,uniforms:{redTexture:i.name,silhouetteTexture:t.name}})],inputPreviousStageTexture:!1,uniforms:t.uniforms});e.scene.postProcessStages.add(n);return{stage:n,remove:()=>{e.scene.postProcessStages.remove(n)}}},createOutlineStage=(e,t=Color.YELLOW)=>{const i=e.scene.postProcessStages,n=PostProcessStageLibrary.createEdgeDetectionStage();n.uniforms.color=t,n.uniforms.length=1,n.selected=[];const r=PostProcessStageLibrary.createEdgeDetectionStage();r.uniforms.color=t,r.selected=[];const o=i.add(PostProcessStageLibrary.createSilhouetteStage([n,r]));o.selected=[];return{stage:o,remove:()=>{e.scene.postProcessStages.remove(o)}}},fragmentShaderSource$7="\n vec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth)\n {\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\n return eyeCoordinate.xyz / eyeCoordinate.w;\n }\n vec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset, sampler2D depthMap) {\n vec2 glFragCoordXY = gl_FragCoord.xy;\n float upOrRightLogDepth = czm_unpackDepth(texture(depthMap, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\n float downOrLeftLogDepth = czm_unpackDepth(texture(depthMap, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\n bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\n\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 uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n uniform float intensity;\n in vec2 v_textureCoordinates;\n void main(void)\n {\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n\n float logDepthOrDepth = czm_unpackDepth(texture(depthTexture, v_textureCoordinates));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0), depthTexture);\n vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0), depthTexture);\n vec3 normalEC = normalize(cross(leftRight, downUp));\n vec3 normalMC = normalize((czm_inverseView * vec4(normalEC, 0.0)).xyz);\n vec3 ellipsoidNormal = normalize(worldCoordinate);\n float dotProd = dot(ellipsoidNormal, normalMC);\n if(dotProd < 0.3){\n out_FragColor = sceneColor;\n } else {\n out_FragColor = mix(sceneColor, vec4(1.0), dotProd * intensity);\n }\n if (czm_selected()) {\n out_FragColor = sceneColor;\n }\n }\n ",createSnowCoverStage=e=>{const t=e.viewer,i=new PostProcessStage({name:"SnowEffectCover",fragmentShader:fragmentShaderSource$7,forcePowerOfTwo:!1,textureScale:1,uniforms:{intensity:()=>e.intensity||.8}});t.scene.postProcessStages.add(i);return i.selected=[],{stage:i,remove:()=>{t.scene.postProcessStages.remove(i)}}},fragmentShaderSource$6="\n uniform sampler2D colorTexture; //输入的场景渲染照片\n in vec2 v_textureCoordinates;\n uniform float speed;\n uniform float scale;\n\n float snow(vec2 uv, float thisScale) {\n float time = czm_frameNumber * speed / 1000.0;\n float wMars3D = smoothstep(1.0, 0.0, -uv.y * (thisScale / 10.0));\n if(wMars3D < 0.1)\n return 0.0;\n uv += time / thisScale;\n uv.y += time * 2.0 / thisScale;\n uv.x += sin(uv.y + time * 0.5) / thisScale;\n uv *= thisScale;\n\n vec2 s = floor(uv), f = fract(uv), p;\n float k = 3.0, d;\n p = 0.5 + 0.35 * sin(11.0 * fract(sin((s + p + thisScale) * mat2(7, 3, 6, 5)) * 5.0)) - f;\n d = length(p);\n k = min(d, k);\n k = smoothstep(0.0, k, sin(f.x + f.y) * 0.01);\n return k * wMars3D;\n }\n void main(void) {\n vec2 resolution = czm_viewport.zw;\n vec2 uv = (gl_FragCoord.xy * 2. - resolution.xy) / min(resolution.x, resolution.y);\n\n float c = 0.0;\n float step = 1.0/(scale*0.1);\n for(float i = 1.0; i < 12.0; i += 1.0) {\n c += snow(uv, i*step);\n }\n vec3 finalColor = vec3(c); //屏幕上雪的颜色\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor, 1.0), 0.5); //将雪和三维场景融合\n }",createSnowStage=e=>{const t=e.viewer,i=t.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$6,uniforms:{scale:()=>e.scale||5,speed:()=>e.speed||16}}));i.selected=[];return{stage:i,remove:()=>{t.scene.postProcessStages.remove(i)}}},fragmentShaderSource$5="\n uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n uniform float alpha;\n uniform float height;\n uniform vec3 oneOverRadii;\n uniform vec3 oneOverRadiiSquared;\n uniform float centerToleranceSquared;\n uniform float EPSILON12;\n uniform float earthRadius;\n\n in vec2 v_textureCoordinates;\n out vec4 glColor;\n\n vec4 toEye(in vec2 uv, in float depth){\n vec2 xy = vec2((uv.x * 2.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 float getDepth(in vec4 depth){\n float z_window = czm_unpackDepth(depth);\n z_window = czm_reverseLogDepth(z_window);\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n }\n\n\n vec3 getWorldCoordinateFromDepth(in vec4 currD){\n float depth = czm_unpackDepth(currD);\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n return worldCoordinate;\n }\n\n float magnitude(in vec3 v){\n return sqrt(v.x * v.x + v.y * v.y + v.z * v.z);\n }\n\n // 沿大地表面法线缩放提供的笛卡尔位置,使其位于该椭球体的表面上\n vec3 scaleToGeodeticSurface(in vec3 cartesian){\n float positionX = cartesian.x;\n float positionY = cartesian.y;\n float positionZ = cartesian.z;\n float x2 = cartesian.x * cartesian.x * oneOverRadii.x * oneOverRadii.x;\n float y2 = cartesian.y * cartesian.y * oneOverRadii.y * oneOverRadii.y;\n float z2 = cartesian.z * cartesian.z * oneOverRadii.z * oneOverRadii.z;\n\n float squaredNorm = x2 + y2 + z2;\n float ratio = sqrt(1.0 / squaredNorm);\n vec3 intersection = cartesian * ratio;\n\n float oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n float oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n float oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n\n vec3 gradient = vec3(intersection.x * oneOverRadiiSquaredX * 2.0,intersection.y * oneOverRadiiSquaredY * 2.0,intersection.z * oneOverRadiiSquaredZ * 2.0);\n\n float lambda = ((1.0 - ratio) * magnitude(cartesian) ) / (0.5 * magnitude(gradient));\n float correction = 0.0;\n float func = 0.0;\n float denominator = 0.0;\n float xMultiplier = 0.0;\n float yMultiplier = 0.0;\n float zMultiplier = 0.0;\n float xMultiplier2 = 0.0;\n float yMultiplier2 = 0.0;\n float zMultiplier2 = 0.0;\n float xMultiplier3 = 0.0;\n float yMultiplier3 = 0.0;\n float zMultiplier3 = 0.0;\n do {\n lambda -= correction;\n\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n\n xMultiplier2 = xMultiplier * xMultiplier;\n yMultiplier2 = yMultiplier * yMultiplier;\n zMultiplier2 = zMultiplier * zMultiplier;\n\n xMultiplier3 = xMultiplier2 * xMultiplier;\n yMultiplier3 = yMultiplier2 * yMultiplier;\n zMultiplier3 = zMultiplier2 * zMultiplier;\n\n float func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n\n float denominator =\n x2 * xMultiplier3 * oneOverRadiiSquaredX +\n y2 * yMultiplier3 * oneOverRadiiSquaredY +\n z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n\n float derivative = -2.0 * denominator;\n\n correction = func / derivative;\n } while (abs(func) > EPSILON12);\n return vec3(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);\n }\n\n vec3 multiplyComponents(in vec3 left,in vec3 right){\n return vec3(left.x * right.x, left.y * right.y, left.z * right.z);\n }\n\n\n // 将世界坐标转为经纬度高度\n vec3 getCartographicFromCartesian3(in vec3 cartesian){\n vec3 p = scaleToGeodeticSurface(cartesian);\n vec3 n = multiplyComponents(p,oneOverRadiiSquared);\n n = normalize(n);\n vec3 h = cartesian - p;\n\n float longitude = atan(n.y, n.x);\n float latitude = asin(n.z);\n float height = sign(dot(h, cartesian)) * magnitude(h);\n\n return vec3(longitude,latitude,height);\n }\n\n // 计算每个像素点的高度 通过计算相机所在位置的地球半径作为每个点的地球半径,然后用每个点的length减去半径得到近似的高度\n float getHeight(in vec4 currD){\n // 传入每个点的世界坐标\n float altitude = 0.0;\n float depth = czm_unpackDepth(currD);\n if (depth == 0.0) {\n altitude = czm_infinity;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\n float distance = -eyeCoordinate.z / eyeCoordinate.w;\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n altitude = length(worldCoordinate.xyz) - earthRadius;\n return altitude;\n }\n\n void main(){\n vec4 color = texture(colorTexture, v_textureCoordinates);\n vec4 currD = texture(depthTexture, v_textureCoordinates);\n if(currD.r>=1.0){\n glColor = color;\n return;\n }\n // 此方法有问题 会闪烁\n float depth = getDepth(currD);\n vec4 positionEC = toEye(v_textureCoordinates, depth);\n vec4 positionWC = czm_inverseView * positionEC;\n // 获取当前点的高度\n // vec3 positionWC = getWorldCoordinateFromDepth(currD);\n vec3 cartographic = getCartographicFromCartesian3(vec3(positionWC.x,positionWC.y,positionWC.z));\n // 高度加了10之后 就不闪烁了\n float pointHeight = cartographic.z + 10.;\n // 当前点高度越高,雾浓度越小,高度达到设定高度,雾浓度为0,同时乘以深度,距离越远,浓度越大\n float fog = (height/pointHeight - 1.);\n fog = clamp(fog, 0.0, 1.0);\n glColor = mix(color,vec4(1.0,1.,1.,1),fog*alpha);\n }",createHeightFogStage=e=>{const t=e.viewer.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$5,uniforms:{EPSILON12:()=>e.EPSILON12||1e-12,alpha:()=>e.alpha||.88,centerToleranceSquared:()=>e.centerToleranceSquared||.1,height:()=>e.height||100,oneOverRadii:()=>e.oneOverRadii||{x:1.567855942887398e-7,y:1.567855942887398e-7,z:1.573130351105623e-7},oneOverRadiiSquared:()=>e.oneOverRadiiSquared||{x:2458172257647332e-29,y:2458172257647332e-29,z:24747391015697002e-30}}}));t.selected=[];return{stage:t,remove:()=>{e.viewer.scene.postProcessStages.remove(t)}}},fragmentShaderSource$4="\nfloat getDistance(sampler2D depthTexture, vec2 texCoords) {\n float depth = czm_unpackDepth(texture(depthTexture, texCoords));\n if(depth == 0.0) {\n return czm_infinity;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\n return -eyeCoordinate.z / eyeCoordinate.w;\n}\nfloat interpolateByDistanceMars3D(vec4 nearFarScalar, float distance) {\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}\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor) {\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform vec4 fogByDistance;\nuniform vec4 fogColor;\nin vec2 v_textureCoordinates;\nvoid main(void) {\n float distance = getDistance(depthTexture, v_textureCoordinates);\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n float blendAmount = interpolateByDistanceMars3D(fogByDistance, distance);\n vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);\n out_FragColor = alphaBlend(finalFogColor, sceneColor);\n}\n ",createFogStage=e=>{const t=e.viewer.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$4,uniforms:{fogColor:()=>e.fogColor||Color.WHITE,fogByDistance:()=>e.fogByDistance||new Cartesian4(100,0,9e3,.9)}}));t.selected=[];return{stage:t,remove:()=>{e.viewer.scene.postProcessStages.remove(t)}}},fragmentShaderSource$3="\n uniform sampler2D colorTexture;\n uniform sampler2D bloomTexture;\n uniform float ratio;\n uniform vec4 color;\n in vec2 v_textureCoordinates;\n void main(void)\n {\n vec4 color1 = texture(colorTexture, v_textureCoordinates);\n vec4 bloom = texture(bloomTexture, v_textureCoordinates);\n bloom *= color;\n if (czm_selected()) {\n bloom *= ratio;\n out_FragColor = bloom + color1;\n } else {\n out_FragColor = color1;\n }\n }\n ",fragmentShaderSource1="\n uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n uniform float contrast;\n uniform float brightness;\n void main(void)\n {\n vec4 texture1 = texture(colorTexture, v_textureCoordinates);\n vec3 sceneColor = texture1.rgb;\n\n sceneColor = czm_RGBToHSB(sceneColor);\n sceneColor.z += brightness;\n sceneColor = czm_HSBToRGB(sceneColor);\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, texture1.a);\n }\n ",fragmentShaderSource2="\n uniform sampler2D colorTexture;\n uniform float threshold;\n uniform float smoothWidth;\n\n in vec2 v_textureCoordinates;\n void main() {\n vec4 marstexel = texture( colorTexture, v_textureCoordinates );\n\n #ifdef CZM_SELECTED_FEATURE\n if (!czm_selected()) {\n marstexel = vec4(0.);\n }\n #endif\n\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n float marsv = dot( marstexel.xyz, luma );\n float alpha = smoothstep(threshold, threshold + smoothWidth, marsv);\n\n vec4 outputColor = vec4(0.0,0.0,0.0,0.0);\n out_FragColor = mix( outputColor, marstexel, alpha );\n }\n ",createBloomTargetStage=e=>{const t=new PostProcessStageComposite({name:"undefinedcontrast_bias_blur",stages:[new PostProcessStage({name:"undefinedcontrast_bias",fragmentShader:fragmentShaderSource1,uniforms:{contrast:()=>128,brightness:()=>-.3}}),new PostProcessStageComposite({name:"undefined_blur_comp",stages:[new PostProcessStage({name:"undefinedhigh",fragmentShader:fragmentShaderSource2,uniforms:{threshold:()=>0,smoothWidth:()=>.01}})]})]}),i=e.scene.postProcessStages.add(new PostProcessStageComposite({name:"bloom_target",inputPreviousStageTexture:!1,stages:[t,new PostProcessStage({name:"undefinedgenerate_composite",fragmentShader:fragmentShaderSource$3,uniforms:{bloomTexture:()=>"undefinedcontrast_bias_blur",color:()=>Color.GREEN,ratio:()=>2}})]}));i.enabled=!1;return i.selected=[],{stage:i,remove:()=>{e.scene.postProcessStages.remove(i)}}},fragmentShaderSource$2="\n uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n uniform float speed;\n uniform float size;\n uniform float direction;\n\n float hash(float x) {\n return fract(sin(x * 133.3) * 13.13);\n }\n\n void main(void) {\n\n float time = czm_frameNumber * speed / 1000.0;\n vec2 resolution = czm_viewport.zw;\n\n vec2 uv = (gl_FragCoord.xy * 2. - resolution.xy) / min(resolution.x, resolution.y);\n vec3 finalColor = vec3(.6, .7, .8);//粒子的颜色\n\n float siMars3D = sin(direction), co = cos(direction);\n uv *= mat2(co, -siMars3D, siMars3D, co);\n uv *= length(uv + vec2(0, 4.9))*(20.0/size) + 1.0;\n\n float v = 1. - sin(hash(floor(uv.x * 100.0)) * 2.0);\n float b = clamp(abs(sin(20.0 * time * v + uv.y * (5. / (2.0 + v)))) - .95, 0.0, 1.0) * 20.0;\n finalColor *= v * b; //屏幕上雨的颜色\n\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor, 1.0), 0.5); //将雨和三维场景融合\n }\n ",createRainStage=e=>{const t=e.viewer.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$2,uniforms:{speed:()=>e.speed||16,size:()=>e.size||20,direction:()=>360+(e.direction||30)}}));t.selected=[];return{stage:t,remove:()=>{e.viewer.scene.postProcessStages.remove(t)}}},fragmentShaderSource$1="\n#extension GL_OES_standard_derivatives:enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nin vec2 v_textureCoordinates;\nvec4 toEye(in vec2 uv, in float depth){\n vec2 xy = vec2((uv.x * 2.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}\nfloat getDepth(in vec4 depth){\n float z_window = czm_unpackDepth(depth);\n z_window = czm_reverseLogDepth(z_window);\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nvec3 guussColor(vec2 uv){\n vec2 pixelSize = 1.0 / czm_viewport.zw;\n float dx0 = -pixelSize.x;\n float dy0 = -pixelSize.y;\n float dx1 = pixelSize.x;\n float dy1 = pixelSize.y;\n vec4 gc = (\n texture(colorTexture, uv)+\n texture(colorTexture, uv + vec2(dx0, dy0)) +\n texture(colorTexture, uv + vec2(0.0, dy0)) +\n texture(colorTexture, uv + vec2(dx1, dy0)) +\n texture(colorTexture, uv + vec2(dx0, 0.0)) +\n texture(colorTexture, uv + vec2(dx1, 0.0)) +\n texture(colorTexture, uv + vec2(dx0, dy1)) +\n texture(colorTexture, uv + vec2(0.0, dy1)) +\n texture(colorTexture, uv + vec2(dx1, dy1))\n ) * (1.0 / 9.0);\n return gc.rgb;\n}\nvoid main(){\n float offset = 0.0;\n vec4 color = texture(colorTexture, v_textureCoordinates);\n vec4 currD = texture(depthTexture, v_textureCoordinates);\n if(currD.r>=1.0){\n out_FragColor = color;\n return;\n }\n float depth = getDepth(currD);\n\n vec4 positionEC = toEye(v_textureCoordinates, depth);\n vec3 dx = dFdx(positionEC.xyz);\n vec3 dy = dFdy(positionEC.xyz);\n vec3 normal = normalize(cross(dx,dy));\n\n vec4 positionWC = normalize(czm_inverseView * positionEC);\n vec3 normalWC = normalize(czm_inverseViewRotation * normal);\n float fotNumWC = dot(positionWC.xyz,normalWC);\n if(fotNumWC<=0.5){\n out_FragColor = color;\n return;\n }\n\n vec3 viewDir = normalize(positionEC.xyz);\n vec3 reflectDir = reflect(viewDir, normal);\n vec3 viewReflectDir = reflectDir;\n\n float step = 0.05;\n int stepNum = int(20.0 / step);\n vec3 pos;\n vec3 albedo;\n bool jd = false;\n for(int i = 1;i <= 400;i++)\n {\n float delta = step * float(i) + offset;\n pos = positionEC.xyz + viewReflectDir * delta;\n float d = -pos.z;\n\n vec4 tmp = czm_projection * vec4(pos,1.0);\n vec3 screenPos = tmp.xyz / tmp.w;\n vec2 uv = vec2(screenPos.x, screenPos.y) * 0.5 + vec2(0.5, 0.5);\n\n if(uv.x > 0.0 && uv.x < 1.0 && uv.y > 0.0 && uv.y < 1.0){\n float dd = getDepth(texture(depthTexture, uv));\n vec4 jzc = toEye(uv, dd);\n dd = -jzc.z;\n if(d>dd){\n if(abs(abs(d) - abs(dd)) <=step){\n jd = true;\n // albedo = texture(colorTexture, uv).rgb;\n albedo = guussColor(uv);\n }\n break;\n }\n }\n }\n if(jd){\n out_FragColor = vec4(mix(color.xyz,albedo,0.5),1.0);\n }else{\n out_FragColor = color;\n }\n}\n",createRainCoverStage=e=>{const t=e.viewer,i=new PostProcessStage({fragmentShader:fragmentShaderSource$1,uniforms:{}});t.scene.postProcessStages.add(i);return{stage:i,remove:()=>{t.scene.postProcessStages.remove(i)}}},fragmentShaderSource="\n float hash(float x)\n {\n return fract(21654.6512 * sin(385.51 * x));\n }\n float hash(vec2 p)\n {\n return fract(1654.65157 * sin(15.5134763 * p.x + 45.5173247 * p.y + 5.21789));\n }\n vec2 hash2(vec2 p)\n {\n return vec2(hash(p * .754), hash(1.5743 * p + 4.5476351));\n }\n vec2 add = vec2(1.0, 0.0);\n vec2 noise2(vec2 x)\n {\n vec2 p = floor(x);\n vec2 f = fract(x);\n f = f * f * (3.0 - 2.0 * f);\n vec2 res = mix(mix(hash2(p),\n hash2(p + add.xy), f.x),\n mix(hash2(p + add.yx), hash2(p + add.xx), f.x), f.y);\n return res;\n }\n vec2 fbm2(vec2 x)\n {\n vec2 r = vec2(0.0);\n float a = 1.0;\n for (int i = 0; i < 8; i++)\n {\n r += noise2(x) * a;\n x *= 2.;\n a *= .5;\n }\n return r;\n }\n float dseg(vec2 ba, vec2 pa)\n {\n float h = clamp(dot(pa, ba) / dot(ba, ba), -0.2, 1.);\n return length(pa - ba * h);\n }\n uniform sampler2D colorTexture;\n uniform float fallInterval;\n uniform float mixFactor;\n in vec2 v_textureCoordinates;\n void main(void){\n vec2 uv = gl_FragCoord.xy;\n float iTime = czm_frameNumber * fallInterval * clamp(fallInterval * 0.1, 0.01, 0.1);\n vec2 p = uv / czm_viewport.zw;\n vec2 d;\n vec2 tgt = vec2(1., -1.);\n float c = 0.;\n if (p.y >= 0.)\n c = (1. - (fbm2((p + .2) * p.y + .1 * iTime)).x) * p.y;\n else\n c = (1. - (fbm2(p + .2 + .1 * iTime)).x) * p.y * p.y;\n vec3 col = vec3(0.);\n vec3 col1 = c * vec3(.3, .5, 1.);\n float mdist = 100000.;\n float t = hash(floor(5. * iTime));\n tgt += 4. * hash2(tgt + t) - 1.5;\n if (hash(t + 2.3) > .6)\n for (int i = 0; i < 100; i++) {\n vec2 dtgt = tgt - p;\n d = .05 * (vec2(-.5, -1.) + hash2(vec2(float(i), t)));\n float dist = dseg(d, dtgt);\n mdist = min(mdist, dist);\n tgt -= d;\n c = exp(-1.2 * dist) + exp(-55. * mdist);\n col = c * vec3(.7, .8, 1.);\n }\n col += col1;\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(col, 0.0), mixFactor);\n}\n ",createLightningStage=e=>{const t=e.viewer.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource,uniforms:{mixFactor:()=>e.mixFactor||.1,fallInterval:()=>e.fallInterval||.8}}));t.selected=[];return{stage:t,remove:()=>{e.viewer.scene.postProcessStages.remove(t)}}},createLightBandCustomShader=e=>new CustomShader({vertexShaderText:vs,fragmentShaderText:fs$1,translucencyMode:0,lightingModel:LightingModel$1.UNLIT,uniforms:{colorEnable:{type:UniformType$1.BOOL,value:e.colorEnable||!0},glowEnable:{type:UniformType$1.BOOL,value:e.glowEnable||!0},baseHeight:{type:UniformType$1.FLOAT,value:e.baseHeight||100},glowRange:{type:UniformType$1.FLOAT,value:e.glowRange||100},uColor:{type:UniformType$1.VEC4,value:e.color||Color.PURPLE},glowTime:{type:UniformType$1.FLOAT,value:e.glowTime||1}}}),vs="\n void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {\n vsOutput.positionMC += 0.1 * vsInput.attributes.normalMC;\n }\n",fs$1="\n void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)\n {\n vec4 position = czm_inverseModelView * vec4(fsInput.attributes.positionEC,1); // 位置 \n vec4 color = uColor;\n color *= vec4(vec3(position.z / baseHeight), 0.5); // 渐变\n bool glEnable = glowEnable;\n // if(position.z > baseHeight) {\n // material.diffuse = vec3(1.0,0.0,0.0);\n // return;\n // }\n if(position.z < 40.0) {\n glEnable = false;\n }\n if(!glEnable){\n material.diffuse = color.rgb;\n return; \n }\n \n // 动态光环\n float time = fract(czm_frameNumber / (360.0 * glowTime));\n time = abs(time - 0.5) * 2.0;\n float diff = step(0.005, abs(clamp(position.z / glowRange, 0.0, 1.0) - time));\n color.rgb += color.rgb * (1.0 - diff);\n material.diffuse = color.rgb;\n } \n",createDroneAnimCustomShader=e=>new CustomShader({fragmentShaderText:fs,uniforms:{color:{type:UniformType$1.VEC4,value:e.color||Color.PURPLE}}}),fs="\n void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {\n vec4 originColor = vec4(material.diffuse,1.0);\n material.diffuse = vec3(mix(originColor,color,0.3));\n material.alpha = 0.8;\n }\n",createOutLineEffect=e=>{const t=e.scene.postProcessStages.add(PostProcessStageLibrary.createSilhouetteStage());t.uniforms.color=Color.YELLOW,t.selected=[];return{stage:t,remove:()=>{}}};var DrawEventType=(e=>(e.DRAW_ADD="drawAdd",e.DRAW_MOVE="drawMove",e.DRAW_PICK="drawPick",e.DRAW_DB_CLICK="drawDbClick",e.DRAW_RIGHT_CLICK="drawRightClick",e))(DrawEventType||{}),types$1=Object.freeze({__proto__:null,DrawEventType:DrawEventType});const DrawMessage={drawStart:{circle:"单击左键绘制圆的中心点,单机右键取消绘制。",rectangle:"单击左键绘制矩形左上角。",point:"单击左键结束绘制,单机右键取消绘制。","vertical-surface-line":"单击左键结束绘制,单机右键取消绘制。",default:"单击左键绘制第一个节点,单机右键取消绘制。"},drawMove:{circle:"单击左键确定圆的半径并结束绘制,单机右键取消绘制。",rectangle:"单击左键结束绘制,单机右键取消绘制。","vertical-line":"单击左键结束绘制,单机右键取消绘制。","vertical-surface-line":"单击左键结束绘制,单机右键取消绘制。","default-dbclick":"单机左键绘制下一个节点,双击左键结束绘制,单机右键撤销上次绘制。",default:"单机左键绘制下一个节点,单机右键撤销上次绘制。"},drawEnd:"单击左键结束绘制,单机右键取消上次绘制",pointEnter:"双击左键编辑节点。",drawEditMove:{default:"移动鼠标修改节点,单击左键确定修改,单机右键取消修改。"}},DrawStyle={point:{color:"rgba(255,255,0,0.8)",pixelSize:8,outlineColor:"rgba(255,255,255,0.8)",outlineWidth:3,disableDepthTestDistance:Number.POSITIVE_INFINITY},polyline:{width:5,color:"rgba(81,255,0,0.8)",depthFailColor:"rgba(255,0,0,0.5)"},polygon:{color:"rgba(255,255,54,0.3)",depthFailColor:"rgba(255,0,0,0.3)"}};class SectorPrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.drawData.__needUpdateAppearance&&this.setAppearance(),this.calcShapePositions(this.positions),this.positions.length<2)return this._primitive;const e=[new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(JSON.parse(JSON.stringify(this.drawData.shapePositions||[]))),perPositionHeight:!0}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?new GroundPrimitive({geometryInstances:e,appearance:this.appearance,asynchronous:!1}):new Primitive$3({geometryInstances:e,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){if(e.length<3)return this.drawData.shapePositions=e,void this.setShapePositions(this.drawData.shapePositions);const t=makePositionsToLnglats(e).map(e=>point([e.longitude,e.latitude])),i=makePositiontoLnglat(e[0]).height,n=calcSpaceDistance(e[0],e[1]),[r,o,a]=[t[0],t[1],t[2]],s=lineArc(r,n/1e3,bearing(r,o),bearing(r,a)).geometry.coordinates.map(e=>[e[0],e[1],i]);s.push([...r.geometry.coordinates,i]),s.unshift([...r.geometry.coordinates,i]),this.drawData.shapePositions=Cartesian3$1.fromDegreesArrayHeights(s.flat()),this.setShapePositions(this.drawData.shapePositions)}}const MathDistance=(e,t)=>Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2),wholeDistance=e=>{let t=0;return e&&Array.isArray(e)&&e.length>0&&e.forEach((i,n)=>{n<e.length-1&&(t+=MathDistance(i,e[n+1]))}),t},getBaseLength=e=>wholeDistance(e)**.99,Mid=(e,t)=>[(e[0]+t[0])/2,(e[1]+t[1])/2],getAzimuth=(e,t)=>{let i;const n=Math.asin(Math.abs(t[1]-e[1])/MathDistance(e,t));return t[1]>=e[1]&&t[0]>=e[0]?i=n+Math.PI:t[1]>=e[1]&&t[0]<e[0]?i=2*Math.PI-n:t[1]<e[1]&&t[0]<e[0]?i=n:t[1]<e[1]&&t[0]>=e[0]&&(i=Math.PI-n),i},getAngleOfThreePoints=(e,t,i)=>{const n=getAzimuth(t,e)-getAzimuth(t,i);return n<0?n+2*Math.PI:n},isClockWise=(e,t,i)=>(i[1]-e[1])*(t[0]-e[0])>(t[1]-e[1])*(i[0]-e[0]),getThirdPoint=(e,t,i,n,r)=>{const o=getAzimuth(e,t),a=r?o+i:o-i,s=n*Math.cos(a),c=n*Math.sin(a);return[t[0]+s,t[1]+c]},getBezierPoints=function(e){if(e.length<=2)return e;const t=[],i=e.length-1;for(let n=0;n<=1;n+=.01){let[r,o]=[0,0];for(let t=0;t<=i;t++){const a=getBinomialFactor(i,t),s=n**t,c=(1-n)**(i-t);r+=a*s*c*e[t][0],o+=a*s*c*e[t][1]}t.push([r,o])}return t.push(e[i]),t},getFactorial=e=>{let t=1;switch(e){case e<=1:t=1;break;case 2===e:t=2;break;case 3===e:t=6;break;case 24===e:t=24;break;case 5===e:t=120;break;default:for(let i=1;i<=e;i++)t*=i}return t},getBinomialFactor=(e,t)=>getFactorial(e)/(getFactorial(t)*getFactorial(e-t));class DoubleArrowPrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;connPoint;tempPoint4;llBodyPnts=[];rrBodyPnts=[];isClockWise;neckWidthFactor;headWidthFactor;headHeightFactor;neckHeightFactor;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.setAppearance(),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.connPoint=[0,0],this.tempPoint4=[0,0],this.isClockWise=!1}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.drawData.__needUpdateAppearance&&this.setAppearance(),this.calcShapePositions(this.positions),this.positions.length<2)return this._primitive;const e=[new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(JSON.parse(JSON.stringify(this.drawData.shapePositions||[]))),perPositionHeight:!0}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?new GroundPrimitive({geometryInstances:e,appearance:this.appearance,asynchronous:!1}):new Primitive$3({geometryInstances:e,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){if(e.length<3)return this.drawData.shapePositions=e,void this.setShapePositions(this.drawData.shapePositions);const t=[],i=makePositionsToLnglats(e).map(e=>(t.push(e.height),[e.longitude,e.latitude])),n=Math.max(...t),[r,o,a]=[i[0],i[1],i[2]],s=i.length;let c,l;3===s?(this.tempPoint4=this.getTempPoint4(r,o,a),this.connPoint=Mid(r,o)):4===s?(this.tempPoint4=i[3],this.connPoint=Mid(r,o)):(this.tempPoint4=i[3],this.connPoint=i[4]),this.isClockWise=isClockWise(r,o,a),this.isClockWise?(c=this.getArrowPoints(r,this.connPoint,this.tempPoint4,!1),l=this.getArrowPoints(this.connPoint,o,a,!0)):(c=this.getArrowPoints(o,this.connPoint,a,!1),l=this.getArrowPoints(this.connPoint,r,this.tempPoint4,!0));const d=c.length,u=(d-5)/2,h=c.slice(0,u),p=c.slice(u,u+5);let A=c.slice(u+5,d);this.llBodyPnts=h;let m=l.slice(0,u);const f=l.slice(u,u+5),g=l.slice(u+5,d);this.rrBodyPnts=g,m=getBezierPoints(m);const C=getBezierPoints(g.concat(h.slice(1)));A=getBezierPoints(A);const y=m.concat(f,C,p,A).filter(e=>e[0]&&e[1]).map(e=>new Cartographic(e[0],e[1],n)),_=makeLnglatsToPositions(y);this.drawData.shapePositions=_,this.drawData.shapePositions.push(_[0]),this.setShapePositions(this.drawData.shapePositions)}getTempPoint4(e,t,i){const n=Mid(e,t),r=MathDistance(n,i),o=getAngleOfThreePoints(e,n,i);let a,s,c,l=[0,0];return o<Math.PI/2?(a=r*Math.sin(o),s=r*Math.cos(o),c=getThirdPoint(e,n,Math.PI/2,a,!1),l=getThirdPoint(n,c,Math.PI/2,s,!0)):o>=Math.PI/2&&o<Math.PI?(a=r*Math.sin(Math.PI-o),s=r*Math.cos(Math.PI-o),c=getThirdPoint(e,n,Math.PI/2,a,!1),l=getThirdPoint(n,c,Math.PI/2,s,!1)):o>=Math.PI&&o<1.5*Math.PI?(a=r*Math.sin(o-Math.PI),s=r*Math.cos(o-Math.PI),c=getThirdPoint(e,n,Math.PI/2,a,!0),l=getThirdPoint(n,c,Math.PI/2,s,!0)):(a=r*Math.sin(2*Math.PI-o),s=r*Math.cos(2*Math.PI-o),c=getThirdPoint(e,n,Math.PI/2,a,!0),l=getThirdPoint(n,c,Math.PI/2,s,!1)),l}getArrowPoints(e,t,i,n){const r=Mid(e,t),o=MathDistance(r,i);let a=getThirdPoint(i,r,0,.3*o,!0),s=getThirdPoint(i,r,0,.5*o,!0);a=getThirdPoint(r,a,Math.PI/2,o/5,n),s=getThirdPoint(r,s,Math.PI/2,o/4,n);const c=[r,a,s,i],l=this.getArrowHeadPoints(c);if(!(l&&Array.isArray(l)&&l.length>0))throw new Error("Interpolation Error");{const i=l[0],n=l[4],r=MathDistance(e,t)/getBaseLength(c)/2,o=this.getArrowBodyPoints(c,i,n,r);if(o){const r=o.length;let a=o.slice(0,r/2),s=o.slice(r/2,r);return a.push(i),s.push(n),a=a.reverse(),a.push(t),s=s.reverse(),s.push(e),a.reverse().concat(l,s)}}}getArrowBodyPoints(e,t,i,n){const r=wholeDistance(e),o=getBaseLength(e)*n,a=(o-MathDistance(t,i))/2;let s=0;const c=[],l=[];for(let t=1;t<e.length-1;t++){const i=getAngleOfThreePoints(e[t-1],e[t],e[t+1])/2;s+=MathDistance(e[t-1],e[t]);const n=(o/2-s/r*a)/Math.sin(i),d=getThirdPoint(e[t-1],e[t],Math.PI-i,n,!0),u=getThirdPoint(e[t-1],e[t],i,n,!1);c.push(d),l.push(u)}return c.concat(l)}getArrowHeadPoints(e){const t=getBaseLength(e)*this.headHeightFactor,i=e[e.length-1],n=t*this.headWidthFactor,r=t*this.neckWidthFactor,o=t*this.neckHeightFactor,a=getThirdPoint(e[e.length-2],i,0,t,!0),s=getThirdPoint(e[e.length-2],i,0,o,!0),c=getThirdPoint(i,a,Math.PI/2,n,!1),l=getThirdPoint(i,a,Math.PI/2,n,!0);return[getThirdPoint(i,s,Math.PI/2,r,!1),c,i,l,getThirdPoint(i,s,Math.PI/2,r,!0)]}}class FineArrowPrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.drawData.__needUpdateAppearance&&this.setAppearance(),this.calcShapePositions(this.positions),this.positions.length<2)return this._primitive;const e=[new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(JSON.parse(JSON.stringify(this.drawData.shapePositions||[]))),perPositionHeight:!0}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?new GroundPrimitive({geometryInstances:e,appearance:this.appearance,asynchronous:!1}):new Primitive$3({geometryInstances:e,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){if(e.length<2)return;const t=makePositionsToLnglats(e).map(e=>point([e.longitude,e.latitude])),i=makePositiontoLnglat(e[0]).height,n=calcSpaceDistances(e)/1e3,[r,o]=[t[0],t[1]],a=bearing(r,o),s=destination(r,.1*n,a-90,{units:"kilometers"}),c=destination(r,.1*n,a+90,{units:"kilometers"}),l=destination(r,.8*n,a-5,{units:"kilometers"}),d=destination(r,.8*n,a+5,{units:"kilometers"}),u=destination(r,.75*n,a-13,{units:"kilometers"}),h=destination(r,.75*n,a+13,{units:"kilometers"}),p=[...s.geometry.coordinates,i,...l.geometry.coordinates,i,...u.geometry.coordinates,i,...o.geometry.coordinates,i,...h.geometry.coordinates,i,...d.geometry.coordinates,i,...c.geometry.coordinates,i,...s.geometry.coordinates,i];this.drawData.shapePositions=Cartesian3$1.fromDegreesArrayHeights(p.flat()),this.setShapePositions(this.drawData.shapePositions)}}const addShapeExtend=()=>{addDrawActions({type:"sector",action:setSectorPrimitive,outline:!0,pointCount:3}),addDrawActions({type:"db-arrow",action:setDbArrowPrimitive,outline:!0,pointCount:4}),addDrawActions({type:"fine-arrow",action:setFineArrowPrimitive,outline:!0,pointCount:2})},setSectorPrimitive=e=>{const t=new SectorPrimitive(e);e.primitives.add(t)},setDbArrowPrimitive=e=>{const t=new DoubleArrowPrimitive(e);e.primitives.add(t)},setFineArrowPrimitive=e=>{const t=new FineArrowPrimitive(e);e.primitives.add(t)},DistanceUnits={cm:"cm","厘米":"厘米",m:"m","米":"米",km:"km","千米":"千米","公里":"公里"},AreaUnits={cm2:"㎡","平方厘米":"平方厘米",m2:"㎡","平方米":"平方米",km2:"km²","平方千米":"平方千米","平方公里":"平方公里","亩":"亩","公顷":"公顷"},UnitDisAndAreaMap={cm:"cm²",m:"㎡",km:"km²","米":"平方米","千米":"平方千米","公里":"平方公里"},convertDistance=(e,t,i)=>t===i?e:e*getDistanceUnitConversion(i),convertArea=(e,t,i)=>t===i?e:e*getAreaUnitConversion(i),getAreaUnitFromDistanceUnit=e=>UnitDisAndAreaMap[e],getDistanceUnitConversion=e=>{switch(e){case DistanceUnits.m:return 1;case DistanceUnits.cm:case DistanceUnits.厘米:return 100;case DistanceUnits.km:return.001;case DistanceUnits.米:return 1;case DistanceUnits.千米:case DistanceUnits.公里:return.001;default:return 1}};function getAreaUnitConversion(e){switch(e){case AreaUnits.cm2:return 1e4;case AreaUnits.m2:return 1;case AreaUnits.km2:return 1e-6;case AreaUnits.平方厘米:return 1e4;case AreaUnits.平方米:return 1;case AreaUnits.平方千米:case AreaUnits.平方公里:return 1e-6;case AreaUnits.亩:return.0015;case AreaUnits.公顷:return 1e-4;default:return 1}}const getPositionsFromShapeAndPolylinePositions=(e,t)=>{let i=e;if("vertical-surface-line"===t&&e.length>=1){const t=e[0],n=Cartographic.fromCartesian(t),r=CesiumMath.toDegrees(n.longitude),o=CesiumMath.toDegrees(n.latitude),a=0;i=[Cartesian3$1.fromDegrees(r,o,n.height),Cartesian3$1.fromDegrees(r,o,a)]}if("vertical-line"===t&&e.length>=2){const t=e[0],n=e[1],r=makePositiontoLnglat(t),o=makePositiontoLnglat(n);let a=r,s=o;r.height>o.height&&(a=o,s=r),console.log(a.longitude,a.latitude,s.height);const c=makeLnglatToPosition(new Cartographic(a.longitude,a.latitude,s.height));i=[makeLnglatToPosition(a),c,makeLnglatToPosition(s),makeLnglatToPosition(a)]}return t.startsWith("curve")&&e.length>2&&(i=getCatmullRomSplinePositions(e)),i},getMeasureResultFromPositions=e=>{let{shapePositions:t,positions:i,shape:n,clampToGround:r,measureUnit:o}=e;t||(t=i),r||(r=!1);const[a,s]=getUnitFromUnitArray(o),c=getAreaUnitFromDistanceUnit("m");e.measureUnit=[a,s];const l=[];if("polyline"===n&&(polylineDistance(i,r,l,a),l.push({value:0,unit:a,position:i[0],positions:i,prefixText:"起点"}),l.push({value:Number(l.reduce((e,t)=>e+t.value,0).toFixed(2)),unit:a,position:i[i.length-1],positions:i})),"vertical-surface-line"===n&&polylineDistance(t,r,l,a),"vertical-line"===n&&(polylineDistance(t,r,l,a),l.forEach((e,t)=>{0===t&&(e.prefixText="高度"),1===t&&(e.prefixText="水平距离"),2===t&&(e.prefixText="空间距离")})),"polygon"===n){polylineDistance(t,r,l,a);const e=convertArea(calcArea(t),c,s);l.push({value:Number(e.toFixed(2)),unit:s,position:calcPoistionCenter(t),positions:t})}if("rectangle"===n){polylineDistance(t,r,l,a);const e=convertArea(calcArea(t),c,s);l.push({value:Number(e.toFixed(2)),unit:s,position:calcPoistionCenter(t),positions:t})}if("circle"===n){const e=r?calcGeodesicDistance(i[0],i[1]):calcSpaceDistance(i[0],i[1]);l.push({value:Number(convertDistance(e,"m",a).toFixed(2)),unit:a,position:i[1],positions:i,prefixText:"半径"});const t=convertArea(e*e*Math.PI,c,s);e>0&&l.push({value:Number(t.toFixed(2)),unit:s,position:i[0],positions:i})}return l},polylineDistance=(e,t,i,n,r)=>{i.push(...e.map((i,r)=>{const o=e[r+1];if(o){let e=t?calcGeodesicDistance(i,o):calcSpaceDistance(i,o);return e=convertDistance(e,"m",n),{value:Number(e.toFixed(2)),unit:n,position:calcPoistionCenter([i,o]),positions:[i,o]}}return null}).filter(e=>e&&e.value>0))},getUnitFromUnitArray=e=>{if(2===e.length)return e;let[t,i]=e;return i||(i=getAreaUnitFromDistanceUnit(t)),[t,i]},getCatmullRomSplinePositions=e=>{const t=e.length,i=calcGeodesicDistances(e),n=Math.floor(i/5),r=[];for(let e=0;e<t;e++)r.push(1.5*e);const o=new CatmullRomSpline({points:e,times:r}),a=[],s=r[0],c=r[r.length-1];for(let e=0;e<n;e++){const t=e/(n-1),i=CesiumMath.lerp(s,c,t),r=o.evaluate(i);a.push(r)}return a},getMetersPerDegree=e=>{const t=CesiumMath.toRadians(.5),i=makeLnglatToPosition(e),n=makeLnglatToPosition(new Cartographic(e.longitude+t,e.latitude,e.height)),r=2*Cartesian3$1.distance(i,n),o=makeLnglatToPosition(new Cartographic(e.longitude,e.latitude+t,e.height));return{lon:r,lat:2*Cartesian3$1.distance(i,o)}},getLineArrowPositions=(e,t=1e3)=>{if(e.length<2)return console.warn("至少需要2个点才能生成箭头"),[];const i=e[e.length-1],n=e[e.length-2],r=makePositiontoLnglat(i),o=makePositiontoLnglat(n),a=r.height,s=r.longitude-o.longitude,c=r.latitude-o.latitude,l=Math.sqrt(s**2+c**2);if(l<1e-12)return console.warn("最后两点经纬度重合,无法生成箭头"),[];const d=s/l,u=c/l,h=getMetersPerDegree(r),p=t/h.lon*CesiumMath.RADIANS_PER_DEGREE,A=t/h.lat*CesiumMath.RADIANS_PER_DEGREE,m=Math.PI/6,f=t*Math.tan(m),g=f/h.lon*CesiumMath.RADIANS_PER_DEGREE,C=f/h.lat*CesiumMath.RADIANS_PER_DEGREE,y=r.longitude-d*p-u*g,_=r.latitude-u*A+d*C,E=r.longitude-d*p+u*g,b=r.latitude-u*A-d*C,I=makeLnglatToPosition(new Cartographic(y,_,a)),S=makeLnglatToPosition(new Cartographic(E,b,a));return[I,makeLnglatToPosition(new Cartographic(r.longitude,r.latitude,a)),S]};class PolylinePrimitive extends BasePrimitive{positions;drawData;appearanceTran;depthFailAppearance;linePrimitiveCollection;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.linePrimitiveCollection=new PrimitiveCollection,this.setAppearance()}getGeometry(){const e=getPositionsFromShapeAndPolylinePositions(this.positions,this.drawData.shape);if(this.drawData.shapePositions=e,"vertical-surface-line"===this.drawData.shape){const e=this.drawData.pointPrimitives.get(1);e&&(e.position=this.drawData.shapePositions[1])}if(this.setShapePositions(e),!(e.length<2))return this.drawData.clampToGround?new GroundPolylineGeometry({positions:e,width:this.drawData.style.polyline.width}):new PolylineGeometry({positions:e,width:this.drawData.style.polyline.width})}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;this.drawData.__needUpdateAppearance&&this.setAppearance();const e=this.getGeometry();if(!e)return;const t=new GeometryInstance({geometry:e,id:`draw-${this.drawData.id}`});return e?this.drawData.clampToGround?new GroundPolylinePrimitive({geometryInstances:t,appearance:this.appearance,asynchronous:!1}):(this.linePrimitiveCollection.removeAll(),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearance,asynchronous:!1})),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearanceTran,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.linePrimitiveCollection):void 0}setAppearance(e){e?this.appearance=e:(this.appearance=new PolylineMaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:Color.fromCssColorString(this.drawData.style.polyline.color)}}})}),this.appearanceTran=new MaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:new Color(0,0,0,0)}}})}),this.depthFailAppearance=new PolylineMaterialAppearance({material:Material$4.fromType(Material$4.PolylineDashType,{color:Color.fromCssColorString(this.drawData.style.polyline.depthFailColor)})}))}}class PolygonPrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;this.drawData.__needUpdateAppearance&&this.setAppearance();const e=JSON.parse(JSON.stringify(this.positions));if(this.calcShapePositions(e),this.positions.length<3)return;const t=[new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(e),perPositionHeight:!0}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?new GroundPrimitive({geometryInstances:t,appearance:this.appearance,asynchronous:!1}):new Primitive$3({geometryInstances:t,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){const t=[...e,e[0]];this.drawData.shapePositions=t,this.setShapePositions(this.drawData.shapePositions)}}class CirclePrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;primitiveCollection;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.primitiveCollection=new PrimitiveCollection,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.positions.length<2)return;this.drawData.__needUpdateAppearance&&this.setAppearance(),this.primitiveCollection.removeAll(),this.calcShapePositions(this.positions);const e=JSON.parse(JSON.stringify(this.positions)),t=this.drawData.clampToGround?calcGeodesicDistance(e[0],e[1]):calcSpaceDistance(e[0],e[1]);if(!t)return;const i=Cartographic.fromCartesian(e[0]).height,n=[new GeometryInstance({geometry:new CircleGeometry({center:e[0],height:i,radius:t}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?this.primitiveCollection.add(new GroundPrimitive({geometryInstances:n,appearance:this.appearance,asynchronous:!1})):this.primitiveCollection.add(new Primitive$3({geometryInstances:n,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.primitiveCollection}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){let t=e;const i=calcSpaceDistance(e[0],e[1]),n=Cartographic.fromCartesian(e[0]).height,r=new CircleOutlineGeometry({center:e[0],height:n,radius:i}),o=CircleOutlineGeometry.createGeometry(r);let a=[];if(o){const e=[].slice.call(o.attributes.position.values);a=Cartesian3$1.unpackArray(e),a.push(a[0]),t=a}this.drawData.shapePositions=t,this.setShapePositions(this.drawData.shapePositions)}}class RectanglePrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;primitiveCollection;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.primitiveCollection=new PrimitiveCollection,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.positions.length<2)return this.primitiveCollection;this.primitiveCollection.removeAll(),this.drawData.__needUpdateAppearance&&this.setAppearance();const e=JSON.parse(JSON.stringify(this.positions));e.length=2,this.calcShapePositions(e);const t=Cartographic.fromCartesian(e[0]).height,i=[new GeometryInstance({geometry:new RectangleGeometry({rectangle:Rectangle.fromCartesianArray(e),height:t}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?this.primitiveCollection.add(new GroundPrimitive({geometryInstances:i,appearance:this.appearance,asynchronous:!1})):this.primitiveCollection.add(new Primitive$3({geometryInstances:i,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.primitiveCollection}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){let t=e;const i=Cartographic.fromCartesian(e[0]).height,n=new RectangleOutlineGeometry({rectangle:Rectangle.fromCartesianArray(e),height:i}),r=RectangleOutlineGeometry.createGeometry(n);let o=[];if(r){const e=[].slice.call(r.attributes.position.values);o=Cartesian3$1.unpackArray(e),o.push(o[0]),t=o}this.drawData.shapePositions=t,this.setShapePositions(this.drawData.shapePositions)}}class MeasurePrimitive extends BasePrimitive{drawData;labelCollection;measureDivs;cesiumWidget;viewer;constructor(e,t){super(),this.viewer=t,this.cesiumWidget=t._element.getElementsByClassName("cesium-widget")[0],this.drawData=e,this.labelCollection=new LabelCollection({scene:t.scene}),this.drawData.measureLabel&&this.setAppearance(),this.measureDivs=[],this.renderDivPosition()}getPrimitive(){return this.drawData.isEditing&&this.drawData.measureLabel?"point"===this.drawData.shape?(this.updatePointDivLabel(),this.labelCollection):this.drawData.shapePositions&&this.drawData.shapePositions.length>=2?(this.updateUnit(this.drawData.measureUnit),this.labelCollection):void 0:this.labelCollection}updateUnit(e){if("point"===this.drawData.shape)return;this.drawData.measureUnit=e,this.clearAllDiv();const t=getMeasureResultFromPositions(this.drawData);this.drawData.measureResult=t,t.forEach((e,t)=>{let i="";e.prefixText?(i=`${e.prefixText}`,e.value&&(i+=`:${e.value}${e.unit}`)):i+=`${e.value}${e.unit}`;const n=this.createDiv(`measure-label-${this.drawData.id}-${t}`,i);this.measureDivs.push({position:e.position,divEle:n})})}updatePointDivLabel(){this.clearAllDiv(),this.drawData.positions.forEach(e=>{const t=makePositiontoLnglat(e),i=this.createDiv(`measure-label-${this.drawData.id}-0`,`经度:${t.longitude.toFixed(6)}\n纬度:${t.latitude.toFixed(6)}\n高度:${t.height.toFixed(6)}`);this.measureDivs.push({position:e,divEle:i})})}renderDivPosition(){this.viewer.scene.postRender.addEventListener(()=>{this.measureDivs.forEach(e=>{const t=this.viewer.scene.cartesianToCanvasCoordinates(e.position);if(t){e.divEle.style.display="block";const i=e.divEle.getBoundingClientRect();e.divEle.style.left=t.x-i.width/2+"px",e.divEle.style.top=t.y-i.height+"px"}else e.divEle.style.display="none"})})}destroy(){super.destroy(),this.clearAllDiv()}setAppearance(){}clearAllDiv(){this.measureDivs.forEach(e=>{e.divEle.remove()}),this.measureDivs=[]}createDiv(e,t,i=48){const n=`\n <div style="\n background: rgba(0, 0, 0, 0.6);\n color: white;\n border-radius: 5px;\n padding: 0 10px 0 10px;\n font-size: 14px;\n white-space: nowrap;\n pointer-events: none;\n ">\n ${t.split("\n").map(e=>`\n <div style="height: 24px; line-height: 24px">\n ${e}\n </div>\n `).join(" ")}\n </div>\n <div style="\n height: ${i}px;\n width: 2px;\n background: rgba(0, 0, 0, 0.6);\n margin: auto;\n ">\n </div>\n `,r=document.createElement("div");return r.id=e,r.innerHTML=n,r.style.position="absolute",r.style.pointerEvents="none",r.className=`measure-label measure-label-${this.drawData.id}`,this.cesiumWidget.appendChild(r),r}calcShapePositions(e){this.setShapePositions(e)}}class ArrowPrimitive extends BasePrimitive{positions;drawData;appearanceTran;depthFailAppearance;linePrimitiveCollection;viewer;arrowLengthScale;constructor(e,t){super(),this.arrowLengthScale=5,this.drawData=e,this.positions=e.positions,this.linePrimitiveCollection=new PrimitiveCollection,this.viewer=t,this.setAppearance()}getGeometry(){if(this.positions.length<2)return;let e=this.positions;e=getPositionsFromShapeAndPolylinePositions(e,this.drawData.shape);let t=calcGeodesicDistances(e)/this.arrowLengthScale;return t>3e6&&(t=3e6),e=getLineArrowPositions(e,t/2),this.calcShapePositions(e),e.length<2?void 0:(this.setShapePositions(e),this.drawData.clampToGround?new GroundPolylineGeometry({positions:e,width:this.drawData.style.polyline.width}):new PolylineGeometry({positions:e,width:this.drawData.style.polyline.width}))}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;this.drawData.__needUpdateAppearance&&this.setAppearance();const e=this.getGeometry();if(!e)return;const t=new GeometryInstance({geometry:e,id:this.drawData.id});return e?this.drawData.clampToGround?new GroundPolylinePrimitive({geometryInstances:t,appearance:this.appearance,asynchronous:!1}):(this.linePrimitiveCollection.removeAll(),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearance,asynchronous:!1})),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearanceTran,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.linePrimitiveCollection):void 0}setAppearance(e){e?this.appearance=e:(this.appearance=new PolylineMaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:Color.fromCssColorString(this.drawData.style.polyline.color)}}})}),this.appearanceTran=new MaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:new Color(0,0,0,0)}}})}),this.depthFailAppearance=new PolylineMaterialAppearance({material:Material$4.fromType(Material$4.PolylineDashType,{color:Color.fromCssColorString(this.drawData.style.polyline.depthFailColor)})}))}calcShapePositions(e){this.setShapePositions(e)}}class OutlinePrimitive extends BasePrimitive{drawData;appearanceTran;depthFailAppearance;linePrimitiveCollection;constructor(e){super(),this.drawData=e,this.linePrimitiveCollection=new PrimitiveCollection,this.setAppearance()}getGeometry(){const e=this.drawData.shapePositions||[];if(this.calcShapePositions(e),!(e.length<2))return this.drawData.clampToGround?new GroundPolylineGeometry({positions:e,width:this.drawData.style.polyline.width}):new PolylineGeometry({positions:e,width:this.drawData.style.polyline.width})}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;this.drawData.__needUpdateAppearance&&this.setAppearance();const e=this.getGeometry();if(!e)return;const t=new GeometryInstance({geometry:e,id:`draw-${this.drawData.id}`});return e?this.drawData.clampToGround?new GroundPolylinePrimitive({geometryInstances:t,appearance:this.appearance,asynchronous:!1}):(this.linePrimitiveCollection.removeAll(),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearance,asynchronous:!1})),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearanceTran,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.linePrimitiveCollection):void 0}setAppearance(e){e?this.appearance=e:(this.appearance=new PolylineMaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:Color.fromCssColorString(this.drawData.style.polyline.color)}}})}),this.appearanceTran=new MaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:new Color(0,0,0,0)}}})}),this.depthFailAppearance=new PolylineMaterialAppearance({material:Material$4.fromType(Material$4.PolylineDashType,{color:Color.fromCssColorString(this.drawData.style.polyline.depthFailColor)})}))}calcShapePositions(e){this.setShapePositions(e)}}const ShapeDrawPointCount={point:1,circle:2,rectangle:2,sector:3,"vertical-surface-line":1,"vertical-line":2},drawActions={},initDrawActions=()=>{drawActions.polyline=e=>{setPolyLinePrimitive(e)},drawActions["polyline-arrow"]=(e,t)=>{setPolyLinePrimitive(e),setArrowPrimitive(e,t)},drawActions.curve=e=>{setPolyLinePrimitive(e)},drawActions["curve-arrow"]=(e,t)=>{setPolyLinePrimitive(e),setArrowPrimitive(e,t)},drawActions["vertical-line"]=e=>{e.clampToGround=!1,setPolyLinePrimitive(e)},drawActions["vertical-surface-line"]=e=>{e.clampToGround=!1,setPolyLinePrimitive(e)},drawActions.polygon=e=>{setPolygonPrimitive(e),setOutlinePrimitive(e)},drawActions.circle=e=>{setCirclePrimitive(e),setOutlinePrimitive(e)},drawActions.rectangle=e=>{setRectanglePrimitive(e),setOutlinePrimitive(e)},addShapeExtend()},addDrawActions=e=>{const{type:t,action:i,outline:n,pointCount:r}=e;drawActions[t]=(e,t)=>{i(e,t),n&&setOutlinePrimitive(e)},r&&(ShapeDrawPointCount[t]=r)},setDrawPrimitive=(e,t,i)=>{drawActions[t]&&drawActions[t](i,e)},setPolyLinePrimitive=e=>{const t=new PolylinePrimitive(e);e.primitives.add(t)},setOutlinePrimitive=e=>{const t=new OutlinePrimitive(e);e.primitives.add(t)},setArrowPrimitive=(e,t)=>{const i=new ArrowPrimitive(e,t);e.primitives.add(i)},setPolygonPrimitive=e=>{const t=new PolygonPrimitive(e);e.primitives.add(t)},setCirclePrimitive=e=>{const t=new CirclePrimitive(e);e.primitives.add(t)},setRectanglePrimitive=e=>{const t=new RectanglePrimitive(e);e.primitives.add(t)},setMeasurePrimitive=(e,t)=>{const i=new MeasurePrimitive(e,t);e.primitives.add(i),e.measurePrimitive=i,e.primitives.raiseToTop(i)},initDrawEvent=(e,t)=>{const i=e.scene,n=new ScreenSpaceEventHandler(i.canvas);let r;e.cesiumWidget.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK),n.setInputAction(n=>{const o=i.pickPosition(n.position),a=(new Date).getTime();if(r&&a-r<270){const i=e.scene.pick(n.position);return void t(DrawEventType.DRAW_DB_CLICK,{position:o,pickPrimitive:i?.primitive,windowPosition:n.position})}t(DrawEventType.DRAW_ADD,{position:o}),r=(new Date).getTime()},ScreenSpaceEventType$1.LEFT_CLICK),n.setInputAction(n=>{const r=e.scene.pick(n.endPosition),o=i.pickPosition(n.endPosition);t(DrawEventType.DRAW_MOVE,{position:o,pickPrimitive:r?.primitive,windowPosition:n.endPosition}),r&&t(DrawEventType.DRAW_PICK,{position:o,pickPrimitive:r?.primitive,windowPosition:n.endPosition})},ScreenSpaceEventType$1.MOUSE_MOVE),n.setInputAction(()=>{t(DrawEventType.DRAW_RIGHT_CLICK,{})},ScreenSpaceEventType$1.RIGHT_CLICK)},EditUIIconImages={add:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAQBJREFUWEft2MsNgkAQBuAZtABCBctBErvATryiRRibkKudGKvgwMFtQGIBumOAYAxCArsTs4fZ8w758032wSJ4PtDzfCABXTvEKhjmhXpka+0a6rueNWB0KgmAdLVLYq6QbAHDvEwDgksdzOAz5pKUgK6tFkERnCogq3iq1Ng8ERRBS4HBjTrKywMAqjnfJCKFAGlTg3ieU9vOJV1lq2O/bjhgcyv59yBt8LXpXzLYBFsE2toKojHX+z75kWc8iwsV0PLm8XVLArotivp/RFrsYiiCLnp1rQiKoKWAHHWWcJ8yZsFF8zbj5eNRt9VwPRp1hGyCrq0cq5eArrLeC74BlkT4KR3TrCoAAAAASUVORK5CYII=",delete:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAY9JREFUWEftmNFRwzAMhiVYAMoC5Y50jjAJ9LFliMIQNI/NJtA1CA9hAHIsgMWZYC5xHVtNajcHzqtl+ctvSZaNMPIPR84HEXDoDv1tBc/XxRMCpFaVEPNqcTXvq6RTwbOsSE8FTfUFBOKNE05NQsxRiK3u4/MEy49F8myDdwJOstcNEN32VWCouhHQu4JetnYPp84tVr4uHl8OGofvd7Ocw8kGnKwL4jjk2lTLhLU2y0guGgE7pI8KdsVkuBhEzDtPGstYEEAkmstyMcmKFRDcN9WyjUk774AKQEE1IW1jyt47IACV1XJ22VRNQqKgN70Im9qyAIASbRdST4qunjEQoB3S1tAGBATQY05iy7ObEDdHLzMmOFPi6KBBFLTBuSC9A5rg6pijqSm79TrpHRC021o7IdrZfbwy8wNpztYacgRlhtuitu38b3E/rt9Z/w+Q9czBVtV9RCpX7I7adTKw2QBAIFy7njz2Bvy+OGXFighS9pvMDjWVdXlKHrg/xFaQ6/DQdhFwqKJRwaEKfgEJRgs46ima/wAAAABJRU5ErkJggg==",remove:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAMdJREFUWEdjZBjkgHGQu49h1IGUxtBoCI6GIKUhQKn+0TQ4GoKUhgCl+kfT4GgIUhoClOofTYM0DUGh6bfrGRgYFSi1BJ9+xn//Dr7NVluASw3eKBaadvs/LR0HM/sfI4Pjh0zVA9jswulAgenXFZj+s9ynjwP/KH7I1HxAkgNBioWn3kr4z8RkT1tH/n/wLlO1kawopq3DiDN9tJghLpxwqxoNwdEQpDQEKNU/mgZHQ5DSEKBU/2gaHA1BSkOAUv2jaXDYhyAAbjwcKU1UyjYAAAAASUVORK5CYII=",move:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAkJJREFUWEftl19SwkAMxpPCARAvgDPijKewnER4BA8hHEJ5FE8CnsIZccZ6AJEDMF1Ny5Zu/6bNMvQBXmk3vyZfvmQRGv7DhvPBGVBaIasZ7M4/XwhoM74eScH0+9YAAzilhuHByttMbq5sQFoBNOE0lh1IMeDF83qJAG52tuSQIsBiODuZrA14+fQxVIhBUwSqA1hFmURcHPQIAIiLuo1TG5CguvP14z/Z1EcYtHzVi4ARpj7sXh3V/iLw30l/ULdhRIAUtDN/723Ht56RUYTpZtyf6f/qwtF7YkAdPAtQAmbdB08KSMF/Hm4WRRmpCkjeyWmc0hJHVlLSiaQ3gHYv/IidR7rM+6CDPZX7ZCFg0ueoW7fj/kqiLfoQ6u7DGcWQuYDHgNNQVSAzAZNwgQkjpDJHXldUSm1DDrTv01nHnmHmOQtGCpA3vsJwnJJ35mvXUbBkySJD5ylAPR04B54EMD7C4kJGBbMkdJn16BK3/FZq21GOc8eZ17lNYmZSeeHA76cgOZlOPpMse9G8zgUMOo3ErWC631c8H3Fk22bKlolCHzQgLRq1rk4ZHGtZIEjSUJneqo46zvhkAXI1VhWQe27pLOYe1FhAXapGLqzhddN3yYLQV9/myg9vwQQR3EdEGkz6pAL09KXJuECFUYIrAFcu8edqazDtk9nhOVZSBF4b0NhUIjM3Q0nhRCU2djtj4uznjvC6qc8XZTCer7gmbWTOOqDegpQCV3JRT+rRWgbrdCjnnTMgJ0tHsxlpcM77f6iGZThXF5iUAAAAAElFTkSuQmCC"};class DrawEditUI{static editUI;_editUi;viewer;_editUiPosition=null;_editPointPrimitive=null;_drawEditEvent;elementId="draw-edit-ui";constructor(e,t){this._editUi=null,this.viewer=e,this.create(),this.setVisible(!1),this.renderPosition(),this._drawEditEvent=t}create(){if(this._editUi=document.getElementById(this.elementId),this._editUi)return this._editUi;const e=document.createElement("DIV");e.id=this.elementId,e.className="draw-edit-ui";const t=document.createElement("DIV");t.title="点击移动节点";const i=document.createElement("img");i.src=EditUIIconImages.move,i.className="draw-edit-icon",t.appendChild(i),t.addEventListener("click",()=>{this._drawEditEvent.drawEditMove&&this._drawEditEvent.drawEditMove(this._editPointPrimitive)});const n=document.createElement("DIV");n.id="addPoint";const r=document.createElement("img");r.src=EditUIIconImages.add,r.title="点击添加节点",r.className="draw-edit-icon",n.appendChild(r),n.addEventListener("click",()=>{this._drawEditEvent.drawEditAdd&&this._drawEditEvent.drawEditAdd(this._editPointPrimitive)});const o=document.createElement("DIV"),a=document.createElement("img");o.id="removePoint",a.src=EditUIIconImages.remove,a.title="点击删除节点",a.className="draw-edit-icon",o.appendChild(a),o.addEventListener("click",()=>{this._drawEditEvent.drawEditRemove&&this._drawEditEvent.drawEditRemove(this._editPointPrimitive)});const s=document.createElement("DIV"),c=document.createElement("img");c.src=EditUIIconImages.delete,c.title="点击删除绘制",c.className="draw-edit-icon",s.appendChild(c),s.addEventListener("click",()=>{this._drawEditEvent.drawDelete&&this._drawEditEvent.drawDelete(this._editPointPrimitive)}),e.appendChild(t),e.appendChild(n),e.appendChild(o),e.appendChild(s),document.body.appendChild(e),this._editUi=e}setAddElementStatus(e){const t=document.getElementById("addPoint"),i=document.getElementById("removePoint");t&&(t.style.display=e?"block":"none"),i&&(i.style.display=e?"block":"none")}static createEditUi(e,t){return DrawEditUI.editUI||(DrawEditUI.editUI=new DrawEditUI(e,t)),DrawEditUI.editUI}showAt(e,t,i){this.setVisible(!0),this._editUiPosition=e,this._editPointPrimitive=t,this.setAddElementStatus(!ShapeDrawPointCount[i])}setVisible(e){this._editUi&&(this._editUi.style.display=e?"flex":"none")}renderPosition(){this.viewer.scene.postRender.addEventListener(()=>{if(this._editUiPosition&&this._editUi&&"flex"===this._editUi.style.display){const e=this.viewer.scene.cartesianToCanvasCoordinates(this._editUiPosition);this._editUi.style.position="fixed",this._editUi.style.top=e.y-28+"px",this._editUi.style.left=`${e.x+15}px`}})}destroy(){DrawEditUI.editUI&&(this._editUi&&this._editUi.parentNode.removeChild(this._editUi),this._editUi=null)}}initDrawActions();const createDrawHandler=e=>{let t;const i=[];let n=new Cartesian3$1(0,0,0);const r=[];let o,a,s;const c=Tooltip.createToolTip(e);let l=!1;initDrawEvent(e,(e,t)=>{o&&(["drawDbClick","drawPick","drawMove","drawRightClick"].includes(e)||o.isEditing)&&m[e]?.(t)});const d=new PrimitiveCollection;d.destroyPrimitives=!1,e.scene.primitives.add(d);const u=()=>{o&&(o.isEditing=!1,o.isDisAdd=!0,C(),_.id===o.id?p():(h(o.id),o={}))},h=e=>{const t=r.findIndex(t=>t.id===e);if(-1===t)return;const i=r[t];i.positions.length=0,r.splice(t,1),v.drawRemove&&v.drawRemove(i),setTimeout(()=>{i.measurePrimitive?.clearAllDiv(),d.remove(i?.primitives)},300)},p=()=>{if(_.id)return _.id="",o.isDisAdd=!0,o.isEditing=!0,_.originPosition?(o.positions.splice(_.index,1,_.originPosition),_.pointPrimitive.position=_.originPosition):o?.positions.splice(_.index,1),v.drawEditEnd&&v.drawEditEnd(o),setTimeout(()=>{o.isEditing=!1,o.isDisAdd=!1},300),n=new Cartesian3$1(0,0,0),a=void 0,void C();if((!ShapeDrawPointCount[o.shape]||ShapeDrawPointCount[o.shape]>2)&&o.positions&&o.positions.length>2){const e=l?2:1,t=o.pointPrimitives.get(o.positions.length-e);return o.pointPrimitives.remove(t),void o?.positions.splice(o.positions.length-e,1)}n=new Cartesian3$1(0,0,0),a=void 0,h(o.id),o={},C()},A=t=>{t||(t=o),e._element.style.cursor="default",n=new Cartesian3$1(0,0,0),t.positions.pop(),t.isDisAdd=!0,setTimeout(()=>{t.isEditing=!1,t.isDisAdd=!1,v.drawEnd&&v.drawEnd(t),o={}},300),a=void 0,s&&(t.pointPrimitives.remove(s),s=void 0),C()},m={drawAdd:({position:e})=>{if(o.positions.push(e),l=!1,_.id)return v.drawEditEnd&&v.drawEditEnd(o),_.id="",void A();S(e,o),v.drawAdd&&v.drawAdd(e,o),o.positions.length>ShapeDrawPointCount[o.shape]&&A()},drawMove:({position:e,windowPosition:t})=>{if(l=!0,y(),e&&!o.isDisAdd&&o.isEditing){if(C(t),_.id)o.positions.splice(_.index,1,e),_.pointPrimitive.position=e;else{const t=o.positions.findIndex(e=>e.x===n.x&&e.y===n.y&&e.z===n.z);o.positions.push(e),-1!==t&&o.positions.splice(t,1),s&&o.pointPrimitives.remove(s),s=S(e,o)}n=e,v.drawMove&&v.drawMove(e,o)}},drawPick:({pickPrimitive:e,windowPosition:t})=>{o.isEditing||e instanceof PointPrimitive&&f(e,t)},drawDbClick:({position:e,windowPosition:t,pickPrimitive:i})=>{if(o.isEditing){if(ShapeDrawPointCount[o.shape])return;A()}else!o.isEditing&&i&&g(e,t,i)},drawRightClick:()=>{o.isEditing?p():t.setVisible(!1)}},f=(t,n)=>{const o=t.id.split("-")[1],s=r.find(e=>e.id===o);if(i.includes(t.id))return;if(!s)return;if(!s.edit)return;e._element.style.cursor="pointer";const l=s.style.point;t.pixelSize=1.5*l.pixelSize,t.outlineWidth=1.5*l.outlineWidth,a=t,c.showAt(n,DrawMessage.pointEnter),c.setVisible(!0)},g=(e,n,o)=>{if(o instanceof PointPrimitive){if(i.includes(o.id))return;const n=o.id.split("-")[1],a=r.find(e=>e.id===n);if(!a)return;if(!a.edit)return;console.log(o),t.showAt(e,o,a.shape),v.drawEditStart&&v.drawEditStart(a)}},C=t=>{if(!c)return void(e._element.style.cursor="default");if(!t||!o.positions)return e._element.style.cursor="default",void c.setVisible(!1);const i=ShapeDrawPointCount[o.shape]?"default":"default-dbclick";_.id?c.showAt(t,DrawMessage.drawEditMove[o.shape]||DrawMessage.drawEditMove.default):ShapeDrawPointCount[o.shape]!==o.positions.length?o.positions.length>1?c.showAt(t,DrawMessage.drawMove[i]||DrawMessage.drawMove[i]):c.showAt(t,DrawMessage.drawStart[i]||DrawMessage.drawStart.default):c.showAt(t,DrawMessage.drawEnd)},y=()=>{if(a){const e=a.id.split("-")[1],t=r.find(t=>t.id===e);if(!t)return;const i=t.style.point;a.pixelSize=i.pixelSize,a.outlineWidth=i.outlineWidth,C()}},_={},E={drawEditAdd:i=>{t.setVisible(!1);const{id:n,index:r,drawData:a}=b(i),s=new Cartesian3$1(i.position.x,i.position.y,i.position.z);a?.positions.splice(r,0,s),o=a;const c=S(s,o);e._element.style.cursor="move",Object.assign(_,{id:n,index:r+1,pointPrimitive:c,originPosition:s}),o.isEditing=!0},drawEditMove:i=>{t.setVisible(!1),e._element.style.cursor="move";const{id:n,index:r,drawData:a}=b(i);o=a,Object.assign(_,{id:n,index:r,pointPrimitive:i,originPosition:new Cartesian3$1(i.position.x,i.position.y,i.position.z)}),o.isEditing=!0},drawEditRemove:e=>{t.setVisible(!1);const{index:i,drawData:n}=b(e);n.isEditing=!0,n.isDisAdd=!0,n?.positions.splice(i,1),n?.pointPrimitives.remove(e),v.drawEditEnd&&v.drawEditEnd(n),setTimeout(()=>{n.isEditing=!1,n.isDisAdd=!1},300)},drawDelete:e=>{t.setVisible(!1);const{id:i}=b(e);h(i)}};t=DrawEditUI.createEditUi(e,E);const b=e=>{const t=e.id.split("-")[1],i=r.find(e=>e.id===t),n=i.positions.findIndex(t=>t.x===e.position.x&&t.y===e.position.y&&t.z===e.position.z);return{id:t,drawData:i,index:n}},I=(e,t)=>{const i=new PrimitiveCollection,n=new PointPrimitiveCollection;i.add(n);const r=JSON.parse(JSON.stringify(DrawStyle));e.style&&(Object.assign(r.point,e.style.point||{}),Object.assign(r.polyline,e.style.polyline||{}),Object.assign(r.polygon,e.style.polygon||{}));const o={id:e.id,edit:e.edit||!1,measure:e.measure||!1,measureLabel:e.measureLabel||!1,disDepthFail:e.disDepthFail||!1,measureUnit:e.measureUnit||["m"],isEditing:!0,shape:e.shape,positions:t,clampToGround:e.clampToGround,pointPrimitives:n,primitives:i,style:r};return d.add(i),t.forEach(e=>{S(e,o)}),o},S=(e,t)=>{const i=t.style.point;return t.pointPrimitives.add({id:`draw-${t.id}-${numberId()}`,position:e,...i,color:Color.fromCssColorString(i.color),outlineColor:Color.fromCssColorString(i.outlineColor),disableDepthTestDistance:Number.POSITIVE_INFINITY})},T=t=>{const i=I({...t},t.positions);i.positions.push(i.positions[i.positions.length-1]),o=i,r.push(i),setDrawPrimitive(e,t.shape,i),t.measure&&setMeasurePrimitive(i,e),i.primitives.raiseToTop(i.pointPrimitives),A(i)},v={};return{draw:t=>{e._element.style.cursor="crosshair",a=void 0,t.id=numberId();const i=I(t,[]);o=i,v.drawStart&&v.drawStart(i),r.push(i),setDrawPrimitive(e,t.shape,i),t.measure&&setMeasurePrimitive(i,e),i.primitives.raiseToTop(i.pointPrimitives)},removeEditing:u,remove:e=>{h(e.id),C()},removeAll:()=>{r.forEach(e=>{e.measurePrimitive?.clearAllDiv()}),d.removeAll(),r.length=0,u()},setDrawStyle:e=>{Object.assign(DrawStyle.point,e.point),Object.assign(DrawStyle.polyline,e.polyline),Object.assign(DrawStyle.polygon,e.polygon)},setDrawItemStyle:(e,t)=>{if(-1===r.findIndex(t=>t.id===e.id))throw new Error("绘制对象不存在");Object.assign(e.style.point,t.point||{}),Object.assign(e.style.polyline,t.polyline||{}),Object.assign(e.style.polygon,t.polygon||{}),console.log(e.pointPrimitives),e.__needUpdateAppearance=!0,e.isEditing=!0,e.pointPrimitives._pointPrimitives.forEach(t=>{t.pixelSize=e.style.point.pixelSize,t.outlineWidth=e.style.point.outlineWidth,t.color=Color.fromCssColorString(e.style.point.color),t.outlineColor=Color.fromCssColorString(e.style.point.outlineColor)}),setTimeout(()=>{e.isEditing=!1,e.__needUpdateAppearance=!1},100)},setClampToGround:(e,t)=>{if(-1===r.findIndex(t=>t.id===e.id))throw new Error("绘制对象不存在");e.clampToGround=t,e.isEditing=!0,setTimeout(()=>{e.isEditing=!1,e.__needUpdateAppearance=!1},100)},Event:v,updateMeasureUnit:(e,t)=>{if(-1===r.findIndex(t=>t.id===e.id))throw new Error("绘制对象不存在");const i=e.primitives._primitives.find(e=>e instanceof MeasurePrimitive);i&&i.updateUnit(t)},reShowDrawData:T,reShowDrawDatas:e=>{e.forEach(e=>{console.log("reshow",e),T(e)})}}};var types=Object.freeze({__proto__:null});const CustomMaterial={PolylineFlow:"PolylineFlow",PolylineTrail:"PolylineTrail",CircleWave:"CircleWave",CircleRaderWave:"CircleRaderWave",CircleRaderFan:"CircleRaderFan",LightWall:"LightWall",CircleAperture:"CircleAperture",RadarScanCircle:"RadarScanCircle",EllipsoidElectric:"EllipsoidElectric",EllipsoidVScan:"EllipsoidVScan",EllipsoidHScan:"EllipsoidHScan",Corridor:"Corridor",Zaps:"Zaps"},initCustomMaterial=()=>{for(const e in CustomMaterial)Material$4[e]=CustomMaterial[e]};initCustomMaterial();const defaultOptions$b={color:"rgba(255,255,255,1)",speed:6*Math.random()};class PolylineTrailMaterialProperty extends BaseMaterialProperty{speed;color;name="";image="";constructor(e){super(),this.createPropertyDescriptors();const t={...defaultOptions$b,...e};this.image=t.image,this.name=`${CustomMaterial.PolylineTrail}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(e,t){return defined$1(t)||(t={}),t.color=Property.getValueOrClonedDefault(this.color,e,Color.WHITE,t.color),t.speed=this.speed,t.image=this.image,t}equals(e){return this===e||e instanceof PolylineTrailMaterialProperty&&this.speed===e.speed&&Property.equals(this.color,e.color)&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{image:this.image,color:Color.fromCssColorString("#ff0000"),speed:this.speed},source:source$9},translucent:()=>!0})}createPropertyDescriptors(){Object.defineProperties(this,{color:createPropertyDescriptor("color")})}}const createTrailMaterial=e=>{const t={...defaultOptions$b,...e};return new Material$4({fabric:{type:`${CustomMaterial.PolylineTrail}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),image:t.image,speed:t.speed},source:source$9},translucent:!0})},source$9="\n uniform sampler2D image;\n uniform vec4 color;\n uniform float speed;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float time = fract(czm_frameNumber * speed / 1000.0);\n vec4 colorImage = texture(image,st);\n vec3 fragColor = color.rgb;\n if(st.t > 0.45 && st.t < 0.55 ) {\n fragColor = vec3(1.0);\n }\n if(color.a == 0.0){\n material.alpha = colorImage.a * 1.5 * fract(st.s - time);\n material.diffuse = colorImage.rgb;\n }else{\n material.alpha = colorImage.a * color.a * 1.5 * smoothstep(.0,1., fract(st.s - time));\n material.diffuse = max(fragColor.rgb * material.alpha , fragColor.rgb);\n }\n return material;\n }\n\n",defaultOptions$a={color:"rgba(255,255,255,1)",speed:6,repeatCount:4,blendColor:!0};class PolylineFlowMaterialProperty extends BaseMaterialProperty{repeatCount;image;speed;color;blend;name="";constructor(e){super(),this.createPropertyDescriptors();const t={...defaultOptions$a,...e};this.name=`${CustomMaterial.PolylineFlow}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.image=t.image,this.repeatCount=t.repeatCount,this.blend=t.blendColor?1:0,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(e,t){return defined$1(t)||(t={}),t.color=Property.getValueOrClonedDefault(this.color,e,Color.WHITE,t.color),t.image=this.image,t.blend=this.blend,t.speed=this.speed,t.repeatCount=this.repeatCount,t}equals(e){return this===e||e instanceof PolylineFlowMaterialProperty&&this.speed===e.speed&&this.repeatCount===e.repeatCount&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:Color.fromCssColorString("#ffffff"),image:"",speed:this.speed,count:this.repeatCount,blend:this.blend},source:source$8},translucent:()=>!0})}createPropertyDescriptors(){Object.defineProperties(this,{color:createPropertyDescriptor("color")})}}const createPoylineFlowMaterial=e=>{const t={...defaultOptions$a,...e};return new Material$4({fabric:{type:CustomMaterial.PolylineFlow+numberId(),uniforms:{color:Color.fromCssColorString(t.color),image:t.image,speed:t.speed,count:t.repeatCount,blend:t.blendColor?1:0},source:source$8},translucent:!0})},source$8="\n uniform vec4 color;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n float time = fract(czm_frameNumber * speed / 1000.0);\n vec2 st = materialInput.st;\n vec4 colorImage = texture(image, vec2(fract( count * st.s - time),fract(st.t)));\n material.alpha = colorImage.a * color.a;\n if(blend > 0.5) {\n material.diffuse = (colorImage.rgb + color.rgb) * 2.0;\n } else {\n material.diffuse = color.rgb * 2.0 ;\n }\n return material;\n }\n",defaultOptions$9={color:"rgba(255,255,0,0.3)",speed:8,count:5,gradient:.3};class CircleWaveMaterialProperty extends BaseMaterialProperty{count;speed;gradient;color;name="";constructor(e){super(),e||(e={});const t={...defaultOptions$9,...e};this.name=`${CustomMaterial.CircleWave}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.count=t.count,this.gradient=t.gradient,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.color=this.color,t.speed=this.speed,t.repeatCount=this.count||defaultOptions$9.count,t}equals(e){return this===e||e instanceof CircleWaveMaterialProperty&&Property.equals(this.color,e.color)&&this.speed===e.speed&&this.count===e.count&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:new Color(1,0,0,.5),speed:this.speed,count:this.count,gradient:this.gradient},source:source$7},translucent:()=>!0})}}const createCircleWaveMaterial=e=>{const t={...defaultOptions$9,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.CircleWave}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed,count:t.count,gradient:t.gradient},source:source$7},translucent:!0})}},source$7="\n uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n if(count == 1.0){\n if(dis > per * 0.5){\n discard;\n }else {\n material.alpha = color.a * dis / per / 2.0;\n }\n } else {\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 999; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n }\n else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n }\n return material;\n }\n",defaultOptions$8={color:"rgba(255,255,255,1)",speed:8};class CircleRaderWaveMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$8,...e};this.name=`${CustomMaterial.CircleRaderWave}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof CircleRaderWaveMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$6},translucent:()=>!0})}}const createRaderWaveMaterial=e=>{const t={...defaultOptions$8,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.CircleRaderWave}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$6},translucent:!0})}},source$6="\n uniform vec4 color;\n uniform float speed;\n #define PI 3.14159265359\n float rand(vec2 co){\n return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec2 pos = st - vec2(0.5);\n float time = czm_frameNumber * speed / 1000.0 ;\n float r = length(pos);\n float t = atan(pos.y, pos.x) - time * 2.5;\n float a = (atan(sin(t), cos(t)) + PI)/(2.0*PI);\n float ta = 0.5;\n float v = smoothstep(ta-0.05,ta+0.05,a) * smoothstep(ta+0.05,ta-0.05,a);\n vec3 flagColor = color.rgb * v;\n float blink = pow(sin(time*1.5)*0.5+0.5, 0.8);\n flagColor = color.rgb * pow(a, 4.0*(.2+blink))*(sin(r*500.0)*.5+.5) ;\n flagColor = flagColor * pow(r, 0.4);\n material.alpha = length(flagColor) * 1.3;\n material.diffuse = flagColor * 3.0;\n return material;\n }\n",defaultOptions$7={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class CircleRaderFanMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$7,...e};this.name=`${CustomMaterial.CircleRaderFan}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof CircleRaderFanMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$5},translucent:()=>!0})}}const createCircleRaderFanMaterial=e=>{const t={...defaultOptions$7,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.CircleRaderFan}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$5},translucent:!0})}},source$5="\n uniform vec4 color;\n uniform float speed;\n #define PI 3.14159265359\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // 绘制边线\n float dis = distance(materialInput.st, vec2(0.5));\n float alpha = step((0.5- 0.01), dis);\n\n material.alpha = alpha;\n material.diffuse = color.rgb;\n\n // 绘制扇区\n vec2 xy = materialInput.st;\n float rx = xy.x - 0.5;\n float ry = xy.y - 0.5;\n float at = atan(ry, rx);\n float per = czm_frameNumber * speed / PI * 3.0 / 200.0;\n // 半径\n float radius = sqrt(rx * rx + ry * ry);\n // 扇区叠加旋转角度\n float current_radians = at + per;\n xy = vec2(cos(current_radians) * radius, sin(current_radians) * radius);\n xy = vec2(xy.x + 0.5, xy.y + 0.5);\n // 扇区渐变色渲染\n if (xy.y - xy.x < 0.0 && xy.x > 0.5 && xy.y > 0.5){\n material.alpha = (alpha + color.a) * dis;\n material.diffuse = color.rgb;\n }\n return material;\n }\n",defaultOptions$6={color:"rgba(255,255,0,0.3)",speed:8};class CircleApertureMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super(),e||(e={});const t={...defaultOptions$6,...e};this.name=`${CustomMaterial.CircleAperture}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.color=this.color,t.speed=this.speed,t}equals(e){return this===e||e instanceof CircleApertureMaterialProperty&&Property.equals(this.color,e.color)&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:new Color(1,0,0,.5),speed:this.speed},source:source$4},translucent:()=>!0})}}const createCircleApertureMaterial=e=>{const t={...defaultOptions$6,...e};return new Material$4({fabric:{type:`${CustomMaterial.CircleAperture}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$4},translucent:!0})},source$4="\n uniform vec4 color;\n uniform float speed;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float d = distance(st, vec2(0.5, 0.5));\n float alpha = step(.15, d) * step(d, .17) + step(.49, d) * step(d, 0.5) + d * d * step(d, 0.5);\n float movingCircleD = fract(czm_frameNumber * speed / 1000.0);\n alpha += step(movingCircleD, d) * step(d, movingCircleD + .015);\n material.diffuse = color.rgb;\n material.alpha = alpha;\n return material;\n }\n",createScanRadarMaterial=e=>{e||(e={});return new Material$4({fabric:{type:`${CustomMaterial.RadarScanCircle}-${numberId()}`,uniforms:{radians:3*Math.PI/8,bgColor:Color.fromCssColorString(e.bgColor||"rgba(0,255,0,0.2)"),sectorColor:Color.fromCssColorString(e.sectorColor||"rgba(152,18,8,.1)"),width:e.width||.003,offset:e.offset||0,count:e.count||3},source:materialSource},translucent:!0})},materialSource="\n uniform vec4 bgColor;\n uniform vec4 sectorColor;\n uniform float count;\n uniform float radians;\n uniform float width;\n uniform float offset;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5));\n\n float alpha;\n vec3 diffuse;\n // 绘制圆圈\n float sp = 1.0 / count / 2.0;\n float m = mod(dis, sp);\n alpha = step(sp * (1.0 - width * 10.0), m);\n // alpha = clamp(alpha, 0.2, 1.0);\n if (alpha < bgColor.a){\n alpha = bgColor.a;\n diffuse = bgColor.rgb;\n } else {\n diffuse = bgColor.rgb;\n }\n material.alpha = alpha;\n material.diffuse = diffuse;\n // 绘制十字线\n if ((st.s > 0.5 - width / 2.0 && st.s < 0.5 + width / 2.0) || (st.t > 0.5 - width / 2.0 && st.t < 0.5 + width / 2.0)) {\n material.alpha = 0.8;\n material.diffuse = bgColor.rgb;\n return material;\n }\n // 绘制光晕\n float ma = mod(dis + offset, 0.5);\n if (ma < 0.25){\n alpha = ma * 3.0 + alpha;\n } else{\n alpha = 3.0 * (0.5 - ma) + alpha;\n }\n material.alpha = alpha;\n material.diffuse = bgColor.rgb;\n // 绘制扇区\n vec2 xy = materialInput.st;\n float rx = xy.x - 0.5;\n float ry = xy.y - 0.5;\n float at = atan(ry, rx);\n // 半径\n float radius = sqrt(rx * rx + ry * ry);\n // 扇区叠加旋转角度\n float current_radians = at + radians;\n xy = vec2(cos(current_radians) * radius, sin(current_radians) * radius);\n xy = vec2(xy.x + 0.5, xy.y + 0.5);\n // 扇区渐变色渲染\n if (xy.y - xy.x < 0.0 && xy.x > 0.5 && xy.y > 0.5){\n material.alpha = alpha + sectorColor.a;\n material.diffuse = sectorColor.rgb;\n }\n return material;\n }\n",defaultOptions$5={color:"rgba(255,255,255,1)",count:3,duration:1500};class LightWallMaterialProperty extends BaseMaterialProperty{duration;count;vertical;direction;color;_time;image;name="";constructor(e){super();const t={...defaultOptions$5,...e};Object.prototype.hasOwnProperty.call(t,"vertical")||(t.vertical=1),this.name=`LightWall-${numberId()}`,this._time=(new Date).getTime(),this.color=Color.fromCssColorString(t.color),this.duration=t.duration,this.count=t.count,this.vertical=t.vertical,this.image=t.image,this.direction=t.direction,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(e,t){return defined$1(t)||(t={}),t.color=this.color,t.image=this.image,t.vertical=this.vertical,t.direction=this.direction,t.count=this.count,t.duration=this.duration,this.duration&&(t.time=((new Date).getTime()-this._time)%this.duration/this.duration),t}equals(e){return this===e||e instanceof LightWallMaterialProperty&&Property.equals(this.color,e.color)&&this.name===e.name&&this.image===e.image&&this.vertical===e.vertical&&this.direction===e.direction&&this.count===e.count&&this.duration===e.duration}init(){const e=getDirectionWallShader({count:this.count,vertical:this.vertical,direction:this.direction});Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,duration:this.duration,vertical:this.vertical,image:this.image,count:this.count,time:-20},source:e},translucent:()=>!0})}}const createLightWallMaterial=e=>{const t={...defaultOptions$5,...e};return{material:new Material$4({fabric:{type:`LightWall${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),duration:t.duration,vertical:t.vertical,image:t.image,count:t.count,time:-20},source:getDirectionWallShader({count:t.count,vertical:t.vertical,direction:t.direction})}})}},getDirectionWallShader=e=>{const t=e.vertical?"vertical":"standard",i=e.direction?"+":"-";let n="czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;";return n+="vertical"===t?`vec4 colorImage = texture(image, vec2(fract(float(${e.count})*st.t ${i} time)),fract(st.s));\n `:`vec4 colorImage = texture(image, vec2(fract(float(${e.count})*st.s ${i} time), fract(st.t)));\n `,n+="vec4 fragColor;\n fragColor.rgb = (colorImage.rgb+color.rgb) / 1.0;\n fragColor = czm_gammaCorrect(fragColor);\n material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a * color.a;\n material.emission = fragColor.rgb;\n return material;\n }",n},defaultOptions$4={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class EllipsoidElectricMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$4,...e};this.name=`${CustomMaterial.EllipsoidElectric}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof EllipsoidElectricMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$3},translucent:()=>!0})}}const createEllipsoidElectricMaterial=e=>{const t={...defaultOptions$4,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.EllipsoidElectric}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$3},translucent:!0})}},source$3="\n uniform vec4 color;\n uniform float speed;\n #define pi 3.1415926535\n #define PI2RAD 0.01745329252\n #define TWO_PI (2. * PI)\n\n float rands(float p){\n return fract(sin(p) * 10000.0);\n }\n\n float noise(vec2 p){\n float time = fract( czm_frameNumber * speed / 1000.0);\n float t = time / 20000.0;\n\n if(t > 1.0) t -= floor(t);\n return rands(p.x * 14. + p.y * sin(t) * 0.5);\n }\n\n vec2 sw(vec2 p){\n return vec2(floor(p.x), floor(p.y));\n }\n\n vec2 se(vec2 p){\n return vec2(ceil(p.x), floor(p.y));\n }\n\n vec2 nw(vec2 p){\n return vec2(floor(p.x), ceil(p.y));\n }\n\n vec2 ne(vec2 p){\n return vec2(ceil(p.x), ceil(p.y));\n }\n\n float smoothNoise(vec2 p){\n vec2 inter = smoothstep(0.0, 1.0, fract(p));\n float s = mix(noise(sw(p)), noise(se(p)), inter.x);\n float n = mix(noise(nw(p)), noise(ne(p)), inter.x);\n return mix(s, n, inter.y);\n }\n\n float fbm(vec2 p){\n float z = 2.0;\n float rz = 0.0;\n vec2 bp = p;\n for(float i = 1.0; i < 6.0; i++){\n rz += abs((smoothNoise(p) - 0.5)* 2.0) / z;\n z *= 2.0;\n p *= 2.0;\n }\n return rz;\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec2 st2 = materialInput.st;\n float time = fract( czm_frameNumber * speed / 1000.0);\n if (st.t < 0.5) {\n discard;\n }\n st *= 4.;\n float rz = fbm(st);\n st /= exp(mod( time * 2.0, pi));\n rz *= pow(15., 0.9);\n vec4 temp = vec4(0);\n temp = mix( color / rz, vec4(color.rgb, 0.1), 0.2);\n if (st2.s < 0.05) {\n temp = mix(vec4(color.rgb, 0.1), temp, st2.s / 0.05);\n }\n if (st2.s > 0.95){\n temp = mix(temp, vec4(color.rgb, 0.1), (st2.s - 0.95) / 0.05);\n }\n material.diffuse = temp.rgb;\n material.alpha = temp.a * 2.0;\n return material;\n }\n",defaultOptions$3={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class EllipsoidVScanMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$3,...e};this.name=`${CustomMaterial.EllipsoidVScan}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof EllipsoidVScanMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$2},translucent:()=>!0})}}const createEllipsoidVScanMaterial=e=>{const t={...defaultOptions$3,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.EllipsoidVScan}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$2},translucent:!0})}},source$2="\n uniform vec4 color;\n uniform float speed;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float time = fract(czm_frameNumber * speed / 1000.0);\n float alpha = abs(smoothstep(0.5,1.,fract( -st.t - time)));\n alpha += .1;\n material.alpha = alpha;\n material.diffuse = color.rgb;\n return material;\n }\n",defaultOptions$2={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class EllipsoidHScanMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$2,...e};this.name=`${CustomMaterial.EllipsoidHScan}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof EllipsoidHScanMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$1},translucent:()=>!0})}}const createEllipsoidHScanMaterial=e=>{const t={...defaultOptions$2,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.EllipsoidHScan}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$1},translucent:!0})}},source$1="\nuniform vec4 color; \nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; \n float t = fract( czm_frameNumber * speed / 1000.0);; \n t *= 1.03;\n float alpha = smoothstep(t- 0.03, t, st.s) * step(-t, -st.s); \n alpha += 0.1;\n alpha *= step(-0.5, -abs(0.5-st.t)); \n material.diffuse = color.rgb;\n material.alpha = alpha;\n return material;\n}\n",defaultOptions$1={color:"rgba(255,255,255,1)",speed:1};class ZapsMaterialProperty extends BaseMaterialProperty{color;speed;name="";constructor(e){super();const t={...defaultOptions$1,...e};this.name=CustomMaterial.Zaps,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(e,t){return defined$1(t)||(t={}),t.color=this.color,t}equals(e){return this===e||e instanceof ZapsMaterialProperty&&Property.equals(this.color,e.color)&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(CustomMaterial.Zaps,{fabric:{type:CustomMaterial.Zaps,uniforms:{uColor:this.color,speed:this.speed,uResolution:new Cartesian2(1024,1024)},source:source},translucent:()=>!0})}}const createZapsMaterial=e=>{const t={...defaultOptions$1,...e};return{material:new Material$4({fabric:{type:CustomMaterial.Zaps,uniforms:{uColor:Color.fromCssColorString(t.color),uSpeed:t.speed,uResolution:new Cartesian2(1024,1024)},source:source}})}},source="\n uniform float uSpeed;\n uniform vec4 uColor;\n uniform vec2 uResolution;\n\n void mainImage(out vec4 o, vec2 u, float time)\n {\n vec2 v = uResolution.xy;\n u = .2*(u+u-v)/v.y;\n\n vec4 z = o = vec4(1,2,3,0);\n for (float a = .5, t = time, i;\n ++i < 19.;\n o += (1. + cos(z+t))\n / length((1.+i*dot(v,v))\n * sin(1.5*u/(.5-dot(u,u)) - 9.*u.yx + t))\n )\n v = cos(++t - 7.*u*pow(a += .03, i)) - 5.*u,\n // use stanh here if shader has black artifacts\n // vvvv\n u += tanh(40. * dot(u *= mat2(cos(i + .02*t - vec4(0,11,33,0)))\n ,u)\n * cos(1e2*u.yx + t)) / 2e2\n + .2 * a * u\n + cos(4./exp(dot(o,o)/1e2) + t) / 3e2;\n\n o = 25.6 / (min(o, 13.) + 164. / o)\n - dot(u, u) / 250.;\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput) {\n float time = fract(czm_frameNumber * speed / 1000.0);\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec4 color = vec4(0.0,0.0,0.0,1.0);\n mainImage(color,materialInput.st * uResolution,time);\n\n material.diffuse = color.rgb * uColor.rgb;\n material.alpha = 0.33 + (sin(time * 0.3) + 1.0) / 3.0;\n return material;\n }\n ";class RadereScanPrimitive extends BasePrimitive{position;options;constructor(e){super(),this.options=e,this.position=e.position,this.setAppearance()}getGeometry(){return new CircleGeometry({center:this.position,radius:this.options.radius})}getPrimitive(){if(!this.needUpdate&&this._primitive)return this._primitive;const e=this.getGeometry();if(!e)return;const t={geometryInstances:new GeometryInstance({geometry:e}),appearance:this.appearance,asynchronous:!1};return this.options.ground?new GroundPrimitive(t):new Primitive$3(t)}setAppearance(e){e?this.appearance=e:(this.appearance=new MaterialAppearance({material:createScanRadarMaterial(this.options.materialOptions||{}),flat:!1,faceForward:!1,translucent:!0,closed:!1,...this.options.appearanceOptions||{}}),this.options.viewer.scene.preRender.addEventListener(()=>{this.appearance.material.uniforms.radians+=3*Math.PI/300}))}}const defaultOptions={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},fround=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),OFFSET_ZOOM=2,OFFSET_ID=3,OFFSET_PARENT=4,OFFSET_NUM=5,OFFSET_PROP=6;class Supercluster{constructor(e){this.options=Object.assign(Object.create(defaultOptions),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:i,maxZoom:n}=this.options;t&&console.time("total time");const r=`prepare ${e.length} points`;t&&console.time(r),this.points=e;const o=[];for(let t=0;t<e.length;t++){const i=e[t];if(!i.geometry)continue;const[n,r]=i.geometry.coordinates,a=fround(lngX(n)),s=fround(latY(r));o.push(a,s,1/0,t,-1,1),this.options.reduce&&o.push(0)}let a=this.trees[n+1]=this._createTree(o);t&&console.timeEnd(r);for(let e=n;e>=i;e--){const i=+Date.now();a=this.trees[e]=this._createTree(this._cluster(a,e)),t&&console.log("z%d: %d clusters in %dms",e,a.numItems,+Date.now()-i)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let i=((e[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[1]));let r=180===e[2]?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)i=-180,r=180;else if(i>r){const e=this.getClusters([i,n,180,o],t),a=this.getClusters([-180,n,r,o],t);return e.concat(a)}const a=this.trees[this._limitZoom(t)],s=a.range(lngX(i),latY(o),lngX(r),latY(n)),c=a.data,l=[];for(const e of s){const t=this.stride*e;l.push(c[t+OFFSET_NUM]>1?getClusterJSON(c,t,this.clusterProps):this.points[c[t+OFFSET_ID]])}return l}getChildren(e){const t=this._getOriginId(e),i=this._getOriginZoom(e),n="No cluster with the specified id.",r=this.trees[i];if(!r)throw new Error(n);const o=r.data;if(t*this.stride>=o.length)throw new Error(n);const a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),s=o[t*this.stride],c=o[t*this.stride+1],l=r.within(s,c,a),d=[];for(const t of l){const i=t*this.stride;o[i+OFFSET_PARENT]===e&&d.push(o[i+OFFSET_NUM]>1?getClusterJSON(o,i,this.clusterProps):this.points[o[i+OFFSET_ID]])}if(0===d.length)throw new Error(n);return d}getLeaves(e,t,i){t=t||10,i=i||0;const n=[];return this._appendLeaves(n,e,t,i,0),n}getTile(e,t,i){const n=this.trees[this._limitZoom(e)],r=Math.pow(2,e),{extent:o,radius:a}=this.options,s=a/o,c=(i-s)/r,l=(i+1+s)/r,d={features:[]};return this._addTileFeatures(n.range((t-s)/r,c,(t+1+s)/r,l),n.data,t,i,r,d),0===t&&this._addTileFeatures(n.range(1-s/r,c,1,l),n.data,r,i,r,d),t===r-1&&this._addTileFeatures(n.range(0,c,s/r,l),n.data,-1,i,r,d),d.features.length?d:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const i=this.getChildren(e);if(t++,1!==i.length)break;e=i[0].properties.cluster_id}return t}_appendLeaves(e,t,i,n,r){const o=this.getChildren(t);for(const t of o){const o=t.properties;if(o&&o.cluster?r+o.point_count<=n?r+=o.point_count:r=this._appendLeaves(e,o.cluster_id,i,n,r):r<n?r++:e.push(t),e.length===i)break}return r}_createTree(e){const t=new KDBush$1(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let i=0;i<e.length;i+=this.stride)t.add(e[i],e[i+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,i,n,r,o){for(const a of e){const e=a*this.stride,s=t[e+OFFSET_NUM]>1;let c,l,d;if(s)c=getClusterProperties(t,e,this.clusterProps),l=t[e],d=t[e+1];else{const i=this.points[t[e+OFFSET_ID]];c=i.properties;const[n,r]=i.geometry.coordinates;l=lngX(n),d=latY(r)}const u={type:1,geometry:[[Math.round(this.options.extent*(l*r-i)),Math.round(this.options.extent*(d*r-n))]],tags:c};let h;h=s||this.options.generateId?t[e+OFFSET_ID]:this.points[t[e+OFFSET_ID]].id,void 0!==h&&(u.id=h),o.features.push(u)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:i,extent:n,reduce:r,minPoints:o}=this.options,a=i/(n*Math.pow(2,t)),s=e.data,c=[],l=this.stride;for(let i=0;i<s.length;i+=l){if(s[i+OFFSET_ZOOM]<=t)continue;s[i+OFFSET_ZOOM]=t;const n=s[i],d=s[i+1],u=e.within(s[i],s[i+1],a),h=s[i+OFFSET_NUM];let p=h;for(const e of u){const i=e*l;s[i+OFFSET_ZOOM]>t&&(p+=s[i+OFFSET_NUM])}if(p>h&&p>=o){let e,o=n*h,a=d*h,A=-1;const m=(i/l<<5)+(t+1)+this.points.length;for(const n of u){const c=n*l;if(s[c+OFFSET_ZOOM]<=t)continue;s[c+OFFSET_ZOOM]=t;const d=s[c+OFFSET_NUM];o+=s[c]*d,a+=s[c+1]*d,s[c+OFFSET_PARENT]=m,r&&(e||(e=this._map(s,i,!0),A=this.clusterProps.length,this.clusterProps.push(e)),r(e,this._map(s,c)))}s[i+OFFSET_PARENT]=m,c.push(o/p,a/p,1/0,m,-1,p),r&&c.push(A)}else{for(let e=0;e<l;e++)c.push(s[i+e]);if(p>1)for(const e of u){const i=e*l;if(!(s[i+OFFSET_ZOOM]<=t)){s[i+OFFSET_ZOOM]=t;for(let e=0;e<l;e++)c.push(s[i+e])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,i){if(e[t+OFFSET_NUM]>1){const n=this.clusterProps[e[t+OFFSET_PROP]];return i?Object.assign({},n):n}const n=this.points[e[t+OFFSET_ID]].properties,r=this.options.map(n);return i&&r===n?Object.assign({},r):r}}function getClusterJSON(e,t,i){return{type:"Feature",id:e[t+OFFSET_ID],properties:getClusterProperties(e,t,i),geometry:{type:"Point",coordinates:[xLng(e[t]),yLat(e[t+1])]}}}function getClusterProperties(e,t,i){const n=e[t+OFFSET_NUM],r=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,o=e[t+OFFSET_PROP],a=-1===o?{}:Object.assign({},i[o]);return Object.assign(a,{cluster:!0,cluster_id:e[t+OFFSET_ID],point_count:n,point_count_abbreviated:r})}function lngX(e){return e/360+.5}function latY(e){const t=Math.sin(e*Math.PI/180),i=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return i<0?0:i>1?1:i}function xLng(e){return 360*(e-.5)}function yLat(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}class PointPrimitives extends BasePrimitive{options;pointPrimitives=new PrimitiveCollection;boundingSphere=new BoundingSphere(Cartesian3$1.ZERO,0);pointCollection;labelCollection;billboardCollection;clusterImageCache={};supercluster;constructor(e){super(),this.options=e,this.clacBoundingSphere(this.options.geoJson),this.options.point&&(this.pointCollection=new PointPrimitiveCollection,this.pointPrimitives.add(this.pointCollection)),this.options.billboard&&(this.billboardCollection=new BillboardCollection({scene:e.viewer.scene}),this.pointPrimitives.add(this.billboardCollection)),this.options.label&&(this.labelCollection=new LabelCollection({scene:e.viewer.scene}),this.pointPrimitives.add(this.labelCollection)),e.cluster?(this.supercluster=new Supercluster({radius:this.options.cluster?.radius||defaultClusterStyle.radius,maxZoom:this.options.cluster?.maxZoom||defaultClusterStyle.maxZoom}),this.initCluster(this.options.viewer,this.options.geoJson)):this.initCollection(this.options.geoJson)}initCollection=async e=>{await this.calcPointHeight(this.options.viewer,e);const t=[];e.features.forEach(e=>{if(t.push(Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],0)),this.options.point){this.pointCollection.add(this.createPoint(e)).properties=e.properties||{}}if(this.options.billboard){this.billboardCollection.add(this.createBillboard(e)).properties=e.properties||{}}if(this.options.label){this.labelCollection.add(this.createLabel(e)).properties=e.properties||{}}})};clacBoundingSphere(e){const t=e.features.map(e=>Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],0));BoundingSphere.fromPoints(t,this.boundingSphere)}createPoint(e){const t={...defaultPointStyle,...this.options.point,...e.properties?.style?.point};return{id:numberId(),position:Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],e.geometry.coordinates[2]),color:Color.fromCssColorString(t.color),pixelSize:t.pixelSize,outlineColor:Color.fromCssColorString(t.outlineColor),outlineWidth:t.outlineWidth,scaleByDistance:t.scaleByDistance,translucencyByDistance:t.translucencyByDistance,disableDepthTestDistance:t.disableDepthTestDistance,distanceDisplayCondition:t.distanceDisplayCondition}}createBillboard(e){const t={...defaultBillStyle,...this.options.billboard,...e.properties?.style?.billboard};return{id:numberId(),position:Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],e.geometry.coordinates[2]||0),image:t.image,scale:t.scale,width:e.properties?.cluster?void 0:t.width,height:e.properties?.cluster?void 0:t.height,color:e.properties?.cluster?void 0:Color.fromCssColorString(t.color),pixelOffset:Cartesian2.fromArray(t?.pixelOffset),horizontalOrigin:t.horizontalOrigin,verticalOrigin:t.verticalOrigin,heightReference:t.heightReference,scaleByDistance:t.scaleByDistance,translucencyByDistance:t.translucencyByDistance,disableDepthTestDistance:t.disableDepthTestDistance,distanceDisplayCondition:t.distanceDisplayCondition}}createLabel(e){const t={...defaultLabelStyle,...this.options.label,...e.properties?.style?.label};return{id:numberId(),position:Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],e.geometry.coordinates[2]||0),text:e.properties?.[t?.field]||t?.field,font:t?.font,fillColor:Color.fromCssColorString(t?.fillColor),outlineColor:Color.fromCssColorString(t?.outlineColor),outlineWidth:t?.outlineWidth,style:t?.style,scale:t?.scale,showBackground:t?.showBackground,backgroundColor:Color.fromCssColorString(t?.backgroundColor),backgroundPadding:Cartesian2.fromArray(t?.backgroundPadding),pixelOffset:Cartesian2.fromArray(t?.pixelOffset),horizontalOrigin:t.horizontalOrigin,verticalOrigin:t.verticalOrigin,heightReference:t?.heightReference,scaleByDistance:t?.scaleByDistance,translucencyByDistance:t.translucencyByDistance,disableDepthTestDistance:t?.disableDepthTestDistance,distanceDisplayCondition:t.distanceDisplayCondition}}initCluster=async(e,t)=>{this.supercluster.load(t.features);let i=getTimestamp();this.loadCluster(e),e.camera.changed.addEventListener(()=>{getTimestamp()-i<=500||(i=getTimestamp(),this.loadCluster(e))})};flyToChildByClusterId(e){const t=this.supercluster?.getChildren(e),i=t?.map(e=>Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],0)),n=BoundingSphere.fromPoints(i);return this.options.viewer.camera.flyToBoundingSphere(n),t}loadCluster=e=>{const t=calcZoomFromCameraHeight(e.camera),i=e.camera.computeViewRectangle(),n=this.supercluster.getClusters([CesiumMath.toDegrees(i.west),CesiumMath.toDegrees(i.south),CesiumMath.toDegrees(i.east),CesiumMath.toDegrees(i.north)],t);this.clearCollection();const r=this.options.cluster.colorsByRate||defaultClusterStyle.colorsByRate,o={type:"FeatureCollection",features:n.map(e=>{const i=e.properties.point_count/this.options.geoJson.features.length,n=Object.keys(r).find(e=>i>Number(e))||"#ff0000";if(e.properties.cluster){const i=this.getClusterImageByCount(r[n],e.properties.point_count,t),o=16*(String(e.properties.point_count).length+1);e.properties.style={...e.properties.style,billboard:{...e.properties.style?.billboard,image:i,pixelOffset:[0,-o/12]}}}return e})};this.initCollection(o)};getClusterImageByCount(e,t,i){if(!this.clusterImageCache[t+e]){const n=16*(String(t).length+1);let r=-Math.PI/12;const o=Math.PI/2,a=Math.PI/6,s=document.createElement("canvas");s.width=n,s.height=n;const c=s.getContext("2d");c.save(),c.scale(n/24,n/24),c.beginPath(),c.arc(12,12,6,0,2*Math.PI),c.fillStyle=e,c.fill(),c.closePath(),c.lineWidth=2,c.fillStyle="rgba(255,255,255,1)",c.font=`${this.calcfontSize(i)}px Microsoft YaHei`,c.textAlign="center",c.textBaseline="middle",c.fillText(`${t}`,11.5,12.5);for(let t=0;t<3;t++)c.beginPath(),c.arc(12,12,8,r,r+o,!1),c.strokeStyle=Color.fromCssColorString(e).withAlpha(.4).toCssColorString(),c.stroke(),c.arc(12,12,11,r,r+o,!1),c.strokeStyle=Color.fromCssColorString(e).withAlpha(.2).toCssColorString(),c.stroke(),c.closePath(),r=r+o+a;c.restore(),this.clusterImageCache[t+e]=s.toDataURL()}return this.clusterImageCache[t+e]}calcfontSize(e){return e<4?4:e-1}async calcPointHeight(e,t){if(this.options.calcHeight)if(e.scene.terrainProvider instanceof EllipsoidTerrainProvider)t.features.forEach(e=>{3===e.geometry.coordinates.length?e.geometry.coordinates[2]=0:e.geometry.coordinates.push(0)});else{const i=e.scene.terrainProvider,n=t.features.map(e=>Cartographic.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1])),r=await sampleTerrainMostDetailed(i,n);t.features.forEach((e,t)=>{3===e.geometry.coordinates.length?e.geometry.coordinates[2]=r[t].height:e.geometry.coordinates.push(r[t].height)})}}clearCollection(){this.pointCollection?.removeAll(),this.billboardCollection?.removeAll(),this.labelCollection?.removeAll()}remove(){}removeAll(){this.clearCollection(),this.pointPrimitives.removeAll()}getPrimitive(){return this.pointPrimitives}}const defaultPointStyle={color:"rgba(81,255,0,0.8)",pixelSize:10,outlineColor:"rgba(255,0,0,0.8)",outlineWidth:1},defaultLabelStyle={font:"20px sans-serif",fillColor:"rgba(255,255,255,0.8)",outlineColor:"rgba(0,0,0,0.8)",backgroundColor:"rgba(0,0,0,1)",outlineWidth:2,pixelOffset:[0,0],backgroundPadding:[0,0],scale:1,disableDepthTestDistance:0,horizontalOrigin:0,verticalOrigin:0,heightReference:HeightReference$1.CLAMP_TO_GROUND},defaultBillStyle={image:"/icons/cesium-marker.png",scale:1,color:"rgba(255,0,0,1)",rotation:0,width:32,height:32,horizontalOrigin:0,verticalOrigin:0,pixelOffset:[0,-16],heightReference:HeightReference$1.CLAMP_TO_GROUND},defaultClusterStyle={radius:60,maxZoom:25,colorsByRate:{.1:"#ff0000",.01:"#ff00ff",.001:"blue",1e-4:"#00ff00"}},lineDefaultStyle$1={width:2,color:"rgba(0,255,0,0.8)"};class GroundPolylinePrimitives extends BasePrimitive{options;polylinePrimitives;constructor(e){super(),this.options=e,this.polylinePrimitives=void 0,this.options.material&&this.setMaterialAppearance(),this.initCollection()}initCollection(){const e=[],t=[];let i;this.options.geoJson.features.forEach(e=>{"MultiLineString"===e.geometry.type?e.geometry.coordinates.forEach(i=>{t.push({coordinates:i,properties:e.properties})}):t.push({coordinates:e.geometry.coordinates,properties:e.properties})}),t.forEach(t=>{const i=t.coordinates.map(e=>Cartesian3$1.fromDegrees(e[0],e[1],e[2])),n={...lineDefaultStyle$1,...this.options?.line,...t.properties?.style?.line};e.push(new GeometryInstance({id:numberId(),geometry:new GroundPolylineGeometry({positions:i,width:n?.width}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(Color.fromCssColorString(n.color))}}))}),i=this.appearance?this.appearance:new PolylineColorAppearance,this.polylinePrimitives=new GroundPolylinePrimitive({geometryInstances:e,appearance:i})}getPrimitive(){return this.polylinePrimitives}setMaterialAppearance(){this.appearance=new MaterialAppearance({material:this.options.material})}}const lineDefaultStyle={width:2,color:"rgba(0,255,0,0.8)"};class GroundPolygonPrimitives extends BasePrimitive{options;primitives;constructor(e){super(),this.options=e,this.primitives=void 0,this.initCollection()}initCollection(){const e=[];this.options.geoJson.features.forEach(t=>{let i;i="Polygon"===t.geometry.type?new PolygonHierarchy(Cartesian3$1.fromDegreesArray(t.geometry.coordinates[0].flat())):parseMPolygonToHierarchy(t.geometry);const n={...lineDefaultStyle,...this.options?.line,...t.properties?.style?.line},r=numberId();t.properties&&(t.properties.id=r);const o=new GeometryInstance({id:r,geometry:new PolygonGeometry({polygonHierarchy:i}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(Color.fromCssColorString(n.color))}});e.push(o),o.properties=t.properties}),this.primitives=new GroundPrimitive({geometryInstances:e,appearance:new PerInstanceColorAppearance({})})}getPrimitive(){return this.primitives}getAppearance(e){this.appearance=e||new PolylineMaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString("rgba(81,255,0,0.8)")})})}}const parseMPolygonToHierarchy=e=>new PolygonHierarchy(Cartesian3$1.fromDegreesArray(e.coordinates[0][0].flat()));function sortKD(e,t,i,n,r,o){if(r-n<=i)return;const a=n+r>>1;select(e,t,a,n,r,o%2),sortKD(e,t,i,n,a-1,o+1),sortKD(e,t,i,a+1,r,o+1)}function select(e,t,i,n,r,o){for(;r>n;){if(r-n>600){const a=r-n+1,s=i-n+1,c=Math.log(a),l=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*l*(a-l)/a)*(s-a/2<0?-1:1);select(e,t,i,Math.max(n,Math.floor(i-s*l/a+d)),Math.min(r,Math.floor(i+(a-s)*l/a+d)),o)}const a=t[2*i+o];let s=n,c=r;for(swapItem(e,t,n,i),t[2*r+o]>a&&swapItem(e,t,n,r);s<c;){for(swapItem(e,t,s,c),s++,c--;t[2*s+o]<a;)s++;for(;t[2*c+o]>a;)c--}t[2*n+o]===a?swapItem(e,t,n,c):(c++,swapItem(e,t,c,r)),c<=i&&(n=c+1),i<=c&&(r=c-1)}}function swapItem(e,t,i,n){swap(e,i,n),swap(t,2*i,2*n),swap(t,2*i+1,2*n+1)}function swap(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function range(e,t,i,n,r,o,a){const s=[0,e.length-1,0],c=[];let l,d;for(;s.length;){const u=s.pop(),h=s.pop(),p=s.pop();if(h-p<=a){for(let a=p;a<=h;a++)l=t[2*a],d=t[2*a+1],l>=i&&l<=r&&d>=n&&d<=o&&c.push(e[a]);continue}const A=Math.floor((p+h)/2);l=t[2*A],d=t[2*A+1],l>=i&&l<=r&&d>=n&&d<=o&&c.push(e[A]);const m=(u+1)%2;(0===u?i<=l:n<=d)&&(s.push(p),s.push(A-1),s.push(m)),(0===u?r>=l:o>=d)&&(s.push(A+1),s.push(h),s.push(m))}return c}function within(e,t,i,n,r,o){const a=[0,e.length-1,0],s=[],c=r*r;for(;a.length;){const l=a.pop(),d=a.pop(),u=a.pop();if(d-u<=o){for(let r=u;r<=d;r++)sqDist(t[2*r],t[2*r+1],i,n)<=c&&s.push(e[r]);continue}const h=Math.floor((u+d)/2),p=t[2*h],A=t[2*h+1];sqDist(p,A,i,n)<=c&&s.push(e[h]);const m=(l+1)%2;(0===l?i-r<=p:n-r<=A)&&(a.push(u),a.push(h-1),a.push(m)),(0===l?i+r>=p:n+r>=A)&&(a.push(h+1),a.push(d),a.push(m))}return s}function sqDist(e,t,i,n){const r=e-i,o=t-n;return r*r+o*o}const defaultGetX=e=>e[0],defaultGetY=e=>e[1];class KDBush{constructor(e,t=defaultGetX,i=defaultGetY,n=64,r=Float64Array){this.nodeSize=n,this.points=e;const o=e.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(e.length),s=this.coords=new r(2*e.length);for(let n=0;n<e.length;n++)a[n]=n,s[2*n]=t(e[n]),s[2*n+1]=i(e[n]);sortKD(a,s,n,0,a.length-1,0)}range(e,t,i,n){return range(this.ids,this.coords,e,t,i,n,this.nodeSize)}within(e,t,i){return within(this.ids,this.coords,e,t,i,this.nodeSize)}}function PointClusterPrimitives(e){e=(void 0)(e,(void 0).EMPTY_OBJECT),this._enabled=(void 0)(e.enabled,!1),this._pixelRange=(void 0)(e.pixelRange,80),this._minimumClusterSize=(void 0)(e.minimumClusterSize,2),this._clusterBillboards=(void 0)(e.clusterBillboards,!0),this._clusterLabels=(void 0)(e.clusterLabels,!0),this._clusterPoints=(void 0)(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 Event,this.show=(void 0)(e.show,!0)}function getX(e){return e.coord.x}function getY(e){return e.coord.y}function expandBoundingBox(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}const labelBoundingBoxScratch=new BoundingRectangle;function getBoundingBox(e,t,i,n,r){if(defined$1(e._labelCollection)&&n._clusterLabels?r=Label.getScreenSpaceBoundingBox(e,t,r):defined$1(e._billboardCollection)&&n._clusterBillboards?r=Billboard.getScreenSpaceBoundingBox(e,t,r):defined$1(e._pointPrimitiveCollection)&&n._clusterPoints&&(r=PointPrimitive.getScreenSpaceBoundingBox(e,t,r)),expandBoundingBox(r,i),n._clusterLabels&&!defined$1(e._labelCollection)&&defined$1(e.id)&&hasLabelIndex(n,e.id.id)&&defined$1(e.id._label)){const o=n._collectionIndicesByEntity[e.id.id].labelIndex,a=n._labelCollection.get(o),s=Label.getScreenSpaceBoundingBox(a,t,labelBoundingBoxScratch);expandBoundingBox(s,i),r=BoundingRectangle.union(r,s,r)}return r}function addNonClusteredItem(e,t){if(e.clusterShow=!0,!defined$1(e._labelCollection)&&defined$1(e.id)&&hasLabelIndex(t,e.id.id)&&defined$1(e.id._label)){const i=t._collectionIndicesByEntity[e.id.id].labelIndex;t._labelCollection.get(i).clusterShow=!0}}function addCluster(e,t,i,n){const r={billboard:n._clusterBillboardCollection.add(),label:n._clusterLabelCollection.add(),point:n._clusterPointCollection.add()};r.billboard.show=!1,r.point.show=!1,r.label.show=!0,r.label.text=t.toLocaleString(),r.label.id=i,r.billboard.position=r.label.position=r.point.position=e,n._clusterEvent.raiseEvent(i,r)}function hasLabelIndex(e,t){return defined$1(e)&&defined$1(e._collectionIndicesByEntity[t])&&defined$1(e._collectionIndicesByEntity[t].labelIndex)}function getScreenSpacePositions(e,t,i,n,r){if(!defined$1(e))return;const o=e.length;for(let a=0;a<o;++a){const o=e.get(a);if(o.clusterShow=!1,!o.show||r._scene.mode===SceneMode$2.SCENE3D&&!n.isPointVisible(o.position))continue;const s=o.computeScreenSpacePosition(i);defined$1(s)&&t.push({index:a,collection:e,clustered:!1,coord:s})}}const pointBoundinRectangleScratch=new BoundingRectangle,totalBoundingRectangleScratch=new BoundingRectangle,neighborBoundingRectangleScratch=new BoundingRectangle;function createDeclutterCallback(e){return function(t){if(defined$1(t)&&t<.05||!e.enabled)return;const i=e._scene,n=e._labelCollection,r=e._billboardCollection,o=e._pointCollection;if(!defined$1(n)&&!defined$1(r)&&!defined$1(o)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let a=e._clusterLabelCollection,s=e._clusterBillboardCollection,c=e._clusterPointCollection;defined$1(a)?a.removeAll():a=e._clusterLabelCollection=new LabelCollection({scene:i}),defined$1(s)?s.removeAll():s=e._clusterBillboardCollection=new BillboardCollection({scene:i}),defined$1(c)?c.removeAll():c=e._clusterPointCollection=new PointPrimitiveCollection;const l=e._pixelRange,d=e._minimumClusterSize,u=e._previousClusters,h=[],p=e._previousHeight,A=i.camera.positionCartographic.height,m=new EllipsoidalOccluder(i.mapProjection.ellipsoid,i.camera.positionWC),f=[];let g,C,y,_,E,b,I,S,T,v,x,w;e._clusterLabels&&getScreenSpacePositions(n,f,i,m,e),e._clusterBillboards&&getScreenSpacePositions(r,f,i,m,e),e._clusterPoints&&getScreenSpacePositions(o,f,i,m,e);const D=new KDBush(f,getX,getY,64,Int32Array);if(A<p)for(y=u.length,g=0;g<y;++g){const t=u[g];if(!m.isPointVisible(t.position))continue;const n=Billboard._computeScreenSpacePosition(Matrix4$1.IDENTITY,t.position,Cartesian3$1.ZERO,Cartesian2.ZERO,i);if(!defined$1(n))continue;const r=1-A/p;let o=t.width=t.width*r,a=t.height=t.height*r;o=Math.max(o,t.minimumWidth),a=Math.max(a,t.minimumHeight);const s=n.x-.5*o,c=n.y-.5*a,l=n.x+o,y=n.y+a;for(E=D.range(s,c,l,y),b=E.length,v=0,T=[],C=0;C<b;++C)I=E[C],S=f[I],S.clustered||(++v,x=S.collection,w=S.index,T.push(x.get(w).id));if(v>=d)for(addCluster(t.position,v,T,e),h.push(t),C=0;C<b;++C)f[E[C]].clustered=!0}for(y=f.length,g=0;g<y;++g){const t=f[g];if(t.clustered)continue;t.clustered=!0,x=t.collection,w=t.index;const i=x.get(w);_=getBoundingBox(i,t.coord,l,e,pointBoundinRectangleScratch);const n=BoundingRectangle.clone(_,totalBoundingRectangleScratch);E=D.range(_.x,_.y,_.x+_.width,_.y+_.height),b=E.length;const r=Cartesian3$1.clone(i.position);for(v=1,T=[i.id],C=0;C<b;++C)if(I=E[C],S=f[I],!S.clustered){const t=S.collection.get(S.index),i=getBoundingBox(t,S.coord,l,e,neighborBoundingRectangleScratch);Cartesian3$1.add(t.position,r,r),BoundingRectangle.union(n,i,n),++v,T.push(t.id)}if(v>=d){const t=Cartesian3$1.multiplyByScalar(r,1/v,r);for(addCluster(t,v,T,e),h.push({position:t,width:n.width,height:n.height,minimumWidth:_.width,minimumHeight:_.height}),C=0;C<b;++C)f[E[C]].clustered=!0}else addNonClusteredItem(i,e)}0===a.length&&(a.destroy(),e._clusterLabelCollection=void 0),0===s.length&&(s.destroy(),e._clusterBillboardCollection=void 0),0===c.length&&(c.destroy(),e._clusterPointCollection=void 0),e._previousClusters=h,e._previousHeight=A}}function createGetEntity(e,t,i,n){return function(r){let o=this[e];defined$1(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let a,s,c=this._collectionIndicesByEntity[r.id];if(defined$1(c)||(c=this._collectionIndicesByEntity[r.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),defined$1(o)&&defined$1(c[n]))return o.get(c[n]);defined$1(o)||(o=this[e]=new t({scene:this._scene}));const l=this[i];return l.length>0?(a=l.pop(),s=o.get(a)):(s=o.add(),a=o.length-1),c[n]=a,Promise.resolve().then(()=>{this._clusterDirty=!0}),s}}function removeEntityIndicesIfUnused(e,t){const i=e._collectionIndicesByEntity[t];defined$1(i.billboardIndex)||defined$1(i.labelIndex)||defined$1(i.pointIndex)||delete e._collectionIndicesByEntity[t]}function disableCollectionClustering(e){if(!defined$1(e))return;const t=e.length;for(let i=0;i<t;++i)e.get(i).clusterShow=!0}function updateEnable(e){e.enabled||(defined$1(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),defined$1(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),defined$1(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,disableCollectionClustering(e._labelCollection),disableCollectionClustering(e._billboardCollection),disableCollectionClustering(e._pointCollection))}PointClusterPrimitives.prototype._initialize=function(e){this._scene=e;const t=createDeclutterCallback(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(PointClusterPrimitives.prototype,{enabled:{get(){return this._enabled},set(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get(){return this._pixelRange},set(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get(){return this._minimumClusterSize},set(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get(){return this._clusterEvent}},clusterBillboards:{get(){return this._clusterBillboards},set(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get(){return this._clusterLabels},set(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get(){return this._clusterPoints},set(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),PointClusterPrimitives.prototype.getLabel=createGetEntity("_labelCollection",LabelCollection,"_unusedLabelIndices","labelIndex"),PointClusterPrimitives.prototype.removeLabel=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!defined$1(this._labelCollection)||!defined$1(t)||!defined$1(t.labelIndex))return;const i=t.labelIndex;t.labelIndex=void 0,removeEntityIndicesIfUnused(this,e.id);const n=this._labelCollection.get(i);n.show=!1,n.text="",n.id=void 0,this._unusedLabelIndices.push(i),this._clusterDirty=!0},PointClusterPrimitives.prototype.getBillboard=createGetEntity("_billboardCollection",BillboardCollection,"_unusedBillboardIndices","billboardIndex"),PointClusterPrimitives.prototype.removeBillboard=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!defined$1(this._billboardCollection)||!defined$1(t)||!defined$1(t.billboardIndex))return;const i=t.billboardIndex;t.billboardIndex=void 0,removeEntityIndicesIfUnused(this,e.id);const n=this._billboardCollection.get(i);n.id=void 0,n.show=!1,n.image=void 0,this._unusedBillboardIndices.push(i),this._clusterDirty=!0},PointClusterPrimitives.prototype.getPoint=createGetEntity("_pointCollection",PointPrimitiveCollection,"_unusedPointIndices","pointIndex"),PointClusterPrimitives.prototype.removePoint=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!defined$1(this._pointCollection)||!defined$1(t)||!defined$1(t.pointIndex))return;const i=t.pointIndex;t.pointIndex=void 0,removeEntityIndicesIfUnused(this,e.id);const n=this._pointCollection.get(i);n.show=!1,n.id=void 0,this._unusedPointIndices.push(i),this._clusterDirty=!0},PointClusterPrimitives.prototype.update=function(e){if(!this.show)return;let t;defined$1(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),defined$1(this._billboardCollection)&&this._billboardCollection.length>0&&!defined$1(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,updateEnable(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),defined$1(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),defined$1(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),defined$1(this._clusterPointCollection)&&this._clusterPointCollection.update(e),defined$1(this._labelCollection)&&this._labelCollection.update(e),defined$1(this._billboardCollection)&&this._billboardCollection.update(e),defined$1(this._pointCollection)&&this._pointCollection.update(e)},PointClusterPrimitives.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(),defined$1(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};class CircleAperturePrimitive extends BasePrimitive{position;options;constructor(e){super(),this.options=e,this.position=e.position,this.setAppearance()}getGeometry(){return new CircleGeometry({center:this.position,radius:this.options.radius})}getPrimitive(){if(!this.needUpdate&&this._primitive)return this._primitive;this.needUpdate=!1;const e=this.getGeometry();if(!e)return;const t={geometryInstances:new GeometryInstance({geometry:e}),appearance:this.appearance,asynchronous:!1};return this.options.ground?new GroundPrimitive(t):new Primitive$3(t)}setAppearance(e){this.appearance=e||new MaterialAppearance({material:createCircleApertureMaterial(this.options.materialOptions),flat:!1,faceForward:!1,translucent:!0,closed:!1})}}class GridPrimitives extends BasePrimitive{gridPrimitiveCollection=new PrimitiveCollection;polygonPrimitive;outlinePrimitive;options;constructor(e){super(),this.options=e,this.gridPrimitiveCollection=new PrimitiveCollection,this.polygonPrimitive=this.createGridPolygonPrimitive(),this.outlinePrimitive=this.createGridOutlinePrimitive()}createGridPolygonPrimitive(){if(!this.options.fill)return;const e=[];this.options.vertices.forEach(t=>{const i=Color.fromCssColorString(this.options.fillColor),n=makeGridToInstanceForBox(t.positions,i,`grid-${t.id}`);e.push(n)});const t=new Primitive$3({geometryInstances:e,appearance:new PerInstanceColorAppearance({flat:!0,translucent:!0}),asynchronous:!1});return this.gridPrimitiveCollection.add(t),t}createGridOutlinePrimitive(){if(!this.options.outline)return;const e=[];this.options.vertices.forEach(t=>{const i=Color.fromCssColorString(this.options.outlineColor),n=makeGridToInstanceForLine(t.positions,i,`grid-${t.id}`);e.push(n)});const t=new Primitive$3({geometryInstances:e,appearance:new PolylineColorAppearance({translucent:!0}),asynchronous:!1});return this.gridPrimitiveCollection.add(t),t}getPrimitive(){return this.gridPrimitiveCollection}selectGrids(e){const t=Color.fromCssColorString(this.options.fillSelectColor),i=Color.fromCssColorString(this.options.outlineSelectColor);e.forEach(e=>{if(this.polygonPrimitive){this.polygonPrimitive.getGeometryInstanceAttributes(e).color=ColorGeometryInstanceAttribute.toValue(t)}if(this.outlinePrimitive){this.outlinePrimitive.getGeometryInstanceAttributes(e).color=ColorGeometryInstanceAttribute.toValue(i)}})}unSelectGrids(e){const t=Color.fromCssColorString(this.options.fillColor),i=Color.fromCssColorString(this.options.outlineColor);e.forEach(e=>{if(this.polygonPrimitive){this.polygonPrimitive.getGeometryInstanceAttributes(e).color=ColorGeometryInstanceAttribute.toValue(t)}if(this.outlinePrimitive){this.outlinePrimitive.getGeometryInstanceAttributes(e).color=ColorGeometryInstanceAttribute.toValue(i)}})}}const createDivLabelHandler=e=>{const t=[],i={LEFT_CLICK:[]};return e.scene.postRender.addEventListener(()=>{t.forEach(t=>{if(t.distanceDisplayCondition){const i=Cartesian3$1.distance(t.position,e.camera.position);if(i>=t.distanceDisplayCondition.far||i<=t.distanceDisplayCondition.near)return void(t.divEle.style.display="none")}const i=e.scene.cartesianToCanvasCoordinates(t.position);if(i){t.divEle.style.display="block";const e=t.divEle.getBoundingClientRect();let n=2;"left"===t.align&&(n=e.width+t.offset.x),"right"===t.align&&(n=1),t.divEle.style.left=i.x/t.autoFit.x-(e.width+t.offset.x)/t.autoFit.x/n+"px",t.divEle.style.top=i.y/t.autoFit.y-(e.height+t.offset.y)/t.autoFit.y+"px"}else t.divEle.style.display="none"})}),{divLabels:t,set:n=>{const r={id:n.divEle.id||numberId(),...n};return r.autoFit||(r.autoFit=Cartesian2.fromElements(1,1)),r.offset||(r.offset=Cartesian2.fromElements(0,0)),r.align||(r.align="center"),r.divEle.id=r.id,r.divEle.style.position="absolute",r.userSelect||(r.divEle.style.userSelect="none"),r.parentEle?(r.parentEle.style.position="relative",r.parentEle.appendChild(r.divEle)):(e._element.style.position="relative",e._element.appendChild(r.divEle)),t.push(r),r.divEle.addEventListener("click",()=>{i.LEFT_CLICK.forEach(e=>{e(r)})}),r},setPosition:(e,i)=>{const n=t.findIndex(t=>t.id===e);if(-1!==n){t[n].position=i}},remove:e=>{const i=t.findIndex(t=>t.id===e.id);if(-1!==i){t[i].divEle.remove(),t.splice(i,1)}},removeAll:()=>{t.forEach(e=>{e.divEle.remove()}),t.length=0},removeById:e=>{const i=t.findIndex(t=>t.id===e);if(-1!==i){t[i].divEle.remove(),t.splice(i,1)}},addEventListener:(e,t)=>{i[e]&&i[e].push(t)}}},createFillVolumeHandler=e=>{const t=[],i=()=>{t.forEach(t=>{t.vloumePrimitive.removeAll(),e.scene.primitives.remove(t.vloumePrimitive)}),t.length=0};return{set:async i=>{const n=makePositionsClose(i.positions),r=new PrimitiveCollection({destroyPrimitives:!1}),o=new PrimitiveCollection({destroyPrimitives:!1}),a=new PointPrimitiveCollection,s=new LabelCollection;o.add(a),r.add(s),r.add(o),e.scene.primitives.add(r);const c=numberId();let l={};const d=n.map(e=>{const t=Cartographic.fromCartesian(e);return{lng:CesiumMath.toDegrees(t.longitude),lat:CesiumMath.toDegrees(t.latitude),height:t.height}}),u=Math.min(...d.map(e=>e.height)),h=polygon([d.map(e=>[e.lng,e.lat])]),p=area(h),A=Math.sqrt(area(h)/200),m=envelope(h),f=centroid(h),g=pointsWithinPolygon(pointGrid(bbox(m),A,{units:"meters"}),h).features.map(e=>Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1])),C=await e.scene.clampToHeightMostDetailed(g),{maxHeight:y,minHeight:_,digVolume:E,fillVolume:b,volumeLabel:I}=addVolume(C,A,f,s,p,u),S=addPolygon(n,u,r);return addWall(n,y,_,r),addPointLabel(n,d,s),l={id:c,maxHeight:y,minHeight:_,baseHeight:u,digVolume:E,fillVolume:b,cellsize:A,positions:n,centroid:f,area:p,heightPositions:C,polygonPrimitive:S,linePrimitive:o,labelPrimitive:s,vloumePrimitive:r,volumeLabel:I},t.push(l),l},changeBaseHeight:async i=>{const n=t.findIndex(e=>e.id===i.id);if(-1===n)return;const r=t[n];let o=(await pickPoint(e)).lnglat.height;o>i.maxHeight&&(o=i.maxHeight),o<i.minHeight&&(o=i.minHeight),r.baseHeight=Number(o.toFixed(2));const a=r.vloumePrimitive,s=r.labelPrimitive;r.polygonPrimitive&&a.remove(r.polygonPrimitive),r.volumeLabel&&s.remove(r.volumeLabel);const{positions:c,baseHeight:l,heightPositions:d,cellsize:u,centroid:h,area:p}=r,A=addPolygon(c,l,a),{digVolume:m,fillVolume:f,volumeLabel:g}=addVolume(d,u,h,s,p,l);t[n]={...r,digVolume:m,fillVolume:f,polygonPrimitive:A,volumeLabel:g}},remove:i=>{const n=t.findIndex(e=>e.id===i.id);-1!==n&&(i.vloumePrimitive.removeAll(),e.scene.primitives.remove(i.vloumePrimitive),t.splice(n,1))},removeAll:i,destroy:()=>{i()}}};function addWall(e,t,i,n){const r=WallGeometry.fromConstantHeights({positions:e,minimumHeight:i,maximumHeight:t}),o=new GeometryInstance({geometry:WallGeometry.createGeometry(r)});n.add(new Primitive$3({geometryInstances:[o],asynchronous:!1,appearance:new MaterialAppearance({translucent:!0,faceForward:!0,material:Material$4.fromType("Color",{color:Color.fromCssColorString("#00ff00").withAlpha(.5)})})}))}function addPolygon(e,t,i){const n=new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(e),height:t})});return i.add(new Primitive$3({allowPicking:!1,asynchronous:!1,geometryInstances:[n],appearance:new MaterialAppearance({translucent:!0,faceForward:!0,material:Material$4.fromType("Color",{color:Color.fromCssColorString("#0088ff").withAlpha(.5)})})}))}function addVolume(e,t,i,n,r,o){const a=e.map(e=>Cartographic.fromCartesian(e).height),s=Math.min(...a),c=Math.max(...a);let l=0;for(let e=0;e<a.length;e++)a[e]-o>0&&(l+=(a[e]-o)*t*t);let d=0;for(let e=0;e<a.length;e++)o-a[e]>0&&(d+=(o-a[e])*t*t);const u=Cartesian3$1.fromDegrees(i.geometry.coordinates[0],i.geometry.coordinates[1],c),h={};l?h["挖方体积"]=`${formatNumberWithUnit(l)}方\n`:l=0,d?h["填方体积"]=`${formatNumberWithUnit(d)}方\n`:d=0,r&&(h["横切面积"]=`${formatNumberWithUnit(r)}平方米\n`),s&&(h["最小高程"]=`${formatNumberWithUnit(s)}米\n`),c&&(h["最大高程"]=`${formatNumberWithUnit(c)}米\n`),s&&(h["基准面高程"]=`${formatNumberWithUnit(o)}米`);let p="";Object.keys(h).forEach(e=>{p+=`${e}:${h[e]}`});return{maxHeight:c,minHeight:s,digVolume:l,fillVolume:d,volumeLabel:n.add({position:u,text:p,font:"16px sans-serif",fillColor:Color.WHITE,showBackground:!0,style:LabelStyle$1.FILL_AND_OUTLINE,disableDepthTestDistance:Number.POSITIVE_INFINITY})}}function addPointLabel(e,t,i){e.forEach((e,n)=>{i.add({position:e,text:`高程:${formatNumberWithUnit(t[n].height)}米`,font:"14px sans-serif",fillColor:Color.WHITE,showBackground:!0,style:LabelStyle$1.FILL_AND_OUTLINE,disableDepthTestDistance:Number.POSITIVE_INFINITY})})}function formatNumberWithUnit(e){const t=["","万","百万","千万","亿"];let i=0;for(;e>=1e4&&i<t.length-1;)e/=1e4,i++;return`${e.toFixed(2).replace(/\.?0+$/,"")}${t[i]}`}const createGroundClipHandler=e=>{const t=new ClippingPolygonCollection({polygons:[]});e.scene.globe.clippingPolygons=t;const i=[],n=new CustomDataSource("ground-clip");e.dataSources.add(n);const r=()=>{t.isDestroyed()||t.removeAll(),i.length=0,n.entities.removeAll()};return{set:async r=>{if(t.isDestroyed())throw new Error("对象已被销毁");r={interCount:50,...r};let o=calcLerpPosition(makePositionsClose(r.positions),r.interCount);o=await e.scene.clampToHeightMostDetailed(o);const a=[],s=makeLnglatsToPositions(makePositionsToLnglats(o).map(e=>(a.push(e.height),e.height=-r.depth,e))),c=a.map(e=>e-r.depth),l=Math.min(...c),d=Array.from({length:c.length}).fill(l),u=n.entities.add({wall:{positions:s,minimumHeights:d,maximumHeights:a,material:new ImageMaterialProperty({image:`${window.INO_CESIUM_BASE_URL}/assets/images/ground-clip/wall.jpg`})},polygon:{hierarchy:s,height:l,material:new ImageMaterialProperty({image:`${window.INO_CESIUM_BASE_URL}/assets/images/ground-clip/poly-soil.jpg`})}}),h=new ClippingPolygon({positions:o});t.add(h);const p={id:numberId(),positions:o,clipPolygon:h,clipEntity:u};return i.push(p),p},remove:t=>{const r=i.findIndex(e=>e.id===t.id);-1!==r&&(i.splice(r,1),n.entities.remove(t.clipEntity),e.scene.globe.clippingPolygons.remove(t.clipPolygon))},removeAll:r,destroy:()=>{r(),t.destroy(),e.scene.globe.clippingPolygons=new ClippingPolygonCollection}}};function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}
|
|
55
|
+
*/;var OBSERVABLES_PROPERTY="__knockoutObservables",SUBSCRIBABLE_PROPERTY="__knockoutSubscribable";function track(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,n=getAllObservablesForObject(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach(function(t){if(t!==OBSERVABLES_PROPERTY&&t!==SUBSCRIBABLE_PROPERTY&&!(t in n)){var r=e[t],o=r instanceof Array,a=i.isObservable(r)?r:o?i.observableArray(r):i.observable(r);Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:a,set:i.isWriteableObservable(a)?a:void 0}),n[t]=a,o&¬ifyWhenPresentOrFutureArrayValuesMutate(i,a)}}),e}function getAllObservablesForObject(e,t){var i=e[OBSERVABLES_PROPERTY];return!i&&t&&(i={},Object.defineProperty(e,OBSERVABLES_PROPERTY,{value:i})),i}function defineComputedProperty(e,t,i){var n={owner:e,deferEvaluation:!0};if("function"==typeof i)n.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.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".');n.read=i.get,n.write=i.set}return e[t]=this.computed(n),track.call(this,e,[t]),e}function notifyWhenPresentOrFutureArrayValuesMutate(e,t){var i=null;e.computed(function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=startWatchingArrayInstance(e,t,n))})}function startWatchingArrayInstance(e,t,i){return getSubscribableForArray(e,i).subscribe(t)}function getSubscribableForArray(e,t){var i=t[SUBSCRIBABLE_PROPERTY];if(!i){i=new e.subscribable,Object.defineProperty(t,SUBSCRIBABLE_PROPERTY,{value:i});var n={};wrapStandardArrayMutators(t,i,n),addKnockoutArrayMutators(e,t,i,n)}return i}function wrapStandardArrayMutators(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach(function(n){var r=e[n];e[n]=function(){var e=r.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}})}function addKnockoutArrayMutators(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach(function(r){Object.defineProperty(t,r,{enumerable:!1,value:function(){var o;n.pause=!0;try{o=e.observableArray.fn[r].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),o}})})}function getObservable(e,t){if(!e)return null;var i=getAllObservablesForObject(e,!1);return i&&i[t]||null}function valueHasMutated(e,t){var i=getObservable(e,t);i&&i.valueHasMutated()}function attachToKo(e){e.track=track,e.getObservable=getObservable,e.valueHasMutated=valueHasMutated,e.defineProperty=defineComputedProperty}var knockout_es5={attachToKo:attachToKo};const svgNS$1="http://www.w3.org/2000/svg",svgClassName="cesium-svgPath-svg",SvgPathBindingHandler={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){const n=document.createElementNS(svgNS$1,"svg:svg");n.setAttribute("class",svgClassName);const r=document.createElementNS(svgNS$1,"path");return n.appendChild(r),e.virtualElements.setDomNodeChildren(t,[n]),e.computed({read:function(){const t=e.unwrap(i());r.setAttribute("d",e.unwrap(t.path));const o=e.unwrap(t.width),a=e.unwrap(t.height);n.setAttribute("width",o),n.setAttribute("height",a),n.setAttribute("viewBox",`0 0 ${o} ${a}`),t.css&&n.setAttribute("class",`${svgClassName} ${e.unwrap(t.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};function ClockViewModel(e){defined$1(e)||(e=new Clock),this._clock=e,this._eventHelper=new EventHelper,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=knockout.observable(JulianDate.now()),this.systemTime.equalityComparer=JulianDate.equals,this.startTime=knockout.observable(e.startTime),this.startTime.equalityComparer=JulianDate.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=knockout.observable(e.stopTime),this.stopTime.equalityComparer=JulianDate.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=knockout.observable(e.currentTime),this.currentTime.equalityComparer=JulianDate.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=knockout.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=knockout.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=knockout.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=knockout.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=knockout.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),knockout.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}function Command(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,DeveloperError$1.throwInstantiationError()}knockout_es5.attachToKo(knockout),SvgPathBindingHandler.register(knockout),Object.defineProperties(ClockViewModel.prototype,{clock:{get:function(){return this._clock}}}),ClockViewModel.prototype.synchronize=function(){const e=this._clock;this.systemTime=JulianDate.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},ClockViewModel.prototype.isDestroyed=function(){return!1},ClockViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject$1(this)};const InspectorShared={};function ToggleButtonViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("command is required.");this._command=e,t=t??Frozen.EMPTY_OBJECT,this.toggled=t.toggled??!1,this.tooltip=t.tooltip??"",knockout.track(this,["toggled","tooltip"])}function createCommand(e,t){if(!defined$1(e))throw new DeveloperError$1("func is required.");t=t??!0;const i=new Event$1,n=new Event$1;function r(){if(!r.canExecute)throw new DeveloperError$1("Cannot execute command, canExecute is false.");const t={args:arguments,cancel:!1};let o;return i.raiseEvent(t),t.cancel||(o=e.apply(null,arguments),n.raiseEvent(o)),o}return r.canExecute=t,knockout.track(r,["canExecute"]),Object.defineProperties(r,{beforeExecute:{value:i},afterExecute:{value:n}}),r}function subscribeAndEvaluate(e,t,i,n,r){return i.call(n,e[t]),knockout.getObservable(e,t).subscribe(i,n,r)}InspectorShared.createCheckbox=function(e,t,i){Check.typeOf.string("labelText",e),Check.typeOf.string("checkedBinding",t);const n=document.createElement("div"),r=document.createElement("label"),o=document.createElement("input");o.type="checkbox";let a=`checked: ${t}`;return defined$1(i)&&(a+=`, enable: ${i}`),o.setAttribute("data-bind",a),r.appendChild(o),r.appendChild(document.createTextNode(e)),n.appendChild(r),n},InspectorShared.createSection=function(e,t,i,n){Check.defined("panel",e),Check.typeOf.string("headerText",t),Check.typeOf.string("sectionVisibleBinding",i),Check.typeOf.string("toggleSectionVisibilityBinding",n);const r=document.createElement("div");r.className="cesium-cesiumInspector-section",r.setAttribute("data-bind",`css: { "cesium-cesiumInspector-section-collapsed": !${i} }`),e.appendChild(r);const o=document.createElement("h3");o.className="cesium-cesiumInspector-sectionHeader",o.appendChild(document.createTextNode(t)),o.setAttribute("data-bind",`click: ${n}`),r.appendChild(o);const a=document.createElement("div");return a.className="cesium-cesiumInspector-sectionContent",r.appendChild(a),a},InspectorShared.createRangeInput=function(e,t,i,n,r,o){Check.typeOf.string("rangeText",e),Check.typeOf.string("sliderValueBinding",t),Check.typeOf.number("min",i),Check.typeOf.number("max",n),o=o??t;const a=document.createElement("input");a.setAttribute("data-bind",`value: ${o}`),a.type="number";const s=document.createElement("input");s.type="range",s.min=i,s.max=n,s.step=r??"any",s.setAttribute("data-bind",`valueUpdate: "input", value: ${t}`);const c=document.createElement("div");c.appendChild(s);const l=document.createElement("div");return l.className="cesium-cesiumInspector-slider",l.appendChild(document.createTextNode(e)),l.appendChild(a),l.appendChild(c),l},InspectorShared.createRangeInputWithDynamicMinMax=function(e,t,i,n){Check.typeOf.string("rangeText",e),Check.typeOf.string("sliderValueBinding",t),n=n??t;const r=document.createElement("input");r.setAttribute("data-bind",`value: ${n}`),r.type="number";const o=document.createElement("input");o.type="range",o.step=i??"any",o.setAttribute("data-bind",`valueUpdate: "input", value: ${t}, attr: { min: ${t}Min, max: ${t}Max }`);const a=document.createElement("div");a.appendChild(o);const s=document.createElement("div");return s.className="cesium-cesiumInspector-slider",s.appendChild(document.createTextNode(e)),s.appendChild(r),s.appendChild(a),s},InspectorShared.createButton=function(e,t,i){Check.typeOf.string("buttonText",e),Check.typeOf.string("clickedBinding",t);const n=document.createElement("button");n.type="button",n.textContent=e,n.className="cesium-cesiumInspector-pickButton";let r=`click: ${t}`;return defined$1(i)&&(r+=`, css: {"cesium-cesiumInspector-pickButtonHighlight" : ${i}}`),n.setAttribute("data-bind",r),n},Object.defineProperties(ToggleButtonViewModel.prototype,{command:{get:function(){return this._command}}});const svgNS="http://www.w3.org/2000/svg",xlinkNS="http://www.w3.org/1999/xlink";let widgetForDrag;const gradientEnabledColor0=Color.fromCssColorString("rgba(247,250,255,0.384)"),gradientEnabledColor1=Color.fromCssColorString("rgba(143,191,255,0.216)"),gradientEnabledColor2=Color.fromCssColorString("rgba(153,197,255,0.098)"),gradientEnabledColor3=Color.fromCssColorString("rgba(255,255,255,0.086)"),gradientDisabledColor0=Color.fromCssColorString("rgba(255,255,255,0.267)"),gradientDisabledColor1=Color.fromCssColorString("rgba(255,255,255,0)"),gradientKnobColor=Color.fromCssColorString("rgba(66,67,68,0.3)"),gradientPointerColor=Color.fromCssColorString("rgba(0,0,0,0.5)");function getElementColor(e){return Color.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}const svgIconsById={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 svgFromObject(e){const t=document.createElementNS(svgNS,e.tagName);for(const i in e)if(e.hasOwnProperty(i)&&"tagName"!==i)if("children"===i){const i=e.children.length;for(let n=0;n<i;++n)t.appendChild(svgFromObject(e.children[n]))}else 0===i.indexOf("xlink:")?t.setAttributeNS(xlinkNS,i.substring(6),e[i]):"textContent"===i?t.textContent=e[i]:t.setAttribute(i,e[i]);return t}function svgText(e,t,i){const n=document.createElementNS(svgNS,"text");n.setAttribute("x",e),n.setAttribute("y",t),n.setAttribute("class","cesium-animation-svgText");const r=document.createElementNS(svgNS,"tspan");return r.textContent=i,n.appendChild(r),n}function setShuttleRingPointer(e,t,i){e.setAttribute("transform",`translate(100,100) rotate(${i})`),t.setAttribute("transform",`rotate(${i})`)}const makeColorStringScratch=new Color;function makeColorString(e,t){const i=t.alpha,n=1-i;return makeColorStringScratch.red=e.red*n+t.red*i,makeColorStringScratch.green=e.green*n+t.green*i,makeColorStringScratch.blue=e.blue*n+t.blue*i,makeColorStringScratch.toCssColorString()}function rectButton(e,t,i){const n=svgIconsById[i];return svgFromObject({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:i,tagName:n.tagName,transform:n.transform,d:n.d},{tagName:"title",textContent:""}]})}function wingButton(e,t,i){const n=svgIconsById[i],r=svgIconsById.animation_pathWingButton;return svgFromObject({tagName:"g",class:"cesium-animation-rectButton",transform:`translate(${e},${t})`,children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:r.tagName,d:r.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:r.tagName,d:r.d},{class:"cesium-animation-buttonPath",id:i,tagName:n.tagName,transform:n.transform,d:n.d},{tagName:"title",textContent:""}]})}function setShuttleRingFromMouseOrTouch(e,t){const i=e._viewModel,n=i.shuttleRingDragging;if(!n||widgetForDrag===e)if("mousedown"===t.type||n&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||n&&"touchmove"===t.type&&1===t.touches.length){const r=e._centerX,o=e._centerY,a=e._svgNode.getBoundingClientRect();let s,c;if("touchstart"===t.type||"touchmove"===t.type?(s=t.touches[0].clientX,c=t.touches[0].clientY):(s=t.clientX,c=t.clientY),!n&&(s>a.right||s<a.left||c<a.top||c>a.bottom))return;const l=e._shuttleRingPointer.getBoundingClientRect(),d=s-r-a.left,u=c-o-a.top;let h=180*Math.atan2(u,d)/Math.PI+90;h>180&&(h-=360);const p=i.shuttleRingAngle;n||s<l.right&&s>l.left&&c>l.top&&c<l.bottom?(widgetForDrag=e,i.shuttleRingDragging=!0,i.shuttleRingAngle=h):h<p?i.slower():h>p&&i.faster(),t.preventDefault()}else e===widgetForDrag&&(widgetForDrag=void 0),i.shuttleRingDragging=!1}function SvgButton(e,t){this._viewModel=t,this.svgElement=e,this._enabled=void 0,this._toggled=void 0;const i=this;this._clickFunction=function(){const e=i._viewModel.command;e.canExecute&&e()},e.addEventListener("click",this._clickFunction,!0),this._subscriptions=[subscribeAndEvaluate(t,"toggled",this.setToggled,this),subscribeAndEvaluate(t,"tooltip",this.setTooltip,this),subscribeAndEvaluate(t.command,"canExecute",this.setEnabled,this)]}function Animation$1(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("viewModel is required.");e=getElement(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 i=e.ownerDocument,n=document.createElement("style");n.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); }",i.head.insertBefore(n,i.head.childNodes[0]);const r=document.createElement("div");r.className="cesium-animation-theme",r.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=r,this._themeNormal=r.childNodes[0],this._themeHover=r.childNodes[1],this._themeSelect=r.childNodes[2],this._themeDisabled=r.childNodes[3],this._themeKnob=r.childNodes[4],this._themePointer=r.childNodes[5],this._themeSwoosh=r.childNodes[6],this._themeSwooshHover=r.childNodes[7];const o=document.createElementNS(svgNS,"svg:svg");this._svgNode=o,o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",xlinkNS);const a=document.createElementNS(svgNS,"g");this._topG=a,this._realtimeSVG=new SvgButton(wingButton(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new SvgButton(rectButton(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new SvgButton(rectButton(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new SvgButton(rectButton(84,99,"animation_pathPause"),t.pauseViewModel);const s=document.createElementNS(svgNS,"g");s.appendChild(this._realtimeSVG.svgElement),s.appendChild(this._playReverseSVG.svgElement),s.appendChild(this._playForwardSVG.svgElement),s.appendChild(this._pauseSVG.svgElement);const c=svgFromObject({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;const l=svgIconsById.animation_pathSwooshFX,d=svgIconsById.animation_pathPointer,u=svgFromObject({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:l.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:l.d},{tagName:l.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:l.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=u,this._shuttleRingPointer=svgFromObject({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:d.tagName,d:d.d});const h=svgFromObject({tagName:"g",transform:"translate(100,100)"});this._knobOuter=svgFromObject({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});const p=svgFromObject({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=svgText(0,-24,""),this._knobTime=svgText(0,-7,""),this._knobStatus=svgText(0,-41,"");const A=svgFromObject({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:61}),m=document.createElementNS(svgNS,"g");m.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(r),a.appendChild(m),a.appendChild(h),a.appendChild(s),m.appendChild(c),m.appendChild(u),m.appendChild(this._shuttleRingPointer),h.appendChild(this._knobOuter),h.appendChild(p),h.appendChild(this._knobDate),h.appendChild(this._knobTime),h.appendChild(this._knobStatus),h.appendChild(A),o.appendChild(a),e.appendChild(o);const f=this;function g(e){setShuttleRingFromMouseOrTouch(f,e)}this._mouseCallback=g,c.addEventListener("mousedown",g,!0),c.addEventListener("touchstart",g,!0),u.addEventListener("mousedown",g,!0),u.addEventListener("touchstart",g,!0),i.addEventListener("mousemove",g,!0),i.addEventListener("touchmove",g,!0),i.addEventListener("mouseup",g,!0),i.addEventListener("touchend",g,!0),i.addEventListener("touchcancel",g,!0),this._shuttleRingPointer.addEventListener("mousedown",g,!0),this._shuttleRingPointer.addEventListener("touchstart",g,!0),this._knobOuter.addEventListener("mousedown",g,!0),this._knobOuter.addEventListener("touchstart",g,!0);const C=this._knobTime.childNodes[0],y=this._knobDate.childNodes[0],_=this._knobStatus.childNodes[0];let E;this._subscriptions=[subscribeAndEvaluate(t.pauseViewModel,"toggled",function(e){E!==e&&(E=e,E?f._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):f._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),subscribeAndEvaluate(t,"shuttleRingAngle",function(e){setShuttleRingPointer(f._shuttleRingPointer,f._knobOuter,e)}),subscribeAndEvaluate(t,"dateLabel",function(e){y.textContent!==e&&(y.textContent=e)}),subscribeAndEvaluate(t,"timeLabel",function(e){C.textContent!==e&&(C.textContent=e)}),subscribeAndEvaluate(t,"multiplierLabel",function(e){_.textContent!==e&&(_.textContent=e)})],this.applyThemeChanges(),this.resize()}SvgButton.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);const e=this._subscriptions;for(let t=0,i=e.length;t<i;t++)e[t].dispose();destroyObject$1(this)},SvgButton.prototype.isDestroyed=function(){return!1},SvgButton.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")}},SvgButton.prototype.setToggled=function(e){this._toggled!==e&&(this._toggled=e,this._enabled&&(e?this.svgElement.setAttribute("class","cesium-animation-rectButton cesium-animation-buttonToggled"):this.svgElement.setAttribute("class","cesium-animation-rectButton")))},SvgButton.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e},Object.defineProperties(Animation$1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Animation$1.prototype.isDestroyed=function(){return!1},Animation$1.prototype.destroy=function(){defined$1(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 i=this._subscriptions;for(let e=0,t=i.length;e<t;e++)i[e].dispose();return destroyObject$1(this)},Animation$1.prototype.resize=function(){const e=this._container.clientWidth,t=this._container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;const i=this._svgNode,n=200,r=132;let o=e,a=t;0===e&&0===t?(o=n,a=r):0===e?(a=t,o=n*(t/r)):0===t&&(o=e,a=r*(e/n));const s=o/n,c=a/r;i.style.cssText=`width: ${o}px; height: ${a}px; position: absolute; bottom: 0; left: 0; overflow: hidden;`,i.setAttribute("width",o),i.setAttribute("height",a),i.setAttribute("viewBox",`0 0 ${o} ${a}`),this._topG.setAttribute("transform",`scale(${s},${c})`),this._centerX=Math.max(1,100*s),this._centerY=Math.max(1,100*c),this._lastHeight=e,this._lastWidth=t},Animation$1.prototype.applyThemeChanges=function(){const e=this._container.ownerDocument;if(!e.body.contains(this._container)){if(defined$1(this._observer))return;const t=this;return t._observer=new MutationObserver(function(){e.body.contains(t._container)&&(t._observer.disconnect(),t._observer=void 0,t.applyThemeChanges())}),void t._observer.observe(e,{childList:!0,subtree:!0})}const t=getElementColor(this._themeNormal),i=getElementColor(this._themeHover),n=getElementColor(this._themeSelect),r=getElementColor(this._themeDisabled),o=getElementColor(this._themeKnob),a=getElementColor(this._themePointer),s=getElementColor(this._themeSwoosh),c=getElementColor(this._themeSwooshHover),l=svgFromObject({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(t,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(t,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(t,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(t,gradientEnabledColor3)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(i,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(i,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(i,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(i,gradientEnabledColor3)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(n,gradientEnabledColor0)},{tagName:"stop",offset:"12%","stop-color":makeColorString(n,gradientEnabledColor1)},{tagName:"stop",offset:"46%","stop-color":makeColorString(n,gradientEnabledColor2)},{tagName:"stop",offset:"81%","stop-color":makeColorString(n,gradientEnabledColor3)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":makeColorString(r,gradientDisabledColor0)},{tagName:"stop",offset:"75%","stop-color":makeColorString(r,gradientDisabledColor1)}]},{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":s.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":s.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":s.toCssColorString()}]},{id:"animation_shuttleRingSwooshHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-opacity":.2,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"85%","stop-opacity":.85,"stop-color":c.toCssColorString()},{tagName:"stop",offset:"95%","stop-opacity":.05,"stop-color":c.toCssColorString()}]},{id:"animation_shuttleRingPointerGradient",tagName:"linearGradient",x1:"0%",y1:"50%",x2:"100%",y2:"50%",children:[{tagName:"stop",offset:"0%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"40%","stop-color":a.toCssColorString()},{tagName:"stop",offset:"60%","stop-color":makeColorString(a,gradientPointerColor)},{tagName:"stop",offset:"100%","stop-color":makeColorString(a,gradientPointerColor)}]},{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":makeColorString(o,gradientEnabledColor0)},{tagName:"stop",offset:"60%","stop-color":makeColorString(o,gradientKnobColor)},{tagName:"stop",offset:"85%","stop-color":makeColorString(o,gradientEnabledColor1)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":makeColorString(o,gradientKnobColor)},{tagName:"stop",offset:"60%","stop-color":makeColorString(o,gradientEnabledColor0)},{tagName:"stop",offset:"85%","stop-color":makeColorString(o,gradientEnabledColor3)}]}]});defined$1(this._defsElement)?this._svgNode.replaceChild(l,this._defsElement):this._svgNode.appendChild(l),this._defsElement=l};const monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],realtimeShuttleRingAngle=15,maxShuttleRingAngle=105;function numberComparator(e,t){return e-t}function getTypicalMultiplierIndex(e,t){const i=binarySearch(t,e,numberComparator);return i<0?~i:i}function angleToMultiplier(e,t){if(Math.abs(e)<=realtimeShuttleRingAngle)return e/realtimeShuttleRingAngle;const i=realtimeShuttleRingAngle,n=maxShuttleRingAngle;let r;let o;return e>0?(r=Math.log(t[t.length-1]),o=(r-0)/(n-i),Math.exp(0+o*(e-i))):(r=Math.log(-t[0]),o=(r-0)/(n-i),-Math.exp(0+o*(Math.abs(e)-i)))}function multiplierToAngle(e,t,i){if(i.clockStep===ClockStep$1.SYSTEM_CLOCK)return realtimeShuttleRingAngle;if(Math.abs(e)<=1)return e*realtimeShuttleRingAngle;const n=t[t.length-1];e>n?e=n:e<-n&&(e=-n);const r=realtimeShuttleRingAngle,o=maxShuttleRingAngle;let a;let s;return e>0?(a=Math.log(n),s=(a-0)/(o-r),(Math.log(e)-0)/s+r):(a=Math.log(-t[0]),s=(a-0)/(o-r),-((Math.log(Math.abs(e))-0)/s+r))}function AnimationViewModel(e){if(!defined$1(e))throw new DeveloperError$1("clockViewModel is required.");const t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=AnimationViewModel.defaultDateFormatter,this._timeFormatter=AnimationViewModel.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,knockout.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(AnimationViewModel.defaultTicks),this.timeLabel=void 0,knockout.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,knockout.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,knockout.defineProperty(this,"multiplierLabel",function(){const e=t._clockViewModel;if(e.clockStep===ClockStep$1.SYSTEM_CLOCK)return"Today";const i=e.multiplier;return i%1==0?`${i.toFixed(0)}x`:`${i.toFixed(3).replace(/0{0,3}$/,"")}x`}),this.shuttleRingAngle=void 0,knockout.defineProperty(this,"shuttleRingAngle",{get:function(){return multiplierToAngle(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,maxShuttleRingAngle),-maxShuttleRingAngle);const i=t._allShuttleRingTicks,n=t._clockViewModel;if(n.clockStep=ClockStep$1.SYSTEM_CLOCK_MULTIPLIER,Math.abs(e)===maxShuttleRingAngle)return void(n.multiplier=e>0?i[i.length-1]:i[0]);let r=angleToMultiplier(e,i);if(t.snapToTicks)r=i[getTypicalMultiplierIndex(r,i)];else if(0!==r){const e=Math.abs(r);if(e>100){const t=e.toFixed(0).length-2,i=Math.pow(10,t);r=Math.round(r/i)*i|0}else e>realtimeShuttleRingAngle?r=Math.round(r):e>1?r=+r.toFixed(1):e>0&&(r=+r.toFixed(2))}n.multiplier=r}}),this._canAnimate=void 0,knockout.defineProperty(this,"_canAnimate",function(){const e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===ClockRange$1.UNBOUNDED)return!0;const n=e.multiplier,r=e.currentTime,o=e.startTime;let a=!1;if(i===ClockRange$1.LOOP_STOP)a=JulianDate.greaterThan(r,o)||r.equals(o)&&n>0;else{const t=e.stopTime;a=JulianDate.greaterThan(r,o)&&JulianDate.lessThan(r,t)||r.equals(o)&&n>0||r.equals(t)&&n<0}return a||(e.shouldAnimate=!1),a}),this._isSystemTimeAvailable=void 0,knockout.defineProperty(this,"_isSystemTimeAvailable",function(){const e=t._clockViewModel;if(e.clockRange===ClockRange$1.UNBOUNDED)return!0;const i=e.systemTime;return JulianDate.greaterThanOrEquals(i,e.startTime)&&JulianDate.lessThanOrEquals(i,e.stopTime)}),this._isAnimating=void 0,knockout.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});const i=createCommand(function(){const e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)});this._pauseViewModel=new ToggleButtonViewModel(i,{toggled:knockout.computed(function(){return!t._isAnimating}),tooltip:"Pause"});const n=createCommand(function(){const e=t._clockViewModel,i=e.multiplier;i>0&&(e.multiplier=-i),e.shouldAnimate=!0});this._playReverseViewModel=new ToggleButtonViewModel(n,{toggled:knockout.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});const r=createCommand(function(){const e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0});this._playForwardViewModel=new ToggleButtonViewModel(r,{toggled:knockout.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==ClockStep$1.SYSTEM_CLOCK}),tooltip:"Play Forward"});const o=createCommand(function(){t._clockViewModel.clockStep=ClockStep$1.SYSTEM_CLOCK},knockout.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new ToggleButtonViewModel(o,{toggled:knockout.computed(function(){return e.clockStep===ClockStep$1.SYSTEM_CLOCK}),tooltip:knockout.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=createCommand(function(){const e=t._clockViewModel,i=t._allShuttleRingTicks,n=getTypicalMultiplierIndex(e.multiplier,i)-1;n>=0&&(e.multiplier=i[n])}),this._faster=createCommand(function(){const e=t._clockViewModel,i=t._allShuttleRingTicks,n=getTypicalMultiplierIndex(e.multiplier,i)+1;n<i.length&&(e.multiplier=i[n])})}function BaseLayerPickerViewModel(e){const t=(e=e??Frozen.EMPTY_OBJECT).globe,i=e.imageryProviderViewModels??Frozen.EMPTY_ARRAY,n=e.terrainProviderViewModels??Frozen.EMPTY_ARRAY;if(!defined$1(t))throw new DeveloperError$1("globe is required");this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=n.slice(0),this.dropDownVisible=!1,knockout.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);const r=knockout.getObservable(this,"imageryProviderViewModels"),o=knockout.pureComputed(function(){const e=r(),t={};let i;for(i=0;i<e.length;i++){const n=e[i],r=n.category;defined$1(t[r])?t[r].push(n):t[r]=[n]}const n=Object.keys(t),o=[];for(i=0;i<n.length;i++){const e=n[i];o.push({name:e,providers:t[e]})}return o});this._imageryProviders=o;const a=knockout.getObservable(this,"terrainProviderViewModels"),s=knockout.pureComputed(function(){const e=a(),t={};let i;for(i=0;i<e.length;i++){const n=e[i],r=n.category;defined$1(t[r])?t[r].push(n):t[r]=[n]}const n=Object.keys(t),r=[];for(i=0;i<n.length;i++){const e=n[i];r.push({name:e,providers:t[e]})}return r});this._terrainProviders=s,this.buttonTooltip=void 0,knockout.defineProperty(this,"buttonTooltip",function(){const e=this.selectedImagery,t=this.selectedTerrain,i=defined$1(e)?e.name:void 0,n=defined$1(t)?t.name:void 0;return defined$1(i)&&defined$1(n)?`${i}\n${n}`:defined$1(i)?i:n}),this.buttonImageUrl=void 0,knockout.defineProperty(this,"buttonImageUrl",function(){const e=this.selectedImagery;if(defined$1(e))return e.iconUrl}),this.selectedImagery=void 0;const c=knockout.observable();this._currentImageryLayers=[],knockout.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(e){if(c()===e)return void(this.dropDownVisible=!1);let t;const i=this._currentImageryLayers,n=i.length,r=this._globe.imageryLayers;let o=!1;for(t=0;t<n;t++){const e=r.length;for(let n=0;n<e;n++){const e=r.get(n);if(e===i[t]){r.remove(e),o=!0;break}}}if(defined$1(e)){const i=e.creationCommand();if(Array.isArray(i)){const e=i.length;for(this._currentImageryLayers=[],t=e-1;t>=0;t--){const e=ImageryLayer.fromProviderAsync(i[t]);r.add(e,0),this._currentImageryLayers.push(e)}}else{this._currentImageryLayers=[];const t=ImageryLayer.fromProviderAsync(i);if(t.name=e.name,o)r.add(t,0);else{const e=r.get(0);defined$1(e)&&r.remove(e),r.add(t,0)}this._currentImageryLayers.push(t)}}c(e),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;const l=knockout.observable();knockout.defineProperty(this,"selectedTerrain",{get:function(){return l()},set:function(e){if(l()===e)return void(this.dropDownVisible=!1);let t;if(defined$1(e)&&(t=e.creationCommand()),defined$1(t)&&!defined$1(t.then))this._globe.depthTestAgainstTerrain=!(t instanceof EllipsoidTerrainProvider),this._globe.terrainProvider=t;else if(defined$1(t)){let e=!1;const i=this._globe.terrainProviderChanged.addEventListener(()=>{e=!0,i()}),n=new Terrain(t).readyEvent.addEventListener(t=>{e||(this._globe.depthTestAgainstTerrain=!(t instanceof EllipsoidTerrainProvider),this._globe.terrainProvider=t,n())})}l(e),this.dropDownVisible=!1}});const d=this;this._toggleDropDown=createCommand(function(){d.dropDownVisible=!d.dropDownVisible}),this.selectedImagery=e.selectedImageryProviderViewModel??i[0],this.selectedTerrain=e.selectedTerrainProviderViewModel}function BaseLayerPicker(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");e=getElement(e);const i=new BaseLayerPickerViewModel(t),n=document.createElement("button");n.type="button",n.className="cesium-button cesium-toolbar-button",n.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(n);const r=document.createElement("img");r.setAttribute("draggable","false"),r.className="cesium-baseLayerPicker-selected",r.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),n.appendChild(r);const o=document.createElement("div");o.className="cesium-baseLayerPicker-dropDown",o.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(o);const a=document.createElement("div");a.className="cesium-baseLayerPicker-sectionTitle",a.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),a.innerHTML="Imagery",o.appendChild(a);const s=document.createElement("div");s.className="cesium-baseLayerPicker-section",s.setAttribute("data-bind","foreach: _imageryProviders"),o.appendChild(s);const c=document.createElement("div");c.className="cesium-baseLayerPicker-category",s.appendChild(c);const l=document.createElement("div");l.className="cesium-baseLayerPicker-categoryTitle",l.setAttribute("data-bind","text: name"),c.appendChild(l);const d=document.createElement("div");d.className="cesium-baseLayerPicker-choices",d.setAttribute("data-bind","foreach: providers"),c.appendChild(d);const u=document.createElement("div");u.className="cesium-baseLayerPicker-item",u.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(u);const h=document.createElement("img");h.className="cesium-baseLayerPicker-itemIcon",h.setAttribute("data-bind","attr: { src: iconUrl }"),h.setAttribute("draggable","false"),u.appendChild(h);const p=document.createElement("div");p.className="cesium-baseLayerPicker-itemLabel",p.setAttribute("data-bind","text: name"),u.appendChild(p);const A=document.createElement("div");A.className="cesium-baseLayerPicker-sectionTitle",A.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),A.innerHTML="Terrain",o.appendChild(A);const m=document.createElement("div");m.className="cesium-baseLayerPicker-section",m.setAttribute("data-bind","foreach: _terrainProviders"),o.appendChild(m);const f=document.createElement("div");f.className="cesium-baseLayerPicker-category",m.appendChild(f);const g=document.createElement("div");g.className="cesium-baseLayerPicker-categoryTitle",g.setAttribute("data-bind","text: name"),f.appendChild(g);const C=document.createElement("div");C.className="cesium-baseLayerPicker-choices",C.setAttribute("data-bind","foreach: providers"),f.appendChild(C);const y=document.createElement("div");y.className="cesium-baseLayerPicker-item",y.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(y);const _=document.createElement("img");_.className="cesium-baseLayerPicker-itemIcon",_.setAttribute("data-bind","attr: { src: iconUrl }"),_.setAttribute("draggable","false"),y.appendChild(_);const E=document.createElement("div");E.className="cesium-baseLayerPicker-itemLabel",E.setAttribute("data-bind","text: name"),y.appendChild(E),knockout.applyBindings(i,n),knockout.applyBindings(i,o),this._viewModel=i,this._container=e,this._element=n,this._dropPanel=o,this._closeDropDown=function(e){n.contains(e.target)||o.contains(e.target)||(i.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function ProviderViewModel(e){if(!defined$1(e.name))throw new DeveloperError$1("options.name is required.");if(!defined$1(e.tooltip))throw new DeveloperError$1("options.tooltip is required.");if(!defined$1(e.iconUrl))throw new DeveloperError$1("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new DeveloperError$1("options.creationFunction is required.");let t=e.creationFunction;defined$1(t.canExecute)||(t=createCommand(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=e.category??"",knockout.track(this,["name","tooltip","iconUrl"])}function createDefaultImageryProviderViewModels(){const e=[],t=devicePixelRatio>=2;return e.push(new ProviderViewModel({name:"Bing Maps Aerial",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImageryAsync({style:IonWorldImageryStyle$1.AERIAL})}})),e.push(new ProviderViewModel({name:"Bing Maps Aerial with Labels",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImageryAsync({style:IonWorldImageryStyle$1.AERIAL_WITH_LABELS})}})),e.push(new ProviderViewModel({name:"Bing Maps Roads",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return createWorldImageryAsync({style:IonWorldImageryStyle$1.ROAD})}})),e.push(new ProviderViewModel({name:"ArcGIS World Imagery",iconUrl:buildModuleUrl("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 ArcGisMapServerImageryProvider.fromBasemapType(ArcGisBaseMapType$1.SATELLITE,{enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"ArcGIS World Hillshade",iconUrl:buildModuleUrl("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 ArcGisMapServerImageryProvider.fromBasemapType(ArcGisBaseMapType$1.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"Esri World Ocean",iconUrl:buildModuleUrl("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 ArcGisMapServerImageryProvider.fromBasemapType(ArcGisBaseMapType$1.OCEANS,{enablePickFeatures:!1})}})),e.push(new ProviderViewModel({name:"OpenStreetMap",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({url:"https://tile.openstreetmap.org/"})}})),e.push(new ProviderViewModel({name:"Stadia x Stamen Watercolor",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({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 ProviderViewModel({name:"Stadia x Stamen Toner",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({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 ProviderViewModel({name:"Stadia Alidade Smooth",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({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 ProviderViewModel({name:"Stadia Alidade Smooth Dark",iconUrl:buildModuleUrl("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 OpenStreetMapImageryProvider({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 ProviderViewModel({name:"Sentinel-2",iconUrl:buildModuleUrl("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 IonImageryProvider.fromAssetId(3954)}})),e.push(new ProviderViewModel({name:"Blue Marble",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3845)}})),e.push(new ProviderViewModel({name:"Earth at night",iconUrl:buildModuleUrl("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 IonImageryProvider.fromAssetId(3812)}})),e.push(new ProviderViewModel({name:"Natural Earth II",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",category:"Cesium ion",creationFunction:function(){return TileMapServiceImageryProvider.fromUrl(buildModuleUrl("Assets/Textures/NaturalEarthII"))}})),e.push(new ProviderViewModel({name:"Google Maps Satellite",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleSatellite.png"),tooltip:"Imagery from Google Maps",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830182)}})),e.push(new ProviderViewModel({name:"Google Maps Satellite with Labels",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleSatelliteLabels.png"),tooltip:"Imagery with place labels from Google Maps",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830183)}})),e.push(new ProviderViewModel({name:"Google Maps Roadmap",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleRoadmap.png"),tooltip:"Labeled roads and other features on a base landscape from Google Maps",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830184)}})),e.push(new ProviderViewModel({name:"Google Maps Labels Only",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleLabels.png"),tooltip:"Place labels from Google Maps to combine with other imagery such as Sentinel-2",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830185)}})),e.push(new ProviderViewModel({name:"Google Maps Contour",iconUrl:buildModuleUrl("Widgets/Images/ImageryProviders/googleContour.png"),tooltip:"Hillshade mapping, contour lines, natural features (roadmap features hidden) from Google Maps",category:"Cesium ion",creationFunction:function(){return IonImageryProvider.fromAssetId(3830186)}})),e}function createDefaultTerrainProviderViewModels(){const e=[];return e.push(new ProviderViewModel({name:"WGS84 Ellipsoid",iconUrl:buildModuleUrl("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new EllipsoidTerrainProvider({ellipsoid:Ellipsoid.WGS84})}})),e.push(new ProviderViewModel({name:"Cesium World Terrain",iconUrl:buildModuleUrl("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 createWorldTerrainAsync({requestWaterMask:!0,requestVertexNormals:!0})}})),e}function frustumStatisticsToString(e){let t;if(defined$1(e)){t="Command Statistics";const i=e.commandsInFrustums;for(const e in i)if(i.hasOwnProperty(e)){let n,r=parseInt(e,10);if(7===r)n="1, 2 and 3";else{const e=[];for(let t=2;t>=0;t--){const i=Math.pow(2,t);r>=i&&(e.push(t+1),r-=i)}n=e.reverse().join(" and ")}t+=`<br> ${i[e]} in frustum ${n}`}t+=`<br>Total: ${e.totalCommands}`}return t}function boundDepthFrustum(e,t,i){let n=Math.min(i,t);return n=Math.max(n,e),n}AnimationViewModel.defaultDateFormatter=function(e,t){const i=JulianDate.toGregorianDate(e);return`${monthNames[i.month-1]} ${i.day} ${i.year}`},AnimationViewModel.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],AnimationViewModel.defaultTimeFormatter=function(e,t){const i=JulianDate.toGregorianDate(e),n=Math.round(i.millisecond);return Math.abs(t._clockViewModel.multiplier)<1?`${i.hour.toString().padStart(2,"0")}:${i.minute.toString().padStart(2,"0")}:${i.second.toString().padStart(2,"0")}.${n.toString().padStart(3,"0")}`:`${i.hour.toString().padStart(2,"0")}:${i.minute.toString().padStart(2,"0")}:${i.second.toString().padStart(2,"0")} UTC`},AnimationViewModel.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)},AnimationViewModel.prototype.setShuttleRingTicks=function(e){if(!defined$1(e))throw new DeveloperError$1("positiveTicks is required.");let t,i,n;const r={},o=this._sortedFilteredPositiveTicks;for(o.length=0,t=0,i=e.length;t<i;++t)n=e[t],r.hasOwnProperty(n)||(r[n]=!0,o.push(n));o.sort(numberComparator);const a=[];for(i=o.length,t=i-1;t>=0;--t)n=o[t],0!==n&&a.push(-n);addAllToArray(a,o),this._allShuttleRingTicks=a},Object.defineProperties(AnimationViewModel.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 DeveloperError$1("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new DeveloperError$1("timeFormatter must be a function");this._timeFormatter=e}}}),AnimationViewModel._maxShuttleRingAngle=maxShuttleRingAngle,AnimationViewModel._realtimeShuttleRingAngle=realtimeShuttleRingAngle,Object.defineProperties(BaseLayerPickerViewModel.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}}),Object.defineProperties(BaseLayerPicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),BaseLayerPicker.prototype.isDestroyed=function(){return!1},BaseLayerPicker.prototype.destroy=function(){return FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._element),knockout.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),destroyObject$1(this)},Object.defineProperties(ProviderViewModel.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});const scratchPickRay=new Ray,scratchPickCartesian=new Cartesian3$1;function CesiumInspectorViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("scene is required");if(!defined$1(t))throw new DeveloperError$1("performanceContainer is required");const i=this,n=e.canvas,r=new ScreenSpaceEventHandler(n);this._eventHandler=r,this._scene=e,this._canvas=n,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;const o=this._scene.globe;let a;function s(e){const t=i._scene.pick({x:e.position.x,y:e.position.y});defined$1(t)&&(i.primitive=defined$1(t.collection)?t.collection:t.primitive),i._scene.requestRender(),i.pickPrimitiveActive=!1}function c(e){let t;const n=o.ellipsoid,r=i._scene.camera.getPickRay(e.position,scratchPickRay),a=o.pick(r,i._scene,scratchPickCartesian);if(defined$1(a)){const e=n.cartesianToCartographic(a),i=o._surface.tileProvider._tilesToRenderByTextureCount;for(let n=0;!t&&n<i.length;++n){const r=i[n];if(defined$1(r))for(let i=0;!t&&i<r.length;++i){const n=r[i];Rectangle.contains(n.rectangle,e)&&(t=n)}}}i.tile=t,i.pickTileActive=!1}o.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",knockout.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=createCommand(function(){i.dropDownVisible=!i.dropDownVisible}),this._toggleGeneral=createCommand(function(){i.generalVisible=!i.generalVisible}),this._togglePrimitives=createCommand(function(){i.primitivesVisible=!i.primitivesVisible}),this._toggleTerrain=createCommand(function(){i.terrainVisible=!i.terrainVisible}),this._frustumsSubscription=knockout.getObservable(this,"frustums").subscribe(function(e){i._scene.debugShowFrustums=e,i._scene.requestRender()}),this._frustumPlanesSubscription=knockout.getObservable(this,"frustumPlanes").subscribe(function(e){i._scene.debugShowFrustumPlanes=e,i._scene.requestRender()}),this._performanceSubscription=knockout.getObservable(this,"performance").subscribe(function(e){e?i._performanceDisplay=new PerformanceDisplay({container:i._performanceContainer}):i._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=createCommand(function(){return i._primitive.debugShowBoundingVolume=i.primitiveBoundingSphere,i._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=knockout.getObservable(this,"primitiveBoundingSphere").subscribe(function(){i._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=createCommand(function(){if(i.primitiveReferenceFrame){const e=i._primitive.modelMatrix;i._modelMatrixPrimitive=new DebugModelMatrixPrimitive({modelMatrix:e}),i._scene.primitives.add(i._modelMatrixPrimitive)}else defined$1(i._modelMatrixPrimitive)&&(i._scene.primitives.remove(i._modelMatrixPrimitive),i._modelMatrixPrimitive=void 0);return i._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=knockout.getObservable(this,"primitiveReferenceFrame").subscribe(function(){i._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=createCommand(function(){return i.filterPrimitive?i._scene.debugCommandFilter=function(e){return!(!defined$1(i._modelMatrixPrimitive)||e.owner!==i._modelMatrixPrimitive._primitive)||!!defined$1(i._primitive)&&(e.owner===i._primitive||e.owner===i._primitive._billboardCollection||e.owner.primitive===i._primitive)}:i._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=knockout.getObservable(this,"filterPrimitive").subscribe(function(){i._doFilterPrimitive(),i._scene.requestRender()}),this._wireframeSubscription=knockout.getObservable(this,"wireframe").subscribe(function(e){o._surface.tileProvider._debug.wireframe=e,i._scene.requestRender()}),this._depthFrustumSubscription=knockout.getObservable(this,"depthFrustum").subscribe(function(e){i._scene.debugShowDepthFrustum=e,i._scene.requestRender()}),this._incrementDepthFrustum=createCommand(function(){const e=i.depthFrustum+1;return i.depthFrustum=boundDepthFrustum(1,i._numberOfFrustums,e),i._scene.requestRender(),!0}),this._decrementDepthFrustum=createCommand(function(){const e=i.depthFrustum-1;return i.depthFrustum=boundDepthFrustum(1,i._numberOfFrustums,e),i._scene.requestRender(),!0}),this._suspendUpdatesSubscription=knockout.getObservable(this,"suspendUpdates").subscribe(function(e){o._surface._debug.suspendLodUpdate=e,e||(i.filterTile=!1)}),this._showTileCoordinates=createCommand(function(){return i.tileCoordinates&&!defined$1(a)?a=e.imageryLayers.addImageryProvider(new TileCoordinatesImageryProvider({tilingScheme:e.terrainProvider.tilingScheme})):!i.tileCoordinates&&defined$1(a)&&(e.imageryLayers.remove(a),a=void 0),!0}),this._tileCoordinatesSubscription=knockout.getObservable(this,"tileCoordinates").subscribe(function(){i._showTileCoordinates(),i._scene.requestRender()}),this._tileBoundingSphereSubscription=knockout.getObservable(this,"tileBoundingSphere").subscribe(function(){i._showTileBoundingSphere(),i._scene.requestRender()}),this._showTileBoundingSphere=createCommand(function(){return i.tileBoundingSphere?o._surface.tileProvider._debug.boundingSphereTile=i._tile:o._surface.tileProvider._debug.boundingSphereTile=void 0,i._scene.requestRender(),!0}),this._doFilterTile=createCommand(function(){return i.filterTile?(i.suspendUpdates=!0,o._surface._tilesToRender=[],defined$1(i._tile)&&i._tile.renderable&&o._surface._tilesToRender.push(i._tile)):i.suspendUpdates=!1,!0}),this._filterTileSubscription=knockout.getObservable(this,"filterTile").subscribe(function(){i.doFilterTile(),i._scene.requestRender()}),this._pickPrimitive=createCommand(function(){i.pickPrimitiveActive=!i.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=knockout.getObservable(this,"pickPrimitiveActive").subscribe(function(e){e?r.setInputAction(s,ScreenSpaceEventType$1.LEFT_CLICK):r.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)}),this._pickTile=createCommand(function(){i.pickTileActive=!i.pickTileActive}),this._pickTileActiveSubscription=knockout.getObservable(this,"pickTileActive").subscribe(function(e){e?r.setInputAction(c,ScreenSpaceEventType$1.LEFT_CLICK):r.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){i._update()})}function CesiumInspector(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("scene is required.");e=getElement(e);const i=document.createElement("div"),n=new CesiumInspectorViewModel(t,i);this._viewModel=n,this._container=e;const r=document.createElement("div");this._element=r;const o=document.createElement("div");o.textContent="Cesium Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleDropDown"),r.appendChild(o),r.className="cesium-cesiumInspector",r.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);const a=document.createElement("div");a.className="cesium-cesiumInspector-dropDown",r.appendChild(a);const s=InspectorShared.createSection,c=InspectorShared.createCheckbox,l=s(a,"General","generalVisible","toggleGeneral"),d=c("Show Frustums","frustums"),u=document.createElement("div");u.className="cesium-cesiumInspector-frustumStatistics",u.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),d.appendChild(u),l.appendChild(d),l.appendChild(c("Show Frustum Planes","frustumPlanes")),l.appendChild(c("Performance Display","performance")),i.className="cesium-cesiumInspector-performanceDisplay",l.appendChild(i);const h=document.createElement("div");h.className="cesium-cesiumInspector-shaderCache",h.setAttribute("data-bind","html: shaderCacheText"),l.appendChild(h);const p=document.createElement("div");l.appendChild(p);const A=document.createElement("span");A.setAttribute("data-bind",'html: " Frustum:"'),p.appendChild(A);const m=document.createElement("span");m.setAttribute("data-bind","text: depthFrustumText"),p.appendChild(m);const f=document.createElement("input");f.type="button",f.value="-",f.className="cesium-cesiumInspector-pickButton",f.setAttribute("data-bind","click: decrementDepthFrustum"),p.appendChild(f);const g=document.createElement("input");g.type="button",g.value="+",g.className="cesium-cesiumInspector-pickButton",g.setAttribute("data-bind","click: incrementDepthFrustum"),p.appendChild(g);const C=s(a,"Primitives","primitivesVisible","togglePrimitives"),y=document.createElement("div");y.className="cesium-cesiumInspector-pickSection",C.appendChild(y);const _=document.createElement("input");_.type="button",_.value="Pick a primitive",_.className="cesium-cesiumInspector-pickButton",_.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let E=document.createElement("div");E.className="cesium-cesiumInspector-center",E.appendChild(_),y.appendChild(E),y.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),y.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),y.appendChild(this._primitiveOnly);const b=s(a,"Terrain","terrainVisible","toggleTerrain"),I=document.createElement("div");I.className="cesium-cesiumInspector-pickSection",b.appendChild(I);const S=document.createElement("input");S.type="button",S.value="Pick a tile",S.className="cesium-cesiumInspector-pickButton",S.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),E=document.createElement("div"),E.appendChild(S),E.className="cesium-cesiumInspector-center",I.appendChild(E);const T=document.createElement("div");I.appendChild(T);const v=document.createElement("input");v.type="button",v.value="Parent",v.className="cesium-cesiumInspector-pickButton",v.setAttribute("data-bind","click: selectParent");const x=document.createElement("input");x.type="button",x.value="NW",x.className="cesium-cesiumInspector-pickButton",x.setAttribute("data-bind","click: selectNW");const w=document.createElement("input");w.type="button",w.value="NE",w.className="cesium-cesiumInspector-pickButton",w.setAttribute("data-bind","click: selectNE");const D=document.createElement("input");D.type="button",D.value="SW",D.className="cesium-cesiumInspector-pickButton",D.setAttribute("data-bind","click: selectSW");const B=document.createElement("input");B.type="button",B.value="SE",B.className="cesium-cesiumInspector-pickButton",B.setAttribute("data-bind","click: selectSE");const P=document.createElement("div");P.className="cesium-cesiumInspector-tileText",T.className="cesium-cesiumInspector-frustumStatistics",T.appendChild(P),T.setAttribute("data-bind","visible: hasPickedTile"),P.setAttribute("data-bind","html: tileText");const $=document.createElement("div");$.className="cesium-cesiumInspector-relativeText",$.textContent="Select relative:",T.appendChild($);const M=document.createElement("table"),R=document.createElement("tr"),O=document.createElement("tr"),F=document.createElement("td");F.appendChild(v);const N=document.createElement("td");N.appendChild(x);const L=document.createElement("td");L.appendChild(w),R.appendChild(F),R.appendChild(N),R.appendChild(L);const k=document.createElement("td"),Q=document.createElement("td");Q.appendChild(D);const U=document.createElement("td");U.appendChild(B),O.appendChild(k),O.appendChild(Q),O.appendChild(U),M.appendChild(R),M.appendChild(O),T.appendChild(M),I.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),I.appendChild(c("Show only selected","filterTile","hasPickedTile")),b.appendChild(c("Wireframe","wireframe")),b.appendChild(c("Suspend LOD update","suspendUpdates")),b.appendChild(c("Show tile coordinates","tileCoordinates")),knockout.applyBindings(n,this._element)}function getPickTileset(e){return function(t){const i=e._scene.pick(t.position);defined$1(i)&&i.primitive instanceof Cesium3DTileset&&(e.tileset=i.primitive),e.pickActive=!1}}function selectTilesetOnHover(e,t){t?e._eventHandler.setInputAction(function(t){const i=e._scene.pick(t.endPosition);defined$1(i)&&i.primitive instanceof Cesium3DTileset&&(e.tileset=i.primitive)},ScreenSpaceEventType$1.MOUSE_MOVE):(e._eventHandler.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE),e.picking=e.picking)}Object.defineProperties(CesiumInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},toggleDropDown:{get:function(){return this._toggleDropDown}},showPrimitiveBoundingSphere:{get:function(){return this._showPrimitiveBoundingSphere}},showPrimitiveReferenceFrame:{get:function(){return this._showPrimitiveReferenceFrame}},doFilterPrimitive:{get:function(){return this._doFilterPrimitive}},incrementDepthFrustum:{get:function(){return this._incrementDepthFrustum}},decrementDepthFrustum:{get:function(){return this._decrementDepthFrustum}},showTileCoordinates:{get:function(){return this._showTileCoordinates}},showTileBoundingSphere:{get:function(){return this._showTileBoundingSphere}},doFilterTile:{get:function(){return this._doFilterTile}},toggleGeneral:{get:function(){return this._toggleGeneral}},togglePrimitives:{get:function(){return this._togglePrimitives}},toggleTerrain:{get:function(){return this._toggleTerrain}},pickPrimitive:{get:function(){return this._pickPrimitive}},pickTile:{get:function(){return this._pickTile}},selectParent:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){const e=this;return createCommand(function(){e.tile=e.tile.southeastChild})}},primitive:{get:function(){return this._primitive},set:function(e){const t=this._primitive;e!==t&&(this.hasPickedPrimitive=!0,defined$1(t)&&(t.debugShowBoundingVolume=!1),this._scene.debugCommandFilter=void 0,defined$1(this._modelMatrixPrimitive)&&(this._scene.primitives.remove(this._modelMatrixPrimitive),this._modelMatrixPrimitive=void 0),this._primitive=e,e.show=!1,setTimeout(function(){e.show=!0},50),this.showPrimitiveBoundingSphere(),this.showPrimitiveReferenceFrame(),this.doFilterPrimitive())}},tile:{get:function(){return this._tile},set:function(e){if(defined$1(e)){this.hasPickedTile=!0;if(e!==this._tile){this.tileText=`L: ${e.level} X: ${e.x} Y: ${e.y}`,this.tileText+=`<br>SW corner: ${e.rectangle.west}, ${e.rectangle.south}`,this.tileText+=`<br>NE corner: ${e.rectangle.east}, ${e.rectangle.north}`;const t=e.data;defined$1(t)&&defined$1(t.tileBoundingRegion)?this.tileText+=`<br>Min: ${t.tileBoundingRegion.minimumHeight} Max: ${t.tileBoundingRegion.maximumHeight}`:this.tileText+="<br>(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}}),CesiumInspectorViewModel.prototype._update=function(){this.frustums&&(this.frustumStatisticText=frustumStatisticsToString(this._scene.debugFrustumStatistics));const e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=boundDepthFrustum(1,e,this.depthFrustum),this.depthFrustumText=`${this.depthFrustum} of ${e}`,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText=`Cached shaders: ${this._scene.context.shaderCache.numberOfShaders}`},CesiumInspectorViewModel.prototype.isDestroyed=function(){return!1},CesiumInspectorViewModel.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),destroyObject$1(this)},Object.defineProperties(CesiumInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),CesiumInspector.prototype.isDestroyed=function(){return!1},CesiumInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject$1(this)};const stringOptions={maximumFractionDigits:3};function formatMemoryString(e){const t=e/1048576;return t<1?t.toLocaleString(void 0,stringOptions):Math.round(t).toLocaleString()}function getStatistics(e,t){if(!defined$1(e))return"";const i=t?e._statisticsPerPass[Cesium3DTilePass$1.PICK]:e._statisticsPerPass[Cesium3DTilePass$1.RENDER];let n='<ul class="cesium-cesiumInspector-statistics">';return n+=`<li><strong>Visited: </strong>${i.visited.toLocaleString()}</li><li><strong>Selected: </strong>${i.selected.toLocaleString()}</li><li><strong>Commands: </strong>${i.numberOfCommands.toLocaleString()}</li>`,n+="</ul>",t||(n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Requests: </strong>${i.numberOfPendingRequests.toLocaleString()}</li><li><strong>Attempted: </strong>${i.numberOfAttemptedRequests.toLocaleString()}</li><li><strong>Processing: </strong>${i.numberOfTilesProcessing.toLocaleString()}</li><li><strong>Content Ready: </strong>${i.numberOfTilesWithContentReady.toLocaleString()}</li><li><strong>Total: </strong>${i.numberOfTilesTotal.toLocaleString()}</li>`,n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Features Selected: </strong>${i.numberOfFeaturesSelected.toLocaleString()}</li><li><strong>Features Loaded: </strong>${i.numberOfFeaturesLoaded.toLocaleString()}</li><li><strong>Points Selected: </strong>${i.numberOfPointsSelected.toLocaleString()}</li><li><strong>Points Loaded: </strong>${i.numberOfPointsLoaded.toLocaleString()}</li><li><strong>Triangles Selected: </strong>${i.numberOfTrianglesSelected.toLocaleString()}</li>`,n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Tiles styled: </strong>${i.numberOfTilesStyled.toLocaleString()}</li><li><strong>Features styled: </strong>${i.numberOfFeaturesStyled.toLocaleString()}</li>`,n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Children Union Culled: </strong>${i.numberOfTilesCulledWithChildrenUnion.toLocaleString()}</li>`,n+="</ul>",n+='<ul class="cesium-cesiumInspector-statistics">',n+=`<li><strong>Geometry Memory (MB): </strong>${formatMemoryString(i.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${formatMemoryString(i.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${formatMemoryString(i.batchTableByteLength)}</li>`,n+="</ul>"),n}function getResourceCacheStatistics(){const e=ResourceCache.statistics;return`\n <ul class="cesium-cesiumInspector-statistics">\n <li><strong>Geometry Memory (MB): </strong>${formatMemoryString(e.geometryByteLength)}</li>\n <li><strong>Texture Memory (MB): </strong>${formatMemoryString(e.texturesByteLength)}</li>\n </ul>\n `}const colorBlendModes=[{text:"Highlight",value:Cesium3DTileColorBlendMode$1.HIGHLIGHT},{text:"Replace",value:Cesium3DTileColorBlendMode$1.REPLACE},{text:"Mix",value:Cesium3DTileColorBlendMode$1.MIX}],highlightColor=new Color(1,1,0,.4),scratchColor=new Color,oldColor=new Color;function Cesium3DTilesInspectorViewModel(e,t){Check.typeOf.object("scene",e),Check.typeOf.object("performanceContainer",t);const i=this,n=e.canvas;this._eventHandler=new ScreenSpaceEventHandler(n),this._scene=e,this._performanceContainer=t,this._canvas=n,this._performanceDisplay=new PerformanceDisplay({container:t}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,knockout.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=knockout.observable({}),this.properties=[],knockout.defineProperty(this,"properties",function(){const e=[],t=i._properties();for(const i in t)t.hasOwnProperty(i)&&e.push(i);return e});const r=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return r()},set:function(e){r(e),defined$1(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;const o=knockout.observable();knockout.defineProperty(this,"colorBlendMode",{get:function(){return o()},set:function(e){o(e),defined$1(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=Cesium3DTileColorBlendMode$1.HIGHLIGHT;const a=knockout.observable(),s=knockout.observable();knockout.defineProperty(this,"picking",{get:function(){return s()},set:function(t){s(t),t?i._eventHandler.setInputAction(function(t){const n=e.pick(t.endPosition);if(n instanceof Cesium3DTileFeature?(i.feature=n,i.tile=n.content.tile):defined$1(n)&&defined$1(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),defined$1(i._tileset)){if(a&&defined$1(n)&&defined$1(n.content)){let r;e.pickPositionSupported&&(r=e.pickPosition(t.endPosition),defined$1(r)&&(i._tileset.debugPickPosition=r)),i._tileset.debugPickedTile=n.content.tile}else i._tileset.debugPickedTile=void 0;i._scene.requestRender()}},ScreenSpaceEventType$1.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(ScreenSpaceEventType$1.MOUSE_MOVE))}}),this.picking=!0;const c=knockout.observable();knockout.defineProperty(this,"colorize",{get:function(){return c()},set:function(e){c(e),defined$1(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;const l=knockout.observable();knockout.defineProperty(this,"wireframe",{get:function(){return l()},set:function(e){l(e),defined$1(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;const d=knockout.observable();knockout.defineProperty(this,"showBoundingVolumes",{get:function(){return d()},set:function(e){d(e),defined$1(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;const u=knockout.observable();knockout.defineProperty(this,"showContentBoundingVolumes",{get:function(){return u()},set:function(e){u(e),defined$1(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;const h=knockout.observable();knockout.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),defined$1(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;const p=knockout.observable();knockout.defineProperty(this,"freezeFrame",{get:function(){return p()},set:function(e){p(e),defined$1(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1,knockout.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return a()},set:function(e){a(e),defined$1(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;const A=knockout.observable();knockout.defineProperty(this,"showGeometricError",{get:function(){return A()},set:function(e){A(e),defined$1(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;const m=knockout.observable();knockout.defineProperty(this,"showRenderingStatistics",{get:function(){return m()},set:function(e){m(e),defined$1(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;const f=knockout.observable();knockout.defineProperty(this,"showMemoryUsage",{get:function(){return f()},set:function(e){f(e),defined$1(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;const g=knockout.observable();knockout.defineProperty(this,"showUrl",{get:function(){return g()},set:function(e){g(e),defined$1(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;const C=knockout.observable();knockout.defineProperty(this,"maximumScreenSpaceError",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),defined$1(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;const y=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return y()},set:function(e){e=Number(e),isNaN(e)||(y(e),defined$1(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,knockout.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(y(),1/6)},set:function(e){const t=Math.pow(e,6);y(t),defined$1(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=t)}});const _=knockout.observable();knockout.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return _()},set:function(e){e=Number(e),isNaN(e)||(_(e),defined$1(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=24;const E=getPickTileset(this),b=knockout.observable();knockout.defineProperty(this,"pickActive",{get:function(){return b()},set:function(e){b(e),e?i._eventHandler.setInputAction(E,ScreenSpaceEventType$1.LEFT_CLICK):i._eventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK)}});const I=knockout.observable();knockout.defineProperty(this,"pointCloudShading",{get:function(){return I()},set:function(e){I(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;const S=knockout.observable();knockout.defineProperty(this,"geometricErrorScale",{get:function(){return S()},set:function(e){e=Number(e),isNaN(e)||(S(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;const T=knockout.observable();knockout.defineProperty(this,"maximumAttenuation",{get:function(){return T()},set:function(e){e=Number(e),isNaN(e)||(T(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;const v=knockout.observable();knockout.defineProperty(this,"baseResolution",{get:function(){return v()},set:function(e){e=Number(e),isNaN(e)||(v(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;const x=knockout.observable();knockout.defineProperty(this,"eyeDomeLighting",{get:function(){return x()},set:function(e){x(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;const w=knockout.observable();knockout.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;const D=knockout.observable();knockout.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return D()},set:function(e){e=Number(e),isNaN(e)||(D(e),defined$1(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;const B=knockout.observable();knockout.defineProperty(this,"skipLevelOfDetail",{get:function(){return B()},set:function(e){B(e),defined$1(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;const P=knockout.observable();knockout.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return P()},set:function(e){e=Number(e),isNaN(e)||(P(e),defined$1(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;const $=knockout.observable();knockout.defineProperty(this,"baseScreenSpaceError",{get:function(){return $()},set:function(e){e=Number(e),isNaN(e)||($(e),defined$1(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;const M=knockout.observable();knockout.defineProperty(this,"skipLevels",{get:function(){return M()},set:function(e){e=Number(e),isNaN(e)||(M(e),defined$1(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;const R=knockout.observable();knockout.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return R()},set:function(e){R(e),defined$1(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;const O=knockout.observable();knockout.defineProperty(this,"loadSiblings",{get:function(){return O()},set:function(e){O(e),defined$1(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener(function(){i._update()}),defined$1(this._tileset)||selectTilesetOnHover(this,!0)}function hasFeatures(e){if(!defined$1(e))return!1;if(e.featuresLength>0)return!0;const t=e.innerContents;if(defined$1(t)){const e=t.length;for(let i=0;i<e;++i)if(!hasFeatures(t[i]))return!1;return!0}return!1}function Cesium3DTilesInspector(e,t){Check.defined("container",e),Check.typeOf.object("scene",t),e=getElement(e);const i=document.createElement("div"),n=document.createElement("div");n.setAttribute("data-bind","visible: performance");const r=new Cesium3DTilesInspectorViewModel(t,n);this._viewModel=r,this._container=e,this._element=i;const o=document.createElement("div");o.textContent="3D Tiles Inspector",o.className="cesium-cesiumInspector-button",o.setAttribute("data-bind","click: toggleInspector"),i.appendChild(o),i.className="cesium-cesiumInspector cesium-3DTilesInspector",i.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);const a=document.createElement("div");a.className="cesium-cesiumInspector-dropDown",i.appendChild(a);const s=InspectorShared.createSection,c=InspectorShared.createCheckbox,l=InspectorShared.createRangeInput,d=InspectorShared.createButton,u=s(a,"Tileset","tilesetVisible","toggleTileset"),h=s(a,"Display","displayVisible","toggleDisplay"),p=s(a,"Update","updateVisible","toggleUpdate"),A=s(a,"Logging","loggingVisible","toggleLogging"),m=s(a,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),f=s(a,"Style","styleVisible","toggleStyle"),g=s(a,"Optimization","optimizationVisible","toggleOptimization"),C=document.createElement("div");C.className="field-group";const y=document.createElement("label");y.className="field-label",y.appendChild(document.createTextNode("Properties: "));const _=document.createElement("div");_.setAttribute("data-bind","text: properties"),C.appendChild(y),C.appendChild(_),u.appendChild(C),u.appendChild(d("Pick Tileset","togglePickTileset","pickActive")),u.appendChild(d("Trim Tiles Cache","trimTilesCache")),u.appendChild(c("Enable Picking","picking")),h.appendChild(c("Colorize","colorize"));const E=h.appendChild(c("Wireframe","wireframe","_tileset === undefined || hasEnabledWireframe")),b=document.createElement("p");b.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),b.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),b.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",E.appendChild(b),h.appendChild(c("Bounding Volumes","showBoundingVolumes")),h.appendChild(c("Content Volumes","showContentBoundingVolumes")),h.appendChild(c("Request Volumes","showRequestVolumes")),h.appendChild(c("Point Cloud Shading","pointCloudShading"));const I=document.createElement("div");I.setAttribute("data-bind","visible: pointCloudShading"),I.appendChild(l("Geometric Error Scale","geometricErrorScale",0,2,.01)),I.appendChild(l("Maximum Attenuation","maximumAttenuation",0,32,1)),I.appendChild(l("Base Resolution","baseResolution",0,1,.01)),I.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),h.appendChild(I);const S=document.createElement("div");S.setAttribute("data-bind","visible: eyeDomeLighting"),S.appendChild(l("EDL Strength","eyeDomeLightingStrength",0,2,.1)),S.appendChild(l("EDL Radius","eyeDomeLightingRadius",0,4,.1)),I.appendChild(S),p.appendChild(c("Freeze Frame","freezeFrame")),p.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));const T=document.createElement("div");T.appendChild(l("Maximum Screen Space Error","maximumScreenSpaceError",0,128,1)),p.appendChild(T);const v=document.createElement("div");v.setAttribute("data-bind","visible: dynamicScreenSpaceError"),v.appendChild(l("Screen Space Error Density","dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"dynamicScreenSpaceErrorDensity")),v.appendChild(l("Screen Space Error Factor","dynamicScreenSpaceErrorFactor",1,32,.1)),p.appendChild(v),A.appendChild(c("Performance","performance")),A.appendChild(n),A.appendChild(c("Statistics","showStatistics"));const x=document.createElement("div");x.className="cesium-3dTilesInspector-statistics",x.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),A.appendChild(x),A.appendChild(c("Pick Statistics","showPickStatistics"));const w=document.createElement("div");w.className="cesium-3dTilesInspector-statistics",w.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),A.appendChild(w),A.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));const D=document.createElement("div");D.className="cesium-3dTilesInspector-statistics",D.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),A.appendChild(D);const B=document.createElement("div");f.appendChild(B),B.appendChild(document.createTextNode("Color Blend Mode: "));const P=document.createElement("select");P.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),B.appendChild(P);const $=document.createElement("textarea");$.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),B.className="cesium-cesiumInspector-styleEditor",B.appendChild($);const M=d("Compile (Ctrl+Enter)","compileStyle");B.appendChild(M);const R=document.createElement("div");R.className="cesium-cesiumInspector-error",R.setAttribute("data-bind","text: editorError"),B.appendChild(R),m.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),m.appendChild(c("Geometric Error","showGeometricError")),m.appendChild(c("Rendering Statistics","showRenderingStatistics")),m.appendChild(c("Memory Usage (MB)","showMemoryUsage")),m.appendChild(c("Url","showUrl")),g.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));const O=document.createElement("div");O.appendChild(l("Skip SSE Factor","skipScreenSpaceErrorFactor",1,50,1)),g.appendChild(O);const F=document.createElement("div");F.appendChild(l("SSE before skipping LOD","baseScreenSpaceError",0,4096,1)),g.appendChild(F);const N=document.createElement("div");N.appendChild(l("Min. levels to skip","skipLevels",0,10,1)),g.appendChild(N),g.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),g.appendChild(c("Load siblings of visible tiles","loadSiblings")),knockout.applyBindings(r,i)}function FullscreenButtonViewModel(e,t){defined$1(t)||(t=document.body),t=getElement(t);const i=this,n=knockout.observable(Fullscreen.fullscreen),r=knockout.observable(Fullscreen.enabled),o=t.ownerDocument;this.isFullscreen=void 0,knockout.defineProperty(this,"isFullscreen",{get:function(){return n()}}),this.isFullscreenEnabled=void 0,knockout.defineProperty(this,"isFullscreenEnabled",{get:function(){return r()},set:function(e){r(e&&Fullscreen.enabled)}}),this.tooltip=void 0,knockout.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?n()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=createCommand(function(){Fullscreen.fullscreen?Fullscreen.exitFullscreen():Fullscreen.requestFullscreen(i._fullscreenElement)},knockout.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=getElement(e)??o.body,this._callback=function(){n(Fullscreen.fullscreen)},o.addEventListener(Fullscreen.changeEventName,this._callback)}Object.defineProperties(Cesium3DTilesInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},performanceContainer:{get:function(){return this._performanceContainer}},statisticsText:{get:function(){return this._statisticsText}},pickStatisticsText:{get:function(){return this._pickStatisticsText}},resourceCacheStatisticsText:{get:function(){return this._resourceCacheStatisticsText}},colorBlendModes:{get:function(){return colorBlendModes}},editorError:{get:function(){return this._editorError}},tileset:{get:function(){return this._tileset},set:function(e){if(this._tileset=e,this._style=void 0,this.styleString="{}",this.feature=void 0,this.tile=void 0,defined$1(e)){this._properties(e.properties);const t=["colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl"],i=t.length;for(let e=0;e<i;++e){const i=t[e];this[i]=this[i]}this.maximumScreenSpaceError=e.maximumScreenSpaceError,this.dynamicScreenSpaceError=e.dynamicScreenSpaceError,this.dynamicScreenSpaceErrorDensity=e.dynamicScreenSpaceErrorDensity,this.dynamicScreenSpaceErrorFactor=e.dynamicScreenSpaceErrorFactor,this.colorBlendMode=e.colorBlendMode,this.skipLevelOfDetail=e.skipLevelOfDetail,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor,this.baseScreenSpaceError=e.baseScreenSpaceError,this.skipLevels=e.skipLevels,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail,this.loadSiblings=e.loadSiblings,this.hasEnabledWireframe=e._enableDebugWireframe;const n=e.pointCloudShading;this.pointCloudShading=n.attenuation,this.geometricErrorScale=n.geometricErrorScale,this.maximumAttenuation=n.maximumAttenuation?n.maximumAttenuation:0,this.baseResolution=n.baseResolution?n.baseResolution:0,this.eyeDomeLighting=n.eyeDomeLighting,this.eyeDomeLightingStrength=n.eyeDomeLightingStrength,this.eyeDomeLightingRadius=n.eyeDomeLightingRadius,this._scene.requestRender()}else this._properties({});this._statisticsText=getStatistics(e,!1),this._pickStatisticsText=getStatistics(e,!0),this._resourceCacheStatisticsText=getResourceCacheStatistics(),selectTilesetOnHover(this,!1)}},feature:{get:function(){return this._feature},set:function(e){if(this._feature===e)return;const t=this._feature;defined$1(t)&&!t.content.isDestroyed()&&(!this.colorize&&defined$1(this._style)?t.color=defined$1(this._style.color)?this._style.color.evaluateColor(t,scratchColor):Color.WHITE:t.color=oldColor,this._scene.requestRender()),defined$1(e)&&(Color.clone(e.color,oldColor),e.color=highlightColor,this._scene.requestRender()),this._feature=e}},tile:{get:function(){return this._tile},set:function(e){if(this._tile===e)return;const t=this._tile;!defined$1(t)||t.isDestroyed()||hasFeatures(t.content)||(t.color=oldColor,this._scene.requestRender()),defined$1(e)&&!hasFeatures(e.content)&&(Color.clone(e.color,oldColor),e.color=highlightColor,this._scene.requestRender()),this._tile=e}}}),Cesium3DTilesInspectorViewModel.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive},Cesium3DTilesInspectorViewModel.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},Cesium3DTilesInspectorViewModel.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible},Cesium3DTilesInspectorViewModel.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},Cesium3DTilesInspectorViewModel.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible},Cesium3DTilesInspectorViewModel.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible},Cesium3DTilesInspectorViewModel.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible},Cesium3DTilesInspectorViewModel.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible},Cesium3DTilesInspectorViewModel.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible},Cesium3DTilesInspectorViewModel.prototype.trimTilesCache=function(){defined$1(this._tileset)&&this._tileset.trimLoadedTiles()},Cesium3DTilesInspectorViewModel.prototype.compileStyle=function(){const e=this._tileset;if(defined$1(e)&&this.styleString!==JSON.stringify(e.style)){this._editorError="";try{0===this.styleString.length&&(this.styleString="{}"),this._style=new Cesium3DTileStyle(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(e){this._editorError=e.toString()}this.feature=this._feature,this.tile=this._tile}},Cesium3DTilesInspectorViewModel.prototype.styleEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();const e=t.target,i=e.selectionStart,n=e.selectionEnd;let r=n;const o=e.value.slice(i,n).split("\n"),a=o.length;let s;if(t.shiftKey)for(s=0;s<a;++s)" "===o[s][0]&&(" "===o[s][1]?(o[s]=o[s].substr(2),r-=2):(o[s]=o[s].substr(1),r-=1));else for(s=0;s<a;++s)o[s]=` ${o[s]}`,r+=2;const c=o.join("\n");e.value=e.value.slice(0,i)+c+e.value.slice(n),e.selectionStart=i!==n?i:r,e.selectionEnd=r}else!t.ctrlKey||10!==t.keyCode&&13!==t.keyCode||this.compileStyle();return!0},Cesium3DTilesInspectorViewModel.prototype._update=function(){const e=this._tileset;if(this.performance&&this._performanceDisplay.update(),defined$1(e)){if(e.isDestroyed())return this.tile=void 0,this.feature=void 0,void(this.tileset=void 0);const t=e.style;this._style!==e.style&&(this._shouldStyle?(e.style=this._style,this._shouldStyle=!1):(this._style=t,this.styleString=JSON.stringify(t.style,null," ")))}this.showStatistics&&(this._statisticsText=getStatistics(e,!1),this._pickStatisticsText=getStatistics(e,!0),this._resourceCacheStatisticsText=getResourceCacheStatistics())},Cesium3DTilesInspectorViewModel.prototype.isDestroyed=function(){return!1},Cesium3DTilesInspectorViewModel.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();const e=this;return this._definedProperties.forEach(function(t){knockout.getObservable(e,t).dispose()}),destroyObject$1(this)},Cesium3DTilesInspectorViewModel.getStatistics=getStatistics,Object.defineProperties(Cesium3DTilesInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),Cesium3DTilesInspector.prototype.isDestroyed=function(){return!1},Cesium3DTilesInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject$1(this)},Object.defineProperties(FullscreenButtonViewModel.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new DeveloperError$1("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),FullscreenButtonViewModel.prototype.isDestroyed=function(){return!1},FullscreenButtonViewModel.prototype.destroy=function(){document.removeEventListener(Fullscreen.changeEventName,this._callback),destroyObject$1(this)};const 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",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";function FullscreenButton(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");const i=new FullscreenButtonViewModel(t,e=getElement(e));i._exitFullScreenPath=exitFullScreenPath,i._enterFullScreenPath=enterFullScreenPath;const n=document.createElement("button");n.type="button",n.className="cesium-button cesium-fullscreenButton",n.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(n),knockout.applyBindings(i,n),this._container=e,this._viewModel=i,this._element=n}Object.defineProperties(FullscreenButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),FullscreenButton.prototype.isDestroyed=function(){return!1},FullscreenButton.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject$1(this)};const DEFAULT_HEIGHT=1e3;function GeocoderViewModel(e){if(!defined$1(e)||!defined$1(e.scene))throw new DeveloperError$1("options.scene is required.");defined$1(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new IonGeocoderService({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 Event$1,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=handleArrowDown,this._handleArrowUp=handleArrowUp;const t=this;this._suggestionsVisible=knockout.pureComputed(function(){const e=knockout.getObservable(t,"_suggestions")().length>0,i=knockout.getObservable(t,"_showSuggestions")();return e&&i}),this._searchCommand=createCommand(function(e){return e=e??GeocodeType$1.SEARCH,t._focusTextbox=!1,defined$1(t._selectedSuggestion)?(t.activateSuggestion(t._selectedSuggestion),!1):(t.hideSuggestions(),t.isSearchInProgress?void cancelGeocode(t):geocode(t,t._geocoderServices,e))}),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(e,t){const i="ArrowDown"===t.key||"Down"===t.key||40===t.keyCode,n="ArrowUp"===t.key||"Up"===t.key||38===t.keyCode;return(i||n)&&t.preventDefault(),!0},this.handleKeyUp=function(e,i){const n="ArrowDown"===i.key||"Down"===i.key||40===i.keyCode,r="ArrowUp"===i.key||"Up"===i.key||38===i.keyCode,o="Enter"===i.key||13===i.keyCode;return r?handleArrowUp(t):n?handleArrowDown(t):o&&t._searchCommand(),!0},this.activateSuggestion=function(e){t.hideSuggestions(),t._searchText=e.displayName;const i=e.destination;clearSuggestions(t),t.destinationFound(t,i)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(e,i){e!==t._selectedSuggestion&&(t._selectedSuggestion=e)},this.keepExpanded=!1,this.autoComplete=e.autocomplete??!0,this.destinationFound=e.destinationFound??GeocoderViewModel.flyToDestination,this._focusTextbox=!1,knockout.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);const i=knockout.getObservable(this,"_searchText");i.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=i.subscribe(function(){GeocoderViewModel._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,knockout.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,knockout.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){if("string"!=typeof e)throw new DeveloperError$1("value must be a valid string.");this._searchText=e}}),this.flightDuration=void 0,knockout.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){if(defined$1(e)&&e<0)throw new DeveloperError$1("value must be positive.");this._flightDuration=e}})}function handleArrowUp(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 i=t-1;e._selectedSuggestion=e._suggestions[i],GeocoderViewModel._adjustSuggestionsScroll(e,i)}function handleArrowDown(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],GeocoderViewModel._adjustSuggestionsScroll(e,i)}function computeFlyToLocationForCartographic(e,t){const i=defined$1(t)?t.availability:void 0;return defined$1(i)?sampleTerrainMostDetailed(t,[e]).then(function(t){return(e=t[0]).height+=DEFAULT_HEIGHT,e}):(e.height+=DEFAULT_HEIGHT,Promise.resolve(e))}function flyToDestination(e,t){const i=e._scene,n=i.ellipsoid,r=i.camera,o=i.terrainProvider;let a,s=t;return t instanceof Rectangle?CesiumMath.equalsEpsilon(t.south,t.north,CesiumMath.EPSILON7)&&CesiumMath.equalsEpsilon(t.east,t.west,CesiumMath.EPSILON7)?t=Rectangle.center(t):a=computeFlyToLocationForRectangle(t,i):t=n.cartesianToCartographic(t),defined$1(a)||(a=computeFlyToLocationForCartographic(t,o)),a.then(function(e){s=n.cartographicToCartesian(e)}).finally(function(){r.flyTo({destination:s,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:Matrix4$1.IDENTITY})})}async function attemptGeocode(e,t,i){try{return{state:"fulfilled",value:await e.geocode(t,i),credits:e.credit}}catch(e){return{state:"rejected",reason:e}}}async function geocode(e,t,i){const n=e._searchText;if(hasOnlyWhitespace(n))return void e.showSuggestions();let r,o;for(e._isSearchInProgress=!0,e._wasGeocodeCancelled=!1,r=0;r<t.length;r++){if(e._wasGeocodeCancelled)return;if(o=await attemptGeocode(t[r],n,i),defined$1(o)&&"fulfilled"===o.state&&o.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,clearCredits(e);const a=o.value;if("fulfilled"===o.state&&defined$1(a)&&a.length>0){e._searchText=a[0].displayName,e.destinationFound(e,a[0].destination);return void(defined$1(updateCredits(e,GeocoderService.getCreditsFromResult(a[0])))||updateCredit(e,t[r].credit))}e._searchText=`${n} (not found)`}function updateCredit(e,t){!defined$1(t)||e._scene.isDestroyed()||e._scene.frameState.creditDisplay.isDestroyed()||(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function updateCredits(e,t){return defined$1(t)&&t.forEach(t=>updateCredit(e,t)),t}function clearCredits(e){e._scene.isDestroyed()||e._scene.frameState.creditDisplay.isDestroyed()||e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function adjustSuggestionsScroll(e,t){const i=getElement(e._viewContainer),n=i.getElementsByClassName("search-results")[0],r=i.getElementsByTagName("li")[t];if(0===t)return void(n.scrollTop=0);const o=r.offsetTop;o+r.clientHeight>n.clientHeight?n.scrollTop=o+r.clientHeight:o<n.scrollTop&&(n.scrollTop=o)}function cancelGeocode(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function hasOnlyWhitespace(e){return/^\s*$/.test(e)}function clearSuggestions(e){knockout.getObservable(e,"_suggestions").removeAll()}async function updateSearchSuggestions(e){if(!e.autoComplete)return;const t=e._searchText;if(clearSuggestions(e),clearCredits(e),!hasOnlyWhitespace(t))for(const i of e._geocoderServices){const n=await i.geocode(t,GeocodeType$1.AUTOCOMPLETE);if(e._suggestions=e._suggestions.concat(n),n.length>0){let t=!0;n.forEach(i=>{const n=GeocoderService.getCreditsFromResult(i);t=t&&!defined$1(n),updateCredits(e,n)}),t&&updateCredit(e,i.credit)}if(e._suggestions.length>=5)return}}Object.defineProperties(GeocoderViewModel.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}}}),GeocoderViewModel.prototype.destroy=function(){this._suggestionSubscription.dispose()},GeocoderViewModel.flyToDestination=flyToDestination,GeocoderViewModel._updateSearchSuggestions=updateSearchSuggestions,GeocoderViewModel._adjustSuggestionsScroll=adjustSuggestionsScroll,GeocoderViewModel.prototype.isDestroyed=function(){return!1},GeocoderViewModel.prototype.destroy=function(){return clearCredits(this),destroyObject$1(this)};const 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",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";function Geocoder(e){if(!defined$1(e)||!defined$1(e.container))throw new DeveloperError$1("options.container is required.");if(!defined$1(e.scene))throw new DeveloperError$1("options.scene is required.");const t=getElement(e.container),i=new GeocoderViewModel(e);i._startSearchPath=startSearchPath,i._stopSearchPath=stopSearchPath;const n=document.createElement("form");n.setAttribute("data-bind","submit: search");const r=document.createElement("input");r.type="search",r.className="cesium-geocoder-input",r.setAttribute("placeholder","Enter an address or landmark..."),r.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(){r.select()},0)},r.addEventListener("focus",this._onTextBoxFocus,!1),n.appendChild(r),this._textBox=r;const o=document.createElement("span");o.className="cesium-geocoder-searchButton",o.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),n.appendChild(o),t.appendChild(n);const a=document.createElement("div");a.className="search-results",a.setAttribute("data-bind","visible: _suggestionsVisible");const s=document.createElement("ul");s.setAttribute("data-bind","foreach: _suggestions");const c=document.createElement("li");s.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),a.appendChild(s),t.appendChild(a),knockout.applyBindings(i,n),knockout.applyBindings(i,a),this._container=t,this._searchSuggestionsContainer=a,this._viewModel=i,this._form=n,this._onInputBegin=function(e){let n=e.target;"function"==typeof e.composedPath&&(n=e.composedPath()[0]),t.contains(n)||(i._focusTextbox=!1,i.hideSuggestions())},this._onInputEnd=function(e){i._focusTextbox=!0,i.showSuggestions()},FeatureDetection.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))}function HomeButtonViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("scene is required.");this._scene=e,this._duration=t;const i=this;this._command=createCommand(function(){i._scene.camera.flyHome(i._duration)}),this.tooltip="View Home",knockout.track(this,["tooltip"])}function HomeButton(e,t,i){if(!defined$1(e))throw new DeveloperError$1("container is required.");e=getElement(e);const n=new HomeButtonViewModel(t,i);n._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 r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-home-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(r),knockout.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}function expandItemsHandler(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent="+"===t.currentTarget.textContent?"-":"+"}function trackSublayer(e,t){knockout.track(e);for(let t=0;t<e.sublayers.length;t++)trackSublayer(e.sublayers[t])}function isFullModel(e){return"FullModel"===e.modelName}function isOverview(e){return"Overview"===e.modelName}function isTopLayer(e){return isOverview(e)||isFullModel(e)}function addTopLayer(e,t){if(isTopLayer(e)){e.visibility=!1;for(let t=0;t<e.sublayers.length;t++)e.sublayers[t].visibility=!0;const i={name:e.name,modelName:e.modelName,disable:knockout.observable(!1),index:t.sublayers.length};return t.topLayers.push(i),t.sublayers.push(e),i}}function handleTopLayerSelector(e,t){if(isTopLayer(e)){t.sublayers.forEach(e=>e.visibility=!1),t.sublayers[e.index].visibility=!0;const i=document.getElementById("bsl-wrapper");isFullModel(e)?(t.currentLevel=t.selectedLevel,i.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",i.style.display="none")}}async function setLevels(e,t){try{const i=e.getAttributeNames();for(let n=0;n<i.length;n++)if("BldgLevel"===i[n]){const r=e.getAttributeValues(i[n]);for(let e=0;e<r.length;e++)t.push(r[e])}t.sort((e,t)=>e-t),t.unshift("All")}catch(e){console.log(`There was an error getting attributes: ${e}`)}}function I3SBuildingSceneLayerExplorerViewModel(e){const t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:knockout.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:knockout.observable(!0),index:-1}],currentLayer:knockout.observable(),expandClickHandler:expandItemsHandler,setOptionDisable:function(e,t){knockout.applyBindingsToNode(e,{disable:t.disable},t)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(e){handleTopLayerSelector(e,t.viewModel)});const i=e.sublayers;for(let e=0;e<i.length;e++){trackSublayer(i[e],this.viewModel);const t=addTopLayer(i[e],this.viewModel);defined$1(t)&&(isOverview(t)||!defined$1(this.viewModel.defaultLayer)&&isFullModel(t))&&(this.viewModel.defaultLayer=t)}if(1===this.viewModel.topLayers.length&&i.length>0){e.show=!1;const t={name:"Full Model",modelName:"FullModel",visibility:e.show,sublayers:e.sublayers};this.viewModel.defaultLayer=addTopLayer(t,this.viewModel),this.viewModel.currentLayer.subscribe(function(t){e.show=isFullModel(t)})}else 1===this.viewModel.topLayers.length&&(this.viewModel.topLayers[0].name="Building layers not found");return setLevels(e,this.levels),this.viewModel.currentLevel.subscribe(function(t){"All"!==t?e.filterByAttributes([{name:"BldgLevel",values:[t]}]):e.filterByAttributes()}),this.viewModel}function I3SBuildingSceneLayerExplorer(e,t){const i=document.getElementById(e);Check.defined("container",i),Check.defined("i3sProvider",t);const n=document.createElement("div");n.classList.add("cesium-viewer-i3s-explorer"),n.innerHTML='\n <h3>Building explorer</h3>\n <select\n data-bind="options: topLayers, optionsText: \'name\', optionsAfterRender: setOptionDisable, value: currentLayer"\n ></select>\n <div id="bsl-wrapper">\n <h3>Select Level</h3>\n <select data-bind="options: levels, value: currentLevel"></select>\n <h3>Disciplines & Categories</h3>\n <ul class="layersList" data-bind="foreach: sublayers">\n <ul class="layersList" data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">\n <li>\n <div class="li-wrapper">\n <span\n class="expandItem"\n data-bind="click: $root.expandClickHandler"\n >+</span\n >\n <input\n type="checkbox"\n data-bind="checked: visibility, valueUpdate: \'input\', attr: { id: name}"\n />\n <label data-bind="attr: { for: name}">\n <span data-bind="text: name"></span>\n </label>\n </div>\n <ul class="nested" data-bind="attr: { id: name + \'-expander\'}">\n <li data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">\n <div class="li-wrapper">\n <input\n type="checkbox"\n data-bind="checked: visibility, valueUpdate: \'input\', attr: { id: name}"\n />\n <label data-bind="attr: { for: name}">\n <span data-bind="text: name"></span>\n </label>\n </div>\n </li>\n </ul>\n </li>\n </ul>\n </ul>\n </div>',i.appendChild(n);const r=new I3SBuildingSceneLayerExplorerViewModel(t);knockout.track(r),knockout.applyBindings(r,i),defined$1(r.defaultLayer)&&(r.currentLayer=r.defaultLayer)}Object.defineProperties(Geocoder.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}}),Geocoder.prototype.isDestroyed=function(){return!1},Geocoder.prototype.destroy=function(){const e=this._container;return FeatureDetection.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(),knockout.cleanNode(this._form),knockout.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),destroyObject$1(this)},Object.defineProperties(HomeButtonViewModel.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(defined$1(e)&&e<0)throw new DeveloperError$1("value must be positive.");this._duration=e}}}),Object.defineProperties(HomeButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),HomeButton.prototype.isDestroyed=function(){return!1},HomeButton.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject$1(this)};const cameraEnabledPath="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",cameraDisabledPath="M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z";function InfoBoxViewModel(){this._cameraClicked=new Event$1,this._closeClicked=new Event$1,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",knockout.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,knockout.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?cameraDisabledPath:cameraEnabledPath}}),knockout.defineProperty(this,"_bodyless",{get:function(){return!defined$1(this.description)||0===this.description.length}})}function InfoBox(e){Check.defined("container",e),e=getElement(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 i=document.createElement("div");i.className="cesium-infoBox-title",i.setAttribute("data-bind","text: titleText"),t.appendChild(i);const n=document.createElement("button");n.type="button",n.className="cesium-button cesium-infoBox-camera",n.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(n);const r=document.createElement("button");r.type="button",r.className="cesium-infoBox-close",r.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),r.innerHTML="×",t.appendChild(r);const o=document.createElement("iframe");o.className="cesium-infoBox-iframe",o.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),o.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),o.setAttribute("allowfullscreen",!0),t.appendChild(o);const a=new InfoBoxViewModel;knockout.applyBindings(a,t),this._container=e,this._element=t,this._frame=o,this._viewModel=a,this._descriptionSubscription=void 0;const s=this;o.addEventListener("load",function(){const e=o.contentDocument,i=e.createElement("link");i.href=buildModuleUrl("Widgets/InfoBox/InfoBoxDescription.css"),i.rel="stylesheet",i.type="text/css";const n=e.createElement("div");n.className="cesium-infoBox-description",e.head.appendChild(i),e.body.appendChild(n),s._descriptionSubscription=subscribeAndEvaluate(a,"description",function(e){o.style.height="5px",n.innerHTML=e;let i=null;const r=n.firstElementChild;if(null!==r&&1===n.childNodes.length){const e=window.getComputedStyle(r);if(null!==e){const t=e["background-color"],n=Color.fromCssColorString(t);defined$1(n)&&0!==n.alpha&&(i=e["background-color"])}}t.style["background-color"]=i;const a=n.getBoundingClientRect().height;o.style.height=`${a}px`})}),o.setAttribute("src","about:blank")}function PerformanceWatchdogViewModel(e){if(!defined$1(e)||!defined$1(e.scene))throw new DeveloperError$1("options.scene is required.");this._scene=e.scene,this.lowFrameRateMessage=e.lowFrameRateMessage??"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.",this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,knockout.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);const t=this;this._dismissMessage=createCommand(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});const i=FrameRateMonitor.fromScene(e.scene);this._unsubscribeLowFrameRate=i.lowFrameRate.addEventListener(function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)}),this._unsubscribeNominalFrameRate=i.nominalFrameRate.addEventListener(function(){t.showingLowFrameRateMessage=!1})}function PerformanceWatchdog(e){if(!defined$1(e)||!defined$1(e.container))throw new DeveloperError$1("options.container is required.");if(!defined$1(e.scene))throw new DeveloperError$1("options.scene is required.");const t=getElement(e.container),i=new PerformanceWatchdogViewModel(e),n=document.createElement("div");n.className="cesium-performance-watchdog-message-area",n.setAttribute("data-bind","visible: showingLowFrameRateMessage");const r=document.createElement("button");r.setAttribute("type","button"),r.className="cesium-performance-watchdog-message-dismiss",r.innerHTML="×",r.setAttribute("data-bind","click: dismissMessage"),n.appendChild(r);const o=document.createElement("div");o.className="cesium-performance-watchdog-message",o.setAttribute("data-bind","html: lowFrameRateMessage"),n.appendChild(o),t.appendChild(n),knockout.applyBindings(i,n),this._container=t,this._viewModel=i,this._element=n}function NavigationHelpButtonViewModel(){this.showInstructions=!1;const e=this;this._command=createCommand(function(){e.showInstructions=!e.showInstructions}),this._showClick=createCommand(function(){e._touch=!1}),this._showTouch=createCommand(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",knockout.track(this,["tooltip","showInstructions","_touch"])}function NavigationHelpButton(e){if(!defined$1(e)||!defined$1(e.container))throw new DeveloperError$1("options.container is required.");const t=getElement(e.container),i=new NavigationHelpButtonViewModel,n=e.instructionsInitiallyVisible??!1;i.showInstructions=n,i._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 r=document.createElement("span");r.className="cesium-navigationHelpButton-wrapper",t.appendChild(r);const o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),r.appendChild(o);const a=document.createElement("div");a.className="cesium-navigation-help",a.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),r.appendChild(a);const s=document.createElement("button");s.type="button",s.className="cesium-navigation-button cesium-navigation-button-left",s.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');const c=document.createElement("img");c.src=buildModuleUrl("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",s.appendChild(c),s.appendChild(document.createTextNode("Mouse"));const l=document.createElement("button");l.type="button",l.className="cesium-navigation-button cesium-navigation-button-right",l.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');const d=document.createElement("img");d.src=buildModuleUrl("Widgets/Images/NavigationHelp/Touch.svg"),d.className="cesium-navigation-button-icon",d.style.width="25px",d.style.height="25px",l.appendChild(d),l.appendChild(document.createTextNode("Touch")),a.appendChild(s),a.appendChild(l);const u=document.createElement("div");u.className="cesium-click-navigation-help cesium-navigation-help-instructions",u.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),u.innerHTML=` <table> <tr> <td><img src="${buildModuleUrl("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="${buildModuleUrl("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="${buildModuleUrl("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>`,a.appendChild(u);const h=document.createElement("div");h.className="cesium-touch-navigation-help cesium-navigation-help-instructions",h.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),h.innerHTML=` <table> <tr> <td><img src="${buildModuleUrl("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="${buildModuleUrl("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="${buildModuleUrl("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="${buildModuleUrl("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>`,a.appendChild(h),knockout.applyBindings(i,r),this._container=t,this._viewModel=i,this._wrapper=r,this._closeInstructions=function(e){r.contains(e.target)||(i.showInstructions=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}function ProjectionPickerViewModel(e){if(!defined$1(e))throw new DeveloperError$1("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof OrthographicFrustum,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,knockout.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);const t=this;knockout.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=createCommand(function(){t.sceneMode===SceneMode$2.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new EventHelper,this._eventHelper.add(e.morphComplete,function(e,i,n,r){t.sceneMode=n,t._orthographic=n===SceneMode$2.SCENE2D||t._scene.camera.frustum instanceof OrthographicFrustum}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=defined$1(e.camera._currentFlight)}),this._switchToPerspective=createCommand(function(){t.sceneMode!==SceneMode$2.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=createCommand(function(){t.sceneMode!==SceneMode$2.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=SceneMode$2}InfoBoxViewModel.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(InfoBoxViewModel.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}}),Object.defineProperties(InfoBox.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),InfoBox.prototype.isDestroyed=function(){return!1},InfoBox.prototype.destroy=function(){const e=this._container;return knockout.cleanNode(this._element),e.removeChild(this._element),defined$1(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),destroyObject$1(this)},Object.defineProperties(PerformanceWatchdogViewModel.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),PerformanceWatchdogViewModel.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),destroyObject$1(this)},Object.defineProperties(PerformanceWatchdog.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),PerformanceWatchdog.prototype.isDestroyed=function(){return!1},PerformanceWatchdog.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject$1(this)},Object.defineProperties(NavigationHelpButtonViewModel.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}}),Object.defineProperties(NavigationHelpButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),NavigationHelpButton.prototype.isDestroyed=function(){return!1},NavigationHelpButton.prototype.destroy=function(){return FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject$1(this)},Object.defineProperties(ProjectionPickerViewModel.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}}}),ProjectionPickerViewModel.prototype.isDestroyed=function(){return!1},ProjectionPickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject$1(this)};const 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",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";function ProjectionPicker(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("scene is required.");e=getElement(e);const i=new ProjectionPickerViewModel(t);i._perspectivePath=perspectivePath,i._orthographicPath=orthographicPath;const n=document.createElement("span");n.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(n);const r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.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'),r.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',n.appendChild(r);const o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",o.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 }'),n.appendChild(o);const a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",a.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 }'),n.appendChild(a),knockout.applyBindings(i,n),this._viewModel=i,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(i.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}function SceneModePickerViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("scene is required.");this._scene=e;const i=this;this._eventHelper=new EventHelper,this._eventHelper.add(e.morphStart,function(e,t,n,r){i.sceneMode=n,i.dropDownVisible=!1}),this._duration=t??2,this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",knockout.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,knockout.defineProperty(this,"selectedTooltip",function(){const e=i.sceneMode;return e===SceneMode$2.SCENE2D?i.tooltip2D:e===SceneMode$2.SCENE3D?i.tooltip3D:i.tooltipColumbusView}),this._toggleDropDown=createCommand(function(){i.dropDownVisible=!i.dropDownVisible}),this._morphTo2D=createCommand(function(){e.morphTo2D(i._duration)}),this._morphTo3D=createCommand(function(){e.morphTo3D(i._duration)}),this._morphToColumbusView=createCommand(function(){e.morphToColumbusView(i._duration)}),this._sceneMode=SceneMode$2}Object.defineProperties(ProjectionPicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),ProjectionPicker.prototype.isDestroyed=function(){return!1},ProjectionPicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject$1(this)},Object.defineProperties(SceneModePickerViewModel.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new DeveloperError$1("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}}}),SceneModePickerViewModel.prototype.isDestroyed=function(){return!1},SceneModePickerViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),destroyObject$1(this)};const 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",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",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";function SceneModePicker(e,t,i){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("scene is required.");e=getElement(e);const n=new SceneModePickerViewModel(t,i);n._globePath=globePath,n._flatMapPath=flatMapPath,n._columbusViewPath=columbusViewPath;const r=document.createElement("span");r.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(r);const o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.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'),o.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',r.appendChild(o);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.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 }'),r.appendChild(a);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.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),r.appendChild(s);const c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),r.appendChild(c),knockout.applyBindings(n,r),this._viewModel=n,this._container=e,this._wrapper=r,this._closeDropDown=function(e){r.contains(e.target)||(n.dropDownVisible=!1)},FeatureDetection.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(SceneModePicker.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SceneModePicker.prototype.isDestroyed=function(){return!1},SceneModePicker.prototype.destroy=function(){return this._viewModel.destroy(),FeatureDetection.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),knockout.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),destroyObject$1(this)};const screenSpacePos=new Cartesian2,offScreen="-1000px";function SelectionIndicatorViewModel(e,t,i){if(!defined$1(e))throw new DeveloperError$1("scene is required.");if(!defined$1(t))throw new DeveloperError$1("selectionIndicatorElement is required.");if(!defined$1(i))throw new DeveloperError$1("container is required.");this._scene=e,this._screenPositionX=offScreen,this._screenPositionY=offScreen,this._tweens=e.tweens,this._container=i??document.body,this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,knockout.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,knockout.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&defined$1(this.position)}}),knockout.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(t,i){return SceneTransforms.worldToWindowCoordinates(e,t,i)}}function SelectionIndicator(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");e=getElement(e),this._container=e;const i=document.createElement("div");i.className="cesium-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;const n="http://www.w3.org/2000/svg",r=document.createElementNS(n,"svg:svg");r.setAttribute("width",160),r.setAttribute("height",160),r.setAttribute("viewBox","0 0 160 160");const o=document.createElementNS(n,"g");o.setAttribute("transform","translate(80,80)"),r.appendChild(o);const a=document.createElementNS(n,"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"),o.appendChild(a),i.appendChild(r);const s=new SelectionIndicatorViewModel(t,this._element,this._container);this._viewModel=s,knockout.applyBindings(this._viewModel,this._element)}function TimelineHighlightRange(e,t,i){this._color=e,this._height=t,this._base=i??0}function TimelineTrack(e,t,i,n){this.interval=e,this.height=t,this.color=i||new Color(.5,.5,.5,1),this.backgroundColor=n||new Color(0,0,0,0)}SelectionIndicatorViewModel.prototype.update=function(){if(this.showSelection&&defined$1(this.position)){const e=this.computeScreenSpacePosition(this.position,screenSpacePos);if(defined$1(e)){const t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,r=this._selectionIndicatorElement.clientWidth,o=.5*r;e.x=Math.min(Math.max(e.x,-r),i+r)-o,e.y=Math.min(Math.max(e.y,-r),n+r)-o,this._screenPositionX=`${Math.floor(e.x+.25)}px`,this._screenPositionY=`${Math.floor(e.y+.25)}px`}else this._screenPositionX=offScreen,this._screenPositionY=offScreen}},SelectionIndicatorViewModel.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:EasingFunction$1.EXPONENTIAL_OUT})},SelectionIndicatorViewModel.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:EasingFunction$1.EXPONENTIAL_OUT})},Object.defineProperties(SelectionIndicatorViewModel.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}}),Object.defineProperties(SelectionIndicator.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SelectionIndicator.prototype.isDestroyed=function(){return!1},SelectionIndicator.prototype.destroy=function(){const e=this._container;return knockout.cleanNode(this._element),e.removeChild(this._element),destroyObject$1(this)},TimelineHighlightRange.prototype.getHeight=function(){return this._height},TimelineHighlightRange.prototype.getBase=function(){return this._base},TimelineHighlightRange.prototype.getStartTime=function(){return this._start},TimelineHighlightRange.prototype.getStopTime=function(){return this._stop},TimelineHighlightRange.prototype.setRange=function(e,t){this._start=e,this._stop=t},TimelineHighlightRange.prototype.render=function(e){let t="";if(this._start&&this._stop&&this._color){const i=JulianDate.secondsDifference(this._start,e.epochJulian);let n=Math.round(e.timeBarWidth*e.getAlpha(i));const r=JulianDate.secondsDifference(this._stop,e.epochJulian);let o=Math.round(e.timeBarWidth*e.getAlpha(r))-n;n<0&&(o+=n,n=0),n+o>e.timeBarWidth&&(o=e.timeBarWidth-n),o>0&&(t=`<span class="cesium-timeline-highlight" style="left: ${n.toString()}px; width: ${o.toString()}px; bottom: ${this._base.toString()}px; height: ${this._height}px; background-color: ${this._color};"></span>`)}return t},TimelineTrack.prototype.render=function(e,t){const i=this.interval.start,n=this.interval.stop,r=t.startJulian,o=JulianDate.addSeconds(t.startJulian,t.duration,new JulianDate);if(JulianDate.lessThan(i,r)&&JulianDate.greaterThan(n,o))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(JulianDate.lessThanOrEquals(i,o)&&JulianDate.greaterThanOrEquals(n,r)){let r,o,a;for(r=0;r<t.timeBarWidth;++r){const e=JulianDate.addSeconds(t.startJulian,r/t.timeBarWidth*t.duration,new JulianDate);!defined$1(o)&&JulianDate.greaterThanOrEquals(e,i)?o=r:!defined$1(a)&&JulianDate.greaterThanOrEquals(e,n)&&(a=r)}e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),defined$1(o)&&(defined$1(a)||(a=t.timeBarWidth),e.fillStyle=this.color.toCssColorString(),e.fillRect(o,t.y,Math.max(a-o,1),this.height))}};let timelineWheelDelta=1e12;const timelineMouseMode={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},timelineTouchMode={none:0,scrub:1,slideZoom:2,singleTap:3,ignore:4},timelineTicScales=[.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],timelineMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Timeline$1(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("clock is required.");const i=(e=getElement(e)).ownerDocument;this.container=e;const n=i.createElement("div");n.className="cesium-timeline-main",e.appendChild(n),this._topDiv=n,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=timelineMouseMode.none,this._touchMode=timelineTouchMode.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=createMouseDownCallback(this),this._onMouseUp=createMouseUpCallback(this),this._onMouseMove=createMouseMoveCallback(this),this._onMouseWheel=createMouseWheelCallback(this),this._onTouchStart=createTouchStartCallback(this),this._onTouchMove=createTouchMoveCallback(this),this._onTouchEnd=createTouchEndCallback(this);const r=this._timeBarEle;i.addEventListener("mouseup",this._onMouseUp,!1),i.addEventListener("mousemove",this._onMouseMove,!1),r.addEventListener("mousedown",this._onMouseDown,!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),r.addEventListener("mousewheel",this._onMouseWheel,!1),r.addEventListener("touchstart",this._onTouchStart,!1),r.addEventListener("touchmove",this._onTouchMove,!1),r.addEventListener("touchend",this._onTouchEnd,!1),r.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function twoDigits(e){return e<10?`0${e.toString()}`:e.toString()}function createMouseDownCallback(e){return function(t){e._mouseMode!==timelineMouseMode.touchOnly&&(0===t.button?(e._mouseMode=timelineMouseMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,2===t.button?e._mouseMode=timelineMouseMode.zoom:e._mouseMode=timelineMouseMode.slide)),t.preventDefault()}}function createMouseUpCallback(e){return function(t){e._mouseMode=timelineMouseMode.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function createMouseMoveCallback(e){return function(t){let i;if(e._mouseMode===timelineMouseMode.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===timelineMouseMode.slide){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){const t=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(JulianDate.addSeconds(e._startJulian,t,new JulianDate),JulianDate.addSeconds(e._endJulian,t,new JulianDate))}}else e._mouseMode===timelineMouseMode.zoom&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}function createMouseWheelCallback(e){return function(t){let i=t.wheelDeltaY||t.wheelDelta||-t.detail;timelineWheelDelta=Math.max(Math.min(Math.abs(i),timelineWheelDelta),1),i/=timelineWheelDelta,e.zoomFrom(Math.pow(1.05,-i))}}function createTouchStartCallback(e){return function(t){const i=t.touches.length;let n,r;const o=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=timelineMouseMode.touchOnly,1===i?(n=JulianDate.secondsDifference(e._scrubJulian,e._startJulian),r=Math.round(n*e._topDiv.clientWidth/e._timeBarSecondsSpan+o),Math.abs(t.touches[0].clientX-r)<50?(e._touchMode=timelineTouchMode.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===i?"-16px 0":"0 0")):(e._touchMode=timelineTouchMode.singleTap,e._touchState.centerX=t.touches[0].clientX-o)):2===i?(e._touchMode=timelineTouchMode.slideZoom,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-o,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=timelineTouchMode.ignore}}function createTouchEndCallback(e){return function(t){const i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap?(e._touchMode=timelineTouchMode.scrub,e._onTouchMove(t)):e._touchMode===timelineTouchMode.scrub&&e._onTouchMove(t),e._mouseMode=timelineMouseMode.touchOnly,1!==i?e._touchMode=i>0?timelineTouchMode.ignore:timelineTouchMode.none:e._touchMode===timelineTouchMode.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function createTouchMoveCallback(e){return function(t){let i,n,r,o,a,s,c=1;const l=e._topDiv.getBoundingClientRect().left;e._touchMode===timelineTouchMode.singleTap&&(e._touchMode=timelineTouchMode.slideZoom),e._mouseMode=timelineMouseMode.touchOnly,e._touchMode===timelineTouchMode.scrub?(t.preventDefault(),1===t.changedTouches.length&&(n=t.changedTouches[0].clientX-l,n>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===timelineTouchMode.slideZoom&&(r=t.touches.length,2===r?(o=.5*(t.touches[0].clientX+t.touches[1].clientX)-l,a=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===r&&(o=t.touches[0].clientX-l,a=0),defined$1(o)&&(a>0&&e._touchState.spanX>0?(c=e._touchState.spanX/a,s=JulianDate.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-o*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new JulianDate)):(i=e._touchState.centerX-o,s=JulianDate.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new JulianDate)),e.zoomTo(s,JulianDate.addSeconds(s,e._timeBarSecondsSpan*c,new JulianDate)),e._touchState.centerX=o,e._touchState.spanX=a))}}var media,hasRequiredMedia,src,hasRequiredSrc;function requireMedia(){return hasRequiredMedia?media:(hasRequiredMedia=1,media={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"})}function requireSrc(){if(hasRequiredSrc)return src;hasRequiredSrc=1;const{webm:e,mp4:t}=requireMedia(),i=()=>"undefined"!=typeof navigator&&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,n=()=>"wakeLock"in navigator;return src=class{constructor(){if(this.enabled=!1,n()){this._wakeLock=null;const e=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else i()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",e),this._addSourceToVideo(this.noSleepVideo,"mp4",t),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(e,t,i){var n=document.createElement("source");n.src=i,n.type=`video/${t}`,e.appendChild(n)}get isEnabled(){return this.enabled}enable(){if(n())return navigator.wakeLock.request("screen").then(e=>{this._wakeLock=e,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",()=>{console.log("Wake Lock released.")})}).catch(e=>{throw this.enabled=!1,console.error(`${e.name}, ${e.message}`),e});if(i())return 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();return this.noSleepVideo.play().then(e=>(this.enabled=!0,e)).catch(e=>{throw this.enabled=!1,e})}disable(){n()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):i()?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}},src}Timeline$1.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},Timeline$1.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},Timeline$1.prototype.isDestroyed=function(){return!1},Timeline$1.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),destroyObject$1(this)},Timeline$1.prototype.addHighlightRange=function(e,t,i){const n=new TimelineHighlightRange(e,t,i);return this._highlightRanges.push(n),this.resize(),n},Timeline$1.prototype.addTrack=function(e,t,i,n){const r=new TimelineTrack(e,t,i,n);return this._trackList.push(r),this._lastHeight=void 0,this.resize(),r},Timeline$1.prototype.zoomTo=function(e,t){if(!defined$1(e))throw new DeveloperError$1("startTime is required.");if(!defined$1(t))throw new DeveloperError$1("stopTime is required");if(JulianDate.lessThanOrEquals(t,e))throw new DeveloperError$1("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=JulianDate.secondsDifference(t,e),this._clock&&this._clock.clockRange!==ClockRange$1.UNBOUNDED){const e=this._clock.startTime,t=this._clock.stopTime,i=JulianDate.secondsDifference(t,e),n=JulianDate.secondsDifference(e,this._startJulian),r=JulianDate.secondsDifference(t,this._endJulian);this._timeBarSecondsSpan>=i?(this._timeBarSecondsSpan=i,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):n>0?(this._endJulian=JulianDate.addSeconds(this._endJulian,n,new JulianDate),this._startJulian=e,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian)):r<0&&(this._startJulian=JulianDate.addSeconds(this._startJulian,r,new JulianDate),this._endJulian=t,this._timeBarSecondsSpan=JulianDate.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();const i=document.createEvent("Event");i.initEvent("setzoom",!0,!0),i.startJulian=this._startJulian,i.endJulian=this._endJulian,i.epochJulian=this._epochJulian,i.totalSpan=this._timeBarSecondsSpan,i.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(i)},Timeline$1.prototype.zoomFrom=function(e){let t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;const i=this._timeBarSecondsSpan-t;this.zoomTo(JulianDate.addSeconds(this._startJulian,t-t*e,new JulianDate),JulianDate.addSeconds(this._endJulian,i*e-i,new JulianDate))},Timeline$1.prototype.makeLabel=function(e){const t=JulianDate.toGregorianDate(e),i=t.millisecond;let n=" UTC";if(i>0&&this._timeBarSecondsSpan<3600){for(n=Math.floor(i).toString();n.length<3;)n=`0${n}`;n=`.${n}`}return`${timelineMonthNames[t.month-1]} ${t.day} ${t.year} ${twoDigits(t.hour)}:${twoDigits(t.minute)}:${twoDigits(t.second)}${n}`},Timeline$1.prototype.smallestTicInPixels=7,Timeline$1.prototype._makeTics=function(){const e=this._timeBarEle,t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),n=i-8;let r;const o=this;this._needleEle.style.left=`${i.toString()}px`;let a="";const s=.01,c=31536e6,l=1e-10;let d=0,u=this._timeBarSecondsSpan;u<s?(u=s,this._timeBarSecondsSpan=s,this._endJulian=JulianDate.addSeconds(this._startJulian,s,new JulianDate)):u>c&&(u=c,this._timeBarSecondsSpan=c,this._endJulian=JulianDate.addSeconds(this._startJulian,c,new JulianDate));let h=this._timeBarEle.clientWidth;h<10&&(h=10);const p=this._startJulian,A=Math.min(u/h*1e-5,.4);let m;const f=JulianDate.toGregorianDate(p);m=u>31536e4?JulianDate.fromDate(new Date(Date.UTC(100*Math.floor(f.year/100),0))):u>31536e3?JulianDate.fromDate(new Date(Date.UTC(10*Math.floor(f.year/10),0))):u>86400?JulianDate.fromDate(new Date(Date.UTC(f.year,0))):JulianDate.fromDate(new Date(Date.UTC(f.year,f.month,f.day)));const g=JulianDate.secondsDifference(this._startJulian,JulianDate.addSeconds(m,A,new JulianDate));let C=g+u;function y(e){return Math.floor(g/e)*e}function _(e,t){return Math.ceil(e/t+.5)*t}function E(e){return(e-g)/u}function b(e,t){return e-t*Math.round(e/t)}this._epochJulian=m,this._rulerEle.innerHTML=this.makeLabel(JulianDate.addSeconds(this._endJulian,-.01,new JulianDate));let I=this._rulerEle.offsetWidth+20;I<30&&(I=180);const S=d;d-=l;const T={startTime:g,startJulian:p,epochJulian:m,duration:u,timeBarWidth:h,getAlpha:E};this._highlightRanges.forEach(function(e){a+=e.render(T)});let v=0,x=0,w=0,D=I/h;D>1&&(D=1),D*=this._timeBarSecondsSpan;let B=-1,P=-1;const $=timelineTicScales.length;let M;for(M=0;M<$;++M){const e=timelineTicScales[M];if(++B,v=e,e>D&&e>d)break;P<0&&h*(e/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(P=B)}if(B>0){for(;B>0;)if(--B,Math.abs(b(v,timelineTicScales[B]))<1e-5){timelineTicScales[B]>=d&&(x=timelineTicScales[B]);break}if(P>=0)for(;P<B;){if(Math.abs(b(x,timelineTicScales[P]))<1e-5&&timelineTicScales[P]>=d){w=timelineTicScales[P];break}++P}}d=S,d>l&&w<1e-5&&Math.abs(d-v)>l&&(w=d,d<=v+l&&(x=0));let R,O=-999999;if(h*(w/this._timeBarSecondsSpan)>=3)for(r=y(w);r<=C;r=_(r,w))a+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(h*E(r)).toString()}px;"></span>`;if(h*(x/this._timeBarSecondsSpan)>=3)for(r=y(x);r<=C;r=_(r,x))a+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(h*E(r)).toString()}px;"></span>`;if(h*(v/this._timeBarSecondsSpan)>=2){this._mainTicSpan=v,C+=v,r=y(v);const e=JulianDate.computeTaiMinusUtc(m);for(;r<=C;){let t=JulianDate.addSeconds(p,r-g,new JulianDate);if(v>2.1){const i=JulianDate.computeTaiMinusUtc(t);Math.abs(i-e)>.1&&(r+=i-e,t=JulianDate.addSeconds(p,r-g,new JulianDate))}const i=Math.round(h*E(r)),n=this.makeLabel(t);this._rulerEle.innerHTML=n,R=this._rulerEle.offsetWidth,R<10&&(R=I);const o=i-(R/2-1);o>O?(O=o+R+5,a+=`<span class="cesium-timeline-ticMain" style="left: ${i.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${o.toString()}px;">${n}</span>`):a+=`<span class="cesium-timeline-ticSub" style="left: ${i.toString()}px;"></span>`,r=_(r,v)}}else this._mainTicSpan=-1;a+=`<span class="cesium-timeline-icon16" style="left:${n}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=a,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),T.y=0,this._trackList.forEach(function(e){e.render(o._context,T),T.y+=e.height})},Timeline$1.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;const e=this._scrubElement;if(defined$1(this._scrubElement)){const t=JulianDate.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=`${i}px`)}defined$1(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(JulianDate.addSeconds(this._startJulian,this._timelineDrag,new JulianDate),JulianDate.addSeconds(this._endJulian,this._timelineDrag,new JulianDate)))},Timeline$1.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=JulianDate.addSeconds(this._startJulian,t,new JulianDate),this._scrubElement){const t=e-8;this._scrubElement.style.left=`${t.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}const i=document.createEvent("Event");i.initEvent("settime",!0,!0),i.clientX=e,i.timeSeconds=t,i.timeJulian=this._scrubJulian,i.clock=this._clock,this._topDiv.dispatchEvent(i)},Timeline$1.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 i=1;this._trackList.forEach(function(e){i+=e.height}),this._trackListEle.style.height=`${i.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var srcExports=requireSrc(),NoSleep=getDefaultExportFromCjs(srcExports);function lockScreen(e){let t=!1;const i=window.screen;return defined$1(i)&&(defined$1(i.lockOrientation)?t=i.lockOrientation(e):defined$1(i.mozLockOrientation)?t=i.mozLockOrientation(e):defined$1(i.msLockOrientation)?t=i.msLockOrientation(e):defined$1(i.orientation&&i.orientation.lock)&&(t=i.orientation.lock(e))),t}function unlockScreen(){const e=window.screen;defined$1(e)&&(defined$1(e.unlockOrientation)?e.unlockOrientation():defined$1(e.mozUnlockOrientation)?e.mozUnlockOrientation():defined$1(e.msUnlockOrientation)?e.msUnlockOrientation():defined$1(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function toggleVR(e,t,i,n){n()||(i()?(t.useWebVR=!1,e._locked&&(unlockScreen(),e._locked=!1),e._noSleep.disable(),Fullscreen.exitFullscreen(),i(!1)):(Fullscreen.fullscreen||Fullscreen.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=lockScreen("landscape")),t.useWebVR=!0,i(!0)))}function VRButtonViewModel(e,t){if(!defined$1(e))throw new DeveloperError$1("scene is required.");const i=this,n=knockout.observable(Fullscreen.enabled),r=knockout.observable(!1);this.isVRMode=void 0,knockout.defineProperty(this,"isVRMode",{get:function(){return r()}}),this.isVREnabled=void 0,knockout.defineProperty(this,"isVREnabled",{get:function(){return n()},set:function(e){n(e&&Fullscreen.enabled)}}),this.tooltip=void 0,knockout.defineProperty(this,"tooltip",function(){return n()?r()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});const o=knockout.observable(!1);this._isOrthographic=void 0,knockout.defineProperty(this,"_isOrthographic",{get:function(){return o()}}),this._eventHelper=new EventHelper,this._eventHelper.add(e.preRender,function(){o(e.camera.frustum instanceof OrthographicFrustum)}),this._locked=!1,this._noSleep=new NoSleep,this._command=createCommand(function(){toggleVR(i,e,r,o)},knockout.getObservable(this,"isVREnabled")),this._vrElement=getElement(t)??document.body,this._callback=function(){!Fullscreen.fullscreen&&r()&&(e.useWebVR=!1,i._locked&&(unlockScreen(),i._locked=!1),i._noSleep.disable(),r(!1))},document.addEventListener(Fullscreen.changeEventName,this._callback)}Object.defineProperties(VRButtonViewModel.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new DeveloperError$1("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),VRButtonViewModel.prototype.isDestroyed=function(){return!1},VRButtonViewModel.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Fullscreen.changeEventName,this._callback),destroyObject$1(this)};const 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",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";function VRButton(e,t,i){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(!defined$1(t))throw new DeveloperError$1("scene is required.");e=getElement(e);const n=new VRButtonViewModel(t,i);n._exitVRPath=exitVRPath,n._enterVRPath=enterVRPath;const r=document.createElement("button");r.type="button",r.className="cesium-button cesium-vrButton",r.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(r),knockout.applyBindings(n,r),this._container=e,this._viewModel=n,this._element=r}Object.defineProperties(VRButton.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),VRButton.prototype.isDestroyed=function(){return!1},VRButton.prototype.destroy=function(){return this._viewModel.destroy(),knockout.cleanNode(this._element),this._container.removeChild(this._element),destroyObject$1(this)};const boundingSphereScratch=new BoundingSphere;function onTimelineScrubfunction(e){const t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function getCesium3DTileFeatureDescription(e){const t=e.getPropertyIds();let i="";return t.forEach(function(t){const n=e.getProperty(t);defined$1(n)&&(i+=`<tr><th>${t}</th><td>${n}</td></tr>`)}),i.length>0&&(i=`<table class="cesium-infoBox-defaultTable"><tbody>${i}</tbody></table>`),i}function getCesium3DTileFeatureName(e){let t;const i=[],n=e.getPropertyIds();for(t=0;t<n.length;t++){const r=n[t];/^name$/i.test(r)?i[0]=e.getProperty(r):/name/i.test(r)?i[1]=e.getProperty(r):/^title$/i.test(r)?i[2]=e.getProperty(r):/^(id|identifier)$/i.test(r)?i[3]=e.getProperty(r):/element/i.test(r)?i[4]=e.getProperty(r):/(id|identifier)$/i.test(r)&&(i[5]=e.getProperty(r))}const r=i.length;for(t=0;t<r;t++){const e=i[t];if(defined$1(e)&&""!==e)return e}return"Unnamed Feature"}function pickEntity(e,t){const i=e.scene.pick(t.position);if(defined$1(i)){const e=i.id??i.primitive.id;if(e instanceof Entity)return e;if(i instanceof Cesium3DTileFeature)return new Entity({name:getCesium3DTileFeatureName(i),description:getCesium3DTileFeatureDescription(i),feature:i})}if(defined$1(e.scene.globe))return pickImageryLayerFeature(e,t.position)}const scratchStopTime=new JulianDate;function linkTimelineToDataSourceClock(e,t){if(defined$1(t)){const i=t.clock;if(defined$1(i)&&defined$1(e)){const t=i.startTime;let n=i.stopTime;JulianDate.equals(t,n)&&(n=JulianDate.addSeconds(t,CesiumMath.EPSILON2,scratchStopTime)),e.updateFromClock(),e.zoomTo(t,n)}}}const cartesian3Scratch=new Cartesian3$1;function pickImageryLayerFeature(e,t){const i=e.scene,n=i.camera.getPickRay(t),r=i.imageryLayers.pickImageryLayerFeatures(n,i);if(!defined$1(r))return;const o=new Entity({id:"Loading...",description:"Loading feature information..."});return r.then(function(t){if(e.selectedEntity!==o)return;if(!defined$1(t)||0===t.length)return void(e.selectedEntity=createNoFeaturesEntity());const i=t[0],n=new Entity({id:i.name,description:i.description});if(defined$1(i.position)){const t=e.scene.ellipsoid.cartographicToCartesian(i.position,cartesian3Scratch);n.position=new ConstantPositionProperty(t)}e.selectedEntity=n},function(){e.selectedEntity===o&&(e.selectedEntity=createNoFeaturesEntity())}),o}function createNoFeaturesEntity(){return new Entity({id:"None",description:"No features found."})}function enableVRUI(e,t){const i=e._geocoder,n=e._homeButton,r=e._sceneModePicker,o=e._projectionPicker,a=e._baseLayerPicker,s=e._animation,c=e._timeline,l=e._fullscreenButton,d=e._infoBox,u=e._selectionIndicator,h=t?"hidden":"visible";if(defined$1(i)&&(i.container.style.visibility=h),defined$1(n)&&(n.container.style.visibility=h),defined$1(r)&&(r.container.style.visibility=h),defined$1(o)&&(o.container.style.visibility=h),defined$1(a)&&(a.container.style.visibility=h),defined$1(s)&&(s.container.style.visibility=h),defined$1(c)&&(c.container.style.visibility=h),defined$1(l)&&l.viewModel.isFullscreenEnabled&&(l.container.style.visibility=h),defined$1(d)&&(d.container.style.visibility=h),defined$1(u)&&(u.container.style.visibility=h),e._container){const i=t||!defined$1(l)?0:l.container.clientWidth;e._vrButton.container.style.right=`${i}px`,e.forceResize()}}function Viewer(e,t){if(!defined$1(e))throw new DeveloperError$1("container is required.");if(e=getElement(e),!1===(t=t??Frozen.EMPTY_OBJECT).globe&&defined$1(t.baseLayer)&&!1!==t.baseLayer)throw new DeveloperError$1("Cannot use baseLayer when globe is disabled.");const i=!(defined$1(t.globe)&&!1===t.globe||defined$1(t.baseLayerPicker)&&!1===t.baseLayerPicker);if(!i&&defined$1(t.selectedImageryProviderViewModel))throw new DeveloperError$1("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.baseLayer instead or set options.baseLayerPicker to true.");if(!i&&defined$1(t.selectedTerrainProviderViewModel))throw new DeveloperError$1("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");const n=this,r=document.createElement("div");r.className="cesium-viewer",e.appendChild(r);const o=document.createElement("div");o.className="cesium-viewer-cesiumWidgetContainer",r.appendChild(o);const a=document.createElement("div");a.className="cesium-viewer-bottom",r.appendChild(a);const s=t.scene3DOnly??!1;let c,l,d=!1;defined$1(t.clockViewModel)?(l=t.clockViewModel,c=l.clock):(c=new Clock,l=new ClockViewModel(c),d=!0);const u=new CesiumWidget(o,{baseLayer:!(i&&defined$1(t.selectedImageryProviderViewModel)||defined$1(t.baseLayer)||defined$1(t.imageryProvider))&&void 0,clock:c,shouldAnimate:t.shouldAnimate,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,ellipsoid:t.ellipsoid,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,automaticallyTrackDataSourceClocks:t.automaticallyTrackDataSourceClocks,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:defined$1(t.creditContainer)?t.creditContainer:a,creditViewport:t.creditViewport,dataSources:t.dataSources,scene3DOnly:s,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),h=u.scene,p=new EventHelper;let A,m;if(p.add(c.onTick,Viewer.prototype._onTick,this),!defined$1(t.selectionIndicator)||!1!==t.selectionIndicator){const e=document.createElement("div");e.className="cesium-viewer-selectionIndicatorContainer",r.appendChild(e),A=new SelectionIndicator(e,h)}if(!defined$1(t.infoBox)||!1!==t.infoBox){const e=document.createElement("div");e.className="cesium-viewer-infoBoxContainer",r.appendChild(e),m=new InfoBox(e);const t=m.viewModel;p.add(t.cameraClicked,Viewer.prototype._onInfoBoxCameraClicked,this),p.add(t.closeClicked,Viewer.prototype._onInfoBoxClockClicked,this)}const f=document.createElement("div");let g,C,y,_,E,b,I,S,T,v,x,w,D,B,P;if(f.className="cesium-viewer-toolbar",r.appendChild(f),!defined$1(t.geocoder)||!1!==t.geocoder){const e=document.createElement("div");let i;e.className="cesium-viewer-geocoderContainer",f.appendChild(e),"string"==typeof t.geocoder?i=[new IonGeocoderService({scene:h,geocodeProviderType:t.geocoder})]:defined$1(t.geocoder)&&"boolean"!=typeof t.geocoder&&(i=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),g=new Geocoder({container:e,geocoderServices:i,scene:h}),p.add(g.viewModel.search.beforeExecute,Viewer.prototype._clearObjects,this)}if(defined$1(t.homeButton)&&!1===t.homeButton||(C=new HomeButton(f,h),defined$1(g)&&p.add(C.viewModel.command.afterExecute,function(){const e=g.viewModel;e.searchText="",e.isSearchInProgress&&e.search()}),p.add(C.viewModel.command.beforeExecute,Viewer.prototype._clearTrackedObject,this)),!0===t.sceneModePicker&&s)throw new DeveloperError$1("options.sceneModePicker is not available when options.scene3DOnly is set to true.");if(s||defined$1(t.sceneModePicker)&&!1===t.sceneModePicker||(y=new SceneModePicker(f,h)),t.projectionPicker&&(_=new ProjectionPicker(f,h)),i){const e=t.imageryProviderViewModels??createDefaultImageryProviderViewModels(),i=t.terrainProviderViewModels??createDefaultTerrainProviderViewModels();E=new BaseLayerPicker(f,{globe:h.globe,imageryProviderViewModels:e,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:i,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel});b=f.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}if(defined$1(t.baseLayer)&&!1!==t.baseLayer&&(i&&(E.viewModel.selectedImagery=void 0),h.imageryLayers.removeAll(),h.imageryLayers.add(t.baseLayer)),defined$1(t.terrainProvider)&&(i&&(E.viewModel.selectedTerrain=void 0),h.terrainProvider=t.terrainProvider),defined$1(t.terrain)){if(defined$1(t.terrainProvider))throw new DeveloperError$1("Specify either options.terrainProvider or options.terrain.");i&&(h.globe.depthTestAgainstTerrain=!0),h.setTerrain(t.terrain)}if(!defined$1(t.navigationHelpButton)||!1!==t.navigationHelpButton){let e=!0;try{if(defined$1(window.localStorage)){const t=window.localStorage.getItem("cesium-hasSeenNavHelp");defined$1(t)&&Boolean(t)?e=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch(e){}I=new NavigationHelpButton({container:f,instructionsInitiallyVisible:t.navigationInstructionsInitiallyVisible??e})}if(!defined$1(t.animation)||!1!==t.animation){const e=document.createElement("div");e.className="cesium-viewer-animationContainer",r.appendChild(e),S=new Animation$1(e,new AnimationViewModel(l))}if(!defined$1(t.timeline)||!1!==t.timeline){const e=document.createElement("div");e.className="cesium-viewer-timelineContainer",r.appendChild(e),T=new Timeline$1(e,c),T.addEventListener("settime",onTimelineScrubfunction,!1),T.zoomTo(c.startTime,c.stopTime)}if(defined$1(t.fullscreenButton)&&!1===t.fullscreenButton||(w=document.createElement("div"),w.className="cesium-viewer-fullscreenContainer",r.appendChild(w),v=new FullscreenButton(w,t.fullscreenElement),x=subscribeAndEvaluate(v.viewModel,"isFullscreenEnabled",function(e){w.style.display=e?"block":"none",defined$1(T)&&(T.container.style.right=`${w.clientWidth}px`,T.resize())})),t.vrButton){const e=document.createElement("div");e.className="cesium-viewer-vrContainer",r.appendChild(e),D=new VRButton(e,h,t.fullScreenElement),B=subscribeAndEvaluate(D.viewModel,"isVREnabled",function(t){e.style.display=t?"block":"none",defined$1(v)&&(e.style.right=`${w.clientWidth}px`),defined$1(T)&&(T.container.style.right=`${e.clientWidth}px`,T.resize())}),P=subscribeAndEvaluate(D.viewModel,"isVRMode",function(e){enableVRUI(n,e)})}this._baseLayerPickerDropDown=b,this._fullscreenSubscription=x,this._vrSubscription=B,this._vrModeSubscription=P,this._dataSourceChangedListeners={},this._container=e,this._bottomContainer=a,this._element=r,this._cesiumWidget=u,this._selectionIndicator=A,this._infoBox=m,this._clockViewModel=l,this._destroyClockViewModel=d,this._toolbar=f,this._homeButton=C,this._sceneModePicker=y,this._projectionPicker=_,this._baseLayerPicker=E,this._navigationHelpButton=I,this._animation=S,this._timeline=T,this._fullscreenButton=v,this._vrButton=D,this._geocoder=g,this._eventHelper=p,this._lastWidth=0,this._lastHeight=0,this._enableInfoOrSelection=defined$1(m)||defined$1(A),this._selectedEntity=void 0,this._selectedEntityChanged=new Event$1;const $=this._cesiumWidget.dataSources,M=this._cesiumWidget.dataSourceDisplay;p.add($.dataSourceAdded,Viewer.prototype._onDataSourceAdded,this),p.add($.dataSourceRemoved,Viewer.prototype._onDataSourceRemoved,this),p.add(h.postUpdate,Viewer.prototype.resize,this);const R=$.length;for(let e=0;e<R;e++)this._dataSourceAdded($,$.get(e));this._dataSourceAdded(void 0,M.defaultDataSource),p.add($.dataSourceAdded,Viewer.prototype._dataSourceAdded,this),p.add($.dataSourceRemoved,Viewer.prototype._dataSourceRemoved,this),u.screenSpaceEventHandler.setInputAction(function(e){n.selectedEntity=pickEntity(n,e)},ScreenSpaceEventType$1.LEFT_CLICK),u.screenSpaceEventHandler.setInputAction(function(e){const t=pickEntity(n,e);defined$1(t)?Property.getValueOrUndefined(t.position,n.clock.currentTime)?n.trackedEntity=t:n.zoomTo(t):defined$1(n.trackedEntity)&&(n.trackedEntity=void 0)},ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK),u._canAnimateUpdateCallback=this._updateCanAnimate(this)}function viewerCesium3DTilesInspectorMixin(e){Check.typeOf.object("viewer",e);const t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);const i=new Cesium3DTilesInspector(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return i}}})}function viewerCesiumInspectorMixin(e){if(!defined$1(e))throw new DeveloperError$1("viewer is required.");const t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);const i=new CesiumInspector(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return i}}})}function viewerDragDropMixin(e,t){if(!defined$1(e))throw new DeveloperError$1("viewer is required.");if(e.hasOwnProperty("dropTarget"))throw new DeveloperError$1("dropTarget is already defined by another mixin.");if(e.hasOwnProperty("dropEnabled"))throw new DeveloperError$1("dropEnabled is already defined by another mixin.");if(e.hasOwnProperty("dropError"))throw new DeveloperError$1("dropError is already defined by another mixin.");if(e.hasOwnProperty("clearOnDrop"))throw new DeveloperError$1("clearOnDrop is already defined by another mixin.");if(e.hasOwnProperty("flyToOnDrop"))throw new DeveloperError$1("flyToOnDrop is already defined by another mixin.");t=t??Frozen.EMPTY_OBJECT;let i=!0,n=t.flyToOnDrop??!0;const r=new Event$1;let o=t.clearOnDrop??!0,a=t.dropTarget??e.container,s=t.clampToGround??!0,c=t.proxy;function l(t){stop(t),o&&(e.entities.removeAll(),e.dataSources.removeAll());const i=t.dataTransfer.files,n=i.length;for(let t=0;t<n;t++){const n=i[t],r=new FileReader;r.onload=createOnLoadCallback(e,n,c,s),r.onerror=createDropErrorCallback(e,n),r.readAsText(n)}}a=getElement(a),Object.defineProperties(e,{dropTarget:{get:function(){return a},set:function(e){if(!defined$1(e))throw new DeveloperError$1("value is required.");unsubscribe(a,l),a=e,subscribe(a,l)}},dropEnabled:{get:function(){return i},set:function(e){e!==i&&(e?subscribe(a,l):unsubscribe(a,l),i=e)}},dropError:{get:function(){return r}},clearOnDrop:{get:function(){return o},set:function(e){o=e}},flyToOnDrop:{get:function(){return n},set:function(e){n=e}},proxy:{get:function(){return c},set:function(e){c=e}},clampToGround:{get:function(){return s},set:function(e){s=e}}}),subscribe(a,l),e.destroy=wrapFunction(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=l}function stop(e){e.stopPropagation(),e.preventDefault()}function unsubscribe(e,t){const i=e;defined$1(i)&&(i.removeEventListener("drop",t,!1),i.removeEventListener("dragenter",stop,!1),i.removeEventListener("dragover",stop,!1),i.removeEventListener("dragexit",stop,!1))}function subscribe(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",stop,!1),e.addEventListener("dragover",stop,!1),e.addEventListener("dragexit",stop,!1)}function createOnLoadCallback(e,t,i,n){const r=e.scene;return function(o){const a=t.name;try{let s;if(/\.czml$/i.test(a))s=CzmlDataSource.load(JSON.parse(o.target.result),{sourceUri:a});else if(/\.geojson$/i.test(a)||/\.json$/i.test(a)||/\.topojson$/i.test(a))s=GeoJsonDataSource.load(JSON.parse(o.target.result),{sourceUri:a,clampToGround:n});else if(/\.(kml|kmz)$/i.test(a))s=KmlDataSource.load(t,{sourceUri:a,proxy:i,camera:r.camera,canvas:r.canvas,clampToGround:n,screenOverlayContainer:e.container});else{if(!/\.gpx$/i.test(a))return void e.dropError.raiseEvent(e,a,`Unrecognized file: ${a}`);s=GpxDataSource.load(t,{sourceUri:a,proxy:i})}defined$1(s)&&e.dataSources.add(s).then(function(t){e.flyToOnDrop&&e.flyTo(t)}).catch(function(t){e.dropError.raiseEvent(e,a,t)})}catch(t){e.dropError.raiseEvent(e,a,t)}}}function createDropErrorCallback(e,t){return function(i){e.dropError.raiseEvent(e,t.name,i.target.error)}}function viewerPerformanceWatchdogMixin(e,t){if(!defined$1(e))throw new DeveloperError$1("viewer is required.");t=t??Frozen.EMPTY_OBJECT;const i=new PerformanceWatchdog({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return i}}})}function formatShaderString(e){const t=e.split("\n");let i;for(i=0;i<t.length&&!t[i].match(/\S/);i++);if(i===t.length)return"";let n="";const r=/^\s*/,o=t[i].match(r)[0].length;for(let e=i;e<t.length;e++){let i=t[e];i.match(r)[0].length>=o&&(i=i.slice(o)),n+=`${i}\n`}return n}function VoxelInspectorViewModel(e){Check.typeOf.object("scene",e),this._scene=e,this._voxelPrimitive=void 0,this._customShaderCompilationRemoveCallback=void 0,this._definedProperties=[],this._getPrimitiveFunctions=[],this._modelMatrixReady=!1;const t=this;function i(i){const{name:n,initialValue:r}=i;t._definedProperties.push(n);let o=i.setPrimitiveFunction;!0===o&&(o=function(e){t._voxelPrimitive[n]=e});let a=i.getPrimitiveFunction;!0===a&&(a=function(){t[n]=t._voxelPrimitive[n]}),defined$1(a)&&t._getPrimitiveFunctions.push(a);const s=knockout.observable();return knockout.defineProperty(t,n,{get:function(){return s()},set:function(i){"number"==typeof r&&"string"==typeof i&&(i=Number(i),isNaN(i)&&(i=r)),"boolean"==typeof r&&"number"==typeof i&&(i=1===i),s(i),defined$1(o)&&defined$1(t._voxelPrimitive)&&(o(i),e.requestRender())}}),t[n]=r,s}function n(e,i){return function(n){const r=t._voxelPrimitive[e].clone();r[i]=n,t._voxelPrimitive[e]=r}}i({name:"inspectorVisible",initialValue:!0}),i({name:"displayVisible",initialValue:!1}),i({name:"transformVisible",initialValue:!1}),i({name:"boundsVisible",initialValue:!1}),i({name:"clippingVisible",initialValue:!1}),i({name:"shaderVisible",initialValue:!1}),i({name:"shaderString",initialValue:"",getPrimitiveFunction:function(){const e=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=formatShaderString(e)}}),i({name:"shaderCompilationMessage",initialValue:""}),i({name:"shaderCompilationSuccess",initialValue:!0}),i({name:"depthTest",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"show",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"disableUpdate",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"debugDraw",initialValue:!1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"jitter",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"nearestSampling",initialValue:!0,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"screenSpaceError",initialValue:4,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"stepSize",initialValue:1,setPrimitiveFunction:!0,getPrimitiveFunction:!0}),i({name:"shapeIsBox",getPrimitiveFunction:function(){const e=t._voxelPrimitive.shape;t.shapeIsBox=e===VoxelShapeType$1.BOX}}),i({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){const e=t._voxelPrimitive.shape;t.shapeIsEllipsoid=e===VoxelShapeType$1.ELLIPSOID}}),i({name:"shapeIsCylinder",getPrimitiveFunction:function(){const e=t._voxelPrimitive.shape;t.shapeIsCylinder=e===VoxelShapeType$1.CYLINDER}}),i({name:"clippingBoxMaxXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxXMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingBoxMaxXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxXMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingBoxMaxX",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMaxX=t._voxelPrimitive.maxClippingBounds.x}}),i({name:"clippingBoxMinXMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinXMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingBoxMinXMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinXMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingBoxMinX",initialValue:0,setPrimitiveFunction:n("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingBoxMinX=t._voxelPrimitive.minClippingBounds.x}}),i({name:"clippingBoxMaxYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxYMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingBoxMaxYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxYMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingBoxMaxY",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMaxY=t._voxelPrimitive.maxClippingBounds.y}}),i({name:"clippingBoxMinYMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinYMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingBoxMinYMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinYMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingBoxMinY",initialValue:0,setPrimitiveFunction:n("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingBoxMinY=t._voxelPrimitive.minClippingBounds.y}}),i({name:"clippingBoxMaxZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMaxZMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingBoxMaxZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMaxZMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingBoxMaxZ",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMaxZ=t._voxelPrimitive.maxClippingBounds.z}}),i({name:"clippingBoxMinZMin",initialValue:0,getPrimitiveFunction:function(){t.clippingBoxMinZMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingBoxMinZMax",initialValue:1,getPrimitiveFunction:function(){t.clippingBoxMinZMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingBoxMinZ",initialValue:0,setPrimitiveFunction:n("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingBoxMinZ=t._voxelPrimitive.minClippingBounds.z}}),i({name:"clippingEllipsoidMaxLongitudeMin",initialValue:-CesiumMath.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingEllipsoidMaxLongitudeMax",initialValue:CesiumMath.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitudeMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingEllipsoidMaxLongitude",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLongitude=t._voxelPrimitive.maxClippingBounds.x}}),i({name:"clippingEllipsoidMinLongitudeMin",initialValue:-CesiumMath.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingEllipsoidMinLongitudeMax",initialValue:CesiumMath.PI,getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitudeMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingEllipsoidMinLongitude",initialValue:0,setPrimitiveFunction:n("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLongitude=t._voxelPrimitive.minClippingBounds.x}}),i({name:"clippingEllipsoidMaxLatitudeMin",initialValue:-CesiumMath.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingEllipsoidMaxLatitudeMax",initialValue:CesiumMath.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitudeMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingEllipsoidMaxLatitude",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxLatitude=t._voxelPrimitive.maxClippingBounds.y}}),i({name:"clippingEllipsoidMinLatitudeMin",initialValue:-CesiumMath.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingEllipsoidMinLatitudeMax",initialValue:CesiumMath.PI_OVER_TWO,getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitudeMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingEllipsoidMinLatitude",initialValue:0,setPrimitiveFunction:n("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingEllipsoidMinLatitude=t._voxelPrimitive.minClippingBounds.y}}),i({name:"clippingEllipsoidMaxHeightMin",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingEllipsoidMaxHeightMax",initialValue:1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingEllipsoidMaxHeight",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),i({name:"clippingEllipsoidMinHeightMin",initialValue:-1e5,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingEllipsoidMinHeightMax",initialValue:0,getPrimitiveFunction:function(){t.clippingEllipsoidMinHeightMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingEllipsoidMinHeight",initialValue:0,setPrimitiveFunction:n("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingEllipsoidMinHeight=t._voxelPrimitive.minClippingBounds.z}}),i({name:"clippingCylinderMaxRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingCylinderMaxRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxRadiusMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingCylinderMaxRadius",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMaxRadius=t._voxelPrimitive.maxClippingBounds.x}}),i({name:"clippingCylinderMinRadiusMin",initialValue:0,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMin=t._voxelPrimitive.minBounds.x}}),i({name:"clippingCylinderMinRadiusMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinRadiusMax=t._voxelPrimitive.maxBounds.x}}),i({name:"clippingCylinderMinRadius",initialValue:0,setPrimitiveFunction:n("minClippingBounds","x"),getPrimitiveFunction:function(){t.clippingCylinderMinRadius=t._voxelPrimitive.minClippingBounds.x}}),i({name:"clippingCylinderMaxAngleMin",initialValue:-CesiumMath.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMin=t._voxelPrimitive.minBounds.y}}),i({name:"clippingCylinderMaxAngleMax",initialValue:CesiumMath.PI,getPrimitiveFunction:function(){t.clippingCylinderMaxAngleMax=t._voxelPrimitive.maxBounds.y}}),i({name:"clippingCylinderMaxAngle",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMaxAngle=t._voxelPrimitive.maxClippingBounds.y}}),i({name:"clippingCylinderMinAngleMin",initialValue:-CesiumMath.PI}),i({name:"clippingCylinderMinAngleMax",initialValue:CesiumMath.PI}),i({name:"clippingCylinderMinAngle",initialValue:0,setPrimitiveFunction:n("minClippingBounds","y"),getPrimitiveFunction:function(){t.clippingCylinderMinAngle=t._voxelPrimitive.minClippingBounds.y}}),i({name:"clippingCylinderMaxHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingCylinderMaxHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMaxHeightMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingCylinderMaxHeight",initialValue:0,setPrimitiveFunction:n("maxClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMaxHeight=t._voxelPrimitive.maxClippingBounds.z}}),i({name:"clippingCylinderMinHeightMin",initialValue:-1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMin=t._voxelPrimitive.minBounds.z}}),i({name:"clippingCylinderMinHeightMax",initialValue:1,getPrimitiveFunction:function(){t.clippingCylinderMinHeightMax=t._voxelPrimitive.maxBounds.z}}),i({name:"clippingCylinderMinHeight",initialValue:0,setPrimitiveFunction:n("minClippingBounds","z"),getPrimitiveFunction:function(){t.clippingCylinderMinHeight=t._voxelPrimitive.minClippingBounds.z}}),i({name:"translationX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.translationX=Matrix4$1.getTranslation(t._voxelPrimitive.modelMatrix,new Cartesian3$1).x}}),i({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.translationY=Matrix4$1.getTranslation(t._voxelPrimitive.modelMatrix,new Cartesian3$1).y}}),i({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.translationZ=Matrix4$1.getTranslation(t._voxelPrimitive.modelMatrix,new Cartesian3$1).z}}),i({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.scaleX=Matrix4$1.getScale(t._voxelPrimitive.modelMatrix,new Cartesian3$1).x}}),i({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.scaleY=Matrix4$1.getScale(t._voxelPrimitive.modelMatrix,new Cartesian3$1).y}}),i({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)},getPrimitiveFunction:function(){t.scaleZ=Matrix4$1.getScale(t._voxelPrimitive.modelMatrix,new Cartesian3$1).z}}),i({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)}}),i({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)}}),i({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&setModelMatrix(t)}})}Object.defineProperties(Viewer.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._cesiumWidget.dataSourceDisplay}},entities:{get:function(){return this._cesiumWidget.entities}},dataSources:{get:function(){return this._cesiumWidget.dataSources}},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._cesiumWidget.allowDataSourcesToSuspendAnimation},set:function(e){this._cesiumWidget.allowDataSourcesToSuspendAnimation=e}},trackedEntity:{get:function(){return this._cesiumWidget.trackedEntity},set:function(e){this._cesiumWidget.trackedEntity=e}},selectedEntity:{get:function(){return this._selectedEntity},set:function(e){if(this._selectedEntity!==e){this._selectedEntity=e;const t=defined$1(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;defined$1(e)?defined$1(t)&&t.animateAppear():defined$1(t)&&t.animateDepart(),this._selectedEntityChanged.raiseEvent(e)}}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._cesiumWidget.trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._cesiumWidget.clockTrackedDataSource},set:function(e){this._cesiumWidget.clockTrackedDataSource!==e&&(this._cesiumWidget.clockTrackedDataSource=e,linkTimelineToDataSourceClock(this._timeline,e))}}}),Viewer.prototype.extend=function(e,t){if(!defined$1(e))throw new DeveloperError$1("mixin is required.");e(this,t)},Viewer.prototype.resize=function(){const e=this._cesiumWidget,t=this._container,i=t.clientWidth,n=t.clientHeight,r=defined$1(this._animation),o=defined$1(this._timeline);if(e.resize(),i===this._lastWidth&&n===this._lastHeight)return;const a=n-125,s=this._baseLayerPickerDropDown;if(defined$1(s)&&(s.style.maxHeight=`${a}px`),defined$1(this._geocoder)){this._geocoder.searchSuggestionsContainer.style.maxHeight=`${a}px`}defined$1(this._infoBox)&&(this._infoBox.viewModel.maxHeight=a);const c=this._timeline;let l,d=0,u=5,h=3,p=0;if(r&&"hidden"!==window.getComputedStyle(this._animation.container).visibility){const e=this._lastWidth;l=this._animation.container,i>900?(d=169,e<=900&&(l.style.width="169px",l.style.height="112px",this._animation.resize())):i>=600?(d=136,(e<600||e>900)&&(l.style.width="136px",l.style.height="90px",this._animation.resize())):(d=106,(e>600||0===e)&&(l.style.width="106px",l.style.height="70px",this._animation.resize())),u=d+5}if(o&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){const e=this._fullscreenButton,t=this._vrButton,i=c.container,n=i.style;h=i.clientHeight+3,n.left=`${d}px`;let r=0;defined$1(e)&&(r+=e.container.clientWidth),defined$1(t)&&(r+=t.container.clientWidth),n.right=`${r}px`,c.resize()}!o&&defined$1(this._fullscreenButton)&&(p=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${u}px`,this._bottomContainer.style.bottom=`${h}px`,this._bottomContainer.style.right=`${p}px`,this._lastWidth=i,this._lastHeight=n},Viewer.prototype.forceResize=function(){this._lastWidth=0,this.resize()},Viewer.prototype.render=function(){this._cesiumWidget.render()},Viewer.prototype.isDestroyed=function(){return!1},Viewer.prototype.destroy=function(){return defined$1(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK)),this._container.removeChild(this._element),this._element.removeChild(this._toolbar),this._eventHelper.removeAll(),defined$1(this._geocoder)&&(this._geocoder=this._geocoder.destroy()),defined$1(this._homeButton)&&(this._homeButton=this._homeButton.destroy()),defined$1(this._sceneModePicker)&&(this._sceneModePicker=this._sceneModePicker.destroy()),defined$1(this._projectionPicker)&&(this._projectionPicker=this._projectionPicker.destroy()),defined$1(this._baseLayerPicker)&&(this._baseLayerPicker=this._baseLayerPicker.destroy()),defined$1(this._animation)&&(this._element.removeChild(this._animation.container),this._animation=this._animation.destroy()),defined$1(this._timeline)&&(this._timeline.removeEventListener("settime",onTimelineScrubfunction,!1),this._element.removeChild(this._timeline.container),this._timeline=this._timeline.destroy()),defined$1(this._fullscreenButton)&&(this._fullscreenSubscription.dispose(),this._element.removeChild(this._fullscreenButton.container),this._fullscreenButton=this._fullscreenButton.destroy()),defined$1(this._vrButton)&&(this._vrSubscription.dispose(),this._vrModeSubscription.dispose(),this._element.removeChild(this._vrButton.container),this._vrButton=this._vrButton.destroy()),defined$1(this._infoBox)&&(this._element.removeChild(this._infoBox.container),this._infoBox=this._infoBox.destroy()),defined$1(this._selectionIndicator)&&(this._element.removeChild(this._selectionIndicator.container),this._selectionIndicator=this._selectionIndicator.destroy()),this._destroyClockViewModel&&(this._clockViewModel=this._clockViewModel.destroy()),this._cesiumWidget=this._cesiumWidget.destroy(),destroyObject$1(this)},Viewer.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Viewer.prototype._onEntityCollectionChanged,this)},Viewer.prototype._dataSourceRemoved=function(e,t){const i=t.entities;i.collectionChanged.removeEventListener(Viewer.prototype._onEntityCollectionChanged,this),defined$1(this.selectedEntity)&&i.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)},Viewer.prototype._updateCanAnimate=function(e){return function(t){e._clockViewModel.canAnimate=t}},Viewer.prototype._onTick=function(e){const t=e.currentTime;let i,n=!1;const r=this.selectedEntity,o=defined$1(r)&&this._enableInfoOrSelection;if(o&&r.isShowing&&r.isAvailable(t)){this._cesiumWidget.dataSourceDisplay.getBoundingSphere(r,!0,boundingSphereScratch)!==BoundingSphereState.FAILED?i=boundingSphereScratch.center:defined$1(r.position)&&(i=r.position.getValue(t,i)),n=defined$1(i)}const a=defined$1(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;defined$1(a)&&(a.position=Cartesian3$1.clone(i,a.position),a.showSelection=o&&n,a.update());const s=defined$1(this._infoBox)?this._infoBox.viewModel:void 0;defined$1(s)&&(s.showInfo=o,s.enableCamera=n,s.isCameraTracking=this.trackedEntity===this.selectedEntity,o?(s.titleText=r.name??r.id,s.description=Property.getValueOrDefault(r.description,t,"")):(s.titleText="",s.description=""))},Viewer.prototype._onEntityCollectionChanged=function(e,t,i){const n=i.length;for(let e=0;e<n;e++){const t=i[e];this.selectedEntity===t&&(this.selectedEntity=void 0)}},Viewer.prototype._onInfoBoxCameraClicked=function(e){if(e.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{defined$1(this.selectedEntity.position)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}},Viewer.prototype._clearTrackedObject=function(){this.trackedEntity=void 0},Viewer.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0},Viewer.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0},Viewer.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&linkTimelineToDataSourceClock(this.timeline,e)},Viewer.prototype._onDataSourceAdded=function(e,t){this._cesiumWidget._automaticallyTrackDataSourceClocks&&t===this.clockTrackedDataSource&&linkTimelineToDataSourceClock(this._timeline,t);const i=t.entities.id,n=this._eventHelper.add(t.changedEvent,Viewer.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[i]=n},Viewer.prototype._onDataSourceRemoved=function(e,t){const i=t.entities.id;this._dataSourceChangedListeners[i](),this._dataSourceChangedListeners[i]=void 0},Viewer.prototype.zoomTo=function(e,t){return this._cesiumWidget.zoomTo(e,t)},Viewer.prototype.flyTo=function(e,t){return this._cesiumWidget.flyTo(e,t)};const scratchTranslation=new Cartesian3$1,scratchScale=new Cartesian3$1,scratchHeadingPitchRoll=new HeadingPitchRoll,scratchRotation=new Matrix3$1;function setModelMatrix(e){const t=Cartesian3$1.fromElements(e.translationX,e.translationY,e.translationZ,scratchTranslation),i=Cartesian3$1.fromElements(e.scaleX,e.scaleY,e.scaleZ,scratchScale),n=scratchHeadingPitchRoll;n.heading=e.angleX,n.pitch=e.angleY,n.roll=e.angleZ;const r=Matrix3$1.fromHeadingPitchRoll(n,scratchRotation),o=Matrix3$1.multiplyByScale(r,i,r);e._voxelPrimitive.modelMatrix=Matrix4$1.fromRotationTranslation(o,t,e._voxelPrimitive.modelMatrix)}function VoxelInspector(e,t){Check.defined("container",e),Check.typeOf.object("scene",t),e=getElement(e);const i=document.createElement("div"),n=new VoxelInspectorViewModel(t);this._viewModel=n,this._container=e,this._element=i;const r=document.createElement("div");r.textContent="Voxel Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleInspector"),i.appendChild(r),i.className="cesium-cesiumInspector cesium-VoxelInspector",i.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : inspectorVisible, "cesium-cesiumInspector-hidden" : !inspectorVisible}'),e.appendChild(i);const o=document.createElement("div");o.className="cesium-cesiumInspector-dropDown",i.appendChild(o);const{createSection:a,createCheckbox:s,createRangeInput:c,createButton:l}=InspectorShared,d=a(o,"Display","displayVisible","toggleDisplay"),u=a(o,"Transform","transformVisible","toggleTransform"),h=a(o,"Clipping","clippingVisible","toggleClipping"),p=a(o,"Shader","shaderVisible","toggleShader");d.appendChild(s("Depth Test","depthTest")),d.appendChild(s("Show","show")),d.appendChild(s("Disable Update","disableUpdate")),d.appendChild(s("Debug Draw","debugDraw")),d.appendChild(s("Jitter","jitter")),d.appendChild(s("Nearest Sampling","nearestSampling")),d.appendChild(c("Screen Space Error","screenSpaceError",0,128)),d.appendChild(c("Step Size","stepSize",0,2));const A=CesiumMath.PI;u.appendChild(c("Translation X","translationX",-10,10)),u.appendChild(c("Translation Y","translationY",-10,10)),u.appendChild(c("Translation Z","translationZ",-10,10)),u.appendChild(c("Scale X","scaleX",0,10)),u.appendChild(c("Scale Y","scaleY",0,10)),u.appendChild(c("Scale Z","scaleZ",0,10)),u.appendChild(c("Heading","angleX",-A,+A)),u.appendChild(c("Pitch","angleY",-A,+A)),u.appendChild(c("Roll","angleZ",-A,+A)),makeCoordinateRangeWithDynamicMinMax("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ","shapeIsBox",h),makeCoordinateRangeWithDynamicMinMax("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight","shapeIsEllipsoid",h),makeCoordinateRangeWithDynamicMinMax("Max Radius","Min Radius","Max Angle","Min Angle","Max Height","Min Height","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxAngle","clippingCylinderMinAngle","clippingCylinderMaxHeight","clippingCylinderMinHeight","shapeIsCylinder",h);const m=document.createElement("div");p.appendChild(m);const f=document.createElement("textarea");f.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),m.className="cesium-cesiumInspector-styleEditor",m.appendChild(f);const g=l("Compile (Ctrl+Enter)","compileShader");m.appendChild(g);const C=document.createElement("label");C.style.display="block",C.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),m.appendChild(C),knockout.applyBindings(n,i)}function makeCoordinateRangeWithDynamicMinMax(e,t,i,n,r,o,a,s,c,l,d,u,h,p){const A=InspectorShared.createRangeInputWithDynamicMinMax,m=p.appendChild(document.createElement("div"));m.setAttribute("data-bind",`if: ${h}`),m.appendChild(A(e,a)),m.appendChild(A(t,s)),m.appendChild(A(i,c)),m.appendChild(A(n,l)),m.appendChild(A(r,d)),m.appendChild(A(o,u))}function viewerVoxelInspectorMixin(e){Check.typeOf.object("viewer",e);const t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);const i=new VoxelInspector(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return i}}})}Object.defineProperties(VoxelInspectorViewModel.prototype,{scene:{get:function(){return this._scene}},voxelPrimitive:{get:function(){return this._voxelPrimitive},set:function(e){if(defined$1(this._customShaderCompilationRemoveCallback)&&this._customShaderCompilationRemoveCallback(),!defined$1(e))return;this._voxelPrimitive=e;const t=this;t._customShaderCompilationRemoveCallback=t._voxelPrimitive.customShaderCompilationEvent.addEventListener(function(e){const i=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=formatShaderString(i),defined$1(e)?(t.shaderCompilationMessage=e.message,t.shaderCompilationSuccess=!1):(t.shaderCompilationMessage="Shader compiled successfully!",t.shaderCompilationSuccess=!0)}),t._modelMatrixReady=!1;for(let e=0;e<t._getPrimitiveFunctions.length;e++)t._getPrimitiveFunctions[e]();t._modelMatrixReady=!0,setModelMatrix(t)}}}),VoxelInspectorViewModel.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible},VoxelInspectorViewModel.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible},VoxelInspectorViewModel.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible},VoxelInspectorViewModel.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible},VoxelInspectorViewModel.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible},VoxelInspectorViewModel.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible},VoxelInspectorViewModel.prototype.compileShader=function(){defined$1(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new CustomShader({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))},VoxelInspectorViewModel.prototype.shaderEditorKeyPress=function(e,t){if(9===t.keyCode){t.preventDefault();const e=t.target,i=e.selectionStart,n=e.selectionEnd;let r=n;const o=e.value.slice(i,n).split("\n"),a=o.length;let s;if(t.shiftKey)for(s=0;s<a;++s)" "===o[s][0]&&(" "===o[s][1]?(o[s]=o[s].substr(2),r-=2):(o[s]=o[s].substr(1),r-=1));else for(s=0;s<a;++s)o[s]=` ${o[s]}`,r+=2;const c=o.join("\n");e.value=e.value.slice(0,i)+c+e.value.slice(n),e.selectionStart=i!==n?i:r,e.selectionEnd=r}else!t.ctrlKey||10!==t.keyCode&&13!==t.keyCode||this.compileShader();return!0},VoxelInspectorViewModel.prototype.isDestroyed=function(){return!1},VoxelInspectorViewModel.prototype.destroy=function(){const e=this;return this._definedProperties.forEach(function(t){knockout.getObservable(e,t).dispose()}),destroyObject$1(this)},Object.defineProperties(VoxelInspector.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),VoxelInspector.prototype.isDestroyed=function(){return!1},VoxelInspector.prototype.destroy=function(){return knockout.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),destroyObject$1(this)};const VERSION="1.134.0";var Cesium=Object.freeze({__proto__:null,AlphaMode:AlphaMode$1,AlphaPipelineStage:AlphaPipelineStage,AnchorPointDirect:AnchorPointDirect,AnchorPointIndirect:AnchorPointIndirect,Animation:Animation$1,AnimationViewModel:AnimationViewModel,Appearance:Appearance,ApproximateTerrainHeights:ApproximateTerrainHeights,ArcGISTiledElevationTerrainProvider:ArcGISTiledElevationTerrainProvider,ArcGisBaseMapType:ArcGisBaseMapType$1,ArcGisMapServerImageryProvider:ArcGisMapServerImageryProvider,ArcGisMapService:ArcGisMapService,ArcType:ArcType$1,ArticulationStageType:ArticulationStageType$1,AssociativeArray:AssociativeArray,Atmosphere:Atmosphere,AtmospherePipelineStage:AtmospherePipelineStage,AttributeCompression:AttributeCompression,AttributeType:AttributeType$1,AutoExposure:AutoExposure,AutomaticUniforms:AutomaticUniforms,Axis:Axis$1,AxisAlignedBoundingBox:AxisAlignedBoundingBox,Azure2DImageryProvider:Azure2DImageryProvider,B3dmLoader:B3dmLoader,B3dmParser:B3dmParser,BaseLayerPicker:BaseLayerPicker,BaseLayerPickerViewModel:BaseLayerPickerViewModel,BatchTable:BatchTable,BatchTableHierarchy:BatchTableHierarchy,BatchTexture:BatchTexture,BatchTexturePipelineStage:BatchTexturePipelineStage,Billboard:Billboard,BillboardCollection:BillboardCollection,BillboardGraphics:BillboardGraphics,BillboardLoadState:BillboardLoadState,BillboardTexture:BillboardTexture,BillboardVisualizer:BillboardVisualizer,BingMapsGeocoderService:BingMapsGeocoderService,BingMapsImageryProvider:BingMapsImageryProvider,BingMapsStyle:BingMapsStyle$1,BlendEquation:BlendEquation$1,BlendFunction:BlendFunction$1,BlendOption:BlendOption$1,BlendingState:BlendingState$2,BoundingRectangle:BoundingRectangle,BoundingSphere:BoundingSphere,BoundingSphereState:BoundingSphereState,BoundingVolumeSemantics:BoundingVolumeSemantics,BoxEmitter:BoxEmitter,BoxGeometry:BoxGeometry$1,BoxGeometryUpdater:BoxGeometryUpdater,BoxGraphics:BoxGraphics,BoxOutlineGeometry:BoxOutlineGeometry,BrdfLutGenerator:BrdfLutGenerator,Buffer:Buffer$1,BufferLoader:BufferLoader,BufferUsage:BufferUsage$2,CPUStylingPipelineStage:CPUStylingPipelineStage,CallbackPositionProperty:CallbackPositionProperty,CallbackProperty:CallbackProperty,Camera:Camera,CameraEventAggregator:CameraEventAggregator,CameraEventType:CameraEventType$1,CameraFlightPath:CameraFlightPath,Cartesian2:Cartesian2,Cartesian3:Cartesian3$1,Cartesian4:Cartesian4,CartesianRectangle:CartesianRectangle,Cartographic:Cartographic,CartographicGeocoderService:CartographicGeocoderService,CatmullRomSpline:CatmullRomSpline,Cesium3DContentGroup:Cesium3DContentGroup,Cesium3DTile:Cesium3DTile,Cesium3DTileBatchTable:Cesium3DTileBatchTable,Cesium3DTileColorBlendMode:Cesium3DTileColorBlendMode$1,Cesium3DTileContent:Cesium3DTileContent,Cesium3DTileContentFactory:Cesium3DTileContentFactory,Cesium3DTileContentState:Cesium3DTileContentState$1,Cesium3DTileContentType:Cesium3DTileContentType$1,Cesium3DTileFeature:Cesium3DTileFeature,Cesium3DTileFeatureTable:Cesium3DTileFeatureTable,Cesium3DTileOptimizationHint:Cesium3DTileOptimizationHint$1,Cesium3DTileOptimizations:Cesium3DTileOptimizations,Cesium3DTilePass:Cesium3DTilePass$1,Cesium3DTilePassState:Cesium3DTilePassState,Cesium3DTilePointFeature:Cesium3DTilePointFeature,Cesium3DTileRefine:Cesium3DTileRefine$1,Cesium3DTileStyle:Cesium3DTileStyle,Cesium3DTileStyleEngine:Cesium3DTileStyleEngine,Cesium3DTilesInspector:Cesium3DTilesInspector,Cesium3DTilesInspectorViewModel:Cesium3DTilesInspectorViewModel,Cesium3DTilesVoxelProvider:Cesium3DTilesVoxelProvider,Cesium3DTileset:Cesium3DTileset,Cesium3DTilesetBaseTraversal:Cesium3DTilesetBaseTraversal,Cesium3DTilesetCache:Cesium3DTilesetCache,Cesium3DTilesetGraphics:Cesium3DTilesetGraphics,Cesium3DTilesetHeatmap:Cesium3DTilesetHeatmap,Cesium3DTilesetMetadata:Cesium3DTilesetMetadata,Cesium3DTilesetMostDetailedTraversal:Cesium3DTilesetMostDetailedTraversal,Cesium3DTilesetSkipTraversal:Cesium3DTilesetSkipTraversal,Cesium3DTilesetStatistics:Cesium3DTilesetStatistics,Cesium3DTilesetTraversal:Cesium3DTilesetTraversal,Cesium3DTilesetVisualizer:Cesium3DTilesetVisualizer,CesiumInspector:CesiumInspector,CesiumInspectorViewModel:CesiumInspectorViewModel,CesiumTerrainProvider:CesiumTerrainProvider,CesiumWidget:CesiumWidget,Check:Check,CheckerboardMaterialProperty:CheckerboardMaterialProperty,CircleEmitter:CircleEmitter,CircleGeometry:CircleGeometry,CircleOutlineGeometry:CircleOutlineGeometry,ClassificationModelDrawCommand:ClassificationModelDrawCommand,ClassificationPipelineStage:ClassificationPipelineStage,ClassificationPrimitive:ClassificationPrimitive,ClassificationType:ClassificationType$1,ClearCommand:ClearCommand,ClippingPlane:ClippingPlane,ClippingPlaneCollection:ClippingPlaneCollection,ClippingPolygon:ClippingPolygon,ClippingPolygonCollection:ClippingPolygonCollection,Clock:Clock,ClockRange:ClockRange$1,ClockStep:ClockStep$1,ClockViewModel:ClockViewModel,CloudCollection:CloudCollection,CloudType:CloudType$1,Color:Color,ColorBlendMode:ColorBlendMode$1,ColorGeometryInstanceAttribute:ColorGeometryInstanceAttribute,ColorMaterialProperty:ColorMaterialProperty,Command:Command,ComponentDatatype:ComponentDatatype$1,Composite3DTileContent:Composite3DTileContent,CompositeEntityCollection:CompositeEntityCollection,CompositeMaterialProperty:CompositeMaterialProperty,CompositePositionProperty:CompositePositionProperty,CompositeProperty:CompositeProperty,CompressedTextureBuffer:CompressedTextureBuffer,ComputeCommand:ComputeCommand,ComputeEngine:ComputeEngine,ConditionsExpression:ConditionsExpression,ConeEmitter:ConeEmitter,ConstantPositionProperty:ConstantPositionProperty,ConstantProperty:ConstantProperty,ConstantSpline:ConstantSpline,ContentMetadata:ContentMetadata,Context:Context$1,ContextLimits:ContextLimits,CoplanarPolygonGeometry:CoplanarPolygonGeometry,CoplanarPolygonGeometryLibrary:CoplanarPolygonGeometryLibrary,CoplanarPolygonOutlineGeometry:CoplanarPolygonOutlineGeometry,CornerType:CornerType$1,CorrelationGroup:CorrelationGroup,CorridorGeometry:CorridorGeometry,CorridorGeometryLibrary:CorridorGeometryLibrary,CorridorGeometryUpdater:CorridorGeometryUpdater,CorridorGraphics:CorridorGraphics,CorridorOutlineGeometry:CorridorOutlineGeometry,Credit:Credit,CreditDisplay:CreditDisplay,CubeMap:CubeMap$1,CubeMapFace:CubeMapFace,CubicRealPolynomial:CubicRealPolynomial,CullFace:CullFace$1,CullingVolume:CullingVolume,CumulusCloud:CumulusCloud,CustomDataSource:CustomDataSource,CustomHeightmapTerrainProvider:CustomHeightmapTerrainProvider,CustomShader:CustomShader,CustomShaderMode:CustomShaderMode$1,CustomShaderPipelineStage:CustomShaderPipelineStage,CustomShaderTranslucencyMode:CustomShaderTranslucencyMode$1,CylinderGeometry:CylinderGeometry,CylinderGeometryLibrary:CylinderGeometryLibrary,CylinderGeometryUpdater:CylinderGeometryUpdater,CylinderGraphics:CylinderGraphics,CylinderOutlineGeometry:CylinderOutlineGeometry,CzmlDataSource:CzmlDataSource,DataSource:DataSource,DataSourceClock:DataSourceClock,DataSourceCollection:DataSourceCollection,DataSourceDisplay:DataSourceDisplay,DebugAppearance:DebugAppearance,DebugCameraPrimitive:DebugCameraPrimitive,DebugInspector:DebugInspector,DebugModelMatrixPrimitive:DebugModelMatrixPrimitive,DefaultProxy:DefaultProxy,DepthFunction:DepthFunction$1,DepthPlane:DepthPlane,DequantizationPipelineStage:DequantizationPipelineStage,DerivedCommand:DerivedCommand,DeveloperError:DeveloperError$1,DeviceOrientationCameraController:DeviceOrientationCameraController,DirectionalLight:DirectionalLight,DiscardEmptyTileImagePolicy:DiscardEmptyTileImagePolicy,DiscardMissingTileImagePolicy:DiscardMissingTileImagePolicy,DistanceDisplayCondition:DistanceDisplayCondition,DistanceDisplayConditionGeometryInstanceAttribute:DistanceDisplayConditionGeometryInstanceAttribute,DoubleEndedPriorityQueue:DoubleEndedPriorityQueue,DoublyLinkedList:DoublyLinkedList,DracoLoader:DracoLoader,DrawCommand:DrawCommand$1,DynamicAtmosphereLightingType:DynamicAtmosphereLightingType$1,DynamicEnvironmentMapManager:DynamicEnvironmentMapManager,DynamicGeometryBatch:DynamicGeometryBatch,DynamicGeometryUpdater:DynamicGeometryUpdater$1,EarthOrientationParameters:EarthOrientationParameters,EarthOrientationParametersSample:EarthOrientationParametersSample,EasingFunction:EasingFunction$1,EllipseGeometry:EllipseGeometry,EllipseGeometryLibrary:EllipseGeometryLibrary,EllipseGeometryUpdater:EllipseGeometryUpdater,EllipseGraphics:EllipseGraphics,EllipseOutlineGeometry:EllipseOutlineGeometry,Ellipsoid:Ellipsoid,EllipsoidGeodesic:EllipsoidGeodesic,EllipsoidGeometry:EllipsoidGeometry,EllipsoidGeometryUpdater:EllipsoidGeometryUpdater,EllipsoidGraphics:EllipsoidGraphics,EllipsoidOutlineGeometry:EllipsoidOutlineGeometry,EllipsoidPrimitive:EllipsoidPrimitive,EllipsoidRhumbLine:EllipsoidRhumbLine,EllipsoidSurfaceAppearance:EllipsoidSurfaceAppearance,EllipsoidTangentPlane:EllipsoidTangentPlane,EllipsoidTerrainProvider:EllipsoidTerrainProvider,EllipsoidalOccluder:EllipsoidalOccluder,Empty3DTileContent:Empty3DTileContent,EncodedCartesian3:EncodedCartesian3,Entity:Entity,EntityCluster:EntityCluster,EntityCollection:EntityCollection,EntityView:EntityView,Event:Event$1,EventHelper:EventHelper,Expression:Expression,ExpressionNodeType:ExpressionNodeType$1,ExtrapolationType:ExtrapolationType$1,FeatureDetection:FeatureDetection,FeatureIdPipelineStage:FeatureIdPipelineStage,Fog:Fog,ForEach:ForEach,FrameRateMonitor:FrameRateMonitor,FrameState:FrameState,Framebuffer:Framebuffer,FramebufferManager:FramebufferManager,Frozen:Frozen,FrustumCommands:FrustumCommands,FrustumGeometry:FrustumGeometry,FrustumOutlineGeometry:FrustumOutlineGeometry,Fullscreen:Fullscreen,FullscreenButton:FullscreenButton,FullscreenButtonViewModel:FullscreenButtonViewModel,GaussianSplat3DTileContent:GaussianSplat3DTileContent,GaussianSplatPrimitive:GaussianSplatPrimitive,GaussianSplatRenderResources:GaussianSplatRenderResources,GaussianSplatSorter:GaussianSplatSorter,GaussianSplatTextureGenerator:GaussianSplatTextureGenerator,GeoJsonDataSource:GeoJsonDataSource,GeoJsonLoader:GeoJsonLoader,GeocodeType:GeocodeType$1,Geocoder:Geocoder,GeocoderService:GeocoderService,GeocoderViewModel:GeocoderViewModel,GeographicProjection:GeographicProjection,GeographicTilingScheme:GeographicTilingScheme,Geometry:Geometry,Geometry3DTileContent:Geometry3DTileContent,GeometryAttribute:GeometryAttribute,GeometryAttributes:GeometryAttributes,GeometryFactory:GeometryFactory,GeometryInstance:GeometryInstance,GeometryInstanceAttribute:GeometryInstanceAttribute,GeometryOffsetAttribute:GeometryOffsetAttribute$1,GeometryPipeline:GeometryPipeline$1,GeometryPipelineStage:GeometryPipelineStage,GeometryType:GeometryType$1,GeometryUpdater:GeometryUpdater,GeometryUpdaterSet:GeometryUpdaterSet,GeometryVisualizer:GeometryVisualizer,GetFeatureInfoFormat:GetFeatureInfoFormat,Globe:Globe,GlobeDepth:GlobeDepth,GlobeSurfaceShaderSet:GlobeSurfaceShaderSet,GlobeSurfaceTile:GlobeSurfaceTile,GlobeSurfaceTileProvider:GlobeSurfaceTileProvider,GlobeTranslucency:GlobeTranslucency,GlobeTranslucencyFramebuffer:GlobeTranslucencyFramebuffer,GlobeTranslucencyState:GlobeTranslucencyState,GltfBufferViewLoader:GltfBufferViewLoader,GltfDracoLoader:GltfDracoLoader,GltfGpmLoader:GltfGpmLoader,GltfGpmLocal:GltfGpmLocal,GltfImageLoader:GltfImageLoader,GltfIndexBufferLoader:GltfIndexBufferLoader,GltfJsonLoader:GltfJsonLoader,GltfLoader:GltfLoader,GltfLoaderUtil:GltfLoaderUtil,GltfMeshPrimitiveGpmLoader:GltfMeshPrimitiveGpmLoader,GltfSpzLoader:GltfSpzLoader,GltfStructuralMetadataLoader:GltfStructuralMetadataLoader,GltfTextureLoader:GltfTextureLoader,GltfVertexBufferLoader:GltfVertexBufferLoader,Google2DImageryProvider:Google2DImageryProvider,GoogleEarthEnterpriseImageryProvider:GoogleEarthEnterpriseImageryProvider,GoogleEarthEnterpriseMapsProvider:GoogleEarthEnterpriseMapsProvider,GoogleEarthEnterpriseMetadata:GoogleEarthEnterpriseMetadata,GoogleEarthEnterpriseTerrainData:GoogleEarthEnterpriseTerrainData,GoogleEarthEnterpriseTerrainProvider:GoogleEarthEnterpriseTerrainProvider,GoogleEarthEnterpriseTileInformation:GoogleEarthEnterpriseTileInformation,GoogleGeocoderService:GoogleGeocoderService,GoogleMaps:GoogleMaps,GpxDataSource:GpxDataSource,GregorianDate:GregorianDate,GridImageryProvider:GridImageryProvider,GridMaterialProperty:GridMaterialProperty,GroundGeometryUpdater:GroundGeometryUpdater,GroundPolylineGeometry:GroundPolylineGeometry,GroundPolylinePrimitive:GroundPolylinePrimitive,GroundPrimitive:GroundPrimitive,GroupMetadata:GroupMetadata,HeadingPitchRange:HeadingPitchRange,HeadingPitchRoll:HeadingPitchRoll,Heap:Heap,HeightReference:HeightReference$1,HeightmapEncoding:HeightmapEncoding$1,HeightmapTerrainData:HeightmapTerrainData,HeightmapTessellator:HeightmapTessellator,HermitePolynomialApproximation:HermitePolynomialApproximation,HermiteSpline:HermiteSpline,HilbertOrder:HilbertOrder,HomeButton:HomeButton,HomeButtonViewModel:HomeButtonViewModel,HorizontalOrigin:HorizontalOrigin$1,I3SBuildingSceneLayerExplorer:I3SBuildingSceneLayerExplorer,I3SBuildingSceneLayerExplorerViewModel:I3SBuildingSceneLayerExplorerViewModel,I3SDataProvider:I3SDataProvider,I3SDecoder:I3SDecoder,I3SFeature:I3SFeature,I3SField:I3SField,I3SGeometry:I3SGeometry,I3SLayer:I3SLayer,I3SNode:I3SNode,I3SStatistics:I3SStatistics,I3SSublayer:I3SSublayer,I3SSymbology:I3SSymbology,I3dmLoader:I3dmLoader,I3dmParser:I3dmParser,ITwinData:ITwinData,ITwinPlatform:ITwinPlatform,Iau2000Orientation:Iau2000Orientation,Iau2006XysData:Iau2006XysData,Iau2006XysSample:Iau2006XysSample,IauOrientationAxes:IauOrientationAxes,IauOrientationParameters:IauOrientationParameters,ImageBasedLighting:ImageBasedLighting,ImageBasedLightingPipelineStage:ImageBasedLightingPipelineStage,ImageMaterialProperty:ImageMaterialProperty,Imagery:Imagery,ImageryConfiguration:ImageryConfiguration,ImageryCoverage:ImageryCoverage,ImageryFlags:ImageryFlags,ImageryInput:ImageryInput,ImageryLayer:ImageryLayer,ImageryLayerCollection:ImageryLayerCollection,ImageryLayerFeatureInfo:ImageryLayerFeatureInfo,ImageryPipelineStage:ImageryPipelineStage,ImageryProvider:ImageryProvider,ImageryState:ImageryState$1,Implicit3DTileContent:Implicit3DTileContent,ImplicitAvailabilityBitstream:ImplicitAvailabilityBitstream,ImplicitMetadataView:ImplicitMetadataView,ImplicitSubdivisionScheme:ImplicitSubdivisionScheme$1,ImplicitSubtree:ImplicitSubtree,ImplicitSubtreeCache:ImplicitSubtreeCache,ImplicitSubtreeMetadata:ImplicitSubtreeMetadata,ImplicitTileCoordinates:ImplicitTileCoordinates,ImplicitTileset:ImplicitTileset,IndexDatatype:IndexDatatype$1,InfoBox:InfoBox,InfoBoxViewModel:InfoBoxViewModel,InspectorShared:InspectorShared,InstanceAttributeSemantic:InstanceAttributeSemantic$1,InstancingPipelineStage:InstancingPipelineStage,InterpolationAlgorithm:InterpolationAlgorithm,InterpolationType:InterpolationType$1,Intersect:Intersect$1,IntersectionTests:IntersectionTests,Intersections2D:Intersections2D,Interval:Interval,InvertClassification:InvertClassification,Ion:Ion,IonGeocodeProviderType:IonGeocodeProviderType$1,IonGeocoderService:IonGeocoderService,IonImageryProvider:IonImageryProvider,IonResource:IonResource,IonWorldImageryStyle:IonWorldImageryStyle$1,Iso8601:Iso8601,JobScheduler:JobScheduler,JobType:JobType$1,JsonMetadataTable:JsonMetadataTable,JulianDate:JulianDate,KTX2Transcoder:KTX2Transcoder,KeyboardEventModifier:KeyboardEventModifier$1,KeyframeNode:KeyframeNode,KmlCamera:KmlCamera,KmlDataSource:KmlDataSource,KmlLookAt:KmlLookAt,KmlTour:KmlTour,KmlTourFlyTo:KmlTourFlyTo,KmlTourWait:KmlTourWait,Label:Label,LabelCollection:LabelCollection,LabelGraphics:LabelGraphics,LabelStyle:LabelStyle$1,LabelVisualizer:LabelVisualizer,LagrangePolynomialApproximation:LagrangePolynomialApproximation,LeapSecond:LeapSecond,Light:Light,LightingModel:LightingModel$1,LightingPipelineStage:LightingPipelineStage,LinearApproximation:LinearApproximation,LinearSpline:LinearSpline,ManagedArray:ManagedArray,MapMode2D:MapMode2D$1,MapProjection:MapProjection,MapboxImageryProvider:MapboxImageryProvider,MapboxStyleImageryProvider:MapboxStyleImageryProvider,MappedPositions:MappedPositions,Material:Material$4,MaterialAppearance:MaterialAppearance,MaterialPipelineStage:MaterialPipelineStage,MaterialProperty:MaterialProperty,Math:CesiumMath,Matrix2:Matrix2,Matrix3:Matrix3$1,Matrix4:Matrix4$1,Megatexture:Megatexture,MeshPrimitiveGpmLocal:MeshPrimitiveGpmLocal,MetadataClass:MetadataClass,MetadataClassProperty:MetadataClassProperty,MetadataComponentType:MetadataComponentType$1,MetadataEntity:MetadataEntity,MetadataEnum:MetadataEnum,MetadataEnumValue:MetadataEnumValue,MetadataPicking:MetadataPicking$1,MetadataPickingPipelineStage:MetadataPickingPipelineStage,MetadataPipelineStage:MetadataPipelineStage,MetadataSchema:MetadataSchema,MetadataSchemaLoader:MetadataSchemaLoader,MetadataSemantic:MetadataSemantic$1,MetadataTable:MetadataTable,MetadataTableProperty:MetadataTableProperty,MetadataType:MetadataType$1,MipmapHint:MipmapHint$1,Model:Model,Model3DTileContent:Model3DTileContent,ModelAlphaOptions:ModelAlphaOptions,ModelAnimation:ModelAnimation,ModelAnimationChannel:ModelAnimationChannel,ModelAnimationCollection:ModelAnimationCollection,ModelAnimationLoop:ModelAnimationLoop$1,ModelAnimationState:ModelAnimationState$1,ModelArticulation:ModelArticulation,ModelArticulationStage:ModelArticulationStage,ModelClippingPlanesPipelineStage:ModelClippingPlanesPipelineStage,ModelClippingPolygonsPipelineStage:ModelClippingPolygonsPipelineStage,ModelColorPipelineStage:ModelColorPipelineStage,ModelComponents:ModelComponents,ModelDrawCommand:ModelDrawCommand,ModelDrawCommands:ModelDrawCommands,ModelFeature:ModelFeature,ModelFeatureTable:ModelFeatureTable,ModelGraphics:ModelGraphics,ModelImagery:ModelImagery,ModelImageryMapping:ModelImageryMapping,ModelLightingOptions:ModelLightingOptions,ModelMatrixUpdateStage:ModelMatrixUpdateStage,ModelNode:ModelNode,ModelPrimitiveImagery:ModelPrimitiveImagery,ModelReader:ModelReader,ModelRenderResources:ModelRenderResources,ModelRuntimeNode:ModelRuntimeNode,ModelRuntimePrimitive:ModelRuntimePrimitive,ModelSceneGraph:ModelSceneGraph,ModelSilhouettePipelineStage:ModelSilhouettePipelineStage,ModelSkin:ModelSkin,ModelSplitterPipelineStage:ModelSplitterPipelineStage,ModelStatistics:ModelStatistics,ModelType:ModelType$1,ModelUtility:ModelUtility,ModelVisualizer:ModelVisualizer,Moon:Moon,MorphTargetsPipelineStage:MorphTargetsPipelineStage,MorphWeightSpline:MorphWeightSpline,MortonOrder:MortonOrder,Multiple3DTileContent:Multiple3DTileContent,MultisampleFramebuffer:MultisampleFramebuffer,NavigationHelpButton:NavigationHelpButton,NavigationHelpButtonViewModel:NavigationHelpButtonViewModel,NearFarScalar:NearFarScalar,NeverTileDiscardPolicy:NeverTileDiscardPolicy,NodeRenderResources:NodeRenderResources,NodeStatisticsPipelineStage:NodeStatisticsPipelineStage,NodeTransformationProperty:NodeTransformationProperty,OIT:OIT,Occluder:Occluder,OffsetGeometryInstanceAttribute:OffsetGeometryInstanceAttribute,OpenCageGeocoderService:OpenCageGeocoderService,OpenStreetMapImageryProvider:OpenStreetMapImageryProvider,OrderedGroundPrimitiveCollection:OrderedGroundPrimitiveCollection,OrientedBoundingBox:OrientedBoundingBox,OrthographicFrustum:OrthographicFrustum,OrthographicOffCenterFrustum:OrthographicOffCenterFrustum,Packable:Packable,PackableForInterpolation:PackableForInterpolation,Particle:Particle,ParticleBurst:ParticleBurst,ParticleEmitter:ParticleEmitter,ParticleSystem:ParticleSystem,Pass:Pass$1,PassState:PassState,PathGraphics:PathGraphics,PathVisualizer:PathVisualizer,PeliasGeocoderService:PeliasGeocoderService,PerInstanceColorAppearance:PerInstanceColorAppearance,PerformanceDisplay:PerformanceDisplay,PerformanceWatchdog:PerformanceWatchdog,PerformanceWatchdogViewModel:PerformanceWatchdogViewModel,PerspectiveFrustum:PerspectiveFrustum,PerspectiveOffCenterFrustum:PerspectiveOffCenterFrustum,PickDepth:PickDepth,PickDepthFramebuffer:PickDepthFramebuffer,PickFramebuffer:PickFramebuffer,PickedMetadataInfo:PickedMetadataInfo,Picking:Picking,PickingPipelineStage:PickingPipelineStage,PinBuilder:PinBuilder,PixelDatatype:PixelDatatype$1,PixelFormat:PixelFormat$1,Plane:Plane,PlaneGeometry:PlaneGeometry,PlaneGeometryUpdater:PlaneGeometryUpdater,PlaneGraphics:PlaneGraphics,PlaneOutlineGeometry:PlaneOutlineGeometry,PntsLoader:PntsLoader,PntsParser:PntsParser,PointCloud:PointCloud,PointCloudEyeDomeLighting:PointCloudEyeDomeLighting,PointCloudShading:PointCloudShading,PointCloudStylingPipelineStage:PointCloudStylingPipelineStage,PointGraphics:PointGraphics,PointPrimitive:PointPrimitive,PointPrimitiveCollection:PointPrimitiveCollection,PointVisualizer:PointVisualizer,PolygonGeometry:PolygonGeometry,PolygonGeometryLibrary:PolygonGeometryLibrary,PolygonGeometryUpdater:PolygonGeometryUpdater,PolygonGraphics:PolygonGraphics,PolygonHierarchy:PolygonHierarchy,PolygonOutlineGeometry:PolygonOutlineGeometry,PolygonPipeline:PolygonPipeline,Polyline:Polyline,PolylineArrowMaterialProperty:PolylineArrowMaterialProperty,PolylineCollection:PolylineCollection,PolylineColorAppearance:PolylineColorAppearance,PolylineDashMaterialProperty:PolylineDashMaterialProperty,PolylineGeometry:PolylineGeometry,PolylineGeometryUpdater:PolylineGeometryUpdater,PolylineGlowMaterialProperty:PolylineGlowMaterialProperty,PolylineGraphics:PolylineGraphics,PolylineMaterialAppearance:PolylineMaterialAppearance,PolylineOutlineMaterialProperty:PolylineOutlineMaterialProperty,PolylinePipeline:PolylinePipeline,PolylineVisualizer:PolylineVisualizer,PolylineVolumeGeometry:PolylineVolumeGeometry,PolylineVolumeGeometryLibrary:PolylineVolumeGeometryLibrary,PolylineVolumeGeometryUpdater:PolylineVolumeGeometryUpdater,PolylineVolumeGraphics:PolylineVolumeGraphics,PolylineVolumeOutlineGeometry:PolylineVolumeOutlineGeometry,PositionProperty:PositionProperty,PositionPropertyArray:PositionPropertyArray,PostProcessStage:PostProcessStage,PostProcessStageCollection:PostProcessStageCollection,PostProcessStageComposite:PostProcessStageComposite,PostProcessStageLibrary:PostProcessStageLibrary,PostProcessStageSampleMode:PostProcessStageSampleMode,PostProcessStageTextureCache:PostProcessStageTextureCache,PpeMetadata:PpeMetadata,PpeSource:PpeSource$1,PpeTexture:PpeTexture,Primitive:Primitive$3,PrimitiveCollection:PrimitiveCollection,PrimitiveLoadPlan:PrimitiveLoadPlan,PrimitiveOutlineGenerator:PrimitiveOutlineGenerator,PrimitiveOutlinePipelineStage:PrimitiveOutlinePipelineStage,PrimitivePipeline:PrimitivePipeline,PrimitiveRenderResources:PrimitiveRenderResources,PrimitiveState:PrimitiveState$1,PrimitiveStatisticsPipelineStage:PrimitiveStatisticsPipelineStage,PrimitiveType:PrimitiveType$1,ProjectionPicker:ProjectionPicker,ProjectionPickerViewModel:ProjectionPickerViewModel,Property:Property,PropertyArray:PropertyArray,PropertyAttribute:PropertyAttribute,PropertyAttributeProperty:PropertyAttributeProperty,PropertyBag:PropertyBag,PropertyTable:PropertyTable,PropertyTexture:PropertyTexture,PropertyTextureProperty:PropertyTextureProperty,ProviderViewModel:ProviderViewModel,Proxy:Proxy$1,QuadraticRealPolynomial:QuadraticRealPolynomial,QuadtreeOccluders:QuadtreeOccluders,QuadtreePrimitive:QuadtreePrimitive,QuadtreeTile:QuadtreeTile,QuadtreeTileLoadState:QuadtreeTileLoadState$1,QuadtreeTileProvider:QuadtreeTileProvider,QuantizedMeshTerrainData:QuantizedMeshTerrainData,QuarticRealPolynomial:QuarticRealPolynomial,Quaternion:Quaternion,QuaternionSpline:QuaternionSpline,Queue:Queue,Ray:Ray,Rectangle:Rectangle,RectangleCollisionChecker:RectangleCollisionChecker,RectangleGeometry:RectangleGeometry,RectangleGeometryLibrary:RectangleGeometryLibrary,RectangleGeometryUpdater:RectangleGeometryUpdater,RectangleGraphics:RectangleGraphics,RectangleOutlineGeometry:RectangleOutlineGeometry,ReferenceFrame:ReferenceFrame$1,ReferenceProperty:ReferenceProperty,RenderState:RenderState$1,Renderbuffer:Renderbuffer,RenderbufferFormat:RenderbufferFormat$1,Request:Request,RequestErrorEvent:RequestErrorEvent,RequestScheduler:RequestScheduler,RequestState:RequestState$1,RequestType:RequestType$1,Resource:Resource,ResourceCache:ResourceCache,ResourceCacheKey:ResourceCacheKey,ResourceCacheStatistics:ResourceCacheStatistics,ResourceLoader:ResourceLoader,ResourceLoaderState:ResourceLoaderState$1,Rotation:Rotation,RuntimeError:RuntimeError,S2Cell:S2Cell,SDFSettings:SDFSettings$1,SampledPositionProperty:SampledPositionProperty,SampledProperty:SampledProperty,Sampler:Sampler,ScaledPositionProperty:ScaledPositionProperty,Scene:Scene,SceneFramebuffer:SceneFramebuffer,SceneMode:SceneMode$2,SceneMode2DPipelineStage:SceneMode2DPipelineStage,SceneModePicker:SceneModePicker,SceneModePickerViewModel:SceneModePickerViewModel,SceneTransforms:SceneTransforms,SceneTransitioner:SceneTransitioner,ScreenSpaceCameraController:ScreenSpaceCameraController,ScreenSpaceEventHandler:ScreenSpaceEventHandler,ScreenSpaceEventType:ScreenSpaceEventType$1,SelectedFeatureIdPipelineStage:SelectedFeatureIdPipelineStage,SelectionIndicator:SelectionIndicator,SelectionIndicatorViewModel:SelectionIndicatorViewModel,SensorVolumePortionToDisplay:SensorVolumePortionToDisplay,ShaderBuilder:ShaderBuilder,ShaderCache:ShaderCache,ShaderDestination:ShaderDestination$1,ShaderFunction:ShaderFunction,ShaderProgram:ShaderProgram$1,ShaderSource:ShaderSource$1,ShaderStruct:ShaderStruct,ShadowMap:ShadowMap,ShadowMapShader:ShadowMapShader,ShadowMode:ShadowMode$1,ShadowVolumeAppearance:ShadowVolumeAppearance,SharedContext:SharedContext,ShowGeometryInstanceAttribute:ShowGeometryInstanceAttribute,Simon1994PlanetaryPositions:Simon1994PlanetaryPositions,SimplePolylineGeometry:SimplePolylineGeometry,SingleTileImageryProvider:SingleTileImageryProvider,SkinningPipelineStage:SkinningPipelineStage,SkyAtmosphere:SkyAtmosphere,SkyBox:SkyBox,SpatialNode:SpatialNode,Spdcf:Spdcf,SpecularEnvironmentCubeMap:SpecularEnvironmentCubeMap,SphereEmitter:SphereEmitter,SphereGeometry:SphereGeometry,SphereOutlineGeometry:SphereOutlineGeometry,Spherical:Spherical,Spline:Spline,SplitDirection:SplitDirection$1,Splitter:Splitter,StaticGeometryColorBatch:StaticGeometryColorBatch,StaticGeometryPerMaterialBatch:StaticGeometryPerMaterialBatch,StaticGroundGeometryColorBatch:StaticGroundGeometryColorBatch,StaticGroundGeometryPerMaterialBatch:StaticGroundGeometryPerMaterialBatch,StaticGroundPolylinePerMaterialBatch:StaticGroundPolylinePerMaterialBatch,StaticOutlineGeometryBatch:StaticOutlineGeometryBatch,StencilConstants:StencilConstants$1,StencilFunction:StencilFunction$1,StencilOperation:StencilOperation$1,SteppedSpline:SteppedSpline,Stereographic:Stereographic,StorageType:StorageType$1,StripeMaterialProperty:StripeMaterialProperty,StripeOrientation:StripeOrientation$1,StructuralMetadata:StructuralMetadata,StyleCommandsNeeded:StyleCommandsNeeded$1,StyleExpression:StyleExpression,Sun:Sun,SunLight:SunLight,SunPostProcess:SunPostProcess,SupportedImageFormats:SupportedImageFormats,SvgPathBindingHandler:SvgPathBindingHandler,TaskProcessor:TaskProcessor,Terrain:Terrain,TerrainData:TerrainData,TerrainEncoding:TerrainEncoding,TerrainFillMesh:TerrainFillMesh,TerrainMesh:TerrainMesh,TerrainOffsetProperty:TerrainOffsetProperty,TerrainProvider:TerrainProvider,TerrainQuantization:TerrainQuantization$1,TerrainState:TerrainState$1,Texture:Texture,Texture3D:Texture3D,TextureAtlas:TextureAtlas,TextureCache:TextureCache,TextureMagnificationFilter:TextureMagnificationFilter$1,TextureManager:TextureManager,TextureMinificationFilter:TextureMinificationFilter$1,TexturePacker:TexturePacker,TextureUniform:TextureUniform,TextureWrap:TextureWrap$1,TileAvailability:TileAvailability,TileBoundingRegion:TileBoundingRegion,TileBoundingS2Cell:TileBoundingS2Cell,TileBoundingSphere:TileBoundingSphere,TileBoundingVolume:TileBoundingVolume,TileCoordinatesImageryProvider:TileCoordinatesImageryProvider,TileDiscardPolicy:TileDiscardPolicy,TileEdge:TileEdge,TileImagery:TileImagery,TileMapServiceImageryProvider:TileMapServiceImageryProvider,TileMetadata:TileMetadata,TileOrientedBoundingBox:TileOrientedBoundingBox,TileProviderError:TileProviderError,TileReplacementQueue:TileReplacementQueue,TileSelectionResult:TileSelectionResult,TileState:TileState$1,Tileset3DTileContent:Tileset3DTileContent,TilesetMetadata:TilesetMetadata,TilesetPipelineStage:TilesetPipelineStage,TilingScheme:TilingScheme,TimeConstants:TimeConstants$1,TimeDynamicImagery:TimeDynamicImagery,TimeDynamicPointCloud:TimeDynamicPointCloud,TimeInterval:TimeInterval,TimeIntervalCollection:TimeIntervalCollection,TimeIntervalCollectionPositionProperty:TimeIntervalCollectionPositionProperty,TimeIntervalCollectionProperty:TimeIntervalCollectionProperty,TimeStandard:TimeStandard$1,Timeline:Timeline$1,TimelineHighlightRange:TimelineHighlightRange,TimelineTrack:TimelineTrack,Tipsify:Tipsify,ToggleButtonViewModel:ToggleButtonViewModel,Tonemapper:Tonemapper$1,TrackingReferenceFrame:TrackingReferenceFrame$1,Transforms:Transforms$2,TranslationRotationScale:TranslationRotationScale,TranslucentTileClassification:TranslucentTileClassification,TridiagonalSystemSolver:TridiagonalSystemSolver,TrustedServers:TrustedServers,TweenCollection:TweenCollection,UniformState:UniformState,UniformType:UniformType$1,UrlTemplateImageryProvider:UrlTemplateImageryProvider,VERSION:VERSION,VRButton:VRButton,VRButtonViewModel:VRButtonViewModel,VRTheWorldTerrainProvider:VRTheWorldTerrainProvider,VaryingType:VaryingType$1,Vector3DTileBatch:Vector3DTileBatch,Vector3DTileClampedPolylines:Vector3DTileClampedPolylines,Vector3DTileContent:Vector3DTileContent,Vector3DTileGeometry:Vector3DTileGeometry,Vector3DTilePoints:Vector3DTilePoints,Vector3DTilePolygons:Vector3DTilePolygons,Vector3DTilePolylines:Vector3DTilePolylines,Vector3DTilePrimitive:Vector3DTilePrimitive,VelocityOrientationProperty:VelocityOrientationProperty,VelocityVectorProperty:VelocityVectorProperty,VertexArray:VertexArray$1,VertexArrayFacade:VertexArrayFacade,VertexAttributeSemantic:VertexAttributeSemantic$1,VertexFormat:VertexFormat$1,VerticalExaggeration:VerticalExaggeration,VerticalExaggerationPipelineStage:VerticalExaggerationPipelineStage,VerticalOrigin:VerticalOrigin$1,VideoSynchronizer:VideoSynchronizer,View:View,Viewer:Viewer,ViewportQuad:ViewportQuad,Visibility:Visibility$1,Visualizer:Visualizer,VoxelBoundsCollection:VoxelBoundsCollection,VoxelBoxShape:VoxelBoxShape,VoxelCell:VoxelCell,VoxelContent:VoxelContent,VoxelCylinderShape:VoxelCylinderShape,VoxelEllipsoidShape:VoxelEllipsoidShape,VoxelInspector:VoxelInspector,VoxelInspectorViewModel:VoxelInspectorViewModel,VoxelMetadataOrder:VoxelMetadataOrder$1,VoxelPrimitive:VoxelPrimitive,VoxelProvider:VoxelProvider,VoxelRenderResources:VoxelRenderResources,VoxelShape:VoxelShape,VoxelShapeType:VoxelShapeType$1,VoxelTraversal:VoxelTraversal,VulkanConstants:VulkanConstants$1,WallGeometry:WallGeometry,WallGeometryLibrary:WallGeometryLibrary,WallGeometryUpdater:WallGeometryUpdater,WallGraphics:WallGraphics,WallOutlineGeometry:WallOutlineGeometry,WebGLConstants:WebGLConstants$1,WebMapServiceImageryProvider:WebMapServiceImageryProvider,WebMapTileServiceImageryProvider:WebMapTileServiceImageryProvider,WebMercatorProjection:WebMercatorProjection,WebMercatorTilingScheme:WebMercatorTilingScheme,WindingOrder:WindingOrder$1,WireframeIndexGenerator:WireframeIndexGenerator,WireframePipelineStage:WireframePipelineStage,_shadersAcesTonemappingStage:AcesTonemapping,_shadersAdditiveBlend:AdditiveBlend,_shadersAdjustTranslucentFS:AdjustTranslucentFS,_shadersAllMaterialAppearanceFS:AllMaterialAppearanceFS,_shadersAllMaterialAppearanceVS:AllMaterialAppearanceVS,_shadersAmbientOcclusionGenerate:AmbientOcclusionGenerate,_shadersAmbientOcclusionModulate:AmbientOcclusionModulate,_shadersAspectRampMaterial:AspectRampMaterial,_shadersAtmosphereCommon:AtmosphereCommon,_shadersAtmosphereStageFS:AtmosphereStageFS,_shadersAtmosphereStageVS:AtmosphereStageVS,_shadersBasicMaterialAppearanceFS:BasicMaterialAppearanceFS,_shadersBasicMaterialAppearanceVS:BasicMaterialAppearanceVS,_shadersBillboardCollectionFS:BillboardCollectionFS,_shadersBillboardCollectionVS:BillboardCollectionVS,_shadersBlackAndWhite:BlackAndWhite,_shadersBloomComposite:BloomComposite,_shadersBrdfLutGeneratorFS:BrdfLutGeneratorFS,_shadersBrightPass:BrightPass,_shadersBrightness:Brightness,_shadersBumpMapMaterial:BumpMapMaterial,_shadersCPUStylingStageFS:CPUStylingStageFS,_shadersCPUStylingStageVS:CPUStylingStageVS,_shadersCheckerboardMaterial:CheckerboardMaterial,_shadersCloudCollectionFS:CloudCollectionFS,_shadersCloudCollectionVS:CloudCollectionVS,_shadersCloudNoiseFS:CloudNoiseFS,_shadersCloudNoiseVS:CloudNoiseVS,_shadersCompareAndPackTranslucentDepth:CompareAndPackTranslucentDepth,_shadersCompositeOITFS:CompositeOITFS,_shadersCompositeTranslucentClassification:CompositeTranslucentClassification,_shadersComputeIrradianceFS:ComputeIrradianceFS,_shadersComputeRadianceMapFS:ComputeRadianceMapFS,_shadersContrastBias:ContrastBias,_shadersConvolveSpecularMapFS:ConvolveSpecularMapFS,_shadersConvolveSpecularMapVS:ConvolveSpecularMapVS,_shadersCustomShaderStageFS:CustomShaderStageFS,_shadersCustomShaderStageVS:CustomShaderStageVS,_shadersCzmBuiltins:CzmBuiltins,_shadersDepthOfField:DepthOfField,_shadersDepthPlaneFS:DepthPlaneFS,_shadersDepthPlaneVS:DepthPlaneVS,_shadersDepthView:DepthView,_shadersDepthViewPacked:DepthViewPacked,_shadersDotMaterial:DotMaterial,_shadersEdgeDetection:EdgeDetection,_shadersElevationBandMaterial:ElevationBandMaterial,_shadersElevationContourMaterial:ElevationContourMaterial,_shadersElevationRampMaterial:ElevationRampMaterial,_shadersEllipsoidFS:EllipsoidFS,_shadersEllipsoidSurfaceAppearanceFS:EllipsoidSurfaceAppearanceFS,_shadersEllipsoidSurfaceAppearanceVS:EllipsoidSurfaceAppearanceVS,_shadersEllipsoidVS:EllipsoidVS,_shadersFXAA:FXAA,_shadersFXAA3_11:FXAA3_11,_shadersFadeMaterial:FadeMaterial,_shadersFeatureIdStageFS:FeatureIdStageFS,_shadersFeatureIdStageVS:FeatureIdStageVS,_shadersFilmicTonemapping:FilmicTonemapping,_shadersGaussianBlur1D:GaussianBlur1D,_shadersGeometryStageFS:GeometryStageFS,_shadersGeometryStageVS:GeometryStageVS,_shadersGlobeFS:GlobeFS,_shadersGlobeVS:GlobeVS,_shadersGridMaterial:GridMaterial,_shadersGroundAtmosphere:GroundAtmosphere,_shadersHSBToRGB:czm_HSBToRGB,_shadersHSLToRGB:czm_HSLToRGB,_shadersImageBasedLightingStageFS:ImageBasedLightingStageFS,_shadersInstancingStageCommon:InstancingStageCommon,_shadersInstancingStageVS:InstancingStageVS,_shadersIntersectBox:IntersectBox,_shadersIntersectCylinder:IntersectCylinder,_shadersIntersectDepth:IntersectDepth,_shadersIntersectEllipsoid:IntersectEllipsoid,_shadersIntersectLongitude:IntersectLongitude,_shadersIntersectPlane:IntersectPlane,_shadersIntersection:Intersection,_shadersIntersectionUtils:IntersectionUtils,_shadersLegacyInstancingStageVS:LegacyInstancingStageVS,_shadersLensFlare:LensFlare,_shadersLightingStageFS:LightingStageFS,_shadersMaterialStageFS:MaterialStageFS,_shadersMegatexture:Megatexture$1,_shadersMetadataStageFS:MetadataStageFS,_shadersMetadataStageVS:MetadataStageVS,_shadersModelClippingPlanesStageFS:ModelClippingPlanesStageFS,_shadersModelClippingPolygonsStageFS:ModelClippingPolygonsStageFS,_shadersModelClippingPolygonsStageVS:ModelClippingPolygonsStageVS,_shadersModelColorStageFS:ModelColorStageFS,_shadersModelFS:ModelFS,_shadersModelSilhouetteStageFS:ModelSilhouetteStageFS,_shadersModelSilhouetteStageVS:ModelSilhouetteStageVS,_shadersModelSplitterStageFS:ModelSplitterStageFS,_shadersModelVS:ModelVS,_shadersModifiedReinhardTonemapping:ModifiedReinhardTonemapping,_shadersMorphTargetsStageVS:MorphTargetsStageVS,_shadersNightVision:NightVision,_shadersNormalMapMaterial:NormalMapMaterial,_shadersOctree:Octree,_shadersPassThrough:PassThrough,_shadersPassThroughDepth:PassThroughDepth,_shadersPbrNeutralTonemapping:PbrNeutralTonemapping,_shadersPerInstanceColorAppearanceFS:PerInstanceColorAppearanceFS,_shadersPerInstanceColorAppearanceVS:PerInstanceColorAppearanceVS,_shadersPerInstanceFlatColorAppearanceFS:PerInstanceFlatColorAppearanceFS,_shadersPerInstanceFlatColorAppearanceVS:PerInstanceFlatColorAppearanceVS,_shadersPointCloudEyeDomeLighting:PointCloudEyeDomeLightingShader,_shadersPointCloudStylingStageVS:PointCloudStylingStageVS,_shadersPointPrimitiveCollectionFS:PointPrimitiveCollectionFS,_shadersPointPrimitiveCollectionVS:PointPrimitiveCollectionVS,_shadersPolygonSignedDistanceFS:PolygonSignedDistanceFS,_shadersPolylineArrowMaterial:PolylineArrowMaterial,_shadersPolylineColorAppearanceVS:PolylineColorAppearanceVS,_shadersPolylineCommon:PolylineCommon,_shadersPolylineDashMaterial:PolylineDashMaterial,_shadersPolylineFS:PolylineFS$1,_shadersPolylineGlowMaterial:PolylineGlowMaterial,_shadersPolylineMaterialAppearanceVS:PolylineMaterialAppearanceVS,_shadersPolylineOutlineMaterial:PolylineOutlineMaterial,_shadersPolylineShadowVolumeFS:PolylineShadowVolumeFS,_shadersPolylineShadowVolumeMorphFS:PolylineShadowVolumeMorphFS,_shadersPolylineShadowVolumeMorphVS:PolylineShadowVolumeMorphVS,_shadersPolylineShadowVolumeVS:PolylineShadowVolumeVS,_shadersPolylineVS:PolylineVS,_shadersPrimitiveGaussianSplatFS:GaussianSplatFS,_shadersPrimitiveGaussianSplatVS:GaussianSplatVS,_shadersPrimitiveOutlineStageFS:PrimitiveOutlineStageFS,_shadersPrimitiveOutlineStageVS:PrimitiveOutlineStageVS,_shadersRGBToHSB:czm_RGBToHSB,_shadersRGBToHSL:czm_RGBToHSL,_shadersRGBToXYZ:czm_RGBToXYZ,_shadersReinhardTonemapping:ReinhardTonemapping,_shadersReprojectWebMercatorFS:ReprojectWebMercatorFS,_shadersReprojectWebMercatorVS:ReprojectWebMercatorVS,_shadersRimLightingMaterial:RimLightingMaterial,_shadersSelectedFeatureIdStageCommon:SelectedFeatureIdStageCommon,_shadersShadowVolumeAppearanceFS:ShadowVolumeAppearanceFS,_shadersShadowVolumeAppearanceVS:ShadowVolumeAppearanceVS,_shadersShadowVolumeFS:ShadowVolumeFS,_shadersSilhouette:Silhouette,_shadersSkinningStageVS:SkinningStageVS,_shadersSkyAtmosphereCommon:SkyAtmosphereCommon,_shadersSkyAtmosphereFS:SkyAtmosphereFS,_shadersSkyAtmosphereVS:SkyAtmosphereVS,_shadersSkyBoxFS:SkyBoxFS,_shadersSkyBoxVS:SkyBoxVS,_shadersSlopeRampMaterial:SlopeRampMaterial,_shadersStripeMaterial:StripeMaterial,_shadersSunFS:SunFS,_shadersSunTextureFS:SunTextureFS,_shadersSunVS:SunVS,_shadersTexturedMaterialAppearanceFS:TexturedMaterialAppearanceFS,_shadersTexturedMaterialAppearanceVS:TexturedMaterialAppearanceVS,_shadersVector3DTileClampedPolylinesFS:Vector3DTileClampedPolylinesFS,_shadersVector3DTileClampedPolylinesVS:Vector3DTileClampedPolylinesVS,_shadersVector3DTilePolylinesVS:Vector3DTilePolylinesVS,_shadersVectorTileVS:VectorTileVS,_shadersVerticalExaggerationStageVS:VerticalExaggerationStageVS,_shadersViewportQuadFS:ViewportQuadFS,_shadersViewportQuadVS:ViewportQuadVS,_shadersVoxelFS:VoxelFS,_shadersVoxelUtils:VoxelUtils,_shadersVoxelVS:VoxelVS,_shadersWater:WaterMaterial,_shadersWaterMaskMaterial:WaterMaskMaterial,_shadersXYZToRGB:czm_XYZToRGB,_shadersacesTonemapping:czm_acesTonemapping,_shadersalphaWeight:czm_alphaWeight,_shadersantialias:czm_antialias,_shadersapplyHSBShift:czm_applyHSBShift,_shadersapproximateSphericalCoordinates:czm_approximateSphericalCoordinates,_shadersapproximateTanh:czm_approximateTanh,_shadersbackFacing:czm_backFacing,_shadersbranchFreeTernary:czm_branchFreeTernary,_shaderscascadeColor:czm_cascadeColor,_shaderscascadeDistance:czm_cascadeDistance,_shaderscascadeMatrix:czm_cascadeMatrix,_shaderscascadeWeights:czm_cascadeWeights,_shadersclipPolygons:czm_clipPolygons,_shaderscolumbusViewMorph:czm_columbusViewMorph,_shaderscomputeAtmosphereColor:czm_computeAtmosphereColor,_shaderscomputeGroundAtmosphereScattering:czm_computeGroundAtmosphereScattering,_shaderscomputePosition:czm_computePosition,_shaderscomputeScattering:czm_computeScattering,_shadersconvertLocalToBoxUv:convertLocalToBoxUv,_shadersconvertLocalToCylinderUv:convertLocalToCylinderUv,_shadersconvertLocalToEllipsoidUv:convertLocalToEllipsoidUv,_shaderscosineAndSine:czm_cosineAndSine,_shadersdecompressTextureCoordinates:czm_decompressTextureCoordinates,_shadersdegreesPerRadian:czm_degreesPerRadian,_shadersdepthClamp:czm_depthClamp,_shadersdepthRange:czm_depthRange,_shadersdepthRangeStruct:czm_depthRangeStruct,_shaderseastNorthUpToEyeCoordinates:czm_eastNorthUpToEyeCoordinates,_shadersellipsoidContainsPoint:czm_ellipsoidContainsPoint,_shadersellipsoidTextureCoordinates:czm_ellipsoidTextureCoordinates,_shadersepsilon1:czm_epsilon1,_shadersepsilon2:czm_epsilon2,_shadersepsilon3:czm_epsilon3,_shadersepsilon4:czm_epsilon4,_shadersepsilon5:czm_epsilon5,_shadersepsilon6:czm_epsilon6,_shadersepsilon7:czm_epsilon7,_shadersequalsEpsilon:czm_equalsEpsilon,_shaderseyeOffset:czm_eyeOffset,_shaderseyeToWindowCoordinates:czm_eyeToWindowCoordinates,_shadersfastApproximateAtan:czm_fastApproximateAtan,_shadersfog:czm_fog,_shadersgammaCorrect:czm_gammaCorrect,_shadersgeodeticSurfaceNormal:czm_geodeticSurfaceNormal,_shadersgetDefaultMaterial:czm_getDefaultMaterial,_shadersgetDynamicAtmosphereLightDirection:czm_getDynamicAtmosphereLightDirection,_shadersgetLambertDiffuse:czm_getLambertDiffuse,_shadersgetSpecular:czm_getSpecular,_shadersgetWaterNoise:czm_getWaterNoise,_shadershue:czm_hue,_shadersinfinity:czm_infinity,_shadersinverseGamma:czm_inverseGamma,_shadersisEmpty:czm_isEmpty,_shadersisFull:czm_isFull,_shaderslatitudeToWebMercatorFraction:czm_latitudeToWebMercatorFraction,_shaderslineDistance:czm_lineDistance,_shaderslinearToSrgb:czm_linearToSrgb,_shadersluminance:czm_luminance,_shadersmaterial:czm_material,_shadersmaterialInput:czm_materialInput,_shadersmaximumComponent:czm_maximumComponent,_shadersmetersPerPixel:czm_metersPerPixel,_shadersmodelMaterial:czm_modelMaterial,_shadersmodelToWindowCoordinates:czm_modelToWindowCoordinates,_shadersmodelVertexOutput:czm_modelVertexOutput,_shadersmultiplyWithColorBalance:czm_multiplyWithColorBalance,_shadersnearFarScalar:czm_nearFarScalar,_shadersoctDecode:czm_octDecode,_shadersoneOverPi:czm_oneOverPi,_shadersoneOverTwoPi:czm_oneOverTwoPi,_shaderspackDepth:czm_packDepth,_shaderspassCesium3DTile:czm_passCesium3DTile,_shaderspassCesium3DTileClassification:czm_passCesium3DTileClassification,_shaderspassCesium3DTileClassificationIgnoreShow:czm_passCesium3DTileClassificationIgnoreShow,_shaderspassClassification:czm_passClassification,_shaderspassCompute:czm_passCompute,_shaderspassEnvironment:czm_passEnvironment,_shaderspassGaussianSplats:czm_passGaussianSplats,_shaderspassGlobe:czm_passGlobe,_shaderspassOpaque:czm_passOpaque,_shaderspassOverlay:czm_passOverlay,_shaderspassTerrainClassification:czm_passTerrainClassification,_shaderspassTranslucent:czm_passTranslucent,_shaderspassVoxels:czm_passVoxels,_shaderspbrLighting:czm_pbrLighting,_shaderspbrNeutralTonemapping:czm_pbrNeutralTonemapping,_shadersphong:czm_phong,_shaderspi:czm_pi,_shaderspiOverFour:czm_piOverFour,_shaderspiOverSix:czm_piOverSix,_shaderspiOverThree:czm_piOverThree,_shaderspiOverTwo:czm_piOverTwo,_shadersplaneDistance:czm_planeDistance,_shaderspointAlongRay:czm_pointAlongRay,_shadersradiansPerDegree:czm_radiansPerDegree,_shadersray:czm_ray,_shadersrayEllipsoidIntersectionInterval:czm_rayEllipsoidIntersectionInterval,_shadersraySegment:czm_raySegment,_shadersraySphereIntersectionInterval:czm_raySphereIntersectionInterval,_shadersreadDepth:czm_readDepth,_shadersreadNonPerspective:czm_readNonPerspective,_shadersreverseLogDepth:czm_reverseLogDepth,_shadersround:czm_round,_shaderssaturation:czm_saturation,_shaderssceneMode2D:czm_sceneMode2D,_shaderssceneMode3D:czm_sceneMode3D,_shaderssceneModeColumbusView:czm_sceneModeColumbusView,_shaderssceneModeMorphing:czm_sceneModeMorphing,_shadersshadowDepthCompare:czm_shadowDepthCompare,_shadersshadowParameters:czm_shadowParameters,_shadersshadowVisibility:czm_shadowVisibility,_shaderssignNotZero:czm_signNotZero,_shaderssolarRadius:czm_solarRadius,_shaderssphericalHarmonics:czm_sphericalHarmonics,_shaderssrgbToLinear:czm_srgbToLinear,_shaderstangentToEyeSpaceMatrix:czm_tangentToEyeSpaceMatrix,_shaderstextureCube:czm_textureCube,_shadersthreePiOver2:czm_threePiOver2,_shaderstransformPlane:czm_transformPlane,_shaderstranslateRelativeToEye:czm_translateRelativeToEye,_shaderstranslucentPhong:czm_translucentPhong,_shaderstranspose:czm_transpose,_shaderstwoPi:czm_twoPi,_shadersunpackClippingExtents:czm_unpackClippingExtents,_shadersunpackDepth:czm_unpackDepth,_shadersunpackFloat:czm_unpackFloat,_shadersunpackUint:czm_unpackUint,_shadersvalueTransform:czm_valueTransform,_shadersvertexLogDepth:czm_vertexLogDepth,_shaderswebMercatorMaxLatitude:czm_webMercatorMaxLatitude,_shaderswindowToEyeCoordinates:czm_windowToEyeCoordinates,_shaderswriteDepthClamp:czm_writeDepthClamp,_shaderswriteLogDepth:czm_writeLogDepth,_shaderswriteNonPerspective:czm_writeNonPerspective,addAllToArray:addAllToArray,addBuffer:addBuffer,addDefaults:addDefaults,addExtensionsRequired:addExtensionsRequired,addExtensionsUsed:addExtensionsUsed,addPipelineExtras:addPipelineExtras,addToArray:addToArray,appendForwardSlash:appendForwardSlash,arrayRemoveDuplicates:arrayRemoveDuplicates,barycentricCoordinates:barycentricCoordinates,binarySearch:binarySearch,buildModuleUrl:buildModuleUrl,buildVoxelDrawCommands:buildVoxelDrawCommands,clone:clone$1,combine:combine$2,computeFlyToLocationForRectangle:computeFlyToLocationForRectangle,createBillboardPointCallback:createBillboardPointCallback,createCommand:createCommand,createDefaultImageryProviderViewModels:createDefaultImageryProviderViewModels,createDefaultTerrainProviderViewModels:createDefaultTerrainProviderViewModels,createElevationBandMaterial:createElevationBandMaterial,createGooglePhotorealistic3DTileset:createGooglePhotorealistic3DTileset,createGuid:createGuid,createMaterialPropertyDescriptor:createMaterialPropertyDescriptor,createOsmBuildingsAsync:createOsmBuildingsAsync,createPropertyDescriptor:createPropertyDescriptor,createRawPropertyDescriptor:createRawPropertyDescriptor,createTangentSpaceDebugPrimitive:createTangentSpaceDebugPrimitive,createTaskProcessorWorker:createTaskProcessorWorker,createUniform:createUniform$1,createUniformArray:createUniformArray,createWorldBathymetryAsync:createWorldBathymetryAsync,createWorldImageryAsync:createWorldImageryAsync,createWorldTerrainAsync:createWorldTerrainAsync,decodeGoogleEarthEnterpriseData:decodeGoogleEarthEnterpriseData,decodeVectorPolylinePositions:decodeVectorPolylinePositions,defer:defer,defined:defined$1,demodernizeShader:demodernizeShader,deprecationWarning:deprecationWarning,destroyObject:destroyObject$1,exportKml:exportKml,findAccessorMinMax:findAccessorMinMax,findContentMetadata:findContentMetadata,findGroupMetadata:findGroupMetadata,findTileMetadata:findTileMetadata,forEachTextureInMaterial:forEachTextureInMaterial,formatError:formatError,freezeRenderState:freezeRenderState,getAbsoluteUri:getAbsoluteUri,getAccessorByteStride:getAccessorByteStride,getBaseUri:getBaseUri,getBinaryAccessor:getBinaryAccessor,getClipAndStyleCode:getClipAndStyleCode,getClippingFunction:getClippingFunction,getComponentReader:getComponentReader,getElement:getElement,getExtensionFromUri:getExtensionFromUri,getFilenameFromUri:getFilenameFromUri,getImageFromTypedArray:getImageFromTypedArray,getImagePixels:getImagePixels,getJsonFromTypedArray:getJsonFromTypedArray,getMagic:getMagic,getMeshPrimitives:getMeshPrimitives,getMetadataClassProperty:getMetadataClassProperty,getMetadataProperty:getMetadataProperty,getStringFromTypedArray:getStringFromTypedArray,getTimestamp:getTimestamp,hasExtension:hasExtension,heightReferenceOnEntityPropertyChanged:heightReferenceOnEntityPropertyChanged,isBitSet:isBitSet,isBlobUri:isBlobUri,isCrossOriginUrl:isCrossOriginUrl,isDataUri:isDataUri,isLeapYear:isLeapYear,knockout:knockout,knockout_3_5_1:knockout,knockout_es5:knockout_es5,loadAndExecuteScript:loadAndExecuteScript,loadCubeMap:loadCubeMap$1,loadImageFromTypedArray:loadImageFromTypedArray,loadKTX2:loadKTX2,mergeSort:mergeSort,moveTechniqueRenderStates:moveTechniqueRenderStates,moveTechniquesToExtension:moveTechniquesToExtension,numberOfComponentsForType:numberOfComponentsForType,objectToQuery:objectToQuery,oneTimeWarning:oneTimeWarning,parseBatchTable:parseBatchTable,parseFeatureMetadataLegacy:parseFeatureMetadataLegacy,parseGlb:parseGlb,parseResponseHeaders:parseResponseHeaders,parseStructuralMetadata:parseStructuralMetadata,pickModel:pickModel,pointInsideTriangle:pointInsideTriangle,preprocess3DTileContent:preprocess3DTileContent,processVoxelProperties:processVoxelProperties,queryToObject:queryToObject,readAccessorPacked:readAccessorPacked,removeExtension:removeExtension,removeExtensionsRequired:removeExtensionsRequired,removeExtensionsUsed:removeExtensionsUsed,removePipelineExtras:removePipelineExtras,removeUnusedElements:removeUnusedElements,resizeImageToNextPowerOfTwo:resizeImageToNextPowerOfTwo,sampleTerrain:sampleTerrain,sampleTerrainMostDetailed:sampleTerrainMostDetailed,scaleToGeodeticSurface:scaleToGeodeticSurface,srgbToLinear:srgbToLinear$1,subdivideArray:subdivideArray,subscribeAndEvaluate:subscribeAndEvaluate,updateAccessorComponentTypes:updateAccessorComponentTypes,updateVersion:updateVersion,usesExtension:usesExtension,viewerCesium3DTilesInspectorMixin:viewerCesium3DTilesInspectorMixin,viewerCesiumInspectorMixin:viewerCesiumInspectorMixin,viewerDragDropMixin:viewerDragDropMixin,viewerPerformanceWatchdogMixin:viewerPerformanceWatchdogMixin,viewerVoxelInspectorMixin:viewerVoxelInspectorMixin,webGLConstantToGlslType:webGLConstantToGlslType,wrapFunction:wrapFunction,writeTextToCanvas:writeTextToCanvas});let autoFitScale=1;const initCesium=(e,t)=>{t||(t={token:""}),t.token&&(Ion.defaultAccessToken=t.token),Camera.DEFAULT_VIEW_RECTANGLE=Rectangle.fromDegrees(90,-20,110,90);const i=new Viewer(e,{...DefaultViewerOptions,...t});return i.imageryLayers.remove(i.imageryLayers.get(0)),i._cesiumWidget._creditContainer.style.display="none",i.scene.postProcessStages.fxaa.enabled=!0,i.scene.msaaSamples=8,i.scene.globe.baseColor=Color.fromCssColorString("rgba(0,0,255,0.5)"),i.scene.globe.depthTestAgainstTerrain=!0,i.scene.globe.showGroundAtmosphere=!0,i.scene.globe.enableLighting=!1,i.scene.screenSpaceCameraController.maximumTiltAngle=Math.PI/2,console.log("%c%s","color: GREEN; font-size: 20px",`Cesium ${VERSION}`),i},setGlobeEnabled=(e,t)=>{const i=t?1:0;e.scene.skyBox.show=t,e.scene.skyAtmosphere.show=t,e.scene.globe.dynamicAtmosphereLighting=t,e.scene.globe.dynamicAtmosphereLightingFromSun=t,e.scene.globe.translucency.backFaceAlpha=i,e.scene.globe.baseColor=Color.fromCssColorString(`rgba(121, 121, 255,${i})`),e.scene.globe.showGroundAtmosphere=t,t?(e.scene.backgroundColor=Color.fromCssColorString(`rgba(255,255,255,${i})`),e.scene.globe.material=void 0,e.scene.globe.translucency.enabled=!1):(e.scene.globe.translucency.enabled=!1,e.scene.globe.undergroundColor=Color.fromCssColorString(`rgba(0, 0, 0,${i})`),e.scene.backgroundColor=Color.fromCssColorString(`rgba(0,0,0,${i})`),e.scene.globe.material=new Material$4({fabric:{type:"Color",uniforms:{color:Color.fromCssColorString(`rgba(0, 0, 0,${i})`)}}}))},setGlobeOpatity=(e,t)=>{t.scene.globe.translucency.enabled=!0,t.scene.globe.translucency.frontFaceAlpha=e,t.scene.globe.translucency.backFaceAlpha=e},setCesiumForAutoFitScale=e=>{autoFitScale=e},getCesiumForAutoFitScale=()=>autoFitScale,DefaultViewerOptions={animation:!1,baseLayerPicker:!1,fullscreenButton:!1,geocoder:!1,homeButton:!1,infoBox:!0,sceneModePicker:!1,selectionIndicator:!1,timeline:!1,navigationHelpButton:!1,scene3DOnly:!0,navigation:!1,navigationInstructionsInitiallyVisible:!1,showRenderLoopErrors:!0,orderIndependentTranslucency:!1,contextOptions:{webgl:{alpha:!0}}},makePositionsForClockwise=e=>{let t=0;for(let i=0;i<e.length;i++){const n=e[i],r=e[(i+1)%e.length];t+=Cartesian3$1.cross(n,r,new Cartesian3$1).z}return t>0?e.reverse():e},makePositionsForAntiClockwise=e=>{let t=0;for(let i=0;i<e.length;i++){const n=e[i],r=e[(i+1)%e.length];t+=Cartesian3$1.cross(n,r,new Cartesian3$1).z}return t<0?e.reverse():e},makePositionsToLnglats=e=>e.map(e=>makePositiontoLnglat(e)),makePositiontoLnglat=e=>{const t=Cartographic.fromCartesian(e);return{longitude:CesiumMath.toDegrees(t.longitude),latitude:CesiumMath.toDegrees(t.latitude),height:t.height}},makeLnglatsToPositions=e=>e.map(e=>Cartesian3$1.fromDegrees(e.longitude,e.latitude,e.height)),makeLnglatToPosition=e=>Cartesian3$1.fromDegrees(e.longitude,e.latitude,e.height),makePositionsClose=e=>{const t=e[0],i=e[e.length-1];return t.x===i.x&&t.y===i.y&&t.z===i.z?e:[...e,e[0]]},makeLnglatsToPointGeojson=e=>{const t=[];return e.forEach(e=>{t.push({type:"Feature",geometry:{type:"Point",coordinates:[e.longitude,e.latitude]},properties:{height:e.height}})}),{type:"FeatureCollection",features:t}},makeLnglatsToLineGeojson=e=>{const t=[];return e.forEach((i,n)=>{0!==n&&t.push({type:"Feature",geometry:{type:"LineString",coordinates:[[e[n-1].longitude,e[n-1].latitude],[i.longitude,i.latitude]]},properties:{height:i.height}})}),{type:"FeatureCollection",features:t}},makeLnglatsToPolygonGeojson=e=>{const t=[];return t.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e.map(e=>[e.longitude,e.latitude])]},properties:{heights:e.map(e=>e.height)}}),{type:"FeatureCollection",features:t}},makeYawPitchRollToHeadingPitchRoll=e=>({heading:CesiumMath.toRadians(e.yaw+(e.offsetYaw||0)),pitch:CesiumMath.toRadians(e.pitch),roll:CesiumMath.toRadians(e.roll)}),setViewToLnglat=e=>{const{lng:t,lat:i,height:n,viewer:r}=e;r.scene.camera.setView({destination:Cartesian3$1.fromDegrees(t,i,n||1e4)})},flyToLnglat=e=>{const{lng:t,lat:i,height:n,viewer:r}=e;r.scene.camera.flyTo({destination:Cartesian3$1.fromDegrees(t,i,n||1e4)})},flyToPosition=e=>{const{position:t,viewer:i}=e;i.scene.camera.flyTo({destination:t})};function getCameraView(e){const t=e.camera.heading,i=e.camera.pitch,n=e.camera.roll;return{destination:new Cartesian3$1(e.camera.position.x,e.camera.position.y,e.camera.position.z),orientation:{heading:t,pitch:i,roll:n}}}function flyToCameraView(e,t){e&&t.scene.camera.flyTo({...e})}function flyToDataSource(e,t){const i=t.dataSources.getByName(e);i.length>0&&t.flyTo(i[0])}function flyToImagery(e,t){e&&t.flyTo(e)}function flyToCesium3DTile(e,t){t.flyTo(e)}function flyToFromSphere(e,t){const i=new BoundingSphere(new Cartesian3$1(e[0],e[1],e[2]),e[3]);t.camera.flyToBoundingSphere(i,{offset:new HeadingPitchRange(3.5,-.5,200),duration:2})}const flyToRectangleBounds=(e,t,i,n,r)=>{if(i<=e||n<=t)return void console.error("无效的边界坐标:东必须大于西,北必须大于南");const o={destination:Rectangle.fromDegrees(e,t,i,n),duration:3,orientation:{heading:CesiumMath.toRadians(0),pitch:CesiumMath.toRadians(-90),roll:0}};r.camera.flyTo(o)},flyToNorth=e=>{e.camera.flyTo({destination:e.scene.camera.position,orientation:{heading:CesiumMath.toRadians(0),pitch:CesiumMath.toRadians(-90),roll:0},duration:1.5})};function getScreenCenterPoint(e){const t=e.scene.canvas,i=t.clientWidth/2,n=t.clientHeight/2;return e.scene.pickPosition(new Cartesian2(i,n))}const flyByRotatePoint=e=>{let t=!1;let i;const n=e.camera;let r=n.pitch,o=0,a=!1;function s(){if(!t||!i)return;let c=n.heading;a?c+=.005:c-=.005,e.camera.setView({destination:i,orientation:{heading:c,pitch:r}}),e.camera.moveBackward(o),requestAnimationFrame(s)}return{start:(c,l)=>{i=c||getScreenCenterPoint(e),r=n.pitch,a=!!l,o=Cartesian3$1.distance(n.position,i),t=!0,s(),e.scene.screenSpaceCameraController.enableInputs=!1},end:()=>{t=!1,e.scene.screenSpaceCameraController.enableInputs=!0}}},flyByRotateOut=e=>{let t=!1;let i=!1;function n(){if(!t)return;let r=e.camera.heading;i?r+=.001:r-=.001,e.camera.setView({orientation:{heading:r,pitch:e.camera.pitch}}),requestAnimationFrame(n)}t=!0;return{start:e=>{t=!0,i=!!e,n()},end:()=>{t=!1}}};function twinkleModel(e){e.show=!1,setTimeout(()=>{e.show=!0,setTimeout(()=>{e.show=!1,setTimeout(()=>{e.show=!0},300)},300)},300)}const setCameraAutoBackTiltToZero=(e,t)=>{console.log("sdfjdsklf"),t||(t=1e5);let i=!1;e.camera.moveEnd.addEventListener(function(){if(i)return;const n=e.camera,r=e.camera.positionCartographic.height;console.log("cameraEnd",r);const o=n.heading,a=n.roll;if(r>t){i=!0;const t=e.camera.computeViewRectangle();if(!t)return void(i=!0);const n={longitude:0,latitude:0},s=Rectangle.center(t);n.longitude=CesiumMath.toDegrees(s.longitude),n.latitude=CesiumMath.toDegrees(s.latitude),e.camera.flyTo({destination:makeLnglatToPosition(new Cartographic(n.longitude,n.latitude,r)),orientation:{heading:o,pitch:-1.5,roll:a},duration:1,complete:()=>{}})}else i=!1,e.scene.screenSpaceCameraController.maximumTiltAngle=Math.PI/2})},initCesiumEvent=(e,t)=>{const i=e.scene,n=new ScreenSpaceEventHandler(i.canvas);n.setInputAction(n=>{if(t.LEFT_POSITION){const r=i.pickPosition(n.position);leftPositionListener(n.position,r,t.LEFT_POSITION,e)}t.PICK_FEATURE&&pickFeaturesListener(e,n.position,t.PICK_FEATURE),e._element.style.cursor="default"},ScreenSpaceEventType$1.LEFT_CLICK),n.setInputAction(n=>{if(t.MOVE_POSITION){const r=i.pickPosition(n.endPosition);leftPositionListener(n.endPosition,r,t.MOVE_POSITION,e)}t.MOVE_PICK_FEATURE&&pickFeaturesListener(e,n.endPosition,t.MOVE_PICK_FEATURE)},ScreenSpaceEventType$1.MOUSE_MOVE)},pickFeaturesListener=(e,t,i)=>{const n=e.scene.pickPosition(t),r=e.scene.pick(t),o={};if(r){if(e._element.style.cursor="pointer",r instanceof Cesium3DTileFeature){r.getPropertyIds().forEach(e=>{o[e]=r.getProperty(e)})}else r.id instanceof Cesium3DTileContent?(e._element.style.cursor="pointer",Object.assign(o,{name:"sdfjldks"})):r.id instanceof Entity?e._element.style.cursor="pointer":r.primitive&&Object.assign(o,r.primitive.properties);i({position:n,...r},o)}else i(void 0,{})},leftPositionListener=(e,t,i,n)=>{t||(t=Cartesian3$1.fromDegrees(0,0,0));const r=Cartographic.fromCartesian(t);i({windowPosition:e,position:t,lnglat:{lng:CesiumMath.toDegrees(r.longitude),lat:CesiumMath.toDegrees(r.latitude),height:r.height},cameraView:getCameraView(n)})},numberId=()=>`${Date.now()}${Math.round(9999999999*Math.random()+1)}`,getInoCesiumBaseUrl=()=>window.INO_CESIUM_BASE_URL,delayTime=e=>new Promise(t=>setTimeout(t,e));class Tooltip{static tooltip;_title;_div;_message;constructor(e){const t=document.createElement("DIV");t.id="tooltip",t.className="twipsy right";const i=document.createElement("DIV");i.className="twipsy-inner",t.appendChild(i),this._div=t,this._title=i,this._message="";const n=e._element.getElementsByClassName("cesium-widget")[0];if(!n)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");n.appendChild(t),t.onmousemove=e=>{this.showAt({x:e.clientX,y:e.clientY},this._message)}}showAt(e,t){e&&t&&(this.setVisible(!0),this._title.innerHTML=t,this._div.style.left=`${e.x+10}px`,this._div.style.top=e.y-this._div.clientHeight/2+"px",this._message=t)}setVisible(e){this._div.style.display=e?"block":"none"}static createToolTip(e){return Tooltip.tooltip||(Tooltip.tooltip=new Tooltip(e)),Tooltip.tooltip}destroy(){Tooltip.tooltip&&(this._div&&this._div.parentNode.removeChild(this._div),Tooltip.tooltip=null)}}class Popup{static popup;_div;viewer;offset=new Cartesian2(140,150);position=Cartesian3$1.ZERO;constructor(e,t,i){this.viewer=e,i&&(this.offset=i),this._div=t,this._div.style.position="absolute",this._div.style.left="0",this._div.style.top="0",this._div.style.display="none";const n=e._element.getElementsByClassName("cesium-widget")[0];if(!n)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");n.appendChild(t),this.renderPosition()}showAt(e){this.position=e,e&&this.setVisible(!0)}setVisible(e){this._div.style.display=e?"block":"none"}renderPosition(){this.viewer.scene.postRender.addEventListener(()=>{if(!this.position.equals(Cartesian3$1.ZERO)){const e=this.viewer.scene.cartesianToCanvasCoordinates(this.position);this._div.style.left=e.x-this.offset.x+"px",this._div.style.top=e.y-this.offset.y+"px"}})}static createPupup(e,t,i){return Popup.popup||(Popup.popup=new Popup(e,t,i)),Popup.popup}destroy(){Popup.popup&&(this._div&&this._div.parentNode.removeChild(this._div),Popup.popup=null)}}const randomPointToGeoJson=(e,t=[-180,180],i=[-90,90])=>{const n=[];for(let r=0;r<e;r++){const e=randomInRange(t),r=randomInRange(i);n.push({type:"Feature",geometry:{type:"Point",coordinates:[e,r]},properties:{}})}return{type:"FeatureCollection",features:n}};function randomInRange(e){const[t,i]=e;return Math.random()*(i-t)+t}function randomColor(){return`rgba(${Math.round(255*Math.random())},${Math.round(255*Math.random())},${Math.round(255*Math.random())},${Math.random()})`}const randomPolylineToGeoJson=(e,t=[-180,180],i=[-90,90])=>{const n=[];for(let r=0;r<e;r++){const e=Math.floor(randomInRange([3,10])),r=[];for(let n=0;n<e;n++){const e=randomInRange(t),n=randomInRange(i);r.push([e,n])}n.push({type:"Feature",geometry:{type:"LineString",coordinates:r},properties:{}})}return{type:"FeatureCollection",features:n}},randomPolygonToGeoJson=(e,t=[-180,180],i=[-90,90])=>{const n=[];for(let r=0;r<e;r++){const e=createRandomPolygon(t,i);n.push({type:"Feature",geometry:{type:"Polygon",coordinates:[e]}})}return{type:"FeatureCollection",features:n}};function createRandomPolygon(e,t){const i=Math.floor(randomInRange([3,10])),n=randomInRange(e),r=randomInRange(t),o=randomInRange([1,5]),a=[];for(let e=0;e<i;e++){const t=e/i*2*Math.PI,s=randomInRange([.8*o,o]),c=n+s*Math.cos(t),l=r+s*Math.sin(t);a.push([c,l])}return a.push(a[0]),a}const createEagleEye=(e,t)=>{let i=!1;const n=new Viewer(e,{...DefaultViewerOptions,scene3DOnly:!1});n.scene.mode=2;const r=n.scene.screenSpaceCameraController;r.enableRotate=!1,r.enableTranslate=!1,r.enableZoom=!1,r.enableTilt=!1,r.enableLook=!1,t.entities.add({position:Cartesian3$1.fromDegrees(0,0),label:{text:new CallbackProperty(()=>(o(),""),!0)}});const o=function(){i||n.camera.flyTo({destination:t.camera.position,orientation:{heading:t.camera.heading,pitch:t.camera.pitch,roll:t.camera.roll},duration:0})};return{viewer:n,open:()=>{i=!1},close:()=>{i=!0}}},createRollerShutterHandler=e=>{const t=[],i=t=>{e.scene.splitPosition=t},n=(e,i)=>{t.push(e),e.splitDirection=i};return{set:()=>{i(.5),function(){let t=document.getElementById("vertical-slider");if(t)return void(t.style.display="block");t=document.createElement("div"),t.id="vertical-slider";const i=e._element.getElementsByClassName("cesium-widget")[0];if(!i)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");i.appendChild(t)}(),function(){const t=document.getElementById("vertical-slider");function i(){document.removeEventListener("mousemove",r,!1)}function n(){document.addEventListener("mousemove",r,!1)}function r(i){i.preventDefault?i.preventDefault():i.returnValue=!1,t.style.left=`${i.clientX}px`;const n=i.clientX/t.parentElement.offsetWidth;e.scene.splitPosition=n}t.addEventListener("mousedown",n,!1),document.addEventListener("mouseup",i,!1)}()},remove:()=>{t.forEach(e=>{n(e,SplitDirection$1.NONE)});document.getElementById("vertical-slider").style.display="none"},setSplitPosition:i,setSplitDirection:n}},createSplitScreenHandler=e=>{const t=e;let i;const n={},r=()=>{const e=t.container;e.style.display="flex";e.getElementsByClassName("cesium-viewer")[0].style.width="50%";const r=document.createElement("div");r.style={width:"50%",height:"100%"},r.id="right-screen-viewer",e.appendChild(r),i=initCesium(r.id),n[1]=i,a(),t.camera.changed.addEventListener(()=>o(t,i)),t.scene.preRender.addEventListener(()=>o(t,i)),t.camera.percentageChanged=.01,i.camera.changed.addEventListener(()=>o(i,t)),i.scene.preRender.addEventListener(()=>o(i,t)),i.camera.percentageChanged=.01,i._splitNumber=1};function o(e,t){const i=Cartographic.toCartesian(e.camera.positionCartographic);t.camera.setView({destination:new Cartesian3$1(i.x,i.y,i.z),orientation:{direction:e.scene.camera._direction,up:e.scene.camera.up,heading:e.scene.camera.heading,pitch:e.scene.camera.pitch,roll:e.scene.camera.roll}})}const a=()=>{t.imageryLayers._layers.forEach(e=>{e.splitScreenBaseLayer&&i.imageryLayers.addImageryProvider(e.imageryProvider)})};return{set:()=>{r(),function(){let t=document.getElementById("split-screen-slider");if(t)return void(t.style.display="block");t=document.createElement("div"),t.id="split-screen-slider";const i=e._element.getElementsByClassName("cesium-widget")[0];if(!i)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");i.appendChild(t)}(),t._splitNumber=-1,n[-1]=t},viewerMap:n,getViewerFromKey:e=>n[e],remove:()=>{document.getElementById("split-screen-slider").style.display="none";t.container.getElementsByClassName("cesium-viewer")[0].style.width="100%",i.container.remove(),delete n[1]},setLayer:(e,t)=>{},updateBaseLayers:a}};var earthRadius=6371008.8,factors={centimeters:100*earthRadius,centimetres:100*earthRadius,degrees:360/(2*Math.PI),feet:3.28084*earthRadius,inches:39.37*earthRadius,kilometers:earthRadius/1e3,kilometres:earthRadius/1e3,meters:earthRadius,metres:earthRadius,miles:earthRadius/1609.344,millimeters:1e3*earthRadius,millimetres:1e3*earthRadius,nauticalmiles:earthRadius/1852,radians:1,yards:1.0936*earthRadius};function feature(e,t,i={}){const n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=t||{},n.geometry=e,n}function point(e,t,i={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!isNumber(e[0])||!isNumber(e[1]))throw new Error("coordinates must contain numbers");return feature({type:"Point",coordinates:e},t,i)}function polygon(e,t,i={}){for(const t of e){if(t.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(t[t.length-1].length!==t[0].length)throw new Error("First and last Position are not equivalent.");for(let e=0;e<t[t.length-1].length;e++)if(t[t.length-1][e]!==t[0][e])throw new Error("First and last Position are not equivalent.")}return feature({type:"Polygon",coordinates:e},t,i)}function lineString(e,t,i={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return feature({type:"LineString",coordinates:e},t,i)}function featureCollection(e,t={}){const i={type:"FeatureCollection"};return t.id&&(i.id=t.id),t.bbox&&(i.bbox=t.bbox),i.features=e,i}function multiPoint(e,t,i={}){return feature({type:"MultiPoint",coordinates:e},t,i)}function radiansToLength(e,t="kilometers"){const i=factors[t];if(!i)throw new Error(t+" units is invalid");return e*i}function lengthToRadians(e,t="kilometers"){const i=factors[t];if(!i)throw new Error(t+" units is invalid");return e/i}function radiansToDegrees(e){return 180*(e%(2*Math.PI))/Math.PI}function degreesToRadians(e){return e%360*Math.PI/180}function isNumber(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}function getCoord(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if("Feature"===e.type&&null!==e.geometry&&"Point"===e.geometry.type)return[...e.geometry.coordinates];if("Point"===e.type)return[...e.coordinates]}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return[...e];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function getCoords(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function getGeom(e){return"Feature"===e.type?e.geometry:e}function bearing(e,t,i={}){if(!0===i.final)return calculateFinalBearing(e,t);const n=getCoord(e),r=getCoord(t),o=degreesToRadians(n[0]),a=degreesToRadians(r[0]),s=degreesToRadians(n[1]),c=degreesToRadians(r[1]),l=Math.sin(a-o)*Math.cos(c),d=Math.cos(s)*Math.sin(c)-Math.sin(s)*Math.cos(c)*Math.cos(a-o);return radiansToDegrees(Math.atan2(l,d))}function calculateFinalBearing(e,t){let i=bearing(t,e);return i=(i+180)%360,i}function destination(e,t,i,n={}){const r=getCoord(e),o=degreesToRadians(r[0]),a=degreesToRadians(r[1]),s=degreesToRadians(i),c=lengthToRadians(t,n.units),l=Math.asin(Math.sin(a)*Math.cos(c)+Math.cos(a)*Math.sin(c)*Math.cos(s));return point([radiansToDegrees(o+Math.atan2(Math.sin(s)*Math.sin(c)*Math.cos(a),Math.cos(c)-Math.sin(a)*Math.sin(l))),radiansToDegrees(l)],n.properties)}function distance(e,t,i={}){var n=getCoord(e),r=getCoord(t),o=degreesToRadians(r[1]-n[1]),a=degreesToRadians(r[0]-n[0]),s=degreesToRadians(n[1]),c=degreesToRadians(r[1]),l=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(s)*Math.cos(c);return radiansToLength(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)),i.units)}function coordEach(e,t,i){if(null!==e)for(var n,r,o,a,s,c,l,d,u=0,h=0,p=e.type,A="FeatureCollection"===p,m="Feature"===p,f=A?e.features.length:1,g=0;g<f;g++){s=(d=!!(l=A?e.features[g].geometry:m?e.geometry:e)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var C=0;C<s;C++){var y=0,_=0;if(null!==(a=d?l.geometries[C]:l)){c=a.coordinates;var E=a.type;switch(u=!i||"Polygon"!==E&&"MultiPolygon"!==E?0:1,E){case null:break;case"Point":if(!1===t(c,h,g,y,_))return!1;h++,y++;break;case"LineString":case"MultiPoint":for(n=0;n<c.length;n++){if(!1===t(c[n],h,g,y,_))return!1;h++,"MultiPoint"===E&&y++}"LineString"===E&&y++;break;case"Polygon":case"MultiLineString":for(n=0;n<c.length;n++){for(r=0;r<c[n].length-u;r++){if(!1===t(c[n][r],h,g,y,_))return!1;h++}"MultiLineString"===E&&y++,"Polygon"===E&&_++}"Polygon"===E&&y++;break;case"MultiPolygon":for(n=0;n<c.length;n++){for(_=0,r=0;r<c[n].length;r++){for(o=0;o<c[n][r].length-u;o++){if(!1===t(c[n][r][o],h,g,y,_))return!1;h++}_++}y++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===coordEach(a.geometries[n],t,i))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function featureEach(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var i=0;i<e.features.length&&!1!==t(e.features[i],i);i++);}function geomEach(e,t){var i,n,r,o,a,s,c,l,d,u,h=0,p="FeatureCollection"===e.type,A="Feature"===e.type,m=p?e.features.length:1;for(i=0;i<m;i++){for(s=p?e.features[i].geometry:A?e.geometry:e,l=p?e.features[i].properties:A?e.properties:{},d=p?e.features[i].bbox:A?e.bbox:void 0,u=p?e.features[i].id:A?e.id:void 0,a=(c=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,r=0;r<a;r++)if(null!==(o=c?s.geometries[r]:s))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,h,l,d,u))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===t(o.geometries[n],h,l,d,u))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,h,l,d,u))return!1;h++}}function geomReduce(e,t,i){var n=i;return geomEach(e,function(e,r,o,a,s){n=0===r&&void 0===i?e:t(n,e,r,o,a,s)}),n}function area(e){return geomReduce(e,(e,t)=>e+calculateArea(t),0)}function calculateArea(e){let t,i=0;switch(e.type){case"Polygon":return polygonArea(e.coordinates);case"MultiPolygon":for(t=0;t<e.coordinates.length;t++)i+=polygonArea(e.coordinates[t]);return i;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function polygonArea(e){let t=0;if(e&&e.length>0){t+=Math.abs(ringArea(e[0]));for(let i=1;i<e.length;i++)t-=Math.abs(ringArea(e[i]))}return t}var FACTOR=earthRadius*earthRadius/2,PI_OVER_180=Math.PI/180;function ringArea(e){const t=e.length-1;if(t<=2)return 0;let i=0,n=0;for(;n<t;){const r=e[n],o=e[n+1===t?0:n+1],a=e[n+2>=t?(n+2)%t:n+2],s=r[0]*PI_OVER_180,c=o[1]*PI_OVER_180;i+=(a[0]*PI_OVER_180-s)*Math.sin(c),n++}return i*FACTOR}function bbox(e,t={}){if(null!=e.bbox&&!0!==t.recompute)return e.bbox;const i=[1/0,1/0,-1/0,-1/0];return coordEach(e,e=>{i[0]>e[0]&&(i[0]=e[0]),i[1]>e[1]&&(i[1]=e[1]),i[2]<e[0]&&(i[2]=e[0]),i[3]<e[1]&&(i[3]=e[1])}),i}function bboxPolygon(e,t={}){const i=Number(e[0]),n=Number(e[1]),r=Number(e[2]),o=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");const a=[i,n];return polygon([[a,[r,n],[r,o],[i,o],a]],t.properties,{bbox:e,id:t.id})}const epsilon=11102230246251565e-32,splitter=134217729,resulterrbound=(3+8*epsilon)*epsilon;function sum(e,t,i,n,r){let o,a,s,c,l=t[0],d=n[0],u=0,h=0;d>l==d>-l?(o=l,l=t[++u]):(o=d,d=n[++h]);let p=0;if(u<e&&h<i)for(d>l==d>-l?(a=l+o,s=o-(a-l),l=t[++u]):(a=d+o,s=o-(a-d),d=n[++h]),o=a,0!==s&&(r[p++]=s);u<e&&h<i;)d>l==d>-l?(a=o+l,c=a-o,s=o-(a-c)+(l-c),l=t[++u]):(a=o+d,c=a-o,s=o-(a-c)+(d-c),d=n[++h]),o=a,0!==s&&(r[p++]=s);for(;u<e;)a=o+l,c=a-o,s=o-(a-c)+(l-c),l=t[++u],o=a,0!==s&&(r[p++]=s);for(;h<i;)a=o+d,c=a-o,s=o-(a-c)+(d-c),d=n[++h],o=a,0!==s&&(r[p++]=s);return 0===o&&0!==p||(r[p++]=o),p}function estimate(e,t){let i=t[0];for(let n=1;n<e;n++)i+=t[n];return i}function vec(e){return new Float64Array(e)}const ccwerrboundA=(3+16*epsilon)*epsilon,ccwerrboundB=(2+12*epsilon)*epsilon,ccwerrboundC=(9+64*epsilon)*epsilon*epsilon,B=vec(4),C1=vec(8),C2=vec(12),D=vec(16),u=vec(4);function orient2dadapt(e,t,i,n,r,o,a){let s,c,l,d,h,p,A,m,f,g,C,y,_,E,b,I,S,T;const v=e-r,x=i-r,w=t-o,P=n-o;E=v*P,p=splitter*v,A=p-(p-v),m=v-A,p=splitter*P,f=p-(p-P),g=P-f,b=m*g-(E-A*f-m*f-A*g),I=w*x,p=splitter*w,A=p-(p-w),m=w-A,p=splitter*x,f=p-(p-x),g=x-f,S=m*g-(I-A*f-m*f-A*g),C=b-S,h=b-C,B[0]=b-(C+h)+(h-S),y=E+C,h=y-E,_=E-(y-h)+(C-h),C=_-I,h=_-C,B[1]=_-(C+h)+(h-I),T=y+C,h=T-y,B[2]=y-(T-h)+(C-h),B[3]=T;let $=estimate(4,B),M=ccwerrboundB*a;if($>=M||-$>=M)return $;if(h=e-v,s=e-(v+h)+(h-r),h=i-x,l=i-(x+h)+(h-r),h=t-w,c=t-(w+h)+(h-o),h=n-P,d=n-(P+h)+(h-o),0===s&&0===c&&0===l&&0===d)return $;if(M=ccwerrboundC*a+resulterrbound*Math.abs($),$+=v*d+P*s-(w*l+x*c),$>=M||-$>=M)return $;E=s*P,p=splitter*s,A=p-(p-s),m=s-A,p=splitter*P,f=p-(p-P),g=P-f,b=m*g-(E-A*f-m*f-A*g),I=c*x,p=splitter*c,A=p-(p-c),m=c-A,p=splitter*x,f=p-(p-x),g=x-f,S=m*g-(I-A*f-m*f-A*g),C=b-S,h=b-C,u[0]=b-(C+h)+(h-S),y=E+C,h=y-E,_=E-(y-h)+(C-h),C=_-I,h=_-C,u[1]=_-(C+h)+(h-I),T=y+C,h=T-y,u[2]=y-(T-h)+(C-h),u[3]=T;const R=sum(4,B,4,u,C1);E=v*d,p=splitter*v,A=p-(p-v),m=v-A,p=splitter*d,f=p-(p-d),g=d-f,b=m*g-(E-A*f-m*f-A*g),I=w*l,p=splitter*w,A=p-(p-w),m=w-A,p=splitter*l,f=p-(p-l),g=l-f,S=m*g-(I-A*f-m*f-A*g),C=b-S,h=b-C,u[0]=b-(C+h)+(h-S),y=E+C,h=y-E,_=E-(y-h)+(C-h),C=_-I,h=_-C,u[1]=_-(C+h)+(h-I),T=y+C,h=T-y,u[2]=y-(T-h)+(C-h),u[3]=T;const O=sum(R,C1,4,u,C2);E=s*d,p=splitter*s,A=p-(p-s),m=s-A,p=splitter*d,f=p-(p-d),g=d-f,b=m*g-(E-A*f-m*f-A*g),I=c*l,p=splitter*c,A=p-(p-c),m=c-A,p=splitter*l,f=p-(p-l),g=l-f,S=m*g-(I-A*f-m*f-A*g),C=b-S,h=b-C,u[0]=b-(C+h)+(h-S),y=E+C,h=y-E,_=E-(y-h)+(C-h),C=_-I,h=_-C,u[1]=_-(C+h)+(h-I),T=y+C,h=T-y,u[2]=y-(T-h)+(C-h),u[3]=T;const F=sum(O,C2,4,u,D);return D[F-1]}function orient2d(e,t,i,n,r,o){const a=(t-o)*(i-r),s=(e-r)*(n-o),c=a-s,l=Math.abs(a+s);return Math.abs(c)>=ccwerrboundA*l?c:-orient2dadapt(e,t,i,n,r,o,l)}function pointInPolygon(e,t){var i,n,r,o,a,s,c,l,d,u=0,h=e[0],p=e[1],A=t.length;for(i=0;i<A;i++){n=0;var m=t[i],f=m.length-1;if((l=m[0])[0]!==m[f][0]&&l[1]!==m[f][1])throw new Error("First and last coordinates in a ring must be the same");for(o=l[0]-h,a=l[1]-p;n<f;n++){if(s=(d=m[n+1])[0]-h,c=d[1]-p,0===a&&0===c){if(s<=0&&o>=0||o<=0&&s>=0)return 0}else if(c>=0&&a<=0||c<=0&&a>=0){if(0===(r=orient2d(o,s,a,c,0,0)))return 0;(r>0&&c>0&&a<=0||r<0&&c<=0&&a>0)&&u++}l=d,a=c,o=s}}return u%2!=0}function booleanPointInPolygon(e,t,i={}){if(!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");const n=getCoord(e),r=getGeom(t),o=r.type,a=t.bbox;let s=r.coordinates;if(a&&!1===inBBox(n,a))return!1;"Polygon"===o&&(s=[s]);let c=!1;for(var l=0;l<s.length;++l){const e=pointInPolygon(n,s[l]);if(0===e)return!i.ignoreBoundary;e&&(c=!0)}return c}function inBBox(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}function booleanPointOnLine(e,t,i={}){const n=getCoord(e),r=getCoords(t);for(let e=0;e<r.length-1;e++){let t=!1;if(i.ignoreEndVertices&&(0===e&&(t="start"),e===r.length-2&&(t="end"),0===e&&e+1===r.length-1&&(t="both")),isPointOnLineSegment(r[e],r[e+1],n,t,void 0===i.epsilon?null:i.epsilon))return!0}return!1}function isPointOnLineSegment(e,t,i,n,r){const o=i[0],a=i[1],s=e[0],c=e[1],l=t[0],d=t[1],u=l-s,h=d-c,p=(i[0]-s)*h-(i[1]-c)*u;if(null!==r){if(Math.abs(p)>r)return!1}else if(0!==p)return!1;return Math.abs(u)===Math.abs(h)&&0===Math.abs(u)?!n&&(i[0]===e[0]&&i[1]===e[1]):n?"start"===n?Math.abs(u)>=Math.abs(h)?u>0?s<o&&o<=l:l<=o&&o<s:h>0?c<a&&a<=d:d<=a&&a<c:"end"===n?Math.abs(u)>=Math.abs(h)?u>0?s<=o&&o<l:l<o&&o<=s:h>0?c<=a&&a<d:d<a&&a<=c:"both"===n&&(Math.abs(u)>=Math.abs(h)?u>0?s<o&&o<l:l<o&&o<s:h>0?c<a&&a<d:d<a&&a<c):Math.abs(u)>=Math.abs(h)?u>0?s<=o&&o<=l:l<=o&&o<=s:h>0?c<=a&&a<=d:d<=a&&a<=c}function booleanWithin(e,t){var i=getGeom(e),n=getGeom(t),r=i.type,o=n.type;switch(r){case"Point":switch(o){case"MultiPoint":return isPointInMultiPoint(i,n);case"LineString":return booleanPointOnLine(i,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return booleanPointInPolygon(i,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+o+" geometry not supported")}case"MultiPoint":switch(o){case"MultiPoint":return isMultiPointInMultiPoint(i,n);case"LineString":return isMultiPointOnLine(i,n);case"Polygon":case"MultiPolygon":return isMultiPointInPoly(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"LineString":switch(o){case"LineString":return isLineOnLine(i,n);case"Polygon":case"MultiPolygon":return isLineInPoly(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}case"Polygon":switch(o){case"Polygon":case"MultiPolygon":return isPolyInPoly(i,n);default:throw new Error("feature2 "+o+" geometry not supported")}default:throw new Error("feature1 "+r+" geometry not supported")}}function isPointInMultiPoint(e,t){var i,n=!1;for(i=0;i<t.coordinates.length;i++)if(compareCoords(t.coordinates[i],e.coordinates)){n=!0;break}return n}function isMultiPointInMultiPoint(e,t){for(var i=0;i<e.coordinates.length;i++){for(var n=!1,r=0;r<t.coordinates.length;r++)compareCoords(e.coordinates[i],t.coordinates[r])&&(n=!0);if(!n)return!1}return!0}function isMultiPointOnLine(e,t){for(var i=!1,n=0;n<e.coordinates.length;n++){if(!booleanPointOnLine(e.coordinates[n],t))return!1;i||(i=booleanPointOnLine(e.coordinates[n],t,{ignoreEndVertices:!0}))}return i}function isMultiPointInPoly(e,t){for(var i=!0,n=!1,r=0;r<e.coordinates.length;r++){if(!(n=booleanPointInPolygon(e.coordinates[r],t))){i=!1;break}n=booleanPointInPolygon(e.coordinates[r],t,{ignoreBoundary:!0})}return i&&n}function isLineOnLine(e,t){for(var i=0;i<e.coordinates.length;i++)if(!booleanPointOnLine(e.coordinates[i],t))return!1;return!0}function isLineInPoly(e,t){if(!doBBoxOverlap(bbox(t),bbox(e)))return!1;for(var i=!1,n=0;n<e.coordinates.length;n++){if(!booleanPointInPolygon(e.coordinates[n],t))return!1;if(i||(i=booleanPointInPolygon(e.coordinates[n],t,{ignoreBoundary:!0})),!i&&n<e.coordinates.length-1)i=booleanPointInPolygon(getMidpoint(e.coordinates[n],e.coordinates[n+1]),t,{ignoreBoundary:!0})}return i}function isPolyInPoly(e,t){var i=bbox(e);if(!doBBoxOverlap(bbox(t),i))return!1;for(var n=0;n<e.coordinates[0].length;n++)if(!booleanPointInPolygon(e.coordinates[0][n],t))return!1;return!0}function doBBoxOverlap(e,t){return!(e[0]>t[0])&&(!(e[2]<t[2])&&(!(e[1]>t[1])&&!(e[3]<t[3])))}function compareCoords(e,t){return e[0]===t[0]&&e[1]===t[1]}function getMidpoint(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}function centroid(e,t={}){let i=0,n=0,r=0;return coordEach(e,function(e){i+=e[0],n+=e[1],r++},!0),point([i/r,n/r],t.properties)}function circle(e,t,i={}){const n=i.steps||64,r=i.properties?i.properties:!Array.isArray(e)&&"Feature"===e.type&&e.properties?e.properties:{},o=[];for(let r=0;r<n;r++)o.push(destination(e,t,-360*r/n,i).geometry.coordinates);return o.push(o[0]),polygon([o],r)}function envelope(e){return bboxPolygon(bbox(e))}function pointGrid(e,t,i={}){i.mask&&!i.units&&(i.units="kilometers");for(var n=[],r=e[0],o=e[1],a=e[2],s=e[3],c=t/distance([r,o],[a,o],i)*(a-r),l=t/distance([r,o],[r,s],i)*(s-o),d=a-r,u=s-o,h=Math.floor(d/c),p=(u-Math.floor(u/l)*l)/2,A=r+(d-h*c)/2;A<=a;){for(var m=o+p;m<=s;){var f=point([A,m],i.properties);i.mask?booleanWithin(f,i.mask)&&n.push(f):n.push(f),m+=l}A+=c}return featureCollection(n)}function lineArc(e,t,i,n,r={}){const o=r.steps||64,a=convertAngleTo360(i),s=convertAngleTo360(n),c=Array.isArray(e)||"Feature"!==e.type?{}:e.properties;if(a===s)return lineString(circle(e,t,r).geometry.coordinates[0],c);const l=a,d=a<s?s:s+360;let u=l;const h=[];let p=0;const A=(d-l)/o;for(;u<=d;)h.push(destination(e,t,u,r).geometry.coordinates),p++,u=l+p*A;return lineString(h,c)}function convertAngleTo360(e){let t=e%360;return t<0&&(t+=360),t}function pointsWithinPolygon(e,t){const i=[];return featureEach(e,function(e){let n=!1;if("Point"===e.geometry.type)geomEach(t,function(t){booleanPointInPolygon(e,t)&&(n=!0)}),n&&i.push(e);else{if("MultiPoint"!==e.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var r=[];geomEach(t,function(t){coordEach(e,function(e){booleanPointInPolygon(e,t)&&(n=!0,r.push(e))})}),n&&i.push(multiPoint(r,e.properties))}}),featureCollection(i)}const calcSpaceDistance=(e,t)=>{const i=Cartographic.fromCartesian(e),n=Cartographic.fromCartesian(t),r=new EllipsoidGeodesic;r.setEndPoints(i,n);let o=r.surfaceDistance;return o=Math.sqrt(o**2+(n.height-i.height)**2),o};function calcSpaceDistances(e){let t=0;return e.forEach((i,n)=>{if(n===e.length-1)return;const r=calcSpaceDistance(i,e[n+1]);t+=r}),t}function calcGeodesicDistance(e,t,i){const{EllipsoidGeodesic:n,Ellipsoid:r}=Cesium;return new n((i=i||r.WGS84).cartesianToCartographic(e),i.cartesianToCartographic(t)).surfaceDistance}function calcGeodesicDistances(e){let t=0;return e.forEach((i,n)=>{if(n===e.length-1)return;const r=calcGeodesicDistance(i,e[n+1]);t+=r}),t}const calcPoistionCenter=e=>{if(e.length<4)return BoundingSphere.fromPoints(e).center;const t=polygon([e.map(e=>[e.x,e.y])]),i=BoundingSphere.fromPoints(e).center,n=centroid(t);return new Cartesian3$1(n.geometry.coordinates[0],n.geometry.coordinates[1],i.z)};function calcArea(e){let t=0;const{CoplanarPolygonGeometry:i,VertexFormat:n,defined:r,Cartesian3:o}=Cesium,a=i.createGeometry(i.fromPositions({positions:e,vertexFormat:n.POSITION_ONLY}));if(r(a)){const e=a.indices,i=a.attributes.position.values;for(let n=0;n<e.length;n+=3){const r=e[n],a=e[n+1],s=e[n+2];t+=calcTriangleArea(o.unpack(i,3*r,{}),o.unpack(i,3*a,{}),o.unpack(i,3*s,{}))}}return t}const calcTriangleArea=(e,t,i)=>{const{Cartesian3:n}=Cesium,r=n.subtract(e,t,{}),o=n.subtract(i,t,{}),a=n.cross(r,o,r);return.5*n.magnitude(a)},calcTerrainHeightFromPositions=async(e,t)=>{const i=t.map(e=>Cartographic.fromCartesian(e));return await sampleTerrainMostDetailed(e,i)},calcSceneHeightFromPositions=async(e,t)=>await e.scene.clampToHeightMostDetailed(t),clacPositionsForParabola=(e,t,i,n)=>{const r=[],o=Cartographic.fromCartesian(e),a=Cartographic.fromCartesian(t),s=180*o.longitude/Math.PI,c=180*o.latitude/Math.PI,l=180*a.longitude/Math.PI,d=180*a.latitude/Math.PI,u=Math.sqrt((s-l)*(s-l)+(c-d)*(c-d))*i,h=Cartesian3$1.clone(e),p=Cartesian3$1.clone(t),A=Cartesian3$1.distance(h,Cartesian3$1.ZERO),m=Cartesian3$1.distance(p,Cartesian3$1.ZERO);if(Cartesian3$1.normalize(h,h),Cartesian3$1.normalize(p,p),!Cartesian3$1.distance(h,p))return r;const f=Cartesian3$1.angleBetween(h,p);r.push(e);for(let e=1;e<n-1;e++){const t=1*e/(n-1),i=1-t,o=Math.sin(i*f)/Math.sin(f),a=Math.sin(t*f)/Math.sin(f),s=Cartesian3$1.multiplyByScalar(h,o,new Cartesian3$1),c=Cartesian3$1.multiplyByScalar(p,a,new Cartesian3$1);let l=Cartesian3$1.add(s,c,new Cartesian3$1);const d=t*Math.PI,g=A*i+m*t+Math.sin(d)*u;l=Cartesian3$1.multiplyByScalar(l,g,l),r.push(l)}return r.push(t),r},calcZoomFromCameraHeight=e=>{const t=e.positionCartographic.height,i=-40467.74;return Math.round(i+80955.31/(1+(t/91610.74)**7096758e-11))},calcCameraHeightFromZoom=e=>e,calcLerpPosition=(e,t)=>{const i=[];let n=0,r=0,o=0;const a=[];for(let t=0;t<e.length-1;++t)n+=Cartesian3$1.distance(e[t],e[t+1]);for(let t=0;t<e.length;t++)0===t?r=0:(o+=Cartesian3$1.distance(e[t-1],e[t]),r=o/n),i.push(r);const s=new LinearSpline({times:i,points:e});for(let e=0;e<=t;e++){const i=s.evaluate(e/t);a.push(i)}return a},calcBoundingSphereFromPositions=e=>{const t=new BoundingSphere(Cartesian3$1.ZERO,0);return BoundingSphere.fromPoints(e,t),t};class BasePrimitive{_primitive;_promise;appearance;geometryInstance;drawCommand;shapePositions;needUpdate=!1;constructor(){this._primitive=void 0,this.appearance=void 0,this.geometryInstance=void 0,this._promise=null,this.drawCommand=null,this.needUpdate=!1,this.shapePositions=[]}update(e){const t=this.getPrimitive();if(t){this._primitive=t;this._primitive.update(e)}}then(e=null){return this._promise?.then(e)}catch(e=null){return this._promise?.catch(e)}isDestroyed(){return!!this._primitive}destroy(){this._primitive=void 0}setShapePositions(e){this.shapePositions=e}}class BaseMaterialProperty{_definitionChanged=new Event$1;get definitionChanged(){return this._definitionChanged}get isConstant(){return!1}}const BoxGeometry=BoxGeometry$1,Cartesian3=Cartesian3$1,defaultValue=void 0,defined=defined$1,destroyObject=destroyObject$1,DeveloperError=DeveloperError$1,GeometryPipeline=GeometryPipeline$1,Matrix3=Matrix3$1,Matrix4=Matrix4$1,Transforms$1=Transforms$2,VertexFormat=VertexFormat$1,BufferUsage=BufferUsage$2,CubeMap=CubeMap$1,DrawCommand=DrawCommand$1,loadCubeMap=loadCubeMap$1,RenderState=RenderState$1,VertexArray=VertexArray$1,BlendingState=BlendingState$2,SceneMode=SceneMode$2,ShaderProgram=ShaderProgram$1,ShaderSource=ShaderSource$1,skyboxMatrix3=new Matrix3;class SkyBoxOnGround{constructor(e){defined$1(Matrix4$1.getRotation)||(Matrix4$1.getRotation=Matrix4$1.getMatrix3),this.sources=e.sources,this._sources=void 0,this.show=defaultValue(e.show,!0),this._command=new DrawCommand({modelMatrix:Matrix4.clone(Matrix4.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}update(e,t){const i=this;if(!this.show)return;if(e.mode!==SceneMode.SCENE3D&&e.mode!==SceneMode.MORPHING)return;if(!e.passes.render)return;const n=e.context;if(this._sources!==this.sources){this._sources=this.sources;const e=this.sources;if(!(defined(e.positiveX)&&defined(e.negativeX)&&defined(e.positiveY)&&defined(e.negativeY)&&defined(e.positiveZ)&&defined(e.negativeZ)))throw new DeveloperError("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof e.positiveX!=typeof e.negativeX||typeof e.positiveX!=typeof e.positiveY||typeof e.positiveX!=typeof e.negativeY||typeof e.positiveX!=typeof e.positiveZ||typeof e.positiveX!=typeof e.negativeZ)throw new DeveloperError("this.sources properties must all be the same type.");"string"==typeof e.positiveX?loadCubeMap(n,this._sources).then(e=>{i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new CubeMap({context:n,source:e}))}const r=this._command;if(r.modelMatrix=Transforms$1.eastNorthUpToFixedFrame(e.camera._positionWC),!defined(r.vertexArray)){r.uniformMap={u_cubeMap:()=>i._cubeMap,u_rotateMatrix:()=>Matrix4.getRotation(r.modelMatrix,skyboxMatrix3)};const e=BoxGeometry.createGeometry(BoxGeometry.fromDimensions({dimensions:new Cartesian3(2,2,2),vertexFormat:VertexFormat.POSITION_ONLY})),t=this._attributeLocations=GeometryPipeline.createAttributeLocations(e);r.vertexArray=VertexArray.fromGeometry({context:n,geometry:e,attributeLocations:t,bufferUsage:BufferUsage._DRAW}),r.renderState=RenderState.fromCache({blending:BlendingState.ALPHA_BLEND})}if(!defined(r.shaderProgram)||this._useHdr!==t){const e=new ShaderSource({defines:[t?"HDR":""],sources:["precision highp float;\n\nuniform samplerCube u_cubeMap;\nin vec3 v_texCoord;\nout vec4 fragColor;\n\nvoid main() {\n vec4 color = texture(u_cubeMap, normalize(v_texCoord));\n fragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n}"]});r.shaderProgram=ShaderProgram.fromCache({context:n,vertexShaderSource:"#version 300 es\n\nprecision highp float;\n\nin vec3 position;\nout vec3 v_texCoord;\n\nuniform mat3 u_rotateMatrix;\n\nvoid main() {\n vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position;\n}\n",fragmentShaderSource:e,attributeLocations:this._attributeLocations}),this._useHdr=t}return defined(this._cubeMap)?r:void 0}isDestroyed(){return!1}destroy(){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(),destroyObject(this)}}const createSkyBox=e=>{const{viewer:t,sources:i}=e;return t.scene.skyBox=new SkyBox({sources:i}),t.scene.skyBox},createSkyBoxOnGround=e=>{let{viewer:t,sources:i}=e;const n=e.height?e.height:225705,r=t.scene.skyBox,o=t.scene.skyAtmosphere.show;i||(i={positiveX:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/px.jpg`,negativeX:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/nx.jpg`,positiveY:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/py.jpg`,negativeY:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/ny.jpg`,positiveZ:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/pz.jpg`,negativeZ:`${getInoCesiumBaseUrl()}/assets/images/ground-skybox/nz.jpg`});const a=new SkyBoxOnGround({sources:i});t.scene.postRender.addEventListener(()=>{const e=t.camera.position;Cartographic.fromCartesian(e).height<n?(t.scene.skyBox=a,t.scene.skyAtmosphere.show=!1):(t.scene.skyBox=r,t.scene.skyAtmosphere.show=o)})},createRoamHandler=e=>{const t=[];let i,n;e.clock.shouldAnimate=!0;const r={},o=(t,r)=>{if(a(),t.entity.cylinder){const i=t.entity.cylinder;i.roamId=t.id,t.entity.cylinder=void 0,n=e.entities.add({position:t.property,cylinder:i})}e.trackedEntity=t.entity,r&&(i=t)},a=()=>{if(n){e.entities.remove(n);const i=t.find(e=>e.id===n.cylinder.roamId);i&&(i.entity.cylinder=n.cylinder),n=void 0}},s=()=>{e.trackedEntity=void 0,i=void 0,a()},c=i=>{e.trackedEntity?.id===i.entity.id&&s(),e.entities.remove(i.entity);const n=t.findIndex(e=>e.id===i.id);n>-1&&t.splice(n,1)},l=(e,t)=>{const i=e.property.getValue(t);if(i&&(e.status="ROAMING",p.roaming&&p.roaming(e,{time:t,position:i})),e.stopTime.secondsOfDay<t.secondsOfDay&&"END"!==e.status&&(e.status="END",p.end&&p.end(e),e.loop?d(e):s()),e.flyParams.hpr){const n=r[e.id].find(e=>e.time>t.secondsOfDay);n&&h(e,n,i)}},d=t=>{const{property:i,startTime:n,stopTime:r}=u(t);t.stopTime=r,t.startTime=n,t.property=i,t.flyParams.hpr||(t.entity.orientation=new VelocityOrientationProperty(i)),t.entity.position=i,t.status="START",e.clock.currentTime=n,e.clock.multiplier=1,p.reStart&&p.reStart(t)},u=e=>{const t=[],{positions:i,flyParams:n}=e,o=new SampledPositionProperty;let a=0;const s=JulianDate.now();let c=s.clone();return i.forEach((e,r)=>{let l=JulianDate.now();if(r){let t=0;if(n.speed){t=Cartesian3$1.distance(e,i[r-1])/(1e3*n.speed/3600)}n.times&&(t=(n.times[r]-n.times[r-1])/1e3),a+=t,l=JulianDate.addSeconds(s,a,new JulianDate)}else l=s;c=l,o.addSample(l,e),n.hpr&&t.push({time:l.secondsOfDay,heading:n.hpr[r].heading,pitch:n.hpr[r].pitch,roll:n.hpr[r].roll})}),r[e.id]=t,{property:o,startTime:s,stopTime:c}},h=(e,t,i)=>{if(!i)return;const{heading:n,pitch:r,roll:o}=t,a=new HeadingPitchRoll(n,r,o);e.entity.orientation=Transforms.headingPitchRollQuaternion(i,a)};e.scene.preRender.addEventListener((n,r)=>{if(t.forEach(e=>{l(e,r)}),!i)return;const o=i.entity.computeModelMatrix(e.clock.currentTime);o&&e.camera.lookAtTransform(o,new Cartesian3$1(...[-20,0,5]))});const p={};return{set:i=>{const{entity:n}=i;i.id=numberId(),e.entities.add(n);const{property:r,startTime:o,stopTime:a}=u(i);i.flyParams.hpr||(n.orientation=new VelocityOrientationProperty(r)),n.position=r;const s={...i,startTime:o,stopTime:a,property:r,status:"START"};return e.clock.currentTime=o,e.clock.multiplier=1,t.push(s),s.status="START",p.start&&p.start(s),s},tracked:o,stopTracked:s,remove:c,frameRoam:l,trackedByEntityId:(e,i)=>{const n=t.find(t=>t.entity.id===e);n&&o(n,i)},removeAll:()=>{t.forEach(e=>{c(e)}),t.length=0},Event:p,lockCameraView:e=>{i=e},updateRoamAttitude:(e,t)=>{"UP"!==t&&"DOWN"!==t||(e.entity.orientation=void 0),"front"!==t&&"back"!==t||(e.entity.orientation=new VelocityOrientationProperty(e.property))}}};var FlyAttitude=(e=>(e.UP="UP",e.DOWN="DOWN",e.LEFT="left",e.RIGHT="right",e.FRONT="front",e.BACK="back",e))(FlyAttitude||{}),RoamStatus=(e=>(e.END="END",e.START="START",e.ROAMING="ROAMING",e))(RoamStatus||{});let barWidth=100,distanceLabel="",lastCameraHeight="0";const createBottomStatusBar=e=>{const{viewer:t}=e,i=document.createElement("div");i.className="bottom-status-bar";const n=document.createElement("div");n.className="scale-bar",n.innerHTML="";const r=document.createElement("div");r.className="scale-label",r.innerHTML="",n.appendChild(r),i.appendChild(n);const o=document.createElement("div");o.id="bottom-status-bar-camera",e.clickCopy&&(o.style.pointerEvents="auto",o.style.cursor="pointer"),i.appendChild(o),o.style.display="flex";const a=document.createElement("div"),s=document.createElement("div"),c=t._element.getElementsByClassName("cesium-widget")[0];if(!c)throw new Error("The cesium-widget element has not finished loading yet, so the popup cannot be created!");c.appendChild(i),initCesiumEvent(t,{MOVE_POSITION(i){o.innerHTML=`\n 经度:${i.lnglat.lng.toFixed(6)} \n 纬度:${i.lnglat.lat.toFixed(6)} \n 高程:${i.lnglat.height.toFixed(2)} \n `,e.clickCopy&&getCameraView(t),o.appendChild(s),o.appendChild(a)}}),e.clickCopy&&document.addEventListener("click",e=>{e.target.id});let l=Date.now(),d=0;const u=()=>{requestAnimationFrame(()=>{if(d+=1,d>=30){const e=Date.now(),t=e-l,i=Math.round(1e3/(t/d));l=e,d=0,a.innerHTML=`${i} FPS`}e.hpr?s.innerHTML=`\n 方位角:${CesiumMath.toDegrees(t.camera.heading).toFixed(1)}° \n 俯仰角:${CesiumMath.toDegrees(t.camera.pitch).toFixed(1)}° \n 翻滚角:${CesiumMath.toDegrees(t.camera.roll).toFixed(1)}° \n `:s.innerHTML="",s.innerHTML+=`\n 视高:${t.camera.positionCartographic.height.toFixed(0)}m \n `;const i=cesiumScale(t);r.innerHTML=`${i.distanceLabel}`,u()})};u()},cesiumScale=e=>{const t=e.camera.positionCartographic.height.toFixed(0);if(t===lastCameraHeight)return{barWidth:barWidth,distanceLabel:distanceLabel};lastCameraHeight=t;const i=new EllipsoidGeodesic,n=[1,2,3,5,10,20,30,50,100,200,300,500,1e3,2e3,3e3,5e3,1e4,2e4,3e4,5e4,1e5,2e5,3e5,5e5,1e6,2e6,3e6,5e6,1e7,2e7,3e7,5e7],r=e.scene,o=r.canvas.clientWidth,a=r.canvas.clientHeight,s=r.camera.getPickRay(new Cartesian2(o/2|0,a-1)),c=r.camera.getPickRay(new Cartesian2(1+o/2|0,a-1)),l=r.globe,d=l.pick(s,r),u=l.pick(c,r);if(!defined$1(d)||!defined$1(u))return{barWidth:barWidth,distanceLabel:distanceLabel};const h=l.ellipsoid.cartesianToCartographic(d),p=l.ellipsoid.cartesianToCartographic(u);i.setEndPoints(h,p);const A=i.surfaceDistance;let m;for(let e=n.length-1;!defined$1(m)&&e>=0;--e)n[e]/A<100&&(m=n[e]);if(defined$1(m)){const e=m>=1e3?`${(m/1e3).toString()} km`:`${m.toString()} m`;barWidth=m/A|0,distanceLabel=e}else barWidth=0,distanceLabel="1 m";return{barWidth:barWidth,distanceLabel:distanceLabel}},createOpenAnim=e=>new Promise(t=>{const{viewer:i,center:n}=e;let r=n.lng,o=1,a=null;const s=e=>{null===a&&(a=e);r-=(e-a)/2e4*2,r<-180&&(r=180,o+=1),2===o&&r>n.lng?i.camera.flyTo({destination:Cartesian3$1.fromDegrees(n.lng,n.lat,3e7),duration:2,orientation:{heading:CesiumMath.toRadians(360),pitch:CesiumMath.toRadians(-90),roll:0},easingFunction:EasingFunction$1.LINEAR_NONE,complete:()=>{i.camera.flyTo({destination:Cartesian3$1.fromDegrees(n.lng,n.lat,n.height),duration:3,orientation:{heading:CesiumMath.toRadians(2.8),pitch:CesiumMath.toRadians(-90),roll:6.282253919167732},complete:()=>{t(!0)}})}}):(i.camera.setView({destination:Cartesian3$1.fromDegrees(r,n.lat,3e7),orientation:{heading:CesiumMath.toRadians(360),pitch:CesiumMath.toRadians(-90),roll:0}}),requestAnimationFrame(s))};requestAnimationFrame(s)}),makeGridToInstanceForBox=(e,t,i)=>{const n=new Float64Array(24);for(let t=0;t<8;t++)n[3*t]=e[t].x,n[3*t+1]=e[t].y,n[3*t+2]=e[t].z;return new GeometryInstance({geometry:new Geometry({indices:new Uint16Array([0,1,2,0,2,3,4,6,5,4,7,6,0,4,1,1,4,5,1,5,2,2,5,6,2,6,3,3,6,7,3,7,0,0,7,4]),attributes:{position:new GeometryAttribute({componentDatatype:ComponentDatatype$1.DOUBLE,componentsPerAttribute:3,values:n})},primitiveType:PrimitiveType$1.TRIANGLES,boundingSphere:BoundingSphere.fromVertices(n)}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(t)},id:`${i}`})},makeGridToInstanceForLine=(e,t,i)=>{const[n,r,o,a,s,c,l,d]=e;return new GeometryInstance({geometry:new PolylineGeometry({positions:[n,r,r,o,o,a,a,n,s,c,c,l,l,d,d,s,n,s,s,c,c,r,r,n,a,d,d,l,l,o,o,a,n,a,a,d,d,s,s,n,r,c,c,l,l,o,o,r],width:2,vertexFormat:PolylineColorAppearance.VERTEX_FORMAT}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(t)},id:`${i}`})},makeGridFromElevationExtrema=(e,t)=>[Cartesian3$1.fromDegrees(e.longitude,e.latitude,t.height),Cartesian3$1.fromDegrees(e.longitude,t.latitude,t.height),Cartesian3$1.fromDegrees(t.longitude,t.latitude,t.height),Cartesian3$1.fromDegrees(t.longitude,e.latitude,t.height),Cartesian3$1.fromDegrees(e.longitude,e.latitude,e.height),Cartesian3$1.fromDegrees(e.longitude,t.latitude,e.height),Cartesian3$1.fromDegrees(t.longitude,t.latitude,e.height),Cartesian3$1.fromDegrees(t.longitude,e.latitude,e.height)],mekeGridPolygonAndHeight=(e,t,i,n,r,o)=>[Cartesian3$1.fromDegrees(e,e,r),Cartesian3$1.fromDegrees(t,t,r),Cartesian3$1.fromDegrees(i,i,r),Cartesian3$1.fromDegrees(n,n,r),Cartesian3$1.fromDegrees(e,e,o),Cartesian3$1.fromDegrees(t,t,o),Cartesian3$1.fromDegrees(i,i,o),Cartesian3$1.fromDegrees(n,n,o)],x_PI=3e3*Math.PI/180,PI=Math.PI,a=6378245,ee=.006693421622965943,outOfChina=(e,t)=>!(e>72.004&&e<137.8347&&t>.8293&&t<55.8271),transformlat=(e,t)=>{let i=2*e-100+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return i+=2*(20*Math.sin(6*e*PI)+20*Math.sin(2*e*PI))/3,i+=2*(20*Math.sin(t*PI)+40*Math.sin(t/3*PI))/3,i+=2*(160*Math.sin(t/12*PI)+320*Math.sin(t*PI/30))/3,i},transformlng=(e,t)=>{let i=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return i+=2*(20*Math.sin(6*e*PI)+20*Math.sin(2*e*PI))/3,i+=2*(20*Math.sin(e*PI)+40*Math.sin(e/3*PI))/3,i+=2*(150*Math.sin(e/12*PI)+300*Math.sin(e/30*PI))/3,i},wgs84togcj02=(e,t)=>{if(outOfChina(e,t))return[e,t];let i=transformlat(e-105,t-35),n=transformlng(e-105,t-35);const r=t/180*PI;let o=Math.sin(r);o=1-ee*o*o;const s=Math.sqrt(o);i=180*i/(a*(1-ee)/(o*s)*PI),n=180*n/(a/s*Math.cos(r)*PI);return[e+n,t+i]},gcj02towgs84=(e,t)=>{if(outOfChina(e,t))return[e,t];let i=transformlat(e-105,t-35),n=transformlng(e-105,t-35);const r=t/180*PI;let o=Math.sin(r);o=1-ee*o*o;const s=Math.sqrt(o);i=180*i/(a*(1-ee)/(o*s)*PI),n=180*n/(a/s*Math.cos(r)*PI);return[2*e-(e+n),2*t-(t+i)]},gcj02tobd09=(e,t)=>{const i=e,n=t,r=Math.sqrt(i*i+n*n)+2e-5*Math.sin(n*x_PI),o=Math.atan2(n,i)+3e-6*Math.cos(i*x_PI);return[r*Math.cos(o)+.0065,r*Math.sin(o)+.006]},bd09togcj02=(e,t)=>{const i=e-.0065,n=t-.006,r=Math.sqrt(i*i+n*n)-2e-5*Math.sin(n*x_PI),o=Math.atan2(n,i)-3e-6*Math.cos(i*x_PI);return[r*Math.cos(o),r*Math.sin(o)]},bd09towgs84=(e,t)=>{const[i,n]=bd09togcj02(e,t);return gcj02towgs84(i,n)},wgs84tobd09=(e,t)=>{const[i,n]=wgs84togcj02(e,t);return gcj02tobd09(i,n)};class CoordinateTransformer{static wgs84ToGcj02(e){const[t,i]=wgs84togcj02(e.lng,e.lat);return{lng:t,lat:i}}static gcj02ToWgs84(e){const[t,i]=gcj02towgs84(e.lng,e.lat);return{lng:t,lat:i}}static gcj02ToBd09(e){const[t,i]=gcj02tobd09(e.lng,e.lat);return{lng:t,lat:i}}static bd09ToGcj02(e){const[t,i]=bd09togcj02(e.lng,e.lat);return{lng:t,lat:i}}static bd09ToWgs84(e){const[t,i]=bd09towgs84(e.lng,e.lat);return{lng:t,lat:i}}static wgs84ToBd09(e){const[t,i]=wgs84tobd09(e.lng,e.lat);return{lng:t,lat:i}}}let eventHandler;const pickPoint=e=>new Promise(t=>{document.body.style.cursor="pointer",e._element.style.cursor="pointer",eventHandler||(eventHandler=new ScreenSpaceEventHandler(e.scene.canvas)),eventHandler.setInputAction(async i=>{const n=e.scene.pickPosition(i.position);await e.scene.clampToHeightMostDetailed([n]);const r=makePositiontoLnglat(n);e._element.style.cursor="default",eventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_CLICK),t({position:n,lnglat:r})},ScreenSpaceEventType$1.LEFT_CLICK)}),getFeaturesFromTileContent=(e,t)=>{const i={},n=t.getFeature(e);return n?getFeaturesFromTileFeature(n):i},getFeaturesFromTileFeature=e=>{const t={};return e.getPropertyIds().forEach(i=>{t[i]=e.getProperty(i)}),t},loadTianDiTu=e=>{const{viewer:t,token:i}=e,n=e.vec?"vec":"img",r=[],o=t.imageryLayers.addImageryProvider(new WebMapTileServiceImageryProvider({url:`//t{s}.tianditu.gov.cn/${n}_w/wmts?tk=${i}`,layer:n,style:"default",tileMatrixSetID:"w",format:"tiles",maximumLevel:18,subdomains:["0","1","2","3","4","5","6","7"]}));if(r.push(o),e.label){const e=t.imageryLayers.addImageryProvider(new WebMapTileServiceImageryProvider({url:`//t{s}.tianditu.gov.cn/cia_w/wmts?tk=${i}`,layer:"cia",style:"default",tileMatrixSetID:"w",format:"tiles",maximumLevel:18,subdomains:["0","1","2","3","4","5","6","7"]}));r.push(e)}return{layers:r,remove:()=>{r.forEach(e=>{t.imageryLayers.remove(e)})},setOpacity:e=>{r.forEach(t=>{t.alpha=e})}}};function setImageLayerTheme(e,t){t||(t={}),console.log(t.filterColor);const i=e.imageryLayers.get(0);if(!i)return;i.brightness=t.brightness??.6,i.contrast=t.contrast??1.8,i.gamma=t.gamma??.3,i.hue=t.hue??1,i.saturation=t.saturation||0;const n=e.scene.globe._surfaceShaderSet.baseFragmentShaderSource.sources;for(let e=0;e<n.length;e++){const i="color = czm_saturation(color, textureSaturation);\n#endif\n";let r="color = czm_saturation(color, textureSaturation);\n#endif\n";t.invertColor||(r+="\n color.r = 1.0 - color.r;\n color.g = 1.0 - color.g;\n color.b = 1.0 - color.b;\n "),t.filterColor||(t.filterColor=Color.fromCssColorString("rgba(100,138,230,0.5)")),r+=`\n color.r = color.r * ${t.filterColor.red.toFixed(2)};\n color.g = color.g * ${t.filterColor.green.toFixed(2)};\n color.b = color.b * ${t.filterColor.blue.toFixed(2)};\n // color.a = color.a * ${t.filterColor.alpha.toFixed(2)};\n `,n[e]=n[e].replace(i,r)}e.scene.requestRender()}const defaultOptions$c={cacheBytes:4294967296,maximumCacheOverflowBytes:5368709120},load3dTiles=async e=>{const{viewer:t,url:i,options:n}=e,r=await Cesium3DTileset.fromUrl(i,{...defaultOptions$c,...n});t.scene.primitives.add(r);return{tileset:r,setHeightOffset:e=>{setHeightOffsetFor3dTiles(r,e)},remove:()=>{t.scene.primitives.remove(r)},flyTo:()=>{t.flyTo(r)}}},setHeightOffsetFor3dTiles=(e,t)=>{setTranslateFor3dTiles(e,Cartesian3$1.fromElements(0,0,t,new Cartesian3$1))},getAllFeaturesFrom3dTiles=async e=>{const t=[];function i(e){if(console.log(e),!e.content||!e.content.featuresLength)return;const n=e.content;for(let e=0;e<n.featuresLength;e++)t.push(n.getFeature(e));e.children?.forEach(i)}return new Promise(n=>{e.allTilesLoaded.addEventListener(()=>{i(e.root),n(t)})})},getAllTilesFrom3dTiles=e=>{const t=[];function i(e){t.push(e),e.children?.forEach(i)}return new Promise(n=>{e.allTilesLoaded.addEventListener(()=>{i(e.root),n(t)})})},setTranslateFor3dTiles=(e,t)=>{if(t.equals(Cartesian3$1.ZERO))return;const i=e.boundingSphere.center,n=Transforms$2.eastNorthUpToFixedFrame(i),r=Matrix4$1.multiplyByPoint(n,t,new Cartesian3$1),o=Cartesian3$1.subtract(r,i,new Cartesian3$1),a=Matrix4$1.fromTranslation(o);e.modelMatrix=Matrix4$1.multiply(a,e.modelMatrix,new Matrix4$1)},serScaleFor3dTiles=(e,t)=>{if(t.equals(Cartesian3$1.ZERO)||t.equals(Cartesian3$1.ONE))return;const i=e.boundingSphere.center,n=Transforms$2.eastNorthUpToFixedFrame(i),r=Matrix4$1.inverse(n,new Matrix4$1),o=Matrix4$1.fromScale(t),a=Matrix4$1.multiply(o,r,new Matrix4$1),s=Matrix4$1.multiply(n,a,new Matrix4$1);e.modelMatrix=Matrix4$1.multiply(s,e.modelMatrix,new Matrix4$1)},setRotateFor3dTiles=(e,t)=>{const{x:i,y:n,z:r}=t,o=e.boundingSphere.center,a=Transforms$2.eastNorthUpToFixedFrame(o),s=Matrix4$1.inverse(a,new Matrix4$1),c=Matrix4$1.clone(Matrix4$1.IDENTITY);if(0!==i){const e=Matrix4$1.fromRotation(Matrix3$1.fromRotationX(CesiumMath.toRadians(i)));Matrix4$1.multiply(e,c,c)}if(0!==n){const e=Matrix4$1.fromRotation(Matrix3$1.fromRotationY(CesiumMath.toRadians(n)));Matrix4$1.multiply(e,c,c)}if(0!==r){const e=Matrix4$1.fromRotation(Matrix3$1.fromRotationZ(CesiumMath.toRadians(r)));Matrix4$1.multiply(e,c,c)}const l=Matrix4$1.multiply(c,s,new Matrix4$1),d=Matrix4$1.multiply(a,l,new Matrix4$1);e.modelMatrix=Matrix4$1.multiply(d,e.modelMatrix,new Matrix4$1)},TransformsFor3dtiles={translate:setTranslateFor3dTiles,scale:serScaleFor3dTiles,rotate:setRotateFor3dTiles},loadTerrain=async e=>{const{viewer:t,url:i}=e,n=await CesiumTerrainProvider.fromUrl(i,{requestWaterMask:!0,requestVertexNormals:!0});t.scene.terrainProvider=n;return{terrainProvider:n,remove:()=>{t.scene.terrainProvider=new EllipsoidTerrainProvider}}},removeTerrain=e=>{e.scene.terrainProvider=new EllipsoidTerrainProvider},loadTerrainFromCesium=async()=>await CesiumTerrainProvider.fromIonAssetId(1,{requestWaterMask:!0,requestVertexNormals:!0}),loadModel=()=>{},loads3m=()=>{},loadI3s=async e=>{const{viewer:t,url:i,options:n}=e,r=await I3SDataProvider.fromUrl(i,n);t.scene.primitives.add(r);return{i3sProvider:r,setHeightOffset:e=>{r.layers.forEach(t=>{const i=t.tileset;i&&setHeightOffsetFor3dTiles(i,e)})},remove:()=>{t.scene.primitives.remove(r)},flyTo:e=>{const i=Rectangle.center(r.extent);i.height=e;let n=r.data;defined$1(n.layers)&&n.layers.length>0&&(n=n.layers[0]),defined$1(n.fullExtent)&&defined$1(n.fullExtent.zmax)&&(i.height+=n.fullExtent.zmax);const o=Ellipsoid.WGS84.cartographicToCartesian(i);t.camera.flyTo({destination:o,orientation:{}})}}},fragmentShaderSource$8="\n uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n uniform vec4 highlight;\n void main() {\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (czm_selected()) {\n vec3 highlighted = highlight.a * highlight.rgb + (1.0 - highlight.a) * color.rgb;\n out_FragColor = mix(color, vec4(highlighted,0.5), 0.3);\n } else {\n out_FragColor = color;\n }\n }\n ",createHighLightStage=(e,t=Color.YELLOW)=>{const i=e.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$8,uniforms:{highlight:()=>t}}));i.selected=[];return{stage:i,remove:()=>{e.scene.postProcessStages.remove(i)}}},fragmentShaderText="\n uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n in vec2 v_textureCoordinates;\n void main() { float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (depth < 1.0 - 0.000001) {\n out_FragColor = color;\n } else {\n out_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n }\n }",mixFragmentShaderText="\n uniform sampler2D colorTexture;\n uniform sampler2D redTexture;\n uniform sampler2D silhouetteTexture;\n in vec2 v_textureCoordinates;\n\n void main() {\n vec4 redColor = texture(redTexture, v_textureCoordinates);\n vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);\n vec4 color = texture(colorTexture, v_textureCoordinates);\n if (redColor.r == 1.0) {\n out_FragColor = mix(color, vec4(5.0, 0.0, 0.0, 1.0), silhouetteColor.a);\n } else {\n out_FragColor = color;\n }\n }",createSkylineStage=e=>{const t=PostProcessStageLibrary.createEdgeDetectionStage(),i=new PostProcessStage({name:"skyline",fragmentShader:fragmentShaderText}),n=new PostProcessStageComposite({stages:[t,i,new PostProcessStage({name:"mix",fragmentShader:mixFragmentShaderText,uniforms:{redTexture:i.name,silhouetteTexture:t.name}})],inputPreviousStageTexture:!1,uniforms:t.uniforms});e.scene.postProcessStages.add(n);return{stage:n,remove:()=>{e.scene.postProcessStages.remove(n)}}},createOutlineStage=(e,t=Color.YELLOW)=>{const i=e.scene.postProcessStages,n=PostProcessStageLibrary.createEdgeDetectionStage();n.uniforms.color=t,n.uniforms.length=1,n.selected=[];const r=PostProcessStageLibrary.createEdgeDetectionStage();r.uniforms.color=t,r.selected=[];const o=i.add(PostProcessStageLibrary.createSilhouetteStage([n,r]));o.selected=[];return{stage:o,remove:()=>{e.scene.postProcessStages.remove(o)}}},fragmentShaderSource$7="\n vec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth)\n {\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\n return eyeCoordinate.xyz / eyeCoordinate.w;\n }\n vec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset, sampler2D depthMap) {\n vec2 glFragCoordXY = gl_FragCoord.xy;\n float upOrRightLogDepth = czm_unpackDepth(texture(depthMap, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\n float downOrLeftLogDepth = czm_unpackDepth(texture(depthMap, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\n bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\n\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 uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n uniform float intensity;\n in vec2 v_textureCoordinates;\n void main(void)\n {\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n\n float logDepthOrDepth = czm_unpackDepth(texture(depthTexture, v_textureCoordinates));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0), depthTexture);\n vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0), depthTexture);\n vec3 normalEC = normalize(cross(leftRight, downUp));\n vec3 normalMC = normalize((czm_inverseView * vec4(normalEC, 0.0)).xyz);\n vec3 ellipsoidNormal = normalize(worldCoordinate);\n float dotProd = dot(ellipsoidNormal, normalMC);\n if(dotProd < 0.3){\n out_FragColor = sceneColor;\n } else {\n out_FragColor = mix(sceneColor, vec4(1.0), dotProd * intensity);\n }\n if (czm_selected()) {\n out_FragColor = sceneColor;\n }\n }\n ",createSnowCoverStage=e=>{const t=e.viewer,i=new PostProcessStage({name:"SnowEffectCover",fragmentShader:fragmentShaderSource$7,forcePowerOfTwo:!1,textureScale:1,uniforms:{intensity:()=>e.intensity||.8}});t.scene.postProcessStages.add(i);return i.selected=[],{stage:i,remove:()=>{t.scene.postProcessStages.remove(i)}}},fragmentShaderSource$6="\n uniform sampler2D colorTexture; //输入的场景渲染照片\n in vec2 v_textureCoordinates;\n uniform float speed;\n uniform float scale;\n\n float snow(vec2 uv, float thisScale) {\n float time = czm_frameNumber * speed / 1000.0;\n float wMars3D = smoothstep(1.0, 0.0, -uv.y * (thisScale / 10.0));\n if(wMars3D < 0.1)\n return 0.0;\n uv += time / thisScale;\n uv.y += time * 2.0 / thisScale;\n uv.x += sin(uv.y + time * 0.5) / thisScale;\n uv *= thisScale;\n\n vec2 s = floor(uv), f = fract(uv), p;\n float k = 3.0, d;\n p = 0.5 + 0.35 * sin(11.0 * fract(sin((s + p + thisScale) * mat2(7, 3, 6, 5)) * 5.0)) - f;\n d = length(p);\n k = min(d, k);\n k = smoothstep(0.0, k, sin(f.x + f.y) * 0.01);\n return k * wMars3D;\n }\n void main(void) {\n vec2 resolution = czm_viewport.zw;\n vec2 uv = (gl_FragCoord.xy * 2. - resolution.xy) / min(resolution.x, resolution.y);\n\n float c = 0.0;\n float step = 1.0/(scale*0.1);\n for(float i = 1.0; i < 12.0; i += 1.0) {\n c += snow(uv, i*step);\n }\n vec3 finalColor = vec3(c); //屏幕上雪的颜色\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor, 1.0), 0.5); //将雪和三维场景融合\n }",createSnowStage=e=>{const t=e.viewer,i=t.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$6,uniforms:{scale:()=>e.scale||5,speed:()=>e.speed||16}}));i.selected=[];return{stage:i,remove:()=>{t.scene.postProcessStages.remove(i)}}},fragmentShaderSource$5="\n uniform sampler2D colorTexture;\n uniform sampler2D depthTexture;\n uniform float alpha;\n uniform float height;\n uniform vec3 oneOverRadii;\n uniform vec3 oneOverRadiiSquared;\n uniform float centerToleranceSquared;\n uniform float EPSILON12;\n uniform float earthRadius;\n\n in vec2 v_textureCoordinates;\n out vec4 glColor;\n\n vec4 toEye(in vec2 uv, in float depth){\n vec2 xy = vec2((uv.x * 2.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 float getDepth(in vec4 depth){\n float z_window = czm_unpackDepth(depth);\n z_window = czm_reverseLogDepth(z_window);\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n }\n\n\n vec3 getWorldCoordinateFromDepth(in vec4 currD){\n float depth = czm_unpackDepth(currD);\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n return worldCoordinate;\n }\n\n float magnitude(in vec3 v){\n return sqrt(v.x * v.x + v.y * v.y + v.z * v.z);\n }\n\n // 沿大地表面法线缩放提供的笛卡尔位置,使其位于该椭球体的表面上\n vec3 scaleToGeodeticSurface(in vec3 cartesian){\n float positionX = cartesian.x;\n float positionY = cartesian.y;\n float positionZ = cartesian.z;\n float x2 = cartesian.x * cartesian.x * oneOverRadii.x * oneOverRadii.x;\n float y2 = cartesian.y * cartesian.y * oneOverRadii.y * oneOverRadii.y;\n float z2 = cartesian.z * cartesian.z * oneOverRadii.z * oneOverRadii.z;\n\n float squaredNorm = x2 + y2 + z2;\n float ratio = sqrt(1.0 / squaredNorm);\n vec3 intersection = cartesian * ratio;\n\n float oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n float oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n float oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n\n vec3 gradient = vec3(intersection.x * oneOverRadiiSquaredX * 2.0,intersection.y * oneOverRadiiSquaredY * 2.0,intersection.z * oneOverRadiiSquaredZ * 2.0);\n\n float lambda = ((1.0 - ratio) * magnitude(cartesian) ) / (0.5 * magnitude(gradient));\n float correction = 0.0;\n float func = 0.0;\n float denominator = 0.0;\n float xMultiplier = 0.0;\n float yMultiplier = 0.0;\n float zMultiplier = 0.0;\n float xMultiplier2 = 0.0;\n float yMultiplier2 = 0.0;\n float zMultiplier2 = 0.0;\n float xMultiplier3 = 0.0;\n float yMultiplier3 = 0.0;\n float zMultiplier3 = 0.0;\n do {\n lambda -= correction;\n\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n\n xMultiplier2 = xMultiplier * xMultiplier;\n yMultiplier2 = yMultiplier * yMultiplier;\n zMultiplier2 = zMultiplier * zMultiplier;\n\n xMultiplier3 = xMultiplier2 * xMultiplier;\n yMultiplier3 = yMultiplier2 * yMultiplier;\n zMultiplier3 = zMultiplier2 * zMultiplier;\n\n float func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n\n float denominator =\n x2 * xMultiplier3 * oneOverRadiiSquaredX +\n y2 * yMultiplier3 * oneOverRadiiSquaredY +\n z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n\n float derivative = -2.0 * denominator;\n\n correction = func / derivative;\n } while (abs(func) > EPSILON12);\n return vec3(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);\n }\n\n vec3 multiplyComponents(in vec3 left,in vec3 right){\n return vec3(left.x * right.x, left.y * right.y, left.z * right.z);\n }\n\n\n // 将世界坐标转为经纬度高度\n vec3 getCartographicFromCartesian3(in vec3 cartesian){\n vec3 p = scaleToGeodeticSurface(cartesian);\n vec3 n = multiplyComponents(p,oneOverRadiiSquared);\n n = normalize(n);\n vec3 h = cartesian - p;\n\n float longitude = atan(n.y, n.x);\n float latitude = asin(n.z);\n float height = sign(dot(h, cartesian)) * magnitude(h);\n\n return vec3(longitude,latitude,height);\n }\n\n // 计算每个像素点的高度 通过计算相机所在位置的地球半径作为每个点的地球半径,然后用每个点的length减去半径得到近似的高度\n float getHeight(in vec4 currD){\n // 传入每个点的世界坐标\n float altitude = 0.0;\n float depth = czm_unpackDepth(currD);\n if (depth == 0.0) {\n altitude = czm_infinity;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\n float distance = -eyeCoordinate.z / eyeCoordinate.w;\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n altitude = length(worldCoordinate.xyz) - earthRadius;\n return altitude;\n }\n\n void main(){\n vec4 color = texture(colorTexture, v_textureCoordinates);\n vec4 currD = texture(depthTexture, v_textureCoordinates);\n if(currD.r>=1.0){\n glColor = color;\n return;\n }\n // 此方法有问题 会闪烁\n float depth = getDepth(currD);\n vec4 positionEC = toEye(v_textureCoordinates, depth);\n vec4 positionWC = czm_inverseView * positionEC;\n // 获取当前点的高度\n // vec3 positionWC = getWorldCoordinateFromDepth(currD);\n vec3 cartographic = getCartographicFromCartesian3(vec3(positionWC.x,positionWC.y,positionWC.z));\n // 高度加了10之后 就不闪烁了\n float pointHeight = cartographic.z + 10.;\n // 当前点高度越高,雾浓度越小,高度达到设定高度,雾浓度为0,同时乘以深度,距离越远,浓度越大\n float fog = (height/pointHeight - 1.);\n fog = clamp(fog, 0.0, 1.0);\n glColor = mix(color,vec4(1.0,1.,1.,1),fog*alpha);\n }",createHeightFogStage=e=>{const t=e.viewer.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$5,uniforms:{EPSILON12:()=>e.EPSILON12||1e-12,alpha:()=>e.alpha||.88,centerToleranceSquared:()=>e.centerToleranceSquared||.1,height:()=>e.height||100,oneOverRadii:()=>e.oneOverRadii||{x:1.567855942887398e-7,y:1.567855942887398e-7,z:1.573130351105623e-7},oneOverRadiiSquared:()=>e.oneOverRadiiSquared||{x:2458172257647332e-29,y:2458172257647332e-29,z:24747391015697002e-30}}}));t.selected=[];return{stage:t,remove:()=>{e.viewer.scene.postProcessStages.remove(t)}}},fragmentShaderSource$4="\nfloat getDistance(sampler2D depthTexture, vec2 texCoords) {\n float depth = czm_unpackDepth(texture(depthTexture, texCoords));\n if(depth == 0.0) {\n return czm_infinity;\n }\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\n return -eyeCoordinate.z / eyeCoordinate.w;\n}\nfloat interpolateByDistanceMars3D(vec4 nearFarScalar, float distance) {\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}\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor) {\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform vec4 fogByDistance;\nuniform vec4 fogColor;\nin vec2 v_textureCoordinates;\nvoid main(void) {\n float distance = getDistance(depthTexture, v_textureCoordinates);\n vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\n float blendAmount = interpolateByDistanceMars3D(fogByDistance, distance);\n vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);\n out_FragColor = alphaBlend(finalFogColor, sceneColor);\n}\n ",createFogStage=e=>{const t=e.viewer.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$4,uniforms:{fogColor:()=>e.fogColor||Color.WHITE,fogByDistance:()=>e.fogByDistance||new Cartesian4(100,0,9e3,.9)}}));t.selected=[];return{stage:t,remove:()=>{e.viewer.scene.postProcessStages.remove(t)}}},fragmentShaderSource$3="\n uniform sampler2D colorTexture;\n uniform sampler2D bloomTexture;\n uniform float ratio;\n uniform vec4 color;\n in vec2 v_textureCoordinates;\n void main(void)\n {\n vec4 color1 = texture(colorTexture, v_textureCoordinates);\n vec4 bloom = texture(bloomTexture, v_textureCoordinates);\n bloom *= color;\n if (czm_selected()) {\n bloom *= ratio;\n out_FragColor = bloom + color1;\n } else {\n out_FragColor = color1;\n }\n }\n ",fragmentShaderSource1="\n uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n uniform float contrast;\n uniform float brightness;\n void main(void)\n {\n vec4 texture1 = texture(colorTexture, v_textureCoordinates);\n vec3 sceneColor = texture1.rgb;\n\n sceneColor = czm_RGBToHSB(sceneColor);\n sceneColor.z += brightness;\n sceneColor = czm_HSBToRGB(sceneColor);\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, texture1.a);\n }\n ",fragmentShaderSource2="\n uniform sampler2D colorTexture;\n uniform float threshold;\n uniform float smoothWidth;\n\n in vec2 v_textureCoordinates;\n void main() {\n vec4 marstexel = texture( colorTexture, v_textureCoordinates );\n\n #ifdef CZM_SELECTED_FEATURE\n if (!czm_selected()) {\n marstexel = vec4(0.);\n }\n #endif\n\n vec3 luma = vec3( 0.299, 0.587, 0.114 );\n float marsv = dot( marstexel.xyz, luma );\n float alpha = smoothstep(threshold, threshold + smoothWidth, marsv);\n\n vec4 outputColor = vec4(0.0,0.0,0.0,0.0);\n out_FragColor = mix( outputColor, marstexel, alpha );\n }\n ",createBloomTargetStage=e=>{const t=new PostProcessStageComposite({name:"undefinedcontrast_bias_blur",stages:[new PostProcessStage({name:"undefinedcontrast_bias",fragmentShader:fragmentShaderSource1,uniforms:{contrast:()=>128,brightness:()=>-.3}}),new PostProcessStageComposite({name:"undefined_blur_comp",stages:[new PostProcessStage({name:"undefinedhigh",fragmentShader:fragmentShaderSource2,uniforms:{threshold:()=>0,smoothWidth:()=>.01}})]})]}),i=e.scene.postProcessStages.add(new PostProcessStageComposite({name:"bloom_target",inputPreviousStageTexture:!1,stages:[t,new PostProcessStage({name:"undefinedgenerate_composite",fragmentShader:fragmentShaderSource$3,uniforms:{bloomTexture:()=>"undefinedcontrast_bias_blur",color:()=>Color.GREEN,ratio:()=>2}})]}));i.enabled=!1;return i.selected=[],{stage:i,remove:()=>{e.scene.postProcessStages.remove(i)}}},fragmentShaderSource$2="\n uniform sampler2D colorTexture;\n in vec2 v_textureCoordinates;\n uniform float speed;\n uniform float size;\n uniform float direction;\n\n float hash(float x) {\n return fract(sin(x * 133.3) * 13.13);\n }\n\n void main(void) {\n\n float time = czm_frameNumber * speed / 1000.0;\n vec2 resolution = czm_viewport.zw;\n\n vec2 uv = (gl_FragCoord.xy * 2. - resolution.xy) / min(resolution.x, resolution.y);\n vec3 finalColor = vec3(.6, .7, .8);//粒子的颜色\n\n float siMars3D = sin(direction), co = cos(direction);\n uv *= mat2(co, -siMars3D, siMars3D, co);\n uv *= length(uv + vec2(0, 4.9))*(20.0/size) + 1.0;\n\n float v = 1. - sin(hash(floor(uv.x * 100.0)) * 2.0);\n float b = clamp(abs(sin(20.0 * time * v + uv.y * (5. / (2.0 + v)))) - .95, 0.0, 1.0) * 20.0;\n finalColor *= v * b; //屏幕上雨的颜色\n\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor, 1.0), 0.5); //将雨和三维场景融合\n }\n ",createRainStage=e=>{const t=e.viewer.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource$2,uniforms:{speed:()=>e.speed||16,size:()=>e.size||20,direction:()=>360+(e.direction||30)}}));t.selected=[];return{stage:t,remove:()=>{e.viewer.scene.postProcessStages.remove(t)}}},fragmentShaderSource$1="\n#extension GL_OES_standard_derivatives:enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nin vec2 v_textureCoordinates;\nvec4 toEye(in vec2 uv, in float depth){\n vec2 xy = vec2((uv.x * 2.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}\nfloat getDepth(in vec4 depth){\n float z_window = czm_unpackDepth(depth);\n z_window = czm_reverseLogDepth(z_window);\n float n_range = czm_depthRange.near;\n float f_range = czm_depthRange.far;\n return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nvec3 guussColor(vec2 uv){\n vec2 pixelSize = 1.0 / czm_viewport.zw;\n float dx0 = -pixelSize.x;\n float dy0 = -pixelSize.y;\n float dx1 = pixelSize.x;\n float dy1 = pixelSize.y;\n vec4 gc = (\n texture(colorTexture, uv)+\n texture(colorTexture, uv + vec2(dx0, dy0)) +\n texture(colorTexture, uv + vec2(0.0, dy0)) +\n texture(colorTexture, uv + vec2(dx1, dy0)) +\n texture(colorTexture, uv + vec2(dx0, 0.0)) +\n texture(colorTexture, uv + vec2(dx1, 0.0)) +\n texture(colorTexture, uv + vec2(dx0, dy1)) +\n texture(colorTexture, uv + vec2(0.0, dy1)) +\n texture(colorTexture, uv + vec2(dx1, dy1))\n ) * (1.0 / 9.0);\n return gc.rgb;\n}\nvoid main(){\n float offset = 0.0;\n vec4 color = texture(colorTexture, v_textureCoordinates);\n vec4 currD = texture(depthTexture, v_textureCoordinates);\n if(currD.r>=1.0){\n out_FragColor = color;\n return;\n }\n float depth = getDepth(currD);\n\n vec4 positionEC = toEye(v_textureCoordinates, depth);\n vec3 dx = dFdx(positionEC.xyz);\n vec3 dy = dFdy(positionEC.xyz);\n vec3 normal = normalize(cross(dx,dy));\n\n vec4 positionWC = normalize(czm_inverseView * positionEC);\n vec3 normalWC = normalize(czm_inverseViewRotation * normal);\n float fotNumWC = dot(positionWC.xyz,normalWC);\n if(fotNumWC<=0.5){\n out_FragColor = color;\n return;\n }\n\n vec3 viewDir = normalize(positionEC.xyz);\n vec3 reflectDir = reflect(viewDir, normal);\n vec3 viewReflectDir = reflectDir;\n\n float step = 0.05;\n int stepNum = int(20.0 / step);\n vec3 pos;\n vec3 albedo;\n bool jd = false;\n for(int i = 1;i <= 400;i++)\n {\n float delta = step * float(i) + offset;\n pos = positionEC.xyz + viewReflectDir * delta;\n float d = -pos.z;\n\n vec4 tmp = czm_projection * vec4(pos,1.0);\n vec3 screenPos = tmp.xyz / tmp.w;\n vec2 uv = vec2(screenPos.x, screenPos.y) * 0.5 + vec2(0.5, 0.5);\n\n if(uv.x > 0.0 && uv.x < 1.0 && uv.y > 0.0 && uv.y < 1.0){\n float dd = getDepth(texture(depthTexture, uv));\n vec4 jzc = toEye(uv, dd);\n dd = -jzc.z;\n if(d>dd){\n if(abs(abs(d) - abs(dd)) <=step){\n jd = true;\n // albedo = texture(colorTexture, uv).rgb;\n albedo = guussColor(uv);\n }\n break;\n }\n }\n }\n if(jd){\n out_FragColor = vec4(mix(color.xyz,albedo,0.5),1.0);\n }else{\n out_FragColor = color;\n }\n}\n",createRainCoverStage=e=>{const t=e.viewer,i=new PostProcessStage({fragmentShader:fragmentShaderSource$1,uniforms:{}});t.scene.postProcessStages.add(i);return{stage:i,remove:()=>{t.scene.postProcessStages.remove(i)}}},fragmentShaderSource="\n float hash(float x)\n {\n return fract(21654.6512 * sin(385.51 * x));\n }\n float hash(vec2 p)\n {\n return fract(1654.65157 * sin(15.5134763 * p.x + 45.5173247 * p.y + 5.21789));\n }\n vec2 hash2(vec2 p)\n {\n return vec2(hash(p * .754), hash(1.5743 * p + 4.5476351));\n }\n vec2 add = vec2(1.0, 0.0);\n vec2 noise2(vec2 x)\n {\n vec2 p = floor(x);\n vec2 f = fract(x);\n f = f * f * (3.0 - 2.0 * f);\n vec2 res = mix(mix(hash2(p),\n hash2(p + add.xy), f.x),\n mix(hash2(p + add.yx), hash2(p + add.xx), f.x), f.y);\n return res;\n }\n vec2 fbm2(vec2 x)\n {\n vec2 r = vec2(0.0);\n float a = 1.0;\n for (int i = 0; i < 8; i++)\n {\n r += noise2(x) * a;\n x *= 2.;\n a *= .5;\n }\n return r;\n }\n float dseg(vec2 ba, vec2 pa)\n {\n float h = clamp(dot(pa, ba) / dot(ba, ba), -0.2, 1.);\n return length(pa - ba * h);\n }\n uniform sampler2D colorTexture;\n uniform float fallInterval;\n uniform float mixFactor;\n in vec2 v_textureCoordinates;\n void main(void){\n vec2 uv = gl_FragCoord.xy;\n float iTime = czm_frameNumber * fallInterval * clamp(fallInterval * 0.1, 0.01, 0.1);\n vec2 p = uv / czm_viewport.zw;\n vec2 d;\n vec2 tgt = vec2(1., -1.);\n float c = 0.;\n if (p.y >= 0.)\n c = (1. - (fbm2((p + .2) * p.y + .1 * iTime)).x) * p.y;\n else\n c = (1. - (fbm2(p + .2 + .1 * iTime)).x) * p.y * p.y;\n vec3 col = vec3(0.);\n vec3 col1 = c * vec3(.3, .5, 1.);\n float mdist = 100000.;\n float t = hash(floor(5. * iTime));\n tgt += 4. * hash2(tgt + t) - 1.5;\n if (hash(t + 2.3) > .6)\n for (int i = 0; i < 100; i++) {\n vec2 dtgt = tgt - p;\n d = .05 * (vec2(-.5, -1.) + hash2(vec2(float(i), t)));\n float dist = dseg(d, dtgt);\n mdist = min(mdist, dist);\n tgt -= d;\n c = exp(-1.2 * dist) + exp(-55. * mdist);\n col = c * vec3(.7, .8, 1.);\n }\n col += col1;\n out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(col, 0.0), mixFactor);\n}\n ",createLightningStage=e=>{const t=e.viewer.scene.postProcessStages.add(new PostProcessStage({fragmentShader:fragmentShaderSource,uniforms:{mixFactor:()=>e.mixFactor||.1,fallInterval:()=>e.fallInterval||.8}}));t.selected=[];return{stage:t,remove:()=>{e.viewer.scene.postProcessStages.remove(t)}}},createLightBandCustomShader=e=>new CustomShader({vertexShaderText:vs,fragmentShaderText:fs$1,translucencyMode:0,lightingModel:LightingModel$1.UNLIT,uniforms:{colorEnable:{type:UniformType$1.BOOL,value:e.colorEnable||!0},glowEnable:{type:UniformType$1.BOOL,value:e.glowEnable||!0},baseHeight:{type:UniformType$1.FLOAT,value:e.baseHeight||100},glowRange:{type:UniformType$1.FLOAT,value:e.glowRange||100},uColor:{type:UniformType$1.VEC4,value:e.color||Color.PURPLE},glowTime:{type:UniformType$1.FLOAT,value:e.glowTime||1}}}),vs="\n void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {\n vsOutput.positionMC += 0.1 * vsInput.attributes.normalMC;\n }\n",fs$1="\n void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)\n {\n vec4 position = czm_inverseModelView * vec4(fsInput.attributes.positionEC,1); // 位置 \n vec4 color = uColor;\n color *= vec4(vec3(position.z / baseHeight), 0.5); // 渐变\n bool glEnable = glowEnable;\n // if(position.z > baseHeight) {\n // material.diffuse = vec3(1.0,0.0,0.0);\n // return;\n // }\n if(position.z < 40.0) {\n glEnable = false;\n }\n if(!glEnable){\n material.diffuse = color.rgb;\n return; \n }\n \n // 动态光环\n float time = fract(czm_frameNumber / (360.0 * glowTime));\n time = abs(time - 0.5) * 2.0;\n float diff = step(0.005, abs(clamp(position.z / glowRange, 0.0, 1.0) - time));\n color.rgb += color.rgb * (1.0 - diff);\n material.diffuse = color.rgb;\n } \n",createDroneAnimCustomShader=e=>new CustomShader({fragmentShaderText:fs,uniforms:{color:{type:UniformType$1.VEC4,value:e.color||Color.PURPLE}}}),fs="\n void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {\n vec4 originColor = vec4(material.diffuse,1.0);\n material.diffuse = vec3(mix(originColor,color,0.3));\n material.alpha = 0.8;\n }\n",createOutLineEffect=e=>{const t=e.scene.postProcessStages.add(PostProcessStageLibrary.createSilhouetteStage());t.uniforms.color=Color.YELLOW,t.selected=[];return{stage:t,remove:()=>{}}};var DrawEventType=(e=>(e.DRAW_ADD="drawAdd",e.DRAW_MOVE="drawMove",e.DRAW_PICK="drawPick",e.DRAW_DB_CLICK="drawDbClick",e.DRAW_RIGHT_CLICK="drawRightClick",e))(DrawEventType||{}),types$1=Object.freeze({__proto__:null,DrawEventType:DrawEventType});const DrawMessage={drawStart:{circle:"单击左键绘制圆的中心点,单机右键取消绘制。",rectangle:"单击左键绘制矩形左上角。",point:"单击左键结束绘制,单机右键取消绘制。","vertical-surface-line":"单击左键结束绘制,单机右键取消绘制。",default:"单击左键绘制第一个节点,单机右键取消绘制。"},drawMove:{circle:"单击左键确定圆的半径并结束绘制,单机右键取消绘制。",rectangle:"单击左键结束绘制,单机右键取消绘制。","vertical-line":"单击左键结束绘制,单机右键取消绘制。","vertical-surface-line":"单击左键结束绘制,单机右键取消绘制。","default-dbclick":"单机左键绘制下一个节点,双击左键结束绘制,单机右键撤销上次绘制。",default:"单机左键绘制下一个节点,单机右键撤销上次绘制。"},drawEnd:"单击左键结束绘制,单机右键取消上次绘制",pointEnter:"双击左键编辑节点。",drawEditMove:{default:"移动鼠标修改节点,单击左键确定修改,单机右键取消修改。"}},DrawStyle={point:{color:"rgba(255,255,0,0.8)",pixelSize:8,offsetX:0,offsetY:0,outlineColor:"rgba(255,255,255,0.8)",outlineWidth:3,disableDepthTestDistance:Number.POSITIVE_INFINITY},polyline:{width:5,color:"rgba(81,255,0,0.8)",depthFailColor:"rgba(255,0,0,0.5)"},polygon:{color:"rgba(255,255,54,0.3)",depthFailColor:"rgba(255,0,0,0.3)"}};class SectorPrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.drawData.__needUpdateAppearance&&this.setAppearance(),this.calcShapePositions(this.positions),this.positions.length<2)return this._primitive;const e=[new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(JSON.parse(JSON.stringify(this.drawData.shapePositions||[]))),perPositionHeight:!0}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?new GroundPrimitive({geometryInstances:e,appearance:this.appearance,asynchronous:!1}):new Primitive$3({geometryInstances:e,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){if(e.length<3)return this.drawData.shapePositions=e,void this.setShapePositions(this.drawData.shapePositions);const t=makePositionsToLnglats(e).map(e=>point([e.longitude,e.latitude])),i=makePositiontoLnglat(e[0]).height,n=calcSpaceDistance(e[0],e[1]),[r,o,a]=[t[0],t[1],t[2]],s=lineArc(r,n/1e3,bearing(r,o),bearing(r,a)).geometry.coordinates.map(e=>[e[0],e[1],i]);s.push([...r.geometry.coordinates,i]),s.unshift([...r.geometry.coordinates,i]),this.drawData.shapePositions=Cartesian3$1.fromDegreesArrayHeights(s.flat()),this.setShapePositions(this.drawData.shapePositions)}}const MathDistance=(e,t)=>Math.sqrt((e[0]-t[0])**2+(e[1]-t[1])**2),wholeDistance=e=>{let t=0;return e&&Array.isArray(e)&&e.length>0&&e.forEach((i,n)=>{n<e.length-1&&(t+=MathDistance(i,e[n+1]))}),t},getBaseLength=e=>wholeDistance(e)**.99,Mid=(e,t)=>[(e[0]+t[0])/2,(e[1]+t[1])/2],getAzimuth=(e,t)=>{let i;const n=Math.asin(Math.abs(t[1]-e[1])/MathDistance(e,t));return t[1]>=e[1]&&t[0]>=e[0]?i=n+Math.PI:t[1]>=e[1]&&t[0]<e[0]?i=2*Math.PI-n:t[1]<e[1]&&t[0]<e[0]?i=n:t[1]<e[1]&&t[0]>=e[0]&&(i=Math.PI-n),i},getAngleOfThreePoints=(e,t,i)=>{const n=getAzimuth(t,e)-getAzimuth(t,i);return n<0?n+2*Math.PI:n},isClockWise=(e,t,i)=>(i[1]-e[1])*(t[0]-e[0])>(t[1]-e[1])*(i[0]-e[0]),getThirdPoint=(e,t,i,n,r)=>{const o=getAzimuth(e,t),a=r?o+i:o-i,s=n*Math.cos(a),c=n*Math.sin(a);return[t[0]+s,t[1]+c]},getBezierPoints=function(e){if(e.length<=2)return e;const t=[],i=e.length-1;for(let n=0;n<=1;n+=.01){let[r,o]=[0,0];for(let t=0;t<=i;t++){const a=getBinomialFactor(i,t),s=n**t,c=(1-n)**(i-t);r+=a*s*c*e[t][0],o+=a*s*c*e[t][1]}t.push([r,o])}return t.push(e[i]),t},getFactorial=e=>{let t=1;switch(e){case e<=1:t=1;break;case 2===e:t=2;break;case 3===e:t=6;break;case 24===e:t=24;break;case 5===e:t=120;break;default:for(let i=1;i<=e;i++)t*=i}return t},getBinomialFactor=(e,t)=>getFactorial(e)/(getFactorial(t)*getFactorial(e-t));class DoubleArrowPrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;connPoint;tempPoint4;llBodyPnts=[];rrBodyPnts=[];isClockWise;neckWidthFactor;headWidthFactor;headHeightFactor;neckHeightFactor;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.setAppearance(),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.connPoint=[0,0],this.tempPoint4=[0,0],this.isClockWise=!1}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.drawData.__needUpdateAppearance&&this.setAppearance(),this.calcShapePositions(this.positions),this.positions.length<2)return this._primitive;const e=[new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(JSON.parse(JSON.stringify(this.drawData.shapePositions||[]))),perPositionHeight:!0}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?new GroundPrimitive({geometryInstances:e,appearance:this.appearance,asynchronous:!1}):new Primitive$3({geometryInstances:e,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){if(e.length<3)return this.drawData.shapePositions=e,void this.setShapePositions(this.drawData.shapePositions);const t=[],i=makePositionsToLnglats(e).map(e=>(t.push(e.height),[e.longitude,e.latitude])),n=Math.max(...t),[r,o,a]=[i[0],i[1],i[2]],s=i.length;let c,l;3===s?(this.tempPoint4=this.getTempPoint4(r,o,a),this.connPoint=Mid(r,o)):4===s?(this.tempPoint4=i[3],this.connPoint=Mid(r,o)):(this.tempPoint4=i[3],this.connPoint=i[4]),this.isClockWise=isClockWise(r,o,a),this.isClockWise?(c=this.getArrowPoints(r,this.connPoint,this.tempPoint4,!1),l=this.getArrowPoints(this.connPoint,o,a,!0)):(c=this.getArrowPoints(o,this.connPoint,a,!1),l=this.getArrowPoints(this.connPoint,r,this.tempPoint4,!0));const d=c.length,u=(d-5)/2,h=c.slice(0,u),p=c.slice(u,u+5);let A=c.slice(u+5,d);this.llBodyPnts=h;let m=l.slice(0,u);const f=l.slice(u,u+5),g=l.slice(u+5,d);this.rrBodyPnts=g,m=getBezierPoints(m);const C=getBezierPoints(g.concat(h.slice(1)));A=getBezierPoints(A);const y=m.concat(f,C,p,A).filter(e=>e[0]&&e[1]).map(e=>new Cartographic(e[0],e[1],n)),_=makeLnglatsToPositions(y);this.drawData.shapePositions=_,this.drawData.shapePositions.push(_[0]),this.setShapePositions(this.drawData.shapePositions)}getTempPoint4(e,t,i){const n=Mid(e,t),r=MathDistance(n,i),o=getAngleOfThreePoints(e,n,i);let a,s,c,l=[0,0];return o<Math.PI/2?(a=r*Math.sin(o),s=r*Math.cos(o),c=getThirdPoint(e,n,Math.PI/2,a,!1),l=getThirdPoint(n,c,Math.PI/2,s,!0)):o>=Math.PI/2&&o<Math.PI?(a=r*Math.sin(Math.PI-o),s=r*Math.cos(Math.PI-o),c=getThirdPoint(e,n,Math.PI/2,a,!1),l=getThirdPoint(n,c,Math.PI/2,s,!1)):o>=Math.PI&&o<1.5*Math.PI?(a=r*Math.sin(o-Math.PI),s=r*Math.cos(o-Math.PI),c=getThirdPoint(e,n,Math.PI/2,a,!0),l=getThirdPoint(n,c,Math.PI/2,s,!0)):(a=r*Math.sin(2*Math.PI-o),s=r*Math.cos(2*Math.PI-o),c=getThirdPoint(e,n,Math.PI/2,a,!0),l=getThirdPoint(n,c,Math.PI/2,s,!1)),l}getArrowPoints(e,t,i,n){const r=Mid(e,t),o=MathDistance(r,i);let a=getThirdPoint(i,r,0,.3*o,!0),s=getThirdPoint(i,r,0,.5*o,!0);a=getThirdPoint(r,a,Math.PI/2,o/5,n),s=getThirdPoint(r,s,Math.PI/2,o/4,n);const c=[r,a,s,i],l=this.getArrowHeadPoints(c);if(!(l&&Array.isArray(l)&&l.length>0))throw new Error("Interpolation Error");{const i=l[0],n=l[4],r=MathDistance(e,t)/getBaseLength(c)/2,o=this.getArrowBodyPoints(c,i,n,r);if(o){const r=o.length;let a=o.slice(0,r/2),s=o.slice(r/2,r);return a.push(i),s.push(n),a=a.reverse(),a.push(t),s=s.reverse(),s.push(e),a.reverse().concat(l,s)}}}getArrowBodyPoints(e,t,i,n){const r=wholeDistance(e),o=getBaseLength(e)*n,a=(o-MathDistance(t,i))/2;let s=0;const c=[],l=[];for(let t=1;t<e.length-1;t++){const i=getAngleOfThreePoints(e[t-1],e[t],e[t+1])/2;s+=MathDistance(e[t-1],e[t]);const n=(o/2-s/r*a)/Math.sin(i),d=getThirdPoint(e[t-1],e[t],Math.PI-i,n,!0),u=getThirdPoint(e[t-1],e[t],i,n,!1);c.push(d),l.push(u)}return c.concat(l)}getArrowHeadPoints(e){const t=getBaseLength(e)*this.headHeightFactor,i=e[e.length-1],n=t*this.headWidthFactor,r=t*this.neckWidthFactor,o=t*this.neckHeightFactor,a=getThirdPoint(e[e.length-2],i,0,t,!0),s=getThirdPoint(e[e.length-2],i,0,o,!0),c=getThirdPoint(i,a,Math.PI/2,n,!1),l=getThirdPoint(i,a,Math.PI/2,n,!0);return[getThirdPoint(i,s,Math.PI/2,r,!1),c,i,l,getThirdPoint(i,s,Math.PI/2,r,!0)]}}class FineArrowPrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.drawData.__needUpdateAppearance&&this.setAppearance(),this.calcShapePositions(this.positions),this.positions.length<2)return this._primitive;const e=[new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(JSON.parse(JSON.stringify(this.drawData.shapePositions||[]))),perPositionHeight:!0}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?new GroundPrimitive({geometryInstances:e,appearance:this.appearance,asynchronous:!1}):new Primitive$3({geometryInstances:e,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){if(e.length<2)return;const t=makePositionsToLnglats(e).map(e=>point([e.longitude,e.latitude])),i=makePositiontoLnglat(e[0]).height,n=calcSpaceDistances(e)/1e3,[r,o]=[t[0],t[1]],a=bearing(r,o),s=destination(r,.1*n,a-90,{units:"kilometers"}),c=destination(r,.1*n,a+90,{units:"kilometers"}),l=destination(r,.8*n,a-5,{units:"kilometers"}),d=destination(r,.8*n,a+5,{units:"kilometers"}),u=destination(r,.75*n,a-13,{units:"kilometers"}),h=destination(r,.75*n,a+13,{units:"kilometers"}),p=[...s.geometry.coordinates,i,...l.geometry.coordinates,i,...u.geometry.coordinates,i,...o.geometry.coordinates,i,...h.geometry.coordinates,i,...d.geometry.coordinates,i,...c.geometry.coordinates,i,...s.geometry.coordinates,i];this.drawData.shapePositions=Cartesian3$1.fromDegreesArrayHeights(p.flat()),this.setShapePositions(this.drawData.shapePositions)}}const addShapeExtend=()=>{addDrawActions({type:"sector",action:setSectorPrimitive,outline:!0,pointCount:3}),addDrawActions({type:"db-arrow",action:setDbArrowPrimitive,outline:!0,pointCount:4}),addDrawActions({type:"fine-arrow",action:setFineArrowPrimitive,outline:!0,pointCount:2})},setSectorPrimitive=e=>{const t=new SectorPrimitive(e);e.primitives.add(t)},setDbArrowPrimitive=e=>{const t=new DoubleArrowPrimitive(e);e.primitives.add(t)},setFineArrowPrimitive=e=>{const t=new FineArrowPrimitive(e);e.primitives.add(t)},DistanceUnits={cm:"cm","厘米":"厘米",m:"m","米":"米",km:"km","千米":"千米","公里":"公里"},AreaUnits={cm2:"㎡","平方厘米":"平方厘米",m2:"㎡","平方米":"平方米",km2:"km²","平方千米":"平方千米","平方公里":"平方公里","亩":"亩","公顷":"公顷"},UnitDisAndAreaMap={cm:"cm²",m:"㎡",km:"km²","米":"平方米","千米":"平方千米","公里":"平方公里"},convertDistance=(e,t,i)=>t===i?e:e*getDistanceUnitConversion(i),convertArea=(e,t,i)=>t===i?e:e*getAreaUnitConversion(i),getAreaUnitFromDistanceUnit=e=>UnitDisAndAreaMap[e],getDistanceUnitConversion=e=>{switch(e){case DistanceUnits.m:return 1;case DistanceUnits.cm:case DistanceUnits.厘米:return 100;case DistanceUnits.km:return.001;case DistanceUnits.米:return 1;case DistanceUnits.千米:case DistanceUnits.公里:return.001;default:return 1}};function getAreaUnitConversion(e){switch(e){case AreaUnits.cm2:return 1e4;case AreaUnits.m2:return 1;case AreaUnits.km2:return 1e-6;case AreaUnits.平方厘米:return 1e4;case AreaUnits.平方米:return 1;case AreaUnits.平方千米:case AreaUnits.平方公里:return 1e-6;case AreaUnits.亩:return.0015;case AreaUnits.公顷:return 1e-4;default:return 1}}const getPositionsFromShapeAndPolylinePositions=(e,t)=>{let i=e;if("vertical-surface-line"===t&&e.length>=1){const t=e[0],n=Cartographic.fromCartesian(t),r=CesiumMath.toDegrees(n.longitude),o=CesiumMath.toDegrees(n.latitude),a=0;i=[Cartesian3$1.fromDegrees(r,o,n.height),Cartesian3$1.fromDegrees(r,o,a)]}if("vertical-line"===t&&e.length>=2){const t=e[0],n=e[1],r=makePositiontoLnglat(t),o=makePositiontoLnglat(n);let a=r,s=o;r.height>o.height&&(a=o,s=r),console.log(a.longitude,a.latitude,s.height);const c=makeLnglatToPosition(new Cartographic(a.longitude,a.latitude,s.height));i=[makeLnglatToPosition(a),c,makeLnglatToPosition(s),makeLnglatToPosition(a)]}return t.startsWith("curve")&&e.length>2&&(i=getCatmullRomSplinePositions(e)),i},getMeasureResultFromPositions=e=>{let{shapePositions:t,positions:i,shape:n,clampToGround:r,measureUnit:o}=e;t||(t=i),r||(r=!1);const[a,s]=getUnitFromUnitArray(o),c=getAreaUnitFromDistanceUnit("m");e.measureUnit=[a,s];const l=[];if("polyline"===n&&(polylineDistance(i,r,l,a),l.push({value:0,unit:a,position:i[0],positions:i,prefixText:"起点"}),l.push({value:Number(l.reduce((e,t)=>e+t.value,0).toFixed(2)),unit:a,position:i[i.length-1],positions:i})),"vertical-surface-line"===n&&polylineDistance(t,r,l,a),"vertical-line"===n&&(polylineDistance(t,r,l,a),l.forEach((e,t)=>{0===t&&(e.prefixText="高度"),1===t&&(e.prefixText="水平距离"),2===t&&(e.prefixText="空间距离")})),"polygon"===n){polylineDistance(t,r,l,a);const e=convertArea(calcArea(t),c,s);l.push({value:Number(e.toFixed(2)),unit:s,position:calcPoistionCenter(t),positions:t})}if("rectangle"===n){polylineDistance(t,r,l,a);const e=convertArea(calcArea(t),c,s);l.push({value:Number(e.toFixed(2)),unit:s,position:calcPoistionCenter(t),positions:t})}if("circle"===n){const e=r?calcGeodesicDistance(i[0],i[1]):calcSpaceDistance(i[0],i[1]);l.push({value:Number(convertDistance(e,"m",a).toFixed(2)),unit:a,position:i[1],positions:i,prefixText:"半径"});const t=convertArea(e*e*Math.PI,c,s);e>0&&l.push({value:Number(t.toFixed(2)),unit:s,position:i[0],positions:i})}return l},polylineDistance=(e,t,i,n,r)=>{i.push(...e.map((i,r)=>{const o=e[r+1];if(o){let e=t?calcGeodesicDistance(i,o):calcSpaceDistance(i,o);return e=convertDistance(e,"m",n),{value:Number(e.toFixed(2)),unit:n,position:calcPoistionCenter([i,o]),positions:[i,o]}}return null}).filter(e=>e&&e.value>0))},getUnitFromUnitArray=e=>{if(2===e.length)return e;let[t,i]=e;return i||(i=getAreaUnitFromDistanceUnit(t)),[t,i]},getCatmullRomSplinePositions=e=>{const t=e.length,i=calcGeodesicDistances(e),n=Math.floor(i/5),r=[];for(let e=0;e<t;e++)r.push(1.5*e);const o=new CatmullRomSpline({points:e,times:r}),a=[],s=r[0],c=r[r.length-1];for(let e=0;e<n;e++){const t=e/(n-1),i=CesiumMath.lerp(s,c,t),r=o.evaluate(i);a.push(r)}return a},getMetersPerDegree=e=>{const t=CesiumMath.toRadians(.5),i=makeLnglatToPosition(e),n=makeLnglatToPosition(new Cartographic(e.longitude+t,e.latitude,e.height)),r=2*Cartesian3$1.distance(i,n),o=makeLnglatToPosition(new Cartographic(e.longitude,e.latitude+t,e.height));return{lon:r,lat:2*Cartesian3$1.distance(i,o)}},getLineArrowPositions=(e,t=1e3)=>{if(e.length<2)return console.warn("至少需要2个点才能生成箭头"),[];const i=e[e.length-1],n=e[e.length-2],r=makePositiontoLnglat(i),o=makePositiontoLnglat(n),a=r.height,s=r.longitude-o.longitude,c=r.latitude-o.latitude,l=Math.sqrt(s**2+c**2);if(l<1e-12)return console.warn("最后两点经纬度重合,无法生成箭头"),[];const d=s/l,u=c/l,h=getMetersPerDegree(r),p=t/h.lon*CesiumMath.RADIANS_PER_DEGREE,A=t/h.lat*CesiumMath.RADIANS_PER_DEGREE,m=Math.PI/6,f=t*Math.tan(m),g=f/h.lon*CesiumMath.RADIANS_PER_DEGREE,C=f/h.lat*CesiumMath.RADIANS_PER_DEGREE,y=r.longitude-d*p-u*g,_=r.latitude-u*A+d*C,E=r.longitude-d*p+u*g,b=r.latitude-u*A-d*C,I=makeLnglatToPosition(new Cartographic(y,_,a)),S=makeLnglatToPosition(new Cartographic(E,b,a));return[I,makeLnglatToPosition(new Cartographic(r.longitude,r.latitude,a)),S]};class PolylinePrimitive extends BasePrimitive{positions;drawData;appearanceTran;depthFailAppearance;linePrimitiveCollection;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.linePrimitiveCollection=new PrimitiveCollection,this.setAppearance()}getGeometry(){const e=getPositionsFromShapeAndPolylinePositions(this.positions,this.drawData.shape);if(this.drawData.shapePositions=e,"vertical-surface-line"===this.drawData.shape){const e=this.drawData.pointPrimitives.get(1);e&&(e.position=this.drawData.shapePositions[1])}if(this.setShapePositions(e),!(e.length<2))return this.drawData.clampToGround?new GroundPolylineGeometry({positions:e,width:this.drawData.style.polyline.width}):new PolylineGeometry({positions:e,width:this.drawData.style.polyline.width})}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;this.drawData.__needUpdateAppearance&&this.setAppearance();const e=this.getGeometry();if(!e)return;const t=new GeometryInstance({geometry:e,id:`draw-${this.drawData.id}`});return e?this.drawData.clampToGround?new GroundPolylinePrimitive({geometryInstances:t,appearance:this.appearance,asynchronous:!1}):(this.linePrimitiveCollection.removeAll(),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearance,asynchronous:!1})),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearanceTran,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.linePrimitiveCollection):void 0}setAppearance(e){e?this.appearance=e:(this.appearance=new PolylineMaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:Color.fromCssColorString(this.drawData.style.polyline.color)}}})}),this.appearanceTran=new MaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:new Color(0,0,0,0)}}})}),this.depthFailAppearance=new PolylineMaterialAppearance({material:Material$4.fromType(Material$4.PolylineDashType,{color:Color.fromCssColorString(this.drawData.style.polyline.depthFailColor)})}))}}class PolygonPrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;this.drawData.__needUpdateAppearance&&this.setAppearance();const e=JSON.parse(JSON.stringify(this.positions));if(this.calcShapePositions(e),this.positions.length<3)return;const t=[new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(e),perPositionHeight:!0}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?new GroundPrimitive({geometryInstances:t,appearance:this.appearance,asynchronous:!1}):new Primitive$3({geometryInstances:t,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){const t=[...e,e[0]];this.drawData.shapePositions=t,this.setShapePositions(this.drawData.shapePositions)}}class CirclePrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;primitiveCollection;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.primitiveCollection=new PrimitiveCollection,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.positions.length<2)return;this.drawData.__needUpdateAppearance&&this.setAppearance(),this.primitiveCollection.removeAll(),this.calcShapePositions(this.positions);const e=JSON.parse(JSON.stringify(this.positions)),t=this.drawData.clampToGround?calcGeodesicDistance(e[0],e[1]):calcSpaceDistance(e[0],e[1]);if(!t)return;const i=Cartographic.fromCartesian(e[0]).height,n=[new GeometryInstance({geometry:new CircleGeometry({center:e[0],height:i,radius:t}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?this.primitiveCollection.add(new GroundPrimitive({geometryInstances:n,appearance:this.appearance,asynchronous:!1})):this.primitiveCollection.add(new Primitive$3({geometryInstances:n,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.primitiveCollection}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){let t=e;const i=calcSpaceDistance(e[0],e[1]),n=Cartographic.fromCartesian(e[0]).height,r=new CircleOutlineGeometry({center:e[0],height:n,radius:i}),o=CircleOutlineGeometry.createGeometry(r);let a=[];if(o){const e=[].slice.call(o.attributes.position.values);a=Cartesian3$1.unpackArray(e),a.push(a[0]),t=a}this.drawData.shapePositions=t,this.setShapePositions(this.drawData.shapePositions)}}class RectanglePrimitive extends BasePrimitive{positions;drawData;depthFailAppearance;primitiveCollection;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.primitiveCollection=new PrimitiveCollection,this.setAppearance()}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;if(this.positions.length<2)return this.primitiveCollection;this.primitiveCollection.removeAll(),this.drawData.__needUpdateAppearance&&this.setAppearance();const e=JSON.parse(JSON.stringify(this.positions));e.length=2,this.calcShapePositions(e);const t=Cartographic.fromCartesian(e[0]).height,i=[new GeometryInstance({geometry:new RectangleGeometry({rectangle:Rectangle.fromCartesianArray(e),height:t}),id:`draw-${this.drawData.id}`})];return this.drawData.clampToGround?this.primitiveCollection.add(new GroundPrimitive({geometryInstances:i,appearance:this.appearance,asynchronous:!1})):this.primitiveCollection.add(new Primitive$3({geometryInstances:i,appearance:this.appearance,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.primitiveCollection}setAppearance(){this.appearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.color)})}),this.depthFailAppearance=new MaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString(this.drawData.style.polygon.depthFailColor)})})}calcShapePositions(e){let t=e;const i=Cartographic.fromCartesian(e[0]).height,n=new RectangleOutlineGeometry({rectangle:Rectangle.fromCartesianArray(e),height:i}),r=RectangleOutlineGeometry.createGeometry(n);let o=[];if(r){const e=[].slice.call(r.attributes.position.values);o=Cartesian3$1.unpackArray(e),o.push(o[0]),t=o}this.drawData.shapePositions=t,this.setShapePositions(this.drawData.shapePositions)}}class MeasurePrimitive extends BasePrimitive{drawData;labelCollection;measureDivs;cesiumWidget;viewer;constructor(e,t){super(),this.viewer=t,this.cesiumWidget=t._element.getElementsByClassName("cesium-widget")[0],this.drawData=e,this.labelCollection=new LabelCollection({scene:t.scene}),this.drawData.measureLabel&&this.setAppearance(),this.measureDivs=[],this.renderDivPosition()}getPrimitive(){return this.drawData.isEditing&&this.drawData.measureLabel?"point"===this.drawData.shape?(this.updatePointDivLabel(),this.labelCollection):this.drawData.shapePositions&&this.drawData.shapePositions.length>=2?(this.updateUnit(this.drawData.measureUnit),this.labelCollection):void 0:this.labelCollection}updateUnit(e){if("point"===this.drawData.shape)return;this.drawData.measureUnit=e,this.clearAllDiv();const t=getMeasureResultFromPositions(this.drawData);this.drawData.measureResult=t,t.forEach((e,t)=>{let i="";e.prefixText?(i=`${e.prefixText}`,e.value&&(i+=`:${e.value}${e.unit}`)):i+=`${e.value}${e.unit}`;const n=this.createDiv(`measure-label-${this.drawData.id}-${t}`,i);this.measureDivs.push({position:e.position,divEle:n})})}updatePointDivLabel(){this.clearAllDiv(),this.drawData.positions.forEach(e=>{const t=makePositiontoLnglat(e),i=this.createDiv(`measure-label-${this.drawData.id}-0`,`经度:${t.longitude.toFixed(6)}\n纬度:${t.latitude.toFixed(6)}\n高度:${t.height.toFixed(6)}`);this.measureDivs.push({position:e,divEle:i})})}renderDivPosition(){this.viewer.scene.postRender.addEventListener(()=>{this.measureDivs.forEach(e=>{const t=this.viewer.scene.cartesianToCanvasCoordinates(e.position);if(t){e.divEle.style.display="block";const i=e.divEle.getBoundingClientRect();e.divEle.style.left=t.x-i.width/2+"px",e.divEle.style.top=t.y-i.height+"px"}else e.divEle.style.display="none"})})}destroy(){super.destroy(),this.clearAllDiv()}setAppearance(){}clearAllDiv(){this.measureDivs.forEach(e=>{e.divEle.remove()}),this.measureDivs=[]}createDiv(e,t,i=48){const n=`\n <div style="\n background: rgba(0, 0, 0, 0.6);\n color: white;\n border-radius: 5px;\n padding: 0 10px 0 10px;\n font-size: 14px;\n white-space: nowrap;\n pointer-events: none;\n ">\n ${t.split("\n").map(e=>`\n <div style="height: 24px; line-height: 24px">\n ${e}\n </div>\n `).join(" ")}\n </div>\n <div style="\n height: ${i}px;\n width: 2px;\n background: rgba(0, 0, 0, 0.6);\n margin: auto;\n ">\n </div>\n `,r=document.createElement("div");return r.id=e,r.innerHTML=n,r.style.position="absolute",r.style.pointerEvents="none",r.className=`measure-label measure-label-${this.drawData.id}`,this.cesiumWidget.appendChild(r),r}calcShapePositions(e){this.setShapePositions(e)}}class ArrowPrimitive extends BasePrimitive{positions;drawData;appearanceTran;depthFailAppearance;linePrimitiveCollection;viewer;arrowLengthScale;constructor(e,t){super(),this.arrowLengthScale=5,this.drawData=e,this.positions=e.positions,this.linePrimitiveCollection=new PrimitiveCollection,this.viewer=t,this.setAppearance()}getGeometry(){if(this.positions.length<2)return;let e=this.positions;e=getPositionsFromShapeAndPolylinePositions(e,this.drawData.shape);let t=calcGeodesicDistances(e)/this.arrowLengthScale;return t>3e6&&(t=3e6),e=getLineArrowPositions(e,t/2),this.calcShapePositions(e),e.length<2?void 0:(this.setShapePositions(e),this.drawData.clampToGround?new GroundPolylineGeometry({positions:e,width:this.drawData.style.polyline.width}):new PolylineGeometry({positions:e,width:this.drawData.style.polyline.width}))}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;this.drawData.__needUpdateAppearance&&this.setAppearance();const e=this.getGeometry();if(!e)return;const t=new GeometryInstance({geometry:e,id:this.drawData.id});return e?this.drawData.clampToGround?new GroundPolylinePrimitive({geometryInstances:t,appearance:this.appearance,asynchronous:!1}):(this.linePrimitiveCollection.removeAll(),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearance,asynchronous:!1})),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearanceTran,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.linePrimitiveCollection):void 0}setAppearance(e){e?this.appearance=e:(this.appearance=new PolylineMaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:Color.fromCssColorString(this.drawData.style.polyline.color)}}})}),this.appearanceTran=new MaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:new Color(0,0,0,0)}}})}),this.depthFailAppearance=new PolylineMaterialAppearance({material:Material$4.fromType(Material$4.PolylineDashType,{color:Color.fromCssColorString(this.drawData.style.polyline.depthFailColor)})}))}calcShapePositions(e){this.setShapePositions(e)}}class OutlinePrimitive extends BasePrimitive{drawData;appearanceTran;depthFailAppearance;linePrimitiveCollection;constructor(e){super(),this.drawData=e,this.linePrimitiveCollection=new PrimitiveCollection,this.setAppearance()}getGeometry(){const e=this.drawData.shapePositions||[];if(this.calcShapePositions(e),!(e.length<2))return this.drawData.clampToGround?new GroundPolylineGeometry({positions:e,width:this.drawData.style.polyline.width}):new PolylineGeometry({positions:e,width:this.drawData.style.polyline.width})}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;this.drawData.__needUpdateAppearance&&this.setAppearance();const e=this.getGeometry();if(!e)return;const t=new GeometryInstance({geometry:e,id:`draw-${this.drawData.id}`});return e?this.drawData.clampToGround?new GroundPolylinePrimitive({geometryInstances:t,appearance:this.appearance,asynchronous:!1}):(this.linePrimitiveCollection.removeAll(),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearance,asynchronous:!1})),this.linePrimitiveCollection.add(new Primitive$3({geometryInstances:t,appearance:this.appearanceTran,depthFailAppearance:this.drawData.disDepthFail?void 0:this.depthFailAppearance,asynchronous:!1})),this.linePrimitiveCollection):void 0}setAppearance(e){e?this.appearance=e:(this.appearance=new PolylineMaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:Color.fromCssColorString(this.drawData.style.polyline.color)}}})}),this.appearanceTran=new MaterialAppearance({material:new Material$4({fabric:{type:"Color",uniforms:{color:new Color(0,0,0,0)}}})}),this.depthFailAppearance=new PolylineMaterialAppearance({material:Material$4.fromType(Material$4.PolylineDashType,{color:Color.fromCssColorString(this.drawData.style.polyline.depthFailColor)})}))}calcShapePositions(e){this.setShapePositions(e)}}let PointPrimitives$1=class extends BasePrimitive{positions;drawData;pointCollection;billboardCollection;primitiveColltction;constructor(e){super(),this.drawData=e,this.positions=e.positions,this.pointCollection=new PointPrimitiveCollection,this.billboardCollection=new BillboardCollection,this.primitiveColltction=new PrimitiveCollection,this.primitiveColltction.add(this.pointCollection),this.primitiveColltction.add(this.billboardCollection),console.log(this.billboardCollection)}getPrimitive(){if(!this.drawData.isEditing)return this._primitive;const e=this.drawData.style.point?.pixelSize||1,t=this.drawData.style.point?.offsetX,i=this.drawData.style.point?.offsetY;if(this.drawData.style.point?.image){const n=this.billboardCollection._billboards.map(e=>e.position),r=this.drawData.positions[this.drawData.positions.length-1];this.drawData.positions.forEach(r=>{n.find(e=>e.x===r.x&&e.y===r.y&&e.z===r.z)||this.billboardCollection.add({id:`draw-${this.drawData.id}-${numberId()}`,position:r,image:this.drawData.style.point.image,color:Color.fromCssColorString(this.drawData.style.point.color),width:e,height:e,pixelOffset:new Cartesian2(t||0,i||0),disableDepthTestDistance:Number.POSITIVE_INFINITY})});return this.billboardCollection._billboards.filter((e,t)=>{if(r.x===e.position.x&&r.y===e.position.y&&r.z===e.position.z)return!1;return!this.positions.find(t=>t.x===e.position.x&&t.y===e.position.y&&t.z===e.position.z)}).forEach(e=>{this.billboardCollection.remove(e)}),this.billboardCollection}return this.pointCollection.removeAll(),this.drawData.positions.forEach(t=>{this.pointCollection.add({id:`draw-${this.drawData.id}-${numberId()}`,position:t,color:Color.fromCssColorString(this.drawData.style.point.color),pixelSize:e,outlineColor:Color.fromCssColorString(this.drawData.style.point.outlineColor),outlineWidth:this.drawData.style.point?.outlineWidth,disableDepthTestDistance:Number.POSITIVE_INFINITY})}),this.pointCollection}getPointPrimitives(){return this._primitive._pointPrimitives}};const ShapeDrawPointCount={point:1,circle:2,rectangle:2,sector:3,"vertical-surface-line":1,"vertical-line":2},drawActions={},initDrawActions=()=>{drawActions.polyline=e=>{setPolyLinePrimitive(e)},drawActions["polyline-arrow"]=(e,t)=>{setPolyLinePrimitive(e),setArrowPrimitive(e,t)},drawActions.curve=e=>{setPolyLinePrimitive(e)},drawActions["curve-arrow"]=(e,t)=>{setPolyLinePrimitive(e),setArrowPrimitive(e,t)},drawActions["vertical-line"]=e=>{e.clampToGround=!1,setPolyLinePrimitive(e)},drawActions["vertical-surface-line"]=e=>{e.clampToGround=!1,setPolyLinePrimitive(e)},drawActions.polygon=e=>{setPolygonPrimitive(e),setOutlinePrimitive(e)},drawActions.circle=e=>{setCirclePrimitive(e),setOutlinePrimitive(e)},drawActions.rectangle=e=>{setRectanglePrimitive(e),setOutlinePrimitive(e)},addShapeExtend()},addDrawActions=e=>{const{type:t,action:i,outline:n,pointCount:r}=e;drawActions[t]=(e,t)=>{i(e,t),n&&setOutlinePrimitive(e)},r&&(ShapeDrawPointCount[t]=r)},setDrawPrimitive=(e,t,i)=>{drawActions[t]&&drawActions[t](i,e),setPointPrimitives(i)},setPointPrimitives=e=>{const t=new PointPrimitives$1(e);e.primitives.add(t),e.primitives.raiseToTop(t)},setPolyLinePrimitive=e=>{const t=new PolylinePrimitive(e);e.primitives.add(t)},setOutlinePrimitive=e=>{const t=new OutlinePrimitive(e);e.primitives.add(t)},setArrowPrimitive=(e,t)=>{const i=new ArrowPrimitive(e,t);e.primitives.add(i)},setPolygonPrimitive=e=>{const t=new PolygonPrimitive(e);e.primitives.add(t)},setCirclePrimitive=e=>{const t=new CirclePrimitive(e);e.primitives.add(t)},setRectanglePrimitive=e=>{const t=new RectanglePrimitive(e);e.primitives.add(t)},setMeasurePrimitive=(e,t)=>{const i=new MeasurePrimitive(e,t);e.primitives.add(i),e.measurePrimitive=i,e.primitives.raiseToTop(i)},initDrawEvent=(e,t)=>{const i=e.scene,n=new ScreenSpaceEventHandler(i.canvas);let r;e.cesiumWidget.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType$1.LEFT_DOUBLE_CLICK),n.setInputAction(n=>{const o=i.pickPosition(n.position),a=(new Date).getTime();if(r&&a-r<270){const i=e.scene.pick(n.position);return void t(DrawEventType.DRAW_DB_CLICK,{position:o,pickPrimitive:i?.primitive,windowPosition:n.position})}t(DrawEventType.DRAW_ADD,{position:o}),r=(new Date).getTime()},ScreenSpaceEventType$1.LEFT_CLICK),n.setInputAction(n=>{const r=e.scene.pick(n.endPosition),o=i.pickPosition(n.endPosition);t(DrawEventType.DRAW_MOVE,{position:o,pickPrimitive:r?.primitive,windowPosition:n.endPosition}),r&&t(DrawEventType.DRAW_PICK,{position:o,pickPrimitive:r?.primitive,windowPosition:n.endPosition})},ScreenSpaceEventType$1.MOUSE_MOVE),n.setInputAction(()=>{t(DrawEventType.DRAW_RIGHT_CLICK,{})},ScreenSpaceEventType$1.RIGHT_CLICK)},EditUIIconImages={add:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAQBJREFUWEft2MsNgkAQBuAZtABCBctBErvATryiRRibkKudGKvgwMFtQGIBumOAYAxCArsTs4fZ8w758032wSJ4PtDzfCABXTvEKhjmhXpka+0a6rueNWB0KgmAdLVLYq6QbAHDvEwDgksdzOAz5pKUgK6tFkERnCogq3iq1Ng8ERRBS4HBjTrKywMAqjnfJCKFAGlTg3ieU9vOJV1lq2O/bjhgcyv59yBt8LXpXzLYBFsE2toKojHX+z75kWc8iwsV0PLm8XVLArotivp/RFrsYiiCLnp1rQiKoKWAHHWWcJ8yZsFF8zbj5eNRt9VwPRp1hGyCrq0cq5eArrLeC74BlkT4KR3TrCoAAAAASUVORK5CYII=",delete:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAY9JREFUWEftmNFRwzAMhiVYAMoC5Y50jjAJ9LFliMIQNI/NJtA1CA9hAHIsgMWZYC5xHVtNajcHzqtl+ctvSZaNMPIPR84HEXDoDv1tBc/XxRMCpFaVEPNqcTXvq6RTwbOsSE8FTfUFBOKNE05NQsxRiK3u4/MEy49F8myDdwJOstcNEN32VWCouhHQu4JetnYPp84tVr4uHl8OGofvd7Ocw8kGnKwL4jjk2lTLhLU2y0guGgE7pI8KdsVkuBhEzDtPGstYEEAkmstyMcmKFRDcN9WyjUk774AKQEE1IW1jyt47IACV1XJ22VRNQqKgN70Im9qyAIASbRdST4qunjEQoB3S1tAGBATQY05iy7ObEDdHLzMmOFPi6KBBFLTBuSC9A5rg6pijqSm79TrpHRC021o7IdrZfbwy8wNpztYacgRlhtuitu38b3E/rt9Z/w+Q9czBVtV9RCpX7I7adTKw2QBAIFy7njz2Bvy+OGXFighS9pvMDjWVdXlKHrg/xFaQ6/DQdhFwqKJRwaEKfgEJRgs46ima/wAAAABJRU5ErkJggg==",remove:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAMdJREFUWEdjZBjkgHGQu49h1IGUxtBoCI6GIKUhQKn+0TQ4GoKUhgCl+kfT4GgIUhoClOofTYM0DUGh6bfrGRgYFSi1BJ9+xn//Dr7NVluASw3eKBaadvs/LR0HM/sfI4Pjh0zVA9jswulAgenXFZj+s9ynjwP/KH7I1HxAkgNBioWn3kr4z8RkT1tH/n/wLlO1kawopq3DiDN9tJghLpxwqxoNwdEQpDQEKNU/mgZHQ5DSEKBU/2gaHA1BSkOAUv2jaXDYhyAAbjwcKU1UyjYAAAAASUVORK5CYII=",move:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAkJJREFUWEftl19SwkAMxpPCARAvgDPijKewnER4BA8hHEJ5FE8CnsIZccZ6AJEDMF1Ny5Zu/6bNMvQBXmk3vyZfvmQRGv7DhvPBGVBaIasZ7M4/XwhoM74eScH0+9YAAzilhuHByttMbq5sQFoBNOE0lh1IMeDF83qJAG52tuSQIsBiODuZrA14+fQxVIhBUwSqA1hFmURcHPQIAIiLuo1TG5CguvP14z/Z1EcYtHzVi4ARpj7sXh3V/iLw30l/ULdhRIAUtDN/723Ht56RUYTpZtyf6f/qwtF7YkAdPAtQAmbdB08KSMF/Hm4WRRmpCkjeyWmc0hJHVlLSiaQ3gHYv/IidR7rM+6CDPZX7ZCFg0ueoW7fj/kqiLfoQ6u7DGcWQuYDHgNNQVSAzAZNwgQkjpDJHXldUSm1DDrTv01nHnmHmOQtGCpA3vsJwnJJ35mvXUbBkySJD5ylAPR04B54EMD7C4kJGBbMkdJn16BK3/FZq21GOc8eZ17lNYmZSeeHA76cgOZlOPpMse9G8zgUMOo3ErWC631c8H3Fk22bKlolCHzQgLRq1rk4ZHGtZIEjSUJneqo46zvhkAXI1VhWQe27pLOYe1FhAXapGLqzhddN3yYLQV9/myg9vwQQR3EdEGkz6pAL09KXJuECFUYIrAFcu8edqazDtk9nhOVZSBF4b0NhUIjM3Q0nhRCU2djtj4uznjvC6qc8XZTCer7gmbWTOOqDegpQCV3JRT+rRWgbrdCjnnTMgJ0tHsxlpcM77f6iGZThXF5iUAAAAAElFTkSuQmCC"};class DrawEditUI{static editUI;_editUi;viewer;_editUiPosition=null;_editPointPrimitive=null;_drawEditEvent;elementId="draw-edit-ui";constructor(e,t){this._editUi=null,this.viewer=e,this.create(),this.setVisible(!1),this.renderPosition(),this._drawEditEvent=t}create(){if(this._editUi=document.getElementById(this.elementId),this._editUi)return this._editUi;const e=document.createElement("DIV");e.id=this.elementId,e.className="draw-edit-ui";const t=document.createElement("DIV");t.title="点击移动节点";const i=document.createElement("img");i.src=EditUIIconImages.move,i.className="draw-edit-icon",t.appendChild(i),t.addEventListener("click",()=>{this._drawEditEvent.drawEditMove&&this._drawEditEvent.drawEditMove(this._editPointPrimitive)});const n=document.createElement("DIV");n.id="addPoint";const r=document.createElement("img");r.src=EditUIIconImages.add,r.title="点击添加节点",r.className="draw-edit-icon",n.appendChild(r),n.addEventListener("click",()=>{this._drawEditEvent.drawEditAdd&&this._drawEditEvent.drawEditAdd(this._editPointPrimitive)});const o=document.createElement("DIV"),a=document.createElement("img");o.id="removePoint",a.src=EditUIIconImages.remove,a.title="点击删除节点",a.className="draw-edit-icon",o.appendChild(a),o.addEventListener("click",()=>{this._drawEditEvent.drawEditRemove&&this._drawEditEvent.drawEditRemove(this._editPointPrimitive)});const s=document.createElement("DIV"),c=document.createElement("img");c.src=EditUIIconImages.delete,c.title="点击删除绘制",c.className="draw-edit-icon",s.appendChild(c),s.addEventListener("click",()=>{this._drawEditEvent.drawDelete&&this._drawEditEvent.drawDelete(this._editPointPrimitive)}),e.appendChild(t),e.appendChild(n),e.appendChild(o),e.appendChild(s),document.body.appendChild(e),this._editUi=e}setAddElementStatus(e){const t=document.getElementById("addPoint"),i=document.getElementById("removePoint");t&&(t.style.display=e?"block":"none"),i&&(i.style.display=e?"block":"none")}static createEditUi(e,t){return DrawEditUI.editUI||(DrawEditUI.editUI=new DrawEditUI(e,t)),DrawEditUI.editUI}showAt(e,t,i){this.setVisible(!0),this._editUiPosition=e,this._editPointPrimitive=t,this.setAddElementStatus(!ShapeDrawPointCount[i])}setVisible(e){this._editUi&&(this._editUi.style.display=e?"flex":"none")}renderPosition(){this.viewer.scene.postRender.addEventListener(()=>{if(this._editUiPosition&&this._editUi&&"flex"===this._editUi.style.display){const e=this.viewer.scene.cartesianToCanvasCoordinates(this._editUiPosition);this._editUi.style.position="fixed",this._editUi.style.top=e.y-28+"px",this._editUi.style.left=`${e.x+15}px`}})}destroy(){DrawEditUI.editUI&&(this._editUi&&this._editUi.parentNode.removeChild(this._editUi),this._editUi=null)}}initDrawActions();const createDrawHandler=e=>{let t;const i=[];let n=new Cartesian3$1(0,0,0);const r=[];let o,a;const s=Tooltip.createToolTip(e);let c=!1;initDrawEvent(e,(e,t)=>{o&&(["drawDbClick","drawPick","drawMove","drawRightClick"].includes(e)||o.isEditing)&&A[e]?.(t)});const l=new PrimitiveCollection;l.destroyPrimitives=!1,e.scene.primitives.add(l);const d=()=>{o&&(o.isEditing=!1,o.isDisAdd=!0,g(),y.id===o.id?h():(u(o.id),o={}))},u=e=>{const t=r.findIndex(t=>t.id===e);if(-1===t)return;const i=r[t];i.positions.length=0,r.splice(t,1),T.drawRemove&&T.drawRemove(i),setTimeout(()=>{i.measurePrimitive?.clearAllDiv(),l.remove(i?.primitives)},300)},h=()=>{if(y.id)return y.id="",o.isDisAdd=!0,o.isEditing=!0,y.originPosition?(o.positions.splice(y.index,1,y.originPosition),y.pointPrimitive.position=y.originPosition):o?.positions.splice(y.index,1),T.drawEditEnd&&T.drawEditEnd(o),setTimeout(()=>{o.isEditing=!1,o.isDisAdd=!1},300),n=new Cartesian3$1(0,0,0),a=void 0,void g();if((!ShapeDrawPointCount[o.shape]||ShapeDrawPointCount[o.shape]>2)&&o.positions&&o.positions.length>2){const e=c?2:1,t=o.pointPrimitives.get(o.positions.length-e);return o.pointPrimitives.remove(t),void o?.positions.splice(o.positions.length-e,1)}n=new Cartesian3$1(0,0,0),a=void 0,u(o.id),o={},g()},p=t=>{t||(t=o),e._element.style.cursor="default",n=new Cartesian3$1(0,0,0),t.positions.pop(),t.isDisAdd=!0,setTimeout(()=>{t.isEditing=!1,t.isDisAdd=!1,T.drawEnd&&T.drawEnd(t),o={}},300),a=void 0,g()},A={drawAdd:({position:e})=>{if(o.positions.push(e),c=!1,y.id)return T.drawEditEnd&&T.drawEditEnd(o),y.id="",void p();T.drawAdd&&T.drawAdd(e,o),o.positions.length>ShapeDrawPointCount[o.shape]&&p()},drawMove:({position:e,windowPosition:t})=>{if(c=!0,C(),e&&!o.isDisAdd&&o.isEditing){if(g(t),y.id)o.positions.splice(y.index,1,e),y.pointPrimitive.position=e;else{const t=o.positions.findIndex(e=>e.x===n.x&&e.y===n.y&&e.z===n.z);o.positions.push(e),-1!==t&&o.positions.splice(t,1)}n=e,T.drawMove&&T.drawMove(e,o)}},drawPick:({pickPrimitive:e,windowPosition:t})=>{o.isEditing||(e instanceof PointPrimitive||e instanceof Billboard)&&m(e,t)},drawDbClick:({position:e,windowPosition:t,pickPrimitive:i})=>{if(o.isEditing){if(ShapeDrawPointCount[o.shape])return;p()}else!o.isEditing&&i&&f(e,t,i)},drawRightClick:()=>{o.isEditing?h():t.setVisible(!1)}},m=(t,n)=>{const o=t.id.split("-")[1],c=r.find(e=>e.id===o);if(i.includes(t.id))return;if(!c)return;if(!c.edit)return;e._element.style.cursor="pointer";const l=c.style.point;l.image?(t.width=1.5*l.pixelSize,t.height=1.5*l.pixelSize):(t.pixelSize=1.5*l.pixelSize,t.outlineWidth=1.5*l.outlineWidth),a=t,s.showAt(n,DrawMessage.pointEnter),s.setVisible(!0)},f=(e,n,o)=>{if(o instanceof PointPrimitive||o instanceof Billboard){if(i.includes(o.id))return;const n=o.id.split("-")[1],a=r.find(e=>e.id===n);if(!a)return;if(!a.edit)return;t.showAt(e,o,a.shape),T.drawEditStart&&T.drawEditStart(a)}},g=t=>{if(!s)return void(e._element.style.cursor="default");if(!t||!o.positions)return e._element.style.cursor="default",void s.setVisible(!1);const i=ShapeDrawPointCount[o.shape]?"default":"default-dbclick";y.id?s.showAt(t,DrawMessage.drawEditMove[o.shape]||DrawMessage.drawEditMove.default):ShapeDrawPointCount[o.shape]!==o.positions.length?o.positions.length>1?s.showAt(t,DrawMessage.drawMove[i]||DrawMessage.drawMove[i]):s.showAt(t,DrawMessage.drawStart[i]||DrawMessage.drawStart.default):s.showAt(t,DrawMessage.drawEnd)},C=()=>{if(a){const e=a.id.split("-")[1],t=r.find(t=>t.id===e);if(!t)return;const i=t.style.point;i.image?(a.width=i.pixelSize,a.height=i.pixelSize):(a.pixelSize=i.pixelSize,a.outlineWidth=i.outlineWidth),g()}},y={},_={drawEditAdd:i=>{t.setVisible(!1);const{id:n,index:r,drawData:a}=E(i),s=new Cartesian3$1(i.position.x,i.position.y,i.position.z);a?.positions.splice(r,0,s),o=a;const c=I(s,o);e._element.style.cursor="move",Object.assign(y,{id:n,index:r+1,pointPrimitive:c,originPosition:s}),o.isEditing=!0},drawEditMove:i=>{t.setVisible(!1),e._element.style.cursor="move";const{id:n,index:r,drawData:a}=E(i);o=a,Object.assign(y,{id:n,index:r,pointPrimitive:i,originPosition:new Cartesian3$1(i.position.x,i.position.y,i.position.z)}),o.isEditing=!0},drawEditRemove:e=>{t.setVisible(!1);const{index:i,drawData:n}=E(e);n.isEditing=!0,n.isDisAdd=!0,n?.positions.splice(i,1),n?.pointPrimitives.remove(e),T.drawEditEnd&&T.drawEditEnd(n),setTimeout(()=>{n.isEditing=!1,n.isDisAdd=!1},300)},drawDelete:e=>{t.setVisible(!1);const{id:i}=E(e);u(i)}};t=DrawEditUI.createEditUi(e,_);const E=e=>{const t=e.id.split("-")[1],i=r.find(e=>e.id===t),n=i.positions.findIndex(t=>t.x===e.position.x&&t.y===e.position.y&&t.z===e.position.z);return{id:t,drawData:i,index:n}},b=(e,t)=>{const i=new PrimitiveCollection,n=new PointPrimitiveCollection,r=JSON.parse(JSON.stringify(DrawStyle));e.style&&(Object.assign(r.point,e.style.point||{}),Object.assign(r.polyline,e.style.polyline||{}),Object.assign(r.polygon,e.style.polygon||{}));const o={id:e.id,edit:e.edit||!1,measure:e.measure||!1,measureLabel:e.measureLabel||!1,disDepthFail:e.disDepthFail||!1,measureUnit:e.measureUnit||["m"],isEditing:!0,shape:e.shape,positions:t,clampToGround:e.clampToGround,pointPrimitives:n,primitives:i,style:r};return l.add(i),t.forEach(e=>{I(e,o)}),o},I=(e,t)=>{const i=t.style.point;return t.pointPrimitives.add({id:`draw-${t.id}-${numberId()}`,position:e,...i,color:Color.fromCssColorString(i.color),outlineColor:Color.fromCssColorString(i.outlineColor),disableDepthTestDistance:Number.POSITIVE_INFINITY})},S=t=>{const i=b({...t},t.positions);i.positions.push(i.positions[i.positions.length-1]),o=i,r.push(i),setDrawPrimitive(e,t.shape,i),t.measure&&setMeasurePrimitive(i,e),p(i)},T={};return{draw:t=>{e._element.style.cursor="crosshair",a=void 0,t.id=numberId();const i=b(t,[]);o=i,T.drawStart&&T.drawStart(i),r.push(i),setDrawPrimitive(e,t.shape,i),t.measure&&setMeasurePrimitive(i,e)},removeEditing:d,remove:e=>{u(e.id),g()},removeAll:()=>{r.forEach(e=>{e.measurePrimitive?.clearAllDiv()}),l.removeAll(),r.length=0,d()},setDrawStyle:e=>{Object.assign(DrawStyle.point,e.point),Object.assign(DrawStyle.polyline,e.polyline),Object.assign(DrawStyle.polygon,e.polygon)},setDrawItemStyle:(e,t)=>{if(-1===r.findIndex(t=>t.id===e.id))throw new Error("绘制对象不存在");Object.assign(e.style.point,t.point||{}),Object.assign(e.style.polyline,t.polyline||{}),Object.assign(e.style.polygon,t.polygon||{}),e.__needUpdateAppearance=!0,e.isEditing=!0,setTimeout(()=>{e.isEditing=!1,e.__needUpdateAppearance=!1},100)},setClampToGround:(e,t)=>{if(-1===r.findIndex(t=>t.id===e.id))throw new Error("绘制对象不存在");e.clampToGround=t,e.isEditing=!0,setTimeout(()=>{e.isEditing=!1,e.__needUpdateAppearance=!1},100)},Event:T,updateMeasureUnit:(e,t)=>{if(-1===r.findIndex(t=>t.id===e.id))throw new Error("绘制对象不存在");const i=e.primitives._primitives.find(e=>e instanceof MeasurePrimitive);i&&i.updateUnit(t)},reShowDrawData:S,reShowDrawDatas:e=>{e.forEach(e=>{S(e)})}}};var types=Object.freeze({__proto__:null});const CustomMaterial={PolylineFlow:"PolylineFlow",PolylineTrail:"PolylineTrail",CircleWave:"CircleWave",CircleRaderWave:"CircleRaderWave",CircleRaderFan:"CircleRaderFan",LightWall:"LightWall",CircleAperture:"CircleAperture",RadarScanCircle:"RadarScanCircle",EllipsoidElectric:"EllipsoidElectric",EllipsoidVScan:"EllipsoidVScan",EllipsoidHScan:"EllipsoidHScan",Corridor:"Corridor",Zaps:"Zaps"},initCustomMaterial=()=>{for(const e in CustomMaterial)Material$4[e]=CustomMaterial[e]};initCustomMaterial();const defaultOptions$b={color:"rgba(255,255,255,1)",speed:6*Math.random()};class PolylineTrailMaterialProperty extends BaseMaterialProperty{speed;color;name="";image="";constructor(e){super(),this.createPropertyDescriptors();const t={...defaultOptions$b,...e};this.image=t.image,this.name=`${CustomMaterial.PolylineTrail}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(e,t){return defined$1(t)||(t={}),t.color=Property.getValueOrClonedDefault(this.color,e,Color.WHITE,t.color),t.speed=this.speed,t.image=this.image,t}equals(e){return this===e||e instanceof PolylineTrailMaterialProperty&&this.speed===e.speed&&Property.equals(this.color,e.color)&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{image:this.image,color:Color.fromCssColorString("#ff0000"),speed:this.speed},source:source$9},translucent:()=>!0})}createPropertyDescriptors(){Object.defineProperties(this,{color:createPropertyDescriptor("color")})}}const createTrailMaterial=e=>{const t={...defaultOptions$b,...e};return new Material$4({fabric:{type:`${CustomMaterial.PolylineTrail}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),image:t.image,speed:t.speed},source:source$9},translucent:!0})},source$9="\n uniform sampler2D image;\n uniform vec4 color;\n uniform float speed;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float time = fract(czm_frameNumber * speed / 1000.0);\n vec4 colorImage = texture(image,st);\n vec3 fragColor = color.rgb;\n if(st.t > 0.45 && st.t < 0.55 ) {\n fragColor = vec3(1.0);\n }\n if(color.a == 0.0){\n material.alpha = colorImage.a * 1.5 * fract(st.s - time);\n material.diffuse = colorImage.rgb;\n }else{\n material.alpha = colorImage.a * color.a * 1.5 * smoothstep(.0,1., fract(st.s - time));\n material.diffuse = max(fragColor.rgb * material.alpha , fragColor.rgb);\n }\n return material;\n }\n\n",defaultOptions$a={color:"rgba(255,255,255,1)",speed:6,repeatCount:4,blendColor:!0};class PolylineFlowMaterialProperty extends BaseMaterialProperty{repeatCount;image;speed;color;blend;name="";constructor(e){super(),this.createPropertyDescriptors();const t={...defaultOptions$a,...e};this.name=`${CustomMaterial.PolylineFlow}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.image=t.image,this.repeatCount=t.repeatCount,this.blend=t.blendColor?1:0,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(e,t){return defined$1(t)||(t={}),t.color=Property.getValueOrClonedDefault(this.color,e,Color.WHITE,t.color),t.image=this.image,t.blend=this.blend,t.speed=this.speed,t.repeatCount=this.repeatCount,t}equals(e){return this===e||e instanceof PolylineFlowMaterialProperty&&this.speed===e.speed&&this.repeatCount===e.repeatCount&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:Color.fromCssColorString("#ffffff"),image:"",speed:this.speed,count:this.repeatCount,blend:this.blend},source:source$8},translucent:()=>!0})}createPropertyDescriptors(){Object.defineProperties(this,{color:createPropertyDescriptor("color")})}}const createPoylineFlowMaterial=e=>{const t={...defaultOptions$a,...e};return new Material$4({fabric:{type:CustomMaterial.PolylineFlow+numberId(),uniforms:{color:Color.fromCssColorString(t.color),image:t.image,speed:t.speed,count:t.repeatCount,blend:t.blendColor?1:0},source:source$8},translucent:!0})},source$8="\n uniform vec4 color;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n float time = fract(czm_frameNumber * speed / 1000.0);\n vec2 st = materialInput.st;\n vec4 colorImage = texture(image, vec2(fract( count * st.s - time),fract(st.t)));\n material.alpha = colorImage.a * color.a;\n if(blend > 0.5) {\n material.diffuse = (colorImage.rgb + color.rgb) * 2.0;\n } else {\n material.diffuse = color.rgb * 2.0 ;\n }\n return material;\n }\n",defaultOptions$9={color:"rgba(255,255,0,0.3)",speed:8,count:5,gradient:.3};class CircleWaveMaterialProperty extends BaseMaterialProperty{count;speed;gradient;color;name="";constructor(e){super(),e||(e={});const t={...defaultOptions$9,...e};this.name=`${CustomMaterial.CircleWave}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.count=t.count,this.gradient=t.gradient,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.color=this.color,t.speed=this.speed,t.repeatCount=this.count||defaultOptions$9.count,t}equals(e){return this===e||e instanceof CircleWaveMaterialProperty&&Property.equals(this.color,e.color)&&this.speed===e.speed&&this.count===e.count&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:new Color(1,0,0,.5),speed:this.speed,count:this.count,gradient:this.gradient},source:source$7},translucent:()=>!0})}}const createCircleWaveMaterial=e=>{const t={...defaultOptions$9,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.CircleWave}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed,count:t.count,gradient:t.gradient},source:source$7},translucent:!0})}},source$7="\n uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n if(count == 1.0){\n if(dis > per * 0.5){\n discard;\n }else {\n material.alpha = color.a * dis / per / 2.0;\n }\n } else {\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 999; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n }\n else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n }\n return material;\n }\n",defaultOptions$8={color:"rgba(255,255,255,1)",speed:8};class CircleRaderWaveMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$8,...e};this.name=`${CustomMaterial.CircleRaderWave}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof CircleRaderWaveMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$6},translucent:()=>!0})}}const createRaderWaveMaterial=e=>{const t={...defaultOptions$8,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.CircleRaderWave}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$6},translucent:!0})}},source$6="\n uniform vec4 color;\n uniform float speed;\n #define PI 3.14159265359\n float rand(vec2 co){\n return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec2 pos = st - vec2(0.5);\n float time = czm_frameNumber * speed / 1000.0 ;\n float r = length(pos);\n float t = atan(pos.y, pos.x) - time * 2.5;\n float a = (atan(sin(t), cos(t)) + PI)/(2.0*PI);\n float ta = 0.5;\n float v = smoothstep(ta-0.05,ta+0.05,a) * smoothstep(ta+0.05,ta-0.05,a);\n vec3 flagColor = color.rgb * v;\n float blink = pow(sin(time*1.5)*0.5+0.5, 0.8);\n flagColor = color.rgb * pow(a, 4.0*(.2+blink))*(sin(r*500.0)*.5+.5) ;\n flagColor = flagColor * pow(r, 0.4);\n material.alpha = length(flagColor) * 1.3;\n material.diffuse = flagColor * 3.0;\n return material;\n }\n",defaultOptions$7={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class CircleRaderFanMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$7,...e};this.name=`${CustomMaterial.CircleRaderFan}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof CircleRaderFanMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$5},translucent:()=>!0})}}const createCircleRaderFanMaterial=e=>{const t={...defaultOptions$7,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.CircleRaderFan}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$5},translucent:!0})}},source$5="\n uniform vec4 color;\n uniform float speed;\n #define PI 3.14159265359\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // 绘制边线\n float dis = distance(materialInput.st, vec2(0.5));\n float alpha = step((0.5- 0.01), dis);\n\n material.alpha = alpha;\n material.diffuse = color.rgb;\n\n // 绘制扇区\n vec2 xy = materialInput.st;\n float rx = xy.x - 0.5;\n float ry = xy.y - 0.5;\n float at = atan(ry, rx);\n float per = czm_frameNumber * speed / PI * 3.0 / 200.0;\n // 半径\n float radius = sqrt(rx * rx + ry * ry);\n // 扇区叠加旋转角度\n float current_radians = at + per;\n xy = vec2(cos(current_radians) * radius, sin(current_radians) * radius);\n xy = vec2(xy.x + 0.5, xy.y + 0.5);\n // 扇区渐变色渲染\n if (xy.y - xy.x < 0.0 && xy.x > 0.5 && xy.y > 0.5){\n material.alpha = (alpha + color.a) * dis;\n material.diffuse = color.rgb;\n }\n return material;\n }\n",defaultOptions$6={color:"rgba(255,255,0,0.3)",speed:8};class CircleApertureMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super(),e||(e={});const t={...defaultOptions$6,...e};this.name=`${CustomMaterial.CircleAperture}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.color=this.color,t.speed=this.speed,t}equals(e){return this===e||e instanceof CircleApertureMaterialProperty&&Property.equals(this.color,e.color)&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:new Color(1,0,0,.5),speed:this.speed},source:source$4},translucent:()=>!0})}}const createCircleApertureMaterial=e=>{const t={...defaultOptions$6,...e};return new Material$4({fabric:{type:`${CustomMaterial.CircleAperture}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$4},translucent:!0})},source$4="\n uniform vec4 color;\n uniform float speed;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float d = distance(st, vec2(0.5, 0.5));\n float alpha = step(.15, d) * step(d, .17) + step(.49, d) * step(d, 0.5) + d * d * step(d, 0.5);\n float movingCircleD = fract(czm_frameNumber * speed / 1000.0);\n alpha += step(movingCircleD, d) * step(d, movingCircleD + .015);\n material.diffuse = color.rgb;\n material.alpha = alpha;\n return material;\n }\n",createScanRadarMaterial=e=>{e||(e={});return new Material$4({fabric:{type:`${CustomMaterial.RadarScanCircle}-${numberId()}`,uniforms:{radians:3*Math.PI/8,bgColor:Color.fromCssColorString(e.bgColor||"rgba(0,255,0,0.2)"),sectorColor:Color.fromCssColorString(e.sectorColor||"rgba(152,18,8,.1)"),width:e.width||.003,offset:e.offset||0,count:e.count||3},source:materialSource},translucent:!0})},materialSource="\n uniform vec4 bgColor;\n uniform vec4 sectorColor;\n uniform float count;\n uniform float radians;\n uniform float width;\n uniform float offset;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5));\n\n float alpha;\n vec3 diffuse;\n // 绘制圆圈\n float sp = 1.0 / count / 2.0;\n float m = mod(dis, sp);\n alpha = step(sp * (1.0 - width * 10.0), m);\n // alpha = clamp(alpha, 0.2, 1.0);\n if (alpha < bgColor.a){\n alpha = bgColor.a;\n diffuse = bgColor.rgb;\n } else {\n diffuse = bgColor.rgb;\n }\n material.alpha = alpha;\n material.diffuse = diffuse;\n // 绘制十字线\n if ((st.s > 0.5 - width / 2.0 && st.s < 0.5 + width / 2.0) || (st.t > 0.5 - width / 2.0 && st.t < 0.5 + width / 2.0)) {\n material.alpha = 0.8;\n material.diffuse = bgColor.rgb;\n return material;\n }\n // 绘制光晕\n float ma = mod(dis + offset, 0.5);\n if (ma < 0.25){\n alpha = ma * 3.0 + alpha;\n } else{\n alpha = 3.0 * (0.5 - ma) + alpha;\n }\n material.alpha = alpha;\n material.diffuse = bgColor.rgb;\n // 绘制扇区\n vec2 xy = materialInput.st;\n float rx = xy.x - 0.5;\n float ry = xy.y - 0.5;\n float at = atan(ry, rx);\n // 半径\n float radius = sqrt(rx * rx + ry * ry);\n // 扇区叠加旋转角度\n float current_radians = at + radians;\n xy = vec2(cos(current_radians) * radius, sin(current_radians) * radius);\n xy = vec2(xy.x + 0.5, xy.y + 0.5);\n // 扇区渐变色渲染\n if (xy.y - xy.x < 0.0 && xy.x > 0.5 && xy.y > 0.5){\n material.alpha = alpha + sectorColor.a;\n material.diffuse = sectorColor.rgb;\n }\n return material;\n }\n",defaultOptions$5={color:"rgba(255,255,255,1)",count:3,duration:1500};class LightWallMaterialProperty extends BaseMaterialProperty{duration;count;vertical;direction;color;_time;image;name="";constructor(e){super();const t={...defaultOptions$5,...e};Object.prototype.hasOwnProperty.call(t,"vertical")||(t.vertical=1),this.name=`LightWall-${numberId()}`,this._time=(new Date).getTime(),this.color=Color.fromCssColorString(t.color),this.duration=t.duration,this.count=t.count,this.vertical=t.vertical,this.image=t.image,this.direction=t.direction,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(e,t){return defined$1(t)||(t={}),t.color=this.color,t.image=this.image,t.vertical=this.vertical,t.direction=this.direction,t.count=this.count,t.duration=this.duration,this.duration&&(t.time=((new Date).getTime()-this._time)%this.duration/this.duration),t}equals(e){return this===e||e instanceof LightWallMaterialProperty&&Property.equals(this.color,e.color)&&this.name===e.name&&this.image===e.image&&this.vertical===e.vertical&&this.direction===e.direction&&this.count===e.count&&this.duration===e.duration}init(){const e=getDirectionWallShader({count:this.count,vertical:this.vertical,direction:this.direction});Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,duration:this.duration,vertical:this.vertical,image:this.image,count:this.count,time:-20},source:e},translucent:()=>!0})}}const createLightWallMaterial=e=>{const t={...defaultOptions$5,...e};return{material:new Material$4({fabric:{type:`LightWall${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),duration:t.duration,vertical:t.vertical,image:t.image,count:t.count,time:-20},source:getDirectionWallShader({count:t.count,vertical:t.vertical,direction:t.direction})}})}},getDirectionWallShader=e=>{const t=e.vertical?"vertical":"standard",i=e.direction?"+":"-";let n="czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;";return n+="vertical"===t?`vec4 colorImage = texture(image, vec2(fract(float(${e.count})*st.t ${i} time)),fract(st.s));\n `:`vec4 colorImage = texture(image, vec2(fract(float(${e.count})*st.s ${i} time), fract(st.t)));\n `,n+="vec4 fragColor;\n fragColor.rgb = (colorImage.rgb+color.rgb) / 1.0;\n fragColor = czm_gammaCorrect(fragColor);\n material.diffuse = colorImage.rgb;\n material.alpha = colorImage.a * color.a;\n material.emission = fragColor.rgb;\n return material;\n }",n},defaultOptions$4={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class EllipsoidElectricMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$4,...e};this.name=`${CustomMaterial.EllipsoidElectric}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof EllipsoidElectricMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$3},translucent:()=>!0})}}const createEllipsoidElectricMaterial=e=>{const t={...defaultOptions$4,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.EllipsoidElectric}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$3},translucent:!0})}},source$3="\n uniform vec4 color;\n uniform float speed;\n #define pi 3.1415926535\n #define PI2RAD 0.01745329252\n #define TWO_PI (2. * PI)\n\n float rands(float p){\n return fract(sin(p) * 10000.0);\n }\n\n float noise(vec2 p){\n float time = fract( czm_frameNumber * speed / 1000.0);\n float t = time / 20000.0;\n\n if(t > 1.0) t -= floor(t);\n return rands(p.x * 14. + p.y * sin(t) * 0.5);\n }\n\n vec2 sw(vec2 p){\n return vec2(floor(p.x), floor(p.y));\n }\n\n vec2 se(vec2 p){\n return vec2(ceil(p.x), floor(p.y));\n }\n\n vec2 nw(vec2 p){\n return vec2(floor(p.x), ceil(p.y));\n }\n\n vec2 ne(vec2 p){\n return vec2(ceil(p.x), ceil(p.y));\n }\n\n float smoothNoise(vec2 p){\n vec2 inter = smoothstep(0.0, 1.0, fract(p));\n float s = mix(noise(sw(p)), noise(se(p)), inter.x);\n float n = mix(noise(nw(p)), noise(ne(p)), inter.x);\n return mix(s, n, inter.y);\n }\n\n float fbm(vec2 p){\n float z = 2.0;\n float rz = 0.0;\n vec2 bp = p;\n for(float i = 1.0; i < 6.0; i++){\n rz += abs((smoothNoise(p) - 0.5)* 2.0) / z;\n z *= 2.0;\n p *= 2.0;\n }\n return rz;\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec2 st2 = materialInput.st;\n float time = fract( czm_frameNumber * speed / 1000.0);\n if (st.t < 0.5) {\n discard;\n }\n st *= 4.;\n float rz = fbm(st);\n st /= exp(mod( time * 2.0, pi));\n rz *= pow(15., 0.9);\n vec4 temp = vec4(0);\n temp = mix( color / rz, vec4(color.rgb, 0.1), 0.2);\n if (st2.s < 0.05) {\n temp = mix(vec4(color.rgb, 0.1), temp, st2.s / 0.05);\n }\n if (st2.s > 0.95){\n temp = mix(temp, vec4(color.rgb, 0.1), (st2.s - 0.95) / 0.05);\n }\n material.diffuse = temp.rgb;\n material.alpha = temp.a * 2.0;\n return material;\n }\n",defaultOptions$3={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class EllipsoidVScanMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$3,...e};this.name=`${CustomMaterial.EllipsoidVScan}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof EllipsoidVScanMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$2},translucent:()=>!0})}}const createEllipsoidVScanMaterial=e=>{const t={...defaultOptions$3,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.EllipsoidVScan}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$2},translucent:!0})}},source$2="\n uniform vec4 color;\n uniform float speed;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float time = fract(czm_frameNumber * speed / 1000.0);\n float alpha = abs(smoothstep(0.5,1.,fract( -st.t - time)));\n alpha += .1;\n material.alpha = alpha;\n material.diffuse = color.rgb;\n return material;\n }\n",defaultOptions$2={name:"circle-fan",color:"rgba(255,255,255,1)",speed:8};class EllipsoidHScanMaterialProperty extends BaseMaterialProperty{speed;color;name="";constructor(e){super();const t={...defaultOptions$2,...e};this.name=`${CustomMaterial.EllipsoidHScan}-${numberId()}`,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return`${this.name}`}getValue(e,t){return defined$1(t)||(t={}),t.speed=this.speed,t}equals(e){return this===e||e instanceof EllipsoidHScanMaterialProperty&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(this.name,{fabric:{type:this.name,uniforms:{color:this.color,speed:6},source:source$1},translucent:()=>!0})}}const createEllipsoidHScanMaterial=e=>{const t={...defaultOptions$2,...e};return{material:new Material$4({fabric:{type:`${CustomMaterial.EllipsoidHScan}-${numberId()}`,uniforms:{color:Color.fromCssColorString(t.color),speed:t.speed},source:source$1},translucent:!0})}},source$1="\nuniform vec4 color; \nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st; \n float t = fract( czm_frameNumber * speed / 1000.0);; \n t *= 1.03;\n float alpha = smoothstep(t- 0.03, t, st.s) * step(-t, -st.s); \n alpha += 0.1;\n alpha *= step(-0.5, -abs(0.5-st.t)); \n material.diffuse = color.rgb;\n material.alpha = alpha;\n return material;\n}\n",defaultOptions$1={color:"rgba(255,255,255,1)",speed:1};class ZapsMaterialProperty extends BaseMaterialProperty{color;speed;name="";constructor(e){super();const t={...defaultOptions$1,...e};this.name=CustomMaterial.Zaps,this.color=Color.fromCssColorString(t.color),this.speed=t.speed,this.init()}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(){return this.name}getValue(e,t){return defined$1(t)||(t={}),t.color=this.color,t}equals(e){return this===e||e instanceof ZapsMaterialProperty&&Property.equals(this.color,e.color)&&this.speed===e.speed&&this.name===e.name}init(){Material$4[this.name]=this.name,Material$4._materialCache.addMaterial(CustomMaterial.Zaps,{fabric:{type:CustomMaterial.Zaps,uniforms:{uColor:this.color,speed:this.speed,uResolution:new Cartesian2(1024,1024)},source:source},translucent:()=>!0})}}const createZapsMaterial=e=>{const t={...defaultOptions$1,...e};return{material:new Material$4({fabric:{type:CustomMaterial.Zaps,uniforms:{uColor:Color.fromCssColorString(t.color),uSpeed:t.speed,uResolution:new Cartesian2(1024,1024)},source:source}})}},source="\n uniform float uSpeed;\n uniform vec4 uColor;\n uniform vec2 uResolution;\n\n void mainImage(out vec4 o, vec2 u, float time)\n {\n vec2 v = uResolution.xy;\n u = .2*(u+u-v)/v.y;\n\n vec4 z = o = vec4(1,2,3,0);\n for (float a = .5, t = time, i;\n ++i < 19.;\n o += (1. + cos(z+t))\n / length((1.+i*dot(v,v))\n * sin(1.5*u/(.5-dot(u,u)) - 9.*u.yx + t))\n )\n v = cos(++t - 7.*u*pow(a += .03, i)) - 5.*u,\n // use stanh here if shader has black artifacts\n // vvvv\n u += tanh(40. * dot(u *= mat2(cos(i + .02*t - vec4(0,11,33,0)))\n ,u)\n * cos(1e2*u.yx + t)) / 2e2\n + .2 * a * u\n + cos(4./exp(dot(o,o)/1e2) + t) / 3e2;\n\n o = 25.6 / (min(o, 13.) + 164. / o)\n - dot(u, u) / 250.;\n }\n\n czm_material czm_getMaterial(czm_materialInput materialInput) {\n float time = fract(czm_frameNumber * speed / 1000.0);\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec4 color = vec4(0.0,0.0,0.0,1.0);\n mainImage(color,materialInput.st * uResolution,time);\n\n material.diffuse = color.rgb * uColor.rgb;\n material.alpha = 0.33 + (sin(time * 0.3) + 1.0) / 3.0;\n return material;\n }\n ";class RadereScanPrimitive extends BasePrimitive{position;options;constructor(e){super(),this.options=e,this.position=e.position,this.setAppearance()}getGeometry(){return new CircleGeometry({center:this.position,radius:this.options.radius})}getPrimitive(){if(!this.needUpdate&&this._primitive)return this._primitive;const e=this.getGeometry();if(!e)return;const t={geometryInstances:new GeometryInstance({geometry:e}),appearance:this.appearance,asynchronous:!1};return this.options.ground?new GroundPrimitive(t):new Primitive$3(t)}setAppearance(e){e?this.appearance=e:(this.appearance=new MaterialAppearance({material:createScanRadarMaterial(this.options.materialOptions||{}),flat:!1,faceForward:!1,translucent:!0,closed:!1,...this.options.appearanceOptions||{}}),this.options.viewer.scene.preRender.addEventListener(()=>{this.appearance.material.uniforms.radians+=3*Math.PI/300}))}}const defaultOptions={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},fround=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),OFFSET_ZOOM=2,OFFSET_ID=3,OFFSET_PARENT=4,OFFSET_NUM=5,OFFSET_PROP=6;class Supercluster{constructor(e){this.options=Object.assign(Object.create(defaultOptions),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:t,minZoom:i,maxZoom:n}=this.options;t&&console.time("total time");const r=`prepare ${e.length} points`;t&&console.time(r),this.points=e;const o=[];for(let t=0;t<e.length;t++){const i=e[t];if(!i.geometry)continue;const[n,r]=i.geometry.coordinates,a=fround(lngX(n)),s=fround(latY(r));o.push(a,s,1/0,t,-1,1),this.options.reduce&&o.push(0)}let a=this.trees[n+1]=this._createTree(o);t&&console.timeEnd(r);for(let e=n;e>=i;e--){const i=+Date.now();a=this.trees[e]=this._createTree(this._cluster(a,e)),t&&console.log("z%d: %d clusters in %dms",e,a.numItems,+Date.now()-i)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let i=((e[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[1]));let r=180===e[2]?180:((e[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)i=-180,r=180;else if(i>r){const e=this.getClusters([i,n,180,o],t),a=this.getClusters([-180,n,r,o],t);return e.concat(a)}const a=this.trees[this._limitZoom(t)],s=a.range(lngX(i),latY(o),lngX(r),latY(n)),c=a.data,l=[];for(const e of s){const t=this.stride*e;l.push(c[t+OFFSET_NUM]>1?getClusterJSON(c,t,this.clusterProps):this.points[c[t+OFFSET_ID]])}return l}getChildren(e){const t=this._getOriginId(e),i=this._getOriginZoom(e),n="No cluster with the specified id.",r=this.trees[i];if(!r)throw new Error(n);const o=r.data;if(t*this.stride>=o.length)throw new Error(n);const a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),s=o[t*this.stride],c=o[t*this.stride+1],l=r.within(s,c,a),d=[];for(const t of l){const i=t*this.stride;o[i+OFFSET_PARENT]===e&&d.push(o[i+OFFSET_NUM]>1?getClusterJSON(o,i,this.clusterProps):this.points[o[i+OFFSET_ID]])}if(0===d.length)throw new Error(n);return d}getLeaves(e,t,i){t=t||10,i=i||0;const n=[];return this._appendLeaves(n,e,t,i,0),n}getTile(e,t,i){const n=this.trees[this._limitZoom(e)],r=Math.pow(2,e),{extent:o,radius:a}=this.options,s=a/o,c=(i-s)/r,l=(i+1+s)/r,d={features:[]};return this._addTileFeatures(n.range((t-s)/r,c,(t+1+s)/r,l),n.data,t,i,r,d),0===t&&this._addTileFeatures(n.range(1-s/r,c,1,l),n.data,r,i,r,d),t===r-1&&this._addTileFeatures(n.range(0,c,s/r,l),n.data,-1,i,r,d),d.features.length?d:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){const i=this.getChildren(e);if(t++,1!==i.length)break;e=i[0].properties.cluster_id}return t}_appendLeaves(e,t,i,n,r){const o=this.getChildren(t);for(const t of o){const o=t.properties;if(o&&o.cluster?r+o.point_count<=n?r+=o.point_count:r=this._appendLeaves(e,o.cluster_id,i,n,r):r<n?r++:e.push(t),e.length===i)break}return r}_createTree(e){const t=new KDBush$1(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let i=0;i<e.length;i+=this.stride)t.add(e[i],e[i+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,i,n,r,o){for(const a of e){const e=a*this.stride,s=t[e+OFFSET_NUM]>1;let c,l,d;if(s)c=getClusterProperties(t,e,this.clusterProps),l=t[e],d=t[e+1];else{const i=this.points[t[e+OFFSET_ID]];c=i.properties;const[n,r]=i.geometry.coordinates;l=lngX(n),d=latY(r)}const u={type:1,geometry:[[Math.round(this.options.extent*(l*r-i)),Math.round(this.options.extent*(d*r-n))]],tags:c};let h;h=s||this.options.generateId?t[e+OFFSET_ID]:this.points[t[e+OFFSET_ID]].id,void 0!==h&&(u.id=h),o.features.push(u)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){const{radius:i,extent:n,reduce:r,minPoints:o}=this.options,a=i/(n*Math.pow(2,t)),s=e.data,c=[],l=this.stride;for(let i=0;i<s.length;i+=l){if(s[i+OFFSET_ZOOM]<=t)continue;s[i+OFFSET_ZOOM]=t;const n=s[i],d=s[i+1],u=e.within(s[i],s[i+1],a),h=s[i+OFFSET_NUM];let p=h;for(const e of u){const i=e*l;s[i+OFFSET_ZOOM]>t&&(p+=s[i+OFFSET_NUM])}if(p>h&&p>=o){let e,o=n*h,a=d*h,A=-1;const m=(i/l<<5)+(t+1)+this.points.length;for(const n of u){const c=n*l;if(s[c+OFFSET_ZOOM]<=t)continue;s[c+OFFSET_ZOOM]=t;const d=s[c+OFFSET_NUM];o+=s[c]*d,a+=s[c+1]*d,s[c+OFFSET_PARENT]=m,r&&(e||(e=this._map(s,i,!0),A=this.clusterProps.length,this.clusterProps.push(e)),r(e,this._map(s,c)))}s[i+OFFSET_PARENT]=m,c.push(o/p,a/p,1/0,m,-1,p),r&&c.push(A)}else{for(let e=0;e<l;e++)c.push(s[i+e]);if(p>1)for(const e of u){const i=e*l;if(!(s[i+OFFSET_ZOOM]<=t)){s[i+OFFSET_ZOOM]=t;for(let e=0;e<l;e++)c.push(s[i+e])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,i){if(e[t+OFFSET_NUM]>1){const n=this.clusterProps[e[t+OFFSET_PROP]];return i?Object.assign({},n):n}const n=this.points[e[t+OFFSET_ID]].properties,r=this.options.map(n);return i&&r===n?Object.assign({},r):r}}function getClusterJSON(e,t,i){return{type:"Feature",id:e[t+OFFSET_ID],properties:getClusterProperties(e,t,i),geometry:{type:"Point",coordinates:[xLng(e[t]),yLat(e[t+1])]}}}function getClusterProperties(e,t,i){const n=e[t+OFFSET_NUM],r=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,o=e[t+OFFSET_PROP],a=-1===o?{}:Object.assign({},i[o]);return Object.assign(a,{cluster:!0,cluster_id:e[t+OFFSET_ID],point_count:n,point_count_abbreviated:r})}function lngX(e){return e/360+.5}function latY(e){const t=Math.sin(e*Math.PI/180),i=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return i<0?0:i>1?1:i}function xLng(e){return 360*(e-.5)}function yLat(e){const t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}class PointPrimitives extends BasePrimitive{options;pointPrimitives=new PrimitiveCollection;boundingSphere=new BoundingSphere(Cartesian3$1.ZERO,0);pointCollection;labelCollection;billboardCollection;clusterImageCache={};supercluster;constructor(e){super(),this.options=e,this.clacBoundingSphere(this.options.geoJson),this.options.point&&(this.pointCollection=new PointPrimitiveCollection,this.pointPrimitives.add(this.pointCollection)),this.options.billboard&&(this.billboardCollection=new BillboardCollection({scene:e.viewer.scene}),this.pointPrimitives.add(this.billboardCollection)),this.options.label&&(this.labelCollection=new LabelCollection({scene:e.viewer.scene}),this.pointPrimitives.add(this.labelCollection)),e.cluster?(this.supercluster=new Supercluster({radius:this.options.cluster?.radius||defaultClusterStyle.radius,maxZoom:this.options.cluster?.maxZoom||defaultClusterStyle.maxZoom}),this.initCluster(this.options.viewer,this.options.geoJson)):this.initCollection(this.options.geoJson)}initCollection=async e=>{await this.calcPointHeight(this.options.viewer,e);const t=[];e.features.forEach(e=>{if(t.push(Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],0)),this.options.point){this.pointCollection.add(this.createPoint(e)).properties=e.properties||{}}if(this.options.billboard){this.billboardCollection.add(this.createBillboard(e)).properties=e.properties||{}}if(this.options.label){this.labelCollection.add(this.createLabel(e)).properties=e.properties||{}}})};clacBoundingSphere(e){const t=e.features.map(e=>Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],0));BoundingSphere.fromPoints(t,this.boundingSphere)}createPoint(e){const t={...defaultPointStyle,...this.options.point,...e.properties?.style?.point};return{id:numberId(),position:Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],e.geometry.coordinates[2]),color:Color.fromCssColorString(t.color),pixelSize:t.pixelSize,outlineColor:Color.fromCssColorString(t.outlineColor),outlineWidth:t.outlineWidth,scaleByDistance:t.scaleByDistance,translucencyByDistance:t.translucencyByDistance,disableDepthTestDistance:t.disableDepthTestDistance,distanceDisplayCondition:t.distanceDisplayCondition}}createBillboard(e){const t={...defaultBillStyle,...this.options.billboard,...e.properties?.style?.billboard};return{id:numberId(),position:Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],e.geometry.coordinates[2]||0),image:t.image,scale:t.scale,width:e.properties?.cluster?void 0:t.width,height:e.properties?.cluster?void 0:t.height,color:e.properties?.cluster?void 0:Color.fromCssColorString(t.color),pixelOffset:Cartesian2.fromArray(t?.pixelOffset),horizontalOrigin:t.horizontalOrigin,verticalOrigin:t.verticalOrigin,heightReference:t.heightReference,scaleByDistance:t.scaleByDistance,translucencyByDistance:t.translucencyByDistance,disableDepthTestDistance:t.disableDepthTestDistance,distanceDisplayCondition:t.distanceDisplayCondition}}createLabel(e){const t={...defaultLabelStyle,...this.options.label,...e.properties?.style?.label};return{id:numberId(),position:Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],e.geometry.coordinates[2]||0),text:e.properties?.[t?.field]||t?.field,font:t?.font,fillColor:Color.fromCssColorString(t?.fillColor),outlineColor:Color.fromCssColorString(t?.outlineColor),outlineWidth:t?.outlineWidth,style:t?.style,scale:t?.scale,showBackground:t?.showBackground,backgroundColor:Color.fromCssColorString(t?.backgroundColor),backgroundPadding:Cartesian2.fromArray(t?.backgroundPadding),pixelOffset:Cartesian2.fromArray(t?.pixelOffset),horizontalOrigin:t.horizontalOrigin,verticalOrigin:t.verticalOrigin,heightReference:t?.heightReference,scaleByDistance:t?.scaleByDistance,translucencyByDistance:t.translucencyByDistance,disableDepthTestDistance:t?.disableDepthTestDistance,distanceDisplayCondition:t.distanceDisplayCondition}}initCluster=async(e,t)=>{this.supercluster.load(t.features);let i=getTimestamp();this.loadCluster(e),e.camera.changed.addEventListener(()=>{getTimestamp()-i<=500||(i=getTimestamp(),this.loadCluster(e))})};flyToChildByClusterId(e){const t=this.supercluster?.getChildren(e),i=t?.map(e=>Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1],0)),n=BoundingSphere.fromPoints(i);return this.options.viewer.camera.flyToBoundingSphere(n),t}loadCluster=e=>{const t=calcZoomFromCameraHeight(e.camera),i=e.camera.computeViewRectangle(),n=this.supercluster.getClusters([CesiumMath.toDegrees(i.west),CesiumMath.toDegrees(i.south),CesiumMath.toDegrees(i.east),CesiumMath.toDegrees(i.north)],t);this.clearCollection();const r=this.options.cluster.colorsByRate||defaultClusterStyle.colorsByRate,o={type:"FeatureCollection",features:n.map(e=>{const i=e.properties.point_count/this.options.geoJson.features.length,n=Object.keys(r).find(e=>i>Number(e))||"#ff0000";if(e.properties.cluster){const i=this.getClusterImageByCount(r[n],e.properties.point_count,t),o=16*(String(e.properties.point_count).length+1);e.properties.style={...e.properties.style,billboard:{...e.properties.style?.billboard,image:i,pixelOffset:[0,-o/12]}}}return e})};this.initCollection(o)};getClusterImageByCount(e,t,i){if(!this.clusterImageCache[t+e]){const n=16*(String(t).length+1);let r=-Math.PI/12;const o=Math.PI/2,a=Math.PI/6,s=document.createElement("canvas");s.width=n,s.height=n;const c=s.getContext("2d");c.save(),c.scale(n/24,n/24),c.beginPath(),c.arc(12,12,6,0,2*Math.PI),c.fillStyle=e,c.fill(),c.closePath(),c.lineWidth=2,c.fillStyle="rgba(255,255,255,1)",c.font=`${this.calcfontSize(i)}px Microsoft YaHei`,c.textAlign="center",c.textBaseline="middle",c.fillText(`${t}`,11.5,12.5);for(let t=0;t<3;t++)c.beginPath(),c.arc(12,12,8,r,r+o,!1),c.strokeStyle=Color.fromCssColorString(e).withAlpha(.4).toCssColorString(),c.stroke(),c.arc(12,12,11,r,r+o,!1),c.strokeStyle=Color.fromCssColorString(e).withAlpha(.2).toCssColorString(),c.stroke(),c.closePath(),r=r+o+a;c.restore(),this.clusterImageCache[t+e]=s.toDataURL()}return this.clusterImageCache[t+e]}calcfontSize(e){return e<4?4:e-1}async calcPointHeight(e,t){if(this.options.calcHeight)if(e.scene.terrainProvider instanceof EllipsoidTerrainProvider)t.features.forEach(e=>{3===e.geometry.coordinates.length?e.geometry.coordinates[2]=0:e.geometry.coordinates.push(0)});else{const i=e.scene.terrainProvider,n=t.features.map(e=>Cartographic.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1])),r=await sampleTerrainMostDetailed(i,n);t.features.forEach((e,t)=>{3===e.geometry.coordinates.length?e.geometry.coordinates[2]=r[t].height:e.geometry.coordinates.push(r[t].height)})}}clearCollection(){this.pointCollection?.removeAll(),this.billboardCollection?.removeAll(),this.labelCollection?.removeAll()}remove(){}removeAll(){this.clearCollection(),this.pointPrimitives.removeAll()}getPrimitive(){return this.pointPrimitives}}const defaultPointStyle={color:"rgba(81,255,0,0.8)",pixelSize:10,outlineColor:"rgba(255,0,0,0.8)",outlineWidth:1},defaultLabelStyle={font:"20px sans-serif",fillColor:"rgba(255,255,255,0.8)",outlineColor:"rgba(0,0,0,0.8)",backgroundColor:"rgba(0,0,0,1)",outlineWidth:2,pixelOffset:[0,0],backgroundPadding:[0,0],scale:1,disableDepthTestDistance:0,horizontalOrigin:0,verticalOrigin:0,heightReference:HeightReference$1.CLAMP_TO_GROUND},defaultBillStyle={image:"/icons/cesium-marker.png",scale:1,color:"rgba(255,0,0,1)",rotation:0,width:32,height:32,horizontalOrigin:0,verticalOrigin:0,pixelOffset:[0,-16],heightReference:HeightReference$1.CLAMP_TO_GROUND},defaultClusterStyle={radius:60,maxZoom:25,colorsByRate:{.1:"#ff0000",.01:"#ff00ff",.001:"blue",1e-4:"#00ff00"}},lineDefaultStyle$1={width:2,color:"rgba(0,255,0,0.8)"};class GroundPolylinePrimitives extends BasePrimitive{options;polylinePrimitives;constructor(e){super(),this.options=e,this.polylinePrimitives=void 0,this.options.material&&this.setMaterialAppearance(),this.initCollection()}initCollection(){const e=[],t=[];let i;this.options.geoJson.features.forEach(e=>{"MultiLineString"===e.geometry.type?e.geometry.coordinates.forEach(i=>{t.push({coordinates:i,properties:e.properties})}):t.push({coordinates:e.geometry.coordinates,properties:e.properties})}),t.forEach(t=>{const i=t.coordinates.map(e=>Cartesian3$1.fromDegrees(e[0],e[1],e[2])),n={...lineDefaultStyle$1,...this.options?.line,...t.properties?.style?.line};e.push(new GeometryInstance({id:numberId(),geometry:new GroundPolylineGeometry({positions:i,width:n?.width}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(Color.fromCssColorString(n.color))}}))}),i=this.appearance?this.appearance:new PolylineColorAppearance,this.polylinePrimitives=new GroundPolylinePrimitive({geometryInstances:e,appearance:i})}getPrimitive(){return this.polylinePrimitives}setMaterialAppearance(){this.appearance=new MaterialAppearance({material:this.options.material})}}const lineDefaultStyle={width:2,color:"rgba(0,255,0,0.8)"};class GroundPolygonPrimitives extends BasePrimitive{options;primitives;constructor(e){super(),this.options=e,this.primitives=void 0,this.initCollection()}initCollection(){const e=[];this.options.geoJson.features.forEach(t=>{let i;i="Polygon"===t.geometry.type?new PolygonHierarchy(Cartesian3$1.fromDegreesArray(t.geometry.coordinates[0].flat())):parseMPolygonToHierarchy(t.geometry);const n={...lineDefaultStyle,...this.options?.line,...t.properties?.style?.line},r=numberId();t.properties&&(t.properties.id=r);const o=new GeometryInstance({id:r,geometry:new PolygonGeometry({polygonHierarchy:i}),attributes:{color:ColorGeometryInstanceAttribute.fromColor(Color.fromCssColorString(n.color))}});e.push(o),o.properties=t.properties}),this.primitives=new GroundPrimitive({geometryInstances:e,appearance:new PerInstanceColorAppearance({})})}getPrimitive(){return this.primitives}getAppearance(e){this.appearance=e||new PolylineMaterialAppearance({material:Material$4.fromType("Color",{color:Color.fromCssColorString("rgba(81,255,0,0.8)")})})}}const parseMPolygonToHierarchy=e=>new PolygonHierarchy(Cartesian3$1.fromDegreesArray(e.coordinates[0][0].flat()));function sortKD(e,t,i,n,r,o){if(r-n<=i)return;const a=n+r>>1;select(e,t,a,n,r,o%2),sortKD(e,t,i,n,a-1,o+1),sortKD(e,t,i,a+1,r,o+1)}function select(e,t,i,n,r,o){for(;r>n;){if(r-n>600){const a=r-n+1,s=i-n+1,c=Math.log(a),l=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*l*(a-l)/a)*(s-a/2<0?-1:1);select(e,t,i,Math.max(n,Math.floor(i-s*l/a+d)),Math.min(r,Math.floor(i+(a-s)*l/a+d)),o)}const a=t[2*i+o];let s=n,c=r;for(swapItem(e,t,n,i),t[2*r+o]>a&&swapItem(e,t,n,r);s<c;){for(swapItem(e,t,s,c),s++,c--;t[2*s+o]<a;)s++;for(;t[2*c+o]>a;)c--}t[2*n+o]===a?swapItem(e,t,n,c):(c++,swapItem(e,t,c,r)),c<=i&&(n=c+1),i<=c&&(r=c-1)}}function swapItem(e,t,i,n){swap(e,i,n),swap(t,2*i,2*n),swap(t,2*i+1,2*n+1)}function swap(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function range(e,t,i,n,r,o,a){const s=[0,e.length-1,0],c=[];let l,d;for(;s.length;){const u=s.pop(),h=s.pop(),p=s.pop();if(h-p<=a){for(let a=p;a<=h;a++)l=t[2*a],d=t[2*a+1],l>=i&&l<=r&&d>=n&&d<=o&&c.push(e[a]);continue}const A=Math.floor((p+h)/2);l=t[2*A],d=t[2*A+1],l>=i&&l<=r&&d>=n&&d<=o&&c.push(e[A]);const m=(u+1)%2;(0===u?i<=l:n<=d)&&(s.push(p),s.push(A-1),s.push(m)),(0===u?r>=l:o>=d)&&(s.push(A+1),s.push(h),s.push(m))}return c}function within(e,t,i,n,r,o){const a=[0,e.length-1,0],s=[],c=r*r;for(;a.length;){const l=a.pop(),d=a.pop(),u=a.pop();if(d-u<=o){for(let r=u;r<=d;r++)sqDist(t[2*r],t[2*r+1],i,n)<=c&&s.push(e[r]);continue}const h=Math.floor((u+d)/2),p=t[2*h],A=t[2*h+1];sqDist(p,A,i,n)<=c&&s.push(e[h]);const m=(l+1)%2;(0===l?i-r<=p:n-r<=A)&&(a.push(u),a.push(h-1),a.push(m)),(0===l?i+r>=p:n+r>=A)&&(a.push(h+1),a.push(d),a.push(m))}return s}function sqDist(e,t,i,n){const r=e-i,o=t-n;return r*r+o*o}const defaultGetX=e=>e[0],defaultGetY=e=>e[1];class KDBush{constructor(e,t=defaultGetX,i=defaultGetY,n=64,r=Float64Array){this.nodeSize=n,this.points=e;const o=e.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(e.length),s=this.coords=new r(2*e.length);for(let n=0;n<e.length;n++)a[n]=n,s[2*n]=t(e[n]),s[2*n+1]=i(e[n]);sortKD(a,s,n,0,a.length-1,0)}range(e,t,i,n){return range(this.ids,this.coords,e,t,i,n,this.nodeSize)}within(e,t,i){return within(this.ids,this.coords,e,t,i,this.nodeSize)}}function PointClusterPrimitives(e){e=(void 0)(e,(void 0).EMPTY_OBJECT),this._enabled=(void 0)(e.enabled,!1),this._pixelRange=(void 0)(e.pixelRange,80),this._minimumClusterSize=(void 0)(e.minimumClusterSize,2),this._clusterBillboards=(void 0)(e.clusterBillboards,!0),this._clusterLabels=(void 0)(e.clusterLabels,!0),this._clusterPoints=(void 0)(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 Event,this.show=(void 0)(e.show,!0)}function getX(e){return e.coord.x}function getY(e){return e.coord.y}function expandBoundingBox(e,t){e.x-=t,e.y-=t,e.width+=2*t,e.height+=2*t}const labelBoundingBoxScratch=new BoundingRectangle;function getBoundingBox(e,t,i,n,r){if(defined$1(e._labelCollection)&&n._clusterLabels?r=Label.getScreenSpaceBoundingBox(e,t,r):defined$1(e._billboardCollection)&&n._clusterBillboards?r=Billboard.getScreenSpaceBoundingBox(e,t,r):defined$1(e._pointPrimitiveCollection)&&n._clusterPoints&&(r=PointPrimitive.getScreenSpaceBoundingBox(e,t,r)),expandBoundingBox(r,i),n._clusterLabels&&!defined$1(e._labelCollection)&&defined$1(e.id)&&hasLabelIndex(n,e.id.id)&&defined$1(e.id._label)){const o=n._collectionIndicesByEntity[e.id.id].labelIndex,a=n._labelCollection.get(o),s=Label.getScreenSpaceBoundingBox(a,t,labelBoundingBoxScratch);expandBoundingBox(s,i),r=BoundingRectangle.union(r,s,r)}return r}function addNonClusteredItem(e,t){if(e.clusterShow=!0,!defined$1(e._labelCollection)&&defined$1(e.id)&&hasLabelIndex(t,e.id.id)&&defined$1(e.id._label)){const i=t._collectionIndicesByEntity[e.id.id].labelIndex;t._labelCollection.get(i).clusterShow=!0}}function addCluster(e,t,i,n){const r={billboard:n._clusterBillboardCollection.add(),label:n._clusterLabelCollection.add(),point:n._clusterPointCollection.add()};r.billboard.show=!1,r.point.show=!1,r.label.show=!0,r.label.text=t.toLocaleString(),r.label.id=i,r.billboard.position=r.label.position=r.point.position=e,n._clusterEvent.raiseEvent(i,r)}function hasLabelIndex(e,t){return defined$1(e)&&defined$1(e._collectionIndicesByEntity[t])&&defined$1(e._collectionIndicesByEntity[t].labelIndex)}function getScreenSpacePositions(e,t,i,n,r){if(!defined$1(e))return;const o=e.length;for(let a=0;a<o;++a){const o=e.get(a);if(o.clusterShow=!1,!o.show||r._scene.mode===SceneMode$2.SCENE3D&&!n.isPointVisible(o.position))continue;const s=o.computeScreenSpacePosition(i);defined$1(s)&&t.push({index:a,collection:e,clustered:!1,coord:s})}}const pointBoundinRectangleScratch=new BoundingRectangle,totalBoundingRectangleScratch=new BoundingRectangle,neighborBoundingRectangleScratch=new BoundingRectangle;function createDeclutterCallback(e){return function(t){if(defined$1(t)&&t<.05||!e.enabled)return;const i=e._scene,n=e._labelCollection,r=e._billboardCollection,o=e._pointCollection;if(!defined$1(n)&&!defined$1(r)&&!defined$1(o)||!e._clusterBillboards&&!e._clusterLabels&&!e._clusterPoints)return;let a=e._clusterLabelCollection,s=e._clusterBillboardCollection,c=e._clusterPointCollection;defined$1(a)?a.removeAll():a=e._clusterLabelCollection=new LabelCollection({scene:i}),defined$1(s)?s.removeAll():s=e._clusterBillboardCollection=new BillboardCollection({scene:i}),defined$1(c)?c.removeAll():c=e._clusterPointCollection=new PointPrimitiveCollection;const l=e._pixelRange,d=e._minimumClusterSize,u=e._previousClusters,h=[],p=e._previousHeight,A=i.camera.positionCartographic.height,m=new EllipsoidalOccluder(i.mapProjection.ellipsoid,i.camera.positionWC),f=[];let g,C,y,_,E,b,I,S,T,v,x,w;e._clusterLabels&&getScreenSpacePositions(n,f,i,m,e),e._clusterBillboards&&getScreenSpacePositions(r,f,i,m,e),e._clusterPoints&&getScreenSpacePositions(o,f,i,m,e);const D=new KDBush(f,getX,getY,64,Int32Array);if(A<p)for(y=u.length,g=0;g<y;++g){const t=u[g];if(!m.isPointVisible(t.position))continue;const n=Billboard._computeScreenSpacePosition(Matrix4$1.IDENTITY,t.position,Cartesian3$1.ZERO,Cartesian2.ZERO,i);if(!defined$1(n))continue;const r=1-A/p;let o=t.width=t.width*r,a=t.height=t.height*r;o=Math.max(o,t.minimumWidth),a=Math.max(a,t.minimumHeight);const s=n.x-.5*o,c=n.y-.5*a,l=n.x+o,y=n.y+a;for(E=D.range(s,c,l,y),b=E.length,v=0,T=[],C=0;C<b;++C)I=E[C],S=f[I],S.clustered||(++v,x=S.collection,w=S.index,T.push(x.get(w).id));if(v>=d)for(addCluster(t.position,v,T,e),h.push(t),C=0;C<b;++C)f[E[C]].clustered=!0}for(y=f.length,g=0;g<y;++g){const t=f[g];if(t.clustered)continue;t.clustered=!0,x=t.collection,w=t.index;const i=x.get(w);_=getBoundingBox(i,t.coord,l,e,pointBoundinRectangleScratch);const n=BoundingRectangle.clone(_,totalBoundingRectangleScratch);E=D.range(_.x,_.y,_.x+_.width,_.y+_.height),b=E.length;const r=Cartesian3$1.clone(i.position);for(v=1,T=[i.id],C=0;C<b;++C)if(I=E[C],S=f[I],!S.clustered){const t=S.collection.get(S.index),i=getBoundingBox(t,S.coord,l,e,neighborBoundingRectangleScratch);Cartesian3$1.add(t.position,r,r),BoundingRectangle.union(n,i,n),++v,T.push(t.id)}if(v>=d){const t=Cartesian3$1.multiplyByScalar(r,1/v,r);for(addCluster(t,v,T,e),h.push({position:t,width:n.width,height:n.height,minimumWidth:_.width,minimumHeight:_.height}),C=0;C<b;++C)f[E[C]].clustered=!0}else addNonClusteredItem(i,e)}0===a.length&&(a.destroy(),e._clusterLabelCollection=void 0),0===s.length&&(s.destroy(),e._clusterBillboardCollection=void 0),0===c.length&&(c.destroy(),e._clusterPointCollection=void 0),e._previousClusters=h,e._previousHeight=A}}function createGetEntity(e,t,i,n){return function(r){let o=this[e];defined$1(this._collectionIndicesByEntity)||(this._collectionIndicesByEntity={});let a,s,c=this._collectionIndicesByEntity[r.id];if(defined$1(c)||(c=this._collectionIndicesByEntity[r.id]={billboardIndex:void 0,labelIndex:void 0,pointIndex:void 0}),defined$1(o)&&defined$1(c[n]))return o.get(c[n]);defined$1(o)||(o=this[e]=new t({scene:this._scene}));const l=this[i];return l.length>0?(a=l.pop(),s=o.get(a)):(s=o.add(),a=o.length-1),c[n]=a,Promise.resolve().then(()=>{this._clusterDirty=!0}),s}}function removeEntityIndicesIfUnused(e,t){const i=e._collectionIndicesByEntity[t];defined$1(i.billboardIndex)||defined$1(i.labelIndex)||defined$1(i.pointIndex)||delete e._collectionIndicesByEntity[t]}function disableCollectionClustering(e){if(!defined$1(e))return;const t=e.length;for(let i=0;i<t;++i)e.get(i).clusterShow=!0}function updateEnable(e){e.enabled||(defined$1(e._clusterLabelCollection)&&e._clusterLabelCollection.destroy(),defined$1(e._clusterBillboardCollection)&&e._clusterBillboardCollection.destroy(),defined$1(e._clusterPointCollection)&&e._clusterPointCollection.destroy(),e._clusterLabelCollection=void 0,e._clusterBillboardCollection=void 0,e._clusterPointCollection=void 0,disableCollectionClustering(e._labelCollection),disableCollectionClustering(e._billboardCollection),disableCollectionClustering(e._pointCollection))}PointClusterPrimitives.prototype._initialize=function(e){this._scene=e;const t=createDeclutterCallback(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)},Object.defineProperties(PointClusterPrimitives.prototype,{enabled:{get(){return this._enabled},set(e){this._enabledDirty=e!==this._enabled,this._enabled=e}},pixelRange:{get(){return this._pixelRange},set(e){this._clusterDirty=this._clusterDirty||e!==this._pixelRange,this._pixelRange=e}},minimumClusterSize:{get(){return this._minimumClusterSize},set(e){this._clusterDirty=this._clusterDirty||e!==this._minimumClusterSize,this._minimumClusterSize=e}},clusterEvent:{get(){return this._clusterEvent}},clusterBillboards:{get(){return this._clusterBillboards},set(e){this._clusterDirty=this._clusterDirty||e!==this._clusterBillboards,this._clusterBillboards=e}},clusterLabels:{get(){return this._clusterLabels},set(e){this._clusterDirty=this._clusterDirty||e!==this._clusterLabels,this._clusterLabels=e}},clusterPoints:{get(){return this._clusterPoints},set(e){this._clusterDirty=this._clusterDirty||e!==this._clusterPoints,this._clusterPoints=e}}}),PointClusterPrimitives.prototype.getLabel=createGetEntity("_labelCollection",LabelCollection,"_unusedLabelIndices","labelIndex"),PointClusterPrimitives.prototype.removeLabel=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!defined$1(this._labelCollection)||!defined$1(t)||!defined$1(t.labelIndex))return;const i=t.labelIndex;t.labelIndex=void 0,removeEntityIndicesIfUnused(this,e.id);const n=this._labelCollection.get(i);n.show=!1,n.text="",n.id=void 0,this._unusedLabelIndices.push(i),this._clusterDirty=!0},PointClusterPrimitives.prototype.getBillboard=createGetEntity("_billboardCollection",BillboardCollection,"_unusedBillboardIndices","billboardIndex"),PointClusterPrimitives.prototype.removeBillboard=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!defined$1(this._billboardCollection)||!defined$1(t)||!defined$1(t.billboardIndex))return;const i=t.billboardIndex;t.billboardIndex=void 0,removeEntityIndicesIfUnused(this,e.id);const n=this._billboardCollection.get(i);n.id=void 0,n.show=!1,n.image=void 0,this._unusedBillboardIndices.push(i),this._clusterDirty=!0},PointClusterPrimitives.prototype.getPoint=createGetEntity("_pointCollection",PointPrimitiveCollection,"_unusedPointIndices","pointIndex"),PointClusterPrimitives.prototype.removePoint=function(e){const t=this._collectionIndicesByEntity&&this._collectionIndicesByEntity[e.id];if(!defined$1(this._pointCollection)||!defined$1(t)||!defined$1(t.pointIndex))return;const i=t.pointIndex;t.pointIndex=void 0,removeEntityIndicesIfUnused(this,e.id);const n=this._pointCollection.get(i);n.show=!1,n.id=void 0,this._unusedPointIndices.push(i),this._clusterDirty=!0},PointClusterPrimitives.prototype.update=function(e){if(!this.show)return;let t;defined$1(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),defined$1(this._billboardCollection)&&this._billboardCollection.length>0&&!defined$1(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,updateEnable(this),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),defined$1(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),defined$1(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),defined$1(this._clusterPointCollection)&&this._clusterPointCollection.update(e),defined$1(this._labelCollection)&&this._labelCollection.update(e),defined$1(this._billboardCollection)&&this._billboardCollection.update(e),defined$1(this._pointCollection)&&this._pointCollection.update(e)},PointClusterPrimitives.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(),defined$1(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};class CircleAperturePrimitive extends BasePrimitive{position;options;constructor(e){super(),this.options=e,this.position=e.position,this.setAppearance()}getGeometry(){return new CircleGeometry({center:this.position,radius:this.options.radius})}getPrimitive(){if(!this.needUpdate&&this._primitive)return this._primitive;this.needUpdate=!1;const e=this.getGeometry();if(!e)return;const t={geometryInstances:new GeometryInstance({geometry:e}),appearance:this.appearance,asynchronous:!1};return this.options.ground?new GroundPrimitive(t):new Primitive$3(t)}setAppearance(e){this.appearance=e||new MaterialAppearance({material:createCircleApertureMaterial(this.options.materialOptions),flat:!1,faceForward:!1,translucent:!0,closed:!1})}}class GridPrimitives extends BasePrimitive{gridPrimitiveCollection=new PrimitiveCollection;polygonPrimitive;outlinePrimitive;options;constructor(e){super(),this.options=e,this.gridPrimitiveCollection=new PrimitiveCollection,this.polygonPrimitive=this.createGridPolygonPrimitive(),this.outlinePrimitive=this.createGridOutlinePrimitive()}createGridPolygonPrimitive(){if(!this.options.fill)return;const e=[];this.options.vertices.forEach(t=>{const i=Color.fromCssColorString(this.options.fillColor),n=makeGridToInstanceForBox(t.positions,i,`grid-${t.id}`);e.push(n)});const t=new Primitive$3({geometryInstances:e,appearance:new PerInstanceColorAppearance({flat:!0,translucent:!0}),asynchronous:!1});return this.gridPrimitiveCollection.add(t),t}createGridOutlinePrimitive(){if(!this.options.outline)return;const e=[];this.options.vertices.forEach(t=>{const i=Color.fromCssColorString(this.options.outlineColor),n=makeGridToInstanceForLine(t.positions,i,`grid-${t.id}`);e.push(n)});const t=new Primitive$3({geometryInstances:e,appearance:new PolylineColorAppearance({translucent:!0}),asynchronous:!1});return this.gridPrimitiveCollection.add(t),t}getPrimitive(){return this.gridPrimitiveCollection}selectGrids(e){const t=Color.fromCssColorString(this.options.fillSelectColor),i=Color.fromCssColorString(this.options.outlineSelectColor);e.forEach(e=>{if(this.polygonPrimitive){this.polygonPrimitive.getGeometryInstanceAttributes(e).color=ColorGeometryInstanceAttribute.toValue(t)}if(this.outlinePrimitive){this.outlinePrimitive.getGeometryInstanceAttributes(e).color=ColorGeometryInstanceAttribute.toValue(i)}})}unSelectGrids(e){const t=Color.fromCssColorString(this.options.fillColor),i=Color.fromCssColorString(this.options.outlineColor);e.forEach(e=>{if(this.polygonPrimitive){this.polygonPrimitive.getGeometryInstanceAttributes(e).color=ColorGeometryInstanceAttribute.toValue(t)}if(this.outlinePrimitive){this.outlinePrimitive.getGeometryInstanceAttributes(e).color=ColorGeometryInstanceAttribute.toValue(i)}})}}const createDivLabelHandler=e=>{const t=[],i={LEFT_CLICK:[]};return e.scene.postRender.addEventListener(()=>{t.forEach(t=>{if(t.distanceDisplayCondition){const i=Cartesian3$1.distance(t.position,e.camera.position);if(i>=t.distanceDisplayCondition.far||i<=t.distanceDisplayCondition.near)return void(t.divEle.style.display="none")}const i=e.scene.cartesianToCanvasCoordinates(t.position);if(i){t.divEle.style.display="block";const e=t.divEle.getBoundingClientRect();let n=2;"left"===t.align&&(n=e.width+t.offset.x),"right"===t.align&&(n=1),t.divEle.style.left=i.x/t.autoFit.x-(e.width+t.offset.x)/t.autoFit.x/n+"px",t.divEle.style.top=i.y/t.autoFit.y-(e.height+t.offset.y)/t.autoFit.y+"px"}else t.divEle.style.display="none"})}),{divLabels:t,set:n=>{const r={id:n.divEle.id||numberId(),...n};return r.autoFit||(r.autoFit=Cartesian2.fromElements(1,1)),r.offset||(r.offset=Cartesian2.fromElements(0,0)),r.align||(r.align="center"),r.divEle.id=r.id,r.divEle.style.position="absolute",r.userSelect||(r.divEle.style.userSelect="none"),r.parentEle?(r.parentEle.style.position="relative",r.parentEle.appendChild(r.divEle)):(e._element.style.position="relative",e._element.appendChild(r.divEle)),t.push(r),r.divEle.addEventListener("click",()=>{i.LEFT_CLICK.forEach(e=>{e(r)})}),r},setPosition:(e,i)=>{const n=t.findIndex(t=>t.id===e);if(-1!==n){t[n].position=i}},remove:e=>{const i=t.findIndex(t=>t.id===e.id);if(-1!==i){t[i].divEle.remove(),t.splice(i,1)}},removeAll:()=>{t.forEach(e=>{e.divEle.remove()}),t.length=0},removeById:e=>{const i=t.findIndex(t=>t.id===e);if(-1!==i){t[i].divEle.remove(),t.splice(i,1)}},addEventListener:(e,t)=>{i[e]&&i[e].push(t)}}},createFillVolumeHandler=e=>{const t=[],i=()=>{t.forEach(t=>{t.vloumePrimitive.removeAll(),e.scene.primitives.remove(t.vloumePrimitive)}),t.length=0};return{set:async i=>{const n=makePositionsClose(i.positions),r=new PrimitiveCollection({destroyPrimitives:!1}),o=new PrimitiveCollection({destroyPrimitives:!1}),a=new PointPrimitiveCollection,s=new LabelCollection;o.add(a),r.add(s),r.add(o),e.scene.primitives.add(r);const c=numberId();let l={};const d=n.map(e=>{const t=Cartographic.fromCartesian(e);return{lng:CesiumMath.toDegrees(t.longitude),lat:CesiumMath.toDegrees(t.latitude),height:t.height}}),u=Math.min(...d.map(e=>e.height)),h=polygon([d.map(e=>[e.lng,e.lat])]),p=area(h),A=Math.sqrt(area(h)/200),m=envelope(h),f=centroid(h),g=pointsWithinPolygon(pointGrid(bbox(m),A,{units:"meters"}),h).features.map(e=>Cartesian3$1.fromDegrees(e.geometry.coordinates[0],e.geometry.coordinates[1])),C=await e.scene.clampToHeightMostDetailed(g),{maxHeight:y,minHeight:_,digVolume:E,fillVolume:b,volumeLabel:I}=addVolume(C,A,f,s,p,u),S=addPolygon(n,u,r);return addWall(n,y,_,r),addPointLabel(n,d,s),l={id:c,maxHeight:y,minHeight:_,baseHeight:u,digVolume:E,fillVolume:b,cellsize:A,positions:n,centroid:f,area:p,heightPositions:C,polygonPrimitive:S,linePrimitive:o,labelPrimitive:s,vloumePrimitive:r,volumeLabel:I},t.push(l),l},changeBaseHeight:async i=>{const n=t.findIndex(e=>e.id===i.id);if(-1===n)return;const r=t[n];let o=(await pickPoint(e)).lnglat.height;o>i.maxHeight&&(o=i.maxHeight),o<i.minHeight&&(o=i.minHeight),r.baseHeight=Number(o.toFixed(2));const a=r.vloumePrimitive,s=r.labelPrimitive;r.polygonPrimitive&&a.remove(r.polygonPrimitive),r.volumeLabel&&s.remove(r.volumeLabel);const{positions:c,baseHeight:l,heightPositions:d,cellsize:u,centroid:h,area:p}=r,A=addPolygon(c,l,a),{digVolume:m,fillVolume:f,volumeLabel:g}=addVolume(d,u,h,s,p,l);t[n]={...r,digVolume:m,fillVolume:f,polygonPrimitive:A,volumeLabel:g}},remove:i=>{const n=t.findIndex(e=>e.id===i.id);-1!==n&&(i.vloumePrimitive.removeAll(),e.scene.primitives.remove(i.vloumePrimitive),t.splice(n,1))},removeAll:i,destroy:()=>{i()}}};function addWall(e,t,i,n){const r=WallGeometry.fromConstantHeights({positions:e,minimumHeight:i,maximumHeight:t}),o=new GeometryInstance({geometry:WallGeometry.createGeometry(r)});n.add(new Primitive$3({geometryInstances:[o],asynchronous:!1,appearance:new MaterialAppearance({translucent:!0,faceForward:!0,material:Material$4.fromType("Color",{color:Color.fromCssColorString("#00ff00").withAlpha(.5)})})}))}function addPolygon(e,t,i){const n=new GeometryInstance({geometry:new PolygonGeometry({polygonHierarchy:new PolygonHierarchy(e),height:t})});return i.add(new Primitive$3({allowPicking:!1,asynchronous:!1,geometryInstances:[n],appearance:new MaterialAppearance({translucent:!0,faceForward:!0,material:Material$4.fromType("Color",{color:Color.fromCssColorString("#0088ff").withAlpha(.5)})})}))}function addVolume(e,t,i,n,r,o){const a=e.map(e=>Cartographic.fromCartesian(e).height),s=Math.min(...a),c=Math.max(...a);let l=0;for(let e=0;e<a.length;e++)a[e]-o>0&&(l+=(a[e]-o)*t*t);let d=0;for(let e=0;e<a.length;e++)o-a[e]>0&&(d+=(o-a[e])*t*t);const u=Cartesian3$1.fromDegrees(i.geometry.coordinates[0],i.geometry.coordinates[1],c),h={};l?h["挖方体积"]=`${formatNumberWithUnit(l)}方\n`:l=0,d?h["填方体积"]=`${formatNumberWithUnit(d)}方\n`:d=0,r&&(h["横切面积"]=`${formatNumberWithUnit(r)}平方米\n`),s&&(h["最小高程"]=`${formatNumberWithUnit(s)}米\n`),c&&(h["最大高程"]=`${formatNumberWithUnit(c)}米\n`),s&&(h["基准面高程"]=`${formatNumberWithUnit(o)}米`);let p="";Object.keys(h).forEach(e=>{p+=`${e}:${h[e]}`});return{maxHeight:c,minHeight:s,digVolume:l,fillVolume:d,volumeLabel:n.add({position:u,text:p,font:"16px sans-serif",fillColor:Color.WHITE,showBackground:!0,style:LabelStyle$1.FILL_AND_OUTLINE,disableDepthTestDistance:Number.POSITIVE_INFINITY})}}function addPointLabel(e,t,i){e.forEach((e,n)=>{i.add({position:e,text:`高程:${formatNumberWithUnit(t[n].height)}米`,font:"14px sans-serif",fillColor:Color.WHITE,showBackground:!0,style:LabelStyle$1.FILL_AND_OUTLINE,disableDepthTestDistance:Number.POSITIVE_INFINITY})})}function formatNumberWithUnit(e){const t=["","万","百万","千万","亿"];let i=0;for(;e>=1e4&&i<t.length-1;)e/=1e4,i++;return`${e.toFixed(2).replace(/\.?0+$/,"")}${t[i]}`}const createGroundClipHandler=e=>{const t=new ClippingPolygonCollection({polygons:[]});e.scene.globe.clippingPolygons=t;const i=[],n=new CustomDataSource("ground-clip");e.dataSources.add(n);const r=()=>{t.isDestroyed()||t.removeAll(),i.length=0,n.entities.removeAll()};return{set:async r=>{if(t.isDestroyed())throw new Error("对象已被销毁");r={interCount:50,...r};let o=calcLerpPosition(makePositionsClose(r.positions),r.interCount);o=await e.scene.clampToHeightMostDetailed(o);const a=[],s=makeLnglatsToPositions(makePositionsToLnglats(o).map(e=>(a.push(e.height),e.height=-r.depth,e))),c=a.map(e=>e-r.depth),l=Math.min(...c),d=Array.from({length:c.length}).fill(l),u=n.entities.add({wall:{positions:s,minimumHeights:d,maximumHeights:a,material:new ImageMaterialProperty({image:`${window.INO_CESIUM_BASE_URL}/assets/images/ground-clip/wall.jpg`})},polygon:{hierarchy:s,height:l,material:new ImageMaterialProperty({image:`${window.INO_CESIUM_BASE_URL}/assets/images/ground-clip/poly-soil.jpg`})}}),h=new ClippingPolygon({positions:o});t.add(h);const p={id:numberId(),positions:o,clipPolygon:h,clipEntity:u};return i.push(p),p},remove:t=>{const r=i.findIndex(e=>e.id===t.id);-1!==r&&(i.splice(r,1),n.entities.remove(t.clipEntity),e.scene.globe.clippingPolygons.remove(t.clipPolygon))},removeAll:r,destroy:()=>{r(),t.destroy(),e.scene.globe.clippingPolygons=new ClippingPolygonCollection}}};function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}
|
|
56
56
|
/*!
|
|
57
57
|
* GSAP 3.13.0
|
|
58
58
|
* https://gsap.com
|