(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5b64ca30"],{2082:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return B}));var i=r("a4ee"),s=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("2eab"),n=r("a3a2"),c=r("a8d5"),l=r("c279"),u=r("bb72"),d=(r("e06a"),r("8d60")),p=r("6a0ed"),b=r("b2b2"),f=r("afcf"),y=r("5996"),m=r("95a2"),O=r("4ae5"),j=r("521c"),v=r("1219"),h=r("a9ab");function g(e){return e.features.map(t=>{const r=y["a"].fromJSON(e.spatialReference),i=d["a"].fromJSON(t);return Object(b["t"])(i.geometry).spatialReference=r,i})}function N(e){return Object(b["g"])(e.features.map(t=>(Object(b["k"])(t.geometry)&&(t.geometry.spatialReference=e.spatialReference),Object(h["a"])(t.geometry))))}let A=class extends p["a"]{constructor(e){super(e),this.facilities=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.serviceAreaPolylines=null,this.serviceAreaPolygons=null}readFacilities(e){return N(e)}readPointBarriers(e,t){return N(t.barriers)}readPolylineBarriers(e){return N(e)}readPolygonBarriers(e){return N(e)}readIncidents(e,t){return g(t.saPolylines)}readServiceAreaPolygons(e,t){return g(t.saPolygons)}};Object(i["a"])([Object(s["b"])({type:[O["a"]]})],A.prototype,"facilities",void 0),Object(i["a"])([Object(f["a"])("facilities")],A.prototype,"readFacilities",null),Object(i["a"])([Object(s["b"])({type:[m["a"]]})],A.prototype,"messages",void 0),Object(i["a"])([Object(s["b"])({type:[O["a"]]})],A.prototype,"pointBarriers",void 0),Object(i["a"])([Object(f["a"])("pointBarriers",["barriers"])],A.prototype,"readPointBarriers",null),Object(i["a"])([Object(s["b"])({type:[j["a"]]})],A.prototype,"polylineBarriers",void 0),Object(i["a"])([Object(f["a"])("polylineBarriers")],A.prototype,"readPolylineBarriers",null),Object(i["a"])([Object(s["b"])({type:[v["a"]]})],A.prototype,"polygonBarriers",void 0),Object(i["a"])([Object(f["a"])("polygonBarriers")],A.prototype,"readPolygonBarriers",null),Object(i["a"])([Object(s["b"])({type:[d["a"]]})],A.prototype,"serviceAreaPolylines",void 0),Object(i["a"])([Object(f["a"])("serviceAreaPolylines",["saPolylines"])],A.prototype,"readIncidents",null),Object(i["a"])([Object(s["b"])({type:[d["a"]]})],A.prototype,"serviceAreaPolygons",void 0),Object(i["a"])([Object(f["a"])("serviceAreaPolygons",["saPolygons"])],A.prototype,"readServiceAreaPolygons",null),A=Object(i["a"])([Object(a["a"])("esri.rest.support.ServiceAreaSolveResult")],A);const w=A,T=Object(n["a"])({accumulateAttributes:{name:"accumulateAttributeNames"},attributeParameterValues:!0,defaultBreaks:!0,facilities:!0,outSpatialReference:{name:"outSR",getter:e=>e.outSpatialReference.wkid},pointBarriers:{name:"barriers"},polylineBarriers:!0,polygonBarriers:!0,restrictionAttributes:{name:"restrictionAttributeNames"},returnPointBarriers:{name:"returnBarriers"},travelMode:!0});async function M(e,t,r){const i=[],s=[],a={},n={},d=Object(u["c"])(e),{path:p}=d;t.facilities&&t.facilities.features&&Object(l["a"])(t.facilities.features,s,"facilities.features",a),t.pointBarriers&&t.pointBarriers.features&&Object(l["a"])(t.pointBarriers.features,s,"pointBarriers.features",a),t.polylineBarriers&&t.polylineBarriers.features&&Object(l["a"])(t.polylineBarriers.features,s,"polylineBarriers.features",a),t.polygonBarriers&&t.polygonBarriers.features&&Object(l["a"])(t.polygonBarriers.features,s,"polygonBarriers.features",a);const b=await Object(c["a"])(s);for(const o in a){const e=a[o];i.push(o),n[o]=b.slice(e[0],e[1])}if(Object(l["d"])(n,i)){let e=null;try{e=await Object(l["c"])(p,t.apiKey,r)}catch{}e&&!e.hasZ&&Object(l["b"])(n,i)}for(const o in n)n[o].forEach((e,r)=>{t.get(o)[r].geometry=e});const f={...r,query:{...d.query,...T.toQueryParams(t),f:"json"}},{data:y}=await Object(o["default"])(p+"/solveServiceArea",f);return w.fromJSON(y)}var S=r("9209");let k=class extends S["a"]{constructor(e){super(e),this.url=null}solve(e,t){return M(this.url,e,t)}};Object(i["a"])([Object(s["b"])()],k.prototype,"url",void 0),k=Object(i["a"])([Object(a["a"])("esri.tasks.ServiceAreaTask")],k);const B=k},"748f":function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var i,s=r("a4ee"),a=r("6a0ed"),o=r("7ffa"),n=r("59b2"),c=(r("cea0"),r("448d")),l=r("d386"),u=r("ff81");let d=i=class extends a["a"]{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}clone(){return new i(Object(o["a"])({attributeParameterValues:this.attributeParameterValues,description:this.description,distanceAttributeName:this.distanceAttributeName,id:this.id,impedanceAttributeName:this.impedanceAttributeName,name:this.name,restrictionAttributeNames:this.restrictionAttributeNames,simplificationTolerance:this.simplificationTolerance,simplificationToleranceUnits:this.simplificationToleranceUnits,timeAttributeName:this.timeAttributeName,type:this.type,useHierarchy:this.useHierarchy,uturnAtJunctions:this.uturnAtJunctions}))}};Object(s["a"])([Object(n["b"])({type:[Object],json:{write:!0}})],d.prototype,"attributeParameterValues",void 0),Object(s["a"])([Object(n["b"])({type:String,json:{write:!0}})],d.prototype,"description",void 0),Object(s["a"])([Object(n["b"])({type:String,json:{write:!0}})],d.prototype,"distanceAttributeName",void 0),Object(s["a"])([Object(n["b"])({type:String,json:{write:!0}})],d.prototype,"id",void 0),Object(s["a"])([Object(n["b"])({type:String,json:{write:!0}})],d.prototype,"impedanceAttributeName",void 0),Object(s["a"])([Object(n["b"])({type:String,json:{write:!0}})],d.prototype,"name",void 0),Object(s["a"])([Object(n["b"])({type:[String],json:{write:!0}})],d.prototype,"restrictionAttributeNames",void 0),Object(s["a"])([Object(n["b"])({type:Number,json:{write:{allowNull:!0}}})],d.prototype,"simplificationTolerance",void 0),Object(s["a"])([Object(c["a"])(u["i"])],d.prototype,"simplificationToleranceUnits",void 0),Object(s["a"])([Object(n["b"])({type:String,json:{write:!0}})],d.prototype,"timeAttributeName",void 0),Object(s["a"])([Object(c["a"])(u["o"])],d.prototype,"type",void 0),Object(s["a"])([Object(n["b"])({type:Boolean,json:{write:!0}})],d.prototype,"useHierarchy",void 0),Object(s["a"])([Object(c["a"])(u["l"])],d.prototype,"uturnAtJunctions",void 0),d=i=Object(s["a"])([Object(l["a"])("esri.rest.support.TravelMode")],d);const p=d},7945:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("a4ee"),s=r("fa8a"),a=r("6a0ed"),o=r("59b2"),n=(r("b50f"),r("c120"),r("cea0"),r("d386"));const c=new s["a"]({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let l=class extends a["a"]{constructor(e){super(e),this.description=null,this.type=null}};Object(i["a"])([Object(o["b"])({type:String,json:{write:!0}})],l.prototype,"description",void 0),Object(i["a"])([Object(o["b"])({type:String,json:{read:c.read,write:c.write}})],l.prototype,"type",void 0),l=Object(i["a"])([Object(n["a"])("esri.rest.support.GPMessage")],l);const u=l},"95a2":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("a4ee"),s=r("fa8a"),a=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),n=r("7945");const c=new s["a"]({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let l=class extends n["a"]{constructor(e){super(e),this.type=null}};Object(i["a"])([Object(a["b"])({type:String,json:{read:c.read,write:c.write}})],l.prototype,"type",void 0),l=Object(i["a"])([Object(o["a"])("esri.rest.support.NAMessage")],l);const u=l},a3a2:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));const i=e=>{if(!Array.isArray(e))return!1;const[t]=e;return"number"==typeof t||"string"==typeof t};class s{constructor(e={}){this._options=e}toQueryParams(e){if(!e)return null;const t=e.toJSON(),r={};return Object.keys(t).forEach(e=>{const s=this._options[e];if(s){const a="boolean"!=typeof s&&s.name?s.name:e,o="boolean"!=typeof s&&s.getter?s.getter(t):t[e];null!=o&&(r[a]=i(o)?o.join(","):"object"==typeof o?JSON.stringify(o):o)}else r[e]=t[e]},this),r}}function a(e){return new s(e)}},c279:function(e,t,r){"use strict";r.d(t,"a",(function(){return j})),r.d(t,"b",(function(){return v})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return h}));var i=r("2eab"),s=r("ce50"),a=r("b2b2"),o=r("9d1d"),n=r("e041"),c=r("bb72"),l=r("a4ee"),u=r("6a0ed"),d=r("59b2"),p=(r("b50f"),r("c120"),r("cea0"),r("448d")),b=r("d386"),f=r("ff81"),y=r("748f");let m=class extends u["a"]{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}};Object(l["a"])([Object(d["b"])()],m.prototype,"accumulateAttributeNames",void 0),Object(l["a"])([Object(d["b"])()],m.prototype,"currentVersion",void 0),Object(l["a"])([Object(d["b"])()],m.prototype,"defaultTravelMode",void 0),Object(l["a"])([Object(d["b"])()],m.prototype,"directionsLanguage",void 0),Object(l["a"])([Object(p["a"])(f["e"])],m.prototype,"directionsLengthUnits",void 0),Object(l["a"])([Object(d["b"])()],m.prototype,"directionsSupportedLanguages",void 0),Object(l["a"])([Object(d["b"])()],m.prototype,"directionsTimeAttribute",void 0),Object(l["a"])([Object(d["b"])()],m.prototype,"hasZ",void 0),Object(l["a"])([Object(d["b"])()],m.prototype,"impedance",void 0),Object(l["a"])([Object(d["b"])()],m.prototype,"networkDataset",void 0),Object(l["a"])([Object(d["b"])({type:[y["a"]]})],m.prototype,"supportedTravelModes",void 0),m=Object(l["a"])([Object(b["a"])("esri.rest.support.NetworkServiceDescription")],m);const O=m;function j(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}function v(e,t){for(let r=0;r=10.4?A(e,t,r):N(e,r),{defaultTravelMode:l,supportedTravelModes:u}=await n;return o.defaultTravelMode=l,o.supportedTravelModes=u,O.fromJSON(o)}async function N(e,t){var r,s;const a=Object(c["a"])({f:"json"},t),{data:l}=await Object(i["default"])(e.replace(/\/rest\/.*$/i,"/info"),a);if(!l||!l.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:u}=l,d=Object(n["K"])(u)+"/sharing/rest/portals/self",{data:p}=await Object(i["default"])(d,a),b=Object(o["b"])("helperServices.routingUtilities.url",p);if(!b)return{supportedTravelModes:[],defaultTravelMode:null};const f=Object(c["c"])(u),y=/\/solve$/i.test(f.path)?"Route":/\/solveclosestfacility$/i.test(f.path)?"ClosestFacility":"ServiceAreas",m=Object(c["a"])({f:"json",serviceName:y},t),O=Object(n["K"])(b)+"/GetTravelModes/execute",j=await Object(i["default"])(O,m),v=[];let h=null;if(null!=j&&null!=(r=j.data)&&null!=(s=r.results)&&s.length){const e=j.data.results;for(const t of e){var g;if("supportedTravelModes"===t.paramName){if(null!=(g=t.value)&&g.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);v.push(t)}}else"defaultTravelMode"===t.paramName&&(h=t.value)}}return{supportedTravelModes:v,defaultTravelMode:h}}async function A(e,t,r){try{const s=Object(c["a"])({f:"json",token:t},r),a=Object(n["K"])(e)+"/retrieveTravelModes",{data:{supportedTravelModes:o,defaultTravelMode:l}}=await Object(i["default"])(a,s);return{supportedTravelModes:o,defaultTravelMode:l}}catch(a){throw new s["a"]("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:a})}}},ff81:function(e,t,r){"use strict";r.d(t,"a",(function(){return y})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return j})),r.d(t,"d",(function(){return O})),r.d(t,"e",(function(){return a})),r.d(t,"f",(function(){return n})),r.d(t,"g",(function(){return o})),r.d(t,"h",(function(){return m})),r.d(t,"i",(function(){return s})),r.d(t,"j",(function(){return p})),r.d(t,"k",(function(){return c})),r.d(t,"l",(function(){return l})),r.d(t,"m",(function(){return f})),r.d(t,"n",(function(){return b})),r.d(t,"o",(function(){return u}));var i=r("fa8a");const s=Object(i["b"])()({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"}),a=Object(i["b"])()({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"}),o=Object(i["b"])()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),n=Object(i["b"])()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),c=Object(i["b"])()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),l=(Object(i["b"])()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),Object(i["b"])()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),u=(Object(i["b"])()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),Object(i["b"])()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),Object(i["b"])()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),d=Object(i["b"])()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),p=Object(i["b"])()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),b=Object(i["b"])()({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}),f=Object(i["b"])()({1:"right",2:"left"},{useNumericKeys:!0}),y=Object(i["b"])()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),m=Object(i["b"])()({0:"permit",1:"restrict"},{useNumericKeys:!0}),O=Object(i["b"])()({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}),j=Object(i["b"])()({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})}}]); //# sourceMappingURL=chunk-5b64ca30.567a4695.js.map