UNPKG

@doegis/core

Version:

DOE GIS API

1 lines 128 kB
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4286],{3920:(e,t,i)=>{i.d(t,{p:()=>p,r:()=>u});var r=i(43697),o=i(15923),s=i(61247),a=i(5600),n=i(52011),l=i(72762);const p=e=>{let t=class extends e{destroy(){this.destroyed||(this._get("handles")?.destroy(),this._get("updatingHandles")?.destroy())}get handles(){return this._get("handles")||new s.Z}get updatingHandles(){return this._get("updatingHandles")||new l.t}};return(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,r._)([(0,n.j)("esri.core.HandleOwner")],t),t};let u=class extends(p(o.Z)){};u=(0,r._)([(0,n.j)("esri.core.HandleOwner")],u)},65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.l)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},72762:(e,t,i)=>{i.d(t,{t:()=>d});var r=i(43697),o=i(15923),s=i(61247),a=i(70586),n=i(17445),l=i(1654),p=i(5600),u=i(52011);let d=class extends o.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new s.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,i={}){return this._installWatch(e,t,i,n.YP)}addWhen(e,t,i={}){return this._installWatch(e,t,i,n.gx)}addOnCollectionChange(e,t,{initial:i=!1,final:r=!1}={}){const o=++this._handleId;return this._handles.add([(0,n.on)(e,"after-changes",this._createSyncUpdatingCallback(),n.Z_),(0,n.on)(e,"change",t,{onListenerAdd:i?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:r?e=>t({added:[],removed:e.toArray()}):void 0})],o),{remove:()=>this._handles.remove(o)}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(c)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const i=()=>this._handles.remove(t);return e.then(i,i),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,i={},r){const o=++this._handleId;i.sync||this._installSyncUpdatingWatch(e,o);const s=r(e,t,i);return this._handles.add(s,o),{remove:()=>this._handles.remove(o)}}_installSyncUpdatingWatch(e,t){const i=this._createSyncUpdatingCallback(),r=(0,n.YP)(e,i,{sync:!0,equals:()=>!1});return this._handles.add(r,t),r}_createSyncUpdatingCallback(){return()=>{this._handles.remove(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(c))})),c)}}};(0,r._)([(0,p.Cb)({readOnly:!0})],d.prototype,"updating",void 0),d=(0,r._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],d);const c=-42},16306:(e,t,i)=>{i.d(t,{aX:()=>S});var r=i(68773),o=i(20102),s=i(92604),a=i(70586),n=i(38913),l=i(58901),p=i(73913),u=i(8744),d=i(40488),c=(i(66577),i(3172)),m=i(33955),y=i(11282),b=i(17452);async function h(e,t,i){const r="string"==typeof e?(0,b.mN)(e):e,o=t[0].spatialReference,s=(0,m.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:o.wkid?o.wkid:JSON.stringify(o),geometries:JSON.stringify((l=t,{geometryType:(0,m.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:n}=await(0,c.default)(r.path+"/simplify",a);var l;return function(e,t,i){const r=(0,m.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}(n.geometries,s,o)}const f=s.Z.getLogger("esri.geometry.support.normalizeUtils");function v(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function T(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof n.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw f.error(e),new o.Z(e)}const i=(0,p.x3)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],a=e[r+1][0],n=e[r+1][1],l=Math.sqrt((a-o)*(a-o)+(n-s)*(n-s)),p=(n-s)/l,u=(a-o)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,a=u*r+o,n=p*r+s;i.push([a,n])}const e=(l+Math.floor(d-1)*t)/2,r=u*e+o,a=p*e+s;i.push([r,a])}i.push([a,n])}}return function(e){return"polygon"===e.type}(e)?new n.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return i&&(e=(0,p.Sy)(e,i)),e}function C(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,p.XZ)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,p.XZ)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,p.XZ)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,p.XZ)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],a=(0,p.x3)(s);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,p.XZ)(i,180);for(let i=0;i<t.length;i++){const t=s.getPoint(e,i);s.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(o===i){if(v(e))for(const t of(0,p.x3)(s))e[o]=e[o].addRing(t);else if(g(e))for(const t of(0,p.x3)(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function S(e,t,i){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&f.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.Z.geometryServiceUrl;let s,b,v,g,_,N,O,A,D=0;const I=[],x=[];for(const t of e)if((0,a.Wi)(t))x.push(t);else if(s||(s=t.spatialReference,b=(0,u.C5)(s),v=s.isWebMercator,N=v?102100:4326,g=p.UZ[N].maxX,_=p.UZ[N].minX,O=p.UZ[N].plus180Line,A=p.UZ[N].minus180Line),b)if("mesh"===t.type)x.push(t);else if("point"===t.type)x.push(C(t.clone(),g,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>C(e,g,_))),x.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,b);x.push(e.rings?new n.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,p.XZ)(e.xmin,_)*(2*g);let r=0===i?t.clone():(0,p.Sy)(t.clone(),i);e.offset(i,0),e.intersects(O)&&e.xmax!==g?(D=e.xmax>D?e.xmax:D,r=T(r,v),I.push(r),x.push("cut")):e.intersects(A)&&e.xmin!==_?(D=e.xmax*(2*g)>D?e.xmax*(2*g):D,r=T(r,v,360),I.push(r),x.push("cut")):x.push(r)}else x.push(t.clone());else x.push(t);let j=(0,p.XZ)(D,g),F=-90;const B=j,M=new l.Z;for(;j>0;){const e=360*j-180;M.addPath([[e,F],[e,-1*F]]),F*=-1,j--}if(I.length>0&&B>0){const t=w(I,await async function(e,t,i,r){const o=(0,y.en)(e),s=t[0].spatialReference,a={...r,query:{...o.query,f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:(0,m.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},n=await(0,c.default)(o.path+"/cut",a),{cutIndexes:l,geometries:p=[]}=n.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,m.im)(e);return t.spatialReference=s,t}))}}(o,I,M,i)),r=[],s=[];for(let i=0;i<x.length;i++){const o=x[i];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[i];(0,a.pC)(n)&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(r.push(o),s.push("simplify")):s.push(v?(0,d.$)(o):o)}}if(!r.length)return s;const n=await h(o,r,i),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(v?(0,d.$)(n.shift()):n.shift())}return l}const E=[];for(let e=0;e<x.length;e++){const t=x[e];if("cut"!==t)E.push(t);else{const e=I.shift();E.push(!0===v?(0,d.$)(e):e)}}return E}},73913:(e,t,i)=>{i.d(t,{Sy:()=>l,UZ:()=>a,XZ:()=>n,x3:()=>p});var r=i(58901),o=i(82971),s=i(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:o.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:o.Z.WGS84})}};function n(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=p(e);for(const e of i)for(const i of e)i[0]+=t;return e}function p(e){return(0,s.oU)(e)?e.rings:e.paths}},40153:(e,t,i)=>{i.r(t),i.d(t,{default:()=>pi});var r=i(43697),o=i(68773),s=i(66577),a=i(38171),n=i(51773),l=(i(16050),i(12501),i(28756),i(92271),i(72529),i(5499),i(84382),i(81571),i(91423)),p=i(46791),u=i(20102),d=i(3920),c=i(92604),m=i(70586),y=i(16453),b=i(78286),h=i(95330),f=i(17445),v=i(67900),g=i(17452),T=i(5600),C=i(75215),w=(i(67676),i(71715)),S=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),D=i(8744),I=i(87085),x=i(71612),j=i(38009),F=i(16859),B=i(72965),M=i(66677),E=i(9790),L=i(96674),R=i(77987);let P=class extends L.wq{constructor(e){super(e),this.break=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new R.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new R.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new R.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new R.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,T.Cb)({types:E.LB})],P.prototype,"break",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],P.prototype,"first",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],P.prototype,"unlocated",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],P.prototype,"last",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],P.prototype,"middle",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],P.prototype,"waypoint",void 0),P=(0,r._)([(0,S.j)("esri.layers.support.RouteStopSymbols")],P);const J=P;var U=i(4095),W=i(20256);let k=class extends L.wq{constructor(e){super(e),this.directionLines=new U.Z({color:[0,122,194],width:6}),this.directionPoints=new R.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new R.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new W.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new U.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new U.Z({width:8,color:[20,89,127]}),this.stops=new J}};(0,r._)([(0,T.Cb)({types:E.LB})],k.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],k.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],k.prototype,"pointBarriers",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],k.prototype,"polygonBarriers",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],k.prototype,"polylineBarriers",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],k.prototype,"routeInfo",void 0),(0,r._)([(0,T.Cb)({type:J})],k.prototype,"stops",void 0),k=(0,r._)([(0,S.j)("esri.layers.support.RouteSymbols")],k);const Z=k;var V=i(65587),q=i(15235),G=i(14661),z=i(3172),H=i(11282),K=i(36030),X=i(35454);const Y=(0,X.w)()({esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"}),$=(0,X.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),Q=((0,X.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,X.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),ee=(0,X.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),te=(0,X.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ie=((0,X.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,X.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),re=((0,X.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,X.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,X.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),oe=(0,X.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),se=(0,X.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),ae=(0,X.w)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),ne=(0,X.w)()({1:"right",2:"left"},{useNumericKeys:!0}),le=(0,X.w)()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),pe=(0,X.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ue=(0,X.w)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation"},{useNumericKeys:!0}),de=(0,X.w)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),ce=(0,X.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),me=(0,X.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),ye=(0,X.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),be=(0,X.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),he=(0,X.w)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),fe=(0,X.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),ve=(0,X.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ge=(0,X.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),Te=(0,X.w)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let Ce=class extends L.wq{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,r._)([(0,T.Cb)({type:String})],Ce.prototype,"dataType",void 0),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],Ce.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String]})],Ce.prototype,"parameterNames",void 0),(0,r._)([(0,T.Cb)({type:String})],Ce.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],Ce.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String})],Ce.prototype,"trafficSupport",void 0),(0,r._)([(0,K.J)(Q)],Ce.prototype,"units",void 0),(0,r._)([(0,K.J)(ge)],Ce.prototype,"usageType",void 0),Ce=(0,r._)([(0,S.j)("esri.rest.support.NetworkAttribute")],Ce);const we=Ce;let Se=class extends L.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,T.Cb)({type:Number})],Se.prototype,"buildTime",void 0),(0,r._)([(0,T.Cb)({type:String})],Se.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[we]})],Se.prototype,"networkAttributes",void 0),(0,r._)([(0,T.Cb)()],Se.prototype,"networkSources",void 0),(0,r._)([(0,T.Cb)({type:String})],Se.prototype,"state",void 0),Se=(0,r._)([(0,S.j)("esri.rest.support.NetworkDataset")],Se);const _e=Se;var Ne=i(2368);let Oe=class extends((0,Ne.J)(L.wq)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return(0,m.Wi)(i)?null:i.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){(0,m.Wi)(e)||(t[i]=e.map((e=>he.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[Object],json:{write:!0}})],Oe.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Oe.prototype,"description",void 0),(0,r._)([(0,K.J)(me,{ignoreUnknown:!1})],Oe.prototype,"distanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Oe.prototype,"id",void 0),(0,r._)([(0,w.r)("id",["id","itemId"])],Oe.prototype,"readId",null),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],Oe.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Oe.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{write:!0}})],Oe.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],Oe.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],Oe.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,T.Cb)({type:Number,json:{write:{allowNull:!0}}})],Oe.prototype,"simplificationTolerance",void 0),(0,r._)([(0,K.J)(Y)],Oe.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],Oe.prototype,"timeAttributeName",void 0),(0,r._)([(0,K.J)(re)],Oe.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Oe.prototype,"useHierarchy",void 0),(0,r._)([(0,K.J)(ie)],Oe.prototype,"uturnAtJunctions",void 0),Oe=(0,r._)([(0,S.j)("esri.rest.support.TravelMode")],Oe);const Ae=Oe;let De=class extends L.wq{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(e){return(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?Ae.fromJSON(i):null}};(0,r._)([(0,T.Cb)()],De.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],De.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],De.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)()],De.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)()],De.prototype,"currentVersion",void 0),(0,r._)([(0,T.Cb)()],De.prototype,"defaultTravelMode",void 0),(0,r._)([(0,w.r)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],De.prototype,"readDefaultTravelMode",null),(0,r._)([(0,T.Cb)()],De.prototype,"directionsLanguage",void 0),(0,r._)([(0,K.J)($)],De.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,T.Cb)()],De.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,K.J)(ye,{ignoreUnknown:!1})],De.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)()],De.prototype,"hasZ",void 0),(0,r._)([(0,K.J)(be,{ignoreUnknown:!1})],De.prototype,"impedance",void 0),(0,r._)([(0,T.Cb)({type:_e})],De.prototype,"networkDataset",void 0),(0,r._)([(0,T.Cb)({type:[Ae]})],De.prototype,"supportedTravelModes",void 0),De=(0,r._)([(0,S.j)("esri.rest.support.NetworkServiceDescription")],De);const Ie=De,xe=c.Z.getLogger("esri.rest.networkService");function je(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function Fe(e,t,i){if(!e)throw new u.Z("network-service:missing-url","Url to Network service is missing");const r=(0,H.lA)({f:"json",token:t},i),{data:o}=await(0,z.default)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,H.lA)({f:"json",token:t},i),o=(0,g.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,z.default)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new u.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,H.lA)({f:"json"},t),{data:r}=await(0,z.default)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r||!r.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,g.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,z.default)(s,i),n=(0,b.hS)("helperServices.routingUtilities.url",a);if(!n)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,H.en)(o),p=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",u=(0,H.lA)({f:"json",serviceName:p},t),d=(0,g.Qj)(n)+"/GetTravelModes/execute",c=await(0,z.default)(d,u),m=[];let y=null;if(c?.data?.results?.length){const e=c.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(y=t.value)}return{supportedTravelModes:m,defaultTravelMode:y}}(e,i),{defaultTravelMode:a,supportedTravelModes:n}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=n,Ie.fromJSON(o)}var Be=i(16306);function Me(e,t){if((0,m.Wi)(e))return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[be.fromJSON(r)]=e[o]}return i}function Ee(e,t,i){if(!(0,m.Wi)(e)){t.attributes||(t.attributes={});for(const r in e){const o=be.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Le(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.fromJSON(r)]=e[i]}return t}function Re(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.toJSON(r)]=e[i]}return t}function Pe(e,t){return(0,m.Wi)(e)||(0,m.Wi)(t)?null:Math.round((e-t)/6e4)}function Je(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&(i.accumulateAttributeNames=t.accumulateAttributeNames?.join()),i.attributeParameterValues&&(i.attributeParameterValues=JSON.stringify(t.attributeParameterValues)),i.barriers&&(i.barriers=JSON.stringify(t.barriers)),i.outSR&&(i.outSR=t.outSR?.wkid),i.overrides&&(i.overrides=JSON.stringify(t.overrides)),i.polygonBarriers&&(i.polygonBarriers=JSON.stringify(t.polygonBarriers)),i.polylineBarriers&&(i.polylineBarriers=JSON.stringify(t.polylineBarriers)),i.restrictionAttributeNames&&(i.restrictionAttributeNames=t.restrictionAttributeNames?.join()),i.stops&&(i.stops=JSON.stringify(t.stops)),i.travelMode&&(i.travelMode=JSON.stringify(t.travelMode)),i}var Ue=i(74889);const We=new X.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let ke=class extends L.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,r._)([(0,T.Cb)({type:String,json:{read:We.read,write:We.write}})],ke.prototype,"type",void 0),ke=(0,r._)([(0,S.j)("esri.rest.support.GPMessage")],ke);const Ze=ke,Ve=new X.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let qe=class extends Ze{constructor(e){super(e),this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{read:Ve.read,write:Ve.write}})],qe.prototype,"type",void 0),qe=(0,r._)([(0,S.j)("esri.rest.support.NAMessage")],qe);const Ge=qe;let ze=class extends L.wq{constructor(e){super(e)}};(0,r._)([(0,T.Cb)({json:{read:{source:"string"}}})],ze.prototype,"text",void 0),(0,r._)([(0,K.J)(Te,{name:"stringType"})],ze.prototype,"type",void 0),ze=(0,r._)([(0,S.j)("esri.rest.support.DirectionsString")],ze);const He=ze;var Ke=i(94139);let Xe=class extends L.wq{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Pe(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Ke.Z.fromJSON(t.point)}};(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Xe.prototype,"arriveTime",void 0),(0,r._)([(0,T.Cb)()],Xe.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Xe.prototype,"readArriveTimeOffset",null),(0,r._)([(0,T.Cb)({type:Ke.Z})],Xe.prototype,"geometry",void 0),(0,r._)([(0,w.r)("geometry",["point"])],Xe.prototype,"readGeometry",null),(0,r._)([(0,T.Cb)({type:[He]})],Xe.prototype,"strings",void 0),Xe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsEvent")],Xe);const Ye=Xe;var $e=i(58901);let Qe=class extends a.Z{constructor(e){super(e),this.events=null,this.strings=null}readGeometry(e,t){const i=function(e){if((0,m.Wi)(e)||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let a,n,l,p,u,d,c,y,b=0,h=0,f=0;if(u=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),u||(u=[]),0===parseInt(u[b],32)){b=2;const e=parseInt(u[b],32);b++,d=parseInt(u[b],32),b++,1&e&&(h=u.indexOf("|")+1,c=parseInt(u[h],32),h++),2&e&&(f=u.indexOf("|",h)+1,y=parseInt(u[f],32),f++)}else d=parseInt(u[b],32),b++;for(;b<u.length&&"|"!==u[b];){a=parseInt(u[b],32)+t,b++,t=a,n=parseInt(u[b],32)+i,b++,i=n;const e=[a/d,n/d];h&&(p=parseInt(u[h],32)+r,h++,r=p,e.push(p/c)),f&&(l=parseInt(u[f],32)+o,f++,o=l,e.push(l/y)),s.push(e)}return{paths:[s],hasZ:h>0,hasM:f>0}}(t.compressedGeometry);return(0,m.pC)(i)?$e.Z.fromJSON(i):null}};(0,r._)([(0,T.Cb)({type:[Ye]})],Qe.prototype,"events",void 0),(0,r._)([(0,w.r)("geometry",["compressedGeometry"])],Qe.prototype,"readGeometry",null),(0,r._)([(0,T.Cb)({type:[He]})],Qe.prototype,"strings",void 0),Qe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeature")],Qe);const et=Qe;var tt=i(82971);let it=class extends Ue.Z{constructor(e){super(e),this.extent=null,this.features=[],this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&tt.Z.fromJSON(i);return e.map((e=>{const t=et.fromJSON(e);if((0,m.pC)(t.geometry)&&(t.geometry.spatialReference=r),(0,m.pC)(t.events))for(const e of t.events)(0,m.pC)(e.geometry)&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new $e.Z({spatialReference:t});const i=[];for(const t of e)for(const e of t.paths)i.push(...e);const r=[];i.forEach(((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)}));const{hasM:o,hasZ:s}=e[0];return new $e.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>(0,m.Wg)(e))),this.extent.spatialReference):null}get strings(){return this.features.map((({strings:e})=>e)).flat().filter(m.pC)}};(0,r._)([(0,T.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],it.prototype,"extent",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0})],it.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],it.prototype,"readFeatures",null),(0,r._)([(0,T.Cb)()],it.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],it.prototype,"mergedGeometry",null),(0,r._)([(0,T.Cb)()],it.prototype,"routeId",void 0),(0,r._)([(0,T.Cb)()],it.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({value:null,readOnly:!0})],it.prototype,"strings",null),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],it.prototype,"totalDriveTime",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalLength"}}})],it.prototype,"totalLength",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalTime"}}})],it.prototype,"totalTime",void 0),it=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeatureSet")],it);const rt=it;let ot=class extends L.wq{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,r._)([(0,T.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({type:rt,json:{write:!0}})],ot.prototype,"directions",void 0),(0,r._)([(0,T.Cb)({type:a.Z,json:{write:!0}})],ot.prototype,"route",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],ot.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({type:[a.Z],json:{write:!0}})],ot.prototype,"stops",void 0),(0,r._)([(0,T.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"traversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"traversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Ue.Z,json:{write:!0}})],ot.prototype,"traversedTurns",void 0),ot=(0,r._)([(0,S.j)("esri.rest.support.RouteResult")],ot);const st=ot;function at(e){return e?Ue.Z.fromJSON(e).features.filter(m.pC):[]}let nt=class extends L.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return at(t.barriers)}readPolylineBarriers(e){return at(e)}readPolygonBarriers(e){return at(e)}};(0,r._)([(0,T.Cb)({type:[Ge]})],nt.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({type:[a.Z]})],nt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],nt.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],nt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],nt.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],nt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],nt.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({type:[st]})],nt.prototype,"routeResults",void 0),nt=(0,r._)([(0,S.j)("esri.rest.support.RouteSolveResult")],nt);const lt=nt;function pt(e){return e instanceof Ue.Z}var ut;let dt=ut=class extends((0,Ne.J)(L.wq)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static fromGraphic(e){return new ut({directionLineType:de.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:(0,m.Wg)(this.objectId),DirectionLineType:(0,m.pC)(this.directionLineType)?de.toJSON(this.directionLineType):null,DirectionPointID:(0,m.Wg)(this.directionPointId),Meters:(0,m.Wg)(this.distance),Minutes:(0,m.Wg)(this.duration)};return(0,m.pC)(this.fromLevel)&&(e.FromLevel=this.fromLevel),(0,m.pC)(this.toLevel)&&(e.ToLevel=this.toLevel),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};dt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],dt.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:de.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:de.read}}})],dt.prototype,"directionLineType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],dt.prototype,"directionPointId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Meters"}}})],dt.prototype,"distance",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Minutes"}}})],dt.prototype,"duration",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FromLevel"}}})],dt.prototype,"fromLevel",void 0),(0,r._)([(0,T.Cb)({type:$e.Z})],dt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],dt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],dt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ToLevel"}}})],dt.prototype,"toLevel",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=ut=(0,r._)([(0,S.j)("esri.rest.support.DirectionLine")],dt);const ct=dt;var mt;let yt=mt=class extends((0,Ne.J)(L.wq)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return(0,m.pC)(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new mt({alternateName:e.attributes.AlternateName??null,arrivalTime:(0,m.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:ue.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:(0,m.Wg)(this.objectId),DirectionPointType:(0,m.pC)(this.directionPointType)?ue.toJSON(this.directionPointType):null,Sequence:(0,m.Wg)(this.sequence),StopID:this.stopId};return(0,m.pC)(this.alternateName)&&(e.AlternateName=this.alternateName),(0,m.pC)(this.arrivalTime)&&(e.ArrivalTime=this.arrivalTime.getTime()),(0,m.pC)(this.arrivalTimeOffset)&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),(0,m.pC)(this.azimuth)&&(e.Azimuth=this.azimuth),(0,m.pC)(this.branchName)&&(e.BranchName=this.branchName),(0,m.pC)(this.displayText)&&(e.DisplayText=this.displayText),(0,m.pC)(this.exitName)&&(e.ExitName=this.exitName),(0,m.pC)(this.intersectingName)&&(e.IntersectingName=this.intersectingName),(0,m.pC)(this.level)&&(e.Level=this.level),(0,m.pC)(this.name)&&(e.Name=this.name),(0,m.pC)(this.shortVoiceInstruction)&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),(0,m.pC)(this.towardName)&&(e.TowardName=this.towardName),(0,m.pC)(this.voiceInstruction)&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};yt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null}],yt.popupInfo={title:"{DisplayText}",fieldInfos:[{fieldName:"DirectionPointType",label:"Directions Item Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"DisplayText",label:"Text to Display",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"StopID",label:"Stop ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Maneuver Starts at",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Azimuth",label:"Azimuth",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Name",label:"Primary Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AlternateName",label:"Alternative Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ExitName",label:"Highway Exit Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"IntersectingName",label:"Intersecting Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BranchName",label:"Signpost Branch Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TowardName",label:"Signpost Toward Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ShortVoiceInstruction",label:"Voice Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"VoiceInstruction",label:"Voice Full Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)()],yt.prototype,"alternateName",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],yt.prototype,"readArrivalTime",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],yt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Azimuth"}}})],yt.prototype,"azimuth",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.BranchName"}}})],yt.prototype,"branchName",void 0),(0,r._)([(0,T.Cb)({type:ue.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ue.read}}})],yt.prototype,"directionPointType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DisplayText"}}})],yt.prototype,"displayText",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ExitName"}}})],yt.prototype,"exitName",void 0),(0,r._)([(0,T.Cb)({type:Ke.Z})],yt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"intersectingName",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"level",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],yt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],yt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Sequence"}}})],yt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopID"}}})],yt.prototype,"stopId",void 0),(0,r._)([(0,T.Cb)({types:E.LB})],yt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.TowardName"}}})],yt.prototype,"towardName",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],yt.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"voiceInstruction",void 0),yt=mt=(0,r._)([(0,S.j)("esri.rest.support.DirectionPoint")],yt);const bt=yt;var ht;let ft=ht=class extends((0,Ne.J)(L.wq)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,t