@arcgis/core 4.24.0-next.20220331 → 4.24.0-next.20220401
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/WebScene.js +1 -1
- package/analysis/LineOfSightAnalysisObserver.js +1 -1
- package/analysis/LineOfSightAnalysisTarget.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0eb9c9477d36cd212f8b.js +1 -0
- package/assets/esri/core/workers/chunks/10779a256841c37f2429.js +1 -0
- package/assets/esri/core/workers/chunks/125b14c2ccd96d7c20c2.js +1 -0
- package/assets/esri/core/workers/chunks/{19cb7315d403a4cd4f59.js → 2530e8ccf6e12787ce76.js} +1 -1
- package/assets/esri/core/workers/chunks/{302c68c5b91d1ab4fd47.js → 560234694f3e53802aff.js} +1 -1
- package/assets/esri/core/workers/chunks/5633710daeb3bbb79bcf.js +1 -0
- package/assets/esri/core/workers/chunks/6f7917da7166e8c6854b.js +1 -0
- package/assets/esri/core/workers/chunks/7388824eac8da01ea03d.js +1 -0
- package/assets/esri/core/workers/chunks/794b47764ebb0257ed41.js +1 -0
- package/assets/esri/core/workers/chunks/81e9d860a044acec74ce.js +1 -0
- package/assets/esri/core/workers/chunks/{9a32f129f0d67547e44c.js → 831dc0187f71e658550c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d162d1b7b97a58e97d8c.js → 8958cd555f4887526e8b.js} +1 -1
- package/assets/esri/core/workers/chunks/{e57b71ba70f088a3a052.js → 90dcd86cdef90099abfa.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5b54e134ae59629d6d1.js → 93067e27eea5844edc6c.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b63c9d5d9c004923a97.js → b26bd8fde2fc65bb67fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{b81e1df3a47b61421295.js → b34ba22c7a5adce8a7a2.js} +1 -1
- package/assets/esri/core/workers/chunks/c28f7ae4756ad1ba94bd.js +1 -0
- package/assets/esri/core/workers/chunks/{e1408ff1b8343674e6ef.js → c59b0b58e24e6a60cf3e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f4e79769297ad9c1d508.js → c7cee13a962396b23a5e.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb38754110b7a0e901f6.js → cd3679fa86129ebabfdf.js} +1 -1
- package/assets/esri/core/workers/chunks/{224c0e64160bdc170051.js → d076627bb7dadea89e89.js} +1 -1
- package/assets/esri/core/workers/chunks/e06ad3a3d71154fed654.js +1 -0
- package/assets/esri/core/workers/chunks/{7a77d4cd27c30f1a5cae.js → ee3387a43dfbb3df23e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{fbb7a121a45f8ca7d89c.js → f4fc165420d449e442b8.js} +1 -1
- package/assets/esri/themes/base/widgets/_Widget.scss +2 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/core/AsyncUpdate.js +1 -1
- package/exports/csv.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/interfaces.d.ts +120 -0
- package/layers/MapImageLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/SpriteSource.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/libs/i3s/I3SModule.js +1 -1
- package/libs/vxl/VxlModule.js +1 -1
- package/package.json +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/renderers/support/DictionaryLoader.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/rest/support/DirectionLine.js +1 -1
- package/rest/support/DirectionPoint.js +1 -1
- package/rest/support/PointBarrier.js +1 -1
- package/rest/support/PolygonBarrier.js +1 -1
- package/rest/support/PolylineBarrier.js +1 -1
- package/rest/support/RouteInfo.js +1 -1
- package/rest/support/Stop.js +1 -1
- package/smartMapping/labels/clusters.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
- package/support/elevationInfoUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/symbolLayerUtils.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/engine/webgl/util/Lock.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/support/webStyleUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/interactive/analysisTools/lineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
- package/views/3d/support/debugFlags.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/MapImageLayerView.js +1 -1
- package/views/layers/TileLayerView.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/113362697da1b69deaed.js +0 -1
- package/assets/esri/core/workers/chunks/1e590d63187ada4f5ff7.js +0 -1
- package/assets/esri/core/workers/chunks/391a330182c616cfffaf.js +0 -1
- package/assets/esri/core/workers/chunks/3a85312fd7d0cda9ce93.js +0 -1
- package/assets/esri/core/workers/chunks/3c00e38d3b16f4a53a4f.js +0 -1
- package/assets/esri/core/workers/chunks/4a82a6a473b3d540d0be.js +0 -1
- package/assets/esri/core/workers/chunks/5b4d9786c010d265346c.js +0 -1
- package/assets/esri/core/workers/chunks/bbfc98e33d4630eb9e5c.js +0 -1
- package/assets/esri/core/workers/chunks/bd725783b85f308e2c89.js +0 -1
- package/assets/esri/core/workers/chunks/d343f05a3366f95e0494.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../Color.js";import t from"../../request.js";import s from"../../core/Error.js";import o from"../../core/Logger.js";import i from"../../core/LRUCache.js";import{isSome as r}from"../../core/maybe.js";import{isAbortError as n}from"../../core/promiseUtils.js";import{numericHash as l}from"../../core/string.js";import{loadArcade as a,createDictionaryExpression as c}from"../../support/arcadeOnDemand.js";import m from"../../symbols/CIMSymbol.js";const f=o.getLogger("esri.renderers.support.DictionaryLoader"),h={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};class y{constructor(e,t,s){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new i(100),this.url=e,this.config=t,this.fieldMap=s}getSymbolFields(){return this._symbolFields}async getSymbolAsync(t,s){let o;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(s));try{o=await this._dictionaryPromise}catch(b){if(n(b))return this._dictionaryPromise=null,null}const i={};if(this.fieldMap)for(const e of this._symbolFields){const s=this.fieldMap[e];if(s&&null!=t.attributes[s]){const o=""+t.attributes[s];i[e]=o}else i[e]=""}const a=o(i,s);if(!a||"string"!=typeof a)return null;const c=l(a).toString(),m=this._symbolCache.get(c);if(m)return m.catch((()=>{this._symbolCache.pop(c)})),m;const f=a.split(";"),h=[],y=[];for(const r of f)if(r)if(r.includes("po:")){const t=r.substr(3).split("|");if(3===t.length){const s=t[0],o=t[1];let i=t[2];if("DashTemplate"===o)i=i.split(" ").map((e=>Number(e)));else if("Color"===o){const t=new e(i).toRgba();i=[t[0],t[1],t[2],255*t[3]]}else i=Number(i);y.push({primitiveName:s,propertyName:o,value:i})}}else if(r.includes("|")){for(const e of r.split("|"))if(this._itemNames.has(e)){h.push(e);break}}else this._itemNames.has(r)&&h.push(r);const u=!r(t.geometry)||!t.geometry.hasZ&&"point"===t.geometry.type,p=this._cimPartsToCIMSymbol(h,y,u,s);return this._symbolCache.put(c,p,1),p}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void f.error("no valid URL!");const o=r(e)?e.abortOptions:null,i=t(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},...o}),[{data:n}]=await Promise.all([i,a()]);if(!n)throw this._dictionaryPromise=null,new s("esri.renderers.DictionaryRenderer","Bad dictionary data!");const l=n.expression,m=n.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+n.cimRefTemplateUrl,this._itemNames=new Set(n.itemsNames),this._symbolFields=m.symbol;const h={};if(this.config){const e=this.config;for(const t in e)h[t]=e[t]}if(m.configuration)for(const t of m.configuration)h.hasOwnProperty(t.name)||(h[t.name]=t.value);const y=[];if(r(e)&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const s=this.fieldMap[t],o=e.fields.filter((e=>e.name===s));o.length>0&&y.push({...o[0],name:t})}return this._dictionaryPromise=c(l,r(e)?e.spatialReference:null,y,h).then((e=>{const t={scale:0};return(s,o)=>{const i=e.repurposeFeature({geometry:null,attributes:s});return t.scale=r(o)?o.scale:void 0,e.evaluate({$feature:i,$view:t})}})).catch((e=>(f.error("Creating dictinoary expression failed:",e),null))),this._dictionaryPromise}async _cimPartsToCIMSymbol(e,t,s,o){const i=new Array(e.length);for(let l=0;l<e.length;l++)i[l]=this._getSymbolPart(e[l],o);const r=await Promise.all(i),n=this.fieldMap;for(const l of r)u(l,n);return new m({data:this._combineSymbolParts(r,t,s)})}async _getSymbolPart(e,s){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const o=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),i=t(o,{responseType:"json",query:{f:"json"},...s});this._ongoingRequests.set(e,i);try{return(await i).data}catch(r){
|
|
5
|
+
import e from"../../Color.js";import t from"../../request.js";import s from"../../core/Error.js";import o from"../../core/Logger.js";import i from"../../core/LRUCache.js";import{isSome as r}from"../../core/maybe.js";import{isAbortError as n}from"../../core/promiseUtils.js";import{numericHash as l}from"../../core/string.js";import{loadArcade as a,createDictionaryExpression as c}from"../../support/arcadeOnDemand.js";import m from"../../symbols/CIMSymbol.js";const f=o.getLogger("esri.renderers.support.DictionaryLoader"),h={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};class y{constructor(e,t,s){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new i(100),this.url=e,this.config=t,this.fieldMap=s}getSymbolFields(){return this._symbolFields}async getSymbolAsync(t,s){let o;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(s));try{o=await this._dictionaryPromise}catch(b){if(n(b))return this._dictionaryPromise=null,null}const i={};if(this.fieldMap)for(const e of this._symbolFields){const s=this.fieldMap[e];if(s&&null!=t.attributes[s]){const o=""+t.attributes[s];i[e]=o}else i[e]=""}const a=o(i,s);if(!a||"string"!=typeof a)return null;const c=l(a).toString(),m=this._symbolCache.get(c);if(m)return m.catch((()=>{this._symbolCache.pop(c)})),m;const f=a.split(";"),h=[],y=[];for(const r of f)if(r)if(r.includes("po:")){const t=r.substr(3).split("|");if(3===t.length){const s=t[0],o=t[1];let i=t[2];if("DashTemplate"===o)i=i.split(" ").map((e=>Number(e)));else if("Color"===o){const t=new e(i).toRgba();i=[t[0],t[1],t[2],255*t[3]]}else i=Number(i);y.push({primitiveName:s,propertyName:o,value:i})}}else if(r.includes("|")){for(const e of r.split("|"))if(this._itemNames.has(e)){h.push(e);break}}else this._itemNames.has(r)&&h.push(r);const u=!r(t.geometry)||!t.geometry.hasZ&&"point"===t.geometry.type,p=this._cimPartsToCIMSymbol(h,y,u,s);return this._symbolCache.put(c,p,1),p}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void f.error("no valid URL!");const o=r(e)?e.abortOptions:null,i=t(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},...o}),[{data:n}]=await Promise.all([i,a()]);if(!n)throw this._dictionaryPromise=null,new s("esri.renderers.DictionaryRenderer","Bad dictionary data!");const l=n.expression,m=n.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+n.cimRefTemplateUrl,this._itemNames=new Set(n.itemsNames),this._symbolFields=m.symbol;const h={};if(this.config){const e=this.config;for(const t in e)h[t]=e[t]}if(m.configuration)for(const t of m.configuration)h.hasOwnProperty(t.name)||(h[t.name]=t.value);const y=[];if(r(e)&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const s=this.fieldMap[t],o=e.fields.filter((e=>e.name===s));o.length>0&&y.push({...o[0],name:t})}return this._dictionaryPromise=c(l,r(e)?e.spatialReference:null,y,h).then((e=>{const t={scale:0};return(s,o)=>{const i=e.repurposeFeature({geometry:null,attributes:s});return t.scale=r(o)?o.scale:void 0,e.evaluate({$feature:i,$view:t})}})).catch((e=>(f.error("Creating dictinoary expression failed:",e),null))),this._dictionaryPromise}async _cimPartsToCIMSymbol(e,t,s,o){const i=new Array(e.length);for(let l=0;l<e.length;l++)i[l]=this._getSymbolPart(e[l],o);const r=await Promise.all(i),n=this.fieldMap;for(const l of r)u(l,n);return new m({data:this._combineSymbolParts(r,t,s)})}async _getSymbolPart(e,s){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const o=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),i=t(o,{responseType:"json",query:{f:"json"},...s});this._ongoingRequests.set(e,i);try{return(await i).data}catch(r){throw this._ongoingRequests.delete(e),r}}_combineSymbolParts(e,t,s){if(!e||0===e.length)return null;const o={...e[0]};if(e.length>1){o.symbolLayers=[];for(const t of e){const e=t;o.symbolLayers.unshift(...e.symbolLayers)}}return s&&(o.callout=h),{type:"CIMSymbolReference",symbol:o,primitiveOverrides:t}}}function u(e,t){if(!e)return;const s=e.symbolLayers;if(!s)return;let o=s.length;for(;o--;){const e=s[o];if(e&&!1!==e.enable&&"CIMVectorMarker"===e.type)p(e,t)}}function p(e,t){const s=e.markerGraphics;if(s)for(const o of s){if(!o)continue;const e=o.symbol;if(e)switch(e.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":u(e,t);break;case"CIMTextSymbol":e.fieldMap=t}}}export{y as DictionaryLoader};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../request.js";import{isSome as t}from"../../../core/maybe.js";import{join as r,urlToObject as n}from"../../../core/urlUtils.js";import{getJsonType as i}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as o}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as a}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as s}from"./pbfQueryUtils.js";import{applyFeatureSetZUnitScaling as u}from"./queryZScale.js";const l="Layer does not support extent calculation.";function m(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}function y(e,r){const n=e.geometry,o=e.toJSON();delete o.compactGeometryEnabled,delete o.defaultSpatialReferenceEnabled;const a=o,s=e.outSpatialReference;let u,l;if(t(n)&&(u=n.spatialReference,l=n.spatialReference.wkid||JSON.stringify(n.spatialReference),a.geometryType=i(n),a.geometry=m(n,e.compactGeometryEnabled),a.inSR=l),o.groupByFieldsForStatistics&&(a.groupByFieldsForStatistics=o.groupByFieldsForStatistics.join(",")),o.objectIds&&(a.objectIds=o.objectIds.join(",")),o.orderByFields&&(a.orderByFields=o.orderByFields.join(",")),!o.outFields||!o.returnDistinctValues&&(null!=r&&r.returnCountOnly||null!=r&&r.returnExtentOnly||null!=r&&r.returnIdsOnly)?delete a.outFields:o.outFields.includes("*")?a.outFields="*":a.outFields=o.outFields.join(","),o.outSR?a.outSR=o.outSR.wkid||JSON.stringify(o.outSR):n&&(o.returnGeometry||o.returnCentroid)&&(a.outSR=a.inSR),o.returnGeometry&&delete o.returnGeometry,o.outStatistics&&(a.outStatistics=JSON.stringify(o.outStatistics)),o.pixelSize&&(a.pixelSize=JSON.stringify(o.pixelSize)),o.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&t(u)&&t(e.quantizationParameters)&&t(e.quantizationParameters.extent)&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete o.quantizationParameters.extent.spatialReference,a.quantizationParameters=JSON.stringify(o.quantizationParameters)),o.parameterValues&&(a.parameterValues=JSON.stringify(o.parameterValues)),o.rangeValues&&(a.rangeValues=JSON.stringify(o.rangeValues)),o.dynamicDataSource&&(a.layer=JSON.stringify({source:o.dynamicDataSource}),delete o.dynamicDataSource),o.timeExtent){const e=o.timeExtent,{start:t,end:r}=e;null==t&&null==r||(a.time=t===r?t:`${null==t?"null":t},${null==r?"null":r}`),delete o.timeExtent}return e.defaultSpatialReferenceEnabled&&t(u)&&t(s)&&u.equals(s)&&(a.defaultSR=a.inSR,delete a.inSR,delete a.outSR),a}async function c(e,r,n,i){const o=t(r.timeExtent)&&r.timeExtent.isEmpty?{data:{features:[]}}:await E(e,r,"json",i);return u(r,n,o.data),o}async function d(e,r,n,i){if(t(r.timeExtent)&&r.timeExtent.isEmpty)return
|
|
5
|
+
import e from"../../../request.js";import{isSome as t}from"../../../core/maybe.js";import{join as r,urlToObject as n}from"../../../core/urlUtils.js";import{getJsonType as i}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as o}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as a}from"../../operations/urlUtils.js";import{parsePBFFeatureQuery as s}from"./pbfQueryUtils.js";import{applyFeatureSetZUnitScaling as u}from"./queryZScale.js";const l="Layer does not support extent calculation.";function m(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}function y(e,r){const n=e.geometry,o=e.toJSON();delete o.compactGeometryEnabled,delete o.defaultSpatialReferenceEnabled;const a=o,s=e.outSpatialReference;let u,l;if(t(n)&&(u=n.spatialReference,l=n.spatialReference.wkid||JSON.stringify(n.spatialReference),a.geometryType=i(n),a.geometry=m(n,e.compactGeometryEnabled),a.inSR=l),o.groupByFieldsForStatistics&&(a.groupByFieldsForStatistics=o.groupByFieldsForStatistics.join(",")),o.objectIds&&(a.objectIds=o.objectIds.join(",")),o.orderByFields&&(a.orderByFields=o.orderByFields.join(",")),!o.outFields||!o.returnDistinctValues&&(null!=r&&r.returnCountOnly||null!=r&&r.returnExtentOnly||null!=r&&r.returnIdsOnly)?delete a.outFields:o.outFields.includes("*")?a.outFields="*":a.outFields=o.outFields.join(","),o.outSR?a.outSR=o.outSR.wkid||JSON.stringify(o.outSR):n&&(o.returnGeometry||o.returnCentroid)&&(a.outSR=a.inSR),o.returnGeometry&&delete o.returnGeometry,o.outStatistics&&(a.outStatistics=JSON.stringify(o.outStatistics)),o.pixelSize&&(a.pixelSize=JSON.stringify(o.pixelSize)),o.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&t(u)&&t(e.quantizationParameters)&&t(e.quantizationParameters.extent)&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete o.quantizationParameters.extent.spatialReference,a.quantizationParameters=JSON.stringify(o.quantizationParameters)),o.parameterValues&&(a.parameterValues=JSON.stringify(o.parameterValues)),o.rangeValues&&(a.rangeValues=JSON.stringify(o.rangeValues)),o.dynamicDataSource&&(a.layer=JSON.stringify({source:o.dynamicDataSource}),delete o.dynamicDataSource),o.timeExtent){const e=o.timeExtent,{start:t,end:r}=e;null==t&&null==r||(a.time=t===r?t:`${null==t?"null":t},${null==r?"null":r}`),delete o.timeExtent}return e.defaultSpatialReferenceEnabled&&t(u)&&t(s)&&u.equals(s)&&(a.defaultSR=a.inSR,delete a.inSR,delete a.outSR),a}async function c(e,r,n,i){const o=t(r.timeExtent)&&r.timeExtent.isEmpty?{data:{features:[]}}:await E(e,r,"json",i);return u(r,n,o.data),o}async function d(e,r,n,i){if(t(r.timeExtent)&&r.timeExtent.isEmpty)return{data:n.createFeatureResult()};const o=await f(e,r,i),a=o;return a.data=s(o.data,n),a}function f(e,t,r){return E(e,t,"pbf",r)}function p(e,r,n){return t(r.timeExtent)&&r.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):E(e,r,"json",n,{returnIdsOnly:!0})}function S(e,r,n){return t(r.timeExtent)&&r.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):E(e,r,"json",n,{returnIdsOnly:!0,returnCountOnly:!0})}function x(e,r,n){return t(r.timeExtent)&&r.timeExtent.isEmpty?Promise.resolve({data:{count:0,extent:null}}):E(e,r,"json",n,{returnExtentOnly:!0,returnCountOnly:!0}).then((e=>{const t=e.data;if(t.hasOwnProperty("extent"))return e;if(t.features)throw new Error(l);if(t.hasOwnProperty("count"))throw new Error(l);return e}))}function E(i,s,u,l={},m={}){const c="string"==typeof i?n(i):i,d=s.geometry?[s.geometry]:[];return l.responseType="pbf"===u?"array-buffer":"json",o(d,null,l).then((n=>{const i=n&&n[0];t(i)&&((s=s.clone()).geometry=i);const o=a({...c.query,f:u,...m,...y(s,m)});return e(r(c.path,"query"),{...l,query:{...o,...l.query}})}))}export{m as encodeGeometry,c as executeQuery,S as executeQueryForCount,x as executeQueryForExtent,p as executeQueryForIds,d as executeQueryPBF,f as executeQueryPBFBuffer,y as queryToQueryStringParameters,E as runQuery};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../request.js";import{isSome as e}from"../../../core/maybe.js";import{join as r,urlToObject as n}from"../../../core/urlUtils.js";import{getJsonType as o}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as i}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as
|
|
5
|
+
import t from"../../../request.js";import{isSome as e}from"../../../core/maybe.js";import{join as r,urlToObject as n}from"../../../core/urlUtils.js";import{getJsonType as o}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as i}from"../../../geometry/support/normalizeUtils.js";import{mapParameters as l}from"../../operations/urlUtils.js";import{applyFeatureSetZUnitScaling as s}from"./queryZScale.js";const u="Layer does not support extent calculation.";function y(t,r){var n,i;const l=t.geometry,s=t.toJSON(),u=s;if(e(l)&&(u.geometry=JSON.stringify(l),u.geometryType=o(l),u.inSR=l.spatialReference.wkid||JSON.stringify(l.spatialReference)),null!=(n=s.topFilter)&&n.groupByFields&&(u.topFilter.groupByFields=s.topFilter.groupByFields.join(",")),null!=(i=s.topFilter)&&i.orderByFields&&(u.topFilter.orderByFields=s.topFilter.orderByFields.join(",")),s.topFilter&&(u.topFilter=JSON.stringify(u.topFilter)),s.objectIds&&(u.objectIds=s.objectIds.join(",")),s.orderByFields&&(u.orderByFields=s.orderByFields.join(",")),s.outFields&&!(null!=r&&r.returnCountOnly||null!=r&&r.returnExtentOnly||null!=r&&r.returnIdsOnly)?s.outFields.includes("*")?u.outFields="*":u.outFields=s.outFields.join(","):delete u.outFields,s.outSR?u.outSR=s.outSR.wkid||JSON.stringify(s.outSR):l&&s.returnGeometry&&(u.outSR=u.inSR),s.returnGeometry&&delete s.returnGeometry,s.timeExtent){const t=s.timeExtent,{start:e,end:r}=t;null==e&&null==r||(u.time=e===r?e:`${null==e?"null":e},${null==r?"null":r}`),delete s.timeExtent}return u}async function d(t,e,r,n){const o=await c(t,e,"json",n);return s(e,r,o.data),o}async function m(t,r,n){return e(r.timeExtent)&&r.timeExtent.isEmpty?{data:{objectIds:[]}}:c(t,r,"json",n,{returnIdsOnly:!0})}async function p(t,r,n){return e(r.timeExtent)&&r.timeExtent.isEmpty?{data:{count:0,extent:null}}:c(t,r,"json",n,{returnExtentOnly:!0,returnCountOnly:!0}).then((t=>{const e=t.data;if(e.hasOwnProperty("extent"))return t;if(e.features)throw new Error(u);if(e.hasOwnProperty("count"))throw new Error(u);return t}))}function a(t,r,n){return e(r.timeExtent)&&r.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):c(t,r,"json",n,{returnIdsOnly:!0,returnCountOnly:!0})}function c(o,s,u,d={},m={}){const p="string"==typeof o?n(o):o,a=s.geometry?[s.geometry]:[];return d.responseType="pbf"===u?"array-buffer":"json",i(a,null,d).then((n=>{const o=n&&n[0];e(o)&&((s=s.clone()).geometry=o);const i=l({...p.query,f:u,...m,...y(s,m)});return t(r(p.path,"queryTopFeatures"),{...d,query:{...i,...d.query}})}))}export{a as executeQueryForTopCount,p as executeQueryForTopExtents,m as executeQueryForTopIds,d as executeTopFeaturesQuery,y as queryToQueryStringParameters};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import i from"../../PopupTemplate.js";import{symbolTypes as o}from"../../symbols.js";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as l}from"../../core/JSONSupport.js";import{isSome as s,unwrap as n}from"../../core/maybe.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import d from"../../geometry/Polyline.js";import{directionLineTypeJsonMap as m}from"./networkEnums.js";import{fromJSON as c}from"../../symbols/support/jsonUtils.js";var u;let b=u=class extends(r(l)){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 u({directionLineType:m.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:s(e.symbol)?c(e.symbol):null,toLevel:null!=(i=e.attributes.ToLevel)?i:null})}toGraphic(){const e={__OBJECTID:n(this.objectId),DirectionLineType:s(this.directionLineType)?m.toJSON(this.directionLineType):null,DirectionPointID:n(this.directionPointId),Meters:n(this.distance),Minutes:n(this.duration)};return s(this.fromLevel)&&(e.FromLevel=this.fromLevel),s(this.toLevel)&&(e.ToLevel=this.toLevel),new t({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:n(this.popupTemplate)})}};b.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}],b.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:[]},e([a({type:m.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:m.read}}})],b.prototype,"directionLineType",void 0),e([a({json:{read:{source:"attributes.DirectionPointID"}}})],b.prototype,"directionPointId",void 0),e([a({json:{read:{source:"attributes.Meters"}}})],b.prototype,"distance",void 0),e([a({json:{read:{source:"attributes.Minutes"}}})],b.prototype,"duration",void 0),e([a({json:{read:{source:"attributes.FromLevel"}}})],b.prototype,"fromLevel",void 0),e([a({type:d})],b.prototype,"geometry",void 0),e([a({json:{read:{source:"attributes.ObjectID"}}})],b.prototype,"objectId",void 0),e([a({type:i,json:{read:!1}})],b.prototype,"popupTemplate",void 0),e([a({types:o,json:{read:!1}})],b.prototype,"symbol",void 0),e([a({json:{read:{source:"attributes.ToLevel"}}})],b.prototype,"toLevel",void 0),b=u=e([p("esri.rest.support.DirectionLine")],b);const y=b;export{y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as a}from"../../core/JSONSupport.js";import{isSome as l,unwrap as o}from"../../core/maybe.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as n}from"../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Point.js";import{directionPointTypeJsonMap as d}from"./networkEnums.js";import{fromJSON as u}from"../../symbols/support/jsonUtils.js";var p;let c=p=class extends a{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 l(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromPortalJSON(e){var i,a,o,r,n,s,c,b,h,y,T,v,f;return new p({alternateName:null!=(i=e.attributes.AlternateName)?i:null,arrivalTime:l(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:null!=(a=e.attributes.ArrivalUTCOffset)?a:null,azimuth:null!=(o=e.attributes.Azimuth)?o:null,branchName:null!=(r=e.attributes.BranchName)?r:null,directionPointType:d.fromJSON(e.attributes.DirectionPointType),displayText:null!=(n=e.attributes.DisplayText)?n:null,exitName:null!=(s=e.attributes.ExitName)?s:null,geometry:m.fromJSON(e.geometry),intersectingName:null!=(c=e.attributes.IntersectingName)?c:null,level:null!=(b=e.attributes.Level)?b:null,name:null!=(h=e.attributes.Name)?h:null,objectId:e.attributes.__OBJECTID,popupTemplate:l(e.popupInfo)?t.fromJSON(e.popupInfo):null,sequence:e.attributes.Sequence,shortVoiceInstruction:null!=(y=e.attributes.ShortVoiceInstruction)?y:null,stopId:null!=(T=e.attributes.StopID)?T:null,symbol:l(e.symbol)?u(e.symbol):null,towardName:null!=(v=e.attributes.TowardName)?v:null,voiceInstruction:null!=(f=e.attributes.VoiceInstruction)?f:null})}toPortalJSON(){const e={geometry:l(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:o(this.objectId),DirectionPointType:l(this.directionPointType)?d.toJSON(this.directionPointType):null,Sequence:o(this.sequence),StopID:this.stopId},symbol:l(this.symbol)?this.symbol.toJSON():null,popupInfo:l(this.popupTemplate)?this.popupTemplate.toJSON():null};return l(this.alternateName)&&(e.attributes.AlternateName=this.alternateName),l(this.arrivalTime)&&(e.attributes.ArrivalTime=this.arrivalTime.getTime()),l(this.arrivalTimeOffset)&&(e.attributes.ArrivalUTCOffset=this.arrivalTimeOffset),l(this.azimuth)&&(e.attributes.Azimuth=this.azimuth),l(this.branchName)&&(e.attributes.BranchName=this.branchName),l(this.displayText)&&(e.attributes.DisplayText=this.displayText),l(this.exitName)&&(e.attributes.ExitName=this.exitName),l(this.intersectingName)&&(e.attributes.IntersectingName=this.intersectingName),l(this.level)&&(e.attributes.Level=this.level),l(this.name)&&(e.attributes.Name=this.name),l(this.shortVoiceInstruction)&&(e.attributes.ShortVoiceInstruction=this.shortVoiceInstruction),l(this.towardName)&&(e.attributes.TowardName=this.towardName),l(this.voiceInstruction)&&(e.attributes.VoiceInstruction=this.voiceInstruction),e}};c.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}],c.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:[]},e([r({json:{read:!1}})],c.prototype,"alternateName",void 0),e([r()],c.prototype,"arrivalTime",void 0),e([n("arrivalTime",["attributes.ArrivalTime"])],c.prototype,"readArrivalTime",null),e([r({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],c.prototype,"arrivalTimeOffset",void 0),e([r({json:{read:{source:"attributes.Azimuth"}}})],c.prototype,"azimuth",void 0),e([r({json:{read:{source:"attributes.BranchName"}}})],c.prototype,"branchName",void 0),e([r({type:d.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:d.read}}})],c.prototype,"directionPointType",void 0),e([r({json:{read:{source:"attributes.DisplayText"}}})],c.prototype,"displayText",void 0),e([r({json:{read:{source:"attributes.ExitName"}}})],c.prototype,"exitName",void 0),e([r({type:m})],c.prototype,"geometry",void 0),e([r({json:{read:!1}})],c.prototype,"intersectingName",void 0),e([r({json:{read:!1}})],c.prototype,"level",void 0),e([r({json:{read:{source:"attributes.Name"}}})],c.prototype,"name",void 0),e([r({json:{read:{source:"attributes.ObjectID"}}})],c.prototype,"objectId",void 0),e([r({type:t,json:{read:!1}})],c.prototype,"popupTemplate",void 0),e([r({json:{read:{source:"attributes.Sequence"}}})],c.prototype,"sequence",void 0),e([r({json:{read:!1}})],c.prototype,"shortVoiceInstruction",void 0),e([r({json:{read:{source:"attributes.StopID"}}})],c.prototype,"stopId",void 0),e([r({types:i,json:{read:!1}})],c.prototype,"symbol",void 0),e([r({json:{read:{source:"attributes.TowardName"}}})],c.prototype,"towardName",void 0),e([r({json:{read:!1}})],c.prototype,"voiceInstruction",void 0),c=p=e([s("esri.rest.support.DirectionPoint")],c);const b=c;export{b as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import i from"../../PopupTemplate.js";import{symbolTypes as a}from"../../symbols.js";import{ClonableMixin as l}from"../../core/Clonable.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isSome as r,unwrap as n}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as m}from"../../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import p from"../../geometry/Point.js";import{directionPointTypeJsonMap as u}from"./networkEnums.js";import{fromJSON as c}from"../../symbols/support/jsonUtils.js";var b;let h=b=class extends(l(o)){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 r(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){var t,i,a,l,o,n,s,m,d,p,h,y,T;return new b({alternateName:null!=(t=e.attributes.AlternateName)?t:null,arrivalTime:r(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:null!=(i=e.attributes.ArrivalUTCOffset)?i:null,azimuth:null!=(a=e.attributes.Azimuth)?a:null,branchName:null!=(l=e.attributes.BranchName)?l:null,directionPointType:u.fromJSON(e.attributes.DirectionPointType),displayText:null!=(o=e.attributes.DisplayText)?o:null,exitName:null!=(n=e.attributes.ExitName)?n:null,geometry:e.geometry,intersectingName:null!=(s=e.attributes.IntersectingName)?s:null,level:null!=(m=e.attributes.Level)?m:null,name:null!=(d=e.attributes.Name)?d:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:null!=(p=e.attributes.ShortVoiceInstruction)?p:null,stopId:null!=(h=e.attributes.StopID)?h:null,symbol:r(e.symbol)?c(e.symbol):null,towardName:null!=(y=e.attributes.TowardName)?y:null,voiceInstruction:null!=(T=e.attributes.VoiceInstruction)?T:null})}toGraphic(){const e={__OBJECTID:n(this.objectId),DirectionPointType:r(this.directionPointType)?u.toJSON(this.directionPointType):null,Sequence:n(this.sequence),StopID:this.stopId};return r(this.alternateName)&&(e.AlternateName=this.alternateName),r(this.arrivalTime)&&(e.ArrivalTime=this.arrivalTime.getTime()),r(this.arrivalTimeOffset)&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),r(this.azimuth)&&(e.Azimuth=this.azimuth),r(this.branchName)&&(e.BranchName=this.branchName),r(this.displayText)&&(e.DisplayText=this.displayText),r(this.exitName)&&(e.ExitName=this.exitName),r(this.intersectingName)&&(e.IntersectingName=this.intersectingName),r(this.level)&&(e.Level=this.level),r(this.name)&&(e.Name=this.name),r(this.shortVoiceInstruction)&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),r(this.towardName)&&(e.TowardName=this.towardName),r(this.voiceInstruction)&&(e.VoiceInstruction=this.voiceInstruction),new t({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:n(this.popupTemplate)})}};h.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}],h.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:[]},e([s({json:{read:!1}})],h.prototype,"alternateName",void 0),e([s()],h.prototype,"arrivalTime",void 0),e([m("arrivalTime",["attributes.ArrivalTime"])],h.prototype,"readArrivalTime",null),e([s({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],h.prototype,"arrivalTimeOffset",void 0),e([s({json:{read:{source:"attributes.Azimuth"}}})],h.prototype,"azimuth",void 0),e([s({json:{read:{source:"attributes.BranchName"}}})],h.prototype,"branchName",void 0),e([s({type:u.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:u.read}}})],h.prototype,"directionPointType",void 0),e([s({json:{read:{source:"attributes.DisplayText"}}})],h.prototype,"displayText",void 0),e([s({json:{read:{source:"attributes.ExitName"}}})],h.prototype,"exitName",void 0),e([s({type:p})],h.prototype,"geometry",void 0),e([s({json:{read:!1}})],h.prototype,"intersectingName",void 0),e([s({json:{read:!1}})],h.prototype,"level",void 0),e([s({json:{read:{source:"attributes.Name"}}})],h.prototype,"name",void 0),e([s({json:{read:{source:"attributes.ObjectID"}}})],h.prototype,"objectId",void 0),e([s({type:i,json:{read:!1}})],h.prototype,"popupTemplate",void 0),e([s({json:{read:{source:"attributes.Sequence"}}})],h.prototype,"sequence",void 0),e([s({json:{read:!1}})],h.prototype,"shortVoiceInstruction",void 0),e([s({json:{read:{source:"attributes.StopID"}}})],h.prototype,"stopId",void 0),e([s({types:a,json:{read:!1}})],h.prototype,"symbol",void 0),e([s({json:{read:{source:"attributes.TowardName"}}})],h.prototype,"towardName",void 0),e([s({json:{read:!1}})],h.prototype,"voiceInstruction",void 0),h=b=e([d("esri.rest.support.DirectionPoint")],h);const y=h;export{y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import{symbolTypes as o}from"../../symbols.js";import{ClonableMixin as s}from"../../core/Clonable.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import{isNone as a,isSome as l,unwrap as p}from"../../core/maybe.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as u}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../../core/accessorSupport/decorators/writer.js";import c from"../../geometry/Point.js";import{getPrefixedProperties as b}from"../route/utils.js";import{barrierTypeJsonMap as y,curbApproachJsonMap as h,fullEdgeJsonMap as f,statusJsonMap as j,sideOfEdgeJsonMap as T}from"./networkEnums.js";import{fromJSON as g}from"../../symbols/support/jsonUtils.js";var C;let S=C=class extends(s(i)){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 b(t.attributes,"Attr_")}writeCosts(e,t){if(!a(e)){t.attributes||(t.attributes={});for(const r in e)t.attributes[`Attr_${r}`]=e[r]}}static fromGraphic(e){var t,r;return new C({addedCost:null!=(t=e.attributes.AddedCost)?t:null,barrierType:l(e.attributes.BarrierType)?y.fromJSON(e.attributes.BarrierType):null,costs:l(e.attributes.Costs)?JSON.parse(e.attributes.Costs):null,curbApproach:l(e.attributes.CurbApproach)?h.fromJSON(e.attributes.CurbApproach):null,fullEdge:l(e.attributes.FullEdge)?f.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:null!=(r=e.attributes.Name)?r:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:l(e.attributes.Status)?j.fromJSON(e.attributes.Status):null,symbol:l(e.symbol)?g(e.symbol):null})}toGraphic(){const e={__OBJECTID:p(this.objectId),AddedCost:this.addedCost,BarrierType:l(this.barrierType)?y.toJSON(this.barrierType):null,Costs:l(this.costs)?JSON.stringify(this.costs):null,CurbApproach:l(this.curbApproach)?h.toJSON(this.curbApproach):null,FullEdge:l(this.fullEdge)?f.toJSON(this.fullEdge):null,Name:this.name,Status:l(this.status)?j.toJSON(this.status):null};return new t({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:p(this.popupTemplate)})}};S.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}]}}],S.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:[]},e([d({json:{read:!1}})],S.prototype,"addedCost",void 0),e([d({type:y.apiValues,json:{name:"attributes.BarrierType",read:{reader:y.read},write:{writer:y.write}}})],S.prototype,"barrierType",void 0),e([d()],S.prototype,"costs",void 0),e([u("costs",["attributes"])],S.prototype,"readCosts",null),e([m("costs")],S.prototype,"writeCosts",null),e([d({type:h.apiValues,json:{read:{source:"attributes.CurbApproach",reader:h.read}}})],S.prototype,"curbApproach",void 0),e([d({type:f.apiValues,json:{name:"attributes.FullEdge",read:{reader:f.read},write:{writer:f.write}}})],S.prototype,"fullEdge",void 0),e([d({type:c,json:{write:!0}})],S.prototype,"geometry",void 0),e([d({json:{name:"attributes.Name",write:!0}})],S.prototype,"name",void 0),e([d({json:{name:"attributes.ObjectID",write:!0}})],S.prototype,"objectId",void 0),e([d({type:r,json:{read:!1}})],S.prototype,"popupTemplate",void 0),e([d({type:T.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:T.read}}})],S.prototype,"sideOfEdge",void 0),e([d({json:{read:{source:"attributes.SourceID"}}})],S.prototype,"sourceId",void 0),e([d({json:{read:{source:"attributes.SourceOID"}}})],S.prototype,"sourceOid",void 0),e([d({type:j.apiValues,json:{read:{source:"attributes.Status",reader:j.read}}})],S.prototype,"status",void 0),e([d({types:o,json:{read:!1}})],S.prototype,"symbol",void 0),S=C=e([n("esri.rest.support.PointBarrier")],S);const N=S;export{N as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import{symbolTypes as o}from"../../symbols.js";import{ClonableMixin as s}from"../../core/Clonable.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import{isNone as a,isSome as l,unwrap as p}from"../../core/maybe.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as m}from"../../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../../core/accessorSupport/decorators/subclass.js";import{writer as c}from"../../core/accessorSupport/decorators/writer.js";import b from"../../geometry/Polygon.js";import{getPrefixedProperties as d}from"../route/utils.js";import{barrierTypeJsonMap as y}from"./networkEnums.js";import{fromJSON as f}from"../../symbols/support/jsonUtils.js";var j;let T=j=class extends(s(i)){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 d(t.attributes,"Attr_")}writeCosts(e,t){if(!a(e)){t.attributes||(t.attributes={});for(const r in e)t.attributes[`Attr_${r}`]=e[r]}}static fromGraphic(e){var t,r;return new j({barrierType:l(e.attributes.BarrierType)?y.fromJSON(e.attributes.BarrierType):null,costs:l(e.attributes.Costs)?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!=(r=e.attributes.ScaleFactor)?r:null,symbol:l(e.symbol)?f(e.symbol):null})}toGraphic(){var e,r;const o={__OBJECTID:p(this.objectId),BarrierType:l(this.barrierType)?y.toJSON(this.barrierType):null,Costs:l(this.costs)?JSON.stringify(this.costs):null,Name:null!=(e=this.name)?e:null,ScaleFactor:null!=(r=this.scaleFactor)?r:null};return new t({geometry:this.geometry,attributes:o,symbol:this.symbol,popupTemplate:p(this.popupTemplate)})}};T.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}],T.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:[]},e([n({type:y.apiValues,json:{name:"attributes.BarrierType",read:{reader:y.read},write:{writer:y.write}}})],T.prototype,"barrierType",void 0),e([n()],T.prototype,"costs",void 0),e([m("costs",["attributes"])],T.prototype,"readCosts",null),e([c("costs")],T.prototype,"writeCosts",null),e([n({type:b,json:{write:!0}})],T.prototype,"geometry",void 0),e([n({json:{name:"attributes.Name",write:!0}})],T.prototype,"name",void 0),e([n({json:{name:"attributes.ObjectID",write:!0}})],T.prototype,"objectId",void 0),e([n({type:r,json:{read:!1}})],T.prototype,"popupTemplate",void 0),e([n({json:{read:!1}})],T.prototype,"scaleFactor",void 0),e([n({types:o,json:{read:!1}})],T.prototype,"symbol",void 0),T=j=e([u("esri.rest.support.PolygonBarrier")],T);const h=T;export{h as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as o}from"../../symbols.js";import{
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import{symbolTypes as o}from"../../symbols.js";import{ClonableMixin as s}from"../../core/Clonable.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import{isSome as a,unwrap as l}from"../../core/maybe.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as m}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../geometry/Polyline.js";import{getPrefixedProperties as u}from"../route/utils.js";import{barrierTypeJsonMap as d}from"./networkEnums.js";import{fromJSON as b}from"../../symbols/support/jsonUtils.js";var y;let T=y=class extends(s(i)){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 u(t.attributes,"Attr_")}static fromGraphic(e){var t,r;return new y({barrierType:a(e.attributes.BarrierType)?d.fromJSON(e.attributes.BarrierType):null,costs:a(e.attributes.Costs)?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!=(r=e.attributes.ScaleFactor)?r:null,symbol:a(e.symbol)?b(e.symbol):null})}toGraphic(){const e={__OBJECTID:l(this.objectId),BarrierType:a(this.barrierType)?d.toJSON(this.barrierType):null,Costs:a(this.costs)?JSON.stringify(this.costs):null,Name:this.name,ScaleFactor:this.scaleFactor};return new t({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:l(this.popupTemplate)})}};T.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}],T.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:[]},e([p({type:d.apiValues,json:{read:{source:"attributes.BarrierType",reader:d.read}}})],T.prototype,"barrierType",void 0),e([p()],T.prototype,"costs",void 0),e([m("costs",["attributes"])],T.prototype,"readCosts",null),e([p({type:c,json:{write:!0}})],T.prototype,"geometry",void 0),e([p({json:{name:"attributes.Name",write:!0}})],T.prototype,"name",void 0),e([p({json:{name:"attributes.ObjectID",write:!0}})],T.prototype,"objectId",void 0),e([p({type:r,json:{read:!1}})],T.prototype,"popupTemplate",void 0),e([p({json:{read:!1}})],T.prototype,"scaleFactor",void 0),e([p({types:o,json:{read:!1}})],T.prototype,"symbol",void 0),T=y=e([n("esri.rest.support.PolylineBarrier")],T);const j=T;export{j as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../PopupTemplate.js";import{symbolTypes as
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../Graphic.js";import i from"../../PopupTemplate.js";import{symbolTypes as s}from"../../symbols.js";import{ClonableMixin as a}from"../../core/Clonable.js";import{JSONSupport as l}from"../../core/JSONSupport.js";import{isSome as o,unwrap as r}from"../../core/maybe.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Polyline.js";import{getTimezoneOffset as d,getPrefixedProperties as b}from"../route/utils.js";import T from"./RouteSettings.js";import{fromJSON as f}from"../../symbols/support/jsonUtils.js";var y;let S=y=class extends(a(l)){constructor(t){super(t),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(t,e){return o(e.attributes.EndTimeUTC)?new Date(e.attributes.EndTimeUTC):null}readEndTimeOffset(t,e){return d(e.attributes.EndTime,e.attributes.EndTimeUTC)}readStartTime(t,e){return o(e.attributes.StartTimeUTC)?new Date(e.attributes.StartTimeUTC):null}readStartTimeOffset(t,e){return d(e.attributes.StartTime,e.attributes.StartTimeUTC)}readTotalCosts(t,e){return b(e.attributes,"Total_")}readTotalViolations(t,e){return b(e.attributes,"TotalViolation_")}readTotalWait(t,e){return b(e.attributes,"TotalWait_")}static fromGraphic(t){var e,i,s,a,l,r;return new y({analysisSettings:o(t.attributes.AnalysisSettings)?T.fromJSON(JSON.parse(t.attributes.AnalysisSettings)):null,endTime:o(t.attributes.EndTime)?new Date(t.attributes.EndTime):null,endTimeOffset:null!=(e=t.attributes.EndUTCOffset)?e:null,geometry:t.geometry,messages:o(t.attributes.Messages)?JSON.parse(t.attributes.Messages):null,name:t.attributes.RouteName,objectId:t.attributes.__OBJECTID,popupTemplate:t.popupTemplate,startTime:o(t.attributes.StartTime)?new Date(t.attributes.StartTime):null,startTimeOffset:null!=(i=t.attributes.StartUTCOffset)?i:null,symbol:o(t.symbol)?f(t.symbol):null,totalCosts:o(t.attributes.TotalCosts)?JSON.parse(t.attributes.TotalCosts):null,totalDistance:null!=(s=t.attributes.TotalMeters)?s:null,totalDuration:null!=(a=t.attributes.TotalMinutes)?a:null,totalLateDuration:null!=(l=t.attributes.TotalLateMinutes)?l:null,totalWaitDuration:null!=(r=t.attributes.TotalWaitMinutes)?r:null,version:t.attributes.Version})}toGraphic(){const t={__OBJECTID:r(this.objectId),AnalysisSettings:o(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:o(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:o(this.messages)?JSON.stringify(this.messages):null,RouteName:r(this.name),StartTime:o(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:o(this.totalCosts)?JSON.stringify(this.totalCosts):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:r(this.version)};return new e({geometry:this.geometry,attributes:t,symbol:this.symbol,popupTemplate:r(this.popupTemplate)})}};S.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}],S.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:[]},t([n({json:{read:!1}})],S.prototype,"analysisSettings",void 0),t([n()],S.prototype,"endTime",void 0),t([p("endTime",["attributes.EndTimeUTC"])],S.prototype,"readEndTime",null),t([n()],S.prototype,"endTimeOffset",void 0),t([p("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],S.prototype,"readEndTimeOffset",null),t([n({json:{read:{source:"attributes.FirstStopID"}}})],S.prototype,"firstStopId",void 0),t([n({type:m})],S.prototype,"geometry",void 0),t([n({json:{read:{source:"attributes.LastStopID"}}})],S.prototype,"lastStopId",void 0),t([n({json:{read:!1}})],S.prototype,"messages",void 0),t([n({json:{read:{source:"attributes.Name"}}})],S.prototype,"name",void 0),t([n({json:{read:{source:"attributes.ObjectID"}}})],S.prototype,"objectId",void 0),t([n({type:i,json:{read:!1}})],S.prototype,"popupTemplate",void 0),t([n()],S.prototype,"startTime",void 0),t([p("startTime",["attributes.StartTimeUTC"])],S.prototype,"readStartTime",null),t([n()],S.prototype,"startTimeOffset",void 0),t([p("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],S.prototype,"readStartTimeOffset",null),t([n({json:{read:{source:"attributes.StopCount"}}})],S.prototype,"stopCount",void 0),t([n({types:s,json:{read:!1}})],S.prototype,"symbol",void 0),t([n()],S.prototype,"totalCosts",void 0),t([p("totalCosts",["attributes"])],S.prototype,"readTotalCosts",null),t([n({json:{read:!1}})],S.prototype,"totalDistance",void 0),t([n({json:{read:!1}})],S.prototype,"totalDuration",void 0),t([n({json:{read:!1}})],S.prototype,"totalLateDuration",void 0),t([n()],S.prototype,"totalViolations",void 0),t([p("totalViolations",["attributes"])],S.prototype,"readTotalViolations",null),t([n()],S.prototype,"totalWait",void 0),t([p("totalWait",["attributes"])],S.prototype,"readTotalWait",null),t([n({json:{read:!1}})],S.prototype,"totalWaitDuration",void 0),t([n({json:{read:!1}})],S.prototype,"version",void 0),S=y=t([u("esri.rest.support.RouteInfo")],S);const g=S;export{g as default};
|
package/rest/support/Stop.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as a}from"../../core/lang.js";import{isNone as s,isSome as o,unwrap as l}from"../../core/maybe.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{reader as u}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as d}from"../../core/accessorSupport/decorators/writer.js";import m from"../../geometry/Point.js";import{getTimezoneOffset as b,getPrefixedProperties as c}from"../route/utils.js";import{curbApproachJsonMap as v,locationTypeJsonMap as h,sideOfEdgeJsonMap as f,statusJsonMap as T}from"./networkEnums.js";import{fromJSON as y}from"../../symbols/support/jsonUtils.js";var C;let S=C=class extends r{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 b(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return c(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return b(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return c(t.attributes,"Attr_")}writeServiceCosts(e,t){if(!s(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes[`Attr_${i}`]=e[i]}}writeTimeWindowEnd(e,t){s(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){s(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return c(t.attributes,"Violation_")}readWait(e,t){return c(t.attributes,"Wait_")}static fromPortalJSON(e){var i,r,a,s,l,n,u,p,d,b;return new C({arriveCurbApproach:o(e.attributes.ArrivalCurbApproach)?v.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:o(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:o(e.attributes.CumulativeCosts)?JSON.parse(e.attributes.CumulativeCosts):null,cumulativeDistance:null!=(i=e.attributes.CumulativeMeters)?i:null,cumulativeDuration:null!=(r=e.attributes.CumulativeMinutes)?r:null,curbApproach:o(e.attributes.CurbApproach)?v.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:o(e.attributes.DepartureCurbApproach)?v.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:o(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:null!=(a=e.attributes.DepartureUTCOffset)?a:null,geometry:m.fromJSON(e.geometry),lateDuration:null!=(s=e.attributes.LateMinutes)?s:null,locationType:o(e.attributes.LocationType)?h.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:o(e.popupInfo)?t.fromJSON(e.popupInfo):null,routeName:e.attributes.RouteName,sequence:null!=(l=e.attributes.Sequence)?l:null,serviceCosts:o(e.attributes.ServiceCosts)?JSON.parse(e.attributes.ServiceCosts):null,serviceDistance:null!=(n=e.attributes.ServiceMeters)?n:null,serviceDuration:null!=(u=e.attributes.ServiceMinutes)?u:null,status:o(e.attributes.Status)?T.fromJSON(e.attributes.Status):null,symbol:o(e.symbol)?y(e.symbol):null,timeWindowEnd:o(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:null!=(p=e.attributes.TimeWindowEndUTCOffset)?p:null,timeWindowStart:o(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:null!=(d=e.attributes.TimeWindowStartUTCOffset)?d:null,waitDuration:null!=(b=e.attributes.WaitMinutes)?b:null})}clone(){return new C(a({arriveCurbApproach:this.arriveCurbApproach,arriveTime:this.arriveTime,arriveTimeOffset:this.arriveTimeOffset,bearing:this.bearing,bearingTol:this.bearingTol,cumulativeCosts:this.cumulativeCosts,cumulativeDistance:this.cumulativeDistance,cumulativeTime:this.cumulativeDuration,curbApproach:this.curbApproach,departCurbApproach:this.departCurbApproach,departTime:this.departTime,departTimeOffset:this.departTimeOffset,distanceToNetworkInMeters:this.distanceToNetworkInMeters,geometry:this.geometry,lateDuration:this.lateDuration,locationType:this.locationType,name:this.name,navLatency:this.navLatency,objectId:this.objectId,popupTemplate:this.popupTemplate,posAlong:this.posAlong,routeName:this.routeName,serviceCosts:this.serviceCosts,serviceDistance:this.serviceDistance,serviceDuration:this.serviceDuration,sequence:this.sequence,sideOfEdge:this.sideOfEdge,snapX:this.snapX,snapY:this.snapY,snapZ:this.snapZ,sourceId:this.sourceId,sourceOid:this.sourceOid,status:this.status,symbol:this.symbol,timeWindowEnd:this.timeWindowEnd,timeWindowEndOffset:this.timeWindowEndOffset,timeWindowStart:this.timeWindowStart,timeWindowStartOffset:this.timeWindowStartOffset,waitDuration:this.waitDuration}))}toPortalJSON(){var e,t;return{geometry:o(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:l(this.objectId),ArrivalCurbApproach:o(this.arriveCurbApproach)?v.toJSON(this.arriveCurbApproach):null,ArrivalTime:o(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:o(this.cumulativeCosts)?JSON.stringify(this.cumulativeCosts):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:o(this.curbApproach)?v.toJSON(this.curbApproach):null,DepartureCurbApproach:o(this.departCurbApproach)?v.toJSON(this.departCurbApproach):null,DepartureTime:o(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:o(this.locationType)?h.toJSON(this.locationType):null,Name:l(this.name),RouteName:l(this.routeName),Sequence:this.sequence,ServiceCosts:o(this.serviceCosts)?JSON.stringify(this.serviceCosts):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:o(this.status)?T.toJSON(this.status):null,TimeWindowEnd:o(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:null!=(e=this.timeWindowEndOffset)?e:this.arriveTimeOffset,TimeWindowStart:o(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:null!=(t=this.timeWindowEndOffset)?t:this.arriveTimeOffset,WaitMinutes:this.waitDuration},symbol:o(this.symbol)?this.symbol.toJSON():null,popupInfo:o(this.popupTemplate)?this.popupTemplate.toJSON():null}}};S.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}],S.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:[]},e([n({type:v.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:v.read}}})],S.prototype,"arriveCurbApproach",void 0),e([n({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],S.prototype,"arriveTime",void 0),e([n()],S.prototype,"arriveTimeOffset",void 0),e([u("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],S.prototype,"readArriveTimeOffset",null),e([n({json:{name:"attributes.Bearing",read:!1,write:!0}})],S.prototype,"bearing",void 0),e([n({json:{name:"attributes.BearingTol",read:!1,write:!0}})],S.prototype,"bearingTol",void 0),e([n()],S.prototype,"cumulativeCosts",void 0),e([u("cumulativeCosts",["attributes"])],S.prototype,"readCumulativeCosts",null),e([n({json:{read:!1}})],S.prototype,"cumulativeDistance",void 0),e([n({json:{read:!1}})],S.prototype,"cumulativeDuration",void 0),e([n({type:v.apiValues,json:{name:"attributes.CurbApproach",read:{reader:v.read},write:{writer:v.write}}})],S.prototype,"curbApproach",void 0),e([n({type:v.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:v.read}}})],S.prototype,"departCurbApproach",void 0),e([n({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],S.prototype,"departTime",void 0),e([n()],S.prototype,"departTimeOffset",void 0),e([u("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],S.prototype,"readDepartTimeOffset",null),e([n({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],S.prototype,"distanceToNetworkInMeters",void 0),e([n({type:m,json:{write:!0}})],S.prototype,"geometry",void 0),e([n({json:{name:"attributes.LateMinutes",read:!1}})],S.prototype,"lateDuration",void 0),e([n({type:h.apiValues,json:{name:"attributes.LocationType",read:{reader:h.read},write:{writer:h.write}}})],S.prototype,"locationType",void 0),e([n({json:{name:"attributes.Name",write:!0}})],S.prototype,"name",void 0),e([n({json:{read:{source:"attributes.NavLatency"}}})],S.prototype,"navLatency",void 0),e([n({json:{name:"attributes.ObjectID",write:!0}})],S.prototype,"objectId",void 0),e([n({type:t,json:{read:!1}})],S.prototype,"popupTemplate",void 0),e([n({json:{read:{source:"attributes.PosAlong"}}})],S.prototype,"posAlong",void 0),e([n({json:{name:"attributes.RouteName",write:!0}})],S.prototype,"routeName",void 0),e([n()],S.prototype,"serviceCosts",void 0),e([u("serviceCosts",["attributes"])],S.prototype,"readServiceCosts",null),e([d("serviceCosts")],S.prototype,"writeServiceCosts",null),e([n({json:{read:!1}})],S.prototype,"serviceDistance",void 0),e([n({json:{read:!1}})],S.prototype,"serviceDuration",void 0),e([n({json:{name:"attributes.Sequence",write:!0}})],S.prototype,"sequence",void 0),e([n({type:f.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:f.read}}})],S.prototype,"sideOfEdge",void 0),e([n({json:{read:{source:"attributes.SnapX"}}})],S.prototype,"snapX",void 0),e([n({json:{read:{source:"attributes.SnapY"}}})],S.prototype,"snapY",void 0),e([n({json:{read:{source:"attributes.SnapZ"}}})],S.prototype,"snapZ",void 0),e([n({json:{read:{source:"attributes.SourceID"}}})],S.prototype,"sourceId",void 0),e([n({json:{read:{source:"attributes.SourceOID"}}})],S.prototype,"sourceOid",void 0),e([n({type:T.apiValues,json:{read:{source:"attributes.Status",reader:T.read}}})],S.prototype,"status",void 0),e([n({types:i,json:{read:!1}})],S.prototype,"symbol",void 0),e([n({type:Date,json:{name:"attributes.TimeWindowEnd"}})],S.prototype,"timeWindowEnd",void 0),e([d("timeWindowEnd")],S.prototype,"writeTimeWindowEnd",null),e([n({json:{read:!1}})],S.prototype,"timeWindowEndOffset",void 0),e([n({type:Date,json:{name:"attributes.TimeWindowStart"}})],S.prototype,"timeWindowStart",void 0),e([d("timeWindowStart")],S.prototype,"writeTimeWindowStart",null),e([n({json:{read:!1}})],S.prototype,"timeWindowStartOffset",void 0),e([n()],S.prototype,"violations",void 0),e([u("violations",["attributes"])],S.prototype,"readViolations",null),e([n({json:{read:!1}})],S.prototype,"waitDuration",void 0),e([n()],S.prototype,"wait",void 0),e([u("wait",["attributes"])],S.prototype,"readWait",null),S=C=e([p("esri.rest.support.Stop")],S);const O=S;export{O as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import i from"../../PopupTemplate.js";import{symbolTypes as r}from"../../symbols.js";import{ClonableMixin as a}from"../../core/Clonable.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isNone as s,isSome as l,unwrap as n}from"../../core/maybe.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../../core/accessorSupport/decorators/writer.js";import b from"../../geometry/Point.js";import{getTimezoneOffset as c,getPrefixedProperties as v}from"../route/utils.js";import{curbApproachJsonMap as T,locationTypeJsonMap as f,statusJsonMap as h,sideOfEdgeJsonMap as y}from"./networkEnums.js";import{fromJSON as C}from"../../symbols/support/jsonUtils.js";var S;let O=S=class extends(a(o)){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 c(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return v(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return c(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return v(t.attributes,"Attr_")}writeServiceCosts(e,t){if(!s(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes[`Attr_${i}`]=e[i]}}writeTimeWindowEnd(e,t){s(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){s(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return v(t.attributes,"Violation_")}readWait(e,t){return v(t.attributes,"Wait_")}static fromGraphic(e){var t,i,r,a,o,s,n,u,p,d;return new S({arriveCurbApproach:l(e.attributes.ArrivalCurbApproach)?T.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:l(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:l(e.attributes.CumulativeCosts)?JSON.parse(e.attributes.CumulativeCosts):null,cumulativeDistance:null!=(t=e.attributes.CumulativeMeters)?t:null,cumulativeDuration:null!=(i=e.attributes.CumulativeMinutes)?i:null,curbApproach:l(e.attributes.CurbApproach)?T.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:l(e.attributes.DepartureCurbApproach)?T.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:l(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:null!=(r=e.attributes.DepartureUTCOffset)?r:null,geometry:e.geometry,lateDuration:null!=(a=e.attributes.LateMinutes)?a:null,locationType:l(e.attributes.LocationType)?f.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:null!=(o=e.attributes.Sequence)?o:null,serviceCosts:l(e.attributes.ServiceCosts)?JSON.parse(e.attributes.ServiceCosts):null,serviceDistance:null!=(s=e.attributes.ServiceMeters)?s:null,serviceDuration:null!=(n=e.attributes.ServiceMinutes)?n:null,status:l(e.attributes.Status)?h.fromJSON(e.attributes.Status):null,symbol:l(e.symbol)?C(e.symbol):null,timeWindowEnd:l(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:null!=(u=e.attributes.TimeWindowEndUTCOffset)?u:null,timeWindowStart:l(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:null!=(p=e.attributes.TimeWindowStartUTCOffset)?p:null,waitDuration:null!=(d=e.attributes.WaitMinutes)?d:null})}toGraphic(){var e,i;const r={__OBJECTID:n(this.objectId),ArrivalCurbApproach:l(this.arriveCurbApproach)?T.toJSON(this.arriveCurbApproach):null,ArrivalTime:l(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:l(this.cumulativeCosts)?JSON.stringify(this.cumulativeCosts):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:l(this.curbApproach)?T.toJSON(this.curbApproach):null,DepartureCurbApproach:l(this.departCurbApproach)?T.toJSON(this.departCurbApproach):null,DepartureTime:l(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:l(this.locationType)?f.toJSON(this.locationType):null,Name:n(this.name),RouteName:n(this.routeName),Sequence:this.sequence,ServiceCosts:l(this.serviceCosts)?JSON.stringify(this.serviceCosts):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:l(this.status)?h.toJSON(this.status):null,TimeWindowEnd:l(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:null!=(e=this.timeWindowEndOffset)?e:this.arriveTimeOffset,TimeWindowStart:l(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:null!=(i=this.timeWindowEndOffset)?i:this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new t({geometry:this.geometry,attributes:r,symbol:this.symbol,popupTemplate:n(this.popupTemplate)})}};O.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}],O.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:[]},e([u({type:T.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:T.read}}})],O.prototype,"arriveCurbApproach",void 0),e([u({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],O.prototype,"arriveTime",void 0),e([u()],O.prototype,"arriveTimeOffset",void 0),e([p("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],O.prototype,"readArriveTimeOffset",null),e([u({json:{name:"attributes.Bearing",read:!1,write:!0}})],O.prototype,"bearing",void 0),e([u({json:{name:"attributes.BearingTol",read:!1,write:!0}})],O.prototype,"bearingTol",void 0),e([u()],O.prototype,"cumulativeCosts",void 0),e([p("cumulativeCosts",["attributes"])],O.prototype,"readCumulativeCosts",null),e([u({json:{read:!1}})],O.prototype,"cumulativeDistance",void 0),e([u({json:{read:!1}})],O.prototype,"cumulativeDuration",void 0),e([u({type:T.apiValues,json:{name:"attributes.CurbApproach",read:{reader:T.read},write:{writer:T.write}}})],O.prototype,"curbApproach",void 0),e([u({type:T.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:T.read}}})],O.prototype,"departCurbApproach",void 0),e([u({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],O.prototype,"departTime",void 0),e([u()],O.prototype,"departTimeOffset",void 0),e([p("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],O.prototype,"readDepartTimeOffset",null),e([u({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],O.prototype,"distanceToNetworkInMeters",void 0),e([u({type:b,json:{write:!0}})],O.prototype,"geometry",void 0),e([u({json:{name:"attributes.LateMinutes",read:!1}})],O.prototype,"lateDuration",void 0),e([u({type:f.apiValues,json:{name:"attributes.LocationType",read:{reader:f.read},write:{writer:f.write}}})],O.prototype,"locationType",void 0),e([u({json:{name:"attributes.Name",write:!0}})],O.prototype,"name",void 0),e([u({json:{read:{source:"attributes.NavLatency"}}})],O.prototype,"navLatency",void 0),e([u({json:{name:"attributes.ObjectID",write:!0}})],O.prototype,"objectId",void 0),e([u({type:i,json:{read:!1}})],O.prototype,"popupTemplate",void 0),e([u({json:{read:{source:"attributes.PosAlong"}}})],O.prototype,"posAlong",void 0),e([u({json:{name:"attributes.RouteName",write:!0}})],O.prototype,"routeName",void 0),e([u()],O.prototype,"serviceCosts",void 0),e([p("serviceCosts",["attributes"])],O.prototype,"readServiceCosts",null),e([m("serviceCosts")],O.prototype,"writeServiceCosts",null),e([u({json:{read:!1}})],O.prototype,"serviceDistance",void 0),e([u({json:{read:!1}})],O.prototype,"serviceDuration",void 0),e([u({json:{name:"attributes.Sequence",write:!0}})],O.prototype,"sequence",void 0),e([u({type:y.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:y.read}}})],O.prototype,"sideOfEdge",void 0),e([u({json:{read:{source:"attributes.SnapX"}}})],O.prototype,"snapX",void 0),e([u({json:{read:{source:"attributes.SnapY"}}})],O.prototype,"snapY",void 0),e([u({json:{read:{source:"attributes.SnapZ"}}})],O.prototype,"snapZ",void 0),e([u({json:{read:{source:"attributes.SourceID"}}})],O.prototype,"sourceId",void 0),e([u({json:{read:{source:"attributes.SourceOID"}}})],O.prototype,"sourceOid",void 0),e([u({type:h.apiValues,json:{read:{source:"attributes.Status",reader:h.read}}})],O.prototype,"status",void 0),e([u({types:r,json:{read:!1}})],O.prototype,"symbol",void 0),e([u({type:Date,json:{name:"attributes.TimeWindowEnd"}})],O.prototype,"timeWindowEnd",void 0),e([m("timeWindowEnd")],O.prototype,"writeTimeWindowEnd",null),e([u({json:{read:!1}})],O.prototype,"timeWindowEndOffset",void 0),e([u({type:Date,json:{name:"attributes.TimeWindowStart"}})],O.prototype,"timeWindowStart",void 0),e([m("timeWindowStart")],O.prototype,"writeTimeWindowStart",null),e([u({json:{read:!1}})],O.prototype,"timeWindowStartOffset",void 0),e([u()],O.prototype,"violations",void 0),e([p("violations",["attributes"])],O.prototype,"readViolations",null),e([u({json:{read:!1}})],O.prototype,"waitDuration",void 0),e([u()],O.prototype,"wait",void 0),e([p("wait",["attributes"])],O.prototype,"readWait",null),O=S=e([d("esri.rest.support.Stop")],O);const w=O;export{w as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../symbols.js";import e from"../../core/Error.js";import{fetchMessageBundle as n}from"../../intl/messages.js";import t from"../../layers/support/LabelClass.js";import r from"../../layers/support/LabelExpressionInfo.js";import s from"../heuristics/clusterMinSize.js";import{getStatisticInfos as o,getClusterField as a,clusterCountField as i,getPredominantTypeExpression as l,getClusterFieldHash as u}from"../support/clusterUtils.js";import{isClusterCompatibleRenderer as c}from"../../views/2d/layers/support/clusterUtils.js";import m from"../../symbols/TextSymbol.js";async function f(n){const{layer:t,renderer:r,view:s}=n;await Promise.all([t.load(),s.when()]);const o=r||t.renderer;
|
|
5
|
+
import"../../symbols.js";import e from"../../core/Error.js";import{fetchMessageBundle as n}from"../../intl/messages.js";import t from"../../layers/support/LabelClass.js";import r from"../../layers/support/LabelExpressionInfo.js";import s from"../heuristics/clusterMinSize.js";import{getStatisticInfos as o,getClusterField as a,clusterCountField as i,getPredominantTypeExpression as l,getClusterFieldHash as u}from"../support/clusterUtils.js";import{isClusterCompatibleRenderer as c}from"../../views/2d/layers/support/clusterUtils.js";import m from"../../symbols/TextSymbol.js";async function f(n){const{layer:t,renderer:r,view:s}=n;await Promise.all([t.load(),s.when()]);const o=r||t.renderer;if(!c(o))throw new e("clusters-label-schemes:invalid-parameters","'renderer' is not valid");return{layer:t,renderer:o,view:s}}function p(e,n,t){const r="unique-value"===e.type?e.uniqueValueInfos:[];return l(r,n,t)}function v(e){return`\n $feature["${e}"];\n var value = $feature["${e}"];\n var num = Count(Text(Round(value)));\n var label = When(\n num < 4, Text(value, "#.#"),\n num == 4, Text(value / Pow(10, 3), "#.0k"),\n num <= 6, Text(value / Pow(10, 3), "#k"),\n num == 7, Text(value / Pow(10, 6), "#.0m"),\n num > 7, Text(value / Pow(10, 6), "#m"),\n Text(value, "#,###")\n );\n return label;\n `}function w(e){const n=new m({haloColor:"#373837",haloSize:"1px",color:"#f0f0f0",font:{family:"Noto Sans",size:"12px",weight:"bold"}});return new t({symbol:n,deconflictionStrategy:"none",labelPlacement:"center-center",labelExpressionInfo:new r({expression:e})})}async function y(e){const{renderer:n,view:t,statInfo:r}=e,o=null==r?void 0:r.statisticType,l=r?a(r.attributeInfo,o):i,c=w("type"===o?p(n,l,e.noneValueLabel):v(l));return{name:r?`clusters-${o}-${u(l,o)}`:"clusters-count",labelingInfo:[c],clusterMinSize:await s(c.symbol,t),fieldName:l}}function b(e){const n=new Map;for(const t of e)"size"===t.attributeInfo.vvType?n.set(t.statisticHash,t):n.has(t.statisticHash)||n.set(t.statisticHash,t);return[...n.values()]}async function d(e){const[{renderer:t,layer:r,view:s},a]=await Promise.all([f(e),n("esri/smartMapping/t9n/smartMapping")]);if(!t)return null;let i=null;const l=[],u=b(o(r,t,!1));for(const n of u){const e=await y({renderer:t,view:s,statInfo:n,noneValueLabel:a.clusters.predominantNoneValue});"size"===n.attributeInfo.vvType?i=e:l.push(e)}const c=await y({renderer:t,view:s});return i?l.unshift(c):i=c,{primaryScheme:i,secondarySchemes:l}}export{d as getLabelSchemes};
|