UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

1 lines • 54.7 kB
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[547,1550,1666,5020,6061,6312,7992,8125,9169,9397],{4197(t,e,s){s.d(e,{Vj:()=>u,cj:()=>c,jh:()=>i,l5:()=>o,xm:()=>a});var r=s(34275),n=s(9093);function i(t){return t<=r.y9?new Array(t).fill(0):new Float64Array(t)}function a(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=r.y9?Array.from(t):new Float64Array(t)}function o(t,e,s){return Array.isArray(t)?t.slice(e,e+s):t.subarray(e,e+s)}function c(t){return[...t]}function u(t){const e=(0,n.vt)();for(let s=0;s<16;++s)e[s]=t[s];return e}},9093(t,e,s){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(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]]}s.d(e,{o8:()=>n,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:n,create:r,fromValues:function(t,e,s,r,n,i,a,o,c,u,h,l,m,f,d,g){return[t,e,s,r,n,i,a,o,c,u,h,l,m,f,d,g]}},Symbol.toStringTag,{value:"Module"}))},40547(t,e,s){s.d(e,{convert:()=>v,convertFromSpatialReferenceUnit:()=>_,convertToSpatialReferenceUnit:()=>P,meters:()=>i.L2,squareMeters:()=>i.A7,toAreaUnit:()=>y,toLengthUnit:()=>p});var r=s(59534),n=s(85935),i=s(71409);const a=[];function o(t){return 0===t.length?'""':t.startsWith('"')||t.startsWith(".")||t[0]>="0"&&t[0]<="9"?t:'"'+t.trim()+'"'}function c(t){let e="",s="",r=!1;for(let n=0;n<t.length;n++){const i=t[n];r?'"'===i?'"'===t[n+1]?(e+=`\\${i}`,n+=1):r=!1:e+=i:/\s/.test(i)||(","===i?(s+=""!==e?o(e)+",":",",e=""):")"===i||"]"===i?(s+=""!==e?o(e)+"]}":"]}",e=""):"("===i||"["===i?(s+='{ "entity": "'+e.toUpperCase().trim()+'", "values":[',e=""):'"'===i?(r=!0,e=""):e+=i)}return JSON.parse(s)}function u(t){try{for(let e=0;e<a.length;e++)if(a[e].spatialReferenceWkt===t)return a[e].unit;const e=h(c(t));if(null===e)return null;let s=null;for(const t of e.values)if("object"==typeof t&&("UNIT"===t.entity||"ANGLEUNIT"===t.entity||"LENGTHUNIT"===t.entity)){s=t;break}if(null===s)return null;const r=function(t,e,s){if(null!=s)try{if("EPSG"===s.values[0])return{type:t,wkid:Number.parseInt(s.values[1],10),factor:e}}catch(t){}return{type:t,factor:e}}("GEOGCS"===e.entity||"GEOGCRS"===e.entity?"angular":"linear",s.values[1],s.values[2]);return a.push({spatialReferenceWkt:t,unit:r}),a.length>10&&a.shift(),r}catch(t){return null}}function h(t){if(null===t)return null;switch(t.entity){case"GEOGCRS":case"GEOGCS":case"PROJCRS":case"PROJCS":return t}const e=[];for(const s of t.values)if("object"==typeof s&&void 0!==s.entity)switch(s.entity){case"GEOGCRS":case"GEOGCS":case"PROJCRS":case"PROJCS":return s;default:e.push(s)}for(const t of e){const e=h(t);if(null!=e)return e}return null}var l=s(86211),m=s(22530);function f(t,e){let s;switch(t){case"linear":s=i.s9;break;case"angular":s=i.zD;break;case"area":s=i.y6;break;default:return null}return s.get(e)}function d(t){const e=t.wkid;if(null!=e){const t=m.A.units[m.A[e]];if(null!=t)switch(t){case"Meter":return f("linear",9001);case"Foot":return f("linear",9002);case"Foot_US":return f("linear",9003);case"Foot_Clarke":return f("linear",9005);case"Yard_Clarke":return f("linear",9037);case"Link_Clarke":return f("linear",9039);case"Yard_Sears":return f("linear",9040);case"Foot_Sears":return f("linear",9041);case"Chain_Sears":return f("linear",9042);case"Chain_Benoit_1895_B":return f("linear",9062);case"Yard_Indian":return f("linear",9084);case"Yard_Indian_1937":return f("linear",9085);case"Foot_Gold_Coast":return f("linear",9094);case"Chain":return f("linear",9097);case"Chain_Sears_1922_Truncated":return f("linear",9301);case"50_Kilometers":return f("linear",109030);case"150_Kilometers":return f("linear",109031);default:throw new Error(`Unknown unit name: ${t}`)}return l.yD.has(e)?f("angular",9105):f("angular",9102)}const s=t.wkt2||t.wkt;if(null!=s){const t=u(s);if(null!=t){if(null!=t.wkid){const e=f(t.type,t.wkid);if(null!=e)return e}return{type:t.type,wkid:-1,factor:t.factor}}}return null}function g(t){if("linear"!==t.type)return null;if(-1===t.wkid)return{type:"area",wkid:-1,factor:t.factor**2};const e=i.SQ.get(t.wkid);return null==e?null:f("area",e)}function y(t){if(null!=t){if("number"==typeof t)return i.y6.get(t)??i.s9.get(t)??i.zD.get(t);if("string"!=typeof t)throw new n.D$(null,"InvalidParameter",null);switch((0,r.B)(t)){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return i.y6.get(109404);case"miles":case"mile":case"squaremile":case"squaremiles":return i.y6.get(109439);case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return i.y6.get(109414);case"acres":case"acre":case"ac":return i.y6.get(109402);case"hectares":case"hectare":case"ha":return i.y6.get(109401);case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return i.y6.get(109442);case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return i.y6.get(109405);case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return i.y6.get(109409);case"millimeter":case"millimeters":case"squaremillimeter":case"squaremillimeters":return i.y6.get(109452);case"centimeter":case"centimeters":case"squarecentimeter":case"squarecentimeters":return i.y6.get(109451);case"decimeter":case"decimeters":case"squaredecimeter":case"squaredecimeters":return i.y6.get(109450);case"inch":case"inches":case"squareinch":case"squareinches":return i.y6.get(109453);case"usfoot":case"usfeet":case"squareusfoot":case"squareusfeet":return i.y6.get(109406);case"usmile":case"usmiles":case"squareusmile":case"squareusmiles":return i.y6.get(109413)}}}function p(t){if(null!=t){if("number"==typeof t)return i.s9.get(t)??i.zD.get(t)??i.y6.get(t);if("string"!=typeof t)throw new n.D$(null,"InvalidParameter",null);switch((0,r.B)(t)){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":case"hectares":case"hectare":case"ha":return i.s9.get(9001);case"miles":case"mile":case"squaremile":case"squaremiles":return i.s9.get(9093);case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return i.s9.get(9036);case"yard":case"yd":case"yards":case"squareyards":case"squareyard":case"acres":case"acre":case"ac":return i.s9.get(9096);case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return i.s9.get(9002);case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return i.s9.get(9030);case"millimeter":case"millimeters":case"squaremillimeter":case"squaremillimeters":return i.s9.get(109007);case"centimeter":case"centimeters":case"squarecentimeter":case"squarecentimeters":return i.s9.get(109006);case"decimeter":case"decimeters":case"squaredecimeter":case"squaredecimeters":return i.s9.get(109005);case"inch":case"inches":case"squareinch":case"squareinches":return i.s9.get(109008);case"usfoot":case"usfeet":case"squareusfoot":case"squareusfeet":return i.s9.get(9003);case"usmile":case"usmiles":case"squareusmile":case"squareusmiles":return i.s9.get(9035)}}}function x(t,e,s){if(t.type!==e.type)throw new Error(`Incompatible unit types. src=${t.type} dest=${e.type}`);return s*(t.factor/e.factor)}function _(t,e,s){if(null==t||null==e)return s;const r=d(t);if(null==r)throw new Error("Unknown spatial reference unit.");const n="area"===e.type&&"linear"===r.type?g(r):r;if(null==n)throw new Error(`Unknown spatial reference ${e.type} unit.`);return x(n,e,s)}function P(t,e,s){if(null==t||null==e)return s;const r=d(e);if(null==r)throw new Error("Unknown spatial reference unit.");const n="area"===t.type&&"linear"===r.type?g(r):r;if(null==n)throw new Error(`Unknown spatial reference ${t.type} unit.`);return x(t,n,s)}function v(t,e,s){return null==t||null==e?s:x(t,e,s)}},59534(t,e,s){s.d(e,{B:()=>n,b:()=>i});var r=s(85935);function n(t){return t.toLowerCase().replaceAll(/[\s-]+/g,"")}class i{constructor(t,e){const s=new Map;for(const e of t){const t=n(e);if(s.has(t))throw new Error(`${e} already added as ${s.get(t)}`);s.set(t,e)}if(null!=e)for(const[t,r]of e){const e=n(t);if(s.has(e))throw new Error(`${t} already associated with ${s.get(e)}`);s.set(e,r)}this._enumMap=s}lookup(t){return this._enumMap.get(n(t))}get(t){const e=this.lookup(t);if(null==e)throw new r.D$(null,"InvalidParameter",null);return e}}},61691(t,e,s){s.d(e,{G:()=>r});class r{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}},66070(t,e,s){s.d(e,{g7:()=>p,zo:()=>x});var r=s(76061),n=s(61691),i=s(95213),a=s(55537),o=s(88885),c=s(83661);const u=1.4142135623730951,h=.017453292519943295,l=256,m=1024;class f{static construct(t,e,s){const r=new f;return r.x=t.x,r.y=t.y,r.m_next=-1,r.m_prev=-1,r.z=e,r.m=s,r.type=0,r}clone(){const t=new f;return t.x=this.x,t.y=this.y,t.m_next=this.m_next,t.m_prev=this.m_prev,t.z=this.z,t.m=this.m,t.type=this.type,t}asPoint2D(){return new c.P(this.x,this.y)}}class d{constructor(t){this.m_distance=-1,this.m_tolerance=-1,this.m_miterLimit=10,this.m_joins=0,this.m_progressCounter=0,this.m_bUseZ=!1,this.m_bUseM=!1,this.m_srcPts=[],this.m_srcPtCount=0,this.m_offsetPts=[],this.m_offsetPtCount=0,this.m_a1=0,this.m_a2=0,this.m_progressTracker=t}constructOffset(){const t=this.m_inputGeometry.getGeometryType();if(t===a.G.enumLine)return this.offsetLine();if(t===a.G.enumEnvelope)return this.offsetEnvelope();if((0,a.f)(t)){const t=new o.a;return t.addSegment(this.m_inputGeometry,!0),this.m_inputGeometry=t,this.constructOffset()}if(t===a.G.enumPolyline){const t=new o.a;return this.offsetMultiPath(t),t}if(t===a.G.enumPolygon){const t=new o.P;return this.offsetMultiPath(t),t}(0,a.t)("")}offsetLine(){const t=this.m_inputGeometry,e=t.getStartXY(),s=t.getEndXY(),r=new c.P;r.setSub(s,e),r.normalize(),r.leftPerpendicularThis(),r.scale(this.m_distance),e.addThis(r),s.addThis(r);const n=t.clone();return n.setStartXY(e),n.setEndXY(s),n}offsetEnvelope(){const t=this.m_inputGeometry;if(this.m_distance>0&&2!==this.m_joins){const e=new o.P;return e.addEnvelope(t,!1),this.m_inputGeometry=e,this.constructOffset()}const e=t.clone();return e.inflateCoords(this.m_distance,this.m_distance),e}progress(){}static buildPoint(t,e,s,r){r.x=t.x+e*Math.cos(s),r.y=t.y+e*Math.sin(s),r.type=t.type,r.z=t.z,r.m=t.m,r.m_next=-1,r.m_prev=-1}addPoint(t){this.m_offsetPts.push(t.clone()),this.m_offsetPtCount++}addPointEx(t,e){if(0===this.m_offsetPtCount)return void this.addPoint(t);const s=this.m_srcPtCount,r=this.m_srcPts[0===e?s-1:e-1],n=this.m_srcPts[e],i=d.dotSign(r,n,this.m_offsetPts[this.m_offsetPtCount-1],t);if(i>0)this.addPoint(t);else if(i<0)if(d.dotSign(r,n,n,this.m_offsetPts[this.m_offsetPtCount-1])>0){const n=new f;let i;i=0===e?s-2:1===e?s-1:e-2;const a=this.m_srcPts[i],o=Math.atan2(r.y-a.y,r.x-a.x);if(d.buildPoint(r,this.m_distance,o-c.o,n),this.m_offsetPts[this.m_offsetPtCount-1]=n.clone(),1===this.m_joins||2===this.m_joins){n.x=.5*(n.x+r.x),n.y=.5*(n.y+r.y),this.addPoint(n),d.buildPoint(r,this.m_distance,this.m_a1+c.o,n);const t=n.clone();t.x=.5*(t.x+r.x),t.y=.5*(t.y+r.y),t.type|=l,this.addPoint(t),this.addPoint(n)}else d.buildPoint(r,this.m_distance,this.m_a1+c.o,n),n.type|=l,this.addPoint(n);this.addPointEx(t,e)}else{const t=new f;if(d.buildPoint(n,this.m_distance,this.m_a1+c.o,t),this.addPoint(t),1===this.m_joins||2===this.m_joins){t.x=.5*(t.x+n.x),t.y=.5*(t.y+n.y),this.addPoint(t),d.buildPoint(n,this.m_distance,this.m_a2-c.o,t);const e=t.clone();e.x=.5*(e.x+n.x),e.y=.5*(e.y+n.y),e.type|=l,this.addPoint(e),this.addPoint(t)}else d.buildPoint(n,this.m_distance,this.m_a2-c.o,t),t.type|=l,this.addPoint(t)}}buildOffset(){const t=new f,e=this.m_srcPtCount;this.m_offsetPtCount=0;const s=.5*this.m_tolerance;let r=0,n=0;for(let i=0;i<e;i++){const a=this.m_srcPts[i],o=0===i?this.m_srcPts[e-1]:this.m_srcPts[i-1],f=i===e-1?this.m_srcPts[0]:this.m_srcPts[i+1];let g,y,p=0;{const t=o.x-a.x,e=o.y-a.y,s=f.x-a.x,u=f.y-a.y;g=Math.atan2(e,t),y=Math.atan2(u,s),this.m_a1=g,this.m_a2=y,0===i&&(r=g,n=y),p=c.P.orientationRobust(a.asPoint2D(),o.asPoint2D(),f.asPoint2D())}const x=y;if(y<g&&(y+=c.p),!(Math.abs(Math.abs(g-y)-Math.PI)<1e-8))if(p*this.m_distance>0)if(1===this.m_joins||2===this.m_joins){d.buildPoint(a,this.m_distance,g+c.o,t),this.addPoint(t);const e=.001;t.x=a.x+(t.x-a.x)*e,t.y=a.y+(t.y-a.y)*e,this.addPoint(t),d.buildPoint(a,this.m_distance,y-c.o,t);const s=t.clone();s.x=a.x+(s.x-a.x)*e,s.y=a.y+(s.y-a.y)*e,s.type|=l,this.addPoint(s),this.addPoint(t)}else{const e=.5*(y-g),s=0===e?this.m_distance:this.m_distance/Math.abs(Math.sin(e));d.buildPoint(a,s,.5*(g+y),t),this.addPointEx(t,i)}else{if(512&a.type){const e=1-s/Math.abs(this.m_distance);let r=1,n=this.m_distance<0?-Math.PI:Math.PI;if(e>-1&&e<1){let t=2*Math.acos(e);t<h&&(t=h),r=Math.trunc(Math.PI/t+1.5),r>1&&(n/=r)}r<=1&&(r=2,n/=2);let o=g+c.o;d.buildPoint(a,this.m_distance,o,t),0===i&&(t.type|=m),this.addPointEx(t,i);const u=this.m_distance/Math.cos(n/2);for(o+=n/2,d.buildPoint(a,u,o,t),t.type|=m,this.addPoint(t);--r>0;)o+=n,d.buildPoint(a,u,o,t),t.type|=m,this.addPoint(t);d.buildPoint(a,this.m_distance,y-c.o,t),t.type|=m,this.addPoint(t);continue}if(1!==this.m_joins){if(0===this.m_joins){const e=1-s/Math.abs(this.m_distance);let r=1,n=y-c.o-(g+c.o);if(e>-1&&e<1){let t=2*Math.acos(e);t<h&&(t=h),r=Math.trunc(Math.abs(n)/t+1.5),r>1&&(n/=r)}const o=this.m_distance/Math.cos(.5*n);let u=g+c.o+.5*n;for(d.buildPoint(a,o,u,t),this.addPointEx(t,i);--r>0;)u+=n,d.buildPoint(a,o,u,t),this.addPoint(t);continue}if(2===this.m_joins){const e=o.x-a.x,s=o.y-a.y,r=f.x-a.x,n=f.y-a.y;let h=(e*r+s*n)/Math.sqrt(e*e+s*s)/Math.sqrt(r*r+n*n);if(h=Math.max(h,-1),h>1-1e-8){d.buildPoint(a,u*this.m_distance,y-.25*Math.PI,t),this.addPointEx(t,i),d.buildPoint(a,u*this.m_distance,y+.25*Math.PI,t),this.addPoint(t);continue}const l=Math.abs(this.m_distance/Math.sin(.5*Math.acos(h))),m=Math.abs(this.m_miterLimit*this.m_distance);if(l>m){const e=.5*(y-g),s=this.m_distance/Math.abs(Math.sin(e));d.buildPoint(a,s,.5*(g+y),t);const r=c.P.construct(t.x,t.y),n=c.P.construct(a.x,a.y),o=new c.P;o.setSub(r,n);const u=new c.P;u.setScaleAdd(m/o.length(),o,n);const h=Math.sqrt(l*l-this.m_distance*this.m_distance),f=(l-m)*Math.abs(this.m_distance)/h;this.m_distance>0?o.rightPerpendicularThis():o.leftPerpendicularThis(),o.scale(f/o.length());const p=new c.P;p.setAdd(u,o);const x=new c.P;x.setSub(u,o),t.x=p.x,t.y=p.y,this.addPointEx(t,i),t.x=x.x,t.y=x.y,this.addPoint(t);continue}const p=.5*(y-g),x=this.m_distance/Math.abs(Math.sin(p));d.buildPoint(a,x,.5*(g+y),t),this.addPointEx(t,i);continue}{let e;if(y=x,this.m_distance>0?(y>g&&(y-=c.p),e=g-y<c.o):(y<g&&(y+=c.p),e=y-g<c.o),e){const e=this.m_distance*u;let s;s=e<0?g+.25*Math.PI:g+3*Math.PI*.25,d.buildPoint(a,e,s,t),this.addPointEx(t,i),s=e<0?y-.25*Math.PI:y-3*Math.PI*.25,d.buildPoint(a,e,s,t),this.addPoint(t)}else{const e=.5*(y-g),s=this.m_distance/Math.abs(Math.sin(e));y<g&&(y+=c.p),d.buildPoint(a,s,(g+y)/2,t),this.addPointEx(t,i)}}}else d.buildPoint(a,this.m_distance,g+c.o,t),this.addPointEx(t,i),d.buildPoint(a,this.m_distance,y-c.o,t),this.addPoint(t)}}return this.m_a1=r,this.m_a2=n,this.addPointEx(this.m_offsetPts[0],0),this.m_offsetPts[0]=this.m_offsetPts[this.m_offsetPtCount-1].clone(),this.removeBadSegsFast()}removeBadSegsFast(){let t=!1;for(let t=0;t<this.m_offsetPtCount;t++){const e=this.m_offsetPts[t];e.m_next=t+1,e.m_prev=t-1}this.m_offsetPts[0].m_prev=this.m_offsetPtCount-2,this.m_offsetPts[this.m_offsetPtCount-2].m_next=0;let e=0;for(let s=0;s<this.m_offsetPtCount;s++)if(this.m_offsetPts[e].type&l){const s=this.deleteClosedSeg(e);if(-1===s){t=!0;break}e=s}else e=this.m_offsetPts[e].m_next;return!t&&(this.compressOffsetArray(e),!0)}deleteClosedSeg(t){const e=this.m_offsetPtCount-1;let s,r,n=t;for(let i=1;i<=e-2;i++){n=this.m_offsetPts[n].m_next,s=n,r=t;for(let t=1;t<=i;t++){if(r=this.m_offsetPts[r].m_prev,0===(this.m_offsetPts[r].type&l)&&0===(this.m_offsetPts[s].type&l)){const t=this.handleClosedIntersection(r,s);if(-1!==t)return t}s=this.m_offsetPts[s].m_prev}}return-1}handleClosedIntersection(t,e){const s=this.m_offsetPts[this.m_offsetPts[t].m_prev],r=this.m_offsetPts[t],n=this.m_offsetPts[this.m_offsetPts[e].m_prev],i=this.m_offsetPts[e];if(!this.sectGraphicRect(s,r,n,i))return-1;const a={pt:new f,bAtExistingPt:!1};if(((r.x-s.x)*(i.y-n.y)-(r.y-s.y)*(i.x-n.x))*this.m_distance<0&&this.findIntersection(s,r,n,i,a)&&!a.bAtExistingPt){const o=1e-8,c=Math.sqrt((r.x-s.x)*(r.x-s.x)+(r.y-s.y)*(r.y-s.y)),u=(r.x-s.x)/c,h=(r.y-s.y)/c,l=Math.sqrt((i.x-n.x)*(i.x-n.x)+(i.y-n.y)*(i.y-n.y)),m=(i.x-n.x)/l,f=(i.y-n.y)/l;let d=!1;const g=a.pt.clone();g.x+=(u+m)*o,g.y+=(h+f)*o;let y=n,p=a.pt,x=this.m_offsetPts[t].m_prev;for(;p.y>g.y!=y.y>g.y&&g.x<(y.x-p.x)*(g.y-p.y)/(y.y-p.y)+p.x&&(d=!d),y=p,x=this.m_offsetPts[x].m_next,x!==e;)p=this.m_offsetPts[x];if(d)return-1;const _=this.m_offsetPts[t].m_prev;return a.pt.type=r.type,a.pt.m_next=e,a.pt.m_prev=_,this.m_offsetPts[t]=a.pt,this.m_offsetPts[e].m_prev=t,e}return-1}sectGraphicRect(t,e,s,r){return Math.max(t.x,e.x)>=Math.min(s.x,r.x)&&Math.max(s.x,r.x)>=Math.min(t.x,e.x)&&Math.max(t.y,e.y)>=Math.min(s.y,r.y)&&Math.max(s.y,r.y)>=Math.min(t.y,e.y)}findIntersection(t,e,s,r,n){let i,a,o,c;return n.bAtExistingPt=!1,i=(e.y-t.y)*(r.x-s.x)-(e.x-t.x)*(r.y-s.y),a=(s.y-t.y)*(e.x-t.x)-(s.x-t.x)*(e.y-t.y),o=0===i?2:a/i,o>=0&&o<=1&&(c=o,i=(r.y-s.y)*(e.x-t.x)-(r.x-s.x)*(e.y-t.y),a=(t.y-s.y)*(r.x-s.x)-(t.x-s.x)*(r.y-s.y),o=0===i?2:a/i,o>=0&&o<=1)&&(n.pt.x=t.x+o*(e.x-t.x),n.pt.y=t.y+o*(e.y-t.y),this.m_bUseZ&&(n.pt.z=s.z+c*(r.z-s.z)),this.m_bUseM&&(n.pt.m=s.m+c*(r.m-s.m)),0!==c&&1!==c||0!==o&&1!==o||(n.bAtExistingPt=!0),!((0===c||1===c)&&o>0&&o<1||(0===o||1===o)&&c>0&&c<1))}compressOffsetArray(t){for(;this.m_offsetPts[t].m_prev<t;)t=this.m_offsetPts[t].m_prev;let e=0,s=t;do{const t=this.m_offsetPts[s].clone();this.m_offsetPts[e]=t,s=t.m_next,e++}while(s!==t);this.m_offsetPts[e]=this.m_offsetPts[0].clone(),this.m_offsetPtCount=e+1}addPart(t,e){if(!(e<2))for(let s=0;s<e;s++){const e=this.m_offsetPts[t+s];if(s?this.m_bUseZ?this.m_resultPath.lineTo3DCoords(e.x,e.y,e.z):this.m_resultPath.lineToCoords(e.x,e.y):this.m_bUseZ?this.m_resultPath.startPath3DCoords(e.x,e.y,e.z):this.m_resultPath.startPathCoords(e.x,e.y),this.m_bUseM){const t=this.m_resultPath.getPointCount()-1;this.m_resultPath.setAttribute(2,t,0,e.m)}}}offsetMultiPath(t){const e=(0,o.d)(this.m_inputGeometry,0,this.m_tolerance,0,this.m_progressTracker,12e3),s=e.querySegmentIterator();s.resetToFirstPath();let r=-1;for(;s.nextPath();)r++,this.offsetPath(e,r,t)}offsetPath(t,e,s){let r=t.getPathStart(e),n=t.getPathEnd(e);if(this.m_resultPath=s,t.isClosedPath(e)){const e=t.getXY(r);for(;n>r&&t.getXY(n-1).equals(e);)n--;if(n-r>=2){this.m_srcPtCount=n-r,this.m_srcPts.length=this.m_srcPtCount;for(let e=r;e<n;e++)this.progress(),this.m_srcPts[e-r]=f.construct(t.getXY(e),this.m_bUseZ?t.getAttributeAsDbl(1,e,0):0,this.m_bUseM?t.getAttributeAsDbl(2,e,0):0);this.buildOffset()&&this.addPart(0,this.m_offsetPtCount-1)}}else{const e=t.getXY(r);for(;r<n-1&&t.getXY(r+1).equals(e);)r++;const s=t.getXY(n-1);for(;r<n-1&&t.getXY(n-2).equals(s);)n--;if(n-r>=2){this.m_srcPtCount=2*(n-r)-2,this.m_srcPts.length=this.m_srcPtCount;let s=f.construct(e,this.m_bUseZ?t.getAttributeAsDbl(1,r,0):0,this.m_bUseM?t.getAttributeAsDbl(2,r,0):0);s.type|=1536,this.m_srcPts[0]=s;let i=1,a=this.m_srcPtCount-1;for(let e=r+1;e<n-1;e++,i++,a--)this.progress(),s=f.construct(t.getXY(e),this.m_bUseZ?t.getAttributeAsDbl(1,e,0):0,this.m_bUseM?t.getAttributeAsDbl(2,e,0):0),this.m_srcPts[i]=s.clone(),s.type|=m,this.m_srcPts[a]=s.clone();if(s=f.construct(t.getXY(n-1),this.m_bUseZ?t.getAttributeAsDbl(1,n-1,0):0,this.m_bUseM?t.getAttributeAsDbl(2,n-1,0):0),s.type|=512,this.m_srcPts[i]=s.clone(),this.buildOffset())if(this.m_offsetPts.length>=2){let t=-1,e=-1,s=0!==(this.m_offsetPts[this.m_offsetPtCount-1].type&m);s||(t=0);for(let r=1;r<this.m_offsetPtCount;r++){this.progress();const n=0!==(this.m_offsetPts[r].type&m);n?s||(e=r-1,e-t+1>1&&this.addPart(t,e-t+1)):s&&(t=r-1),s=n}s||(e=this.m_offsetPtCount-1,e-t+1>1&&this.addPart(t,e-t+1))}else{const t=0,e=this.m_offsetPtCount-1;e-t>=1&&this.addPart(t,e-t+1)}}}this.m_srcPts.length=0,this.m_srcPtCount=0,this.m_offsetPts.length=0,this.m_offsetPtCount=0}static dotSign(t,e,s,r){const n=e.x-t.x,i=e.y-t.y,a=r.x-s.x,o=r.y-s.y,u=(0,c.t)(n,i,a,o);return(0,c.e)(u)}}class g extends n.G{constructor(t,e,s,r,n,i,a){super(),this.m_progressTracker=a,this.m_index=-1,this.m_inputGeoms=t,this.m_spatialReference=e,this.m_distance=s,this.m_joins=r,this.m_miterLimit=n,this.m_flattenError=i}tock(){return!0}getRank(){return 1}next(){if(!this.m_inputGeoms)return null;let t;for(;t=this.m_inputGeoms.next();)return this.m_index=this.m_inputGeoms.getGeometryID(),this.offset(t);return null}getGeometryID(){return this.m_index}offset(t){let e;return(0,a.c)(t),e=this.m_flattenError<=0?(0,i.e)(this.m_spatialReference,t,!0).total():this.m_flattenError,function(t,e,s,r,n,i){if(null===t&&(0,a.a)(""),t.getDimension()<1&&(0,a.a)(""),n>0||(0,a.a)(""),(0,a.c)(t),0===e||t.isEmpty())return t;const o=new d(i);return o.m_bUseZ=t.hasAttribute(1),o.m_bUseM=t.hasAttribute(2),o.m_inputGeometry=t,o.m_distance=e,o.m_tolerance=n,o.m_joins=s,o.m_miterLimit=r>1?r:1,o.m_progressCounter=0,o.constructOffset()}(t,this.m_distance,this.m_joins,this.m_miterLimit,e,this.m_progressTracker)}}const y=new class{getOperatorType(){return 10108}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,s,r,n,i,a){return new g(t,e,s,r,n,i,a)}execute(t,e,s,r,n,i,a){return new g(null,e,s,r,n,i,a).offset(t)}};function p(t,e,s,r,n,i){return y.execute(t,e,s,r,n,i,null)}function x(t,e,s,n,i,a){const o=y.executeMany(new r.S(t),e,s,n,i,a,null);return Array.from(o)}},69397(t,e,s){s.d(e,{Qf:()=>c,Qh:()=>a,RS:()=>n,Ul:()=>f,lM:()=>i,qK:()=>h});var r=s(34275);const n=16;function i(t){if(!t)return 0;let e=h;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return c(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let s=l;for(let r=0;r<e;r++)s+=o(t[r]);return s}(t);let e=h;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):h;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function c(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+m:Array.isArray(e)?u(e,n):0:0),0)}function u(t,e){return l+t.length*e}const h=32,l=16,m=145,f=64},70328(t,e,s){s.d(e,{BI:()=>_,DC:()=>l,Ej:()=>f,Ie:()=>p,Jt:()=>x,Ne:()=>d,RF:()=>h,aI:()=>v,fA:()=>a,gE:()=>c,hZ:()=>y,iT:()=>m,is:()=>P,qv:()=>M,vI:()=>g,vY:()=>o,v_:()=>C,vt:()=>i,w1:()=>u});var r=s(5443),n=(s(19419),s(4197));function i(t=C){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function a(t,e,s,r,n,a,o=i()){return o[0]=t,o[1]=e,o[2]=s,o[3]=r,o[4]=n,o[5]=a,o}function o(t,e=i()){return function(t,e,s,r=i()){return y(r,M),function(t,e,s=0,r=e.length/3){let n=t[0],i=t[1],a=t[2],o=t[3],c=t[4],u=t[5];for(let t=0;t<r;t++)n=Math.min(n,e[s+3*t]),i=Math.min(i,e[s+3*t+1]),a=Math.min(a,e[s+3*t+2]),o=Math.max(o,e[s+3*t]),c=Math.max(c,e[s+3*t+1]),u=Math.max(u,e[s+3*t+2]);t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=c,t[5]=u}(r,t,e,s),r}(t,0,t.length/3,e)}function c(t,e=(0,n.jh)(24)){const[s,r,i,a,o,c]=t;return e[0]=s,e[1]=r,e[2]=i,e[3]=s,e[4]=r,e[5]=c,e[6]=s,e[7]=o,e[8]=i,e[9]=s,e[10]=o,e[11]=c,e[12]=a,e[13]=r,e[14]=i,e[15]=a,e[16]=r,e[17]=c,e[18]=a,e[19]=o,e[20]=i,e[21]=a,e[22]=o,e[23]=c,e}function u(t,e){const s=isFinite(t[2])||isFinite(t[5]);return new r.A(s?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function h(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t[4]=Math.max(t[4],e[4]),t[5]=Math.max(t[5],e[5])}function l(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[3]=Math.max(t[3],e[2]),t[4]=Math.max(t[4],e[3])}function m(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[0]),t[4]=Math.max(t[4],e[1]),t[5]=Math.max(t[5],e[2])}function f(t,e=[0,0,0]){return e[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),e[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),e[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),e}function d(t,e,s=t){return s[0]=e[0],s[1]=e[1],s[2]=e[2],s!==t&&(s[3]=t[3],s[4]=t[4],s[5]=t[5]),s}function g(t,e,s=t){return s[3]=e[0],s[4]=e[1],s[5]=e[2],s!==t&&(s[0]=t[0],s[1]=t[1],s[2]=t[2]),t}function y(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function p(t){return t?y(t,M):i(M)}function x(t,e){return t[0]=e[0],t[1]=e[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=e[2],t[4]=e[3],t[5]=Number.POSITIVE_INFINITY,t}function _(t,e,s,r,n){return t[0]=e,t[1]=s,t[2]=Number.NEGATIVE_INFINITY,t[3]=r,t[4]=n,t[5]=Number.POSITIVE_INFINITY,t}function P(t){return 6===t.length}function v(t,e,s){if(null==t||null==e)return t===e;if(!P(t)||!P(e))return!1;if(s){for(let r=0;r<t.length;r++)if(!s(t[r],e[r]))return!1}else for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];i()},71409(t,e,s){s.d(e,{A7:()=>m,L2:()=>u,SQ:()=>r,s9:()=>c,y6:()=>l,zD:()=>a});const r=new Map([[1025,109452],[1033,109451],[9001,109404],[9002,109405],[9003,109406],[9005,109407],[9014,109408],[9030,109409],[9031,109410],[9033,109411],[9034,109412],[9035,109413],[9036,109414],[9037,109415],[9038,109416],[9039,109417],[9040,109418],[9041,109419],[9042,109420],[9043,109421],[9050,109422],[9051,109423],[9052,109424],[9053,109425],[9060,109426],[9061,109427],[9062,109428],[9063,109429],[9070,109430],[9080,109431],[9081,109432],[9082,109433],[9083,109434],[9084,109435],[9085,109436],[9086,109437],[9087,109438],[9093,109439],[9094,109440],[9095,109441],[9096,109442],[9097,109444],[9098,109445],[9099,109446],[9300,109447],[9301,109448],[9302,109449],[109001,109442],[109002,109443],[109003,109444],[109004,109445],[109005,109450],[109006,109451],[109007,109452],[109008,109453],[109009,109454],[109010,109455],[109011,109456],[109012,109457],[109013,109458],[109014,109459],[109015,109462],[109016,109464],[109017,109465],[109018,109466],[109030,109460],[109031,109461]]);function n(t){return(e,s)=>[e,{type:t,wkid:e,factor:s}]}const i=n("angular"),a=new Map([i(1031,4.84813681109536e-9),i(9101,1),i(9102,.017453292519943295),i(9103,.0002908882086657216),i(9104,484813681109536e-20),i(9105,.015707963267948967),i(9106,.015707963267948967),i(9109,1e-6),i(9112,.00015707963267948965),i(9113,15707963267948967e-22),i(9114,.0009817477042468104)]),o=n("linear"),c=new Map([o(1025,.001),o(1033,.01),o(9001,1),o(9002,.3048),o(9003,.30480060960121924),o(9005,.3047972654),o(9014,1.8288),o(9030,1852),o(9031,1.0000135965),o(9033,20.11684023368047),o(9034,.2011684023368047),o(9035,1609.3472186944375),o(9036,1e3),o(9037,.9143917962),o(9038,20.1166195164),o(9039,.201166195164),o(9040,.9143984146160287),o(9041,.3047994715386762),o(9042,20.116765121552632),o(9043,.2011676512155263),o(9050,.9143992),o(9051,.3047997333333333),o(9052,20.1167824),o(9053,.201167824),o(9060,.9143992042898124),o(9061,.30479973476327077),o(9062,20.116782494375872),o(9063,.2011678249437587),o(9070,.30480083333333335),o(9080,.30479951024814694),o(9081,.30479841),o(9082,.3047996),o(9083,.3047995),o(9084,.9143985307444408),o(9085,.91439523),o(9086,.9143988),o(9087,.9143985),o(9093,1609.344),o(9094,.3047997101815088),o(9095,.3048007491),o(9096,.9144),o(9097,20.1168),o(9098,.201168),o(9099,.914398),o(9300,.30479933333333337),o(9301,20.116756),o(9302,.20116756),o(109001,.9144),o(109002,.9144018288036576),o(109003,20.1168),o(109004,.201168),o(109005,.1),o(109006,.01),o(109007,.001),o(109008,.0254),o(109009,.025400050800101603),o(109010,5.0292),o(109011,5.029210058420118),o(109012,1853.248),o(109013,1853.184),o(109014,1.7018),o(109015,.8466683600033867),o(109016,.00035277777777777776),o(109017,1e-6),o(109018,1e-9),o(109030,5e4),o(109031,15e4)]),u=c.get(9001),h=n("area"),l=new Map([h(109401,1e4),h(109402,4046.8564224),h(109403,4046.872609874252),h(109404,1),h(109405,.09290304),h(109406,.09290341161327487),h(109407,.09290137299531805),h(109408,3.34450944),h(109409,3429904),h(109410,1.000027193184865),h(109411,404.6872609874253),h(109412,.04046872609874252),h(109413,2589998.470319522),h(109414,1e6),h(109415,.8361123569578626),h(109416,404.6783807676053),h(109417,.04046783807676053),h(109418,.8361244606523066),h(109419,.09290271785025629),h(109420,404.6842389557165),h(109421,.04046842389557164),h(109422,.83612589696064),h(109423,.0929028774400711),h(109424,404.6849341289498),h(109425,.04046849341289498),h(109426,.836125904805842),h(109427,.09290287831176021),h(109428,404.6849379260275),h(109429,.04046849379260275),h(109430,.09290354800069446),h(109431,.09290274144751023),h(109432,.09290207073852812),h(109433,.09290279616016),h(109434,.09290273520025),h(109435,.836124673027592),h(109436,.8361186366467529),h(109437,.8361251654414399),h(109438,.83612461680225),h(109439,2589988.110336),h(109440,.09290286332673177),h(109441,.09290349665192114),h(109442,.83612736),h(109443,.8361307045194736),h(109444,404.68564224),h(109445,.040468564224),h(109446,.836123702404),h(109447,.09290263360044447),h(109448,404.683871963536),h(109449,.0404683871963536),h(109450,.01),h(109451,1e-4),h(109452,1e-6),h(109453,64516e-8),h(109454,.0006451625806477421),h(109455,25.29285264),h(109456,25.29295381171408),h(109457,3434528.149504),h(109458,3434290.937856),h(109459,2.89612324),h(109460,25e8),h(109461,225e8),h(109462,.7168473118308245),h(109463,100),h(109464,1.244521604938271e-7),h(109465,1e-12),h(109466,1e-18)]),m=l.get(109404)},76061(t,e,s){s.d(e,{S:()=>n});var r=s(61691);class n extends r.G{constructor(t){super(),this.m_iGeom=-1,this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125(t,e,s){s.r(e),s.d(e,{fromExtent:()=>y,fromGeometry:()=>g,fromMultipoint:()=>p,fromPoint:()=>x,fromPolygon:()=>_,fromPolyline:()=>P,fromPolylineUsingImportOperator:()=>v,fromSpatialReference:()=>M,getSpatialReference:()=>d,toExtent:()=>b,toGeometry:()=>C,toMultipoint:()=>E,toPoint:()=>w,toPolygon:()=>A,toPolyline:()=>S});var r=s(83661),n=(s(79187),s(55537)),i=s(95213),a=s(88885),o=s(5443),c=s(48526),u=s(86738),h=s(39829),l=s(82799),m=(s(90293),s(83299));const f="_gxVersion";function d(t){return Array.isArray(t)?t[0].spatialReference:t.spatialReference}function g(t){switch(t.type){case"point":return x(t);case"multipoint":return p(t);case"polyline":return P(t);case"polygon":return _(t);case"extent":return y(t);default:throw new Error(`Unsupported geometry type: ${t.type}`)}}function y(t){if(!t.getCacheValue(f)){const e=new i.E;e.setCoords(t.xmin,t.ymin,t.xmax,t.ymax),t.hasM&&e.setInterval(2,0,t.mmin,t.mmax),t.hasZ&&e.setInterval(1,0,t.zmin,t.zmax),t.setCacheValue(f,e)}return t.getCacheValue(f)}function p(t){if(!t.getCacheValue(f)){const e=new a.M,s=new i.P,r=t.points,n=t.hasM,o=t.hasZ,c=o?3:2;for(let t=0,i=r.length;t<i;t++){const i=r[t];s.setXYCoords(i[0],i[1]),o&&s.setZ(i[2]??0),n&&s.setM(i[c]??NaN),e.add(s)}t.setCacheValue(f,e)}return t.getCacheValue(f)}function x(t){if(!t.getCacheValue(f)){const e=new i.P;e.setXYCoords(t.x,t.y),t.hasM&&e.setM(t.m),t.hasZ&&e.setZ(t.z),t.setCacheValue(f,e)}return t.getCacheValue(f)}function _(t){if(!t.getCacheValue(f)){const{curveRings:e,hasM:s,hasZ:r,rings:n}=t,i=(0,m.fromGeometryToGXGeometry)({curveRings:e,hasM:s,hasZ:r,rings:n});t.setCacheValue(f,i)}return t.getCacheValue(f)}function P(t){if(!t.getCacheValue(f)){const{curvePaths:e,hasM:s,hasZ:r,paths:n}=t,i=(0,m.fromGeometryToGXGeometry)({curvePaths:e,hasM:s,hasZ:r,paths:n});t.setCacheValue(f,i)}return t.getCacheValue(f)}function v(t){if(!t.getCacheValue(f)){const{curvePaths:e,hasM:s,hasZ:r,paths:n}=t,i=(0,m.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:e,hasM:s,hasZ:r,paths:n});t.setCacheValue(f,i)}return t.getCacheValue(f)}function M(t){return(0,m.fromSpatialReference)(t)}function C(t,e){if(t)switch(t.getGeometryType()){case n.G.enumPoint:return w(t,e);case n.G.enumEnvelope:return b(t,e);case n.G.enumMultiPoint:return E(t,e);case n.G.enumPolyline:return S(t,e);case n.G.enumPolygon:return A(t,e)}return null}function b(t,e){if(t.isEmpty())return null;const s=new o.A({xmin:t.getXMin(),ymin:t.getYMin(),xmax:t.getXMax(),ymax:t.getYMax(),spatialReference:e}),r=t.getDescription();if(r.hasM()){const e=t.queryInterval(2,0);s.mmin=e.vmin,s.mmax=e.vmax}if(r.hasZ()){const e=t.queryInterval(1,0);s.zmin=e.vmin,s.zmax=e.vmax}return s.setCacheValue(f,t),s}function E(t,e){if(t.isEmpty())return null;const s=t.getDescription(),r=s.hasM(),n=s.hasZ(),a=[],o=new i.P;for(let e=0,s=t.getPointCount();e<s;e++){t.getPointByVal(e,o);const s=[o.getX(),o.getY()];n&&s.push(o.getZ()),r&&s.push(o.getM()),a.push(s)}const u=new c.A({hasM:r,hasZ:n,points:a,spatialReference:e});return u.setCacheValue(f,t),u}function w(t,e){if(t instanceof r.P)return new u.A({x:t.x,y:t.y,spatialReference:e});if(t.isEmpty())return null;const s=new u.A({x:t.getX(),y:t.getY(),spatialReference:e}),n=t.getDescription();return n.hasM()&&(s.m=t.getM()),n.hasZ()&&(s.z=t.getZ()),s.setCacheValue(f,t),s}function A(t,e){if(t.isEmpty())return null;const s=h.A.fromJSON({...(0,m.toGeometry)(t,null),spatialReference:e});return s.setCacheValue(f,t),s}function S(t,e){if(t.isEmpty())return null;const s=l.A.fromJSON({...(0,m.toGeometry)(t,null),spatialReference:e});return s.setCacheValue(f,t),s}},85549(t,e,s){s.d(e,{executeOffsetJson:()=>u,r:()=>c});var r=s(40547),n=s(66070),i=s(78125),a=s(83299);const o={round:0,bevel:1,miter:2,square:3};function c(t,e,s,n,a,o){e=(0,r.convertToSpatialReferenceUnit)((0,r.toLengthUnit)(s),t.spatialReference,e);const c=(0,i.fromGeometry)(t),u=(0,i.getSpatialReference)(t),l=h(c,(0,i.fromSpatialReference)(u),e,n,a,o);return(0,i.toGeometry)(l,u)}function u(t,e,s,n,i,o){e=(0,r.convertToSpatialReferenceUnit)((0,r.toLengthUnit)(s),t.spatialReference,e);const c=(0,a.fromGeometry)(t),u=c.getGeometry(),l=c.getSpatialReference(),m=h(u,l,e,n,i,o);return(0,a.toGeometry)(m,l)}function h(t,e,s,r,i,a){const c=(0,n.g7)(t,e,s,o[r],i,a);if(!c.isEmpty())return c;{const c=t.clone();c.reverseAllPaths();const u=(0,n.g7)(c,e,-s,o[r],i,a);if(!u.isEmpty())return u.reverseAllPaths(),u}const u=Math.abs(s)/10,h=u/10;let l=a;if("round"===r&&(l+=h),"bevel"===r||"square"===r){const c=(0,n.g7)(t,e,s,o[r="miter"],i,a);if(!c.isEmpty())return c}if("miter"===r){const c=(0,n.g7)(t,e,s,o[r="round"],i,a);if(!c.isEmpty())return c}if("round"===r)for(;l<=u;l+=h){const a=(0,n.g7)(t,e,s,o[r],i,l);if(!a.isEmpty())return a}return null}},85935(t,e,s){s.d(e,{D$:()=>o,Nh:()=>l,O$:()=>h,mT:()=>u,ps:()=>f});var r=s(799);const n={TypeNotAllowedInFeature:"Feature attributes only support dates, numbers, strings, guids.",LogicError:"Logic error - {reason}",CannotCompareDateAndTime:"Cannot compare date or dateonly with timeonly types",NeverReach:"Encountered unreachable logic",AsyncNotEnabled:"Async Arcade must be enabled for this script",ModuleAccessorMustBeString:"Module accessor must be a string",ModuleExportNotFound:"Module has no export with provided identifier",ModulesNotSupported:"Current profile does not support modules",ArrayAccessMustBeNumber:"Array accessor must be a number",FunctionNotFound:"Function not found",FieldNotFound:"Key not found - {key}",CircularModules:"Circular module dependencies are not allowed",Cancelled:"Execution cancelled",UnsupportedHashType:"Type not supported in hash function",IllegalResult:"Value is not a supported return type",PortalRequired:"Portal is required",InvalidParameter:"Invalid parameter",WrongNumberOfParameters:"Call with wrong number of parameters",Unrecognized:"Unrecognized code structure",UnrecognizedType:"Unrecognized type",WrongSpatialReference:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",BooleanConditionRequired:"Conditions must use booleans",NoFunctionInDictionary:"Dictionaries cannot contain functions.",NoFunctionInArray:"Arrays cannot contain functions.",NoFunctionInTemplateLiteral:"Template Literals do not expect functions by value.",KeyAccessorMustBeString:"Accessor must be a string",KeyMustBeString:"Object keys must be a string",Immutable:"Object is immutable",UnexpectedToken:"Unexpected token",MemberOfNull:"Cannot access property of null object",MaximumCallDepth:"Exceeded maximum function depth",OutOfBounds:"Out of bounds",InvalidIdentifier:"Identifier not recognized",CallNonFunction:"Expression is not a function",InvalidMemberAccessKey:"Cannot access value using a key of this type",AssignModuleFunction:"Cannot assign function to module variable",UnsupportUnaryOperator:"Unsupported unary operator",UnsupportedOperator:"Unsupported operator",LogicalExpressionOnlyBoolean:"Logical expressions must be boolean",LogicExpressionOrAnd:"Logical expression can only be combined with || or &&",CannotChangeTimeZoneTime:"Cannot change the timezone of a Time",CannotChangeTimeZoneDateOnly:"Cannot change the timezone of a DateOnly",FeatureSetDoesNotHaveSubtypes:"FeatureSet does not have subtypes"};class i extends Error{constructor(...t){super(...t)}}class a extends i{constructor(t,e){super(c(e)+t.message,{cause:t}),this.loc=null,Error.captureStackTrace&&Error.captureStackTrace(this,a),e?.loc&&(this.loc=e.loc)}}class o extends Error{constructor(t,e,s,i){super("Execution error - "+c(s)+(0,r.HC)(n[e],i)),this.loc=null,this.declaredRootClass="esri.arcade.arcadeexecutionerror",Error.captureStackTrace&&Error.captureStackTrace(this,o),s?.loc&&(this.loc=s.loc)}}function c(t){return t&&t.loc?`Line : ${t.loc.start?.line}, ${t.loc.start?.column}: `:""}class u extends Error{constructor(t,e,s,i){super("Compilation error - "+c(s)+(0,r.HC)(n[e],i)),this.loc=null,this.declaredRootClass="esri.arcade.arcadecompilationerror",Error.captureStackTrace&&Error.captureStackTrace(this,u),s?.loc&&(this.loc=s.loc)}}class h extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror",Error.captureStackTrace&&Error.captureStackTrace(this,h)}}function l(t,e,s){return"esri.arcade.arcadeexecutionerror"===s.declaredRootClass||"esri.arcade.arcadecompilationerror"===s.declaredRootClass?null===s.loc&&e?.loc?new a(s,{cause:s}):s:("esri.arcade.featureset.support.featureseterror"===s.declaredRootClass||"esri.arcade.featureset.support.sqlerror"===s.declaredRootClass||s.declaredRootClass,e?.loc?new a(s,{cause:s}):s)}const m={UnrecognizedUri:"Unrecognized uri - {uri}",UnsupportedUriProtocol:"Unrecognized uri protocol"};class f extends Error{constructor(t,e){super((0,r.HC)(m[t],e)),this.declaredRootClass="esri.arcade.arcademoduleerror",Error.captureStackTrace&&Error.captureStackTrace(this,f)}}},87992(t,e,s){s.d(e,{JR:()=>E,ME:()=>M,MY:()=>w,NO:()=>v,Nh:()=>b,V2:()=>O,_s:()=>k,e6:()=>G,gh:()=>C,tr:()=>F,uX:()=>y});var r=s(5482),n=s(69397),i=s(16930),a=(s(70328),s(19419)),o=s(60408),c=s(21325),u=s(513),h=s(50954),l=s(79567),m=s(52006),f=s(49663),d=s(46068),g=s(92722);class y{constructor({type:t,spatialReference:e,vertexCount:s,vertexXY:r,vertexZ:n,vertexM:i,partCount:a,partOffsets:o,partFlags:c,segmentFlags:u,segmentIndices:h,segmentParams:l,segmentCountArc:m,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=s,this.vertexXY=r,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=c,this.segmentFlags=u,this.segmentIndices=h,this.segmentParams=l,this.segmentCountArc=m,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:s}=this;return t&&t-e-s}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return null!=this.segmentFlags}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function t(t){return t?n.Ul+t.byteLength:0}return t(this.vertexXY)+t(this.vertexZ)+t(this.vertexM)+t(this.partOffsets)+t(this.partFlags)+t(this.segmentFlags)+t(this.segmentIndices)+t(this.segmentParams)}clone(){const{type:t,vertexCount:e,partCount:s,hasZ:r,hasM:n,segmentCountArc:i,segmentCountBezier:a}=this,o=O(t,e,s,r,n,this.hasCurves(),i,a);o.spatialReference=this.spatialReference;const{vertexXY:c,vertexZ:u,vertexM:h}=this;if(o.vertexXY.set(c.subarray(0,2*e),0),o.vertexZ?.set(u.subarray(0,e),0),o.vertexM?.set(h.subarray(0,e),0),this.isMultipart()){const{partOffsets:t,partFlags:e}=this;o.partFlags.set(e.subarray(0,s+1)),o.partOffsets.set(t.subarray(0,s+1))}if(this.hasCurves()){const{segmentFlags:t,segmentIndices:s,segmentParams:r,segmentParamCount:n}=this;o.segmentFlags.set(t.subarray(0,e),0),o.segmentIndices.set(s.subarray(0,e),0),o.segmentParams.set(r.subarray(0,n),0)}return o}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!(0,c.aI)(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves()!==t.hasCurves()||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const s=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,s)=>Math.abs(t-s)>e||isNaN(t)!==isNaN(s);for(let e=0;e<this.vertexCount;++e)if(s(this.vertexXY[2*e],t.vertexXY[2*e])||s(this.vertexXY[2*e+1],t.vertexXY[2*e+1]))return!1;if(this.hasZ)for(let e=0;e<this.vertexCount;++e)if(s(this.vertexZ[e],t.vertexZ[e]))return!1;if(this.hasM)for(let e=0;e<this.vertexCount;++e)if(s(this.vertexM[e],t.vertexM[e]))return!1;for(let e=0;e<this.partCount;++e)if(this.partFlags[e]!==t.partFlags[e]||this.partOffsets[e]!==t.partOffsets[e])return!1;if(this.hasCurves()){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(s(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return this.isMultipart()?new p(this):[][Symbol.iterator]()}}class p{constructor(t){this.geometry=t,this.value=new x(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class x{constructor(t){this.geometry=t,this.index=-1,this._readVertex=I(t),this._segments=new _(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class _{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new P(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class P{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=I(t)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let s=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[s++],r=e[s++],n=e[s++],i=e[s++];return{b:[this.end,[t,r],[n,i]]}}const r=e[s++],n=e[s++],i=e[s++],a=e[s++],o=e[s++],c=e[s++];s++,s++;const u=e[s++],h=e[s++];if(!Boolean(4&r)&&1===i)return{c:[this.end,[u,h]]};const l=2&r?0:1,m=1&r?0:1;return{a:[this.end,[o,c],l,m,a,n,i]}}}function v(t,e){const s={stack:[],error:void 0,hasError:!1};try{return e??=(0,a.Ie)(),(0,r.mS)(s,new A(t,["vertexZ","vertexM","spatialReference"]),!1),(0,a.bx)(e,function(t){let e;const{vertexCount:s,vertexXY:n,vertexZ:i,vertexM:o}=t,c=S(t);if(t.hasCurves()){const s={stack:[],error:void 0,hasError:!1};try{(0,r.mS)(s,new A(t,["vertexZ","vertexM"]),!1);const n=(0,a.Ie)();for(const e of t.parts){let t=e.startVertex;for(const{curve:s}of e.segments)(0,l.e)(n,t,s),t=(0,m.yP)(s)}const[i,o,u,h]=n;e={xmin:i,ymin:o,xmax:u,ymax:h,spatialReference:c}}catch(t){s.error=t,s.hasError=!0}finally{(0,r.hk)(s)}}else{let t,r,i,a;t=r=1/0,i=a=-1/0;for(let e=0;e<s;++e){const s=n[2*e],o=n[2*e+1];t=Math.min(t,s),i=Math.max(i,s),r=Math.min(r,o),a=Math.max(a,o)}e={xmin:t,ymin:r,xmax:i,ymax:a,spatialReference:c}}if(i){let t=1/0,s=-1/0;for(const e of i)t=Math.min(t,e),s=Math.max(s,e);e.zmin=t,e.zmax=s}if(o){let t=1/0,s=-1/0;for(const e of o)t=Math.min(t,e),s=Math.max(s,e);e.mmin=t,e.mmax=s}return e}(t)),e}catch(t){s.error=t,s.hasError=!0}finally{(0,r.hk)(s)}}function M(t){let e,s,r;if((0,o.fT)(t)){r="point";const{x:n,y:i,z:a,m:o}=t,c=[n,i];null!=a&&c.push(a),null!=o&&c.push(o),s=[[c]],e=1}else(0,o.U9)(t)?(r="multipoint",s=[t.points],e=t.points.length):(0,o.Rg)(t)?(r="polyline",s=t.curvePaths??t.paths,e=s.reduce((t,e)=>t+e.length,0)):(r="polygon",s=t.curveRings??t.rings,e=s.reduce((t,e)=>(0===e.length||(t+=e.length,R(e[0],(0,m.yP)(e.at(-1)))&&--t),t),0));const n=O(r,e,r.includes("point")?0:s.length,(0,o.Pv)(t),(0,o.W0)(t),(0,m.Ed)(t)),{hasZ:i,hasM:a,vertexXY:c,vertexZ:u,vertexM:h}=n;function l(t){c[2*d]=t[0],c[2*d+1]=t[1],i&&(u[d]=t[2]),a&&(h[d]=t[f]),++d}n.spatialReference=t.spatialReference??void 0;const f=n.hasZ?3:2;let d=0;if(!n.isMultipart()){if(!i&&!a){for(const[t,e]of s[0])c[2*d]=t,c[2*d+1]=e,++d;return n}for(const t of s[0])l(t);return n}const g="polygon"===r,{partOffsets:y}=n;let p=0;if(!n.hasCurves()){for(const t of s){if(y[p++]=d,0===t.length)continue;let e=t.length;if(g&&R(t[0],t.at(-1))&&--e,i||a)for(let s=0;s<e;++s)l(t[s]);else for(let s=0;s<e;++s){const[e,r]=t[s];c[2*d]=e,c[2*d+1]=r,++d}}return y[p]=d,n}function x(t){const e=_+t;if(e<=(n.segmentParams?.length??0))return;let s=e*Z;s=20*Math.ceil(s/20);const r=n.segmentParams;n.segmentParams=new Float64Array(s),null!=r&&n.segmentParams.set(r)}let _=0;for(const t of s){if(n.partOffsets[p++]=d,0===t.length)continue;const e=t[0];let s=e;for(let e=1;e<t.length;++e){const r=t[e];l(s);const i=d-1;(0,m.wY)(r)?(x(10),++n.segmentCountArc,_=k(s,r,n,i,_),s=r.a[0]):(0,m.DA)(r)?(x(10),++n.segmentCountArc,_=T(s,r,n,i,_),s=r.a[0]):(0,m.aO)(r)?(x(10),++n.segmentCountArc,_=G(s,r,n,i,_),s=r.c[0]):(0,m.n1)(r)?(x(4),++n.segmentCountBezier,_=F(0,r,n,i,_),s=r.b[0]):s=r}g&&R(e,s)||l(s)}return n.partOffsets[p]=d,n}function C(t){const e=I(t),{vertexCount:s,partCount:r,hasZ:n,hasM:i}=t,a=S(t);if("point"===t.type){const[e,s]=t.vertexXY,r=t.vertexZ?.[0],n=t.vertexM?.[0];return{x:e,y:s,z:r,m:n,spatialReference:a}}let o=0;if("multipoint"===t.type){const t=[];for(;o<s;)t.push(e(o++));return{points:t,spatialReference:a,hasZ:n,hasM:i}}const c="polygon"===t.type;if(!t.hasCurves()){const s=new Array;for(let n=0;n<r;++n){const r=t.partOffsets[n+1],i=new Array;for(;o<r;)i.push(e(o++));c&&i.length>0&&i.push(i[0]),s.push(i)}return c?{rings:s,hasZ:n,hasM:i,spatialReference:a}:{paths:s,hasZ:n,hasM:i,spatialReference:a}}const u=new Array;for(const{segments:e,startVertex:s}of t.parts){const t=[s];for(const{curve:s}of e)t.push(s);u.push(t)}return c?{rings:[],curveRings:u,hasZ:n,hasM:i,spatialReference:a}:{paths:[],curvePaths:u,hasZ:n,hasM:i,spatialReference:a}}function b(t,{lengths:e,coords:s,hasZ:r,hasM:n},i){const a=t.includes("point")?0:e.length,o="polygon"===t,c="point"===t?1:e.reduce((t,e)=>t+e,0)-(o?a:0);r??=!1,n??=!1;const u=O(t,c,a,r,n,!1,0,0);if(u.spatialReference=i??void 0,!u.isMultipart()){for(let t=0,e=0;t<c;++t)u.vertexXY[2*t]=s[e++],u.vertexXY[2*t+1]=s[e++],r&&(u.vertexZ[t]=s[e++]),n&&(u.vertexM[t]=s[e++]);return u}const h=2+Number(r)+Number(n);let l=0,m=0;u.partOffsets[0]=0;for(const t of e){const e=u.partOffsets[m],i=e+t-Number(o);u.partOffsets[++m]=i;for(let t=e;t<i;++t)u.vertexXY[2*t]=s[l++],u.vertexXY[2*t+1]=s[l++],r&&(u.vertexZ[t]=s[l++]),n&&(u.vertexM[t]=s[l++]);o&&(l+=h)}return u}function E({type:t,vertexCount:e,vertexXY:s,vertexZ:r,vertexM:n,partCount:i,partOffsets:a,hasZ:o,hasM:c}){const u=new g.A([],[],o,c);i=Math.max(i,1);const h="polygon"===t;let l=0;for(let t=0;t<i;++t){const i=a?.[t+1]??e,m=u.coords.length;for(let t=l;t<i;++t)u.coords.push(s[2*t],s[2*t+1]),o&&u.coords.push(r[t]),c&&u.coords.push(n[t]);if(h){const t=l;u.coords.push(s[2*t],s[2*t+1]),o&&u.coords.push(r[t]),c&&u.coords.push(n[t])}u.lengths.push((u.coords.length-m)/u.stride),l=i}return"point"===t&&(u.lengths.length=0),u}function w(t,e){return"getSpatialReference"in t&&(e=function(t){if(null==t)return;const e=t.getText()||void 0,s=t.isCustomWkid()?0:t.getOldID();if(s<=0)return{wkt:e};let r=t.getLatestID();(r<=0||r===s)&&(r=void 0);const n=t.getVCS();if(null==n)return{wkid:s,latestWkid:r,wkt:e};const i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:e};let a=t.getLates