@arcgis/core 4.24.0-next.20220429 → 4.24.0-next.20220430
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{3a43a2918b44781aaf85.js → 055a0ebf22a82f859474.js} +1 -1
- package/assets/esri/core/workers/chunks/{3273b6be43eeb49ee842.js → 0b12ff7b2ed2838afbb8.js} +1 -1
- package/assets/esri/core/workers/chunks/0e25548573baf855e394.js +1 -0
- package/assets/esri/core/workers/chunks/{c388ac33496f004d56f3.js → 135a90ae61f3b3cae91b.js} +1 -1
- package/assets/esri/core/workers/chunks/{54f9b1ab9d472bf4baca.js → 1facbda248863cf72cbd.js} +1 -1
- package/assets/esri/core/workers/chunks/2133499e642193f6738f.js +1 -0
- package/assets/esri/core/workers/chunks/{3c572629f46e5093223c.js → 30333a95dc0a44e23fb5.js} +1 -1
- package/assets/esri/core/workers/chunks/{7afe89eafab00afb31f2.js → 30837d93116f0337972f.js} +1 -1
- package/assets/esri/core/workers/chunks/31df729c17470245288c.js +2 -0
- package/assets/esri/core/workers/chunks/{c0bf663240df7be68131.js.LICENSE.txt → 31df729c17470245288c.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{e5d6f3815ecab8560404.js → 4130ea1f5a9f197168d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5855075104c12bf71d8.js → 59e341b2db44351bf557.js} +1 -1
- package/assets/esri/core/workers/chunks/{73630d52768e3d932f30.js → 5a10b58533b4116115ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc193247a1980360ec4f.js → 8e98ff9404a802352037.js} +1 -1
- package/assets/esri/core/workers/chunks/{863cfe35ee640bac103f.js → 94e51fe1c539df6257c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{cbe7e6283a427a618d4b.js → 9519a02b9b8db88a3150.js} +1 -1
- package/assets/esri/core/workers/chunks/a59ee7d2b98c85f27dd2.js +1 -0
- package/assets/esri/core/workers/chunks/{92ef9b0c61640e0ecbb4.js → a5dbab94697757c87c49.js} +1 -1
- package/assets/esri/core/workers/chunks/{147d3ee9aa81d7b2b7fa.js → a6406a248b7b2ed65f35.js} +1 -1
- package/assets/esri/core/workers/chunks/{ebdf61eb364ac0856f40.js → acbd0f4d72d1f5d8e4e8.js} +1 -1
- package/assets/esri/core/workers/chunks/ad68fe924456d6d7d4f0.js +1 -0
- package/assets/esri/core/workers/chunks/b06c949fc7d08e376a5f.js +1 -0
- package/assets/esri/core/workers/chunks/c9b09099488d0e719dfb.js +1 -0
- package/assets/esri/core/workers/chunks/{4a05d0dfa73ff570e1fa.js → d15e6662d90718411d62.js} +1 -1
- package/assets/esri/core/workers/chunks/{b74b9dceabbf7b1aec39.js → d16aac3461af9cee0c29.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9d9be39cd64f28dd478.js → d60dd3e1028f714f2258.js} +1 -1
- package/assets/esri/core/workers/chunks/{cab6decfcb3f596a3837.js → d8c59b1d73650c060dfb.js} +1 -1
- package/assets/esri/core/workers/chunks/{d24339b37cc9316e6d99.js → dcb6e1b33402d7fa455b.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8da24116180d708cf81.js → df653bca2b14dffc82d1.js} +1 -1
- package/chunks/index.js +1 -1
- package/config.js +1 -1
- package/interfaces.d.ts +8 -0
- package/layers/mixins/PortalLayer.js +1 -1
- package/package.json +2 -2
- package/request.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +2 -2
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/3f6b17c9d2629ed396da.js +0 -1
- package/assets/esri/core/workers/chunks/68d57660c7c71b82ff3c.js +0 -1
- package/assets/esri/core/workers/chunks/6ef8de3aa9a8d9c22161.js +0 -1
- package/assets/esri/core/workers/chunks/b548bf032c8af34fe155.js +0 -1
- package/assets/esri/core/workers/chunks/bbcae04235830debd814.js +0 -1
- package/assets/esri/core/workers/chunks/c0bf663240df7be68131.js +0 -2
- package/assets/esri/core/workers/chunks/cd9668acbe3babd2b188.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9414,4889],{65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((e=>{const t=e.target;e.newOrigin&&e.oldOrigin!==e.newOrigin&&(0,r.l)(t)&&t.updateOrigin(e.propName,e.newOrigin)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},6665:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ii});var r=i(43697),o=i(68773),s=i(66577),a=i(38171),l=i(51773),n=(i(16050),i(12501),i(95088),i(79056),i(5499),i(84382),i(30687),i(91423)),p=i(80539),u=i(20102),d=i(3920),m=i(92604),c=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(67676),i(80442),i(75215)),S=i(71715),w=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),D=i(8744),I=i(29600),B=i(71612),j=i(38009),F=i(16859),x=i(72965),E=i(66677),L=i(78223),M=i(96674),P=i(4095),J=i(77987),R=i(20256);let W=class extends M.wq{constructor(){super(...arguments),this.directionLines=new P.Z({color:[0,122,194],width:6}),this.directionPoints=new J.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new J.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new R.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new P.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new P.Z({width:8,color:[20,89,127]}),this.firstStop=new J.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.middleStop=new J.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.lastStop=new J.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.invalidStop=new J.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.waypointStop=new J.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.breakStop=new J.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"pointBarriers",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"polygonBarriers",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"polylineBarriers",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"routeInfo",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"firstStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"middleStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"lastStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"invalidStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"waypointStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"breakStop",void 0),W=(0,r._)([(0,w.j)("esri.layers.support.DefaultSymbols")],W);const U=W;var k=i(65587),Z=i(15235),V=i(14661),q=i(3172),G=i(11282),z=i(36030),K=i(35454);const H=(0,K.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,K.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"}),Y=(0,K.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),Q=(0,K.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),X=(0,K.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ee=((0,K.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,K.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),te=((0,K.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,K.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,K.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),ie=(0,K.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),re=(0,K.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),oe=(0,K.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}),se=(0,K.w)()({1:"right",2:"left"},{useNumericKeys:!0}),ae=(0,K.w)()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),le=(0,K.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ne=(0,K.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}),pe=(0,K.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}),ue=(0,K.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),de=(0,K.w)()({Kilometers:"kilometers",Miles:"miles"},{ignoreUnknown:!1}),me=(0,K.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ce=(0,K.w)()({Kilometers:"kilometers",Miles:"miles",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ye=(0,K.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}),be=(0,K.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),he=(0,K.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),fe=(0,K.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"});let ve=class extends M.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})],ve.prototype,"dataType",void 0),(0,r._)([(0,z.J)(ce,{ignoreUnknown:!1})],ve.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String]})],ve.prototype,"parameterNames",void 0),(0,r._)([(0,T.Cb)({type:String})],ve.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,z.J)(me,{ignoreUnknown:!1})],ve.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String})],ve.prototype,"trafficSupport",void 0),(0,r._)([(0,T.Cb)({type:String})],ve.prototype,"units",void 0),(0,r._)([(0,z.J)(fe)],ve.prototype,"usageType",void 0),ve=(0,r._)([(0,w.j)("esri.rest.support.NetworkAttribute")],ve);const ge=ve;let Te=class extends M.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})],Te.prototype,"buildTime",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[ge]})],Te.prototype,"networkAttributes",void 0),(0,r._)([(0,T.Cb)()],Te.prototype,"networkSources",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"state",void 0),Te=(0,r._)([(0,w.j)("esri.rest.support.NetworkDataset")],Te);const Ce=Te;var Se=i(2368);let we=class extends((0,Se.J)(M.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}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return(0,c.Wi)(i)?null:i.map((e=>ye.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[Object],json:{write:!0}})],we.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],we.prototype,"description",void 0),(0,r._)([(0,z.J)(de,{ignoreUnknown:!1})],we.prototype,"distanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],we.prototype,"id",void 0),(0,r._)([(0,z.J)(ce,{ignoreUnknown:!1})],we.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],we.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{write:!0}})],we.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,S.r)("restrictionAttributeNames")],we.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],we.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,T.Cb)({type:Number,json:{write:{allowNull:!0}}})],we.prototype,"simplificationTolerance",void 0),(0,r._)([(0,z.J)(H)],we.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,z.J)(me,{ignoreUnknown:!1})],we.prototype,"timeAttributeName",void 0),(0,r._)([(0,z.J)(te)],we.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],we.prototype,"useHierarchy",void 0),(0,r._)([(0,z.J)(ee)],we.prototype,"uturnAtJunctions",void 0),we=(0,r._)([(0,w.j)("esri.rest.support.TravelMode")],we);const _e=we;let Ne=class extends M.wq{constructor(e){super(e),this.accumulateAttributeNames=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,c.Wi)(e)?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ce.toJSON(e))))}};(0,r._)([(0,T.Cb)()],Ne.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,S.r)("accumulateAttributeNames")],Ne.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],Ne.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)()],Ne.prototype,"currentVersion",void 0),(0,r._)([(0,T.Cb)()],Ne.prototype,"defaultTravelMode",void 0),(0,r._)([(0,T.Cb)()],Ne.prototype,"directionsLanguage",void 0),(0,r._)([(0,z.J)($)],Ne.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,T.Cb)()],Ne.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,z.J)(me,{ignoreUnknown:!1})],Ne.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)()],Ne.prototype,"hasZ",void 0),(0,r._)([(0,z.J)(ce,{ignoreUnknown:!1})],Ne.prototype,"impedance",void 0),(0,r._)([(0,T.Cb)({type:Ce})],Ne.prototype,"networkDataset",void 0),(0,r._)([(0,T.Cb)({type:[_e]})],Ne.prototype,"supportedTravelModes",void 0),Ne=(0,r._)([(0,w.j)("esri.rest.support.NetworkServiceDescription")],Ne);const Oe=Ne;function Ae(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function De(e,t,i){if(!e)throw new u.Z("network-service:missing-url","Url to Network service is missing");const r=(0,G.lA)({f:"json",token:t},i),{data:o}=await(0,q.default)(e,r);o.supportedTravelModes||(o.supportedTravelModes=[]);for(let e=0;e<o.supportedTravelModes.length;e++)o.supportedTravelModes[e].id||(o.supportedTravelModes[e].id=o.supportedTravelModes[e].itemId);const s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,G.lA)({f:"json",token:t},i),o=(0,g.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,q.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){var i,r;const o=(0,G.lA)({f:"json"},t),{data:s}=await(0,q.default)(e.replace(/\/rest\/.*$/i,"/info"),o);if(!s||!s.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:a}=s,l=(0,g.Qj)(a)+"/sharing/rest/portals/self",{data:n}=await(0,q.default)(l,o),p=(0,b.hS)("helperServices.routingUtilities.url",n);if(!p)return{supportedTravelModes:[],defaultTravelMode:null};const u=(0,G.en)(a),d=/\/solve$/i.test(u.path)?"Route":/\/solveclosestfacility$/i.test(u.path)?"ClosestFacility":"ServiceAreas",m=(0,G.lA)({f:"json",serviceName:d},t),c=(0,g.Qj)(p)+"/GetTravelModes/execute",y=await(0,q.default)(c,m),h=[];let f=null;if(null!=y&&null!=(i=y.data)&&null!=(r=i.results)&&r.length){const e=y.data.results;for(const t of e){var v;if("supportedTravelModes"===t.paramName){if(null!=(v=t.value)&&v.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);h.push(t)}}else"defaultTravelMode"===t.paramName&&(f=t.value)}}return{supportedTravelModes:h,defaultTravelMode:f}}(e,i),{defaultTravelMode:a,supportedTravelModes:l}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=l,Oe.fromJSON(o)}var Ie=i(82526);function Be(e,t){if((0,c.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[ce.fromJSON(r)]=e[o]}return i}function je(e,t,i){if(!(0,c.Wi)(e)){t.attributes||(t.attributes={});for(const r in e){const o=ce.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Fe(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.fromJSON(r)]=e[i]}return t}function xe(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.toJSON(r)]=e[i]}return t}function Ee(e,t){return(0,c.Wi)(e)||(0,c.Wi)(t)?null:Math.round((e-t)/6e4)}function Le(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 Me=i(74889);const Pe=new K.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Je=class extends M.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Je.prototype,"description",void 0),(0,r._)([(0,T.Cb)({type:String,json:{read:Pe.read,write:Pe.write}})],Je.prototype,"type",void 0),Je=(0,r._)([(0,w.j)("esri.rest.support.GPMessage")],Je);const Re=Je,We=new K.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ue=class extends Re{constructor(e){super(e),this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{read:We.read,write:We.write}})],Ue.prototype,"type",void 0),Ue=(0,r._)([(0,w.j)("esri.rest.support.NAMessage")],Ue);const ke=Ue;let Ze=class extends a.Z{};(0,r._)([(0,T.Cb)()],Ze.prototype,"events",void 0),(0,r._)([(0,T.Cb)()],Ze.prototype,"strings",void 0),Ze=(0,r._)([(0,w.j)("esri.rest.support.DirectionsFeature")],Ze);const Ve=Ze;var qe=i(82971),Ge=i(58901),ze=i(13473);let Ke=class extends Me.default{constructor(e){super(e),this.extent=null,this.features=null,this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){var i;if(!e)return[];const r=null!=(i=t.summary.envelope.spatialReference)?i:t.spatialReference,o=r&&qe.Z.fromJSON(r);return e.map((e=>{var t,i;const r=this._decompressGeometry(e.compressedGeometry),s=new Ge.Z({...r,spatialReference:o}),a=null!=(t=null==(i=e.events)?void 0:i.map((e=>{const{arriveTimeUTC:t,ETA:i,point:{x:r,y:s,z:a},strings:l}=e;return new Ve({geometry:new ze.Z({x:r,y:s,z:a,hasZ:void 0!==a,spatialReference:o}),attributes:{ETA:i,arriveTimeUTC:t},strings:l})})))?t:[];return new Ve({attributes:e.attributes,events:a,geometry:s,strings:e.strings})}))}get mergedGeometry(){if(!this.features)return null;const e=this.features.map((({geometry:e})=>(0,c.Wg)(e))),t=this.get("extent.spatialReference");return this._mergePolylinesToSinglePath(e,t)}get strings(){return this.features.map((({strings:e})=>e))}_decompressGeometry(e){let t=0,i=0,r=0,o=0;const s=[];let a,l,n,p,u,d,m,c,y=0,b=0,h=0;if(u=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),u||(u=[]),0===parseInt(u[y],32)){y=2;const e=parseInt(u[y],32);y++,d=parseInt(u[y],32),y++,1&e&&(b=u.indexOf("|")+1,m=parseInt(u[b],32),b++),2&e&&(h=u.indexOf("|",b)+1,c=parseInt(u[h],32),h++)}else d=parseInt(u[y],32),y++;for(;y<u.length&&"|"!==u[y];){a=parseInt(u[y],32)+t,y++,t=a,l=parseInt(u[y],32)+i,y++,i=l;const e=[a/d,l/d];b&&(p=parseInt(u[b],32)+r,b++,r=p,e.push(p/m)),h&&(n=parseInt(u[h],32)+o,h++,o=n,e.push(n/c)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}_mergePolylinesToSinglePath(e,t){if(0===e.length)return new Ge.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 Ge.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}};(0,r._)([(0,T.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],Ke.prototype,"extent",void 0),(0,r._)([(0,T.Cb)()],Ke.prototype,"features",void 0),(0,r._)([(0,S.r)("features")],Ke.prototype,"readFeatures",null),(0,r._)([(0,T.Cb)()],Ke.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],Ke.prototype,"mergedGeometry",null),(0,r._)([(0,T.Cb)()],Ke.prototype,"routeId",void 0),(0,r._)([(0,T.Cb)()],Ke.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({value:null,readOnly:!0})],Ke.prototype,"strings",null),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],Ke.prototype,"totalDriveTime",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalLength"}}})],Ke.prototype,"totalLength",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalTime"}}})],Ke.prototype,"totalTime",void 0),Ke=(0,r._)([(0,w.j)("esri.rest.support.DirectionsFeatureSet")],Ke);const He=Ke;let $e=class extends M.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:Me.default,json:{write:!0}})],$e.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({type:Me.default,json:{write:!0}})],$e.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({type:He,json:{write:!0}})],$e.prototype,"directions",void 0),(0,r._)([(0,T.Cb)({type:a.Z,json:{write:!0}})],$e.prototype,"route",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],$e.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({type:[a.Z],json:{write:!0}})],$e.prototype,"stops",void 0),(0,r._)([(0,T.Cb)({type:Me.default,json:{write:!0}})],$e.prototype,"traversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Me.default,json:{write:!0}})],$e.prototype,"traversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Me.default,json:{write:!0}})],$e.prototype,"traversedTurns",void 0),$e=(0,r._)([(0,w.j)("esri.rest.support.RouteResult")],$e);const Ye=$e;function Qe(e){return e&&Me.default.fromJSON(e).features.map((e=>e))}let Xe=class extends M.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return Qe(t.barriers)}readPolylineBarriers(e){return Qe(e)}readPolygonBarriers(e){return Qe(e)}};(0,r._)([(0,T.Cb)({type:[ke]})],Xe.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({type:[a.Z]})],Xe.prototype,"pointBarriers",void 0),(0,r._)([(0,S.r)("pointBarriers",["barriers"])],Xe.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],Xe.prototype,"polylineBarriers",void 0),(0,r._)([(0,S.r)("polylineBarriers")],Xe.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],Xe.prototype,"polygonBarriers",void 0),(0,r._)([(0,S.r)("polygonBarriers")],Xe.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({type:[Ye]})],Xe.prototype,"routeResults",void 0),Xe=(0,r._)([(0,w.j)("esri.rest.support.RouteSolveResult")],Xe);const et=Xe;function tt(e){return"esri.rest.support.FeatureSet"===(null==e?void 0:e.declaredClass)}var it,rt=i(21878);let ot=it=class extends((0,Se.J)(M.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}static fromGraphic(e){var t,i;return new it({directionLineType:pe.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:null!=(t=e.attributes.FromLevel)?t:null,geometry:e.geometry,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null,toLevel:null!=(i=e.attributes.ToLevel)?i:null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),DirectionLineType:(0,c.pC)(this.directionLineType)?pe.toJSON(this.directionLineType):null,DirectionPointID:(0,c.Wg)(this.directionPointId),Meters:(0,c.Wg)(this.distance),Minutes:(0,c.Wg)(this.duration)};return(0,c.pC)(this.fromLevel)&&(e.FromLevel=this.fromLevel),(0,c.pC)(this.toLevel)&&(e.ToLevel=this.toLevel),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ot.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}],ot.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:pe.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:pe.read}}})],ot.prototype,"directionLineType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],ot.prototype,"directionPointId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Meters"}}})],ot.prototype,"distance",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Minutes"}}})],ot.prototype,"duration",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FromLevel"}}})],ot.prototype,"fromLevel",void 0),(0,r._)([(0,T.Cb)({type:Ge.Z})],ot.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],ot.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],ot.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],ot.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ToLevel"}}})],ot.prototype,"toLevel",void 0),ot=it=(0,r._)([(0,w.j)("esri.rest.support.DirectionLine")],ot);const st=ot;var at;let lt=at=class extends((0,Se.J)(M.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.voiceInstruction=null}readArrivalTime(e,t){return(0,c.pC)(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){var t,i,r,o,s,a,l,n,p,u,d,m,y;return new at({alternateName:null!=(t=e.attributes.AlternateName)?t:null,arrivalTime:(0,c.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:null!=(i=e.attributes.ArrivalUTCOffset)?i:null,azimuth:null!=(r=e.attributes.Azimuth)?r:null,branchName:null!=(o=e.attributes.BranchName)?o:null,directionPointType:ne.fromJSON(e.attributes.DirectionPointType),displayText:null!=(s=e.attributes.DisplayText)?s:null,exitName:null!=(a=e.attributes.ExitName)?a:null,geometry:e.geometry,intersectingName:null!=(l=e.attributes.IntersectingName)?l:null,level:null!=(n=e.attributes.Level)?n:null,name:null!=(p=e.attributes.Name)?p:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:null!=(u=e.attributes.ShortVoiceInstruction)?u:null,stopId:null!=(d=e.attributes.StopID)?d:null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null,towardName:null!=(m=e.attributes.TowardName)?m:null,voiceInstruction:null!=(y=e.attributes.VoiceInstruction)?y:null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),DirectionPointType:(0,c.pC)(this.directionPointType)?ne.toJSON(this.directionPointType):null,Sequence:(0,c.Wg)(this.sequence),StopID:this.stopId};return(0,c.pC)(this.alternateName)&&(e.AlternateName=this.alternateName),(0,c.pC)(this.arrivalTime)&&(e.ArrivalTime=this.arrivalTime.getTime()),(0,c.pC)(this.arrivalTimeOffset)&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),(0,c.pC)(this.azimuth)&&(e.Azimuth=this.azimuth),(0,c.pC)(this.branchName)&&(e.BranchName=this.branchName),(0,c.pC)(this.displayText)&&(e.DisplayText=this.displayText),(0,c.pC)(this.exitName)&&(e.ExitName=this.exitName),(0,c.pC)(this.intersectingName)&&(e.IntersectingName=this.intersectingName),(0,c.pC)(this.level)&&(e.Level=this.level),(0,c.pC)(this.name)&&(e.Name=this.name),(0,c.pC)(this.shortVoiceInstruction)&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),(0,c.pC)(this.towardName)&&(e.TowardName=this.towardName),(0,c.pC)(this.voiceInstruction)&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};lt.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}],lt.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)({json:{read:!1}})],lt.prototype,"alternateName",void 0),(0,r._)([(0,T.Cb)()],lt.prototype,"arrivalTime",void 0),(0,r._)([(0,S.r)("arrivalTime",["attributes.ArrivalTime"])],lt.prototype,"readArrivalTime",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],lt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Azimuth"}}})],lt.prototype,"azimuth",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.BranchName"}}})],lt.prototype,"branchName",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ne.read}}})],lt.prototype,"directionPointType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DisplayText"}}})],lt.prototype,"displayText",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ExitName"}}})],lt.prototype,"exitName",void 0),(0,r._)([(0,T.Cb)({type:ze.Z})],lt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"intersectingName",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"level",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],lt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],lt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],lt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Sequence"}}})],lt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopID"}}})],lt.prototype,"stopId",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],lt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.TowardName"}}})],lt.prototype,"towardName",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"voiceInstruction",void 0),lt=at=(0,r._)([(0,w.j)("esri.rest.support.DirectionPoint")],lt);const nt=lt;var pt;let ut=pt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null}readCosts(e,t){return Be(t.attributes,"Attr_")}writeCosts(e,t){je(e,t,"Attr_")}static fromGraphic(e){var t,i;return new pt({addedCost:null!=(t=e.attributes.AddedCost)?t:null,barrierType:(0,c.pC)(e.attributes.BarrierType)?ae.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?Fe(JSON.parse(e.attributes.Costs)):null,curbApproach:(0,c.pC)(e.attributes.CurbApproach)?ie.fromJSON(e.attributes.CurbApproach):null,fullEdge:(0,c.pC)(e.attributes.FullEdge)?le.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:null!=(i=e.attributes.Name)?i:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:(0,c.pC)(e.attributes.Status)?oe.fromJSON(e.attributes.Status):null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),AddedCost:this.addedCost,BarrierType:(0,c.pC)(this.barrierType)?ae.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(xe(this.costs)):null,CurbApproach:(0,c.pC)(this.curbApproach)?ie.toJSON(this.curbApproach):null,FullEdge:(0,c.pC)(this.fullEdge)?le.toJSON(this.fullEdge):null,Name:this.name,Status:(0,c.pC)(this.status)?oe.toJSON(this.status):null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ut.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAIntYesNo",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}}],ut.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],ut.prototype,"addedCost",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{name:"attributes.BarrierType",read:{reader:ae.read},write:{writer:ae.write}}})],ut.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],ut.prototype,"costs",void 0),(0,r._)([(0,S.r)("costs",["attributes"])],ut.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],ut.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:ie.apiValues,json:{read:{source:"attributes.CurbApproach",reader:ie.read}}})],ut.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:le.apiValues,json:{name:"attributes.FullEdge",read:{reader:le.read},write:{writer:le.write}}})],ut.prototype,"fullEdge",void 0),(0,r._)([(0,T.Cb)({type:ze.Z,json:{write:!0}})],ut.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],ut.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],ut.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],ut.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({type:se.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:se.read}}})],ut.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],ut.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],ut.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.Status",reader:oe.read}}})],ut.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],ut.prototype,"symbol",void 0),ut=pt=(0,r._)([(0,w.j)("esri.rest.support.PointBarrier")],ut);const dt=ut;var mt,ct=i(38913);let yt=mt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return Be(t.attributes,"Attr_")}writeCosts(e,t){je(e,t,"Attr_")}static fromGraphic(e){var t,i;return new mt({barrierType:(0,c.pC)(e.attributes.BarrierType)?ae.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?Fe(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:null!=(t=e.attributes.Name)?t:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:null!=(i=e.attributes.ScaleFactor)?i:null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null})}toGraphic(){var e,t;const i={__OBJECTID:(0,c.Wg)(this.objectId),BarrierType:(0,c.pC)(this.barrierType)?ae.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(xe(this.costs)):null,Name:null!=(e=this.name)?e:null,ScaleFactor:null!=(t=this.scaleFactor)?t:null};return new a.Z({geometry:this.geometry,attributes:i,symbol:this.symbol,popupTemplate:this.popupTemplate})}};yt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],yt.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{name:"attributes.BarrierType",read:{reader:ae.read},write:{writer:ae.write}}})],yt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"costs",void 0),(0,r._)([(0,S.r)("costs",["attributes"])],yt.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],yt.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:ct.Z,json:{write:!0}})],yt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],yt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],yt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],yt.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],yt.prototype,"symbol",void 0),yt=mt=(0,r._)([(0,w.j)("esri.rest.support.PolygonBarrier")],yt);const bt=yt;var ht;let ft=ht=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return Be(t.attributes,"Attr_")}static fromGraphic(e){var t,i;return new ht({barrierType:(0,c.pC)(e.attributes.BarrierType)?ae.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?Fe(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:null!=(t=e.attributes.Name)?t:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:null!=(i=e.attributes.ScaleFactor)?i:null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),BarrierType:(0,c.pC)(this.barrierType)?ae.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(xe(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ft.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],ft.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.BarrierType",reader:ae.read}}})],ft.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],ft.prototype,"costs",void 0),(0,r._)([(0,S.r)("costs",["attributes"])],ft.prototype,"readCosts",null),(0,r._)([(0,T.Cb)({type:Ge.Z,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],ft.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],ft.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],ft.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],ft.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],ft.prototype,"symbol",void 0),ft=ht=(0,r._)([(0,w.j)("esri.rest.support.PolylineBarrier")],ft);const vt=ft;let gt=class extends M.wq{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return(0,c.Wi)(e)?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ce.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],gt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,S.r)("accumulateAttributes")],gt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],gt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],gt.prototype,"directionsLanguage",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:_e,json:{write:!0}})],gt.prototype,"travelMode",void 0),gt=(0,r._)([(0,w.j)("esri.layers.support.RouteSettings")],gt);const Tt=gt;var Ct;let St=Ct=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.version="1.0.0"}readEndTime(e,t){return(0,c.pC)(t.attributes.EndTimeUTC)?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Ee(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return(0,c.pC)(t.attributes.StartTimeUTC)?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Ee(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Be(t.attributes,"Total_")}readTotalViolations(e,t){return Be(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Be(t.attributes,"TotalWait_")}static fromGraphic(e){var t,i,r,o,s,a;return new Ct({analysisSettings:(0,c.pC)(e.attributes.AnalysisSettings)?Tt.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:(0,c.pC)(e.attributes.EndTime)?new Date(e.attributes.EndTime):null,endTimeOffset:null!=(t=e.attributes.EndUTCOffset)?t:null,geometry:e.geometry,messages:(0,c.pC)(e.attributes.Messages)?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:(0,c.pC)(e.attributes.StartTime)?new Date(e.attributes.StartTime):null,startTimeOffset:null!=(i=e.attributes.StartUTCOffset)?i:null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null,totalCosts:(0,c.pC)(e.attributes.TotalCosts)?Fe(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:null!=(r=e.attributes.TotalMeters)?r:null,totalDuration:null!=(o=e.attributes.TotalMinutes)?o:null,totalLateDuration:null!=(s=e.attributes.TotalLateMinutes)?s:null,totalWaitDuration:null!=(a=e.attributes.TotalWaitMinutes)?a:null,version:e.attributes.Version})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),AnalysisSettings:(0,c.pC)(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:(0,c.pC)(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:(0,c.pC)(this.messages)?JSON.stringify(this.messages):null,RouteName:(0,c.Wg)(this.name),StartTime:(0,c.pC)(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:(0,c.pC)(this.totalCosts)?JSON.stringify(xe(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:(0,c.Wg)(this.version)};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};St.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],St.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"analysisSettings",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"endTime",void 0),(0,r._)([(0,S.r)("endTime",["attributes.EndTimeUTC"])],St.prototype,"readEndTime",null),(0,r._)([(0,T.Cb)()],St.prototype,"endTimeOffset",void 0),(0,r._)([(0,S.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],St.prototype,"readEndTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],St.prototype,"firstStopId",void 0),(0,r._)([(0,T.Cb)({type:Ge.Z})],St.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.LastStopID"}}})],St.prototype,"lastStopId",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],St.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],St.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],St.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"startTime",void 0),(0,r._)([(0,S.r)("startTime",["attributes.StartTimeUTC"])],St.prototype,"readStartTime",null),(0,r._)([(0,T.Cb)()],St.prototype,"startTimeOffset",void 0),(0,r._)([(0,S.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],St.prototype,"readStartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopCount"}}})],St.prototype,"stopCount",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],St.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"totalCosts",void 0),(0,r._)([(0,S.r)("totalCosts",["attributes"])],St.prototype,"readTotalCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalDuration",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalLateDuration",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"totalViolations",void 0),(0,r._)([(0,S.r)("totalViolations",["attributes"])],St.prototype,"readTotalViolations",null),(0,r._)([(0,T.Cb)()],St.prototype,"totalWait",void 0),(0,r._)([(0,S.r)("totalWait",["attributes"])],St.prototype,"readTotalWait",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalWaitDuration",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"version",void 0),St=Ct=(0,r._)([(0,w.j)("esri.rest.support.RouteInfo")],St);const wt=St,_t={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Nt=i(33955);let Ot=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({types:s.qM,json:{read:Nt.im,write:!0}})],Ot.prototype,"geometry",void 0),(0,r._)([(0,z.J)(he)],Ot.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({type:String,json:{name:"layerName",write:!0}})],Ot.prototype,"name",void 0),(0,r._)([(0,z.J)(be,{name:"spatialRel"})],Ot.prototype,"spatialRelationship",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ot.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ot.prototype,"where",void 0),Ot=(0,r._)([(0,w.j)("esri.rest.support.DataLayer")],Ot);const At=Ot;var Dt;let It=Dt=class extends Me.default{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Dt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],It.prototype,"doNotLocateOnRestrictedElements",void 0),It=Dt=(0,r._)([(0,w.j)("esri.rest.support.NetworkFeatureSet")],It);const Bt=It;let jt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],jt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],jt.prototype,"url",void 0),jt=(0,r._)([(0,w.j)("esri.rest.support.NetworkUrl")],jt);const Ft=jt;var xt;function Et(e,t,i){(0,c.pC)(e)&&(t[i]=p.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}let Lt=xt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,C.TJ)(xt,e)}readAccumulateAttributes(e){return(0,c.Wi)(e)?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ce.toJSON(e))))}writePointBarriers(e,t,i){Et(e,t,i)}writePolygonBarrier(e,t,i){Et(e,t,i)}writePolylineBarrier(e,t,i){Et(e,t,i)}readRestrictionAttributes(e){return(0,c.Wi)(e)?null:e.map((e=>ye.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return(0,c.Wi)(i)?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){(0,c.Wi)(e)||(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?At.fromJSON(e):function(e){return e&&"url"in e}(e)?Ft.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Bt.fromJSON(e):function(e){return e&&"features"in e}(e)?Me.default.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Et(e,t,i)}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Lt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,S.r)("accumulateAttributes")],Lt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Lt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)(_t)],Lt.prototype,"apiKey",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Lt.prototype,"directionsLanguage",void 0),(0,r._)([(0,z.J)($)],Lt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,z.J)(Q)],Lt.prototype,"directionsOutputType",void 0),(0,r._)([(0,z.J)(ue)],Lt.prototype,"directionsStyleName",void 0),(0,r._)([(0,z.J)(me,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Lt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Lt.prototype,"geometryPrecision",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Lt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Lt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,z.J)(ce,{name:"impedanceAttributeName",ignoreUnknown:!1})],Lt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Lt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,z.J)(H)],Lt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,z.J)(X)],Lt.prototype,"outputLines",void 0),(0,r._)([(0,T.Cb)({type:qe.Z,json:{name:"outSR",write:!0}})],Lt.prototype,"outSpatialReference",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"overrides",void 0),(0,r._)([(0,T.Cb)({json:{name:"barriers",write:!0}})],Lt.prototype,"pointBarriers",void 0),(0,r._)([(0,_.c)("pointBarriers")],Lt.prototype,"writePointBarriers",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"polygonBarriers",void 0),(0,r._)([(0,_.c)("polygonBarriers")],Lt.prototype,"writePolygonBarrier",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"polylineBarriers",void 0),(0,r._)([(0,_.c)("polylineBarriers")],Lt.prototype,"writePolylineBarrier",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"preserveObjectID",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Lt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,S.r)("restrictionAttributes")],Lt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributes")],Lt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,z.J)(ee)],Lt.prototype,"restrictUTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnDirections",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnRoutes",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnStops",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnZ",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{type:Number,write:!0}})],Lt.prototype,"startTime",void 0),(0,r._)([(0,S.r)("startTime")],Lt.prototype,"readStartTime",null),(0,r._)([(0,_.c)("startTime")],Lt.prototype,"writeStartTime",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"stops",void 0),(0,r._)([(0,S.r)("stops")],Lt.prototype,"readStops",null),(0,r._)([(0,_.c)("stops")],Lt.prototype,"writeStops",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:_e,json:{write:!0}})],Lt.prototype,"travelMode",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"useHierarchy",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"useTimeWindows",void 0),Lt=xt=(0,r._)([(0,w.j)("esri.rest.support.RouteParameters")],Lt);const Mt=Lt;var Pt;let Jt=Pt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Ee(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Be(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Ee(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Be(t.attributes,"Attr_")}writeServiceCosts(e,t){je(e,t,"Attr_")}writeTimeWindowEnd(e,t){(0,c.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){(0,c.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Be(t.attributes,"Violation_")}readWait(e,t){return Be(t.attributes,"Wait_")}static fromGraphic(e){var t,i,r,o,s,a,l,n,p,u;return new Pt({arriveCurbApproach:(0,c.pC)(e.attributes.ArrivalCurbApproach)?ie.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:(0,c.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:(0,c.pC)(e.attributes.CumulativeCosts)?Fe(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:null!=(t=e.attributes.CumulativeMeters)?t:null,cumulativeDuration:null!=(i=e.attributes.CumulativeMinutes)?i:null,curbApproach:(0,c.pC)(e.attributes.CurbApproach)?ie.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:(0,c.pC)(e.attributes.DepartureCurbApproach)?ie.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:(0,c.pC)(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:null!=(r=e.attributes.DepartureUTCOffset)?r:null,geometry:e.geometry,lateDuration:null!=(o=e.attributes.LateMinutes)?o:null,locationType:(0,c.pC)(e.attributes.LocationType)?re.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:null!=(s=e.attributes.Sequence)?s:null,serviceCosts:(0,c.pC)(e.attributes.ServiceCosts)?Fe(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:null!=(a=e.attributes.ServiceMeters)?a:null,serviceDuration:null!=(l=e.attributes.ServiceMinutes)?l:null,status:(0,c.pC)(e.attributes.Status)?oe.fromJSON(e.attributes.Status):null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null,timeWindowEnd:(0,c.pC)(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:null!=(n=e.attributes.TimeWindowEndUTCOffset)?n:null,timeWindowStart:(0,c.pC)(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:null!=(p=e.attributes.TimeWindowStartUTCOffset)?p:null,waitDuration:null!=(u=e.attributes.WaitMinutes)?u:null})}toGraphic(){var e,t;const i={__OBJECTID:(0,c.Wg)(this.objectId),ArrivalCurbApproach:(0,c.pC)(this.arriveCurbApproach)?ie.toJSON(this.arriveCurbApproach):null,ArrivalTime:(0,c.pC)(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:(0,c.pC)(this.cumulativeCosts)?JSON.stringify(xe(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:(0,c.pC)(this.curbApproach)?ie.toJSON(this.curbApproach):null,DepartureCurbApproach:(0,c.pC)(this.departCurbApproach)?ie.toJSON(this.departCurbApproach):null,DepartureTime:(0,c.pC)(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:(0,c.pC)(this.locationType)?re.toJSON(this.locationType):null,Name:(0,c.Wg)(this.name),RouteName:(0,c.Wg)(this.routeName),Sequence:this.sequence,ServiceCosts:(0,c.pC)(this.serviceCosts)?JSON.stringify(xe(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:(0,c.pC)(this.status)?oe.toJSON(this.status):null,TimeWindowEnd:(0,c.pC)(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:null!=(e=this.timeWindowEndOffset)?e:this.arriveTimeOffset,TimeWindowStart:(0,c.pC)(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:null!=(t=this.timeWindowEndOffset)?t:this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new a.Z({geometry:this.geometry,attributes:i,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Jt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],Jt.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:ie.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:ie.read}}})],Jt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Jt.prototype,"arriveTime",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,S.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Jt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,T.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Jt.prototype,"bearing",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Jt.prototype,"bearingTol",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,S.r)("cumulativeCosts",["attributes"])],Jt.prototype,"readCumulativeCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,T.Cb)({type:ie.apiValues,json:{name:"attributes.CurbApproach",read:{reader:ie.read},write:{writer:ie.write}}})],Jt.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:ie.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:ie.read}}})],Jt.prototype,"departCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Jt.prototype,"departTime",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"departTimeOffset",void 0),(0,r._)([(0,S.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Jt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Jt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,T.Cb)({type:ze.Z,json:{write:!0}})],Jt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.LateMinutes",read:!1}})],Jt.prototype,"lateDuration",void 0),(0,r._)([(0,T.Cb)({type:re.apiValues,json:{name:"attributes.LocationType",read:{reader:re.read},write:{writer:re.write}}})],Jt.prototype,"locationType",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],Jt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.NavLatency"}}})],Jt.prototype,"navLatency",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],Jt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],Jt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.PosAlong"}}})],Jt.prototype,"posAlong",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.RouteName"}})],Jt.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"serviceCosts",void 0),(0,r._)([(0,S.r)("serviceCosts",["attributes"])],Jt.prototype,"readServiceCosts",null),(0,r._)([(0,_.c)("serviceCosts")],Jt.prototype,"writeServiceCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"serviceDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"serviceDuration",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Sequence"}})],Jt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({type:se.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:se.read}}})],Jt.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapX"}}})],Jt.prototype,"snapX",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapY"}}})],Jt.prototype,"snapY",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapZ"}}})],Jt.prototype,"snapZ",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],Jt.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],Jt.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.Status",reader:oe.read}}})],Jt.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],Jt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Jt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,_.c)("timeWindowEnd")],Jt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Jt.prototype,"timeWindowStart",void 0),(0,r._)([(0,_.c)("timeWindowStart")],Jt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"violations",void 0),(0,r._)([(0,S.r)("violations",["attributes"])],Jt.prototype,"readViolations",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"waitDuration",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"wait",void 0),(0,r._)([(0,S.r)("wait",["attributes"])],Jt.prototype,"readWait",null),Jt=Pt=(0,r._)([(0,w.j)("esri.rest.support.Stop")],Jt);const Rt=Jt;var Wt=i(65091);function Ut(e){return e.length?e:null}function kt(e){const{defaultTravelMode:t,supportedTravelModes:i}=e;return i.find((e=>e.id===t))}function Zt(e){return"layers"in e}async function Vt(e){const t=qe.Z.WGS84;return await(0,A.iQ)(e.spatialReference,t),(0,A.iV)(e,t)}function qt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Gt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,v.En)(e,t,"meters")}function zt(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}const Kt=p.Z.ofType(st),Ht=p.Z.ofType(nt),$t=p.Z.ofType(dt),Yt=p.Z.ofType(bt),Qt=p.Z.ofType(vt),Xt=p.Z.ofType(Rt),ei=m.Z.getLogger("esri.layers.RouteLayer");let ti=class extends((0,B.h)((0,x.M)((0,j.q)((0,F.I)((0,y.R)((0,d.p)(I.Z))))))){constructor(...e){super(...e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new U,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new $t,this.polygonBarriers=new Yt,this.polylineBarriers=new Qt,this.routeInfo=null,this.spatialReference=qe.Z.WGS84,this.stops=new Xt,this.type="route",this.handles.add((0,f.YP)((()=>this.stops.toArray()),(()=>{(0,c.Wi)(this.routeInfo)&&this._setStopSymbol(this.stops)}),{sync:!0}))}writeFeatureCollectionWebmap(e,t,i,r){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),a="web-map"===r.origin?"featureCollection.layers":"layers";(0,b.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>st.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>nt.fromGraphic(e)))}get fullExtent(){if((0,c.pC)(this.routeInfo)&&(0,c.pC)(this.routeInfo.geometry))return this.routeInfo.geometry.extent;const e=new O.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:qe.Z.WGS84}),t=this.stops.filter((e=>(0,c.pC)(e.geometry)));if(t.length<2)return e;const{spatialReference:i}=t.getItemAt(0).geometry;if((0,c.Wi)(i))return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new Wt.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){var i;const r=(Zt(t)?t.layers:t.featureCollection.layers).find((e=>(0,c.pC)(e.layerDefinition.maxScale)));return null!=(i=null==r?void 0:r.layerDefinition.maxScale)?i:0}readMinScale(e,t){var i;const r=(Zt(t)?t.layers:t.featureCollection.layers).find((e=>(0,c.pC)(e.layerDefinition.minScale)));return null!=(i=null==r?void 0:r.layerDefinition.minScale)?i:0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>dt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>bt.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>vt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>wt.fromGraphic(e)));return i.length>0?i.getItemAt(0):null}readSpatialReference(e,t){var i,r;const o=Zt(t)?t.layers:t.featureCollection.layers;if(!o.length)return qe.Z.WGS84;const{layerDefinition:s}=o[0],a=null!=(i=null!=(r=s.spatialReference)?r:s.extent.spatialReference)?i:D.Zn;return qe.Z.fromJSON(a)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>Rt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return(0,c.pC)(this.routeInfo)&&(0,c.pC)(this.routeInfo.name)?this.routeInfo.name:"Route"}set title(e){e?this._override("title",e):this._clearOverride("title")}get url(){return o.Z.routeServiceUrl}set url(e){null!=e?this._set("url",(0,E.Nm)(e,ei)):this._set("url",o.Z.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){(0,c.pC)(this.directionLines)&&(this.directionLines.removeAll(),this._set("directionLines",null)),(0,c.pC)(this.directionPoints)&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),(0,c.pC)(this.routeInfo)&&this._set("routeInfo",null),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new u.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if((0,c.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;if(await i._signIn(),i.user||await t.reload(),i.user.username!==t.owner)throw new u.Z("routelayer:not-portal-item-owner","You can only overwrite your portal items");const{itemUrl:r}=t,o={messages:[],origin:"portal-item",portal:i,url:r&&(0,g.mN)(r),writtenProperties:[]},s=this.write(null,o);return t.extent=await Vt(e),t.title=this.title,await t.update({data:s}),t}async saveAs(e,t={}){if(await this.load(),(0,c.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=Z.default.from(e).clone();null!=i.extent||(i.extent=await Vt(this.fullExtent)),i.id=null,null!=i.portal||(i.portal=k.Z.getDefault()),null!=i.title||(i.title=this.title),i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",V.Kz.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r._signIn();const s=null==t?void 0:t.folder,a=this.write(null,o);return await r.user.addItem({item:i,folder:s,data:a}),this.portalItem=i,(0,N.D)(o),o.portalItem=i,i}async solve(e,t){var i,r,o,s,a;const l=null!=(i=null==e?void 0:e.stops)?i:this.stops,n=null!=(r=null==e?void 0:e.pointBarriers)?r:Ut(this.pointBarriers),d=null!=(o=null==e?void 0:e.polylineBarriers)?o:Ut(this.polylineBarriers),m=null!=(s=null==e?void 0:e.polygonBarriers)?s:Ut(this.polygonBarriers);if((0,c.Wi)(l))throw new u.Z("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(l)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(l))&&l.features.length<2||p.Z.isCollection(l)&&l.length<2)throw new u.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");const y=null==e?void 0:e.apiKey,b=this.url,f=await this._getServiceDescription(b,y,t),v=kt(f),g=null!=(a=null==e?void 0:e.travelMode)?a:v,T=(0,c.yl)(null==e?void 0:e.accumulateAttributes,[]);(0,c.pC)(g)&&T.push(g.distanceAttributeName);const C={startTime:new Date},S={accumulateAttributes:T,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:n,polylineBarriers:d,polygonBarriers:m,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!n,returnDirections:!0,returnPolygonBarriers:!!m,returnPolylineBarriers:!!d,returnRoutes:!0,returnStops:!0,stops:l},w=e?Mt.from(e):new Mt;for(const e in C)null==w[e]&&(w[e]=C[e]);let _;w.set(S);try{_=await async function(e,t,i){const r=[],o=[],s={},a={},l=(0,G.en)(e),{path:n}=l;tt(t.stops)&&Ae(t.stops.features,o,"stops.features",s),tt(t.pointBarriers)&&Ae(t.pointBarriers.features,o,"pointBarriers.features",s),tt(t.polylineBarriers)&&Ae(t.polylineBarriers.features,o,"polylineBarriers.features",s),tt(t.polygonBarriers)&&Ae(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,Ie.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=p.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if((0,c.pC)(e)&&e.hasZ)return!0}return!1}(a,r)){let e=null;try{e=await De(n,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}console.log("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const u={...i,query:{...l.query,...Le(t),f:"json"}},d=n.endsWith("/solve")?n:`${n}/solve`,{data:m}=await(0,q.default)(d,u);return function(e){var t;const{barriers:i,directionLines:r,directionPoints:o,directions:s,messages:a,polygonBarriers:l,polylineBarriers:n,routes:p,stops:u,traversedEdges:d,traversedJunctions:m,traversedTurns:y}=e,b=e=>{const t=f.find((t=>t.routeName===e));if((0,c.pC)(t))return t;const i={routeId:f.length+1,routeName:e};return f.push(i),i},h=e=>{const t=f.find((t=>t.routeId===e));if((0,c.pC)(t))return t;const i={routeId:e,routeName:null};return f.push(i),i},f=[];null==p||p.features.forEach(((e,t)=>{e.geometry.spatialReference=p.spatialReference;const i=e.attributes.Name,r=t+1;f.push({routeId:r,routeName:i,route:e})})),null==s||s.forEach((e=>{const{routeName:t}=e;b(t).directions=e}));const v=null!=(t=null==u?void 0:u.features.every((e=>(0,c.Wi)(e.attributes.RouteName))))&&t&&f.length>0?f[0].routeName:null;return null==u||u.features.forEach((e=>{e.geometry.spatialReference=u.spatialReference;const t=null!=v?v:e.attributes.RouteName,i=b(t);null!=i.stops||(i.stops=[]),i.stops.push(e)})),null==r||r.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t),{geometryType:o,spatialReference:s}=r;null!=i.directionLines||(i.directionLines={features:[],geometryType:o,spatialReference:s}),i.directionLines.features.push(e)})),null==o||o.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t),{geometryType:r,spatialReference:s}=o;null!=i.directionPoints||(i.directionPoints={features:[],geometryType:r,spatialReference:s}),i.directionPoints.features.push(e)})),null==d||d.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t),{geometryType:r,spatialReference:o}=d;null!=i.traversedEdges||(i.traversedEdges={features:[],geometryType:r,spatialReference:o}),i.traversedEdges.features.push(e)})),null==m||m.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t),{geometryType:r,spatialReference:o}=m;null!=i.traversedJunctions||(i.traversedJunctions={features:[],geometryType:r,spatialReference:o}),i.traversedJunctions.features.push(e)})),null==y||y.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t);null!=i.traversedTurns||(i.traversedTurns={features:[]}),i.traversedTurns.features.push(e)})),et.fromJSON({routeResults:f,barriers:i,polygonBarriers:l,polylineBarriers:n,messages:a})}(m)}(b,w,t)}catch(e){throw(0,h.D_)(e)?e:new u.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const N=this._toRouteLayerSolution(_);return this._isOverridden("title")||(this.title=(0,c.yl)(N.routeInfo.name,"Route")),function(e,t,i){var r,o,s,a,l,n,p,d,m,y,b;const h=t.networkDataset.networkAttributes.filter((e=>"cost"===e.usageType)),f=kt(t),v=null!=(r=i.travelMode)?r:f;if((0,c.Wi)(v))return void ei.warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:g,distanceAttributeName:T}=v,C=h.find((e=>e.name===g)),S=h.find((e=>e.name===T)),w=null!=(o=null!=(s=null==(a=(0,c.Wg)(i.travelMode))?void 0:a.impedanceAttributeName)?s:(0,c.Wg)(i.impedanceAttribute))?o:t.impedance,_=Y.fromJSON(null==C?void 0:C.units),N=$.fromJSON(null==S?void 0:S.units);if(!_||!N)throw new u.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const O=null!=(l=i.directionsLanguage)?l:t.directionsLanguage,A=null!=(n=null!=(p=(0,c.Wg)(i.accumulateAttributes))?p:t.accumulateAttributeNames)?n:[],D=new Set(h.filter((({name:e})=>e===g||e===T||e===w||A.includes(e))).map((({name:e})=>e))),I=e=>{for(const t in e)D.has(t)||delete e[t]};for(const t of e.pointBarriers){var B;(0,c.pC)(t.costs)&&(t.addedCost=null!=(B=t.costs[w])?B:0,I(t.costs))}for(const t of e.polygonBarriers){var j;(0,c.pC)(t.costs)&&(t.scaleFactor=null!=(j=t.costs[w])?j:1,I(t.costs))}for(const t of e.polylineBarriers){var F;(0,c.pC)(t.costs)&&(t.scaleFactor=null!=(F=t.costs[w])?F:1,I(t.costs))}const{routeInfo:x}=e,{findBestSequence:E,preserveFirstStop:L,preserveLastStop:M,startTimeIsUTC:P,timeWindowsAreUTC:J}=i;x.analysisSettings=new Tt({accumulateAttributes:A,directionsLanguage:O,findBestSequence:E,preserveFirstStop:L,preserveLastStop:M,startTimeIsUTC:P,timeWindowsAreUTC:J,travelMode:v}),x.totalDuration=qt(null!=(d=x.totalCosts[g])?d:0,_),x.totalDistance=Gt(null!=(m=x.totalCosts[T])?m:0,N),x.totalLateDuration=qt(null!=(y=x.totalViolations[g])?y:0,_),x.totalWaitDuration=qt(null!=(b=x.totalWait[g])?b:0,_),(0,c.pC)(x.totalCosts)&&I(x.totalCosts),(0,c.pC)(x.totalViolations)&&I(x.totalViolations),(0,c.pC)(x.totalWait)&&I(x.totalWait);for(const t of e.stops){var R,W,U,k,Z,V;(0,c.pC)(t.serviceCosts)&&(t.serviceDuration=qt(null!=(R=t.serviceCosts[g])?R:0,_),t.serviceDistance=Gt(null!=(W=t.serviceCosts[T])?W:0,N),I(t.serviceCosts)),(0,c.pC)(t.cumulativeCosts)&&(t.cumulativeDuration=qt(null!=(U=t.cumulativeCosts[g])?U:0,_),t.cumulativeDistance=Gt(null!=(k=t.cumulativeCosts[T])?k:0,N),I(t.cumulativeCosts)),(0,c.pC)(t.violations)&&(t.lateDuration=qt(null!=(Z=t.violations[g])?Z:0,_),I(t.violations)),(0,c.pC)(t.wait)&&(t.waitDuration=qt(null!=(V=t.wait[g])?V:0,_),I(t.wait))}}(N,f,w),N}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:l}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",l)}_getLayerDefinition(){return{capabilities:"Query,Update,Editing",extent:this.fullExtent.toJSON(),hasM:!1,hasZ:!1,maxScale:this.maxScale,minScale:this.minScale,objectIdField:"__OBJECTID",spatialReference:this.spatialReference.toJSON(),type:"Feature Layer",typeIdField:""}}_getNetworkFeatures(e,t,i,r){const o=(Zt(e)?e.layers:e.featureCollection.layers).find((e=>e.layerDefinition.name===t));if((0,c.Wi)(o))return new p.Z;const{layerDefinition:s,popupInfo:u,featureSet:d}=o,m=s.drawingInfo.renderer,{features:y}=d,b=m&&(0,n.a)(m),h=y.map((e=>{var r;const o=a.Z.fromJSON(e),s=i(o);return null!=s.symbol||(s.symbol=null!=(r=null==b?void 0:b.getSymbol(o))?r:this._getNetworkSymbol(t)),null!=s.popupTemplate||(s.popupTemplate=u&&l.Z.fromJSON(u)),s}));return r&&h.some((e=>!e.symbol))&&r(h),new p.Z(h)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,i){if((0,c.pC)(this._cachedServiceDescription)&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await De(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if((0,c.Wi)(this.routeInfo)||1===e.length)return void e.forEach(((t,i)=>{switch(i){case 0:t.symbol=this.defaultSymbols.firstStop;break;case e.length-1:t.symbol=this.defaultSymbols.lastStop;break;default:t.symbol=this.defaultSymbols.middleStop}}));const t=e.map((e=>e.sequence)).filter((e=>(0,c.pC)(e))),i=Math.min(...t),r=Math.max(...t);for(const t of e)t.sequence!==i?t.sequence!==r?"ok"===t.status||"not-located-on-closest"===t.status?"waypoint"!==t.locationType?"break"!==t.locationType?t.symbol=this.defaultSymbols.middleStop:t.symbol=this.defaultSymbols.breakStop:t.symbol=this.defaultSymbols.waypointStop:t.symbol=this.defaultSymbols.invalidStop:t.symbol=this.defaultSymbols.lastStop:t.symbol=this.defaultSymbols.firstStop}_toRouteLayerSolution(e){var t,i,r,o,s;const a=e.routeResults[0].stops.map((e=>Rt.fromJSON(e.toJSON())));this._setStopSymbol(a);const l=new Xt(a),n=new Yt(null==(t=e.polygonBarriers)?void 0:t.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),p=new Qt(null==(i=e.polylineBarriers)?void 0:i.map((e=>{const t=vt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),u=new $t(null==(r=e.pointBarriers)?void 0:r.map((e=>{const t=dt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),d=wt.fromJSON(e.routeResults[0].route.toJSON());d.symbol=this.defaultSymbols.routeInfo;const m=new Ht(null==(o=e.routeResults[0].directionPoints)?void 0:o.features.map((e=>{const t=nt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new Kt(null==(s=e.routeResults[0].directionLines)?void 0:s.features.map((e=>{const t=st.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:m,pointBarriers:u,polygonBarriers:n,polylineBarriers:p,routeInfo:d,stops:l}}_writeDirectionLines(){return(0,c.Wi)(this.directionLines)||!this.directionLines.length?null:{featureSet:{features:this.directionLines.toArray().map((e=>zt(e))),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.directionLines.toJSON()}},fields:st.fields,geometryType:"esriGeometryPolyline",name:"DirectionLines",title:"Direction Lines"},popupInfo:st.popupInfo}}_writeDirectionPoints(){return(0,c.Wi)(this.directionPoints)||!this.directionPoints.length?null:{featureSet:{features:this.directionPoints.toArray().map((e=>zt(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.directionPoints.toJSON()}},fields:nt.fields,geometryType:"esriGeometryPoint",name:"DirectionPoints",title:"Direction Points"},popupInfo:nt.popupInfo}}_writePointBarriers(){return(0,c.Wi)(this.pointBarriers)||!this.pointBarriers.length?null:{featureSet:{features:this.pointBarriers.toArray().map((e=>zt(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.pointBarriers.toJSON()}},fields:dt.fields,geometryType:"esriGeometryPoint",name:"Barrier",title:"Point Barrier"},popupInfo:dt.popupInfo}}_writePolygonBarriers(){return(0,c.Wi)(this.polygonBarriers)||!this.polygonBarriers.length?null:{featureSet:{features:this.polygonBarriers.toArray().map((e=>zt(e))),geometryType:"esriGeometryPolygon"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.polygonBarriers.toJSON()}},fields:bt.fields,geometryType:"esriGeometryPolygon",name:"PolygonBarriers",title:"Polygon Barriers"},popupInfo:bt.popupInfo}}_writePolylineBarriers(){return(0,c.Wi)(this.polylineBarriers)||!this.polylineBarriers.length?null:{featureSet:{features:this.polylineBarriers.toArray().map((e=>zt(e))),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.polylineBarriers.toJSON()}},fields:vt.fields,geometryType:"esriGeometryPolyline",name:"PolylineBarriers",title:"Line Barriers"},popupInfo:vt.popupInfo}}_writeRouteInfo(){return(0,c.Wi)(this.routeInfo)?null:{featureSet:{features:[zt(this.routeInfo)],geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.routeInfo.toJSON()}},fields:wt.fields,geometryType:"esriGeometryPolyline",name:"RouteInfo",title:"Route Details"},popupInfo:wt.popupInfo}}_writeStops(){return(0,c.Wi)(this.stops)||!this.stops.length?null:{featureSet:{features:this.stops.toArray().map((e=>zt(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"uniqueValue",field1:"Sequence",defaultSymbol:this.defaultSymbols.middleStop.toJSON(),uniqueValueInfos:[{value:"1",symbol:this.defaultSymbols.firstStop.toJSON(),label:"First Stop"},{value:`${this.stops.length}`,symbol:this.defaultSymbols.lastStop.toJSON(),label:"Last Stop"}]}},fields:Rt.fields,geometryType:"esriGeometryPoint",name:"Stops",title:"Stops"},popupInfo:Rt.popupInfo}}};(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ti.prototype,"_featureCollection",void 0),(0,r._)([(0,_.c)(["web-map","portal-item"],"_featureCollection")],ti.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ti.prototype,"_type",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:U})],ti.prototype,"defaultSymbols",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ti.prototype,"directionLines",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ti.prototype,"readDirectionLines",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ti.prototype,"directionPoints",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ti.prototype,"readDirectionPoints",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ti.prototype,"featureCollectionType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ti.prototype,"fullExtent",null),(0,r._)([(0,T.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ti.prototype,"legendEnabled",void 0),(0,r._)([(0,T.Cb)({type:["show","hide"]})],ti.prototype,"listMode",void 0),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ti.prototype,"maxScale",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ti.prototype,"readMaxScale",null),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ti.prototype,"minScale",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ti.prototype,"readMinScale",null),(0,r._)([(0,T.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ti.prototype,"operationalLayerType",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(dt)})],ti.prototype,"pointBarriers",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ti.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(bt)})],ti.prototype,"polygonBarriers",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ti.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(vt)})],ti.prototype,"polylineBarriers",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ti.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ti.prototype,"routeInfo",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ti.prototype,"readRouteInfo",null),(0,r._)([(0,T.Cb)({type:qe.Z})],ti.prototype,"spatialReference",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ti.prototype,"readSpatialReference",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(Rt)})],ti.prototype,"stops",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ti.prototype,"readStops",null),(0,r._)([(0,T.Cb)()],ti.prototype,"title",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],ti.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],ti.prototype,"url",null),ti=(0,r._)([(0,w.j)("esri.layers.RouteLayer")],ti);const ii=ti},16859:(e,t,i)=>{i.d(t,{I:()=>T});var r=i(43697),o=i(40330),s=i(3172),a=i(66643),l=i(20102),n=i(92604),p=i(70586),u=i(95330),d=i(17452),m=i(5600),c=(i(67676),i(80442),i(75215),i(71715)),y=i(52011),b=i(30556),h=i(65587),f=i(15235),v=i(86082);const g=n.Z.getLogger("esri.layers.mixins.PortalLayer"),T=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new f.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,u.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||g.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,u.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?null==o.id?void 0:o.id.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,(0,p.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){var t,i;const r=null==(t=this.portalItem)||null==(i=t.portal)?void 0:i.user;if(r)return r;const l=o.id.findServerInfo(this.url);if(null==l||!l.owningSystemUrl)return null;const n=`${l.owningSystemUrl}/sharing/rest`,u=h.Z.getDefault();if(u&&u.loaded&&(0,d.Fv)(u.restUrl)===(0,d.Fv)(n))return u.user;const m=`${n}/community/self`,c=(0,p.pC)(e)?e.signal:null,y=await(0,a.q6)((0,s.default)(m,{authMode:"no-prompt",query:{f:"json"},signal:c}));return y.ok?v.default.fromJSON(y.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||h.Z.getDefault());return i&&r&&!(0,d.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.Cb)({type:f.default})],t.prototype,"portalItem",null),(0,r._)([(0,c.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,b.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},14661:(e,t,i)=>{i.d(t,{$o:()=>p,Kz:()=>u,_$:()=>l,ck:()=>n,qj:()=>a});var r=i(44547),o=i(82971),s=i(40488);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){var i;return!(null==(i=e.typeKeywords)||!i.includes(t))}function n(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.Sx)(e);const i=o.Z.WGS84;return await(0,r.iQ)(t,i),(0,r.iV)(e,i)}(i)}const u={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer"}},51706:(e,t,i)=>{var r,o;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function a(e){return null!=e&&!isNaN(e)&&isFinite(e)}function l(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function n(e,t){const i=t||l(e),s=e.valueUnit||"unknown";return i===r.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}i.d(t,{PS:()=>l,QW:()=>n,RY:()=>r,hL:()=>o,iY:()=>s,qh:()=>a}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var r,o=i(43697),s=i(66577),a=i(38171),l=i(35454),n=i(96674),p=i(22974),u=i(70586),d=i(5600),m=(i(75215),i(71715)),c=i(52011),y=i(30556),b=i(82971),h=i(33955),f=i(1231);const v=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=r=class extends n.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=b.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;(0,u.pC)(s.geometry)&&!l&&(s.geometry.spatialReference=i);const n=o.aggregateGeometries,p=s.aggregateGeometries;if(n&&(0,u.pC)(p))for(const e in p){const t=p[e],r=n[e],o=null==r?void 0:r.spatialReference;(0,u.pC)(t)&&!o&&(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void v.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&(0,u.pC)(e.geometry))return void v.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,h.im)(e);return!i&&t.spatialReference&&(r.spatialReference=b.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)a((0,u.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,a]}=i,l=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&l(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(l[0]),o=i(l[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&o.push(a)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y)}:"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];for(let e=0,r=a.length;e<r;e++){const r=a[e];e>0?(o+=r[0],s+=r[1]):(o=r[0],s=r[1]),r[0]=t(o),r[1]=i(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax)}:"multipoint"===e?e=>{const r=e.points;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];e>0?(o+=a[0],s+=a[1]):(o=a[0],s=a[1]),a[0]=t(o),a[1]=i(s)}}:void 0}};(0,o._)([(0,d.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.Cb)({type:[a.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,m.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,d.Cb)({type:[f.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,d.Cb)({types:s.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,m.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,d.Cb)({type:b.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,d.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=r=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const T=g},11282:(e,t,i)=>{i.d(t,{cv:()=>l,en:()=>a,lA:()=>s});var r=i(22974),o=i(17452);function s(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.mN)(e):(0,r.d9)(e)}function l(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){r[o]=[];for(let e=0;e<s.length;e++)r[o][e]=l(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i&&i[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9414,4889],{65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((e=>{const t=e.target;e.newOrigin&&e.oldOrigin!==e.newOrigin&&(0,r.l)(t)&&t.updateOrigin(e.propName,e.newOrigin)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},6665:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ii});var r=i(43697),o=i(68773),s=i(66577),a=i(38171),l=i(51773),n=(i(16050),i(12501),i(95088),i(79056),i(5499),i(84382),i(30687),i(91423)),p=i(80539),u=i(20102),d=i(3920),m=i(92604),c=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(67676),i(80442),i(75215)),S=i(71715),w=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),D=i(8744),I=i(29600),B=i(71612),j=i(38009),F=i(16859),x=i(72965),E=i(66677),L=i(78223),M=i(96674),P=i(4095),J=i(77987),R=i(20256);let W=class extends M.wq{constructor(){super(...arguments),this.directionLines=new P.Z({color:[0,122,194],width:6}),this.directionPoints=new J.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new J.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new R.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new P.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new P.Z({width:8,color:[20,89,127]}),this.firstStop=new J.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.middleStop=new J.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.lastStop=new J.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.invalidStop=new J.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.waypointStop=new J.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.breakStop=new J.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"pointBarriers",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"polygonBarriers",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"polylineBarriers",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"routeInfo",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"firstStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"middleStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"lastStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"invalidStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"waypointStop",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,types:L.LB})],W.prototype,"breakStop",void 0),W=(0,r._)([(0,w.j)("esri.layers.support.DefaultSymbols")],W);const U=W;var k=i(65587),Z=i(15235),V=i(14661),q=i(3172),G=i(11282),z=i(36030),K=i(35454);const H=(0,K.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,K.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"}),Y=(0,K.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),Q=(0,K.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),X=(0,K.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ee=((0,K.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,K.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),te=((0,K.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,K.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,K.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),ie=(0,K.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),re=(0,K.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),oe=(0,K.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}),se=(0,K.w)()({1:"right",2:"left"},{useNumericKeys:!0}),ae=(0,K.w)()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),le=(0,K.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ne=(0,K.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}),pe=(0,K.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}),ue=(0,K.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),de=(0,K.w)()({Kilometers:"kilometers",Miles:"miles"},{ignoreUnknown:!1}),me=(0,K.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ce=(0,K.w)()({Kilometers:"kilometers",Miles:"miles",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ye=(0,K.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}),be=(0,K.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),he=(0,K.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),fe=(0,K.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"});let ve=class extends M.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})],ve.prototype,"dataType",void 0),(0,r._)([(0,z.J)(ce,{ignoreUnknown:!1})],ve.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String]})],ve.prototype,"parameterNames",void 0),(0,r._)([(0,T.Cb)({type:String})],ve.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,z.J)(me,{ignoreUnknown:!1})],ve.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String})],ve.prototype,"trafficSupport",void 0),(0,r._)([(0,T.Cb)({type:String})],ve.prototype,"units",void 0),(0,r._)([(0,z.J)(fe)],ve.prototype,"usageType",void 0),ve=(0,r._)([(0,w.j)("esri.rest.support.NetworkAttribute")],ve);const ge=ve;let Te=class extends M.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})],Te.prototype,"buildTime",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[ge]})],Te.prototype,"networkAttributes",void 0),(0,r._)([(0,T.Cb)()],Te.prototype,"networkSources",void 0),(0,r._)([(0,T.Cb)({type:String})],Te.prototype,"state",void 0),Te=(0,r._)([(0,w.j)("esri.rest.support.NetworkDataset")],Te);const Ce=Te;var Se=i(2368);let we=class extends((0,Se.J)(M.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}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return(0,c.Wi)(i)?null:i.map((e=>ye.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[Object],json:{write:!0}})],we.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],we.prototype,"description",void 0),(0,r._)([(0,z.J)(de,{ignoreUnknown:!1})],we.prototype,"distanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],we.prototype,"id",void 0),(0,r._)([(0,z.J)(ce,{ignoreUnknown:!1})],we.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],we.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{write:!0}})],we.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,S.r)("restrictionAttributeNames")],we.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],we.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,T.Cb)({type:Number,json:{write:{allowNull:!0}}})],we.prototype,"simplificationTolerance",void 0),(0,r._)([(0,z.J)(H)],we.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,z.J)(me,{ignoreUnknown:!1})],we.prototype,"timeAttributeName",void 0),(0,r._)([(0,z.J)(te)],we.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],we.prototype,"useHierarchy",void 0),(0,r._)([(0,z.J)(ee)],we.prototype,"uturnAtJunctions",void 0),we=(0,r._)([(0,w.j)("esri.rest.support.TravelMode")],we);const _e=we;let Ne=class extends M.wq{constructor(e){super(e),this.accumulateAttributeNames=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,c.Wi)(e)?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ce.toJSON(e))))}};(0,r._)([(0,T.Cb)()],Ne.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,S.r)("accumulateAttributeNames")],Ne.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],Ne.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)()],Ne.prototype,"currentVersion",void 0),(0,r._)([(0,T.Cb)()],Ne.prototype,"defaultTravelMode",void 0),(0,r._)([(0,T.Cb)()],Ne.prototype,"directionsLanguage",void 0),(0,r._)([(0,z.J)($)],Ne.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,T.Cb)()],Ne.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,z.J)(me,{ignoreUnknown:!1})],Ne.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)()],Ne.prototype,"hasZ",void 0),(0,r._)([(0,z.J)(ce,{ignoreUnknown:!1})],Ne.prototype,"impedance",void 0),(0,r._)([(0,T.Cb)({type:Ce})],Ne.prototype,"networkDataset",void 0),(0,r._)([(0,T.Cb)({type:[_e]})],Ne.prototype,"supportedTravelModes",void 0),Ne=(0,r._)([(0,w.j)("esri.rest.support.NetworkServiceDescription")],Ne);const Oe=Ne;function Ae(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function De(e,t,i){if(!e)throw new u.Z("network-service:missing-url","Url to Network service is missing");const r=(0,G.lA)({f:"json",token:t},i),{data:o}=await(0,q.default)(e,r);o.supportedTravelModes||(o.supportedTravelModes=[]);for(let e=0;e<o.supportedTravelModes.length;e++)o.supportedTravelModes[e].id||(o.supportedTravelModes[e].id=o.supportedTravelModes[e].itemId);const s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,G.lA)({f:"json",token:t},i),o=(0,g.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,q.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){var i,r;const o=(0,G.lA)({f:"json"},t),{data:s}=await(0,q.default)(e.replace(/\/rest\/.*$/i,"/info"),o);if(!s||!s.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:a}=s,l=(0,g.Qj)(a)+"/sharing/rest/portals/self",{data:n}=await(0,q.default)(l,o),p=(0,b.hS)("helperServices.routingUtilities.url",n);if(!p)return{supportedTravelModes:[],defaultTravelMode:null};const u=(0,G.en)(a),d=/\/solve$/i.test(u.path)?"Route":/\/solveclosestfacility$/i.test(u.path)?"ClosestFacility":"ServiceAreas",m=(0,G.lA)({f:"json",serviceName:d},t),c=(0,g.Qj)(p)+"/GetTravelModes/execute",y=await(0,q.default)(c,m),h=[];let f=null;if(null!=y&&null!=(i=y.data)&&null!=(r=i.results)&&r.length){const e=y.data.results;for(const t of e){var v;if("supportedTravelModes"===t.paramName){if(null!=(v=t.value)&&v.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);h.push(t)}}else"defaultTravelMode"===t.paramName&&(f=t.value)}}return{supportedTravelModes:h,defaultTravelMode:f}}(e,i),{defaultTravelMode:a,supportedTravelModes:l}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=l,Oe.fromJSON(o)}var Ie=i(82526);function Be(e,t){if((0,c.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[ce.fromJSON(r)]=e[o]}return i}function je(e,t,i){if(!(0,c.Wi)(e)){t.attributes||(t.attributes={});for(const r in e){const o=ce.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Fe(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.fromJSON(r)]=e[i]}return t}function xe(e){const t={};for(const i of Object.keys(e)){const r=i;t[ce.toJSON(r)]=e[i]}return t}function Ee(e,t){return(0,c.Wi)(e)||(0,c.Wi)(t)?null:Math.round((e-t)/6e4)}function Le(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 Me=i(74889);const Pe=new K.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Je=class extends M.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Je.prototype,"description",void 0),(0,r._)([(0,T.Cb)({type:String,json:{read:Pe.read,write:Pe.write}})],Je.prototype,"type",void 0),Je=(0,r._)([(0,w.j)("esri.rest.support.GPMessage")],Je);const Re=Je,We=new K.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let Ue=class extends Re{constructor(e){super(e),this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{read:We.read,write:We.write}})],Ue.prototype,"type",void 0),Ue=(0,r._)([(0,w.j)("esri.rest.support.NAMessage")],Ue);const ke=Ue;let Ze=class extends a.Z{};(0,r._)([(0,T.Cb)()],Ze.prototype,"events",void 0),(0,r._)([(0,T.Cb)()],Ze.prototype,"strings",void 0),Ze=(0,r._)([(0,w.j)("esri.rest.support.DirectionsFeature")],Ze);const Ve=Ze;var qe=i(82971),Ge=i(58901),ze=i(13473);let Ke=class extends Me.default{constructor(e){super(e),this.extent=null,this.features=null,this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){var i;if(!e)return[];const r=null!=(i=t.summary.envelope.spatialReference)?i:t.spatialReference,o=r&&qe.Z.fromJSON(r);return e.map((e=>{var t,i;const r=this._decompressGeometry(e.compressedGeometry),s=new Ge.Z({...r,spatialReference:o}),a=null!=(t=null==(i=e.events)?void 0:i.map((e=>{const{arriveTimeUTC:t,ETA:i,point:{x:r,y:s,z:a},strings:l}=e;return new Ve({geometry:new ze.Z({x:r,y:s,z:a,hasZ:void 0!==a,spatialReference:o}),attributes:{ETA:i,arriveTimeUTC:t},strings:l})})))?t:[];return new Ve({attributes:e.attributes,events:a,geometry:s,strings:e.strings})}))}get mergedGeometry(){if(!this.features)return null;const e=this.features.map((({geometry:e})=>(0,c.Wg)(e))),t=this.get("extent.spatialReference");return this._mergePolylinesToSinglePath(e,t)}get strings(){return this.features.map((({strings:e})=>e))}_decompressGeometry(e){let t=0,i=0,r=0,o=0;const s=[];let a,l,n,p,u,d,m,c,y=0,b=0,h=0;if(u=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),u||(u=[]),0===parseInt(u[y],32)){y=2;const e=parseInt(u[y],32);y++,d=parseInt(u[y],32),y++,1&e&&(b=u.indexOf("|")+1,m=parseInt(u[b],32),b++),2&e&&(h=u.indexOf("|",b)+1,c=parseInt(u[h],32),h++)}else d=parseInt(u[y],32),y++;for(;y<u.length&&"|"!==u[y];){a=parseInt(u[y],32)+t,y++,t=a,l=parseInt(u[y],32)+i,y++,i=l;const e=[a/d,l/d];b&&(p=parseInt(u[b],32)+r,b++,r=p,e.push(p/m)),h&&(n=parseInt(u[h],32)+o,h++,o=n,e.push(n/c)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}_mergePolylinesToSinglePath(e,t){if(0===e.length)return new Ge.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 Ge.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}};(0,r._)([(0,T.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],Ke.prototype,"extent",void 0),(0,r._)([(0,T.Cb)()],Ke.prototype,"features",void 0),(0,r._)([(0,S.r)("features")],Ke.prototype,"readFeatures",null),(0,r._)([(0,T.Cb)()],Ke.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],Ke.prototype,"mergedGeometry",null),(0,r._)([(0,T.Cb)()],Ke.prototype,"routeId",void 0),(0,r._)([(0,T.Cb)()],Ke.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({value:null,readOnly:!0})],Ke.prototype,"strings",null),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],Ke.prototype,"totalDriveTime",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalLength"}}})],Ke.prototype,"totalLength",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalTime"}}})],Ke.prototype,"totalTime",void 0),Ke=(0,r._)([(0,w.j)("esri.rest.support.DirectionsFeatureSet")],Ke);const He=Ke;let $e=class extends M.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:Me.default,json:{write:!0}})],$e.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({type:Me.default,json:{write:!0}})],$e.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({type:He,json:{write:!0}})],$e.prototype,"directions",void 0),(0,r._)([(0,T.Cb)({type:a.Z,json:{write:!0}})],$e.prototype,"route",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],$e.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({type:[a.Z],json:{write:!0}})],$e.prototype,"stops",void 0),(0,r._)([(0,T.Cb)({type:Me.default,json:{write:!0}})],$e.prototype,"traversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Me.default,json:{write:!0}})],$e.prototype,"traversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Me.default,json:{write:!0}})],$e.prototype,"traversedTurns",void 0),$e=(0,r._)([(0,w.j)("esri.rest.support.RouteResult")],$e);const Ye=$e;function Qe(e){return e&&Me.default.fromJSON(e).features.map((e=>e))}let Xe=class extends M.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return Qe(t.barriers)}readPolylineBarriers(e){return Qe(e)}readPolygonBarriers(e){return Qe(e)}};(0,r._)([(0,T.Cb)({type:[ke]})],Xe.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({type:[a.Z]})],Xe.prototype,"pointBarriers",void 0),(0,r._)([(0,S.r)("pointBarriers",["barriers"])],Xe.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],Xe.prototype,"polylineBarriers",void 0),(0,r._)([(0,S.r)("polylineBarriers")],Xe.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],Xe.prototype,"polygonBarriers",void 0),(0,r._)([(0,S.r)("polygonBarriers")],Xe.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({type:[Ye]})],Xe.prototype,"routeResults",void 0),Xe=(0,r._)([(0,w.j)("esri.rest.support.RouteSolveResult")],Xe);const et=Xe;function tt(e){return"esri.rest.support.FeatureSet"===(null==e?void 0:e.declaredClass)}var it,rt=i(21878);let ot=it=class extends((0,Se.J)(M.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}static fromGraphic(e){var t,i;return new it({directionLineType:pe.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:null!=(t=e.attributes.FromLevel)?t:null,geometry:e.geometry,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null,toLevel:null!=(i=e.attributes.ToLevel)?i:null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),DirectionLineType:(0,c.pC)(this.directionLineType)?pe.toJSON(this.directionLineType):null,DirectionPointID:(0,c.Wg)(this.directionPointId),Meters:(0,c.Wg)(this.distance),Minutes:(0,c.Wg)(this.duration)};return(0,c.pC)(this.fromLevel)&&(e.FromLevel=this.fromLevel),(0,c.pC)(this.toLevel)&&(e.ToLevel=this.toLevel),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ot.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}],ot.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:pe.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:pe.read}}})],ot.prototype,"directionLineType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],ot.prototype,"directionPointId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Meters"}}})],ot.prototype,"distance",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Minutes"}}})],ot.prototype,"duration",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FromLevel"}}})],ot.prototype,"fromLevel",void 0),(0,r._)([(0,T.Cb)({type:Ge.Z})],ot.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],ot.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],ot.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],ot.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ToLevel"}}})],ot.prototype,"toLevel",void 0),ot=it=(0,r._)([(0,w.j)("esri.rest.support.DirectionLine")],ot);const st=ot;var at;let lt=at=class extends((0,Se.J)(M.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.voiceInstruction=null}readArrivalTime(e,t){return(0,c.pC)(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){var t,i,r,o,s,a,l,n,p,u,d,m,y;return new at({alternateName:null!=(t=e.attributes.AlternateName)?t:null,arrivalTime:(0,c.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:null!=(i=e.attributes.ArrivalUTCOffset)?i:null,azimuth:null!=(r=e.attributes.Azimuth)?r:null,branchName:null!=(o=e.attributes.BranchName)?o:null,directionPointType:ne.fromJSON(e.attributes.DirectionPointType),displayText:null!=(s=e.attributes.DisplayText)?s:null,exitName:null!=(a=e.attributes.ExitName)?a:null,geometry:e.geometry,intersectingName:null!=(l=e.attributes.IntersectingName)?l:null,level:null!=(n=e.attributes.Level)?n:null,name:null!=(p=e.attributes.Name)?p:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:null!=(u=e.attributes.ShortVoiceInstruction)?u:null,stopId:null!=(d=e.attributes.StopID)?d:null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null,towardName:null!=(m=e.attributes.TowardName)?m:null,voiceInstruction:null!=(y=e.attributes.VoiceInstruction)?y:null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),DirectionPointType:(0,c.pC)(this.directionPointType)?ne.toJSON(this.directionPointType):null,Sequence:(0,c.Wg)(this.sequence),StopID:this.stopId};return(0,c.pC)(this.alternateName)&&(e.AlternateName=this.alternateName),(0,c.pC)(this.arrivalTime)&&(e.ArrivalTime=this.arrivalTime.getTime()),(0,c.pC)(this.arrivalTimeOffset)&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),(0,c.pC)(this.azimuth)&&(e.Azimuth=this.azimuth),(0,c.pC)(this.branchName)&&(e.BranchName=this.branchName),(0,c.pC)(this.displayText)&&(e.DisplayText=this.displayText),(0,c.pC)(this.exitName)&&(e.ExitName=this.exitName),(0,c.pC)(this.intersectingName)&&(e.IntersectingName=this.intersectingName),(0,c.pC)(this.level)&&(e.Level=this.level),(0,c.pC)(this.name)&&(e.Name=this.name),(0,c.pC)(this.shortVoiceInstruction)&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),(0,c.pC)(this.towardName)&&(e.TowardName=this.towardName),(0,c.pC)(this.voiceInstruction)&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};lt.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}],lt.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)({json:{read:!1}})],lt.prototype,"alternateName",void 0),(0,r._)([(0,T.Cb)()],lt.prototype,"arrivalTime",void 0),(0,r._)([(0,S.r)("arrivalTime",["attributes.ArrivalTime"])],lt.prototype,"readArrivalTime",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],lt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Azimuth"}}})],lt.prototype,"azimuth",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.BranchName"}}})],lt.prototype,"branchName",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ne.read}}})],lt.prototype,"directionPointType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DisplayText"}}})],lt.prototype,"displayText",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ExitName"}}})],lt.prototype,"exitName",void 0),(0,r._)([(0,T.Cb)({type:ze.Z})],lt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"intersectingName",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"level",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],lt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],lt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],lt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Sequence"}}})],lt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopID"}}})],lt.prototype,"stopId",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],lt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.TowardName"}}})],lt.prototype,"towardName",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],lt.prototype,"voiceInstruction",void 0),lt=at=(0,r._)([(0,w.j)("esri.rest.support.DirectionPoint")],lt);const nt=lt;var pt;let ut=pt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null}readCosts(e,t){return Be(t.attributes,"Attr_")}writeCosts(e,t){je(e,t,"Attr_")}static fromGraphic(e){var t,i;return new pt({addedCost:null!=(t=e.attributes.AddedCost)?t:null,barrierType:(0,c.pC)(e.attributes.BarrierType)?ae.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?Fe(JSON.parse(e.attributes.Costs)):null,curbApproach:(0,c.pC)(e.attributes.CurbApproach)?ie.fromJSON(e.attributes.CurbApproach):null,fullEdge:(0,c.pC)(e.attributes.FullEdge)?le.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:null!=(i=e.attributes.Name)?i:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:(0,c.pC)(e.attributes.Status)?oe.fromJSON(e.attributes.Status):null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),AddedCost:this.addedCost,BarrierType:(0,c.pC)(this.barrierType)?ae.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(xe(this.costs)):null,CurbApproach:(0,c.pC)(this.curbApproach)?ie.toJSON(this.curbApproach):null,FullEdge:(0,c.pC)(this.fullEdge)?le.toJSON(this.fullEdge):null,Name:this.name,Status:(0,c.pC)(this.status)?oe.toJSON(this.status):null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ut.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAIntYesNo",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}}],ut.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],ut.prototype,"addedCost",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{name:"attributes.BarrierType",read:{reader:ae.read},write:{writer:ae.write}}})],ut.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],ut.prototype,"costs",void 0),(0,r._)([(0,S.r)("costs",["attributes"])],ut.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],ut.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:ie.apiValues,json:{read:{source:"attributes.CurbApproach",reader:ie.read}}})],ut.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:le.apiValues,json:{name:"attributes.FullEdge",read:{reader:le.read},write:{writer:le.write}}})],ut.prototype,"fullEdge",void 0),(0,r._)([(0,T.Cb)({type:ze.Z,json:{write:!0}})],ut.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],ut.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],ut.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],ut.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({type:se.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:se.read}}})],ut.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],ut.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],ut.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.Status",reader:oe.read}}})],ut.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],ut.prototype,"symbol",void 0),ut=pt=(0,r._)([(0,w.j)("esri.rest.support.PointBarrier")],ut);const dt=ut;var mt,ct=i(38913);let yt=mt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return Be(t.attributes,"Attr_")}writeCosts(e,t){je(e,t,"Attr_")}static fromGraphic(e){var t,i;return new mt({barrierType:(0,c.pC)(e.attributes.BarrierType)?ae.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?Fe(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:null!=(t=e.attributes.Name)?t:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:null!=(i=e.attributes.ScaleFactor)?i:null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null})}toGraphic(){var e,t;const i={__OBJECTID:(0,c.Wg)(this.objectId),BarrierType:(0,c.pC)(this.barrierType)?ae.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(xe(this.costs)):null,Name:null!=(e=this.name)?e:null,ScaleFactor:null!=(t=this.scaleFactor)?t:null};return new a.Z({geometry:this.geometry,attributes:i,symbol:this.symbol,popupTemplate:this.popupTemplate})}};yt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],yt.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{name:"attributes.BarrierType",read:{reader:ae.read},write:{writer:ae.write}}})],yt.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"costs",void 0),(0,r._)([(0,S.r)("costs",["attributes"])],yt.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],yt.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:ct.Z,json:{write:!0}})],yt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],yt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],yt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],yt.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],yt.prototype,"symbol",void 0),yt=mt=(0,r._)([(0,w.j)("esri.rest.support.PolygonBarrier")],yt);const bt=yt;var ht;let ft=ht=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return Be(t.attributes,"Attr_")}static fromGraphic(e){var t,i;return new ht({barrierType:(0,c.pC)(e.attributes.BarrierType)?ae.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?Fe(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:null!=(t=e.attributes.Name)?t:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:null!=(i=e.attributes.ScaleFactor)?i:null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),BarrierType:(0,c.pC)(this.barrierType)?ae.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(xe(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ft.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],ft.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.BarrierType",reader:ae.read}}})],ft.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],ft.prototype,"costs",void 0),(0,r._)([(0,S.r)("costs",["attributes"])],ft.prototype,"readCosts",null),(0,r._)([(0,T.Cb)({type:Ge.Z,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],ft.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],ft.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],ft.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],ft.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],ft.prototype,"symbol",void 0),ft=ht=(0,r._)([(0,w.j)("esri.rest.support.PolylineBarrier")],ft);const vt=ft;let gt=class extends M.wq{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return(0,c.Wi)(e)?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ce.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],gt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,S.r)("accumulateAttributes")],gt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],gt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],gt.prototype,"directionsLanguage",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:_e,json:{write:!0}})],gt.prototype,"travelMode",void 0),gt=(0,r._)([(0,w.j)("esri.layers.support.RouteSettings")],gt);const Tt=gt;var Ct;let St=Ct=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.version="1.0.0"}readEndTime(e,t){return(0,c.pC)(t.attributes.EndTimeUTC)?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Ee(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return(0,c.pC)(t.attributes.StartTimeUTC)?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Ee(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Be(t.attributes,"Total_")}readTotalViolations(e,t){return Be(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Be(t.attributes,"TotalWait_")}static fromGraphic(e){var t,i,r,o,s,a;return new Ct({analysisSettings:(0,c.pC)(e.attributes.AnalysisSettings)?Tt.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:(0,c.pC)(e.attributes.EndTime)?new Date(e.attributes.EndTime):null,endTimeOffset:null!=(t=e.attributes.EndUTCOffset)?t:null,geometry:e.geometry,messages:(0,c.pC)(e.attributes.Messages)?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:(0,c.pC)(e.attributes.StartTime)?new Date(e.attributes.StartTime):null,startTimeOffset:null!=(i=e.attributes.StartUTCOffset)?i:null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null,totalCosts:(0,c.pC)(e.attributes.TotalCosts)?Fe(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:null!=(r=e.attributes.TotalMeters)?r:null,totalDuration:null!=(o=e.attributes.TotalMinutes)?o:null,totalLateDuration:null!=(s=e.attributes.TotalLateMinutes)?s:null,totalWaitDuration:null!=(a=e.attributes.TotalWaitMinutes)?a:null,version:e.attributes.Version})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),AnalysisSettings:(0,c.pC)(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:(0,c.pC)(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:(0,c.pC)(this.messages)?JSON.stringify(this.messages):null,RouteName:(0,c.Wg)(this.name),StartTime:(0,c.pC)(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:(0,c.pC)(this.totalCosts)?JSON.stringify(xe(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:(0,c.Wg)(this.version)};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};St.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],St.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"analysisSettings",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"endTime",void 0),(0,r._)([(0,S.r)("endTime",["attributes.EndTimeUTC"])],St.prototype,"readEndTime",null),(0,r._)([(0,T.Cb)()],St.prototype,"endTimeOffset",void 0),(0,r._)([(0,S.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],St.prototype,"readEndTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],St.prototype,"firstStopId",void 0),(0,r._)([(0,T.Cb)({type:Ge.Z})],St.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.LastStopID"}}})],St.prototype,"lastStopId",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],St.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],St.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],St.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"startTime",void 0),(0,r._)([(0,S.r)("startTime",["attributes.StartTimeUTC"])],St.prototype,"readStartTime",null),(0,r._)([(0,T.Cb)()],St.prototype,"startTimeOffset",void 0),(0,r._)([(0,S.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],St.prototype,"readStartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopCount"}}})],St.prototype,"stopCount",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],St.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"totalCosts",void 0),(0,r._)([(0,S.r)("totalCosts",["attributes"])],St.prototype,"readTotalCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalDuration",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalLateDuration",void 0),(0,r._)([(0,T.Cb)()],St.prototype,"totalViolations",void 0),(0,r._)([(0,S.r)("totalViolations",["attributes"])],St.prototype,"readTotalViolations",null),(0,r._)([(0,T.Cb)()],St.prototype,"totalWait",void 0),(0,r._)([(0,S.r)("totalWait",["attributes"])],St.prototype,"readTotalWait",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"totalWaitDuration",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],St.prototype,"version",void 0),St=Ct=(0,r._)([(0,w.j)("esri.rest.support.RouteInfo")],St);const wt=St,_t={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Nt=i(33955);let Ot=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({types:s.qM,json:{read:Nt.im,write:!0}})],Ot.prototype,"geometry",void 0),(0,r._)([(0,z.J)(he)],Ot.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({type:String,json:{name:"layerName",write:!0}})],Ot.prototype,"name",void 0),(0,r._)([(0,z.J)(be,{name:"spatialRel"})],Ot.prototype,"spatialRelationship",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ot.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ot.prototype,"where",void 0),Ot=(0,r._)([(0,w.j)("esri.rest.support.DataLayer")],Ot);const At=Ot;var Dt;let It=Dt=class extends Me.default{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Dt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],It.prototype,"doNotLocateOnRestrictedElements",void 0),It=Dt=(0,r._)([(0,w.j)("esri.rest.support.NetworkFeatureSet")],It);const Bt=It;let jt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],jt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],jt.prototype,"url",void 0),jt=(0,r._)([(0,w.j)("esri.rest.support.NetworkUrl")],jt);const Ft=jt;var xt;function Et(e,t,i){(0,c.pC)(e)&&(t[i]=p.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}let Lt=xt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,C.TJ)(xt,e)}readAccumulateAttributes(e){return(0,c.Wi)(e)?null:e.map((e=>ce.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ce.toJSON(e))))}writePointBarriers(e,t,i){Et(e,t,i)}writePolygonBarrier(e,t,i){Et(e,t,i)}writePolylineBarrier(e,t,i){Et(e,t,i)}readRestrictionAttributes(e){return(0,c.Wi)(e)?null:e.map((e=>ye.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,c.Wi)(e)&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return(0,c.Wi)(i)?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){(0,c.Wi)(e)||(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?At.fromJSON(e):function(e){return e&&"url"in e}(e)?Ft.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Bt.fromJSON(e):function(e){return e&&"features"in e}(e)?Me.default.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Et(e,t,i)}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Lt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,S.r)("accumulateAttributes")],Lt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Lt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)(_t)],Lt.prototype,"apiKey",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Lt.prototype,"directionsLanguage",void 0),(0,r._)([(0,z.J)($)],Lt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,z.J)(Q)],Lt.prototype,"directionsOutputType",void 0),(0,r._)([(0,z.J)(ue)],Lt.prototype,"directionsStyleName",void 0),(0,r._)([(0,z.J)(me,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Lt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Lt.prototype,"geometryPrecision",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Lt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Lt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,z.J)(ce,{name:"impedanceAttributeName",ignoreUnknown:!1})],Lt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Lt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,z.J)(H)],Lt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,z.J)(X)],Lt.prototype,"outputLines",void 0),(0,r._)([(0,T.Cb)({type:qe.Z,json:{name:"outSR",write:!0}})],Lt.prototype,"outSpatialReference",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"overrides",void 0),(0,r._)([(0,T.Cb)({json:{name:"barriers",write:!0}})],Lt.prototype,"pointBarriers",void 0),(0,r._)([(0,_.c)("pointBarriers")],Lt.prototype,"writePointBarriers",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"polygonBarriers",void 0),(0,r._)([(0,_.c)("polygonBarriers")],Lt.prototype,"writePolygonBarrier",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"polylineBarriers",void 0),(0,r._)([(0,_.c)("polylineBarriers")],Lt.prototype,"writePolylineBarrier",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"preserveObjectID",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Lt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,S.r)("restrictionAttributes")],Lt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributes")],Lt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,z.J)(ee)],Lt.prototype,"restrictUTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnDirections",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnRoutes",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnStops",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"returnZ",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{type:Number,write:!0}})],Lt.prototype,"startTime",void 0),(0,r._)([(0,S.r)("startTime")],Lt.prototype,"readStartTime",null),(0,r._)([(0,_.c)("startTime")],Lt.prototype,"writeStartTime",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Lt.prototype,"stops",void 0),(0,r._)([(0,S.r)("stops")],Lt.prototype,"readStops",null),(0,r._)([(0,_.c)("stops")],Lt.prototype,"writeStops",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:_e,json:{write:!0}})],Lt.prototype,"travelMode",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"useHierarchy",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Lt.prototype,"useTimeWindows",void 0),Lt=xt=(0,r._)([(0,w.j)("esri.rest.support.RouteParameters")],Lt);const Mt=Lt;var Pt;let Jt=Pt=class extends((0,Se.J)(M.wq)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Ee(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Be(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Ee(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Be(t.attributes,"Attr_")}writeServiceCosts(e,t){je(e,t,"Attr_")}writeTimeWindowEnd(e,t){(0,c.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){(0,c.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Be(t.attributes,"Violation_")}readWait(e,t){return Be(t.attributes,"Wait_")}static fromGraphic(e){var t,i,r,o,s,a,l,n,p,u;return new Pt({arriveCurbApproach:(0,c.pC)(e.attributes.ArrivalCurbApproach)?ie.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:(0,c.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:(0,c.pC)(e.attributes.CumulativeCosts)?Fe(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:null!=(t=e.attributes.CumulativeMeters)?t:null,cumulativeDuration:null!=(i=e.attributes.CumulativeMinutes)?i:null,curbApproach:(0,c.pC)(e.attributes.CurbApproach)?ie.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:(0,c.pC)(e.attributes.DepartureCurbApproach)?ie.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:(0,c.pC)(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:null!=(r=e.attributes.DepartureUTCOffset)?r:null,geometry:e.geometry,lateDuration:null!=(o=e.attributes.LateMinutes)?o:null,locationType:(0,c.pC)(e.attributes.LocationType)?re.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:null!=(s=e.attributes.Sequence)?s:null,serviceCosts:(0,c.pC)(e.attributes.ServiceCosts)?Fe(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:null!=(a=e.attributes.ServiceMeters)?a:null,serviceDuration:null!=(l=e.attributes.ServiceMinutes)?l:null,status:(0,c.pC)(e.attributes.Status)?oe.fromJSON(e.attributes.Status):null,symbol:(0,c.pC)(e.symbol)?(0,rt.im)(e.symbol):null,timeWindowEnd:(0,c.pC)(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:null!=(n=e.attributes.TimeWindowEndUTCOffset)?n:null,timeWindowStart:(0,c.pC)(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:null!=(p=e.attributes.TimeWindowStartUTCOffset)?p:null,waitDuration:null!=(u=e.attributes.WaitMinutes)?u:null})}toGraphic(){var e,t;const i={__OBJECTID:(0,c.Wg)(this.objectId),ArrivalCurbApproach:(0,c.pC)(this.arriveCurbApproach)?ie.toJSON(this.arriveCurbApproach):null,ArrivalTime:(0,c.pC)(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:(0,c.pC)(this.cumulativeCosts)?JSON.stringify(xe(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:(0,c.pC)(this.curbApproach)?ie.toJSON(this.curbApproach):null,DepartureCurbApproach:(0,c.pC)(this.departCurbApproach)?ie.toJSON(this.departCurbApproach):null,DepartureTime:(0,c.pC)(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:(0,c.pC)(this.locationType)?re.toJSON(this.locationType):null,Name:(0,c.Wg)(this.name),RouteName:(0,c.Wg)(this.routeName),Sequence:this.sequence,ServiceCosts:(0,c.pC)(this.serviceCosts)?JSON.stringify(xe(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:(0,c.pC)(this.status)?oe.toJSON(this.status):null,TimeWindowEnd:(0,c.pC)(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:null!=(e=this.timeWindowEndOffset)?e:this.arriveTimeOffset,TimeWindowStart:(0,c.pC)(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:null!=(t=this.timeWindowEndOffset)?t:this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new a.Z({geometry:this.geometry,attributes:i,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Jt.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],Jt.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:ie.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:ie.read}}})],Jt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],Jt.prototype,"arriveTime",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,S.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],Jt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,T.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],Jt.prototype,"bearing",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],Jt.prototype,"bearingTol",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,S.r)("cumulativeCosts",["attributes"])],Jt.prototype,"readCumulativeCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,T.Cb)({type:ie.apiValues,json:{name:"attributes.CurbApproach",read:{reader:ie.read},write:{writer:ie.write}}})],Jt.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:ie.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:ie.read}}})],Jt.prototype,"departCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],Jt.prototype,"departTime",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"departTimeOffset",void 0),(0,r._)([(0,S.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],Jt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],Jt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,T.Cb)({type:ze.Z,json:{write:!0}})],Jt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.LateMinutes",read:!1}})],Jt.prototype,"lateDuration",void 0),(0,r._)([(0,T.Cb)({type:re.apiValues,json:{name:"attributes.LocationType",read:{reader:re.read},write:{writer:re.write}}})],Jt.prototype,"locationType",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],Jt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.NavLatency"}}})],Jt.prototype,"navLatency",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],Jt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:l.Z,json:{read:!1}})],Jt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.PosAlong"}}})],Jt.prototype,"posAlong",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.RouteName"}})],Jt.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"serviceCosts",void 0),(0,r._)([(0,S.r)("serviceCosts",["attributes"])],Jt.prototype,"readServiceCosts",null),(0,r._)([(0,_.c)("serviceCosts")],Jt.prototype,"writeServiceCosts",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"serviceDistance",void 0),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"serviceDuration",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Sequence"}})],Jt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({type:se.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:se.read}}})],Jt.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapX"}}})],Jt.prototype,"snapX",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapY"}}})],Jt.prototype,"snapY",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapZ"}}})],Jt.prototype,"snapZ",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],Jt.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],Jt.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.Status",reader:oe.read}}})],Jt.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB,json:{read:!1}})],Jt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],Jt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,_.c)("timeWindowEnd")],Jt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],Jt.prototype,"timeWindowStart",void 0),(0,r._)([(0,_.c)("timeWindowStart")],Jt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"violations",void 0),(0,r._)([(0,S.r)("violations",["attributes"])],Jt.prototype,"readViolations",null),(0,r._)([(0,T.Cb)({json:{read:!1}})],Jt.prototype,"waitDuration",void 0),(0,r._)([(0,T.Cb)()],Jt.prototype,"wait",void 0),(0,r._)([(0,S.r)("wait",["attributes"])],Jt.prototype,"readWait",null),Jt=Pt=(0,r._)([(0,w.j)("esri.rest.support.Stop")],Jt);const Rt=Jt;var Wt=i(65091);function Ut(e){return e.length?e:null}function kt(e){const{defaultTravelMode:t,supportedTravelModes:i}=e;return i.find((e=>e.id===t))}function Zt(e){return"layers"in e}async function Vt(e){const t=qe.Z.WGS84;return await(0,A.iQ)(e.spatialReference,t),(0,A.iV)(e,t)}function qt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Gt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,v.En)(e,t,"meters")}function zt(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}const Kt=p.Z.ofType(st),Ht=p.Z.ofType(nt),$t=p.Z.ofType(dt),Yt=p.Z.ofType(bt),Qt=p.Z.ofType(vt),Xt=p.Z.ofType(Rt),ei=m.Z.getLogger("esri.layers.RouteLayer");let ti=class extends((0,B.h)((0,x.M)((0,j.q)((0,F.I)((0,y.R)((0,d.p)(I.Z))))))){constructor(...e){super(...e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new U,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new $t,this.polygonBarriers=new Yt,this.polylineBarriers=new Qt,this.routeInfo=null,this.spatialReference=qe.Z.WGS84,this.stops=new Xt,this.type="route",this.handles.add((0,f.YP)((()=>this.stops.toArray()),(()=>{(0,c.Wi)(this.routeInfo)&&this._setStopSymbol(this.stops)}),{sync:!0}))}writeFeatureCollectionWebmap(e,t,i,r){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),a="web-map"===r.origin?"featureCollection.layers":"layers";(0,b.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>st.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>nt.fromGraphic(e)))}get fullExtent(){if((0,c.pC)(this.routeInfo)&&(0,c.pC)(this.routeInfo.geometry))return this.routeInfo.geometry.extent;const e=new O.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:qe.Z.WGS84}),t=this.stops.filter((e=>(0,c.pC)(e.geometry)));if(t.length<2)return e;const{spatialReference:i}=t.getItemAt(0).geometry;if((0,c.Wi)(i))return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new Wt.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){var i;const r=(Zt(t)?t.layers:t.featureCollection.layers).find((e=>(0,c.pC)(e.layerDefinition.maxScale)));return null!=(i=null==r?void 0:r.layerDefinition.maxScale)?i:0}readMinScale(e,t){var i;const r=(Zt(t)?t.layers:t.featureCollection.layers).find((e=>(0,c.pC)(e.layerDefinition.minScale)));return null!=(i=null==r?void 0:r.layerDefinition.minScale)?i:0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>dt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>bt.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>vt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>wt.fromGraphic(e)));return i.length>0?i.getItemAt(0):null}readSpatialReference(e,t){var i,r;const o=Zt(t)?t.layers:t.featureCollection.layers;if(!o.length)return qe.Z.WGS84;const{layerDefinition:s}=o[0],a=null!=(i=null!=(r=s.spatialReference)?r:s.extent.spatialReference)?i:D.Zn;return qe.Z.fromJSON(a)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>Rt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return(0,c.pC)(this.routeInfo)&&(0,c.pC)(this.routeInfo.name)?this.routeInfo.name:"Route"}set title(e){e?this._override("title",e):this._clearOverride("title")}get url(){return o.Z.routeServiceUrl}set url(e){null!=e?this._set("url",(0,E.Nm)(e,ei)):this._set("url",o.Z.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){(0,c.pC)(this.directionLines)&&(this.directionLines.removeAll(),this._set("directionLines",null)),(0,c.pC)(this.directionPoints)&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),(0,c.pC)(this.routeInfo)&&this._set("routeInfo",null),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new u.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if((0,c.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;if(await i._signIn(),i.user||await t.reload(),i.user.username!==t.owner)throw new u.Z("routelayer:not-portal-item-owner","You can only overwrite your portal items");const{itemUrl:r}=t,o={messages:[],origin:"portal-item",portal:i,url:r&&(0,g.mN)(r),writtenProperties:[]},s=this.write(null,o);return t.extent=await Vt(e),t.title=this.title,await t.update({data:s}),t}async saveAs(e,t={}){if(await this.load(),(0,c.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=Z.default.from(e).clone();null!=i.extent||(i.extent=await Vt(this.fullExtent)),i.id=null,null!=i.portal||(i.portal=k.Z.getDefault()),null!=i.title||(i.title=this.title),i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",V.Kz.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r._signIn();const s=null==t?void 0:t.folder,a=this.write(null,o);return await r.user.addItem({item:i,folder:s,data:a}),this.portalItem=i,(0,N.D)(o),o.portalItem=i,i}async solve(e,t){var i,r,o,s,a;const l=null!=(i=null==e?void 0:e.stops)?i:this.stops,n=null!=(r=null==e?void 0:e.pointBarriers)?r:Ut(this.pointBarriers),d=null!=(o=null==e?void 0:e.polylineBarriers)?o:Ut(this.polylineBarriers),m=null!=(s=null==e?void 0:e.polygonBarriers)?s:Ut(this.polygonBarriers);if((0,c.Wi)(l))throw new u.Z("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(l)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(l))&&l.features.length<2||p.Z.isCollection(l)&&l.length<2)throw new u.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");const y=null==e?void 0:e.apiKey,b=this.url,f=await this._getServiceDescription(b,y,t),v=kt(f),g=null!=(a=null==e?void 0:e.travelMode)?a:v,T=(0,c.yl)(null==e?void 0:e.accumulateAttributes,[]);(0,c.pC)(g)&&T.push(g.distanceAttributeName);const C={startTime:new Date},S={accumulateAttributes:T,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:n,polylineBarriers:d,polygonBarriers:m,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!n,returnDirections:!0,returnPolygonBarriers:!!m,returnPolylineBarriers:!!d,returnRoutes:!0,returnStops:!0,stops:l},w=e?Mt.from(e):new Mt;for(const e in C)null==w[e]&&(w[e]=C[e]);let _;w.set(S);try{_=await async function(e,t,i){const r=[],o=[],s={},a={},l=(0,G.en)(e),{path:n}=l;tt(t.stops)&&Ae(t.stops.features,o,"stops.features",s),tt(t.pointBarriers)&&Ae(t.pointBarriers.features,o,"pointBarriers.features",s),tt(t.polylineBarriers)&&Ae(t.polylineBarriers.features,o,"polylineBarriers.features",s),tt(t.polygonBarriers)&&Ae(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,Ie.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=p.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if((0,c.pC)(e)&&e.hasZ)return!0}return!1}(a,r)){let e=null;try{e=await De(n,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}console.log("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const u={...i,query:{...l.query,...Le(t),f:"json"}},d=n.endsWith("/solve")?n:`${n}/solve`,{data:m}=await(0,q.default)(d,u);return function(e){var t;const{barriers:i,directionLines:r,directionPoints:o,directions:s,messages:a,polygonBarriers:l,polylineBarriers:n,routes:p,stops:u,traversedEdges:d,traversedJunctions:m,traversedTurns:y}=e,b=e=>{const t=f.find((t=>t.routeName===e));if((0,c.pC)(t))return t;const i={routeId:f.length+1,routeName:e};return f.push(i),i},h=e=>{const t=f.find((t=>t.routeId===e));if((0,c.pC)(t))return t;const i={routeId:e,routeName:null};return f.push(i),i},f=[];null==p||p.features.forEach(((e,t)=>{e.geometry.spatialReference=p.spatialReference;const i=e.attributes.Name,r=t+1;f.push({routeId:r,routeName:i,route:e})})),null==s||s.forEach((e=>{const{routeName:t}=e;b(t).directions=e}));const v=null!=(t=null==u?void 0:u.features.every((e=>(0,c.Wi)(e.attributes.RouteName))))&&t&&f.length>0?f[0].routeName:null;return null==u||u.features.forEach((e=>{e.geometry.spatialReference=u.spatialReference;const t=null!=v?v:e.attributes.RouteName,i=b(t);null!=i.stops||(i.stops=[]),i.stops.push(e)})),null==r||r.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t),{geometryType:o,spatialReference:s}=r;null!=i.directionLines||(i.directionLines={features:[],geometryType:o,spatialReference:s}),i.directionLines.features.push(e)})),null==o||o.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t),{geometryType:r,spatialReference:s}=o;null!=i.directionPoints||(i.directionPoints={features:[],geometryType:r,spatialReference:s}),i.directionPoints.features.push(e)})),null==d||d.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t),{geometryType:r,spatialReference:o}=d;null!=i.traversedEdges||(i.traversedEdges={features:[],geometryType:r,spatialReference:o}),i.traversedEdges.features.push(e)})),null==m||m.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t),{geometryType:r,spatialReference:o}=m;null!=i.traversedJunctions||(i.traversedJunctions={features:[],geometryType:r,spatialReference:o}),i.traversedJunctions.features.push(e)})),null==y||y.features.forEach((e=>{const t=e.attributes.RouteID,i=h(t);null!=i.traversedTurns||(i.traversedTurns={features:[]}),i.traversedTurns.features.push(e)})),et.fromJSON({routeResults:f,barriers:i,polygonBarriers:l,polylineBarriers:n,messages:a})}(m)}(b,w,t)}catch(e){throw(0,h.D_)(e)?e:new u.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const N=this._toRouteLayerSolution(_);return this._isOverridden("title")||(this.title=(0,c.yl)(N.routeInfo.name,"Route")),function(e,t,i){var r,o,s,a,l,n,p,d,m,y,b;const h=t.networkDataset.networkAttributes.filter((e=>"cost"===e.usageType)),f=kt(t),v=null!=(r=i.travelMode)?r:f;if((0,c.Wi)(v))return void ei.warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:g,distanceAttributeName:T}=v,C=h.find((e=>e.name===g)),S=h.find((e=>e.name===T)),w=null!=(o=null!=(s=null==(a=(0,c.Wg)(i.travelMode))?void 0:a.impedanceAttributeName)?s:(0,c.Wg)(i.impedanceAttribute))?o:t.impedance,_=Y.fromJSON(null==C?void 0:C.units),N=$.fromJSON(null==S?void 0:S.units);if(!_||!N)throw new u.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const O=null!=(l=i.directionsLanguage)?l:t.directionsLanguage,A=null!=(n=null!=(p=(0,c.Wg)(i.accumulateAttributes))?p:t.accumulateAttributeNames)?n:[],D=new Set(h.filter((({name:e})=>e===g||e===T||e===w||A.includes(e))).map((({name:e})=>e))),I=e=>{for(const t in e)D.has(t)||delete e[t]};for(const t of e.pointBarriers){var B;(0,c.pC)(t.costs)&&(t.addedCost=null!=(B=t.costs[w])?B:0,I(t.costs))}for(const t of e.polygonBarriers){var j;(0,c.pC)(t.costs)&&(t.scaleFactor=null!=(j=t.costs[w])?j:1,I(t.costs))}for(const t of e.polylineBarriers){var F;(0,c.pC)(t.costs)&&(t.scaleFactor=null!=(F=t.costs[w])?F:1,I(t.costs))}const{routeInfo:x}=e,{findBestSequence:E,preserveFirstStop:L,preserveLastStop:M,startTimeIsUTC:P,timeWindowsAreUTC:J}=i;x.analysisSettings=new Tt({accumulateAttributes:A,directionsLanguage:O,findBestSequence:E,preserveFirstStop:L,preserveLastStop:M,startTimeIsUTC:P,timeWindowsAreUTC:J,travelMode:v}),x.totalDuration=qt(null!=(d=x.totalCosts[g])?d:0,_),x.totalDistance=Gt(null!=(m=x.totalCosts[T])?m:0,N),x.totalLateDuration=qt(null!=(y=x.totalViolations[g])?y:0,_),x.totalWaitDuration=qt(null!=(b=x.totalWait[g])?b:0,_),(0,c.pC)(x.totalCosts)&&I(x.totalCosts),(0,c.pC)(x.totalViolations)&&I(x.totalViolations),(0,c.pC)(x.totalWait)&&I(x.totalWait);for(const t of e.stops){var R,W,U,k,Z,V;(0,c.pC)(t.serviceCosts)&&(t.serviceDuration=qt(null!=(R=t.serviceCosts[g])?R:0,_),t.serviceDistance=Gt(null!=(W=t.serviceCosts[T])?W:0,N),I(t.serviceCosts)),(0,c.pC)(t.cumulativeCosts)&&(t.cumulativeDuration=qt(null!=(U=t.cumulativeCosts[g])?U:0,_),t.cumulativeDistance=Gt(null!=(k=t.cumulativeCosts[T])?k:0,N),I(t.cumulativeCosts)),(0,c.pC)(t.violations)&&(t.lateDuration=qt(null!=(Z=t.violations[g])?Z:0,_),I(t.violations)),(0,c.pC)(t.wait)&&(t.waitDuration=qt(null!=(V=t.wait[g])?V:0,_),I(t.wait))}}(N,f,w),N}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:l}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",l)}_getLayerDefinition(){return{capabilities:"Query,Update,Editing",extent:this.fullExtent.toJSON(),hasM:!1,hasZ:!1,maxScale:this.maxScale,minScale:this.minScale,objectIdField:"__OBJECTID",spatialReference:this.spatialReference.toJSON(),type:"Feature Layer",typeIdField:""}}_getNetworkFeatures(e,t,i,r){const o=(Zt(e)?e.layers:e.featureCollection.layers).find((e=>e.layerDefinition.name===t));if((0,c.Wi)(o))return new p.Z;const{layerDefinition:s,popupInfo:u,featureSet:d}=o,m=s.drawingInfo.renderer,{features:y}=d,b=m&&(0,n.a)(m),h=y.map((e=>{var r;const o=a.Z.fromJSON(e),s=i(o);return null!=s.symbol||(s.symbol=null!=(r=null==b?void 0:b.getSymbol(o))?r:this._getNetworkSymbol(t)),null!=s.popupTemplate||(s.popupTemplate=u&&l.Z.fromJSON(u)),s}));return r&&h.some((e=>!e.symbol))&&r(h),new p.Z(h)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,i){if((0,c.pC)(this._cachedServiceDescription)&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await De(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if((0,c.Wi)(this.routeInfo)||1===e.length)return void e.forEach(((t,i)=>{switch(i){case 0:t.symbol=this.defaultSymbols.firstStop;break;case e.length-1:t.symbol=this.defaultSymbols.lastStop;break;default:t.symbol=this.defaultSymbols.middleStop}}));const t=e.map((e=>e.sequence)).filter((e=>(0,c.pC)(e))),i=Math.min(...t),r=Math.max(...t);for(const t of e)t.sequence!==i?t.sequence!==r?"ok"===t.status||"not-located-on-closest"===t.status?"waypoint"!==t.locationType?"break"!==t.locationType?t.symbol=this.defaultSymbols.middleStop:t.symbol=this.defaultSymbols.breakStop:t.symbol=this.defaultSymbols.waypointStop:t.symbol=this.defaultSymbols.invalidStop:t.symbol=this.defaultSymbols.lastStop:t.symbol=this.defaultSymbols.firstStop}_toRouteLayerSolution(e){var t,i,r,o,s;const a=e.routeResults[0].stops.map((e=>Rt.fromJSON(e.toJSON())));this._setStopSymbol(a);const l=new Xt(a),n=new Yt(null==(t=e.polygonBarriers)?void 0:t.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),p=new Qt(null==(i=e.polylineBarriers)?void 0:i.map((e=>{const t=vt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),u=new $t(null==(r=e.pointBarriers)?void 0:r.map((e=>{const t=dt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),d=wt.fromJSON(e.routeResults[0].route.toJSON());d.symbol=this.defaultSymbols.routeInfo;const m=new Ht(null==(o=e.routeResults[0].directionPoints)?void 0:o.features.map((e=>{const t=nt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new Kt(null==(s=e.routeResults[0].directionLines)?void 0:s.features.map((e=>{const t=st.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:m,pointBarriers:u,polygonBarriers:n,polylineBarriers:p,routeInfo:d,stops:l}}_writeDirectionLines(){return(0,c.Wi)(this.directionLines)||!this.directionLines.length?null:{featureSet:{features:this.directionLines.toArray().map((e=>zt(e))),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.directionLines.toJSON()}},fields:st.fields,geometryType:"esriGeometryPolyline",name:"DirectionLines",title:"Direction Lines"},popupInfo:st.popupInfo}}_writeDirectionPoints(){return(0,c.Wi)(this.directionPoints)||!this.directionPoints.length?null:{featureSet:{features:this.directionPoints.toArray().map((e=>zt(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.directionPoints.toJSON()}},fields:nt.fields,geometryType:"esriGeometryPoint",name:"DirectionPoints",title:"Direction Points"},popupInfo:nt.popupInfo}}_writePointBarriers(){return(0,c.Wi)(this.pointBarriers)||!this.pointBarriers.length?null:{featureSet:{features:this.pointBarriers.toArray().map((e=>zt(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.pointBarriers.toJSON()}},fields:dt.fields,geometryType:"esriGeometryPoint",name:"Barrier",title:"Point Barrier"},popupInfo:dt.popupInfo}}_writePolygonBarriers(){return(0,c.Wi)(this.polygonBarriers)||!this.polygonBarriers.length?null:{featureSet:{features:this.polygonBarriers.toArray().map((e=>zt(e))),geometryType:"esriGeometryPolygon"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.polygonBarriers.toJSON()}},fields:bt.fields,geometryType:"esriGeometryPolygon",name:"PolygonBarriers",title:"Polygon Barriers"},popupInfo:bt.popupInfo}}_writePolylineBarriers(){return(0,c.Wi)(this.polylineBarriers)||!this.polylineBarriers.length?null:{featureSet:{features:this.polylineBarriers.toArray().map((e=>zt(e))),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.polylineBarriers.toJSON()}},fields:vt.fields,geometryType:"esriGeometryPolyline",name:"PolylineBarriers",title:"Line Barriers"},popupInfo:vt.popupInfo}}_writeRouteInfo(){return(0,c.Wi)(this.routeInfo)?null:{featureSet:{features:[zt(this.routeInfo)],geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.routeInfo.toJSON()}},fields:wt.fields,geometryType:"esriGeometryPolyline",name:"RouteInfo",title:"Route Details"},popupInfo:wt.popupInfo}}_writeStops(){return(0,c.Wi)(this.stops)||!this.stops.length?null:{featureSet:{features:this.stops.toArray().map((e=>zt(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"uniqueValue",field1:"Sequence",defaultSymbol:this.defaultSymbols.middleStop.toJSON(),uniqueValueInfos:[{value:"1",symbol:this.defaultSymbols.firstStop.toJSON(),label:"First Stop"},{value:`${this.stops.length}`,symbol:this.defaultSymbols.lastStop.toJSON(),label:"Last Stop"}]}},fields:Rt.fields,geometryType:"esriGeometryPoint",name:"Stops",title:"Stops"},popupInfo:Rt.popupInfo}}};(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ti.prototype,"_featureCollection",void 0),(0,r._)([(0,_.c)(["web-map","portal-item"],"_featureCollection")],ti.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ti.prototype,"_type",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:U})],ti.prototype,"defaultSymbols",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ti.prototype,"directionLines",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ti.prototype,"readDirectionLines",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ti.prototype,"directionPoints",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ti.prototype,"readDirectionPoints",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ti.prototype,"featureCollectionType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],ti.prototype,"fullExtent",null),(0,r._)([(0,T.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ti.prototype,"legendEnabled",void 0),(0,r._)([(0,T.Cb)({type:["show","hide"]})],ti.prototype,"listMode",void 0),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ti.prototype,"maxScale",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ti.prototype,"readMaxScale",null),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ti.prototype,"minScale",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ti.prototype,"readMinScale",null),(0,r._)([(0,T.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ti.prototype,"operationalLayerType",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(dt)})],ti.prototype,"pointBarriers",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ti.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(bt)})],ti.prototype,"polygonBarriers",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ti.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(vt)})],ti.prototype,"polylineBarriers",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ti.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({readOnly:!0})],ti.prototype,"routeInfo",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ti.prototype,"readRouteInfo",null),(0,r._)([(0,T.Cb)({type:qe.Z})],ti.prototype,"spatialReference",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ti.prototype,"readSpatialReference",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(Rt)})],ti.prototype,"stops",void 0),(0,r._)([(0,S.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ti.prototype,"readStops",null),(0,r._)([(0,T.Cb)()],ti.prototype,"title",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],ti.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],ti.prototype,"url",null),ti=(0,r._)([(0,w.j)("esri.layers.RouteLayer")],ti);const ii=ti},16859:(e,t,i)=>{i.d(t,{I:()=>T});var r=i(43697),o=i(40330),s=i(3172),a=i(66643),l=i(20102),n=i(92604),p=i(70586),u=i(95330),d=i(17452),m=i(5600),c=(i(67676),i(80442),i(75215),i(71715)),y=i(52011),b=i(30556),h=i(65587),f=i(15235),v=i(86082);const g=n.Z.getLogger("esri.layers.mixins.PortalLayer"),T=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new f.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,u.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||g.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,u.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?null==o.id?void 0:o.id.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,(0,p.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){var t,i;const r=null==(t=this.portalItem)||null==(i=t.portal)?void 0:i.user;if(r)return r;const l=o.id.findServerInfo(this.url);if(null==l||!l.owningSystemUrl)return null;const n=`${l.owningSystemUrl}/sharing/rest`,u=h.Z.getDefault();if(u&&u.loaded&&(0,d.Fv)(u.restUrl)===(0,d.Fv)(n))return u.user;const m=`${n}/community/self`,c=(0,p.pC)(e)?e.signal:null,y=await(0,a.q6)((0,s.default)(m,{authMode:"no-prompt",query:{f:"json"},signal:c}));return y.ok?v.default.fromJSON(y.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||h.Z.getDefault());return i&&r&&!(0,d.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.Cb)({type:f.default})],t.prototype,"portalItem",null),(0,r._)([(0,c.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,b.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},14661:(e,t,i)=>{i.d(t,{$o:()=>p,Kz:()=>u,_$:()=>l,ck:()=>n,qj:()=>a});var r=i(44547),o=i(82971),s=i(40488);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){var i;return!(null==(i=e.typeKeywords)||!i.includes(t))}function n(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.Sx)(e);const i=o.Z.WGS84;return await(0,r.iQ)(t,i),(0,r.iV)(e,i)}(i)}const u={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer"}},51706:(e,t,i)=>{var r,o;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function a(e){return null!=e&&!isNaN(e)&&isFinite(e)}function l(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function n(e,t){const i=t||l(e),s=e.valueUnit||"unknown";return i===r.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}i.d(t,{PS:()=>l,QW:()=>n,RY:()=>r,hL:()=>o,iY:()=>s,qh:()=>a}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var r,o=i(43697),s=i(66577),a=i(38171),l=i(35454),n=i(96674),p=i(22974),u=i(70586),d=i(5600),m=(i(75215),i(71715)),c=i(52011),y=i(30556),b=i(82971),h=i(33955),f=i(1231);const v=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=r=class extends n.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=b.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;(0,u.pC)(s.geometry)&&!l&&(s.geometry.spatialReference=i);const n=o.aggregateGeometries,p=s.aggregateGeometries;if(n&&(0,u.pC)(p))for(const e in p){const t=p[e],r=n[e],o=null==r?void 0:r.spatialReference;(0,u.pC)(t)&&!o&&(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void v.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&(0,u.pC)(e.geometry))return void v.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,h.im)(e);return!i&&t.spatialReference&&(r.spatialReference=b.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)a((0,u.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,a]}=i,l=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&l(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(l[0]),o=i(l[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&o.push(a)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y)}:"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];for(let e=0,r=a.length;e<r;e++){const r=a[e];e>0?(o+=r[0],s+=r[1]):(o=r[0],s=r[1]),r[0]=t(o),r[1]=i(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax)}:"multipoint"===e?e=>{const r=e.points;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];e>0?(o+=a[0],s+=a[1]):(o=a[0],s=a[1]),a[0]=t(o),a[1]=i(s)}}:void 0}};(0,o._)([(0,d.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.Cb)({type:[a.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,m.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,d.Cb)({type:[f.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,d.Cb)({types:s.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,m.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,d.Cb)({type:b.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,d.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=r=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const T=g},11282:(e,t,i)=>{i.d(t,{cv:()=>l,en:()=>a,lA:()=>s});var r=i(22974),o=i(17452);function s(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.mN)(e):(0,r.d9)(e)}function l(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){r[o]=[];for(let e=0;e<s.length;e++)r[o][e]=l(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i&&i[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}}}]);
|