(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d134a92a"],{"0c53":function(t,e,i){"use strict";i.d(e,"a",(function(){return l})),i.d(e,"b",(function(){return h}));var n=i("b2cd"),r=i("c120");const s=128e3;let o=null,a=null;async function l(){return o||(o=u()),o}async function u(){const t=Object(r["a"])("esri-csp-restrictions")?await i.e("chunk-038b6711").then(i.bind(null,"a546")).then(t=>t.l):await i.e("chunk-47c1d7bd").then(i.bind(null,"cfdc")).then(t=>t.l);a=await t.load({locateFile:()=>Object(n["b"])("esri/core/libs/libtess/libtess.wasm")})}function h(t,e){const i=Math.max(t.length,s);return a.triangulate(t,e,i)}},"1d01":function(t,e,i){"use strict";i.d(e,"a",(function(){return c})),i.d(e,"b",(function(){return u})),i.d(e,"c",(function(){return h})),i.d(e,"d",(function(){return l}));Number.POSITIVE_INFINITY;const n=Math.PI,r=128/n,s=256/360,o=1/Math.LN2;function a(t,e){return(t%=e)>=0?t:t+e}function l(t){return a(t*r,256)}function u(t){return a(t*s,256)}function h(t){return Math.log(t)*o}function c(t,e,i){return t>=e&&t<=i||t>=i&&t<=e}},2629:function(t,e,i){"use strict";i.d(e,"a",(function(){return x}));var n=i("ab39"),r=i("8c81");function s(t,e){return t.x===e.x&&t.y===e.y}function o(t){if(!t)return;const e=t.length;if(e<=1)return;let i=0;for(let n=1;ni){r=!0;const t=(i-n)/c;c=i-n,e=(1-t)*s+t*e,a=(1-t)*o+t*a,--l}const f=this.writeVertex(s,o,0,0,u,h,h,-u,0,-1,n),d=this.writeVertex(s,o,0,0,u,h,-h,u,0,1,n);n+=c;const y=this.writeVertex(e,a,0,0,u,h,h,-u,0,-1,n),x=this.writeVertex(e,a,0,0,u,h,-h,u,0,1,n);this.writeTriangle(f,d,y),this.writeTriangle(d,y,x),s=e,o=a}}_tessellate(t,e){const i=t[0],r=t[t.length-1],o=s(i,r),x=o?3:2;if(t.length=0&&k>=0&&o>=0&&G(V,k,o),V=k,k=o,o};o&&(v=t[t.length-2],M.x=r.x-v.x,M.y=r.y-v.y,R=c(M),M.x/=R,M.y/=R);let j=!1;for(let s=0;sF&&(j=!0)),j){const e=(F-U)/B;B=F-U,v={x:(1-e)*v.x+e*t[s].x,y:(1-e)*v.y+e*t[s].y},--s}else v=t[s];L=v.x,w=v.y;const e=s<=0&&!j,i=s===t.length-1;if(e||(U+=B),P=i?o?t[1]:null:t[s+1],P?(M.x=P.x-L,M.y=P.y-w,R=c(M),M.x/=R,M.y/=R):(M.x=void 0,M.y=void 0),!o){if(e){l(E,M),S=E.x,C=E.y,m===n["d"].SQUARE&&(H(-M.y-M.x,M.x-M.y,M.x,M.y,0,-1),H(M.y-M.x,-M.x-M.y,M.x,M.y,0,1)),m===n["d"].ROUND&&(H(-M.y-M.x,M.x-M.y,M.x,M.y,-1,-1),H(M.y-M.x,-M.x-M.y,M.x,M.y,-1,1)),m!==n["d"].ROUND&&m!==n["d"].BUTT||(H(-M.y,M.x,M.x,M.y,0,-1),H(M.y,-M.x,M.x,M.y,0,1));continue}if(i){a(E,A),S=E.x,C=E.y,m!==n["d"].ROUND&&m!==n["d"].BUTT||(H(A.y,-A.x,-A.x,-A.y,0,-1),H(-A.y,A.x,-A.x,-A.y,0,1)),m===n["d"].SQUARE&&(H(A.y-A.x,-A.x-A.y,-A.x,-A.y,0,-1),H(-A.y-A.x,A.x-A.y,-A.x,-A.y,0,1)),m===n["d"].ROUND&&(H(A.y-A.x,-A.x-A.y,-A.x,-A.y,1,-1),H(-A.y-A.x,A.x-A.y,-A.x,-A.y,1,1));continue}}let r,x,z=-f(A,M);if(Math.abs(z)<.01)d(A,M)>0?(E.x=A.x,E.y=A.y,z=1,r=Number.MAX_VALUE,x=!0):(l(E,M),z=1,r=1,x=!1);else{E.x=(A.x+M.x)/z,E.y=(A.y+M.y)/z,r=c(E);const t=(r-1)*T*p;x=r>4||t>B&&t>R}S=E.x,C=E.y;let G=g;switch(g){case n["o"].BEVEL:r<1.05&&(G=n["o"].MITER);break;case n["o"].ROUND:r_&&(G=n["o"].BEVEL)}switch(G){case n["o"].MITER:if(H(E.x,E.y,-A.x,-A.y,0,-1),H(-E.x,-E.y,-A.x,-A.y,0,1),i)break;if(I){const t=j?0:U;V=this.writeVertex(L,w,S,C,M.x,M.y,E.x,E.y,0,-1,t),k=this.writeVertex(L,w,S,C,M.x,M.y,-E.x,-E.y,0,1,t)}break;case n["o"].BEVEL:{const t=z<0;let e,n,r,s;if(t){const t=V;V=k,k=t,e=O,n=D}else e=D,n=O;if(x)r=t?l(this.innerPrev,A):a(this.innerPrev,A),s=t?a(this.innerNext,M):l(this.innerNext,M);else{const e=t?h(this.inner,E):u(this.inner,E);r=e,s=e}const o=t?a(this.bevelStart,A):l(this.bevelStart,A);H(r.x,r.y,-A.x,-A.y,e.x,e.y);const c=H(o.x,o.y,-A.x,-A.y,n.x,n.y);if(i)break;const f=t?l(this.bevelEnd,M):a(this.bevelEnd,M);if(x){const t=this.writeVertex(L,w,S,C,-A.x,-A.y,0,0,0,0,U);V=this.writeVertex(L,w,S,C,M.x,M.y,s.x,s.y,e.x,e.y,U),k=this.writeVertex(L,w,S,C,M.x,M.y,f.x,f.y,n.x,n.y,U),this.writeTriangle(c,t,k)}else{if(I){const t=this.bevelMiddle;t.x=(o.x+f.x)/2,t.y=(o.y+f.y)/2,y(N,t,-A.x,-A.y),H(t.x,t.y,-A.x,-A.y,N.x,N.y),y(N,t,M.x,M.y),V=this.writeVertex(L,w,S,C,M.x,M.y,t.x,t.y,N.x,N.y,U),k=this.writeVertex(L,w,S,C,M.x,M.y,s.x,s.y,e.x,e.y,U)}else{const t=V;V=k,k=t}H(f.x,f.y,M.x,M.y,n.x,n.y)}if(t){const t=V;V=k,k=t}break}case n["o"].ROUND:{const t=z<0;let e,n;if(t){const t=V;V=k,k=t,e=O,n=D}else e=D,n=O;const s=t?h(this.inner,E):u(this.inner,E);let o,c;x?(o=t?l(this.innerPrev,A):a(this.innerPrev,A),c=t?a(this.innerNext,M):l(this.innerNext,M)):(o=s,c=s);const f=t?a(this.roundStart,A):l(this.roundStart,A),p=t?l(this.roundEnd,M):a(this.roundEnd,M),m=H(o.x,o.y,-A.x,-A.y,e.x,e.y),g=H(f.x,f.y,-A.x,-A.y,n.x,n.y);if(i)break;const _=this.writeVertex(L,w,S,C,-A.x,-A.y,0,0,0,0,U);x||this.writeTriangle(V,k,_);const b=h(this.outer,s),T=this.writeVertex(L,w,S,C,M.x,M.y,p.x,p.y,n.x,n.y,U);let v,P;const B=r>2;if(B){let e;r!==Number.MAX_VALUE?(b.x/=r,b.y/=r,e=d(A,b),e=(r*(e*e-1)+1)/e):e=-1,v=t?a(this.startBreak,A):l(this.startBreak,A),v.x+=A.x*e,v.y+=A.y*e,P=t?l(this.endBreak,M):a(this.endBreak,M),P.x+=M.x*e,P.y+=M.y*e}y(N,b,-A.x,-A.y);const R=this.writeVertex(L,w,S,C,-A.x,-A.y,b.x,b.y,N.x,N.y,U);y(N,b,M.x,M.y);const F=I?this.writeVertex(L,w,S,C,M.x,M.y,b.x,b.y,N.x,N.y,U):R,G=_,j=I?this.writeVertex(L,w,S,C,M.x,M.y,0,0,0,0,U):_;let W=-1,q=-1;if(B&&(y(N,v,-A.x,-A.y),W=this.writeVertex(L,w,S,C,-A.x,-A.y,v.x,v.y,N.x,N.y,U),y(N,P,M.x,M.y),q=this.writeVertex(L,w,S,C,M.x,M.y,P.x,P.y,N.x,N.y,U)),I?B?(this.writeTriangle(G,g,W),this.writeTriangle(G,W,R),this.writeTriangle(j,F,q),this.writeTriangle(j,q,T)):(this.writeTriangle(G,g,R),this.writeTriangle(j,F,T)):B?(this.writeTriangle(_,g,W),this.writeTriangle(_,W,q),this.writeTriangle(_,q,T)):(this.writeTriangle(_,g,R),this.writeTriangle(_,F,T)),x?(V=this.writeVertex(L,w,S,C,M.x,M.y,c.x,c.y,e.x,e.y,U),k=T):(V=I?this.writeVertex(L,w,S,C,M.x,M.y,c.x,c.y,e.x,e.y,U):m,this.writeTriangle(V,j,T),k=T),t){const t=V;V=k,k=t}break}}}}}},"2da5":function(t,e,i){"use strict";i.d(e,"a",(function(){return u})),i.d(e,"b",(function(){return l}));var n,r=i("8c81"),s=i("3976"),o=i("1d01");class a{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class l{constructor(t,e,i,n=8,s=8){this.lines=[],this.starts=[],this.validateTessellation=!0,this.pixelRatio=n,this.pixelMargin=s,this.tileSize=r["P"]*n,this.dz=t,this.yPos=e,this.xPos=i}setPixelMargin(t){t!==this.pixelMargin&&(this.pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this.finalRatio=this.tileSize/t*(1<>this.dz;e>i&&(e=i),this.margin=e,this.xmin=i*this.xPos-e,this.ymin=i*this.yPos-e,this.xmax=this.xmin+i+2*e,this.ymax=this.ymin+i+2*e}reset(t){this.type=t,this.lines=[],this.starts=[],this.line=null,this.start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new s["b"](t,e),this._firstPt=new s["b"](t,e),this._dist=0}lineTo(t,e){const i=this._isIn(t,e),n=new s["b"](t,e),r=s["b"].distance(this._prevPt,n);let o,l,u,h,c,f,d,y;if(i)this._prevIsIn?this._lineTo(t,e,!0):(o=this._prevPt,l=n,u=this._intersect(l,o),this.start=this._dist+r*(1-this._r),this._lineTo(u.x,u.y,!0),this._lineTo(l.x,l.y,!0));else if(this._prevIsIn)l=this._prevPt,o=n,u=this._intersect(l,o),this._lineTo(u.x,u.y,!0),this._lineTo(o.x,o.y,!1);else{const t=this._prevPt,e=n;if(t.x<=this.xmin&&e.x<=this.xmin||t.x>=this.xmax&&e.x>=this.xmax||t.y<=this.ymin&&e.y<=this.ymin||t.y>=this.ymax&&e.y>=this.ymax)this._lineTo(e.x,e.y,!1);else{const i=[];if((t.xthis.xmin||t.x>this.xmin&&e.x=this.ymax?f=!0:i.push(new a(h,this.xmin,y))),(t.xthis.xmax||t.x>this.xmax&&e.x=this.ymax?f=!0:i.push(new a(h,this.xmax,y))),(t.ythis.ymin||t.y>this.ymin&&e.y=this.xmax?c=!0:i.push(new a(h,d,this.ymin))),(t.ythis.ymax||t.y>this.ymax&&e.y=this.xmax?c=!0:i.push(new a(h,d,this.ymax))),0===i.length)c?f?this._lineTo(this.xmax,this.ymax,!0):this._lineTo(this.xmax,this.ymin,!0):f?this._lineTo(this.xmin,this.ymax,!0):this._lineTo(this.xmin,this.ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this.start=this._dist+r*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this.start=this._dist+r*i[0].ratio;for(let t=0;t2){const t=this._firstPt,e=this._prevPt;t.x===e.x&&t.y===e.y||this.lineTo(t.x,t.y);const i=this.line;let n=i.length;for(;n>=4&&(i[0].x===i[1].x&&i[0].x===i[n-2].x||i[0].y===i[1].y&&i[0].y===i[n-2].y);)i.pop(),i[0].x=i[n-2].x,i[0].y=i[n-2].y,--n}}result(t=!0){return this._pushLine(),0===this.lines.length?null:(this.type===s["a"].Polygon&&t&&h.simplify(this.tileSize,this.margin*this.finalRatio,this.lines),this.lines)}resultWithStarts(){if(this.type!==s["a"].LineString)throw new Error("Only valid for lines");this._pushLine();const t=this.lines,e=t.length;if(0===e)return null;const i=[];for(let n=0;n=this.xmin&&t<=this.xmax&&e>=this.ymin&&e<=this.ymax}_intersect(t,e){let i,n,r;if(e.x>=this.xmin&&e.x<=this.xmax)n=e.y<=this.ymin?this.ymin:this.ymax,r=(n-t.y)/(e.y-t.y),i=t.x+r*(e.x-t.x);else if(e.y>=this.ymin&&e.y<=this.ymax)i=e.x<=this.xmin?this.xmin:this.xmax,r=(i-t.x)/(e.x-t.x),n=t.y+r*(e.y-t.y);else{n=e.y<=this.ymin?this.ymin:this.ymax,i=e.x<=this.xmin?this.xmin:this.xmax;const s=(i-t.x)/(e.x-t.x),o=(n-t.y)/(e.y-t.y);s0&&(this.lines.push(this.line),this.starts.push(this.start)):this.type===s["a"].LineString?this.line.length>1&&(this.lines.push(this.line),this.starts.push(this.start)):this.type===s["a"].Polygon&&this.line.length>3&&(this.lines.push(this.line),this.starts.push(this.start))),this.line=[],this.start=0}_moveTo(t,e,i){this.type!==s["a"].Polygon?i&&(t=Math.round((t-(this.xmin+this.margin))*this.finalRatio),e=Math.round((e-(this.ymin+this.margin))*this.finalRatio),this.line.push(new s["b"](t,e))):(i||(tthis.xmax&&(t=this.xmax),ethis.ymax&&(e=this.ymax)),t=Math.round((t-(this.xmin+this.margin))*this.finalRatio),e=Math.round((e-(this.ymin+this.margin))*this.finalRatio),this.line.push(new s["b"](t,e)),this._is_h=!1,this._is_v=!1)}_lineTo(t,e,i){let n,r;if(this.type!==s["a"].Polygon)if(i){if(t=Math.round((t-(this.xmin+this.margin))*this.finalRatio),e=Math.round((e-(this.ymin+this.margin))*this.finalRatio),this.line.length>0&&(n=this.line[this.line.length-1],n.equals(t,e)))return;this.line.push(new s["b"](t,e))}else this.line&&this.line.length>0&&this._pushLine();else if(i||(tthis.xmax&&(t=this.xmax),ethis.ymax&&(e=this.ymax)),t=Math.round((t-(this.xmin+this.margin))*this.finalRatio),e=Math.round((e-(this.ymin+this.margin))*this.finalRatio),this.line&&this.line.length>0){n=this.line[this.line.length-1];const i=n.x===t,o=n.y===e;if(i&&o)return;this._is_h&&i||this._is_v&&o?(n.x=t,n.y=e,r=this.line[this.line.length-2],r.x===t&&r.y===e?(this.line.pop(),this.line.length<=1?(this._is_h=!1,this._is_v=!1):(r=this.line[this.line.length-2],this._is_h=r.x===t,this._is_v=r.y===e)):(this._is_h=r.x===t,this._is_v=r.y===e)):(this.line.push(new s["b"](t,e)),this._is_h=i,this._is_v=o)}else this.line.push(new s["b"](t,e))}}class u{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this.lines=[],this.line=null}moveTo(t,e){this.line&&this.lines.push(this.line),this.line=[];const i=this._ratio;this.line.push(new s["b"](t*i,e*i))}lineTo(t,e){const i=this._ratio;this.line.push(new s["b"](t*i,e*i))}close(){const t=this.line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this.line&&this.lines.push(this.line),0===this.lines.length?null:this.lines}}!function(t){t[t.sideLeft=0]="sideLeft",t[t.sideRight=1]="sideRight",t[t.sideTop=2]="sideTop",t[t.sideBottom=3]="sideBottom"}(n||(n={}));class h{static simplify(t,e,i){if(!i)return;const r=-e,s=t+e,o=-e,a=t+e,l=[],u=[],c=i.length;for(let h=0;he.y?(l.push(h),l.push(i),l.push(n.sideLeft),l.push(-1)):(u.push(h),u.push(i),u.push(n.sideLeft),u.push(-1))),c.x>=s&&(c.y=a&&(c.x>e.x?(l.push(h),l.push(i),l.push(n.sideBottom),l.push(-1)):(u.push(h),u.push(i),u.push(n.sideBottom),u.push(-1)))),c=e}if(0===l.length||0===u.length)return;h.fillParent(i,u,l),h.fillParent(i,l,u);const f=[];h.calcDeltas(f,u,l),h.calcDeltas(f,l,u),h.addDeltas(f,i)}static fillParent(t,e,i){const r=i.length,s=e.length;for(let a=0;a1&&n[s-2]===r?0:(n.push(r),h.calcDelta(r,i,e,n)+1)}static addDeltas(t,e){const i=t.length;let r=0;for(let n=0;nr&&(r=e)}for(let s=0;s=0?t:t+e}function h(t){return u(t*o,256)}function c(t){return Math.log(t)*l}function f(t,e,i){return t*(1-i)+e*i}},"54b6":function(t,e,i){"use strict";i.r(e),i.d(e,"default",(function(){return ut}));var n=i("f4cc"),r=i("ff93"),s=i("b2b2"),o=i("3b19");function a(t){return 746===t||747===t||!(t<4352)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103&&!(t>=65097&&t<=65103)||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351&&!(t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=12592&&t<=12687||t>=43360&&t<=43391||t>=55216&&t<=55295||t>=4352&&t<=4607||t>=44032&&t<=55215||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12688&&t<=12703||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543&&12540!==t||t>=65280&&t<=65519&&!(65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||t>=65104&&t<=65135&&!(t>=65112&&t<=65118||t>=65123&&t<=65126)||t>=5120&&t<=5759||t>=6320&&t<=6399||t>=65040&&t<=65055||t>=19904&&t<=19967||t>=40960&&t<=42127||t>=42128&&t<=42191)}function l(t){return!(t<11904)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=65280&&t<=65519||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543||t>=65040&&t<=65055||t>=42128&&t<=42191||t>=40960&&t<=42127)}function u(t){switch(t){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 h(t){switch(t){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var c=i("a9c0");const f=24,d=17;class y{constructor(t,e,i,n,r,s,o){this._glyphItems=t,this._maxWidth=e,this._lineHeight=i,this._letterSpacing=n,this._hAnchor=r,this._vAnchor=s,this._justify=o}getShaping(t,e,i){const n=this._letterSpacing,r=this._lineHeight,s=this._justify,o=this._maxWidth,c=[];let f=0,d=0;const y=t.length;for(let l=0;l0&&(x=f/Math.max(1,Math.ceil(f/o)));const p=t.indexOf("​")>=0,m=[];for(let a=0;ae&&h(c[i].codePoint);)c[i].glyphMosaicItem=null,--i;if(e<=i){const t=c[e].x;for(let r=e;r<=i;r++)c[r].x-=t,c[r].y=d;let n=c[i].x;c[i].glyphMosaicItem&&(n+=c[i].glyphMosaicItem.metrics.advance),_=Math.max(n,_),s&&this._applyJustification(c,e,i)}T=t,d+=b}if(c.length>0){const t=g.length-1,i=(s-this._hAnchor)*_;let n=(-this._vAnchor*(t+1)+.5)*r;e&&t&&(n+=t*r);for(const e of c)e.x+=i,e.y+=n}return c.filter(t=>t.glyphMosaicItem)}static getTextBox(t,e){if(!t.length)return null;let i=1/0,n=1/0,r=0,s=0;for(const o of t){const t=o.glyphMosaicItem.metrics.advance,a=o.x,l=o.y-d,u=a+t,h=l+e;i=Math.min(i,a),r=Math.max(r,u),n=Math.min(n,l),s=Math.max(s,h)}return{x:i,y:n,width:r-i,height:s-n}}static getBox(t){if(!t.length)return null;let e=1/0,i=1/0,n=0,r=0;for(const s of t){const{height:t,left:o,top:a,width:l}=s.glyphMosaicItem.metrics,u=s.x,h=s.y-(t-Math.abs(a)),c=u+l+o,f=h+t;e=Math.min(e,u),n=Math.max(n,c),i=Math.min(i,h),r=Math.max(r,f)}return{x:e,y:i,width:n-e,height:r-i}}static addDecoration(t,e){const i=t.length;if(0===i)return;const n=3;let r=t[0].x+t[0].glyphMosaicItem.metrics.left,s=t[0].y;for(let a=1;a=0&&a,g=n.allowOverlap&&n.ignorePlacement?null:[],I=[],P=4,A=!x;let M=Number.POSITIVE_INFINITY,B=Number.NEGATIVE_INFINITY,R=M,E=B;const S=(x||a)&&l,C=n.size/f;let O=!1;for(const o of e)if(o.vertical){O=!0;break}let D,N=0,V=0;if(!x&&O){const t=y.getTextBox(e,n.lineHeight*f);switch(n.anchor){case p["d"].LEFT:N=t.height/2,V=-t.width/2;break;case p["d"].RIGHT:N=-t.height/2,V=t.width/2;break;case p["d"].TOP:N=t.height/2,V=t.width/2;break;case p["d"].BOTTOM:N=-t.height/2,V=-t.width/2;break;case p["d"].TOP_LEFT:N=t.height;break;case p["d"].BOTTOM_LEFT:V=-t.width;break;case p["d"].TOP_RIGHT:V=t.width;break;case p["d"].BOTTOM_RIGHT:N=-t.height}}N+=n.offset[0]*f,V+=n.offset[1]*f;for(const f of e){const e=f.glyphMosaicItem;if(!e||e.rect.isEmpty)continue;const y=e.rect,p=e.metrics,v=e.page;if(g&&A){if(void 0!==D&&D!==f.y){let e,i,r,a;O?(e=-E+N,i=M+V,r=E-R,a=B-M):(e=M+N,i=R+V,r=B-M,a=E-R);const l={xTile:t.x,yTile:t.y,dxPixels:e*C-u,dyPixels:i*C-u,hard:!n.optional,partIndex:1,width:r*C+2*u,height:a*C+2*u,angle:s,minLod:b,maxLod:o["c"]};g.push(l),M=Number.POSITIVE_INFINITY,B=Number.NEGATIVE_INFINITY,R=M,E=B}D=f.y}const k=[];if(x){const n=.5*e.metrics.width,r=(f.x+p.left-P+n)*C*_;if(h=this._placeGlyph(t,h,r,i,t.segment,1,f.vertical,v,k),l&&(h=this._placeGlyph(t,h,r,i,t.segment,-1,f.vertical,v,k)),h>=T)break}else k.push(new L(r,c,c,v,!1)),a&&l&&k.push(new L(r,c+o["d"],c+o["d"],v,!1));const F=f.x+p.left,U=f.y-d-p.top,z=F+p.width,G=U+p.height;let H,j,W,q,K,Y,Z,J;if(!x&&O)if(f.vertical){const t=(F+z)/2-p.height/2,e=(U+G)/2+p.width/2;H=new m["b"](-e-P+N,t-P+V),j=new m["b"](H.x+y.width,H.y+y.height),W=new m["b"](H.x,j.y),q=new m["b"](j.x,H.y)}else H=new m["b"](-U+P+N,F-P+V),j=new m["b"](H.x-y.height,H.y+y.width),W=new m["b"](j.x,H.y),q=new m["b"](H.x,j.y);else H=new m["b"](F-P+N,U-P+V),j=new m["b"](H.x+y.width,H.y+y.height),W=new m["b"](H.x,j.y),q=new m["b"](j.x,H.y);for(const i of k){let e,r,o,a;if(i.alternateVerticalGlyph){if(!K){const t=(U+G)/2+V;K=new m["b"]((F+z)/2+N-p.height/2-P,t+p.width/2+P),Y=new m["b"](K.x+y.height,K.y-y.width),Z=new m["b"](Y.x,K.y),J=new m["b"](K.x,Y.y)}e=K,r=Z,o=J,a=Y}else e=H,r=W,o=q,a=j;const l=U,h=G,c=i.glyphAngle+s;if(0!==c){const t=Math.cos(c),i=Math.sin(c);e=e.clone(),r=r.clone(),o=o.clone(),a=a.clone(),e.rotate(t,i),a.rotate(t,i),r.rotate(t,i),o.rotate(t,i)}let d=0,_=256;if(x&&O?f.vertical?i.alternateVerticalGlyph?(d=32,_=96):(d=224,_=32):(d=224,_=96):(d=192,_=64),I.push(new w(e,o,r,a,y,i.labelAngle,d,_,i.anchor,i.minzoom,i.maxzoom,i.page)),g&&(!S||this._legible(i.labelAngle)))if(A)FB&&(B=z),h>E&&(E=h);else if(i.minzoom=T)return null;if(g&&A){let e,i,r,a;O?(e=-E+N,i=M+V,r=E-R,a=B-M):(e=M+N,i=R+V,r=B-M,a=E-R);const l={xTile:t.x,yTile:t.y,dxPixels:e*C-u,dyPixels:i*C-u,hard:!n.optional,partIndex:1,width:r*C+2*u,height:a*C+2*u,angle:s,minLod:b,maxLod:o["c"]};g.push(l)}const k=new v(I);return g&&g.length>0&&(k.textColliders=g),k}_legible(t){const e=Object(o["h"])(t);return e<65||e>=193}_placeGlyph(t,e,i,n,r,s,a,l,u){let h=s;const c=h<0?Object(o["g"])(t.angle+o["d"],o["a"]):t.angle;let f=0;i<0&&(h*=-1,i*=-1,f=o["d"]),h>0&&++r;let d=new m["b"](t.x,t.y),y=n[r],x=o["c"];if(n.length<=r)return x;for(;;){const t=y.x-d.x,s=y.y-d.y,p=Math.sqrt(t*t+s*s),m=Math.max(i/p,e),g=t/p,_=s/p,b=Object(o["g"])(Math.atan2(_,g)+f,o["a"]);if(u.push(new L(d,c,b,l,!1,m,x)),a&&u.push(new L(d,c,b,l,!0,m,x)),m<=e)return m;d=y.clone();do{if(r+=h,n.length<=r||r<0)return m;y=n[r]}while(d.isEqual(y));let T=y.x-d.x,I=y.y-d.y;const w=Math.sqrt(T*T+I*I);T*=p/w,I*=p/w,d.x-=T,d.y-=I,x=m}}}var A,M=i("013b"),B=i("0c53");!function(t){t[t.moveTo=1]="moveTo",t[t.lineTo=2]="lineTo",t[t.close=7]="close"}(A||(A={}));class R{constructor(t,e){this.values={};const i=e.keys,n=e.values;for(;t.next();)switch(t.tag()){case 1:this.id=t.getUInt64();break;case 2:{const e=t.getMessage(),r=this.values;for(;!e.empty();){const t=e.getUInt32(),s=e.getUInt32();r[i[t]]=n[s]}e.release();break}case 3:this.type=t.getUInt32();break;case 4:this._pbfGeometry=t.getMessage();break;default:t.skip()}}getGeometry(t){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const e=this._pbfGeometry;let i,n;this._pbfGeometry=null,t?t.reset(this.type):i=[];let r,s=A.moveTo,o=0,a=0,l=0;for(;!e.empty();){if(0===o){const t=e.getUInt32();s=7&t,o=t>>3}switch(o--,s){case A.moveTo:a+=e.getSInt32(),l+=e.getSInt32(),t?t.moveTo(a,l):(n&&i.push(n),n=[],n.push(new m["b"](a,l)));break;case A.lineTo:a+=e.getSInt32(),l+=e.getSInt32(),t?t.lineTo(a,l):n.push(new m["b"](a,l));break;case A.close:t?t.close():n&&!n[0].equals(a,l)&&n.push(n[0].clone());break;default:throw e.release(),new Error("Invalid path operation")}}return t?r=t.result():(n&&i.push(n),r=i),e.release(),this._geometry=r,r}}var E=i("ae0b");class S extends E["a"]{constructor(){super(12)}add(t,e,i){const n=this.array;n.push(t),n.push(e),n.push(i)}}E["a"];class C{constructor(t){for(this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=t.clone();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(C._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(t){for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getInt64();case 5:return t.getUInt64();case 6:return t.getSInt64();case 7:return t.getBool();default:t.skip()}return null}}class O extends E["a"]{constructor(t){super(t)}add(t,e,i,n,r,s,o,a,l,u,h,c){const f=this.array;let d=E["a"].i1616to32(t,e);f.push(d);const y=31;d=E["a"].i8888to32(Math.round(y*i),Math.round(y*n),Math.round(y*r),Math.round(y*s)),f.push(d),d=E["a"].i8888to32(Math.round(y*o),Math.round(y*a),Math.round(y*l),Math.round(y*u)),f.push(d),d=E["a"].i1616to32(h,0),f.push(d),c&&f.push(...c)}}class D extends E["a"]{constructor(t){super(t)}add(t,e,i){const n=this.array;n.push(E["a"].i1616to32(t,e)),i&&n.push(...i)}}class N extends E["a"]{constructor(t){super(t)}add(t,e,i,n,r,s,o){const a=this.array,l=this.index;let u=E["a"].i1616to32(t,e);a.push(u);const h=15;return u=E["a"].i8888to32(Math.round(h*i),Math.round(h*n),r,s),a.push(u),o&&a.push(...o),l}}class V extends E["a"]{constructor(t){super(t)}add(t,e,i,n,r,s,a,l,u,h,c,f){const d=this.array;let y=E["a"].i1616to32(t,e);d.push(y),y=E["a"].i1616to32(Math.round(8*i),Math.round(8*n)),d.push(y),y=E["a"].i8888to32(r/4,s/4,l,u),d.push(y),y=E["a"].i8888to32(0,Object(o["h"])(a),10*h,Math.min(10*c,255)),d.push(y),f&&d.push(...f)}}class k extends E["a"]{constructor(t){super(t)}add(t,e,i,n,r){const s=this.array,o=E["a"].i1616to32(2*t+i,2*e+n);s.push(o),r&&s.push(...r)}}class F{constructor(t,e,i){this.layerExtent=4096,this._features=[],this.layer=t,this.zoom=e,this._spriteInfo=i,this._filter=t.getFeatureFilter()}pushFeature(t){this._filter&&!this._filter.filter(t,this.zoom)||this._features.push(t)}hasFeatures(){return this._features.length>0}getResources(t,e,i){}}class U extends F{constructor(t,e,i,n,s){super(t,e,i),this.type=r["a"].CIRCLE,this._circleVertexBuffer=n,this._circleIndexBuffer=s}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(t){const e=this._circleVertexBuffer,i=this._circleIndexBuffer;this._circleIndexStart=3*i.index,this._circleIndexCount=0;const n=this.layer,r=this.zoom;t&&t.setExtent(this.layerExtent);for(const s of this._features){const o=s.getGeometry(t);if(!o)continue;const a=n.circleMaterial.encodeAttributes(s,r,n);for(const t of o)if(t)for(const n of t){const t=e.index;e.add(n.x,n.y,0,0,a),e.add(n.x,n.y,0,1,a),e.add(n.x,n.y,1,0,a),e.add(n.x,n.y,1,1,a),i.add(t+0,t+1,t+2),i.add(t+1,t+2,t+3),this._circleIndexCount+=6}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this._circleVertexBuffer.array.length,t+=this._circleIndexBuffer.array.length;const e=new Uint32Array(t),i=new Int32Array(e.buffer);let n=0;e[n++]=this.type,e[n++]=this.layerUIDs.length;for(let r=0;rt.page-e.page);for(const{ddFillAttributes:t,ddOutlineAttributes:i,page:n,geometry:r}of s)this._processFeature(r,u,e.outlineUsesFillColor,t,i,c,n)}}else for(const f of h){const a=s?n.encodeAttributes(f,i,e):null,l=u&&o?r.encodeAttributes(f,i,e):null,h=f.getGeometry(t);this._processFeature(h,u,e.outlineUsesFillColor,a,l,c)}}serialize(){let t=10;t+=this.layerUIDs.length,t+=this._fillVertexBuffer.array.length,t+=this._fillIndexBuffer.array.length,t+=this._outlineVertexBuffer.array.length,t+=this._outlineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),i=new Int32Array(e.buffer);let n=0;e[n++]=this.type,e[n++]=this.layerUIDs.length;for(let o=0;o0)for(const[o,[a,l]]of r)e[n++]=o,e[n++]=a,e[n++]=l;e[n++]=this._fillVertexBuffer.array.length;for(let o=0;ou?(void 0!==h&&this._processFill(t,h,n,s,o),h=[c]):e<-u&&void 0!==h&&h.push(c)}void 0!==h&&this._processFill(t,h,n,s,o)}_processOutline(t,e){const i=this._outlineVertexBuffer,n=this._outlineIndexBuffer,r=n.index;let s,o,a;const l=new m["b"](0,0),u=new m["b"](0,0),h=new m["b"](0,0);let c=-1,f=-1,d=-1,y=-1,x=-1,p=!1;const g=0;let _=t.length;if(_<2)return;const b=t[g];let T=t[_-1];for(;_&&T.isEqual(b);)--_,T=t[_-1];if(!(_-g<2)){for(let r=g;r<_;++r){r===g?(s=t[_-1],o=t[g],a=t[g+1],l.assignSub(o,s),l.normalize(),l.rightPerpendicular()):(s=o,o=a,a=r!==_-1?t[r+1]:t[g],l.assign(u));const m=this._isClipEdge(s,o);-1===y&&(p=m),u.assignSub(a,o),u.normalize(),u.rightPerpendicular();const b=l.x*u.y-l.y*u.x;h.assignAdd(l,u),h.normalize();const T=-h.x*-l.x+-h.y*-l.y;let I=Math.abs(0!==T?1/T:1);I>8&&(I=8),b>=0?(d=i.add(o.x,o.y,l.x,l.y,0,1,e),-1===y&&(y=d),c>=0&&f>=0&&d>=0&&!m&&n.add(c,f,d),f=i.add(o.x,o.y,I*-h.x,I*-h.y,0,-1,e),-1===x&&(x=f),c>=0&&f>=0&&d>=0&&!m&&n.add(c,f,d),c=f,f=d,d=i.add(o.x,o.y,h.x,h.y,0,1,e),c>=0&&f>=0&&d>=0&&!m&&n.add(c,f,d),f=i.add(o.x,o.y,u.x,u.y,0,1,e),c>=0&&f>=0&&d>=0&&!m&&n.add(c,f,d)):(d=i.add(o.x,o.y,I*h.x,I*h.y,0,1,e),-1===y&&(y=d),c>=0&&f>=0&&d>=0&&!m&&n.add(c,f,d),f=i.add(o.x,o.y,-l.x,-l.y,0,-1,e),-1===x&&(x=f),c>=0&&f>=0&&d>=0&&!m&&n.add(c,f,d),c=f,f=d,d=i.add(o.x,o.y,-h.x,-h.y,0,-1,e),c>=0&&f>=0&&d>=0&&!m&&n.add(c,f,d),c=i.add(o.x,o.y,-u.x,-u.y,0,-1,e),c>=0&&f>=0&&d>=0&&!m&&n.add(c,f,d))}c>=0&&f>=0&&y>=0&&!p&&n.add(c,f,y),c>=0&&y>=0&&x>=0&&!p&&n.add(c,x,y),this._outlineIndexCount+=3*(n.index-r)}}_processFill(t,e,i,n,r){let s;n=!0,e.length>1&&(s=[]);let o=0;for(const h of e)0!==o&&s.push(o),o+=t[h].length;const a=2*o,l=z["a"].acquire();for(const h of e){const e=t[h],i=e.length;for(let t=0;t0){const n=e.map(e=>t[e].length),{buffer:s,vertexCount:o}=Object(B["b"])(l,n);if(o>0){const t=this._fillVertexBuffer.index;for(let e=0;e0){const e=this._fillVertexBuffer.index;let n=0;for(;n=4160:t.y===e.y&&(t.y<=-64||t.y>=4160)}static _area(t){let e=0;const i=t.length-1;for(let n=0;nt.page-e.page),h.textured=!0;for(const{ddAttributes:t,page:i,cap:n,join:r,miterLimit:s,roundLimit:o,halfWidth:a,offset:l,geometry:u}of e)h.capType=n,h.joinType=r,h.miterLimit=s,h.roundLimit=o,h.halfWidth=a,h.offset=l,this._processFeature(u,t,i)}else{h.textured=!(!d&&!y),h.capType=_,h.joinType=L,h.miterLimit=v,h.roundLimit=A,h.halfWidth=.5*B,h.offset=E;for(const e of u){const i=c?f.encodeAttributes(e,l,a):null;g&&(h.capType=g.getValue(l,e)),I&&(h.joinType=I.getValue(l,e)),w&&(h.miterLimit=w.getValue(l,e)),P&&(h.roundLimit=P.getValue(l,e)),M&&(h.halfWidth=.5*M.getValue(l,e)),R&&(h.offset=R.getValue(l,e));const n=e.getGeometry(t);this._processFeature(n,i)}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this.tessellationProperties._lineVertexBuffer.array.length,t+=this.tessellationProperties._lineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),i=new Int32Array(e.buffer);let n=0;e[n++]=this.type,e[n++]=this.layerUIDs.length;for(let o=0;o0)for(const[o,[a,l]]of r)e[n++]=o,e[n++]=a,e[n++]=l;e[n++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let o=0;o(e,i,n,r,s,o,a,l,u,h,c)=>(t._lineVertexBuffer.add(e,i,a,l,n,r,s,o,u,h,c,t._ddValues),t._lineVertexBuffer.index-1),Y=t=>(e,i,n)=>{t._lineIndexBuffer.add(e,i,n)};var Z=i("d7bf"),J=i("b3b6"),X=i("229e");const Q=10;function $(t,e){return t.iconMosaicItem&&e.iconMosaicItem?t.iconMosaicItem.page===e.iconMosaicItem.page?0:t.iconMosaicItem.page-e.iconMosaicItem.page:t.iconMosaicItem&&!e.iconMosaicItem?1:!t.iconMosaicItem&&e.iconMosaicItem?-1:0}class tt extends F{constructor(t,e,i,n,s,o,a,l){super(t,e,l.getSpriteItems()),this.type=r["a"].SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._iconVertexBuffer=i,this._iconIndexBuffer=n,this._textVertexBuffer=s,this._textIndexBuffer=o,this._placementEngine=a,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(t,e,i){const n=this.layer,r=this.zoom;t&&t.setExtent(this.layerExtent);const s=n.getLayoutProperty("icon-image"),o=n.getLayoutProperty("text-field");let a=n.getLayoutProperty("text-transform"),l=n.getLayoutProperty("text-font");const u=[];let h,c,f,d;s&&!s.isDataDriven&&(h=s.getValue(r)),o&&!o.isDataDriven&&(c=o.getValue(r)),a&&a.isDataDriven||(f=n.getLayoutValue("text-transform",r),a=null),l&&l.isDataDriven||(d=n.getLayoutValue("text-font",r),l=null);for(const y of this._features){const x=y.getGeometry(t);if(!x||0===x.length)continue;let m,g;s&&(m=s.isDataDriven?s.getValue(r,y):this._replaceKeys(h,y.values),m&&e(m));let _=!1;if(o&&(g=o.isDataDriven?o.getValue(r,y):this._replaceKeys(c,y.values),g)){switch(g=g.replace(/\\n/g,"\n"),a&&(f=a.getValue(r,y)),f){case p["g"].LOWERCASE:g=g.toLowerCase();break;case p["g"].UPPERCASE:g=g.toUpperCase()}if(tt._bidiEngine.hasBidiChar(g)){let t;t="rtl"===tt._bidiEngine.checkContextual(g)?"IDNNN":"ICNNN",g=tt._bidiEngine.bidiTransform(g,t,"VLYSN"),_=!0}const t=g.length;if(t>0){l&&(d=l.getValue(r,y));for(const e of d){let n=i[e];n||(n=i[e]=new Set);for(let e=0;e=0;let n=.5;switch(h.anchor){case p["d"].TOP_LEFT:case p["d"].LEFT:case p["d"].BOTTOM_LEFT:n=0;break;case p["d"].TOP_RIGHT:case p["d"].RIGHT:case p["d"].BOTTOM_RIGHT:n=1}let s=.5;switch(h.anchor){case p["d"].TOP_LEFT:case p["d"].TOP:case p["d"].TOP_RIGHT:s=0;break;case p["d"].BOTTOM_LEFT:case p["d"].BOTTOM:case p["d"].BOTTOM_RIGHT:s=1}let u=.5;switch(h.justify){case p["f"].AUTO:u=n;break;case p["f"].LEFT:u=0;break;case p["f"].RIGHT:u=1}const d=h.letterSpacing*f,x=r?0:h.maxWidth*f,m=h.lineHeight*f,g=o.textFont.map(t=>c.getGlyphItems(t));if(e=new y(g,x,m,d,n,s,u).getShaping(l,o.rtl,t),e&&e.length>0){let t=1e30,i=-1e30;for(const n of e)t=Math.min(t,n.x),i=Math.max(i,n.x);a=(i-t+2*f)*b*_}}for(let i of o.geometry){const l=[];if(n===p["e"].LINE){if(e&&e.length>0&&h&&h.size){const t=h.size*_*(2+Math.min(2,4*Math.abs(h.offset[1])));i=tt._smoothVertices(i,t)}tt._pushAnchors(l,i,s,a)}else n===p["e"].LINE_CENTER?tt._pushCenterAnchor(l,i):o.feature.type===m["a"].Polygon?tt._pushCentroid(l,i):l.push(new I(i[0].x,i[0].y));for(const n of l){if(n.x<0||n.x>g||n.y<0||n.y>g)continue;if(r&&a>0&&h.rotationAlignment===p["a"].MAP&&!tt._honorsTextMaxAngle(i,n,a,T,L))continue;const s={shaping:e,line:i,iconMosaicItem:t,anchor:n,symbolFeature:o,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};x.push(s),this._processFeature(s,u,h)}}}x.sort($),this._addPlacedGlyphs(),this._symbolInstances=x}serialize(){let t=11;t+=this.layerUIDs.length,t+=3*this.markerPageMap.size,t+=3*this.glyphsPageMap.size,t+=tt._symbolsSerializationLength(this._symbolInstances),t+=this._iconVertexBuffer.array.length,t+=this._iconIndexBuffer.array.length,t+=this._textVertexBuffer.array.length,t+=this._textIndexBuffer.array.length;const e=new Uint32Array(t),i=new Int32Array(e.buffer),n=new Float32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let s=0;s0;let d,y,x=!0;if(f&&(x=i.optional),h&&(d=this._placementEngine.getIconPlacement(a,r,e)),(d||c)&&(f&&(y=this._placementEngine.getTextPlacement(a,s,n,i)),y||x)){if(d&&y||(x||c?x||y?c||d||(y=null):d=null:(d=null,y=null)),y){const e=u.hasDataDrivenText?u.textMaterial.encodeAttributes(t.symbolFeature.feature,l,u):null;if(this._storePlacedGlyphs(t,y.shapes,l,i.rotationAlignment,e),y.textColliders){t.textColliders=y.textColliders;for(const t of y.textColliders){t.minLod=Math.max(l+Object(o["f"])(t.minLod),0),t.maxLod=Math.min(l+Object(o["f"])(t.maxLod),25);const e=t.angle;if(e){const i=Math.cos(e),n=Math.sin(e),r=t.dxPixels*i-t.dyPixels*n,s=t.dxPixels*n+t.dyPixels*i,o=(t.dxPixels+t.width)*i-t.dyPixels*n,a=(t.dxPixels+t.width)*n+t.dyPixels*i,l=t.dxPixels*i-(t.dyPixels+t.height)*n,u=t.dxPixels*n+(t.dyPixels+t.height)*i,h=(t.dxPixels+t.width)*i-(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n+(t.dyPixels+t.height)*i,f=Math.min(r,o,l,h),d=Math.max(r,o,l,h),y=Math.min(s,a,u,c),x=Math.max(s,a,u,c);t.dxPixels=f,t.dyPixels=y,t.width=d-f,t.height=x-y}}}}if(d){const i=u.hasDataDrivenIcon?u.iconMaterial.encodeAttributes(t.symbolFeature.feature,l,u):null;if(this._addPlacedIcons(t,d.shapes,l,r.page,e.rotationAlignment===p["a"].VIEWPORT,i),d.iconColliders){t.iconColliders=d.iconColliders;for(const t of d.iconColliders){t.minLod=Math.max(l+Object(o["f"])(t.minLod),0),t.maxLod=Math.min(l+Object(o["f"])(t.maxLod),25);const e=t.angle;if(e){const i=Math.cos(e),n=Math.sin(e),r=t.dxPixels*i-t.dyPixels*n,s=t.dxPixels*n+t.dyPixels*i,o=(t.dxPixels+t.width)*i-t.dyPixels*n,a=(t.dxPixels+t.width)*n+t.dyPixels*i,l=t.dxPixels*i-(t.dyPixels+t.height)*n,u=t.dxPixels*n+(t.dyPixels+t.height)*i,h=(t.dxPixels+t.width)*i-(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n+(t.dyPixels+t.height)*i,f=Math.min(r,o,l,h),d=Math.max(r,o,l,h),y=Math.min(s,a,u,c),x=Math.max(s,a,u,c);t.dxPixels=f,t.dyPixels=y,t.width=d-f,t.height=x-y}}}}}}_addPlacedIcons(t,e,i,n,r,s){const a=Math.max(i-1,0),l=this._iconVertexBuffer,u=this._iconIndexBuffer,h=this._markerMap;for(const c of e){const e=r?0:Math.max(i+Object(o["f"])(c.minzoom),a),f=r?25:Math.min(i+Object(o["f"])(c.maxzoom),25);if(f<=e)continue;const d=c.tl,y=c.tr,x=c.bl,p=c.br,m=c.mosaicRect,g=c.labelAngle,_=c.minAngle,b=c.maxAngle,T=c.anchor,I=l.index,L=m.x,w=m.y,v=L+m.width,P=w+m.height,A=l.index;l.add(T.x,T.y,d.x,d.y,L,w,g,_,b,e,f,s),l.add(T.x,T.y,y.x,y.y,v,w,g,_,b,e,f,s),l.add(T.x,T.y,x.x,x.y,L,P,g,_,b,e,f,s),l.add(T.x,T.y,p.x,p.y,v,P,g,_,b,e,f,s),t.iconVertexRanges.length>0&&t.iconVertexRanges[0][0]+t.iconVertexRanges[0][1]===A?t.iconVertexRanges[0][1]+=4:t.iconVertexRanges.push([A,4]),u.add(I+0,I+1,I+2),u.add(I+1,I+2,I+3),h.has(n)?h.get(n)[1]+=6:h.set(n,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const t=this._textVertexBuffer,e=this._textIndexBuffer,i=this._glyphMap;for(const[n,r]of this._glyphBufferDataStorage)for(const s of r){const r=t.index,o=s.symbolInstance,a=s.ddAttributes,l=t.index;t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tl[0],s.tl[1],s.xmin,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tr[0],s.tr[1],s.xmax,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.bl[0],s.bl[1],s.xmin,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.br[0],s.br[1],s.xmax,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),o.textVertexRanges.length>0&&o.textVertexRanges[0][0]+o.textVertexRanges[0][1]===l?o.textVertexRanges[0][1]+=4:o.textVertexRanges.push([l,4]),e.add(r+0,r+1,r+2),e.add(r+1,r+2,r+3),i.has(n)?i.get(n)[1]+=6:i.set(n,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(t,e,i,n,r){const s=Math.max(i-1,0),a=n===p["a"].VIEWPORT;let l,u,h,c,f,d,y,x,m,g,_;for(const p of e)l=a?0:Math.max(i+Object(o["f"])(p.minzoom),s),u=a?25:Math.min(i+Object(o["f"])(p.maxzoom),25),u<=l||(h=p.tl,c=p.tr,f=p.bl,d=p.br,y=p.labelAngle,x=p.minAngle,m=p.maxAngle,g=p.anchor,_=p.mosaicRect,this._glyphBufferDataStorage.has(p.page)||this._glyphBufferDataStorage.set(p.page,[]),this._glyphBufferDataStorage.get(p.page).push({glyphAnchor:[g.x,g.y],tl:[h.x,h.y],tr:[c.x,c.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:y,minAngle:x,maxAngle:m,minLod:l,maxLod:u,placementLod:s,symbolInstance:t,ddAttributes:r}))}static _pushAnchors(t,e,i,n){i+=n;let r=0;const s=e.length-1;for(let o=0;o-o;){if(--l,l<0)return!1;s-=m["b"].distance(t[l],a),a=t[l]}s+=m["b"].distance(t[l],t[l+1]);const u=[];let h=0;const c=t.length;for(;sr;)h-=u.shift().deviation;if(Math.abs(h)>n)return!1;s+=m["b"].distance(i,a),l=o}return!0}static _smoothVertices(t,e){if(e<=0)return t;let i=t.length;if(i<3)return t;const n=[];let r=0,s=0;n.push(0);for(let y=1;y0&&(r+=e,n.push(r),s++,s!==y&&(t[s]=t[y]))}if(i=s+1,i<3)return t;e=Math.min(e,.2*r);const o=t[0].x,a=t[0].y,l=t[i-1].x,u=t[i-1].y,h=m["b"].sub(t[0],t[1]);h.normalize(),t[0].x+=e*h.x,t[0].y+=e*h.y,h.assignSub(t[i-1],t[i-2]),h.normalize(),t[i-1].x+=e*h.x,t[i-1].y+=e*h.y,n[0]-=e,n[i-1]+=e;const c=[];c.push(new m["b"](o,a));const f=1e-6,d=.5*e;for(let y=1;y=0;i--){const a=d+n[i+1]-n[y];if(a<0)break;const l=n[i+1]-n[i],u=n[y]-n[i]r&&(h=r),hs&&(c=s),cr&&(t=r),ts&&(o=s),or&&(d=r),ds&&(y=s),y0){const t=(1<{s.has(t)||(r.push({name:t,repeat:e}),s.add(t))},a={};for(const u of n)u.getResources(u.tileClipper,o,a);if(this._tile.status===et.INVALID)return Promise.resolve([]);const l=this._fetchResources(r,a,t);return Promise.all([...l,e]).then(()=>this._processFeatures(i.returnedBuckets))}_initialize(t){return{signal:t&&t.signal,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(t){const{sourceNameToTileData:e,layers:i,zoom:n,sourceNameToTileClipper:r,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:o,returnedBuckets:a,layerIdToBucket:l,referencerUIDToReferencedId:u}=t;for(let h=i.length-1;h>=0;h--){const t=i[h];if(!this._canParseStyleLayer(t.uid)||t.minzoom&&n=t.maxzoom||t.type===p["c"].BACKGROUND)continue;if(!e[t.source]||!r[t.source])continue;const c=e[t.source],f=r[t.source],d=t.sourceLayer,y=c[d];if(y){let e=o[t.source];if(e||(e=o[t.source]=new Set),e.add(t.sourceLayer),t.refLayerId)u.set(t.uid,t.refLayerId);else{const e=this._createBucket(t);if(e){e.layerUIDs=[t.uid],e.layerExtent=y.extent,e.tileClipper=f;let i=s[t.source];i||(i=s[t.source]={});let n=i[d];n||(n=i[d]=[]),n.push(e),a.push(e),l[t.id]=e}}}}}_linkReferences(t){const{layerIdToBucket:e,referencerUIDToReferencedId:i}=t;i.forEach((t,i)=>{e[t=t]&&e[t].layerUIDs.push(i)})}_filterFeatures(t){const{signal:e,sourceNameToTileData:i,sourceNameToUniqueSourceLayerBuckets:r,sourceNameToUniqueSourceLayers:s}=t,o=10*this._level,a=10*(this._level+1),l=[],u=[];for(const n of Object.keys(s))s[n].forEach(t=>{l.push(t),u.push(n)});for(let h=0;h=a)continue;const e=i._maxzoom;if(e&&e<=o)continue}for(const n of f)n.pushFeature(e)}}}_fetchResources(t,e,i){const n=[],r=this._tile.getWorkerTileHandler();let s,o;t.length>0&&(s=r.fetchSprites(t,this._client,i),n.push(s));for(const a in e){const t=e[a];t.size>0&&(o=r.fetchGlyphs(this._tile.tileKey,a,t,this._client,i),n.push(o))}return n}_processFeatures(t){const e=t.filter(t=>t.hasFeatures()||this._canParseStyleLayer(t.layer.uid));for(const i of e)i.processFeatures(i.tileClipper);return e}_parseTileData(t){const e={};for(const i of Object.keys(t)){const n=t[i],r={};for(;n.next();)switch(n.tag()){case 3:{const t=n.getMessage(),e=new C(t);t.release(),r[e.name]=e;break}default:n.skip()}e[i]=r}return e}_createBucket(t){switch(t.type){case p["c"].BACKGROUND:return null;case p["c"].FILL:return this._createFillBucket(t);case p["c"].LINE:return this._createLineBucket(t);case p["c"].CIRCLE:return this._createCircleBucket(t);case p["c"].SYMBOL:return this._createSymbolBucket(t)}}_createFillBucket(t){return new H(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new D(t.fillMaterial.getStride()),new S,new N(t.outlineMaterial.getStride()),new S)}_createLineBucket(t){return new q(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new O(t.lineMaterial.getStride()),new S)}_createCircleBucket(t){return new U(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new k(t.circleMaterial.getStride()),new S)}_createSymbolBucket(t){const e=this._tile;return new tt(t,this._level,new V(t.iconMaterial.getStride()),new S,new V(t.textMaterial.getStride()),new S,e.placementEngine,e.getWorkerTileHandler())}}class at{constructor(t,e,i,n){this.status=et.INITIALIZED,this.placementEngine=new P,this.tileKey=t,this.refKeys=e,this._workerTileHandler=i,this._styleRepository=n}release(){this.tileKey="",this.refKeys=null,this.status=et.INITIALIZED,this._workerTileHandler=null}async parse(t,e){const i=e&&e.signal;if(Object(s["k"])(i)){const t=()=>{i.removeEventListener("abort",t),this.status=et.INVALID};i.addEventListener("abort",t)}let r;const o={bucketsWithData:[],emptyBuckets:null};try{r=await this._parse(t,e)}catch(c){if(Object(n["m"])(c))throw c;return{result:o,transferList:[]}}this.status=et.READY;const a=o.bucketsWithData,l=[];for(const n of r)if(n.hasFeatures()){const t=n.serialize();a.push(t)}else l.push(n.layer.uid);const u=[...a];let h=null;return l.length>0&&(h=Uint32Array.from(l),u.push(h.buffer)),o.emptyBuckets=h,{result:o,transferList:u}}setObsolete(){this.status=et.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(t,e){const i=t.sourceName2DataAndRefKey;return 0===Object.keys(i).length?[]:(this.status=et.MODIFIED,new ot(i,this,e.client,this._styleRepository,t.styleLayerUIDs).parse(e))}}var lt=i("901e");class ut{constructor(){this._spriteInfo={},this._glyphInfo={}}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){var t;return null==(t=this._styleRepository)?void 0:t.layers}async createTileAndParse(t,e){const{key:i}=t,r={};for(const n of Object.keys(t.sourceName2DataAndRefKey)){const e=t.sourceName2DataAndRefKey[n];r[n]=e.refKey}const s=new at(i,r,this,this._styleRepository);try{return await s.parse(t,e)}catch(o){if(s.setObsolete(),s.release(),!Object(n["m"])(o))throw o;return null}}updateStyle(t){if(!t||0===t.length||!this._styleRepository)return;const e=this._styleRepository;for(const i of t){const t=i.type,n=i.data;switch(t){case r["c"].PAINTER_CHANGED:e.setPaintProperties(n.layer,n.paint);break;case r["c"].LAYOUT_CHANGED:e.setLayoutProperties(n.layer,n.layout);break;case r["c"].LAYER_REMOVED:e.deleteStyleLayer(n.layer);break;case r["c"].LAYER_CHANGED:e.setStyleLayer(n.layer,n.index);break;case r["c"].SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(t){this._styleRepository=new lt["a"](t),this._spriteInfo={},this._glyphInfo={}}fetchSprites(t,e,i){const n=[],r=this._spriteInfo;for(const s of t)void 0===r[s.name]&&n.push(s);return 0===n.length?Promise.resolve():e.invoke("getSprites",n,{signal:i&&i.signal}).then(t=>{for(const e in t){const i=t[e];r[e]=i}})}getSpriteItems(){return this._spriteInfo}fetchGlyphs(t,e,i,n,r){const s=[];let o=this._glyphInfo[e];return o?i.forEach(t=>{o[t]||s.push(t)}):(o=this._glyphInfo[e]=[],i.forEach(t=>s.push(t))),0===s.length?Promise.resolve():n.invoke("getGlyphs",{tileID:t,font:e,codePoints:s},r).then(t=>{for(let e=0;e"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],r=["آ","أ","إ","ا"],s=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],l=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],u=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],h=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],c=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],d=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],y=["ء","ف"],x=["غ","ي"],p=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0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I,I,I,I,A,I,A,I,I,A,I,I,I,I,I,I,I,I,I,B,I,I,M,M,I,I,I,I,I,B,B,I,I,I,I,I,v,v,v,v,v,I,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,I,I,N],[I,I,I,B,B,B,I,I,I,I,I,M,A,M,A,A,b,b,b,b,b,b,b,b,b,b,A,I,I,I,I,I,I,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,I,I,I,I,I,I,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,I,I,I,I,I,I,I,I,I,I,I,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,I,I,I,g,g,g,g,g,g,I,I,g,g,g,g,g,g,I,I,g,g,g,g,g,g,I,I,g,g,g,I,I,I,B,B,I,I,I,B,B,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I]];class z{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,i){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(xt(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,i))return t;e=this.inputFormat,i=this.outputFormat;let n=t;const r=Tt,s=ft(e.charAt(1)),o=ft(i.charAt(1)),a=("I"===e.charAt(0)?"L":e.charAt(0))+s,l=("I"===i.charAt(0)?"L":i.charAt(0))+o,u=e.charAt(2)+i.charAt(2);r.defInFormat=a,r.defOutFormat=l,r.defSwap=u;const h=G(t,a,l,u,r);let c=!1;return"R"===i.charAt(1)?c=!0:"C"!==i.charAt(1)&&"D"!==i.charAt(1)||(c="rtl"===this.checkContextual(h)),this.sourceToTarget=gt,this.targetToSource=pt(this.sourceToTarget),_t=this.targetToSource,n=e.charAt(3)===i.charAt(3)?h:"S"===i.charAt(3)?j(c,h,!0):Y(h,c,!0),this.sourceToTarget=gt,this.targetToSource=_t,this.levels=bt,n}_inputFormatSetter(t){if(!Pt.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!Pt.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=q(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(i){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return At.test(t)}}function G(t,e,i,n,r){const s=H(t,{inFormat:e,outFormat:i,swap:n},r);if(s.inFormat===s.outFormat)return t;e=s.inFormat,i=s.outFormat,n=s.swap;const o=e.substring(0,1),a=e.substring(1,4),l=i.substring(0,1),u=i.substring(1,4);if(r.inFormat=e,r.outFormat=i,r.swap=n,"L"===o&&"VLTR"===i){if("LTR"===a)return r.dir=wt,Z(t,r);if("RTL"===a)return r.dir=vt,Z(t,r)}if("V"===o&&"V"===l)return r.dir="RTL"===a?vt:wt,tt(t,r);if("L"===o&&"VRTL"===i)return"LTR"===a?(r.dir=wt,t=Z(t,r)):(r.dir=vt,t=Z(t,r)),tt(t);if("VLTR"===e&&"LLTR"===i)return r.dir=wt,Z(t,r);if("V"===o&&"L"===l&&a!==u)return t=tt(t),"RTL"===a?G(t,"LLTR","VLTR",n,r):G(t,"LRTL","VRTL",n,r);if("VRTL"===e&&"LRTL"===i)return G(t,"LRTL","VRTL",n,r);if("L"===o&&"L"===l){const e=r.swap;return r.swap=e.substr(0,1)+"N","RTL"===a?(r.dir=vt,t=Z(t,r),r.swap="N"+e.substr(1,2),r.dir=wt,t=Z(t,r)):(r.dir=wt,t=Z(t,r),r.swap="N"+e.substr(1,2),t=G(t,"VLTR","LRTL",r.swap,r)),t}return t}function H(t,e,i){if(void 0===e.inFormat&&(e.inFormat=i.defInFormat),void 0===e.outFormat&&(e.outFormat=i.defOutFormat),void 0===e.swap&&(e.swap=i.defSwap),e.inFormat===e.outFormat)return e;const n=e.inFormat.substring(0,1),r=e.outFormat.substring(0,1);let s,o=e.inFormat.substring(1,4),a=e.outFormat.substring(1,4);return"C"===o.charAt(0)&&(s=q(t),o="ltr"===s||"rtl"===s?s.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=n+o),"C"===a.charAt(0)&&(s=q(t),"rtl"===s?a="RTL":"ltr"===s?(s=K(t),a=s.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=r+a),e}function j(t,e,i){if(0===e.length)return"";void 0===t&&(t=!0),void 0===i&&(i=!0);const n=(e=String(e)).split("");let r=0,s=1,o=n.length;t||(r=n.length-1,s=-1,o=1);const a=W(n,r,s,o,i);let l="";for(let u=0;u-1?(mt(_t,u,!t,-1),gt.splice(u,1)):l+=n[u];return l}function W(t,e,i,n,r){let a=0;const h=[];let f=0;for(let d=e;d*i="ﹰ"&&s[o]<"\ufeff"){const l=t.charCodeAt(o);s[o]>="ﻵ"&&s[o]<="ﻼ"?(e?(o>0&&i&&" "===s[o-1]?n=n.substring(0,n.length-1)+"ل":(n+="ل",a=!0),n+=r[(l-65269)/2]):(n+=r[(l-65269)/2],n+="ل",o+10)if(16===c){for(let t=o;t-1){for(let t=o;t=0&&t[i]===P;i--)e[i]=n.dir}}function Q(t,e,i){if(0!==i.hiLevel&&i.swap.substr(0,1)!==i.swap.substr(1,2))for(let n=0;n>8];return i=y[e]&&t<=x[e])return!0;return!1}function nt(t,e,i,n){for(;e*i=t){for(s=h+1;s=t;)s++;for(o=h,a=s-1;o(r.lastArabic=!1,g),UBAT_R:()=>(r.lastArabic=!1,_),UBAT_ON:()=>I,UBAT_AN:()=>T,UBAT_EN:()=>r.lastArabic?T:b,UBAT_AL:()=>(r.lastArabic=!0,r.hasUbatAl=!0,_),UBAT_WS:()=>I,UBAT_CS:()=>{let t,s;return n<1||n+1>=e.length||(t=i[n-1])!==b&&t!==T||(s=e[n+1])!==b&&s!==T?I:(r.lastArabic&&(s=T),s===t?s:I)},UBAT_ES:()=>(n>0?i[n-1]:L)===b&&n+1{if(n>0&&i[n-1]===b)return b;if(r.lastArabic)return I;let t=n+1;const s=e.length;for(;t{if("VLTR"===r.inFormat){const i=e.length;let r=n+1;for(;r=1425&&i<=2303||64286===i,o=e[r];if(s&&(o===_||o===v))return _}}return n<1||e[n-1]===L?I:i[n-1]},UBAT_B:()=>(r.lastArabic=!0,r.hasUbatB=!0,r.dir),UBAT_S:()=>(r.hasUbatS=!0,I),UBAT_LRE:()=>(r.lastArabic=!1,I),UBAT_RLE:()=>(r.lastArabic=!1,I),UBAT_LRO:()=>(r.lastArabic=!1,I),UBAT_RLO:()=>(r.lastArabic=!1,I),UBAT_PDF:()=>(r.lastArabic=!1,I),UBAT_BN:()=>I}[V[s]]()}function at(t){let e,i=0,r=n.length-1;for(;i<=r;)if(e=Math.floor((i+r)/2),tn[e][0]))return n[e][1];i=e+1}return t}function lt(t){for(let e=0;e="ً"&&t<="ٕ"}function ft(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function dt(t,e,i,n){for(;e*ie||!i&&t[r]===e)&&(t[r]+=n)}let gt=[],_t=[],bt=[];const Tt={dir:0,defInFormat:"LLTR",defoutFormat:"VLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,hasBlockSep:!1,hasSegSep:!1,defOutFormat:""},It=5,Lt=6,wt=0,vt=1,Pt=/^[(I|V)][(L|R|C|D)][(Y|N)][(S|N)][N]$/,At=/[\u0591-\u06ff\ufb1d-\ufefc]/},ef89:function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"b",(function(){return d})),i.d(e,"c",(function(){return n})),i.d(e,"d",(function(){return l})),i.d(e,"e",(function(){return s})),i.d(e,"f",(function(){return a})),i.d(e,"g",(function(){return u})),i.d(e,"h",(function(){return c})),i.d(e,"i",(function(){return h})),i.d(e,"j",(function(){return r}));var n,r,s,o,a,l,u,h,c,f=i("ab39");!function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.FILL=1]="FILL",t[t.LINE=2]="LINE",t[t.SYMBOL=3]="SYMBOL",t[t.CIRCLE=4]="CIRCLE"}(n||(n={})),function(t){t[t.VISIBLE=0]="VISIBLE",t[t.NONE=1]="NONE"}(r||(r={})),function(t){t[t.POINT=0]="POINT",t[t.LINE=1]="LINE",t[t.LINE_CENTER=2]="LINE_CENTER"}(s||(s={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT",t[t.AUTO=2]="AUTO"}(o||(o={})),function(t){t[t.AUTO=0]="AUTO",t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT"}(a||(a={})),function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.TOP=3]="TOP",t[t.BOTTOM=4]="BOTTOM",t[t.TOP_LEFT=5]="TOP_LEFT",t[t.TOP_RIGHT=6]="TOP_RIGHT",t[t.BOTTOM_LEFT=7]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(l||(l={})),function(t){t[t.NONE=0]="NONE",t[t.UPPERCASE=1]="UPPERCASE",t[t.LOWERCASE=2]="LOWERCASE"}(u||(u={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT"}(h||(h={})),function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(c||(c={}));class d{}d.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:r.VISIBLE}},d.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:r.VISIBLE}},d.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:r.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:f["d"].BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:f["o"].MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}},d.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:r.VISIBLE},"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:s.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"icon-ignore-placement":{type:"boolean",default:!1},"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:o.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:a.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:o.AUTO},"text-size":{type:"number",minimum:0,default:16},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:u.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[c.HORIZONTAL]}},d.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:r.VISIBLE}},d.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}},d.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP}},d.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP},"line-width":{type:"number",minimum:0,default:1}},d.symbolPaintDefinition={"icon-color":{type:"color",default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP}},d.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}},d.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:h.MAP}}}}]); //# sourceMappingURL=chunk-d134a92a.e5cabb63.js.map