@arcgis/core 4.33.7 → 4.33.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/{1f315f0eeb26dad1addd.js → 17c623db3d9a06a9b711.js} +1 -1
- package/assets/esri/core/workers/chunks/383395add870ab9bba75.js +1 -0
- package/assets/esri/core/workers/chunks/{bcadcb709e622f2aaaf9.js → 71e1a8bd432947c66357.js} +1 -1
- package/assets/esri/core/workers/chunks/750dde2a118f685c01d5.js +1 -0
- package/assets/esri/core/workers/chunks/{58526def64536b6581ab.js → bfc797a09da3c613226a.js} +1 -1
- package/colorUtils.js +1 -1
- package/kernel.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/355e6bcdb401ada71f39.js +0 -1
- package/assets/esri/core/workers/chunks/5bad1c6b53c1290c1bee.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3379],{11764:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ee});var i=s(74887),n=s(89640),r=s(6774),a=s(83027),o=s(13195);function l(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 h(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 c(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 u(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var f=s(18989);const d=24;class g{constructor(e,t,s,i,n,r,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=s,this._letterSpacing=i,this._hAnchor=n,this._vAnchor=r,this._justify=a}getShaping(e,t,s){const i=this._letterSpacing,n=this._lineHeight,r=this._justify,a=this._maxWidth,o=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const n=s&&l(e);let r;for(const t of this._glyphItems)if(r=t[e],r)break;o.push({codePoint:e,x:f,y:d,vertical:n,glyphMosaicItem:r}),r&&(f+=r.metrics.advance+i)}let g=f;a>0&&(g=f/Math.max(1,Math.ceil(f/a)));const p=e.includes(""),y=[],x=o.length;for(let e=0;e<x-1;e++){const t=o[e].codePoint,s=h(t);if(c(t)||s){let i=0;if(10===t)i-=1e4;else if(s&&p)i+=150;else{40!==t&&65288!==t||(i+=50);const s=o[e+1].codePoint;41!==s&&65289!==s||(i+=50)}y.push(this._buildBreak(e+1,o[e].x,g,y,i,!1))}}const _=this._optimalBreaks(this._buildBreak(x,f,g,y,0,!0));let m=0;const I=t?-n:n;let b=0;for(let e=0;e<_.length;e++){const t=_[e];let s=b;for(;s<t&&u(o[s].codePoint);)o[s].glyphMosaicItem=null,++s;let i=t-1;for(;i>s&&u(o[i].codePoint);)o[i].glyphMosaicItem=null,--i;if(s<=i){const e=o[s].x;for(let t=s;t<=i;t++)o[t].x-=e,o[t].y=d;let t=o[i].x;o[i].glyphMosaicItem&&(t+=o[i].glyphMosaicItem.metrics.advance),m=Math.max(t,m),r&&this._applyJustification(o,s,i)}b=t,d+=I}if(o.length>0){const e=_.length-1,s=(r-this._hAnchor)*m;let i=(-this._vAnchor*(e+1)+.5)*n;t&&e&&(i+=e*n);for(const e of o)e.x+=s,e.y+=i}return o.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let s=1/0,i=1/0,n=0,r=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),n=Math.max(n,h),i=Math.min(i,l),r=Math.max(r,c)}return{x:s,y:i,width:n-s,height:r-i}}static getBox(e){if(!e.length)return null;let t=1/0,s=1/0,i=0,n=0;for(const r of e){const{height:e,left:a,top:o,width:l}=r.glyphMosaicItem.metrics,h=r.x,c=r.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),n=Math.max(n,f)}return{x:t,y:s,width:i-t,height:n-s}}static addDecoration(e,t){const s=e.length;if(0===s)return;let i=e[0].x+e[0].glyphMosaicItem.metrics.left,n=e[0].y;for(let r=1;r<s;r++){const s=e[r];if(s.y!==n){const a=e[r-1].x+e[r-1].glyphMosaicItem.metrics.left+e[r-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new f.A(4,0,4,8),metrics:{width:a-i,height:8,left:0,top:0,advance:0},page:0,code:0}}),n=s.y,i=s.x+s.glyphMosaicItem.metrics.left}}const r=e[s-1].x+e[s-1].glyphMosaicItem.metrics.left+e[s-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new f.A(4,0,4,8),metrics:{width:r-i,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,s,i){const n=(e-t)*(e-t);return i?e<t?n/2:2*n:n+Math.abs(s)*s}_buildBreak(e,t,s,i,n,r){let a=null,o=this._breakScore(t,s,n,r);for(const e of i){const i=t-e.x,l=this._breakScore(i,s,n,r)+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],n=i.vertical?d:i.glyphMosaicItem?i.glyphMosaicItem.metrics.advance:0,r=(i.x+n)*this._justify;for(let i=t;i<=s;i++)e[i].x-=r}}var p=s(4272);const y=.5;class x{constructor(e,t,s=0,i=-1,n=y){this.x=e,this.y=t,this.angle=s,this.segment=i,this.minzoom=n}}class _{constructor(e,t,s,i,n,r=y,a=o.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=s,this.page=i,this.alternateVerticalGlyph=n,this.minzoom=r,this.maxzoom=a}}class m{constructor(e,t,s,i,n,r,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=s,this.br=i,this.mosaicRect=n,this.labelAngle=r,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class I{constructor(e){this.shapes=e}}class b{getIconPlacement(e,t,s){const i=new r.bR(e.x,e.y),n=s.rotationAlignment===p.I5.MAP,a=s.keepUpright;let l=s.rotate*o.os;n&&(l+=e.angle);const h=new I([]);return s.allowOverlap&&s.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,i,t,s,l),n&&a&&this._addIconPlacement(h,i,t,s,l+o.Jo),h}_addIconPlacement(e,t,s,i,n){const a=s.rasterizationScale,l=s.width/a,h=s.height/a,c=i.offset;let u=c[0],f=c[1];switch(i.anchor){case p.KI.CENTER:u-=l/2,f-=h/2;break;case p.KI.LEFT:f-=h/2;break;case p.KI.RIGHT:u-=l,f-=h/2;break;case p.KI.TOP:u-=l/2;break;case p.KI.BOTTOM:u-=l/2,f-=h;break;case p.KI.TOP_LEFT:break;case p.KI.BOTTOM_LEFT:f-=h;break;case p.KI.TOP_RIGHT:u-=l;break;case p.KI.BOTTOM_RIGHT:u-=l,f-=h}const d=s.rect,g=2/a,x=u-g,_=f-g,I=x+d.width/a,b=_+d.height/a,M=new r.bR(x,_),w=new r.bR(I,b),k=new r.bR(x,b),T=new r.bR(I,_);if(0!==n){const e=Math.cos(n),t=Math.sin(n);M.rotate(e,t),w.rotate(e,t),k.rotate(e,t),T.rotate(e,t)}const A=new m(M,T,k,w,d,n,0,256,t,y,o.MG,0);if(e.shapes.push(A),!i.allowOverlap||!i.ignorePlacement){const s=i.size,r=i.padding,a={xTile:t.x,yTile:t.y,dxPixels:u*s-r,dyPixels:f*s-r,hard:!i.optional,partIndex:0,width:l*s+2*r,height:h*s+2*r,angle:n,minLod:y,maxLod:o.MG};e.iconColliders.push(a)}}getTextPlacement(e,t,s,i){const n=new r.bR(e.x,e.y),l=i.rotate*o.os,h=i.rotationAlignment===p.I5.MAP,c=i.keepUpright,u=i.padding;let f=y;const x=h?e.angle:0,b=e.segment>=0&&h,M=i.allowOverlap&&i.ignorePlacement?null:[],w=[],k=!b;let T=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,P=T,D=A;const L=(b||h)&&c,V=i.size/d;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let v,R=0,S=0;if(!b&&B){const e=g.getTextBox(t,i.lineHeight*d);switch(i.anchor){case p.KI.LEFT:R=e.height/2,S=-e.width/2;break;case p.KI.RIGHT:R=-e.height/2,S=e.width/2;break;case p.KI.TOP:R=e.height/2,S=e.width/2;break;case p.KI.BOTTOM:R=-e.height/2,S=-e.width/2;break;case p.KI.TOP_LEFT:R=e.height;break;case p.KI.BOTTOM_LEFT:S=-e.width;break;case p.KI.TOP_RIGHT:S=e.width;break;case p.KI.BOTTOM_RIGHT:R=-e.height}}R+=i.offset[0]*d,S+=i.offset[1]*d;for(const d of t){const t=d.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const g=t.rect,p=t.metrics,I=t.page;if(M&&k){if(void 0!==v&&v!==d.y){let t,s,n,r;B?(t=-D+R,s=T+S,n=D-P,r=A-T):(t=T+R,s=P+S,n=A-T,r=D-P);const a={xTile:e.x,yTile:e.y,dxPixels:t*V-u,dyPixels:s*V-u,hard:!i.optional,partIndex:1,width:n*V+2*u,height:r*V+2*u,angle:l,minLod:y,maxLod:o.MG};M.push(a),T=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,P=T,D=A}v=d.y}const C=[];if(b){const i=.5*t.metrics.width,n=(d.x+p.left-4+i)*V*a.ih;if(f=this._placeGlyph(e,f,n,s,e.segment,1,d.vertical,I,C),c&&(f=this._placeGlyph(e,f,n,s,e.segment,-1,d.vertical,I,C)),f>=2)break}else C.push(new _(n,x,x,I,!1)),h&&c&&C.push(new _(n,x+o.Jo,x+o.Jo,I,!1));const E=d.x+p.left,O=d.y-17-p.top,F=E+p.width,N=O+p.height;let U,z,G,K,q,H,W,j;if(!b&&B)if(d.vertical){const e=(E+F)/2-p.height/2,t=(O+N)/2+p.width/2;U=new r.bR(-t-4+R,e-4+S),z=new r.bR(U.x+g.width,U.y+g.height),G=new r.bR(U.x,z.y),K=new r.bR(z.x,U.y)}else U=new r.bR(4-O+R,E-4+S),z=new r.bR(U.x-g.height,U.y+g.width),G=new r.bR(z.x,U.y),K=new r.bR(U.x,z.y);else U=new r.bR(E-4+R,O-4+S),z=new r.bR(U.x+g.width,U.y+g.height),G=new r.bR(U.x,z.y),K=new r.bR(z.x,U.y);for(const t of C){let s,n,a,o;if(t.alternateVerticalGlyph){if(!q){const e=(O+N)/2+S;q=new r.bR((E+F)/2+R-p.height/2-4,e+p.width/2+4),H=new r.bR(q.x+g.height,q.y-g.width),W=new r.bR(H.x,q.y),j=new r.bR(q.x,H.y)}s=q,n=W,a=j,o=H}else s=U,n=G,a=K,o=z;const h=O,c=N,f=t.glyphAngle+l;if(0!==f){const e=Math.cos(f),t=Math.sin(f);s=s.clone(),n=n?.clone(),a=a?.clone(),o=o?.clone(),s.rotate(e,t),o?.rotate(e,t),n?.rotate(e,t),a?.rotate(e,t)}let y=0,x=256;if(b&&B?d.vertical?t.alternateVerticalGlyph?(y=32,x=96):(y=224,x=32):(y=224,x=96):(y=192,x=64),w.push(new m(s,a,n,o,g,t.labelAngle,y,x,t.anchor,t.minzoom,t.maxzoom,t.page)),M&&(!L||this._legible(t.labelAngle)))if(k)E<T&&(T=E),h<P&&(P=h),F>A&&(A=F),c>D&&(D=c);else if(t.minzoom<2){const s={xTile:e.x,yTile:e.y,dxPixels:(E+R)*V-u,dyPixels:(h+R)*V-u,hard:!i.optional,partIndex:1,width:(F-E)*V+2*u,height:(c-h)*V+2*u,angle:f,minLod:t.minzoom,maxLod:t.maxzoom};M.push(s)}}}if(f>=2)return null;if(M&&k){let t,s,n,r;B?(t=-D+R,s=T+S,n=D-P,r=A-T):(t=T+R,s=P+S,n=A-T,r=D-P);const a={xTile:e.x,yTile:e.y,dxPixels:t*V-u,dyPixels:s*V-u,hard:!i.optional,partIndex:1,width:n*V+2*u,height:r*V+2*u,angle:l,minLod:y,maxLod:o.MG};M.push(a)}const C=new I(w);return M&&M.length>0&&(C.textColliders=M),C}_legible(e){const t=(0,o.z0)(e);return t<65||t>=193}_placeGlyph(e,t,s,i,n,a,l,h,c){let u=a;const f=u<0?(0,o.Wh)(e.angle+o.Jo,o.pJ):e.angle;let d=0;s<0&&(u*=-1,s*=-1,d=o.Jo),u>0&&++n;let g=new r.bR(e.x,e.y),p=i[n],y=o.MG;if(i.length<=n)return y;for(;;){const e=p.x-g.x,r=p.y-g.y,a=Math.sqrt(e*e+r*r),x=Math.max(s/a,t),m=e/a,I=r/a,b=(0,o.Wh)(Math.atan2(I,m)+d,o.pJ);if(c.push(new _(g,f,b,h,!1,x,y)),l&&c.push(new _(g,f,b,h,!0,x,y)),x<=t)return x;g=p.clone();do{if(n+=u,i.length<=n||n<0)return x;p=i[n]}while(g.isEqual(p));let M=p.x-g.x,w=p.y-g.y;const k=Math.sqrt(M*M+w*w);M*=a/k,w*=a/k,g.x-=M,g.y-=w,y=x}}}var M,w,k=s(51624),T=s(15585);(w=M||(M={}))[w.moveTo=1]="moveTo",w[w.lineTo=2]="lineTo",w[w.close=7]="close";class A{constructor(e,t,s=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=s;const i=t.keys,n=t.values,r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:this.id=r.getUInt64();break;case 2:{const e=r.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),r=e.getUInt32();t[i[s]]=n[r]}e.release();break}case 3:this.type=r.getUInt32();break;case 4:this._pbfGeometry=r.getMessage();break;default:r.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 n,a=M.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 M.moveTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):s&&(i&&s.push(i),i=[],i.push(new r.bR(l,h)));break;case M.lineTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):i&&i.push(new r.bR(l,h));break;case M.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?n=e.result():s&&(i&&s.push(i),n=s),t.release(),this._geometry=n,n}}var P=s(80081);class D extends P.A{constructor(){super(12)}add(e,t,s){const i=this.array;i.push(e),i.push(t),i.push(s)}}P.A;class L{constructor(e){this.extent=a.vA,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(L._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 P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a,o,l,h,c,u){const f=this.array;let d=P.A.i1616to32(e,t);f.push(d);const g=31;d=P.A.i8888to32(Math.round(g*s),Math.round(g*i),Math.round(g*n),Math.round(g*r)),f.push(d),d=P.A.i8888to32(Math.round(g*a),Math.round(g*o),Math.round(g*l),Math.round(g*h)),f.push(d),d=P.A.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class B extends P.A{constructor(e){super(e)}add(e,t,s){const i=this.array;i.push(P.A.i1616to32(e,t)),s&&i.push(...s)}}class v extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a){const o=this.array,l=this.index;let h=P.A.i1616to32(e,t);return o.push(h),h=P.A.i8888to32(Math.round(15*s),Math.round(15*i),n,r),o.push(h),a&&o.push(...a),l}}class R extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a,l,h,c,u,f){const d=this.array;let g=P.A.i1616to32(e,t);d.push(g),g=P.A.i1616to32(Math.round(8*s),Math.round(8*i)),d.push(g),g=P.A.i8888to32(n/4,r/4,l,h),d.push(g),g=P.A.i8888to32(0,(0,o.z0)(a),10*c,Math.min(10*u,255)),d.push(g),f&&d.push(...f)}}class S extends P.A{constructor(e){super(e)}add(e,t,s,i,n){const r=this.array,a=P.A.i1616to32(2*e+s,2*t+i);r.push(a),n&&r.push(...n)}}class C{constructor(e,t,s){this.layerExtent=a.vA,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,r){super(e,t,s),this.type=n.NP.CIRCLE,this._circleVertexBuffer=i,this._circleIndexBuffer=r}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,n=this.zoom;e&&e.setExtent(this.layerExtent);for(const r of this._features){const a=r.getGeometry(e);if(!a)continue;const o=i.circleMaterial.encodeAttributes(r,n,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(98291),F=s(83349);class N extends C{constructor(e,t,s,i,r,a,o){super(e,t,s),this.type=n.NP.FILL,this._patternMap=new Map,this._fillVertexBuffer=i,this._fillIndexBuffer=r,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,n=this.zoom,r=i.getPaintProperty("fill-pattern");if(r)if(r.isDataDriven)for(const e of this._features)t(r.getValue(n,e),!0);else t(r.getValue(n),!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:n,hasDataDrivenFill:r,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 r=[];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?n.encodeAttributes(l,s,t):[],p=l.getGeometry(e);r.push({ddFillAttributes:d,ddOutlineAttributes:g,page:f.page,geometry:p}),r.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:s,page:i,geometry:n}of r)this._processFeature(n,h,t.outlineUsesFillColor,e,s,u,i)}}else for(const o of c){const l=r?i.encodeAttributes(o,s,t):null,c=h&&a?n.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 n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;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,n,r,a){if(!e)return;const o=e.length,l=!n||0===n.length;if(t&&(!s||l))for(let t=0;t<o;t++)this._processOutline(e[t],n);let h;for(let t=0;t<o;t++){const s=N._area(e[t]);s>32?(void 0!==h&&this._processFill(e,h,i,r,a),h=[t]):s<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,i,r,a)}_processOutline(e,t){const s=this._outlineVertexBuffer,i=this._outlineIndexBuffer,n=i.index;let a,o,l;const h=new r.bR(0,0),c=new r.bR(0,0),u=new r.bR(0,0);let f=-1,d=-1,g=-1,p=-1,y=-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 n=0;n<_;++n){0===n?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=n!==_-1?e[n+1]:e[0],h.assign(c));const r=this._isClipEdge(a,o);-1===p&&(x=r),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 b=Math.abs(0!==I?1/I:1);b>8&&(b=8),m>=0?(g=s.add(o.x,o.y,h.x,h.y,0,1,t),-1===p&&(p=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,b*-u.x,b*-u.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&g>=0&&!r&&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&&!r&&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&&!r&&i.add(f,d,g)):(g=s.add(o.x,o.y,b*u.x,b*u.y,0,1,t),-1===p&&(p=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&g>=0&&!r&&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&&!r&&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&&!r&&i.add(f,d,g))}f>=0&&d>=0&&p>=0&&!x&&i.add(f,d,p),f>=0&&p>=0&&y>=0&&!x&&i.add(f,y,p),this._outlineIndexCount+=3*(i.index-n)}}_processFill(e,t,s,i,n){let r;t.length>1&&(r=[]);let a=0;for(const s of t)0!==a&&r.push(a),a+=e[s].length;const o=2*a,l=O.A.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,F.e)(l,r,2);if(F.e.deviation(l,r,2,h)>0){const i=t.map((t=>e[t].length)),{buffer:r,vertexCount:a}=(0,T.l)(l,i);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(r[2*e],r[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!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=a:e.set(n,[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 r=0;for(;r<e;)this._fillIndexBuffer.add(t+h[r++],t+h[r++],t+h[r++]);if(void 0!==n){const t=this._patternMap,s=t.get(n);s?s[1]+=e:t.set(n,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}O.A.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const 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 U=s(83773);class z extends C{constructor(e,t,s,i,r){super(e,t,s),this.type=n.NP.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=r,this._lineTessellator=new U.i(G(this.tessellationProperties),K(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,s){const i=this.layer,n=this.zoom,r=i.getPaintProperty("line-pattern"),a=i.getPaintProperty("line-dasharray"),o=i.getLayoutProperty("line-cap");if(!r&&!a)return;const l=o?.getValue(n)||0,h=o?.isDataDriven,c=r?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?r.getValue(n,e):this._getDashArrayKey(e,n,i,a,h,o,l));else if(r)t(r.getValue(n));else if(a){const e=a.getValue(n);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,n=this._tessellationOptions,{hasDataDrivenLine:r,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,p=!!f;u=t.getLayoutProperty("line-join");const y=u?.isDataDriven?u:null,x=y?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,b=I?null:t.getLayoutValue("line-round-limit",s);u=t.getPaintProperty("line-width");const M=u?.isDataDriven?u:null,w=M?null:t.getPaintValue("line-width",s);u=t.getPaintProperty("line-offset");const k=u?.isDataDriven?u:null,T=k?null:t.getPaintValue("line-offset",s);if(h||c){const r=[];for(const n of i){const i=h?o.getValue(s,n):this._getDashArrayKey(n,s,t,l,p,f,g),c=this._spriteInfo[i];if(!c?.rect)continue;const u=a.encodeAttributes(n,s,t,c),A=n.getGeometry(e);r.push({ddAttributes:u,page:c.page,cap:f?f.getValue(s,n):d,join:y?y.getValue(s,n):x,miterLimit:_?_.getValue(s,n):m,roundLimit:I?I.getValue(s,n):b,halfWidth:.5*(M?M.getValue(s,n):w),offset:k?k.getValue(s,n):T,geometry:A})}r.sort(((e,t)=>e.page-t.page)),n.textured=!0;for(const{ddAttributes:e,page:t,cap:s,join:i,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of r)n.capType=s,n.joinType=i,n.miterLimit=a,n.roundLimit=o,n.halfWidth=l,n.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(s),t=this._spriteInfo[e];if(!t?.rect)return}n.textured=!(!o&&!l),n.capType=d,n.joinType=x,n.miterLimit=m,n.roundLimit=b,n.halfWidth=.5*w,n.offset=T;for(const o of i){const i=r?a.encodeAttributes(o,s,t):null;f&&(n.capType=f.getValue(s,o)),y&&(n.joinType=y.getValue(s,o)),_&&(n.miterLimit=_.getValue(s,o)),I&&(n.roundLimit=I.getValue(s,o)),M&&(n.halfWidth=.5*M.getValue(s,o)),k&&(n.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 n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;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 n=0;n<i;n++)this._processGeometry(e[n],t,s)}_processGeometry(e,t,s){if(e.length<2)return;let i,n,r=e[0],a=1;for(;a<e.length;)i=e[a].x-r.x,n=e[a].y-r.y,i*i+n*n<1e-6?e.splice(a,1):(r=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,n,r,a){const o=n?r.getValue(t,e):a,l=i.getValue(t,e);return s.getDashKey(l,o)}}const G=e=>(t,s,i,n,r,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,s,o,l,i,n,r,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),K=e=>(t,s,i)=>{e._lineIndexBuffer.add(t,s,i)};var q,H=s(32488),W=s(97768),j=s(799),Y=s(3057);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,r,a,o,l,h){super(t,s,h.getSpriteItems()),this.type=n.NP.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=i,this._iconIndexBuffer=r,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}static{this._bidiEngine=new H.A}getResources(e,t,s){const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);const r=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;r&&!r.isDataDriven&&(c=r.getValue(n)),a&&!a.isDataDriven&&(u=a.getValue(n)),o&&o.isDataDriven||(f=i.getLayoutValue("text-transform",n),o=null),l&&l.isDataDriven||(d=i.getLayoutValue("text-font",n),l=null);for(const g of this._features){const y=g.getGeometry(e);if(!y||0===y.length)continue;let x,_;r&&(x=r.isDataDriven?r.getValue(n,g):this._replaceKeys(c,g.values),x&&t(x));let m=!1;if(a&&(_=a.isDataDriven?a.getValue(n,g):this._replaceKeys(u,g.values),_)){switch(_=_.replaceAll("\\n","\n"),o&&(f=o.getValue(n,g)),f){case p.Ms.LOWERCASE:_=_.toLowerCase();break;case p.Ms.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(n,g));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",n,g),b={feature:g,sprite:x,label:_,rtl:m,geometry:y,hash:(_?(0,j.Wm)(_):0)^(x?(0,j.Wm)(x):0),priority:I,textFont:d};h.push(b)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,s=this.zoom,i=t.getLayoutValue("symbol-placement",s),n=i!==p.kt.POINT,l=t.getLayoutValue("symbol-spacing",s)*a.ih,h=t.getLayoutProperty("icon-image"),c=t.getLayoutProperty("text-field"),u=h?new Y.aR(t,s,n):null,f=c?new Y.uU(t,s,n):null,y=this._workerTileHandler;let _;h&&(_=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 m=[];let I=1;f?.size&&(I=f.size/d);const b=f?f.maxAngle*o.os:0,M=f?f.size*a.ih:0;for(const e of this._symbolFeatures){let t,o;u&&_&&e.sprite&&(t=_[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&u.update(s,e.feature);let h=0;const c=e.label;if(c){(0,W.Lw)(f),f.update(s,e.feature);const t=n&&f.rotationAlignment===p.I5.MAP?f.keepUpright:f.writingMode&&f.writingMode.includes(p.v9.VERTICAL);let i=.5;switch(f.anchor){case p.KI.TOP_LEFT:case p.KI.LEFT:case p.KI.BOTTOM_LEFT:i=0;break;case p.KI.TOP_RIGHT:case p.KI.RIGHT:case p.KI.BOTTOM_RIGHT:i=1}let r=.5;switch(f.anchor){case p.KI.TOP_LEFT:case p.KI.TOP:case p.KI.TOP_RIGHT:r=0;break;case p.KI.BOTTOM_LEFT:case p.KI.BOTTOM:case p.KI.BOTTOM_RIGHT:r=1}let l=.5;switch(f.justify){case p.O6.AUTO:l=i;break;case p.O6.LEFT:l=0;break;case p.O6.RIGHT:l=1}const u=f.letterSpacing*d,x=n?0:f.maxWidth*d,_=f.lineHeight*d,m=e.textFont.map((e=>y.getGlyphItems(e)));if(o=new g(m,x,_,u,i,r,l).getShaping(c,e.rtl,t),o&&o.length>0){let e=1e30,t=-1e30;for(const s of o)e=Math.min(e,s.x),t=Math.max(t,s.x);h=(t-e+48)*I*a.ih}}for(let s of e.geometry){const c=[];if(i===p.kt.LINE){if(o?.length&&f?.size){const e=f.size*a.ih*(2+Math.min(2,4*Math.abs(f.offset[1])));s=Z._smoothVertices(s,e)}Z._pushAnchors(c,s,l,h)}else i===p.kt.LINE_CENTER?Z._pushCenterAnchor(c,s):e.feature.type===r.dC.Polygon?Z._pushCentroid(c,s):c.push(new x(s[0].x,s[0].y));for(const i of c){if(i.x<0||i.x>a.vA||i.y<0||i.y>a.vA)continue;if(n&&h>0&&f?.rotationAlignment===p.I5.MAP&&!Z._honorsTextMaxAngle(s,i,h,b,M))continue;const r={shaping:o,line:s,iconMosaicItem:t,anchor:i,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};m.push(r),this._processFeature(r,u,f)}}}m.sort(J),this._addPlacedGlyphs(),this._symbolInstances=m}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),[n,r,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(n),t[o++]=parseFloat(r),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,n){n=n||[],t[i++]=n.length;for(const e of n){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 n of e.textColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;for(const n of e.iconColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;t[i++]=e.textVertexRanges.length;for(const[s,n]of e.textVertexRanges)t[i++]=s,t[i++]=n;t[i++]=e.iconVertexRanges.length;for(const[s,n]of e.iconVertexRanges)t[i++]=s,t[i++]=n}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,((e,s)=>s in t?t[s]:""))}_processFeature(e,t,s){const{line:i,iconMosaicItem:n,shaping:r,anchor:a}=e,l=this.zoom,h=this.layer,c=!!n;let u=!0;c&&(u=t?.optional||!n);const f=r&&r.length>0,d=!f||s?.optional;let g,y;if(c&&(g=this._placementEngine.getIconPlacement(a,n,t)),(g||u)&&(f&&(y=this._placementEngine.getTextPlacement(a,r,i,s)),y||d)){if(g&&y||(d||u?d||y?u||g||(y=null):g=null:(g=null,y=null)),y){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,y.shapes,l,s.rotationAlignment,t),y.textColliders){e.textColliders=y.textColliders;for(const e of y.textColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=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(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),p=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=p-g}}}}if(g){const s=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,g.shapes,l,n.page,t.rotationAlignment===p.I5.VIEWPORT,s),g.iconColliders){e.iconColliders=g.iconColliders;for(const e of g.iconColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=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(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),p=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=p-g}}}}}}_addPlacedIcons(e,t,s,i,n,r){const a=Math.max(s-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=n?0:Math.max(s+(0,o.p6)(u.minzoom),a),f=n?25:Math.min(s+(0,o.p6)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,g=u.tr,p=u.bl,y=u.br,x=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,b=u.anchor,M=l.index,w=x.x,k=x.y,T=w+x.width,A=k+x.height,P=l.index;l.add(b.x,b.y,d.x,d.y,w,k,_,m,I,t,f,r),l.add(b.x,b.y,g.x,g.y,T,k,_,m,I,t,f,r),l.add(b.x,b.y,p.x,p.y,w,A,_,m,I,t,f,r),l.add(b.x,b.y,y.x,y.y,T,A,_,m,I,t,f,r),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(M,M+1,M+2),h.add(M+1,M+2,M+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,n]of this._glyphBufferDataStorage)for(const r of n){const n=e.index,a=r.symbolInstance,o=r.ddAttributes,l=e.index;e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tl[0],r.tl[1],r.xmin,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tr[0],r.tr[1],r.xmax,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.bl[0],r.bl[1],r.xmin,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.br[0],r.br[1],r.xmax,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.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(n,n+1,n+2),t.add(n+1,n+2,n+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,n){const r=Math.max(s-1,0),a=i===p.I5.VIEWPORT;let l,h,c,u,f,d,g,y,x,_,m;for(const i of t)l=a?0:Math.max(s+(0,o.p6)(i.minzoom),r),h=a?25:Math.min(s+(0,o.p6)(i.maxzoom),25),h<=l||(c=i.tl,u=i.tr,f=i.bl,d=i.br,g=i.labelAngle,y=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:g,minAngle:y,maxAngle:x,minLod:l,maxLod:h,placementLod:r,symbolInstance:e,ddAttributes:n}))}static _pushAnchors(e,t,s,i){s+=i;let n=0;const a=t.length-1;for(let e=0;e<a;e++)n+=r.bR.distance(t[e],t[e+1]);let l=i||s;if(l*=.5,n<=l)return;const h=l/n;let c=0,u=-(s=n/Math.max(Math.round(n/s),1))/2;const f=t.length-1;for(let i=0;i<f;i++){const n=t[i],r=t[i+1],a=r.x-n.x,l=r.y-n.y,f=Math.sqrt(a*a+l*l);let d;for(;u+s<c+f;){u+=s;const t=(u-c)/f,g=(0,o.GW)(n.x,r.x,t),p=(0,o.GW)(n.y,r.y,t);void 0===d&&(d=Math.atan2(l,a)),e.push(new x(g,p,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+=r.bR.distance(t[e],t[e+1]);const n=s/2;let a=0;const l=t.length-1;for(let s=0;s<l;s++){const i=t[s],r=t[s+1],l=r.x-i.x,h=r.y-i.y,c=Math.sqrt(l*l+h*h);if(n<a+c){const t=(n-a)/c,u=(0,o.GW)(i.x,r.x,t),f=(0,o.GW)(i.y,r.y,t),d=Math.atan2(h,l);return void e.push(new x(u,f,d,s,0))}a+=c}}static _deviation(e,t,s){const i=(t.x-e.x)*(s.x-t.x)+(t.y-e.y)*(s.y-t.y),n=(t.x-e.x)*(s.y-t.y)-(t.y-e.y)*(s.x-t.x);return Math.atan2(n,i)}static _honorsTextMaxAngle(e,t,s,i,n){let a=0;const o=s/2;let l=new r.bR(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=r.bR.distance(e[h],l),l=e[h]}a+=r.bR.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>n;)u-=c.shift().deviation;if(Math.abs(u)>i)return!1;a+=r.bR.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 n=0,a=0;i.push(0);for(let t=1;t<s;t++){const s=r.bR.distance(e[t],e[t-1]);s>0&&(n+=s,i.push(n),a++,a!==t&&(e[a]=e[t]))}if(s=a+1,s<3)return e;t=Math.min(t,.2*n);const o=e[0].x,l=e[0].y,h=e[s-1].x,c=e[s-1].y,u=r.bR.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 r.bR(o,l));const d=1e-6,g=.5*t;for(let n=1;n<s-1;n++){let a=0,o=0,l=0;for(let s=n-1;s>=0;s--){const r=g+i[s+1]-i[n];if(r<0)break;const h=i[s+1]-i[s],c=i[n]-i[s]<g?1:r/h;if(c<d)break;const u=c*c,f=c*r-.5*u*h,p=c*h/t,y=e[s+1],x=e[s].x-y.x,_=e[s].y-y.y;a+=p/f*(y.x*c*r+.5*u*(r*x-h*y.x)-u*c*h*x/3),o+=p/f*(y.y*c*r+.5*u*(r*_-h*y.y)-u*c*h*_/3),l+=p}for(let r=n+1;r<s;r++){const s=g-i[r-1]+i[n];if(s<0)break;const h=i[r]-i[r-1],c=i[r]-i[n]<g?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,p=c*h/t,y=e[r-1],x=e[r].x-y.x,_=e[r].y-y.y;a+=p/f*(y.x*c*s+.5*u*(s*x-h*y.x)-u*c*h*x/3),o+=p/f*(y.y*c*s+.5*u*(s*_-h*y.y)-u*c*h*_/3),l+=p}f.push(new r.bR(a/l,o/l))}return f.push(new r.bR(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=a.vA,i=a.vA,n=t.length-1;let r=0,o=0,l=0,h=t[0].x,c=t[0].y;h>s&&(h=s),h<0&&(h=0),c>i&&(c=i),c<0&&(c=0);for(let e=1;e<n;e++){let n=t[e].x,a=t[e].y,u=t[e+1].x,f=t[e+1].y;n>s&&(n=s),n<0&&(n=0),a>i&&(a=i),a<0&&(a=0),u>s&&(u=s),u<0&&(u=0),f>i&&(f=i),f<0&&(f=0);const d=(n-h)*(f-c)-(u-h)*(a-c);r+=d*(h+n+u),o+=d*(c+a+f),l+=d}r/=3*l,o/=3*l,isNaN(r)||isNaN(o)||e.push(new x(r,o))}}!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 ${constructor(e,t,s,i,n,a){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=t,this._sourceDataMaxLOD=i,a){this._styleLayerUIDs=new Set;for(const e of a)this._styleLayerUIDs.add(e)}this._styleRepository=n,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,o.IU)(this._level);for(const t of Object.keys(e)){const s=e[t];if(this._pbfTiles[t]=new k.A(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,n=c&e;this._tileClippers[t]=new r.O3(i,s,n,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new r.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,T.F)(),s=this._initialize(e),{returnedBuckets:i}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const n=[],r=new Set,a=(e,t)=>{r.has(e)||(n.push({name:e,repeat:t}),r.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(n,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:n,sourceNameToUniqueSourceLayerBuckets:r,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===p.Dc.BACKGROUND||!this._canParseStyleLayer(u.uid)||!t[u.source]||!n[u.source])continue;const f=t[u.source],d=n[u.source],g=u.sourceLayer,y=f[g];if(y){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=y.extent,e.tileClipper=d;let t=r[u.source];t||(t=r[u.source]={});let s=t[g];s||(s=t[g]=[]),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:n,sourceNameToUniqueSourceLayers:r}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(r))r[e].forEach((t=>{l.push(t),h.push(e)}));for(let e=0;e<l.length;e++){const r=h[e],c=l[e];if(!s[r]||!n[r])continue;const u=s[r][c],f=n[r][c];if(!f||0===f.length)continue;if((0,i.G4)(t))return;let d=0;const g=u.getData();for(;g.nextTag(2);){const e=g.getMessage(),t=new A(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=[],n=this._tile.getWorkerTileHandler();let r,a;e.length>0&&(r=n.fetchSprites(e,this._client,s),i.push(r));for(const e in t){const r=t[e];r.size>0&&(a=n.fetchGlyphs(this._tile.tileKey,e,r,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],n={};for(;i.next();)switch(i.tag()){case 3:{const e=i.getMessage(),t=new L(e);e.release(),n[t.name]=t;break}default:i.skip()}t[s]=n}return t}_createBucket(e){switch(e.type){case p.Dc.BACKGROUND:return null;case p.Dc.FILL:return this._createFillBucket(e);case p.Dc.LINE:return this._createLineBucket(e);case p.Dc.CIRCLE:return this._createCircleBucket(e);case p.Dc.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new N(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.fillMaterial.getStride()),new D,new v(e.outlineMaterial.getStride()),new D)}_createLineBucket(e){return new z(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.lineMaterial.getStride()),new D)}_createCircleBucket(e){return new E(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new S(e.circleMaterial.getStride()),new D)}_createSymbolBucket(e){const t=this._tile;return new Z(t.tileKey,e,this._level,new R(e.iconMaterial.getStride()),new D,new R(e.textMaterial.getStride()),new D,t.placementEngine,t.getWorkerTileHandler())}}class Q{constructor(e,t,s,i){this.status=q.INITIALIZED,this.placementEngine=new b,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 n;const r={bucketsWithData:[],emptyBuckets:null};try{n=await this._parse(e,t)}catch(e){if((0,i.zf)(e))throw e;return{result:r,transferList:[]}}this.status=q.READY;const a=r.bucketsWithData,o=[];for(const e of n)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)),r.emptyBuckets=h,{result:r,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 $(s,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var X=s(45013);class ee{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,n={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const s=e.sourceName2DataAndRefKey[t];n[t]=s.refKey}const r=new Q(s,n,this,this._styleRepository);try{return await r.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(r.setObsolete(),r.release(),!(0,i.zf)(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 n.$q.PAINTER_CHANGED:t.setPaintProperties(i.layer,i.paint);break;case n.$q.LAYOUT_CHANGED:t.setLayoutProperties(i.layer,i.layout);break;case n.$q.LAYER_REMOVED:t.deleteStyleLayer(i.layer);break;case n.$q.LAYER_CHANGED:t.setStyleLayer(i.layer,i.index);break;case n.$q.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:s}=e;this._styleRepository=new X.A(t),this._sourceDataMaxLOD=s,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,s){const i=[],n=this._spriteInfo;for(const t of e)void 0===n[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];n[t]=s}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,s,i,n){const r=[];let a=this._glyphInfo[t];return a?s.forEach((e=>{a[e]||r.push(e)})):(a=this._glyphInfo[t]=[],s.forEach((e=>r.push(e)))),0===r.length?Promise.resolve():i.invoke("getGlyphs",{tileID:e,font:t,codePoints:r},n).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}},34304:(e,t,s)=>{s.d(t,{DF:()=>l,FD:()=>n,Ov:()=>r,ct:()=>h});let i=1e-6;function n(){return i}const r=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function h(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:r,equals:function(e,t){return Math.abs(e-t)<=i*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:n,setEpsilon:function(e){i=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},40876:(e,t,s)=>{s.d(t,{Eq:()=>d,G1:()=>p,TS:()=>r,Tf:()=>_,V6:()=>n,Vm:()=>g,ay:()=>l,c1:()=>y,c4:()=>a,j5:()=>h,lT:()=>u,oW:()=>c});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 n(e){return!!i[e]||!!i[e.toLowerCase()]}function r(e){return i[e]??i[e.toLowerCase()]}function a(e){return[...r(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 n=(e%360+360)%360/360,r=s<=.5?s*(t+1):s+t-s*t,a=2*s-r;return[Math.round(255*o(a,r,n+1/3)),Math.round(255*o(a,r,n)),Math.round(255*o(a,r,n-1/3)),i]}function h(e){const t=e.length>5,s=t?8:4,i=(1<<s)-1,n=t?1:17,r=t?9===e.length:5===e.length;let a=Number("0x"+e.slice(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return r&&(l=a&i,a>>=s,o[3]=n*l/255),l=a&i,a>>=s,o[2]=n*l,l=a&i,a>>=s,o[1]=n*l,l=a&i,a>>=s,o[0]=n*l,o}function c(e){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),s=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),n=5===e.length?15:parseInt(e.slice(4),16);return[t+16*t,s+16*s,i+16*i,(n+16*n)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function u(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),s=t[1];if("rgb"===s&&3===e.length||"rgba"===s&&4===e.length){const t=e[0];if("%"===t.charAt(t.length-1)){const t=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(t[3]=parseFloat(e[3])),f(t)}return f(e.map((e=>parseFloat(e))))}if("hsl"===s&&3===e.length||"hsla"===s&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]))}return null}function f(e){return e[0]=y(e[0]),e[1]=y(e[1]),e[2]=y(e[2]),e[3]=4===e.length?p(e[3]):1,e}function d(e){let t=n(e)?r(e):null;return t??=u(e),t??=c(e),t}function g(e){const t=d(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function p(e){return x(e,0,1)}function y(e){return Math.round(x(e,0,255))}function x(e,t,s){return e=Number(e),isNaN(e)?s:e<t?t:e>s?s:e}const _=2.2},51624:(e,t,s)=>{s.d(t,{A:()=>u});var i,n,r=s(44208),a=s(69397),o=s(93687);(n=i||(i={}))[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown";const l=4294967296,h=new TextDecoder("utf-8"),c=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class u{constructor(e,t,s=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(e,t,s,n)}_init(e,t,s,i){this._data=e,this._dataView=t,this._pos=s,this._end=i}get usedMemory(){return 64+(0,a.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*l;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*l;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 n=this.getMessage(),r=e(n,t,s,i);return n.release(),r}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.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,!(128&i))break;if(i=e[t++],s|=(127&i)<<7,!(128&i))break;if(i=e[t++],s|=(127&i)<<14,!(128&i))break;if(i=e[t++],s|=(127&i)<<21,!(128&i))break;if(i=e[t++],s+=268435456*(127&i),!(128&i))break;if(i=e[t++],s+=34359738368*(127&i),!(128&i))break;if(i=e[t++],s+=4398046511104*(127&i),!(128&i))break;if(i=e[t++],s+=562949953421312*(127&i),!(128&i))break;if(i=e[t++],s+=72057594037927940*(127&i),!(128&i))break;if(i=e[t++],s+=0x8000000000000000*(127&i),!(128&i))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(i=e[t],128&i);)++t,s+=(127&i)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=i*n}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,i=0;const n=1&e[this._pos];if(i=e[this._pos++],s|=127&i,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<7,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<14,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<21,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=268435456*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=34359738368*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=4398046511104*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(t=BigInt(s),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),!(128&i))return Number(n?-(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>c){const i=e.subarray(t,s);return h.decode(i)}let i="",n="";for(let r=t;r<s;++r){const t=e[r];128&t?n+="%"+t.toString(16):(i+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(i+=decodeURIComponent(n)),i}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}static{this.pool=new o.A(u,void 0,(e=>{e._data=null,e._dataView=null}))}}},87317:(e,t,s)=>{s.d(t,{a:()=>m,b:()=>g,c:()=>n,d:()=>c,e:()=>I,g:()=>a,h:()=>y,j:()=>d,l:()=>x,n:()=>p,s:()=>r,t:()=>_});var i=s(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function r(e,t,s,i,n){return e[0]=t,e[1]=s,e[2]=i,e[3]=n,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],n=t[2]-e[2],r=t[3]-e[3];return Math.sqrt(s*s+i*i+n*n+r*r)}function f(e,t){const s=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],r=t[3]-e[3];return s*s+i*i+n*n+r*r}function d(e){const t=e[0],s=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+s*s+i*i+n*n)}function g(e){const t=e[0],s=e[1],i=e[2],n=e[3];return t*t+s*s+i*i+n*n}function p(e,t){const s=t[0],i=t[1],n=t[2],r=t[3];let a=s*s+i*i+n*n+r*r;return a>0&&(a=1/Math.sqrt(a),e[0]=s*a,e[1]=i*a,e[2]=n*a,e[3]=r*a),e}function y(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 n=t[0],r=t[1],a=t[2],o=t[3];return e[0]=n+i*(s[0]-n),e[1]=r+i*(s[1]-r),e[2]=a+i*(s[2]-a),e[3]=o+i*(s[3]-o),e}function _(e,t,s){const i=t[0],n=t[1],r=t[2],a=t[3];return e[0]=s[0]*i+s[4]*n+s[8]*r+s[12]*a,e[1]=s[1]*i+s[5]*n+s[9]*r+s[13]*a,e[2]=s[2]*i+s[6]*n+s[10]*r+s[14]*a,e[3]=s[3]*i+s[7]*n+s[11]*r+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],n=e[1],r=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,i.FD)();return Math.abs(s-o)<=u*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(n-l)<=u*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(r-h)<=u*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const b=o,M=l,w=h,k=u,T=f,A=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:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:k,distance:u,div:w,divide:h,dot:y,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:A,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:M,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:p,random:function(e,t=1){const s=i.Ov;let n,r,a,o,l,h;do{n=2*s()-1,r=2*s()-1,l=n*n+r*r}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*n,e[1]=t*r,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:r,sqrDist:T,sqrLen:P,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:b,subtract:o,transformMat4:_,transformQuat:function(e,t,s){const i=t[0],n=t[1],r=t[2],a=s[0],o=s[1],l=s[2],h=s[3],c=h*i+o*r-l*n,u=h*n+l*i-a*r,f=h*r+a*n-o*i,d=-a*i-o*n-l*r;return e[0]=c*h+d*-a+u*-l-f*-o,e[1]=u*h+d*-o+f*-a-c*-l,e[2]=f*h+d*-l+c*-o-u*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},91829:(e,t,s)=>{function i(){return[0,0,0,0]}function n(e){return[e[0],e[1],e[2],e[3]]}function r(e,t,s,i){return[e,t,s,i]}function a(e,t,s,i){return[e,t,s,i]}function o(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}function l(){return r(1,1,1,1)}function h(){return r(1,0,0,0)}function c(){return r(0,1,0,0)}function u(){return r(0,0,1,0)}function f(){return r(0,0,0,1)}s.d(t,{CN:()=>a,Un:()=>g,ci:()=>o,fA:()=>r,o8:()=>n,uY:()=>d,vt:()=>i});const d=[0,0,0,0],g=l(),p=h(),y=c(),x=u(),_=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:g,UNIT_W:_,UNIT_X:p,UNIT_Y:y,UNIT_Z:x,ZEROS:d,clone:n,create:i,freeze:a,fromArray:o,fromValues:r,ones:l,unitW:f,unitX:h,unitY:c,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3379],{11764:(e,t,s)=>{s.r(t),s.d(t,{default:()=>ee});var i=s(74887),n=s(89640),r=s(6774),a=s(83027),o=s(13195);function l(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 h(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 c(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 u(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var f=s(18989);const d=24;class g{constructor(e,t,s,i,n,r,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=s,this._letterSpacing=i,this._hAnchor=n,this._vAnchor=r,this._justify=a}getShaping(e,t,s){const i=this._letterSpacing,n=this._lineHeight,r=this._justify,a=this._maxWidth,o=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const n=s&&l(e);let r;for(const t of this._glyphItems)if(r=t[e],r)break;o.push({codePoint:e,x:f,y:d,vertical:n,glyphMosaicItem:r}),r&&(f+=r.metrics.advance+i)}let g=f;a>0&&(g=f/Math.max(1,Math.ceil(f/a)));const p=e.includes(""),y=[],x=o.length;for(let e=0;e<x-1;e++){const t=o[e].codePoint,s=h(t);if(c(t)||s){let i=0;if(10===t)i-=1e4;else if(s&&p)i+=150;else{40!==t&&65288!==t||(i+=50);const s=o[e+1].codePoint;41!==s&&65289!==s||(i+=50)}y.push(this._buildBreak(e+1,o[e].x,g,y,i,!1))}}const _=this._optimalBreaks(this._buildBreak(x,f,g,y,0,!0));let m=0;const I=t?-n:n;let b=0;for(let e=0;e<_.length;e++){const t=_[e];let s=b;for(;s<t&&u(o[s].codePoint);)o[s].glyphMosaicItem=null,++s;let i=t-1;for(;i>s&&u(o[i].codePoint);)o[i].glyphMosaicItem=null,--i;if(s<=i){const e=o[s].x;for(let t=s;t<=i;t++)o[t].x-=e,o[t].y=d;let t=o[i].x;o[i].glyphMosaicItem&&(t+=o[i].glyphMosaicItem.metrics.advance),m=Math.max(t,m),r&&this._applyJustification(o,s,i)}b=t,d+=I}if(o.length>0){const e=_.length-1,s=(r-this._hAnchor)*m;let i=(-this._vAnchor*(e+1)+.5)*n;t&&e&&(i+=e*n);for(const e of o)e.x+=s,e.y+=i}return o.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let s=1/0,i=1/0,n=0,r=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),n=Math.max(n,h),i=Math.min(i,l),r=Math.max(r,c)}return{x:s,y:i,width:n-s,height:r-i}}static getBox(e){if(!e.length)return null;let t=1/0,s=1/0,i=0,n=0;for(const r of e){const{height:e,left:a,top:o,width:l}=r.glyphMosaicItem.metrics,h=r.x,c=r.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),n=Math.max(n,f)}return{x:t,y:s,width:i-t,height:n-s}}static addDecoration(e,t){const s=e.length;if(0===s)return;let i=e[0].x+e[0].glyphMosaicItem.metrics.left,n=e[0].y;for(let r=1;r<s;r++){const s=e[r];if(s.y!==n){const a=e[r-1].x+e[r-1].glyphMosaicItem.metrics.left+e[r-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new f.A(4,0,4,8),metrics:{width:a-i,height:8,left:0,top:0,advance:0},page:0,code:0}}),n=s.y,i=s.x+s.glyphMosaicItem.metrics.left}}const r=e[s-1].x+e[s-1].glyphMosaicItem.metrics.left+e[s-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:i,y:n+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new f.A(4,0,4,8),metrics:{width:r-i,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,s,i){const n=(e-t)*(e-t);return i?e<t?n/2:2*n:n+Math.abs(s)*s}_buildBreak(e,t,s,i,n,r){let a=null,o=this._breakScore(t,s,n,r);for(const e of i){const i=t-e.x,l=this._breakScore(i,s,n,r)+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],n=i.vertical?d:i.glyphMosaicItem?i.glyphMosaicItem.metrics.advance:0,r=(i.x+n)*this._justify;for(let i=t;i<=s;i++)e[i].x-=r}}var p=s(4272);const y=.5;class x{constructor(e,t,s=0,i=-1,n=y){this.x=e,this.y=t,this.angle=s,this.segment=i,this.minzoom=n}}class _{constructor(e,t,s,i,n,r=y,a=o.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=s,this.page=i,this.alternateVerticalGlyph=n,this.minzoom=r,this.maxzoom=a}}class m{constructor(e,t,s,i,n,r,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=s,this.br=i,this.mosaicRect=n,this.labelAngle=r,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class I{constructor(e){this.shapes=e}}class b{getIconPlacement(e,t,s){const i=new r.bR(e.x,e.y),n=s.rotationAlignment===p.I5.MAP,a=s.keepUpright;let l=s.rotate*o.os;n&&(l+=e.angle);const h=new I([]);return s.allowOverlap&&s.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,i,t,s,l),n&&a&&this._addIconPlacement(h,i,t,s,l+o.Jo),h}_addIconPlacement(e,t,s,i,n){const a=s.rasterizationScale,l=s.width/a,h=s.height/a,c=i.offset;let u=c[0],f=c[1];switch(i.anchor){case p.KI.CENTER:u-=l/2,f-=h/2;break;case p.KI.LEFT:f-=h/2;break;case p.KI.RIGHT:u-=l,f-=h/2;break;case p.KI.TOP:u-=l/2;break;case p.KI.BOTTOM:u-=l/2,f-=h;break;case p.KI.TOP_LEFT:break;case p.KI.BOTTOM_LEFT:f-=h;break;case p.KI.TOP_RIGHT:u-=l;break;case p.KI.BOTTOM_RIGHT:u-=l,f-=h}const d=s.rect,g=2/a,x=u-g,_=f-g,I=x+d.width/a,b=_+d.height/a,M=new r.bR(x,_),w=new r.bR(I,b),k=new r.bR(x,b),T=new r.bR(I,_);if(0!==n){const e=Math.cos(n),t=Math.sin(n);M.rotate(e,t),w.rotate(e,t),k.rotate(e,t),T.rotate(e,t)}const A=new m(M,T,k,w,d,n,0,256,t,y,o.MG,0);if(e.shapes.push(A),!i.allowOverlap||!i.ignorePlacement){const s=i.size,r=i.padding,a={xTile:t.x,yTile:t.y,dxPixels:u*s-r,dyPixels:f*s-r,hard:!i.optional,partIndex:0,width:l*s+2*r,height:h*s+2*r,angle:n,minLod:y,maxLod:o.MG};e.iconColliders.push(a)}}getTextPlacement(e,t,s,i){const n=new r.bR(e.x,e.y),l=i.rotate*o.os,h=i.rotationAlignment===p.I5.MAP,c=i.keepUpright,u=i.padding;let f=y;const x=h?e.angle:0,b=e.segment>=0&&h,M=i.allowOverlap&&i.ignorePlacement?null:[],w=[],k=!b;let T=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,P=T,D=A;const L=(b||h)&&c,V=i.size/d;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let v,R=0,S=0;if(!b&&B){const e=g.getTextBox(t,i.lineHeight*d);switch(i.anchor){case p.KI.LEFT:R=e.height/2,S=-e.width/2;break;case p.KI.RIGHT:R=-e.height/2,S=e.width/2;break;case p.KI.TOP:R=e.height/2,S=e.width/2;break;case p.KI.BOTTOM:R=-e.height/2,S=-e.width/2;break;case p.KI.TOP_LEFT:R=e.height;break;case p.KI.BOTTOM_LEFT:S=-e.width;break;case p.KI.TOP_RIGHT:S=e.width;break;case p.KI.BOTTOM_RIGHT:R=-e.height}}R+=i.offset[0]*d,S+=i.offset[1]*d;for(const d of t){const t=d.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const g=t.rect,p=t.metrics,I=t.page;if(M&&k){if(void 0!==v&&v!==d.y){let t,s,n,r;B?(t=-D+R,s=T+S,n=D-P,r=A-T):(t=T+R,s=P+S,n=A-T,r=D-P);const a={xTile:e.x,yTile:e.y,dxPixels:t*V-u,dyPixels:s*V-u,hard:!i.optional,partIndex:1,width:n*V+2*u,height:r*V+2*u,angle:l,minLod:y,maxLod:o.MG};M.push(a),T=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,P=T,D=A}v=d.y}const C=[];if(b){const i=.5*t.metrics.width,n=(d.x+p.left-4+i)*V*a.ih;if(f=this._placeGlyph(e,f,n,s,e.segment,1,d.vertical,I,C),c&&(f=this._placeGlyph(e,f,n,s,e.segment,-1,d.vertical,I,C)),f>=2)break}else C.push(new _(n,x,x,I,!1)),h&&c&&C.push(new _(n,x+o.Jo,x+o.Jo,I,!1));const E=d.x+p.left,O=d.y-17-p.top,F=E+p.width,N=O+p.height;let U,z,G,K,q,H,W,j;if(!b&&B)if(d.vertical){const e=(E+F)/2-p.height/2,t=(O+N)/2+p.width/2;U=new r.bR(-t-4+R,e-4+S),z=new r.bR(U.x+g.width,U.y+g.height),G=new r.bR(U.x,z.y),K=new r.bR(z.x,U.y)}else U=new r.bR(4-O+R,E-4+S),z=new r.bR(U.x-g.height,U.y+g.width),G=new r.bR(z.x,U.y),K=new r.bR(U.x,z.y);else U=new r.bR(E-4+R,O-4+S),z=new r.bR(U.x+g.width,U.y+g.height),G=new r.bR(U.x,z.y),K=new r.bR(z.x,U.y);for(const t of C){let s,n,a,o;if(t.alternateVerticalGlyph){if(!q){const e=(O+N)/2+S;q=new r.bR((E+F)/2+R-p.height/2-4,e+p.width/2+4),H=new r.bR(q.x+g.height,q.y-g.width),W=new r.bR(H.x,q.y),j=new r.bR(q.x,H.y)}s=q,n=W,a=j,o=H}else s=U,n=G,a=K,o=z;const h=O,c=N,f=t.glyphAngle+l;if(0!==f){const e=Math.cos(f),t=Math.sin(f);s=s.clone(),n=n?.clone(),a=a?.clone(),o=o?.clone(),s.rotate(e,t),o?.rotate(e,t),n?.rotate(e,t),a?.rotate(e,t)}let y=0,x=256;if(b&&B?d.vertical?t.alternateVerticalGlyph?(y=32,x=96):(y=224,x=32):(y=224,x=96):(y=192,x=64),w.push(new m(s,a,n,o,g,t.labelAngle,y,x,t.anchor,t.minzoom,t.maxzoom,t.page)),M&&(!L||this._legible(t.labelAngle)))if(k)E<T&&(T=E),h<P&&(P=h),F>A&&(A=F),c>D&&(D=c);else if(t.minzoom<2){const s={xTile:e.x,yTile:e.y,dxPixels:(E+R)*V-u,dyPixels:(h+R)*V-u,hard:!i.optional,partIndex:1,width:(F-E)*V+2*u,height:(c-h)*V+2*u,angle:f,minLod:t.minzoom,maxLod:t.maxzoom};M.push(s)}}}if(f>=2)return null;if(M&&k){let t,s,n,r;B?(t=-D+R,s=T+S,n=D-P,r=A-T):(t=T+R,s=P+S,n=A-T,r=D-P);const a={xTile:e.x,yTile:e.y,dxPixels:t*V-u,dyPixels:s*V-u,hard:!i.optional,partIndex:1,width:n*V+2*u,height:r*V+2*u,angle:l,minLod:y,maxLod:o.MG};M.push(a)}const C=new I(w);return M&&M.length>0&&(C.textColliders=M),C}_legible(e){const t=(0,o.z0)(e);return t<65||t>=193}_placeGlyph(e,t,s,i,n,a,l,h,c){let u=a;const f=u<0?(0,o.Wh)(e.angle+o.Jo,o.pJ):e.angle;let d=0;s<0&&(u*=-1,s*=-1,d=o.Jo),u>0&&++n;let g=new r.bR(e.x,e.y),p=i[n],y=o.MG;if(i.length<=n)return y;for(;;){const e=p.x-g.x,r=p.y-g.y,a=Math.sqrt(e*e+r*r),x=Math.max(s/a,t),m=e/a,I=r/a,b=(0,o.Wh)(Math.atan2(I,m)+d,o.pJ);if(c.push(new _(g,f,b,h,!1,x,y)),l&&c.push(new _(g,f,b,h,!0,x,y)),x<=t)return x;g=p.clone();do{if(n+=u,i.length<=n||n<0)return x;p=i[n]}while(g.isEqual(p));let M=p.x-g.x,w=p.y-g.y;const k=Math.sqrt(M*M+w*w);M*=a/k,w*=a/k,g.x-=M,g.y-=w,y=x}}}var M,w,k=s(51624),T=s(15585);(w=M||(M={}))[w.moveTo=1]="moveTo",w[w.lineTo=2]="lineTo",w[w.close=7]="close";class A{constructor(e,t,s=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=s;const i=t.keys,n=t.values,r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:this.id=r.getUInt64();break;case 2:{const e=r.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),r=e.getUInt32();t[i[s]]=n[r]}e.release();break}case 3:this.type=r.getUInt32();break;case 4:this._pbfGeometry=r.getMessage();break;default:r.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 n,a=M.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 M.moveTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):s&&(i&&s.push(i),i=[],i.push(new r.bR(l,h)));break;case M.lineTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):i&&i.push(new r.bR(l,h));break;case M.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?n=e.result():s&&(i&&s.push(i),n=s),t.release(),this._geometry=n,n}}var P=s(80081);class D extends P.A{constructor(){super(12)}add(e,t,s){const i=this.array;i.push(e),i.push(t),i.push(s)}}P.A;class L{constructor(e){this.extent=a.vA,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(L._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 P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a,o,l,h,c,u){const f=this.array;let d=P.A.i1616to32(e,t);f.push(d);const g=31;d=P.A.i8888to32(Math.round(g*s),Math.round(g*i),Math.round(g*n),Math.round(g*r)),f.push(d),d=P.A.i8888to32(Math.round(g*a),Math.round(g*o),Math.round(g*l),Math.round(g*h)),f.push(d),d=P.A.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class B extends P.A{constructor(e){super(e)}add(e,t,s){const i=this.array;i.push(P.A.i1616to32(e,t)),s&&i.push(...s)}}class v extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a){const o=this.array,l=this.index;let h=P.A.i1616to32(e,t);return o.push(h),h=P.A.i8888to32(Math.round(15*s),Math.round(15*i),n,r),o.push(h),a&&o.push(...a),l}}class R extends P.A{constructor(e){super(e)}add(e,t,s,i,n,r,a,l,h,c,u,f){const d=this.array;let g=P.A.i1616to32(e,t);d.push(g),g=P.A.i1616to32(Math.round(8*s),Math.round(8*i)),d.push(g),g=P.A.i8888to32(n/4,r/4,l,h),d.push(g),g=P.A.i8888to32(0,(0,o.z0)(a),10*c,Math.min(10*u,255)),d.push(g),f&&d.push(...f)}}class S extends P.A{constructor(e){super(e)}add(e,t,s,i,n){const r=this.array,a=P.A.i1616to32(2*e+s,2*t+i);r.push(a),n&&r.push(...n)}}class C{constructor(e,t,s){this.layerExtent=a.vA,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,r){super(e,t,s),this.type=n.NP.CIRCLE,this._circleVertexBuffer=i,this._circleIndexBuffer=r}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,n=this.zoom;e&&e.setExtent(this.layerExtent);for(const r of this._features){const a=r.getGeometry(e);if(!a)continue;const o=i.circleMaterial.encodeAttributes(r,n,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(98291),F=s(83349);class N extends C{constructor(e,t,s,i,r,a,o){super(e,t,s),this.type=n.NP.FILL,this._patternMap=new Map,this._fillVertexBuffer=i,this._fillIndexBuffer=r,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,n=this.zoom,r=i.getPaintProperty("fill-pattern");if(r)if(r.isDataDriven)for(const e of this._features)t(r.getValue(n,e),!0);else t(r.getValue(n),!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:n,hasDataDrivenFill:r,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 r=[];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?n.encodeAttributes(l,s,t):[],p=l.getGeometry(e);r.push({ddFillAttributes:d,ddOutlineAttributes:g,page:f.page,geometry:p}),r.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:s,page:i,geometry:n}of r)this._processFeature(n,h,t.outlineUsesFillColor,e,s,u,i)}}else for(const o of c){const l=r?i.encodeAttributes(o,s,t):null,c=h&&a?n.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 n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;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,n,r,a){if(!e)return;const o=e.length,l=!n||0===n.length;if(t&&(!s||l))for(let t=0;t<o;t++)this._processOutline(e[t],n);let h;for(let t=0;t<o;t++){const s=N._area(e[t]);s>32?(void 0!==h&&this._processFill(e,h,i,r,a),h=[t]):s<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,i,r,a)}_processOutline(e,t){const s=this._outlineVertexBuffer,i=this._outlineIndexBuffer,n=i.index;let a,o,l;const h=new r.bR(0,0),c=new r.bR(0,0),u=new r.bR(0,0);let f=-1,d=-1,g=-1,p=-1,y=-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 n=0;n<_;++n){0===n?(a=e[_-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=n!==_-1?e[n+1]:e[0],h.assign(c));const r=this._isClipEdge(a,o);-1===p&&(x=r),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 b=Math.abs(0!==I?1/I:1);b>8&&(b=8),m>=0?(g=s.add(o.x,o.y,h.x,h.y,0,1,t),-1===p&&(p=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,b*-u.x,b*-u.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&g>=0&&!r&&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&&!r&&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&&!r&&i.add(f,d,g)):(g=s.add(o.x,o.y,b*u.x,b*u.y,0,1,t),-1===p&&(p=g),f>=0&&d>=0&&g>=0&&!r&&i.add(f,d,g),d=s.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===y&&(y=d),f>=0&&d>=0&&g>=0&&!r&&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&&!r&&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&&!r&&i.add(f,d,g))}f>=0&&d>=0&&p>=0&&!x&&i.add(f,d,p),f>=0&&p>=0&&y>=0&&!x&&i.add(f,y,p),this._outlineIndexCount+=3*(i.index-n)}}_processFill(e,t,s,i,n){let r;t.length>1&&(r=[]);let a=0;for(const s of t)0!==a&&r.push(a),a+=e[s].length;const o=2*a,l=O.A.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,F.e)(l,r,2);if(F.e.deviation(l,r,2,h)>0){const i=t.map((t=>e[t].length)),{buffer:r,vertexCount:a}=(0,T.l)(l,i);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(r[2*e],r[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!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=a:e.set(n,[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 r=0;for(;r<e;)this._fillIndexBuffer.add(t+h[r++],t+h[r++],t+h[r++]);if(void 0!==n){const t=this._patternMap,s=t.get(n);s?s[1]+=e:t.set(n,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}O.A.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const 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 U=s(83773);class z extends C{constructor(e,t,s,i,r){super(e,t,s),this.type=n.NP.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=r,this._lineTessellator=new U.i(G(this.tessellationProperties),K(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,s){const i=this.layer,n=this.zoom,r=i.getPaintProperty("line-pattern"),a=i.getPaintProperty("line-dasharray"),o=i.getLayoutProperty("line-cap");if(!r&&!a)return;const l=o?.getValue(n)||0,h=o?.isDataDriven,c=r?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?r.getValue(n,e):this._getDashArrayKey(e,n,i,a,h,o,l));else if(r)t(r.getValue(n));else if(a){const e=a.getValue(n);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,n=this._tessellationOptions,{hasDataDrivenLine:r,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,p=!!f;u=t.getLayoutProperty("line-join");const y=u?.isDataDriven?u:null,x=y?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,b=I?null:t.getLayoutValue("line-round-limit",s);u=t.getPaintProperty("line-width");const M=u?.isDataDriven?u:null,w=M?null:t.getPaintValue("line-width",s);u=t.getPaintProperty("line-offset");const k=u?.isDataDriven?u:null,T=k?null:t.getPaintValue("line-offset",s);if(h||c){const r=[];for(const n of i){const i=h?o.getValue(s,n):this._getDashArrayKey(n,s,t,l,p,f,g),c=this._spriteInfo[i];if(!c?.rect)continue;const u=a.encodeAttributes(n,s,t,c),A=n.getGeometry(e);r.push({ddAttributes:u,page:c.page,cap:f?f.getValue(s,n):d,join:y?y.getValue(s,n):x,miterLimit:_?_.getValue(s,n):m,roundLimit:I?I.getValue(s,n):b,halfWidth:.5*(M?M.getValue(s,n):w),offset:k?k.getValue(s,n):T,geometry:A})}r.sort(((e,t)=>e.page-t.page)),n.textured=!0;for(const{ddAttributes:e,page:t,cap:s,join:i,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of r)n.capType=s,n.joinType=i,n.miterLimit=a,n.roundLimit=o,n.halfWidth=l,n.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(s),t=this._spriteInfo[e];if(!t?.rect)return}n.textured=!(!o&&!l),n.capType=d,n.joinType=x,n.miterLimit=m,n.roundLimit=b,n.halfWidth=.5*w,n.offset=T;for(const o of i){const i=r?a.encodeAttributes(o,s,t):null;f&&(n.capType=f.getValue(s,o)),y&&(n.joinType=y.getValue(s,o)),_&&(n.miterLimit=_.getValue(s,o)),I&&(n.roundLimit=I.getValue(s,o)),M&&(n.halfWidth=.5*M.getValue(s,o)),k&&(n.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 n=this._patternMap,r=n.size;if(t[i++]=r,r>0)for(const[e,[s,r]]of n)t[i++]=e,t[i++]=s,t[i++]=r;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 n=0;n<i;n++)this._processGeometry(e[n],t,s)}_processGeometry(e,t,s){if(e.length<2)return;let i,n,r=e[0],a=1;for(;a<e.length;)i=e[a].x-r.x,n=e[a].y-r.y,i*i+n*n<1e-6?e.splice(a,1):(r=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,n,r,a){const o=n?r.getValue(t,e):a,l=i.getValue(t,e);return s.getDashKey(l,o)}}const G=e=>(t,s,i,n,r,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,s,o,l,i,n,r,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),K=e=>(t,s,i)=>{e._lineIndexBuffer.add(t,s,i)};var q,H=s(32488),W=s(97768),j=s(799),Y=s(3057);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,r,a,o,l,h){super(t,s,h.getSpriteItems()),this.type=n.NP.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=i,this._iconIndexBuffer=r,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}static{this._bidiEngine=new H.A}getResources(e,t,s){const i=this.layer,n=this.zoom;e&&e.setExtent(this.layerExtent);const r=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;r&&!r.isDataDriven&&(c=r.getValue(n)),a&&!a.isDataDriven&&(u=a.getValue(n)),o&&o.isDataDriven||(f=i.getLayoutValue("text-transform",n),o=null),l&&l.isDataDriven||(d=i.getLayoutValue("text-font",n),l=null);for(const g of this._features){const y=g.getGeometry(e);if(!y||0===y.length)continue;let x,_;r&&(x=r.isDataDriven?r.getValue(n,g):this._replaceKeys(c,g.values),x&&t(x));let m=!1;if(a&&(_=a.isDataDriven?a.getValue(n,g):this._replaceKeys(u,g.values),_)){switch(_=_.replaceAll("\\n","\n"),o&&(f=o.getValue(n,g)),f){case p.Ms.LOWERCASE:_=_.toLowerCase();break;case p.Ms.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(n,g));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",n,g),b={feature:g,sprite:x,label:_,rtl:m,geometry:y,hash:(_?(0,j.Wm)(_):0)^(x?(0,j.Wm)(x):0),priority:I,textFont:d};h.push(b)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,s=this.zoom,i=t.getLayoutValue("symbol-placement",s),n=i!==p.kt.POINT,l=t.getLayoutValue("symbol-spacing",s)*a.ih,h=t.getLayoutProperty("icon-image"),c=t.getLayoutProperty("text-field"),u=h?new Y.aR(t,s,n):null,f=c?new Y.uU(t,s,n):null,y=this._workerTileHandler;let _;h&&(_=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 m=[];let I=1;f?.size&&(I=f.size/d);const b=f?f.maxAngle*o.os:0,M=f?f.size*a.ih:0;for(const e of this._symbolFeatures){let t,o;u&&_&&e.sprite&&(t=_[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&u.update(s,e.feature);let h=0;const c=e.label;if(c){(0,W.Lw)(f),f.update(s,e.feature);const t=n&&f.rotationAlignment===p.I5.MAP?f.keepUpright:f.writingMode&&f.writingMode.includes(p.v9.VERTICAL);let i=.5;switch(f.anchor){case p.KI.TOP_LEFT:case p.KI.LEFT:case p.KI.BOTTOM_LEFT:i=0;break;case p.KI.TOP_RIGHT:case p.KI.RIGHT:case p.KI.BOTTOM_RIGHT:i=1}let r=.5;switch(f.anchor){case p.KI.TOP_LEFT:case p.KI.TOP:case p.KI.TOP_RIGHT:r=0;break;case p.KI.BOTTOM_LEFT:case p.KI.BOTTOM:case p.KI.BOTTOM_RIGHT:r=1}let l=.5;switch(f.justify){case p.O6.AUTO:l=i;break;case p.O6.LEFT:l=0;break;case p.O6.RIGHT:l=1}const u=f.letterSpacing*d,x=n?0:f.maxWidth*d,_=f.lineHeight*d,m=e.textFont.map((e=>y.getGlyphItems(e)));if(o=new g(m,x,_,u,i,r,l).getShaping(c,e.rtl,t),o&&o.length>0){let e=1e30,t=-1e30;for(const s of o)e=Math.min(e,s.x),t=Math.max(t,s.x);h=(t-e+48)*I*a.ih}}for(let s of e.geometry){const c=[];if(i===p.kt.LINE){if(o?.length&&f?.size){const e=f.size*a.ih*(2+Math.min(2,4*Math.abs(f.offset[1])));s=Z._smoothVertices(s,e)}Z._pushAnchors(c,s,l,h)}else i===p.kt.LINE_CENTER?Z._pushCenterAnchor(c,s):e.feature.type===r.dC.Polygon?Z._pushCentroid(c,s):c.push(new x(s[0].x,s[0].y));for(const i of c){if(i.x<0||i.x>a.vA||i.y<0||i.y>a.vA)continue;if(n&&h>0&&f?.rotationAlignment===p.I5.MAP&&!Z._honorsTextMaxAngle(s,i,h,b,M))continue;const r={shaping:o,line:s,iconMosaicItem:t,anchor:i,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};m.push(r),this._processFeature(r,u,f)}}}m.sort(J),this._addPlacedGlyphs(),this._symbolInstances=m}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),[n,r,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(n),t[o++]=parseFloat(r),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,n){n=n||[],t[i++]=n.length;for(const e of n){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 n of e.textColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;for(const n of e.iconColliders)t[i++]=n.xTile,t[i++]=n.yTile,t[i++]=n.dxPixels,t[i++]=n.dyPixels,t[i++]=n.hard?1:0,t[i++]=n.partIndex,s[i++]=n.minLod,s[i++]=n.maxLod,t[i++]=n.width,t[i++]=n.height;t[i++]=e.textVertexRanges.length;for(const[s,n]of e.textVertexRanges)t[i++]=s,t[i++]=n;t[i++]=e.iconVertexRanges.length;for(const[s,n]of e.iconVertexRanges)t[i++]=s,t[i++]=n}return i}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,((e,s)=>s in t?t[s]:""))}_processFeature(e,t,s){const{line:i,iconMosaicItem:n,shaping:r,anchor:a}=e,l=this.zoom,h=this.layer,c=!!n;let u=!0;c&&(u=t?.optional||!n);const f=r&&r.length>0,d=!f||s?.optional;let g,y;if(c&&(g=this._placementEngine.getIconPlacement(a,n,t)),(g||u)&&(f&&(y=this._placementEngine.getTextPlacement(a,r,i,s)),y||d)){if(g&&y||(d||u?d||y?u||g||(y=null):g=null:(g=null,y=null)),y){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,y.shapes,l,s.rotationAlignment,t),y.textColliders){e.textColliders=y.textColliders;for(const e of y.textColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=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(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),p=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=p-g}}}}if(g){const s=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,g.shapes,l,n.page,t.rotationAlignment===p.I5.VIEWPORT,s),g.iconColliders){e.iconColliders=g.iconColliders;for(const e of g.iconColliders){e.minLod=Math.max(l+(0,o.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,o.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),i=Math.sin(t),n=e.dxPixels*s-e.dyPixels*i,r=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(n,a,l,c),d=Math.max(n,a,l,c),g=Math.min(r,o,h,u),p=Math.max(r,o,h,u);e.dxPixels=f,e.dyPixels=g,e.width=d-f,e.height=p-g}}}}}}_addPlacedIcons(e,t,s,i,n,r){const a=Math.max(s-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=n?0:Math.max(s+(0,o.p6)(u.minzoom),a),f=n?25:Math.min(s+(0,o.p6)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,g=u.tr,p=u.bl,y=u.br,x=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,b=u.anchor,M=l.index,w=x.x,k=x.y,T=w+x.width,A=k+x.height,P=l.index;l.add(b.x,b.y,d.x,d.y,w,k,_,m,I,t,f,r),l.add(b.x,b.y,g.x,g.y,T,k,_,m,I,t,f,r),l.add(b.x,b.y,p.x,p.y,w,A,_,m,I,t,f,r),l.add(b.x,b.y,y.x,y.y,T,A,_,m,I,t,f,r),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(M,M+1,M+2),h.add(M+1,M+2,M+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,n]of this._glyphBufferDataStorage)for(const r of n){const n=e.index,a=r.symbolInstance,o=r.ddAttributes,l=e.index;e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tl[0],r.tl[1],r.xmin,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.tr[0],r.tr[1],r.xmax,r.ymin,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.bl[0],r.bl[1],r.xmin,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.maxLod,o),e.add(r.glyphAnchor[0],r.glyphAnchor[1],r.br[0],r.br[1],r.xmax,r.ymax,r.labelAngle,r.minAngle,r.maxAngle,r.minLod,r.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(n,n+1,n+2),t.add(n+1,n+2,n+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,n){const r=Math.max(s-1,0),a=i===p.I5.VIEWPORT;let l,h,c,u,f,d,g,y,x,_,m;for(const i of t)l=a?0:Math.max(s+(0,o.p6)(i.minzoom),r),h=a?25:Math.min(s+(0,o.p6)(i.maxzoom),25),h<=l||(c=i.tl,u=i.tr,f=i.bl,d=i.br,g=i.labelAngle,y=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:g,minAngle:y,maxAngle:x,minLod:l,maxLod:h,placementLod:r,symbolInstance:e,ddAttributes:n}))}static _pushAnchors(e,t,s,i){s+=i;let n=0;const a=t.length-1;for(let e=0;e<a;e++)n+=r.bR.distance(t[e],t[e+1]);let l=i||s;if(l*=.5,n<=l)return;const h=l/n;let c=0,u=-(s=n/Math.max(Math.round(n/s),1))/2;const f=t.length-1;for(let i=0;i<f;i++){const n=t[i],r=t[i+1],a=r.x-n.x,l=r.y-n.y,f=Math.sqrt(a*a+l*l);let d;for(;u+s<c+f;){u+=s;const t=(u-c)/f,g=(0,o.GW)(n.x,r.x,t),p=(0,o.GW)(n.y,r.y,t);void 0===d&&(d=Math.atan2(l,a)),e.push(new x(g,p,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+=r.bR.distance(t[e],t[e+1]);const n=s/2;let a=0;const l=t.length-1;for(let s=0;s<l;s++){const i=t[s],r=t[s+1],l=r.x-i.x,h=r.y-i.y,c=Math.sqrt(l*l+h*h);if(n<a+c){const t=(n-a)/c,u=(0,o.GW)(i.x,r.x,t),f=(0,o.GW)(i.y,r.y,t),d=Math.atan2(h,l);return void e.push(new x(u,f,d,s,0))}a+=c}}static _deviation(e,t,s){const i=(t.x-e.x)*(s.x-t.x)+(t.y-e.y)*(s.y-t.y),n=(t.x-e.x)*(s.y-t.y)-(t.y-e.y)*(s.x-t.x);return Math.atan2(n,i)}static _honorsTextMaxAngle(e,t,s,i,n){let a=0;const o=s/2;let l=new r.bR(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=r.bR.distance(e[h],l),l=e[h]}a+=r.bR.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>n;)u-=c.shift().deviation;if(Math.abs(u)>i)return!1;a+=r.bR.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 n=0,a=0;i.push(0);for(let t=1;t<s;t++){const s=r.bR.distance(e[t],e[t-1]);s>0&&(n+=s,i.push(n),a++,a!==t&&(e[a]=e[t]))}if(s=a+1,s<3)return e;t=Math.min(t,.2*n);const o=e[0].x,l=e[0].y,h=e[s-1].x,c=e[s-1].y,u=r.bR.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 r.bR(o,l));const d=1e-6,g=.5*t;for(let n=1;n<s-1;n++){let a=0,o=0,l=0;for(let s=n-1;s>=0;s--){const r=g+i[s+1]-i[n];if(r<0)break;const h=i[s+1]-i[s],c=i[n]-i[s]<g?1:r/h;if(c<d)break;const u=c*c,f=c*r-.5*u*h,p=c*h/t,y=e[s+1],x=e[s].x-y.x,_=e[s].y-y.y;a+=p/f*(y.x*c*r+.5*u*(r*x-h*y.x)-u*c*h*x/3),o+=p/f*(y.y*c*r+.5*u*(r*_-h*y.y)-u*c*h*_/3),l+=p}for(let r=n+1;r<s;r++){const s=g-i[r-1]+i[n];if(s<0)break;const h=i[r]-i[r-1],c=i[r]-i[n]<g?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,p=c*h/t,y=e[r-1],x=e[r].x-y.x,_=e[r].y-y.y;a+=p/f*(y.x*c*s+.5*u*(s*x-h*y.x)-u*c*h*x/3),o+=p/f*(y.y*c*s+.5*u*(s*_-h*y.y)-u*c*h*_/3),l+=p}f.push(new r.bR(a/l,o/l))}return f.push(new r.bR(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=a.vA,i=a.vA,n=t.length-1;let r=0,o=0,l=0,h=t[0].x,c=t[0].y;h>s&&(h=s),h<0&&(h=0),c>i&&(c=i),c<0&&(c=0);for(let e=1;e<n;e++){let n=t[e].x,a=t[e].y,u=t[e+1].x,f=t[e+1].y;n>s&&(n=s),n<0&&(n=0),a>i&&(a=i),a<0&&(a=0),u>s&&(u=s),u<0&&(u=0),f>i&&(f=i),f<0&&(f=0);const d=(n-h)*(f-c)-(u-h)*(a-c);r+=d*(h+n+u),o+=d*(c+a+f),l+=d}r/=3*l,o/=3*l,isNaN(r)||isNaN(o)||e.push(new x(r,o))}}!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 ${constructor(e,t,s,i,n,a){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=t,this._sourceDataMaxLOD=i,a){this._styleLayerUIDs=new Set;for(const e of a)this._styleLayerUIDs.add(e)}this._styleRepository=n,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,o.IU)(this._level);for(const t of Object.keys(e)){const s=e[t];if(this._pbfTiles[t]=new k.A(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,n=c&e;this._tileClippers[t]=new r.O3(i,s,n,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new r.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,T.F)(),s=this._initialize(e),{returnedBuckets:i}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const n=[],r=new Set,a=(e,t)=>{r.has(e)||(n.push({name:e,repeat:t}),r.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(n,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:n,sourceNameToUniqueSourceLayerBuckets:r,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===p.Dc.BACKGROUND||!this._canParseStyleLayer(u.uid)||!t[u.source]||!n[u.source])continue;const f=t[u.source],d=n[u.source],g=u.sourceLayer,y=f[g];if(y){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=y.extent,e.tileClipper=d;let t=r[u.source];t||(t=r[u.source]={});let s=t[g];s||(s=t[g]=[]),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:n,sourceNameToUniqueSourceLayers:r}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(r))r[e].forEach((t=>{l.push(t),h.push(e)}));for(let e=0;e<l.length;e++){const r=h[e],c=l[e];if(!s[r]||!n[r])continue;const u=s[r][c],f=n[r][c];if(!f||0===f.length)continue;if((0,i.G4)(t))return;let d=0;const g=u.getData();for(;g.nextTag(2);){const e=g.getMessage(),t=new A(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=[],n=this._tile.getWorkerTileHandler();let r,a;e.length>0&&(r=n.fetchSprites(e,this._client,s),i.push(r));for(const e in t){const r=t[e];r.size>0&&(a=n.fetchGlyphs(this._tile.tileKey,e,r,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],n={};for(;i.next();)switch(i.tag()){case 3:{const e=i.getMessage(),t=new L(e);e.release(),n[t.name]=t;break}default:i.skip()}t[s]=n}return t}_createBucket(e){switch(e.type){case p.Dc.BACKGROUND:return null;case p.Dc.FILL:return this._createFillBucket(e);case p.Dc.LINE:return this._createLineBucket(e);case p.Dc.CIRCLE:return this._createCircleBucket(e);case p.Dc.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new N(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.fillMaterial.getStride()),new D,new v(e.outlineMaterial.getStride()),new D)}_createLineBucket(e){return new z(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new V(e.lineMaterial.getStride()),new D)}_createCircleBucket(e){return new E(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new S(e.circleMaterial.getStride()),new D)}_createSymbolBucket(e){const t=this._tile;return new Z(t.tileKey,e,this._level,new R(e.iconMaterial.getStride()),new D,new R(e.textMaterial.getStride()),new D,t.placementEngine,t.getWorkerTileHandler())}}class Q{constructor(e,t,s,i){this.status=q.INITIALIZED,this.placementEngine=new b,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 n;const r={bucketsWithData:[],emptyBuckets:null};try{n=await this._parse(e,t)}catch(e){if((0,i.zf)(e))throw e;return{result:r,transferList:[]}}this.status=q.READY;const a=r.bucketsWithData,o=[];for(const e of n)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)),r.emptyBuckets=h,{result:r,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 $(s,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var X=s(45013);class ee{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,n={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const s=e.sourceName2DataAndRefKey[t];n[t]=s.refKey}const r=new Q(s,n,this,this._styleRepository);try{return await r.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(r.setObsolete(),r.release(),!(0,i.zf)(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 n.$q.PAINTER_CHANGED:t.setPaintProperties(i.layer,i.paint);break;case n.$q.LAYOUT_CHANGED:t.setLayoutProperties(i.layer,i.layout);break;case n.$q.LAYER_REMOVED:t.deleteStyleLayer(i.layer);break;case n.$q.LAYER_CHANGED:t.setStyleLayer(i.layer,i.index);break;case n.$q.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:s}=e;this._styleRepository=new X.A(t),this._sourceDataMaxLOD=s,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,s){const i=[],n=this._spriteInfo;for(const t of e)void 0===n[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];n[t]=s}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,s,i,n){const r=[];let a=this._glyphInfo[t];return a?s.forEach((e=>{a[e]||r.push(e)})):(a=this._glyphInfo[t]=[],s.forEach((e=>r.push(e)))),0===r.length?Promise.resolve():i.invoke("getGlyphs",{tileID:e,font:t,codePoints:r},n).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}},34304:(e,t,s)=>{s.d(t,{DF:()=>l,FD:()=>n,Ov:()=>r,ct:()=>h});let i=1e-6;function n(){return i}const r=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function h(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:r,equals:function(e,t){return Math.abs(e-t)<=i*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:n,setEpsilon:function(e){i=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},40876:(e,t,s)=>{s.d(t,{Eq:()=>d,G1:()=>p,TS:()=>r,Tf:()=>_,V6:()=>n,Vm:()=>g,ay:()=>l,c1:()=>y,c4:()=>a,j5:()=>h,lT:()=>u,oW:()=>c});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 n(e){return!!i[e]||!!i[e.toLowerCase()]}function r(e){return i[e]??i[e.toLowerCase()]}function a(e){return[...r(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 n=(e%360+360)%360/360,r=s<=.5?s*(t+1):s+t-s*t,a=2*s-r;return[Math.round(255*o(a,r,n+1/3)),Math.round(255*o(a,r,n)),Math.round(255*o(a,r,n-1/3)),i]}function h(e){const t=e.length>5,s=t?8:4,i=(1<<s)-1,n=t?1:17,r=t?9===e.length:5===e.length;let a=Number("0x"+e.slice(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return r&&(l=a&i,a>>=s,o[3]=n*l/255),l=a&i,a>>=s,o[2]=n*l,l=a&i,a>>=s,o[1]=n*l,l=a&i,a>>=s,o[0]=n*l,o}function c(e){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),s=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),n=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,s+16*s,i+16*i,(n+16*n)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function u(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),s=t[1];if("rgb"===s&&3===e.length||"rgba"===s&&4===e.length){const t=e[0];if("%"===t.charAt(t.length-1)){const t=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(t[3]=parseFloat(e[3])),f(t)}return f(e.map((e=>parseFloat(e))))}if("hsl"===s&&3===e.length||"hsla"===s&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function f(e){return e[0]=y(e[0]),e[1]=y(e[1]),e[2]=y(e[2]),e[3]=4===e.length?p(e[3]):1,e}function d(e){let t=n(e)?r(e):null;return t??=u(e),t??=c(e),t}function g(e){const t=d(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function p(e){return x(e,0,1)}function y(e){return Math.round(x(e,0,255))}function x(e,t,s){return e=Number(e),isNaN(e)?s:e<t?t:e>s?s:e}const _=2.2},51624:(e,t,s)=>{s.d(t,{A:()=>u});var i,n,r=s(44208),a=s(69397),o=s(93687);(n=i||(i={}))[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown";const l=4294967296,h=new TextDecoder("utf-8"),c=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class u{constructor(e,t,s=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=i.unknown,this._init(e,t,s,n)}_init(e,t,s,i){this._data=e,this._dataView=t,this._pos=s,this._end=i}get usedMemory(){return 64+(0,a.Qf)(this._data)}asUnsafe(){return this}clone(){return new u(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*l;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*l;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 n=this.getMessage(),r=e(n,t,s,i);return n.release(),r}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=u.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){u.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,!(128&i))break;if(i=e[t++],s|=(127&i)<<7,!(128&i))break;if(i=e[t++],s|=(127&i)<<14,!(128&i))break;if(i=e[t++],s|=(127&i)<<21,!(128&i))break;if(i=e[t++],s+=268435456*(127&i),!(128&i))break;if(i=e[t++],s+=34359738368*(127&i),!(128&i))break;if(i=e[t++],s+=4398046511104*(127&i),!(128&i))break;if(i=e[t++],s+=562949953421312*(127&i),!(128&i))break;if(i=e[t++],s+=72057594037927940*(127&i),!(128&i))break;if(i=e[t++],s+=0x8000000000000000*(127&i),!(128&i))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(i=e[t],128&i);)++t,s+=(127&i)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=i*n}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,i=0;const n=1&e[this._pos];if(i=e[this._pos++],s|=127&i,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<7,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<14,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s|=(127&i)<<21,!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=268435456*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=34359738368*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(i=e[this._pos++],s+=4398046511104*(127&i),!(128&i))return n?-(s+1)/2:s/2;if(t=BigInt(s),i=e[this._pos++],t+=0x2000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x100000000000000n*BigInt(127&i),!(128&i))return Number(n?-(t+1n)/2n:t/2n);if(i=e[this._pos++],t+=0x8000000000000000n*BigInt(127&i),!(128&i))return Number(n?-(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>c){const i=e.subarray(t,s);return h.decode(i)}let i="",n="";for(let r=t;r<s;++r){const t=e[r];128&t?n+="%"+t.toString(16):(i+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(i+=decodeURIComponent(n)),i}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}static{this.pool=new o.A(u,void 0,(e=>{e._data=null,e._dataView=null}))}}},87317:(e,t,s)=>{s.d(t,{a:()=>m,b:()=>g,c:()=>n,d:()=>c,e:()=>I,g:()=>a,h:()=>y,j:()=>d,l:()=>x,n:()=>p,s:()=>r,t:()=>_});var i=s(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function r(e,t,s,i,n){return e[0]=t,e[1]=s,e[2]=i,e[3]=n,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],n=t[2]-e[2],r=t[3]-e[3];return Math.sqrt(s*s+i*i+n*n+r*r)}function f(e,t){const s=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],r=t[3]-e[3];return s*s+i*i+n*n+r*r}function d(e){const t=e[0],s=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+s*s+i*i+n*n)}function g(e){const t=e[0],s=e[1],i=e[2],n=e[3];return t*t+s*s+i*i+n*n}function p(e,t){const s=t[0],i=t[1],n=t[2],r=t[3];let a=s*s+i*i+n*n+r*r;return a>0&&(a=1/Math.sqrt(a),e[0]=s*a,e[1]=i*a,e[2]=n*a,e[3]=r*a),e}function y(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 n=t[0],r=t[1],a=t[2],o=t[3];return e[0]=n+i*(s[0]-n),e[1]=r+i*(s[1]-r),e[2]=a+i*(s[2]-a),e[3]=o+i*(s[3]-o),e}function _(e,t,s){const i=t[0],n=t[1],r=t[2],a=t[3];return e[0]=s[0]*i+s[4]*n+s[8]*r+s[12]*a,e[1]=s[1]*i+s[5]*n+s[9]*r+s[13]*a,e[2]=s[2]*i+s[6]*n+s[10]*r+s[14]*a,e[3]=s[3]*i+s[7]*n+s[11]*r+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],n=e[1],r=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,i.FD)();return Math.abs(s-o)<=u*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(n-l)<=u*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(r-h)<=u*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const b=o,M=l,w=h,k=u,T=f,A=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:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:k,distance:u,div:w,divide:h,dot:y,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:A,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:M,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:p,random:function(e,t=1){const s=i.Ov;let n,r,a,o,l,h;do{n=2*s()-1,r=2*s()-1,l=n*n+r*r}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*n,e[1]=t*r,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:r,sqrDist:T,sqrLen:P,squaredDistance:f,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:b,subtract:o,transformMat4:_,transformQuat:function(e,t,s){const i=t[0],n=t[1],r=t[2],a=s[0],o=s[1],l=s[2],h=s[3],c=h*i+o*r-l*n,u=h*n+l*i-a*r,f=h*r+a*n-o*i,d=-a*i-o*n-l*r;return e[0]=c*h+d*-a+u*-l-f*-o,e[1]=u*h+d*-o+f*-a-c*-l,e[2]=f*h+d*-l+c*-o-u*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},91829:(e,t,s)=>{function i(){return[0,0,0,0]}function n(e){return[e[0],e[1],e[2],e[3]]}function r(e,t,s,i){return[e,t,s,i]}function a(e,t,s,i){return[e,t,s,i]}function o(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}function l(){return r(1,1,1,1)}function h(){return r(1,0,0,0)}function c(){return r(0,1,0,0)}function u(){return r(0,0,1,0)}function f(){return r(0,0,0,1)}s.d(t,{CN:()=>a,Un:()=>g,ci:()=>o,fA:()=>r,o8:()=>n,uY:()=>d,vt:()=>i});const d=[0,0,0,0],g=l(),p=h(),y=c(),x=u(),_=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:g,UNIT_W:_,UNIT_X:p,UNIT_Y:y,UNIT_Z:x,ZEROS:d,clone:n,create:i,freeze:a,fromArray:o,fromValues:r,ones:l,unitW:f,unitX:h,unitY:c,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1784],{9093:(t,n,e)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}e.d(n,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(t,n,e,r,o,i,a,s,l,u,c,f,h,d,m,p){return[t,n,e,r,o,i,a,s,l,u,c,f,h,d,m,p]}},Symbol.toStringTag,{value:"Module"}))},11006:(t,n,e)=>{function r(t,n,e,r,i){o(t,n,e||0,r||t.length-1,i||a)}function o(t,n,e,r,a){for(;r>e;){if(r-e>600){var s=r-e+1,l=n-e+1,u=Math.log(s),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);o(t,n,Math.max(e,Math.floor(n-l*c/s+f)),Math.min(r,Math.floor(n+(s-l)*c/s+f)),a)}var h=t[n],d=e,m=r;for(i(t,e,n),a(t[r],h)>0&&i(t,e,r);d<m;){for(i(t,d,m),d++,m--;a(t[d],h)<0;)d++;for(;a(t[m],h)>0;)m--}0===a(t[e],h)?i(t,e,m):i(t,++m,r),m<=n&&(e=m+1),n<=m&&(r=m-1)}}function i(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function a(t,n){return t<n?-1:t>n?1:0}e.d(n,{q:()=>r})},18251:(t,n,e)=>{e.d(n,{A:()=>c});var r=e(90237),o=e(69540),i=e(25482),a=e(10107),s=(e(44208),e(53966),e(87811),e(93223)),l=e(40608),u=e(51850);let c=class extends(o.A.ClonableMixin(i.A)){constructor(t){super(t),this.type="local",this.origin=(0,u.vt)()}};(0,r._)([(0,s.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,r._)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,r._)([(0,l.$)("esri.geometry.support.MeshLocalVertexSpace")],c)},22141:(t,n,e)=>{e.d(n,{$5:()=>A,CN:()=>y,JP:()=>M,KM:()=>v,Mv:()=>S,X4:()=>x,gr:()=>_,qs:()=>w,si:()=>b,xA:()=>B});var r=e(34727),o=e(77690),i=e(29242),a=e(58083),s=e(9093),l=e(38954),u=e(51850),c=e(48353),f=e(9762),h=(e(79258),e(21325)),d=e(28735),m=e(13030),p=e(73354),g=e(65686);const M="Projection may be possible after calling projection.load().";function y(t,n,e,r){t.error(`Failed to project from (wkid:${n.wkid}) to (wkid:${e.wkid}).${r?" ":""}${r}`)}function x(t,n,e,r,o,i){return O(E.TO_PCPF,m.xs.fromTypedArray(t),T.NORMAL,m.Xm.fromTypedArray(n),e,m.Xm.fromTypedArray(r),o,m.xs.fromTypedArray(i))?i:null}function b(t,n,e,r,o,i){return O(E.FROM_PCPF,m.xs.fromTypedArray(t),T.NORMAL,m.Xm.fromTypedArray(n),e,m.Xm.fromTypedArray(r),o,m.xs.fromTypedArray(i))?i:null}function _(t,n,e,r){return(0,f.projectBuffer)(t,n,0,e,r,0)?e:null}function A(t,n,e,r){return(0,f.projectBuffer)(t,n,0,e,r,0)?e:null}function w(t,n,e){return(0,o.Ge)(Y,e),(0,p.b)(n,t,Y),(0,r.or)(Y)&&(0,p.n)(n,n),n}function v(t,n,e){return(0,o.z0)(Y,e),(0,g.t)(n,t,Y),(0,r.or)(Y)&&(0,p.n)(n,n,4),n}function B(t,n,e,r,o,i){if(!O(E.TO_PCPF,m.xs.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),T.TANGENT,m.Xm.fromTypedArray(n),e,m.Xm.fromTypedArray(r),o,m.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let n=3;n<t.length;n+=4)i[n]=t[n];return i}function S(t,n,e,r,o,i){if(!O(E.FROM_PCPF,m.xs.fromTypedArray(t,16),T.TANGENT,m.Xm.fromTypedArray(n),e,m.Xm.fromTypedArray(r),o,m.xs.fromTypedArray(i,16)))return null;for(let n=3;n<t.length;n+=4)i[n]=t[n];return i}var T,E,N;function R(t,n,e,r,i){switch((0,c.l)(r,e,X,r),t===E.FROM_PCPF&&(0,a.B8)(X,X),n){case T.NORMAL:return(0,o.Ge)(i,X);case T.TANGENT:return(0,o.z0)(i,X)}}function O(t,n,e,r,o,i,a,s){if(!n)return;const u=r.count;if(function(t){return t.isWGS84||(0,h.x1)(t)||(0,h.q8)(t)||(0,h.KQ)(t)}(o))for(let r=0;r<u;r++)i.getVec(r,C),n.getVec(r,F),(0,l.o)(F,F,R(t,e,C,a,Y)),s.setVec(r,F);else for(let o=0;o<u;o++){i.getVec(o,C),n.getVec(o,F);const u=(0,d.jg)(r.get(o,1));let c=Math.cos(u);e===T.TANGENT!=(t===E.TO_PCPF)&&(c=1/c),R(t,e,C,a,Y),t===E.TO_PCPF?(Y[0]*=c,Y[1]*=c,Y[2]*=c,Y[3]*=c,Y[4]*=c,Y[5]*=c):(Y[0]*=c,Y[3]*=c,Y[6]*=c,Y[1]*=c,Y[4]*=c,Y[7]*=c),(0,l.o)(F,F,Y),(0,l.n)(F,F),s.setVec(o,F)}return s}(N=T||(T={}))[N.NORMAL=0]="NORMAL",N[N.TANGENT=1]="TANGENT",function(t){t[t.TO_PCPF=0]="TO_PCPF",t[t.FROM_PCPF=1]="FROM_PCPF"}(E||(E={}));const C=(0,u.vt)(),F=(0,u.vt)(),X=(0,s.vt)(),Y=(0,i.vt)()},27615:(t,n,e)=>{e.d(n,{CK:()=>l,Hq:()=>s,MW:()=>u,TE:()=>c,yJ:()=>f});var r=e(38954),o=e(86738),i=e(95696),a=e(18251);function s(t){return null!=t.origin}function l(t){return s(t.vertexSpace)}function u(t,n){if(!s(t))return null;const[e,r,i]=t.origin;return new o.A({x:e,y:r,z:i,spatialReference:n})}function c(t,n){const{x:e,y:r,z:o,spatialReference:s}=t,l=[e,r,o??0];return"local"===(n?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(s))?new a.A({origin:l}):new i.A({origin:l})}function f(t,n){return t.type===n.type&&(t.origin===n.origin||null!=t.origin&&null!=n.origin&&(0,r.q)(t.origin,n.origin))}},29242:(t,n,e)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,n,e,r,o,i,a,s,l){return[t,n,e,r,o,i,a,s,l]}e.d(n,{fA:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:o},Symbol.toStringTag,{value:"Module"}))},38419:(t,n,e)=>{e.r(n),e.d(n,{default:()=>s});var r=e(44208),o=e(75503),i=e(95696),a=e(72258);class s{async createIndex(t,n){const e=new Array;if(!t.vertexAttributes?.position)return new o.w;const r=function(t){const{vertexAttributes:{position:n},vertexSpace:e,spatialReference:r,transform:o}=t,s=(0,a.UR)({vertexAttributes:{position:n},vertexSpace:e,spatialReference:r,transform:o},i.A.absolute,{allowBufferReuse:!0})?.position;return s?!t.components||t.components.some((t=>!t.faces))?{position:s.buffer}:{position:s.buffer,components:t.components.map((t=>t.faces))}:null}(t),s=null!=n?await n.invoke("createIndexThread",r,{transferList:e}):this.createIndexThread(r).result;return l().fromJSON(s)}createIndexThread(t){const n=l();if(!t)return{result:n.toJSON()};const e=new Float64Array(t.position);return t.components?function(t,n,e){let r=0;for(const t of e)r+=t.length/3;const o=new Array(r);let i=0;for(const t of e)for(let e=0;e<t.length;e+=3)o[i++]=u(n,3*t[e],3*t[e+1],3*t[e+2]);return t.load(o),{result:t.toJSON()}}(n,e,t.components.map((t=>new Uint32Array(t)))):function(t,n){const e=new Array(n.length/9);let r=0;for(let t=0;t<n.length;t+=9)e[r++]=u(n,t,t+3,t+6);return t.load(e),{result:t.toJSON()}}(n,e)}}function l(){return new o.w(9,(0,r.A)("esri-csp-restrictions")?t=>t:[".minX",".minY",".maxX",".maxY"])}function u(t,n,e,r){return{minX:Math.min(t[n],t[e],t[r]),maxX:Math.max(t[n],t[e],t[r]),minY:Math.min(t[n+1],t[e+1],t[r+1]),maxY:Math.max(t[n+1],t[e+1],t[r+1]),p0:[t[n],t[n+1],t[n+2]],p1:[t[e],t[e+1],t[e+2]],p2:[t[r],t[r+1],t[r+2]]}}},38954:(t,n,e)=>{e.d(n,{A:()=>m,B:()=>d,C:()=>c,D:()=>f,E:()=>F,F:()=>z,H:()=>q,a:()=>X,b:()=>M,c:()=>a,d:()=>u,e:()=>v,f:()=>l,g:()=>g,h:()=>B,i:()=>s,j:()=>y,k:()=>b,l:()=>i,m:()=>S,n:()=>w,o:()=>E,q:()=>C,r:()=>A,s:()=>x,t:()=>T,u:()=>_,v:()=>N,w:()=>h,x:()=>P,y:()=>G,z:()=>p});var r=e(51850),o=e(34304);function i(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function l(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function f(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function h(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function m(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 p(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 g(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function M(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 y(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(e*e+r*r+o*o)}function x(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function b(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function _(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function A(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function w(t,n){const e=n[0],r=n[1],o=n[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function v(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function B(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],l=e[2];return t[0]=o*l-i*s,t[1]=i*a-r*l,t[2]=r*s-o*a,t}function S(t,n,e,r){const o=n[0],i=n[1],a=n[2];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t}function T(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12],t[1]=e[1]*r+e[5]*o+e[9]*i+e[13],t[2]=e[2]*r+e[6]*o+e[10]*i+e[14],t}function E(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=r*e[0]+o*e[3]+i*e[6],t[1]=r*e[1]+o*e[4]+i*e[7],t[2]=r*e[2]+o*e[5]+i*e[8],t}function N(t,n,e){const r=e[0],o=e[1],i=e[2],a=e[3],s=n[0],l=n[1],u=n[2],c=o*u-i*l,f=i*s-r*u,h=r*l-o*s,d=o*h-i*f,m=i*c-r*h,p=r*f-o*c,g=2*a;return t[0]=s+c*g+2*d,t[1]=l+f*g+2*m,t[2]=u+h*g+2*p,t}const R=(0,r.vt)(),O=(0,r.vt)();function C(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function F(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=e[2]-n[2];let a=r*r+o*o+i*i;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=o*a,t[2]=i*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const X=u,Y=c,k=f,z=y,P=x,q=i,G=b;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:l,angle:function(t,n){w(R,t),w(O,n);const e=v(R,O);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,o,i){const a=1-i,s=a*a,l=i*i,u=s*a,c=3*i*s,f=3*l*a,h=l*i;return t[0]=n[0]*u+e[0]*c+r[0]*f+o[0]*h,t[1]=n[1]*u+e[1]*c+r[1]*f+o[1]*h,t[2]=n[2]*u+e[2]*c+r[2]*f+o[2]*h,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},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:a,cross:B,crossAndNormalize:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],l=e[2],u=o*l-i*s,c=i*a-r*l,f=r*s-o*a,h=Math.sqrt(u*u+c*c+f*f);return t[0]=u/h,t[1]=c/h,t[2]=f/h,t},direction:F,dist:z,distance:y,div:k,divide:f,dot:v,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],i=t[2],a=n[0],s=n[1],l=n[2],u=(0,o.FD)();return Math.abs(e-a)<=u*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-l)<=u*Math.max(1,Math.abs(i),Math.abs(l))},exactEquals:C,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,o,i){const a=i*i,s=a*(2*i-3)+1,l=a*(i-2)+i,u=a*(i-1),c=a*(3-2*i);return t[0]=n[0]*s+e[0]*l+r[0]*u+o[0]*c,t[1]=n[1]*s+e[1]*l+r[1]*u+o[1]*c,t[2]=n[2]*s+e[2]*l+r[2]*u+o[2]*c,t},inverse:A,len:q,length:i,lerp:S,max:p,min:m,mul:Y,multiply:c,negate:_,normalize:w,random:function(t,n=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,a=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*n,t},rotateX:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[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:g,scaleAndAdd:M,set:s,sign:d,sqrDist:P,sqrLen:G,squaredDistance:x,squaredLength:b,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:X,subtract:u,transformMat3:E,transformMat4:T,transformQuat:N},Symbol.toStringTag,{value:"Module"}))},40876:(t,n,e)=>{e.d(n,{Eq:()=>d,G1:()=>p,TS:()=>i,Tf:()=>y,V6:()=>o,Vm:()=>m,ay:()=>l,c1:()=>g,c4:()=>a,j5:()=>u,lT:()=>f,oW:()=>c});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(t){return!!r[t]||!!r[t.toLowerCase()]}function i(t){return r[t]??r[t.toLowerCase()]}function a(t){return[...i(t)]}function s(t,n,e){e<0&&++e,e>1&&--e;const r=6*e;return r<1?t+(n-t)*r:2*e<1?n:3*e<2?t+(n-t)*(2/3-e)*6:t}function l(t,n,e,r=1){const o=(t%360+360)%360/360,i=e<=.5?e*(n+1):e+n-e*n,a=2*e-i;return[Math.round(255*s(a,i,o+1/3)),Math.round(255*s(a,i,o)),Math.round(255*s(a,i,o-1/3)),r]}function u(t){const n=t.length>5,e=n?8:4,r=(1<<e)-1,o=n?1:17,i=n?9===t.length:5===t.length;let a=Number("0x"+t.slice(1));if(isNaN(a))return null;const s=[0,0,0,1];let l;return i&&(l=a&r,a>>=e,s[3]=o*l/255),l=a&r,a>>=e,s[2]=o*l,l=a&r,a>>=e,s[1]=o*l,l=a&r,a>>=e,s[0]=o*l,s}function c(t){if("#"!==t[0]||isNaN(Number(`0x${t.slice(1)}`)))return null;switch(t.length){case 4:case 5:{const n=parseInt(t.slice(1,2),16),e=parseInt(t.slice(2,3),16),r=parseInt(t.slice(3,4),16),o=4===t.length?15:parseInt(t.slice(4),16);return[n+16*n,e+16*e,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(t.slice(1,3),16),parseInt(t.slice(3,5),16),parseInt(t.slice(5,7),16),(7===t.length?255:parseInt(t.slice(7),16))/255];default:return null}}function f(t){const n=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(n){const t=n[2].split(/\s*,\s*/),e=n[1];if("rgb"===e&&3===t.length||"rgba"===e&&4===t.length){const n=t[0];if("%"===n.charAt(n.length-1)){const n=t.map((t=>2.56*parseFloat(t)));return 4===t.length&&(n[3]=parseFloat(t[3])),h(n)}return h(t.map((t=>parseFloat(t))))}if("hsl"===e&&3===t.length||"hsla"===e&&4===t.length)return l(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3]??"1"))}return null}function h(t){return t[0]=g(t[0]),t[1]=g(t[1]),t[2]=g(t[2]),t[3]=4===t.length?p(t[3]):1,t}function d(t){let n=o(t)?i(t):null;return n??=f(t),n??=c(t),n}function m(t){const n=d(t);return null!=n?[n[0]/255,n[1]/255,n[2]/255,n[3]]:null}function p(t){return M(t,0,1)}function g(t){return Math.round(M(t,0,255))}function M(t,n,e){return t=Number(t),isNaN(t)?e:t<n?n:t>e?e:t}const y=2.2},48163:(t,n,e)=>{function r(){return[0,0]}function o(t,n){return[t,n]}function i(){return o(1,1)}function a(){return o(1,0)}function s(){return o(0,1)}e.d(n,{Un:()=>l,fA:()=>o,vt:()=>r});const l=i(),u=a(),c=s();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:u,UNIT_Y:c,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:r,freeze:function(t,n){return[t,n]},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:o,ones:i,unitX:a,unitY:s,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48353:(t,n,e)=>{e.d(n,{l:()=>u});var r=e(34727),o=e(58083),i=e(51850);function a(t,n,e){const r=Math.sin(t),o=Math.cos(t),i=Math.sin(n),a=Math.cos(n),s=e;return s[0]=-r,s[4]=-i*o,s[8]=a*o,s[12]=0,s[1]=o,s[5]=-i*r,s[9]=a*r,s[13]=0,s[2]=0,s[6]=a,s[10]=i,s[14]=0,s[3]=0,s[7]=0,s[11]=0,s[15]=1,s}var s=e(37539),l=e(21325);function u(t,n,e,r){const i=(0,s.Tp)(t,r);if(null==i)return!1;const u=i.source.spatialReferenceId,m=i.dest.spatialReferenceId;if(u===m&&!c(m)&&(u!==s.rz.UNKNOWN||(0,l.aI)(t,r)))return(0,o.kN)(e,n),!0;if(c(m)){const t=s.w5[u][s.rz.LON_LAT],r=s.w5[s.rz.LON_LAT][m];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,d,0),a(f*h[0],f*h[1],e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}const p=c(u);if((m===s.rz.WEB_MERCATOR||m===s.rz.PLATE_CARREE||m===s.rz.WGS84||m===s.rz.CGCS2000)&&(u===s.rz.WGS84||p||u===s.rz.WEB_MERCATOR||u===s.rz.CGCS2000)){const t=s.w5[u][s.rz.LON_LAT],r=s.w5[s.rz.LON_LAT][m];return null!=t&&null!=r&&(t(n,0,h,0),r(h,0,d,0),p?function(t,n,e){a(t,n,e),(0,o.mg)(e,e)}(f*h[0],f*h[1],e):(0,o.D_)(e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}return!1}function c(t){return t===s.rz.SPHERICAL_ECEF||t===s.rz.SPHERICAL_MARS_PCPF||t===s.rz.SPHERICAL_MOON_PCPF||t===s.rz.WGS84_ECEF}const f=(0,r.kU)(1),h=(0,i.vt)(),d=(0,i.vt)()},65686:(t,n,e)=>{e.d(n,{a:()=>i,b:()=>c,l:()=>u,n:()=>s,t:()=>a});var r=e(40876),o=(e(44208),e(53966));function i(t,n,e){a(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function a(t,n,e,r=4,o=r){if(t.length/r!==n.length/o)return;const i=t.length/r,a=e[0],s=e[1],l=e[2],u=e[3],c=e[4],f=e[5],h=e[6],d=e[7],m=e[8];let p=0,g=0;for(let e=0;e<i;e++){const e=n[p],i=n[p+1],M=n[p+2],y=n[p+3];t[g]=a*e+u*i+h*M,t[g+1]=s*e+c*i+d*M,t[g+2]=l*e+f*i+m*M,t[g+3]=y,p+=o,g+=r}}function s(t,n){const e=Math.min(t.count,n.count),r=t.typedBuffer,o=t.typedBufferStride,i=n.typedBuffer,a=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*o,e=t*a,s=i[e],l=i[e+1],u=i[e+2],c=s*s+l*l+u*u;if(c>0){const t=1/Math.sqrt(c);r[n]=t*s,r[n+1]=t*l,r[n+2]=t*u}}}function l(t,n,e,r=4){const o=Math.min(t.length/r,n.count),i=n.typedBuffer,a=n.typedBufferStride;let s=0,l=0;for(let n=0;n<o;n++)t[l]=e*i[s],t[l+1]=e*i[s+1],t[l+2]=e*i[s+2],t[l+3]=e*i[s+3],s+=a,l+=r}function u(t,n,e,r){c(t.typedBuffer,n,e,r,t.typedBufferStride)}function c(t,n,e,o,i=4){const a=Math.min(t.length/i,n.count),s=n.typedBuffer,l=n.typedBufferStride;let u=0,c=0;const f=1/r.Tf;for(let n=0;n<a;n++)t[c]=o*(e*s[u])**f,t[c+1]=o*(e*s[u+1])**f,t[c+2]=o*(e*s[u+2])**f,t[c+3]=o*e*s[u+3],u+=l,c+=i}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:s,scale:l,scaleView:function(t,n,e){l(t.typedBuffer,n,e,t.typedBufferStride)},transformMat3:a,transformMat3View:i,transformMat4:function(t,n,e,r=4,i=r){if(t.length/r!==n.length/i)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const a=t.length/r,s=e[0],l=e[1],u=e[2],c=e[3],f=e[4],h=e[5],d=e[6],m=e[7],p=e[8],g=e[9],M=e[10],y=e[11],x=e[12],b=e[13],_=e[14],A=e[15];let w=0,v=0;for(let e=0;e<a;e++){const e=n[w],o=n[w+1],a=n[w+2],B=n[w+3];t[v]=s*e+f*o+p*a+x*B,t[v+1]=l*e+h*o+g*a+b*B,t[v+2]=u*e+d*o+M*a+_*B,t[v+3]=c*e+m*o+y*a+A*B,w+=i,v+=r}},transformMat4View:function(t,n,e){if(t.count!==n.count)return;const r=t.count,o=e[0],i=e[1],a=e[2],s=e[3],l=e[4],u=e[5],c=e[6],f=e[7],h=e[8],d=e[9],m=e[10],p=e[11],g=e[12],M=e[13],y=e[14],x=e[15],b=t.typedBuffer,_=t.typedBufferStride,A=n.typedBuffer,w=n.typedBufferStride;for(let t=0;t<r;t++){const n=t*_,e=t*w,r=A[e],v=A[e+1],B=A[e+2],S=A[e+3];b[n]=o*r+l*v+h*B+g*S,b[n+1]=i*r+u*v+d*B+M*S,b[n+2]=a*r+c*v+m*B+y*S,b[n+3]=s*r+f*v+p*B+x*S}}},Symbol.toStringTag,{value:"Module"}))},65806:(t,n,e)=>{e.d(n,{g:()=>a});var r=e(51850),o=e(98988),i=e(9762);function a(t,n,e,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,e)){s[0]=t.x,s[1]=t.y;const o=t.z;return s[2]=o??r??0,(0,i.projectBuffer)(s,t.spatialReference,0,n,e,0)}const a=(0,o.tryProjectWithZConversion)(t,e);return!!a&&(n[0]=a?.x,n[1]=a?.y,n[2]=a?.z??r??0,!0)}const s=(0,r.vt)()},69540:(t,n,e)=>{e.d(n,{A:()=>h});var r=e(90237),o=e(69622),i=(e(44208),e(4718)),a=(e(53966),e(97768)),s=e(35666),l=e(88620),u=e(40608);const c=t=>{let n=class extends t{clone(){const t=(0,l.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const n=t.metadata,e=t.store,r={},o=new Map;for(const t in n){const a=n[t],l=e?.originOf(t),u=a.clonable;if(a.readOnly||!1===u||l!==s.Gr.USER&&l!==s.Gr.DEFAULTS&&l!==s.Gr.WEB_MAP&&l!==s.Gr.WEB_SCENE)continue;const c=this[t];let f=null;f="function"==typeof u?u(c):"reference"===u?c:(0,i.TU)(c),null!=c&&null==f||(l===s.Gr.DEFAULTS?o.set(t,f):r[t]=f)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(o.size){const t=(0,l.oY)(u)?.store;if(t)for(const[n,e]of o)t.set(n,e,s.Gr.DEFAULTS)}return u}};return n=(0,r._)([(0,u.$)("esri.core.Clonable")],n),n};let f=class extends(c(o.A)){};f=(0,r._)([(0,u.$)("esri.core.Clonable")],f),(f||(f={})).ClonableMixin=c;const h=f},72258:(t,n,e)=>{e.d(n,{UR:()=>_,p5:()=>b,xK:()=>T});var r=e(53966),o=e(34727),i=e(83047),a=e(77690),s=e(29242),l=e(58083),u=e(9093),c=e(38954),f=e(51850),h=e(98764),d=e(48353),m=e(65806),p=e(27615),g=e(21325),M=e(73354),y=e(22141);const x=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function b(t,n,{vertexSpace:e,spatialReference:r}){if("georeferenced"===e.type){const o=t;if(!(0,m.g)(n,o,r))return!1;const{origin:i}=e;return(0,c.d)(t,o,i),!0}const o=(0,h.lO)(r),i=t;if(!(0,m.g)(n,i,o))return!1;const{origin:a}=e,s=C;if(!(0,d.l)(r,a,s,o))return!1;const u=(0,l.B8)(C,s);return null!=u&&((0,c.t)(t,i,u),!0)}function _(t,n,e){const{vertexSpace:r,transform:o,vertexAttributes:i}=t,s=(0,p.Hq)(r)?o:null,f=B(t.spatialReference,e,F.SOURCE_AND_TARGET);if((0,p.yJ)(r,n)&&(!s||(0,l.t2)(s.localMatrix,u.zK))&&S(f)){const{position:t,normal:n,tangent:r}=i,o=e?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?r:r?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:e},{origin:r},o,i){const a=A(n,i);if(!(0,d.l)(n,r,E,a))return(0,y.CN)(x(),n,a),null;if(e&&(0,l.lw)(E,E,e.localMatrix),!(0,d.l)(n,o,N,a))return(0,y.CN)(x(),a,n),null;(0,l.B8)(N,N);const s=(0,l.lw)(E,N,E);return v(s,n,i,F.SOURCE_AND_TARGET),w(t,s)}(t,t.vertexSpace,n.origin,e):function({spatialReference:t,vertexAttributes:n,transform:e},{origin:r},o,i){const a=A(t,i);if(!(0,d.l)(t,r,E,a))return(0,y.CN)(x(),t,a),null;e&&(0,l.lw)(E,E,e.localMatrix),v(E,t,i,F.SOURCE);const s=new Float64Array(n.position.length),u=function(t,n,e,r,o){(0,M.t)(r,t,n);const i=new Float64Array(t.length);return(0,y.$5)(r,o,i,e)?i:((0,y.CN)(x(),o,e),null)}(n.position,E,t,s,a);if(!u)return null;const f=function(t,n,e,r,o,i){if(null==o)return null;const a=new Float32Array(o.length);return(0,y.qs)(o,a,i),(0,y.si)(a,t,n,e,r,a)?a:((0,y.CN)(x(),r,n),null)}(u,t,s,a,n.normal,E);if(n.normal&&!f)return null;const h=function(t,n,e,r,o,i){if(null==o)return null;const a=new Float32Array(o.length);return(0,y.KM)(o,a,i),(0,y.Mv)(a,t,n,e,r,a)?a:((0,y.CN)(x(),r,n),null)}(u,t,s,a,n.tangent,E);if(n.tangent&&!h)return null;if(o){const t=(0,c.u)(O,o);(0,M.a)(u,u,t)}return{position:u,normal:f,tangent:h}}(t,t.vertexSpace,n.origin,e);case"georeferenced":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:e},{origin:r},o,i){const s=A(n,i);if(!(0,d.l)(n,o,E,s))return(0,y.CN)(x(),n,s),null;const u=1/B(n,i,F.TARGET);(0,l.hs)(E,E,[u,u,u]);const c=(0,l.B8)(N,E),{position:f,normal:h,tangent:m}=function(t,n,e){if(!n)return t;if(!e){const{position:e,normal:r,tangent:o}=t;return{position:(0,M.a)(new Float64Array(e.length),e,n),tangent:o,normal:r}}const r=w(t,e.localMatrix);return(0,M.a)(r.position,r.position,n),r}(t,r,e),p=new Float64Array(f.length),g=function(t,n,e,r,o){const i=(0,y.gr)(t,n,r,o);if(!i)return(0,y.CN)(x(),n,o),null;const a=new Float64Array(i.length);return(0,M.t)(a,i,e),a}(f,n,c,p,s);if(!g)return null;const b=(0,a.Ge)(R,c),_=function(t,n,e,r,o,i,a){if(null==t)return null;const s=a??new Float32Array(t.length);return(0,y.X4)(t,n,e,r,o,s)?((0,M.b)(s,s,i),s):((0,y.CN)(x(),e,o),null)}(h,f,n,p,s,b,h!==t.normal?h:void 0);if(!_&&h)return null;const v=function(t,n,e,r,o,i,a){if(null==t)return null;const s=a??new Float32Array(t.length);return(0,y.xA)(t,n,e,r,o,s)?((0,M.b)(s,s,i,4),s):((0,y.CN)(x(),e,o),null)}(m,f,n,p,s,b,m!==t.tangent?m:void 0);return!v&&m?null:{position:g,normal:_,tangent:v}}(t,t.vertexSpace,n.origin,e):function({vertexAttributes:t,transform:n,spatialReference:e},{origin:r},o,i){const a=B(e,i,F.SOURCE_AND_TARGET),s=r||!S(a)?(0,l.C)(E,n?.localMatrix??u.zK):null;s&&v(s,e,i,F.SOURCE_AND_TARGET);const{position:f,normal:h,tangent:d}=s?w(t,s):t,m=i?.allowBufferReuse,p=m?f:new Float64Array(f.length);let g=f;if(r&&(g=(0,M.a)(p,g,r)),o){const t=(0,c.u)(O,o);g=(0,M.a)(p,g,t)}return{position:g!==t.position||m?g:g.slice(),normal:h!==t.normal||m?h:h?.slice(),tangent:d!==t.tangent||m?d:d?.slice()}}(t,t.vertexSpace,n.origin,e)}}function A(t,n){return n?.useEllipsoid&&(0,g.B3)(t)?h.Y0:(0,h.lO)(t)}function w(t,n){const e=new Float64Array(t.position.length);(0,M.t)(e,t.position,n);const r=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return r&&t.normal&&(0,y.qs)(t.normal,r,n),o&&t.tangent&&(0,y.KM)(t.tangent,o,n),{position:e,normal:r,tangent:o}}function v(t,n,e,r){const o=B(n,e,r);S(o)||(0,l.hs)(t,t,[o,o,o])}function B(t,n,e){const r=!!(e&F.SOURCE),o=!!(e&F.TARGET),i=n?.sourceUnit,a=n?.targetUnit;if(!i&&!a)return 1;let s=T(i,t);r||!i||S(s)||(x().warn("source unit conversion not supported"),s=1);let l=1/T(a,t);return o||!a||S(l)||(x().warn("target unit conversion not supported"),l=1),s*l}function S(t){return(0,o.Io)(t,1)}function T(t,n){if(null==t)return 1;const e=(0,i.KX)(n);return 1/(0,i.oU)(e,"meters",t)}const E=(0,u.vt)(),N=(0,u.vt)(),R=(0,s.vt)(),O=(0,f.vt)(),C=(0,u.vt)();var F,X;(X=F||(F={}))[X.NONE=0]="NONE",X[X.SOURCE=1]="SOURCE",X[X.TARGET=2]="TARGET",X[X.SOURCE_AND_TARGET=3]="SOURCE_AND_TARGET"},73354:(t,n,e)=>{e.d(n,{a:()=>f,b:()=>s,c:()=>a,d:()=>o,e:()=>h,f:()=>c,l:()=>u,n:()=>d,t:()=>i});var r=e(40876);function o(t,n,e){i(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function i(t,n,e,r=3,o=r){if(t.length/r!==Math.ceil(n.length/o))return t;const i=t.length/r,a=e[0],s=e[1],l=e[2],u=e[4],c=e[5],f=e[6],h=e[8],d=e[9],m=e[10],p=e[12],g=e[13],M=e[14];let y=0,x=0;for(let e=0;e<i;e++){const e=n[y],i=n[y+1],b=n[y+2];t[x]=a*e+u*i+h*b+p,t[x+1]=s*e+c*i+d*b+g,t[x+2]=l*e+f*i+m*b+M,y+=o,x+=r}return t}function a(t,n,e){s(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function s(t,n,e,r=3,o=r){if(t.length/r!==Math.ceil(n.length/o))return;const i=t.length/r,a=e[0],s=e[1],l=e[2],u=e[3],c=e[4],f=e[5],h=e[6],d=e[7],m=e[8];let p=0,g=0;for(let e=0;e<i;e++){const e=n[p],i=n[p+1],M=n[p+2];t[g]=a*e+u*i+h*M,t[g+1]=s*e+c*i+d*M,t[g+2]=l*e+f*i+m*M,p+=o,g+=r}}function l(t,n,e,r=3,o=r){const i=Math.min(t.length/r,n.length/o);let a=0,s=0;for(let l=0;l<i;l++)t[s]=e*n[a],t[s+1]=e*n[a+1],t[s+2]=e*n[a+2],a+=o,s+=r;return t}function u(t,n,e,r){c(t.typedBuffer,n.typedBuffer,e,r,t.typedBufferStride,n.typedBufferStride)}function c(t,n,e,o,i=3,a=i){const s=Math.min(t.length/i,n.length/a);let l=0,u=0;const c=1/r.Tf;for(let r=0;r<s;r++)t[u]=o*(e*n[l])**c,t[u+1]=o*(e*n[l+1])**c,t[u+2]=o*(e*n[l+2])**c,l+=a,u+=i}function f(t,n,e,r=3,o=r){const i=t.length/r;if(i!==Math.ceil(n.length/o))return t;let a=0,s=0;for(let l=0;l<i;l++)t[s]=n[a]+e[0],t[s+1]=n[a+1]+e[1],t[s+2]=n[a+2]+e[2],a+=o,s+=r;return t}function h(t,n){d(t.typedBuffer,n.typedBuffer,t.typedBufferStride,n.typedBufferStride)}function d(t,n,e=3,r=e){const o=Math.min(t.length/e,n.length/r);let i=0,a=0;for(let s=0;s<o;s++){const o=n[i],s=n[i+1],l=n[i+2],u=o*o+s*s+l*l;if(u>0){const n=1/Math.sqrt(u);t[a]=n*o,t[a+1]=n*s,t[a+2]=n*l}i+=r,a+=e}}e(44208),e(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:d,normalizeView:h,scale:l,scaleView:function(t,n,e){l(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)},shiftRight:function(t,n,e){const r=Math.min(t.count,n.count),o=t.typedBuffer,i=t.typedBufferStride,a=n.typedBuffer,s=n.typedBufferStride;let l=0,u=0;for(let t=0;t<r;t++)o[u]=a[l]>>e,o[u+1]=a[l+1]>>e,o[u+2]=a[l+2]>>e,l+=s,u+=i},transformMat3:s,transformMat3View:a,transformMat4:i,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},75503:(t,n,e)=>{e.d(n,{E:()=>B,w:()=>s});var r=e(4576),o=e(21818),i=(e(44208),e(3694)),a=e(11006);class s{constructor(t=9,n){this._compareMinX=h,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),n&&("function"==typeof n?this._toBBox=n:this._initFormat(n)),this.clear()}destroy(){this.clear(),_.prune(),A.prune(),w.prune(),v.prune()}all(t){l(this._data,t)}search(t,n){let e=this._data;const r=this._toBBox;if(x(t,e))for(_.clear();e;){for(let o=0,i=e.children.length;o<i;o++){const i=e.children[o],a=e.leaf?r(i):i;x(t,a)&&(e.leaf?n(i):y(t,a)?l(i,n):_.push(i))}e=_.pop()}}collides(t){let n=this._data;const e=this._toBBox;if(!x(t,n))return!1;for(_.clear();n;){for(let r=0,o=n.children.length;r<o;r++){const o=n.children[r],i=n.leaf?e(o):o;if(x(t,i)){if(n.leaf||y(t,i))return!0;_.push(o)}}n=_.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let n=0,e=t.length;n<e;n++)this.insert(t[n]);return this}let n=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===n.height)this._splitRoot(this._data,n);else{if(this._data.height<n.height){const t=this._data;this._data=n,n=t}this._insert(n,this._data.height-n.height-1,!0)}else this._data=n;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(t){if(!t)return this;let n,e=this._data,i=null,a=0,s=!1;const l=this._toBBox(t);for(w.clear(),v.clear();e||w.length>0;){if(e||(e=w.pop(),i=w.data[w.length-1],a=v.pop()??0,s=!0),e.leaf&&(n=(0,r.qh)(e.children,(0,o.zI)(t),e.children.length,e.indexHint),-1!==n))return e.children.splice(n,1),w.push(e),this._condense(w),this;s||e.leaf||!y(e,l)?i?(a++,e=i.children[a],s=!1):e=null:(w.push(e),v.push(a),a=0,i=e,e=e.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,n,e,r){const o=e-n+1;let i=this._maxEntries;if(o<=i){const r=new T(t.slice(n,e+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(o)/Math.log(i)),i=Math.ceil(o/i**(r-1)));const a=new E([]);a.height=r;const s=Math.ceil(o/i),l=s*Math.ceil(Math.sqrt(i));b(t,n,e,l,this._compareMinX);for(let o=n;o<=e;o+=l){const n=Math.min(o+l-1,e);b(t,o,n,s,this._compareMinY);for(let e=o;e<=n;e+=s){const o=Math.min(e+s-1,n);a.children.push(this._build(t,e,o,r-1))}}return u(a,this._toBBox),a}_insert(t,n,e){const r=this._toBBox,o=e?t:r(t);w.clear();const i=function(t,n,e,r){for(;r.push(n),!0!==n.leaf&&r.length-1!==e;){let e,r=1/0,o=1/0;for(let i=0,a=n.children.length;i<a;i++){const a=n.children[i],s=m(a),l=g(t,a)-s;l<o?(o=l,r=s<r?s:r,e=a):l===o&&s<r&&(r=s,e=a)}n=e||n.children[0]}return n}(o,this._data,n,w);for(i.children.push(t),f(i,o);n>=0&&w.data[n].children.length>this._maxEntries;)this._split(w,n),n--;!function(t,n,e){for(let r=e;r>=0;r--)f(n.data[r],t)}(o,w,n)}_split(t,n){const e=t.data[n],r=e.children.length,o=this._minEntries;this._chooseSplitAxis(e,o,r);const i=this._chooseSplitIndex(e,o,r);if(!i)return;const a=e.children.splice(i,e.children.length-i),s=e.leaf?new T(a):new E(a);s.height=e.height,u(e,this._toBBox),u(s,this._toBBox),n?t.data[n-1].children.push(s):this._splitRoot(e,s)}_splitRoot(t,n){this._data=new E([t,n]),this._data.height=t.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(t,n,e){let r,o,i;r=o=1/0;for(let a=n;a<=e-n;a++){const n=c(t,0,a,this._toBBox),s=c(t,a,e,this._toBBox),l=M(n,s),u=m(n)+m(s);l<r?(r=l,i=a,o=u<o?u:o):l===r&&u<o&&(o=u,i=a)}return i}_chooseSplitAxis(t,n,e){const r=t.leaf?this._compareMinX:h,o=t.leaf?this._compareMinY:d;this._allDistMargin(t,n,e,r)<this._allDistMargin(t,n,e,o)&&t.children.sort(r)}_allDistMargin(t,n,e,r){t.children.sort(r);const o=this._toBBox,i=c(t,0,n,o),a=c(t,e-n,e,o);let s=p(i)+p(a);for(let r=n;r<e-n;r++){const n=t.children[r];f(i,t.leaf?o(n):n),s+=p(i)}for(let r=e-n-1;r>=n;r--){const n=t.children[r];f(a,t.leaf?o(n):n),s+=p(a)}return s}_condense(t){for(let n=t.length-1;n>=0;n--){const e=t.data[n];if(0===e.children.length)if(n>0){const o=t.data[n-1],i=o.children;i.splice((0,r.qh)(i,e,i.length,o.indexHint),1)}else this.clear();else u(e,this._toBBox)}}_initFormat(t){const n=["return a"," - b",";"];this._compareMinX=new Function("a","b",n.join(t[0])),this._compareMinY=new Function("a","b",n.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,n){let e=t;for(A.clear();e;){if(!0===e.leaf)for(const t of e.children)n((0,o.zI)(t));else A.pushArray(e.children);e=A.pop()??null}}function u(t,n){c(t,0,t.children.length,n,t)}function c(t,n,e,r,o){o||(o=new T([])),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let i,a=n;a<e;a++)i=t.children[a],f(o,t.leaf?r(i):i);return o}function f(t,n){t.minX=Math.min(t.minX,n.minX),t.minY=Math.min(t.minY,n.minY),t.maxX=Math.max(t.maxX,n.maxX),t.maxY=Math.max(t.maxY,n.maxY)}function h(t,n){return t.minX-n.minX}function d(t,n){return t.minY-n.minY}function m(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function p(t){return t.maxX-t.minX+(t.maxY-t.minY)}function g(t,n){return(Math.max(n.maxX,t.maxX)-Math.min(n.minX,t.minX))*(Math.max(n.maxY,t.maxY)-Math.min(n.minY,t.minY))}function M(t,n){const e=Math.max(t.minX,n.minX),r=Math.max(t.minY,n.minY),o=Math.min(t.maxX,n.maxX),i=Math.min(t.maxY,n.maxY);return Math.max(0,o-e)*Math.max(0,i-r)}function y(t,n){return t.minX<=n.minX&&t.minY<=n.minY&&n.maxX<=t.maxX&&n.maxY<=t.maxY}function x(t,n){return n.minX<=t.maxX&&n.minY<=t.maxY&&n.maxX>=t.minX&&n.maxY>=t.minY}function b(t,n,e,r,o){const i=[n,e];for(;i.length;){const n=i.pop(),e=i.pop();if(n-e<=r)continue;const s=e+Math.ceil((n-e)/r/2)*r;(0,a.q)(t,s,e,n,o),i.push(e,s,s,n)}}const _=new i.A,A=new i.A,w=new i.A,v=new i.A({deallocator:void 0});class B{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends B{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class T extends S{constructor(t){super(),this.children=t,this.leaf=!0}}class E extends S{constructor(t){super(),this.children=t,this.leaf=!1}}},77690:(t,n,e)=>{e.d(n,{B8:()=>s,Ge:()=>h,I0:()=>f,KC:()=>l,hZ:()=>i,hs:()=>c,lw:()=>u,mg:()=>a,z0:()=>o});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function i(t,n,e,r,o,i,a,s,l,u){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=i,t[5]=a,t[6]=s,t[7]=l,t[8]=u,t}function a(t,n){if(t===n){const e=n[1],r=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function s(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],s=n[5],l=n[6],u=n[7],c=n[8],f=c*a-s*u,h=-c*i+s*l,d=u*i-a*l;let m=e*f+r*h+o*d;return m?(m=1/m,t[0]=f*m,t[1]=(-c*r+o*u)*m,t[2]=(s*r-o*a)*m,t[3]=h*m,t[4]=(c*e-o*l)*m,t[5]=(-s*e+o*i)*m,t[6]=d*m,t[7]=(-u*e+r*l)*m,t[8]=(a*e-r*i)*m,t):null}function l(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],s=n[5],l=n[6],u=n[7],c=n[8];return t[0]=a*c-s*u,t[1]=o*u-r*c,t[2]=r*s-o*a,t[3]=s*l-i*c,t[4]=e*c-o*l,t[5]=o*i-e*s,t[6]=i*u-a*l,t[7]=r*l-e*u,t[8]=e*a-r*i,t}function u(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7],f=n[8],h=e[0],d=e[1],m=e[2],p=e[3],g=e[4],M=e[5],y=e[6],x=e[7],b=e[8];return t[0]=h*r+d*a+m*u,t[1]=h*o+d*s+m*c,t[2]=h*i+d*l+m*f,t[3]=p*r+g*a+M*u,t[4]=p*o+g*s+M*c,t[5]=p*i+g*l+M*f,t[6]=y*r+x*a+b*u,t[7]=y*o+x*s+b*c,t[8]=y*i+x*l+b*f,t}function c(t,n,e){const r=e[0],o=e[1],i=e[2];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=i*n[6],t[7]=i*n[7],t[8]=i*n[8],t}function f(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],a=e+e,s=r+r,l=o+o,u=e*a,c=r*a,f=r*s,h=o*a,d=o*s,m=o*l,p=i*a,g=i*s,M=i*l;return t[0]=1-f-m,t[3]=c-M,t[6]=h+g,t[1]=c+M,t[4]=1-u-m,t[7]=d-p,t[2]=h-g,t[5]=d+p,t[8]=1-u-f,t}function h(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],s=n[5],l=n[6],u=n[7],c=n[8],f=n[9],h=n[10],d=n[11],m=n[12],p=n[13],g=n[14],M=n[15],y=e*s-r*a,x=e*l-o*a,b=e*u-i*a,_=r*l-o*s,A=r*u-i*s,w=o*u-i*l,v=c*p-f*m,B=c*g-h*m,S=c*M-d*m,T=f*g-h*p,E=f*M-d*p,N=h*M-d*g;let R=y*N-x*E+b*T+_*S-A*B+w*v;return R?(R=1/R,t[0]=(s*N-l*E+u*T)*R,t[1]=(l*S-a*N-u*B)*R,t[2]=(a*E-s*S+u*v)*R,t[3]=(o*E-r*N-i*T)*R,t[4]=(e*N-o*S+i*B)*R,t[5]=(r*S-e*E-i*v)*R,t[6]=(p*w-g*A+M*_)*R,t[7]=(g*b-m*w-M*x)*R,t[8]=(m*A-p*b+M*y)*R,t):null}function d(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}const m=u,p=d;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},adjoint:l,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:function(t){const n=t[0],e=t[1],r=t[2],o=t[3],i=t[4],a=t[5],s=t[6],l=t[7],u=t[8];return n*(u*i-a*l)+e*(-u*o+a*s)+r*(l*o-i*s)},equals:function(t,n){const e=t[0],o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=n[0],d=n[1],m=n[2],p=n[3],g=n[4],M=n[5],y=n[6],x=n[7],b=n[8],_=(0,r.FD)();return Math.abs(e-h)<=_*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(o-d)<=_*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(i-m)<=_*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(a-p)<=_*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(s-g)<=_*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(l-M)<=_*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(u-y)<=_*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-x)<=_*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(f-b)<=_*Math.max(1,Math.abs(f),Math.abs(b))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:f,fromRotation:function(t,n){const e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:s,isOrthoNormal:function(t){const n=(0,r.FD)(),e=t[0],o=t[1],i=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8];return Math.abs(1-(e*e+a*a+u*u))<=n&&Math.abs(1-(o*o+s*s+c*c))<=n&&Math.abs(1-(i*i+l*l+f*f))<=n},mul:m,multiply:u,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},multiplyScalarAndAdd:function(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[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},normalFromMat4:h,normalFromMat4Legacy:function(t,n){const e=n[0],r=n[1],o=n[2],i=n[4],a=n[5],s=n[6],l=n[8],u=n[9],c=n[10],f=c*a-s*u,h=-c*i+s*l,d=u*i-a*l,m=e*f+r*h+o*d;if(!m)return null;const p=1/m;return t[0]=f*p,t[1]=(-c*r+o*u)*p,t[2]=(s*r-o*a)*p,t[3]=h*p,t[4]=(c*e-o*l)*p,t[5]=(-s*e+o*i)*p,t[6]=d*p,t[7]=(-u*e+r*l)*p,t[8]=(a*e-r*i)*p,t},projection:function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7],f=n[8],h=Math.sin(e),d=Math.cos(e);return t[0]=d*r+h*a,t[1]=d*o+h*s,t[2]=d*i+h*l,t[3]=d*a-h*r,t[4]=d*s-h*o,t[5]=d*l-h*i,t[6]=u,t[7]=c,t[8]=f,t},scale:c,scaleByVec2:function(t,n,e){const r=e[0],o=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:p,subtract:d,translate:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7],f=n[8],h=e[0],d=e[1];return t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=s,t[5]=l,t[6]=h*r+d*a+u,t[7]=h*o+d*s+c,t[8]=h*i+d*l+f,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},93223:(t,n,e)=>{e.d(n,{e:()=>i});var r=e(66552),o=e(10107);function i(t,n={}){const e=t instanceof r.J?t:new r.J(t,n),{alwaysWriteDefaults:i,default:a,ignoreUnknown:s=!0,name:l,nonNullable:u,readOnly:c=!1}=n;return(0,o.MZ)({type:s?e.apiValues:String,json:{type:e.jsonValues,default:a,name:l,read:!c&&{reader:e.read},write:{writer:e.write,alwaysWriteDefaults:i}},nonNullable:u,readOnly:c})}},95488:(t,n,e)=>{e.d(n,{I:()=>o});var r=e(11406);class o extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const n=t.slice();for(const t of n)t.onInvalidated(),t.onCommitted()}}}},95696:(t,n,e)=>{e.d(n,{A:()=>c});var r,o=e(90237),i=e(69540),a=e(25482),s=e(10107),l=(e(44208),e(53966),e(87811),e(93223)),u=e(40608);let c=class extends(i.A.ClonableMixin(a.A)){static{r=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,o._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,o._)([(0,s.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=r=(0,o._)([(0,u.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},98764:(t,n,e)=>{e.d(n,{Y0:()=>u,lO:()=>c});var r=e(73941),o=e(16930),i=e(21325);const a=new o.A(r.fv),s=new o.A(r.FY),l=new o.A(r.LJ),u=new o.A(r.Ro);function c(t){const n=f.get(t);if(n)return n;let e=a;if(t)if(t===s)e=s;else if(t===l)e=l;else{const n=t.wkid,r=t.latestWkid;if(null!=n||null!=r)(0,i.tl)(n)||(0,i.tl)(r)?e=s:((0,i.ZL)(n)||(0,i.ZL)(r))&&(e=l);else{const n=t.wkt2??t.wkt;if(n){const t=n.toUpperCase();t===h?e=s:t===d&&(e=l)}}}return f.set(t,e),e}const f=new Map,h=s.wkt.toUpperCase(),d=l.wkt.toUpperCase()}}]);
|