{"version":3,"sources":["webpack:///./node_modules/arcgis-js-api/tasks/support/ClosestFacilitySolveResult.js","webpack:///./node_modules/arcgis-js-api/tasks/mixins/NAServiceDescription.js","webpack:///./node_modules/arcgis-js-api/tasks/support/NAMessage.js","webpack:///./node_modules/arcgis-js-api/core/queryUtils.js","webpack:///./node_modules/arcgis-js-api/tasks/support/DirectionsFeatureSet.js","webpack:///./node_modules/arcgis-js-api/tasks/ClosestFacilityTask.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BAAO,CAAC,2BAAgB,CAAC,2BAAe,CAAC,2BAAwB,CAAC,2BAAkB,CAAC,2BAAuC,CAAC,4BAA8C,CAAC,2BAAiC,CAAC,2BAAwB,CAAC,2BAAc,CAAC,4BAAa,CAAC,mCAAE,oCAAoC,aAAa,cAAc,+CAA+C,kBAAkB,GAAG,mBAAmB,cAAc,2BAA2B,gKAAgK,+DAA+D,YAAY,uCAAuC,YAAY,6CAA6C,qBAAqB,8CAA8C,YAAY,6CAA6C,YAAY,oCAAoC,mBAAmB,mCAAmC,qDAAqD,+DAA+D,GAAG,IAAI,2BAA2B,SAAS,8DAA8D,eAAe,uIAAuI,eAAe,oIAAoI,SAAS,4DAA4D,eAAe,6JAA6J,kBAAkB,yJAAyJ,iBAAiB,sJAAsJ,SAAS,iLAAiL,gBAAgB;AAAA,oGAAE,C;;;;;;;ACxBnyE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BAAO,CAAC,2BAAe,CAAC,2BAAkB,CAAC,2BAAkB,CAAC,2BAAmB,CA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AA6D,sLAAsL,8CAA8C,yDAAyD,MAAM,MAAM,kCAAkC,kEAAkE,MAAM,MAAM,+BAA+B,+DAA+D,MAAM,MAAM,6BAA6B,6GAA6G,IAAI;AAAA,oGAAE,C;;;;;;;ACxB5/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2BAAO,CAAC,2BAAY,CAAC,2BAAsB,CAAC,2BAAoB,CAAC,2BAAoC,CAAC,2BAAoC,CAAC,2BAAQ,CAAC,4BAA+B,CAAC,2BAAsC,CAAC,mCAAE,gCAAgC,aAAa,iCAAiC,sBAAsB,gCAAgC,sDAAsD,mCAAmC,qBAAqB,8BAA8B,iDAAiD,gCAAgC,mCAAmC,gBAAgB,gBAAgB,+DAA+D,iCAAiC,sBAAsB,sBAAsB,eAAe,sBAAsB,eAAe,EAAE,mBAAmB,cAAc,2BAA2B,oBAAoB,wDAAwD,yBAAyB,MAAM,ipBAAipB,gBAAgB,WAAW,kCAAkC,0EAA0E,aAAa,EAAE,qBAAqB,0EAA0E,kBAAkB,4BAA4B,uBAAuB,IAAI,oBAAoB,OAAO,yCAAyC,qBAAqB,SAAS,uBAAuB,mEAAmE,wEAAwE,qBAAqB,0BAA0B,GAAG,kDAAkD,yDAAyD,mBAAmB,GAAG,wHAAwH,iCAAiC;AAAA,oGAAE,C","file":"js/chunk-3b1ffbb6.bb765b92.js","sourcesContent":["// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../../geometry\",\"../../Graphic\",\"../../core/JSONSupport\",\"../../core/maybe\",\"../../core/accessorSupport/decorators\",\"../../core/accessorSupport/decorators/reader\",\"../../geometry/SpatialReference\",\"./DirectionsFeatureSet\",\"./FeatureSet\",\"./NAMessage\"],(function(e,r,t,o,i,n,p,a,s,l,c,u,y){\"use strict\";function d(e){return u.fromJSON(e).features.map((function(e){return e.geometry}))}return function(e){function r(r){var t=e.call(this,r)||this;return t.directions=null,t.facilities=null,t.incidents=null,t.messages=null,t.pointBarriers=null,t.polylineBarriers=null,t.polygonBarriers=null,t.routes=null,t}return t.__extends(r,e),r.prototype.readFacilities=function(e){return d(e)},r.prototype.readIncidents=function(e){return d(e)},r.prototype.readPointBarriers=function(e,r){return d(r.barriers)},r.prototype.readPolylineBarriers=function(e){return d(e)},r.prototype.readPolygonBarriers=function(e){return d(e)},r.prototype.readRoutes=function(e){return function(e){return e.features.map((function(r){var t=l.fromJSON(e.spatialReference),o=i.fromJSON(r);return p.isSome(o.geometry)&&(o.geometry.spatialReference=t),o}))}(e)},t.__decorate([a.property({type:[c]})],r.prototype,\"directions\",void 0),t.__decorate([a.property({type:[o.Point]})],r.prototype,\"facilities\",void 0),t.__decorate([s.reader(\"facilities\")],r.prototype,\"readFacilities\",null),t.__decorate([a.property({type:[o.Point]})],r.prototype,\"incidents\",void 0),t.__decorate([s.reader(\"incidents\")],r.prototype,\"readIncidents\",null),t.__decorate([a.property({type:[y]})],r.prototype,\"messages\",void 0),t.__decorate([a.property({type:[o.Point]})],r.prototype,\"pointBarriers\",void 0),t.__decorate([s.reader(\"pointBarriers\",[\"barriers\"])],r.prototype,\"readPointBarriers\",null),t.__decorate([a.property({type:[o.Polyline]})],r.prototype,\"polylineBarriers\",void 0),t.__decorate([s.reader(\"polylineBarriers\")],r.prototype,\"readPolylineBarriers\",null),t.__decorate([a.property({type:[o.Polygon]})],r.prototype,\"polygonBarriers\",void 0),t.__decorate([s.reader(\"polygonBarriers\")],r.prototype,\"readPolygonBarriers\",null),t.__decorate([a.property({type:[i]})],r.prototype,\"routes\",void 0),t.__decorate([s.reader(\"routes\")],r.prototype,\"readRoutes\",null),r=t.__decorate([a.subclass(\"esri.tasks.support.ClosestFacilitySolveResult\")],r)}(n.JSONSupport)}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../../request\",\"../../core/Error\",\"../../core/maybe\",\"../../core/object\",\"../../core/urlUtils\",\"../../core/accessorSupport/decorators\",\"../Task\"],(function(e,r,t,s,i,o,n,a,u,l){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.NAServiceDescription=r.NAServiceDescriptionMixin=void 0,r.NAServiceDescriptionMixin=function(e){return function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(r,e),r.prototype.getServiceDescription=function(){return t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(e){return this._serviceDescriptionPromise||(this._serviceDescriptionPromise=this._fetchServiceDescription()),[2,this._serviceDescriptionPromise]}))}))},r.prototype._fetchServiceDescription=function(){return t.__awaiter(this,void 0,void 0,(function(){var e,r,o,u,l,c;return t.__generator(this,(function(d){switch(d.label){case 0:if(!this.url||!this.parsedUrl)throw new i(\"network-service:missing-url\",\"Url to Network service is missing\");return e=this.url,[4,s(e,{query:{f:\"json\"}})];case 1:for((r=d.sent().data).supportedTravelModes||(r.supportedTravelModes=[]),o=0;o=10.4?function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,o,n,a;return t.__generator(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,s(e+(\"/\"===e[e.length-1]?\"\":\"/\")+\"retrieveTravelModes\",{query:{f:\"json\"}})];case 1:return r=t.sent().data,o=r.supportedTravelModes,n=r.defaultTravelMode,[2,{supportedTravelModes:o,defaultTravelMode:n}];case 2:throw a=t.sent(),new i(\"network-service:retrieveTravelModes\",\"Could not get to the NAServer's retrieveTravelModes.\",{error:a});case 3:return[2]}}))}))}(e):function(e){return t.__awaiter(this,void 0,void 0,(function(){var r,i,o,u,l,c,d,v,p,f,h,_,M,g,T,y;return t.__generator(this,(function(t){switch(t.label){case 0:return[4,s(e.substring(0,e.indexOf(\"/rest/\")+6)+\"info\",{query:{f:\"json\"}})];case 1:return(r=t.sent().data)&&r.owningSystemUrl?(e=r.owningSystemUrl,[4,s(e+(\"/\"===e[e.length-1]?\"\":\"/\")+\"sharing/rest/portals/self\",{query:{f:\"json\"}})]):[2,{supportedTravelModes:[],defaultTravelMode:null}];case 2:return i=t.sent().data,(o=n.getDeepValue(\"helperServices.routingUtilities.url\",i))?(u=a.urlToObject(e),l=/\\/solveClosestFacility$/.test(u.path)?\"Route\":/\\/solveClosestFacility$/.test(u.path)?\"ClosestFacility\":\"ServiceAreas\",[4,s(o+(\"/\"===o[o.length-1]?\"\":\"/\")+\"GetTravelModes/execute\",{query:{f:\"json\",serviceName:l}})]):[2,{supportedTravelModes:[],defaultTravelMode:null}];case 3:if(c=t.sent(),d=[],v=null,c&&c.data&&c.data.results&&c.data.results.length)for(p=c.data.results,f=0,h=p;f0,hasM:_>0,spatialReference:t}},t.prototype._mergePolylinesToSinglePath=function(e,t){var r=[];(e||[]).forEach((function(e){e.paths.forEach((function(e){r=r.concat(e)}))}));var n=[],a=[0,0];return r.forEach((function(e){e[0]===a[0]&&e[1]===a[1]||(n.push(e),a=e)})),new o.Polyline({paths:[n]},t)},r.__decorate([p.property({type:o.Extent,json:{read:{source:\"summary.envelope\"}}})],t.prototype,\"extent\",void 0),r.__decorate([p.property()],t.prototype,\"features\",void 0),r.__decorate([p.reader(\"features\")],t.prototype,\"readFeatures\",null),r.__decorate([p.property()],t.prototype,\"geometryType\",void 0),r.__decorate([p.property({readOnly:!0,dependsOn:[\"features\",\"extent.spatialReference\"]})],t.prototype,\"mergedGeometry\",null),r.__decorate([p.property()],t.prototype,\"routeId\",void 0),r.__decorate([p.property()],t.prototype,\"routeName\",void 0),r.__decorate([p.property({value:null,readOnly:!0,dependsOn:[\"features\"]})],t.prototype,\"strings\",null),r.__decorate([p.property({json:{read:{source:\"summary.totalDriveTime\"}}})],t.prototype,\"totalDriveTime\",void 0),r.__decorate([p.property({json:{read:{source:\"summary.totalLength\"}}})],t.prototype,\"totalLength\",void 0),r.__decorate([p.property({json:{read:{source:\"summary.totalTime\"}}})],t.prototype,\"totalTime\",void 0),t=r.__decorate([p.subclass(\"esri.tasks.support.DirectionsFeatureSet\")],t)}(s)}));","// COPYRIGHT © 2020 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.17/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"tslib\",\"../request\",\"../core/promiseUtils\",\"../core/queryUtils\",\"../core/accessorSupport/decorators\",\"../geometry/support/normalizeUtils\",\"./Task\",\"./mixins/NAServiceDescription\",\"./support/ClosestFacilitySolveResult\"],(function(e,r,t,i,s,n,a,o,u,c,l){\"use strict\";var p=n.createQueryParamsHelper({accumulateAttributes:{name:\"accumulateAttributeNames\"},attributeParameterValues:!0,directionsTimeAttribute:{name:\"directionsTimeAttributeName\"},impedanceAttribute:{name:\"impedanceAttributeName\"},facilities:!0,incidents:!0,outSpatialReference:{name:\"outSR\",getter:function(e){return e.outSpatialReference.wkid}},pointBarriers:{name:\"barriers\"},polylineBarriers:!0,polygonBarriers:!0,restrictionAttributes:{name:\"restrictionAttributeNames\"},returnPointBarriers:{name:\"returnBarriers\"},returnRoutes:{name:\"returnCFRoutes\"},travelMode:!0});return function(e){function r(r){var t=e.call(this,r)||this;return t.url=null,t}return t.__extends(r,e),r.prototype.solve=function(e,r){var n=this,a=[],u=[],c={},f={};return e.incidents&&e.incidents.features&&this._collectGeometries(e.incidents.features,u,\"incidents.features\",c),e.facilities&&e.facilities.features&&this._collectGeometries(e.facilities.features,u,\"facilities.features\",c),e.pointBarriers&&e.pointBarriers.features&&this._collectGeometries(e.pointBarriers.features,u,\"pointBarriers.features\",c),e.polylineBarriers&&e.polylineBarriers.features&&this._collectGeometries(e.polylineBarriers.features,u,\"polylineBarriers.features\",c),e.polygonBarriers&&e.polygonBarriers.features&&this._collectGeometries(e.polygonBarriers.features,u,\"polygonBarriers.features\",c),o.normalizeCentralMeridian(u).then((function(e){for(var r in c){var t=c[r];a.push(r),f[r]=e.slice(t[0],t[1])}return n._isInputGeometryZAware(f,a)?n.getServiceDescription():s.resolve({dontCheck:!0})})).then((function(s){(\"dontCheck\"in s?s.dontCheck:s.hasZ)||n._dropZValuesOffInputGeometry(f,a);var o=function(r){f[r].forEach((function(t,i){e.get(r)[i].geometry=t}))};for(var u in f)o(u);var c={query:t.__assign(t.__assign(t.__assign({},n.parsedUrl.query),{f:\"json\"}),p.toQueryParams(e))};return(n.requestOptions||r)&&(c=t.__assign(t.__assign(t.__assign({},n.requestOptions),r),c)),i(n.parsedUrl.path+\"/solveClosestFacility\",c)})).then((function(e){return l.fromJSON(e.data)}))},r.prototype._collectGeometries=function(e,r,t,i){i[t]=[r.length,r.length+e.length],e.forEach((function(e){r.push(e.geometry)}))},t.__decorate([a.property()],r.prototype,\"url\",void 0),r=t.__decorate([a.subclass(\"esri.tasks.ClosestFacilityTask\")],r)}(c.NAServiceDescriptionMixin(u))}));"],"sourceRoot":""}