@arcgis/core 4.29.7 → 4.29.8
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{4984e2b79d862114d6a6.js → 1a8d56e01ddfec2257c3.js} +1 -1
- package/assets/esri/core/workers/chunks/{3afb525a131b6841276b.js → 1e4d779a884f13762601.js} +1 -1
- package/assets/esri/core/workers/chunks/{2447a4d5886aeb0ff72a.js → 205597cd91cb7ff3d2b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c50daccd84ba5545bfe.js → 22ebdec0867e44d8d58c.js} +1 -1
- package/assets/esri/core/workers/chunks/{da4616b02dd0c3dd3d5d.js → 321547d796a2ecd72ab4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c3ae96ec90e9ed7dd50.js → 32be478638e9e643ea32.js} +1 -1
- package/assets/esri/core/workers/chunks/{a61f337802ae963d7f65.js → 59f03847a9eb96e5f65c.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a98d2e026f63a581b1e.js → 5b08309b184f5d8345a0.js} +1 -1
- package/assets/esri/core/workers/chunks/631bda7b99a27f4453c1.js +1 -0
- package/assets/esri/core/workers/chunks/{c527692694688a5b3b07.js → 658a8ee9a4f24bc03f7f.js} +1 -1
- package/assets/esri/core/workers/chunks/99ac2a6a5be0604ee4c2.js +1 -0
- package/assets/esri/core/workers/chunks/{48db6e0bbb1a9c043193.js → b7a78246d25dc07f173d.js} +1 -1
- package/assets/esri/core/workers/chunks/{60ab18c6a04d4b2f1d4c.js → bb05528d2ca12c57a031.js} +1 -1
- package/assets/esri/core/workers/chunks/{5227f9eea6988aadad7f.js → cf0dc0ccbeaf9458de6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f59b5ea05caca8a1a398.js → d40408be9bbcb0021d18.js} +1 -1
- package/assets/esri/core/workers/chunks/df6fbabbc74a408575fc.js +1 -0
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vec32.js +1 -1
- package/chunks/vec42.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +2 -2
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/makeScheduleFunction.js +5 -0
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/geometryUtils/sphere.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/assets/esri/core/workers/chunks/967812e66fef41febb98.js +0 -1
- package/assets/esri/core/workers/chunks/a28b7d868346e13468bb.js +0 -1
- package/assets/esri/core/workers/chunks/ccd53b81c2688dd11584.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7468],{74784:(e,t,s)=>{s.d(t,{a:()=>m,c:()=>r,d:()=>c,e:()=>I,g:()=>a,h:()=>p,i:()=>d,j:()=>g,l:()=>x,n:()=>y,s:()=>n,t:()=>_});var i=s(47364);function r(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,s,i,r){return e[0]=t,e[1]=s,e[2]=i,e[3]=r,e}function a(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e[3]=t[3]+s[3],e}function o(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e[3]=t[3]-s[3],e}function l(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e[2]=t[2]*s[2],e[3]=t[3]*s[3],e}function h(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e[2]=t[2]/s[2],e[3]=t[3]/s[3],e}function c(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e}function u(e,t){const s=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(s*s+i*i+r*r+n*n)}function f(e,t){const s=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],n=t[3]-e[3];return s*s+i*i+r*r+n*n}function d(e){const t=e[0],s=e[1],i=e[2],r=e[3];return Math.sqrt(t*t+s*s+i*i+r*r)}function g(e){const t=e[0],s=e[1],i=e[2],r=e[3];return t*t+s*s+i*i+r*r}function y(e,t){const s=t[0],i=t[1],r=t[2],n=t[3];let a=s*s+i*i+r*r+n*n;return a>0&&(a=1/Math.sqrt(a),e[0]=s*a,e[1]=i*a,e[2]=r*a,e[3]=n*a),e}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function x(e,t,s,i){const r=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r+i*(s[0]-r),e[1]=n+i*(s[1]-n),e[2]=a+i*(s[2]-a),e[3]=o+i*(s[3]-o),e}function _(e,t,s){const i=t[0],r=t[1],n=t[2],a=t[3];return e[0]=s[0]*i+s[4]*r+s[8]*n+s[12]*a,e[1]=s[1]*i+s[5]*r+s[9]*n+s[13]*a,e[2]=s[2]*i+s[6]*r+s[10]*n+s[14]*a,e[3]=s[3]*i+s[7]*r+s[11]*n+s[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 I(e,t){const s=e[0],r=e[1],n=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,i.Au)();return Math.abs(s-o)<=u*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(r-l)<=u*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(n-h)<=u*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const w=o,b=l,M=h,k=u,L=f,T=d,P=g;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:r,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:k,distance:u,div:M,divide:h,dot:p,equals:I,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:T,length:d,lerp:x,max:function(e,t,s){return e[0]=Math.max(t[0],s[0]),e[1]=Math.max(t[1],s[1]),e[2]=Math.max(t[2],s[2]),e[3]=Math.max(t[3],s[3]),e},min:function(e,t,s){return e[0]=Math.min(t[0],s[0]),e[1]=Math.min(t[1],s[1]),e[2]=Math.min(t[2],s[2]),e[3]=Math.min(t[3],s[3]),e},mul:b,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:y,random:function(e,t){const s=i.QR;let r,n,a,o,l,h;t=t||1;do{r=2*s()-1,n=2*s()-1,l=r*r+n*n}while(l>=1);do{a=2*s()-1,o=2*s()-1,h=a*a+o*o}while(h>=1);const c=Math.sqrt((1-l)/h);return e[0]=t*r,e[1]=t*n,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,s,i){return e[0]=t[0]+s[0]*i,e[1]=t[1]+s[1]*i,e[2]=t[2]+s[2]*i,e[3]=t[3]+s[3]*i,e},set:n,sqrDist:L,sqrLen:P,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:w,subtract:o,transformMat4:_,transformQuat:function(e,t,s){const i=t[0],r=t[1],n=t[2],a=s[0],o=s[1],l=s[2],h=s[3],c=h*i+o*n-l*r,u=h*r+l*i-a*n,f=h*n+a*r-o*i,d=-a*i-o*r-l*n;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"}))},46988:(e,t,s)=>{s.d(t,{SQ:()=>n,ec:()=>l,kv:()=>r,uO:()=>a,yU:()=>h});const i={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 r(e){return!!i[e]||!!i[e.toLowerCase()]}function n(e){return i[e]??i[e.toLowerCase()]}function a(e){return[...n(e)]}function o(e,t,s){s<0&&++s,s>1&&--s;const i=6*s;return i<1?e+(t-e)*i:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}function l(e,t,s,i=1){const r=(e%360+360)%360/360,n=s<=.5?s*(t+1):s+t-s*t,a=2*s-n;return[Math.round(255*o(a,n,r+1/3)),Math.round(255*o(a,n,r)),Math.round(255*o(a,n,r-1/3)),i]}function h(e){const t=e.length>5,s=t?8:4,i=(1<<s)-1,r=t?1:17,n=t?9===e.length:5===e.length;let a=Number("0x"+e.substr(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return n&&(l=a&i,a>>=s,o[3]=r*l/255),l=a&i,a>>=s,o[2]=r*l,l=a&i,a>>=s,o[1]=r*l,l=a&i,a>>=s,o[0]=r*l,o}},37008:(e,t,s)=>{function i(){return[0,0,0,0]}function r(e,t,s,i){return[e,t,s,i]}function n(){return r(1,1,1,1)}function a(){return r(1,0,0,0)}function o(){return r(0,1,0,0)}function l(){return r(0,0,1,0)}function h(){return r(0,0,0,1)}s.d(t,{Su:()=>i,WK:()=>r});const c=n(),u=a(),f=o(),d=l(),g=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_W:g,UNIT_X:u,UNIT_Y:f,UNIT_Z:d,ZEROS:[0,0,0,0],clone:function(e){return[e[0],e[1],e[2],e[3]]},create:i,createView:function(e,t){return new Float64Array(e,t,4)},fromArray:function(e,t=[0,0,0,0]){const s=Math.min(4,e.length);for(let i=0;i<s;++i)t[i]=e[i];return t},fromValues:r,ones:n,unitW:h,unitX:a,unitY:o,unitZ:l,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},91232:(e,t,s)=>{s.d(t,{c:()=>c});var i,r,n=s(9456),a=s(69752);(r=i||(i={}))[r.varint=0]="varint",r[r.fixed64=1]="fixed64",r[r.delimited=2]="delimited",r[r.fixed32=5]="fixed32",r[r.unknown=99]="unknown";const o=4294967296,l=new TextDecoder("utf-8"),h=(0,n.c)("safari")||(0,n.c)("ios")?6:(0,n.c)("ff")?12:32;class c{constructor(e,t,s=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(e,t,s,r)}_init(e,t,s,i){this._data=e,this._dataView=t,this._pos=s,this._end=i}asUnsafe(){return this}clone(){return new c(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)|0}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,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}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,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,i){const r=this.getMessage(),n=e(r,t,s,i);return r.release(),n}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case i.varint:this._decodeVarint();break;case i.fixed64:this._skip(8);break;case i.delimited:this._skip(this._getLength());break;case i.fixed32: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,s=0,i=0;if(this._end-t>=10)do{if(i=e[t++],s|=127&i,0==(128&i))break;if(i=e[t++],s|=(127&i)<<7,0==(128&i))break;if(i=e[t++],s|=(127&i)<<14,0==(128&i))break;if(i=e[t++],s|=(127&i)<<21,0==(128&i))break;if(i=e[t++],s+=268435456*(127&i),0==(128&i))break;if(i=e[t++],s+=34359738368*(127&i),0==(128&i))break;if(i=e[t++],s+=4398046511104*(127&i),0==(128&i))break;if(i=e[t++],s+=562949953421312*(127&i),0==(128&i))break;if(i=e[t++],s+=72057594037927940*(127&i),0==(128&i))break;if(i=e[t++],s+=0x8000000000000000*(127&i),0==(128&i))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(i=e[t],0!=(128&i));)++t,s+=(127&i)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=i*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,i=0;const r=1&e[this._pos];if(i=e[this._pos++],s|=127&i,0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<7,0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<14,0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<21,0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=268435456*(127&i),0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=34359738368*(127&i),0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=4398046511104*(127&i),0==(128&i))return r?-(s+1)/2:s/2;if(t=BigInt(s),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),0==(128&i))return Number(r?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),0==(128&i))return Number(r?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),0==(128&i))return Number(r?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==i.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>h){const i=e.subarray(t,s);return l.decode(i)}let i="",r="";for(let n=t;n<s;++n){const t=e[n];128&t?r+="%"+t.toString(16):(i+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(i+=decodeURIComponent(r)),i}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}c.pool=new a.c(c,void 0,(e=>{e._data=null,e._dataView=null}))},93008:(e,t,s)=>{s.r(t),s.d(t,{default:()=>$});var i=s(10860),r=s(88104),n=s(93320),a=s(51760);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=s(27364);const f=24;class d{constructor(e,t,s,i,r,n,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=s,this._letterSpacing=i,this._hAnchor=r,this._vAnchor=n,this._justify=a}getShaping(e,t,s){const i=this._letterSpacing,r=this._lineHeight,n=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 r=s&&o(e);let n;for(const t of this._glyphItems)if(n=t[e],n)break;u.push({codePoint:e,x:f,y:d,vertical:r,glyphMosaicItem:n}),n&&(f+=n.metrics.advance+i)}let g=f;a>0&&(g=f/Math.max(1,Math.ceil(f/a)));const y=e.includes(""),p=[],x=u.length;for(let e=0;e<x-1;e++){const t=u[e].codePoint,s=l(t);if(h(t)||s){let i=0;if(10===t)i-=1e4;else if(s&&y)i+=150;else{40!==t&&65288!==t||(i+=50);const s=u[e+1].codePoint;41!==s&&65289!==s||(i+=50)}p.push(this._buildBreak(e+1,u[e].x,g,p,i,!1))}}const _=this._optimalBreaks(this._buildBreak(x,f,g,p,0,!0));let m=0;const I=t?-r:r;let w=0;for(let e=0;e<_.length;e++){const t=_[e];let s=w;for(;s<t&&c(u[s].codePoint);)u[s].glyphMosaicItem=null,++s;let i=t-1;for(;i>s&&c(u[i].codePoint);)u[i].glyphMosaicItem=null,--i;if(s<=i){const e=u[s].x;for(let t=s;t<=i;t++)u[t].x-=e,u[t].y=d;let t=u[i].x;u[i].glyphMosaicItem&&(t+=u[i].glyphMosaicItem.metrics.advance),m=Math.max(t,m),n&&this._applyJustification(u,s,i)}w=t,d+=I}if(u.length>0){const e=_.length-1,s=(n-this._hAnchor)*m;let i=(-this._vAnchor*(e+1)+.5)*r;t&&e&&(i+=e*r);for(const e of u)e.x+=s,e.y+=i}return u.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let s=1/0,i=1/0,r=0,n=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;s=Math.min(s,o),r=Math.max(r,h),i=Math.min(i,l),n=Math.max(n,c)}return{x:s,y:i,width:r-s,height:n-i}}static getBox(e){if(!e.length)return null;let t=1/0,s=1/0,i=0,r=0;for(const n of e){const{height:e,left:a,top:o,width:l}=n.glyphMosaicItem.metrics,h=n.x,c=n.y-(e-Math.abs(o)),u=h+l+a,f=c+e;t=Math.min(t,h),i=Math.max(i,u),s=Math.min(s,c),r=Math.max(r,f)}return{x:t,y:s,width:i-t,height:r-s}}static addDecoration(e,t){const s=e.length;if(0===s)return;let i=e[0].x+e[0].glyphMosaicItem.metrics.left,r=e[0].y;for(let n=1;n<s;n++){const s=e[n];if(s.y!==r){const a=e[n-1].x+e[n-1].glyphMosaicItem.metrics.left+e[n-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:r+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.c(4,0,4,8),metrics:{width:a-i,height:8,left:0,top:0,advance:0},page:0,code:0}}),r=s.y,i=s.x+s.glyphMosaicItem.metrics.left}}const n=e[s-1].x+e[s-1].glyphMosaicItem.metrics.left+e[s-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:r+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.c(4,0,4,8),metrics:{width:n-i,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,s,i){const r=(e-t)*(e-t);return i?e<t?r/2:2*r:r+Math.abs(s)*s}_buildBreak(e,t,s,i,r,n){let a=null,o=this._breakScore(t,s,r,n);for(const e of i){const i=t-e.x,l=this._breakScore(i,s,r,n)+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,s){const i=e[s],r=i.vertical?f:i.glyphMosaicItem?i.glyphMosaicItem.metrics.advance:0,n=(i.x+r)*this._justify;for(let i=t;i<=s;i++)e[i].x-=n}}var g=s(19536);const y=.5;class p{constructor(e,t,s=0,i=-1,r=y){this.x=e,this.y=t,this.angle=s,this.segment=i,this.minzoom=r}}class x{constructor(e,t,s,i,r,n=y,o=a.MB){this.anchor=e,this.labelAngle=t,this.glyphAngle=s,this.page=i,this.alternateVerticalGlyph=r,this.minzoom=n,this.maxzoom=o}}class _{constructor(e,t,s,i,r,n,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=s,this.br=i,this.mosaicRect=r,this.labelAngle=n,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class m{constructor(e){this.shapes=e}}class I{getIconPlacement(e,t,s){const i=new n.wb(e.x,e.y),r=s.rotationAlignment===g.cN.MAP,o=s.keepUpright;let l=s.rotate*a.YJ;r&&(l+=e.angle);const h=new m([]);return s.allowOverlap&&s.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,i,t,s,l),r&&o&&this._addIconPlacement(h,i,t,s,l+a.Yt),h}_addIconPlacement(e,t,s,i,r){const o=s.rasterizationScale,l=s.width/o,h=s.height/o,c=i.offset;let u=c[0],f=c[1];switch(i.anchor){case g.wL.CENTER:u-=l/2,f-=h/2;break;case g.wL.LEFT:f-=h/2;break;case g.wL.RIGHT:u-=l,f-=h/2;break;case g.wL.TOP:u-=l/2;break;case g.wL.BOTTOM:u-=l/2,f-=h;break;case g.wL.TOP_LEFT:break;case g.wL.BOTTOM_LEFT:f-=h;break;case g.wL.TOP_RIGHT:u-=l;break;case g.wL.BOTTOM_RIGHT:u-=l,f-=h}const d=s.rect,p=2/o,x=u-p,m=f-p,I=x+d.width/o,w=m+d.height/o,b=new n.wb(x,m),M=new n.wb(I,w),k=new n.wb(x,w),L=new n.wb(I,m);if(0!==r){const e=Math.cos(r),t=Math.sin(r);b.rotate(e,t),M.rotate(e,t),k.rotate(e,t),L.rotate(e,t)}const T=new _(b,L,k,M,d,r,0,256,t,y,a.MB,0);if(e.shapes.push(T),!i.allowOverlap||!i.ignorePlacement){const s=i.size,n=i.padding,o={xTile:t.x,yTile:t.y,dxPixels:u*s-n,dyPixels:f*s-n,hard:!i.optional,partIndex:0,width:l*s+2*n,height:h*s+2*n,angle:r,minLod:y,maxLod:a.MB};e.iconColliders.push(o)}}getTextPlacement(e,t,s,i){const r=new n.wb(e.x,e.y),o=i.rotate*a.YJ,l=i.rotationAlignment===g.cN.MAP,h=i.keepUpright,c=i.padding;let u=y;const p=l?e.angle:0,I=e.segment>=0&&l,w=i.allowOverlap&&i.ignorePlacement?null:[],b=[],M=!I;let k=Number.POSITIVE_INFINITY,L=Number.NEGATIVE_INFINITY,T=k,P=L;const D=(I||l)&&h,V=i.size/f;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let A,v=0,S=0;if(!I&&B){const e=d.getTextBox(t,i.lineHeight*f);switch(i.anchor){case g.wL.LEFT:v=e.height/2,S=-e.width/2;break;case g.wL.RIGHT:v=-e.height/2,S=e.width/2;break;case g.wL.TOP:v=e.height/2,S=e.width/2;break;case g.wL.BOTTOM:v=-e.height/2,S=-e.width/2;break;case g.wL.TOP_LEFT:v=e.height;break;case g.wL.BOTTOM_LEFT:S=-e.width;break;case g.wL.TOP_RIGHT:S=e.width;break;case g.wL.BOTTOM_RIGHT:v=-e.height}}v+=i.offset[0]*f,S+=i.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,g=t.metrics,m=t.page;if(w&&M){if(void 0!==A&&A!==f.y){let t,s,r,n;B?(t=-P+v,s=k+S,r=P-T,n=L-k):(t=k+v,s=T+S,r=L-k,n=P-T);const l={xTile:e.x,yTile:e.y,dxPixels:t*V-c,dyPixels:s*V-c,hard:!i.optional,partIndex:1,width:r*V+2*c,height:n*V+2*c,angle:o,minLod:y,maxLod:a.MB};w.push(l),k=Number.POSITIVE_INFINITY,L=Number.NEGATIVE_INFINITY,T=k,P=L}A=f.y}const C=[];if(I){const i=.5*t.metrics.width,r=(f.x+g.left-4+i)*V*8;if(u=this._placeGlyph(e,u,r,s,e.segment,1,f.vertical,m,C),h&&(u=this._placeGlyph(e,u,r,s,e.segment,-1,f.vertical,m,C)),u>=2)break}else C.push(new x(r,p,p,m,!1)),l&&h&&C.push(new x(r,p+a.Yt,p+a.Yt,m,!1));const E=f.x+g.left,O=f.y-17-g.top,U=E+g.width,F=O+g.height;let N,R,z,G,q,H,W,K;if(!I&&B)if(f.vertical){const e=(E+U)/2-g.height/2,t=(O+F)/2+g.width/2;N=new n.wb(-t-4+v,e-4+S),R=new n.wb(N.x+d.width,N.y+d.height),z=new n.wb(N.x,R.y),G=new n.wb(R.x,N.y)}else N=new n.wb(4-O+v,E-4+S),R=new n.wb(N.x-d.height,N.y+d.width),z=new n.wb(R.x,N.y),G=new n.wb(N.x,R.y);else N=new n.wb(E-4+v,O-4+S),R=new n.wb(N.x+d.width,N.y+d.height),z=new n.wb(N.x,R.y),G=new n.wb(R.x,N.y);for(const t of C){let s,r,a,l;if(t.alternateVerticalGlyph){if(!q){const e=(O+F)/2+S;q=new n.wb((E+U)/2+v-g.height/2-4,e+g.width/2+4),H=new n.wb(q.x+d.height,q.y-d.width),W=new n.wb(H.x,q.y),K=new n.wb(q.x,H.y)}s=q,r=W,a=K,l=H}else s=N,r=z,a=G,l=R;const h=O,u=F,y=t.glyphAngle+o;if(0!==y){const e=Math.cos(y),t=Math.sin(y);s=s.clone(),r=r?.clone(),a=a?.clone(),l=l?.clone(),s.rotate(e,t),l?.rotate(e,t),r?.rotate(e,t),a?.rotate(e,t)}let p=0,x=256;if(I&&B?f.vertical?t.alternateVerticalGlyph?(p=32,x=96):(p=224,x=32):(p=224,x=96):(p=192,x=64),b.push(new _(s,a,r,l,d,t.labelAngle,p,x,t.anchor,t.minzoom,t.maxzoom,t.page)),w&&(!D||this._legible(t.labelAngle)))if(M)E<k&&(k=E),h<T&&(T=h),U>L&&(L=U),u>P&&(P=u);else if(t.minzoom<2){const s={xTile:e.x,yTile:e.y,dxPixels:(E+v)*V-c,dyPixels:(h+v)*V-c,hard:!i.optional,partIndex:1,width:(U-E)*V+2*c,height:(u-h)*V+2*c,angle:y,minLod:t.minzoom,maxLod:t.maxzoom};w.push(s)}}}if(u>=2)return null;if(w&&M){let t,s,r,n;B?(t=-P+v,s=k+S,r=P-T,n=L-k):(t=k+v,s=T+S,r=L-k,n=P-T);const l={xTile:e.x,yTile:e.y,dxPixels:t*V-c,dyPixels:s*V-c,hard:!i.optional,partIndex:1,width:r*V+2*c,height:n*V+2*c,angle:o,minLod:y,maxLod:a.MB};w.push(l)}const C=new m(b);return w&&w.length>0&&(C.textColliders=w),C}_legible(e){const t=(0,a.g$)(e);return t<65||t>=193}_placeGlyph(e,t,s,i,r,o,l,h,c){let u=o;const f=u<0?(0,a.So)(e.angle+a.Yt,a.sf):e.angle;let d=0;s<0&&(u*=-1,s*=-1,d=a.Yt),u>0&&++r;let g=new n.wb(e.x,e.y),y=i[r],p=a.MB;if(i.length<=r)return p;for(;;){const e=y.x-g.x,n=y.y-g.y,o=Math.sqrt(e*e+n*n),_=Math.max(s/o,t),m=e/o,I=n/o,w=(0,a.So)(Math.atan2(I,m)+d,a.sf);if(c.push(new x(g,f,w,h,!1,_,p)),l&&c.push(new x(g,f,w,h,!0,_,p)),_<=t)return _;g=y.clone();do{if(r+=u,i.length<=r||r<0)return _;y=i[r]}while(g.isEqual(y));let b=y.x-g.x,M=y.y-g.y;const k=Math.sqrt(b*b+M*M);b*=o/k,M*=o/k,g.x-=b,g.y-=M,p=_}}}var w,b,M=s(91232),k=s(30936);(b=w||(w={}))[b.moveTo=1]="moveTo",b[b.lineTo=2]="lineTo",b[b.close=7]="close";class L{constructor(e,t,s=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=s;const i=t.keys,r=t.values,n=e.asUnsafe();for(;n.next();)switch(n.tag()){case 1:this.id=n.getUInt64();break;case 2:{const e=n.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),n=e.getUInt32();t[i[s]]=r[n]}e.release();break}case 3:this.type=n.getUInt32();break;case 4:this._pbfGeometry=n.getMessage();break;default:n.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let s,i;this._pbfGeometry=null,e?e.reset(this.type):s=[];let r,a=w.moveTo,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 w.moveTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):s&&(i&&s.push(i),i=[],i.push(new n.wb(l,h)));break;case w.lineTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):i&&i.push(new n.wb(l,h));break;case w.close:e?e.close():i&&!i[0].equals(l,h)&&i.push(i[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?r=e.result():s&&(i&&s.push(i),r=s),t.release(),this._geometry=r,r}}var T=s(97400);class P extends T.c{constructor(){super(12)}add(e,t,s){const i=this.array;i.push(e),i.push(t),i.push(s)}}T.c;class D{constructor(e){this.extent=4096,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(D._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 V extends T.c{constructor(e){super(e)}add(e,t,s,i,r,n,a,o,l,h,c,u){const f=this.array;let d=T.c.i1616to32(e,t);f.push(d);const g=31;d=T.c.i8888to32(Math.round(g*s),Math.round(g*i),Math.round(g*r),Math.round(g*n)),f.push(d),d=T.c.i8888to32(Math.round(g*a),Math.round(g*o),Math.round(g*l),Math.round(g*h)),f.push(d),d=T.c.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class B extends T.c{constructor(e){super(e)}add(e,t,s){const i=this.array;i.push(T.c.i1616to32(e,t)),s&&i.push(...s)}}class A extends T.c{constructor(e){super(e)}add(e,t,s,i,r,n,a){const o=this.array,l=this.index;let h=T.c.i1616to32(e,t);return o.push(h),h=T.c.i8888to32(Math.round(15*s),Math.round(15*i),r,n),o.push(h),a&&o.push(...a),l}}class v extends T.c{constructor(e){super(e)}add(e,t,s,i,r,n,o,l,h,c,u,f){const d=this.array;let g=T.c.i1616to32(e,t);d.push(g),g=T.c.i1616to32(Math.round(8*s),Math.round(8*i)),d.push(g),g=T.c.i8888to32(r/4,n/4,l,h),d.push(g),g=T.c.i8888to32(0,(0,a.g$)(o),10*c,Math.min(10*u,255)),d.push(g),f&&d.push(...f)}}class S extends T.c{constructor(e){super(e)}add(e,t,s,i,r){const n=this.array,a=T.c.i1616to32(2*e+s,2*t+i);n.push(a),r&&n.push(...r)}}class C{constructor(e,t,s){this.layerExtent=4096,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=s,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,s){}}class E extends C{constructor(e,t,s,i,n){super(e,t,s),this.type=r.UV.CIRCLE,this._circleVertexBuffer=i,this._circleIndexBuffer=n}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,s=this._circleIndexBuffer;this._circleIndexStart=3*s.index,this._circleIndexCount=0;const i=this.layer,r=this.zoom;e&&e.setExtent(this.layerExtent);for(const n of this._features){const a=n.getGeometry(e);if(!a)continue;const o=i.circleMaterial.encodeAttributes(n,r,i);for(const e of a)if(e)for(const i of e){const e=t.index;t.add(i.x,i.y,0,0,o),t.add(i.x,i.y,0,1,o),t.add(i.x,i.y,1,0,o),t.add(i.x,i.y,1,1,o),s.add(e,e+1,e+2),s.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),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._circleIndexStart,t[i++]=this._circleIndexCount,t[i++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)s[i++]=this._circleVertexBuffer.array[e];t[i++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[i++]=this._circleIndexBuffer.array[e];return t.buffer}}var O=s(29624),U=s(17012);class F extends C{constructor(e,t,s,i,n,a,o){super(e,t,s),this.type=r.UV.FILL,this._patternMap=new Map,this._fillVertexBuffer=i,this._fillIndexBuffer=n,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,s){const i=this.layer,r=this.zoom,n=i.getPaintProperty("fill-pattern");if(n)if(n.isDataDriven)for(const e of this._features)t(n.getValue(r,e),!0);else t(n.getValue(r),!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,s=this.zoom,{fillMaterial:i,outlineMaterial:r,hasDataDrivenFill:n,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let h=!o&&t.getPaintValue("fill-antialias",s);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",s),i=t.getPaintValue("fill-opacity",s+1);e<1&&i<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",s),i=t.getPaintValue("fill-color",s+1);e[3]<1&&i[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const n=[];for(const l of c){const c=o.getValue(s,l),f=this._spriteInfo[c];if(!f?.rect)continue;const d=i.encodeAttributes(l,s,t,f),g=h&&a?r.encodeAttributes(l,s,t):[],y=l.getGeometry(e);n.push({ddFillAttributes:d,ddOutlineAttributes:g,page:f.page,geometry:y}),n.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:s,page:i,geometry:r}of n)this._processFeature(r,h,t.outlineUsesFillColor,e,s,u,i)}}else for(const o of c){const l=n?i.encodeAttributes(o,s,t):null,c=h&&a?r.encodeAttributes(o,s,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),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._fillIndexStart,t[i++]=this._fillIndexCount,t[i++]=this._outlineIndexStart,t[i++]=this._outlineIndexCount;const r=this._patternMap,n=r.size;if(t[i++]=n,n>0)for(const[e,[s,n]]of r)t[i++]=e,t[i++]=s,t[i++]=n;t[i++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)s[i++]=this._fillVertexBuffer.array[e];t[i++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[i++]=this._fillIndexBuffer.array[e];t[i++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)s[i++]=this._outlineVertexBuffer.array[e];t[i++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[i++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s,i,r,n,a){if(!e)return;const o=e.length,l=!r||0===r.length;if(t&&(!s||l))for(let t=0;t<o;t++)this._processOutline(e[t],r);let h;for(let t=0;t<o;t++){const s=F._area(e[t]);s>32?(void 0!==h&&this._processFill(e,h,i,n,a),h=[t]):s<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,i,n,a)}_processOutline(e,t){const s=this._outlineVertexBuffer,i=this._outlineIndexBuffer,r=i.index;let a,o,l;const h=new n.wb(0,0),c=new n.wb(0,0),u=new n.wb(0,0);let f=-1,d=-1,g=-1,y=-1,p=-1,x=!1,_=e.length;if(_<2)return;const m=e[0];let I=e[_-1];for(;_&&I.isEqual(m);)--_,I=e[_-1];if(!(_-0<2)){for(let r=0;r<_;++r){0===r?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=r!==_-1?e[r+1]:e[0],h.assign(c));const n=this._isClipEdge(a,o);-1===y&&(x=n),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 I=-u.x*-h.x+-u.y*-h.y;let w=Math.abs(0!==I?1/I:1);w>8&&(w=8),m>=0?(g=s.add(o.x,o.y,h.x,h.y,0,1,t),-1===y&&(y=g),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),d=s.add(o.x,o.y,w*-u.x,w*-u.y,0,-1,t),-1===p&&(p=d),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),d=s.add(o.x,o.y,c.x,c.y,0,1,t),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g)):(g=s.add(o.x,o.y,w*u.x,w*u.y,0,1,t),-1===y&&(y=g),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),d=s.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===p&&(p=d),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),f=s.add(o.x,o.y,-c.x,-c.y,0,-1,t),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g))}f>=0&&d>=0&&y>=0&&!x&&i.add(f,d,y),f>=0&&y>=0&&p>=0&&!x&&i.add(f,p,y),this._outlineIndexCount+=3*(i.index-r)}}_processFill(e,t,s,i,r){let n;t.length>1&&(n=[]);let a=0;for(const s of t)0!==a&&n.push(a),a+=e[s].length;const o=2*a,l=O.c.acquire();for(const s of t){const t=e[s],i=t.length;for(let e=0;e<i;++e)l.push(t[e].x,t[e].y)}const h=(0,U.e)(l,n,2);if(U.e.deviation(l,n,2,h)>0){const i=t.map((t=>e[t].length)),{buffer:n,vertexCount:a}=(0,k.y)(l,i);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(n[2*e],n[2*e+1],s);for(let t=0;t<a;t+=3){const s=e+t;this._fillIndexBuffer.add(s,s+1,s+2)}if(void 0!==r){const e=this._patternMap,t=e.get(r);t?t[1]+=a:e.set(r,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let i=0;for(;i<o;)this._fillVertexBuffer.add(l[i++],l[i++],s);let n=0;for(;n<e;)this._fillIndexBuffer.add(t+h[n++],t+h[n++],t+h[n++]);if(void 0!==r){const t=this._patternMap,s=t.get(r);s?s[1]+=e:t.set(r,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}O.c.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 s=e.length-1;for(let i=0;i<s;i++)t+=(e[i].x-e[i+1].x)*(e[i].y+e[i+1].y);return t+=(e[s].x-e[0].x)*(e[s].y+e[0].y),.5*t}}var N=s(93552);class R extends C{constructor(e,t,s,i,n){super(e,t,s),this.type=r.UV.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=i,this.tessellationProperties._lineIndexBuffer=n,this._lineTessellator=new N.A(z(this.tessellationProperties),G(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,s){const i=this.layer,r=this.zoom,n=i.getPaintProperty("line-pattern"),a=i.getPaintProperty("line-dasharray"),o=i.getLayoutProperty("line-cap");if(!n&&!a)return;const l=o?.getValue(r)||0,h=o?.isDataDriven,c=n?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?n.getValue(r,e):this._getDashArrayKey(e,r,i,a,h,o,l));else if(n)t(n.getValue(r));else if(a){const e=a.getValue(r);t(i.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,s=this.zoom,i=this._features,r=this._tessellationOptions,{hasDataDrivenLine:n,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",s),g=d||0,y=!!f;u=t.getLayoutProperty("line-join");const p=u?.isDataDriven?u:null,x=p?null:t.getLayoutValue("line-join",s);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",s);u=t.getLayoutProperty("line-round-limit");const I=u?.isDataDriven?u:null,w=I?null:t.getLayoutValue("line-round-limit",s);u=t.getPaintProperty("line-width");const b=u?.isDataDriven?u:null,M=b?null:t.getPaintValue("line-width",s);u=t.getPaintProperty("line-offset");const k=u?.isDataDriven?u:null,L=k?null:t.getPaintValue("line-offset",s);if(h||c){const n=[];for(const r of i){const i=h?o.getValue(s,r):this._getDashArrayKey(r,s,t,l,y,f,g),c=this._spriteInfo[i];if(!c?.rect)continue;const u=a.encodeAttributes(r,s,t,c),T=r.getGeometry(e);n.push({ddAttributes:u,page:c.page,cap:f?f.getValue(s,r):d,join:p?p.getValue(s,r):x,miterLimit:_?_.getValue(s,r):m,roundLimit:I?I.getValue(s,r):w,halfWidth:.5*(b?b.getValue(s,r):M),offset:k?k.getValue(s,r):L,geometry:T})}n.sort(((e,t)=>e.page-t.page)),r.textured=!0;for(const{ddAttributes:e,page:t,cap:s,join:i,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of n)r.capType=s,r.joinType=i,r.miterLimit=a,r.roundLimit=o,r.halfWidth=l,r.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(s),t=this._spriteInfo[e];if(!t?.rect)return}r.textured=!(!o&&!l),r.capType=d,r.joinType=x,r.miterLimit=m,r.roundLimit=w,r.halfWidth=.5*M,r.offset=L;for(const o of i){const i=n?a.encodeAttributes(o,s,t):null;f&&(r.capType=f.getValue(s,o)),p&&(r.joinType=p.getValue(s,o)),_&&(r.miterLimit=_.getValue(s,o)),I&&(r.roundLimit=I.getValue(s,o)),b&&(r.halfWidth=.5*b.getValue(s,o)),k&&(r.offset=k.getValue(s,o));const l=o.getGeometry(e);this._processFeature(l,i)}}}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),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._lineIndexStart,t[i++]=this._lineIndexCount;const r=this._patternMap,n=r.size;if(t[i++]=n,n>0)for(const[e,[s,n]]of r)t[i++]=e,t[i++]=s,t[i++]=n;t[i++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)s[i++]=this.tessellationProperties._lineVertexBuffer.array[e];t[i++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[i++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s){if(!e)return;const i=e.length;for(let r=0;r<i;r++)this._processGeometry(e[r],t,s)}_processGeometry(e,t,s){if(e.length<2)return;let i,r,n=e[0],a=1;for(;a<e.length;)i=e[a].x-n.x,r=e[a].y-n.y,i*i+r*r<1e-6?e.splice(a,1):(n=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!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=h:e.set(s,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,s,i,r,n,a){const o=r?n.getValue(t,e):a,l=i.getValue(t,e);return s.getDashKey(l,o)}}const z=e=>(t,s,i,r,n,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,s,o,l,i,r,n,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),G=e=>(t,s,i)=>{e._lineIndexBuffer.add(t,s,i)};var q,H=s(60024),W=s(70680),K=s(88264),Y=s(28808);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 Z extends C{constructor(e,t,s,i,n,a,o,l,h){super(t,s,h.getSpriteItems()),this.type=r.UV.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=i,this._iconIndexBuffer=n,this._textVertexBuffer=a,this._textIndexBuffer=o,this._placementEngine=l,this._workerTileHandler=h}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(e,t,s){const i=this.layer,r=this.zoom;e&&e.setExtent(this.layerExtent);const n=i.getLayoutProperty("icon-image"),a=i.getLayoutProperty("text-field");let o=i.getLayoutProperty("text-transform"),l=i.getLayoutProperty("text-font");const h=[];let c,u,f,d;n&&!n.isDataDriven&&(c=n.getValue(r)),a&&!a.isDataDriven&&(u=a.getValue(r)),o&&o.isDataDriven||(f=i.getLayoutValue("text-transform",r),o=null),l&&l.isDataDriven||(d=i.getLayoutValue("text-font",r),l=null);for(const y of this._features){const p=y.getGeometry(e);if(!p||0===p.length)continue;let x,_;n&&(x=n.isDataDriven?n.getValue(r,y):this._replaceKeys(c,y.values),x&&t(x));let m=!1;if(a&&(_=a.isDataDriven?a.getValue(r,y):this._replaceKeys(u,y.values),_)){switch(_=_.replaceAll("\\n","\n"),o&&(f=o.getValue(r,y)),f){case g.If.LOWERCASE:_=_.toLowerCase();break;case g.If.UPPERCASE:_=_.toUpperCase()}if(Z._bidiEngine.hasBidiChar(_)){let e;e="rtl"===Z._bidiEngine.checkContextual(_)?"IDNNN":"ICNNN",_=Z._bidiEngine.bidiTransform(_,e,"VLYSN"),m=!0}if(_.length>0){l&&(d=l.getValue(r,y));for(const e of d){let t=s[e];t||(t=s[e]=new Set);for(const e of _){const s=e.codePointAt(0);null!=s&&t.add(s)}}}}if(!x&&!_)continue;const I=i.getLayoutValue("symbol-sort-key",r,y),w={feature:y,sprite:x,label:_,rtl:m,geometry:p,hash:(_?(0,K.sV)(_):0)^(x?(0,K.sV)(x):0),priority:I,textFont:d};h.push(w)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,s=this.zoom,i=t.getLayoutValue("symbol-placement",s),r=i!==g.iA.POINT,o=8*t.getLayoutValue("symbol-spacing",s),l=t.getLayoutProperty("icon-image"),h=t.getLayoutProperty("text-field"),c=l?new Y.SW(t,s,r):null,u=h?new Y.c3(t,s,r):null,y=this._workerTileHandler;let x;l&&(x=y.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 _=[];let m=1;u&&u.size&&(m=u.size/f);const I=u?u.maxAngle*a.YJ:0,w=u?8*u.size:0;for(const e of this._symbolFeatures){let t,a;c&&x&&e.sprite&&(t=x[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(s,e.feature);let l=0;const h=e.label;if(h){(0,W.EN)(u),u.update(s,e.feature);const t=r&&u.rotationAlignment===g.cN.MAP?u.keepUpright:u.writingMode&&u.writingMode.includes(g.Mt.VERTICAL);let i=.5;switch(u.anchor){case g.wL.TOP_LEFT:case g.wL.LEFT:case g.wL.BOTTOM_LEFT:i=0;break;case g.wL.TOP_RIGHT:case g.wL.RIGHT:case g.wL.BOTTOM_RIGHT:i=1}let n=.5;switch(u.anchor){case g.wL.TOP_LEFT:case g.wL.TOP:case g.wL.TOP_RIGHT:n=0;break;case g.wL.BOTTOM_LEFT:case g.wL.BOTTOM:case g.wL.BOTTOM_RIGHT:n=1}let o=.5;switch(u.justify){case g.W6.AUTO:o=i;break;case g.W6.LEFT:o=0;break;case g.W6.RIGHT:o=1}const c=u.letterSpacing*f,p=r?0:u.maxWidth*f,x=u.lineHeight*f,_=e.textFont.map((e=>y.getGlyphItems(e)));if(a=new d(_,p,x,c,i,n,o).getShaping(h,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const s of a)e=Math.min(e,s.x),t=Math.max(t,s.x);l=(t-e+48)*m*8}}for(let s of e.geometry){const h=[];if(i===g.iA.LINE){if(a?.length&&u?.size){const e=8*u.size*(2+Math.min(2,4*Math.abs(u.offset[1])));s=Z._smoothVertices(s,e)}Z._pushAnchors(h,s,o,l)}else i===g.iA.LINE_CENTER?Z._pushCenterAnchor(h,s):e.feature.type===n.ao.Polygon?Z._pushCentroid(h,s):h.push(new p(s[0].x,s[0].y));for(const i of h){if(i.x<0||i.x>4096||i.y<0||i.y>4096)continue;if(r&&l>0&&u?.rotationAlignment===g.cN.MAP&&!Z._honorsTextMaxAngle(s,i,l,I,w))continue;const n={shaping:a,line:s,iconMosaicItem:t,anchor:i,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};_.push(n),this._processFeature(n,c,u)}}}_.sort(j),this._addPlacedGlyphs(),this._symbolInstances=_}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=Z._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),s=new Int32Array(t.buffer),i=new Float32Array(t.buffer),[r,n,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(r),t[o++]=parseFloat(n),t[o++]=parseFloat(a),t[o++]=this.markerPageMap.size;for(const[e,[s,i]]of this.markerPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this.glyphsPageMap.size;for(const[e,[s,i]]of this.glyphsPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this._iconVertexBuffer.index/4,t[o++]=this._textVertexBuffer.index/4,o=Z.serializeSymbols(t,s,i,o,this._symbolInstances),t[o++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)s[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++)s[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 s of e||[]){t+=5,t+=1;for(const e of s.textColliders)t+=10;for(const e of s.iconColliders)t+=10;t+=1,t+=2*s.textVertexRanges.length,t+=1,t+=2*s.iconVertexRanges.length}return t}static serializeSymbols(e,t,s,i,r){r=r||[],t[i++]=r.length;for(const e of r){t[i++]=e.anchor.x,t[i++]=e.anchor.y,t[i++]=e.symbolFeature.hash,t[i++]=e.symbolFeature.priority,t[i++]=e.symbolFeature.feature.featureIndex,t[i++]=e.textColliders.length+e.iconColliders.length;for(const r of e.textColliders)t[i++]=r.xTile,t[i++]=r.yTile,t[i++]=r.dxPixels,t[i++]=r.dyPixels,t[i++]=r.hard?1:0,t[i++]=r.partIndex,s[i++]=r.minLod,s[i++]=r.maxLod,t[i++]=r.width,t[i++]=r.height;for(const r of e.iconColliders)t[i++]=r.xTile,t[i++]=r.yTile,t[i++]=r.dxPixels,t[i++]=r.dyPixels,t[i++]=r.hard?1:0,t[i++]=r.partIndex,s[i++]=r.minLod,s[i++]=r.maxLod,t[i++]=r.width,t[i++]=r.height;t[i++]=e.textVertexRanges.length;for(const[s,r]of e.textVertexRanges)t[i++]=s,t[i++]=r;t[i++]=e.iconVertexRanges.length;for(const[s,r]of e.iconVertexRanges)t[i++]=s,t[i++]=r}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,((e,s)=>s in t?t[s]:""))}_processFeature(e,t,s){const{line:i,iconMosaicItem:r,shaping:n,anchor:o}=e,l=this.zoom,h=this.layer,c=!!r;let u=!0;c&&(u=t?.optional||!r);const f=n&&n.length>0,d=!f||s?.optional;let y,p;if(c&&(y=this._placementEngine.getIconPlacement(o,r,t)),(y||u)&&(f&&(p=this._placementEngine.getTextPlacement(o,n,i,s)),p||d)){if(y&&p||(d||u?d||p?u||y||(p=null):y=null:(y=null,p=null)),p){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,p.shapes,l,s.rotationAlignment,t),p.textColliders){e.textColliders=p.textColliders;for(const e of p.textColliders){e.minLod=Math.max(l+(0,a.sD)(e.minLod),0),e.maxLod=Math.min(l+(0,a.sD)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),r=e.dxPixels*s-e.dyPixels*i,n=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(r,a,l,c),d=Math.max(r,a,l,c),g=Math.min(n,o,h,u),y=Math.max(n,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=y-g}}}}if(y){const s=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,y.shapes,l,r.page,t.rotationAlignment===g.cN.VIEWPORT,s),y.iconColliders){e.iconColliders=y.iconColliders;for(const e of y.iconColliders){e.minLod=Math.max(l+(0,a.sD)(e.minLod),0),e.maxLod=Math.min(l+(0,a.sD)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),r=e.dxPixels*s-e.dyPixels*i,n=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(r,a,l,c),d=Math.max(r,a,l,c),g=Math.min(n,o,h,u),y=Math.max(n,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=y-g}}}}}}_addPlacedIcons(e,t,s,i,r,n){const o=Math.max(s-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=r?0:Math.max(s+(0,a.sD)(u.minzoom),o),f=r?25:Math.min(s+(0,a.sD)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,g=u.tr,y=u.bl,p=u.br,x=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,w=u.anchor,b=l.index,M=x.x,k=x.y,L=M+x.width,T=k+x.height,P=l.index;l.add(w.x,w.y,d.x,d.y,M,k,_,m,I,t,f,n),l.add(w.x,w.y,g.x,g.y,L,k,_,m,I,t,f,n),l.add(w.x,w.y,y.x,y.y,M,T,_,m,I,t,f,n),l.add(w.x,w.y,p.x,p.y,L,T,_,m,I,t,f,n),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===P?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([P,4]),h.add(b,b+1,b+2),h.add(b+1,b+2,b+3),c.has(i)?c.get(i)[1]+=6:c.set(i,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,s=this._glyphMap;for(const[i,r]of this._glyphBufferDataStorage)for(const n of r){const r=e.index,a=n.symbolInstance,o=n.ddAttributes,l=e.index;e.add(n.glyphAnchor[0],n.glyphAnchor[1],n.tl[0],n.tl[1],n.xmin,n.ymin,n.labelAngle,n.minAngle,n.maxAngle,n.minLod,n.maxLod,o),e.add(n.glyphAnchor[0],n.glyphAnchor[1],n.tr[0],n.tr[1],n.xmax,n.ymin,n.labelAngle,n.minAngle,n.maxAngle,n.minLod,n.maxLod,o),e.add(n.glyphAnchor[0],n.glyphAnchor[1],n.bl[0],n.bl[1],n.xmin,n.ymax,n.labelAngle,n.minAngle,n.maxAngle,n.minLod,n.maxLod,o),e.add(n.glyphAnchor[0],n.glyphAnchor[1],n.br[0],n.br[1],n.xmax,n.ymax,n.labelAngle,n.minAngle,n.maxAngle,n.minLod,n.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(r,r+1,r+2),t.add(r+1,r+2,r+3),s.has(i)?s.get(i)[1]+=6:s.set(i,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,s,i,r){const n=Math.max(s-1,0),o=i===g.cN.VIEWPORT;let l,h,c,u,f,d,y,p,x,_,m;for(const i of t)l=o?0:Math.max(s+(0,a.sD)(i.minzoom),n),h=o?25:Math.min(s+(0,a.sD)(i.maxzoom),25),h<=l||(c=i.tl,u=i.tr,f=i.bl,d=i.br,y=i.labelAngle,p=i.minAngle,x=i.maxAngle,_=i.anchor,m=i.mosaicRect,this._glyphBufferDataStorage.has(i.page)||this._glyphBufferDataStorage.set(i.page,[]),this._glyphBufferDataStorage.get(i.page).push({glyphAnchor:[_.x,_.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:m.x,ymin:m.y,xmax:m.x+m.width,ymax:m.y+m.height,labelAngle:y,minAngle:p,maxAngle:x,minLod:l,maxLod:h,placementLod:n,symbolInstance:e,ddAttributes:r}))}static _pushAnchors(e,t,s,i){s+=i;let r=0;const o=t.length-1;for(let e=0;e<o;e++)r+=n.wb.distance(t[e],t[e+1]);let l=i||s;if(l*=.5,r<=l)return;const h=l/r;let c=0,u=-(s=r/Math.max(Math.round(r/s),1))/2;const f=t.length-1;for(let i=0;i<f;i++){const r=t[i],n=t[i+1],o=n.x-r.x,l=n.y-r.y,f=Math.sqrt(o*o+l*l);let d;for(;u+s<c+f;){u+=s;const t=(u-c)/f,g=(0,a.qy)(r.x,n.x,t),y=(0,a.qy)(r.y,n.y,t);void 0===d&&(d=Math.atan2(l,o)),e.push(new p(g,y,d,i,h))}c+=f}}static _pushCenterAnchor(e,t){let s=0;const i=t.length-1;for(let e=0;e<i;e++)s+=n.wb.distance(t[e],t[e+1]);const r=s/2;let o=0;const l=t.length-1;for(let s=0;s<l;s++){const i=t[s],n=t[s+1],l=n.x-i.x,h=n.y-i.y,c=Math.sqrt(l*l+h*h);if(r<o+c){const t=(r-o)/c,u=(0,a.qy)(i.x,n.x,t),f=(0,a.qy)(i.y,n.y,t),d=Math.atan2(h,l);return void e.push(new p(u,f,d,s,0))}o+=c}}static _deviation(e,t,s){const i=(t.x-e.x)*(s.x-t.x)+(t.y-e.y)*(s.y-t.y),r=(t.x-e.x)*(s.y-t.y)-(t.y-e.y)*(s.x-t.x);return Math.atan2(r,i)}static _honorsTextMaxAngle(e,t,s,i,r){let a=0;const o=s/2;let l=new n.wb(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=n.wb.distance(e[h],l),l=e[h]}a+=n.wb.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;a<o;){const t=e[h];let s,o=h;do{if(++o,o===f)return!1;s=e[o]}while(s.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(s));const g=this._deviation(t,s,l);for(c.push({deviation:g,distToAnchor:a}),u+=g;a-c[0].distToAnchor>r;)u-=c.shift().deviation;if(Math.abs(u)>i)return!1;a+=n.wb.distance(s,l),h=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let s=e.length;if(s<3)return e;const i=[];let r=0,a=0;i.push(0);for(let t=1;t<s;t++){const s=n.wb.distance(e[t],e[t-1]);s>0&&(r+=s,i.push(r),a++,a!==t&&(e[a]=e[t]))}if(s=a+1,s<3)return e;t=Math.min(t,.2*r);const o=e[0].x,l=e[0].y,h=e[s-1].x,c=e[s-1].y,u=n.wb.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[s-1],e[s-2]),u.normalize(),e[s-1].x+=t*u.x,e[s-1].y+=t*u.y,i[0]-=t,i[s-1]+=t;const f=[];f.push(new n.wb(o,l));const d=1e-6,g=.5*t;for(let r=1;r<s-1;r++){let a=0,o=0,l=0;for(let s=r-1;s>=0;s--){const n=g+i[s+1]-i[r];if(n<0)break;const h=i[s+1]-i[s],c=i[r]-i[s]<g?1:n/h;if(c<d)break;const u=c*c,f=c*n-.5*u*h,y=c*h/t,p=e[s+1],x=e[s].x-p.x,_=e[s].y-p.y;a+=y/f*(p.x*c*n+.5*u*(n*x-h*p.x)-u*c*h*x/3),o+=y/f*(p.y*c*n+.5*u*(n*_-h*p.y)-u*c*h*_/3),l+=y}for(let n=r+1;n<s;n++){const s=g-i[n-1]+i[r];if(s<0)break;const h=i[n]-i[n-1],c=i[n]-i[r]<g?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,y=c*h/t,p=e[n-1],x=e[n].x-p.x,_=e[n].y-p.y;a+=y/f*(p.x*c*s+.5*u*(s*x-h*p.x)-u*c*h*x/3),o+=y/f*(p.y*c*s+.5*u*(s*_-h*p.y)-u*c*h*_/3),l+=y}f.push(new n.wb(a/l,o/l))}return f.push(new n.wb(h,c)),e[0].x=o,e[0].y=l,e[s-1].x=h,e[s-1].y=c,f}static _pushCentroid(e,t){const s=4096,i=4096,r=t.length-1;let n=0,a=0,o=0,l=t[0].x,h=t[0].y;l>s&&(l=s),l<0&&(l=0),h>i&&(h=i),h<0&&(h=0);for(let e=1;e<r;e++){let r=t[e].x,c=t[e].y,u=t[e+1].x,f=t[e+1].y;r>s&&(r=s),r<0&&(r=0),c>i&&(c=i),c<0&&(c=0),u>s&&(u=s),u<0&&(u=0),f>i&&(f=i),f<0&&(f=0);const d=(r-l)*(f-h)-(u-l)*(c-h);n+=d*(l+r+u),a+=d*(h+c+f),o+=d}n/=3*o,a/=3*o,isNaN(n)||isNaN(a)||e.push(new p(n,a))}}Z._bidiEngine=new H.c,function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(q||(q={}));class J{constructor(e,t,s,i,r,o){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=t,this._sourceDataMaxLOD=i,o){this._styleLayerUIDs=new Set;for(const e of o)this._styleLayerUIDs.add(e)}this._styleRepository=r,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,a.sr)(this._level);for(const t of Object.keys(e)){const s=e[t];if(this._pbfTiles[t]=new M.c(new Uint8Array(s.protobuff),new DataView(s.protobuff)),s.refKey){const[e]=s.refKey.split("/").map(parseFloat),i=l-e;if(i>0){const e=(1<<i)-1,s=h&e,r=c&e;this._tileClippers[t]=new n.CU(i,s,r,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new n.u4)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,k.C)(),s=this._initialize(e),{returnedBuckets:i}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const r=[],n=new Set,a=(e,t)=>{n.has(e)||(r.push({name:e,repeat:t}),n.add(e))},o={};for(const e of i)e.getResources(e.tileClipper,a,o);if(this._tile.status===q.INVALID)return[];const l=this._fetchResources(r,o,e);return Promise.all([...l,t]).then((()=>this._processFeatures(s.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:s,layers:i,sourceNameToTileClipper:r,sourceNameToUniqueSourceLayerBuckets:n,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=i.length-1;e>=0;e--){const u=i[e];if(s<c){if(u.minzoom&&s<Math.floor(u.minzoom)||u.maxzoom&&s>=u.maxzoom)continue}else if(u.maxzoom&&s>=u.maxzoom)continue;if(u.type===g.gf.BACKGROUND||!this._canParseStyleLayer(u.uid)||!t[u.source]||!r[u.source])continue;const f=t[u.source],d=r[u.source],y=u.sourceLayer,p=f[y];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=n[u.source];t||(t=n[u.source]={});let s=t[y];s||(s=t[y]=[]),s.push(e),o.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:s}=e;s.forEach(((e,s)=>{t[e]&&t[e].layerUIDs.push(s)}))}_filterFeatures(e){const{signal:t,sourceNameToTileData:s,sourceNameToUniqueSourceLayerBuckets:r,sourceNameToUniqueSourceLayers:n}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(n))n[e].forEach((t=>{l.push(t),h.push(e)}));for(let e=0;e<l.length;e++){const n=h[e],c=l[e];if(!s[n]||!r[n])continue;const u=s[n][c],f=r[n][c];if(!f||0===f.length)continue;if((0,i.wv)(t))return;let d=0;const g=u.getData();for(;g.nextTag(2);){const e=g.getMessage(),t=new L(e,u,d++);e.release();const s=t.values;if(s){const e=s._minzoom;if(e&&e>=o)continue;const t=s._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,s){const i=[],r=this._tile.getWorkerTileHandler();let n,a;e.length>0&&(n=r.fetchSprites(e,this._client,s),i.push(n));for(const e in t){const n=t[e];n.size>0&&(a=r.fetchGlyphs(this._tile.tileKey,e,n,this._client,s),i.push(a))}return i}_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 s of Object.keys(e)){const i=e[s],r={};for(;i.next();)switch(i.tag()){case 3:{const e=i.getMessage(),t=new D(e);e.release(),r[t.name]=t;break}default:i.skip()}t[s]=r}return t}_createBucket(e){switch(e.type){case g.gf.BACKGROUND:return null;case g.gf.FILL:return this._createFillBucket(e);case g.gf.LINE:return this._createLineBucket(e);case g.gf.CIRCLE:return this._createCircleBucket(e);case g.gf.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new F(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.fillMaterial.getStride()),new P,new A(e.outlineMaterial.getStride()),new P)}_createLineBucket(e){return new R(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.lineMaterial.getStride()),new P)}_createCircleBucket(e){return new E(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new S(e.circleMaterial.getStride()),new P)}_createSymbolBucket(e){const t=this._tile;return new Z(t.tileKey,e,this._level,new v(e.iconMaterial.getStride()),new P,new v(e.textMaterial.getStride()),new P,t.placementEngine,t.getWorkerTileHandler())}}class Q{constructor(e,t,s,i){this.status=q.INITIALIZED,this.placementEngine=new I,this.tileKey=e,this.refKeys=t,this._workerTileHandler=s,this._styleRepository=i}release(){this.tileKey="",this.refKeys=null,this.status=q.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const s=t?.signal;if(null!=s){const e=()=>{s.removeEventListener("abort",e),this.status=q.INVALID};s.addEventListener("abort",e)}let r;const n={bucketsWithData:[],emptyBuckets:null};try{r=await this._parse(e,t)}catch(e){if((0,i.mA)(e))throw e;return{result:n,transferList:[]}}this.status=q.READY;const a=n.bucketsWithData,o=[];for(const e of r)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)),n.emptyBuckets=h,{result:n,transferList:l}}setObsolete(){this.status=q.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const s=e.sourceName2DataAndRefKey;return 0===Object.keys(s).length?[]:(this.status=q.MODIFIED,new J(s,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var X=s(11272);class ${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:s}=e,r={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const s=e.sourceName2DataAndRefKey[t];r[t]=s.refKey}const n=new Q(s,r,this,this._styleRepository);try{return await n.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(n.setObsolete(),n.release(),!(0,i.mA)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const s of e){const e=s.type,i=s.data;switch(e){case r.Sw.PAINTER_CHANGED:t.setPaintProperties(i.layer,i.paint);break;case r.Sw.LAYOUT_CHANGED:t.setLayoutProperties(i.layer,i.layout);break;case r.Sw.LAYER_REMOVED:t.deleteStyleLayer(i.layer);break;case r.Sw.LAYER_CHANGED:t.setStyleLayer(i.layer,i.index);break;case r.Sw.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:s}=e;this._styleRepository=new X.c(t),this._sourceDataMaxLOD=s,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,s){const i=[],r=this._spriteInfo;for(const t of e)void 0===r[t.name]&&i.push(t);return 0===i.length?Promise.resolve():t.invoke("getSprites",i,{signal:s?.signal}).then((e=>{for(const t in e){const s=e[t];r[t]=s}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,s,i,r){const n=[];let a=this._glyphInfo[t];return a?s.forEach((e=>{a[e]||n.push(e)})):(a=this._glyphInfo[t]=[],s.forEach((e=>n.push(e)))),0===n.length?Promise.resolve():i.invoke("getGlyphs",{tileID:e,font:t,codePoints:n},r).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7468],{74784:(e,t,s)=>{s.d(t,{a:()=>m,b:()=>c,c:()=>r,e:()=>I,f:()=>a,g:()=>p,i:()=>d,j:()=>g,l:()=>x,n:()=>y,s:()=>n,t:()=>_});var i=s(47364);function r(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,s,i,r){return e[0]=t,e[1]=s,e[2]=i,e[3]=r,e}function a(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e[3]=t[3]+s[3],e}function o(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e[3]=t[3]-s[3],e}function l(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e[2]=t[2]*s[2],e[3]=t[3]*s[3],e}function h(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e[2]=t[2]/s[2],e[3]=t[3]/s[3],e}function c(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e}function u(e,t){const s=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(s*s+i*i+r*r+n*n)}function f(e,t){const s=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2],n=t[3]-e[3];return s*s+i*i+r*r+n*n}function d(e){const t=e[0],s=e[1],i=e[2],r=e[3];return Math.sqrt(t*t+s*s+i*i+r*r)}function g(e){const t=e[0],s=e[1],i=e[2],r=e[3];return t*t+s*s+i*i+r*r}function y(e,t){const s=t[0],i=t[1],r=t[2],n=t[3];let a=s*s+i*i+r*r+n*n;return a>0&&(a=1/Math.sqrt(a),e[0]=s*a,e[1]=i*a,e[2]=r*a,e[3]=n*a),e}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function x(e,t,s,i){const r=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r+i*(s[0]-r),e[1]=n+i*(s[1]-n),e[2]=a+i*(s[2]-a),e[3]=o+i*(s[3]-o),e}function _(e,t,s){const i=t[0],r=t[1],n=t[2],a=t[3];return e[0]=s[0]*i+s[4]*r+s[8]*n+s[12]*a,e[1]=s[1]*i+s[5]*r+s[9]*n+s[13]*a,e[2]=s[2]*i+s[6]*r+s[10]*n+s[14]*a,e[3]=s[3]*i+s[7]*r+s[11]*n+s[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 I(e,t){const s=e[0],r=e[1],n=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,i.Au)();return Math.abs(s-o)<=u*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(r-l)<=u*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(n-h)<=u*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const w=o,b=l,M=h,k=u,L=f,T=d,P=g;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:r,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:k,distance:u,div:M,divide:h,dot:p,equals:I,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:T,length:d,lerp:x,max:function(e,t,s){return e[0]=Math.max(t[0],s[0]),e[1]=Math.max(t[1],s[1]),e[2]=Math.max(t[2],s[2]),e[3]=Math.max(t[3],s[3]),e},min:function(e,t,s){return e[0]=Math.min(t[0],s[0]),e[1]=Math.min(t[1],s[1]),e[2]=Math.min(t[2],s[2]),e[3]=Math.min(t[3],s[3]),e},mul:b,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:y,random:function(e,t){const s=i.QR;let r,n,a,o,l,h;t=t||1;do{r=2*s()-1,n=2*s()-1,l=r*r+n*n}while(l>=1);do{a=2*s()-1,o=2*s()-1,h=a*a+o*o}while(h>=1);const c=Math.sqrt((1-l)/h);return e[0]=t*r,e[1]=t*n,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,s,i){return e[0]=t[0]+s[0]*i,e[1]=t[1]+s[1]*i,e[2]=t[2]+s[2]*i,e[3]=t[3]+s[3]*i,e},set:n,sqrDist:L,sqrLen:P,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:w,subtract:o,transformMat4:_,transformQuat:function(e,t,s){const i=t[0],r=t[1],n=t[2],a=s[0],o=s[1],l=s[2],h=s[3],c=h*i+o*n-l*r,u=h*r+l*i-a*n,f=h*n+a*r-o*i,d=-a*i-o*r-l*n;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"}))},46988:(e,t,s)=>{s.d(t,{SQ:()=>n,ec:()=>l,kv:()=>r,uO:()=>a,yU:()=>h});const i={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 r(e){return!!i[e]||!!i[e.toLowerCase()]}function n(e){return i[e]??i[e.toLowerCase()]}function a(e){return[...n(e)]}function o(e,t,s){s<0&&++s,s>1&&--s;const i=6*s;return i<1?e+(t-e)*i:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}function l(e,t,s,i=1){const r=(e%360+360)%360/360,n=s<=.5?s*(t+1):s+t-s*t,a=2*s-n;return[Math.round(255*o(a,n,r+1/3)),Math.round(255*o(a,n,r)),Math.round(255*o(a,n,r-1/3)),i]}function h(e){const t=e.length>5,s=t?8:4,i=(1<<s)-1,r=t?1:17,n=t?9===e.length:5===e.length;let a=Number("0x"+e.substr(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return n&&(l=a&i,a>>=s,o[3]=r*l/255),l=a&i,a>>=s,o[2]=r*l,l=a&i,a>>=s,o[1]=r*l,l=a&i,a>>=s,o[0]=r*l,o}},37008:(e,t,s)=>{function i(){return[0,0,0,0]}function r(e,t,s,i){return[e,t,s,i]}function n(){return r(1,1,1,1)}function a(){return r(1,0,0,0)}function o(){return r(0,1,0,0)}function l(){return r(0,0,1,0)}function h(){return r(0,0,0,1)}s.d(t,{Su:()=>i,WK:()=>r});const c=n(),u=a(),f=o(),d=l(),g=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_W:g,UNIT_X:u,UNIT_Y:f,UNIT_Z:d,ZEROS:[0,0,0,0],clone:function(e){return[e[0],e[1],e[2],e[3]]},create:i,createView:function(e,t){return new Float64Array(e,t,4)},fromArray:function(e,t=[0,0,0,0]){const s=Math.min(4,e.length);for(let i=0;i<s;++i)t[i]=e[i];return t},fromValues:r,ones:n,unitW:h,unitX:a,unitY:o,unitZ:l,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},91232:(e,t,s)=>{s.d(t,{c:()=>c});var i,r,n=s(9456),a=s(69752);(r=i||(i={}))[r.varint=0]="varint",r[r.fixed64=1]="fixed64",r[r.delimited=2]="delimited",r[r.fixed32=5]="fixed32",r[r.unknown=99]="unknown";const o=4294967296,l=new TextDecoder("utf-8"),h=(0,n.c)("safari")||(0,n.c)("ios")?6:(0,n.c)("ff")?12:32;class c{constructor(e,t,s=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(e,t,s,r)}_init(e,t,s,i){this._data=e,this._dataView=t,this._pos=s,this._end=i}asUnsafe(){return this}clone(){return new c(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)|0}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,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}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,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,i){const r=this.getMessage(),n=e(r,t,s,i);return r.release(),n}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case i.varint:this._decodeVarint();break;case i.fixed64:this._skip(8);break;case i.delimited:this._skip(this._getLength());break;case i.fixed32: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,s=0,i=0;if(this._end-t>=10)do{if(i=e[t++],s|=127&i,0==(128&i))break;if(i=e[t++],s|=(127&i)<<7,0==(128&i))break;if(i=e[t++],s|=(127&i)<<14,0==(128&i))break;if(i=e[t++],s|=(127&i)<<21,0==(128&i))break;if(i=e[t++],s+=268435456*(127&i),0==(128&i))break;if(i=e[t++],s+=34359738368*(127&i),0==(128&i))break;if(i=e[t++],s+=4398046511104*(127&i),0==(128&i))break;if(i=e[t++],s+=562949953421312*(127&i),0==(128&i))break;if(i=e[t++],s+=72057594037927940*(127&i),0==(128&i))break;if(i=e[t++],s+=0x8000000000000000*(127&i),0==(128&i))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(i=e[t],0!=(128&i));)++t,s+=(127&i)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=i*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,i=0;const r=1&e[this._pos];if(i=e[this._pos++],s|=127&i,0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<7,0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<14,0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<21,0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=268435456*(127&i),0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=34359738368*(127&i),0==(128&i))return r?-(s+1)/2:s/2;if(i=e[this._pos++],s+=4398046511104*(127&i),0==(128&i))return r?-(s+1)/2:s/2;if(t=BigInt(s),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),0==(128&i))return Number(r?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),0==(128&i))return Number(r?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),0==(128&i))return Number(r?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==i.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>h){const i=e.subarray(t,s);return l.decode(i)}let i="",r="";for(let n=t;n<s;++n){const t=e[n];128&t?r+="%"+t.toString(16):(i+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(i+=decodeURIComponent(r)),i}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}c.pool=new a.c(c,void 0,(e=>{e._data=null,e._dataView=null}))},93008:(e,t,s)=>{s.r(t),s.d(t,{default:()=>$});var i=s(10860),r=s(88104),n=s(93320),a=s(51760);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=s(27364);const f=24;class d{constructor(e,t,s,i,r,n,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=s,this._letterSpacing=i,this._hAnchor=r,this._vAnchor=n,this._justify=a}getShaping(e,t,s){const i=this._letterSpacing,r=this._lineHeight,n=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 r=s&&o(e);let n;for(const t of this._glyphItems)if(n=t[e],n)break;u.push({codePoint:e,x:f,y:d,vertical:r,glyphMosaicItem:n}),n&&(f+=n.metrics.advance+i)}let g=f;a>0&&(g=f/Math.max(1,Math.ceil(f/a)));const y=e.includes(""),p=[],x=u.length;for(let e=0;e<x-1;e++){const t=u[e].codePoint,s=l(t);if(h(t)||s){let i=0;if(10===t)i-=1e4;else if(s&&y)i+=150;else{40!==t&&65288!==t||(i+=50);const s=u[e+1].codePoint;41!==s&&65289!==s||(i+=50)}p.push(this._buildBreak(e+1,u[e].x,g,p,i,!1))}}const _=this._optimalBreaks(this._buildBreak(x,f,g,p,0,!0));let m=0;const I=t?-r:r;let w=0;for(let e=0;e<_.length;e++){const t=_[e];let s=w;for(;s<t&&c(u[s].codePoint);)u[s].glyphMosaicItem=null,++s;let i=t-1;for(;i>s&&c(u[i].codePoint);)u[i].glyphMosaicItem=null,--i;if(s<=i){const e=u[s].x;for(let t=s;t<=i;t++)u[t].x-=e,u[t].y=d;let t=u[i].x;u[i].glyphMosaicItem&&(t+=u[i].glyphMosaicItem.metrics.advance),m=Math.max(t,m),n&&this._applyJustification(u,s,i)}w=t,d+=I}if(u.length>0){const e=_.length-1,s=(n-this._hAnchor)*m;let i=(-this._vAnchor*(e+1)+.5)*r;t&&e&&(i+=e*r);for(const e of u)e.x+=s,e.y+=i}return u.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let s=1/0,i=1/0,r=0,n=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;s=Math.min(s,o),r=Math.max(r,h),i=Math.min(i,l),n=Math.max(n,c)}return{x:s,y:i,width:r-s,height:n-i}}static getBox(e){if(!e.length)return null;let t=1/0,s=1/0,i=0,r=0;for(const n of e){const{height:e,left:a,top:o,width:l}=n.glyphMosaicItem.metrics,h=n.x,c=n.y-(e-Math.abs(o)),u=h+l+a,f=c+e;t=Math.min(t,h),i=Math.max(i,u),s=Math.min(s,c),r=Math.max(r,f)}return{x:t,y:s,width:i-t,height:r-s}}static addDecoration(e,t){const s=e.length;if(0===s)return;let i=e[0].x+e[0].glyphMosaicItem.metrics.left,r=e[0].y;for(let n=1;n<s;n++){const s=e[n];if(s.y!==r){const a=e[n-1].x+e[n-1].glyphMosaicItem.metrics.left+e[n-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:r+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.c(4,0,4,8),metrics:{width:a-i,height:8,left:0,top:0,advance:0},page:0,code:0}}),r=s.y,i=s.x+s.glyphMosaicItem.metrics.left}}const n=e[s-1].x+e[s-1].glyphMosaicItem.metrics.left+e[s-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:r+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.c(4,0,4,8),metrics:{width:n-i,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,s,i){const r=(e-t)*(e-t);return i?e<t?r/2:2*r:r+Math.abs(s)*s}_buildBreak(e,t,s,i,r,n){let a=null,o=this._breakScore(t,s,r,n);for(const e of i){const i=t-e.x,l=this._breakScore(i,s,r,n)+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,s){const i=e[s],r=i.vertical?f:i.glyphMosaicItem?i.glyphMosaicItem.metrics.advance:0,n=(i.x+r)*this._justify;for(let i=t;i<=s;i++)e[i].x-=n}}var g=s(19536);const y=.5;class p{constructor(e,t,s=0,i=-1,r=y){this.x=e,this.y=t,this.angle=s,this.segment=i,this.minzoom=r}}class x{constructor(e,t,s,i,r,n=y,o=a.MB){this.anchor=e,this.labelAngle=t,this.glyphAngle=s,this.page=i,this.alternateVerticalGlyph=r,this.minzoom=n,this.maxzoom=o}}class _{constructor(e,t,s,i,r,n,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=s,this.br=i,this.mosaicRect=r,this.labelAngle=n,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class m{constructor(e){this.shapes=e}}class I{getIconPlacement(e,t,s){const i=new n.wb(e.x,e.y),r=s.rotationAlignment===g.cN.MAP,o=s.keepUpright;let l=s.rotate*a.YJ;r&&(l+=e.angle);const h=new m([]);return s.allowOverlap&&s.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,i,t,s,l),r&&o&&this._addIconPlacement(h,i,t,s,l+a.Yt),h}_addIconPlacement(e,t,s,i,r){const o=s.rasterizationScale,l=s.width/o,h=s.height/o,c=i.offset;let u=c[0],f=c[1];switch(i.anchor){case g.wL.CENTER:u-=l/2,f-=h/2;break;case g.wL.LEFT:f-=h/2;break;case g.wL.RIGHT:u-=l,f-=h/2;break;case g.wL.TOP:u-=l/2;break;case g.wL.BOTTOM:u-=l/2,f-=h;break;case g.wL.TOP_LEFT:break;case g.wL.BOTTOM_LEFT:f-=h;break;case g.wL.TOP_RIGHT:u-=l;break;case g.wL.BOTTOM_RIGHT:u-=l,f-=h}const d=s.rect,p=2/o,x=u-p,m=f-p,I=x+d.width/o,w=m+d.height/o,b=new n.wb(x,m),M=new n.wb(I,w),k=new n.wb(x,w),L=new n.wb(I,m);if(0!==r){const e=Math.cos(r),t=Math.sin(r);b.rotate(e,t),M.rotate(e,t),k.rotate(e,t),L.rotate(e,t)}const T=new _(b,L,k,M,d,r,0,256,t,y,a.MB,0);if(e.shapes.push(T),!i.allowOverlap||!i.ignorePlacement){const s=i.size,n=i.padding,o={xTile:t.x,yTile:t.y,dxPixels:u*s-n,dyPixels:f*s-n,hard:!i.optional,partIndex:0,width:l*s+2*n,height:h*s+2*n,angle:r,minLod:y,maxLod:a.MB};e.iconColliders.push(o)}}getTextPlacement(e,t,s,i){const r=new n.wb(e.x,e.y),o=i.rotate*a.YJ,l=i.rotationAlignment===g.cN.MAP,h=i.keepUpright,c=i.padding;let u=y;const p=l?e.angle:0,I=e.segment>=0&&l,w=i.allowOverlap&&i.ignorePlacement?null:[],b=[],M=!I;let k=Number.POSITIVE_INFINITY,L=Number.NEGATIVE_INFINITY,T=k,P=L;const D=(I||l)&&h,V=i.size/f;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let A,v=0,S=0;if(!I&&B){const e=d.getTextBox(t,i.lineHeight*f);switch(i.anchor){case g.wL.LEFT:v=e.height/2,S=-e.width/2;break;case g.wL.RIGHT:v=-e.height/2,S=e.width/2;break;case g.wL.TOP:v=e.height/2,S=e.width/2;break;case g.wL.BOTTOM:v=-e.height/2,S=-e.width/2;break;case g.wL.TOP_LEFT:v=e.height;break;case g.wL.BOTTOM_LEFT:S=-e.width;break;case g.wL.TOP_RIGHT:S=e.width;break;case g.wL.BOTTOM_RIGHT:v=-e.height}}v+=i.offset[0]*f,S+=i.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,g=t.metrics,m=t.page;if(w&&M){if(void 0!==A&&A!==f.y){let t,s,r,n;B?(t=-P+v,s=k+S,r=P-T,n=L-k):(t=k+v,s=T+S,r=L-k,n=P-T);const l={xTile:e.x,yTile:e.y,dxPixels:t*V-c,dyPixels:s*V-c,hard:!i.optional,partIndex:1,width:r*V+2*c,height:n*V+2*c,angle:o,minLod:y,maxLod:a.MB};w.push(l),k=Number.POSITIVE_INFINITY,L=Number.NEGATIVE_INFINITY,T=k,P=L}A=f.y}const C=[];if(I){const i=.5*t.metrics.width,r=(f.x+g.left-4+i)*V*8;if(u=this._placeGlyph(e,u,r,s,e.segment,1,f.vertical,m,C),h&&(u=this._placeGlyph(e,u,r,s,e.segment,-1,f.vertical,m,C)),u>=2)break}else C.push(new x(r,p,p,m,!1)),l&&h&&C.push(new x(r,p+a.Yt,p+a.Yt,m,!1));const E=f.x+g.left,O=f.y-17-g.top,U=E+g.width,F=O+g.height;let N,R,z,G,q,H,W,K;if(!I&&B)if(f.vertical){const e=(E+U)/2-g.height/2,t=(O+F)/2+g.width/2;N=new n.wb(-t-4+v,e-4+S),R=new n.wb(N.x+d.width,N.y+d.height),z=new n.wb(N.x,R.y),G=new n.wb(R.x,N.y)}else N=new n.wb(4-O+v,E-4+S),R=new n.wb(N.x-d.height,N.y+d.width),z=new n.wb(R.x,N.y),G=new n.wb(N.x,R.y);else N=new n.wb(E-4+v,O-4+S),R=new n.wb(N.x+d.width,N.y+d.height),z=new n.wb(N.x,R.y),G=new n.wb(R.x,N.y);for(const t of C){let s,r,a,l;if(t.alternateVerticalGlyph){if(!q){const e=(O+F)/2+S;q=new n.wb((E+U)/2+v-g.height/2-4,e+g.width/2+4),H=new n.wb(q.x+d.height,q.y-d.width),W=new n.wb(H.x,q.y),K=new n.wb(q.x,H.y)}s=q,r=W,a=K,l=H}else s=N,r=z,a=G,l=R;const h=O,u=F,y=t.glyphAngle+o;if(0!==y){const e=Math.cos(y),t=Math.sin(y);s=s.clone(),r=r?.clone(),a=a?.clone(),l=l?.clone(),s.rotate(e,t),l?.rotate(e,t),r?.rotate(e,t),a?.rotate(e,t)}let p=0,x=256;if(I&&B?f.vertical?t.alternateVerticalGlyph?(p=32,x=96):(p=224,x=32):(p=224,x=96):(p=192,x=64),b.push(new _(s,a,r,l,d,t.labelAngle,p,x,t.anchor,t.minzoom,t.maxzoom,t.page)),w&&(!D||this._legible(t.labelAngle)))if(M)E<k&&(k=E),h<T&&(T=h),U>L&&(L=U),u>P&&(P=u);else if(t.minzoom<2){const s={xTile:e.x,yTile:e.y,dxPixels:(E+v)*V-c,dyPixels:(h+v)*V-c,hard:!i.optional,partIndex:1,width:(U-E)*V+2*c,height:(u-h)*V+2*c,angle:y,minLod:t.minzoom,maxLod:t.maxzoom};w.push(s)}}}if(u>=2)return null;if(w&&M){let t,s,r,n;B?(t=-P+v,s=k+S,r=P-T,n=L-k):(t=k+v,s=T+S,r=L-k,n=P-T);const l={xTile:e.x,yTile:e.y,dxPixels:t*V-c,dyPixels:s*V-c,hard:!i.optional,partIndex:1,width:r*V+2*c,height:n*V+2*c,angle:o,minLod:y,maxLod:a.MB};w.push(l)}const C=new m(b);return w&&w.length>0&&(C.textColliders=w),C}_legible(e){const t=(0,a.g$)(e);return t<65||t>=193}_placeGlyph(e,t,s,i,r,o,l,h,c){let u=o;const f=u<0?(0,a.So)(e.angle+a.Yt,a.sf):e.angle;let d=0;s<0&&(u*=-1,s*=-1,d=a.Yt),u>0&&++r;let g=new n.wb(e.x,e.y),y=i[r],p=a.MB;if(i.length<=r)return p;for(;;){const e=y.x-g.x,n=y.y-g.y,o=Math.sqrt(e*e+n*n),_=Math.max(s/o,t),m=e/o,I=n/o,w=(0,a.So)(Math.atan2(I,m)+d,a.sf);if(c.push(new x(g,f,w,h,!1,_,p)),l&&c.push(new x(g,f,w,h,!0,_,p)),_<=t)return _;g=y.clone();do{if(r+=u,i.length<=r||r<0)return _;y=i[r]}while(g.isEqual(y));let b=y.x-g.x,M=y.y-g.y;const k=Math.sqrt(b*b+M*M);b*=o/k,M*=o/k,g.x-=b,g.y-=M,p=_}}}var w,b,M=s(91232),k=s(30936);(b=w||(w={}))[b.moveTo=1]="moveTo",b[b.lineTo=2]="lineTo",b[b.close=7]="close";class L{constructor(e,t,s=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=s;const i=t.keys,r=t.values,n=e.asUnsafe();for(;n.next();)switch(n.tag()){case 1:this.id=n.getUInt64();break;case 2:{const e=n.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),n=e.getUInt32();t[i[s]]=r[n]}e.release();break}case 3:this.type=n.getUInt32();break;case 4:this._pbfGeometry=n.getMessage();break;default:n.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let s,i;this._pbfGeometry=null,e?e.reset(this.type):s=[];let r,a=w.moveTo,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 w.moveTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):s&&(i&&s.push(i),i=[],i.push(new n.wb(l,h)));break;case w.lineTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):i&&i.push(new n.wb(l,h));break;case w.close:e?e.close():i&&!i[0].equals(l,h)&&i.push(i[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?r=e.result():s&&(i&&s.push(i),r=s),t.release(),this._geometry=r,r}}var T=s(97400);class P extends T.c{constructor(){super(12)}add(e,t,s){const i=this.array;i.push(e),i.push(t),i.push(s)}}T.c;class D{constructor(e){this.extent=4096,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(D._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 V extends T.c{constructor(e){super(e)}add(e,t,s,i,r,n,a,o,l,h,c,u){const f=this.array;let d=T.c.i1616to32(e,t);f.push(d);const g=31;d=T.c.i8888to32(Math.round(g*s),Math.round(g*i),Math.round(g*r),Math.round(g*n)),f.push(d),d=T.c.i8888to32(Math.round(g*a),Math.round(g*o),Math.round(g*l),Math.round(g*h)),f.push(d),d=T.c.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class B extends T.c{constructor(e){super(e)}add(e,t,s){const i=this.array;i.push(T.c.i1616to32(e,t)),s&&i.push(...s)}}class A extends T.c{constructor(e){super(e)}add(e,t,s,i,r,n,a){const o=this.array,l=this.index;let h=T.c.i1616to32(e,t);return o.push(h),h=T.c.i8888to32(Math.round(15*s),Math.round(15*i),r,n),o.push(h),a&&o.push(...a),l}}class v extends T.c{constructor(e){super(e)}add(e,t,s,i,r,n,o,l,h,c,u,f){const d=this.array;let g=T.c.i1616to32(e,t);d.push(g),g=T.c.i1616to32(Math.round(8*s),Math.round(8*i)),d.push(g),g=T.c.i8888to32(r/4,n/4,l,h),d.push(g),g=T.c.i8888to32(0,(0,a.g$)(o),10*c,Math.min(10*u,255)),d.push(g),f&&d.push(...f)}}class S extends T.c{constructor(e){super(e)}add(e,t,s,i,r){const n=this.array,a=T.c.i1616to32(2*e+s,2*t+i);n.push(a),r&&n.push(...r)}}class C{constructor(e,t,s){this.layerExtent=4096,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=s,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,s){}}class E extends C{constructor(e,t,s,i,n){super(e,t,s),this.type=r.UV.CIRCLE,this._circleVertexBuffer=i,this._circleIndexBuffer=n}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,s=this._circleIndexBuffer;this._circleIndexStart=3*s.index,this._circleIndexCount=0;const i=this.layer,r=this.zoom;e&&e.setExtent(this.layerExtent);for(const n of this._features){const a=n.getGeometry(e);if(!a)continue;const o=i.circleMaterial.encodeAttributes(n,r,i);for(const e of a)if(e)for(const i of e){const e=t.index;t.add(i.x,i.y,0,0,o),t.add(i.x,i.y,0,1,o),t.add(i.x,i.y,1,0,o),t.add(i.x,i.y,1,1,o),s.add(e,e+1,e+2),s.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),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._circleIndexStart,t[i++]=this._circleIndexCount,t[i++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)s[i++]=this._circleVertexBuffer.array[e];t[i++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[i++]=this._circleIndexBuffer.array[e];return t.buffer}}var O=s(29624),U=s(17012);class F extends C{constructor(e,t,s,i,n,a,o){super(e,t,s),this.type=r.UV.FILL,this._patternMap=new Map,this._fillVertexBuffer=i,this._fillIndexBuffer=n,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,s){const i=this.layer,r=this.zoom,n=i.getPaintProperty("fill-pattern");if(n)if(n.isDataDriven)for(const e of this._features)t(n.getValue(r,e),!0);else t(n.getValue(r),!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,s=this.zoom,{fillMaterial:i,outlineMaterial:r,hasDataDrivenFill:n,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let h=!o&&t.getPaintValue("fill-antialias",s);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",s),i=t.getPaintValue("fill-opacity",s+1);e<1&&i<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",s),i=t.getPaintValue("fill-color",s+1);e[3]<1&&i[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const n=[];for(const l of c){const c=o.getValue(s,l),f=this._spriteInfo[c];if(!f?.rect)continue;const d=i.encodeAttributes(l,s,t,f),g=h&&a?r.encodeAttributes(l,s,t):[],y=l.getGeometry(e);n.push({ddFillAttributes:d,ddOutlineAttributes:g,page:f.page,geometry:y}),n.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:s,page:i,geometry:r}of n)this._processFeature(r,h,t.outlineUsesFillColor,e,s,u,i)}}else for(const o of c){const l=n?i.encodeAttributes(o,s,t):null,c=h&&a?r.encodeAttributes(o,s,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),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._fillIndexStart,t[i++]=this._fillIndexCount,t[i++]=this._outlineIndexStart,t[i++]=this._outlineIndexCount;const r=this._patternMap,n=r.size;if(t[i++]=n,n>0)for(const[e,[s,n]]of r)t[i++]=e,t[i++]=s,t[i++]=n;t[i++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)s[i++]=this._fillVertexBuffer.array[e];t[i++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[i++]=this._fillIndexBuffer.array[e];t[i++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)s[i++]=this._outlineVertexBuffer.array[e];t[i++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[i++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s,i,r,n,a){if(!e)return;const o=e.length,l=!r||0===r.length;if(t&&(!s||l))for(let t=0;t<o;t++)this._processOutline(e[t],r);let h;for(let t=0;t<o;t++){const s=F._area(e[t]);s>32?(void 0!==h&&this._processFill(e,h,i,n,a),h=[t]):s<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,i,n,a)}_processOutline(e,t){const s=this._outlineVertexBuffer,i=this._outlineIndexBuffer,r=i.index;let a,o,l;const h=new n.wb(0,0),c=new n.wb(0,0),u=new n.wb(0,0);let f=-1,d=-1,g=-1,y=-1,p=-1,x=!1,_=e.length;if(_<2)return;const m=e[0];let I=e[_-1];for(;_&&I.isEqual(m);)--_,I=e[_-1];if(!(_-0<2)){for(let r=0;r<_;++r){0===r?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=r!==_-1?e[r+1]:e[0],h.assign(c));const n=this._isClipEdge(a,o);-1===y&&(x=n),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 I=-u.x*-h.x+-u.y*-h.y;let w=Math.abs(0!==I?1/I:1);w>8&&(w=8),m>=0?(g=s.add(o.x,o.y,h.x,h.y,0,1,t),-1===y&&(y=g),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),d=s.add(o.x,o.y,w*-u.x,w*-u.y,0,-1,t),-1===p&&(p=d),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),d=s.add(o.x,o.y,c.x,c.y,0,1,t),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g)):(g=s.add(o.x,o.y,w*u.x,w*u.y,0,1,t),-1===y&&(y=g),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),d=s.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===p&&(p=d),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),f=d,d=g,g=s.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g),f=s.add(o.x,o.y,-c.x,-c.y,0,-1,t),f>=0&&d>=0&&g>=0&&!n&&i.add(f,d,g))}f>=0&&d>=0&&y>=0&&!x&&i.add(f,d,y),f>=0&&y>=0&&p>=0&&!x&&i.add(f,p,y),this._outlineIndexCount+=3*(i.index-r)}}_processFill(e,t,s,i,r){let n;t.length>1&&(n=[]);let a=0;for(const s of t)0!==a&&n.push(a),a+=e[s].length;const o=2*a,l=O.c.acquire();for(const s of t){const t=e[s],i=t.length;for(let e=0;e<i;++e)l.push(t[e].x,t[e].y)}const h=(0,U.e)(l,n,2);if(U.e.deviation(l,n,2,h)>0){const i=t.map((t=>e[t].length)),{buffer:n,vertexCount:a}=(0,k.y)(l,i);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(n[2*e],n[2*e+1],s);for(let t=0;t<a;t+=3){const s=e+t;this._fillIndexBuffer.add(s,s+1,s+2)}if(void 0!==r){const e=this._patternMap,t=e.get(r);t?t[1]+=a:e.set(r,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let i=0;for(;i<o;)this._fillVertexBuffer.add(l[i++],l[i++],s);let n=0;for(;n<e;)this._fillIndexBuffer.add(t+h[n++],t+h[n++],t+h[n++]);if(void 0!==r){const t=this._patternMap,s=t.get(r);s?s[1]+=e:t.set(r,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}O.c.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 s=e.length-1;for(let i=0;i<s;i++)t+=(e[i].x-e[i+1].x)*(e[i].y+e[i+1].y);return t+=(e[s].x-e[0].x)*(e[s].y+e[0].y),.5*t}}var N=s(93552);class R extends C{constructor(e,t,s,i,n){super(e,t,s),this.type=r.UV.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=i,this.tessellationProperties._lineIndexBuffer=n,this._lineTessellator=new N.A(z(this.tessellationProperties),G(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,s){const i=this.layer,r=this.zoom,n=i.getPaintProperty("line-pattern"),a=i.getPaintProperty("line-dasharray"),o=i.getLayoutProperty("line-cap");if(!n&&!a)return;const l=o?.getValue(r)||0,h=o?.isDataDriven,c=n?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?n.getValue(r,e):this._getDashArrayKey(e,r,i,a,h,o,l));else if(n)t(n.getValue(r));else if(a){const e=a.getValue(r);t(i.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,s=this.zoom,i=this._features,r=this._tessellationOptions,{hasDataDrivenLine:n,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",s),g=d||0,y=!!f;u=t.getLayoutProperty("line-join");const p=u?.isDataDriven?u:null,x=p?null:t.getLayoutValue("line-join",s);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",s);u=t.getLayoutProperty("line-round-limit");const I=u?.isDataDriven?u:null,w=I?null:t.getLayoutValue("line-round-limit",s);u=t.getPaintProperty("line-width");const b=u?.isDataDriven?u:null,M=b?null:t.getPaintValue("line-width",s);u=t.getPaintProperty("line-offset");const k=u?.isDataDriven?u:null,L=k?null:t.getPaintValue("line-offset",s);if(h||c){const n=[];for(const r of i){const i=h?o.getValue(s,r):this._getDashArrayKey(r,s,t,l,y,f,g),c=this._spriteInfo[i];if(!c?.rect)continue;const u=a.encodeAttributes(r,s,t,c),T=r.getGeometry(e);n.push({ddAttributes:u,page:c.page,cap:f?f.getValue(s,r):d,join:p?p.getValue(s,r):x,miterLimit:_?_.getValue(s,r):m,roundLimit:I?I.getValue(s,r):w,halfWidth:.5*(b?b.getValue(s,r):M),offset:k?k.getValue(s,r):L,geometry:T})}n.sort(((e,t)=>e.page-t.page)),r.textured=!0;for(const{ddAttributes:e,page:t,cap:s,join:i,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of n)r.capType=s,r.joinType=i,r.miterLimit=a,r.roundLimit=o,r.halfWidth=l,r.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(s),t=this._spriteInfo[e];if(!t?.rect)return}r.textured=!(!o&&!l),r.capType=d,r.joinType=x,r.miterLimit=m,r.roundLimit=w,r.halfWidth=.5*M,r.offset=L;for(const o of i){const i=n?a.encodeAttributes(o,s,t):null;f&&(r.capType=f.getValue(s,o)),p&&(r.joinType=p.getValue(s,o)),_&&(r.miterLimit=_.getValue(s,o)),I&&(r.roundLimit=I.getValue(s,o)),b&&(r.halfWidth=.5*b.getValue(s,o)),k&&(r.offset=k.getValue(s,o));const l=o.getGeometry(e);this._processFeature(l,i)}}}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),s=new Int32Array(t.buffer);let i=0;t[i++]=this.type,t[i++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[i++]=this.layerUIDs[e];t[i++]=this._lineIndexStart,t[i++]=this._lineIndexCount;const r=this._patternMap,n=r.size;if(t[i++]=n,n>0)for(const[e,[s,n]]of r)t[i++]=e,t[i++]=s,t[i++]=n;t[i++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)s[i++]=this.tessellationProperties._lineVertexBuffer.array[e];t[i++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[i++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s){if(!e)return;const i=e.length;for(let r=0;r<i;r++)this._processGeometry(e[r],t,s)}_processGeometry(e,t,s){if(e.length<2)return;let i,r,n=e[0],a=1;for(;a<e.length;)i=e[a].x-n.x,r=e[a].y-n.y,i*i+r*r<1e-6?e.splice(a,1):(n=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!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=h:e.set(s,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,s,i,r,n,a){const o=r?n.getValue(t,e):a,l=i.getValue(t,e);return s.getDashKey(l,o)}}const z=e=>(t,s,i,r,n,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,s,o,l,i,r,n,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),G=e=>(t,s,i)=>{e._lineIndexBuffer.add(t,s,i)};var q,H=s(60024),W=s(70680),K=s(88264),Y=s(28808);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 Z extends C{constructor(e,t,s,i,n,a,o,l,h){super(t,s,h.getSpriteItems()),this.type=r.UV.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=i,this._iconIndexBuffer=n,this._textVertexBuffer=a,this._textIndexBuffer=o,this._placementEngine=l,this._workerTileHandler=h}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(e,t,s){const i=this.layer,r=this.zoom;e&&e.setExtent(this.layerExtent);const n=i.getLayoutProperty("icon-image"),a=i.getLayoutProperty("text-field");let o=i.getLayoutProperty("text-transform"),l=i.getLayoutProperty("text-font");const h=[];let c,u,f,d;n&&!n.isDataDriven&&(c=n.getValue(r)),a&&!a.isDataDriven&&(u=a.getValue(r)),o&&o.isDataDriven||(f=i.getLayoutValue("text-transform",r),o=null),l&&l.isDataDriven||(d=i.getLayoutValue("text-font",r),l=null);for(const y of this._features){const p=y.getGeometry(e);if(!p||0===p.length)continue;let x,_;n&&(x=n.isDataDriven?n.getValue(r,y):this._replaceKeys(c,y.values),x&&t(x));let m=!1;if(a&&(_=a.isDataDriven?a.getValue(r,y):this._replaceKeys(u,y.values),_)){switch(_=_.replaceAll("\\n","\n"),o&&(f=o.getValue(r,y)),f){case g.If.LOWERCASE:_=_.toLowerCase();break;case g.If.UPPERCASE:_=_.toUpperCase()}if(Z._bidiEngine.hasBidiChar(_)){let e;e="rtl"===Z._bidiEngine.checkContextual(_)?"IDNNN":"ICNNN",_=Z._bidiEngine.bidiTransform(_,e,"VLYSN"),m=!0}if(_.length>0){l&&(d=l.getValue(r,y));for(const e of d){let t=s[e];t||(t=s[e]=new Set);for(const e of _){const s=e.codePointAt(0);null!=s&&t.add(s)}}}}if(!x&&!_)continue;const I=i.getLayoutValue("symbol-sort-key",r,y),w={feature:y,sprite:x,label:_,rtl:m,geometry:p,hash:(_?(0,K.sV)(_):0)^(x?(0,K.sV)(x):0),priority:I,textFont:d};h.push(w)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,s=this.zoom,i=t.getLayoutValue("symbol-placement",s),r=i!==g.iA.POINT,o=8*t.getLayoutValue("symbol-spacing",s),l=t.getLayoutProperty("icon-image"),h=t.getLayoutProperty("text-field"),c=l?new Y.SW(t,s,r):null,u=h?new Y.c3(t,s,r):null,y=this._workerTileHandler;let x;l&&(x=y.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 _=[];let m=1;u&&u.size&&(m=u.size/f);const I=u?u.maxAngle*a.YJ:0,w=u?8*u.size:0;for(const e of this._symbolFeatures){let t,a;c&&x&&e.sprite&&(t=x[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(s,e.feature);let l=0;const h=e.label;if(h){(0,W.EN)(u),u.update(s,e.feature);const t=r&&u.rotationAlignment===g.cN.MAP?u.keepUpright:u.writingMode&&u.writingMode.includes(g.Mt.VERTICAL);let i=.5;switch(u.anchor){case g.wL.TOP_LEFT:case g.wL.LEFT:case g.wL.BOTTOM_LEFT:i=0;break;case g.wL.TOP_RIGHT:case g.wL.RIGHT:case g.wL.BOTTOM_RIGHT:i=1}let n=.5;switch(u.anchor){case g.wL.TOP_LEFT:case g.wL.TOP:case g.wL.TOP_RIGHT:n=0;break;case g.wL.BOTTOM_LEFT:case g.wL.BOTTOM:case g.wL.BOTTOM_RIGHT:n=1}let o=.5;switch(u.justify){case g.W6.AUTO:o=i;break;case g.W6.LEFT:o=0;break;case g.W6.RIGHT:o=1}const c=u.letterSpacing*f,p=r?0:u.maxWidth*f,x=u.lineHeight*f,_=e.textFont.map((e=>y.getGlyphItems(e)));if(a=new d(_,p,x,c,i,n,o).getShaping(h,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const s of a)e=Math.min(e,s.x),t=Math.max(t,s.x);l=(t-e+48)*m*8}}for(let s of e.geometry){const h=[];if(i===g.iA.LINE){if(a?.length&&u?.size){const e=8*u.size*(2+Math.min(2,4*Math.abs(u.offset[1])));s=Z._smoothVertices(s,e)}Z._pushAnchors(h,s,o,l)}else i===g.iA.LINE_CENTER?Z._pushCenterAnchor(h,s):e.feature.type===n.ao.Polygon?Z._pushCentroid(h,s):h.push(new p(s[0].x,s[0].y));for(const i of h){if(i.x<0||i.x>4096||i.y<0||i.y>4096)continue;if(r&&l>0&&u?.rotationAlignment===g.cN.MAP&&!Z._honorsTextMaxAngle(s,i,l,I,w))continue;const n={shaping:a,line:s,iconMosaicItem:t,anchor:i,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};_.push(n),this._processFeature(n,c,u)}}}_.sort(j),this._addPlacedGlyphs(),this._symbolInstances=_}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=Z._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),s=new Int32Array(t.buffer),i=new Float32Array(t.buffer),[r,n,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(r),t[o++]=parseFloat(n),t[o++]=parseFloat(a),t[o++]=this.markerPageMap.size;for(const[e,[s,i]]of this.markerPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this.glyphsPageMap.size;for(const[e,[s,i]]of this.glyphsPageMap)t[o++]=e,t[o++]=s,t[o++]=i;t[o++]=this._iconVertexBuffer.index/4,t[o++]=this._textVertexBuffer.index/4,o=Z.serializeSymbols(t,s,i,o,this._symbolInstances),t[o++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)s[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++)s[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 s of e||[]){t+=5,t+=1;for(const e of s.textColliders)t+=10;for(const e of s.iconColliders)t+=10;t+=1,t+=2*s.textVertexRanges.length,t+=1,t+=2*s.iconVertexRanges.length}return t}static serializeSymbols(e,t,s,i,r){r=r||[],t[i++]=r.length;for(const e of r){t[i++]=e.anchor.x,t[i++]=e.anchor.y,t[i++]=e.symbolFeature.hash,t[i++]=e.symbolFeature.priority,t[i++]=e.symbolFeature.feature.featureIndex,t[i++]=e.textColliders.length+e.iconColliders.length;for(const r of e.textColliders)t[i++]=r.xTile,t[i++]=r.yTile,t[i++]=r.dxPixels,t[i++]=r.dyPixels,t[i++]=r.hard?1:0,t[i++]=r.partIndex,s[i++]=r.minLod,s[i++]=r.maxLod,t[i++]=r.width,t[i++]=r.height;for(const r of e.iconColliders)t[i++]=r.xTile,t[i++]=r.yTile,t[i++]=r.dxPixels,t[i++]=r.dyPixels,t[i++]=r.hard?1:0,t[i++]=r.partIndex,s[i++]=r.minLod,s[i++]=r.maxLod,t[i++]=r.width,t[i++]=r.height;t[i++]=e.textVertexRanges.length;for(const[s,r]of e.textVertexRanges)t[i++]=s,t[i++]=r;t[i++]=e.iconVertexRanges.length;for(const[s,r]of e.iconVertexRanges)t[i++]=s,t[i++]=r}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,((e,s)=>s in t?t[s]:""))}_processFeature(e,t,s){const{line:i,iconMosaicItem:r,shaping:n,anchor:o}=e,l=this.zoom,h=this.layer,c=!!r;let u=!0;c&&(u=t?.optional||!r);const f=n&&n.length>0,d=!f||s?.optional;let y,p;if(c&&(y=this._placementEngine.getIconPlacement(o,r,t)),(y||u)&&(f&&(p=this._placementEngine.getTextPlacement(o,n,i,s)),p||d)){if(y&&p||(d||u?d||p?u||y||(p=null):y=null:(y=null,p=null)),p){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,p.shapes,l,s.rotationAlignment,t),p.textColliders){e.textColliders=p.textColliders;for(const e of p.textColliders){e.minLod=Math.max(l+(0,a.sD)(e.minLod),0),e.maxLod=Math.min(l+(0,a.sD)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),r=e.dxPixels*s-e.dyPixels*i,n=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(r,a,l,c),d=Math.max(r,a,l,c),g=Math.min(n,o,h,u),y=Math.max(n,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=y-g}}}}if(y){const s=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,y.shapes,l,r.page,t.rotationAlignment===g.cN.VIEWPORT,s),y.iconColliders){e.iconColliders=y.iconColliders;for(const e of y.iconColliders){e.minLod=Math.max(l+(0,a.sD)(e.minLod),0),e.maxLod=Math.min(l+(0,a.sD)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),r=e.dxPixels*s-e.dyPixels*i,n=e.dxPixels*i+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*i,o=(e.dxPixels+e.width)*i+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*i,h=e.dxPixels*i+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*i,u=(e.dxPixels+e.width)*i+(e.dyPixels+e.height)*s,f=Math.min(r,a,l,c),d=Math.max(r,a,l,c),g=Math.min(n,o,h,u),y=Math.max(n,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=y-g}}}}}}_addPlacedIcons(e,t,s,i,r,n){const o=Math.max(s-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=r?0:Math.max(s+(0,a.sD)(u.minzoom),o),f=r?25:Math.min(s+(0,a.sD)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,g=u.tr,y=u.bl,p=u.br,x=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,w=u.anchor,b=l.index,M=x.x,k=x.y,L=M+x.width,T=k+x.height,P=l.index;l.add(w.x,w.y,d.x,d.y,M,k,_,m,I,t,f,n),l.add(w.x,w.y,g.x,g.y,L,k,_,m,I,t,f,n),l.add(w.x,w.y,y.x,y.y,M,T,_,m,I,t,f,n),l.add(w.x,w.y,p.x,p.y,L,T,_,m,I,t,f,n),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===P?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([P,4]),h.add(b,b+1,b+2),h.add(b+1,b+2,b+3),c.has(i)?c.get(i)[1]+=6:c.set(i,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,s=this._glyphMap;for(const[i,r]of this._glyphBufferDataStorage)for(const n of r){const r=e.index,a=n.symbolInstance,o=n.ddAttributes,l=e.index;e.add(n.glyphAnchor[0],n.glyphAnchor[1],n.tl[0],n.tl[1],n.xmin,n.ymin,n.labelAngle,n.minAngle,n.maxAngle,n.minLod,n.maxLod,o),e.add(n.glyphAnchor[0],n.glyphAnchor[1],n.tr[0],n.tr[1],n.xmax,n.ymin,n.labelAngle,n.minAngle,n.maxAngle,n.minLod,n.maxLod,o),e.add(n.glyphAnchor[0],n.glyphAnchor[1],n.bl[0],n.bl[1],n.xmin,n.ymax,n.labelAngle,n.minAngle,n.maxAngle,n.minLod,n.maxLod,o),e.add(n.glyphAnchor[0],n.glyphAnchor[1],n.br[0],n.br[1],n.xmax,n.ymax,n.labelAngle,n.minAngle,n.maxAngle,n.minLod,n.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(r,r+1,r+2),t.add(r+1,r+2,r+3),s.has(i)?s.get(i)[1]+=6:s.set(i,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,s,i,r){const n=Math.max(s-1,0),o=i===g.cN.VIEWPORT;let l,h,c,u,f,d,y,p,x,_,m;for(const i of t)l=o?0:Math.max(s+(0,a.sD)(i.minzoom),n),h=o?25:Math.min(s+(0,a.sD)(i.maxzoom),25),h<=l||(c=i.tl,u=i.tr,f=i.bl,d=i.br,y=i.labelAngle,p=i.minAngle,x=i.maxAngle,_=i.anchor,m=i.mosaicRect,this._glyphBufferDataStorage.has(i.page)||this._glyphBufferDataStorage.set(i.page,[]),this._glyphBufferDataStorage.get(i.page).push({glyphAnchor:[_.x,_.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:m.x,ymin:m.y,xmax:m.x+m.width,ymax:m.y+m.height,labelAngle:y,minAngle:p,maxAngle:x,minLod:l,maxLod:h,placementLod:n,symbolInstance:e,ddAttributes:r}))}static _pushAnchors(e,t,s,i){s+=i;let r=0;const o=t.length-1;for(let e=0;e<o;e++)r+=n.wb.distance(t[e],t[e+1]);let l=i||s;if(l*=.5,r<=l)return;const h=l/r;let c=0,u=-(s=r/Math.max(Math.round(r/s),1))/2;const f=t.length-1;for(let i=0;i<f;i++){const r=t[i],n=t[i+1],o=n.x-r.x,l=n.y-r.y,f=Math.sqrt(o*o+l*l);let d;for(;u+s<c+f;){u+=s;const t=(u-c)/f,g=(0,a.qy)(r.x,n.x,t),y=(0,a.qy)(r.y,n.y,t);void 0===d&&(d=Math.atan2(l,o)),e.push(new p(g,y,d,i,h))}c+=f}}static _pushCenterAnchor(e,t){let s=0;const i=t.length-1;for(let e=0;e<i;e++)s+=n.wb.distance(t[e],t[e+1]);const r=s/2;let o=0;const l=t.length-1;for(let s=0;s<l;s++){const i=t[s],n=t[s+1],l=n.x-i.x,h=n.y-i.y,c=Math.sqrt(l*l+h*h);if(r<o+c){const t=(r-o)/c,u=(0,a.qy)(i.x,n.x,t),f=(0,a.qy)(i.y,n.y,t),d=Math.atan2(h,l);return void e.push(new p(u,f,d,s,0))}o+=c}}static _deviation(e,t,s){const i=(t.x-e.x)*(s.x-t.x)+(t.y-e.y)*(s.y-t.y),r=(t.x-e.x)*(s.y-t.y)-(t.y-e.y)*(s.x-t.x);return Math.atan2(r,i)}static _honorsTextMaxAngle(e,t,s,i,r){let a=0;const o=s/2;let l=new n.wb(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=n.wb.distance(e[h],l),l=e[h]}a+=n.wb.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;a<o;){const t=e[h];let s,o=h;do{if(++o,o===f)return!1;s=e[o]}while(s.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(s));const g=this._deviation(t,s,l);for(c.push({deviation:g,distToAnchor:a}),u+=g;a-c[0].distToAnchor>r;)u-=c.shift().deviation;if(Math.abs(u)>i)return!1;a+=n.wb.distance(s,l),h=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let s=e.length;if(s<3)return e;const i=[];let r=0,a=0;i.push(0);for(let t=1;t<s;t++){const s=n.wb.distance(e[t],e[t-1]);s>0&&(r+=s,i.push(r),a++,a!==t&&(e[a]=e[t]))}if(s=a+1,s<3)return e;t=Math.min(t,.2*r);const o=e[0].x,l=e[0].y,h=e[s-1].x,c=e[s-1].y,u=n.wb.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[s-1],e[s-2]),u.normalize(),e[s-1].x+=t*u.x,e[s-1].y+=t*u.y,i[0]-=t,i[s-1]+=t;const f=[];f.push(new n.wb(o,l));const d=1e-6,g=.5*t;for(let r=1;r<s-1;r++){let a=0,o=0,l=0;for(let s=r-1;s>=0;s--){const n=g+i[s+1]-i[r];if(n<0)break;const h=i[s+1]-i[s],c=i[r]-i[s]<g?1:n/h;if(c<d)break;const u=c*c,f=c*n-.5*u*h,y=c*h/t,p=e[s+1],x=e[s].x-p.x,_=e[s].y-p.y;a+=y/f*(p.x*c*n+.5*u*(n*x-h*p.x)-u*c*h*x/3),o+=y/f*(p.y*c*n+.5*u*(n*_-h*p.y)-u*c*h*_/3),l+=y}for(let n=r+1;n<s;n++){const s=g-i[n-1]+i[r];if(s<0)break;const h=i[n]-i[n-1],c=i[n]-i[r]<g?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,y=c*h/t,p=e[n-1],x=e[n].x-p.x,_=e[n].y-p.y;a+=y/f*(p.x*c*s+.5*u*(s*x-h*p.x)-u*c*h*x/3),o+=y/f*(p.y*c*s+.5*u*(s*_-h*p.y)-u*c*h*_/3),l+=y}f.push(new n.wb(a/l,o/l))}return f.push(new n.wb(h,c)),e[0].x=o,e[0].y=l,e[s-1].x=h,e[s-1].y=c,f}static _pushCentroid(e,t){const s=4096,i=4096,r=t.length-1;let n=0,a=0,o=0,l=t[0].x,h=t[0].y;l>s&&(l=s),l<0&&(l=0),h>i&&(h=i),h<0&&(h=0);for(let e=1;e<r;e++){let r=t[e].x,c=t[e].y,u=t[e+1].x,f=t[e+1].y;r>s&&(r=s),r<0&&(r=0),c>i&&(c=i),c<0&&(c=0),u>s&&(u=s),u<0&&(u=0),f>i&&(f=i),f<0&&(f=0);const d=(r-l)*(f-h)-(u-l)*(c-h);n+=d*(l+r+u),a+=d*(h+c+f),o+=d}n/=3*o,a/=3*o,isNaN(n)||isNaN(a)||e.push(new p(n,a))}}Z._bidiEngine=new H.c,function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(q||(q={}));class J{constructor(e,t,s,i,r,o){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=t,this._sourceDataMaxLOD=i,o){this._styleLayerUIDs=new Set;for(const e of o)this._styleLayerUIDs.add(e)}this._styleRepository=r,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,a.sr)(this._level);for(const t of Object.keys(e)){const s=e[t];if(this._pbfTiles[t]=new M.c(new Uint8Array(s.protobuff),new DataView(s.protobuff)),s.refKey){const[e]=s.refKey.split("/").map(parseFloat),i=l-e;if(i>0){const e=(1<<i)-1,s=h&e,r=c&e;this._tileClippers[t]=new n.CU(i,s,r,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new n.u4)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,k.C)(),s=this._initialize(e),{returnedBuckets:i}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const r=[],n=new Set,a=(e,t)=>{n.has(e)||(r.push({name:e,repeat:t}),n.add(e))},o={};for(const e of i)e.getResources(e.tileClipper,a,o);if(this._tile.status===q.INVALID)return[];const l=this._fetchResources(r,o,e);return Promise.all([...l,t]).then((()=>this._processFeatures(s.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:s,layers:i,sourceNameToTileClipper:r,sourceNameToUniqueSourceLayerBuckets:n,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=i.length-1;e>=0;e--){const u=i[e];if(s<c){if(u.minzoom&&s<Math.floor(u.minzoom)||u.maxzoom&&s>=u.maxzoom)continue}else if(u.maxzoom&&s>=u.maxzoom)continue;if(u.type===g.gf.BACKGROUND||!this._canParseStyleLayer(u.uid)||!t[u.source]||!r[u.source])continue;const f=t[u.source],d=r[u.source],y=u.sourceLayer,p=f[y];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=n[u.source];t||(t=n[u.source]={});let s=t[y];s||(s=t[y]=[]),s.push(e),o.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:s}=e;s.forEach(((e,s)=>{t[e]&&t[e].layerUIDs.push(s)}))}_filterFeatures(e){const{signal:t,sourceNameToTileData:s,sourceNameToUniqueSourceLayerBuckets:r,sourceNameToUniqueSourceLayers:n}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(n))n[e].forEach((t=>{l.push(t),h.push(e)}));for(let e=0;e<l.length;e++){const n=h[e],c=l[e];if(!s[n]||!r[n])continue;const u=s[n][c],f=r[n][c];if(!f||0===f.length)continue;if((0,i.wv)(t))return;let d=0;const g=u.getData();for(;g.nextTag(2);){const e=g.getMessage(),t=new L(e,u,d++);e.release();const s=t.values;if(s){const e=s._minzoom;if(e&&e>=o)continue;const t=s._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,s){const i=[],r=this._tile.getWorkerTileHandler();let n,a;e.length>0&&(n=r.fetchSprites(e,this._client,s),i.push(n));for(const e in t){const n=t[e];n.size>0&&(a=r.fetchGlyphs(this._tile.tileKey,e,n,this._client,s),i.push(a))}return i}_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 s of Object.keys(e)){const i=e[s],r={};for(;i.next();)switch(i.tag()){case 3:{const e=i.getMessage(),t=new D(e);e.release(),r[t.name]=t;break}default:i.skip()}t[s]=r}return t}_createBucket(e){switch(e.type){case g.gf.BACKGROUND:return null;case g.gf.FILL:return this._createFillBucket(e);case g.gf.LINE:return this._createLineBucket(e);case g.gf.CIRCLE:return this._createCircleBucket(e);case g.gf.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new F(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.fillMaterial.getStride()),new P,new A(e.outlineMaterial.getStride()),new P)}_createLineBucket(e){return new R(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.lineMaterial.getStride()),new P)}_createCircleBucket(e){return new E(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new S(e.circleMaterial.getStride()),new P)}_createSymbolBucket(e){const t=this._tile;return new Z(t.tileKey,e,this._level,new v(e.iconMaterial.getStride()),new P,new v(e.textMaterial.getStride()),new P,t.placementEngine,t.getWorkerTileHandler())}}class Q{constructor(e,t,s,i){this.status=q.INITIALIZED,this.placementEngine=new I,this.tileKey=e,this.refKeys=t,this._workerTileHandler=s,this._styleRepository=i}release(){this.tileKey="",this.refKeys=null,this.status=q.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const s=t?.signal;if(null!=s){const e=()=>{s.removeEventListener("abort",e),this.status=q.INVALID};s.addEventListener("abort",e)}let r;const n={bucketsWithData:[],emptyBuckets:null};try{r=await this._parse(e,t)}catch(e){if((0,i.mA)(e))throw e;return{result:n,transferList:[]}}this.status=q.READY;const a=n.bucketsWithData,o=[];for(const e of r)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)),n.emptyBuckets=h,{result:n,transferList:l}}setObsolete(){this.status=q.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const s=e.sourceName2DataAndRefKey;return 0===Object.keys(s).length?[]:(this.status=q.MODIFIED,new J(s,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var X=s(11272);class ${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:s}=e,r={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const s=e.sourceName2DataAndRefKey[t];r[t]=s.refKey}const n=new Q(s,r,this,this._styleRepository);try{return await n.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(n.setObsolete(),n.release(),!(0,i.mA)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const s of e){const e=s.type,i=s.data;switch(e){case r.Sw.PAINTER_CHANGED:t.setPaintProperties(i.layer,i.paint);break;case r.Sw.LAYOUT_CHANGED:t.setLayoutProperties(i.layer,i.layout);break;case r.Sw.LAYER_REMOVED:t.deleteStyleLayer(i.layer);break;case r.Sw.LAYER_CHANGED:t.setStyleLayer(i.layer,i.index);break;case r.Sw.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:s}=e;this._styleRepository=new X.c(t),this._sourceDataMaxLOD=s,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,s){const i=[],r=this._spriteInfo;for(const t of e)void 0===r[t.name]&&i.push(t);return 0===i.length?Promise.resolve():t.invoke("getSprites",i,{signal:s?.signal}).then((e=>{for(const t in e){const s=e[t];r[t]=s}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,s,i,r){const n=[];let a=this._glyphInfo[t];return a?s.forEach((e=>{a[e]||n.push(e)})):(a=this._glyphInfo[t]=[],s.forEach((e=>n.push(e)))),0===n.length?Promise.resolve():i.invoke("getGlyphs",{tileID:e,font:t,codePoints:n},r).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5980],{98472:(t,n,e)=>{e.d(n,{A:()=>c,B:()=>s,C:()=>a,D:()=>b,E:()=>g,H:()=>R,a:()=>f,b:()=>h,c:()=>i,e:()=>U,f:()=>T,g:()=>A,h:()=>S,i:()=>M,j:()=>B,k:()=>L,l:()=>_,m:()=>D,n:()=>l,o:()=>y,p:()=>C,q:()=>I,r:()=>O,s:()=>o,t:()=>P,u:()=>d,v:()=>N,w:()=>w,x:()=>V,y:()=>u,z:()=>m});var r=e(62484),E=e(47364);function _(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function A(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function T(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function R(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function N(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function c(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function u(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function a(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function S(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function O(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function I(t,n){const e=n[0]-t[0],r=n[1]-t[1],E=n[2]-t[2];return Math.sqrt(e*e+r*r+E*E)}function f(t,n){const e=n[0]-t[0],r=n[1]-t[1],E=n[2]-t[2];return e*e+r*r+E*E}function C(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function M(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function l(t,n){const e=n[0],r=n[1],E=n[2];let _=e*e+r*r+E*E;return _>0&&(_=1/Math.sqrt(_),t[0]=n[0]*_,t[1]=n[1]*_,t[2]=n[2]*_),t}function L(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function h(t,n,e){const r=n[0],E=n[1],_=n[2],i=e[0],o=e[1],A=e[2];return t[0]=E*A-_*o,t[1]=_*i-r*A,t[2]=r*o-E*i,t}function D(t,n,e,r){const E=n[0],_=n[1],i=n[2];return t[0]=E+r*(e[0]-E),t[1]=_+r*(e[1]-_),t[2]=i+r*(e[2]-i),t}function U(t,n,e){const r=n[0],E=n[1],_=n[2];return t[0]=e[0]*r+e[4]*E+e[8]*_+e[12],t[1]=e[1]*r+e[5]*E+e[9]*_+e[13],t[2]=e[2]*r+e[6]*E+e[10]*_+e[14],t}function P(t,n,e){const r=n[0],E=n[1],_=n[2];return t[0]=r*e[0]+E*e[3]+_*e[6],t[1]=r*e[1]+E*e[4]+_*e[7],t[2]=r*e[2]+E*e[5]+_*e[8],t}function d(t,n,e){const r=e[0],E=e[1],_=e[2],i=e[3],o=n[0],A=n[1],T=n[2],s=E*T-_*A,R=_*o-r*T,N=r*A-E*o,c=E*N-_*R,u=_*s-r*N,a=r*R-E*s,S=2*i;return t[0]=o+s*S+2*c,t[1]=A+R*S+2*u,t[2]=T+N*S+2*a,t}const F=(0,r.Su)(),G=(0,r.Su)();function B(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function g(t,n,e){const r=e[0]-n[0],E=e[1]-n[1],_=e[2]-n[2];let i=r*r+E*E+_*_;return i>0?(i=1/Math.sqrt(i),t[0]=r*i,t[1]=E*i,t[2]=_*i,t):(t[0]=0,t[1]=0,t[2]=0,t)}const m=T,p=s,H=R,y=I,w=f,b=_,V=C;Object.freeze(Object.defineProperty({__proto__:null,abs:N,add:A,angle:function(t,n){l(F,t),l(G,n);const e=L(F,G);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,E,_){const i=1-_,o=i*i,A=_*_,T=o*i,s=3*_*o,R=3*A*i,N=A*_;return t[0]=n[0]*T+e[0]*s+r[0]*R+E[0]*N,t[1]=n[1]*T+e[1]*s+r[1]*R+E[1]*N,t[2]=n[2]*T+e[2]*s+r[2]*R+E[2]*N,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},copy:i,cross:h,direction:g,dist:y,distance:I,div:H,divide:R,dot:L,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],_=t[2],i=n[0],o=n[1],A=n[2],T=(0,E.Au)();return Math.abs(e-i)<=T*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-o)<=T*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(_-A)<=T*Math.max(1,Math.abs(_),Math.abs(A))},exactEquals:B,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,E,_){const i=_*_,o=i*(2*_-3)+1,A=i*(_-2)+_,T=i*(_-1),s=i*(3-2*_);return t[0]=n[0]*o+e[0]*A+r[0]*T+E[0]*s,t[1]=n[1]*o+e[1]*A+r[1]*T+E[1]*s,t[2]=n[2]*o+e[2]*A+r[2]*T+E[2]*s,t},inverse:M,len:b,length:_,lerp:D,max:a,min:u,mul:p,multiply:s,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t},normalize:l,random:function(t,n){n=n||1;const e=E.QR,r=2*e()*Math.PI,_=2*e()-1,i=Math.sqrt(1-_*_)*n;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=_*n,t},rotateX:function(t,n,e,r){const E=[],_=[];return E[0]=n[0]-e[0],E[1]=n[1]-e[1],E[2]=n[2]-e[2],_[0]=E[0],_[1]=E[1]*Math.cos(r)-E[2]*Math.sin(r),_[2]=E[1]*Math.sin(r)+E[2]*Math.cos(r),t[0]=_[0]+e[0],t[1]=_[1]+e[1],t[2]=_[2]+e[2],t},rotateY:function(t,n,e,r){const E=[],_=[];return E[0]=n[0]-e[0],E[1]=n[1]-e[1],E[2]=n[2]-e[2],_[0]=E[2]*Math.sin(r)+E[0]*Math.cos(r),_[1]=E[1],_[2]=E[2]*Math.cos(r)-E[0]*Math.sin(r),t[0]=_[0]+e[0],t[1]=_[1]+e[1],t[2]=_[2]+e[2],t},rotateZ:function(t,n,e,r){const E=[],_=[];return E[0]=n[0]-e[0],E[1]=n[1]-e[1],E[2]=n[2]-e[2],_[0]=E[0]*Math.cos(r)-E[1]*Math.sin(r),_[1]=E[0]*Math.sin(r)+E[1]*Math.cos(r),_[2]=E[2],t[0]=_[0]+e[0],t[1]=_[1]+e[1],t[2]=_[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:S,scaleAndAdd:O,set:o,sign:c,sqrDist:w,sqrLen:V,squaredDistance:f,squaredLength:C,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:m,subtract:T,transformMat3:P,transformMat4:U,transformQuat:d},Symbol.toStringTag,{value:"Module"}))},85256:(t,n,e)=>{function r(){return[0,0]}function E(t,n){return[t,n]}function _(){return E(1,1)}function i(){return E(1,0)}function o(){return E(0,1)}e.d(n,{Qw:()=>A,Su:()=>r,WK:()=>E});const A=_(),T=i(),s=o();Object.freeze(Object.defineProperty({__proto__:null,ONES:A,UNIT_X:T,UNIT_Y:s,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:r,createView:function(t,n){return new Float64Array(t,n,2)},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:E,ones:_,unitX:i,unitY:o,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},62484:(t,n,e)=>{function r(){return[0,0,0]}function E(t){return[t[0],t[1],t[2]]}function _(t,n,e){return[t,n,e]}function i(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function o(){return _(1,1,1)}function A(){return _(1,0,0)}function T(){return _(0,1,0)}function s(){return _(0,0,1)}e.d(n,{IR:()=>u,Qw:()=>N,Su:()=>r,UV:()=>c,WK:()=>_,cX:()=>R,ct:()=>E,eu:()=>i,wx:()=>a});const R=[0,0,0],N=o(),c=A(),u=T(),a=s();Object.freeze(Object.defineProperty({__proto__:null,ONES:N,UNIT_X:c,UNIT_Y:u,UNIT_Z:a,ZEROS:R,clone:E,create:r,createView:function(t,n){return new Float64Array(t,n,3)},fromArray:i,fromValues:_,ones:o,unitX:A,unitY:T,unitZ:s,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},47364:(t,n,e)=>{e.d(n,{Af:()=>A,Au:()=>E,QR:()=>_,Yf:()=>T});let r=1e-6;function E(){return r}const _=Math.random,i=Math.PI/180,o=180/Math.PI;function A(t){return t*i}function T(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:_,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:E,setEpsilon:function(t){r=t},toDegree:T,toRadian:A},Symbol.toStringTag,{value:"Module"}))},53648:(t,n,e)=>{e.d(n,{Cq:()=>o,EF:()=>T,Iv:()=>I,SE:()=>C,UB:()=>s,Uj:()=>R,aU:()=>A,gJ:()=>S,gP:()=>c,ig:()=>f,qk:()=>i,sj:()=>N,w7:()=>_});var r=e(98472);const E=new Float32Array(1);function _(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function i(t,n,e){return Math.min(Math.max(t,n),e)}function o(t,n,e){return t+(n-t)*e}function A(t,n,e,r,E){return o(r,E,(t-n)/(e-n))}function T(t){return t*Math.PI/180}function s(t){return 180*t/Math.PI}function R(t){return Math.acos(i(t,-1,1))}function N(t){return Math.asin(i(t,-1,1))}function c(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}const u=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const a=BigInt("1000000");function S(t){return O(Math.max(-C,Math.min(t,C)))}function O(t){return E[0]=t,E[0]}function I(t,n){const e=(0,r.l)(t),E=N(t[2]/e),_=Math.atan2(t[1]/e,t[0]/e);return(0,r.s)(n,e,E,_),n}function f(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(c(n,1)&&c(e,1)&&c(r,1))}!function(t){const n=function(t){return u.setFloat64(0,t),u.getBigInt64(0)}(t=Math.abs(t)),e=function(t){return u.setBigInt64(0,t),u.getFloat64(0)}(n<=a?a:n-a);Math.abs(t-e)}(1);const C=O(34028234663852886e22)},92896:(t,n,e)=>{e.d(n,{mc:()=>E});var r=e(72008);function E(t,n=!1){return t<=r._?n?new Array(t).fill(0):new Array(t):new Float32Array(t)}},97143:(t,n,e)=>{e.d(n,{Uv:()=>E,aw:()=>_,yh:()=>T});var r=e(72008);function E(t){if((0,r.c7)(t)){if(t.length<r._)return t}else if(t.length<r._)return Array.from(t);let n=!0,e=!0;return t.some(((t,r)=>(n=n&&0===t,e=e&&t===r,!n&&!e))),n?function(t){if(1===t)return o;if(t<r._)return new Array(t).fill(0);if(t>s.length){const n=Math.max(2*s.length,t);s=new Uint8Array(n)}return new Uint8Array(s.buffer,0,t)}(t.length):e?T(t.length):(0,r.c7)(t)||t.BYTES_PER_ELEMENT!==Uint16Array.BYTES_PER_ELEMENT?function(t){let n=!0;for(const e of t){if(e>=65536)return(0,r.c7)(t)?new Uint32Array(t):t;e>=256&&(n=!1)}return n?new Uint8Array(t):new Uint16Array(t)}(t):t}function _(t){return t<=r._?new Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}let i=(()=>{const t=new Uint32Array(131072);for(let n=0;n<t.length;++n)t[n]=n;return t})();const o=[0],A=(()=>{const t=new Uint16Array(65536);for(let n=0;n<t.length;++n)t[n]=n;return t})();function T(t){if(1===t)return o;if(t<r._)return Array.from(new Uint16Array(A.buffer,0,t));if(t<A.length)return new Uint16Array(A.buffer,0,t);if(t>i.length){const n=Math.max(2*i.length,t);i=new Uint32Array(n);for(let t=0;t<i.length;t++)i[t]=t}return new Uint32Array(i.buffer,0,t)}let s=new Uint8Array(65536)},98132:(t,n,e)=>{function r(t){switch(t){case"u8":case"i8":return 1;case"u16":case"i16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}e.d(n,{Ad:()=>r})},77080:(t,n,e)=>{e.d(n,{g:()=>_});var r=e(53648),E=e(97143);function _(t,n,e){const _=Array.isArray(t),s=_?t.length/n:t.byteLength/(4*n),R=_?t:new Uint32Array(t,0,s*n),N=e?.minReduction??0,c=e?.originalIndices||null,u=c?c.length:0,a=e?.componentOffsets||null;let S=0;if(a)for(let t=0;t<a.length-1;t++){const n=a[t+1]-a[t];n>S&&(S=n)}else S=s;const O=Math.floor(1.1*S)+1;(null==T||T.length<2*O)&&(T=new Uint32Array((0,r.w7)(2*O)));for(let t=0;t<2*O;t++)T[t]=0;let I=0;const f=!!a&&!!c,C=f?u:s;let M=(0,E.aw)(s);const l=new Uint32Array(u),L=1.96;let h=0!==N?Math.ceil(4*L*L/(N*N)*N*(1-N)):C,D=1,U=a?a[1]:C;for(let t=0;t<C;t++){if(t===h){const n=1-I/t;if(n+L*Math.sqrt(n*(1-n)/t)<N)return null;h*=2}if(t===U){for(let t=0;t<2*O;t++)T[t]=0;if(c)for(let t=a[D-1];t<a[D];t++)l[t]=M[c[t]];U=a[++D]}const e=f?c[t]:t,r=e*n,E=A(R,r,n);let _=E%O,o=I;for(;0!==T[2*_+1];){if(T[2*_]===E){const t=T[2*_+1]-1;if(i(R,r,t*n,n)){o=M[t];break}}_++,_>=O&&(_-=O)}o===I&&(T[2*_]=E,T[2*_+1]=e+1,I++),M[e]=o}if(0!==N&&1-I/s<N)return null;if(f){for(let t=a[D-1];t<l.length;t++)l[t]=M[c[t]];M=(0,E.Uv)(l)}const P=_?new Array(I):new Uint32Array(I*n);I=0;for(let t=0;t<C;t++)M[t]===I&&(o(R,(f?c[t]:t)*n,P,I*n,n),I++);if(c&&!f){const t=new Uint32Array(u);for(let n=0;n<t.length;n++)t[n]=M[c[n]];M=(0,E.Uv)(t)}return{buffer:Array.isArray(P)?P:P.buffer,indices:M,uniqueCount:I}}function i(t,n,e,r){for(let E=0;E<r;E++)if(t[n+E]!==t[e+E])return!1;return!0}function o(t,n,e,r,E){for(let _=0;_<E;_++)e[r+_]=t[n+_]}function A(t,n,e){let r=0;for(let E=0;E<e;E++)r=t[n+E]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let T=null},72364:(t,n,e)=>{e.d(n,{U1:()=>T,iC:()=>A});var r=e(71004),E=e(98132),_=e(90736);class i{constructor(t,n){this.layout=t,this.buffer="number"==typeof n?new ArrayBuffer(n*t.stride):n;for(const n of t.fields.keys()){const e=t.fields.get(n);this[n]=new e.constructor(this.buffer,e.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,n){const e=this[t];return e&&e.elementCount===n.ElementCount&&e.elementType===n.ElementType?e:null}slice(t,n){return new i(this.layout,this.buffer.slice(t*this.stride,n*this.stride))}copyFrom(t,n=0,e=0,r=t.count){const E=this.stride;if(E%4==0){const _=new Uint32Array(t.buffer,n*E,r*E/4);new Uint32Array(this.buffer,e*E,r*E/4).set(_)}else{const _=new Uint8Array(t.buffer,n*E,r*E);new Uint8Array(this.buffer,e*E,r*E).set(_)}return this}get usedMemory(){return this.byteLength}dispose(){}}class o{constructor(t=null){this._stride=0,this._lastAligned=0,this._fields=new Map,t&&(this._stride=t.stride,t.fields.forEach((t=>this._fields.set(t[0],{...t[1],constructor:N(t[1].constructor)}))))}vec2f(t,n){return this._appendField(t,r.U7,n),this}vec2f64(t,n){return this._appendField(t,r.wT,n),this}vec3f(t,n){return this._appendField(t,r.Yj,n),this}vec3f64(t,n){return this._appendField(t,r.Ax,n),this}vec4f(t,n){return this._appendField(t,r._5,n),this}vec4f64(t,n){return this._appendField(t,r.Ip,n),this}mat3f(t,n){return this._appendField(t,r.Ko,n),this}mat3f64(t,n){return this._appendField(t,r.m_,n),this}mat4f(t,n){return this._appendField(t,r.IL,n),this}mat4f64(t,n){return this._appendField(t,r.mF,n),this}vec4u8(t,n){return this._appendField(t,r.sb,n),this}f32(t,n){return this._appendField(t,r.AZ,n),this}f64(t,n){return this._appendField(t,r.oN,n),this}u8(t,n){return this._appendField(t,r.Kg,n),this}u16(t,n){return this._appendField(t,r.E_,n),this}i8(t,n){return this._appendField(t,r.kV,n),this}vec2i8(t,n){return this._appendField(t,r.oR,n),this}vec2i16(t,n){return this._appendField(t,r.iN,n),this}vec2u8(t,n){return this._appendField(t,r.eS,n),this}vec4u16(t,n){return this._appendField(t,r.Ig,n),this}u32(t,n){return this._appendField(t,r.Ym,n),this}_appendField(t,n,e){if(this._fields.has(t))return void(0,_.Uc)(!1,`${t} already added to vertex buffer layout`);const r=n.ElementCount*(0,E.Ad)(n.ElementType),i=this._stride;this._stride+=r,this._fields.set(t,{size:r,constructor:n,offset:i,optional:e})}createBuffer(t){return new i(this,t)}createView(t){return new i(this,t)}clone(){const t=new o;return t._stride=this._stride,t._fields=new Map,this._fields.forEach(((n,e)=>t._fields.set(e,n))),t.BufferType=this.BufferType,t}get stride(){if(this._lastAligned!==this._fields.size){let t=1;this._fields.forEach((n=>t=Math.max(t,(0,E.Ad)(n.constructor.ElementType)))),this._stride=Math.floor((this._stride+t-1)/t)*t,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function A(){return new o}class T{constructor(t){this.fields=new Array,t.fields.forEach(((t,n)=>{const e={...t,constructor:R(t.constructor)};this.fields.push([n,e])})),this.stride=t.stride}}const s=[r.AZ,r.U7,r.Yj,r._5,r.Ko,r.IL,r.oN,r.wT,r.Ax,r.Ip,r.m_,r.mF,r.Kg,r.eS,r.IN,r.sb,r.E_,r.kg,r.k5,r.Ig,r.Ym,r.qZ,r.ER,r.q$,r.kV,r.oR,r.Oq,r.mq,r.Mt,r.iN,r.g7,r.OS,r.Ep,r.mI,r.Yv,r.i9];function R(t){return`${t.ElementType}_${t.ElementCount}`}function N(t){return c.get(t)}const c=new Map;s.forEach((t=>c.set(R(t),t)))},73440:(t,n,e)=>{e.d(n,{W:()=>_});var r=e(77800),E=e(91811);function _(t,n=0){const e=t.stride;return Array.from(t.fields.keys()).map((r=>{const _=t.fields.get(r),o=_.constructor.ElementCount,A=i(_.constructor.ElementType),T=_.offset,s=!(!_.optional||!_.optional.glNormalized);return new E.q(r,o,A,T,e,s,n)}))}function i(t){const n=o[t];if(n)return n;throw new Error("BufferType not supported in WebGL")}const o={u8:r.Ck.UNSIGNED_BYTE,u16:r.Ck.UNSIGNED_SHORT,u32:r.Ck.UNSIGNED_INT,i8:r.Ck.BYTE,i16:r.Ck.SHORT,i32:r.Ck.INT,f32:r.Ck.FLOAT}},90736:(t,n,e)=>{e.d(n,{If:()=>_,Uc:()=>E}),e(85256),e(74784),(0,e(37008).Su)();class r{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function E(t,n){if(!t){n=n||"Assertion";const t=new Error(n).stack;throw new r(`${n} at ${t}`)}}function _(t,n,e,r){let E,_=(e[0]-t[0])/n[0],i=(r[0]-t[0])/n[0];_>i&&(E=_,_=i,i=E);let o=(e[1]-t[1])/n[1],A=(r[1]-t[1])/n[1];if(o>A&&(E=o,o=A,A=E),_>A||o>i)return!1;o>_&&(_=o),A<i&&(i=A);let T=(e[2]-t[2])/n[2],s=(r[2]-t[2])/n[2];return T>s&&(E=T,T=s,s=E),!(_>s||T>i||(s<i&&(i=s),i<0))}},4636:(t,n,e)=>{var r;e.d(n,{K:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.PREVPOSITION="prevPosition",t.NEXTPOSITION="nextPosition",t.SUBDIVISIONFACTOR="subdivisionFactor",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.FEATUREVALUE="featureValue",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},80036:(t,n,e)=>{e.d(n,{If:()=>i,sn:()=>A,wj:()=>T});var r=e(73440),E=e(72364),_=e(4636);const i=(0,E.iC)().vec3f(_.K.POSITION).u16(_.K.COMPONENTINDEX),o=(0,E.iC)().vec2u8(_.K.SIDENESS),A=((0,r.W)(o),(0,E.iC)().vec3f(_.K.POSITION0).vec3f(_.K.POSITION1).vec2i16(_.K.NORMALCOMPRESSED).u16(_.K.COMPONENTINDEX).u8(_.K.VARIANTOFFSET,{glNormalized:!0}).u8(_.K.VARIANTSTROKE).u8(_.K.VARIANTEXTENSION,{glNormalized:!0})),T=(0,E.iC)().vec3f(_.K.POSITION0).vec3f(_.K.POSITION1).vec2i16(_.K.NORMALCOMPRESSED).vec2i16(_.K.NORMAL2COMPRESSED).u16(_.K.COMPONENTINDEX).u8(_.K.VARIANTOFFSET,{glNormalized:!0}).u8(_.K.VARIANTSTROKE).u8(_.K.VARIANTEXTENSION,{glNormalized:!0});new Map([[_.K.POSITION0,0],[_.K.POSITION1,1],[_.K.COMPONENTINDEX,2],[_.K.VARIANTOFFSET,3],[_.K.VARIANTSTROKE,4],[_.K.VARIANTEXTENSION,5],[_.K.NORMALCOMPRESSED,6],[_.K.NORMAL2COMPRESSED,7],[_.K.SIDENESS,8]])},79968:(t,n,e)=>{e.d(n,{k:()=>s});var r=e(92400),E=e(53648),_=e(98472),i=e(62484);const o=-1;var A,T;function s(t,n,e,i=O){const A=t.vertices.position,T=t.vertices.componentIndex,s=(0,E.EF)(i.anglePlanar),S=(0,E.EF)(i.angleSignificantEdge),I=Math.cos(S),f=Math.cos(s),C=a.edge,M=C.position0,l=C.position1,L=C.faceNormal0,h=C.faceNormal1,D=u(t),U=function(t){const n=t.faces.length/3,e=t.faces,r=t.neighbors;let E=0;for(let t=0;t<n;t++){const n=r[3*t],_=r[3*t+1],i=r[3*t+2],A=e[3*t],T=e[3*t+1],s=e[3*t+2];E+=n===o||A<T?1:0,E+=_===o||T<s?1:0,E+=i===o||s<A?1:0}const _=new Int32Array(4*E);let i=0;for(let t=0;t<n;t++){const n=r[3*t],E=r[3*t+1],A=r[3*t+2],T=e[3*t],s=e[3*t+1],R=e[3*t+2];(n===o||T<s)&&(_[i++]=T,_[i++]=s,_[i++]=t,_[i++]=n),(E===o||s<R)&&(_[i++]=s,_[i++]=R,_[i++]=t,_[i++]=E),(A===o||R<T)&&(_[i++]=R,_[i++]=T,_[i++]=t,_[i++]=A)}return _}(t),P=U.length/4,d=n.allocate(P);let F=0;const G=P,B=e.allocate(G);let g=0,m=0,p=0;const H=(0,r.ik)(0,P),y=new Float32Array(P);y.forEach(((t,n,e)=>{A.getVec(U[4*n],M),A.getVec(U[4*n+1],l),e[n]=(0,_.q)(M,l)})),H.sort(((t,n)=>y[n]-y[t]));const w=new Array,b=new Array;for(let t=0;t<P;t++){const r=H[t],E=y[r],i=U[4*r],u=U[4*r+1],a=U[4*r+2],S=U[4*r+3],O=S===o;if(A.getVec(i,M),A.getVec(u,l),O)(0,_.s)(L,D[3*a],D[3*a+1],D[3*a+2]),(0,_.c)(h,L),C.componentIndex=T.get(i),C.cosAngle=(0,_.k)(L,h);else{if((0,_.s)(L,D[3*a],D[3*a+1],D[3*a+2]),(0,_.s)(h,D[3*S],D[3*S+1],D[3*S+2]),C.componentIndex=T.get(i),C.cosAngle=(0,_.k)(L,h),N(C,f))continue;C.cosAngle<-.9999&&(0,_.c)(h,L)}m+=E,p++,O||R(C,I)?(n.write(d,F++,C),w.push(E)):c(C,s)&&(e.write(B,g++,C),b.push(E))}const V=new Float32Array(w.reverse()),v=new Float32Array(b.reverse());return{regular:{instancesData:n.trim(d,F),lodInfo:{lengths:V}},silhouette:{instancesData:e.trim(B,g),lodInfo:{lengths:v}},averageEdgeLength:m/p}}function R(t,n){return t.cosAngle<n}function N(t,n){return t.cosAngle>n}function c(t,n){const e=(0,E.Uj)(t.cosAngle),r=a.fwd,i=a.ortho;return(0,_.E)(r,t.position1,t.position0),e*((0,_.k)((0,_.b)(i,t.faceNormal0,t.faceNormal1),r)>0?-1:1)>n}function u(t){const n=t.faces.length/3,e=t.vertices.position,r=t.faces,E=S.v0,i=S.v1,o=S.v2,A=new Float32Array(3*n);for(let t=0;t<n;t++){const n=r[3*t],T=r[3*t+1],s=r[3*t+2];e.getVec(n,E),e.getVec(T,i),e.getVec(s,o),(0,_.f)(i,i,E),(0,_.f)(o,o,E),(0,_.b)(E,i,o),(0,_.n)(E,E),A[3*t]=E[0],A[3*t+1]=E[1],A[3*t+2]=E[2]}return A}(T=A||(A={}))[T.SOLID=0]="SOLID",T[T.SKETCH=1]="SKETCH";const a={edge:{position0:(0,i.Su)(),position1:(0,i.Su)(),faceNormal0:(0,i.Su)(),faceNormal1:(0,i.Su)(),componentIndex:0,cosAngle:0},ortho:(0,i.Su)(),fwd:(0,i.Su)()},S={v0:(0,i.Su)(),v1:(0,i.Su)(),v2:(0,i.Su)()},O={anglePlanar:4,angleSignificantEdge:35}},75980:(t,n,e)=>{e.d(n,{Aj:()=>d,or:()=>p,In:()=>F,qu:()=>m});var r=e(77080);function E(t,n,e){const r=n/3,E=new Uint32Array(e+1),_=new Uint32Array(e+1),i=(t,n)=>{t<n?E[t+1]++:_[n+1]++};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],E=t[3*n+2];i(e,r),i(r,E),i(E,e)}let o=0,A=0;for(let t=0;t<e;t++){const n=E[t+1],e=_[t+1];E[t+1]=o,_[t+1]=A,o+=n,A+=e}const T=new Uint32Array(6*r),s=E[e],R=(t,n,e)=>{if(t<n){const r=E[t+1]++;T[2*r]=n,T[2*r+1]=e}else{const r=_[n+1]++;T[2*s+2*r]=t,T[2*s+2*r+1]=e}};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],E=t[3*n+2];R(e,r,n),R(r,E,n),R(E,e,n)}const N=(t,n)=>{const e=2*t,r=n-t;for(let t=1;t<r;t++){const n=T[e+2*t],r=T[e+2*t+1];let E=t-1;for(;E>=0&&T[e+2*E]>n;E--)T[e+2*E+2]=T[e+2*E],T[e+2*E+3]=T[e+2*E+1];T[e+2*E+2]=n,T[e+2*E+3]=r}};for(let t=0;t<e;t++)N(E[t],E[t+1]),N(s+_[t],s+_[t+1]);const c=new Int32Array(3*r),u=(n,e)=>n===t[3*e]?0:n===t[3*e+1]?1:n===t[3*e+2]?2:-1,a=(t,n)=>{const e=u(t,n);c[3*n+e]=-1},S=(t,n,e,r)=>{const E=u(t,n);c[3*n+E]=r;const _=u(e,r);c[3*r+_]=n};for(let t=0;t<e;t++){let n=E[t];const e=E[t+1];let r=_[t];const i=_[t+1];for(;n<e&&r<i;){const e=T[2*n],E=T[2*s+2*r];e===E?(S(t,T[2*n+1],E,T[2*s+2*r+1]),n++,r++):e<E?(a(t,T[2*n+1]),n++):(a(E,T[2*s+2*r+1]),r++)}for(;n<e;)a(t,T[2*n+1]),n++;for(;r<i;)a(T[2*s+2*r],T[2*s+2*r+1]),r++}return c}var _=e(72364),i=e(4636),o=e(80036),A=e(72052),T=e(98472),s=e(62484),R=e(73440),N=e(53648);function c(t,n,e,r,E,_=2){const i=1/(Math.abs(e)+Math.abs(r)+Math.abs(E)),o=e*i,A=r*i,T=E<=0?(o>=0?1:-1)*(1-Math.abs(A)):o,s=E<=0?(A>=0?1:-1)*(1-Math.abs(o)):A,R=n*_;t[R]=u(T),t[R+1]=u(s)}function u(t){return(0,N.qk)(Math.round(32767*t),-32767,32767)}e(92896);class a{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?C:f}write(t,n,e){const r=this._edgeHashFunction(e);U.seed=r;const E=U.getIntRange(0,255),_=U.getIntRange(0,this.settings.variants-1),i=U.getFloat(),o=255*(.5*function(t,n){const e=t<0?-1:1;return Math.abs(t)**1.2*e}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex),t.variantOffset.set(n,E),t.variantStroke.set(n,_),t.variantExtension.set(n,o)}trim(t,n){return t.slice(0,n)}}const S=new Float32Array(6),O=new Uint32Array(S.buffer),I=new Uint32Array(1);function f(t){const n=S;n[0]=t.position0[0],n[1]=t.position0[1],n[2]=t.position0[2],n[3]=t.position1[0],n[4]=t.position1[1],n[5]=t.position1[2],I[0]=5381;for(let t=0;t<O.length;t++)I[0]=31*I[0]+O[t];return I[0]}function C(t){const n=S;n[0]=l(t.position0[0]),n[1]=l(t.position0[1]),n[2]=l(t.position0[2]),n[3]=l(t.position1[0]),n[4]=l(t.position1[1]),n[5]=l(t.position1[2]),I[0]=5381;for(let t=0;t<O.length;t++)I[0]=31*I[0]+O[t];return I[0]}const M=1e4;function l(t){return Math.round(t*M)/M}class L{constructor(){this._commonWriter=new a}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return o.sn.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e),(0,T.g)(D,e.faceNormal0,e.faceNormal1),(0,T.n)(D,D);const{typedBuffer:r,typedBufferStride:E}=t.normalCompressed;c(r,n,D[0],D[1],D[2],E)}trim(t,n){return this._commonWriter.trim(t,n)}}L.Layout=o.sn,L.glLayout=(0,R.W)(o.sn,1);class h{constructor(){this._commonWriter=new a}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return o.wj.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e);{const{typedBuffer:r,typedBufferStride:E}=t.normalCompressed;c(r,n,e.faceNormal0[0],e.faceNormal0[1],e.faceNormal0[2],E)}{const{typedBuffer:r,typedBufferStride:E}=t.normal2Compressed;c(r,n,e.faceNormal1[0],e.faceNormal1[1],e.faceNormal1[2],E)}}trim(t,n){return this._commonWriter.trim(t,n)}}h.Layout=o.wj,h.glLayout=(0,R.W)(o.wj,1);const D=(0,s.Su)(),U=new A.c;var P=e(79968);function d(t){const n=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return B.updateSettings(t.writerSettings),g.updateSettings(t.writerSettings),(0,P.k)(n,B,g)}function F(t,n,e,_){if(n){const n=E(e,_,t.count);return new G(e,_,n,t)}const i=(0,r.g)(t.buffer,t.stride/4,{originalIndices:e,originalIndicesLength:_}),A=E(i.indices,_,i.uniqueCount);return{faces:i.indices,facesLength:i.indices.length,neighbors:A,vertices:o.If.createView(i.buffer)}}class G{constructor(t,n,e,r){this.faces=t,this.facesLength=n,this.neighbors=e,this.vertices=r}}const B=new L,g=new h,m=(0,_.iC)().vec3f(i.K.POSITION0).vec3f(i.K.POSITION1),p=(0,_.iC)().vec3f(i.K.POSITION0).vec3f(i.K.POSITION1).u16(i.K.COMPONENTINDEX)},91811:(t,n,e)=>{e.d(n,{q:()=>r});class r{constructor(t,n,e,r,E,_=!1,i=0){this.name=t,this.count=n,this.type=e,this.offset=r,this.stride=E,this.normalized=_,this.divisor=i}}},77800:(t,n,e)=>{var r,E,_,i,o,A,T,s,R,N,c,u,a,S,O,I,f,C,M,l,L,h,D;e.d(n,{Ck:()=>s,GE:()=>U,Gs:()=>M,Id:()=>S,K:()=>o,OK:()=>I,QD:()=>N,Qb:()=>f,Qx:()=>h,Qz:()=>u,SC:()=>A,UV:()=>O,Ud:()=>c,Uf:()=>E,YT:()=>i,_m:()=>C,c5:()=>a,et:()=>R,kl:()=>l,sl:()=>r,sr:()=>P,vs:()=>T,w$:()=>_,y4:()=>L}),function(t){t[t.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",t[t.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",t[t.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(r||(r={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(E||(E={})),function(t){t[t.ZERO=0]="ZERO",t[t.ONE=1]="ONE",t[t.SRC_COLOR=768]="SRC_COLOR",t[t.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",t[t.SRC_ALPHA=770]="SRC_ALPHA",t[t.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",t[t.DST_ALPHA=772]="DST_ALPHA",t[t.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",t[t.DST_COLOR=774]="DST_COLOR",t[t.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",t[t.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",t[t.CONSTANT_COLOR=32769]="CONSTANT_COLOR",t[t.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",t[t.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",t[t.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(_||(_={})),function(t){t[t.ADD=32774]="ADD",t[t.MIN=32775]="MIN",t[t.MAX=32776]="MAX",t[t.SUBTRACT=32778]="SUBTRACT",t[t.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(i||(i={})),function(t){t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t[t.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",t[t.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",t[t.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",t[t.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",t[t.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(o||(o={})),function(t){t[t.FRONT=1028]="FRONT",t[t.BACK=1029]="BACK",t[t.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(A||(A={})),function(t){t[t.CW=2304]="CW",t[t.CCW=2305]="CCW"}(T||(T={})),function(t){t[t.BYTE=5120]="BYTE",t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.SHORT=5122]="SHORT",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.INT=5124]="INT",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.FLOAT=5126]="FLOAT"}(s||(s={})),function(t){t[t.NEVER=512]="NEVER",t[t.LESS=513]="LESS",t[t.EQUAL=514]="EQUAL",t[t.LEQUAL=515]="LEQUAL",t[t.GREATER=516]="GREATER",t[t.NOTEQUAL=517]="NOTEQUAL",t[t.GEQUAL=518]="GEQUAL",t[t.ALWAYS=519]="ALWAYS"}(R||(R={})),function(t){t[t.ZERO=0]="ZERO",t[t.KEEP=7680]="KEEP",t[t.REPLACE=7681]="REPLACE",t[t.INCR=7682]="INCR",t[t.DECR=7683]="DECR",t[t.INVERT=5386]="INVERT",t[t.INCR_WRAP=34055]="INCR_WRAP",t[t.DECR_WRAP=34056]="DECR_WRAP"}(N||(N={})),function(t){t[t.NEAREST=9728]="NEAREST",t[t.LINEAR=9729]="LINEAR",t[t.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",t[t.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",t[t.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",t[t.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(t){t[t.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(u||(u={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_3D=32879]="TEXTURE_3D",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(a||(a={})),function(t){t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t[t.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",t[t.ALPHA=6406]="ALPHA",t[t.RGB=6407]="RGB",t[t.RGBA=6408]="RGBA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.RED=6403]="RED",t[t.RG=33319]="RG",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER"}(S||(S={})),function(t){t[t.RGBA4=32854]="RGBA4",t[t.R16F=33325]="R16F",t[t.RG16F=33327]="RG16F",t[t.RGB32F=34837]="RGB32F",t[t.RGBA16F=34842]="RGBA16F",t[t.R32F=33326]="R32F",t[t.RG32F=33328]="RG32F",t[t.RGBA32F=34836]="RGBA32F",t[t.R11F_G11F_B10F=35898]="R11F_G11F_B10F",t[t.RGB8=32849]="RGB8",t[t.RGBA8=32856]="RGBA8",t[t.RGB5_A1=32855]="RGB5_A1",t[t.R8=33321]="R8",t[t.RG8=33323]="RG8",t[t.R8I=33329]="R8I",t[t.R8UI=33330]="R8UI",t[t.R16I=33331]="R16I",t[t.R16UI=33332]="R16UI",t[t.R32I=33333]="R32I",t[t.R32UI=33334]="R32UI",t[t.RG8I=33335]="RG8I",t[t.RG8UI=33336]="RG8UI",t[t.RG16I=33337]="RG16I",t[t.RG16UI=33338]="RG16UI",t[t.RG32I=33339]="RG32I",t[t.RG32UI=33340]="RG32UI",t[t.RGB16F=34843]="RGB16F",t[t.RGB9_E5=35901]="RGB9_E5",t[t.SRGB8=35905]="SRGB8",t[t.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",t[t.RGB565=36194]="RGB565",t[t.RGBA32UI=36208]="RGBA32UI",t[t.RGB32UI=36209]="RGB32UI",t[t.RGBA16UI=36214]="RGBA16UI",t[t.RGB16UI=36215]="RGB16UI",t[t.RGBA8UI=36220]="RGBA8UI",t[t.RGB8UI=36221]="RGB8UI",t[t.RGBA32I=36226]="RGBA32I",t[t.RGB32I=36227]="RGB32I",t[t.RGBA16I=36232]="RGBA16I",t[t.RGB16I=36233]="RGB16I",t[t.RGBA8I=36238]="RGBA8I",t[t.RGB8I=36239]="RGB8I",t[t.R8_SNORM=36756]="R8_SNORM",t[t.RG8_SNORM=36757]="RG8_SNORM",t[t.RGB8_SNORM=36758]="RGB8_SNORM",t[t.RGBA8_SNORM=36759]="RGBA8_SNORM",t[t.RGB10_A2=32857]="RGB10_A2",t[t.RGB10_A2UI=36975]="RGB10_A2UI"}(O||(O={})),function(t){t[t.FLOAT=5126]="FLOAT",t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.BYTE=5120]="BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.SHORT=5122]="SHORT",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.INT=5124]="INT",t[t.HALF_FLOAT=5131]="HALF_FLOAT",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(I||(I={})),function(t){t[t.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",t[t.STENCIL_INDEX8=36168]="STENCIL_INDEX8",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t[t.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",t[t.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",t[t.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",t[t.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(f||(f={})),function(t){t[t.STATIC_DRAW=35044]="STATIC_DRAW",t[t.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",t[t.STREAM_DRAW=35040]="STREAM_DRAW",t[t.STATIC_READ=35045]="STATIC_READ",t[t.DYNAMIC_READ=35049]="DYNAMIC_READ",t[t.STREAM_READ=35041]="STREAM_READ",t[t.STATIC_COPY=35046]="STATIC_COPY",t[t.DYNAMIC_COPY=35050]="DYNAMIC_COPY",t[t.STREAM_COPY=35042]="STREAM_COPY"}(C||(C={})),function(t){t[t.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",t[t.VERTEX_SHADER=35633]="VERTEX_SHADER"}(M||(M={})),function(t){t[t.FRAMEBUFFER=36160]="FRAMEBUFFER",t[t.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",t[t.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(l||(l={})),function(t){t[t.Texture=0]="Texture",t[t.BufferObject=1]="BufferObject",t[t.VertexArrayObject=2]="VertexArrayObject",t[t.Shader=3]="Shader",t[t.Program=4]="Program",t[t.FramebufferObject=5]="FramebufferObject",t[t.Renderbuffer=6]="Renderbuffer",t[t.TransformFeedback=7]="TransformFeedback",t[t.Sync=8]="Sync",t[t.UNCOUNTED=9]="UNCOUNTED",t[t.LinesOfCode=9]="LinesOfCode",t[t.Uniform=10]="Uniform",t[t.COUNT=11]="COUNT"}(L||(L={})),function(t){t[t.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",t[t.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",t[t.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",t[t.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",t[t.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",t[t.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",t[t.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",t[t.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",t[t.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",t[t.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",t[t.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",t[t.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",t[t.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",t[t.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",t[t.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",t[t.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(h||(h={})),function(t){t[t.NONE=0]="NONE",t[t.BACK=1029]="BACK"}(D||(D={}));const U=33306;var P,d,F,G,B,g,m;!function(t){t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",t[t.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",t[t.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",t[t.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",t[t.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",t[t.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",t[t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",t[t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(P||(P={})),function(t){t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_VEC2=35664]="FLOAT_VEC2",t[t.FLOAT_VEC3=35665]="FLOAT_VEC3",t[t.FLOAT_VEC4=35666]="FLOAT_VEC4",t[t.INT=5124]="INT",t[t.INT_VEC2=35667]="INT_VEC2",t[t.INT_VEC3=35668]="INT_VEC3",t[t.INT_VEC4=35669]="INT_VEC4",t[t.BOOL=35670]="BOOL",t[t.BOOL_VEC2=35671]="BOOL_VEC2",t[t.BOOL_VEC3=35672]="BOOL_VEC3",t[t.BOOL_VEC4=35673]="BOOL_VEC4",t[t.FLOAT_MAT2=35674]="FLOAT_MAT2",t[t.FLOAT_MAT3=35675]="FLOAT_MAT3",t[t.FLOAT_MAT4=35676]="FLOAT_MAT4",t[t.SAMPLER_2D=35678]="SAMPLER_2D",t[t.SAMPLER_CUBE=35680]="SAMPLER_CUBE",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",t[t.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",t[t.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",t[t.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",t[t.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",t[t.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",t[t.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",t[t.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",t[t.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",t[t.SAMPLER_3D=35679]="SAMPLER_3D",t[t.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",t[t.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",t[t.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",t[t.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",t[t.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",t[t.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",t[t.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",t[t.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",t[t.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",t[t.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",t[t.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",t[t.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(d||(d={})),function(t){t[t.OBJECT_TYPE=37138]="OBJECT_TYPE",t[t.SYNC_CONDITION=37139]="SYNC_CONDITION",t[t.SYNC_STATUS=37140]="SYNC_STATUS",t[t.SYNC_FLAGS=37141]="SYNC_FLAGS"}(F||(F={})),function(t){t[t.UNSIGNALED=37144]="UNSIGNALED",t[t.SIGNALED=37145]="SIGNALED"}(G||(G={})),function(t){t[t.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",t[t.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",t[t.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",t[t.WAIT_FAILED=37149]="WAIT_FAILED"}(B||(B={})),function(t){t[t.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(g||(g={})),function(t){t[t.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(m||(m={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5980],{98472:(t,n,e)=>{e.d(n,{A:()=>c,B:()=>s,C:()=>a,D:()=>R,E:()=>g,H:()=>b,a:()=>f,b:()=>h,c:()=>i,e:()=>U,f:()=>T,g:()=>A,h:()=>S,i:()=>M,j:()=>B,k:()=>L,l:()=>_,m:()=>D,n:()=>l,o:()=>y,p:()=>C,q:()=>I,r:()=>O,s:()=>o,t:()=>P,u:()=>d,v:()=>N,w:()=>w,x:()=>V,y:()=>u,z:()=>m});var r=e(62484),E=e(47364);function _(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function A(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function T(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function s(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function R(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function N(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function c(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function u(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function a(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function S(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function O(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function I(t,n){const e=n[0]-t[0],r=n[1]-t[1],E=n[2]-t[2];return Math.sqrt(e*e+r*r+E*E)}function f(t,n){const e=n[0]-t[0],r=n[1]-t[1],E=n[2]-t[2];return e*e+r*r+E*E}function C(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function M(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function l(t,n){const e=n[0],r=n[1],E=n[2];let _=e*e+r*r+E*E;return _>0&&(_=1/Math.sqrt(_),t[0]=n[0]*_,t[1]=n[1]*_,t[2]=n[2]*_),t}function L(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function h(t,n,e){const r=n[0],E=n[1],_=n[2],i=e[0],o=e[1],A=e[2];return t[0]=E*A-_*o,t[1]=_*i-r*A,t[2]=r*o-E*i,t}function D(t,n,e,r){const E=n[0],_=n[1],i=n[2];return t[0]=E+r*(e[0]-E),t[1]=_+r*(e[1]-_),t[2]=i+r*(e[2]-i),t}function U(t,n,e){const r=n[0],E=n[1],_=n[2];return t[0]=e[0]*r+e[4]*E+e[8]*_+e[12],t[1]=e[1]*r+e[5]*E+e[9]*_+e[13],t[2]=e[2]*r+e[6]*E+e[10]*_+e[14],t}function P(t,n,e){const r=n[0],E=n[1],_=n[2];return t[0]=r*e[0]+E*e[3]+_*e[6],t[1]=r*e[1]+E*e[4]+_*e[7],t[2]=r*e[2]+E*e[5]+_*e[8],t}function d(t,n,e){const r=e[0],E=e[1],_=e[2],i=e[3],o=n[0],A=n[1],T=n[2],s=E*T-_*A,R=_*o-r*T,N=r*A-E*o,c=E*N-_*R,u=_*s-r*N,a=r*R-E*s,S=2*i;return t[0]=o+s*S+2*c,t[1]=A+R*S+2*u,t[2]=T+N*S+2*a,t}const F=(0,r.Su)(),G=(0,r.Su)();function B(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function g(t,n,e){const r=e[0]-n[0],E=e[1]-n[1],_=e[2]-n[2];let i=r*r+E*E+_*_;return i>0?(i=1/Math.sqrt(i),t[0]=r*i,t[1]=E*i,t[2]=_*i,t):(t[0]=0,t[1]=0,t[2]=0,t)}const m=T,p=s,H=R,y=I,w=f,b=_,V=C;Object.freeze(Object.defineProperty({__proto__:null,abs:N,add:A,angle:function(t,n){l(F,t),l(G,n);const e=L(F,G);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,E,_){const i=1-_,o=i*i,A=_*_,T=o*i,s=3*_*o,R=3*A*i,N=A*_;return t[0]=n[0]*T+e[0]*s+r[0]*R+E[0]*N,t[1]=n[1]*T+e[1]*s+r[1]*R+E[1]*N,t[2]=n[2]*T+e[2]*s+r[2]*R+E[2]*N,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},copy:i,cross:h,direction:g,dist:y,distance:I,div:H,divide:R,dot:L,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],_=t[2],i=n[0],o=n[1],A=n[2],T=(0,E.Au)();return Math.abs(e-i)<=T*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(r-o)<=T*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(_-A)<=T*Math.max(1,Math.abs(_),Math.abs(A))},exactEquals:B,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,E,_){const i=_*_,o=i*(2*_-3)+1,A=i*(_-2)+_,T=i*(_-1),s=i*(3-2*_);return t[0]=n[0]*o+e[0]*A+r[0]*T+E[0]*s,t[1]=n[1]*o+e[1]*A+r[1]*T+E[1]*s,t[2]=n[2]*o+e[2]*A+r[2]*T+E[2]*s,t},inverse:M,len:b,length:_,lerp:D,max:a,min:u,mul:p,multiply:s,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t},normalize:l,random:function(t,n){n=n||1;const e=E.QR,r=2*e()*Math.PI,_=2*e()-1,i=Math.sqrt(1-_*_)*n;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=_*n,t},rotateX:function(t,n,e,r){const E=[],_=[];return E[0]=n[0]-e[0],E[1]=n[1]-e[1],E[2]=n[2]-e[2],_[0]=E[0],_[1]=E[1]*Math.cos(r)-E[2]*Math.sin(r),_[2]=E[1]*Math.sin(r)+E[2]*Math.cos(r),t[0]=_[0]+e[0],t[1]=_[1]+e[1],t[2]=_[2]+e[2],t},rotateY:function(t,n,e,r){const E=[],_=[];return E[0]=n[0]-e[0],E[1]=n[1]-e[1],E[2]=n[2]-e[2],_[0]=E[2]*Math.sin(r)+E[0]*Math.cos(r),_[1]=E[1],_[2]=E[2]*Math.cos(r)-E[0]*Math.sin(r),t[0]=_[0]+e[0],t[1]=_[1]+e[1],t[2]=_[2]+e[2],t},rotateZ:function(t,n,e,r){const E=[],_=[];return E[0]=n[0]-e[0],E[1]=n[1]-e[1],E[2]=n[2]-e[2],_[0]=E[0]*Math.cos(r)-E[1]*Math.sin(r),_[1]=E[0]*Math.sin(r)+E[1]*Math.cos(r),_[2]=E[2],t[0]=_[0]+e[0],t[1]=_[1]+e[1],t[2]=_[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:S,scaleAndAdd:O,set:o,sign:c,sqrDist:w,sqrLen:V,squaredDistance:f,squaredLength:C,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:m,subtract:T,transformMat3:P,transformMat4:U,transformQuat:d},Symbol.toStringTag,{value:"Module"}))},85256:(t,n,e)=>{function r(){return[0,0]}function E(t,n){return[t,n]}function _(){return E(1,1)}function i(){return E(1,0)}function o(){return E(0,1)}e.d(n,{Qw:()=>A,Su:()=>r,WK:()=>E});const A=_(),T=i(),s=o();Object.freeze(Object.defineProperty({__proto__:null,ONES:A,UNIT_X:T,UNIT_Y:s,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:r,createView:function(t,n){return new Float64Array(t,n,2)},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:E,ones:_,unitX:i,unitY:o,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},62484:(t,n,e)=>{function r(){return[0,0,0]}function E(t){return[t[0],t[1],t[2]]}function _(t,n,e){return[t,n,e]}function i(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function o(){return _(1,1,1)}function A(){return _(1,0,0)}function T(){return _(0,1,0)}function s(){return _(0,0,1)}e.d(n,{IR:()=>u,Qw:()=>N,Su:()=>r,UV:()=>c,WK:()=>_,cX:()=>R,ct:()=>E,eu:()=>i,wx:()=>a});const R=[0,0,0],N=o(),c=A(),u=T(),a=s();Object.freeze(Object.defineProperty({__proto__:null,ONES:N,UNIT_X:c,UNIT_Y:u,UNIT_Z:a,ZEROS:R,clone:E,create:r,createView:function(t,n){return new Float64Array(t,n,3)},fromArray:i,fromValues:_,ones:o,unitX:A,unitY:T,unitZ:s,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},47364:(t,n,e)=>{e.d(n,{Af:()=>A,Au:()=>E,QR:()=>_,Yf:()=>T});let r=1e-6;function E(){return r}const _=Math.random,i=Math.PI/180,o=180/Math.PI;function A(t){return t*i}function T(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:_,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:E,setEpsilon:function(t){r=t},toDegree:T,toRadian:A},Symbol.toStringTag,{value:"Module"}))},53648:(t,n,e)=>{e.d(n,{Cq:()=>o,EF:()=>T,Iv:()=>I,SE:()=>C,UB:()=>s,Uj:()=>R,aU:()=>A,gJ:()=>S,gP:()=>c,ig:()=>f,qk:()=>i,sj:()=>N,w7:()=>_});var r=e(98472);const E=new Float32Array(1);function _(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function i(t,n,e){return Math.min(Math.max(t,n),e)}function o(t,n,e){return t+(n-t)*e}function A(t,n,e,r,E){return o(r,E,(t-n)/(e-n))}function T(t){return t*Math.PI/180}function s(t){return 180*t/Math.PI}function R(t){return Math.acos(i(t,-1,1))}function N(t){return Math.asin(i(t,-1,1))}function c(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}const u=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const a=BigInt("1000000");function S(t){return O(Math.max(-C,Math.min(t,C)))}function O(t){return E[0]=t,E[0]}function I(t,n){const e=(0,r.l)(t),E=N(t[2]/e),_=Math.atan2(t[1]/e,t[0]/e);return(0,r.s)(n,e,E,_),n}function f(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(c(n,1)&&c(e,1)&&c(r,1))}!function(t){const n=function(t){return u.setFloat64(0,t),u.getBigInt64(0)}(t=Math.abs(t)),e=function(t){return u.setBigInt64(0,t),u.getFloat64(0)}(n<=a?a:n-a);Math.abs(t-e)}(1);const C=O(34028234663852886e22)},92896:(t,n,e)=>{e.d(n,{mc:()=>E});var r=e(72008);function E(t,n=!1){return t<=r._?n?new Array(t).fill(0):new Array(t):new Float32Array(t)}},97143:(t,n,e)=>{e.d(n,{Uv:()=>E,aw:()=>_,yh:()=>T});var r=e(72008);function E(t){if((0,r.c7)(t)){if(t.length<r._)return t}else if(t.length<r._)return Array.from(t);let n=!0,e=!0;return t.some(((t,r)=>(n=n&&0===t,e=e&&t===r,!n&&!e))),n?function(t){if(1===t)return o;if(t<r._)return new Array(t).fill(0);if(t>s.length){const n=Math.max(2*s.length,t);s=new Uint8Array(n)}return new Uint8Array(s.buffer,0,t)}(t.length):e?T(t.length):(0,r.c7)(t)||t.BYTES_PER_ELEMENT!==Uint16Array.BYTES_PER_ELEMENT?function(t){let n=!0;for(const e of t){if(e>=65536)return(0,r.c7)(t)?new Uint32Array(t):t;e>=256&&(n=!1)}return n?new Uint8Array(t):new Uint16Array(t)}(t):t}function _(t){return t<=r._?new Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}let i=(()=>{const t=new Uint32Array(131072);for(let n=0;n<t.length;++n)t[n]=n;return t})();const o=[0],A=(()=>{const t=new Uint16Array(65536);for(let n=0;n<t.length;++n)t[n]=n;return t})();function T(t){if(1===t)return o;if(t<r._)return Array.from(new Uint16Array(A.buffer,0,t));if(t<A.length)return new Uint16Array(A.buffer,0,t);if(t>i.length){const n=Math.max(2*i.length,t);i=new Uint32Array(n);for(let t=0;t<i.length;t++)i[t]=t}return new Uint32Array(i.buffer,0,t)}let s=new Uint8Array(65536)},98132:(t,n,e)=>{function r(t){switch(t){case"u8":case"i8":return 1;case"u16":case"i16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}e.d(n,{Ad:()=>r})},77080:(t,n,e)=>{e.d(n,{g:()=>_});var r=e(53648),E=e(97143);function _(t,n,e){const _=Array.isArray(t),s=_?t.length/n:t.byteLength/(4*n),R=_?t:new Uint32Array(t,0,s*n),N=e?.minReduction??0,c=e?.originalIndices||null,u=c?c.length:0,a=e?.componentOffsets||null;let S=0;if(a)for(let t=0;t<a.length-1;t++){const n=a[t+1]-a[t];n>S&&(S=n)}else S=s;const O=Math.floor(1.1*S)+1;(null==T||T.length<2*O)&&(T=new Uint32Array((0,r.w7)(2*O)));for(let t=0;t<2*O;t++)T[t]=0;let I=0;const f=!!a&&!!c,C=f?u:s;let M=(0,E.aw)(s);const l=new Uint32Array(u),L=1.96;let h=0!==N?Math.ceil(4*L*L/(N*N)*N*(1-N)):C,D=1,U=a?a[1]:C;for(let t=0;t<C;t++){if(t===h){const n=1-I/t;if(n+L*Math.sqrt(n*(1-n)/t)<N)return null;h*=2}if(t===U){for(let t=0;t<2*O;t++)T[t]=0;if(c)for(let t=a[D-1];t<a[D];t++)l[t]=M[c[t]];U=a[++D]}const e=f?c[t]:t,r=e*n,E=A(R,r,n);let _=E%O,o=I;for(;0!==T[2*_+1];){if(T[2*_]===E){const t=T[2*_+1]-1;if(i(R,r,t*n,n)){o=M[t];break}}_++,_>=O&&(_-=O)}o===I&&(T[2*_]=E,T[2*_+1]=e+1,I++),M[e]=o}if(0!==N&&1-I/s<N)return null;if(f){for(let t=a[D-1];t<l.length;t++)l[t]=M[c[t]];M=(0,E.Uv)(l)}const P=_?new Array(I):new Uint32Array(I*n);I=0;for(let t=0;t<C;t++)M[t]===I&&(o(R,(f?c[t]:t)*n,P,I*n,n),I++);if(c&&!f){const t=new Uint32Array(u);for(let n=0;n<t.length;n++)t[n]=M[c[n]];M=(0,E.Uv)(t)}return{buffer:Array.isArray(P)?P:P.buffer,indices:M,uniqueCount:I}}function i(t,n,e,r){for(let E=0;E<r;E++)if(t[n+E]!==t[e+E])return!1;return!0}function o(t,n,e,r,E){for(let _=0;_<E;_++)e[r+_]=t[n+_]}function A(t,n,e){let r=0;for(let E=0;E<e;E++)r=t[n+E]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let T=null},72364:(t,n,e)=>{e.d(n,{U1:()=>T,iC:()=>A});var r=e(71004),E=e(98132),_=e(90736);class i{constructor(t,n){this.layout=t,this.buffer="number"==typeof n?new ArrayBuffer(n*t.stride):n;for(const n of t.fields.keys()){const e=t.fields.get(n);this[n]=new e.constructor(this.buffer,e.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,n){const e=this[t];return e&&e.elementCount===n.ElementCount&&e.elementType===n.ElementType?e:null}slice(t,n){return new i(this.layout,this.buffer.slice(t*this.stride,n*this.stride))}copyFrom(t,n=0,e=0,r=t.count){const E=this.stride;if(E%4==0){const _=new Uint32Array(t.buffer,n*E,r*E/4);new Uint32Array(this.buffer,e*E,r*E/4).set(_)}else{const _=new Uint8Array(t.buffer,n*E,r*E);new Uint8Array(this.buffer,e*E,r*E).set(_)}return this}get usedMemory(){return this.byteLength}dispose(){}}class o{constructor(t=null){this._stride=0,this._lastAligned=0,this._fields=new Map,t&&(this._stride=t.stride,t.fields.forEach((t=>this._fields.set(t[0],{...t[1],constructor:N(t[1].constructor)}))))}vec2f(t,n){return this._appendField(t,r.U7,n),this}vec2f64(t,n){return this._appendField(t,r.wT,n),this}vec3f(t,n){return this._appendField(t,r.Yj,n),this}vec3f64(t,n){return this._appendField(t,r.Ax,n),this}vec4f(t,n){return this._appendField(t,r._5,n),this}vec4f64(t,n){return this._appendField(t,r.Ip,n),this}mat3f(t,n){return this._appendField(t,r.Ko,n),this}mat3f64(t,n){return this._appendField(t,r.m_,n),this}mat4f(t,n){return this._appendField(t,r.IL,n),this}mat4f64(t,n){return this._appendField(t,r.mF,n),this}vec4u8(t,n){return this._appendField(t,r.sb,n),this}f32(t,n){return this._appendField(t,r.AZ,n),this}f64(t,n){return this._appendField(t,r.oN,n),this}u8(t,n){return this._appendField(t,r.Kg,n),this}u16(t,n){return this._appendField(t,r.E_,n),this}i8(t,n){return this._appendField(t,r.kV,n),this}vec2i8(t,n){return this._appendField(t,r.oR,n),this}vec2i16(t,n){return this._appendField(t,r.iN,n),this}vec2u8(t,n){return this._appendField(t,r.eS,n),this}vec4u16(t,n){return this._appendField(t,r.Ig,n),this}u32(t,n){return this._appendField(t,r.Ym,n),this}_appendField(t,n,e){if(this._fields.has(t))return void(0,_.Uc)(!1,`${t} already added to vertex buffer layout`);const r=n.ElementCount*(0,E.Ad)(n.ElementType),i=this._stride;this._stride+=r,this._fields.set(t,{size:r,constructor:n,offset:i,optional:e})}createBuffer(t){return new i(this,t)}createView(t){return new i(this,t)}clone(){const t=new o;return t._stride=this._stride,t._fields=new Map,this._fields.forEach(((n,e)=>t._fields.set(e,n))),t.BufferType=this.BufferType,t}get stride(){if(this._lastAligned!==this._fields.size){let t=1;this._fields.forEach((n=>t=Math.max(t,(0,E.Ad)(n.constructor.ElementType)))),this._stride=Math.floor((this._stride+t-1)/t)*t,this._lastAligned=this._fields.size}return this._stride}get fields(){return this._fields}}function A(){return new o}class T{constructor(t){this.fields=new Array,t.fields.forEach(((t,n)=>{const e={...t,constructor:R(t.constructor)};this.fields.push([n,e])})),this.stride=t.stride}}const s=[r.AZ,r.U7,r.Yj,r._5,r.Ko,r.IL,r.oN,r.wT,r.Ax,r.Ip,r.m_,r.mF,r.Kg,r.eS,r.IN,r.sb,r.E_,r.kg,r.k5,r.Ig,r.Ym,r.qZ,r.ER,r.q$,r.kV,r.oR,r.Oq,r.mq,r.Mt,r.iN,r.g7,r.OS,r.Ep,r.mI,r.Yv,r.i9];function R(t){return`${t.ElementType}_${t.ElementCount}`}function N(t){return c.get(t)}const c=new Map;s.forEach((t=>c.set(R(t),t)))},73440:(t,n,e)=>{e.d(n,{W:()=>_});var r=e(77800),E=e(91811);function _(t,n=0){const e=t.stride;return Array.from(t.fields.keys()).map((r=>{const _=t.fields.get(r),o=_.constructor.ElementCount,A=i(_.constructor.ElementType),T=_.offset,s=!(!_.optional||!_.optional.glNormalized);return new E.q(r,o,A,T,e,s,n)}))}function i(t){const n=o[t];if(n)return n;throw new Error("BufferType not supported in WebGL")}const o={u8:r.Ck.UNSIGNED_BYTE,u16:r.Ck.UNSIGNED_SHORT,u32:r.Ck.UNSIGNED_INT,i8:r.Ck.BYTE,i16:r.Ck.SHORT,i32:r.Ck.INT,f32:r.Ck.FLOAT}},90736:(t,n,e)=>{e.d(n,{If:()=>_,Uc:()=>E}),e(85256),e(74784),(0,e(37008).Su)();class r{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function E(t,n){if(!t){n=n||"Assertion";const t=new Error(n).stack;throw new r(`${n} at ${t}`)}}function _(t,n,e,r){let E,_=(e[0]-t[0])/n[0],i=(r[0]-t[0])/n[0];_>i&&(E=_,_=i,i=E);let o=(e[1]-t[1])/n[1],A=(r[1]-t[1])/n[1];if(o>A&&(E=o,o=A,A=E),_>A||o>i)return!1;o>_&&(_=o),A<i&&(i=A);let T=(e[2]-t[2])/n[2],s=(r[2]-t[2])/n[2];return T>s&&(E=T,T=s,s=E),!(_>s||T>i||(s<i&&(i=s),i<0))}},4636:(t,n,e)=>{var r;e.d(n,{K:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.PREVPOSITION="prevPosition",t.NEXTPOSITION="nextPosition",t.SUBDIVISIONFACTOR="subdivisionFactor",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.FEATUREVALUE="featureValue",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},80036:(t,n,e)=>{e.d(n,{If:()=>i,sn:()=>A,wj:()=>T});var r=e(73440),E=e(72364),_=e(4636);const i=(0,E.iC)().vec3f(_.K.POSITION).u16(_.K.COMPONENTINDEX),o=(0,E.iC)().vec2u8(_.K.SIDENESS),A=((0,r.W)(o),(0,E.iC)().vec3f(_.K.POSITION0).vec3f(_.K.POSITION1).vec2i16(_.K.NORMALCOMPRESSED).u16(_.K.COMPONENTINDEX).u8(_.K.VARIANTOFFSET,{glNormalized:!0}).u8(_.K.VARIANTSTROKE).u8(_.K.VARIANTEXTENSION,{glNormalized:!0})),T=(0,E.iC)().vec3f(_.K.POSITION0).vec3f(_.K.POSITION1).vec2i16(_.K.NORMALCOMPRESSED).vec2i16(_.K.NORMAL2COMPRESSED).u16(_.K.COMPONENTINDEX).u8(_.K.VARIANTOFFSET,{glNormalized:!0}).u8(_.K.VARIANTSTROKE).u8(_.K.VARIANTEXTENSION,{glNormalized:!0});new Map([[_.K.POSITION0,0],[_.K.POSITION1,1],[_.K.COMPONENTINDEX,2],[_.K.VARIANTOFFSET,3],[_.K.VARIANTSTROKE,4],[_.K.VARIANTEXTENSION,5],[_.K.NORMALCOMPRESSED,6],[_.K.NORMAL2COMPRESSED,7],[_.K.SIDENESS,8]])},79968:(t,n,e)=>{e.d(n,{k:()=>s});var r=e(92400),E=e(53648),_=e(98472),i=e(62484);const o=-1;var A,T;function s(t,n,e,i=O){const A=t.vertices.position,T=t.vertices.componentIndex,s=(0,E.EF)(i.anglePlanar),S=(0,E.EF)(i.angleSignificantEdge),I=Math.cos(S),f=Math.cos(s),C=a.edge,M=C.position0,l=C.position1,L=C.faceNormal0,h=C.faceNormal1,D=u(t),U=function(t){const n=t.faces.length/3,e=t.faces,r=t.neighbors;let E=0;for(let t=0;t<n;t++){const n=r[3*t],_=r[3*t+1],i=r[3*t+2],A=e[3*t],T=e[3*t+1],s=e[3*t+2];E+=n===o||A<T?1:0,E+=_===o||T<s?1:0,E+=i===o||s<A?1:0}const _=new Int32Array(4*E);let i=0;for(let t=0;t<n;t++){const n=r[3*t],E=r[3*t+1],A=r[3*t+2],T=e[3*t],s=e[3*t+1],R=e[3*t+2];(n===o||T<s)&&(_[i++]=T,_[i++]=s,_[i++]=t,_[i++]=n),(E===o||s<R)&&(_[i++]=s,_[i++]=R,_[i++]=t,_[i++]=E),(A===o||R<T)&&(_[i++]=R,_[i++]=T,_[i++]=t,_[i++]=A)}return _}(t),P=U.length/4,d=n.allocate(P);let F=0;const G=P,B=e.allocate(G);let g=0,m=0,p=0;const H=(0,r.ik)(0,P),y=new Float32Array(P);y.forEach(((t,n,e)=>{A.getVec(U[4*n],M),A.getVec(U[4*n+1],l),e[n]=(0,_.q)(M,l)})),H.sort(((t,n)=>y[n]-y[t]));const w=new Array,b=new Array;for(let t=0;t<P;t++){const r=H[t],E=y[r],i=U[4*r],u=U[4*r+1],a=U[4*r+2],S=U[4*r+3],O=S===o;if(A.getVec(i,M),A.getVec(u,l),O)(0,_.s)(L,D[3*a],D[3*a+1],D[3*a+2]),(0,_.c)(h,L),C.componentIndex=T.get(i),C.cosAngle=(0,_.k)(L,h);else{if((0,_.s)(L,D[3*a],D[3*a+1],D[3*a+2]),(0,_.s)(h,D[3*S],D[3*S+1],D[3*S+2]),C.componentIndex=T.get(i),C.cosAngle=(0,_.k)(L,h),N(C,f))continue;C.cosAngle<-.9999&&(0,_.c)(h,L)}m+=E,p++,O||R(C,I)?(n.write(d,F++,C),w.push(E)):c(C,s)&&(e.write(B,g++,C),b.push(E))}const V=new Float32Array(w.reverse()),v=new Float32Array(b.reverse());return{regular:{instancesData:n.trim(d,F),lodInfo:{lengths:V}},silhouette:{instancesData:e.trim(B,g),lodInfo:{lengths:v}},averageEdgeLength:m/p}}function R(t,n){return t.cosAngle<n}function N(t,n){return t.cosAngle>n}function c(t,n){const e=(0,E.Uj)(t.cosAngle),r=a.fwd,i=a.ortho;return(0,_.E)(r,t.position1,t.position0),e*((0,_.k)((0,_.b)(i,t.faceNormal0,t.faceNormal1),r)>0?-1:1)>n}function u(t){const n=t.faces.length/3,e=t.vertices.position,r=t.faces,E=S.v0,i=S.v1,o=S.v2,A=new Float32Array(3*n);for(let t=0;t<n;t++){const n=r[3*t],T=r[3*t+1],s=r[3*t+2];e.getVec(n,E),e.getVec(T,i),e.getVec(s,o),(0,_.f)(i,i,E),(0,_.f)(o,o,E),(0,_.b)(E,i,o),(0,_.n)(E,E),A[3*t]=E[0],A[3*t+1]=E[1],A[3*t+2]=E[2]}return A}(T=A||(A={}))[T.SOLID=0]="SOLID",T[T.SKETCH=1]="SKETCH";const a={edge:{position0:(0,i.Su)(),position1:(0,i.Su)(),faceNormal0:(0,i.Su)(),faceNormal1:(0,i.Su)(),componentIndex:0,cosAngle:0},ortho:(0,i.Su)(),fwd:(0,i.Su)()},S={v0:(0,i.Su)(),v1:(0,i.Su)(),v2:(0,i.Su)()},O={anglePlanar:4,angleSignificantEdge:35}},75980:(t,n,e)=>{e.d(n,{Aj:()=>d,or:()=>p,In:()=>F,qu:()=>m});var r=e(77080);function E(t,n,e){const r=n/3,E=new Uint32Array(e+1),_=new Uint32Array(e+1),i=(t,n)=>{t<n?E[t+1]++:_[n+1]++};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],E=t[3*n+2];i(e,r),i(r,E),i(E,e)}let o=0,A=0;for(let t=0;t<e;t++){const n=E[t+1],e=_[t+1];E[t+1]=o,_[t+1]=A,o+=n,A+=e}const T=new Uint32Array(6*r),s=E[e],R=(t,n,e)=>{if(t<n){const r=E[t+1]++;T[2*r]=n,T[2*r+1]=e}else{const r=_[n+1]++;T[2*s+2*r]=t,T[2*s+2*r+1]=e}};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],E=t[3*n+2];R(e,r,n),R(r,E,n),R(E,e,n)}const N=(t,n)=>{const e=2*t,r=n-t;for(let t=1;t<r;t++){const n=T[e+2*t],r=T[e+2*t+1];let E=t-1;for(;E>=0&&T[e+2*E]>n;E--)T[e+2*E+2]=T[e+2*E],T[e+2*E+3]=T[e+2*E+1];T[e+2*E+2]=n,T[e+2*E+3]=r}};for(let t=0;t<e;t++)N(E[t],E[t+1]),N(s+_[t],s+_[t+1]);const c=new Int32Array(3*r),u=(n,e)=>n===t[3*e]?0:n===t[3*e+1]?1:n===t[3*e+2]?2:-1,a=(t,n)=>{const e=u(t,n);c[3*n+e]=-1},S=(t,n,e,r)=>{const E=u(t,n);c[3*n+E]=r;const _=u(e,r);c[3*r+_]=n};for(let t=0;t<e;t++){let n=E[t];const e=E[t+1];let r=_[t];const i=_[t+1];for(;n<e&&r<i;){const e=T[2*n],E=T[2*s+2*r];e===E?(S(t,T[2*n+1],E,T[2*s+2*r+1]),n++,r++):e<E?(a(t,T[2*n+1]),n++):(a(E,T[2*s+2*r+1]),r++)}for(;n<e;)a(t,T[2*n+1]),n++;for(;r<i;)a(T[2*s+2*r],T[2*s+2*r+1]),r++}return c}var _=e(72364),i=e(4636),o=e(80036),A=e(72052),T=e(98472),s=e(62484),R=e(73440),N=e(53648);function c(t,n,e,r,E,_=2){const i=1/(Math.abs(e)+Math.abs(r)+Math.abs(E)),o=e*i,A=r*i,T=E<=0?(o>=0?1:-1)*(1-Math.abs(A)):o,s=E<=0?(A>=0?1:-1)*(1-Math.abs(o)):A,R=n*_;t[R]=u(T),t[R+1]=u(s)}function u(t){return(0,N.qk)(Math.round(32767*t),-32767,32767)}e(92896);class a{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?C:f}write(t,n,e){const r=this._edgeHashFunction(e);U.seed=r;const E=U.getIntRange(0,255),_=U.getIntRange(0,this.settings.variants-1),i=U.getFloat(),o=255*(.5*function(t,n){const e=t<0?-1:1;return Math.abs(t)**1.2*e}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex),t.variantOffset.set(n,E),t.variantStroke.set(n,_),t.variantExtension.set(n,o)}trim(t,n){return t.slice(0,n)}}const S=new Float32Array(6),O=new Uint32Array(S.buffer),I=new Uint32Array(1);function f(t){const n=S;n[0]=t.position0[0],n[1]=t.position0[1],n[2]=t.position0[2],n[3]=t.position1[0],n[4]=t.position1[1],n[5]=t.position1[2],I[0]=5381;for(let t=0;t<O.length;t++)I[0]=31*I[0]+O[t];return I[0]}function C(t){const n=S;n[0]=l(t.position0[0]),n[1]=l(t.position0[1]),n[2]=l(t.position0[2]),n[3]=l(t.position1[0]),n[4]=l(t.position1[1]),n[5]=l(t.position1[2]),I[0]=5381;for(let t=0;t<O.length;t++)I[0]=31*I[0]+O[t];return I[0]}const M=1e4;function l(t){return Math.round(t*M)/M}class L{constructor(){this._commonWriter=new a}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return o.sn.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e),(0,T.g)(D,e.faceNormal0,e.faceNormal1),(0,T.n)(D,D);const{typedBuffer:r,typedBufferStride:E}=t.normalCompressed;c(r,n,D[0],D[1],D[2],E)}trim(t,n){return this._commonWriter.trim(t,n)}}L.Layout=o.sn,L.glLayout=(0,R.W)(o.sn,1);class h{constructor(){this._commonWriter=new a}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return o.wj.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e);{const{typedBuffer:r,typedBufferStride:E}=t.normalCompressed;c(r,n,e.faceNormal0[0],e.faceNormal0[1],e.faceNormal0[2],E)}{const{typedBuffer:r,typedBufferStride:E}=t.normal2Compressed;c(r,n,e.faceNormal1[0],e.faceNormal1[1],e.faceNormal1[2],E)}}trim(t,n){return this._commonWriter.trim(t,n)}}h.Layout=o.wj,h.glLayout=(0,R.W)(o.wj,1);const D=(0,s.Su)(),U=new A.c;var P=e(79968);function d(t){const n=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return B.updateSettings(t.writerSettings),g.updateSettings(t.writerSettings),(0,P.k)(n,B,g)}function F(t,n,e,_){if(n){const n=E(e,_,t.count);return new G(e,_,n,t)}const i=(0,r.g)(t.buffer,t.stride/4,{originalIndices:e,originalIndicesLength:_}),A=E(i.indices,_,i.uniqueCount);return{faces:i.indices,facesLength:i.indices.length,neighbors:A,vertices:o.If.createView(i.buffer)}}class G{constructor(t,n,e,r){this.faces=t,this.facesLength=n,this.neighbors=e,this.vertices=r}}const B=new L,g=new h,m=(0,_.iC)().vec3f(i.K.POSITION0).vec3f(i.K.POSITION1),p=(0,_.iC)().vec3f(i.K.POSITION0).vec3f(i.K.POSITION1).u16(i.K.COMPONENTINDEX)},91811:(t,n,e)=>{e.d(n,{q:()=>r});class r{constructor(t,n,e,r,E,_=!1,i=0){this.name=t,this.count=n,this.type=e,this.offset=r,this.stride=E,this.normalized=_,this.divisor=i}}},77800:(t,n,e)=>{var r,E,_,i,o,A,T,s,R,N,c,u,a,S,O,I,f,C,M,l,L,h,D;e.d(n,{Ck:()=>s,GE:()=>U,Gs:()=>M,Id:()=>S,K:()=>o,OK:()=>I,QD:()=>N,Qb:()=>f,Qx:()=>h,Qz:()=>u,SC:()=>A,UV:()=>O,Ud:()=>c,Uf:()=>E,YT:()=>i,_m:()=>C,c5:()=>a,et:()=>R,kl:()=>l,sl:()=>r,sr:()=>P,vs:()=>T,w$:()=>_,y4:()=>L}),function(t){t[t.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",t[t.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",t[t.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(r||(r={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(E||(E={})),function(t){t[t.ZERO=0]="ZERO",t[t.ONE=1]="ONE",t[t.SRC_COLOR=768]="SRC_COLOR",t[t.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",t[t.SRC_ALPHA=770]="SRC_ALPHA",t[t.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",t[t.DST_ALPHA=772]="DST_ALPHA",t[t.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",t[t.DST_COLOR=774]="DST_COLOR",t[t.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",t[t.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",t[t.CONSTANT_COLOR=32769]="CONSTANT_COLOR",t[t.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",t[t.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",t[t.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(_||(_={})),function(t){t[t.ADD=32774]="ADD",t[t.MIN=32775]="MIN",t[t.MAX=32776]="MAX",t[t.SUBTRACT=32778]="SUBTRACT",t[t.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(i||(i={})),function(t){t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t[t.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",t[t.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",t[t.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",t[t.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",t[t.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(o||(o={})),function(t){t[t.FRONT=1028]="FRONT",t[t.BACK=1029]="BACK",t[t.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(A||(A={})),function(t){t[t.CW=2304]="CW",t[t.CCW=2305]="CCW"}(T||(T={})),function(t){t[t.BYTE=5120]="BYTE",t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.SHORT=5122]="SHORT",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.INT=5124]="INT",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.FLOAT=5126]="FLOAT"}(s||(s={})),function(t){t[t.NEVER=512]="NEVER",t[t.LESS=513]="LESS",t[t.EQUAL=514]="EQUAL",t[t.LEQUAL=515]="LEQUAL",t[t.GREATER=516]="GREATER",t[t.NOTEQUAL=517]="NOTEQUAL",t[t.GEQUAL=518]="GEQUAL",t[t.ALWAYS=519]="ALWAYS"}(R||(R={})),function(t){t[t.ZERO=0]="ZERO",t[t.KEEP=7680]="KEEP",t[t.REPLACE=7681]="REPLACE",t[t.INCR=7682]="INCR",t[t.DECR=7683]="DECR",t[t.INVERT=5386]="INVERT",t[t.INCR_WRAP=34055]="INCR_WRAP",t[t.DECR_WRAP=34056]="DECR_WRAP"}(N||(N={})),function(t){t[t.NEAREST=9728]="NEAREST",t[t.LINEAR=9729]="LINEAR",t[t.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",t[t.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",t[t.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",t[t.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(t){t[t.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(u||(u={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_3D=32879]="TEXTURE_3D",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(a||(a={})),function(t){t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t[t.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",t[t.ALPHA=6406]="ALPHA",t[t.RGB=6407]="RGB",t[t.RGBA=6408]="RGBA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.RED=6403]="RED",t[t.RG=33319]="RG",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER"}(S||(S={})),function(t){t[t.RGBA4=32854]="RGBA4",t[t.R16F=33325]="R16F",t[t.RG16F=33327]="RG16F",t[t.RGB32F=34837]="RGB32F",t[t.RGBA16F=34842]="RGBA16F",t[t.R32F=33326]="R32F",t[t.RG32F=33328]="RG32F",t[t.RGBA32F=34836]="RGBA32F",t[t.R11F_G11F_B10F=35898]="R11F_G11F_B10F",t[t.RGB8=32849]="RGB8",t[t.RGBA8=32856]="RGBA8",t[t.RGB5_A1=32855]="RGB5_A1",t[t.R8=33321]="R8",t[t.RG8=33323]="RG8",t[t.R8I=33329]="R8I",t[t.R8UI=33330]="R8UI",t[t.R16I=33331]="R16I",t[t.R16UI=33332]="R16UI",t[t.R32I=33333]="R32I",t[t.R32UI=33334]="R32UI",t[t.RG8I=33335]="RG8I",t[t.RG8UI=33336]="RG8UI",t[t.RG16I=33337]="RG16I",t[t.RG16UI=33338]="RG16UI",t[t.RG32I=33339]="RG32I",t[t.RG32UI=33340]="RG32UI",t[t.RGB16F=34843]="RGB16F",t[t.RGB9_E5=35901]="RGB9_E5",t[t.SRGB8=35905]="SRGB8",t[t.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",t[t.RGB565=36194]="RGB565",t[t.RGBA32UI=36208]="RGBA32UI",t[t.RGB32UI=36209]="RGB32UI",t[t.RGBA16UI=36214]="RGBA16UI",t[t.RGB16UI=36215]="RGB16UI",t[t.RGBA8UI=36220]="RGBA8UI",t[t.RGB8UI=36221]="RGB8UI",t[t.RGBA32I=36226]="RGBA32I",t[t.RGB32I=36227]="RGB32I",t[t.RGBA16I=36232]="RGBA16I",t[t.RGB16I=36233]="RGB16I",t[t.RGBA8I=36238]="RGBA8I",t[t.RGB8I=36239]="RGB8I",t[t.R8_SNORM=36756]="R8_SNORM",t[t.RG8_SNORM=36757]="RG8_SNORM",t[t.RGB8_SNORM=36758]="RGB8_SNORM",t[t.RGBA8_SNORM=36759]="RGBA8_SNORM",t[t.RGB10_A2=32857]="RGB10_A2",t[t.RGB10_A2UI=36975]="RGB10_A2UI"}(O||(O={})),function(t){t[t.FLOAT=5126]="FLOAT",t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.BYTE=5120]="BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.SHORT=5122]="SHORT",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.INT=5124]="INT",t[t.HALF_FLOAT=5131]="HALF_FLOAT",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(I||(I={})),function(t){t[t.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",t[t.STENCIL_INDEX8=36168]="STENCIL_INDEX8",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t[t.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",t[t.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",t[t.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",t[t.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(f||(f={})),function(t){t[t.STATIC_DRAW=35044]="STATIC_DRAW",t[t.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",t[t.STREAM_DRAW=35040]="STREAM_DRAW",t[t.STATIC_READ=35045]="STATIC_READ",t[t.DYNAMIC_READ=35049]="DYNAMIC_READ",t[t.STREAM_READ=35041]="STREAM_READ",t[t.STATIC_COPY=35046]="STATIC_COPY",t[t.DYNAMIC_COPY=35050]="DYNAMIC_COPY",t[t.STREAM_COPY=35042]="STREAM_COPY"}(C||(C={})),function(t){t[t.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",t[t.VERTEX_SHADER=35633]="VERTEX_SHADER"}(M||(M={})),function(t){t[t.FRAMEBUFFER=36160]="FRAMEBUFFER",t[t.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",t[t.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(l||(l={})),function(t){t[t.Texture=0]="Texture",t[t.BufferObject=1]="BufferObject",t[t.VertexArrayObject=2]="VertexArrayObject",t[t.Shader=3]="Shader",t[t.Program=4]="Program",t[t.FramebufferObject=5]="FramebufferObject",t[t.Renderbuffer=6]="Renderbuffer",t[t.TransformFeedback=7]="TransformFeedback",t[t.Sync=8]="Sync",t[t.UNCOUNTED=9]="UNCOUNTED",t[t.LinesOfCode=9]="LinesOfCode",t[t.Uniform=10]="Uniform",t[t.COUNT=11]="COUNT"}(L||(L={})),function(t){t[t.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",t[t.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",t[t.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",t[t.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",t[t.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",t[t.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",t[t.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",t[t.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",t[t.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",t[t.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",t[t.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",t[t.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",t[t.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",t[t.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",t[t.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",t[t.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(h||(h={})),function(t){t[t.NONE=0]="NONE",t[t.BACK=1029]="BACK"}(D||(D={}));const U=33306;var P,d,F,G,B,g,m;!function(t){t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",t[t.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",t[t.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",t[t.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",t[t.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",t[t.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",t[t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",t[t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(P||(P={})),function(t){t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_VEC2=35664]="FLOAT_VEC2",t[t.FLOAT_VEC3=35665]="FLOAT_VEC3",t[t.FLOAT_VEC4=35666]="FLOAT_VEC4",t[t.INT=5124]="INT",t[t.INT_VEC2=35667]="INT_VEC2",t[t.INT_VEC3=35668]="INT_VEC3",t[t.INT_VEC4=35669]="INT_VEC4",t[t.BOOL=35670]="BOOL",t[t.BOOL_VEC2=35671]="BOOL_VEC2",t[t.BOOL_VEC3=35672]="BOOL_VEC3",t[t.BOOL_VEC4=35673]="BOOL_VEC4",t[t.FLOAT_MAT2=35674]="FLOAT_MAT2",t[t.FLOAT_MAT3=35675]="FLOAT_MAT3",t[t.FLOAT_MAT4=35676]="FLOAT_MAT4",t[t.SAMPLER_2D=35678]="SAMPLER_2D",t[t.SAMPLER_CUBE=35680]="SAMPLER_CUBE",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",t[t.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",t[t.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",t[t.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",t[t.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",t[t.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",t[t.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",t[t.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",t[t.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",t[t.SAMPLER_3D=35679]="SAMPLER_3D",t[t.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",t[t.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",t[t.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",t[t.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",t[t.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",t[t.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",t[t.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",t[t.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",t[t.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",t[t.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",t[t.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",t[t.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(d||(d={})),function(t){t[t.OBJECT_TYPE=37138]="OBJECT_TYPE",t[t.SYNC_CONDITION=37139]="SYNC_CONDITION",t[t.SYNC_STATUS=37140]="SYNC_STATUS",t[t.SYNC_FLAGS=37141]="SYNC_FLAGS"}(F||(F={})),function(t){t[t.UNSIGNALED=37144]="UNSIGNALED",t[t.SIGNALED=37145]="SIGNALED"}(G||(G={})),function(t){t[t.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",t[t.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",t[t.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",t[t.WAIT_FAILED=37149]="WAIT_FAILED"}(B||(B={})),function(t){t[t.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(g||(g={})),function(t){t[t.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(m||(m={}))}}]);
|