@arcgis/core 4.34.0-next.93 → 4.34.0-next.94
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/analysis/ElevationProfile/ElevationProfileDisplayUnits.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileUnits.js → ElevationProfileDisplayUnits.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileUnits.d.ts +1 -1
- package/analysis/ElevationProfile/ElevationProfileViewOptions.js +1 -1
- package/analysis/ElevationProfileAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{db5a985ccc6b7d0ad855.js → 176f56de787bf486be9f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad67e5eb4b8c0c14cea6.js → 1fc7df018c8f802565a6.js} +1 -1
- package/assets/esri/core/workers/chunks/20f4c6d8b310ecab97be.js +1 -0
- package/assets/esri/core/workers/chunks/25639559336109ff3df1.js +1 -0
- package/assets/esri/core/workers/chunks/26081b6486c623735657.js +1 -0
- package/assets/esri/core/workers/chunks/2698f656405876f4bd20.js +1 -0
- package/assets/esri/core/workers/chunks/{4660798b3b45dcb5cecb.js → 2b9c9a35a6e1f56920b5.js} +2 -2
- package/assets/esri/core/workers/chunks/98381404f2d99a1f9341.js +1 -0
- package/assets/esri/core/workers/chunks/{992b1389710d716d3450.js → a410dcf80d17a2383337.js} +1 -1
- package/assets/esri/core/workers/chunks/{d9d86cf0500fa29d1d43.js → a98b284b147258629947.js} +1 -1
- package/assets/esri/core/workers/chunks/b1ccbc2fef7f7e5e04f7.js +1 -0
- package/assets/esri/core/workers/chunks/c4641c2c130c7b8bcdee.js +1 -0
- package/assets/esri/core/workers/chunks/c9159ebf930af3f336f3.js +1 -0
- package/assets/esri/core/workers/chunks/{8de9e50de0ac66ae1573.js → ce2fcaa21d6efcdf4da5.js} +1 -1
- package/assets/esri/core/workers/chunks/d2df6e685d6cffc5f486.js +1 -0
- package/assets/esri/core/workers/chunks/{c27783ce7ea51a5e49c5.js → e153b61560a7a869db63.js} +1 -1
- package/assets/esri/core/workers/chunks/e2c293331515f3bd0355.js +1 -0
- package/assets/esri/core/workers/chunks/ec7b156425f25d231078.js +1 -0
- package/assets/esri/core/workers/chunks/fb456e7425e09df17d8c.js +1 -0
- package/assets/esri/core/workers/chunks/{f6806780ca2aa591475a.js → fe1dcf9f81da4adbb1fe.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/chunks/WaterSurface.glsl.js +0 -1
- package/chunks/bundle.js +1 -1
- package/colorUtils.js +1 -1
- package/config.js +1 -1
- package/interfaces.d.ts +229 -97
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/dehydratedFeatureComparison.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/support/rasterDatasets/InMemoryRaster.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/NetworkSystemLayers.js +1 -1
- package/package.json +2 -1
- package/popup/content/AttachmentsContent.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileInputVisualization2D.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/support/GaussianSplatSortWorker.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/popupAdapter.js +5 -0
- package/views/webgl/ContextState.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/enums.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/Feature/FeatureMedia/chartCommon.js +1 -1
- package/widgets/Feature/FeatureMedia/pieChart.js +1 -1
- package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/FeatureTable/support/TableTemplate.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/support/chartUtilsAm5.js +1 -1
- package/assets/esri/core/workers/chunks/0b24a6c06d1becbb6815.js +0 -1
- package/assets/esri/core/workers/chunks/19f1bfe815896d4983af.js +0 -1
- package/assets/esri/core/workers/chunks/22c3a21bc9f32c429c48.js +0 -1
- package/assets/esri/core/workers/chunks/3b2ef975831eb75b40fb.js +0 -1
- package/assets/esri/core/workers/chunks/5eb7f6f5121c8830c561.js +0 -1
- package/assets/esri/core/workers/chunks/6c3b585b9cb6bb640fb0.js +0 -1
- package/assets/esri/core/workers/chunks/8b9a50cfaa5a7df02dad.js +0 -1
- package/assets/esri/core/workers/chunks/8ff2daef892881ff2019.js +0 -1
- package/assets/esri/core/workers/chunks/a6a2d4602dfeb62e0ecc.js +0 -1
- package/assets/esri/core/workers/chunks/c95e6bef8c97cf647869.js +0 -1
- package/assets/esri/core/workers/chunks/ce175801937e80e3c487.js +0 -1
- package/assets/esri/core/workers/chunks/d71836cf70b9604832f1.js +0 -1
- package/chunks/Button.js +0 -5
- package/chunks/ColorSet.js +0 -5
- package/chunks/DefaultTheme.js +0 -5
- package/chunks/LineSeries.js +0 -5
- package/chunks/ResponsiveTheme.js +0 -5
- package/chunks/Theme.js +0 -5
- package/chunks/Tick.js +0 -5
- package/chunks/Tooltip.js +0 -5
- package/chunks/ar.js +0 -5
- package/chunks/bg_BG.js +0 -5
- package/chunks/bs_BA.js +0 -5
- package/chunks/ca_ES.js +0 -5
- package/chunks/chartUtilsAm5.js +0 -5
- package/chunks/cs_CZ.js +0 -5
- package/chunks/da_DK.js +0 -5
- package/chunks/de_CH.js +0 -5
- package/chunks/de_DE.js +0 -5
- package/chunks/el_GR.js +0 -5
- package/chunks/en_CA.js +0 -5
- package/chunks/en_US.js +0 -5
- package/chunks/es_ES.js +0 -5
- package/chunks/et_EE.js +0 -5
- package/chunks/fi_FI.js +0 -5
- package/chunks/fr_FR.js +0 -5
- package/chunks/he_IL.js +0 -5
- package/chunks/hr_HR.js +0 -5
- package/chunks/hu_HU.js +0 -5
- package/chunks/id_ID.js +0 -5
- package/chunks/it_IT.js +0 -5
- package/chunks/ja_JP.js +0 -5
- package/chunks/ko_KR.js +0 -5
- package/chunks/lt_LT.js +0 -5
- package/chunks/lv_LV.js +0 -5
- package/chunks/nb_NO.js +0 -5
- package/chunks/nl_NL.js +0 -5
- package/chunks/pl_PL.js +0 -5
- package/chunks/pt_BR.js +0 -5
- package/chunks/pt_PT.js +0 -5
- package/chunks/ro_RO.js +0 -5
- package/chunks/ru_RU.js +0 -5
- package/chunks/sk_SK.js +0 -5
- package/chunks/sl_SL.js +0 -5
- package/chunks/sr_RS.js +0 -5
- package/chunks/sv_SE.js +0 -5
- package/chunks/th_TH.js +0 -5
- package/chunks/tr_TR.js +0 -5
- package/chunks/uk_UA.js +0 -5
- package/chunks/vi_VN.js +0 -5
- package/chunks/zh_Hans.js +0 -5
- package/chunks/zh_Hant.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[431],{431:(t,e,r)=>{r.d(e,{o6:()=>g,HY:()=>w,hx:()=>b,Jb:()=>v});var n=r(9318);function s(t,e,r){const n=e/3,s=new Uint32Array(r+1),i=new Uint32Array(r+1),u=(t,e)=>{t<e?s[t+1]++:i[e+1]++};for(let e=0;e<n;e++){const r=t[3*e],n=t[3*e+1],s=t[3*e+2];u(r,n),u(n,s),u(s,r)}let o=0,f=0;for(let t=0;t<r;t++){const e=s[t+1],r=i[t+1];s[t+1]=o,i[t+1]=f,o+=e,f+=r}const c=new Uint32Array(6*n),a=s[r],h=(t,e,r)=>{if(t<e){const n=s[t+1]++;c[2*n]=e,c[2*n+1]=r}else{const n=i[e+1]++;c[2*a+2*n]=t,c[2*a+2*n+1]=r}};for(let e=0;e<n;e++){const r=t[3*e],n=t[3*e+1],s=t[3*e+2];h(r,n,e),h(n,s,e),h(s,r,e)}const l=(t,e)=>{const r=2*t,n=e-t;for(let t=1;t<n;t++){const e=c[r+2*t],n=c[r+2*t+1];let s=t-1;for(;s>=0&&c[r+2*s]>e;s--)c[r+2*s+2]=c[r+2*s],c[r+2*s+3]=c[r+2*s+1];c[r+2*s+2]=e,c[r+2*s+3]=n}};for(let t=0;t<r;t++)l(s[t],s[t+1]),l(a+i[t],a+i[t+1]);const d=new Int32Array(3*n),p=(e,r)=>e===t[3*r]?0:e===t[3*r+1]?1:e===t[3*r+2]?2:-1,y=(t,e)=>{const r=p(t,e);d[3*e+r]=-1},E=(t,e,r,n)=>{const s=p(t,e);d[3*e+s]=n;const i=p(r,n);d[3*n+i]=e};for(let t=0;t<r;t++){let e=s[t];const r=s[t+1];let n=i[t];const u=i[t+1];for(;e<r&&n<u;){const r=c[2*e],s=c[2*a+2*n];r===s?(E(t,c[2*e+1],s,c[2*a+2*n+1]),e++,n++):r<s?(y(t,c[2*e+1]),e++):(y(s,c[2*a+2*n+1]),n++)}for(;e<r;)y(t,c[2*e+1]),e++;for(;n<u;)y(c[2*a+2*n],c[2*a+2*n+1]),n++}return d}var i=r(1843),u=r(3055),o=r(87811),f=r(38954),c=r(51850),a=r(34727);function h(t,e,r,n,s,i=2){const u=1/(Math.abs(r)+Math.abs(n)+Math.abs(s)),o=r*u,f=n*u,c=s<=0?(o>=0?1:-1)*(1-Math.abs(f)):o,a=s<=0?(f>=0?1:-1)*(1-Math.abs(o)):f,h=e*i;t[h]=l(c),t[h+1]=l(a)}function l(t){return(0,a.qE)(Math.round(32767*t),-32767,32767)}r(11868),r(34275);class d{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?B:m}write(t,e,r){S.seed=this._edgeHashFunction(r);const n=S.getIntRange(0,255),s=S.getIntRange(0,this.settings.variants-1),i=S.getFloat(),u=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,r.position0),t.position1.setVec(e,r.position1),t.componentIndex.set(e,r.componentIndex),t.variantOffset.set(e,n),t.variantStroke.set(e,s),t.variantExtension.set(e,u)}}const p=new Float32Array(6),y=new Uint32Array(p.buffer),E=new Uint32Array(1);function m(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],E[0]=31*(31*(31*(31*(31*(166811+y[0])+y[1])+y[2])+y[3])+y[4])+y[5],E[0]}function B(t){const e=p;e[0]=_(t.position0[0]),e[1]=_(t.position0[1]),e[2]=_(t.position0[2]),e[3]=_(t.position1[0]),e[4]=_(t.position1[1]),e[5]=_(t.position1[2]),E[0]=5381;for(let t=0;t<y.length;t++)E[0]=31*E[0]+y[t];return E[0]}const T=1e4;function _(t){return Math.round(t*T)/T}const M=(0,c.vt)(),S=new o.A;var A=r(93406);function g(t){const e=b(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return R.updateSettings(t.writerSettings),I.updateSettings(t.writerSettings),(0,A.K)(e,R,I)}function b(t,e,r,i){if(e){const e=s(r,i,t.count);return new N(r,i,e,t)}const o=(0,n.b)(t.buffer,t.stride/4,{originalIndices:r}),f=s(o.indices,i,o.uniqueCount);return{faces:o.indices,facesLength:o.indices.length,neighbors:f,vertices:u.I$.createView(o.buffer)}}class N{constructor(t,e,r,n){this.faces=t,this.facesLength=e,this.neighbors=r,this.vertices=n}}const R=new class{constructor(){this._commonWriter=new d}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return u.gr.createBuffer(t)}write(t,e,r){this._commonWriter.write(t,e,r),(0,f.f)(M,r.faceNormal0,r.faceNormal1),(0,f.n)(M,M);const{typedBuffer:n,typedBufferStride:s}=t.normalCompressed;h(n,e,M[0],M[1],M[2],s)}},I=new class{constructor(){this._commonWriter=new d}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return u.In.createBuffer(t)}write(t,e,r){this._commonWriter.write(t,e,r);{const{typedBuffer:n,typedBufferStride:s}=t.normalCompressed;h(n,e,r.faceNormal0[0],r.faceNormal0[1],r.faceNormal0[2],s)}{const{typedBuffer:n,typedBufferStride:s}=t.normal2Compressed;h(n,e,r.faceNormal1[0],r.faceNormal1[1],r.faceNormal1[2],s)}}},v=(0,i.BP)().vec3f("position0").vec3f("position1"),w=(0,i.BP)().vec3f("position0").vec3f("position1").u16("componentIndex")},620:(t,e,r)=>{r.d(e,{O_:()=>i,vA:()=>s}),r(48163),r(87317),(0,r(91829).vt)();class n{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function s(t,e="Assertion"){if(!t){const t=new Error(e).stack;throw new n(`${e} at ${t}`)}}function i(t,e,r,n){let s,i=(r[0]-t[0])/e[0],u=(n[0]-t[0])/e[0];i>u&&(s=i,i=u,u=s);let o=(r[1]-t[1])/e[1],f=(n[1]-t[1])/e[1];if(o>f&&(s=o,o=f,f=s),i>f||o>u)return!1;o>i&&(i=o),f<u&&(u=f);let c=(r[2]-t[2])/e[2],a=(n[2]-t[2])/e[2];return c>a&&(s=c,c=a,a=s),!(i>a||c>u||(a<u&&(u=a),u<0))}},1843:(t,e,r)=>{r.d(e,{BP:()=>h,l5:()=>l});var n=r(20498),s=r(13030),i=r(90239),u=r(4431),o=r(620),f=r(85079);class c{constructor(t,e){this.layout=t,this.buffer="number"==typeof e?new ArrayBuffer(e*t.stride):e;for(const e of t.fields.keys()){const r=t.fields.get(e);this[e]=new r.constructor(this.buffer,r.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(t,e){const r=this[t];return r&&r.elementCount===e.ElementCount&&r.elementType===e.ElementType?r:null}slice(t,e){return new c(this.layout,this.buffer.slice(t*this.stride,e*this.stride))}copyFrom(t,e=0,r=0,n=t.count){const s=this.stride;if(s%4==0){const i=new Uint32Array(t.buffer,e*s,n*s/4);new Uint32Array(this.buffer,r*s,n*s/4).set(i)}else{const i=new Uint8Array(t.buffer,e*s,n*s);new Uint8Array(this.buffer,r*s,n*s).set(i)}return this}get usedMemory(){return this.byteLength}dispose(){}}class a{constructor(t){this._stride=0,this._fields=new Map,t&&(this._stride=t.stride,t.fields.forEach(t=>this._fields.set(t[0],{...t[1],constructor:y(t[1].constructor)})))}freeze(){return this}get locations(){return(0,f.Xk)((0,u.U)(this))}vec2f16(t,e){return this._appendField(t,n.SX?s.ZD:s.gH,e),this}vec2f(t,e){return this._appendField(t,s.gH,e),this}vec2f64(t,e){return this._appendField(t,s.si,e),this}vec3f16(t,e){return this._appendField(t,n.SX?s.EC:s.xs,e),this}vec3f(t,e){return this._appendField(t,s.xs,e),this}vec3f64(t,e){return this._appendField(t,s.Xm,e),this}vec4f16(t,e){return this._appendField(t,n.SX?s.jz:s.Eq,e),this}vec4f(t,e){return this._appendField(t,s.Eq,e),this}vec4f64(t,e){return this._appendField(t,s.Aj,e),this}mat3f(t,e){return this._appendField(t,s.jZ,e),this}mat3f64(t,e){return this._appendField(t,s.j0,e),this}mat4f(t,e){return this._appendField(t,s.Sx,e),this}mat4f64(t,e){return this._appendField(t,s.E$,e),this}vec4u8(t,e){return this._appendField(t,s.XP,e),this}f16(t,e){return this._appendField(t,n.SX?s.XW:s.Y$,e),this}f32(t,e){return this._appendField(t,s.Y$,e),this}f64(t,e){return this._appendField(t,s.qB,e),this}u8(t,e){return this._appendField(t,s.SL,e),this}u16(t,e){return this._appendField(t,s.h,e),this}i8(t,e){return this._appendField(t,s.bf,e),this}vec2i8(t,e){return this._appendField(t,s.D6,e),this}vec2i16(t,e){return this._appendField(t,s.mJ,e),this}vec2u8(t,e){return this._appendField(t,s.LC,e),this}vec2u16(t,e){return this._appendField(t,s.Yi,e),this}vec4u16(t,e){return this._appendField(t,s.Uz,e),this}vec4i16(t,e){return this._appendField(t,s.E7,e),this}u32(t,e){return this._appendField(t,s.P,e),this}_appendField(t,e,r){this._fields.has(t)&&(0,o.vA)(!1,`${t} already added to vertex buffer layout`);const n=e.ElementCount*(0,i.GJ)(e.ElementType),s=this._stride;this._fields.set(t,{constructor:e,size:n,offset:s,optional:r}),this._alignFields()}_alignFields(){let t=0,e=1;this._fields.forEach(r=>{const n=(0,i.GJ)(r.constructor.ElementType);t=Math.floor((t+n-1)/n)*n,r.offset=t,t+=r.size,e=Math.max(e,n)}),t=Math.floor((t+e-1)/e)*e,this._stride=t}createBuffer(t){return new c(this,t)}createView(t){return new c(this,t)}clone(){const t=new a;return t._stride=this._stride,t._fields=new Map,this._fields.forEach((e,r)=>t._fields.set(r,e)),t.BufferType=this.BufferType,t}get stride(){return this._stride}get fields(){return this._fields}}function h(){return new a}class l{constructor(t){this.fields=new Array,t.fields.forEach((t,e)=>{const r={...t,constructor:p(t.constructor)};this.fields.push([e,r])}),this.stride=t.stride}}const d=[s.Y$,s.gH,s.xs,s.Eq,s.jZ,s.Sx,s.qB,s.si,s.Xm,s.Aj,s.j0,s.E$,s.SL,s.LC,s.eI,s.XP,s.h,s.Yi,s.nS,s.Uz,s.P,s.An,s.H$,s.ml,s.bf,s.D6,s.m8,s.TX,s.Qt,s.mJ,s.Vp,s.E7,s.My,s.UL,s.zD,s.Y4];function p(t){return`${t.ElementType}_${t.ElementCount}`}function y(t){return E.get(t)}const E=new Map;d.forEach(t=>E.set(p(t),t))},3055:(t,e,r)=>{r.d(e,{I$:()=>u,In:()=>a,gr:()=>c});var n=r(4431),s=r(1843),i=r(85079);const u=(0,s.BP)().vec3f("position").u16("componentIndex").freeze(),o=(0,s.BP)().vec2u8("sideness").freeze(),f=(0,n.U)(o),c=(0,s.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),a=(0,s.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),h=(0,n.U)(c,1),l=(0,n.U)(a,1);(0,i._u)([f,h]),(0,i._u)([f,l])},4431:(t,e,r)=>{r.d(e,{U:()=>i}),r(44208);var n=r(63907),s=r(74038);function i(t,e=0){const r=t.stride;return Array.from(t.fields.keys()).map(i=>{const u=t.fields.get(i),o=u.constructor.ElementCount,f=function(t){switch(t){case"u8":return n.pe.UNSIGNED_BYTE;case"u16":return n.pe.UNSIGNED_SHORT;case"u32":return n.pe.UNSIGNED_INT;case"i8":return n.pe.BYTE;case"i16":return n.pe.SHORT;case"i32":return n.pe.INT;case"f16":return n.pe.HALF_FLOAT;case"f32":return n.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(u.constructor.ElementType),c=u.offset,a=u.optional?.glNormalized??!1;return new s._(i,o,f,c,r,a,e)})}},9318:(t,e,r)=>{r.d(e,{b:()=>i});var n=r(34727),s=r(97146);function i(t,e,r){const i=Array.isArray(t),a=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,a*e),l=r?.minReduction??0,d=r?.originalIndices||null,p=d?d.length:0,y=r?.componentOffsets||null;let E=0;if(y)for(let t=0;t<y.length-1;t++){const e=y[t+1]-y[t];e>E&&(E=e)}else E=a;const m=Math.floor(1.1*E)+1;(null==c||c.length<2*m)&&(c=new Uint32Array((0,n.cU)(2*m)));for(let t=0;t<2*m;t++)c[t]=0;let B=0;const T=!!y&&!!d,_=T?p:a;let M=(0,s.my)(a);const S=new Uint32Array(p),A=1.96;let g=0!==l?Math.ceil(4*A*A/(l*l)*l*(1-l)):_,b=1,N=y?y[1]:_;for(let t=0;t<_;t++){if(t===g){const e=1-B/t;if(e+A*Math.sqrt(e*(1-e)/t)<l)return null;g*=2}if(t===N){for(let t=0;t<2*m;t++)c[t]=0;if(d)for(let t=y[b-1];t<y[b];t++)S[t]=M[d[t]];N=y[++b]}const r=T?d[t]:t,n=r*e,s=f(h,n,e);let i=s%m,o=B;for(;0!==c[2*i+1];){if(c[2*i]===s){const t=c[2*i+1]-1;if(u(h,n,t*e,e)){o=M[t];break}}i++,i>=m&&(i-=m)}o===B&&(c[2*i]=s,c[2*i+1]=r+1,B++),M[r]=o}if(0!==l&&1-B/a<l)return null;if(T){for(let t=y[b-1];t<S.length;t++)S[t]=M[d[t]];M=(0,s.uW)(S)}const R=i?new Array(B):new Uint32Array(B*e);B=0;for(let t=0;t<_;t++)M[t]===B&&(o(h,(T?d[t]:t)*e,R,B*e,e),B++);if(d&&!T){const t=new Uint32Array(p);for(let e=0;e<t.length;e++)t[e]=M[d[e]];M=(0,s.uW)(t)}return{buffer:Array.isArray(R)?R:R.buffer,indices:M,uniqueCount:B}}function u(t,e,r,n){for(let s=0;s<n;s++)if(t[e+s]!==t[r+s])return!1;return!0}function o(t,e,r,n,s){for(let i=0;i<s;i++)r[n+i]=t[e+i]}function f(t,e,r){let n=0;for(let s=0;s<r;s++)n=t[e+s]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},11868:(t,e,r)=>{r.d(e,{Wz:()=>i,oe:()=>s});var n=r(34275);function s(t,e=!1){return t<=n.y9?e?new Array(t).fill(0):new Array(t):new Float32Array(t)}function i(t){return(Array.isArray(t)?t.length:t.byteLength/8)<=n.y9?Array.from(t):new Float32Array(t)}},13030:(t,e,r)=>{r.d(e,{Y$:()=>y,XW:()=>p,qB:()=>N,Qt:()=>j,My:()=>Z,bf:()=>X,jZ:()=>S,j0:()=>A,Sx:()=>g,E$:()=>b,h:()=>x,P:()=>L,SL:()=>w,gH:()=>m,ZD:()=>E,si:()=>R,mJ:()=>k,UL:()=>J,D6:()=>q,Yi:()=>O,An:()=>D,LC:()=>F,xs:()=>T,EC:()=>B,Xm:()=>I,Vp:()=>$,zD:()=>Q,m8:()=>z,nS:()=>P,H$:()=>Y,eI:()=>U,Eq:()=>M,jz:()=>_,Aj:()=>v,E7:()=>W,Y4:()=>K,TX:()=>V,Uz:()=>G,ml:()=>H,XP:()=>C});var n=r(20498);class s{static{this.ElementCount=9}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=9;const i=this.TypedArrayConstructor;void 0===n&&(n=9*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;for(let t=0;t<9;++t)n[i++]=s[u++]}get buffer(){return this.typedBuffer.buffer}}class i{static{this.ElementCount=16}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=16;const i=this.TypedArrayConstructor;void 0===n&&(n=16*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){this.copyFromTypedBuffer(t,e.typedBuffer,r*e.typedBufferStride)}copyFromTypedBuffer(t,e,r){const n=this.typedBuffer;let s=t*this.typedBufferStride;for(let t=0;t<16;++t)n[s++]=e[r++]}get buffer(){return this.typedBuffer.buffer}}class u{static{this.ElementCount=1}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=1;const i=this.TypedArrayConstructor;void 0===n&&(n=i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.stride=n,this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}var o=r(37585);class f{static{this.ElementCount=2}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===n&&(n=2*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,o.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var c=r(38954);class a{static{this.ElementCount=3}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=3;const i=this.TypedArrayConstructor;void 0===n&&(n=3*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,c.i)(e,this.typedBuffer[t],this.typedBuffer[t+1],this.typedBuffer[t+2])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t]=n}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var h=r(87317);class l{static{this.ElementCount=4}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=4;const i=this.TypedArrayConstructor;void 0===n&&(n=4*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,h.s)(e,this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t++]=e[2],this.typedBuffer[t]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n,s){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t++]=n,this.typedBuffer[t]=s}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var d=r(620);class p extends u{constructor(t,e=0,r,s){(0,d.vA)(n.SX),super((0,n.pX)(),t,e,r,s),this.elementType="f16"}static{this.ElementType="f16"}}class y extends u{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}static{this.ElementType="f32"}}class E extends f{constructor(t,e=0,r,s){(0,d.vA)(n.SX),super((0,n.pX)(),t,e,r,s),this.elementType="f16"}slice(t,e){return this.sliceBuffer(E,t,e)}static{this.ElementType="f16"}}class m extends f{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(m,t,e)}static{this.ElementType="f32"}}class B extends a{constructor(t,e=0,r,s){(0,d.vA)(n.SX),super((0,n.pX)(),t,e,r,s),this.elementType="f16"}slice(t,e){return this.sliceBuffer(B,t,e)}static{this.ElementType="f16"}}class T extends a{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(T,t,e)}static fromTypedArray(t,e){return new T(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f32"}}class _ extends l{constructor(t,e=0,r,s){(0,d.vA)(n.SX),super((0,n.pX)(),t,e,r,s),this.elementType="f16"}slice(t,e){return this.sliceBuffer(_,t,e)}static{this.ElementType="f16"}}class M extends l{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(M,t,e)}static{this.ElementType="f32"}}class S extends s{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(S,t,e)}static{this.ElementType="f32"}}class A extends s{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(A,t,e)}static{this.ElementType="f64"}}class g extends i{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(g,t,e)}static{this.ElementType="f32"}}class b extends i{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(b,t,e)}static{this.ElementType="f64"}}class N extends u{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(N,t,e)}static{this.ElementType="f64"}}class R extends f{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(R,t,e)}static{this.ElementType="f64"}}class I extends a{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(I,t,e)}static fromTypedArray(t,e){return new I(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f64"}}class v extends l{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(v,t,e)}static{this.ElementType="f64"}}class w extends u{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(w,t,e)}static{this.ElementType="u8"}}class F extends f{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(F,t,e)}static{this.ElementType="u8"}}class U extends a{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(U,t,e)}static fromTypedArray(t,e){return new U(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="u8"}}class C extends l{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(C,t,e)}static{this.ElementType="u8"}}class x extends u{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(x,t,e)}static{this.ElementType="u16"}}class O extends f{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(O,t,e)}static{this.ElementType="u16"}}class P extends a{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(P,t,e)}static{this.ElementType="u16"}}class G extends l{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(G,t,e)}static{this.ElementType="u16"}}class L extends u{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(L,t,e)}static{this.ElementType="u32"}}class D extends f{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(D,t,e)}static{this.ElementType="u32"}}class Y extends a{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(Y,t,e)}static{this.ElementType="u32"}}class H extends l{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(H,t,e)}static{this.ElementType="u32"}}class X extends u{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(X,t,e)}static{this.ElementType="i8"}}class q extends f{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(q,t,e)}static{this.ElementType="i8"}}class z extends a{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(z,t,e)}static{this.ElementType="i8"}}class V extends l{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(V,t,e)}static{this.ElementType="i8"}}class j extends u{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(j,t,e)}static{this.ElementType="i16"}}class k extends f{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(k,t,e)}static{this.ElementType="i16"}}class $ extends a{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer($,t,e)}static{this.ElementType="i16"}}class W extends l{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(W,t,e)}static{this.ElementType="i16"}}class Z extends u{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(Z,t,e)}static{this.ElementType="i32"}}class J extends f{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(J,t,e)}static{this.ElementType="i32"}}class Q extends a{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(Q,t,e)}static{this.ElementType="i32"}}class K extends l{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(K,t,e)}static{this.ElementType="i32"}}},20498:(t,e,r)=>{r.d(e,{SX:()=>i,pX:()=>s});let n=globalThis.Float16Array;function s(){return n}let i=!!n},34304:(t,e,r)=>{r.d(e,{DF:()=>f,FD:()=>s,Ov:()=>i,ct:()=>c});let n=1e-6;function s(){return n}const i=Math.random,u=Math.PI/180,o=180/Math.PI;function f(t){return t*u}function c(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:s,setEpsilon:function(t){n=t},toDegree:c,toRadian:f},Symbol.toStringTag,{value:"Module"}))},34727:(t,e,r)=>{r.d(e,{$8:()=>A,Cc:()=>u,Hx:()=>y,Io:()=>M,KJ:()=>c,OS:()=>N,Sp:()=>l,XM:()=>a,YN:()=>h,ZH:()=>p,b6:()=>S,cU:()=>s,gg:()=>d,hs:()=>o,kU:()=>f,or:()=>b,pF:()=>I,pq:()=>R,qE:()=>i});const n=new Float32Array(1);function s(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,r){return Math.min(Math.max(t,e),r)}function u(t,e,r){return t+(e-t)*r}function o(t,e,r,n,s){return u(n,s,(t-e)/(r-e))}function f(t){return t*Math.PI/180}function c(t){return 180*t/Math.PI}function a(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function l(t,e,r=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=r}function d(t,e,r=1e-6){return!l(t,e,r)&&t>e}function p(t,e,r=1e-6){return!l(t,e,r)&&t<e}function y(t,e,r=1e-6){return l(t,e,r)||t>e}const E=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function m(t){return E.setFloat64(0,t),E.getBigInt64(0)}const B=1000000n,T=_(1);function _(t){const e=m(t=Math.abs(t)),r=function(t){return E.setBigInt64(0,t),E.getFloat64(0)}(e<=B?B:e-B);return Math.abs(t-r)}function M(t,e,r=T){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=r&&_(Math.min(Math.abs(t),Math.abs(e)))<r)return Math.abs(t-e)<=r;const n=m(t),s=m(e);return n<0==s<0&&!((n<s?s-n:n-s)>B)}function S(t,e,r=1e-6){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;const n=Math.abs(t-e),s=Math.abs(t),i=Math.abs(e);if(0===t||0===e||s<1e-12&&i<1e-12){if(n>.01*r)return!1}else if(n/(s+i)>r)return!1;return!0}function A(t){return g(Math.max(-R,Math.min(t,R)))}function g(t){return n[0]=t,n[0]}function b(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],n=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(l(e,1)&&l(r,1)&&l(n,1))}function N(t,e){return(t%e+e)%e}const R=g(34028234663852886e22);function I(t,e,r){if(void 0===r||0===+r)return Math[t](e);if(e=+e,r=+r,isNaN(e)||"number"!=typeof r||r%1!=0)return NaN;let n=e.toString().split("e");return n=(e=Math[t](+(n[0]+"e"+(n[1]?+n[1]-r:-r)))).toString().split("e"),+(n[0]+"e"+(n[1]?+n[1]+r:r))}},37585:(t,e,r)=>{r.d(e,{C:()=>s,Cc:()=>E,Io:()=>h,S8:()=>y,WQ:()=>u,aI:()=>_,e$:()=>B,hG:()=>l,hZ:()=>i,hs:()=>a,jb:()=>S,l0:()=>m,t2:()=>T});var n=r(34304);function s(t,e){return t[0]=e[0],t[1]=e[1],t}function i(t,e,r){return t[0]=e,t[1]=r,t}function u(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function o(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function f(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function c(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function a(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function h(t,e){const r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}function l(t,e){const r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n}function d(t){const e=t[0],r=t[1];return Math.sqrt(e*e+r*r)}function p(t){const e=t[0],r=t[1];return e*e+r*r}function y(t,e){const r=e[0],n=e[1];let s=r*r+n*n;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s),t}function E(t,e,r,n){const s=e[0],i=e[1];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t}function m(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s+r[4],t[1]=r[1]*n+r[3]*s+r[5],t}function B(t,e,r,n){const s=e[0]-r[0],i=e[1]-r[1],u=Math.sin(n),o=Math.cos(n);return t[0]=s*o-i*u+r[0],t[1]=s*u+i*o+r[1],t}function T(t,e){return t[0]===e[0]&&t[1]===e[1]}function _(t,e){const r=t[0],s=t[1],i=e[0],u=e[1],o=(0,n.FD)();return Math.abs(r-i)<=o*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-u)<=o*Math.max(1,Math.abs(s),Math.abs(u))}const M=d,S=o,A=f,g=c,b=h,N=l,R=p;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){const r=t[0],n=t[1],s=e[0],i=e[1];let u=r*r+n*n;u>0&&(u=1/Math.sqrt(u));let o=s*s+i*i;o>0&&(o=1/Math.sqrt(o));const f=(r*s+n*i)*u*o;return f>1?0:f<-1?Math.PI:Math.acos(f)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:s,cross:function(t,e,r){const n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},dist:b,distance:h,div:g,divide:c,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:_,exactEquals:T,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:M,length:d,lerp:E,max:function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},min:function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},mul:A,multiply:f,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:y,projectAndScale:function(t,e,r,n,s){let i=e[0]-r[0],u=e[1]-r[1];const o=(n[0]*i+n[1]*u)*(s-1);return i=n[0]*o,u=n[1]*o,t[0]=e[0]+i,t[1]=e[1]+u,t},random:function(t,e=1){const r=2*(0,n.Ov)()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},rotate:B,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:a,scaleAndAdd:function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},set:i,sqrDist:N,sqrLen:R,squaredDistance:l,squaredLength:p,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:S,subtract:o,transformMat2:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t},transformMat2d:m,transformMat3:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[3]*s+r[6],t[1]=r[1]*n+r[4]*s+r[7],t},transformMat4:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[4]*s+r[12],t[1]=r[1]*n+r[5]*s+r[13],t}},Symbol.toStringTag,{value:"Module"}))},38954:(t,e,r)=>{r.d(e,{A:()=>p,B:()=>d,C:()=>a,D:()=>h,E:()=>C,F:()=>G,H:()=>D,a:()=>x,b:()=>m,c:()=>u,d:()=>c,e:()=>g,f:()=>f,g:()=>E,h:()=>b,i:()=>o,j:()=>B,k:()=>_,l:()=>i,m:()=>N,n:()=>A,o:()=>I,q:()=>U,r:()=>S,s:()=>T,t:()=>R,u:()=>M,v:()=>v,w:()=>l,x:()=>L,y:()=>Y,z:()=>y});var n=r(51850),s=r(34304);function i(t){const e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function f(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function c(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function a(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function h(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function l(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function y(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function E(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function m(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}function B(t,e){const r=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(r*r+n*n+s*s)}function T(t,e){const r=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return r*r+n*n+s*s}function _(t){const e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}function M(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function S(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function A(t,e){const r=e[0],n=e[1],s=e[2];let i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function b(t,e,r){const n=e[0],s=e[1],i=e[2],u=r[0],o=r[1],f=r[2];return t[0]=s*f-i*o,t[1]=i*u-n*f,t[2]=n*o-s*u,t}function N(t,e,r,n){const s=e[0],i=e[1],u=e[2];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t[2]=u+n*(r[2]-u),t}function R(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=r[0]*n+r[4]*s+r[8]*i+r[12],t[1]=r[1]*n+r[5]*s+r[9]*i+r[13],t[2]=r[2]*n+r[6]*s+r[10]*i+r[14],t}function I(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=n*r[0]+s*r[3]+i*r[6],t[1]=n*r[1]+s*r[4]+i*r[7],t[2]=n*r[2]+s*r[5]+i*r[8],t}function v(t,e,r){const n=r[0],s=r[1],i=r[2],u=r[3],o=e[0],f=e[1],c=e[2],a=s*c-i*f,h=i*o-n*c,l=n*f-s*o,d=s*l-i*h,p=i*a-n*l,y=n*h-s*a,E=2*u;return t[0]=o+a*E+2*d,t[1]=f+h*E+2*p,t[2]=c+l*E+2*y,t}const w=(0,n.vt)(),F=(0,n.vt)();function U(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function C(t,e,r){const n=r[0]-e[0],s=r[1]-e[1],i=r[2]-e[2];let u=n*n+s*s+i*i;return u>0?(u=1/Math.sqrt(u),t[0]=n*u,t[1]=s*u,t[2]=i*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const x=c,O=a,P=h,G=B,L=T,D=i,Y=_;Object.freeze(Object.defineProperty({__proto__:null,abs:l,add:f,angle:function(t,e){A(w,t),A(F,e);const r=g(w,F);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,e,r,n,s,i){const u=1-i,o=u*u,f=i*i,c=o*u,a=3*i*o,h=3*f*u,l=f*i;return t[0]=e[0]*c+r[0]*a+n[0]*h+s[0]*l,t[1]=e[1]*c+r[1]*a+n[1]*h+s[1]*l,t[2]=e[2]*c+r[2]*a+n[2]*h+s[2]*l,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:u,cross:b,crossAndNormalize:function(t,e,r){const n=e[0],s=e[1],i=e[2],u=r[0],o=r[1],f=r[2],c=s*f-i*o,a=i*u-n*f,h=n*o-s*u,l=Math.sqrt(c*c+a*a+h*h);return t[0]=c/l,t[1]=a/l,t[2]=h/l,t},direction:C,dist:G,distance:B,div:P,divide:h,dot:g,equals:function(t,e){if(t===e)return!0;const r=t[0],n=t[1],i=t[2],u=e[0],o=e[1],f=e[2],c=(0,s.FD)();return Math.abs(r-u)<=c*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-o)<=c*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-f)<=c*Math.max(1,Math.abs(i),Math.abs(f))},exactEquals:U,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,r,n,s,i){const u=i*i,o=u*(2*i-3)+1,f=u*(i-2)+i,c=u*(i-1),a=u*(3-2*i);return t[0]=e[0]*o+r[0]*f+n[0]*c+s[0]*a,t[1]=e[1]*o+r[1]*f+n[1]*c+s[1]*a,t[2]=e[2]*o+r[2]*f+n[2]*c+s[2]*a,t},inverse:S,len:D,length:i,lerp:N,max:y,min:p,mul:O,multiply:a,negate:M,normalize:A,random:function(t,e=1){const r=s.Ov,n=2*r()*Math.PI,i=2*r()-1,u=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*u,t[1]=Math.sin(n)*u,t[2]=i*e,t},rotateX:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateY:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateZ:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:E,scaleAndAdd:m,set:o,sign:d,sqrDist:L,sqrLen:Y,squaredDistance:T,squaredLength:_,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:x,subtract:c,transformMat3:I,transformMat4:R,transformQuat:v},Symbol.toStringTag,{value:"Module"}))},48163:(t,e,r)=>{function n(){return[0,0]}function s(t){return[t[0],t[1]]}function i(t,e){return[t,e]}function u(){return i(1,1)}function o(){return i(1,0)}function f(){return i(0,1)}r.d(e,{Un:()=>c,fA:()=>i,o8:()=>s,vt:()=>n});const c=u(),a=o(),h=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:a,UNIT_Y:h,ZEROS:[0,0],clone:s,create:n,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){const r=Math.min(2,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e},fromValues:i,ones:u,unitX:o,unitY:f,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850:(t,e,r)=>{function n(){return[0,0,0]}function s(t){return[t[0],t[1],t[2]]}function i(t,e,r){return[t,e,r]}function u(t,e,r){return[t,e,r]}function o(t,e=[0,0,0]){const r=Math.min(3,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e}function f(){return i(1,1,1)}function c(){return i(1,0,0)}function a(){return i(0,1,0)}function h(){return i(0,0,1)}r.d(e,{CN:()=>u,Cb:()=>E,Cw:()=>p,JP:()=>y,Un:()=>d,ci:()=>o,fA:()=>i,o8:()=>s,uY:()=>l,vt:()=>n});const l=[0,0,0],d=f(),p=c(),y=a(),E=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:p,UNIT_Y:y,UNIT_Z:E,ZEROS:l,clone:s,create:n,freeze:u,fromArray:o,fromValues:i,ones:f,unitX:c,unitY:a,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},63907:(t,e,r)=>{r.d(e,{CQ:()=>y,Fq:()=>d,H0:()=>i,SB:()=>f,WR:()=>n,XN:()=>u,iE:()=>o,ld:()=>c,nI:()=>p,pe:()=>s,r6:()=>h,vt:()=>a,yI:()=>l});const n={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},s={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},i={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},u=Object.values(i),o={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},f={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},c={FLOAT:s.FLOAT,UNSIGNED_BYTE:s.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:s.BYTE,UNSIGNED_SHORT:s.UNSIGNED_SHORT,SHORT:s.SHORT,UNSIGNED_INT:s.UNSIGNED_INT,INT:s.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},a={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},h=36064,l=36065,d=36066,p=33306,y={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},74038:(t,e,r)=>{r.d(e,{_:()=>n});class n{constructor(t,e,r,n,s,i=!1,u=0){this.name=t,this.count=e,this.type=r,this.offset=n,this.stride=s,this.normalized=i,this.divisor=u}}},85079:(t,e,r)=>{function n(t){let e=0;return new Map(t.map(({name:t,count:r})=>{const n=[t,e];return 16===r?e+=4:9===r?e+=3:++e,n}))}function s(t){const e=new Map;let r=0;return t.forEach(t=>t.forEach(({name:t,count:n})=>{e.set(t,r),16===n?r+=4:9===n?r+=3:++r})),e}r.d(e,{Xk:()=>n,_u:()=>s})},90239:(t,e,r)=>{function n(t){switch(t){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(e,{GJ:()=>n})},93406:(t,e,r)=>{r.d(e,{K:()=>f});var n=r(34727),s=r(15142),i=r(38954),u=r(51850);const o=-1;function f(t,e,r){const n=t.vertices.position,s=t.vertices.componentIndex,u=y.position0,f=y.position1,h=y.faceNormal0,d=y.faceNormal1,{edges:p,normals:E}=a(t),m=p.length/4,B=e.allocate(m);let T=0;const _=m,A=r?.allocate(_);let b=0,N=0,R=0;l.length=0;for(let t=0;t<m;++t){const e=4*t;n.getVec(p.data[e],u),n.getVec(p.data[e+1],f);const r=l.pushNew();r.index=4*t,r.length=(0,i.j)(u,f)}l.sort((t,e)=>e.length-t.length);const I=new Array,v=new Array;l.forAll(({length:t,index:a})=>{const l=p.data[a],m=p.data[a+1],_=p.data[a+2],w=p.data[a+3],F=w===o;if(n.getVec(l,u),n.getVec(m,f),F){const t=3*_;(0,i.i)(h,E.data[t],E.data[t+1],E.data[t+2]),(0,i.c)(d,h),y.componentIndex=s.get(l),y.cosAngle=(0,i.e)(h,d)}else{let t=3*_;if((0,i.i)(h,E.data[t],E.data[t+1],E.data[t+2]),t=3*w,(0,i.i)(d,E.data[t],E.data[t+1],E.data[t+2]),y.componentIndex=s.get(l),y.cosAngle=(0,i.e)(h,d),function(t,e){return t.cosAngle>e}(y,S))return;y.cosAngle<-.9999&&(0,i.c)(d,h)}N+=t,R++,F||function(t,e){return t.cosAngle<e}(y,g)?(e.write(B,T++,y),I.push(t)):c(y,M)&&(A&&r&&r.write(A,b++,y),v.push(t))});const w=new Float32Array(I.reverse()),F=new Float32Array(v.reverse()),U=A&&r?{instancesData:A.slice(0,b),lodInfo:{lengths:F}}:void 0;return{regular:{instancesData:B.slice(0,T),lodInfo:{lengths:w}},silhouette:U,averageEdgeLength:N/R}}function c(t,e){const r=(0,n.XM)(t.cosAngle);return(0,i.E)(m,t.position1,t.position0),r*((0,i.e)((0,i.h)(E,t.faceNormal0,t.faceNormal1),m)>0?-1:1)>e}function a(t){const e=t.faces.length/3,r=t.faces,n=t.neighbors,s=t.vertices.position;d.length=p.length=0;for(let t=0;t<e;t++){const e=3*t,u=n[e],f=n[e+1],c=n[e+2],a=r[e],h=r[e+1],l=r[e+2];s.getVec(a,B),s.getVec(h,T),s.getVec(l,_),(0,i.d)(T,T,B),(0,i.d)(_,_,B),(0,i.h)(B,T,_),(0,i.n)(B,B),p.pushArray(B),(u===o||a<h)&&(d.push(a),d.push(h),d.push(t),d.push(u)),(f===o||h<l)&&(d.push(h),d.push(l),d.push(t),d.push(f)),(c===o||l<a)&&(d.push(l),d.push(a),d.push(t),d.push(c))}return{edges:d,normals:p}}class h{constructor(){this.index=0,this.length=0}}const l=new s.A({allocator:t=>t||new h,deallocator:null}),d=new s.A({deallocator:null}),p=new s.A({deallocator:null}),y=new class{constructor(){this.position0=(0,u.vt)(),this.position1=(0,u.vt)(),this.faceNormal0=(0,u.vt)(),this.faceNormal1=(0,u.vt)(),this.componentIndex=0,this.cosAngle=0}},E=(0,u.vt)(),m=(0,u.vt)(),B=(0,u.vt)(),T=(0,u.vt)(),_=(0,u.vt)(),M=(0,n.kU)(4),S=Math.cos(M),A=(0,n.kU)(35),g=Math.cos(A)},97146:(t,e,r)=>{r.d(e,{Dg:()=>i,my:()=>u,tM:()=>a,uW:()=>s});var n=r(34275);function s(t){return i(t,!0)}function i(t,e){if(Array.isArray(t)){if(t.length<n.y9)return t}else if(t.length<n.y9)return Array.from(t);let r=!0,s=!0;return t.some((t,e)=>(r=r&&0===t,s=s&&t===e,!r&&!s)),r?function(t){if(1===t)return f;if(t<n.y9)return new Array(t).fill(0);if(t>l.length){const e=Math.max(2*l.length,t);l=new Uint8Array(e)}return new Uint8Array(l.buffer,0,t)}(t.length):s?a(t.length):(0,n.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,e){for(const r of t){if(r>=65536)return(0,n.iu)(t)?t:new Uint32Array(t);r>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}(t,!e)}function u(t){return t<=n.y9?new Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}let o=h(131072);const f=[0],c=(()=>{const t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function a(t){return 1===t?f:t<n.y9?Array.from(new Uint16Array(c.buffer,0,t)):t<c.length?new Uint16Array(c.buffer,0,t):(t>o.length&&(o=h(Math.max(2*o.length,t))),new Uint32Array(o.buffer,0,t))}function h(t){const e=new Uint32Array(t);for(let t=0;t<e.length;t++)e[t]=t;return e}let l=new Uint8Array(65536)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[431],{431:(t,e,r)=>{r.d(e,{o6:()=>g,HY:()=>w,hx:()=>b,Jb:()=>v});var n=r(9318);function s(t,e,r){const n=e/3,s=new Uint32Array(r+1),i=new Uint32Array(r+1),u=(t,e)=>{t<e?s[t+1]++:i[e+1]++};for(let e=0;e<n;e++){const r=t[3*e],n=t[3*e+1],s=t[3*e+2];u(r,n),u(n,s),u(s,r)}let o=0,f=0;for(let t=0;t<r;t++){const e=s[t+1],r=i[t+1];s[t+1]=o,i[t+1]=f,o+=e,f+=r}const c=new Uint32Array(6*n),a=s[r],h=(t,e,r)=>{if(t<e){const n=s[t+1]++;c[2*n]=e,c[2*n+1]=r}else{const n=i[e+1]++;c[2*a+2*n]=t,c[2*a+2*n+1]=r}};for(let e=0;e<n;e++){const r=t[3*e],n=t[3*e+1],s=t[3*e+2];h(r,n,e),h(n,s,e),h(s,r,e)}const l=(t,e)=>{const r=2*t,n=e-t;for(let t=1;t<n;t++){const e=c[r+2*t],n=c[r+2*t+1];let s=t-1;for(;s>=0&&c[r+2*s]>e;s--)c[r+2*s+2]=c[r+2*s],c[r+2*s+3]=c[r+2*s+1];c[r+2*s+2]=e,c[r+2*s+3]=n}};for(let t=0;t<r;t++)l(s[t],s[t+1]),l(a+i[t],a+i[t+1]);const d=new Int32Array(3*n),p=(e,r)=>e===t[3*r]?0:e===t[3*r+1]?1:e===t[3*r+2]?2:-1,y=(t,e)=>{const r=p(t,e);d[3*e+r]=-1},E=(t,e,r,n)=>{const s=p(t,e);d[3*e+s]=n;const i=p(r,n);d[3*n+i]=e};for(let t=0;t<r;t++){let e=s[t];const r=s[t+1];let n=i[t];const u=i[t+1];for(;e<r&&n<u;){const r=c[2*e],s=c[2*a+2*n];r===s?(E(t,c[2*e+1],s,c[2*a+2*n+1]),e++,n++):r<s?(y(t,c[2*e+1]),e++):(y(s,c[2*a+2*n+1]),n++)}for(;e<r;)y(t,c[2*e+1]),e++;for(;n<u;)y(c[2*a+2*n],c[2*a+2*n+1]),n++}return d}var i=r(1843),u=r(3055),o=r(87811),f=r(38954),c=r(51850),a=r(34727);function h(t,e,r,n,s,i=2){const u=1/(Math.abs(r)+Math.abs(n)+Math.abs(s)),o=r*u,f=n*u,c=s<=0?(o>=0?1:-1)*(1-Math.abs(f)):o,a=s<=0?(f>=0?1:-1)*(1-Math.abs(o)):f,h=e*i;t[h]=l(c),t[h+1]=l(a)}function l(t){return(0,a.qE)(Math.round(32767*t),-32767,32767)}r(11868),r(34275);class d{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?B:m}write(t,e,r){S.seed=this._edgeHashFunction(r);const n=S.getIntRange(0,255),s=S.getIntRange(0,this.settings.variants-1),i=S.getFloat(),u=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,r.position0),t.position1.setVec(e,r.position1),t.componentIndex.set(e,r.componentIndex),t.variantOffset.set(e,n),t.variantStroke.set(e,s),t.variantExtension.set(e,u)}}const p=new Float32Array(6),y=new Uint32Array(p.buffer),E=new Uint32Array(1);function m(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],E[0]=31*(31*(31*(31*(31*(166811+y[0])+y[1])+y[2])+y[3])+y[4])+y[5],E[0]}function B(t){const e=p;e[0]=_(t.position0[0]),e[1]=_(t.position0[1]),e[2]=_(t.position0[2]),e[3]=_(t.position1[0]),e[4]=_(t.position1[1]),e[5]=_(t.position1[2]),E[0]=5381;for(let t=0;t<y.length;t++)E[0]=31*E[0]+y[t];return E[0]}const T=1e4;function _(t){return Math.round(t*T)/T}const M=(0,c.vt)(),S=new o.A;var A=r(93406);function g(t){const e=b(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return R.updateSettings(t.writerSettings),I.updateSettings(t.writerSettings),(0,A.K)(e,R,I)}function b(t,e,r,i){if(e){const e=s(r,i,t.count);return new N(r,i,e,t)}const o=(0,n.b)(t.buffer,t.stride/4,{originalIndices:r}),f=s(o.indices,i,o.uniqueCount);return{faces:o.indices,facesLength:o.indices.length,neighbors:f,vertices:u.I$.createView(o.buffer)}}class N{constructor(t,e,r,n){this.faces=t,this.facesLength=e,this.neighbors=r,this.vertices=n}}const R=new class{constructor(){this._commonWriter=new d}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return u.gr.createBuffer(t)}write(t,e,r){this._commonWriter.write(t,e,r),(0,f.f)(M,r.faceNormal0,r.faceNormal1),(0,f.n)(M,M);const{typedBuffer:n,typedBufferStride:s}=t.normalCompressed;h(n,e,M[0],M[1],M[2],s)}},I=new class{constructor(){this._commonWriter=new d}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return u.In.createBuffer(t)}write(t,e,r){this._commonWriter.write(t,e,r);{const{typedBuffer:n,typedBufferStride:s}=t.normalCompressed;h(n,e,r.faceNormal0[0],r.faceNormal0[1],r.faceNormal0[2],s)}{const{typedBuffer:n,typedBufferStride:s}=t.normal2Compressed;h(n,e,r.faceNormal1[0],r.faceNormal1[1],r.faceNormal1[2],s)}}},v=(0,i.BP)().vec3f("position0").vec3f("position1"),w=(0,i.BP)().vec3f("position0").vec3f("position1").u16("componentIndex")},620:(t,e,r)=>{r.d(e,{O_:()=>i,vA:()=>s}),r(48163),r(87317),(0,r(91829).vt)();class n{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function s(t,e="Assertion"){if(!t){const t=new Error(e).stack;throw new n(`${e} at ${t}`)}}function i(t,e,r,n){let s,i=(r[0]-t[0])/e[0],u=(n[0]-t[0])/e[0];i>u&&(s=i,i=u,u=s);let o=(r[1]-t[1])/e[1],f=(n[1]-t[1])/e[1];if(o>f&&(s=o,o=f,f=s),i>f||o>u)return!1;o>i&&(i=o),f<u&&(u=f);let c=(r[2]-t[2])/e[2],a=(n[2]-t[2])/e[2];return c>a&&(s=c,c=a,a=s),!(i>a||c>u||(a<u&&(u=a),u<0))}},1843:(t,e,r)=>{r.d(e,{BP:()=>h,l5:()=>l});var n=r(20498),s=r(13030),i=r(90239),u=r(4431),o=r(620),f=r(85079);class c{constructor(t,e){this.layout=t,this.buffer="number"==typeof e?new ArrayBuffer(e*t.stride):e;for(const e of t.fields.keys()){const r=t.fields.get(e);this[e]=new r.constructor(this.buffer,r.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(t,e){const r=this[t];return r&&r.elementCount===e.ElementCount&&r.elementType===e.ElementType?r:null}slice(t,e){return new c(this.layout,this.buffer.slice(t*this.stride,e*this.stride))}copyFrom(t,e=0,r=0,n=t.count){const s=this.stride;if(s%4==0){const i=new Uint32Array(t.buffer,e*s,n*s/4);new Uint32Array(this.buffer,r*s,n*s/4).set(i)}else{const i=new Uint8Array(t.buffer,e*s,n*s);new Uint8Array(this.buffer,r*s,n*s).set(i)}return this}get usedMemory(){return this.byteLength}dispose(){}}class a{constructor(t){this._stride=0,this._fields=new Map,t&&(this._stride=t.stride,t.fields.forEach(t=>this._fields.set(t[0],{...t[1],constructor:y(t[1].constructor)})))}freeze(){return this}get locations(){return(0,f.Xk)((0,u.U)(this))}vec2f16(t,e){return this._appendField(t,n.SX?s.ZD:s.gH,e),this}vec2f(t,e){return this._appendField(t,s.gH,e),this}vec2f64(t,e){return this._appendField(t,s.si,e),this}vec3f16(t,e){return this._appendField(t,n.SX?s.EC:s.xs,e),this}vec3f(t,e){return this._appendField(t,s.xs,e),this}vec3f64(t,e){return this._appendField(t,s.Xm,e),this}vec4f16(t,e){return this._appendField(t,n.SX?s.jz:s.Eq,e),this}vec4f(t,e){return this._appendField(t,s.Eq,e),this}vec4f64(t,e){return this._appendField(t,s.Aj,e),this}mat3f(t,e){return this._appendField(t,s.jZ,e),this}mat3f64(t,e){return this._appendField(t,s.j0,e),this}mat4f(t,e){return this._appendField(t,s.Sx,e),this}mat4f64(t,e){return this._appendField(t,s.E$,e),this}vec4u8(t,e){return this._appendField(t,s.XP,e),this}f16(t,e){return this._appendField(t,n.SX?s.XW:s.Y$,e),this}f32(t,e){return this._appendField(t,s.Y$,e),this}f64(t,e){return this._appendField(t,s.qB,e),this}u8(t,e){return this._appendField(t,s.SL,e),this}u16(t,e){return this._appendField(t,s.h,e),this}i8(t,e){return this._appendField(t,s.bf,e),this}vec2i8(t,e){return this._appendField(t,s.D6,e),this}vec2i16(t,e){return this._appendField(t,s.mJ,e),this}vec2u8(t,e){return this._appendField(t,s.LC,e),this}vec2u16(t,e){return this._appendField(t,s.Yi,e),this}vec4u16(t,e){return this._appendField(t,s.Uz,e),this}vec4i16(t,e){return this._appendField(t,s.E7,e),this}u32(t,e){return this._appendField(t,s.P,e),this}_appendField(t,e,r){this._fields.has(t)&&(0,o.vA)(!1,`${t} already added to vertex buffer layout`);const n=e.ElementCount*(0,i.GJ)(e.ElementType),s=this._stride;this._fields.set(t,{constructor:e,size:n,offset:s,optional:r}),this._alignFields()}_alignFields(){let t=0,e=1;this._fields.forEach(r=>{const n=(0,i.GJ)(r.constructor.ElementType);t=Math.floor((t+n-1)/n)*n,r.offset=t,t+=r.size,e=Math.max(e,n)}),t=Math.floor((t+e-1)/e)*e,this._stride=t}createBuffer(t){return new c(this,t)}createView(t){return new c(this,t)}clone(){const t=new a;return t._stride=this._stride,t._fields=new Map,this._fields.forEach((e,r)=>t._fields.set(r,e)),t.BufferType=this.BufferType,t}get stride(){return this._stride}get fields(){return this._fields}}function h(){return new a}class l{constructor(t){this.fields=new Array,t.fields.forEach((t,e)=>{const r={...t,constructor:p(t.constructor)};this.fields.push([e,r])}),this.stride=t.stride}}const d=[s.Y$,s.gH,s.xs,s.Eq,s.jZ,s.Sx,s.qB,s.si,s.Xm,s.Aj,s.j0,s.E$,s.SL,s.LC,s.eI,s.XP,s.h,s.Yi,s.nS,s.Uz,s.P,s.An,s.H$,s.ml,s.bf,s.D6,s.m8,s.TX,s.Qt,s.mJ,s.Vp,s.E7,s.My,s.UL,s.zD,s.Y4];function p(t){return`${t.ElementType}_${t.ElementCount}`}function y(t){return E.get(t)}const E=new Map;d.forEach(t=>E.set(p(t),t))},3055:(t,e,r)=>{r.d(e,{I$:()=>u,In:()=>a,gr:()=>c});var n=r(4431),s=r(1843),i=r(85079);const u=(0,s.BP)().vec3f("position").u16("componentIndex").freeze(),o=(0,s.BP)().vec2u8("sideness").freeze(),f=(0,n.U)(o),c=(0,s.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),a=(0,s.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),h=(0,n.U)(c,1),l=(0,n.U)(a,1);(0,i._u)([f,h]),(0,i._u)([f,l])},4431:(t,e,r)=>{r.d(e,{U:()=>i}),r(44208);var n=r(63907),s=r(74038);function i(t,e=0){const r=t.stride;return Array.from(t.fields.keys()).map(i=>{const u=t.fields.get(i),o=u.constructor.ElementCount,f=function(t){switch(t){case"u8":return n.pe.UNSIGNED_BYTE;case"u16":return n.pe.UNSIGNED_SHORT;case"u32":return n.pe.UNSIGNED_INT;case"i8":return n.pe.BYTE;case"i16":return n.pe.SHORT;case"i32":return n.pe.INT;case"f16":return n.pe.HALF_FLOAT;case"f32":return n.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(u.constructor.ElementType),c=u.offset,a=u.optional?.glNormalized??!1;return new s._(i,o,f,c,r,a,e)})}},9318:(t,e,r)=>{r.d(e,{b:()=>i});var n=r(34727),s=r(97146);function i(t,e,r){const i=Array.isArray(t),a=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,a*e),l=r?.minReduction??0,d=r?.originalIndices||null,p=d?d.length:0,y=r?.componentOffsets||null;let E=0;if(y)for(let t=0;t<y.length-1;t++){const e=y[t+1]-y[t];e>E&&(E=e)}else E=a;const m=Math.floor(1.1*E)+1;(null==c||c.length<2*m)&&(c=new Uint32Array((0,n.cU)(2*m)));for(let t=0;t<2*m;t++)c[t]=0;let B=0;const T=!!y&&!!d,_=T?p:a;let M=(0,s.my)(a);const S=new Uint32Array(p),A=1.96;let g=0!==l?Math.ceil(4*A*A/(l*l)*l*(1-l)):_,b=1,N=y?y[1]:_;for(let t=0;t<_;t++){if(t===g){const e=1-B/t;if(e+A*Math.sqrt(e*(1-e)/t)<l)return null;g*=2}if(t===N){for(let t=0;t<2*m;t++)c[t]=0;if(d)for(let t=y[b-1];t<y[b];t++)S[t]=M[d[t]];N=y[++b]}const r=T?d[t]:t,n=r*e,s=f(h,n,e);let i=s%m,o=B;for(;0!==c[2*i+1];){if(c[2*i]===s){const t=c[2*i+1]-1;if(u(h,n,t*e,e)){o=M[t];break}}i++,i>=m&&(i-=m)}o===B&&(c[2*i]=s,c[2*i+1]=r+1,B++),M[r]=o}if(0!==l&&1-B/a<l)return null;if(T){for(let t=y[b-1];t<S.length;t++)S[t]=M[d[t]];M=(0,s.uW)(S)}const R=i?new Array(B):new Uint32Array(B*e);B=0;for(let t=0;t<_;t++)M[t]===B&&(o(h,(T?d[t]:t)*e,R,B*e,e),B++);if(d&&!T){const t=new Uint32Array(p);for(let e=0;e<t.length;e++)t[e]=M[d[e]];M=(0,s.uW)(t)}return{buffer:Array.isArray(R)?R:R.buffer,indices:M,uniqueCount:B}}function u(t,e,r,n){for(let s=0;s<n;s++)if(t[e+s]!==t[r+s])return!1;return!0}function o(t,e,r,n,s){for(let i=0;i<s;i++)r[n+i]=t[e+i]}function f(t,e,r){let n=0;for(let s=0;s<r;s++)n=t[e+s]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},11868:(t,e,r)=>{r.d(e,{Wz:()=>i,oe:()=>s});var n=r(34275);function s(t,e=!1){return t<=n.y9?e?new Array(t).fill(0):new Array(t):new Float32Array(t)}function i(t){return(Array.isArray(t)?t.length:t.byteLength/8)<=n.y9?Array.from(t):new Float32Array(t)}},13030:(t,e,r)=>{r.d(e,{Y$:()=>y,XW:()=>p,qB:()=>N,Qt:()=>j,My:()=>Z,bf:()=>X,jZ:()=>S,j0:()=>A,Sx:()=>g,E$:()=>b,h:()=>x,P:()=>L,SL:()=>w,gH:()=>m,ZD:()=>E,si:()=>R,mJ:()=>$,UL:()=>J,D6:()=>q,Yi:()=>O,An:()=>D,LC:()=>F,xs:()=>T,EC:()=>B,Xm:()=>I,Vp:()=>k,zD:()=>Q,m8:()=>z,nS:()=>P,H$:()=>Y,eI:()=>U,Eq:()=>M,jz:()=>_,Aj:()=>v,E7:()=>W,Y4:()=>K,TX:()=>V,Uz:()=>G,ml:()=>H,XP:()=>C});var n=r(20498);class s{static{this.ElementCount=9}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=9;const i=this.TypedArrayConstructor;void 0===n&&(n=9*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;for(let t=0;t<9;++t)n[i++]=s[u++]}get buffer(){return this.typedBuffer.buffer}}class i{static{this.ElementCount=16}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=16;const i=this.TypedArrayConstructor;void 0===n&&(n=16*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){this.copyFromTypedBuffer(t,e.typedBuffer,r*e.typedBufferStride)}copyFromTypedBuffer(t,e,r){const n=this.typedBuffer;let s=t*this.typedBufferStride;for(let t=0;t<16;++t)n[s++]=e[r++]}get buffer(){return this.typedBuffer.buffer}}class u{static{this.ElementCount=1}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=1;const i=this.TypedArrayConstructor;void 0===n&&(n=i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.stride=n,this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}var o=r(37585);class f{static{this.ElementCount=2}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===n&&(n=2*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,o.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var c=r(38954);class a{static{this.ElementCount=3}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=3;const i=this.TypedArrayConstructor;void 0===n&&(n=3*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,c.i)(e,this.typedBuffer[t],this.typedBuffer[t+1],this.typedBuffer[t+2])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t]=n}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var h=r(87317);class l{static{this.ElementCount=4}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=4;const i=this.TypedArrayConstructor;void 0===n&&(n=4*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,h.s)(e,this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t++]=e[2],this.typedBuffer[t]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n,s){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t++]=n,this.typedBuffer[t]=s}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var d=r(620);class p extends u{constructor(t,e=0,r,s){(0,d.vA)(n.SX),super((0,n.pX)(),t,e,r,s),this.elementType="f16"}static{this.ElementType="f16"}}class y extends u{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}static{this.ElementType="f32"}}class E extends f{constructor(t,e=0,r,s){(0,d.vA)(n.SX),super((0,n.pX)(),t,e,r,s),this.elementType="f16"}slice(t,e){return this.sliceBuffer(E,t,e)}static{this.ElementType="f16"}}class m extends f{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(m,t,e)}static{this.ElementType="f32"}}class B extends a{constructor(t,e=0,r,s){(0,d.vA)(n.SX),super((0,n.pX)(),t,e,r,s),this.elementType="f16"}slice(t,e){return this.sliceBuffer(B,t,e)}static{this.ElementType="f16"}}class T extends a{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(T,t,e)}static fromTypedArray(t,e){return new T(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f32"}}class _ extends l{constructor(t,e=0,r,s){(0,d.vA)(n.SX),super((0,n.pX)(),t,e,r,s),this.elementType="f16"}slice(t,e){return this.sliceBuffer(_,t,e)}static{this.ElementType="f16"}}class M extends l{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(M,t,e)}static{this.ElementType="f32"}}class S extends s{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(S,t,e)}static{this.ElementType="f32"}}class A extends s{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(A,t,e)}static{this.ElementType="f64"}}class g extends i{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(g,t,e)}static{this.ElementType="f32"}}class b extends i{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(b,t,e)}static{this.ElementType="f64"}}class N extends u{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(N,t,e)}static{this.ElementType="f64"}}class R extends f{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(R,t,e)}static{this.ElementType="f64"}}class I extends a{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(I,t,e)}static fromTypedArray(t,e){return new I(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f64"}}class v extends l{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(v,t,e)}static{this.ElementType="f64"}}class w extends u{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(w,t,e)}static{this.ElementType="u8"}}class F extends f{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(F,t,e)}static{this.ElementType="u8"}}class U extends a{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(U,t,e)}static fromTypedArray(t,e){return new U(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="u8"}}class C extends l{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(C,t,e)}static{this.ElementType="u8"}}class x extends u{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(x,t,e)}static{this.ElementType="u16"}}class O extends f{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(O,t,e)}static{this.ElementType="u16"}}class P extends a{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(P,t,e)}static{this.ElementType="u16"}}class G extends l{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(G,t,e)}static{this.ElementType="u16"}}class L extends u{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(L,t,e)}static{this.ElementType="u32"}}class D extends f{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(D,t,e)}static{this.ElementType="u32"}}class Y extends a{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(Y,t,e)}static{this.ElementType="u32"}}class H extends l{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(H,t,e)}static{this.ElementType="u32"}}class X extends u{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(X,t,e)}static{this.ElementType="i8"}}class q extends f{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(q,t,e)}static{this.ElementType="i8"}}class z extends a{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(z,t,e)}static{this.ElementType="i8"}}class V extends l{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(V,t,e)}static{this.ElementType="i8"}}class j extends u{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(j,t,e)}static{this.ElementType="i16"}}class $ extends f{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer($,t,e)}static{this.ElementType="i16"}}class k extends a{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(k,t,e)}static{this.ElementType="i16"}}class W extends l{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(W,t,e)}static{this.ElementType="i16"}}class Z extends u{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(Z,t,e)}static{this.ElementType="i32"}}class J extends f{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(J,t,e)}static{this.ElementType="i32"}}class Q extends a{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(Q,t,e)}static{this.ElementType="i32"}}class K extends l{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(K,t,e)}static{this.ElementType="i32"}}},20498:(t,e,r)=>{r.d(e,{SX:()=>i,pX:()=>s});let n=globalThis.Float16Array;function s(){return n}let i=!!n},34304:(t,e,r)=>{r.d(e,{DF:()=>f,FD:()=>s,Ov:()=>i,ct:()=>c});let n=1e-6;function s(){return n}const i=Math.random,u=Math.PI/180,o=180/Math.PI;function f(t){return t*u}function c(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:s,setEpsilon:function(t){n=t},toDegree:c,toRadian:f},Symbol.toStringTag,{value:"Module"}))},34727:(t,e,r)=>{r.d(e,{$8:()=>A,Cc:()=>u,Hx:()=>y,Io:()=>M,KJ:()=>c,OS:()=>N,Sp:()=>l,XM:()=>a,YN:()=>h,ZH:()=>p,b6:()=>S,cU:()=>s,gg:()=>d,hs:()=>o,kU:()=>f,or:()=>b,pF:()=>I,pq:()=>R,qE:()=>i});const n=new Float32Array(1);function s(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,r){return Math.min(Math.max(t,e),r)}function u(t,e,r){return t+(e-t)*r}function o(t,e,r,n,s){return u(n,s,(t-e)/(r-e))}function f(t){return t*Math.PI/180}function c(t){return 180*t/Math.PI}function a(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function l(t,e,r=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=r}function d(t,e,r=1e-6){return!l(t,e,r)&&t>e}function p(t,e,r=1e-6){return!l(t,e,r)&&t<e}function y(t,e,r=1e-6){return l(t,e,r)||t>e}const E=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function m(t){return E.setFloat64(0,t),E.getBigInt64(0)}const B=1000000n,T=_(1);function _(t){const e=m(t=Math.abs(t)),r=function(t){return E.setBigInt64(0,t),E.getFloat64(0)}(e<=B?B:e-B);return Math.abs(t-r)}function M(t,e,r=T){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=r&&_(Math.min(Math.abs(t),Math.abs(e)))<r)return Math.abs(t-e)<=r;const n=m(t),s=m(e);return n<0==s<0&&!((n<s?s-n:n-s)>B)}function S(t,e,r=1e-6){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;const n=Math.abs(t-e),s=Math.abs(t),i=Math.abs(e);if(0===t||0===e||s<1e-12&&i<1e-12){if(n>.01*r)return!1}else if(n/(s+i)>r)return!1;return!0}function A(t){return g(Math.max(-R,Math.min(t,R)))}function g(t){return n[0]=t,n[0]}function b(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],n=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(l(e,1)&&l(r,1)&&l(n,1))}function N(t,e){return(t%e+e)%e}const R=g(34028234663852886e22);function I(t,e,r){if(void 0===r||0===+r)return Math[t](e);if(e=+e,r=+r,isNaN(e)||"number"!=typeof r||r%1!=0)return NaN;let n=e.toString().split("e");return n=(e=Math[t](+(n[0]+"e"+(n[1]?+n[1]-r:-r)))).toString().split("e"),+(n[0]+"e"+(n[1]?+n[1]+r:r))}},37585:(t,e,r)=>{r.d(e,{C:()=>s,Cc:()=>E,Io:()=>h,S8:()=>y,WQ:()=>u,aI:()=>_,e$:()=>B,hG:()=>l,hZ:()=>i,hs:()=>a,jb:()=>S,l0:()=>m,t2:()=>T});var n=r(34304);function s(t,e){return t[0]=e[0],t[1]=e[1],t}function i(t,e,r){return t[0]=e,t[1]=r,t}function u(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function o(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function f(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function c(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function a(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function h(t,e){const r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}function l(t,e){const r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n}function d(t){const e=t[0],r=t[1];return Math.sqrt(e*e+r*r)}function p(t){const e=t[0],r=t[1];return e*e+r*r}function y(t,e){const r=e[0],n=e[1];let s=r*r+n*n;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s),t}function E(t,e,r,n){const s=e[0],i=e[1];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t}function m(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s+r[4],t[1]=r[1]*n+r[3]*s+r[5],t}function B(t,e,r,n){const s=e[0]-r[0],i=e[1]-r[1],u=Math.sin(n),o=Math.cos(n);return t[0]=s*o-i*u+r[0],t[1]=s*u+i*o+r[1],t}function T(t,e){return t[0]===e[0]&&t[1]===e[1]}function _(t,e){const r=t[0],s=t[1],i=e[0],u=e[1],o=(0,n.FD)();return Math.abs(r-i)<=o*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-u)<=o*Math.max(1,Math.abs(s),Math.abs(u))}const M=d,S=o,A=f,g=c,b=h,N=l,R=p;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){const r=t[0],n=t[1],s=e[0],i=e[1];let u=r*r+n*n;u>0&&(u=1/Math.sqrt(u));let o=s*s+i*i;o>0&&(o=1/Math.sqrt(o));const f=(r*s+n*i)*u*o;return f>1?0:f<-1?Math.PI:Math.acos(f)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:s,cross:function(t,e,r){const n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},dist:b,distance:h,div:g,divide:c,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:_,exactEquals:T,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:M,length:d,lerp:E,max:function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},min:function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},mul:A,multiply:f,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:y,projectAndScale:function(t,e,r,n,s){let i=e[0]-r[0],u=e[1]-r[1];const o=(n[0]*i+n[1]*u)*(s-1);return i=n[0]*o,u=n[1]*o,t[0]=e[0]+i,t[1]=e[1]+u,t},random:function(t,e=1){const r=2*(0,n.Ov)()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},rotate:B,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:a,scaleAndAdd:function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},set:i,sqrDist:N,sqrLen:R,squaredDistance:l,squaredLength:p,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:S,subtract:o,transformMat2:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t},transformMat2d:m,transformMat3:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[3]*s+r[6],t[1]=r[1]*n+r[4]*s+r[7],t},transformMat4:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[4]*s+r[12],t[1]=r[1]*n+r[5]*s+r[13],t}},Symbol.toStringTag,{value:"Module"}))},38954:(t,e,r)=>{r.d(e,{A:()=>p,B:()=>d,C:()=>a,D:()=>h,E:()=>C,F:()=>G,H:()=>D,a:()=>x,b:()=>m,c:()=>u,d:()=>c,e:()=>g,f:()=>f,g:()=>E,h:()=>b,i:()=>o,j:()=>B,k:()=>_,l:()=>i,m:()=>N,n:()=>A,o:()=>I,q:()=>U,r:()=>S,s:()=>T,t:()=>R,u:()=>M,v:()=>v,w:()=>l,x:()=>L,y:()=>Y,z:()=>y});var n=r(51850),s=r(34304);function i(t){const e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function f(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function c(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function a(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function h(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function l(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function y(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function E(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function m(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}function B(t,e){const r=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(r*r+n*n+s*s)}function T(t,e){const r=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return r*r+n*n+s*s}function _(t){const e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}function M(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function S(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function A(t,e){const r=e[0],n=e[1],s=e[2];let i=r*r+n*n+s*s;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function b(t,e,r){const n=e[0],s=e[1],i=e[2],u=r[0],o=r[1],f=r[2];return t[0]=s*f-i*o,t[1]=i*u-n*f,t[2]=n*o-s*u,t}function N(t,e,r,n){const s=e[0],i=e[1],u=e[2];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t[2]=u+n*(r[2]-u),t}function R(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=r[0]*n+r[4]*s+r[8]*i+r[12],t[1]=r[1]*n+r[5]*s+r[9]*i+r[13],t[2]=r[2]*n+r[6]*s+r[10]*i+r[14],t}function I(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=n*r[0]+s*r[3]+i*r[6],t[1]=n*r[1]+s*r[4]+i*r[7],t[2]=n*r[2]+s*r[5]+i*r[8],t}function v(t,e,r){const n=r[0],s=r[1],i=r[2],u=r[3],o=e[0],f=e[1],c=e[2],a=s*c-i*f,h=i*o-n*c,l=n*f-s*o,d=s*l-i*h,p=i*a-n*l,y=n*h-s*a,E=2*u;return t[0]=o+a*E+2*d,t[1]=f+h*E+2*p,t[2]=c+l*E+2*y,t}const w=(0,n.vt)(),F=(0,n.vt)();function U(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function C(t,e,r){const n=r[0]-e[0],s=r[1]-e[1],i=r[2]-e[2];let u=n*n+s*s+i*i;return u>0?(u=1/Math.sqrt(u),t[0]=n*u,t[1]=s*u,t[2]=i*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const x=c,O=a,P=h,G=B,L=T,D=i,Y=_;Object.freeze(Object.defineProperty({__proto__:null,abs:l,add:f,angle:function(t,e){A(w,t),A(F,e);const r=g(w,F);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,e,r,n,s,i){const u=1-i,o=u*u,f=i*i,c=o*u,a=3*i*o,h=3*f*u,l=f*i;return t[0]=e[0]*c+r[0]*a+n[0]*h+s[0]*l,t[1]=e[1]*c+r[1]*a+n[1]*h+s[1]*l,t[2]=e[2]*c+r[2]*a+n[2]*h+s[2]*l,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:u,cross:b,crossAndNormalize:function(t,e,r){const n=e[0],s=e[1],i=e[2],u=r[0],o=r[1],f=r[2],c=s*f-i*o,a=i*u-n*f,h=n*o-s*u,l=Math.sqrt(c*c+a*a+h*h);return t[0]=c/l,t[1]=a/l,t[2]=h/l,t},direction:C,dist:G,distance:B,div:P,divide:h,dot:g,equals:function(t,e){if(t===e)return!0;const r=t[0],n=t[1],i=t[2],u=e[0],o=e[1],f=e[2],c=(0,s.FD)();return Math.abs(r-u)<=c*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-o)<=c*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-f)<=c*Math.max(1,Math.abs(i),Math.abs(f))},exactEquals:U,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,r,n,s,i){const u=i*i,o=u*(2*i-3)+1,f=u*(i-2)+i,c=u*(i-1),a=u*(3-2*i);return t[0]=e[0]*o+r[0]*f+n[0]*c+s[0]*a,t[1]=e[1]*o+r[1]*f+n[1]*c+s[1]*a,t[2]=e[2]*o+r[2]*f+n[2]*c+s[2]*a,t},inverse:S,len:D,length:i,lerp:N,max:y,min:p,mul:O,multiply:a,negate:M,normalize:A,random:function(t,e=1){const r=s.Ov,n=2*r()*Math.PI,i=2*r()-1,u=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*u,t[1]=Math.sin(n)*u,t[2]=i*e,t},rotateX:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateY:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateZ:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:E,scaleAndAdd:m,set:o,sign:d,sqrDist:L,sqrLen:Y,squaredDistance:T,squaredLength:_,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:x,subtract:c,transformMat3:I,transformMat4:R,transformQuat:v},Symbol.toStringTag,{value:"Module"}))},48163:(t,e,r)=>{function n(){return[0,0]}function s(t){return[t[0],t[1]]}function i(t,e){return[t,e]}function u(){return i(1,1)}function o(){return i(1,0)}function f(){return i(0,1)}r.d(e,{Un:()=>c,fA:()=>i,o8:()=>s,vt:()=>n});const c=u(),a=o(),h=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:a,UNIT_Y:h,ZEROS:[0,0],clone:s,create:n,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){const r=Math.min(2,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e},fromValues:i,ones:u,unitX:o,unitY:f,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850:(t,e,r)=>{function n(){return[0,0,0]}function s(t){return[t[0],t[1],t[2]]}function i(t,e,r){return[t,e,r]}function u(t,e,r){return[t,e,r]}function o(t,e=[0,0,0]){const r=Math.min(3,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e}function f(){return i(1,1,1)}function c(){return i(1,0,0)}function a(){return i(0,1,0)}function h(){return i(0,0,1)}r.d(e,{CN:()=>u,Cb:()=>E,Cw:()=>p,JP:()=>y,Un:()=>d,ci:()=>o,fA:()=>i,o8:()=>s,uY:()=>l,vt:()=>n});const l=[0,0,0],d=f(),p=c(),y=a(),E=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:p,UNIT_Y:y,UNIT_Z:E,ZEROS:l,clone:s,create:n,freeze:u,fromArray:o,fromValues:i,ones:f,unitX:c,unitY:a,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},63907:(t,e,r)=>{r.d(e,{$0:()=>h,CQ:()=>E,Fq:()=>p,H0:()=>i,SB:()=>f,WR:()=>n,XN:()=>u,iE:()=>o,ld:()=>c,nI:()=>y,pe:()=>s,r6:()=>l,vt:()=>a,yI:()=>d});const n={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},s={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},i={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},u=Object.values(i),o={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},f={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},c={FLOAT:s.FLOAT,UNSIGNED_BYTE:s.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:s.BYTE,UNSIGNED_SHORT:s.UNSIGNED_SHORT,SHORT:s.SHORT,UNSIGNED_INT:s.UNSIGNED_INT,INT:s.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},a={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},h=0,l=36064,d=36065,p=36066,y=33306,E={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},74038:(t,e,r)=>{r.d(e,{_:()=>n});class n{constructor(t,e,r,n,s,i=!1,u=0){this.name=t,this.count=e,this.type=r,this.offset=n,this.stride=s,this.normalized=i,this.divisor=u}}},85079:(t,e,r)=>{function n(t){let e=0;return new Map(t.map(({name:t,count:r})=>{const n=[t,e];return 16===r?e+=4:9===r?e+=3:++e,n}))}function s(t){const e=new Map;let r=0;return t.forEach(t=>t.forEach(({name:t,count:n})=>{e.set(t,r),16===n?r+=4:9===n?r+=3:++r})),e}r.d(e,{Xk:()=>n,_u:()=>s})},90239:(t,e,r)=>{function n(t){switch(t){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(e,{GJ:()=>n})},93406:(t,e,r)=>{r.d(e,{K:()=>f});var n=r(34727),s=r(15142),i=r(38954),u=r(51850);const o=-1;function f(t,e,r){const n=t.vertices.position,s=t.vertices.componentIndex,u=y.position0,f=y.position1,h=y.faceNormal0,d=y.faceNormal1,{edges:p,normals:E}=a(t),m=p.length/4,B=e.allocate(m);let T=0;const _=m,A=r?.allocate(_);let b=0,N=0,R=0;l.length=0;for(let t=0;t<m;++t){const e=4*t;n.getVec(p.data[e],u),n.getVec(p.data[e+1],f);const r=l.pushNew();r.index=4*t,r.length=(0,i.j)(u,f)}l.sort((t,e)=>e.length-t.length);const I=new Array,v=new Array;l.forAll(({length:t,index:a})=>{const l=p.data[a],m=p.data[a+1],_=p.data[a+2],w=p.data[a+3],F=w===o;if(n.getVec(l,u),n.getVec(m,f),F){const t=3*_;(0,i.i)(h,E.data[t],E.data[t+1],E.data[t+2]),(0,i.c)(d,h),y.componentIndex=s.get(l),y.cosAngle=(0,i.e)(h,d)}else{let t=3*_;if((0,i.i)(h,E.data[t],E.data[t+1],E.data[t+2]),t=3*w,(0,i.i)(d,E.data[t],E.data[t+1],E.data[t+2]),y.componentIndex=s.get(l),y.cosAngle=(0,i.e)(h,d),function(t,e){return t.cosAngle>e}(y,S))return;y.cosAngle<-.9999&&(0,i.c)(d,h)}N+=t,R++,F||function(t,e){return t.cosAngle<e}(y,g)?(e.write(B,T++,y),I.push(t)):c(y,M)&&(A&&r&&r.write(A,b++,y),v.push(t))});const w=new Float32Array(I.reverse()),F=new Float32Array(v.reverse()),U=A&&r?{instancesData:A.slice(0,b),lodInfo:{lengths:F}}:void 0;return{regular:{instancesData:B.slice(0,T),lodInfo:{lengths:w}},silhouette:U,averageEdgeLength:N/R}}function c(t,e){const r=(0,n.XM)(t.cosAngle);return(0,i.E)(m,t.position1,t.position0),r*((0,i.e)((0,i.h)(E,t.faceNormal0,t.faceNormal1),m)>0?-1:1)>e}function a(t){const e=t.faces.length/3,r=t.faces,n=t.neighbors,s=t.vertices.position;d.length=p.length=0;for(let t=0;t<e;t++){const e=3*t,u=n[e],f=n[e+1],c=n[e+2],a=r[e],h=r[e+1],l=r[e+2];s.getVec(a,B),s.getVec(h,T),s.getVec(l,_),(0,i.d)(T,T,B),(0,i.d)(_,_,B),(0,i.h)(B,T,_),(0,i.n)(B,B),p.pushArray(B),(u===o||a<h)&&(d.push(a),d.push(h),d.push(t),d.push(u)),(f===o||h<l)&&(d.push(h),d.push(l),d.push(t),d.push(f)),(c===o||l<a)&&(d.push(l),d.push(a),d.push(t),d.push(c))}return{edges:d,normals:p}}class h{constructor(){this.index=0,this.length=0}}const l=new s.A({allocator:t=>t||new h,deallocator:null}),d=new s.A({deallocator:null}),p=new s.A({deallocator:null}),y=new class{constructor(){this.position0=(0,u.vt)(),this.position1=(0,u.vt)(),this.faceNormal0=(0,u.vt)(),this.faceNormal1=(0,u.vt)(),this.componentIndex=0,this.cosAngle=0}},E=(0,u.vt)(),m=(0,u.vt)(),B=(0,u.vt)(),T=(0,u.vt)(),_=(0,u.vt)(),M=(0,n.kU)(4),S=Math.cos(M),A=(0,n.kU)(35),g=Math.cos(A)},97146:(t,e,r)=>{r.d(e,{Dg:()=>i,my:()=>u,tM:()=>a,uW:()=>s});var n=r(34275);function s(t){return i(t,!0)}function i(t,e){if(Array.isArray(t)){if(t.length<n.y9)return t}else if(t.length<n.y9)return Array.from(t);let r=!0,s=!0;return t.some((t,e)=>(r=r&&0===t,s=s&&t===e,!r&&!s)),r?function(t){if(1===t)return f;if(t<n.y9)return new Array(t).fill(0);if(t>l.length){const e=Math.max(2*l.length,t);l=new Uint8Array(e)}return new Uint8Array(l.buffer,0,t)}(t.length):s?a(t.length):(0,n.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,e){for(const r of t){if(r>=65536)return(0,n.iu)(t)?t:new Uint32Array(t);r>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}(t,!e)}function u(t){return t<=n.y9?new Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}let o=h(131072);const f=[0],c=(()=>{const t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function a(t){return 1===t?f:t<n.y9?Array.from(new Uint16Array(c.buffer,0,t)):t<c.length?new Uint16Array(c.buffer,0,t):(t>o.length&&(o=h(Math.max(2*o.length,t))),new Uint32Array(o.buffer,0,t))}function h(t){const e=new Uint32Array(t);for(let t=0;t<e.length;t++)e[t]=t;return e}let l=new Uint8Array(65536)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7242],{9093:(e,t,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>o,vt:()=>r,zK:()=>a});const a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:o,create:r,fromValues:function(e,t,n,r,o,a,i,u,l,s,c,f,d,h,b,p){return[e,t,n,r,o,a,i,u,l,s,c,f,d,h,b,p]}},Symbol.toStringTag,{value:"Module"}))},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>o});var r=n(37539);function o(e,t,n,o,a,i,u=Math.floor(e.length/3)){const l=(0,r.jd)(t,a);if(null==l)return!1;if(l===r.pO){if(e===o&&n===i)return!0;const t=n+3*u;for(let r=n,a=i;r<t;r++,a++)o[a]=e[r];return!0}const s=n+3*u;for(let t=n,r=i;t<s;t+=3,r+=3)l(e,t,o,r);return!0}},29242:(e,t,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,n,r,o,a,i,u,l){return[e,t,n,r,o,a,i,u,l]}n.d(t,{fA:()=>o,vt:()=>r,zK:()=>a});const a=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:r,fromValues:o},Symbol.toStringTag,{value:"Module"}))},31635:(e,t,n)=>{function r(e,t,n,r){var o,a=arguments.length,i=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(i=(a<3?o(i):a>3?o(t,n,i):o(t,n))||i);return a>3&&i&&Object.defineProperty(t,n,i),i}function o(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}n.d(t,{Cg:()=>r,hk:()=>i,mS:()=>o}),Object.create,Object.create;var a="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function i(e){function t(t){e.error=e.hasError?new a(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var a=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(a).then(o,function(e){return t(e),o()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},34142:(e,t,n)=>{n.r(t),n.d(t,{default:()=>I});var r=n(4576),o=n(34275),a=n(67026),i=n(82534),u=n(38954),l=n(72385),s=n(16930),c=n(9762),f=(n(44208),n(63531)),d=n(69846),h=n(48425),b=n(59418),p=n(37203);function g(e,t,n){return e?.attributeInfo.useElevation?t?function(e,t){const n=new Float64Array(t);for(let r=0;r<t;r++)n[r]=e[3*r+2];return n}(t,n):null:e?.attributeInfo.storageInfo?(0,b.m0)(e.attributeInfo.storageInfo,e.buffer,n,!0):null}function y(e){switch(e){default:case null:case"none":return e=>e;case"low-four-bit":return e=>15&e;case"high-four-bit":return e=>(240&e)>>4;case"absolute-value":return e=>Math.abs(e);case"modulo-ten":return e=>e%10}}function m(e){let t=0;for(const n of e||[])t|=1<<n;return t}var w=n(57005);class M{transform(e){const t=this._transform(e),n=[t.points.buffer,t.rgb.buffer];null!=t.pointIdFilterMap&&n.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.mw)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&n.push(e.values.buffer);return Promise.resolve({result:t,transferList:n})}_transform(e){const t=function(e,t){if(null==e.encoding||""===e.encoding){const n=(0,b.wH)(t,e);if(null==n.vertexAttributes.position)return;const r=(0,b.MA)(t,n.vertexAttributes.position),o=n.header.fields,a=[o.offsetX,o.offsetY,o.offsetZ],i=[o.scaleX,o.scaleY,o.scaleZ],u=r.length/3,l=new Float64Array(3*u);for(let e=0;e<u;e++)l[3*e]=r[3*e]*i[0]+a[0],l[3*e+1]=r[3*e+1]*i[1]+a[1],l[3*e+2]=r[3*e+2]*i[2]+a[2];return l}if("lepcc-xyz"===e.encoding)return(0,p.Me)(t).result}(e.schema,e.geometryBuffer);let n=t.length/3,o=null;const a=new Array,i=g(e.primaryAttributeData,t,n);null!=e.primaryAttributeData&&i&&a.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:i});const u=g(e.modulationAttributeData,t,n);null!=e.modulationAttributeData&&u&&a.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:u});let l=function(e,t,n,r){const{rendererJSON:o,isRGBRenderer:a}=e;let i=null,u=null;if(t&&a)i=t;else if(t&&"pointCloudUniqueValueRenderer"===o?.type){u=h.A.fromJSON(o);const e=u.colorUniqueValueInfos;i=new Uint8Array(3*r);const n=y(u.fieldTransformType);for(let o=0;o<r;o++){const r=(n?n(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(r)){i[3*o]=e[t].color.r,i[3*o+1]=e[t].color.g,i[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o?.type){u=d.A.fromJSON(o);const e=u.stops;i=new Uint8Array(3*r);const n=y(u.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o],a=e.length-1;if(r<e[0].value)i[3*o]=e[0].color.r,i[3*o+1]=e[0].color.g,i[3*o+2]=e[0].color.b;else if(r>=e[a].value)i[3*o]=e[a].color.r,i[3*o+1]=e[a].color.g,i[3*o+2]=e[a].color.b;else for(let t=1;t<e.length;t++)if(r<e[t].value){const n=(r-e[t-1].value)/(e[t].value-e[t-1].value);i[3*o]=e[t].color.r*n+e[t-1].color.r*(1-n),i[3*o+1]=e[t].color.g*n+e[t-1].color.g*(1-n),i[3*o+2]=e[t].color.b*n+e[t-1].color.b*(1-n);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o?.type){u=f.A.fromJSON(o);const e=u.colorClassBreakInfos;i=new Uint8Array(3*r);const n=y(u.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o];for(let t=0;t<e.length;t++)if(r>=e[t].minValue&&r<=e[t].maxValue){i[3*o]=e[t].color.r,i[3*o+1]=e[t].color.g,i[3*o+2]=e[t].color.b;break}}}else i=new Uint8Array(3*r).fill(255);if(n&&u?.colorModulation){const e=u.colorModulation.minValue,t=u.colorModulation.maxValue,o=.3;for(let a=0;a<r;a++){const r=n[a],u=r>=t?1:r<=e?o:o+(1-o)*(r-e)/(t-e);i[3*a]=u*i[3*a],i[3*a+1]=u*i[3*a+1],i[3*a+2]=u*i[3*a+2]}}return i}(e.rendererInfo,i,u,n);if(e.filterInfo&&e.filterInfo.length>0&&null!=e.filterAttributesData){const i=e.filterAttributesData.filter(r.Ru).map(e=>{const r=g(e,t,n),o={attributeInfo:e.attributeInfo,values:r};return a.push(o),o});o=new Uint32Array(n),n=function(e,t,n,r,o){const a=e.length/3;let i=0;for(let u=0;u<a;u++){let a=!0;for(let e=0;e<r.length&&a;e++){const{filterJSON:t}=r[e],n=o[e].values[u];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(n)===e&&(a=!1);break}case"pointCloudBitfieldFilter":{const e=m(t.requiredSetBits),r=m(t.requiredClearBits);(n&e)===e&&0===(n&r)||(a=!1);break}case"pointCloudReturnFilter":{const e=15&n,r=n>>>4&15,o=r>1,i=1===e,u=e===r;let l=!1;for(const e of t.includedReturns)if("last"===e&&u||"firstOfMany"===e&&i&&o||"lastOfMany"===e&&u&&o||"single"===e&&!o){l=!0;break}l||(a=!1);break}}}a&&(n[i]=u,e[3*i]=e[3*u],e[3*i+1]=e[3*u+1],e[3*i+2]=e[3*u+2],t[3*i]=t[3*u],t[3*i+1]=t[3*u+1],t[3*i+2]=t[3*u+2],i++)}return i}(t,l,o,e.filterInfo,i)}for(const r of e.userAttributesData){const e=g(r,t,n);a.push({attributeInfo:r.attributeInfo,values:e})}3*n<l.length&&(l=new Uint8Array(l.buffer.slice(0,3*n))),function(e,t,n){if(0!==n)for(let r=0;r<t;r++)e[3*r+2]+=n}(t,n,e.elevationOffset);const c=v(t,n,w.ab.fromData(e.obbData),s.A.fromJSON(e.inSR),s.A.fromJSON(e.outSR));return{obbData:e.obbData,points:c,rgb:l,attributes:a,pointIdFilterMap:o}}}function v(e,t,n,r,o){if(!(0,c.projectBuffer)(e,r,0,e,o,0,t))throw new Error("Can't reproject");const i=(0,l.o8)(n.center),s=(0,l.vt)(),f=(0,l.vt)(),d=(0,l.o8)(n.halfSize);(0,a.Xr)(A,n.quaternion);const h=new Float32Array(3*t);for(let n=0;n<t;n++){let t=3*n;s[0]=e[t]-i[0],s[1]=e[t+1]-i[1],s[2]=e[t+2]-i[2],(0,u.v)(f,s,A),d[0]=Math.max(d[0],Math.abs(f[0])),d[1]=Math.max(d[1],Math.abs(f[1])),d[2]=Math.max(d[2],Math.abs(f[2])),h[t++]=s[0],h[t++]=s[1],h[t]=s[2]}return n.halfSize=d,h}const A=(0,i.vt)();function I(){return new M}},34304:(e,t,n)=>{n.d(t,{DF:()=>l,FD:()=>o,Ov:()=>a,ct:()=>s});let r=1e-6;function o(){return r}const a=Math.random,i=Math.PI/180,u=180/Math.PI;function l(e){return e*i}function s(e){return e*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:a,equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:o,setEpsilon:function(e){r=e},toDegree:s,toRadian:l},Symbol.toStringTag,{value:"Module"}))},37203:(e,t,n)=>{n.d(t,{Ax:()=>y,Me:()=>s,mb:()=>b});var r=n(49186);const o=!0,a={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function i(e,t,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,n+a.identifierOffset,a.identifierLength)),version:t.getUint16(n+a.versionOffset,o),checksum:t.getUint32(n+a.checksumOffset,o)}}const u={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function l(e,t){return{sizeLo:e.getUint32(t+u.sizeLo,o),sizeHi:e.getUint32(t+u.sizeHi,o),minX:e.getFloat64(t+u.minX,o),minY:e.getFloat64(t+u.minY,o),minZ:e.getFloat64(t+u.minZ,o),maxX:e.getFloat64(t+u.maxX,o),maxY:e.getFloat64(t+u.maxY,o),maxZ:e.getFloat64(t+u.maxZ,o),errorX:e.getFloat64(t+u.errorX,o),errorY:e.getFloat64(t+u.errorY,o),errorZ:e.getFloat64(t+u.errorZ,o),count:e.getUint32(t+u.count,o),reserved:e.getUint32(t+u.reserved,o)}}function s(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:s}=i(e,t,n);if(n+=a.byteCount,"LEPCC "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(s>1)throw new r.A("lepcc-decode-error","Unknown version");const f=l(t,n);if(n+=u.byteCount,f.sizeHi*2**32+f.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const d=new Float64Array(3*f.count),h=[],b=[],p=[],g=[];if(n=c(e,n,h),n=c(e,n,b),n=c(e,n,p),n=c(e,n,g),n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad length");let y=0,m=0;for(let e=0;e<h.length;e++){m+=h[e];let t=0;for(let n=0;n<b[e];n++){t+=p[y];const e=g[y];d[3*y]=Math.min(f.maxX,f.minX+2*f.errorX*t),d[3*y+1]=Math.min(f.maxY,f.minY+2*f.errorY*m),d[3*y+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*e),y++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:d}}function c(e,t,n){const r=[];t=f(e,t,r);const o=[];for(let a=0;a<r.length;a++){o.length=0,t=f(e,t,o);for(let e=0;e<o.length;e++)n.push(o[e]+r[a])}return t}function f(e,t,n){const a=new DataView(e,t),i=a.getUint8(0),u=31&i,l=!!(32&i),s=(192&i)>>6;let c=0;if(0===s)c=a.getUint32(1,o),t+=5;else if(1===s)c=a.getUint16(1,o),t+=3;else{if(2!==s)throw new r.A("lepcc-decode-error","Bad count type");c=a.getUint8(1),t+=2}if(l)throw new r.A("lepcc-decode-error","LUT not implemented");const f=Math.ceil(c*u/8),d=new Uint8Array(e,t,f);let h=0,b=0,p=0;const g=-1>>>32-u;for(let e=0;e<c;e++){for(;b<u;)h|=d[p]<<b,b+=8,p+=1;n[e]=h&g,h>>>=u,b-=u,b+u>32&&(h|=d[p-1]>>8-b)}return t+p}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function h(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function b(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:u}=i(e,t,n);if(n+=a.byteCount,"ClusterRGB"!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(u>1)throw new r.A("lepcc-decode-error","Unknown version");const l=h(t,n);if(n+=d.byteCount,l.sizeHi*2**32+l.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===l.lookupMethod||1===l.lookupMethod)&&0===l.compressionMethod){if(3*l.colorMapCount+l.count+n!==e.byteLength||l.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const t=new Uint8Array(e,n,3*l.colorMapCount),o=new Uint8Array(e,n+3*l.colorMapCount,l.count),a=new Uint8Array(3*l.count);for(let e=0;e<l.count;e++){const n=o[e];a[3*e]=t[3*n],a[3*e+1]=t[3*n+1],a[3*e+2]=t[3*n+2]}return a}if(0===l.lookupMethod&&0===l.compressionMethod){if(3*l.count+n!==e.byteLength||0!==l.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(e,n).slice()}if(l.lookupMethod<=2&&1===l.compressionMethod){if(n+3!==e.byteLength||1!==l.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const o=t.getUint8(n),a=t.getUint8(n+1),i=t.getUint8(n+2),u=new Uint8Array(3*l.count);for(let e=0;e<l.count;e++)u[3*e]=o,u[3*e+1]=a,u[3*e+2]=i;return u}throw new r.A("lepcc-decode-error","Bad method "+l.lookupMethod+","+l.compressionMethod)}const p={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function g(e,t){return{sizeLo:e.getUint32(t+p.sizeLo,o),sizeHi:e.getUint32(t+p.sizeHi,o),count:e.getUint32(t+p.count,o),scaleFactor:e.getUint16(t+p.scaleFactor,o),bitsPerPoint:e.getUint8(t+p.bitsPerPoint),reserved:e.getUint8(t+p.reserved)}}function y(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:u}=i(e,t,n);if(n+=a.byteCount,"Intensity "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(u>1)throw new r.A("lepcc-decode-error","Unknown version");const l=g(t,n);if(n+=p.byteCount,l.sizeHi*2**32+l.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const s=new Uint16Array(l.count);if(8===l.bitsPerPoint){if(l.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint8Array(e,n,l.count);for(let e=0;e<l.count;e++)s[e]=t[e]*l.scaleFactor}else if(16===l.bitsPerPoint){if(2*l.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint16Array(e,n,l.count);for(let e=0;e<l.count;e++)s[e]=t[e]*l.scaleFactor}else{const t=[];if(f(e,n,t)!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let e=0;e<l.count;e++)s[e]=t[e]*l.scaleFactor}return s}},37539:(e,t,n)=>{n.d(t,{pO:()=>p,jd:()=>d,Tp:()=>h,w5:()=>f});var r=n(34727),o=n(83047),a=n(73941),i=n(79258);Math.PI;const u=i.$O.radius,l=i.$O.eccentricitySquared,s={a1:u*l,a2:u*l*u*l,a3:u*l*l/2,a4:u*l*u*l*2.5,a5:u*l+u*l*l/2,a6:1-l};i.$O.radius,i.$O.flattening,i.Sw.radius,i.Sw.flattening,i.sH.radius,i.sH.flattening,i.sH.radius;var c=n(21325);const f={2:{5:p,7:null,9:null,10:p,1:I,6:null,8:null,0:null,3:y,11:m,2:p,4:S},5:{5:p,7:null,9:null,10:p,1:I,6:null,8:null,0:null,3:y,11:m,2:p,4:S},7:{5:null,7:p,9:null,10:p,1:null,6:A,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:p,10:p,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,r){const o=e[t]/j,a=z-2*Math.atan(Math.exp(-e[t+1]/j)),i=j+e[t+2],u=Math.cos(a)*i;n[r]=Math.cos(o)*u,n[r+1]=Math.sin(o)*u,n[r+2]=Math.sin(a)*i},6:null,8:null,0:null,3:p,11:function(e,t,n,r){g(e,t,n,r),m(n,r,n,r)},2:g,4:function(e,t,n,r){g(e,t,n,r),S(n,r,n,r)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,n,r){T(e,t,n,r),I(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){T(e,t,n,r),y(n,r,n,r)},11:function(e,t,n,r){T(e,t,n,r),m(n,r,n,r)},2:T,4:p},1:{5:k,7:null,9:null,10:k,1:p,6:null,8:null,0:null,3:function(e,t,n,r){k(e,t,n,r),y(n,r,n,r)},11:function(e,t,n,r){k(e,t,n,r),m(n,r,n,r)},2:k,4:function(e,t,n,r){k(e,t,n,r),S(n,r,n,r)}},6:{5:null,7:O,9:null,10:O,1:null,6:p,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:U,10:U,1:null,6:null,8:p,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:p,3:null,11:null,2:null,4:null},10:{5:p,7:p,9:p,10:p,1:I,6:A,8:v,0:null,3:y,11:m,2:p,4:S},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,r){w(e,t,n,r),I(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){w(e,t,n,r),y(n,r,n,r)},11:p,2:w,4:function(e,t,n,r){w(e,t,n,r),S(n,r,n,r)}}};function d(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(F.source.spatialReference===e&&F.dest.spatialReference===t)return F;const n=b(e,F.source),r=b(t,F.dest);return 0===n&&0===r?(0,c.aI)(e,t)?F.projector=p:F.projector=null:F.projector=f[n][r],F}function b(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,o.GA)(e,1)),(0,a.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===a.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===a.FY.wkt?t.spatialReferenceId=6:e.wkt===a.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function p(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t])}function g(e,t,n,r){n[r]=E*(e[t]/j),n[r+1]=E*(z-2*Math.atan(Math.exp(-e[t+1]/j))),n[r+2]=e[t+2]}function y(e,t,n,o){!function(e,t,n,o,a){const i=.4999999*Math.PI,u=(0,r.qE)(x*e[t+1],-i,i),l=Math.sin(u);n[o++]=x*e[t]*a.radius,n[o++]=a.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[o]=e[t+2]}(e,t,n,o,i.$O)}function m(e,t,n,r){n[r]=e[t]*P,n[r+1]=e[t+1]*P,n[r+2]=e[t+2]}function w(e,t,n,r){n[r]=e[t]*R,n[r+1]=e[t+1]*R,n[r+2]=e[t+2]}function M(e,t,n,r,o){const a=o+e[t+2],i=x*e[t+1],u=x*e[t],l=Math.cos(i)*a;n[r]=Math.cos(u)*l,n[r+1]=Math.sin(u)*l,n[r+2]=Math.sin(i)*a}function v(e,t,n,r){M(e,t,n,r,i.Sw.radius)}function A(e,t,n,r){M(e,t,n,r,i.sH.radius)}function I(e,t,n,r){M(e,t,n,r,i.$O.radius)}function C(e,t,n,o,a){const i=e[t],u=e[t+1],l=e[t+2],s=Math.sqrt(i*i+u*u+l*l),c=(0,r.YN)(l/(0===s?1:s)),f=Math.atan2(u,i);n[o++]=E*f,n[o++]=E*c,n[o]=s-a}function U(e,t,n,r){C(e,t,n,r,i.Sw.radius)}function O(e,t,n,r){C(e,t,n,r,i.sH.radius)}function k(e,t,n,r){C(e,t,n,r,i.$O.radius)}function S(e,t,n,r){!function(e,t,n,r,o){const a=x*e[t],i=x*e[t+1],u=e[t+2],l=Math.sin(i),s=Math.cos(i),c=o.radius/Math.sqrt(1-o.eccentricitySquared*l*l);n[r++]=(c+u)*s*Math.cos(a),n[r++]=(c+u)*s*Math.sin(a),n[r++]=(c*(1-o.eccentricitySquared)+u)*l}(e,t,n,r,i.$O)}function T(e,t,n,r){const o=s,a=e[t],u=e[t+1],l=e[t+2];let c,f,d,h,b,p,g,y,m,w,M,v,A,I,C,U,O,k,S,T,F;c=Math.abs(l),f=a*a+u*u,d=Math.sqrt(f),h=f+l*l,b=Math.sqrt(h),T=Math.atan2(u,a),p=l*l/h,g=f/h,I=o.a2/b,C=o.a3-o.a4/b,g>.3?(y=c/b*(1+g*(o.a1+I+p*C)/b),S=Math.asin(y),w=y*y,m=Math.sqrt(1-w)):(m=d/b*(1-p*(o.a5-I-g*C)/b),S=Math.acos(m),w=1-m*m,y=Math.sqrt(w)),M=1-i.$O.eccentricitySquared*w,v=i.$O.radius/Math.sqrt(M),A=o.a6*v,I=d-v*m,C=c-A*y,O=m*I+y*C,U=m*C-y*I,k=U/(A/M+O),S+=k,F=O+U*k/2,l<0&&(S=-S),n[r++]=E*T,n[r++]=E*S,n[r]=F}const F={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:p},x=(0,r.kU)(1),E=(0,r.KJ)(1),z=.5*Math.PI,j=i.$O.radius,P=j*Math.PI/180,R=180/(j*Math.PI)},40876:(e,t,n)=>{n.d(t,{Eq:()=>h,G1:()=>p,TS:()=>a,Tf:()=>m,V6:()=>o,Vm:()=>b,ay:()=>l,c1:()=>g,c4:()=>i,j5:()=>s,lT:()=>f,oW:()=>c,xV:()=>M});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return!!r[e]||!!r[e.toLowerCase()]}function a(e){return r[e]??r[e.toLowerCase()]}function i(e){return[...a(e)]}function u(e,t,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function l(e,t,n,r=1){const o=(e%360+360)%360/360,a=n<=.5?n*(t+1):n+t-n*t,i=2*n-a;return[Math.round(255*u(i,a,o+1/3)),Math.round(255*u(i,a,o)),Math.round(255*u(i,a,o-1/3)),r]}function s(e){const t=e.length>5,n=t?8:4,r=(1<<n)-1,o=t?1:17,a=t?9===e.length:5===e.length;let i=Number("0x"+e.slice(1));if(isNaN(i))return null;const u=[0,0,0,1];let l;return a&&(l=i&r,i>>=n,u[3]=o*l/255),l=i&r,i>>=n,u[2]=o*l,l=i&r,i>>=n,u[1]=o*l,l=i&r,i>>=n,u[0]=o*l,u}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),r=parseInt(e.slice(3,4),16),o=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function f(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?p(e[3]):1,e}function h(e){let t=o(e)?a(e):null;return t??=f(e),t??=c(e),t}function b(e){const t=h(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function p(e){return y(e,0,1)}function g(e){return Math.round(y(e,0,255))}function y(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const m=2.2,w=1/m;function M(e){return e**w}},51850:(e,t,n)=>{function r(){return[0,0,0]}function o(e){return[e[0],e[1],e[2]]}function a(e,t,n){return[e,t,n]}function i(e,t,n){return[e,t,n]}function u(e,t=[0,0,0]){const n=Math.min(3,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function l(){return a(1,1,1)}function s(){return a(1,0,0)}function c(){return a(0,1,0)}function f(){return a(0,0,1)}n.d(t,{CN:()=>i,Cb:()=>g,Cw:()=>b,JP:()=>p,Un:()=>h,ci:()=>u,fA:()=>a,o8:()=>o,uY:()=>d,vt:()=>r});const d=[0,0,0],h=l(),b=s(),p=c(),g=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_X:b,UNIT_Y:p,UNIT_Z:g,ZEROS:d,clone:o,create:r,freeze:i,fromArray:u,fromValues:a,ones:l,unitX:s,unitY:c,unitZ:f,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},59418:(e,t,n)=>{n.d(t,{wH:()=>p,MA:()=>d,E5:()=>h,m0:()=>y});var r=n(49186),o=n(4718),a=n(53966),i=n(34275),u=n(37203);const l=()=>a.A.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function s(e,t,n){let o="",a=0;for(;a<n;){const i=e[t+a];if(i<128)o+=String.fromCharCode(i),a++;else if(i>=192&&i<224){if(a+1>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const u=(31&i)<<6|63&e[t+a+1];o+=String.fromCharCode(u),a+=2}else if(i>=224&&i<240){if(a+2>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const u=(15&i)<<12|(63&e[t+a+1])<<6|63&e[t+a+2];o+=String.fromCharCode(u),a+=3}else{if(!(i>=240&&i<248))throw new r.A("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(a+3>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const u=(7&i)<<18|(63&e[t+a+1])<<12|(63&e[t+a+2])<<6|63&e[t+a+3];if(u>=65536){const e=55296+(u-65536>>10),t=56320+(1023&u);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(u);a+=4}}}return o}function c(e,t){const n={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let o=0;o<t.length;o++){const a=t[o],i=a.valueType||a.type,u=w[i];n.fields[a.property]=u(e,r),r+=m[i].BYTES_PER_ELEMENT}return n.byteCount=r,n}function f(e,t,n){const o=[];let a,i,u=0;for(i=0;i<e;i+=1){if(a=t[i],a>0){if(o.push(s(n,u,a-1)),0!==n[u+a-1])throw new r.A("string-array-error","Invalid string array: missing null termination.")}else o.push(null);u+=a}return o}function d(e,t){return new(0,m[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function h(e,t){if(!e)return null;const n=e[t];return(0,i.IY)(e)?n===i.PI?null:n:(0,i._G)(e)?n===i.h2?null:n:n!=n?null:n}function b(e,t,n){if(t!==e&&l().error(`Invalid ${n} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r.A("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function p(e,t){const n=c(e,t&&t.header);let r=n.byteCount;const o={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},a=n.fields,i=null!=a.vertexCount?a.vertexCount:a.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const n={...t.vertexAttributes[e],byteOffset:r,count:i},a=g[e]||"_"+e;o.vertexAttributes[a]=n,r+=v(n.valueType)*n.valuesPerElement*i}const u=a.faceCount;if(t.faces&&u){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const n={...t.faces[e],byteOffset:r,count:u};o.faces[e]=n,r+=v(n.valueType)*n.valuesPerElement*u}}const l=a.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&l){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const n={...t.featureAttributes[e],byteOffset:r,count:l};o.featureAttributes[e]=n,r+=("UInt64"===n.valueType?8:v(n.valueType))*n.valuesPerElement*l}}return b(r,e.byteLength,"geometry"),o.byteCount=r-o.byteOffset,o}const g={position:"position",normal:"normal",color:"color",uv0:"uv0",region:"uvRegion"};function y(e,t,n,a=!1){if("lepcc-rgb"===e.encoding)return a?(0,u.mb)(t):function(e){return Array.isArray(e)?e.length<i.y9?e:new Uint8Array(e):e.length<i.y9?Array.from(e):e}((0,u.mb)(t));if("lepcc-intensity"===e.encoding)return a?(0,u.Ax)(t):function(e){return Array.isArray(e)?e.length<i.y9?e:new Uint16Array(e):e.length<i.y9?Array.from(e):e}((0,u.Ax)(t));if(null!=e.encoding&&""!==e.encoding)throw new r.A("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(l().warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(l().warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const s=function(e,t,n){const a=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:n}},i={header:a,byteOffset:a.byteCount,byteCount:0,entries:Object.create(null)};let u=a.byteCount;for(let e=0;e<t.ordering.length;e++){const n=t.ordering[e],l=(0,o.o8)(t[n]);if(l.count=a.fields.count??0,"String"===l.valueType){if(l.byteOffset=u,l.byteCount=a.fields[n+"ByteCount"],"UTF-8"!==l.encoding)throw new r.A("unsupported-encoding","Unsupported String encoding.",{encoding:l.encoding});if(l.timeEncoding&&"ECMA_ISO8601"!==l.timeEncoding)throw new r.A("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:l.timeEncoding})}else{if(!M(l.valueType))throw new r.A("unsupported-value-type","Unsupported binary valueType",{valueType:l.valueType});{const e=v(l.valueType);u+=u%e!==0?e-u%e:0,l.byteOffset=u,l.byteCount=e*l.valuesPerElement*l.count}}u+=l.byteCount??0,i.entries[n]=l}return i.byteCount=u-i.byteOffset,i}(t,e,n);b(s.byteOffset+s.byteCount,t.byteLength,"attribute");const p=s.entries.attributeValues||s.entries.objectIds;if(p){if("String"===p.valueType){const e=s.entries.attributeByteCounts,n=d(t,e),r=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,p);return p.timeEncoding?function(e,t,n){return f(e,t,n).map(e=>{const t=e?Date.parse(e):null;return null==t||Number.isNaN(t)?null:t})}(e.count,n,r):f(e.count,n,r)}return a?d(t,p):function(e,t){const n=d(e,t);if(n.length>=i.y9)return n;const r=new Array;return n.forEach((e,t)=>r.push(h(n,t))),r}(t,p)}throw new r.A("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const m={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function M(e){return m.hasOwnProperty(e)}function v(e){return M(e)?m[e].BYTES_PER_ELEMENT:0}},72385:(e,t,n)=>{function r(){return new Float32Array(3)}function o(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(e,t,n){const r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}function i(){return r()}function u(){return a(1,1,1)}function l(){return a(1,0,0)}function s(){return a(0,1,0)}function c(){return a(0,0,1)}n.d(t,{fA:()=>a,o8:()=>o,vt:()=>r});const f=i(),d=u(),h=l(),b=s(),p=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:h,UNIT_Y:b,UNIT_Z:p,ZEROS:f,clone:o,create:r,fromValues:a,ones:u,unitX:l,unitY:s,unitZ:c,zeros:i},Symbol.toStringTag,{value:"Module"}))},77690:(e,t,n)=>{n.d(t,{B8:()=>u,Ge:()=>h,I0:()=>d,KC:()=>l,a4:()=>s,hZ:()=>a,hs:()=>f,lw:()=>c,mg:()=>i,z0:()=>o});var r=n(34304);function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function a(e,t,n,r,o,a,i,u,l,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=a,e[5]=i,e[6]=u,e[7]=l,e[8]=s,e}function i(e,t){if(e===t){const n=t[1],r=t[2],o=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=o}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function u(e,t){const n=t[0],r=t[1],o=t[2],a=t[3],i=t[4],u=t[5],l=t[6],s=t[7],c=t[8],f=c*i-u*s,d=-c*a+u*l,h=s*a-i*l;let b=n*f+r*d+o*h;return b?(b=1/b,e[0]=f*b,e[1]=(-c*r+o*s)*b,e[2]=(u*r-o*i)*b,e[3]=d*b,e[4]=(c*n-o*l)*b,e[5]=(-u*n+o*a)*b,e[6]=h*b,e[7]=(-s*n+r*l)*b,e[8]=(i*n-r*a)*b,e):null}function l(e,t){const n=t[0],r=t[1],o=t[2],a=t[3],i=t[4],u=t[5],l=t[6],s=t[7],c=t[8];return e[0]=i*c-u*s,e[1]=o*s-r*c,e[2]=r*u-o*i,e[3]=u*l-a*c,e[4]=n*c-o*l,e[5]=o*a-n*u,e[6]=a*s-i*l,e[7]=r*l-n*s,e[8]=n*i-r*a,e}function s(e){const t=e[0],n=e[1],r=e[2],o=e[3],a=e[4],i=e[5],u=e[6],l=e[7],s=e[8];return t*(s*a-i*l)+n*(-s*o+i*u)+r*(l*o-a*u)}function c(e,t,n){const r=t[0],o=t[1],a=t[2],i=t[3],u=t[4],l=t[5],s=t[6],c=t[7],f=t[8],d=n[0],h=n[1],b=n[2],p=n[3],g=n[4],y=n[5],m=n[6],w=n[7],M=n[8];return e[0]=d*r+h*i+b*s,e[1]=d*o+h*u+b*c,e[2]=d*a+h*l+b*f,e[3]=p*r+g*i+y*s,e[4]=p*o+g*u+y*c,e[5]=p*a+g*l+y*f,e[6]=m*r+w*i+M*s,e[7]=m*o+w*u+M*c,e[8]=m*a+w*l+M*f,e}function f(e,t,n){const r=n[0],o=n[1],a=n[2];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e[6]=a*t[6],e[7]=a*t[7],e[8]=a*t[8],e}function d(e,t){const n=t[0],r=t[1],o=t[2],a=t[3],i=n+n,u=r+r,l=o+o,s=n*i,c=r*i,f=r*u,d=o*i,h=o*u,b=o*l,p=a*i,g=a*u,y=a*l;return e[0]=1-f-b,e[3]=c-y,e[6]=d+g,e[1]=c+y,e[4]=1-s-b,e[7]=h-p,e[2]=d-g,e[5]=h+p,e[8]=1-s-f,e}function h(e,t){const n=t[0],r=t[1],o=t[2],a=t[3],i=t[4],u=t[5],l=t[6],s=t[7],c=t[8],f=t[9],d=t[10],h=t[11],b=t[12],p=t[13],g=t[14],y=t[15],m=n*u-r*i,w=n*l-o*i,M=n*s-a*i,v=r*l-o*u,A=r*s-a*u,I=o*s-a*l,C=c*p-f*b,U=c*g-d*b,O=c*y-h*b,k=f*g-d*p,S=f*y-h*p,T=d*y-h*g;let F=m*T-w*S+M*k+v*O-A*U+I*C;return F?(F=1/F,e[0]=(u*T-l*S+s*k)*F,e[1]=(l*O-i*T-s*U)*F,e[2]=(i*S-u*O+s*C)*F,e[3]=(o*S-r*T-a*k)*F,e[4]=(n*T-o*O+a*U)*F,e[5]=(r*O-n*S-a*C)*F,e[6]=(p*I-g*A+y*v)*F,e[7]=(g*M-b*I-y*w)*F,e[8]=(b*A-p*M+y*m)*F,e):null}function b(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}const p=c,g=b;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},adjoint:l,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},determinant:s,equals:function(e,t){const n=e[0],o=e[1],a=e[2],i=e[3],u=e[4],l=e[5],s=e[6],c=e[7],f=e[8],d=t[0],h=t[1],b=t[2],p=t[3],g=t[4],y=t[5],m=t[6],w=t[7],M=t[8],v=(0,r.FD)();return Math.abs(n-d)<=v*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(o-h)<=v*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(a-b)<=v*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(i-p)<=v*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(u-g)<=v*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(l-y)<=v*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(s-m)<=v*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(c-w)<=v*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(f-M)<=v*Math.max(1,Math.abs(f),Math.abs(M))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)},fromMat2d:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},fromMat4:o,fromQuat:d,fromRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromTranslation:function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},invert:u,isOrthoNormal:function(e){const t=(0,r.FD)(),n=e[0],o=e[1],a=e[2],i=e[3],u=e[4],l=e[5],s=e[6],c=e[7],f=e[8];return Math.abs(1-(n*n+i*i+s*s))<=t&&Math.abs(1-(o*o+u*u+c*c))<=t&&Math.abs(1-(a*a+l*l+f*f))<=t},mul:p,multiply:c,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e},normalFromMat4:h,normalFromMat4Legacy:function(e,t){const n=t[0],r=t[1],o=t[2],a=t[4],i=t[5],u=t[6],l=t[8],s=t[9],c=t[10],f=c*i-u*s,d=-c*a+u*l,h=s*a-i*l,b=n*f+r*d+o*h;if(!b)return null;const p=1/b;return e[0]=f*p,e[1]=(-c*r+o*s)*p,e[2]=(u*r-o*i)*p,e[3]=d*p,e[4]=(c*n-o*l)*p,e[5]=(-u*n+o*a)*p,e[6]=h*p,e[7]=(-s*n+r*l)*p,e[8]=(i*n-r*a)*p,e},projection:function(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},rotate:function(e,t,n){const r=t[0],o=t[1],a=t[2],i=t[3],u=t[4],l=t[5],s=t[6],c=t[7],f=t[8],d=Math.sin(n),h=Math.cos(n);return e[0]=h*r+d*i,e[1]=h*o+d*u,e[2]=h*a+d*l,e[3]=h*i-d*r,e[4]=h*u-d*o,e[5]=h*l-d*a,e[6]=s,e[7]=c,e[8]=f,e},scale:f,scaleByVec2:function(e,t,n){const r=n[0],o=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e},set:a,str:function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},sub:g,subtract:b,translate:function(e,t,n){const r=t[0],o=t[1],a=t[2],i=t[3],u=t[4],l=t[5],s=t[6],c=t[7],f=t[8],d=n[0],h=n[1];return e[0]=r,e[1]=o,e[2]=a,e[3]=i,e[4]=u,e[5]=l,e[6]=d*r+h*i+s,e[7]=d*o+h*u+c,e[8]=d*a+h*l+f,e},transpose:i},Symbol.toStringTag,{value:"Module"}))},93223:(e,t,n)=>{n.d(t,{e:()=>a});var r=n(66552),o=n(10107);function a(e,t={}){const n=e instanceof r.J?e:new r.J(e,t),{alwaysWriteDefaults:a,default:i,ignoreUnknown:u=!0,name:l,nonNullable:s,readOnly:c=!1}=t;return(0,o.MZ)({type:u?n.apiValues:String,json:{type:n.jsonValues,default:i,name:l,read:!c&&{reader:n.read},write:{writer:n.write,alwaysWriteDefaults:a}},nonNullable:s,readOnly:c})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5294],{31635:(e,t,n)=>{function r(e,t,n,r){var s,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(i<3?s(a):i>3?s(t,n,a):s(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function s(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,s;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(s=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");s&&(r=function(){try{s.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}n.d(t,{Cg:()=>r,hk:()=>a,mS:()=>s}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function a(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function s(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(s);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(s,function(e){return t(e),s()})}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}},34304:(e,t,n)=>{n.d(t,{DF:()=>l,FD:()=>s,Ov:()=>i,ct:()=>h});let r=1e-6;function s(){return r}const i=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function h(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:s,setEpsilon:function(e){r=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},40876:(e,t,n)=>{n.d(t,{Eq:()=>d,G1:()=>p,TS:()=>i,Tf:()=>_,V6:()=>s,Vm:()=>x,ay:()=>l,c1:()=>y,c4:()=>a,j5:()=>h,lT:()=>u,oW:()=>c,xV:()=>b});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function s(e){return!!r[e]||!!r[e.toLowerCase()]}function i(e){return r[e]??r[e.toLowerCase()]}function a(e){return[...i(e)]}function o(e,t,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function l(e,t,n,r=1){const s=(e%360+360)%360/360,i=n<=.5?n*(t+1):n+t-n*t,a=2*n-i;return[Math.round(255*o(a,i,s+1/3)),Math.round(255*o(a,i,s)),Math.round(255*o(a,i,s-1/3)),r]}function h(e){const t=e.length>5,n=t?8:4,r=(1<<n)-1,s=t?1:17,i=t?9===e.length:5===e.length;let a=Number("0x"+e.slice(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return i&&(l=a&r,a>>=n,o[3]=s*l/255),l=a&r,a>>=n,o[2]=s*l,l=a&r,a>>=n,o[1]=s*l,l=a&r,a>>=n,o[0]=s*l,o}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),r=parseInt(e.slice(3,4),16),s=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,r+16*r,(s+16*s)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function u(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),f(t)}return f(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function f(e){return e[0]=y(e[0]),e[1]=y(e[1]),e[2]=y(e[2]),e[3]=4===e.length?p(e[3]):1,e}function d(e){let t=s(e)?i(e):null;return t??=u(e),t??=c(e),t}function x(e){const t=d(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function p(e){return g(e,0,1)}function y(e){return Math.round(g(e,0,255))}function g(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const _=2.2,m=1/_;function b(e){return e**m}},51624:(e,t,n)=>{n.d(t,{A:()=>h});var r=n(44208),s=n(69397),i=n(93687);const a=4294967296,o=new TextDecoder("utf-8"),l=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class h{constructor(e,t,n=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=99,this._init(e,t,n,r)}_init(e,t,n,r){this._data=e,this._dataView=t,this._pos=n,this._end=r}get usedMemory(){return 64+(0,s.Qf)(this._data)}asUnsafe(){return this}clone(){return new h(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),n}getSFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),n}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,n=this._toString(this._data,t,t+e);return this._skip(e),n}getBytes(){const e=this._getLength(),t=this._pos,n=this._toBytes(this._data,t,t+e);return this._skip(e),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,n,r){const s=this.getMessage(),i=e(s,t,n,r);return s.release(),i}processMessage(e){const t=this.getMessage(),n=e(t);return t.release(),n}getMessage(){const e=this._getLength(),t=h.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){h.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,n=0,r=0;if(this._end-t>=10)do{if(r=e[t++],n|=127&r,!(128&r))break;if(r=e[t++],n|=(127&r)<<7,!(128&r))break;if(r=e[t++],n|=(127&r)<<14,!(128&r))break;if(r=e[t++],n|=(127&r)<<21,!(128&r))break;if(r=e[t++],n+=268435456*(127&r),!(128&r))break;if(r=e[t++],n+=34359738368*(127&r),!(128&r))break;if(r=e[t++],n+=4398046511104*(127&r),!(128&r))break;if(r=e[t++],n+=562949953421312*(127&r),!(128&r))break;if(r=e[t++],n+=72057594037927940*(127&r),!(128&r))break;if(r=e[t++],n+=0x8000000000000000*(127&r),!(128&r))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(r=e[t],128&r);)++t,n+=(127&r)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,n+=r*s}return this._pos=t,n}_decodeSVarint(){const e=this._data;let t,n=0,r=0;const s=1&e[this._pos];if(r=e[this._pos++],n|=127&r,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<7,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<14,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n|=(127&r)<<21,!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n+=268435456*(127&r),!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n+=34359738368*(127&r),!(128&r))return s?-(n+1)/2:n/2;if(r=e[this._pos++],n+=4398046511104*(127&r),!(128&r))return s?-(n+1)/2:n/2;if(t=BigInt(n),r=e[this._pos++],t+=0x2000000000000n*BigInt(127&r),!(128&r))return Number(s?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x100000000000000n*BigInt(127&r),!(128&r))return Number(s?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x8000000000000000n*BigInt(127&r),!(128&r))return Number(s?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,n){if((n=Math.min(this._end,n))-t>l){const r=e.subarray(t,n);return o.decode(r)}let r="",s="";for(let i=t;i<n;++i){const t=e[i];128&t?s+="%"+t.toString(16):(r+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(r+=decodeURIComponent(s)),r}_toBytes(e,t,n){return n=Math.min(this._end,n),new Uint8Array(e.buffer,t,n-t)}static{this.pool=new i.A(()=>new h(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},69286:(e,t,n)=>{n.r(t),n.d(t,{default:()=>J});var r=n(74887),s=n(6774),i=n(83027),a=n(13195);function o(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function l(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function h(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function c(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=n(18989);const f=24;class d{constructor(e,t,n,r,s,i,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=n,this._letterSpacing=r,this._hAnchor=s,this._vAnchor=i,this._justify=a}getShaping(e,t,n){const r=this._letterSpacing,s=this._lineHeight,i=this._justify,a=this._maxWidth,u=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const s=n&&o(e);let i;for(const t of this._glyphItems)if(i=t[e],i)break;u.push({codePoint:e,x:f,y:d,vertical:s,glyphMosaicItem:i}),i&&(f+=i.metrics.advance+r)}let x=f;a>0&&(x=f/Math.max(1,Math.ceil(f/a)));const p=e.includes(""),y=[],g=u.length;for(let e=0;e<g-1;e++){const t=u[e].codePoint,n=l(t);if(h(t)||n){let r=0;if(10===t)r-=1e4;else if(n&&p)r+=150;else{40!==t&&65288!==t||(r+=50);const n=u[e+1].codePoint;41!==n&&65289!==n||(r+=50)}y.push(this._buildBreak(e+1,u[e].x,x,y,r,!1))}}const _=this._optimalBreaks(this._buildBreak(g,f,x,y,0,!0));let m=0;const b=t?-s:s;let I=0;for(let e=0;e<_.length;e++){const t=_[e];let n=I;for(;n<t&&c(u[n].codePoint);)u[n].glyphMosaicItem=null,++n;let r=t-1;for(;r>n&&c(u[r].codePoint);)u[r].glyphMosaicItem=null,--r;if(n<=r){const e=u[n].x;for(let t=n;t<=r;t++)u[t].x-=e,u[t].y=d;let t=u[r].x;u[r].glyphMosaicItem&&(t+=u[r].glyphMosaicItem.metrics.advance),m=Math.max(t,m),i&&this._applyJustification(u,n,r)}I=t,d+=b}if(u.length>0){const e=_.length-1,n=(i-this._hAnchor)*m;let r=(-this._vAnchor*(e+1)+.5)*s;t&&e&&(r+=e*s);for(const e of u)e.x+=n,e.y+=r}return u.filter(e=>e.glyphMosaicItem)}static getTextBox(e,t){if(!e.length)return null;let n=1/0,r=1/0,s=0,i=0;for(const a of e){const e=a.glyphMosaicItem.metrics.advance,o=a.x,l=a.y-17,h=o+e,c=l+t;n=Math.min(n,o),s=Math.max(s,h),r=Math.min(r,l),i=Math.max(i,c)}return{x:n,y:r,width:s-n,height:i-r}}static getBox(e){if(!e.length)return null;let t=1/0,n=1/0,r=0,s=0;for(const i of e){const{height:e,left:a,top:o,width:l}=i.glyphMosaicItem.metrics,h=i.x,c=i.y-(e-Math.abs(o)),u=h+l+a,f=c+e;t=Math.min(t,h),r=Math.max(r,u),n=Math.min(n,c),s=Math.max(s,f)}return{x:t,y:n,width:r-t,height:s-n}}static addDecoration(e,t){const n=e.length;if(0===n)return;let r=e[0].x+e[0].glyphMosaicItem.metrics.left,s=e[0].y;for(let i=1;i<n;i++){const n=e[i];if(n.y!==s){const a=e[i-1].x+e[i-1].glyphMosaicItem.metrics.left+e[i-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:a-r,height:8,left:0,top:0,advance:0},page:0,code:0}}),s=n.y,r=n.x+n.glyphMosaicItem.metrics.left}}const i=e[n-1].x+e[n-1].glyphMosaicItem.metrics.left+e[n-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:i-r,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,n,r){const s=(e-t)*(e-t);return r?e<t?s/2:2*s:s+Math.abs(n)*n}_buildBreak(e,t,n,r,s,i){let a=null,o=this._breakScore(t,n,s,i);for(const e of r){const r=t-e.x,l=this._breakScore(r,n,s,i)+e.score;l<=o&&(a=e,o=l)}return{index:e,x:t,score:o,previousBreak:a}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,n){const r=e[n],s=r.vertical?f:r.glyphMosaicItem?r.glyphMosaicItem.metrics.advance:0,i=(r.x+s)*this._justify;for(let r=t;r<=n;r++)e[r].x-=i}}const x=.5;class p{constructor(e,t,n=0,r=-1,s=x){this.x=e,this.y=t,this.angle=n,this.segment=r,this.minzoom=s}}class y{constructor(e,t,n,r,s,i=x,o=a.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=n,this.page=r,this.alternateVerticalGlyph=s,this.minzoom=i,this.maxzoom=o}}class g{constructor(e,t,n,r,s,i,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=n,this.br=r,this.mosaicRect=s,this.labelAngle=i,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class _{constructor(e){this.shapes=e}}class m{getIconPlacement(e,t,n){const r=new s.bR(e.x,e.y),i=0===n.rotationAlignment,o=n.keepUpright;let l=n.rotate*a.os;i&&(l+=e.angle);const h=new _([]);return n.allowOverlap&&n.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,r,t,n,l),i&&o&&this._addIconPlacement(h,r,t,n,l+a.Jo),h}_addIconPlacement(e,t,n,r,i){const o=n.rasterizationScale,l=n.width/o,h=n.height/o,c=r.offset;let u=c[0],f=c[1];switch(r.anchor){case 0:u-=l/2,f-=h/2;break;case 1:f-=h/2;break;case 2:u-=l,f-=h/2;break;case 3:u-=l/2;break;case 4:u-=l/2,f-=h;break;case 5:break;case 7:f-=h;break;case 6:u-=l;break;case 8:u-=l,f-=h}const d=n.rect,p=2/o,y=u-p,_=f-p,m=y+d.width/o,b=_+d.height/o,I=new s.bR(y,_),w=new s.bR(m,b),v=new s.bR(y,b),M=new s.bR(m,_);if(0!==i){const e=Math.cos(i),t=Math.sin(i);I.rotate(e,t),w.rotate(e,t),v.rotate(e,t),M.rotate(e,t)}const k=new g(I,M,v,w,d,i,0,256,t,x,a.MG,0);if(e.shapes.push(k),!r.allowOverlap||!r.ignorePlacement){const n=r.size,s=r.padding,o={xTile:t.x,yTile:t.y,dxPixels:u*n-s,dyPixels:f*n-s,hard:!r.optional,partIndex:0,width:l*n+2*s,height:h*n+2*s,angle:i,minLod:x,maxLod:a.MG};e.iconColliders.push(o)}}getTextPlacement(e,t,n,r){const o=new s.bR(e.x,e.y),l=r.rotate*a.os,h=0===r.rotationAlignment,c=r.keepUpright,u=r.padding;let p=x;const m=h?e.angle:0,b=e.segment>=0&&h,I=r.allowOverlap&&r.ignorePlacement?null:[],w=[],v=!b;let M=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,P=M,V=k;const A=(b||h)&&c,D=r.size/f;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let L,S=0,T=0;if(!b&&B){const e=d.getTextBox(t,r.lineHeight*f);switch(r.anchor){case 1:S=e.height/2,T=-e.width/2;break;case 2:S=-e.height/2,T=e.width/2;break;case 3:S=e.height/2,T=e.width/2;break;case 4:S=-e.height/2,T=-e.width/2;break;case 5:S=e.height;break;case 7:T=-e.width;break;case 6:T=e.width;break;case 8:S=-e.height}}S+=r.offset[0]*f,T+=r.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,_=t.metrics,R=t.page;if(I&&v){if(void 0!==L&&L!==f.y){let t,n,s,i;B?(t=-V+S,n=M+T,s=V-P,i=k-M):(t=M+S,n=P+T,s=k-M,i=V-P);const o={xTile:e.x,yTile:e.y,dxPixels:t*D-u,dyPixels:n*D-u,hard:!r.optional,partIndex:1,width:s*D+2*u,height:i*D+2*u,angle:l,minLod:x,maxLod:a.MG};I.push(o),M=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,P=M,V=k}L=f.y}const C=[];if(b){const r=.5*t.metrics.width,s=(f.x+_.left-4+r)*D*i.ih;if(p=this._placeGlyph(e,p,s,n,e.segment,1,f.vertical,R,C),c&&(p=this._placeGlyph(e,p,s,n,e.segment,-1,f.vertical,R,C)),p>=2)break}else C.push(new y(o,m,m,R,!1)),h&&c&&C.push(new y(o,m+a.Jo,m+a.Jo,R,!1));const z=f.x+_.left,U=f.y-17-_.top,F=z+_.width,E=U+_.height;let N,O,G,q,j,W,Z,K;if(!b&&B)if(f.vertical){const e=(z+F)/2-_.height/2,t=(U+E)/2+_.width/2;N=new s.bR(-t-4+S,e-4+T),O=new s.bR(N.x+d.width,N.y+d.height),G=new s.bR(N.x,O.y),q=new s.bR(O.x,N.y)}else N=new s.bR(4-U+S,z-4+T),O=new s.bR(N.x-d.height,N.y+d.width),G=new s.bR(O.x,N.y),q=new s.bR(N.x,O.y);else N=new s.bR(z-4+S,U-4+T),O=new s.bR(N.x+d.width,N.y+d.height),G=new s.bR(N.x,O.y),q=new s.bR(O.x,N.y);for(const t of C){let n,i,a,o;if(t.alternateVerticalGlyph){if(!j){const e=(U+E)/2+T;j=new s.bR((z+F)/2+S-_.height/2-4,e+_.width/2+4),W=new s.bR(j.x+d.height,j.y-d.width),Z=new s.bR(W.x,j.y),K=new s.bR(j.x,W.y)}n=j,i=Z,a=K,o=W}else n=N,i=G,a=q,o=O;const h=U,c=E,x=t.glyphAngle+l;if(0!==x){const e=Math.cos(x),t=Math.sin(x);n=n.clone(),i=i?.clone(),a=a?.clone(),o=o?.clone(),n.rotate(e,t),o?.rotate(e,t),i?.rotate(e,t),a?.rotate(e,t)}let p=0,y=256;if(b&&B?f.vertical?t.alternateVerticalGlyph?(p=32,y=96):(p=224,y=32):(p=224,y=96):(p=192,y=64),w.push(new g(n,a,i,o,d,t.labelAngle,p,y,t.anchor,t.minzoom,t.maxzoom,t.page)),I&&(!A||this._legible(t.labelAngle)))if(v)z<M&&(M=z),h<P&&(P=h),F>k&&(k=F),c>V&&(V=c);else if(t.minzoom<2){const n={xTile:e.x,yTile:e.y,dxPixels:(z+S)*D-u,dyPixels:(h+S)*D-u,hard:!r.optional,partIndex:1,width:(F-z)*D+2*u,height:(c-h)*D+2*u,angle:x,minLod:t.minzoom,maxLod:t.maxzoom};I.push(n)}}}if(p>=2)return null;if(I&&v){let t,n,s,i;B?(t=-V+S,n=M+T,s=V-P,i=k-M):(t=M+S,n=P+T,s=k-M,i=V-P);const o={xTile:e.x,yTile:e.y,dxPixels:t*D-u,dyPixels:n*D-u,hard:!r.optional,partIndex:1,width:s*D+2*u,height:i*D+2*u,angle:l,minLod:x,maxLod:a.MG};I.push(o)}const R=new _(w);return I&&I.length>0&&(R.textColliders=I),R}_legible(e){const t=(0,a.z0)(e);return t<65||t>=193}_placeGlyph(e,t,n,r,i,o,l,h,c){let u=o;const f=u<0?(0,a.Wh)(e.angle+a.Jo,a.pJ):e.angle;let d=0;n<0&&(u*=-1,n*=-1,d=a.Jo),u>0&&++i;let x=new s.bR(e.x,e.y),p=r[i],g=a.MG;if(r.length<=i)return g;for(;;){const e=p.x-x.x,s=p.y-x.y,o=Math.sqrt(e*e+s*s),_=Math.max(n/o,t),m=e/o,b=s/o,I=(0,a.Wh)(Math.atan2(b,m)+d,a.pJ);if(c.push(new y(x,f,I,h,!1,_,g)),l&&c.push(new y(x,f,I,h,!0,_,g)),_<=t)return _;x=p.clone();do{if(i+=u,r.length<=i||i<0)return _;p=r[i]}while(x.isEqual(p));let w=p.x-x.x,v=p.y-x.y;const M=Math.sqrt(w*w+v*v);w*=o/M,v*=o/M,x.x-=w,x.y-=v,g=_}}}var b=n(51624),I=n(15585);class w{constructor(e,t,n=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=n;const r=t.keys,s=t.values,i=e.asUnsafe();for(;i.next();)switch(i.tag()){case 1:this.id=i.getUInt64();break;case 2:{const e=i.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const n=e.getUInt32(),i=e.getUInt32();t[r[n]]=s[i]}e.release();break}case 3:this.type=i.getUInt32();break;case 4:this._pbfGeometry=i.getMessage();break;default:i.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let n,r;this._pbfGeometry=null,e?e.reset(this.type):n=[];let i,a=1,o=0,l=0,h=0;for(;!t.empty();){if(0===o){const e=t.getUInt32();a=7&e,o=e>>3}switch(o--,a){case 1:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):n&&(r&&n.push(r),r=[],r.push(new s.bR(l,h)));break;case 2:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):r&&r.push(new s.bR(l,h));break;case 7:e?e.close():r&&!r[0].equals(l,h)&&r.push(r[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?i=e.result():n&&(r&&n.push(r),i=n),t.release(),this._geometry=i,i}}var v=n(80081);class M extends v.A{constructor(){super(12)}add(e,t,n){const r=this.array;r.push(e),r.push(t),r.push(n)}}v.A;class k{constructor(e){this.extent=i.vA,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(k._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}class P extends v.A{constructor(e){super(e)}add(e,t,n,r,s,i,a,o,l,h,c,u){const f=this.array;let d=v.A.i1616to32(e,t);f.push(d);const x=31;d=v.A.i8888to32(Math.round(x*n),Math.round(x*r),Math.round(x*s),Math.round(x*i)),f.push(d),d=v.A.i8888to32(Math.round(x*a),Math.round(x*o),Math.round(x*l),Math.round(x*h)),f.push(d),d=v.A.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class V extends v.A{constructor(e){super(e)}add(e,t,n){const r=this.array;r.push(v.A.i1616to32(e,t)),n&&r.push(...n)}}class A extends v.A{constructor(e){super(e)}add(e,t,n,r,s,i,a){const o=this.array,l=this.index;let h=v.A.i1616to32(e,t);return o.push(h),h=v.A.i8888to32(Math.round(15*n),Math.round(15*r),s,i),o.push(h),a&&o.push(...a),l}}class D extends v.A{constructor(e){super(e)}add(e,t,n,r,s,i,o,l,h,c,u,f){const d=this.array;let x=v.A.i1616to32(e,t);d.push(x),x=v.A.i1616to32(Math.round(8*n),Math.round(8*r)),d.push(x),x=v.A.i8888to32(s/4,i/4,l,h),d.push(x),x=v.A.i8888to32(0,(0,a.z0)(o),10*c,Math.min(10*u,255)),d.push(x),f&&d.push(...f)}}class B extends v.A{constructor(e){super(e)}add(e,t,n,r,s){const i=this.array,a=v.A.i1616to32(2*e+n,2*t+r);i.push(a),s&&i.push(...s)}}class L{constructor(e,t,n){this.layerExtent=i.vA,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=n,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,n){}}class S extends L{constructor(e,t,n,r,s){super(e,t,n),this.type=4,this._circleVertexBuffer=r,this._circleIndexBuffer=s}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,n=this._circleIndexBuffer;this._circleIndexStart=3*n.index,this._circleIndexCount=0;const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);for(const i of this._features){const a=i.getGeometry(e);if(!a)continue;const o=r.circleMaterial.encodeAttributes(i,s,r);for(const e of a)if(e)for(const r of e){const e=t.index;t.add(r.x,r.y,0,0,o),t.add(r.x,r.y,0,1,o),t.add(r.x,r.y,1,0,o),t.add(r.x,r.y,1,1,o),n.add(e,e+1,e+2),n.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._circleIndexStart,t[r++]=this._circleIndexCount,t[r++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)n[r++]=this._circleVertexBuffer.array[e];t[r++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[r++]=this._circleIndexBuffer.array[e];return t.buffer}}var T=n(98291),R=n(83349);class C extends L{constructor(e,t,n,r,s,i,a){super(e,t,n),this.type=1,this._patternMap=new Map,this._fillVertexBuffer=r,this._fillIndexBuffer=s,this._outlineVertexBuffer=i,this._outlineIndexBuffer=a}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("fill-pattern");if(i)if(i.isDataDriven)for(const e of this._features)t(i.getValue(s,e),!0);else t(i.getValue(s),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,n=this.zoom,{fillMaterial:r,outlineMaterial:s,hasDataDrivenFill:i,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let h=!o&&t.getPaintValue("fill-antialias",n);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",n),r=t.getPaintValue("fill-opacity",n+1);e<1&&r<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",n),r=t.getPaintValue("fill-color",n+1);e[3]<1&&r[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const i=[];for(const l of c){const c=o.getValue(n,l),f=this._spriteInfo[c];if(!f?.rect)continue;const d=r.encodeAttributes(l,n,t,f),x=h&&a?s.encodeAttributes(l,n,t):[],p=l.getGeometry(e);i.push({ddFillAttributes:d,ddOutlineAttributes:x,page:f.page,geometry:p}),i.sort((e,t)=>e.page-t.page);for(const{ddFillAttributes:e,ddOutlineAttributes:n,page:r,geometry:s}of i)this._processFeature(s,h,t.outlineUsesFillColor,e,n,u,r)}}else for(const o of c){const l=i?r.encodeAttributes(o,n,t):null,c=h&&a?s.encodeAttributes(o,n,t):null,f=o.getGeometry(e);this._processFeature(f,h,t.outlineUsesFillColor,l,c,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._fillIndexStart,t[r++]=this._fillIndexCount,t[r++]=this._outlineIndexStart,t[r++]=this._outlineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)n[r++]=this._fillVertexBuffer.array[e];t[r++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[r++]=this._fillIndexBuffer.array[e];t[r++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)n[r++]=this._outlineVertexBuffer.array[e];t[r++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[r++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n,r,s,i,a){if(!e)return;const o=e.length,l=!s||0===s.length;if(t&&(!n||l))for(let t=0;t<o;t++)this._processOutline(e[t],s);let h;for(let t=0;t<o;t++){const n=C._area(e[t]);n>32?(void 0!==h&&this._processFill(e,h,r,i,a),h=[t]):n<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,r,i,a)}_processOutline(e,t){const n=this._outlineVertexBuffer,r=this._outlineIndexBuffer,i=r.index;let a,o,l;const h=new s.bR(0,0),c=new s.bR(0,0),u=new s.bR(0,0);let f=-1,d=-1,x=-1,p=-1,y=-1,g=!1,_=e.length;if(_<2)return;const m=e[0];let b=e[_-1];for(;_&&b.isEqual(m);)--_,b=e[_-1];if(!(_-0<2)){for(let s=0;s<_;++s){0===s?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=s!==_-1?e[s+1]:e[0],h.assign(c));const i=this._isClipEdge(a,o);-1===p&&(g=i),c.assignSub(l,o),c.normalize(),c.rightPerpendicular();const m=h.x*c.y-h.y*c.x;u.assignAdd(h,c),u.normalize();const b=-u.x*-h.x+-u.y*-h.y;let I=Math.abs(0!==b?1/b:1);I>8&&(I=8),m>=0?(x=n.add(o.x,o.y,h.x,h.y,0,1,t),-1===p&&(p=x),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),d=n.add(o.x,o.y,I*-u.x,I*-u.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),f=d,d=x,x=n.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),d=n.add(o.x,o.y,c.x,c.y,0,1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x)):(x=n.add(o.x,o.y,I*u.x,I*u.y,0,1,t),-1===p&&(p=x),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),d=n.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),f=d,d=x,x=n.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x),f=n.add(o.x,o.y,-c.x,-c.y,0,-1,t),f>=0&&d>=0&&x>=0&&!i&&r.add(f,d,x))}f>=0&&d>=0&&p>=0&&!g&&r.add(f,d,p),f>=0&&p>=0&&y>=0&&!g&&r.add(f,y,p),this._outlineIndexCount+=3*(r.index-i)}}_processFill(e,t,n,r,s){let i;t.length>1&&(i=[]);let a=0;for(const n of t)0!==a&&i.push(a),a+=e[n].length;const o=2*a,l=T.A.acquire();for(const n of t){const t=e[n],r=t.length;for(let e=0;e<r;++e)l.push(t[e].x,t[e].y)}const h=(0,R.e)(l,i,2);if(R.e.deviation(l,i,2,h)>0){const r=t.map(t=>e[t].length),{buffer:i,vertexCount:a}=(0,I.l)(l,r);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(i[2*e],i[2*e+1],n);for(let t=0;t<a;t+=3){const n=e+t;this._fillIndexBuffer.add(n,n+1,n+2)}if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=a:e.set(s,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let r=0;for(;r<o;)this._fillVertexBuffer.add(l[r++],l[r++],n);let i=0;for(;i<e;)this._fillIndexBuffer.add(t+h[i++],t+h[i++],t+h[i++]);if(void 0!==s){const t=this._patternMap,n=t.get(s);n?n[1]+=e:t.set(s,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}T.A.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const n=e.length-1;for(let r=0;r<n;r++)t+=(e[r].x-e[r+1].x)*(e[r].y+e[r+1].y);return t+=(e[n].x-e[0].x)*(e[n].y+e[0].y),.5*t}}var z=n(83773);class U extends L{constructor(e,t,n,r,s){super(e,t,n),this.type=2,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=r,this.tessellationProperties._lineIndexBuffer=s,this._lineTessellator=new z.i(F(this.tessellationProperties),E(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("line-pattern"),a=r.getPaintProperty("line-dasharray"),o=r.getLayoutProperty("line-cap");if(!i&&!a)return;const l=o?.getValue(s)||0,h=o?.isDataDriven,c=i?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?i.getValue(s,e):this._getDashArrayKey(e,s,r,a,h,o,l));else if(i)t(i.getValue(s));else if(a){const e=a.getValue(s);t(r.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,n=this.zoom,r=this._features,s=this._tessellationOptions,{hasDataDrivenLine:i,lineMaterial:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),h=o?.isDataDriven,c=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:t.getLayoutValue("line-cap",n),x=d||0,p=!!f;u=t.getLayoutProperty("line-join");const y=u?.isDataDriven?u:null,g=y?null:t.getLayoutValue("line-join",n);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",n);u=t.getLayoutProperty("line-round-limit");const b=u?.isDataDriven?u:null,I=b?null:t.getLayoutValue("line-round-limit",n);u=t.getPaintProperty("line-width");const w=u?.isDataDriven?u:null,v=w?null:t.getPaintValue("line-width",n);u=t.getPaintProperty("line-offset");const M=u?.isDataDriven?u:null,k=M?null:t.getPaintValue("line-offset",n);if(h||c){const i=[];for(const s of r){const r=h?o.getValue(n,s):this._getDashArrayKey(s,n,t,l,p,f,x),c=this._spriteInfo[r];if(!c?.rect)continue;const u=a.encodeAttributes(s,n,t,c),P=s.getGeometry(e);i.push({ddAttributes:u,page:c.page,cap:f?f.getValue(n,s):d,join:y?y.getValue(n,s):g,miterLimit:_?_.getValue(n,s):m,roundLimit:b?b.getValue(n,s):I,halfWidth:.5*(w?w.getValue(n,s):v),offset:M?M.getValue(n,s):k,geometry:P})}i.sort((e,t)=>e.page-t.page),s.textured=!0;for(const{ddAttributes:e,page:t,cap:n,join:r,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of i)s.capType=n,s.joinType=r,s.miterLimit=a,s.roundLimit=o,s.halfWidth=l,s.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(n),t=this._spriteInfo[e];if(!t?.rect)return}s.textured=!(!o&&!l),s.capType=d,s.joinType=g,s.miterLimit=m,s.roundLimit=I,s.halfWidth=.5*v,s.offset=k;for(const o of r){const r=i?a.encodeAttributes(o,n,t):null;f&&(s.capType=f.getValue(n,o)),y&&(s.joinType=y.getValue(n,o)),_&&(s.miterLimit=_.getValue(n,o)),b&&(s.roundLimit=b.getValue(n,o)),w&&(s.halfWidth=.5*w.getValue(n,o)),M&&(s.offset=M.getValue(n,o));const l=o.getGeometry(e);this._processFeature(l,r)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._lineIndexStart,t[r++]=this._lineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)n[r++]=this.tessellationProperties._lineVertexBuffer.array[e];t[r++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[r++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n){if(!e)return;const r=e.length;for(let s=0;s<r;s++)this._processGeometry(e[s],t,n)}_processGeometry(e,t,n){if(e.length<2)return;let r,s,i=e[0],a=1;for(;a<e.length;)r=e[a].x-i.x,s=e[a].y-i.y,r*r+s*s<1e-6?e.splice(a,1):(i=e[a],++a);if(e.length<2)return;const o=this.tessellationProperties._lineIndexBuffer,l=3*o.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const h=3*o.index-l;if(void 0!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=h:e.set(n,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,n,r,s,i,a){const o=s?i.getValue(t,e):a,l=r.getValue(t,e);return n.getDashKey(l,o)}}const F=e=>(t,n,r,s,i,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,n,o,l,r,s,i,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),E=e=>(t,n,r)=>{e._lineIndexBuffer.add(t,n,r)};var N=n(32488),O=n(97768),G=n(799),q=n(4264);function j(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class W extends L{constructor(e,t,n,r,s,i,a,o,l){super(t,n,l.getSpriteItems()),this.type=3,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=r,this._iconIndexBuffer=s,this._textVertexBuffer=i,this._textIndexBuffer=a,this._placementEngine=o,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new N.A}getResources(e,t,n){const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);const i=r.getLayoutProperty("icon-image"),a=r.getLayoutProperty("text-field");let o=r.getLayoutProperty("text-transform"),l=r.getLayoutProperty("text-font");const h=[];let c,u,f,d;i&&!i.isDataDriven&&(c=i.getValue(s)),a&&!a.isDataDriven&&(u=a.getValue(s)),o&&o.isDataDriven||(f=r.getLayoutValue("text-transform",s),o=null),l&&l.isDataDriven||(d=r.getLayoutValue("text-font",s),l=null);for(const x of this._features){const p=x.getGeometry(e);if(!p||0===p.length)continue;let y,g;i&&(y=i.isDataDriven?i.getValue(s,x):this._replaceKeys(c,x.values),y&&t(y));let _=!1;if(a&&(g=a.isDataDriven?a.getValue(s,x):this._replaceKeys(u,x.values),g)){switch(g=g.replaceAll("\\n","\n"),o&&(f=o.getValue(s,x)),f){case 2:g=g.toLowerCase();break;case 1:g=g.toUpperCase()}if(W._bidiEngine.hasBidiChar(g)){let e;e="rtl"===W._bidiEngine.checkContextual(g)?"IDNNN":"ICNNN",g=W._bidiEngine.bidiTransform(g,e,"VLYSN"),_=!0}if(g.length>0){l&&(d=l.getValue(s,x));for(const e of d){let t=n[e];t||(t=n[e]=new Set);for(const e of g){const n=e.codePointAt(0);null!=n&&t.add(n)}}}}if(!y&&!g)continue;const m=r.getLayoutValue("symbol-sort-key",s,x),b={feature:x,sprite:y,label:g,rtl:_,geometry:p,hash:(g?(0,G.Wm)(g):0)^(y?(0,G.Wm)(y):0),priority:m,textFont:d};h.push(b)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,n=this.zoom,r=t.getLayoutValue("symbol-placement",n),s=0!==r,o=t.getLayoutValue("symbol-spacing",n)*i.ih,l=t.getLayoutProperty("icon-image"),h=t.getLayoutProperty("text-field"),c=l?new q.aR(t,n,s):null,u=h?new q.uU(t,n,s):null,x=this._workerTileHandler;let y;l&&(y=x.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const g=[];let _=1;u?.size&&(_=u.size/f);const m=u?u.maxAngle*a.os:0,b=u?u.size*i.ih:0;for(const e of this._symbolFeatures){let t,a;c&&y&&e.sprite&&(t=y[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(n,e.feature);let l=0;const h=e.label;if(h){(0,O.Lw)(u),u.update(n,e.feature);const t=s&&0===u.rotationAlignment?u.keepUpright:u.writingMode&&u.writingMode.includes(1);let r=.5;switch(u.anchor){case 5:case 1:case 7:r=0;break;case 6:case 2:case 8:r=1}let o=.5;switch(u.anchor){case 5:case 3:case 6:o=0;break;case 7:case 4:case 8:o=1}let c=.5;switch(u.justify){case 0:c=r;break;case 1:c=0;break;case 3:c=1}const p=u.letterSpacing*f,y=s?0:u.maxWidth*f,g=u.lineHeight*f,m=e.textFont.map(e=>x.getGlyphItems(e));if(a=new d(m,y,g,p,r,o,c).getShaping(h,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const n of a)e=Math.min(e,n.x),t=Math.max(t,n.x);l=(t-e+48)*_*i.ih}}for(let n of e.geometry){const h=[];if(1===r){if(a?.length&&u?.size){const e=u.size*i.ih*(2+Math.min(2,4*Math.abs(u.offset[1])));n=W._smoothVertices(n,e)}W._pushAnchors(h,n,o,l)}else 2===r?W._pushCenterAnchor(h,n):3===e.feature.type?W._pushCentroid(h,n):h.push(new p(n[0].x,n[0].y));for(const r of h){if(r.x<0||r.x>i.vA||r.y<0||r.y>i.vA)continue;if(s&&l>0&&0===u?.rotationAlignment&&!W._honorsTextMaxAngle(n,r,l,m,b))continue;const o={shaping:a,line:n,iconMosaicItem:t,anchor:r,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};g.push(o),this._processFeature(o,c,u)}}}g.sort(j),this._addPlacedGlyphs(),this._symbolInstances=g}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=W._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),n=new Int32Array(t.buffer),r=new Float32Array(t.buffer),[s,i,a]=this._sourceTileKey.split("/");let o=0;t[o++]=this.type,t[o++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[o++]=this.layerUIDs[e];t[o++]=this._isIconSDF?1:0,t[o++]=parseFloat(s),t[o++]=parseFloat(i),t[o++]=parseFloat(a),t[o++]=this.markerPageMap.size;for(const[e,[n,r]]of this.markerPageMap)t[o++]=e,t[o++]=n,t[o++]=r;t[o++]=this.glyphsPageMap.size;for(const[e,[n,r]]of this.glyphsPageMap)t[o++]=e,t[o++]=n,t[o++]=r;t[o++]=this._iconVertexBuffer.index/4,t[o++]=this._textVertexBuffer.index/4,o=W.serializeSymbols(t,n,r,o,this._symbolInstances),t[o++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)n[o++]=this._iconVertexBuffer.array[e];t[o++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[o++]=this._iconIndexBuffer.array[e];t[o++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)n[o++]=this._textVertexBuffer.array[e];t[o++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[o++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const n of e||[]){t+=5,t+=1;for(const e of n.textColliders)t+=10;for(const e of n.iconColliders)t+=10;t+=1,t+=2*n.textVertexRanges.length,t+=1,t+=2*n.iconVertexRanges.length}return t}static serializeSymbols(e,t,n,r,s){s=s||[],t[r++]=s.length;for(const e of s){t[r++]=e.anchor.x,t[r++]=e.anchor.y,t[r++]=e.symbolFeature.hash,t[r++]=e.symbolFeature.priority,t[r++]=e.symbolFeature.feature.featureIndex,t[r++]=e.textColliders.length+e.iconColliders.length;for(const s of e.textColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;for(const s of e.iconColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;t[r++]=e.textVertexRanges.length;for(const[n,s]of e.textVertexRanges)t[r++]=n,t[r++]=s;t[r++]=e.iconVertexRanges.length;for(const[n,s]of e.iconVertexRanges)t[r++]=n,t[r++]=s}return r}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,(e,n)=>n in t?t[n]:"")}_processFeature(e,t,n){const{line:r,iconMosaicItem:s,shaping:i,anchor:o}=e,l=this.zoom,h=this.layer,c=!!s;let u=!0;c&&(u=t?.optional||!s);const f=i&&i.length>0,d=!f||n?.optional;let x,p;if(c&&(x=this._placementEngine.getIconPlacement(o,s,t)),(x||u)&&(f&&(p=this._placementEngine.getTextPlacement(o,i,r,n)),p||d)){if(x&&p||(d||u?d||p?u||x||(p=null):x=null:(x=null,p=null)),p){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,p.shapes,l,n.rotationAlignment,t),p.textColliders){e.textColliders=p.textColliders;for(const e of p.textColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,h=e.dxPixels*r+(e.dyPixels+e.height)*n,c=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,c),d=Math.max(s,a,l,c),x=Math.min(i,o,h,u),p=Math.max(i,o,h,u);e.dxPixels=f,e.dyPixels=x,e.width=d-f,e.height=p-x}}}}if(x){const n=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,x.shapes,l,s.page,1===t.rotationAlignment,n),x.iconColliders){e.iconColliders=x.iconColliders;for(const e of x.iconColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,h=e.dxPixels*r+(e.dyPixels+e.height)*n,c=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,c),d=Math.max(s,a,l,c),x=Math.min(i,o,h,u),p=Math.max(i,o,h,u);e.dxPixels=f,e.dyPixels=x,e.width=d-f,e.height=p-x}}}}}}_addPlacedIcons(e,t,n,r,s,i){const o=Math.max(n-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=s?0:Math.max(n+(0,a.p6)(u.minzoom),o),f=s?25:Math.min(n+(0,a.p6)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,x=u.tr,p=u.bl,y=u.br,g=u.mosaicRect,_=u.labelAngle,m=u.minAngle,b=u.maxAngle,I=u.anchor,w=l.index,v=g.x,M=g.y,k=v+g.width,P=M+g.height,V=l.index;l.add(I.x,I.y,d.x,d.y,v,M,_,m,b,t,f,i),l.add(I.x,I.y,x.x,x.y,k,M,_,m,b,t,f,i),l.add(I.x,I.y,p.x,p.y,v,P,_,m,b,t,f,i),l.add(I.x,I.y,y.x,y.y,k,P,_,m,b,t,f,i),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===V?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([V,4]),h.add(w,w+1,w+2),h.add(w+1,w+2,w+3),c.has(r)?c.get(r)[1]+=6:c.set(r,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,n=this._glyphMap;for(const[r,s]of this._glyphBufferDataStorage)for(const i of s){const s=e.index,a=i.symbolInstance,o=i.ddAttributes,l=e.index;e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tl[0],i.tl[1],i.xmin,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tr[0],i.tr[1],i.xmax,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.bl[0],i.bl[1],i.xmin,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.br[0],i.br[1],i.xmax,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(s,s+1,s+2),t.add(s+1,s+2,s+3),n.has(r)?n.get(r)[1]+=6:n.set(r,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,n,r,s){const i=Math.max(n-1,0),o=1===r;let l,h,c,u,f,d,x,p,y,g,_;for(const r of t)l=o?0:Math.max(n+(0,a.p6)(r.minzoom),i),h=o?25:Math.min(n+(0,a.p6)(r.maxzoom),25),h<=l||(c=r.tl,u=r.tr,f=r.bl,d=r.br,x=r.labelAngle,p=r.minAngle,y=r.maxAngle,g=r.anchor,_=r.mosaicRect,this._glyphBufferDataStorage.has(r.page)||this._glyphBufferDataStorage.set(r.page,[]),this._glyphBufferDataStorage.get(r.page).push({glyphAnchor:[g.x,g.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:x,minAngle:p,maxAngle:y,minLod:l,maxLod:h,placementLod:i,symbolInstance:e,ddAttributes:s}))}static _pushAnchors(e,t,n,r){n+=r;let i=0;const o=t.length-1;for(let e=0;e<o;e++)i+=s.bR.distance(t[e],t[e+1]);let l=r||n;if(l*=.5,i<=l)return;const h=l/i;let c=0,u=-(n=i/Math.max(Math.round(i/n),1))/2;const f=t.length-1;for(let r=0;r<f;r++){const s=t[r],i=t[r+1],o=i.x-s.x,l=i.y-s.y,f=Math.sqrt(o*o+l*l);let d;for(;u+n<c+f;){u+=n;const t=(u-c)/f,x=(0,a.GW)(s.x,i.x,t),y=(0,a.GW)(s.y,i.y,t);void 0===d&&(d=Math.atan2(l,o)),e.push(new p(x,y,d,r,h))}c+=f}}static _pushCenterAnchor(e,t){let n=0;const r=t.length-1;for(let e=0;e<r;e++)n+=s.bR.distance(t[e],t[e+1]);const i=n/2;let o=0;const l=t.length-1;for(let n=0;n<l;n++){const r=t[n],s=t[n+1],l=s.x-r.x,h=s.y-r.y,c=Math.sqrt(l*l+h*h);if(i<o+c){const t=(i-o)/c,u=(0,a.GW)(r.x,s.x,t),f=(0,a.GW)(r.y,s.y,t),d=Math.atan2(h,l);return void e.push(new p(u,f,d,n,0))}o+=c}}static _deviation(e,t,n){const r=(t.x-e.x)*(n.x-t.x)+(t.y-e.y)*(n.y-t.y),s=(t.x-e.x)*(n.y-t.y)-(t.y-e.y)*(n.x-t.x);return Math.atan2(s,r)}static _honorsTextMaxAngle(e,t,n,r,i){let a=0;const o=n/2;let l=new s.bR(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=s.bR.distance(e[h],l),l=e[h]}a+=s.bR.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;a<o;){const t=e[h];let n,o=h;do{if(++o,o===f)return!1;n=e[o]}while(n.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(n));const x=this._deviation(t,n,l);for(c.push({deviation:x,distToAnchor:a}),u+=x;a-c[0].distToAnchor>i;)u-=c.shift().deviation;if(Math.abs(u)>r)return!1;a+=s.bR.distance(n,l),h=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let n=e.length;if(n<3)return e;const r=[];let i=0,a=0;r.push(0);for(let t=1;t<n;t++){const n=s.bR.distance(e[t],e[t-1]);n>0&&(i+=n,r.push(i),a++,a!==t&&(e[a]=e[t]))}if(n=a+1,n<3)return e;t=Math.min(t,.2*i);const o=e[0].x,l=e[0].y,h=e[n-1].x,c=e[n-1].y,u=s.bR.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[n-1],e[n-2]),u.normalize(),e[n-1].x+=t*u.x,e[n-1].y+=t*u.y,r[0]-=t,r[n-1]+=t;const f=[];f.push(new s.bR(o,l));const d=1e-6,x=.5*t;for(let i=1;i<n-1;i++){let a=0,o=0,l=0;for(let n=i-1;n>=0;n--){const s=x+r[n+1]-r[i];if(s<0)break;const h=r[n+1]-r[n],c=r[i]-r[n]<x?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,p=c*h/t,y=e[n+1],g=e[n].x-y.x,_=e[n].y-y.y;a+=p/f*(y.x*c*s+.5*u*(s*g-h*y.x)-u*c*h*g/3),o+=p/f*(y.y*c*s+.5*u*(s*_-h*y.y)-u*c*h*_/3),l+=p}for(let s=i+1;s<n;s++){const n=x-r[s-1]+r[i];if(n<0)break;const h=r[s]-r[s-1],c=r[s]-r[i]<x?1:n/h;if(c<d)break;const u=c*c,f=c*n-.5*u*h,p=c*h/t,y=e[s-1],g=e[s].x-y.x,_=e[s].y-y.y;a+=p/f*(y.x*c*n+.5*u*(n*g-h*y.x)-u*c*h*g/3),o+=p/f*(y.y*c*n+.5*u*(n*_-h*y.y)-u*c*h*_/3),l+=p}f.push(new s.bR(a/l,o/l))}return f.push(new s.bR(h,c)),e[0].x=o,e[0].y=l,e[n-1].x=h,e[n-1].y=c,f}static _pushCentroid(e,t){const n=i.vA,r=i.vA,s=t.length-1;let a=0,o=0,l=0,h=t[0].x,c=t[0].y;h>n&&(h=n),h<0&&(h=0),c>r&&(c=r),c<0&&(c=0);for(let e=1;e<s;e++){let s=t[e].x,i=t[e].y,u=t[e+1].x,f=t[e+1].y;s>n&&(s=n),s<0&&(s=0),i>r&&(i=r),i<0&&(i=0),u>n&&(u=n),u<0&&(u=0),f>r&&(f=r),f<0&&(f=0);const d=(s-h)*(f-c)-(u-h)*(i-c);a+=d*(h+s+u),o+=d*(c+i+f),l+=d}a/=3*l,o/=3*l,isNaN(a)||isNaN(o)||e.push(new p(a,o))}}class Z{constructor(e,t,n,r,i,o){if(this._pbfTiles={},this._tileClippers={},this._client=n,this._tile=t,this._sourceDataMaxLOD=r,o){this._styleLayerUIDs=new Set;for(const e of o)this._styleLayerUIDs.add(e)}this._styleRepository=i,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,a.IU)(this._level);for(const t of Object.keys(e)){const n=e[t];if(this._pbfTiles[t]=new b.A(new Uint8Array(n.protobuff),new DataView(n.protobuff)),n.refKey){const[e]=n.refKey.split("/").map(parseFloat),r=l-e;if(r>0){const e=(1<<r)-1,n=h&e,i=c&e;this._tileClippers[t]=new s.O3(r,n,i,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new s.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,I.F)(),n=this._initialize(e),{returnedBuckets:r}=n;this._processLayers(n),this._linkReferences(n),this._filterFeatures(n);const s=[],i=new Set,a=(e,t)=>{i.has(e)||(s.push({name:e,repeat:t}),i.add(e))},o={};for(const e of r)e.getResources(e.tileClipper,a,o);if(4===this._tile.status)return[];const l=this._fetchResources(s,o,e);return Promise.all([...l,t]).then(()=>this._processFeatures(n.returnedBuckets))}_initialize(e){const t=e?.signal;return{signal:t,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,zoom:n,layers:r,sourceNameToTileClipper:s,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=r.length-1;e>=0;e--){const u=r[e];if(n<c){if(u.minzoom&&n<Math.floor(u.minzoom)||u.maxzoom&&n>=u.maxzoom)continue}else if(u.maxzoom&&n>=u.maxzoom)continue;if(0===u.type||!this._canParseStyleLayer(u.uid)||!t[u.source]||!s[u.source])continue;const f=t[u.source],d=s[u.source],x=u.sourceLayer,p=f[x];if(p){let e=a[u.source];if(e||(e=a[u.source]=new Set),e.add(u.sourceLayer),u.refLayerId)h.set(u.uid,u.refLayerId);else{const e=this._createBucket(u);if(e){e.layerUIDs=[u.uid],e.layerExtent=p.extent,e.tileClipper=d;let t=i[u.source];t||(t=i[u.source]={});let n=t[x];n||(n=t[x]=[]),n.push(e),o.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:n}=e;n.forEach((e,n)=>{t[e]&&t[e].layerUIDs.push(n)})}_filterFeatures(e){const{signal:t,sourceNameToTileData:n,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:i}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(i))i[e].forEach(t=>{l.push(t),h.push(e)});for(let e=0;e<l.length;e++){const i=h[e],c=l[e];if(!n[i]||!s[i])continue;const u=n[i][c],f=s[i][c];if(!f||0===f.length)continue;if((0,r.G4)(t))return;let d=0;const x=u.getData();for(;x.nextTag(2);){const e=x.getMessage(),t=new w(e,u,d++);e.release();const n=t.values;if(n){const e=n._minzoom;if(e&&e>=o)continue;const t=n._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,n){const r=[],s=this._tile.getWorkerTileHandler();let i,a;e.length>0&&(i=s.fetchSprites(e,this._client,n),r.push(i));for(const e in t){const i=t[e];i.size>0&&(a=s.fetchGlyphs(this._tile.tileKey,e,i,this._client,n),r.push(a))}return r}_processFeatures(e){const t=e.filter(e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const n of Object.keys(e)){const r=e[n],s={};for(;r.next();)switch(r.tag()){case 3:{const e=r.getMessage(),t=new k(e);e.release(),s[t.name]=t;break}default:r.skip()}t[n]=s}return t}_createBucket(e){switch(e.type){case 0:return null;case 1:return this._createFillBucket(e);case 2:return this._createLineBucket(e);case 4:return this._createCircleBucket(e);case 3:return this._createSymbolBucket(e)}}_createFillBucket(e){return new C(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.fillMaterial.getStride()),new M,new A(e.outlineMaterial.getStride()),new M)}_createLineBucket(e){return new U(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new P(e.lineMaterial.getStride()),new M)}_createCircleBucket(e){return new S(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.circleMaterial.getStride()),new M)}_createSymbolBucket(e){const t=this._tile;return new W(t.tileKey,e,this._level,new D(e.iconMaterial.getStride()),new M,new D(e.textMaterial.getStride()),new M,t.placementEngine,t.getWorkerTileHandler())}}class K{constructor(e,t,n,r){this.status=0,this.placementEngine=new m,this.tileKey=e,this.refKeys=t,this._workerTileHandler=n,this._styleRepository=r}release(){this.tileKey="",this.refKeys=null,this.status=0,this._workerTileHandler=null}async parse(e,t){const n=t?.signal;if(null!=n){const e=()=>{n.removeEventListener("abort",e),this.status=4};n.addEventListener("abort",e)}let s;const i={bucketsWithData:[],emptyBuckets:null};try{s=await this._parse(e,t)}catch(e){if((0,r.zf)(e))throw e;return{result:i,transferList:[]}}this.status=2;const a=i.bucketsWithData,o=[];for(const e of s)if(e.hasFeatures()){const t=e.serialize();a.push(t)}else o.push(e.layer.uid);const l=[...a];let h=null;return o.length>0&&(h=Uint32Array.from(o),l.push(h.buffer)),i.emptyBuckets=h,{result:i,transferList:l}}setObsolete(){this.status=4}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const n=e.sourceName2DataAndRefKey;return 0===Object.keys(n).length?[]:(this.status=3,new Z(n,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var H=n(45013);class J{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(e,t){const{key:n}=e,s={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const n=e.sourceName2DataAndRefKey[t];s[t]=n.refKey}const i=new K(n,s,this,this._styleRepository);try{return await i.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(i.setObsolete(),i.release(),!(0,r.zf)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const n of e){const e=n.type,r=n.data;switch(e){case 0:t.setPaintProperties(r.layer,r.paint);break;case 1:t.setLayoutProperties(r.layer,r.layout);break;case 3:t.deleteStyleLayer(r.layer);break;case 2:t.setStyleLayer(r.layer,r.index);break;case 4:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:n}=e;this._styleRepository=new H.A(t),this._sourceDataMaxLOD=n,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,n){const r=[],s=this._spriteInfo;for(const t of e)void 0===s[t.name]&&r.push(t);return 0===r.length?Promise.resolve():t.invoke("getSprites",r,{signal:n?.signal}).then(e=>{for(const t in e){const n=e[t];s[t]=n}})}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,n,r,s){const i=[];let a=this._glyphInfo[t];return a?n.forEach(e=>{a[e]||i.push(e)}):(a=this._glyphInfo[t]=[],n.forEach(e=>i.push(e))),0===i.length?Promise.resolve():r.invoke("getGlyphs",{tileID:e,font:t,codePoints:i},s).then(e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])})}getGlyphItems(e){return this._glyphInfo[e]}}},83349:(e,t,n)=>{function r(e,t,n){n=n||2;var r,i,o,l,h,c,f,d=t&&t.length,x=d?t[0]*n:e.length,p=s(e,0,x,n,!0),y=[];if(!p||p.next===p.prev)return y;if(d&&(p=u(e,t,p,n)),e.length>80*n){r=o=e[0],i=l=e[1];for(var g=n;g<x;g+=n)(h=e[g])<r&&(r=h),(c=e[g+1])<i&&(i=c),h>o&&(o=h),c>l&&(l=c);f=0!==(f=Math.max(o-r,l-i))?1/f:0}return a(p,y,n,r,i,f),y}function s(e,t,n,r,s){var i,a;if(s===L(e,t,n,r)>0)for(i=t;i<n;i+=r)a=A(i,e[i],e[i+1],a);else for(i=n-r;i>=t;i-=r)a=A(i,e[i],e[i+1],a);if(a&&w(a,a.next)){var o=a.next;D(a),a=o}return a}function i(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!w(r,r.next)&&0!==I(r.prev,r,r.next))r=r.next;else{var s=r.prev;if(D(r),(r=t=s)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,s,u,f){if(e){!f&&u&&y(e,r,s,u);for(var d,x,p=e;e.prev!==e.next;)if(d=e.prev,x=e.next,u?l(e,r,s,u):o(e))t.push(d.i/n),t.push(e.i/n),t.push(x.i/n),D(e),e=x.next,p=x.next;else if((e=x)===p){f?1===f?a(e=h(i(e),t,n),t,n,r,s,u,2):2===f&&c(e,t,n,r,s,u):a(i(e),t,n,r,s,u,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(I(t,n,r)>=0)return!1;for(var s=e.next.next;s!==e.prev;){if(m(t.x,t.y,n.x,n.y,r.x,r.y,s.x,s.y)&&I(s.prev,s,s.next)>=0)return!1;s=s.next}return!0}function l(e,t,n,r){var s=e.prev,i=e,a=e.next;if(I(s,i,a)>=0)return!1;for(var o=s.x<i.x?s.x<a.x?s.x:a.x:i.x<a.x?i.x:a.x,l=s.y<i.y?s.y<a.y?s.y:a.y:i.y<a.y?i.y:a.y,h=s.x>i.x?s.x>a.x?s.x:a.x:i.x>a.x?i.x:a.x,c=s.y>i.y?s.y>a.y?s.y:a.y:i.y>a.y?i.y:a.y,u=g(o,l,t,n,r),f=g(h,c,t,n,r),d=e.prevZ,x=e.nextZ;d&&d.z>=u&&x&&x.z<=f;){if(d!==e.prev&&d!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,d.x,d.y)&&I(d.prev,d,d.next)>=0)return!1;if(d=d.prevZ,x!==e.prev&&x!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,x.x,x.y)&&I(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;d&&d.z>=u;){if(d!==e.prev&&d!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,d.x,d.y)&&I(d.prev,d,d.next)>=0)return!1;d=d.prevZ}for(;x&&x.z<=f;){if(x!==e.prev&&x!==e.next&&m(s.x,s.y,i.x,i.y,a.x,a.y,x.x,x.y)&&I(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function h(e,t,n){var r=e;do{var s=r.prev,a=r.next.next;!w(s,a)&&v(s,r,r.next,a)&&P(s,a)&&P(a,s)&&(t.push(s.i/n),t.push(r.i/n),t.push(a.i/n),D(r),D(r.next),r=e=a),r=r.next}while(r!==e);return i(r)}function c(e,t,n,r,s,o){var l=e;do{for(var h=l.next.next;h!==l.prev;){if(l.i!==h.i&&b(l,h)){var c=V(l,h);return l=i(l,l.next),c=i(c,c.next),a(l,t,n,r,s,o),void a(c,t,n,r,s,o)}h=h.next}l=l.next}while(l!==e)}function u(e,t,n,r){var a,o,l,h=[];for(a=0,o=t.length;a<o;a++)(l=s(e,t[a]*r,a<o-1?t[a+1]*r:e.length,r,!1))===l.next&&(l.steiner=!0),h.push(_(l));for(h.sort(f),a=0;a<h.length;a++)n=i(n=x(h[a],n),n.next);return n}function f(e,t){return e.x-t.x}function d(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function x(e,t){var n=function(e,t){var n,r=t,s=e.x,i=e.y,a=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=s&&o>a){if(a=o,o===s){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(s===a)return n;var l,h=n,c=n.x,u=n.y,f=1/0;r=n;do{s>=r.x&&r.x>=c&&s!==r.x&&m(i<u?s:a,i,c,u,i<u?a:s,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(s-r.x),P(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&p(n,r)))&&(n=r,f=l)),r=r.next}while(r!==h);return n}(e,t);if(!n)return t;var r=V(n,e),s=i(n,n.next);let a=d(r);return i(a,a.next),s=d(s),d(t===n?s:t)}function p(e,t){return I(e.prev,e,t.prev)<0&&I(t.next,e,e.next)<0}function y(e,t,n,r){var s=e;do{null===s.z&&(s.z=g(s.x,s.y,t,n,r)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next}while(s!==e);s.prevZ.nextZ=null,s.prevZ=null,function(e){var t,n,r,s,i,a,o,l,h=1;do{for(n=e,e=null,i=null,a=0;n;){for(a++,r=n,o=0,t=0;t<h&&(o++,r=r.nextZ);t++);for(l=h;o>0||l>0&&r;)0!==o&&(0===l||!r||n.z<=r.z)?(s=n,n=n.nextZ,o--):(s=r,r=r.nextZ,l--),i?i.nextZ=s:e=s,s.prevZ=i,i=s;n=r}i.nextZ=null,h*=2}while(a>1)}(s)}function g(e,t,n,r,s){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*s)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*s)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function _(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function m(e,t,n,r,s,i,a,o){return(s-a)*(t-o)-(e-a)*(i-o)>=0&&(e-a)*(r-o)-(n-a)*(t-o)>=0&&(n-a)*(i-o)-(s-a)*(r-o)>=0}function b(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&v(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(P(e,t)&&P(t,e)&&function(e,t){var n=e,r=!1,s=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&s<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(I(e.prev,e,t.prev)||I(e,t.prev,t))||w(e,t)&&I(e.prev,e,e.next)>0&&I(t.prev,t,t.next)>0)}function I(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function w(e,t){return e.x===t.x&&e.y===t.y}function v(e,t,n,r){var s=k(I(e,t,n)),i=k(I(e,t,r)),a=k(I(n,r,e)),o=k(I(n,r,t));return s!==i&&a!==o||!(0!==s||!M(e,n,t))||!(0!==i||!M(e,r,t))||!(0!==a||!M(n,e,r))||!(0!==o||!M(n,t,r))}function M(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function k(e){return e>0?1:e<0?-1:0}function P(e,t){return I(e.prev,e,e.next)<0?I(e,t,e.next)>=0&&I(e,e.prev,t)>=0:I(e,t,e.prev)<0||I(e,e.next,t)<0}function V(e,t){var n=new B(e.i,e.x,e.y),r=new B(t.i,t.x,t.y),s=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=s,s.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function A(e,t,n,r){var s=new B(e,t,n);return r?(s.next=r.next,s.prev=r,r.next.prev=s,r.next=s):(s.prev=s,s.next=s),s}function D(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function B(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function L(e,t,n,r){for(var s=0,i=t,a=n-r;i<n;i+=r)s+=(e[a]-e[i])*(e[i+1]+e[a+1]),a=i;return s}n.d(t,{e:()=>r}),r.deviation=function(e,t,n,r){var s=t&&t.length,i=s?t[0]*n:e.length,a=Math.abs(L(e,0,i,n));if(s)for(var o=0,l=t.length;o<l;o++){var h=t[o]*n,c=o<l-1?t[o+1]*n:e.length;a-=Math.abs(L(e,h,c,n))}var u=0;for(o=0;o<r.length;o+=3){var f=r[o]*n,d=r[o+1]*n,x=r[o+2]*n;u+=Math.abs((e[f]-e[x])*(e[d+1]-e[f+1])-(e[f]-e[d])*(e[x+1]-e[f+1]))}return 0===a&&0===u?0:Math.abs((u-a)/a)},r.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,s=0;s<e.length;s++){for(var i=0;i<e[s].length;i++)for(var a=0;a<t;a++)n.vertices.push(e[s][i][a]);s>0&&(r+=e[s-1].length,n.holes.push(r))}return n}},87317:(e,t,n)=>{n.d(t,{a:()=>m,b:()=>x,c:()=>c,d:()=>s,e:()=>b,f:()=>f,g:()=>y,h:()=>a,i:()=>d,l:()=>g,n:()=>p,s:()=>i,t:()=>_});var r=n(34304);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,n,r,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function o(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function c(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function u(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(n*n+r*r+s*s+i*i)}function f(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return n*n+r*r+s*s+i*i}function d(e){const t=e[0],n=e[1],r=e[2],s=e[3];return Math.sqrt(t*t+n*n+r*r+s*s)}function x(e){const t=e[0],n=e[1],r=e[2],s=e[3];return t*t+n*n+r*r+s*s}function p(e,t){const n=t[0],r=t[1],s=t[2],i=t[3];let a=n*n+r*r+s*s+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=n*a,e[1]=r*a,e[2]=s*a,e[3]=i*a),e}function y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function g(e,t,n,r){const s=t[0],i=t[1],a=t[2],o=t[3];return e[0]=s+r*(n[0]-s),e[1]=i+r*(n[1]-i),e[2]=a+r*(n[2]-a),e[3]=o+r*(n[3]-o),e}function _(e,t,n){const r=t[0],s=t[1],i=t[2],a=t[3];return e[0]=n[0]*r+n[4]*s+n[8]*i+n[12]*a,e[1]=n[1]*r+n[5]*s+n[9]*i+n[13]*a,e[2]=n[2]*r+n[6]*s+n[10]*i+n[14]*a,e[3]=n[3]*r+n[7]*s+n[11]*i+n[15]*a,e}function m(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function b(e,t){const n=e[0],s=e[1],i=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,r.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(i-h)<=u*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const I=o,w=l,v=h,M=u,k=f,P=d,V=x;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:s,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:M,distance:u,div:v,divide:h,dot:y,equals:b,exactEquals:m,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:P,length:d,lerp:g,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e},mul:w,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:p,random:function(e,t=1){const n=r.Ov;let s,i,a,o,l,h;do{s=2*n()-1,i=2*n()-1,l=s*s+i*i}while(l>=1);do{a=2*n()-1,o=2*n()-1,h=a*a+o*o}while(h>=1);const c=Math.sqrt((1-l)/h);return e[0]=t*s,e[1]=t*i,e[2]=t*a*c,e[3]=t*o*c,e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:c,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e},set:i,sqrDist:k,sqrLen:V,squaredDistance:f,squaredLength:x,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:I,subtract:o,transformMat4:_,transformQuat:function(e,t,n){const r=t[0],s=t[1],i=t[2],a=n[0],o=n[1],l=n[2],h=n[3],c=h*r+o*i-l*s,u=h*s+l*r-a*i,f=h*i+a*s-o*r,d=-a*r-o*s-l*i;return e[0]=c*h+d*-a+u*-l-f*-o,e[1]=u*h+d*-o+f*-a-c*-l,e[2]=f*h+d*-l+c*-o-u*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},91829:(e,t,n)=>{function r(){return[0,0,0,0]}function s(e){return[e[0],e[1],e[2],e[3]]}function i(e,t,n,r){return[e,t,n,r]}function a(e,t,n,r){return[e,t,n,r]}function o(e,t=[0,0,0,0]){const n=Math.min(4,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function l(){return i(1,1,1,1)}function h(){return i(1,0,0,0)}function c(){return i(0,1,0,0)}function u(){return i(0,0,1,0)}function f(){return i(0,0,0,1)}n.d(t,{CN:()=>a,Un:()=>x,ci:()=>o,fA:()=>i,o8:()=>s,uY:()=>d,vt:()=>r});const d=[0,0,0,0],x=l(),p=h(),y=c(),g=u(),_=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:x,UNIT_W:_,UNIT_X:p,UNIT_Y:y,UNIT_Z:g,ZEROS:d,clone:s,create:r,freeze:a,fromArray:o,fromValues:i,ones:l,unitW:f,unitX:h,unitY:c,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},95108:(e,t,n)=>{n.d(t,{$3:()=>h,Ng:()=>a,R3:()=>s,Yl:()=>l,gR:()=>i,m3:()=>u,t9:()=>o});var r=n(4576);function s(e,t){const n=t[0]-e[0],r=t[1]-e[1];if(e.length>2&&t.length>2){const s=e[2]-t[2];return Math.sqrt(n*n+r*r+s*s)}return Math.sqrt(n*n+r*r)}function i(e,t,n,r){const[s,i]=t,[a,o]=n,[l,h]=r,c=l-a,u=h-o,f=c*c+u*u,d=(s-a)*c+(i-o)*u,x=Math.min(1,Math.max(0,d/f));return e[0]=a+c*x,e[1]=o+u*x,e}function a(e,t,n,r,s,i){let a=n,o=r,l=s-a,h=i-o;if(0!==l||0!==h){const n=((e-a)*l+(t-o)*h)/(l*l+h*h);n>1?(a=s,o=i):n>0&&(a+=l*n,o+=h*n)}return l=e-a,h=t-o,l*l+h*h}function o(e,t){return function(e,t,n){const r=e[0]+n*(t[0]-e[0]),s=e[1]+n*(t[1]-e[1]);return e.length>2&&t.length>2?[r,s,e[2]+n*(t[2]-e[2])]:[r,s]}(e,t,.5)}function l(e){const t=e.length;let n=0;for(let r=0;r<t-1;++r)n+=s(e[r],e[r+1]);return n}function h(e,t=0,n=1){let r=0;const s=e.length;let i=e[0];for(let a=1;a<s;a++){const s=e[a];r+=(s[t]-i[t])*(s[n]+i[n]),i=s}if(c(e)){const s=e[0];r+=(s[t]-i[t])*(s[n]+i[n])}return r>=0}function c(e){const t=e.length;return t>0&&!(0,r.aI)(e[0],e[t-1])}function u(e){if("rings"in e)for(const t of e.rings)c(t)&&t.push(t[0].slice())}n(21325)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4038],{51530:(e,t,s)=>{s.d(t,{KB:()=>a,Xi:()=>r,pn:()=>o,x3:()=>n});var i=s(44208);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function a(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function o(e,t){if("image/ktx2"===t)return new r(e);const s=new Blob([e],{type:t});let n=URL.createObjectURL(s);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const s=()=>{r(),e(a)},i=e=>{r(),t(e)},r=()=>{URL.revokeObjectURL(n),a.removeEventListener("load",s),a.removeEventListener("error",i)};a.addEventListener("load",s),a.addEventListener("error",i),a.src=n});try{a.src=n,await a.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(n),a}},63907:(e,t,s)=>{s.d(t,{$0:()=>f,CQ:()=>m,Fq:()=>d,H0:()=>n,SB:()=>c,WR:()=>i,XN:()=>a,iE:()=>o,ld:()=>h,nI:()=>p,pe:()=>r,r6:()=>l,vt:()=>u,yI:()=>_});const i={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},r={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},n={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},a=Object.values(n),o={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},c={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},h={FLOAT:r.FLOAT,UNSIGNED_BYTE:r.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:r.BYTE,UNSIGNED_SHORT:r.UNSIGNED_SHORT,SHORT:r.SHORT,UNSIGNED_INT:r.UNSIGNED_INT,INT:r.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},u={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},f=0,l=36064,_=36065,d=36066,p=33306,m={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},84038:(e,t,s)=>{s.r(t),s.d(t,{exportGLTF:()=>v,modelNameGlb:()=>z,modelNameGltf:()=>P,toBinaryGLTF:()=>V});var i=s(74887),r=s(4576);class n{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,r.TF)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class a{static{this.HEADER_SIZE=12}static{this.CHUNK_HEADER_SIZE=8}static{this.MAGIC=1179937895}static{this.VERSION=2}constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=a.HEADER_SIZE,this._length+=a.CHUNK_HEADER_SIZE;const s=function(e){return(new TextEncoder).encode(e).buffer}(e);if(this._length+=o(s.byteLength,4),t&&(this._length+=a.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,1313821514,32);t&&this._writeChunk(t,i,5130562)}_writeHeader(){this._outView.setUint32(0,a.MAGIC,!0),this._outView.setUint32(4,a.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,i=0){const r=o(e.byteLength,4);for(this._outView.setUint32(t,r,!0),this._outView.setUint32(t+=4,s,!0),function(e,t,s,i,r){new Uint8Array(e,s,r).set(new Uint8Array(t,0,r),0)}(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)i&&this._outView.setUint8(t,i),t++;return t}}function o(e,t){return t*Math.ceil(e/t)}var c=s(40876),h=s(53966),u=s(91869),f=s(34727),l=s(67026),_=s(82534),d=s(38954),p=s(51850),m=s(80882),g=s(72258),T=s(63907);class E{constructor(e,t,s,i,r){this._buffer=e,this._componentType=s,this._dataType=i,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:r};const n=this._getElementSize();n>=4&&34963!==r&&(this._bufferView.byteStride=n),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,i=this._accessorMin[s];this._accessorMin[s]="number"!=typeof i?e:Math.min(i,e);const r=this._accessorMax[s];this._accessorMax[s]="number"!=typeof r?e:Math.max(r,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return e=this.dataSize,4*Math.ceil(e/4);var e}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case T.pe.BYTE:return new Int8Array(e,t);case T.pe.FLOAT:return new Float32Array(e,t);case T.pe.SHORT:return new Int16Array(e,t);case T.pe.UNSIGNED_BYTE:return new Uint8Array(e,t);case T.pe.UNSIGNED_INT:return new Uint32Array(e,t);case T.pe.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then(e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise}),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const i={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case T.pe.UNSIGNED_BYTE:case T.pe.UNSIGNED_SHORT:i.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,i}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise(e=>this._finalizedPromiseResolve=e)}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case T.pe.BYTE:case T.pe.UNSIGNED_BYTE:return 1;case T.pe.SHORT:case T.pe.UNSIGNED_SHORT:return 2;case T.pe.UNSIGNED_INT:case T.pe.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}}class w{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const i=new E(this,this._gltf,e,t,s);return this._bufferViews.push(i),i}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then(()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e}),this._gltf.extras.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function R(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const{position:s,normal:i}=t,r=e.length/3;for(let t=0;t<r;++t){const r=3*e[3*t],n=3*e[3*t+1],a=3*e[3*t+2],o=(0,d.i)(S,s[r],s[r+1],s[r+2]),c=(0,d.i)(b,s[n],s[n+1],s[n+2]),h=(0,d.i)(A,s[a],s[a+1],s[a+2]),u=(0,d.d)(c,c,o),f=(0,d.d)(h,h,o),l=(0,d.h)(u,u,f);i[r]+=l[0],i[r+1]+=l[1],i[r+2]+=l[2],i[n]+=l[0],i[n+1]+=l[1],i[n+2]+=l[2],i[a]+=l[0],i[a+1]+=l[1],i[a+2]+=l[2]}for(let e=0;e<i.length;e+=3)(0,d.i)(N,i[e],i[e+1],i[e+2]),(0,d.n)(N,N),i[e]=N[0],i[e+1]=N[1],i[e+2]=N[2]}const S=(0,p.vt)(),b=(0,p.vt)(),A=(0,p.vt)(),N=(0,p.vt)();s(44208);var y=s(49186),I=s(84952);async function x(e,t){const s=O(e);if(null==s)throw new y.A("imageToArrayBuffer","Unsupported image type");const r=function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,I.DB)(t)){const e=(0,I.r$)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),n=await new Promise(e=>s.toBlob(e,r));if((0,i.Te)(t),!n)throw new y.A("imageToArrayBuffer","Failed to encode image");const a=await n.arrayBuffer();return(0,i.Te)(t),{data:a,type:r}}function O(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}var C=s(51530);const B=()=>h.A.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class G{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=2===t.output.buffer||2===t.output.image;s&&(t.binChunkBuffer=new w(this.gltf)),e.forEachScene(e=>{this._addScene(e)}),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode(e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))}),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,d.q)(s,p.uY)||(t.translation=(0,p.o8)(s));const i=e.rotation;(0,l.t2)(i,_.zK)||(t.rotation=(0,_.o8)(i));const r=e.scale;(0,d.q)(r,p.Un)||(t.scale=(0,p.o8)(r));const n=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),i=[n];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),i.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return i}return e.forEachNode(e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))}),[n]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=2===t.output.buffer;let i;i=s?t.binChunkBuffer:new w(this.gltf);const r=this.options.origin,n=e.vertexSpace.clone();n.origin=[r.x,r.y,r.z??0];const a=(0,g.UR)({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},n,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];(function(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&R(s.faces,t)})(e,a),M(a);const{position:o,normal:c,tangent:h}=a,{uv:u,color:f}=e.vertexAttributes,l=i.addBufferView(T.pe.FLOAT,"VEC3",34962);let _,d,p,m;c&&(_=i.addBufferView(T.pe.FLOAT,"VEC3",34962)),u&&(d=i.addBufferView(T.pe.FLOAT,"VEC2",34962)),h&&(p=i.addBufferView(T.pe.FLOAT,"VEC4",34962)),f&&(m=i.addBufferView(T.pe.FLOAT,"VEC4",34962)),l.startAccessor("POSITION"),_&&_.startAccessor("NORMAL"),d&&d.startAccessor("TEXCOORD_0"),p&&p.startAccessor("TANGENT"),m&&m.startAccessor("COLOR_0");const E=a.position.length/3;for(let e=0;e<E;++e)l.push(o[3*e]),l.push(o[3*e+1]),l.push(o[3*e+2]),_&&null!=c&&(_.push(c[3*e]),_.push(c[3*e+1]),_.push(c[3*e+2])),d&&null!=u&&(d.push(u[2*e]),d.push(u[2*e+1])),p&&null!=h&&(p.push(h[4*e]),p.push(h[4*e+1]),p.push(h[4*e+2]),p.push(h[4*e+3])),m&&null!=f&&(m.push(D(f[4*e]/255)),m.push(D(f[4*e+1]/255)),m.push(D(f[4*e+2]/255)),m.push(f[4*e+3]/255));const S=l.endAccessor(),b=this._addAccessor(l.index,S);let A,N,y,I,x;if(_){const e=_.endAccessor();A=this._addAccessor(_.index,e)}if(d){const e=d.endAccessor();N=this._addAccessor(d.index,e)}if(p){const e=p.endAccessor();y=this._addAccessor(p.index,e)}if(m){const e=m.endAccessor();I=this._addAccessor(m.index,e)}const O=[];return e.components&&e.components.length>0&&e.components[0].faces?(x=i.addBufferView(T.pe.UNSIGNED_INT,"SCALAR",34963),this._addMeshVertexIndexed(x,e.components,O,b,A,N,y,I)):this._addMeshVertexNonIndexed(e.components,O,b,A,N,y,I),l.finalize(),_?.finalize(),d?.finalize(),p?.finalize(),x?.finalize(),m?.finalize(),s||i.finalize(),O}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode="MASK";break;case"auto":case"blend":s.alphaMode="BLEND"}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const i=e=>{const t=e.toRgba();return t[0]=D(t[0]/255),t[1]=D(t[1]/255),t[2]=D(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof m.A){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,B().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const r=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),r}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,f.kU)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,u.tE)(this._textureMap,e,()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},i=t.length;return t.push(s),i})}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const i=this.gltf.extras;switch(i.output.image){case 2:{const e=i.binChunkBuffer.addBufferView(T.pe.UNSIGNED_BYTE,"SCALAR");if((0,C.x3)(t))null!=t.data&&e.writeOutToBuffer(t.data.buffer,0);else{const r=x(t,this.options.signal).then(({data:e,type:t})=>(s.mimeType=t,e));i.promises.push(e.writeAsync(r).then(()=>e.finalize()))}s.bufferView=e.index;break}case 1:if((0,C.x3)(t)){B().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=O(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,C.x3)(t)){B().warnOnce("Image export for basis compressed textures not available.");break}i.promises.push(x(t,this.options.signal).then(({data:e,type:t})=>{s.uri=e,s.mimeType=t}))}}const i=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,i),i}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=10497,s=10497;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=33071,s=33071;break;case"mirror":t=33648,s=33648}else{switch(e.wrap.vertical){case"clamp":s=33071;break;case"mirror":s=33648}switch(e.wrap.horizontal){case"clamp":t=33071;break;case"mirror":t=33648}}const i={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(i)===JSON.stringify(this.gltf.samplers[e]))return e;const r=this.gltf.samplers.length;return this.gltf.samplers.push(i),r}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const i=this.gltf.accessors.length;return this.gltf.accessors.push(s),i}_addMeshVertexIndexed(e,t,s,i,r,n,a,o){const c=new Map;for(const h of t){if(e.startAccessor("INDICES"),h.faces)for(let t=0;t<h.faces.length;++t)e.push(h.faces[t]);const t=e.endAccessor(),u={attributes:{POSITION:i},indices:this._addAccessor(e.index,t),material:this._addMaterial(h.material)};r&&"flat"!==h.shading&&(u.attributes.NORMAL=r),n&&(u.attributes.TEXCOORD_0=n),a&&"flat"!==h.shading&&(u.attributes.TANGENT=a),o&&(u.attributes.COLOR_0=o);const f=c.get(h.name);if(f)f.primitives.push(u);else{const e={name:h.name,primitives:[u]};c.set(h.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,i,r,n,a){const o={primitives:[]};t.push(o);const c={attributes:{POSITION:s}};i&&(c.attributes.NORMAL=i),r&&(c.attributes.TEXCOORD_0=r),n&&(c.attributes.TANGENT=n),a&&(c.attributes.COLOR_0=a),e&&(c.material=this._addMaterial(e[0].material)),o.primitives.push(c)}}function M({position:e,normal:t,tangent:s}){U(e,3),U(t,3),U(s,4)}function U(e,t){if(null!=e)for(let s=1,i=2;s<e.length;s+=t,i+=t){const t=e[s],r=e[i];e[s]=r,e[i]=-t}}function D(e){return e**c.Tf}class L{constructor(e){this.mesh=e,this.name="",this.translation=(0,p.vt)(),this.rotation=(0,_.vt)(),this.scale=(0,p.o8)(p.Un),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,l.A6)(this.rotation,e[0],e[1],e[2])}}class F{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}const P="model.gltf",z="model.glb";async function v(e,t){const s=new G(e,t).gltf,r=s.extras.promises;let n=1,o=1,c=null;await Promise.allSettled(r),(0,i.Te)(t.signal);const h=t.jsonSpacing??4,u=new Map,f=JSON.stringify(s,(e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.output?.image){case 1:case 2:break;default:{const e=`img${o}.png`;return o++,u.set(e,s),e}}switch(t.output?.buffer){case 1:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case 2:if(c)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(c=s);default:{const e=`data${n}.bin`;return n++,u.set(e,s),e}}}return s}},h);return 2===t.output?.buffer||2===t.output?.image?u.set(z,new a(f,c).buffer):u.set(P,f),u}async function V(e,t){const s=new n,i=new F;return s.addScene(i),i.addNode(new L(e)),await async function(e,t){const s=(await v(e,{output:{buffer:2,image:2},jsonSpacing:0,...t})).get(z);if(!(s&&s instanceof ArrayBuffer))throw new Error("failed to export to glb");return s}(s,{origin:e.origin,...t})}}}]);
|