@mapgis/webclient-cesium-plugin 17.8.1 → 17.10.10
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/README.md +280 -482
- package/dist/esm/commonjsHelpers.js +1 -0
- package/dist/esm/s3m.js +1 -0
- package/dist/esm/webclient-cesium-plugin.js +1 -0
- package/dist/umd/webclient-cesium-plugin.min.js +1 -0
- package/{documention → documentation}/AlgorithmLib.html +169 -149
- package/{documention → documentation}/AngulationTool.html +85 -51
- package/{documention → documentation}/AnimationTool.html +30 -30
- package/{documention → documentation}/ArcGISMapServerImageryProvider.html +9 -13
- package/{documention → documentation}/ArcGISMapServerSingleImageryProvider.html +90 -30
- package/{documention → documentation}/ArcGISTileServerImageryProvider.html +17 -17
- package/{documention → documentation}/ArcGISVectorTileImageryProvider.html +21 -8
- package/{documention → documentation}/BaseImageryProvider.html +2 -2
- package/{documention → documentation}/Cesium.Material.html +2 -2
- package/{documention → documentation}/Cesium.Viewer.html +5 -5
- package/{documention → documentation}/Cesium3DTileset.html +43 -25
- package/{documention → documentation}/CesiumHeatmap.html +22 -19
- package/{documention/S3MTileset.html → documentation/CesiumNavigation.html} +52 -85
- package/{documention → documentation}/CesiumTerrainProvider.html +55 -15
- package/{documention/OpenWeatherImageryProvider.html → documentation/CircleWaveMaterialProperty.html} +75 -95
- package/{documention → documentation}/CollisionDetectionByRender.html +245 -88
- package/{documention → documentation}/CompatibleFunc.html +24 -33
- package/{documention → documentation}/CustomPrimitive.html +3 -5
- package/{documention → documentation}/CustomProjection.html +3 -3
- package/{documention → documentation}/CustomTilingScheme.html +35 -36
- package/{documention → documentation}/CutFillAnalysis.html +59 -27
- package/{documention → documentation}/CuttingTool.html +198 -103
- package/{documention → documentation}/Deferred.html +2 -2
- package/{documention → documentation}/DrawElement.html +418 -34
- package/{documention → documentation}/DrawTool.html +81 -29
- package/documentation/EditTool.html +2819 -0
- package/{documention → documentation}/FirstPersonPerspective.html +18 -10
- package/{documention → documentation}/FloodAnalysis.html +93 -23
- package/{documention → documentation}/FloodAnalysisReflection.html +18 -44
- package/documentation/FlowParticle.html +863 -0
- package/{documention → documentation}/Fluid.html +473 -74
- package/{documention → documentation}/FluidFoam.html +36 -16
- package/{documention → documentation}/FluidReflection.html +68 -15
- package/{documention → documentation}/FluidShadow.html +67 -14
- package/{documention → documentation}/FluidSourceCollection.html +14 -7
- package/{documention → documentation}/FluidSpecular.html +33 -14
- package/documentation/FluidSurfaceDistortion.html +682 -0
- package/documentation/FluidSurfaceFoam.html +1006 -0
- package/{documention → documentation}/FollowPerspective.html +15 -7
- package/{documention → documentation}/GeoJSONLayerUtil.html +38 -10
- package/documentation/GeoJSONLayerView.html +1353 -0
- package/{documention → documentation}/GlobeIndependentTranslucency.html +89 -6
- package/{documention → documentation}/GodPerspective.html +14 -6
- package/{documention → documentation}/Graphic.html +1053 -1042
- package/{documention → documentation}/GraphicTransformTool.html +65 -23
- package/{documention → documentation}/GraphicsLayer.html +359 -156
- package/{documention → documentation}/GraphicsLayerUtil.html +28 -10
- package/documentation/GraphicsLayerView.html +759 -0
- package/{documention/EditTool.html → documentation/HashMap.html} +253 -418
- package/{documention → documentation}/HeightLimited.html +54 -21
- package/documentation/IGSFeatureLayerUtil.html +840 -0
- package/documentation/IGSFeatureLayerView.html +1348 -0
- package/documentation/IGSMapImageLayerUtil.html +855 -0
- package/{documention/IGSFeatureLayerUtil.html → documentation/IGSMapImageLayerView.html} +68 -46
- package/documentation/IGSTileLayerView.html +658 -0
- package/{documention → documentation}/ISSceneLayerUtil.html +3 -3
- package/{documention → documentation}/KeyboardCameraController.html +54 -6
- package/documentation/LightningStorm.html +2073 -0
- package/documentation/MapGISClusterPrimitiveCollection.html +1050 -0
- package/{documention → documentation}/MapGISDynamicLabelCollection.html +370 -178
- package/{documention → documentation}/MapGISFeatureGridCollection.html +123 -89
- package/{documention → documentation}/MapGISImageServerImageryProvider.html +93 -71
- package/{documention → documentation}/MapGISImageServerSingleImageryProvider.html +140 -92
- package/{documention → documentation}/MapGISM3DSet.html +49 -33
- package/{documention → documentation}/MapGISMapServerImageryProvider.html +78 -87
- package/{documention → documentation}/MapGISMapServerSingleImageryProvider.html +111 -43
- package/{documention → documentation}/MapGISTerrainProvider.html +268 -208
- package/{documention → documentation}/MapGISTerrainService.html +124 -82
- package/{documention → documentation}/MapGISTileAvailability.html +104 -47
- package/{documention → documentation}/MapGISTileServerImageryProvider.html +76 -83
- package/{documention → documentation}/MapGISVectorTileImageryProvider.html +135 -115
- package/{documention → documentation}/MeasureAreaTool.html +53 -14
- package/{documention → documentation}/MeasureLengthTool.html +17 -14
- package/{documention → documentation}/MeasureSlopeTool.html +73 -34
- package/{documention/FlowParticle.html → documentation/ModelEditor.html} +132 -116
- package/{documention → documentation}/ModelFilterTool.html +27 -32
- package/{documention → documentation}/ModelTransformTool.html +195 -110
- package/{documention → documentation}/NavigationControl.html +25 -5
- package/{documention → documentation}/NavigationTool.html +36 -14
- package/{documention → documentation}/NormalPerspective.html +33 -7
- package/documentation/OpenWeatherImageryProvider.html +1133 -0
- package/{documention → documentation}/PointFluidSource.html +22 -13
- package/{documention → documentation}/PolylineTrailLinkMaterialProperty.html +104 -20
- package/{documention → documentation}/Popup.html +246 -63
- package/{documention/CesiumNavigation.html → documentation/PostProcessShaderBuilder.html} +10 -54
- package/{documention → documentation}/PostProcessStageLibrary.html +3127 -121
- package/{documention → documentation}/Promise.html +6 -6
- package/{documention → documentation}/ProviderBaseUrlRegExp.html +20 -4
- package/{documention → documentation}/Puddle.html +30 -9
- package/{documention → documentation}/RadarMaterialProperty.html +73 -18
- package/{documention → documentation}/ReImg.html +164 -15
- package/{documention → documentation}/RenderUtil.html +158 -6
- package/{documention → documentation}/ResetViewNavigationControl.html +28 -8
- package/{documention → documentation}/RiverGeometry.html +7 -7
- package/{documention → documentation}/RoamParticle.html +86 -79
- package/{documention → documentation}/RouteAnimationControl.html +37 -15
- package/{documention → documentation}/RouteAnimationLabel.html +39 -12
- package/{documention → documentation}/RouteAnimationModel.html +43 -16
- package/{documention → documentation}/RouteAnimationPath.html +156 -18
- package/{documention → documentation}/RouteAnimationPerspective.html +12 -3
- package/{documention → documentation}/RouteAnimationTool.html +244 -24
- package/documentation/S3MTileset.html +570 -0
- package/{documention → documentation}/SSR.html +20 -39
- package/{documention → documentation}/SceneView.html +615 -419
- package/documentation/SceneViewUtil.html +1253 -0
- package/documentation/Screenshot.html +964 -0
- package/{documention → documentation}/SelectTool.html +31 -77
- package/{documention → documentation}/ShadowRateAnalysis.html +236 -54
- package/{documention → documentation}/ShadowRateDrawCommand.html +18 -6
- package/{documention → documentation}/SingleImageryProvider.html +32 -10
- package/{documention → documentation}/SketchEditor.html +280 -127
- package/documentation/SkyLineAnalysis.html +576 -0
- package/{documention → documentation}/StableParticle.html +165 -46
- package/{documention → documentation}/Style.html +249 -249
- package/{documention → documentation}/TerrainAnalyse.html +391 -105
- package/{documention → documentation}/TerrainExcavateTool.html +99 -3
- package/{documention → documentation}/TerrainProfile.html +198 -56
- package/{documention → documentation}/ThemeManager.html +93 -42
- package/{documention → documentation}/Tooltip.html +35 -18
- package/documentation/TransformTool.html +1010 -0
- package/{documention → documentation}/TriangulationTool.html +122 -83
- package/documentation/UnderfluidCaustic.html +843 -0
- package/documentation/UnderfluidDistortion.html +600 -0
- package/documentation/UnderfluidFog.html +843 -0
- package/documentation/UnderfluidGodRay.html +843 -0
- package/documentation/UnderwaterCaustic.html +867 -0
- package/documentation/UnderwaterDistortion.html +578 -0
- package/documentation/UnderwaterFog.html +867 -0
- package/documentation/UnderwaterGodRay.html +821 -0
- package/{documention → documentation}/UrlTemplateImageryProvider.html +21 -9
- package/{documention → documentation}/UserInterfaceControl.html +28 -9
- package/documentation/VectorTileLayerUtil.html +1364 -0
- package/{documention → documentation}/VisiblityAnalysis.html +15 -12
- package/{documention → documentation}/VolumeCloud.html +113 -21
- package/{documention → documentation}/VolumeFluidSource.html +24 -8
- package/{documention → documentation}/WFSLayerUtil.html +39 -10
- package/documentation/WFSLayerView.html +1353 -0
- package/documentation/WMSLayerUtil.html +879 -0
- package/documentation/WMTSLayerUtil.html +877 -0
- package/documentation/WaterDepth.html +583 -0
- package/{documention → documentation}/WaterReflection.html +29 -26
- package/documentation/WaterSurface.html +2555 -0
- package/{documention/Underwater.html → documentation/WaterSurfaceDistortion.html} +79 -81
- package/documentation/WaterSurfaceFoam.html +1029 -0
- package/documentation/WaterSurfaceSSR.html +867 -0
- package/{documention → documentation}/WebMapServiceImageryProvider.html +8 -12
- package/{documention → documentation}/WebMapServiceSingleImageryProvider.html +94 -32
- package/{documention → documentation}/WebMapTileServiceImageryProvider.html +10 -15
- package/documentation/WebTileLayerUtil.html +877 -0
- package/{documention → documentation}/Wind3D.html +133 -54
- package/{documention → documentation}/ZoomNavigationControl.html +145 -9
- package/documentation/fonts/glyphicons-halflings-regular.svg +543 -0
- package/{documention → documentation}/global.html +14130 -2719
- package/{documention → documentation}/index.html +1 -1
- package/{documention → documentation}/initializeOptions.html +2 -2
- package/{documention → documentation}/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.EchartsLayer.html +96 -95
- package/{documention → documentation}/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.MapVLayer.html +47 -46
- package/{documention → documentation}/module.exports_module.exports.html +2 -2
- package/{documention → documentation}/nav.html +3267 -1392
- package/documentation/nav.json +320 -0
- package/documentation/styles/adminlte/AdminLTE.min.css +4966 -0
- package/documentation/styles/adminlte/skin-blue.min.css +135 -0
- package/documentation/styles/bootstrap.min.css +7005 -0
- package/documentation/styles/common.css +173 -0
- package/documentation/styles/examples.css +119 -0
- package/{documention → documentation}/styles/font-awesome.css +692 -687
- package/documentation/styles/header.css +558 -0
- package/documentation/styles/jaguar.css +551 -0
- package/{documention → documentation}/styles/prettify-tomorrow.css +59 -28
- package/{documention → documentation}/styles/style.customize.css +83 -99
- package/package.json +42 -22
- package/dist/es5/webclient-cesium-plugin.min.js +0 -77
- package/dist/es5/webclient-common.min.js +0 -159
- package/dist/webclient-cesium-plugin-es6.min.js +0 -77
- package/documention/CircleWaveMaterialProperty.html +0 -382
- package/documention/DynamicEntityVisualizer.html +0 -348
- package/documention/DynamicLabelLayer.html +0 -1841
- package/documention/GroundPrimitiveLayer.html +0 -1675
- package/documention/HashMap.html +0 -4197
- package/documention/ModelEditor.html +0 -374
- package/documention/SceneViewCesium.html +0 -5544
- package/documention/Screenshot.html +0 -773
- package/documention/SketchEditorCesium.html +0 -1571
- package/documention/createColorTexture.html +0 -369
- package/documention/fonts/glyphicons-halflings-regular.svg +0 -288
- package/documention/isCounterClockwise.html +0 -760
- package/documention/scripts/app.min.js +0 -1
- package/documention/scripts/jquery.min.map +0 -1
- package/documention/scripts/search.js +0 -20
- package/documention/scripts/sideBar.js +0 -228
- package/documention/scripts/underscore-min.map +0 -1
- package/documention/styles/adminlte/AdminLTE.min.css +0 -7
- package/documention/styles/adminlte/skin-blue.min.css +0 -1
- package/documention/styles/anchor.png +0 -0
- package/documention/styles/app.min.css +0 -1
- package/documention/styles/bootstrap.min.css +0 -6
- package/documention/styles/c.png +0 -0
- package/documention/styles/common.css +0 -175
- package/documention/styles/examples.css +0 -116
- package/documention/styles/header.css +0 -556
- package/documention/styles/iframe.css +0 -29
- package/documention/styles/jaguar.css +0 -553
- package/documention/styles/m.png +0 -0
- package/documention/styles/reset.css +0 -44
- package/documention/styles/up-arrow.png +0 -0
- package/documention/tutorial-1./345/277/253/351/200/237/345/205/245/351/227/250.html +0 -162
- /package/{documention → documentation}/fonts/fontawesome-webfont.woff2 +0 -0
- /package/{documention → documentation}/fonts/glyphicons-halflings-regular.eot +0 -0
- /package/{documention → documentation}/fonts/glyphicons-halflings-regular.ttf +0 -0
- /package/{documention → documentation}/fonts/glyphicons-halflings-regular.woff +0 -0
- /package/{documention → documentation}/fonts/glyphicons-halflings-regular.woff2 +0 -0
- /package/{documention → documentation}/scripts/adminlte/app.min.js +0 -0
- /package/{documention → documentation}/scripts/bootstrap.min.js +0 -0
- /package/{documention → documentation}/scripts/jquery.min.js +0 -0
- /package/{documention → documentation}/scripts/linenumber.js +0 -0
- /package/{documention → documentation}/scripts/main.js +0 -0
- /package/{documention → documentation}/scripts/prettify/Apache-License-2.0.txt +0 -0
- /package/{documention → documentation}/scripts/prettify/lang-css.js +0 -0
- /package/{documention → documentation}/scripts/prettify/prettify.js +0 -0
- /package/{documention → documentation}/scripts/underscore-min.js +0 -0
- /package/{documention → documentation}/styles/adminlte/font-awesome.min.css +0 -0
- /package/{documention → documentation}/styles/prettify-jsdoc.css +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}export{e as g};
|
package/dist/esm/s3m.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"fs";import t from"path";var r=Object.freeze({UNLOADED:0,LOADING:1,PARSING:2,READY:3,FAILED:4});function n(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var i=function e(t,r,i){function o(s,u){if(!r[s]){if(!t[s]){if(!u&&n)return n(s);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){return o(t[s][1][e]||e)},c,c.exports,e,t,r,i)}return r[s].exports}for(var a=n,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=[].slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)a.set(o=e[t],i),i+=o.length;return a}},o={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],2:[function(e,t,r){var n=e("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,r.string2buf=function(e){var t,r,i,o,a,s=e.length,u=0;for(o=0;o<s;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(u),a=0,o=0;a<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},r.buf2binstring=function(e){return u(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,o,s=t||e.length,l=new Array(2*s);for(n=0,r=0;r<s;)if((i=e[r++])<128)l[n++]=i;else if((o=a[i])>4)l[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r<s;)i=i<<6|63&e[r++],o--;o>1?l[n++]=65533:i<65536?l[n++]=i:(l[n++]=55296|(i-=65536)>>10&1023,l[n++]=56320|1023&i)}return u(l,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},{"./common":1}],3:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16}},{}],4:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,r){var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var o=n,a=i+r;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],6:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,r){t.exports=function(e,t){var r,n,i,o,a,s,u,l,c,d,f,p,_,A,m,C,y,E,h,B,T,x,b,g,v;g=e.input,i=(n=e.next_in)+(e.avail_in-5),v=e.output,a=(o=e.next_out)-(t-e.avail_out),s=o+(e.avail_out-257),u=(r=e.state).dmax,l=r.wsize,c=r.whave,d=r.wnext,f=r.window,p=r.hold,_=r.bits,A=r.lencode,m=r.distcode,C=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;e:do{_<15&&(p+=g[n++]<<_,p+=g[n++]<<(_+=8),_+=8),E=A[p&C];t:for(;;){if(p>>>=h=E>>>24,_-=h,0==(h=E>>>16&255))v[o++]=65535&E;else{if(!(16&h)){if(64&h){if(32&h){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}E=A[(65535&E)+(p&(1<<h)-1)];continue t}for(B=65535&E,(h&=15)&&(_<h&&(p+=g[n++]<<_,_+=8),B+=p&(1<<h)-1,p>>>=h,_-=h),_<15&&(p+=g[n++]<<_,p+=g[n++]<<(_+=8),_+=8),E=m[p&y];;){if(p>>>=h=E>>>24,_-=h,16&(h=E>>>16&255)){if(T=65535&E,_<(h&=15)&&(p+=g[n++]<<_,(_+=8)<h&&(p+=g[n++]<<_,_+=8)),(T+=p&(1<<h)-1)>u){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=h,_-=h,T>(h=o-a)){if((h=T-h)>c&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=0,b=f,0===d){if(x+=l-h,h<B){B-=h;do{v[o++]=f[x++]}while(--h);x=o-T,b=v}}else if(d<h){if(x+=l+d-h,(h-=d)<B){B-=h;do{v[o++]=f[x++]}while(--h);if(x=0,d<B){B-=h=d;do{v[o++]=f[x++]}while(--h);x=o-T,b=v}}}else if(x+=d-h,h<B){B-=h;do{v[o++]=f[x++]}while(--h);x=o-T,b=v}for(;B>2;)v[o++]=b[x++],v[o++]=b[x++],v[o++]=b[x++],B-=3;B&&(v[o++]=b[x++],B>1&&(v[o++]=b[x++]))}else{x=o-T;do{v[o++]=v[x++],v[o++]=v[x++],v[o++]=v[x++],B-=3}while(B>2);B&&(v[o++]=v[x++],B>1&&(v[o++]=v[x++]))}break}if(64&h){e.msg="invalid distance code",r.mode=30;break e}E=m[(65535&E)+(p&(1<<h)-1)]}}break}}while(n<i&&o<s);p&=(1<<(_-=(B=_>>3)<<3))-1,e.next_in=n-=B,e.next_out=o,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=o<s?s-o+257:257-(o-s),r.hold=p,r.bits=_}},{}],8:[function(e,t,r){var n=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),u=-2,l=12,c=30;function d(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(e.total_in=e.total_out=(t=e.state).total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):u}function _(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):u}function A(e,t){var r,n;return e&&e.state?(t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==(n=e.state).window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,_(e))):u}function m(e,t){var r,n;return e?(n=new f,e.state=n,n.window=null,0!==(r=A(e,t))&&(e.state=null),r):u}var C,y,E=!0;function h(e){if(E){var t;for(C=new n.Buf32(512),y=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,C,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,y,0,e.work,{bits:5}),E=!1}e.lencode=C,e.lenbits=9,e.distcode=y,e.distbits=5}function B(e,t,r,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,t,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}r.inflateReset=_,r.inflateReset2=A,r.inflateResetKeep=p,r.inflateInit=function(e){return m(e,15)},r.inflateInit2=m,r.inflate=function(e,t){var r,f,p,_,A,m,C,y,E,T,x,b,g,v,D,P,M,I,L,F,S,N,R,O,w=0,G=new n.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(r=e.state).mode===l&&(r.mode=13),A=e.next_out,p=e.output,_=e.next_in,f=e.input,y=r.hold,E=r.bits,T=m=e.avail_in,x=C=e.avail_out,N=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;E<16;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if(2&r.wrap&&35615===y){r.check=0,G[0]=255&y,G[1]=y>>>8&255,r.check=o(r.check,G,2,0),y=0,E=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",r.mode=c;break}if(8!=(15&y)){e.msg="unknown compression method",r.mode=c;break}if(E-=4,S=8+(15&(y>>>=4)),0===r.wbits)r.wbits=S;else if(S>r.wbits){e.msg="invalid window size",r.mode=c;break}r.dmax=1<<S,e.adler=r.check=1,r.mode=512&y?10:l,y=0,E=0;break;case 2:for(;E<16;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if(r.flags=y,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=c;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=c;break}r.head&&(r.head.text=y>>8&1),512&r.flags&&(G[0]=255&y,G[1]=y>>>8&255,r.check=o(r.check,G,2,0)),y=0,E=0,r.mode=3;case 3:for(;E<32;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}r.head&&(r.head.time=y),512&r.flags&&(G[0]=255&y,G[1]=y>>>8&255,G[2]=y>>>16&255,G[3]=y>>>24&255,r.check=o(r.check,G,4,0)),y=0,E=0,r.mode=4;case 4:for(;E<16;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}r.head&&(r.head.xflags=255&y,r.head.os=y>>8),512&r.flags&&(G[0]=255&y,G[1]=y>>>8&255,r.check=o(r.check,G,2,0)),y=0,E=0,r.mode=5;case 5:if(1024&r.flags){for(;E<16;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}r.length=y,r.head&&(r.head.extra_len=y),512&r.flags&&(G[0]=255&y,G[1]=y>>>8&255,r.check=o(r.check,G,2,0)),y=0,E=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((b=r.length)>m&&(b=m),b&&(r.head&&(S=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,f,_,b,S)),512&r.flags&&(r.check=o(r.check,f,b,_)),m-=b,_+=b,r.length-=b),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===m)break e;b=0;do{S=f[_+b++],r.head&&S&&r.length<65536&&(r.head.name+=String.fromCharCode(S))}while(S&&b<m);if(512&r.flags&&(r.check=o(r.check,f,b,_)),m-=b,_+=b,S)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===m)break e;b=0;do{S=f[_+b++],r.head&&S&&r.length<65536&&(r.head.comment+=String.fromCharCode(S))}while(S&&b<m);if(512&r.flags&&(r.check=o(r.check,f,b,_)),m-=b,_+=b,S)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;E<16;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if(y!==(65535&r.check)){e.msg="header crc mismatch",r.mode=c;break}y=0,E=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=l;break;case 10:for(;E<32;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}e.adler=r.check=d(y),y=0,E=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=A,e.avail_out=C,e.next_in=_,e.avail_in=m,r.hold=y,r.bits=E,2;e.adler=r.check=1,r.mode=l;case l:if(5===t||6===t)break e;case 13:if(r.last){y>>>=7&E,E-=7&E,r.mode=27;break}for(;E<3;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}switch(r.last=1&y,E-=1,3&(y>>>=1)){case 0:r.mode=14;break;case 1:if(h(r),r.mode=20,6===t){y>>>=2,E-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=c}y>>>=2,E-=2;break;case 14:for(y>>>=7&E,E-=7&E;E<32;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if((65535&y)!=(y>>>16^65535)){e.msg="invalid stored block lengths",r.mode=c;break}if(r.length=65535&y,y=0,E=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(b=r.length){if(b>m&&(b=m),b>C&&(b=C),0===b)break e;n.arraySet(p,f,_,b,A),m-=b,_+=b,C-=b,A+=b,r.length-=b;break}r.mode=l;break;case 17:for(;E<14;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if(r.nlen=257+(31&y),E-=5,r.ndist=1+(31&(y>>>=5)),E-=5,r.ncode=4+(15&(y>>>=5)),y>>>=4,E-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=c;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;E<3;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}r.lens[U[r.have++]]=7&y,y>>>=3,E-=3}for(;r.have<19;)r.lens[U[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N=s(0,r.lens,0,19,r.lencode,0,r.work,R={bits:r.lenbits}),r.lenbits=R.bits,N){e.msg="invalid code lengths set",r.mode=c;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;P=(w=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,M=65535&w,!((D=w>>>24)<=E);){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if(M<16)y>>>=D,E-=D,r.lens[r.have++]=M;else{if(16===M){for(O=D+2;E<O;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if(y>>>=D,E-=D,0===r.have){e.msg="invalid bit length repeat",r.mode=c;break}S=r.lens[r.have-1],b=3+(3&y),y>>>=2,E-=2}else if(17===M){for(O=D+3;E<O;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}E-=D,S=0,b=3+(7&(y>>>=D)),y>>>=3,E-=3}else{for(O=D+7;E<O;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}E-=D,S=0,b=11+(127&(y>>>=D)),y>>>=7,E-=7}if(r.have+b>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=c;break}for(;b--;)r.lens[r.have++]=S}}if(r.mode===c)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=c;break}if(r.lenbits=9,N=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,R={bits:r.lenbits}),r.lenbits=R.bits,N){e.msg="invalid literal/lengths set",r.mode=c;break}if(r.distbits=6,r.distcode=r.distdyn,N=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,R={bits:r.distbits}),r.distbits=R.bits,N){e.msg="invalid distances set",r.mode=c;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(m>=6&&C>=258){e.next_out=A,e.avail_out=C,e.next_in=_,e.avail_in=m,r.hold=y,r.bits=E,a(e,x),A=e.next_out,p=e.output,C=e.avail_out,_=e.next_in,f=e.input,m=e.avail_in,y=r.hold,E=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;P=(w=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,M=65535&w,!((D=w>>>24)<=E);){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if(P&&!(240&P)){for(I=D,L=P,F=M;P=(w=r.lencode[F+((y&(1<<I+L)-1)>>I)])>>>16&255,M=65535&w,!(I+(D=w>>>24)<=E);){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}y>>>=I,E-=I,r.back+=I}if(y>>>=D,E-=D,r.back+=D,r.length=M,0===P){r.mode=26;break}if(32&P){r.back=-1,r.mode=l;break}if(64&P){e.msg="invalid literal/length code",r.mode=c;break}r.extra=15&P,r.mode=22;case 22:if(r.extra){for(O=r.extra;E<O;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}r.length+=y&(1<<r.extra)-1,y>>>=r.extra,E-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;P=(w=r.distcode[y&(1<<r.distbits)-1])>>>16&255,M=65535&w,!((D=w>>>24)<=E);){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if(!(240&P)){for(I=D,L=P,F=M;P=(w=r.distcode[F+((y&(1<<I+L)-1)>>I)])>>>16&255,M=65535&w,!(I+(D=w>>>24)<=E);){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}y>>>=I,E-=I,r.back+=I}if(y>>>=D,E-=D,r.back+=D,64&P){e.msg="invalid distance code",r.mode=c;break}r.offset=M,r.extra=15&P,r.mode=24;case 24:if(r.extra){for(O=r.extra;E<O;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}r.offset+=y&(1<<r.extra)-1,y>>>=r.extra,E-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=c;break}r.mode=25;case 25:if(0===C)break e;if(r.offset>(b=x-C)){if((b=r.offset-b)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=c;break}g=b>r.wnext?r.wsize-(b-=r.wnext):r.wnext-b,b>r.length&&(b=r.length),v=r.window}else v=p,g=A-r.offset,b=r.length;b>C&&(b=C),C-=b,r.length-=b;do{p[A++]=v[g++]}while(--b);0===r.length&&(r.mode=21);break;case 26:if(0===C)break e;p[A++]=r.length,C--,r.mode=21;break;case 27:if(r.wrap){for(;E<32;){if(0===m)break e;m--,y|=f[_++]<<E,E+=8}if(e.total_out+=x-=C,r.total+=x,x&&(e.adler=r.check=r.flags?o(r.check,p,x,A-x):i(r.check,p,x,A-x)),x=C,(r.flags?y:d(y))!==r.check){e.msg="incorrect data check",r.mode=c;break}y=0,E=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;E<32;){if(0===m)break e;m--,y+=f[_++]<<E,E+=8}if(y!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=c;break}y=0,E=0}r.mode=29;case 29:N=1;break e;case c:N=-3;break e;case 31:return-4;default:return u}return e.next_out=A,e.avail_out=C,e.next_in=_,e.avail_in=m,r.hold=y,r.bits=E,(r.wsize||x!==e.avail_out&&r.mode<c&&(r.mode<27||4!==t))&&B(e,e.output,e.next_out,x-e.avail_out),x-=e.avail_out,e.total_in+=T-=e.avail_in,e.total_out+=x,r.total+=x,r.wrap&&x&&(e.adler=r.check=r.flags?o(r.check,p,x,e.next_out-x):i(r.check,p,x,e.next_out-x)),e.data_type=r.bits+(r.last?64:0)+(r.mode===l?128:0)+(20===r.mode||15===r.mode?256:0),(0===T&&0===x||4===t)&&0===N&&(N=-5),N},r.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):u},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,t,n,0)!==r.check?-3:B(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,r){var n=e("../utils/common"),i=15,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,l,c,d,f,p){var _,A,m,C,y,E,h,B,T,x=p.bits,b=0,g=0,v=0,D=0,P=0,M=0,I=0,L=0,F=0,S=0,N=null,R=0,O=new n.Buf16(16),w=new n.Buf16(16),G=null,U=0;for(b=0;b<=i;b++)O[b]=0;for(g=0;g<l;g++)O[t[r+g]]++;for(P=x,D=i;D>=1&&0===O[D];D--);if(P>D&&(P=D),0===D)return c[d++]=20971520,c[d++]=20971520,p.bits=1,0;for(v=1;v<D&&0===O[v];v++);for(P<v&&(P=v),L=1,b=1;b<=i;b++)if(L<<=1,(L-=O[b])<0)return-1;if(L>0&&(0===e||1!==D))return-1;for(w[1]=0,b=1;b<i;b++)w[b+1]=w[b]+O[b];for(g=0;g<l;g++)0!==t[r+g]&&(f[w[t[r+g]]++]=g);if(0===e?(N=G=f,E=19):1===e?(N=o,R-=257,G=a,U-=257,E=256):(N=s,G=u,E=-1),S=0,g=0,b=v,y=d,M=P,I=0,m=-1,C=(F=1<<P)-1,1===e&&F>852||2===e&&F>592)return 1;for(;;){h=b-I,f[g]<E?(B=0,T=f[g]):f[g]>E?(B=G[U+f[g]],T=N[R+f[g]]):(B=96,T=0),_=1<<b-I,v=A=1<<M;do{c[y+(S>>I)+(A-=_)]=h<<24|B<<16|T}while(0!==A);for(_=1<<b-1;S&_;)_>>=1;if(0!==_?(S&=_-1,S+=_):S=0,g++,0===--O[b]){if(b===D)break;b=t[r+f[g]]}if(b>P&&(S&C)!==m){for(0===I&&(I=P),y+=v,L=1<<(M=b-I);M+I<D&&!((L-=O[M+I])<=0);)M++,L<<=1;if(F+=1<<M,1===e&&F>852||2===e&&F>592)return 1;c[m=S&C]=P<<24|M<<16|y-d}}return 0!==S&&(c[y+S]=b-I<<24|64<<16),p.bits=P,0}},{"../utils/common":1}],10:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],"/lib/inflate.js":[function(e,t,r){var n=e("./zlib/inflate"),i=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),u=e("./zlib/zstream"),l=e("./zlib/gzheader"),c={}.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);this.header=new l,n.inflateGetHeader(this.strm,this.header)}function f(e,t){var r=new d(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}d.prototype.push=function(e,t){var r,s,u,l,d,f,p=this.strm,_=this.options.chunkSize,A=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,p.input="string"==typeof e?o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?new Uint8Array(e):e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(_),p.next_out=0,p.avail_out=_),(r=n.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&A&&(f="string"==typeof A?o.string2buf(A):"[object ArrayBuffer]"===c.call(A)?new Uint8Array(A):A,r=n.inflateSetDictionary(this.strm,f)),r===a.Z_BUF_ERROR&&!0===m&&(r=a.Z_OK,m=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&r!==a.Z_STREAM_END&&(0!==p.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(p.output,p.next_out),l=p.next_out-u,d=o.buf2string(p.output,u),p.next_out=l,p.avail_out=_-l,l&&i.arraySet(p.output,p.output,u,l,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(m=!0)}while((p.avail_in>0||0===p.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),p.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=d,r.inflate=f,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},r.ungzip=f},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js");function o(e,t,r,n){var i=e|t<<8,o=i>>11&31,a=i>>5&63,s=31&i;return r[n+0]=o<<3|o>>2,r[n+1]=a<<2|a>>4,r[n+2]=s<<3|s>>2,r[n+3]=255,i}function a(e,t,r,n){var i=0;6&n&&(i=8),function(e,t,r,n){for(var i=new Uint8Array(16),a=o(t[r+0],t[r+1],i,0),s=o(t[r+2],t[r+3],i,4),u=0;u<3;u++){var l=i[u],c=i[4+u];n&&a<=s?(i[8+u]=(l+c)/2,i[12+u]=0):(i[8+u]=(2*l+c)/3,i[12+u]=(l+2*c)/3)}i[11]=255,i[15]=n&&a<=s?0:255;var d=new Uint8Array(16);for(u=0;u<4;++u){var f=t[r+4+u];d[4*u+0]=3&f,d[4*u+1]=f>>2&3,d[4*u+2]=f>>4&3,d[4*u+3]=f>>6&3}for(u=0;u<16;++u)for(var p=4*d[u],_=0;_<4;++_)e[4*u+_]=i[p+_]}(e,t,r+i,!!(1&n)),2&n?function(e,t,r){for(var n=0;n<8;++n){var i=bytes[r+n],o=15&i,a=240&i;e[8*n+3]=o|o<<4,e[8*n+7]=a|a>>4}}(e,0,r):4&n&&function(e,t,r){var n=t[r+0],i=t[r+1],o=new Uint8Array(8);if(o[0]=n,o[1]=i,n<=i){for(var a=1;a<5;++a)o[1+a]=((5-a)*n+a*i)/5;o[6]=0,o[7]=255}else for(a=1;a<7;++a)o[1+a]=((7-a)*n+a*i)/7;var s=new Uint8Array(16),u=(r+=2,0);for(a=0;a<2;++a){for(var l=0,c=0;c<3;++c)l|=t[r++]<<8*c;for(c=0;c<8;++c)s[u++]=l>>3*c&7}for(a=0;a<16;++a)e[4*a+3]=o[s[a]]}(e,t,r)}function s(e){}s.decode=function(e,t,r,n,i){if(null!=e&&null!=n&&0!=r&&0!=t){var o;1&(o=i>11||5===i?4:33)&&32&o?function(e,t,r,n){for(var i=new Uint16Array(4),o=e,a=0,s=0,u=0,l=0,c=0,d=0,f=0,p=0,_=0,A=t/4,m=r/4,C=0;C<m;C++)for(var y=0;y<A;y++)i[0]=n[u=4*((m-C)*A+y)],i[1]=n[u+1],i[2]=5*(l=31&i[0])+3*(f=31&i[1])>>3|5*(c=2016&i[0])+3*(p=2016&i[1])>>3&2016|5*(d=63488&i[0])+3*(_=63488&i[1])>>3&63488,i[3]=5*f+3*l>>3|5*p+3*c>>3&2016|5*_+3*d>>3&63488,o[s=4*C*t+4*y]=i[3&(a=n[u+2])],o[s+1]=i[a>>2&3],o[s+2]=i[a>>4&3],o[s+3]=i[a>>6&3],o[s+=t]=i[a>>8&3],o[s+1]=i[a>>10&3],o[s+2]=i[a>>12&3],o[s+3]=i[a>>14],o[s+=t]=i[3&(a=n[u+3])],o[s+1]=i[a>>2&3],o[s+2]=i[a>>4&3],o[s+3]=i[a>>6&3],o[s+=t]=i[a>>8&3],o[s+1]=i[a>>10&3],o[s+2]=i[a>>12&3],o[s+3]=i[a>>14]}(e,t,r,n):function(e,t,r,n,i){for(var o=1&i?8:16,s=0,u=0;u<r;u+=4)for(var l=0;l<t;l+=4){var c=new Uint8Array(64);a(c,n,s,i);for(var d=0,f=0;f<4;++f)for(var p=0;p<4;++p){var _=l+p,A=u+f;if(_<t&&A<r)for(var m=4*(t*(r-A)+_),C=0;C<4;++C)e[m++]=c[d++];else d+=4}s+=o}}(e,t,r,n,o)}};var u=function(){var e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};var r,n="B9h79tEBBBE8fV9gBB9gVUUUUUEU9gIUUUB9gEUEU9gIUUUEUIKQBEEEDDDILLLVE9wEEEVIEBEOWEUEC+Q/IEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBEy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBDe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBIl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBLk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBOL79iv9rBRQ+x8yQDBK/qMEZU8jJJJJBCJ/EB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rADZ1JJJBHWCJ/ABAD9uC/wfBgGOCJDAOCJD6eHdAICEFHLCBHQDNINAQAE9PMEAdAEA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UCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIKKKEBCJWKLZ9tBB");var i=WebAssembly.instantiate(function(e){for(var r=new Uint8Array(e.length),n=0;n<e.length;++n){var i=e.charCodeAt(n);r[n]=i>96?i-71:i>64?i-65:i>47?i+4:i>46?63:62}var o=0;for(n=0;n<e.length;++n)r[o++]=r[n]<60?t[r[n]]:64*(r[n]-60)+r[++n];return r.buffer.slice(0,o)}(n),{}).then(function(e){(r=e.instance).exports.__wasm_call_ctors()});function o(e,t,n,i,o,a){var s=r.exports.sbrk,u=n+3&-4,l=s(u*i),c=s(o.length),d=new Uint8Array(r.exports.memory.buffer);d.set(o,c);var f=e(l,n,i,c,o.length);if(0==f&&a&&a(l,u,i),t.set(d.subarray(l,l+n*i)),s(l-s(0)),0!=f)throw new Error("Malformed buffer data: "+f)}var a={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},s={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:i,supported:!0,decodeVertexBuffer:function(e,t,n,i,s){o(r.exports.meshopt_decodeVertexBuffer,e,t,n,i,r.exports[a[s]])},decodeIndexBuffer:function(e,t,n,i){o(r.exports.meshopt_decodeIndexBuffer,e,t,n,i)},decodeIndexSequence:function(e,t,n,i){o(r.exports.meshopt_decodeIndexSequence,e,t,n,i)},decodeGltfBuffer:function(e,t,n,i,u,l){o(r.exports[s[u]],e,t,n,i,r.exports[a[l]])}}}();const l=function(){let e=!0;return function(t,r){const n=e?function(){if(r){const e=r.apply(t,arguments);return r=null,e}}:function(){};return e=!1,n}}()(void 0,function(){return l.toString().replace(/[\r\n]|\ +/g,"").search("(((.+)+)+)+$").toString().constructor(l).replace(/[\r\n]|\ +/g,"").search("(((.+)+)+)+$")});l();const c=1024;function d(e,t,r){let n=t.getUint32(r,!0);var i;return r+=Uint32Array.BYTES_PER_ELEMENT,{string:(i=(i=new Uint8Array(e,r,n)).subarray(0,0+i.byteLength),new TextDecoder("utf-8").decode(i)),bytesOffset:r+=n,length:n}}function f(e,t,r,n,i,o){let a,s=0;const l=i.vertexAttributes,d=i.attrLocation;switch(t){case 4:case 16:case 32:s=2*Uint16Array.BYTES_PER_ELEMENT,!(16&o)&&(16===t||32===t)&&(s=2*Float32Array.BYTES_PER_ELEMENT),a=new Uint8Array(e*s);break;case 64:case 128:s=4*Uint8Array.BYTES_PER_ELEMENT,a=new Uint8Array(4*e);break;case 512:case c:s=Float32Array.BYTES_PER_ELEMENT*r,a=new Uint8Array(e*r*4);break;default:s=4*Uint16Array.BYTES_PER_ELEMENT,a=new Uint8Array(e*s)}let f,p;switch(u.decodeVertexBuffer(a,e,s,n,n.length),t){case 1:d.aPosition=l.length,l.push({index:d.aPosition,typedArray:new Uint16Array(a.buffer,0,a.length/2),componentsPerAttribute:4,componentDatatype:5122,offsetInBytes:0,strideInBytes:0,normalize:!1}),i.verticesCount=e;break;case 4:d.aNormal=l.length,l.push({index:d.aNormal,typedArray:new Int16Array(a.buffer,0,a.length/2),componentsPerAttribute:2,componentDatatype:5122,offsetInBytes:0,strideInBytes:0,normalize:!1});break;case 16:16&o?(p=5122,f=new Uint16Array(a.buffer,0,a.length/2)):(p=5126,f=new Float32Array(a.buffer,0,a.length/4)),d.aTexCoord0=l.length,l.push({index:d.aTexCoord0,typedArray:f,componentsPerAttribute:2,componentDatatype:p,offsetInBytes:0,strideInBytes:0,normalize:!1});break;case 32:16&o?(p=5122,f=new Uint16Array(a.buffer,0,a.length/2)):(p=5126,f=new Float32Array(a.buffer,0,a.length/4)),d.aTexCoord1=l.length,l.push({index:d.aTexCoord1,typedArray:f,componentsPerAttribute:2,componentDatatype:p,offsetInBytes:0,strideInBytes:0,normalize:!1});break;case 64:d.aColor=l.length,l.push({index:d.aColor,typedArray:a,componentsPerAttribute:4,componentDatatype:5121,offsetInBytes:0,strideInBytes:0,normalize:!0});break;case 128:d.aSecondColor=l.length,l.push({index:d.aSecondColor,typedArray:a,componentsPerAttribute:4,componentDatatype:5120,offsetInBytes:0,strideInBytes:0,normalize:!1});break;case 512:d.aCustom0=l.length,l.push({index:d.aCustom0,typedArray:new Float32Array(a.buffer,0,a.length/4),componentsPerAttribute:r,componentDatatype:5126,offsetInBytes:0,strideInBytes:0,normalize:!1});break;case c:d.aCustom1=l.length,l.push({index:d.aCustom1,typedArray:new Float32Array(a.buffer,0,a.length/4),componentsPerAttribute:r,componentDatatype:5126,offsetInBytes:0,strideInBytes:0,normalize:!1})}}function p(e,t,r,n,i){const o=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.compressOptions=o;const a=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.minVerticesValue={x:0,y:0,z:0,w:0},n.minTexCoordValue=[{x:0,y:0},{x:0,y:0}],n.texCoordCompressConstant=[{x:0,y:0,z:0},{x:0,y:0,z:0}];for(let i=0;i<a;i++){const s=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT,n.vertCompressConstant=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,n.minVerticesValue.x=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,n.minVerticesValue.y=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,n.minVerticesValue.z=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT;const u=t.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT;const l=t.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT;const p=t.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT;const _=t.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT;const A=t.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT;const m=t.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT;const C=t.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT;const y=t.getFloat64(r,!0);r+=Float64Array.BYTES_PER_ELEMENT,n.minTexCoordValue[0].x=p,n.minTexCoordValue[0].y=_,n.minTexCoordValue[1].x=C,n.minTexCoordValue[1].y=y,n.texCoordCompressConstant[0].x=u,n.texCoordCompressConstant[0].y=l,n.texCoordCompressConstant[1].x=A,n.texCoordCompressConstant[1].y=m;const E=t.getInt32(r,!0);r+=Int32Array.BYTES_PER_ELEMENT;for(let i=0;i<E;i++){const i=t.getInt32(r,!0);r+=Int32Array.BYTES_PER_ELEMENT;let a=0;(512===i||i===c)&&(a=t.getInt32(r,!0),r+=Int32Array.BYTES_PER_ELEMENT);const u=t.getInt32(r,!0);r+=Int32Array.BYTES_PER_ELEMENT;const l=new Uint8Array(e,r,u);let d=(r+=Uint8Array.BYTES_PER_ELEMENT*u)%4;d&&(d=4-d),r+=d,f(s,i,a,l,n,o)}let h=d(e,t,r);r=h.bytesOffset,n.customVertexAttribute=JSON.parse(h.string);let B="aCustom"+n.customVertexAttribute.TextureCoordMatrix,T="aCustom"+n.customVertexAttribute.VertexWeight;void 0!==n.attrLocation[B]&&(n.attrLocation.aTextureCoordMatrix=n.attrLocation[B],i===a-1&&delete n.attrLocation[B]),void 0!==n.attrLocation[T]&&(n.attrLocation.aVertexWeight=n.attrLocation[T],i===a-1&&delete n.attrLocation[T]);let x=r%4;x&&(x=4-x),r+=x}return r}function _(e,t,r,n,i){const o=t.getInt32(r,!0);r+=Int32Array.BYTES_PER_ELEMENT;for(let i=0;i<o;i++){const i={},o=t.getInt32(r,!0);if(r+=Int32Array.BYTES_PER_ELEMENT,o<1)continue;const a=t.getInt8(r,!0);r+=Int8Array.BYTES_PER_ELEMENT,t.getInt8(r,!0),r+=Int8Array.BYTES_PER_ELEMENT;const s=t.getInt8(r,!0);r+=Int8Array.BYTES_PER_ELEMENT,t.getInt8(r,!0),r+=Int8Array.BYTES_PER_ELEMENT;const l=t.getInt32(r,!0);let c;r+=Int32Array.BYTES_PER_ELEMENT,13!==s?(c=new Uint8Array(e,r,l),r+=Uint8Array.BYTES_PER_ELEMENT*l):(c=new Uint32Array(e,r,l),r+=Uint32Array.BYTES_PER_ELEMENT*l);let f,p=r%4;p&&(p=4-p),r+=p,13!==s?(f=new Uint8Array(o*Uint32Array.BYTES_PER_ELEMENT),u.decodeIndexBuffer(f,o,Uint32Array.BYTES_PER_ELEMENT,c)):f=c;const _=t.getInt32(r,!0);r+=Int32Array.BYTES_PER_ELEMENT,i.indexType=a;const A=0===a?new Uint16Array(o):new Uint32Array(o);i.indicesCount=o;const m=new Uint32Array(f.buffer,f.byteOffset,f.byteLength/4);A.set(m,0),i.indicesTypedArray=A,i.primitiveType=s;for(let n=0;n<_;n++){const n=d(e,t,r);r=n.bytesOffset,i.materialCode=n.string}n.push(i),p=r%4,p&&(p=4-p),r+=p}return r}var A,m=(A=!0,function(e,t){var r=A?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return A=!1,r})(void 0,function(){return m.toString().replace(/[\r\n]|\ +/g,"").search("(((.+)+)+)+$").toString().constructor(m).replace(/[\r\n]|\ +/g,"").search("(((.+)+)+)+$")});m();function C(){}var y;function E(e){return null!=e}const h={BYTE:5120,DOUBLE:5130,FLOAT:5126,INT:5124,SHORT:5122,UNSIGNED_BYTE:5121,UNSIGNED_INT:5125,UNSIGNED_SHORT:5123,fromTypedArray:function(e){return e instanceof Int8Array?h.BYTE:e instanceof Uint8Array?h.UNSIGNED_BYTE:e instanceof Int16Array?h.SHORT:e instanceof Uint16Array?h.UNSIGNED_SHORT:e instanceof Int32Array?h.INT:e instanceof Uint32Array?h.UNSIGNED_INT:e instanceof Float32Array?h.FLOAT:e instanceof Float64Array?h.DOUBLE:void 0},getSizeInBytes:function(e){if(!E(e))throw new Error("value is required.");switch(e){case h.BYTE:return Int8Array.BYTES_PER_ELEMENT;case h.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case h.SHORT:return Int16Array.BYTES_PER_ELEMENT;case h.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case h.INT:return Int32Array.BYTES_PER_ELEMENT;case h.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case h.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case h.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new Error("componentDatatype is not a valid value.")}}},B={UNSIGNED_BYTE:5121,UNSIGNED_INT:5125,UNSIGNED_SHORT:5123};function T(e,t,r){var n,i=e.num_points(),o=r.num_components(),a=new y.AttributeQuantizationTransform;if(a.InitFromAttribute(r)){for(var s=new Array(o),u=0;u<o;++u)s[u]=a.min_value(u);n={quantizationBits:a.quantization_bits(),minValues:s,range:a.range(),octEncoded:!1}}y.destroy(a),(a=new y.AttributeOctahedronTransform).InitFromAttribute(r)&&(n={quantizationBits:a.quantization_bits(),octEncoded:!0}),y.destroy(a);var l,c=i*o;l=n?function(e,t,r,n,i){var o,a;n.quantizationBits<=8?(a=new y.DracoUInt8Array,o=new Uint8Array(i),t.GetAttributeUInt8ForAllPoints(e,r,a)):(a=new y.DracoUInt16Array,o=new Uint16Array(i),t.GetAttributeUInt16ForAllPoints(e,r,a));for(var s=0;s<i;++s)o[s]=a.GetValue(s);return y.destroy(a),o}(e,t,r,n,c):function(e,t,r,n){var i,o;switch(r.data_type()){case 1:case 11:o=new y.DracoInt8Array,i=new Int8Array(n),t.GetAttributeInt8ForAllPoints(e,r,o);break;case 2:o=new y.DracoUInt8Array,i=new Uint8Array(n),t.GetAttributeUInt8ForAllPoints(e,r,o);break;case 3:o=new y.DracoInt16Array,i=new Int16Array(n),t.GetAttributeInt16ForAllPoints(e,r,o);break;case 4:o=new y.DracoUInt16Array,i=new Uint16Array(n),t.GetAttributeUInt16ForAllPoints(e,r,o);break;case 5:case 7:o=new y.DracoInt32Array,i=new Int32Array(n),t.GetAttributeInt32ForAllPoints(e,r,o);break;case 6:case 8:o=new y.DracoUInt32Array,i=new Uint32Array(n),t.GetAttributeUInt32ForAllPoints(e,r,o);break;case 9:case 10:o=new y.DracoFloat32Array,i=new Float32Array(n),t.GetAttributeFloatForAllPoints(e,r,o)}for(var a=0;a<n;++a)i[a]=o.GetValue(a);return y.destroy(o),i}(e,t,r,c);var d=h.fromTypedArray(l);return{array:l,data:{componentsPerAttribute:o,componentDatatype:d,byteOffset:r.byte_offset(),byteStride:h.getSizeInBytes(d)*o,normalized:r.normalized(),quantization:n}}}function x(e,t,r,n){var i=r.vertexAttributes,o=r.attrLocation;if(r.compressOptions=0,E(n.posUniqueID)&&n.posUniqueID>=0){r.compressOptions|=1;var a=t.GetAttribute(e,n.posUniqueID),s=T(e,t,a),u=s.data.componentsPerAttribute;r.verticesCount=s.array.length/u,r.vertCompressConstant=s.data.quantization.range/(1<<s.data.quantization.quantizationBits),r.minVerticesValue={x:(A=s.data.quantization.minValues)[0],y:A[1],z:A[2],w:A[3]},u>3&&(r.minVerticesValue.w=A[3]),o.aPosition=i.length,i.push({index:o.aPosition,typedArray:s.array,componentsPerAttribute:u,componentDatatype:s.data.componentDatatype,offsetInBytes:s.data.byteOffset,strideInBytes:s.data.byteStride,normalize:s.data.normalized})}if(E(n.normalUniqueID)&&n.normalUniqueID>=0){r.compressOptions|=2;var l=t.GetAttribute(e,n.normalUniqueID),c=T(e,t,l);r.normalRangeConstant=(1<<c.data.quantization.quantizationBits)-1,o.aNormal=i.length,i.push({index:o.aNormal,typedArray:c.array,componentsPerAttribute:c.data.componentsPerAttribute,componentDatatype:c.data.componentDatatype,offsetInBytes:c.data.byteOffset,strideInBytes:c.data.byteStride,normalize:c.data.normalized})}if(E(n.colorUniqueID)&&n.colorUniqueID>=0){r.compressOptions|=4;var d=t.GetAttribute(e,n.colorUniqueID),f=T(e,t,d);o.aColor=i.length,i.push({index:o.aColor,typedArray:f.array,componentsPerAttribute:f.data.componentsPerAttribute,componentDatatype:f.data.componentDatatype,offsetInBytes:f.data.byteOffset,strideInBytes:f.data.byteStride,normalize:f.data.normalized})}for(var p=0;p<n.texCoordUniqueIDs.length;p++){r.texCoordCompressConstant=[],r.minTexCoordValue=[];var _=n.texCoordUniqueIDs[p];if(!(_<0)){var A,m=t.GetAttribute(e,_),C=T(e,t,m);E(C.data.quantization)&&(r.compressOptions|=16,r.texCoordCompressConstant.push(C.data.quantization.range/(1<<C.data.quantization.quantizationBits)),r.minTexCoordValue.push({x:(A=C.data.quantization.minValues)[0],y:A[1]}));var y="aTexCoord"+p;o[y]=i.length,i.push({index:o[y],typedArray:C.array,componentsPerAttribute:C.data.componentsPerAttribute,componentDatatype:C.data.componentDatatype,offsetInBytes:C.data.byteOffset,strideInBytes:C.data.byteStride,normalize:C.data.normalized}),r.textureCoordIsW=!0}}for(p=0;p<n.vertexAttrUniqueIDs.length;p++){var h=n.vertexAttrUniqueIDs[p];if(!(h<0)){var B=t.GetAttribute(e,h),x=T(e,t,B);o.aVertexWeight=i.length,i.push({index:o.aVertexWeight,typedArray:x.array,componentsPerAttribute:x.data.componentsPerAttribute,componentDatatype:x.data.componentDatatype,offsetInBytes:x.data.byteOffset,strideInBytes:x.data.byteStride,normalize:x.data.normalized}),r.customVertexAttribute={VertexWeight:0}}}}B.createTypedArray=function(e,t){if(!E(e))throw new Error("numberOfVertices is required.");return e>=65536?new Uint32Array(t):new Uint16Array(t)},C.dracoDecodePointCloud=function(e,t,r,n,i){for(var o=new(y=e).Decoder,a=["POSITION","NORMAL","COLOR"],s=0;s<a.length;++s)o.SkipAttributeTransform(y[a[s]]);var u=new y.DecoderBuffer;if(u.Init(t,r),o.GetEncodedGeometryType(u)!==y.POINT_CLOUD)throw new Error("Draco geometry type must be POINT_CLOUD.");var l=new y.PointCloud,c=o.DecodeBufferToPointCloud(u,l);if(!c.ok()||0===l.ptr)throw new Error("Error decoding draco point cloud: "+c.error_msg());y.destroy(u),x(l,o,n,i),y.destroy(l),y.destroy(o)},C.dracoDecodeMesh=function(e,t,r,n,i,o){for(var a=new(y=e).Decoder,s=["POSITION","NORMAL","COLOR","TEX_COORD"],u=0;u<s.length;++u)a.SkipAttributeTransform(y[s[u]]);var l=new y.DecoderBuffer;if(l.Init(t,r),a.GetEncodedGeometryType(l)!==y.TRIANGULAR_MESH)throw new Error("Unsupported draco mesh geometry type.");var c=new y.Mesh;if(!a.DecodeBufferToMesh(l,c).ok()||0===c.ptr)return!1;y.destroy(l),x(c,a,n,o);var d=function(e,t){for(var r=e.num_points(),n=e.num_faces(),i=new y.DracoInt32Array,o=3*n,a=B.createTypedArray(r,o),s=0,u=0;u<n;++u)t.GetFaceFromMesh(e,u,i),a[s+0]=i.GetValue(0),a[s+1]=i.GetValue(1),a[s+2]=i.GetValue(2),s+=3;var l=B.UNSIGNED_SHORT;return a instanceof Uint32Array&&(l=B.UNSIGNED_INT),y.destroy(i),{typedArray:a,numberOfIndices:o,indexDataType:l}}(c,a);i.indicesTypedArray=d.typedArray,i.indicesCount=d.numberOfIndices,i.indexType=d.indexDataType,i.primitiveType=4,y.destroy(c),y.destroy(a)};var b,g=(b=!0,function(e,t){var r=b?function(){if(t){var r=t.apply(e,arguments);return t=null,r}}:function(){};return b=!1,r})(void 0,function(){return g.toString().replace(/[\r\n]|\ +/g,"").search("(((.+)+)+)+$").toString().constructor(g).replace(/[\r\n]|\ +/g,"").search("(((.+)+)+)+$")});function v(e){return null!=e}g();var D=[];function P(e,t,r){let n=t.getUint32(r,!0);var i;return r+=Uint32Array.BYTES_PER_ELEMENT,{string:(i=(i=new Uint8Array(e,r,n)).subarray(0,0+i.byteLength),new TextDecoder("utf-8").decode(i)),bytesOffset:r+=n,length:n}}function M(e,t,r,n,i,o,a){3===i&&(t.getInt32(r,!0),r+=Int32Array.BYTES_PER_ELEMENT),i>=2&&(t.getInt32(r,!0),r+=Int32Array.BYTES_PER_ELEMENT);var s,u={};u.posUniqueID=t.getInt32(r,!0),r+=Int32Array.BYTES_PER_ELEMENT,u.normalUniqueID=t.getInt32(r,!0),r+=Int32Array.BYTES_PER_ELEMENT,u.colorUniqueID=t.getInt32(r,!0),r+=Int32Array.BYTES_PER_ELEMENT,u.secondColorUniqueID=t.getInt32(r,!0),r+=Int32Array.BYTES_PER_ELEMENT,3===i?(s=t.getUint32(r,!0),r+=Int32Array.BYTES_PER_ELEMENT):(s=t.getUint16(r,!0),r+=Int16Array.BYTES_PER_ELEMENT);for(var l=[],c=0;c<s;c++){var d=t.getInt32(r,!0);l.push(d),r+=Int32Array.BYTES_PER_ELEMENT}u.texCoordUniqueIDs=l;var f=[];if(3===i){var p=t.getUint32(r,!0);r+=Int32Array.BYTES_PER_ELEMENT;for(var _=0;_<p;_++){var A=t.getInt32(r,!0);r+=Int32Array.BYTES_PER_ELEMENT,f.push(A)}}u.vertexAttrUniqueIDs=f;var m=t.getInt32(r,!0);r+=Int32Array.BYTES_PER_ELEMENT;var y,E={};m>0&&(r=(h=P(e,t,r)).bytesOffset,E.materialCode=h.string,o.push(E)),3===i&&((y=r%4)&&(y=4-y),r+=y);var h,B=new Object,T=t.getUint32(r,!0),x=function(e,t,r){if(!v(t))throw new Error("arraySlice: begin is undefined");if(!v(r))throw new Error("arraySlice: end is undefined");if("function"==typeof e.slice)return e.slice(t,r);for(var n=[].slice.call(e,t,r),i=D.length,o=0;o<i;++o)if(e instanceof D[o]){n=new D[o](n);break}return n}(e,r+=Int32Array.BYTES_PER_ELEMENT,r+T);return x=new Uint8Array(x),m>0?C.dracoDecodeMesh(a,x,T,n,E,u):C.dracoDecodePointCloud(a,x,T,n,u),(!B.min||!B.max)&&(B=void 0),r+=T,3===i&&((y=r%4)&&(y=4-y),(y=(r=(h=P(e,t,r+=y)).bytesOffset)%4)&&(y=4-y),r+=y),r}function I(){}let L,F;"undefined"!=typeof ArrayBuffer&&(D.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&D.push(Uint8ClampedArray),"undefined"!=typeof CanvasPixelArray&&D.push(CanvasPixelArray)),I.s3tc=!0,I.pvrtc=!1,I.etc1=!1;const S={0:Uint32Array.BYTES_PER_ELEMENT,1:Float32Array.BYTES_PER_ELEMENT,2:Float64Array.BYTES_PER_ELEMENT};function N(e,t,r){return e=e.subarray(0,0+e.byteLength),new TextDecoder("utf-8").decode(e)}function R(e,t,r){let n=t.getUint32(r,!0);return r+=Uint32Array.BYTES_PER_ELEMENT,{string:N(new Uint8Array(e,r,n)),bytesOffset:r+=n,length:n}}function O(e,t,r,n){let i={},o=[],a=new Array(16);for(let e=0;e<16;e++)a[e]=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT;i.matrix=a,i.skeletonNames=o;let s=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let n=0;n<s;n++){let n=R(e,t,r);o.push(n.string),r=n.bytesOffset}return n.push(i),r}function w(e,t,r,n,i){let o={};o.rangeList=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,o.rangeMode=t.getUint16(r,!0),r+=Uint16Array.BYTES_PER_ELEMENT;let a={};a.x=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,a.y=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,a.z=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT;let s=t.getFloat64(r,!0);if(r+=Float64Array.BYTES_PER_ELEMENT,o.boundingSphere={center:a,radius:s},i>=3){const e={};e.x=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,e.y=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,e.z=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT;const n={};n.x=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,n.y=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,n.z=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT;const i={};i.x=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,i.y=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,i.z=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT;const a={};a.x=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,a.y=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,a.z=t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,o.obb={xExtent:n,yExtent:i,zExtent:a,center:e}}let u=R(e,t,r),l=u.string;r=u.bytesOffset;let c=l.indexOf("Geometry");if(-1!==c){let e=l.substring(c);l=l.replace(e,"")}o.childTile=l,o.geodes=[];let d=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let n=0;n<d;n++)r=O(e,t,r,o.geodes);return n.push(o),i>=3&&(r=R(e,t,r).bytesOffset),r}function G(e,t,r,n){let i=t.getUint32(r,!0);if(n.verticesCount=i,(r+=Uint32Array.BYTES_PER_ELEMENT)<=0)return r;let o=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT;let a=t.getUint16(r,!0);a=o*Float32Array.BYTES_PER_ELEMENT,r+=Uint16Array.BYTES_PER_ELEMENT;let s=i*o*Float32Array.BYTES_PER_ELEMENT,u=new Uint8Array(e,r,s);r+=s;let l=n.vertexAttributes,c=n.attrLocation;return c.aPosition=l.length,l.push({index:c.aPosition,typedArray:u,componentsPerAttribute:o,componentDatatype:5126,offsetInBytes:0,strideInBytes:a,normalize:!1}),r}function U(e,t,r,n){let i=t.getUint32(r,!0);if(r+=Uint32Array.BYTES_PER_ELEMENT,i<=0)return r;let o=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT;let a=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT;let s=i*o*Float32Array.BYTES_PER_ELEMENT,u=new Uint8Array(e,r,s);r+=s;let l=n.vertexAttributes,c=n.attrLocation;return c.aNormal=l.length,l.push({index:c.aNormal,typedArray:u,componentsPerAttribute:o,componentDatatype:5126,offsetInBytes:0,strideInBytes:a,normalize:!1}),r}function V(e,t,r,n){let i=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let o,a=n.verticesCount;if(i>0){t.getUint16(r,!0),r+=Uint16Array.BYTES_PER_ELEMENT,r+=2*Uint8Array.BYTES_PER_ELEMENT;let n=i*Uint8Array.BYTES_PER_ELEMENT*4;o=new Uint8Array(e,r,n).slice(0,n),r+=n}else{o=new Uint8Array(4*a);for(let e=0;e<a;e++)o[4*e]=255,o[4*e+1]=255,o[4*e+2]=255,o[4*e+3]=255}let s=n.vertexAttributes,u=n.attrLocation;return u.aColor=s.length,s.push({index:u.aColor,typedArray:o,componentsPerAttribute:4,componentDatatype:5121,offsetInBytes:0,strideInBytes:4,normalize:!0}),n.vertexColor=o,r}function H(e,t,r,n){let i=t.getUint32(r,!0);if(r+=Uint32Array.BYTES_PER_ELEMENT,i<=0)return r;t.getUint16(r,!0),r+=Uint16Array.BYTES_PER_ELEMENT,r+=2*Uint8Array.BYTES_PER_ELEMENT;let o=i*Uint8Array.BYTES_PER_ELEMENT*4,a=new Uint8Array(e,r,o);r+=o;let s=n.vertexAttributes,u=n.attrLocation;return u.aSecondColor=s.length,s.push({index:u.aSecondColor,typedArray:a,componentsPerAttribute:4,componentDatatype:5121,offsetInBytes:0,strideInBytes:4,normalize:!0}),r}function K(e,t,r,n){let i=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT,r+=Uint16Array.BYTES_PER_ELEMENT;for(let o=0;o<i;o++){let i=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let a=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT,t.getUint16(r,!0),r+=Uint16Array.BYTES_PER_ELEMENT;let s=i*a*Float32Array.BYTES_PER_ELEMENT,u=new Uint8Array(e,r,s);r+=s;let l="aTexCoord"+o,c=n.vertexAttributes,d=n.attrLocation;d[l]=c.length,c.push({index:d[l],typedArray:u,componentsPerAttribute:a,componentDatatype:5126,offsetInBytes:0,strideInBytes:a*Float32Array.BYTES_PER_ELEMENT,normalize:!1})}return r}function k(e,t,r,n,i){let o=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT,r+=Uint16Array.BYTES_PER_ELEMENT;let a=n.vertexAttributes,s=n.attrLocation;const u=new Uint8Array(e);for(let l=0;l<o;l++){let o=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let l=t.getUint16(r,!0);if(r+=Uint16Array.BYTES_PER_ELEMENT,16===l){r-=Uint16Array.BYTES_PER_ELEMENT;const e=3===i?Uint16Array.BYTES_PER_ELEMENT:Uint32Array.BYTES_PER_ELEMENT;let t=o*(l*Float32Array.BYTES_PER_ELEMENT+e),c=u.subarray(r,r+t);r+=t;let d=new Uint8Array(Float32Array.BYTES_PER_ELEMENT*l*o);n.instanceCount=o,n.instanceMode=l,n.instanceBuffer=d,n.instanceIndex=1;let f=Float32Array.BYTES_PER_ELEMENT*l+e;for(let t=0;t<o;t++){let r=t*f+e,n=c.subarray(r,r+f);d.set(n,t*(f-e))}let p=16*Float32Array.BYTES_PER_ELEMENT;s.uv2=a.length,a.push({index:s.uv2,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:0,strideInBytes:p,instanceDivisor:1}),s.uv3=a.length,a.push({index:s.uv3,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:p,instanceDivisor:1}),s.uv4=a.length,a.push({index:s.uv4,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:p,instanceDivisor:1}),s.secondary_colour=a.length,a.push({index:s.secondary_colour,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:p,instanceDivisor:1})}else{t.getUint16(r,!0),r+=Uint16Array.BYTES_PER_ELEMENT;let i=o*l*Float32Array.BYTES_PER_ELEMENT;if(17===l||29===l){let t=new Uint8Array(e,r,i);n.instanceCount=o,n.instanceMode=l,n.instanceBuffer=t,n.instanceIndex=1;let u,c=t.slice(0,l*o*4);n.vertexColorInstance=c,17===l?(u=17*Float32Array.BYTES_PER_ELEMENT,s.uv2=a.length,a.push({index:s.uv2,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:0,strideInBytes:u,instanceDivisor:1}),s.uv3=a.length,a.push({index:s.uv3,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.uv4=a.length,a.push({index:s.uv4,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.secondary_colour=a.length,a.push({index:s.secondary_colour,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.uv6=a.length,a.push({index:s.uv6,componentsPerAttribute:4,componentDatatype:5121,normalize:!0,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1})):29===l&&(u=29*Float32Array.BYTES_PER_ELEMENT,s.uv1=a.length,a.push({index:s.uv1,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:0,strideInBytes:u,instanceDivisor:1}),s.uv2=a.length,a.push({index:s.uv2,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:4*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.uv3=a.length,a.push({index:s.uv3,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:8*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.uv4=a.length,a.push({index:s.uv4,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:12*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.uv5=a.length,a.push({index:s.uv5,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:16*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.uv6=a.length,a.push({index:s.uv6,componentsPerAttribute:4,componentDatatype:5126,normalize:!1,offsetInBytes:20*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.uv7=a.length,a.push({index:s.uv7,componentsPerAttribute:3,componentDatatype:5126,normalize:!1,offsetInBytes:24*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.secondary_colour=a.length,a.push({index:s.secondary_colour,componentsPerAttribute:4,componentDatatype:5121,normalize:!0,offsetInBytes:27*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}),s.uv9=a.length,a.push({index:s.uv9,componentsPerAttribute:4,componentDatatype:5121,normalize:!0,offsetInBytes:28*Float32Array.BYTES_PER_ELEMENT,strideInBytes:u,instanceDivisor:1}))}else{let e=o*l;n.instanceBounds=new Float32Array(e);for(let i=0;i<e;i++)n.instanceBounds[i]=t.getFloat32(r+i*Float32Array.BYTES_PER_ELEMENT,!0)}r+=i}}return r}function Y(e,t,r,n,i){if(i>=3&&(t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT),r=V(e,t,r=U(e,t,r=G(e,t,r,n),n),n),i<3&&(r=H(e,t,r,n)),r=k(e,t,r=K(e,t,r,n),n,i),i>=3){r=function(e,t,r,n){const i=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let o=0;o<i;o++){const i=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;const a=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT;const s=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT;const u=i*a*S[s],l=new Uint8Array(e,r,u);r+=u;const c=n.vertexAttributes,d=n.attrLocation,f="aCustom"+o;d[f]=c.length,c.push({index:d[f],typedArray:l,componentsPerAttribute:a,componentDatatype:5126,offsetInBytes:0,strideInBytes:0,normalize:!1})}return r}(e,t,r,n);const i=R(e,t,r);r=i.bytesOffset,n.customVertexAttribute=JSON.parse(i.string);const o="aCustom"+n.customVertexAttribute.TextureCoordMatrix,a="aCustom"+n.customVertexAttribute.VertexWeight;void 0!==n.attrLocation[o]&&(n.attrLocation.aTextureCoordMatrix=n.attrLocation[o],delete n.attrLocation[o]),void 0!==n.attrLocation[a]&&(n.attrLocation.aVertexWeight=n.attrLocation[a],delete n.attrLocation[a]);let s=r%4;s&&(s=4-s),r=function(e,t,r){const n=t.getUint32(r,!0);if(r+=Uint32Array.BYTES_PER_ELEMENT,n<=0)return r;const i=t.getUint16(r,!0);return r+=Uint16Array.BYTES_PER_ELEMENT,t.getUint16(r,!0),(r+=Uint16Array.BYTES_PER_ELEMENT)+n*i*Float32Array.BYTES_PER_ELEMENT}(0,t,r+=s)}return r}function z(e,t,r,n,i){let o=t.getUint32(r,!0);return n.compressOptions=o,r+=Uint32Array.BYTES_PER_ELEMENT,r=1&~o?G(e,t,r,n):function(e,t,r,n){let i=t.getUint32(r,!0);if(n.verticesCount=i,(r+=Uint32Array.BYTES_PER_ELEMENT)<=0)return r;let o=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT;let a=t.getUint16(r,!0);a=o*Int16Array.BYTES_PER_ELEMENT,r+=Uint16Array.BYTES_PER_ELEMENT;let s=t.getFloat32(r,!0);r+=Float32Array.BYTES_PER_ELEMENT;let u={};u.x=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,u.y=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,u.z=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,u.w=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,n.vertCompressConstant=s,n.minVerticesValue=u;let l=i*o*Int16Array.BYTES_PER_ELEMENT,c=new Uint8Array(e,r,l);r+=l;let d=n.vertexAttributes,f=n.attrLocation;return f.aPosition=d.length,d.push({index:f.aPosition,typedArray:c,componentsPerAttribute:o,componentDatatype:5122,offsetInBytes:0,strideInBytes:a,normalize:!1}),r}(e,t,r,n),r=2&~o?U(e,t,r,n):function(e,t,r,n){let i=t.getUint32(r,!0);if(r+=Uint32Array.BYTES_PER_ELEMENT,i<=0)return r;t.getUint16(r,!0),r+=Uint16Array.BYTES_PER_ELEMENT;let o=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT;let a=2*i*Int16Array.BYTES_PER_ELEMENT,s=new Uint8Array(e,r,a);r+=a;let u=n.vertexAttributes,l=n.attrLocation;return l.aNormal=u.length,u.push({index:l.aNormal,typedArray:s,componentsPerAttribute:2,componentDatatype:5122,offsetInBytes:0,strideInBytes:o,normalize:!1}),r}(e,t,r,n),r=H(e,t,r=V(e,t,r,n),n),r=16&~o?K(e,t,r,n):function(e,t,r,n){n.texCoordCompressConstant=[],n.minTexCoordValue=[];let i=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT,r+=Uint16Array.BYTES_PER_ELEMENT;for(let o=0;o<i;o++){let i=t.getUint8(r,!0);r+=Uint8Array.BYTES_PER_ELEMENT,r+=3*Uint8Array.BYTES_PER_ELEMENT;let a=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let s=t.getUint16(r,!0);r+=Uint16Array.BYTES_PER_ELEMENT,t.getUint16(r,!0),r+=Uint16Array.BYTES_PER_ELEMENT;let u=t.getFloat32(r,!0);r+=Float32Array.BYTES_PER_ELEMENT,n.texCoordCompressConstant.push(u);let l={};l.x=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,l.y=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,l.z=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,l.w=t.getFloat32(r,!0),r+=Float32Array.BYTES_PER_ELEMENT,n.minTexCoordValue.push(l);let c=a*s*Int16Array.BYTES_PER_ELEMENT,d=new Uint8Array(e,r,c),f=(r+=c)%4;0!==f&&(r+=4-f);let p="aTexCoord"+o,_=n.vertexAttributes,A=n.attrLocation;if(A[p]=_.length,_.push({index:A[p],typedArray:d,componentsPerAttribute:s,componentDatatype:5122,offsetInBytes:0,strideInBytes:s*Int16Array.BYTES_PER_ELEMENT,normalize:!1}),i){c=a*Float32Array.BYTES_PER_ELEMENT;let t=new Uint8Array(e,r,c);r+=c,n.texCoordZMatrix=!0,p="aTexCoordZ"+o,A[p]=_.length,_.push({index:A[p],typedArray:t,componentsPerAttribute:1,componentDatatype:5126,offsetInBytes:0,strideInBytes:Float32Array.BYTES_PER_ELEMENT,normalize:!1})}}return r}(e,t,r,n),!(32&~o)&&(n.textureCoordIsW=!0),k(e,t,r,n,i)}function J(e,t,r,n,i){let o=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let a=0;a<o;a++){let o={};i>=3&&(t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT);let a=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let s=t.getUint8(r,!0);r+=Uint8Array.BYTES_PER_ELEMENT,t.getUint8(r,!0),r+=Uint8Array.BYTES_PER_ELEMENT;let u=t.getUint8(r,!0);if(r+=Uint8Array.BYTES_PER_ELEMENT,r+=Uint8Array.BYTES_PER_ELEMENT,a>0){let t,n=null;1===s||3===s?(t=a*Uint32Array.BYTES_PER_ELEMENT,n=new Uint8Array(e,r,t)):(t=a*Uint16Array.BYTES_PER_ELEMENT,n=new Uint8Array(e,r,t),a%2!=0&&(t+=2)),o.indicesTypedArray=n,r+=t}o.indicesCount=a,o.indexType=s,o.primitiveType=u;let l=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let n=0;n<l;n++){let n=R(e,t,r);r=n.bytesOffset,o.materialCode=n.string}0!=r%4&&(r+=4-r%4),n.push(o)}return r}let j={red:0,green:0,blue:0,alpha:0};function W(e,t,r){return r.red=e[t++],r.green=e[t++],r.blue=e[t++],r.alpha=e[t],r}function X(e,t,r){let n=e.vertexAttributes,i=n.length;e.attrLocation[1===r?"instanceId":"batchId"]=i,n.push({index:i,typedArray:t,componentsPerAttribute:1,componentDatatype:5126,offsetInBytes:0,strideInBytes:0,instanceDivisor:r})}const q=33776,Z=33779,Q=38e3,$=38001,ee=38002,te=5e4;function re(e){let t=0;switch(e){case q:case Z:t=14;break;case Q:t=25;break;case $:t=27;break;case ee:t=31;break;case te:t=26;break;default:t=0}return t}I.parseBuffer=async function(r){await async function(){if(F)return F;let r;return r=window.S3M_ASSETS?window.S3M_ASSETS.draco:"S3M_module/S3MParser/draco_decoder_new.wasm",F=function(e){let t=function(){let e,t;const r=new Promise(function(r,n){e=r,t=n});return{resolve:e,reject:t,promise:r}}();var r=new XMLHttpRequest;return r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){if(r.status<200||r.status>=300)throw t.reject(r.response),new Error(r.response);t.resolve(r.response)},r.onerror=function(e){t.reject(new Error(e))},r.send(),t.promise}(r).then(function(r){return new Promise((n,i)=>{(function(r){var n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;function i(e,t){e||c("Assertion failed: "+t)}function o(e,t,r){var n=t+r;for(r=t;e[r]&&!(r>=n);)++r;if(16<r-t&&e.subarray&&ae)return ae.decode(e.subarray(t,r));for(n="";t<r;){var i=e[t++];if(128&i){var o=63&e[t++];if(192==(224&i))n+=String.fromCharCode((31&i)<<6|o);else{var a=63&e[t++];65536>(i=224==(240&i)?(15&i)<<12|o<<6|a:(7&i)<<18|o<<12|a<<6|63&e[t++])?n+=String.fromCharCode(i):(i-=65536,n+=String.fromCharCode(55296|i>>10,56320|1023&i))}}else n+=String.fromCharCode(i)}return n}function a(e,t){return e?o(ue,e,t):""}function s(e,t){return 0<e%t&&(e+=t-e%t),e}function u(e){de=e,U.HEAP8=se=new Int8Array(e),U.HEAP16=new Int16Array(e),U.HEAP32=le=new Int32Array(e),U.HEAPU8=ue=new Uint8Array(e),U.HEAPU16=new Uint16Array(e),U.HEAPU32=new Uint32Array(e),U.HEAPF32=new Float32Array(e),U.HEAPF64=new Float64Array(e)}function l(e){for(;0<e.length;){var t=e.shift();if("function"==typeof t)t();else{var r=t.func;"number"==typeof r?void 0===t.arg?U.dynCall_v(r):U.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}}}function c(e){throw U.onAbort&&U.onAbort(e),te(e+=""),re(e),oe=!0,new WebAssembly.RuntimeError("abort("+e+"). Build with -s ASSERTIONS=1 for more info.")}function d(e){return"".startsWith?e.startsWith("data:application/octet-stream;base64,"):0===e.indexOf("data:application/octet-stream;base64,")}function f(){try{if(ee)return new Uint8Array(ee);if($)return $(he);throw"both async and sync fetching of the wasm failed"}catch(e){c(e)}}function p(){if(!p.strings){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:W};for(e in Be)t[e]=Be[e];var r=[];for(e in t)r.push(e+"="+t[e]);p.strings=r}return p.strings}function _(e){function t(){if(!sn&&(sn=!0,!oe)){if(me=!0,l(pe),l(_e),U.onRuntimeInitialized&&U.onRuntimeInitialized(),U.postRun)for("function"==typeof U.postRun&&(U.postRun=[U.postRun]);U.postRun.length;)Ae.unshift(U.postRun.shift());l(Ae)}}if(!(0<Ce)){if(U.preRun)for("function"==typeof U.preRun&&(U.preRun=[U.preRun]);U.preRun.length;)fe.unshift(U.preRun.shift());l(fe),0<Ce||(U.setStatus?(U.setStatus("Running..."),setTimeout(function(){setTimeout(function(){U.setStatus("")},1),t()},1)):t())}}function A(){}function m(e){return(e||A).__cache__}function C(e,t){var r=m(t),n=r[e];return n||((n=Object.create((t||A).prototype)).ptr=e,r[e]=n)}function y(e){if("string"==typeof e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);55296<=n&&57343>=n&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),127>=n?++t:t=2047>=n?t+2:65535>=n?t+3:t+4}if(r=0,0<(n=(t=Array(t+1)).length)){n=r+n-1;for(var i=0;i<e.length;++i){var o=e.charCodeAt(i);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++i)),127>=o){if(r>=n)break;t[r++]=o}else{if(2047>=o){if(r+1>=n)break;t[r++]=192|o>>6}else{if(65535>=o){if(r+2>=n)break;t[r++]=224|o>>12}else{if(r+3>=n)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63}t[r++]=128|o>>6&63}t[r++]=128|63&o}}t[r]=0}e=ln.alloc(t,se),ln.copy(t,se,e)}return e}function E(){throw"cannot construct a Status, no constructor in IDL"}function h(){this.ptr=Ie(),m(h)[this.ptr]=this}function B(){this.ptr=Ne(),m(B)[this.ptr]=this}function T(){this.ptr=Ge(),m(T)[this.ptr]=this}function x(){this.ptr=Ke(),m(x)[this.ptr]=this}function b(){this.ptr=Je(),m(b)[this.ptr]=this}function g(){this.ptr=qe(),m(g)[this.ptr]=this}function v(){this.ptr=st(),m(v)[this.ptr]=this}function D(){this.ptr=ct(),m(D)[this.ptr]=this}function P(){this.ptr=mt(),m(P)[this.ptr]=this}function M(){this.ptr=ht(),m(M)[this.ptr]=this}function I(){this.ptr=Mt(),m(I)[this.ptr]=this}function L(){this.ptr=St(),m(L)[this.ptr]=this}function F(){this.ptr=wt(),m(F)[this.ptr]=this}function S(){this.ptr=Ut(),m(S)[this.ptr]=this}function N(){this.ptr=Kt(),m(N)[this.ptr]=this}function R(){this.ptr=Ar(),m(R)[this.ptr]=this}function O(){throw"cannot construct a VoidPtr, no constructor in IDL"}function w(){this.ptr=Br(),m(w)[this.ptr]=this}function G(){this.ptr=gr(),m(G)[this.ptr]=this}"undefined"!=typeof __filename&&(n=n||__filename);var U=void 0!==(r=r||{})?r:{},V=!1,H=!1;U.onRuntimeInitialized=function(){V=!0,H&&"function"==typeof U.onModuleLoaded&&U.onModuleLoaded(U)},U.onModuleParsed=function(){H=!0,V&&"function"==typeof U.onModuleLoaded&&U.onModuleLoaded(U)},U.isVersionSupported=function(e){return"string"==typeof e&&!(2>(e=e.split(".")).length||3<e.length)&&(1==e[0]&&0<=e[1]&&3>=e[1]||!(0!=e[0]||10<e[1]))};var K,k={};for(K in U)U.hasOwnProperty(K)&&(k[K]=U[K]);var Y,z,J,j,W="./this.program";J="object"==typeof window,j="function"==typeof importScripts,Y="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!J&&!j,z=!J&&!Y&&!j;var X,q,Z="";if(Y){Z=__dirname+"/";var Q=function(r,n){return X||(X=e),q||(q=t),r=q.normalize(r),X.readFileSync(r,n?null:"utf8")},$=function(e){return(e=Q(e,!0)).buffer||(e=new Uint8Array(e)),i(e.buffer),e};1<process.argv.length&&(W=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",function(e){throw e}),process.on("unhandledRejection",c),U.inspect=function(){return"[Emscripten Module object]"}}else z?("undefined"!=typeof read&&(Q=function(e){return read(e)}),$=function(e){return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(i("object"==typeof(e=read(e,"binary"))),e)},"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(J||j)&&(j?Z=self.location.href:document.currentScript&&(Z=document.currentScript.src),n&&(Z=n),Z=0!==Z.indexOf("blob:")?Z.substr(0,Z.lastIndexOf("/")+1):"",Q=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},j&&($=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var ee,te=U.print||console.log.bind(console),re=U.printErr||console.warn.bind(console);for(K in k)k.hasOwnProperty(K)&&(U[K]=k[K]);k=null,U.thisProgram&&(W=U.thisProgram),U.wasmBinary&&(ee=U.wasmBinary),"object"!=typeof WebAssembly&&re("no native wasm support detected");var ne,ie=new WebAssembly.Table({initial:381,maximum:381,element:"anyfunc"}),oe=!1,ae="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var se,ue,le,ce=U.TOTAL_MEMORY||16777216;if(ne=U.wasmMemory?U.wasmMemory:new WebAssembly.Memory({initial:ce/65536}))var de=ne.buffer;ce=de.byteLength,u(de),le[4604]=5261456;var fe=[],pe=[],_e=[],Ae=[],me=!1,Ce=0,ye=null;U.preloadedImages={},U.preloadedAudios={};var Ee,he="draco_decoder.wasm";d(he)||(Ee=he,he=U.locateFile?U.locateFile(Ee,Z):Z+Ee),pe.push({func:function(){ge()}});var Be={},Te={buffers:[null,[],[]],printChar:function(e,t){var r=Te.buffers[e];0===t||10===t?((1===e?te:re)(o(r,0)),r.length=0):r.push(t)},varargs:0,get:function(e){return Te.varargs+=4,le[Te.varargs-4>>2]},getStr:function(){return a(Te.get())},get64:function(){var e=Te.get();return Te.get(),e},getZero:function(){Te.get()}},xe={__cxa_allocate_exception:function(e){return un(e)},__cxa_throw:function(e,t,r){throw"uncaught_exception"in an?an.uncaught_exceptions++:an.uncaught_exceptions=1,e},abort:function(){c()},emscripten_get_sbrk_ptr:function(){return 18416},emscripten_memcpy_big:function(e,t,r){ue.set(ue.subarray(t,t+r),e)},emscripten_resize_heap:function(e){if(2147418112<e)return!1;for(var t=Math.max(se.length,16777216);t<e;)t=536870912>=t?s(2*t,65536):Math.min(s((3*t+2147483648)/4,65536),2147418112);e:{try{ne.grow(t-de.byteLength+65535>>16),u(ne.buffer);var r=1;break e}catch(e){}r=void 0}return!!r},environ_get:function(e,t){var r=0;return p().forEach(function(n,i){var o=t+r;for(i=le[e+4*i>>2]=o,o=0;o<n.length;++o)se[0|i++]=n.charCodeAt(o);se[0|i]=0,r+=n.length+1}),0},environ_sizes_get:function(e,t){var r=p();le[e>>2]=r.length;var n=0;return r.forEach(function(e){n+=e.length+1}),le[t>>2]=n,0},fd_close:function(e){return 0},fd_seek:function(e,t,r,n,i){return 0},fd_write:function(e,t,r,n){try{for(var i=0,o=0;o<r;o++){for(var a=le[t+8*o>>2],s=le[t+(8*o+4)>>2],u=0;u<s;u++)Te.printChar(e,ue[a+u]);i+=s}return le[n>>2]=i,0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||c(e),e.errno}},memory:ne,setTempRet0:function(e){},table:ie},be=function(){function e(e,t){U.asm=e.exports,Ce--,U.monitorRunDependencies&&U.monitorRunDependencies(Ce),0==Ce&&ye&&(e=ye,ye=null,e())}function t(t){e(t.instance)}function r(e){return(ee||!J&&!j||"function"!=typeof fetch?new Promise(function(e,t){e(f())}):fetch(he,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+he+"'";return e.arrayBuffer()}).catch(function(){return f()})).then(function(e){return WebAssembly.instantiate(e,n)}).then(e,function(e){re("failed to asynchronously prepare wasm: "+e),c(e)})}var n={env:xe,wasi_unstable:xe};if(Ce++,U.monitorRunDependencies&&U.monitorRunDependencies(Ce),U.instantiateWasm)try{return U.instantiateWasm(n,e)}catch(e){return re("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(ee||"function"!=typeof WebAssembly.instantiateStreaming||d(he)||"function"!=typeof fetch)return r(t);fetch(he,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,n).then(t,function(e){re("wasm streaming compile failed: "+e),re("falling back to ArrayBuffer instantiation"),r(t)})})}(),{}}();U.asm=be;var ge=U.___wasm_call_ctors=function(){return U.asm.__wasm_call_ctors.apply(null,arguments)},ve=U._emscripten_bind_Status_code_0=function(){return U.asm.emscripten_bind_Status_code_0.apply(null,arguments)},De=U._emscripten_bind_Status_ok_0=function(){return U.asm.emscripten_bind_Status_ok_0.apply(null,arguments)},Pe=U._emscripten_bind_Status_error_msg_0=function(){return U.asm.emscripten_bind_Status_error_msg_0.apply(null,arguments)},Me=U._emscripten_bind_Status___destroy___0=function(){return U.asm.emscripten_bind_Status___destroy___0.apply(null,arguments)},Ie=U._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return U.asm.emscripten_bind_DracoUInt16Array_DracoUInt16Array_0.apply(null,arguments)},Le=U._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return U.asm.emscripten_bind_DracoUInt16Array_GetValue_1.apply(null,arguments)},Fe=U._emscripten_bind_DracoUInt16Array_size_0=function(){return U.asm.emscripten_bind_DracoUInt16Array_size_0.apply(null,arguments)},Se=U._emscripten_bind_DracoUInt16Array___destroy___0=function(){return U.asm.emscripten_bind_DracoUInt16Array___destroy___0.apply(null,arguments)},Ne=U._emscripten_bind_PointCloud_PointCloud_0=function(){return U.asm.emscripten_bind_PointCloud_PointCloud_0.apply(null,arguments)},Re=U._emscripten_bind_PointCloud_num_attributes_0=function(){return U.asm.emscripten_bind_PointCloud_num_attributes_0.apply(null,arguments)},Oe=U._emscripten_bind_PointCloud_num_points_0=function(){return U.asm.emscripten_bind_PointCloud_num_points_0.apply(null,arguments)},we=U._emscripten_bind_PointCloud___destroy___0=function(){return U.asm.emscripten_bind_PointCloud___destroy___0.apply(null,arguments)},Ge=U._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return U.asm.emscripten_bind_DracoUInt8Array_DracoUInt8Array_0.apply(null,arguments)},Ue=U._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return U.asm.emscripten_bind_DracoUInt8Array_GetValue_1.apply(null,arguments)},Ve=U._emscripten_bind_DracoUInt8Array_size_0=function(){return U.asm.emscripten_bind_DracoUInt8Array_size_0.apply(null,arguments)},He=U._emscripten_bind_DracoUInt8Array___destroy___0=function(){return U.asm.emscripten_bind_DracoUInt8Array___destroy___0.apply(null,arguments)},Ke=U._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return U.asm.emscripten_bind_DracoUInt32Array_DracoUInt32Array_0.apply(null,arguments)},ke=U._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return U.asm.emscripten_bind_DracoUInt32Array_GetValue_1.apply(null,arguments)},Ye=U._emscripten_bind_DracoUInt32Array_size_0=function(){return U.asm.emscripten_bind_DracoUInt32Array_size_0.apply(null,arguments)},ze=U._emscripten_bind_DracoUInt32Array___destroy___0=function(){return U.asm.emscripten_bind_DracoUInt32Array___destroy___0.apply(null,arguments)},Je=U._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return U.asm.emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0.apply(null,arguments)},je=U._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return U.asm.emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1.apply(null,arguments)},We=U._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return U.asm.emscripten_bind_AttributeOctahedronTransform_quantization_bits_0.apply(null,arguments)},Xe=U._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return U.asm.emscripten_bind_AttributeOctahedronTransform___destroy___0.apply(null,arguments)},qe=U._emscripten_bind_PointAttribute_PointAttribute_0=function(){return U.asm.emscripten_bind_PointAttribute_PointAttribute_0.apply(null,arguments)},Ze=U._emscripten_bind_PointAttribute_size_0=function(){return U.asm.emscripten_bind_PointAttribute_size_0.apply(null,arguments)},Qe=U._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return U.asm.emscripten_bind_PointAttribute_GetAttributeTransformData_0.apply(null,arguments)},$e=U._emscripten_bind_PointAttribute_attribute_type_0=function(){return U.asm.emscripten_bind_PointAttribute_attribute_type_0.apply(null,arguments)},et=U._emscripten_bind_PointAttribute_data_type_0=function(){return U.asm.emscripten_bind_PointAttribute_data_type_0.apply(null,arguments)},tt=U._emscripten_bind_PointAttribute_num_components_0=function(){return U.asm.emscripten_bind_PointAttribute_num_components_0.apply(null,arguments)},rt=U._emscripten_bind_PointAttribute_normalized_0=function(){return U.asm.emscripten_bind_PointAttribute_normalized_0.apply(null,arguments)},nt=U._emscripten_bind_PointAttribute_byte_stride_0=function(){return U.asm.emscripten_bind_PointAttribute_byte_stride_0.apply(null,arguments)},it=U._emscripten_bind_PointAttribute_byte_offset_0=function(){return U.asm.emscripten_bind_PointAttribute_byte_offset_0.apply(null,arguments)},ot=U._emscripten_bind_PointAttribute_unique_id_0=function(){return U.asm.emscripten_bind_PointAttribute_unique_id_0.apply(null,arguments)},at=U._emscripten_bind_PointAttribute___destroy___0=function(){return U.asm.emscripten_bind_PointAttribute___destroy___0.apply(null,arguments)},st=U._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return U.asm.emscripten_bind_AttributeTransformData_AttributeTransformData_0.apply(null,arguments)},ut=U._emscripten_bind_AttributeTransformData_transform_type_0=function(){return U.asm.emscripten_bind_AttributeTransformData_transform_type_0.apply(null,arguments)},lt=U._emscripten_bind_AttributeTransformData___destroy___0=function(){return U.asm.emscripten_bind_AttributeTransformData___destroy___0.apply(null,arguments)},ct=U._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return U.asm.emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0.apply(null,arguments)},dt=U._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return U.asm.emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1.apply(null,arguments)},ft=U._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return U.asm.emscripten_bind_AttributeQuantizationTransform_quantization_bits_0.apply(null,arguments)},pt=U._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return U.asm.emscripten_bind_AttributeQuantizationTransform_min_value_1.apply(null,arguments)},_t=U._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return U.asm.emscripten_bind_AttributeQuantizationTransform_range_0.apply(null,arguments)},At=U._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return U.asm.emscripten_bind_AttributeQuantizationTransform___destroy___0.apply(null,arguments)},mt=U._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return U.asm.emscripten_bind_DracoInt8Array_DracoInt8Array_0.apply(null,arguments)},Ct=U._emscripten_bind_DracoInt8Array_GetValue_1=function(){return U.asm.emscripten_bind_DracoInt8Array_GetValue_1.apply(null,arguments)},yt=U._emscripten_bind_DracoInt8Array_size_0=function(){return U.asm.emscripten_bind_DracoInt8Array_size_0.apply(null,arguments)},Et=U._emscripten_bind_DracoInt8Array___destroy___0=function(){return U.asm.emscripten_bind_DracoInt8Array___destroy___0.apply(null,arguments)},ht=U._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return U.asm.emscripten_bind_MetadataQuerier_MetadataQuerier_0.apply(null,arguments)},Bt=U._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return U.asm.emscripten_bind_MetadataQuerier_HasEntry_2.apply(null,arguments)},Tt=U._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return U.asm.emscripten_bind_MetadataQuerier_GetIntEntry_2.apply(null,arguments)},xt=U._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return U.asm.emscripten_bind_MetadataQuerier_GetIntEntryArray_3.apply(null,arguments)},bt=U._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return U.asm.emscripten_bind_MetadataQuerier_GetDoubleEntry_2.apply(null,arguments)},gt=U._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return U.asm.emscripten_bind_MetadataQuerier_GetStringEntry_2.apply(null,arguments)},vt=U._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return U.asm.emscripten_bind_MetadataQuerier_NumEntries_1.apply(null,arguments)},Dt=U._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return U.asm.emscripten_bind_MetadataQuerier_GetEntryName_2.apply(null,arguments)},Pt=U._emscripten_bind_MetadataQuerier___destroy___0=function(){return U.asm.emscripten_bind_MetadataQuerier___destroy___0.apply(null,arguments)},Mt=U._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return U.asm.emscripten_bind_DracoInt16Array_DracoInt16Array_0.apply(null,arguments)},It=U._emscripten_bind_DracoInt16Array_GetValue_1=function(){return U.asm.emscripten_bind_DracoInt16Array_GetValue_1.apply(null,arguments)},Lt=U._emscripten_bind_DracoInt16Array_size_0=function(){return U.asm.emscripten_bind_DracoInt16Array_size_0.apply(null,arguments)},Ft=U._emscripten_bind_DracoInt16Array___destroy___0=function(){return U.asm.emscripten_bind_DracoInt16Array___destroy___0.apply(null,arguments)},St=U._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return U.asm.emscripten_bind_DracoFloat32Array_DracoFloat32Array_0.apply(null,arguments)},Nt=U._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return U.asm.emscripten_bind_DracoFloat32Array_GetValue_1.apply(null,arguments)},Rt=U._emscripten_bind_DracoFloat32Array_size_0=function(){return U.asm.emscripten_bind_DracoFloat32Array_size_0.apply(null,arguments)},Ot=U._emscripten_bind_DracoFloat32Array___destroy___0=function(){return U.asm.emscripten_bind_DracoFloat32Array___destroy___0.apply(null,arguments)},wt=U._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return U.asm.emscripten_bind_GeometryAttribute_GeometryAttribute_0.apply(null,arguments)},Gt=U._emscripten_bind_GeometryAttribute___destroy___0=function(){return U.asm.emscripten_bind_GeometryAttribute___destroy___0.apply(null,arguments)},Ut=U._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return U.asm.emscripten_bind_DecoderBuffer_DecoderBuffer_0.apply(null,arguments)},Vt=U._emscripten_bind_DecoderBuffer_Init_2=function(){return U.asm.emscripten_bind_DecoderBuffer_Init_2.apply(null,arguments)},Ht=U._emscripten_bind_DecoderBuffer___destroy___0=function(){return U.asm.emscripten_bind_DecoderBuffer___destroy___0.apply(null,arguments)},Kt=U._emscripten_bind_Decoder_Decoder_0=function(){return U.asm.emscripten_bind_Decoder_Decoder_0.apply(null,arguments)},kt=U._emscripten_bind_Decoder_GetEncodedGeometryType_1=function(){return U.asm.emscripten_bind_Decoder_GetEncodedGeometryType_1.apply(null,arguments)},Yt=U._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return U.asm.emscripten_bind_Decoder_DecodeBufferToPointCloud_2.apply(null,arguments)},zt=U._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return U.asm.emscripten_bind_Decoder_DecodeBufferToMesh_2.apply(null,arguments)},Jt=U._emscripten_bind_Decoder_GetAttributeId_2=function(){return U.asm.emscripten_bind_Decoder_GetAttributeId_2.apply(null,arguments)},jt=U._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return U.asm.emscripten_bind_Decoder_GetAttributeIdByName_2.apply(null,arguments)},Wt=U._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3.apply(null,arguments)},Xt=U._emscripten_bind_Decoder_GetAttribute_2=function(){return U.asm.emscripten_bind_Decoder_GetAttribute_2.apply(null,arguments)},qt=U._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return U.asm.emscripten_bind_Decoder_GetAttributeByUniqueId_2.apply(null,arguments)},Zt=U._emscripten_bind_Decoder_GetMetadata_1=function(){return U.asm.emscripten_bind_Decoder_GetMetadata_1.apply(null,arguments)},Qt=U._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return U.asm.emscripten_bind_Decoder_GetAttributeMetadata_2.apply(null,arguments)},$t=U._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return U.asm.emscripten_bind_Decoder_GetFaceFromMesh_3.apply(null,arguments)},er=U._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return U.asm.emscripten_bind_Decoder_GetTriangleStripsFromMesh_2.apply(null,arguments)},tr=U._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return U.asm.emscripten_bind_Decoder_GetTrianglesUInt16Array_3.apply(null,arguments)},rr=U._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return U.asm.emscripten_bind_Decoder_GetTrianglesUInt32Array_3.apply(null,arguments)},nr=U._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeFloat_3.apply(null,arguments)},ir=U._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3.apply(null,arguments)},or=U._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeIntForAllPoints_3.apply(null,arguments)},ar=U._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3.apply(null,arguments)},sr=U._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3.apply(null,arguments)},ur=U._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3.apply(null,arguments)},lr=U._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3.apply(null,arguments)},cr=U._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3.apply(null,arguments)},dr=U._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return U.asm.emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3.apply(null,arguments)},fr=U._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return U.asm.emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5.apply(null,arguments)},pr=U._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return U.asm.emscripten_bind_Decoder_SkipAttributeTransform_1.apply(null,arguments)},_r=U._emscripten_bind_Decoder___destroy___0=function(){return U.asm.emscripten_bind_Decoder___destroy___0.apply(null,arguments)},Ar=U._emscripten_bind_Mesh_Mesh_0=function(){return U.asm.emscripten_bind_Mesh_Mesh_0.apply(null,arguments)},mr=U._emscripten_bind_Mesh_num_faces_0=function(){return U.asm.emscripten_bind_Mesh_num_faces_0.apply(null,arguments)},Cr=U._emscripten_bind_Mesh_num_attributes_0=function(){return U.asm.emscripten_bind_Mesh_num_attributes_0.apply(null,arguments)},yr=U._emscripten_bind_Mesh_num_points_0=function(){return U.asm.emscripten_bind_Mesh_num_points_0.apply(null,arguments)},Er=U._emscripten_bind_Mesh___destroy___0=function(){return U.asm.emscripten_bind_Mesh___destroy___0.apply(null,arguments)},hr=U._emscripten_bind_VoidPtr___destroy___0=function(){return U.asm.emscripten_bind_VoidPtr___destroy___0.apply(null,arguments)},Br=U._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return U.asm.emscripten_bind_DracoInt32Array_DracoInt32Array_0.apply(null,arguments)},Tr=U._emscripten_bind_DracoInt32Array_GetValue_1=function(){return U.asm.emscripten_bind_DracoInt32Array_GetValue_1.apply(null,arguments)},xr=U._emscripten_bind_DracoInt32Array_size_0=function(){return U.asm.emscripten_bind_DracoInt32Array_size_0.apply(null,arguments)},br=U._emscripten_bind_DracoInt32Array___destroy___0=function(){return U.asm.emscripten_bind_DracoInt32Array___destroy___0.apply(null,arguments)},gr=U._emscripten_bind_Metadata_Metadata_0=function(){return U.asm.emscripten_bind_Metadata_Metadata_0.apply(null,arguments)},vr=U._emscripten_bind_Metadata___destroy___0=function(){return U.asm.emscripten_bind_Metadata___destroy___0.apply(null,arguments)},Dr=U._emscripten_enum_draco_StatusCode_OK=function(){return U.asm.emscripten_enum_draco_StatusCode_OK.apply(null,arguments)},Pr=U._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return U.asm.emscripten_enum_draco_StatusCode_DRACO_ERROR.apply(null,arguments)},Mr=U._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return U.asm.emscripten_enum_draco_StatusCode_IO_ERROR.apply(null,arguments)},Ir=U._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return U.asm.emscripten_enum_draco_StatusCode_INVALID_PARAMETER.apply(null,arguments)},Lr=U._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return U.asm.emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION.apply(null,arguments)},Fr=U._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return U.asm.emscripten_enum_draco_StatusCode_UNKNOWN_VERSION.apply(null,arguments)},Sr=U._emscripten_enum_draco_DataType_DT_INVALID=function(){return U.asm.emscripten_enum_draco_DataType_DT_INVALID.apply(null,arguments)},Nr=U._emscripten_enum_draco_DataType_DT_INT8=function(){return U.asm.emscripten_enum_draco_DataType_DT_INT8.apply(null,arguments)},Rr=U._emscripten_enum_draco_DataType_DT_UINT8=function(){return U.asm.emscripten_enum_draco_DataType_DT_UINT8.apply(null,arguments)},Or=U._emscripten_enum_draco_DataType_DT_INT16=function(){return U.asm.emscripten_enum_draco_DataType_DT_INT16.apply(null,arguments)},wr=U._emscripten_enum_draco_DataType_DT_UINT16=function(){return U.asm.emscripten_enum_draco_DataType_DT_UINT16.apply(null,arguments)},Gr=U._emscripten_enum_draco_DataType_DT_INT32=function(){return U.asm.emscripten_enum_draco_DataType_DT_INT32.apply(null,arguments)},Ur=U._emscripten_enum_draco_DataType_DT_UINT32=function(){return U.asm.emscripten_enum_draco_DataType_DT_UINT32.apply(null,arguments)},Vr=U._emscripten_enum_draco_DataType_DT_INT64=function(){return U.asm.emscripten_enum_draco_DataType_DT_INT64.apply(null,arguments)},Hr=U._emscripten_enum_draco_DataType_DT_UINT64=function(){return U.asm.emscripten_enum_draco_DataType_DT_UINT64.apply(null,arguments)},Kr=U._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return U.asm.emscripten_enum_draco_DataType_DT_FLOAT32.apply(null,arguments)},kr=U._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return U.asm.emscripten_enum_draco_DataType_DT_FLOAT64.apply(null,arguments)},Yr=U._emscripten_enum_draco_DataType_DT_BOOL=function(){return U.asm.emscripten_enum_draco_DataType_DT_BOOL.apply(null,arguments)},zr=U._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return U.asm.emscripten_enum_draco_DataType_DT_TYPES_COUNT.apply(null,arguments)},Jr=U._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return U.asm.emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE.apply(null,arguments)},jr=U._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return U.asm.emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD.apply(null,arguments)},Wr=U._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return U.asm.emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH.apply(null,arguments)},Xr=U._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return U.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM.apply(null,arguments)},qr=U._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return U.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM.apply(null,arguments)},Zr=U._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return U.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM.apply(null,arguments)},Qr=U._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return U.asm.emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM.apply(null,arguments)},$r=U._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return U.asm.emscripten_enum_draco_GeometryAttribute_Type_INVALID.apply(null,arguments)},en=U._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return U.asm.emscripten_enum_draco_GeometryAttribute_Type_POSITION.apply(null,arguments)},tn=U._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return U.asm.emscripten_enum_draco_GeometryAttribute_Type_NORMAL.apply(null,arguments)},rn=U._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return U.asm.emscripten_enum_draco_GeometryAttribute_Type_COLOR.apply(null,arguments)},nn=U._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return U.asm.emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD.apply(null,arguments)},on=U._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return U.asm.emscripten_enum_draco_GeometryAttribute_Type_GENERIC.apply(null,arguments)};U._setThrew=function(){return U.asm.setThrew.apply(null,arguments)};var an=U.__ZSt18uncaught_exceptionv=function(){return U.asm._ZSt18uncaught_exceptionv.apply(null,arguments)};U._free=function(){return U.asm.free.apply(null,arguments)};var sn,un=U._malloc=function(){return U.asm.malloc.apply(null,arguments)};if(U.stackSave=function(){return U.asm.stackSave.apply(null,arguments)},U.stackAlloc=function(){return U.asm.stackAlloc.apply(null,arguments)},U.stackRestore=function(){return U.asm.stackRestore.apply(null,arguments)},U.__growWasmMemory=function(){return U.asm.__growWasmMemory.apply(null,arguments)},U.dynCall_ii=function(){return U.asm.dynCall_ii.apply(null,arguments)},U.dynCall_vi=function(){return U.asm.dynCall_vi.apply(null,arguments)},U.dynCall_iii=function(){return U.asm.dynCall_iii.apply(null,arguments)},U.dynCall_vii=function(){return U.asm.dynCall_vii.apply(null,arguments)},U.dynCall_iiii=function(){return U.asm.dynCall_iiii.apply(null,arguments)},U.dynCall_v=function(){return U.asm.dynCall_v.apply(null,arguments)},U.dynCall_viii=function(){return U.asm.dynCall_viii.apply(null,arguments)},U.dynCall_viiii=function(){return U.asm.dynCall_viiii.apply(null,arguments)},U.dynCall_iiiiiii=function(){return U.asm.dynCall_iiiiiii.apply(null,arguments)},U.dynCall_iidiiii=function(){return U.asm.dynCall_iidiiii.apply(null,arguments)},U.dynCall_jiji=function(){return U.asm.dynCall_jiji.apply(null,arguments)},U.dynCall_viiiiii=function(){return U.asm.dynCall_viiiiii.apply(null,arguments)},U.dynCall_viiiii=function(){return U.asm.dynCall_viiiii.apply(null,arguments)},U.asm=be,U.then=function(e){if(sn)e(U);else{var t=U.onRuntimeInitialized;U.onRuntimeInitialized=function(){t&&t(),e(U)}}return U},ye=function e(){sn||_(),sn||(ye=e)},U.run=_,U.preInit)for("function"==typeof U.preInit&&(U.preInit=[U.preInit]);0<U.preInit.length;)U.preInit.pop()();_(),(A.prototype=Object.create(A.prototype)).constructor=A,A.prototype.__class__=A,A.__cache__={},U.WrapperObject=A,U.getCache=m,U.wrapPointer=C,U.castObject=function(e,t){return C(e.ptr,t)},U.NULL=C(0),U.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete m(e.__class__)[e.ptr]},U.compare=function(e,t){return e.ptr===t.ptr},U.getPointer=function(e){return e.ptr},U.getClass=function(e){return e.__class__};var ln={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(ln.needed){for(var e=0;e<ln.temps.length;e++)U._free(ln.temps[e]);ln.temps.length=0,U._free(ln.buffer),ln.buffer=0,ln.size+=ln.needed,ln.needed=0}ln.buffer||(ln.size+=128,ln.buffer=U._malloc(ln.size),i(ln.buffer)),ln.pos=0},alloc:function(e,t){return i(ln.buffer),ln.pos+(e=7+(e=e.length*t.BYTES_PER_ELEMENT)&-8)>=ln.size?(i(0<e),ln.needed+=e,t=U._malloc(e),ln.temps.push(t)):(t=ln.buffer+ln.pos,ln.pos+=e),t},copy:function(e,t,r){switch(t.BYTES_PER_ELEMENT){case 2:r>>=1;break;case 4:r>>=2;break;case 8:r>>=3}for(var n=0;n<e.length;n++)t[r+n]=e[n]}};return(E.prototype=Object.create(A.prototype)).constructor=E,E.prototype.__class__=E,E.__cache__={},U.Status=E,E.prototype.code=E.prototype.code=function(){return ve(this.ptr)},E.prototype.ok=E.prototype.ok=function(){return!!De(this.ptr)},E.prototype.error_msg=E.prototype.error_msg=function(){return a(Pe(this.ptr))},E.prototype.__destroy__=E.prototype.__destroy__=function(){Me(this.ptr)},(h.prototype=Object.create(A.prototype)).constructor=h,h.prototype.__class__=h,h.__cache__={},U.DracoUInt16Array=h,h.prototype.GetValue=h.prototype.GetValue=function(e){return e&&"object"==typeof e&&(e=e.ptr),Le(this.ptr,e)},h.prototype.size=h.prototype.size=function(){return Fe(this.ptr)},h.prototype.__destroy__=h.prototype.__destroy__=function(){Se(this.ptr)},(B.prototype=Object.create(A.prototype)).constructor=B,B.prototype.__class__=B,B.__cache__={},U.PointCloud=B,B.prototype.num_attributes=B.prototype.num_attributes=function(){return Re(this.ptr)},B.prototype.num_points=B.prototype.num_points=function(){return Oe(this.ptr)},B.prototype.__destroy__=B.prototype.__destroy__=function(){we(this.ptr)},(T.prototype=Object.create(A.prototype)).constructor=T,T.prototype.__class__=T,T.__cache__={},U.DracoUInt8Array=T,T.prototype.GetValue=T.prototype.GetValue=function(e){return e&&"object"==typeof e&&(e=e.ptr),Ue(this.ptr,e)},T.prototype.size=T.prototype.size=function(){return Ve(this.ptr)},T.prototype.__destroy__=T.prototype.__destroy__=function(){He(this.ptr)},(x.prototype=Object.create(A.prototype)).constructor=x,x.prototype.__class__=x,x.__cache__={},U.DracoUInt32Array=x,x.prototype.GetValue=x.prototype.GetValue=function(e){return e&&"object"==typeof e&&(e=e.ptr),ke(this.ptr,e)},x.prototype.size=x.prototype.size=function(){return Ye(this.ptr)},x.prototype.__destroy__=x.prototype.__destroy__=function(){ze(this.ptr)},(b.prototype=Object.create(A.prototype)).constructor=b,b.prototype.__class__=b,b.__cache__={},U.AttributeOctahedronTransform=b,b.prototype.InitFromAttribute=b.prototype.InitFromAttribute=function(e){return e&&"object"==typeof e&&(e=e.ptr),!!je(this.ptr,e)},b.prototype.quantization_bits=b.prototype.quantization_bits=function(){return We(this.ptr)},b.prototype.__destroy__=b.prototype.__destroy__=function(){Xe(this.ptr)},(g.prototype=Object.create(A.prototype)).constructor=g,g.prototype.__class__=g,g.__cache__={},U.PointAttribute=g,g.prototype.size=g.prototype.size=function(){return Ze(this.ptr)},g.prototype.GetAttributeTransformData=g.prototype.GetAttributeTransformData=function(){return C(Qe(this.ptr),v)},g.prototype.attribute_type=g.prototype.attribute_type=function(){return $e(this.ptr)},g.prototype.data_type=g.prototype.data_type=function(){return et(this.ptr)},g.prototype.num_components=g.prototype.num_components=function(){return tt(this.ptr)},g.prototype.normalized=g.prototype.normalized=function(){return!!rt(this.ptr)},g.prototype.byte_stride=g.prototype.byte_stride=function(){return nt(this.ptr)},g.prototype.byte_offset=g.prototype.byte_offset=function(){return it(this.ptr)},g.prototype.unique_id=g.prototype.unique_id=function(){return ot(this.ptr)},g.prototype.__destroy__=g.prototype.__destroy__=function(){at(this.ptr)},(v.prototype=Object.create(A.prototype)).constructor=v,v.prototype.__class__=v,v.__cache__={},U.AttributeTransformData=v,v.prototype.transform_type=v.prototype.transform_type=function(){return ut(this.ptr)},v.prototype.__destroy__=v.prototype.__destroy__=function(){lt(this.ptr)},(D.prototype=Object.create(A.prototype)).constructor=D,D.prototype.__class__=D,D.__cache__={},U.AttributeQuantizationTransform=D,D.prototype.InitFromAttribute=D.prototype.InitFromAttribute=function(e){return e&&"object"==typeof e&&(e=e.ptr),!!dt(this.ptr,e)},D.prototype.quantization_bits=D.prototype.quantization_bits=function(){return ft(this.ptr)},D.prototype.min_value=D.prototype.min_value=function(e){return e&&"object"==typeof e&&(e=e.ptr),pt(this.ptr,e)},D.prototype.range=D.prototype.range=function(){return _t(this.ptr)},D.prototype.__destroy__=D.prototype.__destroy__=function(){At(this.ptr)},(P.prototype=Object.create(A.prototype)).constructor=P,P.prototype.__class__=P,P.__cache__={},U.DracoInt8Array=P,P.prototype.GetValue=P.prototype.GetValue=function(e){return e&&"object"==typeof e&&(e=e.ptr),Ct(this.ptr,e)},P.prototype.size=P.prototype.size=function(){return yt(this.ptr)},P.prototype.__destroy__=P.prototype.__destroy__=function(){Et(this.ptr)},(M.prototype=Object.create(A.prototype)).constructor=M,M.prototype.__class__=M,M.__cache__={},U.MetadataQuerier=M,M.prototype.HasEntry=M.prototype.HasEntry=function(e,t){var r=this.ptr;return ln.prepare(),e&&"object"==typeof e&&(e=e.ptr),t=t&&"object"==typeof t?t.ptr:y(t),!!Bt(r,e,t)},M.prototype.GetIntEntry=M.prototype.GetIntEntry=function(e,t){var r=this.ptr;return ln.prepare(),e&&"object"==typeof e&&(e=e.ptr),t=t&&"object"==typeof t?t.ptr:y(t),Tt(r,e,t)},M.prototype.GetIntEntryArray=M.prototype.GetIntEntryArray=function(e,t,r){var n=this.ptr;ln.prepare(),e&&"object"==typeof e&&(e=e.ptr),t=t&&"object"==typeof t?t.ptr:y(t),r&&"object"==typeof r&&(r=r.ptr),xt(n,e,t,r)},M.prototype.GetDoubleEntry=M.prototype.GetDoubleEntry=function(e,t){var r=this.ptr;return ln.prepare(),e&&"object"==typeof e&&(e=e.ptr),t=t&&"object"==typeof t?t.ptr:y(t),bt(r,e,t)},M.prototype.GetStringEntry=M.prototype.GetStringEntry=function(e,t){var r=this.ptr;return ln.prepare(),e&&"object"==typeof e&&(e=e.ptr),t=t&&"object"==typeof t?t.ptr:y(t),a(gt(r,e,t))},M.prototype.NumEntries=M.prototype.NumEntries=function(e){return e&&"object"==typeof e&&(e=e.ptr),vt(this.ptr,e)},M.prototype.GetEntryName=M.prototype.GetEntryName=function(e,t){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),a(Dt(this.ptr,e,t))},M.prototype.__destroy__=M.prototype.__destroy__=function(){Pt(this.ptr)},(I.prototype=Object.create(A.prototype)).constructor=I,I.prototype.__class__=I,I.__cache__={},U.DracoInt16Array=I,I.prototype.GetValue=I.prototype.GetValue=function(e){return e&&"object"==typeof e&&(e=e.ptr),It(this.ptr,e)},I.prototype.size=I.prototype.size=function(){return Lt(this.ptr)},I.prototype.__destroy__=I.prototype.__destroy__=function(){Ft(this.ptr)},(L.prototype=Object.create(A.prototype)).constructor=L,L.prototype.__class__=L,L.__cache__={},U.DracoFloat32Array=L,L.prototype.GetValue=L.prototype.GetValue=function(e){return e&&"object"==typeof e&&(e=e.ptr),Nt(this.ptr,e)},L.prototype.size=L.prototype.size=function(){return Rt(this.ptr)},L.prototype.__destroy__=L.prototype.__destroy__=function(){Ot(this.ptr)},(F.prototype=Object.create(A.prototype)).constructor=F,F.prototype.__class__=F,F.__cache__={},U.GeometryAttribute=F,F.prototype.__destroy__=F.prototype.__destroy__=function(){Gt(this.ptr)},(S.prototype=Object.create(A.prototype)).constructor=S,S.prototype.__class__=S,S.__cache__={},U.DecoderBuffer=S,S.prototype.Init=S.prototype.Init=function(e,t){var r=this.ptr;if(ln.prepare(),"object"==typeof e&&"object"==typeof e){var n=ln.alloc(e,se);ln.copy(e,se,n),e=n}t&&"object"==typeof t&&(t=t.ptr),Vt(r,e,t)},S.prototype.__destroy__=S.prototype.__destroy__=function(){Ht(this.ptr)},(N.prototype=Object.create(A.prototype)).constructor=N,N.prototype.__class__=N,N.__cache__={},U.Decoder=N,N.prototype.GetEncodedGeometryType=N.prototype.GetEncodedGeometryType=function(e){return e&&"object"==typeof e&&(e=e.ptr),kt(this.ptr,e)},N.prototype.DecodeBufferToPointCloud=N.prototype.DecodeBufferToPointCloud=function(e,t){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),C(Yt(this.ptr,e,t),E)},N.prototype.DecodeBufferToMesh=N.prototype.DecodeBufferToMesh=function(e,t){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),C(zt(this.ptr,e,t),E)},N.prototype.GetAttributeId=N.prototype.GetAttributeId=function(e,t){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),Jt(this.ptr,e,t)},N.prototype.GetAttributeIdByName=N.prototype.GetAttributeIdByName=function(e,t){var r=this.ptr;return ln.prepare(),e&&"object"==typeof e&&(e=e.ptr),t=t&&"object"==typeof t?t.ptr:y(t),jt(r,e,t)},N.prototype.GetAttributeIdByMetadataEntry=N.prototype.GetAttributeIdByMetadataEntry=function(e,t,r){var n=this.ptr;return ln.prepare(),e&&"object"==typeof e&&(e=e.ptr),t=t&&"object"==typeof t?t.ptr:y(t),r=r&&"object"==typeof r?r.ptr:y(r),Wt(n,e,t,r)},N.prototype.GetAttribute=N.prototype.GetAttribute=function(e,t){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),C(Xt(this.ptr,e,t),g)},N.prototype.GetAttributeByUniqueId=N.prototype.GetAttributeByUniqueId=function(e,t){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),C(qt(this.ptr,e,t),g)},N.prototype.GetMetadata=N.prototype.GetMetadata=function(e){return e&&"object"==typeof e&&(e=e.ptr),C(Zt(this.ptr,e),G)},N.prototype.GetAttributeMetadata=N.prototype.GetAttributeMetadata=function(e,t){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),C(Qt(this.ptr,e,t),G)},N.prototype.GetFaceFromMesh=N.prototype.GetFaceFromMesh=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!$t(this.ptr,e,t,r)},N.prototype.GetTriangleStripsFromMesh=N.prototype.GetTriangleStripsFromMesh=function(e,t){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),er(this.ptr,e,t)},N.prototype.GetTrianglesUInt16Array=N.prototype.GetTrianglesUInt16Array=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!tr(this.ptr,e,t,r)},N.prototype.GetTrianglesUInt32Array=N.prototype.GetTrianglesUInt32Array=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!rr(this.ptr,e,t,r)},N.prototype.GetAttributeFloat=N.prototype.GetAttributeFloat=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!nr(this.ptr,e,t,r)},N.prototype.GetAttributeFloatForAllPoints=N.prototype.GetAttributeFloatForAllPoints=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!ir(this.ptr,e,t,r)},N.prototype.GetAttributeIntForAllPoints=N.prototype.GetAttributeIntForAllPoints=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!or(this.ptr,e,t,r)},N.prototype.GetAttributeInt8ForAllPoints=N.prototype.GetAttributeInt8ForAllPoints=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!ar(this.ptr,e,t,r)},N.prototype.GetAttributeUInt8ForAllPoints=N.prototype.GetAttributeUInt8ForAllPoints=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!sr(this.ptr,e,t,r)},N.prototype.GetAttributeInt16ForAllPoints=N.prototype.GetAttributeInt16ForAllPoints=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!ur(this.ptr,e,t,r)},N.prototype.GetAttributeUInt16ForAllPoints=N.prototype.GetAttributeUInt16ForAllPoints=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!lr(this.ptr,e,t,r)},N.prototype.GetAttributeInt32ForAllPoints=N.prototype.GetAttributeInt32ForAllPoints=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!cr(this.ptr,e,t,r)},N.prototype.GetAttributeUInt32ForAllPoints=N.prototype.GetAttributeUInt32ForAllPoints=function(e,t,r){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),!!dr(this.ptr,e,t,r)},N.prototype.GetAttributeDataArrayForAllPoints=N.prototype.GetAttributeDataArrayForAllPoints=function(e,t,r,n,i){return e&&"object"==typeof e&&(e=e.ptr),t&&"object"==typeof t&&(t=t.ptr),r&&"object"==typeof r&&(r=r.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),!!fr(this.ptr,e,t,r,n,i)},N.prototype.SkipAttributeTransform=N.prototype.SkipAttributeTransform=function(e){e&&"object"==typeof e&&(e=e.ptr),pr(this.ptr,e)},N.prototype.__destroy__=N.prototype.__destroy__=function(){_r(this.ptr)},(R.prototype=Object.create(A.prototype)).constructor=R,R.prototype.__class__=R,R.__cache__={},U.Mesh=R,R.prototype.num_faces=R.prototype.num_faces=function(){return mr(this.ptr)},R.prototype.num_attributes=R.prototype.num_attributes=function(){return Cr(this.ptr)},R.prototype.num_points=R.prototype.num_points=function(){return yr(this.ptr)},R.prototype.__destroy__=R.prototype.__destroy__=function(){Er(this.ptr)},(O.prototype=Object.create(A.prototype)).constructor=O,O.prototype.__class__=O,O.__cache__={},U.VoidPtr=O,O.prototype.__destroy__=O.prototype.__destroy__=function(){hr(this.ptr)},(w.prototype=Object.create(A.prototype)).constructor=w,w.prototype.__class__=w,w.__cache__={},U.DracoInt32Array=w,w.prototype.GetValue=w.prototype.GetValue=function(e){return e&&"object"==typeof e&&(e=e.ptr),Tr(this.ptr,e)},w.prototype.size=w.prototype.size=function(){return xr(this.ptr)},w.prototype.__destroy__=w.prototype.__destroy__=function(){br(this.ptr)},(G.prototype=Object.create(A.prototype)).constructor=G,G.prototype.__class__=G,G.__cache__={},U.Metadata=G,G.prototype.__destroy__=G.prototype.__destroy__=function(){vr(this.ptr)},function(){function e(){U.OK=Dr(),U.DRACO_ERROR=Pr(),U.IO_ERROR=Mr(),U.INVALID_PARAMETER=Ir(),U.UNSUPPORTED_VERSION=Lr(),U.UNKNOWN_VERSION=Fr(),U.DT_INVALID=Sr(),U.DT_INT8=Nr(),U.DT_UINT8=Rr(),U.DT_INT16=Or(),U.DT_UINT16=wr(),U.DT_INT32=Gr(),U.DT_UINT32=Ur(),U.DT_INT64=Vr(),U.DT_UINT64=Hr(),U.DT_FLOAT32=Kr(),U.DT_FLOAT64=kr(),U.DT_BOOL=Yr(),U.DT_TYPES_COUNT=zr(),U.INVALID_GEOMETRY_TYPE=Jr(),U.POINT_CLOUD=jr(),U.TRIANGULAR_MESH=Wr(),U.ATTRIBUTE_INVALID_TRANSFORM=Xr(),U.ATTRIBUTE_NO_TRANSFORM=qr(),U.ATTRIBUTE_QUANTIZATION_TRANSFORM=Zr(),U.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Qr(),U.INVALID=$r(),U.POSITION=en(),U.NORMAL=tn(),U.COLOR=rn(),U.TEX_COORD=nn(),U.GENERIC=on()}me?e():_e.unshift(e)}(),"function"==typeof U.onModuleParsed&&U.onModuleParsed(),r})({wasmBinary:r}).then(function(e){L=e,n()})})}),F}();let n=0,o={version:void 0,groupNode:void 0,geoPackage:{},matrials:void 0,texturePackage:{}},a=new DataView(r);o.version=a.getFloat32(n,!0),o.version=Number(o.version.toFixed(2)),n+=Float32Array.BYTES_PER_ELEMENT;let u=0;o.version>=3&&(u=a.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT),o.version>=2&&(a.getUint32(n,!0),n+=Uint32Array.BYTES_PER_ELEMENT);let l=a.getUint32(n,!0);n+=Uint32Array.BYTES_PER_ELEMENT;let c,d=new Uint8Array(r,n,l);o.version>=3&&0===u?c=d.buffer:(c=function(e,t){let r=new Uint8Array(e,t);return i.inflate(r).buffer}(r,n),n=0),a=new DataView(c);let f=a.getUint32(n,!0);return n+=Uint32Array.BYTES_PER_ELEMENT,n=function(e,t,r,n){let i={},o=[];t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;let a=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let i=0;i<a;i++)r=w(e,t,r,o,n.version);i.pageLods=o;let s=r%4;return 0!==s&&(r+=4-s),n.groupNode=i,r}(c,a,n,o),n=function(e,t,r,n,i){t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;let o=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let a=0;a<o;a++){i>=3&&(t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT);let o=R(e,t,r),a=o.string,s=(r=o.bytesOffset)%4;0!==s&&(r+=4-s);let u=t.getUint32(r,!0);if(r+=Int32Array.BYTES_PER_ELEMENT,i>=3)switch(u){case 0:u=1;break;case 1:u=3;break;case 2:u=2}let l,c={vertexAttributes:[],attrLocation:{},instanceCount:0,instanceMode:0,instanceIndex:-1},d=[];1===u?r=Y(e,t,r,c,i):2===u&&i>=3?r=p(e,t,r,c):2===u?r=z(e,t,r,c,i):3===u&&(r=M(e,t,r,c,i,d,L)),2===u&&i>=3?r=_(e,t,r,d):3===u||(r=J(e,t,r,d,i)),2===d.length&&13===d[1].primitiveType&&d[1].indicesCount>=3&&(l=S3MEdgeProcessor.createEdgeDataByIndices(c,d[1])),n[a]={vertexPackage:c,arrIndexPackage:d,edgeGeometry:l},i>=3&&(t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT,t.getFloat64(r,!0),r+=Float64Array.BYTES_PER_ELEMENT)}return i<3&&(r+=t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT),r}(c,a,n,o.geoPackage,o.version),n=function(e,t,r,n,i){let o=t.getUint32(r,!0),a=r+=Uint32Array.BYTES_PER_ELEMENT,u=a+o,l=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let o=0;o<l;o++){let o=R(e,t,r),u=o.string,l=((r=o.bytesOffset)-a)%4;0!==l&&(r+=4-l),t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;let c=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let d=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let f=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let p=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let _=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let A=new Uint8Array(e,r,p);r+=p,3.01===i&&(f=re(f));let m=10===_||11===_?33776:33779;if(22===f&&(m=36196),!I.s3tc&&(33776===m||33779===m)){let e=new Uint8Array(c*d*4);s.decode(e,c,d,A,_),A=e,f=0,m=10===_||10===_?273:4369}n[u]={id:u,width:c,height:d,compressType:f,nFormat:_,internalFormat:m,arrayBufferView:A}}return u}(c,a,n,o.texturePackage,o.version),n=function(e,t,r,n){let i=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let o=N(new Uint8Array(e,r,i));return r+=i,n.materials=JSON.parse(o),r}(c,a,n,o),function(e,t,r,n,i,o){if(o>=3&&(n=t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT),!(1&~n)){t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT;let n=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let a=0;a<n;a++){let n=R(e,t,r),a=n.string,s=t.getUint32(r=n.bytesOffset,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let u={};if(i[a].pickInfo=u,-1==i[a].vertexPackage.instanceIndex){let e=new Float32Array(i[a].vertexPackage.verticesCount);for(let n=0;n<s;n++){let i=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let o=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;let a=0,s=0;u[i]={batchId:n};for(let i=0;i<o;i++)s=t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT,a=t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT,e.fill(n,s,s+a);u[i].vertexColorOffset=s,u[i].vertexCount=a}X(i[a].vertexPackage,e,void 0)}else{let e=i[a].vertexPackage.instanceCount,n=i[a].vertexPackage.instanceBuffer,l=i[a].vertexPackage.instanceMode,c=new Float32Array(e),d=[];for(let e=0;e<s;e++){let e=t.getUint32(r,!0);d.push(e),r+=Uint32Array.BYTES_PER_ELEMENT;let n=t.getUint32(r,!0);r+=Uint32Array.BYTES_PER_ELEMENT;for(let e=0;e<n;e++)t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT,o>=3&&(t.getUint32(r,!0),r+=Uint32Array.BYTES_PER_ELEMENT)}let f=17===l?16:28;f*=Float32Array.BYTES_PER_ELEMENT;for(let t=0;t<e;t++){c[t]=t,W(n,t*l*Float32Array.BYTES_PER_ELEMENT+f,j);let e=2===o?d[t]:j.red+256*j.green+65536*j.blue;void 0===u[e]&&(u[e]={vertexColorCount:1,instanceIds:[],vertexColorOffset:t}),u[e].instanceIds.push(t)}X(i[a].vertexPackage,c,1)}}}}(c,a,n,f,o.geoPackage,o.version),o};const ne=4369;function ie(e,t,r){let n=e._gl;this.contextId=e.id,this.textureId=t,this.layerId=r.layerId,this.rootName=r.rootName,this.context=e,this.width=r.width,this.height=r.height,this.compressType=r.compressType,this.internalFormat=r.internalFormat,this.pixelFormat=r.pixelFormat,this.arrayBufferView=r.arrayBufferView,this.wrapS=Cesium.defaultValue(r.wrapS,Cesium.TextureWrap.CLAMP_TO_EDGE),this.wrapT=Cesium.defaultValue(r.wrapT,Cesium.TextureWrap.CLAMP_TO_EDGE),this._target=n.TEXTURE_2D,this._texture=void 0,this.refCount=1,this.ready=!r.isTexBlock,this.renderable=!r.isTexBlock,this.isTexBlock=r.isTexBlock,this.arrayBufferView&&this.init()}function oe(){this.ambientColor=new Cesium.Color,this.diffuseColor=new Cesium.Color,this.specularColor=new Cesium.Color(0,0,0,0),this.shininess=50,this.bTransparentSorting=!1,this.alphaMode=void 0,this.texMatrix=Cesium.Matrix4.clone(Cesium.Matrix4.IDENTITY,new Cesium.Matrix4),this.textures=[],this._RGBTOBGR=!1}function ae(){this.context=void 0,this.model=void 0,this.index=void 0}function se(){this.model=void 0,this.context=void 0,this.index=0}ie.prototype.init=function(){let e=this.context._gl;this._texture||(this._texture=e.createTexture()),e.bindTexture(e.TEXTURE_2D,this._texture);let t=this.internalFormat;6410!==t&&t!==ne||e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0);let r=0;if(this.arrayBufferView){let n=0,i=this.width,o=this.height,a=function(e,t,r,n){let i=e.length,o=r,a=n,s=0;for(;s+=Cesium.PixelFormat.compressedTextureSizeInBytes(t,o,a),o>>=1,a>>=1,0!==o||0!==a;)o=Math.max(o,1),a=Math.max(a,1);return s===i}(this.arrayBufferView,t,i,o);do{let a=Cesium.PixelFormat.compressedTextureSizeInBytes(t,i,o),s=new Uint8Array(this.arrayBufferView.buffer,this.arrayBufferView.byteOffset+n,a);t===ne?e.texImage2D(e.TEXTURE_2D,r++,e.RGBA,i,o,0,e.RGBA,e.UNSIGNED_BYTE,s):e.compressedTexImage2D(e.TEXTURE_2D,r++,t,i,o,0,s),i=Math.max(i>>1,1),o=Math.max(o>>1,1),n+=a}while(n<this.arrayBufferView.byteLength&&a)}else{let r=Cesium.PixelFormat.compressedTextureSizeInBytes(t,this.width,this.height);t===ne?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this._width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(this.width*this.height*4)):e.compressedTexImage2D(e.TEXTURE_2D,0,t,this.width,this.height,0,new Uint8Array(r))}r>1?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR)):(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,this.wrapS),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,this.wrapT),e.texParameteri(this._target,this.context._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,1),e.bindTexture(e.TEXTURE_2D,null),this.arrayBufferView=void 0,this.ready=!0},ie.prototype.copyFrom=function(e){let t=this.context._gl,r=this._target;t.activeTexture(t.TEXTURE0),t.bindTexture(r,this._texture);let n=e.xOffset,i=e.yOffset,o=e.width,a=e.height,s=e.arrayBufferView,u=this.internalFormat;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!1),t.compressedTexSubImage2D(r,0,n,i,o,a,u,s),t.bindTexture(r,null)},ie.prototype.update=function(e){this.context=e.context,this.contextId=e.context.id,this.layerId=e.layerId,this.rootName=e.rootName,this.textureId=e.textureId,this.width=e.width,this.height=e.height,this.internalFormat=e.internalFormat,this.arrayBufferView=e.arrayBufferView,this.refCount=1,this.ready=!1,this.renderable=!1,defined(this.arrayBufferView)&&this.init()},ie.prototype.isDestroyed=function(){return!1},ie.prototype.destroy=function(){this.context._gl.deleteTexture(this._texture),this._texture=null,this.id=0,Cesium.destroyObject(this)},oe.prototype.isDestroyed=function(){return!1},oe.prototype.destroy=function(){let e=this.textures.length;for(let t=0;t<e;t++)this.textures[t].destroy();return this.textures.length=0,this.ambientColor=void 0,this.diffuseColor=void 0,this.specularColor=void 0,Cesium.destroyObject(this)},oe.prototype.createCRN=function(e,t,r,n,i,o,a,s,u,l){var c;if(u=defaultValue(u,!0),s?c=loadCRN(i.imageBuffer,!0,!0):S3MTaskManager.CRNTaskProcessorReady&&(c=loadCRNForS3M(S3MTaskManager.CRNProcessor,i.imageBuffer,!0)),defined(c)){var d=this;return c.then(function(t){if(!d.isDestroyed()){l=defaultValue(l,{});var s=DDSTextureManager.CreateTexture(e,r,i.width,i.height,i.nFormat,S3MCompressType.enrS3TCDXTN,t.bufferView,!1,o,a,u);l.isEmissiveTex?d.emissiveTexture=s:l.isNormalTexture?d.normalTexture=s:0===n&&d._textures.length>0?d._textures.splice(0,0,s):d._textures.push(s)}}),c}},oe.prototype.createWebp=async function(e,t,r){let n=Cesium.defaultValue(r.mipmapEnabled,!0),i=r.arrayBufferView,o=r.wrapS,a=r.wrapT;for(var s=i.length,u=i.byteOffset,l=new DataView(i.buffer),c=0,d=[];c<s;){var f=l.getUint32(u,!0);u+=Uint32Array.BYTES_PER_ELEMENT,c+=Uint32Array.BYTES_PER_ELEMENT;var p=i.subarray(c,c+f);u+=f,c+=f;var _=Cesium.loadImageFromTypedArray({uint8Array:p,format:"image/webp"});d.push(_)}var A=this;return Promise.all(d).then(r=>{var i=r[0];if(Cesium.defined(i)){var s=!0;Cesium.Math.isPowerOfTwo(i.width)&&Cesium.Math.isPowerOfTwo(i.height)||(o=Cesium.TextureWrap.CLAMP_TO_EDGE,a=Cesium.TextureWrap.CLAMP_TO_EDGE,s=!1);var u=new Cesium.Texture({context:t,source:i,pixelFormat:Cesium.PixelFormat.RGBA,flipY:!1,sampler:new Cesium.Sampler({wrapS:o,wrapT:a,minificationFilter:0!==r.length&&s?Cesium.TextureMinificationFilter.LINEAR_MIPMAP_LINEAR:Cesium.TextureMinificationFilter.LINEAR,magnificationFilter:Cesium.TextureMagnificationFilter.LINEAR})});t.textureCache.addTexture(e,u),A.textures.push(u)}var l=t._gl,c=Cesium.PixelFormat.RGBA,d=Cesium.PixelDatatype.UNSIGNED_BYTE;if(r.length>1&&n){l.activeTexture(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,u._texture);for(var f=1,p=r.length;f<p;f++)l.texImage2D(l.TEXTURE_2D,f,c,c,d,r[f]);l.bindTexture(l.TEXTURE_2D,null)}})},ae.prototype.set=function(e,t,r){this.context=e,this.model=t,this.index=r},ae.prototype.execute=function(){let e=this.context,t=this.model.vertexPackage,r=t.vertexAttributes[this.index];if(!Cesium.defined(r))throw new Cesium.DeveloperError("attribute is null");if(-1!==t.instanceIndex&&!Cesium.defined(this.model.instanceBuffer)){if(!Cesium.defined(t.instanceBuffer))throw new Cesium.DeveloperError("instance buffer is null");this.model.instanceBuffer=Cesium.Buffer.createVertexBuffer({context:e,typedArray:t.instanceBuffer,usage:Cesium.BufferUsage.STATIC_DRAW})}1!==r.instanceDivisor||Cesium.defined(r.typedArray)?Cesium.defined(r.vertexBuffer)||(r.vertexBuffer=Cesium.Buffer.createVertexBuffer({context:e,typedArray:r.typedArray,usage:Cesium.BufferUsage.STATIC_DRAW}),r.typedArray=null,delete r.typedArray):r.vertexBuffer=this.model.instanceBuffer},se.prototype.set=function(e,t,r){this.model=t,this.context=e,this.index=r},se.prototype.execute=function(){let e=this.context,t=this.model.arrIndexPackage[this.index],r=this.model.vertexPackage.verticesCount;if(!Cesium.defined(t))throw new Cesium.DeveloperError("index package is null");if(Cesium.defined(t.indexBuffer))return;if(!Cesium.defined(t.indicesTypedArray))throw new Cesium.DeveloperError("index buffer is null");let n=Cesium.IndexDatatype.UNSIGNED_SHORT;(1===t.indexType||r>=Cesium.Math.SIXTY_FOUR_KILOBYTES)&&e.elementIndexUint&&(n=Cesium.IndexDatatype.UNSIGNED_INT),Cesium.defined(t.indexBuffer)||(t.indexBuffer=Cesium.Buffer.createIndexBuffer({context:e,typedArray:t.indicesTypedArray,usage:Cesium.BufferUsage.STATIC_DRAW,indexDatatype:n})),t.indicesTypedArray=null,delete t.indicesTypedArray};var ue=Object.freeze({VertexNormal:"VertexNormal",VertexColor:"VertexColor",TexCoord:"TexCoord",TexCoord2:"TexCoord2",Instance:"Instance",COMPRESS_VERTEX:"COMPRESS_VERTEX",COMPRESS_NORMAL:"COMPRESS_NORMAL",COMPRESS_COLOR:"COMPRESS_COLOR",COMPRESS_TEXCOORD:"COMPRESS_TEXCOORD",UseLineColor:"USE_LINECOLOR",InstanceBim:"InstanceBim",InstancePipe:"InstancePipe",COMPUTE_TEXCOORD:"COMPUTE_TEXCOORD"}),le=Object.freeze({SVC_Vertex:1,SVC_Normal:2,SVC_VertexColor:4,SVC_SecondColor:8,SVC_TexutreCoord:16,SVC_TexutreCoordIsW:32}),ce=Object.freeze({BIM:17,BIM2:16,PIPELINE:29});function de(){this.model=void 0,this.context=void 0}Cesium,de.prototype.set=function(e,t){this.model=t,this.context=e},de.prototype.execute=function(){const e=this.context,t=this.model,r=t.layer;let n=t.vs,i=t.fs;const o=t.attributeLocations,a=t.material,s=t.vertexPackage;e.webgl2&&Cesium.VERSION.length>4&&(n=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+n,i=["#define varying in","#define gl_FragColor out_FragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+i);let u=t.batchTable?t.batchTable.getVertexShaderCallback()(n):n;void 0===e.texturelod&&(e.texturelod=Cesium.defaultValue(function(e,t){let r=t.length;for(let n=0;n<r;++n){let r=e.getExtension(t[n]);if(r)return r}}(e._gl,["EXT_shader_texture_lod"]),!1));let l=new Cesium.ShaderSource({sources:[u]}),c=new Cesium.ShaderSource({sources:[i]});if(Cesium.defined(o.aNormal)&&(l.defines.push(ue.VertexNormal),c.defines.push(ue.VertexNormal)),Cesium.defined(o.aColor)&&l.defines.push(ue.VertexColor),a&&a._RGBTOBGR&&c.defines.push("RGBTOBGR"),a&&a.textures.length>0&&(l.defines.push(ue.COMPUTE_TEXCOORD),c.defines.push(ue.COMPUTE_TEXCOORD)),a&&2===a.textures.length&&(l.defines.push(ue.TexCoord2),c.defines.push(ue.TexCoord2)),Cesium.defined(o.aTexCoord0)&&(l.defines.push("TexCoord"),c.defines.push("TexCoord")),s.instanceIndex>-1&&l.defines.push(ue.Instance),s.instanceMode!==ce.BIM&&s.instanceMode!==ce.BIM2||l.defines.push(ue.InstanceBim),s.instanceMode===ce.PIPELINE&&l.defines.push(ue.InstancePipe),Cesium.defined(s.compressOptions)){let e=s.compressOptions;(e&le.SVC_Vertex)===le.SVC_Vertex&&l.defines.push(ue.COMPRESS_VERTEX),(e&le.SVC_Normal)===le.SVC_Normal&&l.defines.push(ue.COMPRESS_NORMAL),(e&le.SVC_VertexColor)===le.SVC_VertexColor&&l.defines.push(ue.COMPRESS_COLOR),(e&le.SVC_TexutreCoord)===le.SVC_TexutreCoord&&l.defines.push(ue.COMPRESS_TEXCOORD)}s.textureCoordIsW&&o.TexCoord&&l.defines.push(ue.TEXTURE_COORD_ONE_IS_W),Cesium.defined(s.customVertexAttribute)&&Cesium.defined(s.customVertexAttribute.TextureCoordMatrix)&&l.defines.push("USE_TextureCoordMatrix"),"MESHOPT"===r._vertexCompressionType&&l.defines.push("MeshOPT_Compress"),s.textureCoordIsW&&o.aTexCoord0&&l.defines.push("TEXTURE_COORD_ONE_IS_W"),a.batchTable&&(l.defines.push(ue.TextureAtlas),c.defines.push(ue.TextureAtlas)),a.batchTableBake&&(l.defines.push(ue.TextureAtlasSec),c.defines.push(ue.TextureAtlasSec)),Cesium.defined(t.arrIndexPackage)&&t.arrIndexPackage.length>0&&2===t.arrIndexPackage[0].primitiveType&&c.defines.push(ue.UseLineColor),function(e){return 1!==e._brightness||1!==e._contrast||0!==e._hue||1!==e._saturation||1!==e._gamma}(r)&&c.defines.push(ue.ADJUST_COLOR),e.webgl2&&(l.defines.push("WEBGL2"),c.defines.push("WEBGL2")),t.shaderProgram=Cesium.ShaderProgram.fromCache({context:e,vertexShaderSource:l,fragmentShaderSource:c,attributeLocations:o})};var fe=Object.freeze({RESET:0,SetColor:1,SELECTED:2,HIDE:4,OFFSET:8,CLIP:16,BLOOM:32,ALL:255});function pe(e){let t,r;for(this.layer=e.layer,this.vertexPackage=e.vertexPackage,this.arrIndexPackage=e.arrIndexPackage,this.vertexBufferToCreate=new Cesium.Queue,this.indexBufferToCreate=new Cesium.Queue,this.shaderProgramToCreate=new Cesium.Queue,t=0,r=this.vertexPackage.vertexAttributes.length;t<r;t++)this.vertexBufferToCreate.enqueue(t);for(t=0,r=this.arrIndexPackage.length;t<r;t++)this.indexBufferToCreate.enqueue(t);this.shaderProgramToCreate.enqueue(0),this.boundingVolume=e.boundingVolume,this.material=Cesium.defaultValue(e.material,new oe),this.geoName=e.geoName,this.modelMatrix=e.modelMatrix,this.geoMatrix=e.geoMatrix,this.invGeoMatrix=Cesium.Matrix4.inverse(this.geoMatrix,new Cesium.Matrix4),this.instanceCount=e.vertexPackage.instanceCount,this.attributeLocations=e.vertexPackage.attrLocation,this.shaderProgram=void 0,this.vertexArray=void 0,this.colorCommand=void 0,this.pickInfo=Cesium.defaultValue(e.pickInfo,{}),this.selectionInfoMap=new Cesium.AssociativeArray,this.batchTable=void 0,this.batchTableDirty=!1,this.pickColorIdentifier="vSecondColor",this.idsOperationMap=new Cesium.AssociativeArray,this.idsColorMap=new Cesium.AssociativeArray,this.useWValue=4===e.vertexPackage.vertexAttributes[0].componentsPerAttribute,this.edgeGeometry=e.edgeGeometry,this.createBoundingBoxForInstance(),this.ready=!1}const _e=new ae,Ae=new se,me=new de;pe.prototype.createBuffers=function(e){!function(e,t){let r=e.layer.context,n=e.vertexBufferToCreate;for(;n.length;){let i=n.peek();if(_e.set(r,e,i),!t.jobScheduler.execute(_e,Cesium.JobType.BUFFER))break;n.dequeue()}}(this,e),function(e,t){let r=e.layer.context,n=e.indexBufferToCreate;for(;n.length;){let i=n.peek();if(Ae.set(r,e,i),!t.jobScheduler.execute(Ae,Cesium.JobType.BUFFER))break;n.dequeue()}}(this,e)},pe.prototype.createShaderProgram=function(e){!function(e,t){let r=e.layer.context,n=e.shaderProgramToCreate;for(;n.length&&(n.peek(),me.set(r,e),t.jobScheduler.execute(me,Cesium.JobType.PROGRAM));)n.dequeue()}(this,e)},pe.prototype.createBatchTable=function(e){!function(e){if(Cesium.defined(e.batchTable)||!e.pickInfo)return;const t=e.layer.context;let r=[];r.push({functionName:"s3m_batchTable_color",componentDatatype:Cesium.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"s3m_batchTable_operation",componentDatatype:Cesium.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4},{functionName:"s3m_batchTable_pickColor",componentDatatype:Cesium.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});let n=Object.keys(e.pickInfo);e.batchTable=new Cesium.BatchTable(t,r,e.instanceCount>0?e.instanceCount:n.length)}(this)};let Ce=new Cesium.Cartesian3;pe.prototype.createBoundingBoxForInstance=function(){const e=this.vertexPackage;if(!Cesium.defined(e)||-1===e.instanceIndex||!Cesium.defined(e.instanceBounds))return;let t=e.instanceBounds,r=new Cesium.Cartesian3(t[0],t[1],t[2]),n=new Cesium.Cartesian3(t[3],t[4],t[5]),i=Cesium.Cartesian3.lerp(r,n,.5,Ce),o=Cesium.Cartesian3.distance(i,r),a=new Cesium.Cartesian3;Cesium.Matrix4.multiplyByPoint(this.modelMatrix,i,a),this.boundingVolume.center=a,this.boundingVolume.radius=o,e.instanceBounds=void 0};let ye=new Cesium.Cartesian4;function Ee(e){pe.call(this,e),this.vs="\n attribute vec4 aPosition;\n attribute vec4 aColor;\n attribute vec3 aNormal;\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n varying vec4 vTexCoord;\n uniform vec2 decodeTexCoord0Min;\n#ifdef COMPUTE_TEXCOORD\n uniform float uTexture0Width;\n varying vec4 vTexCoordTransform;\n varying vec4 vTexMatrix;\n#endif\n#ifdef USE_TextureCoordMatrix\n attribute vec2 aTextureCoordMatrix;\n#endif\n#endif\n#ifdef COMPRESS_VERTEX\n uniform vec4 decodePositionMin;\n uniform float decodePositionNormConstant;\n#endif\n\n// meshopt判断\n#ifdef MeshOPT_Compress\n uniform vec3 decodeTexCoord0vNormConstant;\n uniform vec3 decode_texCoord1_vNormConstant;\n#else\n uniform float decode_texCoord0_normConstant;\n uniform float decode_texCoord1_normConstant;\n#endif\n\n#ifdef HYPSOMETRIC\n varying float wValue; \n#endif\n#ifdef FLATTEN\n uniform mat4 uGeoMatrix;\n uniform mat4 uInverseGeoMatrix;\n uniform sampler2D uFlattenTexture;\n uniform vec4 uFlattenRect;\n#endif\n \n uniform vec4 uSelectedColor;\n \n varying vec4 vSecondColor;\n varying vec4 vPositionMC;\n varying vec3 vPositionEC;\n#ifdef VertexColor\n varying vec4 vColor;\n#endif\n \n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const float SHIFT_RIGHT4 = 1.0 / 16.0;\n const float SHIFT_LEFT4 = 16.0;\n void getTextureMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale)\n {\n if(nZ <= 0.0)\n {\n return;\n }\n float nDel8 = floor(nZ * SHIFT_RIGHT8);\n float nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n float nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n YTran = nZ - nDel8 * SHIFT_LEFT8;\n XTran = nDel8 - nDel16 * SHIFT_LEFT8;\n float nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n scale = 1.0 / pow(2.0, nLevel);\n }\n \n#ifdef FLATTEN\n float unpackValue(vec4 packedValue)\n {\n float SHIFT_LEFT16 = 65536.0;\n float SHIFT_LEFT8 = 256.0;\n vec4 value = packedValue * 255.0;\n return value.r * SHIFT_LEFT16 + value.g * SHIFT_LEFT8 + value.b - 9000.0;\n }\n vec4 calculateHeight(vec4 vertexPos)\n {\n vec4 vecPos = uGeoMatrix * vec4(vertexPos.xyz, 1.0);\n vec2 vecRatio = vec2(uFlattenRect.z - uFlattenRect.x, uFlattenRect.w - uFlattenRect.y);\n vec2 vecTexCoord = vec2(vecPos.x - uFlattenRect.x, vecPos.y - uFlattenRect.y);\n vecTexCoord.x = vecTexCoord.x / vecRatio.x;\n vecTexCoord.y = vecTexCoord.y / vecRatio.y;\n if(vecTexCoord.x > 1.0 || vecTexCoord.x < 0.0 || vecTexCoord.y > 1.0 || vecTexCoord.y < 0.0)\n {\n return vertexPos;\n }\n float fHeight = unpackValue(texture2D(uFlattenTexture, vecTexCoord.xy));\n fHeight = fHeight;\n if(vecPos.z > fHeight)\n {\n vecPos.z = fHeight;\n vecPos.w = vecPos.z;\n }\n return uInverseGeoMatrix * vec4(vecPos.xyz, 1.0);\n }\n#endif\n void main()\n {\n\n #ifdef TexCoord\n vTexCoord.xy = aTexCoord0.xy;\n #ifdef COMPUTE_TEXCOORD\n vTexMatrix = vec4(0.0,0.0,1.0,0.0);\n vTexCoordTransform.x = aTexCoord0.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordTransform.x = aTextureCoordMatrix.x;\n #endif\n if(vTexCoordTransform.x < -90000.0)\n {\n vTexMatrix.z = -1.0;\n }\n getTextureMatrixFromZValue(floor(vTexCoordTransform.x), vTexMatrix.x, vTexMatrix.y, vTexMatrix.z);\n vTexMatrix.w = log2(uTexture0Width * vTexMatrix.z);\n // meshopt压缩 这里对照主版本的 主版本命名的都是通过下划线,但是插件获取uniform是通过函数,所以需要大写\n #ifdef MeshOPT_Compress\n vec2 texCoord0;\n texCoord0.x = aTexCoord0.x * decodeTexCoord0vNormConstant.x;\n texCoord0.y = aTexCoord0.y * decodeTexCoord0vNormConstant.y;\n vTexCoord.xy = decodeTexCoord0Min + texCoord0.xy;\n #endif\n #endif \n #endif\n\n #ifdef COMPRESS_VERTEX\n vec4 vertexPos = vec4(1.0);\n vertexPos = decodePositionMin + vec4(aPosition.xyz, 1.0) * decodePositionNormConstant;\n #else\n vec4 vertexPos = aPosition;\n #endif\n#ifdef FLATTEN\n vertexPos = calculateHeight(vertexPos);\n#endif\n vertexPos.w = 1.0;\n #ifdef HYPSOMETRIC\n wValue = vertexPos.w;\n #endif\n vec4 positionMC = vec4(vertexPos.xyz, 1.0);\n#ifdef VertexColor\n vColor = aColor;\n#endif\n vPositionMC = positionMC;\n vPositionEC = (czm_modelView * positionMC).xyz;\n gl_Position = czm_modelViewProjection * vec4(vertexPos.xyz, 1.0);\n }\n",this.fs="\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n uniform vec4 uDiffuseColor;\n uniform vec4 uAmbientColor;\n#ifdef TexCoord\n varying vec4 vTexCoord;\n#ifdef COMPUTE_TEXCOORD\n uniform sampler2D uTexture;\n uniform float uTexture0Width;\n varying vec4 vTexCoordTransform;\n varying vec4 vTexMatrix;\n#endif\n#endif\n\n\n#ifdef VertexColor\n varying vec4 vColor;\n#endif\n varying vec4 vSecondColor;\n varying vec4 vPositionMC;\n varying vec3 vPositionEC;\n void calculateMipLevel(in vec2 inTexCoord, in float vecTile, in float fMaxMip, inout float mipLevel)\n {\n vec2 dx = dFdx(inTexCoord * vecTile);\n vec2 dy = dFdy(inTexCoord * vecTile);\n float dotX = dot(dx, dx);\n float dotY = dot(dy, dy);\n float dMax = max(dotX, dotY);\n float dMin = min(dotX, dotY);\n float offset = (dMax - dMin) / (dMax + dMin);\n offset = clamp(offset, 0.0, 1.0);\n float d = dMax * (1.0 - offset) + dMin * offset;\n mipLevel = 0.5 * log2(d);\n mipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n }\n\n void calculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n {\n vec2 dx = dFdx(inTexCoord * vecTile.x);\n vec2 dy = dFdy(inTexCoord * vecTile.y);\n float dotX = dot(dx, dx);\n float dotY = dot(dy, dy);\n float dMax = max(dotX, dotY);\n float dMin = min(dotX, dotY);\n float offset = (dMax - dMin) / (dMax + dMin);\n offset = clamp(offset, 0.0, 1.0);\n float d = dMax * (1.0 - offset) + dMin * offset;\n mipLevel = 0.5 * log2(d);\n mipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n }\n \n void calculateTexCoord(in vec3 inTexCoord, in float scale, in float XTran, in float YTran, in float fTile, in float mipLevel, inout vec2 outTexCoord)\n {\n if(inTexCoord.z < -9000.0)\n {\n outTexCoord = inTexCoord.xy;\n }\n else\n {\n vec2 fTexCoord = fract(inTexCoord.xy);\n float offset = 1.0 * pow(2.0, mipLevel) / fTile;\n fTexCoord = clamp(fTexCoord, offset, 1.0 - offset);\n outTexCoord.x = (fTexCoord.x + XTran) * scale;\n outTexCoord.y = (fTexCoord.y + YTran) * scale;\n }\n }\n \n vec4 getTexColorForS3M(sampler2D curTexture, vec3 oriTexCoord, float texTileWidth, float fMaxMipLev, float fTexCoordScale, vec2 vecTexCoordTranslate)\n {\n vec4 color = vec4(1.0);\n float mipLevel = 0.0;\n #ifdef GL_OES_standard_derivatives\n calculateMipLevel(oriTexCoord.xy, texTileWidth, fMaxMipLev, mipLevel);\n #endif\n vec2 realTexCoord;\n calculateTexCoord(oriTexCoord, fTexCoordScale, vecTexCoordTranslate.x, vecTexCoordTranslate.y, texTileWidth, mipLevel, realTexCoord);\n if(oriTexCoord.z < -9000.0)\n {\n color = texture2D(curTexture, realTexCoord.xy);\n }\n else\n {\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(curTexture, realTexCoord.xy, mipLevel);\n #else\n color = texture2D(curTexture, realTexCoord.xy, mipLevel);\n #endif\n }\n #ifdef RGBTOBGR\n color = color.bgra;\n #endif\n return color;\n }\n#ifdef COMPUTE_TEXCOORD\n vec4 getTextureColor()\n {\n if(vTexMatrix.z < 0.0)\n {\n return vec4(1.0);\n }\n float texTileWidth0 = vTexMatrix.z * uTexture0Width;\n vec3 realTexCoord = vec3(vTexCoord.xy, vTexCoordTransform.x);\n vec4 FColor = getTexColorForS3M(uTexture, realTexCoord, texTileWidth0, vTexMatrix.w, vTexMatrix.z, vTexMatrix.xy);\n #ifdef TexCoord2\n float texTileWidth1 = vTexMatrix2.z * uTexture1Width;\n realTexCoord = vec3(vTexCoord.zw, vTexCoordTransform.y);\n vec4 SColor = getTexColorForS3M(uTexture2, realTexCoord, texTileWidth1, vTexMatrix2.w, vTexMatrix2.z, vTexMatrix2.xy);\n SColor.r = clamp(SColor.r, 0.0, 1.0);\n SColor.g = clamp(SColor.g, 0.0, 1.0);\n SColor.b = clamp(SColor.b, 0.0, 1.0);\n return FColor * SColor;\n #else\n return FColor;\n #endif\n }\n#endif\n \n void main()\n {\n vec4 baseColorWithAlpha = vec4(1.0);\n #ifdef VertexColor\n vec4 baseColorWithAlpha = vColor;\n #endif\n #ifdef COMPUTE_TEXCOORD\n baseColorWithAlpha *= getTextureColor();\n #endif \n vec4 outColor = baseColorWithAlpha;\n gl_FragColor = outColor;\n // gl_FragColor = vec4(1.0);\n }\n"}pe.prototype.updateBatchTableAttributes=function(){let e=this,t=this.idsColorMap,r=[];for(let n=0,i=t.length;n<i;n++){let i=t.values[n];i.dirty&&(i.dirty=!1,r=i.color.toBytes(),ye.x=r[0],ye.y=r[1],ye.z=r[2],ye.w=r[3],Cesium.defined(i.batchId)?this.batchTable.setBatchedAttribute(i.batchId,0,ye):Array.isArray(i.instanceIds)&&i.instanceIds.map(function(t){e.batchTable.setBatchedAttribute(t,0,ye)}))}let n=this.idsOperationMap;for(let t=0,r=n.length;t<r;t++){let r=n.values[t];r.dirty&&(r.dirty=!1,this.instanceCount>0?Array.isArray(r.instanceIds)&&r.instanceIds.map(function(t){e.batchTable.setBatchedAttribute(t,1,r.operationValue)}):Cesium.defined(r.batchId)&&this.batchTable.setBatchedAttribute(r.batchId,1,r.operationValue))}},pe.prototype.createPickIds=function(){const e=this.layer,t=e.context,r=this.pickInfo;if(!Cesium.defined(r))return;for(let e in r)r.hasOwnProperty(e)&&this.selectionInfoMap.set(e,r[e]);let n=this.batchTable,i=this.selectionInfoMap,o=i._hash;for(let r in o)if(o.hasOwnProperty(r)){let o,a=i.get(r);Cesium.defined(o)||(o=t.createPickId({primitive:e,id:r}));let s=o.color;ye.x=Cesium.Color.floatToByte(s.red),ye.y=Cesium.Color.floatToByte(s.green),ye.z=Cesium.Color.floatToByte(s.blue),ye.w=Cesium.Color.floatToByte(s.alpha),this.instanceCount>0?a.instanceIds.map(function(e){n.setBatchedAttribute(e,2,ye)}):n.setBatchedAttribute(a.batchId,2,ye)}this.pickInfo=void 0},pe.prototype.initLayerSetting=function(e){Object.keys(e._objsOperationList).length>0&&this.updateObjsOperation(e._objsOperationList)},pe.prototype.updateObjsOperation=function(e){if(!this.ready||this.selectionInfoMap.length<1)return;let t=this.selectionInfoMap._hash;for(let r in t){if(!t.hasOwnProperty(r))continue;let n=e[r];if(!Cesium.defined(n))continue;let i=t[r],o=i.batchId,a=i.instanceIds,s=this.idsOperationMap.get(r);Cesium.defined(s)||(s={batchId:o,instanceIds:a,operationValue:new Cesium.Cartesian4,dirty:!0}),s.dirty=!0,s.operationValue.x=1&s.operationValue.x|n,this.idsOperationMap.set(r,s),this.batchTableDirty=!0}},pe.prototype.transformResource=Cesium.DeveloperError.throwInstantiationError,pe.prototype.createCommand=Cesium.DeveloperError.throwInstantiationError,pe.prototype.update=Cesium.DeveloperError.throwInstantiationError,pe.prototype.isDestroyed=Cesium.DeveloperError.throwInstantiationError,pe.prototype.destroy=Cesium.DeveloperError.throwInstantiationError,(Ee.prototype=Object.create(pe.prototype)).constructor=pe,new Cesium.Cartesian4,new Cesium.Cartesian4,new Cesium.Cartesian4,Ee.prototype.createCommand=function(){if(Cesium.defined(this.colorCommand)||0!==this.vertexBufferToCreate.length||0!==this.indexBufferToCreate.length||0!==this.shaderProgramToCreate.length)return;let e=this.layer,t=this.vertexPackage,r=this.arrIndexPackage;if(r.length<1)return;let n=r[0],i=this.material;this.vertexArray=new Cesium.VertexArray({context:e.context,attributes:t.vertexAttributes,indexBuffer:n.indexBuffer}),this.colorCommand=new Cesium.DrawCommand({primitiveType:n.primitiveType,modelMatrix:this.modelMatrix,boundingVolume:Cesium.BoundingSphere.clone(this.boundingVolume),vertexArray:this.vertexArray,shaderProgram:this.shaderProgram,pass:i.bTransparentSorting?Cesium.Pass.TRANSLUCENT:Cesium.Pass.CESIUM_3D_TILE,renderState:Cesium.RenderState.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:Cesium.DepthFunction.LESS_OR_EQUAL},blending:Cesium.BlendingState.ALPHA_BLEND,stencilTest:{backFunction:Cesium.StencilFunction.ALWAYS,backOperation:{fail:Cesium.StencilOperation.KEEP,zFail:Cesium.StencilOperation.KEEP,zPass:Cesium.StencilOperation.REPLACE},enabled:!0,frontFunction:Cesium.StencilFunction.ALWAYS,frontOperation:{fail:Cesium.StencilOperation.KEEP,zFail:Cesium.StencilOperation.KEEP,zPass:Cesium.StencilOperation.REPLACE},mask:Cesium.StencilConstants.CESIUM_3D_TILE_MASK,reference:Cesium.StencilConstants.CESIUM_3D_TILE_MASK}}),instanceCount:t.instanceCount}),this.colorCommand.uniformMap=function(e,t,r){let n={uDiffuseColor:function(){return e.diffuseColor},uGeoMatrix:function(){return r.geoMatrix},uInverseGeoMatrix:function(){return r.invGeoMatrix},uTexture:function(){return e.textures[0]},uTexture0Width:function(){return e.textures[0].width},decodePositionMin:function(){return r.vertexPackage.minVerticesValue},decodePositionNormConstant:function(){return r.vertexPackage.vertCompressConstant}};return"MESHOPT"==t._vertexCompressionType&&(n.decodeTexCoord0vNormConstant=function(){return r.vertexPackage.texCoordCompressConstant[0]},n.decodeTexCoord1vNormConstant=function(){return r.vertexPackage.texCoordCompressConstant[1]},n.decodeTexCoord0Min=function(){return r.vertexPackage.minTexCoordValue[0]}),n}(i,e,this),this.vs=void 0,this.fs=void 0,this.ready=!0},Ee.prototype.transformResource=function(e,t){this.ready||(this.createBuffers(e),this.createShaderProgram(e),this.createCommand(e),this.initLayerSetting(t))},Ee.prototype.update=function(e,t){e.commandList.push(this.colorCommand)},Ee.prototype.isDestroyed=function(){return!1},Ee.prototype.destroy=function(){return this.shaderProgram=this.shaderProgram&&!this.shaderProgram.isDestroyed()&&this.shaderProgram.destroy(),this.vertexArray=this.vertexArray&&!this.vertexArray.isDestroyed()&&this.vertexArray.destroy(),this.material=this.material&&!this.material.isDestroyed()&&this.material.destroy(),this.colorCommand=void 0,this.vertexPackage=null,this.arrIndexPackage=null,this.modelMatrix=void 0,this.pickInfo=void 0,this.selectionInfoMap=void 0,this.vs=void 0,this.fs=void 0,Cesium.destroyObject(this)};var he=Object.freeze({Fill:0,WireFrame:1,Fill_And_WireFrame:2}),Be=Object.freeze({OPAQUE:"opaque",BLEND:"blend",MASK:"mask"});function Te(e){pe.call(this,e),this.vs="\n attribute vec4 aPosition;\n#ifdef VertexColor\n attribute vec4 aColor;\n#endif\n#ifdef USE_TextureCoordMatrix\n attribute vec2 aTextureCoordMatrix;\n#endif\n#ifdef VertexNormal\n attribute vec3 aNormal;\n#endif\n#ifdef Instance\n attribute float instanceId;\n#else\n attribute float batchId;\n#endif \n\n#ifdef TextureAtlas\n attribute float aTextureBatchId0;\n#endif\n\n#ifdef TexCoord\n attribute vec4 aTexCoord0;\n varying vec4 vTexCoord;\n uniform mat4 uTexMatrix;\n uniform vec2 decodeTexCoord0Min;\n#ifdef COMPUTE_TEXCOORD\n#ifdef TextureAtlas\n uniform vec4 uTexAtlasDim;\n varying vec4 vTexAtlasTran;\n varying vec4 vTexAtlasScale;\n varying vec4 vTexAtlasSize;\n varying vec2 vMaxMipLevel;\n#else\n uniform float uTexture0Width;\n varying vec4 vTexMatrix;\n varying vec4 vTexCoordTransform;\n#endif \n#endif\n#endif\n\n#ifdef TexCoord2\n attribute vec4 aTexCoord1;\n uniform float uTexture1Width;\n varying vec4 vTexMatrix2;\n#endif\n#ifdef InstanceBim\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 secondary_colour;\n attribute vec4 uv6; \n#endif\n\n#ifdef InstancePipe\n attribute vec4 uv1;\n attribute vec4 uv2;\n attribute vec4 uv3;\n attribute vec4 uv4;\n attribute vec4 uv5;\n attribute vec4 uv6;\n attribute vec4 uv7;\n attribute vec4 secondary_colour;\n attribute vec4 uv9;\n#endif\n\n#ifdef COMPRESS_VERTEX\n uniform vec4 decodePositionMin;\n uniform float decodePositionNormConstant;\n#endif\n\n// meshopt判断\n#ifdef MeshOPT_Compress\n uniform vec3 decodeTexCoord0vNormConstant;\n uniform vec3 decode_texCoord1_vNormConstant;\n#else\n uniform float decode_texCoord0_normConstant;\n uniform float decode_texCoord1_normConstant;\n#endif\n \n uniform vec4 uSelectedColor;\n uniform vec4 uFillForeColor;\n \n varying vec4 vSecondColor;\n varying vec4 vPositionMC;\n varying vec3 vPositionEC;\n#ifdef VertexNormal\n varying vec3 vNormalEC;\n#endif\n \n varying vec4 vColor;\n \n const float SHIFT_LEFT8 = 256.0;\n const float SHIFT_RIGHT8 = 1.0 / 256.0;\n const float SHIFT_RIGHT4 = 1.0 / 16.0;\n const float SHIFT_LEFT4 = 16.0;\n void getTextureMatrixFromZValue(in float nZ, inout float XTran, inout float YTran, inout float scale)\n {\n if(nZ <= 0.0)\n {\n return;\n }\n float nDel8 = floor(nZ * SHIFT_RIGHT8);\n float nDel16 = floor(nDel8 * SHIFT_RIGHT8);\n float nDel20 = floor(nDel16 * SHIFT_RIGHT4);\n YTran = nZ - nDel8 * SHIFT_LEFT8;\n XTran = nDel8 - nDel16 * SHIFT_LEFT8;\n float nLevel = nDel16 - nDel20 * SHIFT_LEFT4;\n scale = 1.0 / pow(2.0, nLevel);\n }\n \n void operation(vec4 operationType, vec4 color, vec4 selectedColor, inout vec4 vertexColor)\n {\n float right_2 = operationType.x * 0.5;\n float right_4 = right_2 * 0.5;\n float right_8 = right_4 * 0.5;\n float right_16 = right_8 * 0.5;\n float isSetColor = fract(right_2);\n if(isSetColor > 0.1)\n {\n vertexColor *= color;\n }\n float isPicked = fract(floor(right_2)* 0.5);\n if(isPicked > 0.1)\n {\n vertexColor *= selectedColor;\n }\n float isHide = fract(floor(right_4)* 0.5);\n if(isHide > 0.1)\n {\n vertexColor.a = 0.0;\n }\n }\n \n\n#ifdef TextureAtlas\n uniform highp sampler2D batchTextureAtlas; \n uniform vec4 batchTextureAtlasStep; \n#ifdef SecTextureAtlas\n uniform highp sampler2D batchTextureAtlasSec; \n uniform vec4 batchTextureAtlasStepSec; \n#endif\n vec2 computeAtlasSt(float batchId, vec4 step) \n { \n float stepX = step.x; \n float centerX = step.y; \n float numberOfAttributes = float(1); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n } \n vec4 atlas_batchTable_xywh(float batchId, sampler2D texture, vec4 step) \n { \n vec2 st = computeAtlasSt(batchId, step); \n st.x += step.x * float(0); \n vec4 textureValue = texture2D(texture, st); \n vec4 value = textureValue; \n return value; \n } \n void getTexAtlasParameter(in vec4 xywh, in vec2 textureDim, inout vec2 translate, inout vec2 scale, inout vec2 texSize, inout float maxMipLevel)\n {\n float width = xywh.z;\n float height = xywh.w;\n width *= 2.0 / 3.0;\n maxMipLevel = log2(min(width, height));\n scale.x = width / textureDim.x;\n scale.y = height / textureDim.y;\n translate.x = xywh.x;\n translate.y = xywh.y;\n translate /= textureDim;\n texSize.x = width;\n texSize.y = height;\n }\n#endif\n void main()\n {\n \n\n #ifdef TexCoord\n vTexCoord.xy = aTexCoord0.xy;\n #endif\n #ifdef COMPUTE_TEXCOORD\n #ifdef TextureAtlas\n if(aTextureBatchId0 < 0.0)\n {\n vMaxMipLevel.x = -1.0;\n }\n else\n {\n vec4 xywh = atlas_batchTable_xywh(aTextureBatchId0, batchTextureAtlas, batchTextureAtlasStep);\n getTexAtlasParameter(xywh, uTexAtlasDim.xy, vTexAtlasTran.xy, vTexAtlasScale.xy, vTexAtlasSize.xy, vMaxMipLevel.x);\n }\n #else\n vTexMatrix = vec4(0.0,0.0,1.0,0.0);\n vTexCoordTransform.x = aTexCoord0.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordTransform.x = aTextureCoordMatrix.x;\n #endif\n if(vTexCoordTransform.x < -90000.0)\n {\n vTexMatrix.z = -1.0;\n }\n getTextureMatrixFromZValue(floor(vTexCoordTransform.x), vTexMatrix.x, vTexMatrix.y, vTexMatrix.z);\n vTexMatrix.w = log2(uTexture0Width * vTexMatrix.z);\n #endif\n #ifdef TexCoord2\n #ifdef TextureAtlas\n if(aTextureBatchIdSec < 0.0)\n {\n vMaxMipLevel.y = -1.0;\n }\n else\n {\n vec4 xywh2 = atlas_batchTable_xywh(aTextureBatchIdSec, batchTextureAtlasSec, batchTextureAtlasStepSec);\n getTexAtlasParameter(xywh2, uTexAtlasDim.zw, vTexAtlasTran.zw, vTexAtlasScale.zw, vTexAtlasSize.zw, vMaxMipLevel.y);\n }\n #else\n vTexCoord.zw = aTexCoord1.xy;\n vTexMatrix2 = vec4(0.0,0.0,1.0,0.0);\n vTexCoordTransform.y = aTexCoord1.z;\n #ifdef USE_TextureCoordMatrix\n vTexCoordTransform.y = aTextureCoordMatrix.y;\n #endif\n if(vTexCoordTransform.y < -90000.0)\n {\n vTexMatrix2.z = -1.0;\n }\n getTextureMatrixFromZValue(floor(vTexCoordTransform.y), vTexMatrix2.x, vTexMatrix2.y, vTexMatrix2.z);\n vTexMatrix2.w = log2(uTexture1Width * vTexMatrix.z);\n #endif\n #endif\n #endif\n \n #ifdef COMPRESS_VERTEX\n vec4 vertexPos = vec4(1.0);\n vertexPos = decodePositionMin + vec4(aPosition.xyz, 1.0) * decodePositionNormConstant;\n #else\n vec4 vertexPos = aPosition;\n #endif\n\n // meshopt压缩 这里对照主版本的 主版本命名的都是通过下划线,但是插件获取uniform是通过函数,所以需要大写\n #ifdef MeshOPT_Compress\n vec2 texCoord0;\n texCoord0.x = aTexCoord0.x * decodeTexCoord0vNormConstant.x;\n texCoord0.y = aTexCoord0.y * decodeTexCoord0vNormConstant.y;\n vTexCoord.xy = decodeTexCoord0Min + texCoord0.xy;\n #endif\n\n\n vec4 vertexColor = uFillForeColor;\n#ifdef VertexColor\n vertexColor *= aColor;\n#endif\n#ifdef VertexNormal\n vec3 normal = aNormal;\n#endif\n#ifdef InstanceBim\n mat4 worldMatrix;\n worldMatrix[0] = uv2;\n worldMatrix[1] = uv3;\n worldMatrix[2] = uv4;\n worldMatrix[3] = vec4(0, 0, 0, 1);\n vertexPos = vec4(vertexPos.xyz,1.0) * worldMatrix;\n vertexColor *= secondary_colour; \n#endif\n#ifdef InstancePipe\n mat4 worldMatrix;\n mat4 worldMatrix0;\n mat4 worldMatrix1;\n vec4 worldPos0;\n vec4 worldPos1;\n worldMatrix0[0] = uv1;\n worldMatrix0[1] = uv2;\n worldMatrix0[2] = uv3;\n worldMatrix0[3] = vec4( 0.0, 0.0, 0.0, 1.0 );\n worldMatrix1[0] = uv4;\n worldMatrix1[1] = uv5;\n worldMatrix1[2] = uv6;\n worldMatrix1[3] = vec4( 0.0, 0.0, 0.0, 1.0 );\n vec4 realVertex = vec4(vertexPos.xyz, 1.0);\n realVertex.x = realVertex.x * uv7.z;\n worldPos0 = realVertex * worldMatrix0;\n worldPos1 = realVertex * worldMatrix1;\n vertexColor *= secondary_colour; \n#ifdef TexCoord\n if(aTexCoord0.y > 0.5)\n {\n vec4 tex4Vec = uTexMatrix * vec4(uv7.y, aTexCoord0.x, 0.0, 1.0);\n vTexCoord.xy = tex4Vec.xy;\n vertexPos = worldPos1;\n worldMatrix = worldMatrix1;\n }\n else\n {\n vec4 tex4Vec = uTexMatrix * vec4(uv7.x, aTexCoord0.x, 0.0, 1.0);\n vTexCoord.xy = tex4Vec.xy;\n vertexPos = worldPos0;\n worldMatrix = worldMatrix0;\n }\n#endif\n#ifdef VertexNormal\n normal.x = normal.x * uv7.z;\n#endif\n#endif\n #ifdef Instance \n float index = instanceId;\n #else\n float index = batchId;\n #endif \n vec4 operationType = s3m_batchTable_operation(index);\n vec4 objsColor = s3m_batchTable_color(index);\n operation(operationType, objsColor, uSelectedColor, vertexColor);\n vSecondColor = s3m_batchTable_pickColor(index);\n vec4 positionMC = vec4(vertexPos.xyz, 1.0);\n vColor = vertexColor;\n vPositionMC = positionMC;\n vPositionEC = (czm_modelView * positionMC).xyz;\n #ifdef VertexNormal\n vNormalEC = czm_normal * normal;\n #endif\n gl_Position = czm_modelViewProjection * vec4(vertexPos.xyz, 1.0);\n }\n",this.fs="\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n uniform vec4 uDiffuseColor;\n uniform vec4 uAmbientColor;\n#ifdef TexCoord\n varying vec4 vTexCoord;\n#ifdef COMPUTE_TEXCOORD\n uniform sampler2D uTexture;\n#ifdef TextureAtlas\n uniform vec4 uTexAtlasDim;\n varying vec4 vTexAtlasTran;\n varying vec4 vTexAtlasScale;\n varying vec4 vTexAtlasSize;\n varying vec2 vMaxMipLevel;\n#else\n uniform float uTexture0Width;\n varying vec4 vTexCoordTransform;\n varying vec4 vTexMatrix;\n#endif\n#endif\n#endif\n#ifdef NO_TEXCOORD\n uniform sampler2D uTexture;\n#endif\n varying vec4 vColor;\n varying vec4 vSecondColor;\n varying vec4 vPositionMC;\n varying vec3 vPositionEC;\n#ifdef VertexNormal\n varying vec3 vNormalEC;\n#endif\n#ifdef TexCoord2\n uniform sampler2D uTexture2;\n uniform float uTexture1Width;\n varying vec4 vTexMatrix2;\n#endif \n void calculateMipLevel(in vec2 inTexCoord, in float vecTile, in float fMaxMip, inout float mipLevel)\n {\n vec2 dx = dFdx(inTexCoord * vecTile);\n vec2 dy = dFdy(inTexCoord * vecTile);\n float dotX = dot(dx, dx);\n float dotY = dot(dy, dy);\n float dMax = max(dotX, dotY);\n float dMin = min(dotX, dotY);\n float offset = (dMax - dMin) / (dMax + dMin);\n offset = clamp(offset, 0.0, 1.0);\n float d = dMax * (1.0 - offset) + dMin * offset;\n mipLevel = 0.5 * log2(d);\n mipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n }\n\n void calculateMipLevel(in vec2 inTexCoord, in vec2 vecTile, in float fMaxMip, inout float mipLevel)\n {\n vec2 dx = dFdx(inTexCoord * vecTile.x);\n vec2 dy = dFdy(inTexCoord * vecTile.y);\n float dotX = dot(dx, dx);\n float dotY = dot(dy, dy);\n float dMax = max(dotX, dotY);\n float dMin = min(dotX, dotY);\n float offset = (dMax - dMin) / (dMax + dMin);\n offset = clamp(offset, 0.0, 1.0);\n float d = dMax * (1.0 - offset) + dMin * offset;\n mipLevel = 0.5 * log2(d);\n mipLevel = clamp(mipLevel, 0.0, fMaxMip - 1.62);\n }\n \n void calculateTexCoord(in vec3 inTexCoord, in float scale, in float XTran, in float YTran, in float fTile, in float mipLevel, inout vec2 outTexCoord)\n {\n if(inTexCoord.z < -9000.0)\n {\n outTexCoord = inTexCoord.xy;\n }\n else\n {\n vec2 fTexCoord = fract(inTexCoord.xy);\n float offset = 1.0 * pow(2.0, mipLevel) / fTile;\n fTexCoord = clamp(fTexCoord, offset, 1.0 - offset);\n outTexCoord.x = (fTexCoord.x + XTran) * scale;\n outTexCoord.y = (fTexCoord.y + YTran) * scale;\n }\n }\n \n vec4 getTexColorForS3M(sampler2D curTexture, vec3 oriTexCoord, float texTileWidth, float fMaxMipLev, float fTexCoordScale, vec2 vecTexCoordTranslate)\n {\n vec4 color = vec4(1.0);\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(oriTexCoord.xy, texTileWidth, fMaxMipLev, mipLevel);\n #endif\n vec2 realTexCoord;\n calculateTexCoord(oriTexCoord, fTexCoordScale, vecTexCoordTranslate.x, vecTexCoordTranslate.y, texTileWidth, mipLevel, realTexCoord);\n if(oriTexCoord.z < -9000.0)\n {\n color = texture2D(curTexture, realTexCoord.xy);\n }\n else\n {\n #ifdef GL_EXT_shader_texture_lod\n color = texture2DLodEXT(curTexture, realTexCoord.xy, mipLevel);\n #else\n #ifdef WEBGL2\n color = textureLod(curTexture, realTexCoord.xy, mipLevel);\n #else\n color = texture2D(curTexture, realTexCoord.xy, mipLevel);\n #endif\n #endif\n }\n #ifdef RGBTOBGR\n color = color.bgra;\n #endif\n return color;\n }\n#ifdef COMPUTE_TEXCOORD\n#ifdef TextureAtlas\n vec4 getTextureAtlasColor(sampler2D texture, vec2 uv, vec2 texDim, vec2 texTran, vec2 texScale, float maxMipLevel)\n {\n if(maxMipLevel < 0.0)\n {\n return vec4(1.0);\n }\n vec4 colorCeil = vec4(1.0);\n float mipLevel = 0.0;\n #if defined(GL_OES_standard_derivatives) || defined(WEBGL2)\n calculateMipLevel(uv, texDim, maxMipLevel, mipLevel);\n #endif\n float ceilMipLevel = ceil(mipLevel);\n vec2 translate = vec2(texTran.x, texTran.y);\n float temp;\n if(ceilMipLevel > 0.0)\n {\n translate.x = texTran.x + texScale.x;\n temp = pow(2.0, ceilMipLevel - 1.0);\n translate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n }\n float scale = 1.0 / pow(2.0, ceilMipLevel);\n vec2 texcoord = fract(uv);\n float offsetX = pow(2.0, ceilMipLevel) / texDim.x;\n float offsetY = pow(2.0, ceilMipLevel) / texDim.y;\n texcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\n texcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\n texcoord.x = texcoord.x * texScale.x * scale + translate.x;\n texcoord.y = texcoord.y * texScale.y * scale + translate.y;\n #ifdef GL_EXT_shader_texture_lod\n colorCeil = texture2DLodEXT(texture, texcoord.xy, 0.0);\n #else\n colorCeil = texture2D(texture, texcoord.xy, 0.0);\n #endif\n vec4 colorFloor = vec4(1.0);\n float floorMipLevel = floor(mipLevel);\n translate = vec2(texTran.x, texTran.y);\n if(floorMipLevel > 0.0)\n {\n translate.x = texTran.x + texScale.x;\n temp = pow(2.0, floorMipLevel - 1.0);\n translate.y = texTran.y + texScale.y * (temp - 1.0) / temp;\n }\n scale = 1.0 / pow(2.0, floorMipLevel);\n texcoord = fract(uv);\n offsetX = pow(2.0, floorMipLevel) / texDim.x;\n offsetY = pow(2.0, floorMipLevel) / texDim.y;\n texcoord.x = clamp(texcoord.x, 0.0 + offsetX, 1.0 - offsetX);\n texcoord.y = clamp(texcoord.y, 0.0 + offsetY, 1.0 - offsetY);\n texcoord.x = texcoord.x * texScale.x * scale + translate.x;\n texcoord.y = texcoord.y * texScale.y * scale + translate.y;\n #ifdef GL_EXT_shader_texture_lod\n colorFloor = texture2DLodEXT(texture, texcoord.xy, 0.0);\n #else\n colorFloor = texture2D(texture, texcoord.xy, 0.0);\n #endif\n vec4 color = colorCeil * 0.5 + colorFloor * 0.5;\n return color;\n }\n#else\n vec4 getTextureColor()\n {\n if(vTexMatrix.z < 0.0)\n {\n return vec4(1.0);\n }\n float texTileWidth0 = vTexMatrix.z * uTexture0Width;\n vec3 realTexCoord = vec3(vTexCoord.xy, vTexCoordTransform.x);\n vec4 FColor = getTexColorForS3M(uTexture, realTexCoord, texTileWidth0, vTexMatrix.w, vTexMatrix.z, vTexMatrix.xy);\n #ifdef TexCoord2\n float texTileWidth1 = vTexMatrix2.z * uTexture1Width;\n realTexCoord = vec3(vTexCoord.zw, vTexCoordTransform.y);\n vec4 SColor = getTexColorForS3M(uTexture2, realTexCoord, texTileWidth1, vTexMatrix2.w, vTexMatrix2.z, vTexMatrix2.xy);\n SColor.r = clamp(SColor.r, 0.0, 1.0);\n SColor.g = clamp(SColor.g, 0.0, 1.0);\n SColor.b = clamp(SColor.b, 0.0, 1.0);\n // return FColor * SColor;\n return FColor;\n #else\n return FColor;\n #endif\n }\n#endif\n#endif\n \n const float M_PI = 3.141592653589793;\n vec3 SRGBtoLINEAR3(vec3 srgbIn) \n {\n return pow(srgbIn, vec3(2.2));\n }\n \n vec4 SRGBtoLINEAR4(vec4 srgbIn)\n {\n srgbIn = srgbIn ;\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n }\n vec3 LINEARtoSRGB(vec3 linearIn)\n {\n #ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n #else\n return linearIn;\n #endif\n }\n \n vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH) \n {\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n }\n \n float smithVisibilityG1(float NdotV, float roughness) \n {\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n }\n \n float smithVisibilityGGX(float roughness, float NdotL, float NdotV) \n {\n return smithVisibilityG1(NdotL, roughness) * smithVisibilityG1(NdotV, roughness);\n }\n \n float GGX(float roughness, float NdotH) \n {\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (M_PI * f * f);\n }\n\n vec3 computeNormal(in vec3 oriVertex)\n {\n vec3 normal = cross(vec3(dFdx(oriVertex.x), dFdx(oriVertex.y), dFdx(oriVertex.z)), vec3(dFdy(oriVertex.x), dFdy(oriVertex.y), dFdy(oriVertex.z)));\n normal = normalize(normal);\n return normal;\n }\n \n vec3 directionLight(vec3 normalEC) \n {\n const vec3 SunLightColor = vec3(0.8);\n const vec3 AmbientLightColor = vec3(0.7);\n vec3 totalDiffuseLight = vec3(0.0);\n vec3 totalSpecularLight = vec3(0.0);\n float sunLightDiffuseWeight = max( dot( normalEC, czm_lightDirectionEC ), 0.0 );\n totalDiffuseLight = SunLightColor * sunLightDiffuseWeight;\n return uDiffuseColor.rgb * (totalDiffuseLight + AmbientLightColor * uAmbientColor.rgb) + totalSpecularLight;\n }\n #ifdef ADJUST_COLOR\n uniform float uBrightness;\n uniform float uContrast;\n uniform float uHue;\n uniform float uSaturation;\n uniform float uOneOverGamma;\n vec3 adjustColor(vec3 inputColor)\n {\n vec3 outputColor = inputColor;\n outputColor.rgb = mix(vec3(0.0), outputColor.rgb, uBrightness);\n outputColor.rgb = mix(vec3(0.5), outputColor.rgb, uContrast);\n outputColor.rgb = czm_hue(outputColor.rgb, uHue);\n outputColor.rgb = clamp(outputColor.rgb, 0.0, 1.0);\n outputColor.rgb = czm_saturation(outputColor.rgb, uSaturation);\n outputColor.rgb = pow(outputColor.rgb, vec3(uOneOverGamma));\n return outputColor;\n }\n #endif\n\n\n void main()\n {\n if(vColor.a < 0.1)\n {\n discard;\n } \n #ifdef APPLY_SWIPE\n rollerShutter(gl_FragCoord.xy, uSwipeRegion);\n #endif\n vec4 baseColorWithAlpha = vColor;\n #ifdef COMPUTE_TEXCOORD\n #ifdef TextureAtlas\n baseColorWithAlpha *= getTextureAtlasColor(uTexture, vTexCoord.xy, vTexAtlasSize.xy, vTexAtlasTran.xy, vTexAtlasScale.xy, vMaxMipLevel.x);\n #else\n baseColorWithAlpha *= getTextureColor();\n #endif\n #endif\n #ifdef NO_TEXCOORD\n #ifndef REPLACE_COLOR_TYPE\n baseColorWithAlpha *= texture2D(uTexture, vec2(0.5));\n #endif\n #endif\n if(baseColorWithAlpha.a < 0.1)\n {\n discard;\n }\n vec4 outColor = baseColorWithAlpha;\n #ifndef USE_LINECOLOR \n vec3 ng = vec3(0.0);\n #ifdef VertexNormal\n ng = normalize(vNormalEC);\n #endif\n ng = length(ng) > 0.1 ? ng : computeNormal(vPositionMC.xyz);\n #ifdef HAS_NORMAL_TEXTURE\n vec3 pos_dx = dFdx(vPositionEC);\n vec3 pos_dy = dFdy(vPositionEC);\n vec3 tex_dx = dFdx(vec3(vTexCoord.xy, 0.0));\n vec3 tex_dy = dFdy(vec3(vTexCoord.xy, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(uNormalTexture, vTexCoord.xy).rgb;\n n = normalize(tbn * (2.0 * n - 1.0));\n #else\n vec3 n = ng;\n #endif\n vec3 baseColor = baseColorWithAlpha.rgb;\n outColor.rgb = baseColor * directionLight(n);\n #else\n outColor = baseColorWithAlpha * uDiffuseColor;\n #endif\n #ifdef ADJUST_COLOR\n outColor.rgb = adjustColor(outColor.rgb);\n #endif\n gl_FragColor = outColor;\n }\n",this.edgeVA=void 0,this.edgeSP=void 0,this.regularEdgeCommand=void 0,this.silhouetteEdgeCommand=void 0,this.useLineColor=!1}Cesium,(Te.prototype=Object.create(pe.prototype)).constructor=pe;let xe=new Cesium.Cartesian4;Te.prototype.createCommand=function(){if(Cesium.defined(this.colorCommand)||0!==this.vertexBufferToCreate.length||0!==this.indexBufferToCreate.length||0!==this.shaderProgramToCreate.length)return;let e=this.layer,t=this.vertexPackage,r=this.arrIndexPackage;if(r.length<1)return;let n=r[0],i=this.material;this.vertexArray=new Cesium.VertexArray({context:e.context,attributes:t.vertexAttributes,indexBuffer:n.indexBuffer});let o=Cesium.PrimitiveType.TRIANGLES;switch(n.primitiveType){case 1:o=Cesium.PrimitiveType.POINTS;break;case 2:o=Cesium.PrimitiveType.LINES;break;case 4:o=Cesium.PrimitiveType.TRIANGLES}this.useLineColor=o===Cesium.PrimitiveType.LINES;let a=!1;(i.alphaMode===Be.MASK||i.alphaMode===Be.BLEND||e._isTransparencyOptimization&&i.bTransparentSorting)&&(a=!0),this.colorCommand=new Cesium.DrawCommand({primitiveType:o,modelMatrix:this.modelMatrix,boundingVolume:Cesium.BoundingSphere.clone(this.boundingVolume),pickId:this.pickColorIdentifier,vertexArray:this.vertexArray,shaderProgram:this.shaderProgram,pass:a?Cesium.Pass.TRANSLUCENT:Cesium.Pass.CESIUM_3D_TILE,renderState:i.bTransparentSorting?Cesium.RenderState.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:Cesium.DepthFunction.LESS_OR_EQUAL},blending:Cesium.BlendingState.ALPHA_BLEND}):Cesium.RenderState.fromCache({cull:{enabled:!1},depthTest:{enabled:!0,func:Cesium.DepthFunction.LESS_OR_EQUAL},blending:Cesium.BlendingState.ALPHA_BLEND,stencilTest:{backFunction:Cesium.StencilFunction.ALWAYS,backOperation:{fail:Cesium.StencilOperation.KEEP,zFail:Cesium.StencilOperation.KEEP,zPass:Cesium.StencilOperation.REPLACE},enabled:!0,frontFunction:Cesium.StencilFunction.ALWAYS,frontOperation:{fail:Cesium.StencilOperation.KEEP,zFail:Cesium.StencilOperation.KEEP,zPass:Cesium.StencilOperation.REPLACE},mask:Cesium.StencilConstants.CESIUM_3D_TILE_MASK,reference:Cesium.StencilConstants.CESIUM_3D_TILE_MASK}}),instanceCount:t.instanceCount});let s=function(e,t,r){let n={uGeoMatrix:function(){return r.geoMatrix},uTexMatrix:function(){return e.texMatrix},uFillForeColor:function(){return r.useLineColor?t.style3D.lineColor:t.style3D.fillForeColor},uDiffuseColor:function(){return e.diffuseColor},uAmbientColor:function(){return e.ambientColor},uInverseGeoMatrix:function(){return r.invGeoMatrix},uTexture:function(){let t=e.textures[0];return t.isTexBlock?t.renderable&&t.ready?t:e.ancestorTexture?e.ancestorTexture:t:e.textures[0]},uTexture2:function(){return e.textures[1]},uTexAtlasDim:function(){let t=e.textures[0].renderable?e.textures[0]:e.ancestorTexture?e.ancestorTexture:e.textures[0];if(xe.x=t.width,xe.y=t.height,e.textures[1]){let t=e.textures[1].renderable?e.textures[1]:e.ancestorTextureBake?e.ancestorTextureBake:e.textures[1];xe.z=t.width,xe.w=t.height}return xe},uTexture0Width:function(){return e.textures[0].width},uTexture1Width:function(){return e.textures[1].width},uSelectedColor:function(){return t.selectedColor},uBrightness:function(){return t._brightness},uContrast:function(){return t._contrast},uHue:function(){return t._hue},uSaturation:function(){return t._saturation},uOneOverGamma:function(){return 1/t._gamma},decodePositionMin:function(){return r.vertexPackage.minVerticesValue},decodePositionNormConstant:function(){return r.vertexPackage.vertCompressConstant}},i=r.vertexPackage.minTexCoordValue;return i&&i.length>0&&(n.decodeTexCoord0vNormConstant=function(){return r.vertexPackage.texCoordCompressConstant[0]},n.decodeTexCoord1vNormConstant=function(){return r.vertexPackage.texCoordCompressConstant[1]},n.decodeTexCoord0Min=function(){return r.vertexPackage.minTexCoordValue[0]}),n}(i,e,this);this.batchTable&&(s=this.batchTable.getUniformMapCallback()(s)),i.batchTable&&(s=i.batchTable.getUniformMapCallback()(s)),this.colorCommand.uniformMap=s,this.vs=void 0,this.fs=void 0,this.ready=!0},Te.prototype.transformResource=function(e,t){this.ready||(this.createBatchTable(e),this.createPickIds(),this.createBuffers(e),this.createShaderProgram(e),this.createCommand(e),this.initLayerSetting(t))},Te.prototype.update=function(e,t){this.batchTableDirty&&(this.updateBatchTableAttributes(),this.batchTableDirty=!1),this.batchTable&&this.batchTable.update(e),t.style3D.fillStyle!==he.WireFrame&&e.commandList.push(this.colorCommand),t.style3D.fillStyle!==he.Fill&&(this.regularEdgeCommand&&(e.commandList.push(this.regularEdgeCommand),t._addRenderedEdge(this.regularEdgeCommand.edgeTotalLength,this.regularEdgeCommand.edgeCount)),this.silhouetteEdgeCommand&&(e.commandList.push(this.silhouetteEdgeCommand),t._addRenderedEdge(this.silhouetteEdgeCommand.edgeTotalLength,this.silhouetteEdgeCommand.edgeCount)))},Te.prototype.isDestroyed=function(){return!1},Te.prototype.destroy=function(){return this.shaderProgram=this.shaderProgram&&!this.shaderProgram.isDestroyed()&&this.shaderProgram.destroy(),this.vertexArray=this.vertexArray&&!this.vertexArray.isDestroyed()&&this.vertexArray.destroy(),this.material=this.material&&!this.material.isDestroyed()&&this.material.destroy(),this.batchTable=this.batchTable&&!this.batchTable.isDestroyed()&&this.batchTable.destroy(),this.edgeVA=this.edgeVA&&!this.edgeVA.isDestroyed()&&this.edgeVA.destroy(),this.edgeSP=this.edgeSP&&!this.edgeSP.isDestroyed()&&this.edgeSP.destroy(),this.colorCommand=void 0,this.vertexPackage=null,this.arrIndexPackage=null,this.modelMatrix=void 0,this.pickInfo=void 0,this.selectionInfoMap=void 0,this.vs=void 0,this.fs=void 0,Cesium.destroyObject(this)};let be={OSGBFile:function(e){return new Ee(e)},OSGBCacheFile:function(e){return new Te(e)},OSGBFile_Water:function(e){return new Ee(e)},OSGBCacheFile_Water:function(e){return new Te(e)}};function ge(){}ge.wasmReady=!1,ge.crunch=void 0,ge.loading=!1,ge.init=function(){if(ge.loading)return;const r=function(){var r,n;if("undefined"!=typeof WebAssembly){var i,o,a,s,u,l=void 0!==l?l:{},c={};for(i in l)l.hasOwnProperty(i)&&(c[i]=l[i]);o="object"==typeof window,a="function"==typeof importScripts,s="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!o&&!a,u=!o&&!s&&!a;var d,f,p,_,A="";s?(A=__dirname+"/",d=function(r,n){return p||(p=e),_||(_=t),r=_.normalize(r),p.readFileSync(r,n?null:"utf8")},f=function(e){var t=d(e,!0);return t.buffer||(t=new Uint8Array(t)),K(t.buffer),t},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),"undefined"!=typeof module&&(module.exports=l),process.on("uncaughtException",function(e){if(!(e instanceof ae))throw e}),process.on("unhandledRejection",Q),l.inspect=function(){return"[Emscripten Module object]"}):u?("undefined"!=typeof read&&(d=function(e){return read(e)}),f=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(K("object"==typeof(t=read(e,"binary"))),t)},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(o||a)&&(a?A=self.location.href:document.currentScript&&(A=document.currentScript.src),A=0!==A.indexOf("blob:")?A.substr(0,A.lastIndexOf("/")+1):"",d=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},a&&(f=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}));var m,C,y=l.print||console.log.bind(console),E=l.printErr||console.warn.bind(console);for(i in c)c.hasOwnProperty(i)&&(l[i]=c[i]);c=null,l.wasmBinary&&(m=l.wasmBinary),"object"!=typeof WebAssembly&&E("no native wasm support detected");var h=new WebAssembly.Table({initial:6,maximum:6,element:"anyfunc"}),B=!1;function K(e,t){e||Q("Assertion failed: "+t)}var T,x,b,g,v="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function k(e,t,r){for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.subarray&&v)return v.decode(e.subarray(t,i));for(var o="";t<i;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var l=a-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function Y(e,t){return e%t>0&&(e+=t-e%t),e}function z(e){T=e,l.HEAP8=x=new Int8Array(e),l.HEAP16=new Int16Array(e),l.HEAP32=g=new Int32Array(e),l.HEAPU8=b=new Uint8Array(e),l.HEAPU16=new Uint16Array(e),l.HEAPU32=new Uint32Array(e),l.HEAPF32=new Float32Array(e),l.HEAPF64=new Float64Array(e)}"undefined"!=typeof TextDecoder&&new TextDecoder("utf-16le");var D=l.TOTAL_MEMORY||16777216;function J(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?l.dynCall_v(r):l.dynCall_vi(r,t.arg):r(void 0===t.arg?null:t.arg)}else t()}}(C=l.wasmMemory?l.wasmMemory:new WebAssembly.Memory({initial:D/65536}))&&(T=C.buffer),D=T.byteLength,z(T),g[1136]=5247584;var P=[],M=[],I=[],L=[];function j(){if(l.preRun)for("function"==typeof l.preRun&&(l.preRun=[l.preRun]);l.preRun.length;)X(l.preRun.shift());J(P)}function W(){if(l.postRun)for("function"==typeof l.postRun&&(l.postRun=[l.postRun]);l.postRun.length;)q(l.postRun.shift());J(L)}function X(e){P.unshift(e)}function q(e){L.unshift(e)}var F=0,S=null,N=null;function Z(e){if(F--,l.monitorRunDependencies&&l.monitorRunDependencies(F),0==F&&(null!==S&&(clearInterval(S),S=null),N)){var t=N;N=null,t()}}function Q(e){throw l.onAbort&&l.onAbort(e),y(e+=""),E(e),B=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}l.preloadedImages={},l.preloadedAudios={};var R="data:application/octet-stream;base64,";function $(e){return"".startsWith?e.startsWith(R):0===e.indexOf(R)}var O="crunch.wasm";function ee(){try{if(m)return new Uint8Array(m);if(f)return f(O);throw"both async and sync fetching of the wasm failed"}catch(e){Q(e)}}function te(){var e={env:G,wasi_unstable:G};function t(e,t){l.asm=e.exports,Z()}function r(e){t(e.instance)}function n(t){return(m||!o&&!a||"function"!=typeof fetch?new Promise(function(e,t){e(ee())}):fetch(O,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+O+"'";return e.arrayBuffer()}).catch(function(){return ee()})).then(function(t){return WebAssembly.instantiate(t,e)}).then(t,function(e){E("failed to asynchronously prepare wasm: "+e),Q(e)})}if(F++,l.monitorRunDependencies&&l.monitorRunDependencies(F),l.instantiateWasm)try{return l.instantiateWasm(e,t)}catch(e){return E("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(m||"function"!=typeof WebAssembly.instantiateStreaming||$(O)||"function"!=typeof fetch)return n(r);fetch(O,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,e).then(r,function(e){E("wasm streaming compile failed: "+e),E("falling back to ArrayBuffer instantiation"),n(r)})})}(),{}}function re(e,t,r){b.set(b.subarray(t,t+r),e)}function ne(e){try{return C.grow(e-T.byteLength+65535>>16),z(C.buffer),1}catch(e){}}function ie(e){var t=2147418112;if(e>t)return!1;for(var r=Math.max(x.length,16777216);r<e;)r=r<=536870912?Y(2*r,65536):Math.min(Y((3*r+2147483648)/4,65536),t);return!!ne(r)}$(O)||(window.S3M_ASSETS?O=window.S3M_ASSETS.crunch:(n="./S3M_module/S3MTiles/ThirdParty/crunch.wasm",O="undefined"==typeof document?n:(r||(r=document.createElement("a")),r.href=n,r.href=r.href,r.href))),M.push({func:function(){H()}});var w={buffers:[null,[],[]],printChar:function(e,t){var r=w.buffers[e];0===t||10===t?((1===e?y:E)(k(r,0)),r.length=0):r.push(t)},varargs:0,get:function(e){return w.varargs+=4,g[w.varargs-4>>2]},getStr:function(){var e;return(e=w.get())?k(b,e,void 0):""},get64:function(){var e=w.get();return w.get(),e},getZero:function(){w.get()}};function oe(e,t,r,n){try{for(var i=0,o=0;o<r;o++){for(var a=g[t+8*o>>2],s=g[t+(8*o+4)>>2],u=0;u<s;u++)w.printChar(e,b[a+u]);i+=s}return g[n>>2]=i,0}catch(e){return"undefined"!=typeof FS&&e instanceof FS.ErrnoError||Q(e),e.errno}}var G={a:re,b:ie,c:oe,memory:C,table:h},U=te();l.asm=U;var V,H=l.___wasm_call_ctors=function(){return l.asm.d.apply(null,arguments)};function ae(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function se(e){function t(){V||(V=!0,B||(J(M),J(I),l.onRuntimeInitialized&&l.onRuntimeInitialized(),W()))}F>0||(j(),F>0||(l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),t()},1)):t()))}if(l._malloc=function(){return l.asm.e.apply(null,arguments)},l._free=function(){return l.asm.f.apply(null,arguments)},l._crn_get_width=function(){return l.asm.g.apply(null,arguments)},l._crn_get_height=function(){return l.asm.h.apply(null,arguments)},l._crn_get_levels=function(){return l.asm.i.apply(null,arguments)},l._crn_get_dxt_format=function(){return l.asm.j.apply(null,arguments)},l._crn_get_bytes_per_block=function(){return l.asm.k.apply(null,arguments)},l._crn_get_uncompressed_size=function(){return l.asm.l.apply(null,arguments)},l._crn_decompress=function(){return l.asm.m.apply(null,arguments)},l.asm=U,N=function e(){V||se(),V||(N=e)},l.run=se,l.preInit)for("function"==typeof l.preInit&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();se()}return l}();ge.crunch=r,Object.keys(ge.crunch.asm).length>0&&(ge.wasmReady=!0,ge.loading=!1),ge.crunch.onRuntimeInitialized=function(){ge.wasmReady=!0,ge.loading=!1},ge.loading=!0};const ve={};var De,Pe;ve[0]=Cesium.PixelFormat.RGB_DXT1,ve[1]=Cesium.PixelFormat.RGBA_DXT3,ve[2]=Cesium.PixelFormat.RGBA_DXT5;var Me=0;ge.transcode=function(e){const t=ge.crunch;var r=e.data,n=r.byteLength,i=new Uint8Array(r),o=t._malloc(n);!function(e,t,r,n){var i,o=r/4,a=n%4,s=new Uint32Array(e.buffer,0,(n-a)/4),u=new Uint32Array(t.buffer);for(i=0;i<s.length;i++)u[o+i]=s[i];for(i=n-a;i<n;i++)t[r+i]=e[i]}(i,t.HEAPU8,o,n);var a=t._crn_get_dxt_format(o,n),s=ve[a];if(!Cesium.defined(s))throw new Cesium.RuntimeError("Unsupported compressed format.");var u,l=t._crn_get_levels(o,n),c=t._crn_get_width(o,n),d=t._crn_get_height(o,n),f=0;for(u=0;u<l;++u)f+=Cesium.PixelFormat.compressedTextureSizeInBytes(s,c>>u,d>>u);if(Me<f&&(Cesium.defined(De)&&t._free(De),De=t._malloc(f),Pe=new Uint8Array(t.HEAPU8.buffer,De,f),Me=f),t._crn_decompress(o,n,De,f,0,l),t._free(o),Cesium.defaultValue(e.bMipMap,!1)){var p=Pe.slice(0,f);return 4===Cesium.CompressedTextureBuffer.length?new Cesium.CompressedTextureBuffer(s,c,d,p):new Cesium.CompressedTextureBuffer(s,Cesium.PixelDatatype.UNSIGNED_BYTE,c,d,p)}var _=Cesium.PixelFormat.compressedTextureSizeInBytes(s,c,d),A=Pe.subarray(0,_),m=new Uint8Array(_);return m.set(A,0),4===Cesium.CompressedTextureBuffer.length?new Cesium.CompressedTextureBuffer(s,c,d,m):new Cesium.CompressedTextureBuffer(s,Cesium.PixelDatatype.UNSIGNED_BYTE,c,d,m)};var Ie=Object.freeze({LUMINANCE_8:1,LUMINANCE_16:2,ALPHA:3,ALPHA_4_LUMINANCE_4:4,LUMINANCE_ALPHA:5,RGB_565:6,BGR565:7,RGB:10,BGR:11,ARGB:12,ABGR:13,BGRA:14,WEBP:25,RGBA:28,DXT1:17,DXT2:18,DXT3:19,DXT4:20,DXT5:21,CRN_DXT5:26,STANDARD_CRN:27});function Le(){}let Fe=new Cesium.Cartesian3;function Se(e,t){return e.instanceIndex>-1?function(e){let t=new Cesium.BoundingSphere,r=e.instanceBounds;if(!Cesium.defined(r))return t;let n=new Cesium.Cartesian3(r[0],r[1],r[2]),i=new Cesium.Cartesian3(r[3],r[4],r[5]),o=new Cesium.Cartesian3.lerp(n,i,.5,Fe),a=new Cesium.Cartesian3.distance(o,n);return t.center=o,t.radius=a,t}(e):function(e,t){let r,n,i=new Cesium.BoundingSphere,o=new Cesium.Cartesian3,a=e.vertexAttributes[0],s=a.componentsPerAttribute,u=Cesium.defined(e.compressOptions)&&(e.compressOptions&le.SVC_Vertex)===le.SVC_Vertex,l=1;u?(l=e.vertCompressConstant,r=new Cesium.Cartesian3(e.minVerticesValue.x,e.minVerticesValue.y,e.minVerticesValue.z),n=new Uint16Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/2)):n=new Float32Array(a.typedArray.buffer,a.typedArray.byteOffset,a.typedArray.byteLength/4);let c=[];for(let t=0;t<e.verticesCount;t++)Cesium.Cartesian3.fromArray(n,s*t,o),u&&(o=Cesium.Cartesian3.multiplyByScalar(o,l,o),o=Cesium.Cartesian3.add(o,r,o)),c.push(Cesium.Cartesian3.clone(o));return Cesium.BoundingSphere.fromPoints(c,i),Cesium.BoundingSphere.transform(i,t,i),c.length=0,i}(e,t)}function Ne(e,t){if(e.center){const r=new Cesium.Matrix3,n=new Cesium.Cartesian3(e.center.x,e.center.y,e.center.z);Cesium.Matrix4.multiplyByPoint(t,n,n);const i=new Cesium.Cartesian4(e.xExtent.x,e.xExtent.y,e.xExtent.z,0),o=new Cesium.Cartesian4(e.yExtent.x,e.yExtent.y,e.yExtent.z,0),a=new Cesium.Cartesian4(e.zExtent.x,e.zExtent.y,e.zExtent.z,0);return Cesium.Matrix4.multiplyByVector(t,i,i),Cesium.Matrix4.multiplyByVector(t,o,o),Cesium.Matrix4.multiplyByVector(t,a,a),Cesium.Matrix3.setColumn(r,0,i,r),Cesium.Matrix3.setColumn(r,1,o,r),Cesium.Matrix3.setColumn(r,2,a,r),new Cesium.TileOrientedBoundingBox(n,r)}const r=[];r.push(new Cesium.Cartesian3(e.min.x,e.min.y,e.min.z)),r.push(new Cesium.Cartesian3(e.min.x,e.min.y,e.max.z)),r.push(new Cesium.Cartesian3(e.min.x,e.max.y,e.min.z)),r.push(new Cesium.Cartesian3(e.min.x,e.max.y,e.max.z)),r.push(new Cesium.Cartesian3(e.max.x,e.min.y,e.min.z)),r.push(new Cesium.Cartesian3(e.max.x,e.min.y,e.max.z)),r.push(new Cesium.Cartesian3(e.max.x,e.max.y,e.min.z)),r.push(new Cesium.Cartesian3(e.max.x,e.max.y,e.max.z));for(let e=0;e<8;e++)r[e]=Cesium.Matrix4.multiplyByPoint(t,r[e],r[e]);const n=Cesium.OrientedBoundingBox.fromPoints(r);return new Cesium.TileOrientedBoundingBox(n.center,n.halfAxes)}function Re(e,t,r,n,i){let o=n.geodes;for(let n=0,a=o.length;n<a;n++){let a,s=o[n],u=s.matrix,l=Cesium.Matrix4.multiply(e.modelMatrix,u,new Cesium.Matrix4);Cesium.defined(i.boundingVolume)&&(Cesium.defined(i.boundingVolume.obb)?a=Ne(i.boundingVolume.obb,e.modelMatrix)._boundingSphere:(a=new Cesium.BoundingSphere(i.boundingVolume.sphere.center,i.boundingVolume.sphere.radius),Cesium.BoundingSphere.transform(a,e.modelMatrix,a)));let c=s.skeletonNames;for(let n=0,o=c.length;n<o;n++){let o,s=c[n],d=t.geoPackage[s],f=d.vertexPackage,p=d.arrIndexPackage,_=d.pickInfo;p.length>0&&(o=r[p[0].materialCode]);let A=Cesium.defined(a)?a:Se(f,l);const m=be[e.fileType]({layer:e,vertexPackage:f,arrIndexPackage:p,pickInfo:_,modelMatrix:l,geoMatrix:u,boundingVolume:A,material:o,edgeGeometry:d.edgeGeometry,geoName:s});i.renderEntities.push(m)}}if(!Cesium.defined(i.boundingVolume)&&i.renderEntities.length>0){let e=[];for(let t=0,r=i.renderEntities.length;t<r;t++)e.push(i.renderEntities[t].boundingVolume);i.boundingVolume={sphere:Cesium.BoundingSphere.fromBoundingSpheres(e),isCalc:!0}}}function Oe(){let e,t;const r=new Promise(function(r,n){e=r,t=n});return{resolve:e,reject:t,promise:r}}Le.parse=async function(e,t,r){if(!Cesium.defined(t))return;e.dataVersion=t.version;let n=await async function(e,t,r){let n={},i=[],o=Cesium.defaultValue(t.materials.material,t.materials.materials);for(let a=0,s=o.length;a<s;a++){let s=o[a].material,u=Cesium.defaultValue(s.id,s.name),l=new oe;n[u]=l;let c=Cesium.defaultValue(s.ambient,Cesium.Color.WHITE);l.ambientColor=new Cesium.Color(c.r,c.g,c.b,c.a);let d=Cesium.defaultValue(s.diffuse,Cesium.Color.WHITE);l.diffuseColor=new Cesium.Color(d.r,d.g,d.b,d.a);let f=Cesium.defaultValue(s.specular,Cesium.Color.WHITE);l.specularColor=new Cesium.Color(f.r,f.g,f.b,f.a),l.shininess=s.shininess,l.bTransparentSorting=s.transparentsorting,l.alphaMode=s.alphaMode;let p=Cesium.defaultValue(s.textureunitstates,s.textureStates),_=p.length;for(let n=0;n<_;n++){let o=Cesium.defaultValue(p[n].textureunitstate,p[n].textureUnitState),a=Cesium.defaultValue(o.id,o.textureName),s=Cesium.defaultValue(o.addressmode,o.uAddressMode),u=0===s.u?Cesium.TextureWrap.REPEAT:Cesium.TextureWrap.CLAMP_TO_EDGE,c=0===s.v?Cesium.TextureWrap.REPEAT:Cesium.TextureWrap.CLAMP_TO_EDGE;l.texMatrix=Cesium.Matrix4.unpack(Cesium.defaultValue(o.texmodmatrix,o.matrix));let d=t.texturePackage[a];if(Cesium.defined(d)&&d.arrayBufferView.byteLength>0){d.wrapS=u,d.wrapT=c;let t=r.fileName+a,n=e.textureCache.getTexture(t);if(!Cesium.defined(n))switch(d.isTexBlock=!1,d.compressType){case Ie.CRN_DXT5:const r=ge.transcode({data:d.arrayBufferView,bMipMap:!0});d.arrayBufferView=r.bufferView,n=new ie(e,a,d),e.textureCache.addTexture(t,n);break;case Ie.WEBP:l._RGBTOBGR=d.nFormat===Ie.ABGR,i.push(l.createWebp(t,e,d));break;default:n=new ie(e,a,d),e.textureCache.addTexture(t,n)}n&&l.textures.push(n)}}}return Promise.all(i).then(()=>n)}(e.context,t,r),i=function(e,t,r){let n=t.groupNode,i=[];for(let o=0,a=n.pageLods.length;o<a;o++){let a={},s=n.pageLods[o];if(a.rangeMode=s.rangeMode,a.childTile=s.childTile,a.rangeList=s.rangeList,a.isLeafTile=""===a.childTile,a.renderEntities=[],s.boundingSphere&&(!a.isLeafTile||e.dataVersion>2)){let e=s.boundingSphere.center,t=s.boundingSphere.radius;a.boundingVolume={sphere:{center:new Cesium.Cartesian3(e.x,e.y,e.z),radius:t},isCalc:!1}}s.obb&&(a.boundingVolume=a.boundingVolume||{},a.boundingVolume.obb=s.obb),Re(e,t,r,s,a),i.push(a)}return i}(e,t,n);return i};var we=Object.freeze({Distance:0,Pixel:1,GeometryError:2});function Ge(){this.fileName=void 0,this.rangeData=void 0,this.rangeMode=void 0,this.boundingVolume=void 0,this.isLeafTile=!1,this.renderEntities=[],this.childTile=void 0,this.canRefine=!1,this.ready=!1}function Ue(e,t,n,i){this.layer=e,this.parent=t;let o=i.replace(/\\/g,"/");this.fileExtension=Cesium.getExtensionFromUri(i),this.relativePath=function(e,t){e=e.replace(/\+/g,"%2B");let r=t._basePath;if(!(t._basePath.indexOf("realspace")>-1))return e;let n=r.replace(/(.*realspace)/,""),i=r.replace(/\/rest\/realspace/g,"").replace(n,"");return i+="/rest/realspace"+n+"data/path/"+e.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,""),i}(o,e),this.fileName=i,this.isLeafTile=!1,this.isRootTile=!1,this.boundingVolume=this.createBoundingVolume(n,e.modelMatrix);let a=Cesium.Resource.createIfNeeded(e._baseResource);if(Cesium.defined(t))this.baseUri=t.baseUri;else{let e=new Cesium.Resource(o);this.baseUri=e.getBaseUri()}this.contentResource=a.getDerivedResource({url:this.relativePath}),this.serverKey=Cesium.RequestScheduler.getServerKey(this.contentResource.getUrlComponent()),this.request=void 0,this.cacheNode=void 0,this.distanceToCamera=0,this.centerZDepth=0,this.depth=t?t.depth+1:0,this.visibilityPlaneMask=0,this.visible=!1,this.pageLods=[],this.renderEntities=[],this.contentState=r.UNLOADED,this.touchedFrame=0,this.requestedFrame=0,this.processFrame=0,this.updatedVisibilityFrame=0,this.foveatedFactor=0,this.priority=0}Ge.prototype.update=function(e,t){const r=e.context,n=this.boundingVolume,i=this.rangeMode,o=this.rangeData,a=t.lodRangeScale,s=n.distanceToCamera(e);if(i===we.Distance)this.canRefine=s*a<o;else if(i===we.Pixel){const t=n.radius,r=.5*e.context.drawingBufferHeight/Math.tan(.5*e.camera.frustum._fovy);this.canRefine=r*t/s>o*a}else i===we.GeometryError&&(this.canRefine=o*r.drawingBufferHeight/(s*e.camera.frustum.sseDenominator)/r.uniformState.pixelRatio>16*a)},Ge.prototype.createChildTile=function(e,t){const r=new Ue(e,t,this.boundingVolume,this.fileName);this.childTile=r},Ge.prototype.isDestroyed=function(){return!1},Ge.prototype.destroy=function(){for(let e=0,t=this.renderEntities.length;e<t;e++)this.renderEntities[e].destroy();return this.renderEntities.length=0,this.childTile=void 0,Cesium.destroyObject(this)},Cesium;let Ve=new Cesium.Cartesian3;function He(e,t){let r=Cesium.Cartesian3.clone(e.center),n=e.radius;r=Cesium.Matrix4.multiplyByPoint(t,r,r);let i=Cesium.Matrix4.getScale(t,Ve);return n*=Cesium.Cartesian3.maximumComponent(i),new Cesium.TileBoundingSphere(r,n)}function Ke(e,t){if(e.center){const r=new Cesium.Matrix3,n=new Cesium.Cartesian3(e.center.x,e.center.y,e.center.z);Cesium.Matrix4.multiplyByPoint(t,n,n);const i=new Cesium.Cartesian4(e.xExtent.x,e.xExtent.y,e.xExtent.z,0),o=new Cesium.Cartesian4(e.yExtent.x,e.yExtent.y,e.yExtent.z,0),a=new Cesium.Cartesian4(e.zExtent.x,e.zExtent.y,e.zExtent.z,0);return Cesium.Matrix4.multiplyByVector(t,i,i),Cesium.Matrix4.multiplyByVector(t,o,o),Cesium.Matrix4.multiplyByVector(t,a,a),Cesium.Matrix3.setColumn(r,0,i,r),Cesium.Matrix3.setColumn(r,1,o,r),Cesium.Matrix3.setColumn(r,2,a,r),new Cesium.TileOrientedBoundingBox(n,r)}const r=[];r.push(new Cesium.Cartesian3(e.min.x,e.min.y,e.min.z)),r.push(new Cesium.Cartesian3(e.min.x,e.min.y,e.max.z)),r.push(new Cesium.Cartesian3(e.min.x,e.max.y,e.min.z)),r.push(new Cesium.Cartesian3(e.min.x,e.max.y,e.max.z)),r.push(new Cesium.Cartesian3(e.max.x,e.min.y,e.min.z)),r.push(new Cesium.Cartesian3(e.max.x,e.min.y,e.max.z)),r.push(new Cesium.Cartesian3(e.max.x,e.max.y,e.min.z)),r.push(new Cesium.Cartesian3(e.max.x,e.max.y,e.max.z));for(let e=0;e<8;e++)r[e]=Cesium.Matrix4.multiplyByPoint(t,r[e],r[e]);const n=Cesium.OrientedBoundingBox.fromPoints(r);return new Cesium.TileOrientedBoundingBox(n.center,n.halfAxes)}Ue.prototype.createBoundingVolume=function(e,t){return Cesium.defined(e.sphere)?He(e.sphere,t):Cesium.defined(e.box)?Ke(e.box,t):e.boundingVolume?e:void 0},Ue.prototype.distanceToTile=function(e){return this.boundingVolume.distanceToCamera(e)};let ke=new Cesium.Cartesian3;Ue.prototype.distanceToTileCenter=function(e){const t=Cesium.Cartesian3.subtract(this.boundingVolume.boundingVolume.center,e.camera.positionWC,ke);return Cesium.Cartesian3.dot(e.camera.directionWC,t)},Ue.prototype.visibility=function(e,t){return e.cullingVolume.computeVisibilityWithPlaneMask(this.boundingVolume,t)};let Ye=new Cesium.Cartesian3;function ze(e,t,r){return Math.max(Cesium.Math.normalize(e,t,r)-Cesium.Math.EPSILON7,0)}function Je(e,t,r){let n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,r)}function je(){this._stack=[],this._selectPageLods=[]}function We(e,t,n){t.requestedFrame!==n.frameNumber&&t.contentState===r.UNLOADED&&(e._requestTiles.push(t),t.requestedFrame=n.frameNumber)}function Xe(e,t,r){t.processFrame!==r.frameNumber&&(t.processFrame=r.frameNumber,e._processTiles.push(t))}function qe(e,t,r){t.touchedFrame!==r.frameNumber&&(e._cache.touch(t),t.touchedFrame=r.frameNumber)}function Ze(e,t,r){r.updatedVisibilityFrame!==e.frameNumber&&(r.updatedVisibilityFrame=e.frameNumber,r.updateVisibility(e,t)),function(e,t){e._maximumPriority.distance=Math.max(t.distanceToCamera,e._maximumPriority.distance),e._minimumPriority.distance=Math.min(t.distanceToCamera,e._minimumPriority.distance),e._maximumPriority.depth=Math.max(t.depth,e._maximumPriority.depth),e._minimumPriority.depth=Math.min(t.depth,e._minimumPriority.depth),e._maximumPriority.foveatedFactor=Math.max(t.foveatedFactor,e._maximumPriority.foveatedFactor),e._minimumPriority.foveatedFactor=Math.min(t.foveatedFactor,e._minimumPriority.foveatedFactor),e._maximumPriority.pixel=Math.max(t.pixel,e._maximumPriority.pixel),e._minimumPriority.pixel=Math.min(t.pixel,e._minimumPriority.pixel)}(t,r)}function Qe(){this._list=new Cesium.DoublyLinkedList,this._sentinel=this._list.add(),this._trimTiles=!1}function $e(){}function et(){this._fillForeColor=new Cesium.Color,this._lineColor=new Cesium.Color,this._lineWidth=1,this._bottomAltitude=0,this._pointSize=1,this._pointColor=new Cesium.Color}function tt(e){if(e instanceof tt)this.scheme=e.scheme,this.authority=e.authority,this.path=e.path,this.query=e.query,this.fragment=e.fragment;else if(e){var t=rt.exec(e);this.scheme=t[1],this.authority=t[2],this.path=t[3],this.query=t[4],this.fragment=t[5]}}Ue.prototype.updateVisibility=function(e,t){let r=this.parent,n=Cesium.defined(r)?r.visibilityPlaneMask:Cesium.CullingVolume.MASK_INDETERMINATE;this.distanceToCamera=this.distanceToTile(e),this.centerZDepth=this.distanceToTileCenter(e),this.visibilityPlaneMask=this.visibility(e,n),this.visible=this.visibilityPlaneMask!==Cesium.CullingVolume.MASK_OUTSIDE&&this.distanceToCamera>=t.visibleDistanceMin&&this.distanceToCamera<=t.visibleDistanceMax,function(e,t){const r=t.camera,n=e.boundingVolume.boundingVolume,i=n.radius,o=Cesium.Cartesian3.multiplyByScalar(r.directionWC,e.centerZDepth,Ye),a=Cesium.Cartesian3.add(r.positionWC,o,Ye),s=Cesium.Cartesian3.subtract(a,n.center,Ye);if(Cesium.Cartesian3.magnitude(s)>i){const t=Cesium.Cartesian3.normalize(s,Ye),o=Cesium.Cartesian3.multiplyByScalar(t,i,Ye),a=Cesium.Cartesian3.add(n.center,o,Ye),u=Cesium.Cartesian3.subtract(a,r.positionWC,Ye),l=Cesium.Cartesian3.normalize(u,Ye);e.foveatedFactor=1-Math.abs(Cesium.Cartesian3.dot(r.directionWC,l))}else e.foveatedFactor=0}(this,e)},Ue.prototype.requestContent=function(){let e=this,t=this.layer,n=this.contentResource.clone(),i=new Cesium.Request({throttle:!0,throttleByServer:!0,type:Cesium.RequestType.TILES3D,priorityFunction:(o=this,function(){return o.priority}),serverKey:this.serverKey});var o;this.request=i,n.request=i;let a=n.fetchArrayBuffer();if(!Cesium.defined(a))return!1;this.contentState=r.LOADING,this.contentReadyPromise=Oe();let s=function(e){return function(t){e.contentState=r.FAILED,e.contentReadyPromise.reject(t)}}(this);return a.then(function(n){e.isDestroyed()?s():async function(e,t,n){let i;if(e._cache.add(t),"s3mb"===t.fileExtension&&(i=await I.parseBuffer(n)),!i)return t.contentState=r.FAILED,void t.contentReadyPromise.reject();!function(e,t){let r=e.layer,n=t.length;for(let i=0;i<n;i++){const n=new Ge;let o=t[i],a=o.boundingVolume;n.fileName=e.baseUri+o.childTile,n.rangeData=o.rangeList,n.rangeMode=o.rangeMode,a.obb?n.boundingVolume=Ke(a.obb,r.modelMatrix):a.box?n.boundingVolume=Ke(a.box,r.modelMatrix):a.sphere&&(n.boundingVolume=a.isCalc?new Cesium.TileBoundingSphere(a.sphere.center,a.sphere.radius):He(a.sphere,r.modelMatrix)),n.renderEntities=o.renderEntities,n.isLeafTile=o.isLeafTile,e.pageLods.push(n)}}(t,await Le.parse(e,i,t)),t.contentState=r.LOADED,t.contentReadyPromise&&t.contentReadyPromise.resolve(i)}(t,e,n)},t=>{i.state!==Cesium.RequestState.CANCELLED||(e.contentState=r.UNLOADED)}),!0},Ue.prototype.updatePriority=function(e,t){let r=e._minimumPriority,n=e._maximumPriority,i=4,o=Je(ze(this.foveatedFactor,r.foveatedFactor,n.foveatedFactor),4,i);i=8;let a=Je(1-ze(this.pixel,r.pixel,n.pixel),4,i);i=0;let s=Je(ze(this.distanceToCamera,r.distance,n.distance),4,i);this.priority=o+a+s},Ue.prototype.transformResource=function(e,t){let n=!0;for(let r=0,o=this.pageLods.length;r<o;r++){const o=this.pageLods[r];var i=!0;for(let r=0,a=o.renderEntities.length;r<a;r++){const a=o.renderEntities[r];if(!a.ready){n=!1,i=!1;try{a.transformResource(e,t)}catch(e){console.log(e)}}}o.ready=i}n&&(this.contentState=r.READY)},Ue.prototype.update=function(e,t){},Ue.prototype.free=function(){this.contentState=r.UNLOADED,this.request=void 0,this.cacheNode=void 0,this.contentReadyPromise=void 0;for(let e=0,t=this.pageLods.length;e<t;e++)this.pageLods[e].destroy();this.pageLods.length=0},Ue.prototype.isDestroyed=function(){return!1},Ue.prototype.destroy=function(){return this.free(),Cesium.destroyObject(this)},je.prototype.schedule=function(e,t){this._selectPageLods.length=0,this._stack.length=0;const n=this._selectPageLods,i=this._stack;for(let n=0,o=e._rootTiles.length;n<o;n++){const o=e._rootTiles[n];Ze(t,e,o),o.visible&&(qe(e,o,t),o.contentState!==r.UNLOADED?o.contentState!==r.LOADED?o.contentState===r.READY&&i.push(o):Xe(e,o,t):We(e,o,t))}for(;i.length;){const o=i.pop();qe(e,o,t);for(let a=0,s=o.pageLods.length;a<s;a++){const s=o.pageLods[a];if(s.isLeafTile){n.push(s);continue}if(s.update(t,e),!s.canRefine){n.push(s);continue}let u=s.childTile;void 0!==u?(Ze(t,e,u),u.visible&&(qe(e,u,t),u.contentState!==r.LOADED?u.contentState!==r.READY?(We(e,u,t),n.push(s)):i.push(u):(Xe(e,u,t),n.push(s)))):(s.createChildTile(e,o),u=s.childTile,qe(e,u,t),n.push(s))}}for(let t=0,r=n.length;t<r;t++)e._renderQueue=e._renderQueue.concat(n[t].renderEntities);!function(e,t){let r=e._requestTiles,n=r.length;for(let i=0;i<n;++i)r[i].updatePriority(e,t)}(e,t)},Qe.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},Qe.prototype.touch=function(e){let t=e.cacheNode;Cesium.defined(t)&&this._list.splice(this._sentinel,t)},Qe.prototype.add=function(e){Cesium.defined(e.cacheNode)||(e.cacheNode=this._list.add(e))},Qe.prototype.unloadTile=function(e,t,r){let n=t.cacheNode;Cesium.defined(n)&&(this._list.remove(n),t.cacheNode=void 0,r(e,t))},Qe.prototype.unloadTiles=function(e,t){let r=this._trimTiles;this._trimTiles=!1;let n=1024*e.maximumMemoryUsage*1024,i=this._sentinel,o=this._list.head;for(;o&&o!==i&&(e.totalMemoryUsageInBytes>n||r);){let r=o.item;o=o.next,this.unloadTile(e,r,t)}},Qe.prototype.trim=function(){this._trimTiles=!0},$e.read=function(e){let t=e.indexOf("<");return t>0&&(e=e.substring(t)),DOMParser?($e.xmldom||($e.xmldom=new DOMParser),$e.xmldom.parseFromString(e,"text/xml")):($e.xmldom||($e.xmldom=new ActiveXObject("Microsoft.XMLDOM")),$e.xmldom.loadXML(e))},$e.getElementsByTagNameNS=function(e,t,r){let n=[];if(e.getElementsByTagNameNS)n=e.getElementsByTagNameNS(t,r);else{let i,o,a=e.getElementsByTagName("*");for(let e=0,s=a.length;e<s;++e)i=a[e],o=i.prefix?i.prefix+":"+r:r,"*"!==r&&o!==i.nodeName||"*"!==t&&t!==i.namespaceURI||n.push(i)}return n},$e.getAttributeNodeNS=function(e,t,r){let n=null;if(e.getAttributeNodeNS)n=e.getAttributeNodeNS(t,r);else{let i,o,a=e.attributes;for(let e=0,s=a.length;e<s;++e)if(i=a[e],i.namespaceURI===t&&(o=i.prefix?i.prefix+":"+r:r,o===i.nodeName)){n=i;break}}return n},$e.getChildValue=function(e,t){let r=t||"";if(e)for(let t=e.firstChild;t;t=t.nextSibling)switch(t.nodeType){case 3:case 4:r+=t.nodeValue}return r},$e.queryNumericAttribute=function(e,t){if(!e)return;let r=e.getAttribute(t);if(null!==r){let e=parseFloat(r);return isNaN(e)?void 0:e}},$e.queryStringAttribute=function(e,t){if(!e)return;let r=e.getAttribute(t);return null!==r?r:void 0},$e.queryBooleanAttribute=function(e,t){if(!e)return;let r=e.getAttribute(t);return r=r.toLowerCase(),"false"!==r&&("true"===r||void 0)},$e.queryFirstNode=function(e,t,r){if(!e)return;let n=e.childNodes,i=n.length;for(let e=0;e<i;e++){let i=n[e];if(r){if(i.localName===t&&-1!==r.indexOf(i.namespaceURI))return i}else if(i.localName===t)return i}},$e.queryNodes=function(e,t,r){if(!e)return;let n=[],i=e.getElementsByTagNameNS("*",t),o=i.length;for(let e=0;e<o;e++){let o=i[e];r?o.localName===t&&-1!==r.indexOf(o.namespaceURI)&&n.push(o):o.localName===t&&n.push(o)}return n},$e.queryChildNodes=function(e,t,r){if(!e)return[];let n=[],i=e.childNodes,o=i.length;for(let e=0;e<o;e++){let o=i[e];r?o.localName===t&&-1!==r.indexOf(o.namespaceURI)&&n.push(o):o.localName===t&&n.push(o)}return n},$e.queryNumericValue=function(e,t,r){let n=$e.queryFirstNode(e,t,r);if(n){let e=parseFloat(n.textContent);return isNaN(e)?void 0:e}},$e.queryStringValue=function(e,t,r){let n=$e.queryFirstNode(e,t,r);if(n)return n.textContent.trim()},$e.queryBooleanValue=function(e,t,r){let n=$e.queryFirstNode(e,t,r);if(n){let e=n.textContent.trim();return"1"===e||/^true$/i.test(e)}},Object.defineProperties(et.prototype,{fillForeColor:{get:function(){return this._fillForeColor},set:function(e){Cesium.Check.typeOf.object("fillForeColor value",e),Cesium.Color.clone(e,this._fillForeColor)}},bottomAltitude:{get:function(){return this._bottomAltitude},set:function(e){Cesium.Check.typeOf.number("bottomAltitude value",e),this._bottomAltitude!==e&&(this._bottomAltitude=e,this._dirty=!0)}},altitudeMode:{get:function(){return this._altitudeMode},set:function(e){Cesium.Check.typeOf.number("altitudeMode value",e),this._altitudeMode=e}},lineColor:{get:function(){return this._lineColor},set:function(e){Cesium.Check.typeOf.object("line color",e),Cesium.Color.clone(e,this._lineColor)}},lineWidth:{get:function(){return this._lineWidth},set:function(e){Cesium.Check.typeOf.number("line width",e),this._lineWidth=e}},pointSize:{get:function(){return this._pointSize},set:function(e){Cesium.Check.typeOf.number("point size",e),this._pointSize=e}},pointColor:{get:function(){return this._pointColor},set:function(e){Cesium.Check.typeOf.object("point color",e),Cesium.Color.clone(e,this._pointColor)}}}),tt.prototype.scheme=null,tt.prototype.authority=null,tt.prototype.path="",tt.prototype.query=null,tt.prototype.fragment=null;var rt=new RegExp("^(?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$");tt.prototype.getScheme=function(){return this.scheme},tt.prototype.getAuthority=function(){return this.authority},tt.prototype.getPath=function(){return this.path},tt.prototype.getQuery=function(){return this.query},tt.prototype.getFragment=function(){return this.fragment},tt.prototype.isAbsolute=function(){return!!this.scheme&&!this.fragment},tt.prototype.isSameDocumentAs=function(e){return e.scheme==this.scheme&&e.authority==this.authority&&e.path==this.path&&e.query==this.query},tt.prototype.equals=function(e){return this.isSameDocumentAs(e)&&e.fragment==this.fragment},tt.prototype.normalize=function(){this.removeDotSegments(),this.scheme&&(this.scheme=this.scheme.toLowerCase()),this.authority&&(this.authority=this.authority.replace(ot,st).replace(nt,at)),this.path&&(this.path=this.path.replace(nt,at)),this.query&&(this.query=this.query.replace(nt,at)),this.fragment&&(this.fragment=this.fragment.replace(nt,at))};var nt=/%[0-9a-z]{2}/gi,it=/[a-zA-Z0-9\-\._~]/,ot=/(.*@)?([^@:]*)(:.*)?/;function at(e){var t=unescape(e);return it.test(t)?t:e.toUpperCase()}function st(e,t,r,n){return(t||"")+r.toLowerCase()+(n||"")}tt.prototype.resolve=function(e){var t=new tt;return this.scheme?(t.scheme=this.scheme,t.authority=this.authority,t.path=this.path,t.query=this.query):(t.scheme=e.scheme,this.authority?(t.authority=this.authority,t.path=this.path,t.query=this.query):(t.authority=e.authority,""==this.path?(t.path=e.path,t.query=this.query||e.query):("/"==this.path.charAt(0)?(t.path=this.path,t.removeDotSegments()):(t.path=e.authority&&""==e.path?"/"+this.path:e.path.substring(0,e.path.lastIndexOf("/")+1)+this.path,t.removeDotSegments()),t.query=this.query))),t.fragment=this.fragment,t},tt.prototype.removeDotSegments=function(){var e,t=this.path.split("/"),r=[],n=""==t[0];for(n&&t.shift(),""==t[0]&&t.shift();t.length;)".."==(e=t.shift())?r.pop():"."!=e&&r.push(e);"."!=e&&".."!=e||r.push(""),n&&r.unshift(""),this.path=r.join("/")},tt.prototype.toString=function(){var e="";return this.scheme&&(e+=this.scheme+":"),this.authority&&(e+="//"+this.authority),e+=this.path,this.query&&(e+="?"+this.query),this.fragment&&(e+="#"+this.fragment),e};var ut=Object.freeze({None:"None",CRN_DXT5:"CRN_DXT5"}),lt=new Cesium.Matrix4(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function ct(e){e=Cesium.defaultValue(e,Cesium.defaultValue.EMPTY_OBJECT),Cesium.Check.defined("options.context",e.context),this.id=Cesium.createGuid(),this.name=e.name,this.context=e.context,this._isS3MB=Cesium.defaultValue(e.isS3MB,!0),this._url=void 0,this._basePath=void 0,this._baseResource=void 0,this.modelMatrix=new Cesium.Matrix4,this.invModelMatrix=new Cesium.Matrix4,this.fileType=void 0,this.dataVersion=1,this._position=void 0,this._rectangle=void 0,this._rootTiles=[],this._schuduler=new je,this._requestTiles=[],this._processTiles=[],this._renderQueue=[],this._cache=new Qe,this._vertexCompressionType=e.vertexCompressionType,this._textureCompressType=ut.None,this._maximumMemoryUsage=-1,this._totalMemoryUsageInBytes=0,this._maximumPriority={foveatedFactor:-Number.MAX_VALUE,depth:-Number.MAX_VALUE,distance:-Number.MAX_VALUE,pixel:-Number.MAX_VALUE},this._minimumPriority={foveatedFactor:Number.MAX_VALUE,depth:Number.MAX_VALUE,distance:Number.MAX_VALUE,pixel:Number.MAX_VALUE},this._readyPromise=Oe(),this._selectEnabled=Cesium.defaultValue(e.selectEnabled,!0),this._multiChoose=!1,this._sceneMode=Cesium.defaultValue(e.sceneMode,Cesium.SceneMode.SCENE3D),this._selections=[],this._objsOperationList={},this._selectedColor=new Cesium.Color(.7,.7,1,1),this._minCategory=0,this._maxCategory=0,this._minHeight=0,this._maxHeight=0,this._brightness=Cesium.defaultValue(e.brightness,1),this._contrast=Cesium.defaultValue(e.constrast,1),this._hue=Cesium.defaultValue(e.hue,0),this._saturation=Cesium.defaultValue(e.saturation,1),this._gamma=Cesium.defaultValue(e.gamma,1),this._visibleDistanceMax=Cesium.defaultValue(e.maxVisibleDistance,Number.MAX_VALUE),this._visibleDistanceMin=Cesium.defaultValue(e.minVisibleDistance,0),this._minVisibleAltitude=Cesium.defaultValue(e.minVisibleAltitude,0),this._maxVisibleAltitude=Cesium.defaultValue(e.maxVisibleAltitude,Number.MAX_VALUE),this._lodRangeScale=Cesium.defaultValue(e.lodRangeScale,1),this._visible=Cesium.defaultValue(e.isVisible,!0),this._style3D=Cesium.defaultValue(e.style3D,new et),this._isTransparencyOptimization=!1,this._polygonOffsetConfig=e.polygonOffset,this._visibleViewport=4095,this._waterParameters=void 0,this._waterPlanes=void 0,this._edgeDistanceFalloffFactor=0,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0,this._materialManager=void 0,this.loadConfig(e.url)}function dt(e){let t={},r=e.firstChild;t.version=$e.queryStringValue(r,"Version"),t.fileType=$e.queryStringValue(r,"FileType");let n=$e.queryFirstNode(r,"WaterEffect");t.averageHeight=$e.queryNumericValue(n,"AverageHeight");let i=$e.queryNodes(n,"GpuProgramParameters");t.gpuProgramParameters=[];for(let e=0,r=i.length;e<r;e++){let r={gpuConstants:[],atuoConstants:[]},n=i[e],o=$e.queryFirstNode(n,"GpuConstants");if(o){let e=$e.queryNodes(o,"GpuConstantDefinition");for(let t=0,n=e.length;t<n;t++){let n={},i=e[t];n.constType=$e.queryNumericValue(i,"ConstType"),n.index=$e.queryNumericValue(i,"Index"),n.name=$e.queryStringValue(i,"Name"),n.arraySize=$e.queryNumericValue(i,"ArraySize"),n.multiple=$e.queryNumericValue(i,"Multiple");let o=$e.queryFirstNode(i,"ArrayFloat");if(n.arrayFloat=[],o){let e=$e.queryNodes(o,"Float"),t=0;for(;t<n.arraySize;){let r=parseFloat(e[t].textContent);n.arrayFloat.push(r),t++}}r.gpuConstants.push(n)}}let a=$e.queryFirstNode(n,"AutoConstants");if(a){let e=$e.queryNodes(a,"AutoConstantEntry");for(let t=0,n=e.length;t<n;t++){let n={},i=e[t];n.paramType=$e.queryNumericValue(i,"ParamType"),n.name=$e.queryStringValue(i,"Name"),n.physicalIndex=$e.queryNumericValue(i,"PhysicalIndex"),n.elementCount=$e.queryNumericValue(i,"ElementCount"),n.data=$e.queryNumericValue(i,"Data"),n.fData=$e.queryNumericValue(i,"FData"),n.isReal=$e.queryBooleanValue(i,"IsReal"),r.atuoConstants.push(n)}}t.gpuProgramParameters.push(r)}return t}function ft(e,t){let r=t._basePath;if(!(t._basePath.indexOf("realspace")>-1))return e;let n=r.replace(/(.*realspace)/,"");return r.replace(/\/rest\/realspace/g,"").replace(n,"")+"/rest/realspace"+n+"data/path/"+e.replace(/^\.*/,"").replace(/^\//,"").replace(/\/$/,"")}function pt(e,t){return e.priority-t.priority}function _t(e,t){t.free()}function At(e){e._cache.unloadTiles(e,_t)}function mt(e,t){e.updateObjsOperation(t.ids,t)}Object.defineProperties(ct.prototype,{ready:{get:function(){return"OSGBCacheFile_Water"===this.fileType?void 0!==this._waterParameters&&this._rootTiles.length>0:this._rootTiles.length>0}},readyPromise:{get:function(){return this._readyPromise.promise}},visible:{get:function(){return this._visible},set:function(e){this._visible=e}},show:{get:function(){return this._visible},set:function(e){this._visible=e}},style3D:{get:function(){return this._style3D},set:function(e){this._style3D=e}},rectangle:{get:function(){return this._rectangle}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes},set:function(e){this._totalMemoryUsageInBytes=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){this._maximumMemoryUsage=e}},lodRangeScale:{get:function(){return this._lodRangeScale},set:function(e){Cesium.Check.typeOf.number("set layer lod range scale",e),this._lodRangeScale=e}},selectedColor:{get:function(){return this._selectedColor},set:function(e){Cesium.Color.clone(e,this._selectedColor)}},dataMinValue:{get:function(){return Cesium.defaultValue(this._minCategory,this._minHeight)}},dataMaxValue:{get:function(){return Cesium.defaultValue(this._maxCategory,this._maxHeight)}},visibleDistanceMax:{get:function(){return this._visibleDistanceMax},set:function(e){Cesium.Check.typeOf.number("max visible distance",e),this._visibleDistanceMax=e}},visibleDistanceMin:{get:function(){return this._visibleDistanceMin},set:function(e){Cesium.Check.typeOf.number("min visible distance",e),this._visibleDistanceMin=e}},minVisibleAltitude:{get:function(){return this._minVisibleAltitude},set:function(e){Cesium.Check.typeOf.number("min visible altitude",e),this._minVisibleAltitude=e}},maxVisibleAltitude:{get:function(){return this._maxVisibleAltitude},set:function(e){Cesium.Check.typeOf.number("max visible altitude",e),this._maxVisibleAltitude=e}},selectEnabled:{get:function(){return this._selectEnabled},set:function(e){Cesium.Check.defined("value",e),Cesium.Check.typeOf.bool("value",e),this._selectEnabled=e}}}),ct.prototype.loadConfig=function(e){let t=this;Promise.resolve(e).then(function(e){let r,n=Cesium.Resource.createIfNeeded(e);r=n.getBaseUri(!0);let i=new tt(r);return i.query=void 0,r=i.toString(),t._url=n.url,t._basePath=r,t._baseResource=n,t._isS3MB?n.fetchJson():n.fetchXML()}).then(function(e){if(t._isS3MB){let r=e.extensions;t.fileType=r["s3m:FileType"];let n=Cesium.defaultValue(e.position.point3D,e.position),i=n.x,o=n.y,a=n.z,s=e.position.units;if(t.lon=i,t.lat=o,t.height=a,t._sceneMode===Cesium.SceneMode.SCENE3D)t._position=Cesium.Cartesian3.fromDegrees(i,o,a),t.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(t._position),t.invModelMatrix=Cesium.Matrix4.inverse(t.modelMatrix,t.invModelMatrix);else{if(i>180||i<-180||o>180||o<-180||"Meter"===s)t._position=new Cesium.Cartesian3(i,o,a);else{let e=new Cesium.GeographicProjection,r=Cesium.Cartesian3.fromDegrees(i,o,a),n=e.ellipsoid.cartesianToCartographic(r);t._position=e.project(n)}Cesium.Matrix4.fromTranslation(t._position,t.modelMatrix),Cesium.Matrix4.multiply(lt,t.modelMatrix,t.modelMatrix),t.invModelMatrix=Cesium.Matrix4.inverse(t.modelMatrix,t.invModelMatrix)}if(Cesium.defined(e.geoBounds)){let r=e.geoBounds.left,n=e.geoBounds.top,i=e.geoBounds.right,o=e.geoBounds.bottom;r>180||o>180||i>180||n>180?(r/=6378137,o/=6378137,i/=6378137,n/=6378137,t._rectangle=new Cesium.Rectangle(r,o,i,n)):t._rectangle=Cesium.Rectangle.fromDegrees(r,o,i,n)}if(e.heightRange&&(t._minHeight=e.heightRange.min,t._maxHeight=e.heightRange.max),e.wDescript){let r=e.wDescript.range;t._minWValue=r.min,t._maxWValue=r.max}r.hasOwnProperty("s3m:TransparencyOptimization")&&(t._isTransparencyOptimization="TRUE"===r["s3m:TransparencyOptimization"]),r.hasOwnProperty("s3m:VertexCompressionType")&&(t._vertexCompressionType=r["s3m:VertexCompressionType"]),r.hasOwnProperty("s3m:TextureCompressionType")&&(t._textureCompressType=r["s3m:TextureCompressionType"]);const u=e.tiles||e.rootTiles;u.length>0&&Cesium.getExtensionFromUri(u[0].url);for(let e=0,r=u.length;e<r;e++){let r=u[e].url,n=new Ue(t,void 0,{box:u[e].boundingbox||u[e].boundingBox},r);n.isRootTile=!0,n.blockKey=r,t._cache.add(n),t._rootTiles.push(n)}!function(e,t){let r=t.extensions;if(!r||!r.attachFiles)return;let n=r.attachFiles,i=[];for(let t=0,r=n.length;t<r;t++){let r=n[t].attachFile;if(r.indexOf(".water")>0){let t=ft(r,e),n=e._baseResource.getDerivedResource({url:t});i.push(n.fetchXML())}}i.length&&Promise.all(i).then(t=>{let r=[];for(let e=0,n=t.length;e<n;e++){let n=t[e];if(!n)break;let i=dt(n);r.push(i)}e._waterPlanes=new Cesium.AssociativeArray,e._waterParameters={};let n=r[0];e._waterParameters.averageHeight=n.averageHeight;for(let t=0;t<n.gpuProgramParameters.length;t++){let r=n.gpuProgramParameters[t];for(let t=0;t<r.atuoConstants.length;t++){let n=r.atuoConstants[t];if("timeVal"===n.name){e._waterParameters[n.name]=n.fData;break}}for(let t=0;t<r.gpuConstants.length;t++){let n=r.gpuConstants[t],i=null;switch(n.arraySize){case 1:i=n.arrayFloat[0];break;case 2:i=new Cesium.Cartesian2,Cesium.Cartesian2.unpack(n.arrayFloat,0,i);break;case 3:i=new Cesium.Cartesian3,Cesium.Cartesian3.unpack(n.arrayFloat,0,i);break;case 4:i=new Cesium.Cartesian4,Cesium.Cartesian4.unpack(n.arrayFloat,0,i)}i&&(e._waterParameters[n.name]=i)}}e.fileType+="_Water"}).catch(e=>{console.log(e)})}(t,e)}else{let r=e.firstChild,n=r.namespace;t.fileType=$e.queryStringValue(r,"FileType",n);let i=$e.queryFirstNode(r,"Position",n),o=$e.queryNumericValue(i,"X",n),a=$e.queryNumericValue(i,"Y",n),s=$e.queryNumericValue(i,"Z",n);t.lon=o,t.lat=a,t.height=s,t._position=Cesium.Cartesian3.fromDegrees(o,a,s),t.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(t._position),t.invModelMatrix=Cesium.Matrix4.inverse(t.modelMatrix,t.invModelMatrix);let u=$e.queryFirstNode(r,"Bounds",n),l=$e.queryFirstNode(r,"BoundingBox",n);if(u){let e=$e.queryNumericValue(u,"Left",n),r=$e.queryNumericValue(u,"Top",n),i=$e.queryNumericValue(u,"Right",n),o=$e.queryNumericValue(u,"Bottom",n);t._rectangle=Cesium.Rectangle.fromDegrees(e,o,i,r)}else if(l){let e=$e.queryNumericValue(l,"MinX",n),r=$e.queryNumericValue(l,"MinY",n);$e.queryNumericValue(l,"MinZ",n);let i=$e.queryNumericValue(l,"MaxX",n),s=$e.queryNumericValue(l,"MaxY",n);$e.queryNumericValue(l,"MaxZ",n),e=180*Math.abs(e)/(6378137*Math.PI),r=180*Math.abs(r)/(6378137*Math.PI),i=180*Math.abs(i)/(6378137*Math.PI),s=180*Math.abs(s)/(6378137*Math.PI),t._rectangle=Cesium.Rectangle.fromDegrees(o-e,a-r,o+i,a+s)}let c=$e.queryFirstNode(r,"HeightRange",n);c&&(t._minHeight=$e.queryNumericValue(c,"MinHeight",n),t._maxHeight=$e.queryNumericValue(c,"MaxHeight",n));let d=$e.queryFirstNode(r,"CategoryRange",n);d&&(t._maxWValue=$e.queryNumericValue(d,"MaxCategory",n),t._minWValue=$e.queryNumericValue(d,"MinCategory",n));let f=$e.queryFirstNode(r,"Extensions",n);t._isTransparencyOptimization=$e.queryBooleanValue(f,"TransparencyOptimization",n);let p=/\\+/g,_=$e.queryFirstNode(r,"OSGFiles",n),A=$e.queryNodes(_,"Files",n);if(A.length>0)for(let e=0,r=A.length;e<r;e++){let r=A[e],i=$e.queryStringValue(r,"FileName",n);i=i.replace(p,"/"),i=i.replace(/(\.osgb)/gi,".s3m");let o=$e.queryFirstNode(r,"BoundingSphere",n),a={sphere:{center:{x:0,y:0,z:0},radius:6378137}};o&&o.childNodes.length&&(a={sphere:{center:{x:$e.queryNumericValue(o,"CenterX",n),y:$e.queryNumericValue(o,"CenterY",n),z:$e.queryNumericValue(o,"CenterZ",n)},radius:$e.queryNumericValue(o,"Radius",n)}});let s=new Ue(t,void 0,a,i);s.isRootTile=!0,t._cache.add(s),t._rootTiles.push(s)}else{let e=$e.queryNodes(_,"FileName",n);for(let r=0,n=e.length;r<n;r++){let n=e[r].textContent;n=n.replace(p,"/"),n=n.replace(/(\.osgb)/gi,".s3m");let i=new Ue(t,void 0,{sphere:{center:{x:0,y:0,z:0},radius:6378137}},n);i.isRootTile=!0,t._cache.add(i),t._rootTiles.push(i)}}}t._readyPromise.resolve(t)},e=>{t._readyPromise.reject(e)})},ct.prototype._tranverseRenderEntity=function(e,t){let r=[];for(let e=0,t=this._rootTiles.length;e<t;e++)r.push(this._rootTiles[e]);for(;r.length;){let n=r.pop();for(let i=0,o=n.pageLods.length;i<o;i++){const o=n.pageLods[i],a=o.renderEntities;for(let r=0,n=a.length;r<n;r++){const n=a[r];n.ready&&t(n,e)}o.childTile&&r.push(o.childTile)}}},ct.prototype._updateObjsOperation=function(e){this._tranverseRenderEntity({ids:e},mt)},ct.prototype._setObjsOperationType=function(e,t){Cesium.Check.defined("set Objs Operation ids",e),Cesium.Check.defined("set Objs Operation operationType",t),Array.isArray(e)||(e=[e]);let r,n=new Cesium.AssociativeArray;for(let i=0,o=e.length;i<o;i++){if(r=e[i],!Cesium.defined(r))continue;let o=Cesium.defaultValue(this._objsOperationList[r],0);o!==t&&(o|=t,this._objsOperationList[r]=o,n.set(r,o))}n.length>0&&this._updateObjsOperation(n._hash)},ct.prototype._removeObjsOperationType=function(e,t){Cesium.Check.defined("set Objs Operation ids",e),Array.isArray(e)||(e=[e]);let r,n=fe.ALL^t,i=new Cesium.AssociativeArray;for(let t=0,o=e.length;t<o;t++){r=e[t];let o=this._objsOperationList[r];Cesium.defined(o)&&(o&=n,o===fe.RESET?delete this._objsOperationList[r]:this._objsOperationList[r]=o,i.set(r,o))}i.length>0&&this._updateObjsOperation(i._hash)},ct.prototype.setSelection=function(e){Cesium.Check.defined("setSelection ids",e),Array.isArray(e)||(e=[e]),this.releaseSelection(),this._selections=this._selections.concat(e),this._setObjsOperationType(e,fe.SELECTED)},ct.prototype.releaseSelection=function(){this._selections.length<1||(this._removeObjsOperationType(this._selections,fe.SELECTED),this._selections.length=0)},ct.prototype.setLodRangeScale=function(e){this._lodRangeScale=e},ct.prototype.setVisibleInViewport=function(e,t){if(e>8)throw new Cesium.DeveloperError("the index is 0~8");this._visibleViewport=t?1<<e|this._visibleViewport:~(1<<e)&this._visibleViewport},ct.prototype.getVisibleInViewport=function(e){if(e>8)throw new Cesium.DeveloperError("the index is 0~3");return 1<<e&this._visibleViewport},ct.prototype._updateEdgeDistanceFalloffFactor=function(){0!==this._edgeCurrentCount?(this._edgeDistanceFalloffFactor=this._edgeCurrentTotalLength/this._edgeCurrentCount*40,this._edgeCurrentTotalLength=0,this._edgeCurrentCount=0):this._edgeCurrentTotalLength=0},ct.prototype._addRenderedEdge=function(e,t){this._edgeCurrentTotalLength+=e,this._edgeCurrentCount+=t},ct.prototype.addWaterPlane=function(e){let t=this._waterPlanes.length;return this._waterPlanes.set(t,e),t},ct.prototype.removeWaterPlane=function(e){this._waterPlanes.remove(e)},ct.prototype.prePassesUpdate=function(e){this.ready&&e.newFrame&&(this._cache.reset(),this._requestTiles.length=0,this._processTiles.length=0,this._renderQueue.length=0,Cesium.defined(e.brdfLutGenerator)&&e.brdfLutGenerator.update(e),function(e,t){if(!e._waterPlanes)return;let r=e._waterPlanes;void 0===t.curDis&&(t.curDis=6378137),void 0===t.heightOffset&&(t.heightOffset=0);let n=t.camera.positionWC;for(let e in r._hash)if(r._hash.hasOwnProperty(e)){let i=r.get(e),o=i.boundingVolume;if(t.cullingVolume.computeVisibility(o)===Cesium.Intersect.OUTSIDE)continue;let a=Cesium.Cartesian3.distance(o.center,n)-o.radius;a=a<.01?.01:a,a<t.curDis&&(t.curDis=a,t.heightOffset=i.distance)}}(this,e))},new Cesium.Matrix4,ct.prototype.postPassesUpdate=function(e){this.ready&&(At(this),this._updateEdgeDistanceFalloffFactor(),this._subTextureManager&&this._subTextureManager.processRequests(this.id))},ct.prototype.update=function(e){this.ready&&function(e,t){let r=t.camera;return!(r.positionCartographic.height<e._minVisibleAltitude||r.positionCartographic.height>e._maxVisibleAltitude)&&!!e.getVisibleInViewport(t.multiViewportIndex)&&e.visible}(this,e)&&(!e.passes.pick||this._selectEnabled)&&(ge.wasmReady?(this._schuduler.schedule(this,e),function(e){let t=e._requestTiles,r=t.length;t.sort(pt);for(let e=0;e<r;++e)t[e].requestContent()}(this),function(e,t){let r=e._processTiles,n=r.length;for(let i=0;i<n;++i)r[i].transformResource(t,e)}(this,e),function(e,t){for(let r=0,n=e._renderQueue.length;r<n;r++)e._renderQueue[r].update(t,e)}(this,e),this._style3D._dirty&&(function(e){var t=0;Cesium.defined(e.style3D)&&(t=e.style3D.bottomAltitude);var r=e.height+t,n=e.lon,i=e.lat;if(e._sceneMode===Cesium.SceneMode.SCENE3D)e._position=Cesium.Cartesian3.fromDegrees(n,i,r),e.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(e._position),e.invModelMatrix=Cesium.Matrix4.inverse(e.modelMatrix,e.invModelMatrix);else{if(n>180||n<-180||i>180||i<-180)e._position=new Cesium.Cartesian3(n,i,r);else{let t=new Cesium.GeographicProjection,o=Cesium.Cartesian3.fromDegrees(n,i,r),a=t.ellipsoid.cartesianToCartographic(o);e._position=t.project(a)}Cesium.Matrix4.fromTranslation(e._position,e.modelMatrix),Cesium.Matrix4.multiply(lt,e.modelMatrix,e.modelMatrix),e.invModelMatrix=Cesium.Matrix4.inverse(e.modelMatrix,e.invModelMatrix)}}(this),this._style3D._dirty=!1),this._frameState=e):ge.init())},ct.prototype.isDestroyed=function(){return!1},ct.prototype.destroy=function(){return this._cache.reset(),At(this),this._rootTiles.length=0,this._requestTiles.length=0,this._processTiles.length=0,this._renderQueue.length=0,Cesium.destroyObject(this)},Cesium.Scene.prototype.hookPickFunc=Cesium.Scene.prototype.pick,Cesium.Scene.prototype.pick=function(e,t,r){let n=this.hookPickFunc(e,t,r);if(n)n.primitive&&n.primitive instanceof ct&&n.primitive.setSelection(n.id);else for(let e=0,t=this.primitives.length;e<t;e++){let t=this.primitives.get(e);t instanceof ct&&t.releaseSelection()}return n};export{et as Style3D,ct as default};
|