@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1188,4889],{65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((e=>{const t=e.target;e.newOrigin&&e.oldOrigin!==e.newOrigin&&(0,r.l)(t)&&t.updateOrigin(e.propName,e.newOrigin)}))}},74085:(e,t,i)=>{function r(e){}i.d(t,{Bg:()=>r}),i(80442)},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},66277:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ge});var r=i(43697),o=i(68773),s=(i(66577),i(38171)),a=i(51773),l=(i(16050),i(12501),i(95088),i(79056),i(5499),i(84382),i(30687),i(91423)),n=i(80539),u=i(20102),p=i(3920),d=i(92604),c=i(70586),m=i(16453),y=i(78286),b=i(95330),h=i(17445),f=i(67900),v=i(17452),g=i(5600),C=(i(67676),i(80442),i(75215)),T=i(71715),S=i(52011),w=i(30556),_=i(65845),N=i(6570),I=i(44547),O=i(8744),D=i(29600),x=i(71612),F=i(38009),B=i(16859),j=i(72965),E=i(66677),A=i(78223),L=i(96674),P=i(4095),M=i(77987),W=i(20256);let R=class extends L.wq{constructor(){super(...arguments),this.directionLines=new P.Z({color:[0,122,194],width:6}),this.directionPoints=new M.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new M.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new W.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new P.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new P.Z({width:8,color:[20,89,127]}),this.firstStop=new M.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.middleStop=new M.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.lastStop=new M.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.invalidStop=new M.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.waypointStop=new M.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.breakStop=new M.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"directionLines",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"directionPoints",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"pointBarriers",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"polygonBarriers",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"polylineBarriers",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"routeInfo",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"firstStop",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"middleStop",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"lastStop",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"invalidStop",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"waypointStop",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,types:A.LB})],R.prototype,"breakStop",void 0),R=(0,r._)([(0,S.j)("esri.layers.support.DefaultSymbols")],R);const V=R;var Z,J=i(65587),U=i(15235),q=i(93924),k=i(23334),G=i(2368),z=i(58901),H=i(49352),$=i(21878);let K=Z=class extends((0,G.J)(L.wq)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null}static fromGraphic(e){var t,i;return new Z({directionLineType:H.td.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:null!=(t=e.attributes.FromLevel)?t:null,geometry:e.geometry,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:(0,c.pC)(e.symbol)?(0,$.im)(e.symbol):null,toLevel:null!=(i=e.attributes.ToLevel)?i:null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),DirectionLineType:(0,c.pC)(this.directionLineType)?H.td.toJSON(this.directionLineType):null,DirectionPointID:(0,c.Wg)(this.directionPointId),Meters:(0,c.Wg)(this.distance),Minutes:(0,c.Wg)(this.duration)};return(0,c.pC)(this.fromLevel)&&(e.FromLevel=this.fromLevel),(0,c.pC)(this.toLevel)&&(e.ToLevel=this.toLevel),new s.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};K.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}],K.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({type:H.td.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:H.td.read}}})],K.prototype,"directionLineType",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],K.prototype,"directionPointId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Meters"}}})],K.prototype,"distance",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Minutes"}}})],K.prototype,"duration",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.FromLevel"}}})],K.prototype,"fromLevel",void 0),(0,r._)([(0,g.Cb)({type:z.Z})],K.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],K.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{read:!1}})],K.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({types:A.LB,json:{read:!1}})],K.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ToLevel"}}})],K.prototype,"toLevel",void 0),K=Z=(0,r._)([(0,S.j)("esri.rest.support.DirectionLine")],K);const Y=K;var Q,X=i(13473);let ee=Q=class extends((0,G.J)(L.wq)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.voiceInstruction=null}readArrivalTime(e,t){return(0,c.pC)(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){var t,i,r,o,s,a,l,n,u,p,d,m,y;return new Q({alternateName:null!=(t=e.attributes.AlternateName)?t:null,arrivalTime:(0,c.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:null!=(i=e.attributes.ArrivalUTCOffset)?i:null,azimuth:null!=(r=e.attributes.Azimuth)?r:null,branchName:null!=(o=e.attributes.BranchName)?o:null,directionPointType:H.cW.fromJSON(e.attributes.DirectionPointType),displayText:null!=(s=e.attributes.DisplayText)?s:null,exitName:null!=(a=e.attributes.ExitName)?a:null,geometry:e.geometry,intersectingName:null!=(l=e.attributes.IntersectingName)?l:null,level:null!=(n=e.attributes.Level)?n:null,name:null!=(u=e.attributes.Name)?u:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:null!=(p=e.attributes.ShortVoiceInstruction)?p:null,stopId:null!=(d=e.attributes.StopID)?d:null,symbol:(0,c.pC)(e.symbol)?(0,$.im)(e.symbol):null,towardName:null!=(m=e.attributes.TowardName)?m:null,voiceInstruction:null!=(y=e.attributes.VoiceInstruction)?y:null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),DirectionPointType:(0,c.pC)(this.directionPointType)?H.cW.toJSON(this.directionPointType):null,Sequence:(0,c.Wg)(this.sequence),StopID:this.stopId};return(0,c.pC)(this.alternateName)&&(e.AlternateName=this.alternateName),(0,c.pC)(this.arrivalTime)&&(e.ArrivalTime=this.arrivalTime.getTime()),(0,c.pC)(this.arrivalTimeOffset)&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),(0,c.pC)(this.azimuth)&&(e.Azimuth=this.azimuth),(0,c.pC)(this.branchName)&&(e.BranchName=this.branchName),(0,c.pC)(this.displayText)&&(e.DisplayText=this.displayText),(0,c.pC)(this.exitName)&&(e.ExitName=this.exitName),(0,c.pC)(this.intersectingName)&&(e.IntersectingName=this.intersectingName),(0,c.pC)(this.level)&&(e.Level=this.level),(0,c.pC)(this.name)&&(e.Name=this.name),(0,c.pC)(this.shortVoiceInstruction)&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),(0,c.pC)(this.towardName)&&(e.TowardName=this.towardName),(0,c.pC)(this.voiceInstruction)&&(e.VoiceInstruction=this.voiceInstruction),new s.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};ee.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}],ee.popupInfo={title:"{DisplayText}",fieldInfos:[{fieldName:"DirectionPointType",label:"Directions Item Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"DisplayText",label:"Text to Display",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"StopID",label:"Stop ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Maneuver Starts at",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Azimuth",label:"Azimuth",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Name",label:"Primary Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AlternateName",label:"Alternative Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ExitName",label:"Highway Exit Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"IntersectingName",label:"Intersecting Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BranchName",label:"Signpost Branch Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TowardName",label:"Signpost Toward Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ShortVoiceInstruction",label:"Voice Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"VoiceInstruction",label:"Voice Full Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({json:{read:!1}})],ee.prototype,"alternateName",void 0),(0,r._)([(0,g.Cb)()],ee.prototype,"arrivalTime",void 0),(0,r._)([(0,T.r)("arrivalTime",["attributes.ArrivalTime"])],ee.prototype,"readArrivalTime",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],ee.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Azimuth"}}})],ee.prototype,"azimuth",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.BranchName"}}})],ee.prototype,"branchName",void 0),(0,r._)([(0,g.Cb)({type:H.cW.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:H.cW.read}}})],ee.prototype,"directionPointType",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DisplayText"}}})],ee.prototype,"displayText",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ExitName"}}})],ee.prototype,"exitName",void 0),(0,r._)([(0,g.Cb)({type:X.Z})],ee.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ee.prototype,"intersectingName",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ee.prototype,"level",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Name"}}})],ee.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],ee.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{read:!1}})],ee.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Sequence"}}})],ee.prototype,"sequence",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ee.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.StopID"}}})],ee.prototype,"stopId",void 0),(0,r._)([(0,g.Cb)({types:A.LB,json:{read:!1}})],ee.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.TowardName"}}})],ee.prototype,"towardName",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ee.prototype,"voiceInstruction",void 0),ee=Q=(0,r._)([(0,S.j)("esri.rest.support.DirectionPoint")],ee);const te=ee;function ie(e,t){if((0,c.Wi)(e))return null;const i={},r=new RegExp(`^${t}`,"i");for(const o in e)e.hasOwnProperty(o)&&r.test(o)&&(i[o.substring(t.length)]=e[o]);return i}function re(e,t){return(0,c.Wi)(e)||(0,c.Wi)(t)?null:Math.round((e-t)/6e4)}var oe;let se=oe=class extends((0,G.J)(L.wq)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null}readCosts(e,t){return ie(t.attributes,"Attr_")}writeCosts(e,t){if(!(0,c.Wi)(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes[`Attr_${i}`]=e[i]}}static fromGraphic(e){var t,i;return new oe({addedCost:null!=(t=e.attributes.AddedCost)?t:null,barrierType:(0,c.pC)(e.attributes.BarrierType)?H.oi.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(e.attributes.Costs)?JSON.parse(e.attributes.Costs):null,curbApproach:(0,c.pC)(e.attributes.CurbApproach)?H.W7.fromJSON(e.attributes.CurbApproach):null,fullEdge:(0,c.pC)(e.attributes.FullEdge)?H.Dd.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:null!=(i=e.attributes.Name)?i:null,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:(0,c.pC)(e.attributes.Status)?H.SS.fromJSON(e.attributes.Status):null,symbol:(0,c.pC)(e.symbol)?(0,$.im)(e.symbol):null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),AddedCost:this.addedCost,BarrierType:(0,c.pC)(this.barrierType)?H.oi.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(this.costs):null,CurbApproach:(0,c.pC)(this.curbApproach)?H.W7.toJSON(this.curbApproach):null,FullEdge:(0,c.pC)(this.fullEdge)?H.Dd.toJSON(this.fullEdge):null,Name:this.name,Status:(0,c.pC)(this.status)?H.SS.toJSON(this.status):null};return new s.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};se.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}]}}],se.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({json:{read:!1}})],se.prototype,"addedCost",void 0),(0,r._)([(0,g.Cb)({type:H.oi.apiValues,json:{name:"attributes.BarrierType",read:{reader:H.oi.read},write:{writer:H.oi.write}}})],se.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],se.prototype,"costs",void 0),(0,r._)([(0,T.r)("costs",["attributes"])],se.prototype,"readCosts",null),(0,r._)([(0,w.c)("costs")],se.prototype,"writeCosts",null),(0,r._)([(0,g.Cb)({type:H.W7.apiValues,json:{read:{source:"attributes.CurbApproach",reader:H.W7.read}}})],se.prototype,"curbApproach",void 0),(0,r._)([(0,g.Cb)({type:H.Dd.apiValues,json:{name:"attributes.FullEdge",read:{reader:H.Dd.read},write:{writer:H.Dd.write}}})],se.prototype,"fullEdge",void 0),(0,r._)([(0,g.Cb)({type:X.Z,json:{write:!0}})],se.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name",write:!0}})],se.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID",write:!0}})],se.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{read:!1}})],se.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({type:H.BW.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:H.BW.read}}})],se.prototype,"sideOfEdge",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceID"}}})],se.prototype,"sourceId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceOID"}}})],se.prototype,"sourceOid",void 0),(0,r._)([(0,g.Cb)({type:H.SS.apiValues,json:{read:{source:"attributes.Status",reader:H.SS.read}}})],se.prototype,"status",void 0),(0,r._)([(0,g.Cb)({types:A.LB,json:{read:!1}})],se.prototype,"symbol",void 0),se=oe=(0,r._)([(0,S.j)("esri.rest.support.PointBarrier")],se);const ae=se;var le,ne=i(38913);let ue=le=class extends((0,G.J)(L.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return ie(t.attributes,"Attr_")}writeCosts(e,t){if(!(0,c.Wi)(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes[`Attr_${i}`]=e[i]}}static fromGraphic(e){var t,i;return new le({barrierType:(0,c.pC)(e.attributes.BarrierType)?H.oi.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(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!=(i=e.attributes.ScaleFactor)?i:null,symbol:(0,c.pC)(e.symbol)?(0,$.im)(e.symbol):null})}toGraphic(){var e,t;const i={__OBJECTID:(0,c.Wg)(this.objectId),BarrierType:(0,c.pC)(this.barrierType)?H.oi.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(this.costs):null,Name:null!=(e=this.name)?e:null,ScaleFactor:null!=(t=this.scaleFactor)?t:null};return new s.Z({geometry:this.geometry,attributes:i,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};ue.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}],ue.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({type:H.oi.apiValues,json:{name:"attributes.BarrierType",read:{reader:H.oi.read},write:{writer:H.oi.write}}})],ue.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],ue.prototype,"costs",void 0),(0,r._)([(0,T.r)("costs",["attributes"])],ue.prototype,"readCosts",null),(0,r._)([(0,w.c)("costs")],ue.prototype,"writeCosts",null),(0,r._)([(0,g.Cb)({type:ne.Z,json:{write:!0}})],ue.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name",write:!0}})],ue.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID",write:!0}})],ue.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{read:!1}})],ue.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ue.prototype,"scaleFactor",void 0),(0,r._)([(0,g.Cb)({types:A.LB,json:{read:!1}})],ue.prototype,"symbol",void 0),ue=le=(0,r._)([(0,S.j)("esri.rest.support.PolygonBarrier")],ue);const pe=ue;var de;let ce=de=class extends((0,G.J)(L.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null}readCosts(e,t){return ie(t.attributes,"Attr_")}static fromGraphic(e){var t,i;return new de({barrierType:(0,c.pC)(e.attributes.BarrierType)?H.oi.fromJSON(e.attributes.BarrierType):null,costs:(0,c.pC)(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!=(i=e.attributes.ScaleFactor)?i:null,symbol:(0,c.pC)(e.symbol)?(0,$.im)(e.symbol):null})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),BarrierType:(0,c.pC)(this.barrierType)?H.oi.toJSON(this.barrierType):null,Costs:(0,c.pC)(this.costs)?JSON.stringify(this.costs):null,Name:this.name,ScaleFactor:this.scaleFactor};return new s.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};ce.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}],ce.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({type:H.oi.apiValues,json:{read:{source:"attributes.BarrierType",reader:H.oi.read}}})],ce.prototype,"barrierType",void 0),(0,r._)([(0,g.Cb)()],ce.prototype,"costs",void 0),(0,r._)([(0,T.r)("costs",["attributes"])],ce.prototype,"readCosts",null),(0,r._)([(0,g.Cb)({type:z.Z,json:{write:!0}})],ce.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name",write:!0}})],ce.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID",write:!0}})],ce.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{read:!1}})],ce.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ce.prototype,"scaleFactor",void 0),(0,r._)([(0,g.Cb)({types:A.LB,json:{read:!1}})],ce.prototype,"symbol",void 0),ce=de=(0,r._)([(0,S.j)("esri.rest.support.PolylineBarrier")],ce);const me=ce;var ye=i(49827);let be=class extends L.wq{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}};(0,r._)([(0,g.Cb)({type:[String],json:{read:{source:"accumulateAttributeNames"},write:{target:"accumulateAttributeNames"}}})],be.prototype,"accumulateAttributes",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],be.prototype,"directionsLanguage",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],be.prototype,"findBestSequence",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],be.prototype,"preserveFirstStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],be.prototype,"preserveLastStop",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],be.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],be.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,g.Cb)({type:ye.Z,json:{write:!0}})],be.prototype,"travelMode",void 0),be=(0,r._)([(0,S.j)("esri.layers.support.RouteSettings")],be);const he=be;var fe;let ve=fe=class extends((0,G.J)(L.wq)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.version="1.0.0"}readEndTime(e,t){return(0,c.pC)(t.attributes.EndTimeUTC)?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return re(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return(0,c.pC)(t.attributes.StartTimeUTC)?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return re(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return ie(t.attributes,"Total_")}readTotalViolations(e,t){return ie(t.attributes,"TotalViolation_")}readTotalWait(e,t){return ie(t.attributes,"TotalWait_")}static fromGraphic(e){var t,i,r,o,s,a;return new fe({analysisSettings:(0,c.pC)(e.attributes.AnalysisSettings)?he.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:(0,c.pC)(e.attributes.EndTime)?new Date(e.attributes.EndTime):null,endTimeOffset:null!=(t=e.attributes.EndUTCOffset)?t:null,geometry:e.geometry,messages:(0,c.pC)(e.attributes.Messages)?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:(0,c.pC)(e.attributes.StartTime)?new Date(e.attributes.StartTime):null,startTimeOffset:null!=(i=e.attributes.StartUTCOffset)?i:null,symbol:(0,c.pC)(e.symbol)?(0,$.im)(e.symbol):null,totalCosts:(0,c.pC)(e.attributes.TotalCosts)?JSON.parse(e.attributes.TotalCosts):null,totalDistance:null!=(r=e.attributes.TotalMeters)?r:null,totalDuration:null!=(o=e.attributes.TotalMinutes)?o:null,totalLateDuration:null!=(s=e.attributes.TotalLateMinutes)?s:null,totalWaitDuration:null!=(a=e.attributes.TotalWaitMinutes)?a:null,version:e.attributes.Version})}toGraphic(){const e={__OBJECTID:(0,c.Wg)(this.objectId),AnalysisSettings:(0,c.pC)(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:(0,c.pC)(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:(0,c.pC)(this.messages)?JSON.stringify(this.messages):null,RouteName:(0,c.Wg)(this.name),StartTime:(0,c.pC)(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:(0,c.pC)(this.totalCosts)?JSON.stringify(this.totalCosts):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:(0,c.Wg)(this.version)};return new s.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};ve.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}],ve.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({json:{read:!1}})],ve.prototype,"analysisSettings",void 0),(0,r._)([(0,g.Cb)()],ve.prototype,"endTime",void 0),(0,r._)([(0,T.r)("endTime",["attributes.EndTimeUTC"])],ve.prototype,"readEndTime",null),(0,r._)([(0,g.Cb)()],ve.prototype,"endTimeOffset",void 0),(0,r._)([(0,T.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],ve.prototype,"readEndTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],ve.prototype,"firstStopId",void 0),(0,r._)([(0,g.Cb)({type:z.Z})],ve.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.LastStopID"}}})],ve.prototype,"lastStopId",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ve.prototype,"messages",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.Name"}}})],ve.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.ObjectID"}}})],ve.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{read:!1}})],ve.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)()],ve.prototype,"startTime",void 0),(0,r._)([(0,T.r)("startTime",["attributes.StartTimeUTC"])],ve.prototype,"readStartTime",null),(0,r._)([(0,g.Cb)()],ve.prototype,"startTimeOffset",void 0),(0,r._)([(0,T.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],ve.prototype,"readStartTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.StopCount"}}})],ve.prototype,"stopCount",void 0),(0,r._)([(0,g.Cb)({types:A.LB,json:{read:!1}})],ve.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)()],ve.prototype,"totalCosts",void 0),(0,r._)([(0,T.r)("totalCosts",["attributes"])],ve.prototype,"readTotalCosts",null),(0,r._)([(0,g.Cb)({json:{read:!1}})],ve.prototype,"totalDistance",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ve.prototype,"totalDuration",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ve.prototype,"totalLateDuration",void 0),(0,r._)([(0,g.Cb)()],ve.prototype,"totalViolations",void 0),(0,r._)([(0,T.r)("totalViolations",["attributes"])],ve.prototype,"readTotalViolations",null),(0,r._)([(0,g.Cb)()],ve.prototype,"totalWait",void 0),(0,r._)([(0,T.r)("totalWait",["attributes"])],ve.prototype,"readTotalWait",null),(0,r._)([(0,g.Cb)({json:{read:!1}})],ve.prototype,"totalWaitDuration",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],ve.prototype,"version",void 0),ve=fe=(0,r._)([(0,S.j)("esri.rest.support.RouteInfo")],ve);const ge=ve;var Ce=i(22974),Te=i(36030);const Se={type:String,json:{read:{source:"token"},write:{target:"token"}}};var we,_e=i(82971);let Ne=we=class extends L.wq{constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,C.TJ)(we,e)}writePointBarriers(e,t,i){this._writeNetworkFeatures(e,t,i)}writePolygonBarrier(e,t,i){this._writeNetworkFeatures(e,t,i)}writePolylineBarrier(e,t,i){this._writeNetworkFeatures(e,t,i)}readStartTime(e,t){return null!=t.startTime?new Date(t.startTime):null}writeStartTime(e,t){t.startTime=e?e.getTime():null}writeStops(e,t,i){this._writeNetworkFeatures(e,t,i)}clone(){return new we((0,Ce.d9)({accumulateAttributes:this.accumulateAttributes,apiKey:this.apiKey,attributeParameterValues:this.attributeParameterValues,directionsLanguage:this.directionsLanguage,directionsLengthUnits:this.directionsLengthUnits,directionsOutputType:this.directionsOutputType,directionsStyleName:this.directionsStyleName,directionsTimeAttribute:this.directionsTimeAttribute,findBestSequence:this.findBestSequence,ignoreInvalidLocations:this.ignoreInvalidLocations,impedanceAttribute:this.impedanceAttribute,outputGeometryPrecision:this.outputGeometryPrecision,outputGeometryPrecisionUnits:this.outputGeometryPrecisionUnits,outputLines:this.outputLines,outSpatialReference:this.outSpatialReference,pointBarriers:this.pointBarriers,polygonBarriers:this.polygonBarriers,polylineBarriers:this.polylineBarriers,preserveFirstStop:this.preserveFirstStop,preserveLastStop:this.preserveLastStop,restrictionAttributes:this.restrictionAttributes,restrictUTurns:this.restrictUTurns,returnBarriers:this.returnBarriers,returnDirections:this.returnDirections,returnPolygonBarriers:this.returnPolygonBarriers,returnPolylineBarriers:this.returnPolylineBarriers,returnRoutes:this.returnRoutes,returnStops:this.returnStops,returnZ:this.returnZ,startTime:this.startTime,startTimeIsUTC:this.startTimeIsUTC,stops:this.stops,timeWindowsAreUTC:this.timeWindowsAreUTC,travelMode:this.travelMode,useHierarchy:this.useHierarchy,useTimeWindows:this.useTimeWindows}))}_writeNetworkFeatures(e,t,i){t[i]=n.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON()}};(0,r._)([(0,g.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ne.prototype,"accumulateAttributes",void 0),(0,r._)([(0,g.Cb)(Se)],Ne.prototype,"apiKey",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"attributeParameterValues",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Ne.prototype,"directionsLanguage",void 0),(0,r._)([(0,Te.J)(H.GX)],Ne.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,Te.J)(H.$7)],Ne.prototype,"directionsOutputType",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Ne.prototype,"directionsStyleName",void 0),(0,r._)([(0,g.Cb)({type:String,json:{write:!0}})],Ne.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"findBestSequence",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,g.Cb)({type:String,json:{read:{source:"impedanceAttributeName"},write:{target:"impedanceAttributeName"}}})],Ne.prototype,"impedanceAttribute",void 0),(0,r._)([(0,g.Cb)({type:Number,json:{write:!0}})],Ne.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,Te.J)(H.q$)],Ne.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,Te.J)(H.no)],Ne.prototype,"outputLines",void 0),(0,r._)([(0,g.Cb)({type:_e.Z,json:{write:!0}})],Ne.prototype,"outSpatialReference",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"pointBarriers",void 0),(0,r._)([(0,w.c)("pointBarriers")],Ne.prototype,"writePointBarriers",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.c)("polygonBarriers")],Ne.prototype,"writePolygonBarrier",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.c)("polylineBarriers")],Ne.prototype,"writePolylineBarrier",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"preserveFirstStop",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"preserveLastStop",void 0),(0,r._)([(0,g.Cb)({type:[String],json:{write:!0}})],Ne.prototype,"restrictionAttributes",void 0),(0,r._)([(0,Te.J)(H.ip)],Ne.prototype,"restrictUTurns",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"returnBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"returnDirections",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"returnRoutes",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"returnStops",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"returnZ",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{type:Number,write:!0}})],Ne.prototype,"startTime",void 0),(0,r._)([(0,T.r)("startTime")],Ne.prototype,"readStartTime",null),(0,r._)([(0,w.c)("startTime")],Ne.prototype,"writeStartTime",null),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"stops",void 0),(0,r._)([(0,w.c)("stops")],Ne.prototype,"writeStops",null),(0,r._)([(0,g.Cb)({json:{write:!0}})],Ne.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,g.Cb)({type:ye.Z,json:{write:!0}})],Ne.prototype,"travelMode",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"useHierarchy",void 0),(0,r._)([(0,g.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"useTimeWindows",void 0),Ne=we=(0,r._)([(0,S.j)("esri.rest.support.RouteParameters")],Ne);const Ie=Ne;var Oe;let De=Oe=class extends((0,G.J)(L.wq)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return re(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return ie(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return re(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return ie(t.attributes,"Attr_")}writeServiceCosts(e,t){if(!(0,c.Wi)(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes[`Attr_${i}`]=e[i]}}writeTimeWindowEnd(e,t){(0,c.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){(0,c.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return ie(t.attributes,"Violation_")}readWait(e,t){return ie(t.attributes,"Wait_")}static fromGraphic(e){var t,i,r,o,s,a,l,n,u,p;return new Oe({arriveCurbApproach:(0,c.pC)(e.attributes.ArrivalCurbApproach)?H.W7.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:(0,c.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:(0,c.pC)(e.attributes.CumulativeCosts)?JSON.parse(e.attributes.CumulativeCosts):null,cumulativeDistance:null!=(t=e.attributes.CumulativeMeters)?t:null,cumulativeDuration:null!=(i=e.attributes.CumulativeMinutes)?i:null,curbApproach:(0,c.pC)(e.attributes.CurbApproach)?H.W7.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:(0,c.pC)(e.attributes.DepartureCurbApproach)?H.W7.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:(0,c.pC)(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:null!=(r=e.attributes.DepartureUTCOffset)?r:null,geometry:e.geometry,lateDuration:null!=(o=e.attributes.LateMinutes)?o:null,locationType:(0,c.pC)(e.attributes.LocationType)?H.yP.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:null!=(s=e.attributes.Sequence)?s:null,serviceCosts:(0,c.pC)(e.attributes.ServiceCosts)?JSON.parse(e.attributes.ServiceCosts):null,serviceDistance:null!=(a=e.attributes.ServiceMeters)?a:null,serviceDuration:null!=(l=e.attributes.ServiceMinutes)?l:null,status:(0,c.pC)(e.attributes.Status)?H.SS.fromJSON(e.attributes.Status):null,symbol:(0,c.pC)(e.symbol)?(0,$.im)(e.symbol):null,timeWindowEnd:(0,c.pC)(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:null!=(n=e.attributes.TimeWindowEndUTCOffset)?n:null,timeWindowStart:(0,c.pC)(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:null!=(u=e.attributes.TimeWindowStartUTCOffset)?u:null,waitDuration:null!=(p=e.attributes.WaitMinutes)?p:null})}toGraphic(){var e,t;const i={__OBJECTID:(0,c.Wg)(this.objectId),ArrivalCurbApproach:(0,c.pC)(this.arriveCurbApproach)?H.W7.toJSON(this.arriveCurbApproach):null,ArrivalTime:(0,c.pC)(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:(0,c.pC)(this.cumulativeCosts)?JSON.stringify(this.cumulativeCosts):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:(0,c.pC)(this.curbApproach)?H.W7.toJSON(this.curbApproach):null,DepartureCurbApproach:(0,c.pC)(this.departCurbApproach)?H.W7.toJSON(this.departCurbApproach):null,DepartureTime:(0,c.pC)(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:(0,c.pC)(this.locationType)?H.yP.toJSON(this.locationType):null,Name:(0,c.Wg)(this.name),RouteName:(0,c.Wg)(this.routeName),Sequence:this.sequence,ServiceCosts:(0,c.pC)(this.serviceCosts)?JSON.stringify(this.serviceCosts):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:(0,c.pC)(this.status)?H.SS.toJSON(this.status):null,TimeWindowEnd:(0,c.pC)(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:null!=(e=this.timeWindowEndOffset)?e:this.arriveTimeOffset,TimeWindowStart:(0,c.pC)(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:null!=(t=this.timeWindowEndOffset)?t:this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new s.Z({geometry:this.geometry,attributes:i,symbol:this.symbol,popupTemplate:(0,c.Wg)(this.popupTemplate)})}};De.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}],De.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,g.Cb)({type:H.W7.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:H.W7.read}}})],De.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],De.prototype,"arriveTime",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,T.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],De.prototype,"readArriveTimeOffset",null),(0,r._)([(0,g.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],De.prototype,"bearing",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],De.prototype,"bearingTol",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"cumulativeCosts",void 0),(0,r._)([(0,T.r)("cumulativeCosts",["attributes"])],De.prototype,"readCumulativeCosts",null),(0,r._)([(0,g.Cb)({json:{read:!1}})],De.prototype,"cumulativeDistance",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],De.prototype,"cumulativeDuration",void 0),(0,r._)([(0,g.Cb)({type:H.W7.apiValues,json:{name:"attributes.CurbApproach",read:{reader:H.W7.read},write:{writer:H.W7.write}}})],De.prototype,"curbApproach",void 0),(0,r._)([(0,g.Cb)({type:H.W7.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:H.W7.read}}})],De.prototype,"departCurbApproach",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],De.prototype,"departTime",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"departTimeOffset",void 0),(0,r._)([(0,T.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],De.prototype,"readDepartTimeOffset",null),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],De.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,g.Cb)({type:X.Z,json:{write:!0}})],De.prototype,"geometry",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.LateMinutes",read:!1}})],De.prototype,"lateDuration",void 0),(0,r._)([(0,g.Cb)({type:H.yP.apiValues,json:{name:"attributes.LocationType",read:{reader:H.yP.read},write:{writer:H.yP.write}}})],De.prototype,"locationType",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Name",write:!0}})],De.prototype,"name",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.NavLatency"}}})],De.prototype,"navLatency",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.ObjectID",write:!0}})],De.prototype,"objectId",void 0),(0,r._)([(0,g.Cb)({type:a.Z,json:{read:!1}})],De.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.PosAlong"}}})],De.prototype,"posAlong",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.RouteName",write:!0}})],De.prototype,"routeName",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"serviceCosts",void 0),(0,r._)([(0,T.r)("serviceCosts",["attributes"])],De.prototype,"readServiceCosts",null),(0,r._)([(0,w.c)("serviceCosts")],De.prototype,"writeServiceCosts",null),(0,r._)([(0,g.Cb)({json:{read:!1}})],De.prototype,"serviceDistance",void 0),(0,r._)([(0,g.Cb)({json:{read:!1}})],De.prototype,"serviceDuration",void 0),(0,r._)([(0,g.Cb)({json:{name:"attributes.Sequence",write:!0}})],De.prototype,"sequence",void 0),(0,r._)([(0,g.Cb)({type:H.BW.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:H.BW.read}}})],De.prototype,"sideOfEdge",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapX"}}})],De.prototype,"snapX",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapY"}}})],De.prototype,"snapY",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SnapZ"}}})],De.prototype,"snapZ",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceID"}}})],De.prototype,"sourceId",void 0),(0,r._)([(0,g.Cb)({json:{read:{source:"attributes.SourceOID"}}})],De.prototype,"sourceOid",void 0),(0,r._)([(0,g.Cb)({type:H.SS.apiValues,json:{read:{source:"attributes.Status",reader:H.SS.read}}})],De.prototype,"status",void 0),(0,r._)([(0,g.Cb)({types:A.LB,json:{read:!1}})],De.prototype,"symbol",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],De.prototype,"timeWindowEnd",void 0),(0,r._)([(0,w.c)("timeWindowEnd")],De.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,g.Cb)({json:{read:!1}})],De.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,g.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],De.prototype,"timeWindowStart",void 0),(0,r._)([(0,w.c)("timeWindowStart")],De.prototype,"writeTimeWindowStart",null),(0,r._)([(0,g.Cb)({json:{read:!1}})],De.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"violations",void 0),(0,r._)([(0,T.r)("violations",["attributes"])],De.prototype,"readViolations",null),(0,r._)([(0,g.Cb)({json:{read:!1}})],De.prototype,"waitDuration",void 0),(0,r._)([(0,g.Cb)()],De.prototype,"wait",void 0),(0,r._)([(0,T.r)("wait",["attributes"])],De.prototype,"readWait",null),De=Oe=(0,r._)([(0,S.j)("esri.rest.support.Stop")],De);const xe=De;var Fe=i(65091);function Be(e){return e.length?e:null}function je(e){const{defaultTravelMode:t,supportedTravelModes:i}=e;return i.find((e=>e.id===t))}function Ee(e){return"layers"in e}async function Ae(e){const t=_e.Z.WGS84;return await(0,I.iQ)(e.spatialReference,t),(0,I.iV)(e,t)}function Le(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Pe(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,f.En)(e,t,"meters")}function Me(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}const We=n.Z.ofType(Y),Re=n.Z.ofType(te),Ve=n.Z.ofType(ae),Ze=n.Z.ofType(pe),Je=n.Z.ofType(me),Ue=n.Z.ofType(xe),qe=d.Z.getLogger("esri.layers.RouteLayer");let ke=class extends((0,x.h)((0,j.M)((0,F.q)((0,B.I)((0,m.R)((0,p.p)(D.Z))))))){constructor(...e){super(...e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new V,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Ve,this.polygonBarriers=new Ze,this.polylineBarriers=new Je,this.routeInfo=null,this.spatialReference=_e.Z.WGS84,this.stops=new Ue,this.type="route",this.handles.add((0,h.YP)((()=>this.stops.toArray()),(()=>{(0,c.Wi)(this.routeInfo)&&this._setStopSymbol(this.stops)}),{sync:!0}))}writeFeatureCollectionWebmap(e,t,i,r){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),a="web-map"===r.origin?"featureCollection.layers":"layers";(0,y.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>Y.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>te.fromGraphic(e)))}get fullExtent(){if((0,c.pC)(this.routeInfo)&&(0,c.pC)(this.routeInfo.geometry))return this.routeInfo.geometry.extent;const e=new N.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:_e.Z.WGS84}),t=this.stops.filter((e=>(0,c.pC)(e.geometry)));if(t.length<2)return e;const{spatialReference:i}=t.getItemAt(0).geometry;if((0,c.Wi)(i))return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new Fe.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){var i;const r=(Ee(t)?t.layers:t.featureCollection.layers).find((e=>(0,c.pC)(e.layerDefinition.maxScale)));return null!=(i=null==r?void 0:r.layerDefinition.maxScale)?i:0}readMinScale(e,t){var i;const r=(Ee(t)?t.layers:t.featureCollection.layers).find((e=>(0,c.pC)(e.layerDefinition.minScale)));return null!=(i=null==r?void 0:r.layerDefinition.minScale)?i:0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>ae.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>pe.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>me.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>ge.fromGraphic(e)));return i.length>0?i.getItemAt(0):null}readSpatialReference(e,t){var i,r;const o=Ee(t)?t.layers:t.featureCollection.layers;if(!o.length)return _e.Z.WGS84;const{layerDefinition:s}=o[0],a=null!=(i=null!=(r=s.spatialReference)?r:s.extent.spatialReference)?i:O.Zn;return _e.Z.fromJSON(a)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>xe.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return(0,c.pC)(this.routeInfo)&&(0,c.pC)(this.routeInfo.name)?this.routeInfo.name:"Route"}set title(e){e?this._override("title",e):this._clearOverride("title")}get url(){return o.Z.routeServiceUrl}set url(e){null!=e?this._set("url",(0,E.Nm)(e,qe)):this._set("url",o.Z.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){(0,c.pC)(this.directionLines)&&(this.directionLines.removeAll(),this._set("directionLines",null)),(0,c.pC)(this.directionPoints)&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),(0,c.pC)(this.routeInfo)&&this._set("routeInfo",null),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new u.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if((0,c.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;if(await i._signIn(),i.user||await t.reload(),i.user.username!==t.owner)throw new u.Z("routelayer:not-portal-item-owner","You can only overwrite your portal items");const{itemUrl:r}=t,o={messages:[],origin:"portal-item",portal:i,url:r&&(0,v.mN)(r),writtenProperties:[]},s=this.write(null,o);return t.extent=await Ae(e),t.title=this.title,await t.update({data:s}),t}async saveAs(e,t={}){if(await this.load(),(0,c.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=U.default.from(e).clone();null!=i.extent||(i.extent=await Ae(this.fullExtent)),i.id=null,null!=i.portal||(i.portal=J.Z.getDefault()),null!=i.title||(i.title=this.title),i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection","Multilayer","Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r._signIn();const s=null==t?void 0:t.folder,a=this.write(null,o);return await r.user.addItem({item:i,folder:s,data:a}),this.portalItem=i,(0,_.D)(o),o.portalItem=i,i}async solve(e,t){var i,r,o,s,a,l;const p=null!=(i=null==e?void 0:e.stops)?i:this.stops,d=null!=(r=null==e?void 0:e.pointBarriers)?r:Be(this.pointBarriers),m=null!=(o=null==e?void 0:e.polylineBarriers)?o:Be(this.polylineBarriers),y=null!=(s=null==e?void 0:e.polygonBarriers)?s:Be(this.polygonBarriers);if((0,c.Wi)(p))throw new u.Z("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(p)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(p))&&p.features.length<2||n.Z.isCollection(p)&&p.length<2)throw new u.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");const h=null==e?void 0:e.apiKey,f=this.url,v=await this._getServiceDescription(f,h,t),g=je(v),C=null!=(a=null==e?void 0:e.travelMode)?a:g,T=null!=(l=null==e?void 0:e.accumulateAttributes)?l:[];(0,c.pC)(C)&&T.push(C.distanceAttributeName);const S={startTime:new Date},w={accumulateAttributes:T,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:d,polylineBarriers:m,polygonBarriers:y,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!d,returnDirections:!0,returnPolygonBarriers:!!y,returnPolylineBarriers:!!m,returnRoutes:!0,returnStops:!0,stops:p},_=e?Ie.from(e):new Ie;for(const e in S)null==_[e]&&(_[e]=S[e]);let N;_.set(w);try{N=await(0,k.F)(f,_,t)}catch(e){throw(0,b.D_)(e)?e:new u.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const I=this._toRouteLayerSolution(N);return this._isOverridden("title")||(this.title=(0,c.yl)(I.routeInfo.name,"Route")),function(e,t,i){var r,o,s,a,l,n,p,d,m,y,b;const h=t.networkDataset.networkAttributes.filter((e=>"esriNAUTCost"===e.usageType)),f=je(t),v=null!=(r=i.travelMode)?r:f;if((0,c.Wi)(v))return void qe.warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:g,distanceAttributeName:C}=v,T=h.find((e=>e.name===g)),S=h.find((e=>e.name===C)),w=null!=(o=null!=(s=null==(a=i.travelMode)?void 0:a.impedanceAttributeName)?s:i.impedanceAttribute)?o:t.impedance,_=H.hB.fromJSON(null==T?void 0:T.units),N=H.GX.fromJSON(null==S?void 0:S.units);if(!_||!N)throw new u.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const I=null!=(l=i.directionsLanguage)?l:t.directionsLanguage,O=null!=(n=null!=(p=i.accumulateAttributes)?p:t.accumulateAttributeNames)?n:[],D=new Set(h.filter((({name:e})=>e===g||e===C||e===w||O.includes(e))).map((({name:e})=>e))),x=e=>{for(const t in e)D.has(t)||delete e[t]};for(const t of e.pointBarriers){var F;(0,c.pC)(t.costs)&&(t.addedCost=null!=(F=t.costs[w])?F:0,x(t.costs))}for(const t of e.polygonBarriers){var B;(0,c.pC)(t.costs)&&(t.scaleFactor=null!=(B=t.costs[w])?B:1,x(t.costs))}for(const t of e.polylineBarriers){var j;(0,c.pC)(t.costs)&&(t.scaleFactor=null!=(j=t.costs[w])?j:1,x(t.costs))}const{routeInfo:E}=e,{findBestSequence:A,preserveFirstStop:L,preserveLastStop:P,startTimeIsUTC:M,timeWindowsAreUTC:W}=i;E.analysisSettings=new he({accumulateAttributes:O,directionsLanguage:I,findBestSequence:A,preserveFirstStop:L,preserveLastStop:P,startTimeIsUTC:M,timeWindowsAreUTC:W,travelMode:v}),E.totalDuration=Le(null!=(d=E.totalCosts[g])?d:0,_),E.totalDistance=Pe(null!=(m=E.totalCosts[C])?m:0,N),E.totalLateDuration=Le(null!=(y=E.totalViolations[g])?y:0,_),E.totalWaitDuration=Le(null!=(b=E.totalWait[g])?b:0,_),(0,c.pC)(E.totalCosts)&&x(E.totalCosts),(0,c.pC)(E.totalViolations)&&x(E.totalViolations),(0,c.pC)(E.totalWait)&&x(E.totalWait);for(const t of e.stops){var R,V,Z,J,U,q;(0,c.pC)(t.serviceCosts)&&(t.serviceDuration=Le(null!=(R=t.serviceCosts[g])?R:0,_),t.serviceDistance=Pe(null!=(V=t.serviceCosts[C])?V:0,N),x(t.serviceCosts)),(0,c.pC)(t.cumulativeCosts)&&(t.cumulativeDuration=Le(null!=(Z=t.cumulativeCosts[g])?Z:0,_),t.cumulativeDistance=Pe(null!=(J=t.cumulativeCosts[C])?J:0,N),x(t.cumulativeCosts)),(0,c.pC)(t.violations)&&(t.lateDuration=Le(null!=(U=t.violations[g])?U:0,_),x(t.violations)),(0,c.pC)(t.wait)&&(t.waitDuration=Le(null!=(q=t.wait[g])?q:0,_),x(t.wait))}}(I,v,_),I}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:l}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",l)}_getLayerDefinition(){return{capabilities:"Query,Update,Editing",extent:this.fullExtent.toJSON(),hasM:!1,hasZ:!1,maxScale:this.maxScale,minScale:this.minScale,objectIdField:"__OBJECTID",spatialReference:this.spatialReference.toJSON(),type:"Feature Layer",typeIdField:""}}_getNetworkFeatures(e,t,i,r){const o=(Ee(e)?e.layers:e.featureCollection.layers).find((e=>e.layerDefinition.name===t));if((0,c.Wi)(o))return new n.Z;const{layerDefinition:u,popupInfo:p,featureSet:d}=o,m=u.drawingInfo.renderer,{features:y}=d,b=m&&(0,l.a)(m),h=y.map((e=>{var r;const o=s.Z.fromJSON(e),l=i(o);return null!=l.symbol||(l.symbol=null!=(r=null==b?void 0:b.getSymbol(o))?r:this._getNetworkSymbol(t)),null!=l.popupTemplate||(l.popupTemplate=p&&a.Z.fromJSON(p)),l}));return r&&h.some((e=>!e.symbol))&&r(h),new n.Z(h)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,i){if((0,c.pC)(this._cachedServiceDescription)&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await(0,q.bI)(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if((0,c.Wi)(this.routeInfo)||1===e.length)return void e.forEach(((t,i)=>{switch(i){case 0:t.symbol=this.defaultSymbols.firstStop;break;case e.length-1:t.symbol=this.defaultSymbols.lastStop;break;default:t.symbol=this.defaultSymbols.middleStop}}));const t=e.map((e=>e.sequence)).filter((e=>(0,c.pC)(e))),i=Math.min(...t),r=Math.max(...t);for(const t of e)t.sequence!==i?t.sequence!==r?"ok"===t.status||"not-located-on-closest"===t.status?"waypoint"!==t.locationType?"break"!==t.locationType?t.symbol=this.defaultSymbols.middleStop:t.symbol=this.defaultSymbols.breakStop:t.symbol=this.defaultSymbols.waypointStop:t.symbol=this.defaultSymbols.invalidStop:t.symbol=this.defaultSymbols.lastStop:t.symbol=this.defaultSymbols.firstStop}_toRouteLayerSolution(e){var t,i,r,o,s;const a=e.routeResults[0].stops.map((e=>xe.fromJSON(e.toJSON())));this._setStopSymbol(a);const l=new Ue(a),n=new Ze(null==(t=e.polygonBarriers)?void 0:t.map((e=>{const t=pe.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),u=new Je(null==(i=e.polylineBarriers)?void 0:i.map((e=>{const t=me.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),p=new Ve(null==(r=e.pointBarriers)?void 0:r.map((e=>{const t=ae.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),d=ge.fromJSON(e.routeResults[0].route.toJSON());d.symbol=this.defaultSymbols.routeInfo;const c=new Re(null==(o=e.routeResults[0].directionPoints)?void 0:o.features.map((e=>{const t=te.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new We(null==(s=e.routeResults[0].directionLines)?void 0:s.features.map((e=>{const t=Y.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:c,pointBarriers:p,polygonBarriers:n,polylineBarriers:u,routeInfo:d,stops:l}}_writeDirectionLines(){return(0,c.Wi)(this.directionLines)||!this.directionLines.length?null:{featureSet:{features:this.directionLines.toArray().map((e=>Me(e))),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.directionLines.toJSON()}},fields:Y.fields,geometryType:"esriGeometryPolyline",name:"DirectionLines",title:"Direction Lines"},popupInfo:Y.popupInfo}}_writeDirectionPoints(){return(0,c.Wi)(this.directionPoints)||!this.directionPoints.length?null:{featureSet:{features:this.directionPoints.toArray().map((e=>Me(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.directionPoints.toJSON()}},fields:te.fields,geometryType:"esriGeometryPoint",name:"DirectionPoints",title:"Direction Points"},popupInfo:te.popupInfo}}_writePointBarriers(){return(0,c.Wi)(this.pointBarriers)||!this.pointBarriers.length?null:{featureSet:{features:this.pointBarriers.toArray().map((e=>Me(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.pointBarriers.toJSON()}},fields:ae.fields,geometryType:"esriGeometryPoint",name:"Barrier",title:"Point Barrier"},popupInfo:ae.popupInfo}}_writePolygonBarriers(){return(0,c.Wi)(this.polygonBarriers)||!this.polygonBarriers.length?null:{featureSet:{features:this.polygonBarriers.toArray().map((e=>Me(e))),geometryType:"esriGeometryPolygon"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.polygonBarriers.toJSON()}},fields:pe.fields,geometryType:"esriGeometryPolygon",name:"PolygonBarriers",title:"Polygon Barriers"},popupInfo:pe.popupInfo}}_writePolylineBarriers(){return(0,c.Wi)(this.polylineBarriers)||!this.polylineBarriers.length?null:{featureSet:{features:this.polylineBarriers.toArray().map((e=>Me(e))),geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.polylineBarriers.toJSON()}},fields:me.fields,geometryType:"esriGeometryPolyline",name:"PolylineBarriers",title:"Line Barriers"},popupInfo:me.popupInfo}}_writeRouteInfo(){return(0,c.Wi)(this.routeInfo)?null:{featureSet:{features:[Me(this.routeInfo)],geometryType:"esriGeometryPolyline"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"simple",symbol:this.defaultSymbols.routeInfo.toJSON()}},fields:ge.fields,geometryType:"esriGeometryPolyline",name:"RouteInfo",title:"Route Details"},popupInfo:ge.popupInfo}}_writeStops(){return(0,c.Wi)(this.stops)||!this.stops.length?null:{featureSet:{features:this.stops.toArray().map((e=>Me(e))),geometryType:"esriGeometryPoint"},layerDefinition:{...this._getLayerDefinition(),drawingInfo:{renderer:{type:"uniqueValue",field1:"Sequence",defaultSymbol:this.defaultSymbols.middleStop.toJSON(),uniqueValueInfos:[{value:"1",symbol:this.defaultSymbols.firstStop.toJSON(),label:"First Stop"},{value:`${this.stops.length}`,symbol:this.defaultSymbols.lastStop.toJSON(),label:"Last Stop"}]}},fields:xe.fields,geometryType:"esriGeometryPoint",name:"Stops",title:"Stops"},popupInfo:xe.popupInfo}}};(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],ke.prototype,"_featureCollection",void 0),(0,r._)([(0,w.c)(["web-map","portal-item"],"_featureCollection")],ke.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ke.prototype,"_type",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,type:V})],ke.prototype,"defaultSymbols",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],ke.prototype,"directionLines",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ke.prototype,"readDirectionLines",null),(0,r._)([(0,g.Cb)({readOnly:!0})],ke.prototype,"directionPoints",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ke.prototype,"readDirectionPoints",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ke.prototype,"featureCollectionType",void 0),(0,r._)([(0,g.Cb)({readOnly:!0})],ke.prototype,"fullExtent",null),(0,r._)([(0,g.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ke.prototype,"legendEnabled",void 0),(0,r._)([(0,g.Cb)({type:["show","hide"]})],ke.prototype,"listMode",void 0),(0,r._)([(0,g.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ke.prototype,"maxScale",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ke.prototype,"readMaxScale",null),(0,r._)([(0,g.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ke.prototype,"minScale",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ke.prototype,"readMinScale",null),(0,r._)([(0,g.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ke.prototype,"operationalLayerType",void 0),(0,r._)([(0,g.Cb)({nonNullable:!0,type:n.Z.ofType(ae)})],ke.prototype,"pointBarriers",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ke.prototype,"readPointBarriers",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:n.Z.ofType(pe)})],ke.prototype,"polygonBarriers",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ke.prototype,"readPolygonBarriers",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:n.Z.ofType(me)})],ke.prototype,"polylineBarriers",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ke.prototype,"readPolylineBarriers",null),(0,r._)([(0,g.Cb)({readOnly:!0})],ke.prototype,"routeInfo",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ke.prototype,"readRouteInfo",null),(0,r._)([(0,g.Cb)({type:_e.Z})],ke.prototype,"spatialReference",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ke.prototype,"readSpatialReference",null),(0,r._)([(0,g.Cb)({nonNullable:!0,type:n.Z.ofType(xe)})],ke.prototype,"stops",void 0),(0,r._)([(0,T.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ke.prototype,"readStops",null),(0,r._)([(0,g.Cb)()],ke.prototype,"title",null),(0,r._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ke.prototype,"type",void 0),(0,r._)([(0,g.Cb)()],ke.prototype,"url",null),ke=(0,r._)([(0,S.j)("esri.layers.RouteLayer")],ke);const Ge=ke},16859:(e,t,i)=>{i.d(t,{I:()=>C});var r=i(43697),o=i(40330),s=i(3172),a=i(66643),l=i(20102),n=i(92604),u=i(70586),p=i(95330),d=i(17452),c=i(5600),m=(i(67676),i(80442),i(75215),i(71715)),y=i(52011),b=i(30556),h=i(65587),f=i(15235),v=i(86082);const g=n.Z.getLogger("esri.layers.mixins.PortalLayer"),C=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new f.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,p.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,p.D_)(e)||g.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?null==o.id?void 0:o.id.findCredential(this.url):null;if(!t)return!0;const i=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.user=i,(0,u.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){var t,i;const r=null==(t=this.portalItem)||null==(i=t.portal)?void 0:i.user;if(r)return r;const l=o.id.findServerInfo(this.url);if(null==l||!l.owningSystemUrl)return null;const n=`${l.owningSystemUrl}/sharing/rest`,p=h.Z.getDefault();if(p&&p.loaded&&(0,d.Fv)(p.restUrl)===(0,d.Fv)(n))return p.user;const c=`${n}/community/self`,m=(0,u.pC)(e)?e.signal:null,y=await(0,a.q6)((0,s.default)(c,{authMode:"no-prompt",query:{f:"json"},signal:m}));return y.ok?v.default.fromJSON(y.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||h.Z.getDefault());return i&&r&&!(0,d.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,c.Cb)({type:f.default})],t.prototype,"portalItem",null),(0,r._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,b.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},12501:(e,t,i)=>{i.d(t,{Z:()=>y});var r,o=i(43697),s=i(22974),a=i(5600),l=(i(75215),i(52011)),n=i(30556),u=i(35671),p=i(5499),d=i(12571),c=i(84475);let m=r=class extends((0,d.W)(p.Z)){constructor(e){super(e),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this.type="dictionary"}get _loader(){return new c.DictionaryLoader(this.url,this.config,this.fieldMap)}writeData(e,t){e&&(t.scalingExpressionInfo={expression:e,returnType:"number"})}writeVisualVariables(e,t,i,r){null!=r&&r.origin||super.writeVisualVariables(e,t,i,r)}clone(){return new r({config:(0,s.d9)(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:(0,s.d9)(this.fieldMap),url:(0,s.d9)(this.url),visualVariables:(0,s.d9)(this.visualVariables)})}async getSymbolAsync(e,t){return this._loader.getSymbolAsync(e,t)}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t),this.scaleExpression&&await(0,u.io)(e,t,this.scaleExpression);for(const i in this.fieldMap){const r=this.fieldMap[i];t.has(r)&&e.add(r)}}get arcadeRequired(){return!0}getSymbol(){return null}getSymbols(){return[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}getSymbolFields(){return this._loader.getSymbolFields()}};(0,o._)([(0,a.Cb)({type:c.DictionaryLoader})],m.prototype,"_loader",null),(0,o._)([(0,a.Cb)({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],m.prototype,"config",void 0),(0,o._)([(0,a.Cb)({type:Object,json:{write:!0}})],m.prototype,"fieldMap",void 0),(0,o._)([(0,a.Cb)({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],m.prototype,"scaleExpression",void 0),(0,o._)([(0,n.c)("scaleExpression")],m.prototype,"writeData",null),(0,o._)([(0,a.Cb)({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(e){return{enabled:!!e&&!!this.scaleExpression}}}}})],m.prototype,"scaleExpressionTitle",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"url",void 0),(0,o._)([(0,n.c)("visualVariables")],m.prototype,"writeVisualVariables",null),m=r=(0,o._)([(0,l.j)("esri.renderers.DictionaryRenderer")],m);const y=m},95088:(e,t,i)=>{i.d(t,{Z:()=>D});var r,o=i(43697),s=i(22303),a=i(22974),l=i(44422),n=i(75215),u=i(36030),p=i(5600),d=i(52011),c=i(35671),m=i(5499),y=i(12571),b=i(96674),h=i(92604),f=(i(67676),i(80442),i(90578));const v=h.Z.getLogger("esri.renderers.support.AttributeColorInfo");let g=r=class extends b.wq{constructor(e){super(e),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(e){return null==e?e:"function"==typeof e?(v.error(".field: field must be a string value"),null):(0,n.Zs)(e)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){return new r({color:this.color&&this.color.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};(0,o._)([(0,p.Cb)({type:s.Z,json:{type:[Number],write:!0}})],g.prototype,"color",void 0),(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],g.prototype,"field",void 0),(0,o._)([(0,f.p)("field")],g.prototype,"castField",null),(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],g.prototype,"label",void 0),(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],g.prototype,"valueExpression",void 0),(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],g.prototype,"valueExpressionTitle",void 0),g=r=(0,o._)([(0,d.j)("esri.renderers.support.AttributeColorInfo")],g);const C=g;var T;let S=T=class extends b.wq{constructor(){super(...arguments),this.unit=null}clone(){return new T({unit:this.unit})}};(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],S.prototype,"unit",void 0),S=T=(0,o._)([(0,d.j)("esri.renderers.support.DotDensityLegendOptions")],S);const w=S;var _,N=i(20256),I=i(4095);let O=_=class extends((0,y.W)(m.Z)){constructor(e){super(e),this.attributes=null,this.backgroundColor=new s.Z([0,0,0,0]),this.blendDots=!0,this.dotBlendingEnabled=!0,this.dotShape="square",this.dotSize=1,this.legendOptions=null,this.outline=new I.Z,this.dotValue=null,this.referenceDotValue=null,this.referenceScale=null,this.seed=1,this.type="dot-density"}calculateDotValue(e){if(null==this.referenceScale)return this.dotValue;const t=e/this.referenceScale*this.dotValue;return t<1?1:t}getSymbol(){return new N.Z({outline:this.outline})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}getAttributeHash(){return this.attributes&&this.attributes.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return JSON.stringify(this.outline)}clone(){return new _({attributes:(0,a.d9)(this.attributes),backgroundColor:(0,a.d9)(this.backgroundColor),dotBlendingEnabled:(0,a.d9)(this.dotBlendingEnabled),dotShape:(0,a.d9)(this.dotShape),dotSize:(0,a.d9)(this.dotSize),dotValue:(0,a.d9)(this.dotValue),legendOptions:(0,a.d9)(this.legendOptions),outline:(0,a.d9)(this.outline),referenceScale:(0,a.d9)(this.referenceScale),visualVariables:(0,a.d9)(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}getControllerHash(){return`${this.attributes.map((e=>e.field||e.valueExpression||""))}-${this.outline&&JSON.stringify(this.outline.toJSON())||""}`}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const i of this.attributes)i.valueExpression&&await(0,c.io)(e,t,i.valueExpression),i.field&&e.add(i.field)}};(0,o._)([(0,p.Cb)({type:[C],json:{write:!0}})],O.prototype,"attributes",void 0),(0,o._)([(0,p.Cb)({type:s.Z,json:{write:!0}})],O.prototype,"backgroundColor",void 0),(0,o._)([(0,p.Cb)({type:Boolean}),(0,l.B)("dotBlendingEnabled")],O.prototype,"blendDots",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],O.prototype,"dotBlendingEnabled",void 0),(0,o._)([(0,p.Cb)({type:String,json:{write:!1}})],O.prototype,"dotShape",void 0),(0,o._)([(0,p.Cb)({type:Number,json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1}}}})],O.prototype,"dotSize",void 0),(0,o._)([(0,p.Cb)({type:w,json:{write:!0}})],O.prototype,"legendOptions",void 0),(0,o._)([(0,p.Cb)({type:I.Z,json:{default:null,write:!0}})],O.prototype,"outline",void 0),(0,o._)([(0,p.Cb)({type:Number,json:{write:!0}})],O.prototype,"dotValue",void 0),(0,o._)([(0,p.Cb)({type:Number}),(0,l.B)("dotValue")],O.prototype,"referenceDotValue",void 0),(0,o._)([(0,p.Cb)({type:Number,json:{write:!0}})],O.prototype,"referenceScale",void 0),(0,o._)([(0,p.Cb)({type:Number,json:{write:!0}})],O.prototype,"seed",void 0),(0,o._)([(0,u.J)({dotDensity:"dot-density"})],O.prototype,"type",void 0),O=_=(0,o._)([(0,d.j)("esri.renderers.DotDensityRenderer")],O);const D=O},79056:(e,t,i)=>{i.d(t,{Z:()=>f});var r,o=i(43697),s=i(22303),a=i(22974),l=i(5600),n=(i(75215),i(36030)),u=i(52011),p=i(35671),d=i(5499),c=i(96674);i(67676),i(80442);let m=r=class extends c.wq{constructor(e){super(e),this.color=null,this.ratio=null}clone(){return new r({color:this.color,ratio:this.ratio})}};(0,o._)([(0,l.Cb)({type:s.Z,json:{write:!0}})],m.prototype,"color",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],m.prototype,"ratio",void 0),m=r=(0,o._)([(0,u.j)("esri.renderers.support.HeatmapColorStop")],m);const y=m;var b;let h=b=class extends d.Z{constructor(e){super(e),this.blurRadius=10,this.referenceScale=0,this.colorStops=[new y({ratio:0,color:new s.Z("rgba(255, 140, 0, 0)")}),new y({ratio:.75,color:new s.Z("rgba(255, 140, 0, 1)")}),new y({ratio:.9,color:new s.Z("rgba(255, 0, 0, 1)")})],this.field=null,this.fieldOffset=0,this.maxPixelIntensity=100,this.minPixelIntensity=0,this.type="heatmap"}async collectRequiredFields(e,t){const i=this.field;i&&"string"==typeof i&&(0,p.AB)(e,t,i)}getAttributeHash(){return null}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new b({blurRadius:this.blurRadius,referenceScale:this.referenceScale,colorStops:(0,a.d9)(this.colorStops),field:this.field,maxPixelIntensity:this.maxPixelIntensity,minPixelIntensity:this.minPixelIntensity})}};(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],h.prototype,"blurRadius",void 0),(0,o._)([(0,l.Cb)({type:Number})],h.prototype,"referenceScale",void 0),(0,o._)([(0,l.Cb)({type:[y],json:{write:!0}})],h.prototype,"colorStops",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"field",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{write:{overridePolicy:(e,t,i)=>({enabled:null==i})}}})],h.prototype,"fieldOffset",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],h.prototype,"maxPixelIntensity",void 0),(0,o._)([(0,l.Cb)({type:Number,json:{write:!0}})],h.prototype,"minPixelIntensity",void 0),(0,o._)([(0,n.J)({heatmap:"heatmap"})],h.prototype,"type",void 0),h=b=(0,o._)([(0,u.j)("esri.renderers.HeatmapRenderer")],h);const f=h},84382:(e,t,i)=>{i.d(t,{Z:()=>m});var r,o=i(43697),s=i(22974),a=i(5600),l=(i(75215),i(36030)),n=i(52011),u=i(5499),p=i(12571),d=i(9833);let c=r=class extends((0,p.W)(u.Z)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.getSymbols().map((i=>i.collectRequiredFields(e,t))))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}getSymbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return this.getSymbols().reduce(((e,t)=>e+JSON.stringify(t)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new r({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:(0,s.d9)(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,o._)([(0,a.Cb)(d.G)],c.prototype,"symbol",void 0),(0,o._)([(0,l.J)({simple:"simple"})],c.prototype,"type",void 0),c=r=(0,o._)([(0,n.j)("esri.renderers.SimpleRenderer")],c);const m=c},84475:(e,t,i)=>{i.r(t),i.d(t,{DictionaryLoader:()=>b});var r=i(22303),o=i(3172),s=i(20102),a=i(92604),l=i(13867),n=i(70586),u=i(95330),p=i(19153),d=i(59266),c=i(17386);const m=a.Z.getLogger("esri.renderers.support.DictionaryLoader"),y={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};class b{constructor(e,t,i){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new l.Z(100),this.url=e,this.config=t,this.fieldMap=i}getSymbolFields(){return this._symbolFields}async getSymbolAsync(e,t){let i;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(t));try{i=await this._dictionaryPromise}catch(e){if((0,u.D_)(e))return this._dictionaryPromise=null,null}const o={};if(this.fieldMap)for(const t of this._symbolFields){const i=this.fieldMap[t];if(i&&null!=e.attributes[i]){const r=""+e.attributes[i];o[t]=r}else o[t]=""}const s=i(o,t);if(!s||"string"!=typeof s)return null;const a=(0,p.hP)(s).toString(),l=this._symbolCache.get(a);if(l)return l.catch((()=>{this._symbolCache.pop(a)})),l;const d=s.split(";"),c=[],m=[];for(const e of d)if(e)if(e.includes("po:")){const t=e.substr(3).split("|");if(3===t.length){const e=t[0],i=t[1];let o=t[2];if("DashTemplate"===i)o=o.split(" ").map((e=>Number(e)));else if("Color"===i){const e=new r.Z(o).toRgba();o=[e[0],e[1],e[2],255*e[3]]}else o=Number(o);m.push({primitiveName:e,propertyName:i,value:o})}}else if(e.includes("|")){for(const t of e.split("|"))if(this._itemNames.has(t)){c.push(t);break}}else this._itemNames.has(e)&&c.push(e);const y=!(0,n.pC)(e.geometry)||!e.geometry.hasZ&&"point"===e.geometry.type,b=this._cimPartsToCIMSymbol(c,m,y,t);return this._symbolCache.put(a,b,1),b}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void m.error("no valid URL!");const t=(0,n.pC)(e)?e.abortOptions:null,i=(0,o.default)(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},...t}),[{data:r}]=await Promise.all([i,(0,d.LC)()]);if(!r)throw this._dictionaryPromise=null,new s.Z("esri.renderers.DictionaryRenderer","Bad dictionary data!");const a=r.expression,l=r.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+r.cimRefTemplateUrl,this._itemNames=new Set(r.itemsNames),this._symbolFields=l.symbol;const u={};if(this.config){const e=this.config;for(const t in e)u[t]=e[t]}if(l.configuration)for(const e of l.configuration)u.hasOwnProperty(e.name)||(u[e.name]=e.value);const p=[];if((0,n.pC)(e)&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const i=this.fieldMap[t],r=e.fields.filter((e=>e.name===i));r.length>0&&p.push({...r[0],name:t})}return this._dictionaryPromise=(0,d.pp)(a,(0,n.pC)(e)?e.spatialReference:null,p,u).then((e=>{const t={scale:0};return(i,r)=>{const o=e.repurposeFeature({geometry:null,attributes:i});return t.scale=(0,n.pC)(r)?r.scale:void 0,e.evaluate({$feature:o,$view:t})}})).catch((e=>(m.error("Creating dictinoary expression failed:",e),null))),this._dictionaryPromise}async _cimPartsToCIMSymbol(e,t,i,r){const o=new Array(e.length);for(let t=0;t<e.length;t++)o[t]=this._getSymbolPart(e[t],r);const s=await Promise.all(o),a=this.fieldMap;for(const e of s)h(e,a);return new c.Z({data:this._combineSymbolParts(s,t,i)})}async _getSymbolPart(e,t){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const i=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),r=(0,o.default)(i,{responseType:"json",query:{f:"json"},...t});this._ongoingRequests.set(e,r);try{return(await r).data}catch(t){throw this._ongoingRequests.delete(e),t}}_combineSymbolParts(e,t,i){if(!e||0===e.length)return null;const r={...e[0]};if(e.length>1){r.symbolLayers=[];for(const t of e){const e=t;r.symbolLayers.unshift(...e.symbolLayers)}}return i&&(r.callout=y),{type:"CIMSymbolReference",symbol:r,primitiveOverrides:t}}}function h(e,t){if(!e)return;const i=e.symbolLayers;if(!i)return;let r=i.length;for(;r--;){const e=i[r];e&&!1!==e.enable&&"CIMVectorMarker"===e.type&&f(e,t)}}function f(e,t){const i=e.markerGraphics;if(i)for(const e of i){if(!e)continue;const i=e.symbol;if(i)switch(i.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":h(i,t);break;case"CIMTextSymbol":i.fieldMap=t}}}},91423:(e,t,i)=>{i.d(t,{a:()=>l});var r=i(20941),o=i(63213),s=i(32400);const a=(0,o.d)({types:s.A});function l(e,t,i){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(i&&i.messages&&i.messages.push(new r.Z("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:i})),null):a(e,t,i):null}},99282:(e,t,i)=>{i.d(t,{a:()=>s});var r=i(67900),o=i(68441);const s={inches:(0,r.En)(1,"meters","inches"),feet:(0,r.En)(1,"meters","feet"),"us-feet":(0,r.En)(1,"meters","us-feet"),yards:(0,r.En)(1,"meters","yards"),miles:(0,r.En)(1,"meters","miles"),"nautical-miles":(0,r.En)(1,"meters","nautical-miles"),millimeters:(0,r.En)(1,"meters","millimeters"),centimeters:(0,r.En)(1,"meters","centimeters"),decimeters:(0,r.En)(1,"meters","decimeters"),meters:(0,r.En)(1,"meters","meters"),kilometers:(0,r.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,r.ty)(1,"meters",o.sv.radius)}},32400:(e,t,i)=>{i.d(t,{A:()=>p,o:()=>d});var r=i(16050),o=i(12501),s=i(95088),a=i(79056),l=i(5499),n=i(84382),u=i(30687);const p={key:"type",base:l.Z,typeMap:{heatmap:a.Z,simple:n.Z,"unique-value":u.Z,"class-breaks":r.Z,"dot-density":s.Z,dictionary:o.Z},errorContext:"renderer"},d={key:"type",base:l.Z,typeMap:{simple:n.Z,"unique-value":u.Z,"class-breaks":r.Z},errorContext:"renderer"}},51706:(e,t,i)=>{var r,o;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function a(e){return null!=e&&!isNaN(e)&&isFinite(e)}function l(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function n(e,t){const i=t||l(e),s=e.valueUnit||"unknown";return i===r.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}i.d(t,{PS:()=>l,QW:()=>n,RY:()=>r,hL:()=>o,iY:()=>s,qh:()=>a}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},28101:(e,t,i)=>{i.d(t,{B3:()=>m,Km:()=>b,Lq:()=>y,PR:()=>S,V3:()=>C,ap:()=>f,cM:()=>h});var r=i(22303),o=i(38171),s=i(74085),a=i(92604),l=i(70586),n=i(99282),u=i(51706);const p=a.Z.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),d=new o.Z,c=Math.PI,m=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function y(e,t,i){const o="visualVariables"in e&&e.visualVariables?e.visualVariables.find((e=>"color"===e.type)):e;if(!o)return;if("esri.renderers.visualVariables.ColorVariable"!==o.declaredClass)return void p.warn("The visualVariable should be an instance of esri.renderers.visualVariables.ColorVariable");const s="number"==typeof t,a=s?null:t,n=a&&a.attributes;let u=s?t:null;const d=o.field,{ipData:c,hasExpression:m}=o.cache;let y=o.cache.compiledFunc;if(!d&&!m){const e=o.stops;return e&&e[0]&&e[0].color}if("number"!=typeof u)if(m){if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void p.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,r=t.getViewInfo(e),s=t.createExecContext(a,r);if(!y){const e=t.createSyntaxTree(o.valueExpression);y=t.createFunction(e),o.cache.compiledFunc=y}u=t.executeFunction(y,s)}else n&&(u=n[d]);const b=o.normalizationField,h=n?parseFloat(n[b]):void 0;if(null!=u&&(!b||s||!isNaN(h)&&0!==h)){isNaN(h)||s||(u/=h);const e=T(u,c);if(e){const t=e[0],s=e[1],a=t===s?o.stops[t].color:r.Z.blendColors(o.stops[t].color,o.stops[s].color,e[2],(0,l.pC)(i)?i.color:void 0);return new r.Z(a)}}}function b(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.find((e=>"opacity"===e.type)):e;if(!r)return;if("esri.renderers.visualVariables.OpacityVariable"!==r.declaredClass)return void p.warn("The visualVariable should be an instance of esri.renderers.visualVariables.OpacityVariable");const o="number"==typeof t,s=o?null:t,a=s&&s.attributes;let n=o?t:null;const u=r.field,{ipData:d,hasExpression:c}=r.cache;let m=r.cache.compiledFunc;if(!u&&!c){const e=r.stops;return e&&e[0]&&e[0].opacity}if("number"!=typeof n)if(c){if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void p.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,o=t.getViewInfo(e),a=t.createExecContext(s,o);if(!m){const e=t.createSyntaxTree(r.valueExpression);m=t.createFunction(e),r.cache.compiledFunc=m}n=t.executeFunction(m,a)}else a&&(n=a[u]);const y=r.normalizationField,b=a?parseFloat(a[y]):void 0;if(null!=n&&(!y||o||!isNaN(b)&&0!==b)){isNaN(b)||o||(n/=b);const e=T(n,d);if(e){const t=e[0],i=e[1];if(t===i)return r.stops[t].opacity;{const o=r.stops[t].opacity;return o+(r.stops[i].opacity-o)*e[2]}}}}function h(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.find((e=>"rotation"===e.type)):e;if(!r)return;if("esri.renderers.visualVariables.RotationVariable"!==r.declaredClass)return void p.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const o=r.axis||"heading",s="heading"===o&&"arithmetic"===r.rotationType?90:0,a="heading"===o&&"arithmetic"===r.rotationType?-1:1,n="number"==typeof t?null:t,u=n&&n.attributes,d=r.field,{hasExpression:c}=r.cache;let m=r.cache.compiledFunc,y=0;if(!d&&!c)return y;if(c){if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void p.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,o=t.getViewInfo(e),s=t.createExecContext(n,o);if(!m){const e=t.createSyntaxTree(r.valueExpression);m=t.createFunction(e),r.cache.compiledFunc=m}y=t.executeFunction(m,s)}else u&&(y=u[d]||0);return y="number"!=typeof y||isNaN(y)?null:s+a*y,y}function f(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.find((e=>"size"===e.type)):e;if(!r)return;if("esri.renderers.visualVariables.SizeVariable"!==r.declaredClass)return void p.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");const o=function(e,t,i,r,o){switch(t.transformationType){case u.hL.Additive:return function(e,t,i,r){return e+(v(t.minSize,i,r)||t.minDataValue)}(e,t,i,r);case u.hL.Constant:return function(e,t,i){const r=e.stops;let o=r&&r.length&&r[0].size;return null==o&&(o=e.minSize),v(o,t,i)}(t,i,r);case u.hL.ClampedLinear:return function(e,t,i,r){const o=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),s=v(t.minSize,i,r),a=v(t.maxSize,i,r),n=(0,l.pC)(r)?r.shape:void 0;if(e<=t.minDataValue)return s;if(e>=t.maxDataValue)return a;if("area"===t.scaleBy&&n){const e="circle"===n,t=e?c*(s/2)**2:s*s,i=t+o*((e?c*(a/2)**2:a*a)-t);return e?2*Math.sqrt(i/c):Math.sqrt(i)}return s+o*(a-s)}(e,t,i,r);case u.hL.Proportional:return function(e,t,i,r){const o=(0,l.pC)(r)?r.shape:void 0,s=e/t.minDataValue,a=v(t.minSize,i,r),n=v(t.maxSize,i,r);let u=null;return u="circle"===o?2*Math.sqrt(s*(a/2)**2):"square"===o||"diamond"===o||"image"===o?Math.sqrt(s*a**2):s*a,g(u,a,n)}(e,t,i,r);case u.hL.Stops:return function(e,t,i,r,o){const[s,a,l]=T(e,o);if(s===a)return v(t.stops[s].size,i,r);{const e=v(t.stops[s].size,i,r);return e+(v(t.stops[a].size,i,r)-e)*l}}(e,t,i,r,o);case u.hL.RealWorldSize:return function(e,t,i,r){const o=((0,l.pC)(r)&&r.resolution?r.resolution:1)*n.a[t.valueUnit],s=v(t.minSize,i,r),a=v(t.maxSize,i,r),{valueRepresentation:u}=t;let p=null;return p="area"===u?2*Math.sqrt(e/c)/o:"radius"===u||"distance"===u?2*e/o:e/o,g(p,s,a)}(e,t,i,r);case u.hL.Identity:return e;case u.hL.Unknown:return null}}(function(e,t,i){const r="number"==typeof t,o=r?null:t,s=o&&o.attributes;let a=r?t:null;const{isScaleDriven:n}=e.cache;let d=e.cache.compiledFunc;if(n){const t=(0,l.pC)(i)?i.scale:void 0,r=(0,l.pC)(i)?i.view:void 0;a=null==t||"3d"===r?function(e){let t=null,i=null;const r=e.stops;return r?(t=r[0].value,i=r[r.length-1].value):(t=e.minDataValue||0,i=e.maxDataValue||0),(t+i)/2}(e):t}else if(!r)switch(e.inputValueType){case u.RY.Expression:{if((0,l.Wi)(i)||(0,l.Wi)(i.arcade))return void p.error("Use of arcade expressions requires an arcade context");const t={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},r=i.arcade.arcadeUtils,s=r.getViewInfo(t),n=r.createExecContext(o,s);if(!d){const t=r.createSyntaxTree(e.valueExpression);d=r.createFunction(t),e.cache.compiledFunc=d}a=r.executeFunction(d,n);break}case u.RY.Field:s&&(a=s[e.field]);break;case u.RY.Unknown:a=null}if(!(0,u.qh)(a))return null;if(r||!e.normalizationField)return a;const c=s?parseFloat(s[e.normalizationField]):null;return(0,u.qh)(c)&&0!==c?a/c:null}(r,t,i),r,t,i,r.cache.ipData);return null==o||isNaN(o)?0:o}function v(e,t,i){return null==e?null:(0,u.iY)(e)?f(e,t,i):(0,u.qh)(e)?e:null}function g(e,t,i){return(0,u.qh)(i)&&e>i?i:(0,u.qh)(t)&&e<t?t:e}function C(e,t,i){const{isScaleDriven:r}=e.cache;if(!(r&&"3d"===i||t))return null;const o={scale:t,view:i};let s=v(e.minSize,d,o),a=v(e.maxSize,d,o);if(null!=s||null!=a){if(s>a){const e=a;a=s,s=e}return{minSize:s,maxSize:a}}}function T(e,t){if(!t)return;let i=0,r=t.length-1;return t.some(((t,o)=>e<t?(r=o,!0):(i=o,!1))),[i,r,(e-t[i])/(t[r]-t[i])]}function S(e,t,i){const r=["proportional","proportional","proportional"];for(const o of e){const e=o.useSymbolValue?"symbol-value":f(o,t,i);switch(o.axis){case"width":r[0]=e;break;case"depth":r[1]=e;break;case"height":r[2]=e;break;case"width-and-depth":r[0]=e,r[1]=e;break;case"all":case void 0:case null:r[0]=e,r[1]=e,r[2]=e;break;default:(0,s.Bg)(o.axis)}}return r}},23334:(e,t,i)=>{i.d(t,{F:()=>N});var r=i(3172),o=i(70586),s=i(28263),a=i(82526),l=i(93924),n=i(11282),u=i(43697),p=i(38171),d=i(96674),c=i(5600),m=(i(67676),i(80442),i(75215),i(71715)),y=i(52011),b=i(74889),h=i(79166),f=i(95642);let v=class extends d.wq{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null}};(0,u._)([(0,c.Cb)({type:b.default,json:{write:!0}})],v.prototype,"directionLines",void 0),(0,u._)([(0,c.Cb)({type:b.default,json:{write:!0}})],v.prototype,"directionPoints",void 0),(0,u._)([(0,c.Cb)({type:f.Z,json:{write:!0}})],v.prototype,"directions",void 0),(0,u._)([(0,c.Cb)({type:p.Z,json:{write:!0}})],v.prototype,"route",void 0),(0,u._)([(0,c.Cb)({type:String,json:{write:!0}})],v.prototype,"routeName",void 0),(0,u._)([(0,c.Cb)({type:[p.Z],json:{write:!0}})],v.prototype,"stops",void 0),v=(0,u._)([(0,y.j)("esri.rest.support.RouteResult")],v);const g=v;function C(e){return e&&b.default.fromJSON(e).features.map((e=>e))}let T=class extends d.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return C(t.barriers)}readPolylineBarriers(e){return C(e)}readPolygonBarriers(e){return C(e)}};(0,u._)([(0,c.Cb)({type:[h.Z]})],T.prototype,"messages",void 0),(0,u._)([(0,c.Cb)({type:[p.Z]})],T.prototype,"pointBarriers",void 0),(0,u._)([(0,m.r)("pointBarriers",["barriers"])],T.prototype,"readPointBarriers",null),(0,u._)([(0,c.Cb)({type:[p.Z]})],T.prototype,"polylineBarriers",void 0),(0,u._)([(0,m.r)("polylineBarriers")],T.prototype,"readPolylineBarriers",null),(0,u._)([(0,c.Cb)({type:[p.Z]})],T.prototype,"polygonBarriers",void 0),(0,u._)([(0,m.r)("polygonBarriers")],T.prototype,"readPolygonBarriers",null),(0,u._)([(0,c.Cb)({type:[g]})],T.prototype,"routeResults",void 0),T=(0,u._)([(0,y.j)("esri.rest.support.RouteSolveResult")],T);const S=T,w=(0,s.E)({accumulateAttributes:{name:"accumulateAttributeNames"},attributeParameterValues:!0,directionsTimeAttribute:{name:"directionsTimeAttributeName"},impedanceAttribute:{name:"impedanceAttributeName"},outSpatialReference:{name:"outSR",getter:e=>e.outSpatialReference.wkid},pointBarriers:{name:"barriers"},polylineBarriers:!0,polygonBarriers:!0,restrictionAttributes:{name:"restrictionAttributeNames"},stops:!0,travelMode:!0});function _(e){return"esri.rest.support.FeatureSet"===(null==e?void 0:e.declaredClass)}async function N(e,t,i){const s=[],u=[],p={},d={},c=(0,n.en)(e),{path:m}=c;_(t.stops)&&(0,l.et)(t.stops.features,u,"stops.features",p),_(t.pointBarriers)&&(0,l.et)(t.pointBarriers.features,u,"pointBarriers.features",p),_(t.polylineBarriers)&&(0,l.et)(t.polylineBarriers.features,u,"polylineBarriers.features",p),_(t.polygonBarriers)&&(0,l.et)(t.polygonBarriers.features,u,"polygonBarriers.features",p);const y=await(0,a.aX)(u);for(const e in p){const t=p[e];s.push(e),d[e]=y.slice(t[0],t[1])}if((0,l.Wf)(d,s)){let e=null;try{e=await(0,l.bI)(m,t.apiKey,i)}catch{}e&&!e.hasZ&&(0,l.ef)(d,s)}for(const e in d)d[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const b={...i,query:{...c.query,...w.toQueryParams(t),f:"json"}},h=m.endsWith("/solve")?m:`${m}/solve`,{data:f}=await(0,r.default)(h,b);return function(e){var t,i,r,s,a;const l=new Map,{directionLines:n,directionPoints:u,directions:p,routes:d,stops:c,barriers:m,polygonBarriers:y,polylineBarriers:b,messages:h}=e,f=null!=(t=null!=(i=null!=(r=null!=(s=null==d?void 0:d.spatialReference)?s:null==c?void 0:c.spatialReference)?r:null==m?void 0:m.spatialReference)?i:null==y?void 0:y.spatialReference)?t:null==b?void 0:b.spatialReference;null==d||d.features.forEach((e=>{const t=e.attributes.Name,i=e.attributes.ObjectID;l.has(t)?(l.get(t).route=e,l.get(t).routeId=i):l.set(t,{route:e,routeId:i,routeName:t}),(0,o.pC)(e.geometry)&&(e.geometry.spatialReference=f)})),null==p||p.forEach((e=>{const t=e.routeName;l.has(t)?l.get(t).directions=e:l.set(t,{routeName:t,directions:e})})),null==c||c.features.forEach((e=>{var t;const i=null!=(t=e.attributes.RouteName)?t:null;l.has(i)?l.get(i).stops?l.get(i).stops.push(e):l.get(i).stops=[e]:l.set(i,{stops:[e],routeName:i}),(0,o.pC)(e.geometry)&&(e.geometry.spatialReference=f)}));const v=null==(a=null==c?void 0:c.features.every((e=>null==e.attributes.RouteName)))||a;if((null==c?void 0:c.features.length)>0&&v){const e=Array.from(l.keys())[0];l.get(e).stops=l.get(null).stops,l.delete(null)}null==n||n.features.forEach((e=>{var t;const i=e.attributes.RouteID,r=null==(t=Array.from(l.values()).find((e=>e.routeId===i)))?void 0:t.routeName;if(r)if(l.has(r))if(l.get(r).directionLines)l.get(r).directionLines.features.push(e);else{const{fieldAliases:t,geometryType:i,spatialReference:o}=n;l.get(r).directionLines={features:[e],fieldAliases:t,geometryType:i,spatialReference:o}}else{const{fieldAliases:t,geometryType:i,spatialReference:o}=n;l.set(r,{routeName:r,directionLines:{features:[e],fieldAliases:t,geometryType:i,spatialReference:o}})}})),null==u||u.features.forEach((e=>{var t;const i=e.attributes.RouteID,r=null==(t=Array.from(l.values()).find((e=>e.routeId===i)))?void 0:t.routeName;if(r)if(l.has(r))if(l.get(r).directionPoints)l.get(r).directionPoints.features.push(e);else{const{fieldAliases:t,geometryType:i,spatialReference:o}=u;l.get(r).directionPoints={features:[e],fieldAliases:t,geometryType:i,spatialReference:o}}else{const{fieldAliases:t,geometryType:i,spatialReference:o}=u;l.set(r,{routeName:r,directionPoints:{features:[e],fieldAliases:t,geometryType:i,spatialReference:o}})}}));const g=Array.from(l.values());return S.fromJSON({routeResults:g,barriers:m,polygonBarriers:y,polylineBarriers:b,messages:h})}(f)}},95642:(e,t,i)=>{i.d(t,{Z:()=>f});var r=i(43697),o=(i(66577),i(70586)),s=i(5600),a=(i(67676),i(80442),i(75215),i(71715)),l=i(52011),n=i(38171);let u=class extends n.Z{};(0,r._)([(0,s.Cb)()],u.prototype,"events",void 0),(0,r._)([(0,s.Cb)()],u.prototype,"strings",void 0),u=(0,r._)([(0,l.j)("esri.rest.support.DirectionsFeature")],u);const p=u;var d=i(74889),c=i(6570),m=i(82971),y=i(58901),b=i(13473);let h=class extends d.default{constructor(e){super(e),this.extent=null,this.features=null,this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){var i;if(!e)return[];const r=null!=(i=t.summary.envelope.spatialReference)?i:t.spatialReference,o=r&&m.Z.fromJSON(r);return e.map((e=>{var t,i;const r=this._decompressGeometry(e.compressedGeometry),s=new y.Z({...r,spatialReference:o}),a=null!=(t=null==(i=e.events)?void 0:i.map((e=>{const{arriveTimeUTC:t,ETA:i,point:{x:r,y:s,z:a},strings:l}=e;return new p({geometry:new b.Z({x:r,y:s,z:a,hasZ:void 0!==a,spatialReference:o}),attributes:{ETA:i,arriveTimeUTC:t},strings:l})})))?t:[];return new p({attributes:e.attributes,events:a,geometry:s,strings:e.strings})}))}get mergedGeometry(){if(!this.features)return null;const e=this.features.map((({geometry:e})=>(0,o.Wg)(e))),t=this.get("extent.spatialReference");return this._mergePolylinesToSinglePath(e,t)}get strings(){return this.features.map((({strings:e})=>e))}_decompressGeometry(e){let t=0,i=0,r=0,o=0;const s=[];let a,l,n,u,p,d,c,m,y=0,b=0,h=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,d=parseInt(p[y],32),y++,1&e&&(b=p.indexOf("|")+1,c=parseInt(p[b],32),b++),2&e&&(h=p.indexOf("|",b)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){a=parseInt(p[y],32)+t,y++,t=a,l=parseInt(p[y],32)+i,y++,i=l;const e=[a/d,l/d];b&&(u=parseInt(p[b],32)+r,b++,r=u,e.push(u/c)),h&&(n=parseInt(p[h],32)+o,h++,o=n,e.push(n/m)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}_mergePolylinesToSinglePath(e,t){if(0===e.length)return new y.Z({spatialReference:t});const i=[];for(const t of e)for(const e of t.paths)i.push(...e);const r=[];i.forEach(((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)}));const{hasM:o,hasZ:s}=e[0];return new y.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}};(0,r._)([(0,s.Cb)({type:c.Z,json:{read:{source:"summary.envelope"}}})],h.prototype,"extent",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"features",void 0),(0,r._)([(0,a.r)("features")],h.prototype,"readFeatures",null),(0,r._)([(0,s.Cb)()],h.prototype,"geometryType",void 0),(0,r._)([(0,s.Cb)({readOnly:!0})],h.prototype,"mergedGeometry",null),(0,r._)([(0,s.Cb)()],h.prototype,"routeId",void 0),(0,r._)([(0,s.Cb)()],h.prototype,"routeName",void 0),(0,r._)([(0,s.Cb)({value:null,readOnly:!0})],h.prototype,"strings",null),(0,r._)([(0,s.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],h.prototype,"totalDriveTime",void 0),(0,r._)([(0,s.Cb)({json:{read:{source:"summary.totalLength"}}})],h.prototype,"totalLength",void 0),(0,r._)([(0,s.Cb)({json:{read:{source:"summary.totalTime"}}})],h.prototype,"totalTime",void 0),h=(0,r._)([(0,l.j)("esri.rest.support.DirectionsFeatureSet")],h);const f=h},74889:(e,t,i)=>{i.r(t),i.d(t,{default:()=>C});var r,o=i(43697),s=i(66577),a=i(38171),l=i(35454),n=i(96674),u=i(22974),p=i(70586),d=i(5600),c=(i(75215),i(71715)),m=i(52011),y=i(30556),b=i(82971),h=i(33955),f=i(1231);const v=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=r=class extends n.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=b.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;(0,p.pC)(s.geometry)&&!l&&(s.geometry.spatialReference=i);const n=o.aggregateGeometries,u=s.aggregateGeometries;if(n&&(0,p.pC)(u))for(const e in u){const t=u[e],r=n[e],o=null==r?void 0:r.spatialReference;(0,p.pC)(t)&&!o&&(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void v.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&(0,p.pC)(e.geometry))return void v.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,h.im)(e);return!i&&t.spatialReference&&(r.spatialReference=b.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&(0,p.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)a((0,p.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,a]}=i,l=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a));for(const{geometry:e}of t)(0,p.pC)(e)&&l(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(l[0]),o=i(l[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&o.push(a)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y)}:"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];for(let e=0,r=a.length;e<r;e++){const r=a[e];e>0?(o+=r[0],s+=r[1]):(o=r[0],s=r[1]),r[0]=t(o),r[1]=i(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax)}:"multipoint"===e?e=>{const r=e.points;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];e>0?(o+=a[0],s+=a[1]):(o=a[0],s=a[1]),a[0]=t(o),a[1]=i(s)}}:void 0}};(0,o._)([(0,d.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.Cb)({type:[a.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,c.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,d.Cb)({type:[f.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,d.Cb)({types:s.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,c.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,d.Cb)({type:b.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,d.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=r=(0,o._)([(0,m.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const C=g}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5517],{91040:(t,e,r)=>{r.d(e,{yZ:()=>n});var s=r(67900);function n(t,e){const r=e||t.extent,n=t.width,o=(0,s.c9)(r&&r.spatialReference);return r&&n?r.width/n*o*s.hd*96:0}},61159:(t,e,r)=>{r.d(e,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},85517:(t,e,r)=>{r.r(e),r.d(e,{default:()=>ut});var s=r(43697),n=(r(66577),r(38171)),o=r(3172),a=r(92835),i=r(20102),u=r(80442),l=r(35454),d=r(83379),c=r(70586),p=r(78286),h=r(95330),y=r(17452),f=r(5600),m=(r(67676),r(75215),r(52011)),g=r(6570),b=r(33955),F=r(25278),R=r(59431),O=r(40330),S=r(76497),I=r(98326);function _(t){const e=t.toJSON();return e.attachmentTypes&&(e.attachmentTypes=e.attachmentTypes.join(",")),e.keywords&&(e.keywords=e.keywords.join(",")),e.globalIds&&(e.globalIds=e.globalIds.join(",")),e.objectIds&&(e.objectIds=e.objectIds.join(",")),e.size&&(e.size=e.size.join(",")),e}function q(t,e){const r={};for(const s of t){const{parentObjectId:t,parentGlobalId:n,attachmentInfos:o}=s;for(const s of o){const{id:o}=s,a=(0,y.qg)((0,O.Dp)(`${e}/${t}/attachments/${o}`)),i=I.Z.fromJSON(s);i.set({url:a,parentObjectId:t,parentGlobalId:n}),r[t]?r[t].push(i):r[t]=[i]}}return r}function v(t,e,r){let s={query:(0,S.A)({...t.query,f:"json",..._(e)})};return r&&(s={...r,...s,query:{...r.query,...s.query}}),(0,o.default)(t.path+"/queryAttachments",s)}var C=r(10158),x=r(11282),w=r(56545),j=r(41818),E=r(34599),T=r(57444),D=r(5396),A=r(4967),N=r(74085),P=r(69285),G=r(98732);function J(t,e){return e}function Z(t,e,r,s){switch(r){case 0:return z(t,e+s,0);case 1:return"lowerLeft"===t.originPosition?z(t,e+s,1):function({translate:t,scale:e},r,s){return t[s]-r*e[s]}(t,e+s,1)}}function k(t,e,r,s){return 2===r?z(t,e,2):Z(t,e,r,s)}function Q(t,e,r,s){return 2===r?z(t,e,3):Z(t,e,r,s)}function M(t,e,r,s){return 3===r?z(t,e,3):k(t,e,r,s)}function z({translate:t,scale:e},r,s){return t[s]+r*e[s]}class B{constructor(t){this.options=t,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this.previousCoordinate=[0,0],this.transform=null,this.applyTransform=J,this.lengths=[],this.currentLengthIndex=0,this.toAddInCurrentPath=0,this.vertexDimension=0,this.coordinateBuffer=null,this.coordinateBufferPtr=0,this._attributesConstructor=function(){}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(t){if(this.options.applyTransform&&(t.transform=null),this._attributesConstructor=function(){},this.coordinateBuffer=null,this.lengths.length=0,!t.hasZ)return;const e=(0,P.k)(t.geometryType,this.options.sourceSpatialReference,t.spatialReference);if(!(0,c.Wi)(e))for(const r of t.features)e(r.geometry)}createSpatialReference(){return{}}addField(t,e){t.fields.push(e);const r=t.fields.map((t=>t.name));this._attributesConstructor=function(){for(const t of r)this[t]=null}}addFeature(t,e){t.features.push(e)}prepareFeatures(t){switch(this.transform=t.transform,this.options.applyTransform&&t.transform&&(this.applyTransform=this._deriveApplyTransform(t)),this.vertexDimension=2,t.hasZ&&this.vertexDimension++,t.hasM&&this.vertexDimension++,t.geometryType){case"esriGeometryPoint":this.addCoordinate=(t,e,r)=>this.addCoordinatePoint(t,e,r),this.createGeometry=t=>this.createPointGeometry(t);break;case"esriGeometryPolygon":this.addCoordinate=(t,e,r)=>this._addCoordinatePolygon(t,e,r),this.createGeometry=t=>this._createPolygonGeometry(t);break;case"esriGeometryPolyline":this.addCoordinate=(t,e,r)=>this._addCoordinatePolyline(t,e,r),this.createGeometry=t=>this._createPolylineGeometry(t);break;case"esriGeometryMultipoint":this.addCoordinate=(t,e,r)=>this._addCoordinateMultipoint(t,e,r),this.createGeometry=t=>this._createMultipointGeometry(t);break;default:(0,N.Bg)(t.geometryType)}}createFeature(){return this.lengths.length=0,this.currentLengthIndex=0,this.previousCoordinate[0]=0,this.previousCoordinate[1]=0,this.coordinateBuffer=null,this.coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(t,e,r){0===this.lengths.length&&(this.toAddInCurrentPath=e),this.lengths.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,n=(0,G.$g)(r.clone(),r,!1,!1,this.transform),o=(0,G.di)(n,s,!1,!1);t.queryGeometryType=s,t.queryGeometry={...o}}createPointGeometry(t){const e={x:0,y:0,spatialReference:t.spatialReference};return t.hasZ&&(e.z=0),t.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){switch(e=this.applyTransform(this.transform,e,r,0),r){case 0:t.x=e;break;case 1:t.y=e;break;case 2:"z"in t?t.z=e:t.m=e;break;case 3:t.m=e}}_transformPathLikeValue(t,e){let r=0;return e<=1&&(r=this.previousCoordinate[e],this.previousCoordinate[e]+=t),this.applyTransform(this.transform,t,e,r)}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){0===r&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){0===r&&0==this.toAddInCurrentPath--&&(t.push([]),this.toAddInCurrentPath=this.lengths[++this.currentLengthIndex]-1,this.previousCoordinate[0]=0,this.previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),n=t[t.length-1];0===r&&(this.coordinateBufferPtr=0,this.coordinateBuffer=new Array(this.vertexDimension),n.push(this.coordinateBuffer)),this.coordinateBuffer[this.coordinateBufferPtr++]=s}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?M:e?k:r?Q:Z}}var U=r(74889);function V(t,e){const r=t.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),!r.outFields||null!=e&&e.returnCountOnly?delete r.outFields:r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","),r.outSpatialReference&&(r.outSR=r.outSR.wkid||JSON.stringify(r.outSR.toJSON()),delete r.outSpatialReference),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function L(t,e,r={},s){const n=(0,S.A)({...t.query,f:"json",...s,...V(e,s)});return(0,o.default)(t.path+"/queryRelatedRecords",{...r,query:{...r.query,...n}})}var $=r(75935);var W=r(82526),H=r(28694);const X="Layer does not support extent calculation.";function Y(t,e){var r,s;const n=t.geometry,o=t.toJSON(),a=o;if((0,c.pC)(n)&&(a.geometry=JSON.stringify(n),a.geometryType=(0,b.Ji)(n),a.inSR=n.spatialReference.wkid||JSON.stringify(n.spatialReference)),null!=(r=o.topFilter)&&r.groupByFields&&(a.topFilter.groupByFields=o.topFilter.groupByFields.join(",")),null!=(s=o.topFilter)&&s.orderByFields&&(a.topFilter.orderByFields=o.topFilter.orderByFields.join(",")),o.topFilter&&(a.topFilter=JSON.stringify(a.topFilter)),o.objectIds&&(a.objectIds=o.objectIds.join(",")),o.orderByFields&&(a.orderByFields=o.orderByFields.join(",")),o.outFields&&!(null!=e&&e.returnCountOnly||null!=e&&e.returnExtentOnly||null!=e&&e.returnIdsOnly)?o.outFields.includes("*")?a.outFields="*":a.outFields=o.outFields.join(","):delete a.outFields,o.outSR?a.outSR=o.outSR.wkid||JSON.stringify(o.outSR):n&&o.returnGeometry&&(a.outSR=a.inSR),o.returnGeometry&&delete o.returnGeometry,o.timeExtent){const t=o.timeExtent,{start:e,end:r}=t;null==e&&null==r||(a.time=e===r?e:`${null==e?"null":e},${null==r?"null":r}`),delete o.timeExtent}return a}function K(t,e,r,s={},n={}){const a="string"==typeof t?(0,y.mN)(t):t,i=e.geometry?[e.geometry]:[];return s.responseType="pbf"===r?"array-buffer":"json",(0,W.aX)(i,null,s).then((t=>{const i=t&&t[0];(0,c.pC)(i)&&((e=e.clone()).geometry=i);const u=(0,S.A)({...a.query,f:r,...n,...Y(e,n)});return(0,o.default)((0,y.v_)(a.path,"queryTopFeatures"),{...s,query:{...u,...s.query}})}))}var tt=r(28141);var et=r(59633);let rt=class extends et.Z{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.format="json",this.gdbVersion=null,this.infoFor3D=null,this.sourceSpatialReference=null}execute(t,e){return this.executeJSON(t,e).then((r=>this.featureSetFromJSON(t,r,e)))}async executeJSON(t,e){var r;const s={...this.requestOptions,...e},n=this._normalizeQuery(t),o=null!=(null==(r=t.outStatistics)?void 0:r[0]),a=(0,u.Z)("featurelayer-pbf-statistics"),i=!o||a;let l;if("pbf"===this.format&&i)try{l=await async function(t,e,r){const s=(0,x.en)(t),n={...r},o=T.Z.from(e),a=!o.quantizationParameters,{data:i}=await(0,E.executeQueryPBF)(s,o,new B({sourceSpatialReference:o.sourceSpatialReference,applyTransform:a}),n);return i}(this.url,n,s)}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.format="json"}return"json"!==this.format&&i||(l=await(0,A.F)(this.url,n,s)),this._normalizeFields(l.fields),l}async featureSetFromJSON(t,e,s){if(!this._queryIs3DObjectFormat(t)||(0,c.Wi)(this.infoFor3D)||!e.features||!e.features.length)return U.default.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,h.Hl)(Promise.all([r.e(4547),r.e(6481),r.e(6459),r.e(8163)]).then(r.bind(r,38163)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t);return(0,j.P)(this.url,s,r)}executeForExtent(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t);return async function(t,e,r){const s=(0,x.en)(t);return(0,E.executeQueryForExtent)(s,T.Z.from(e),{...r}).then((t=>({count:t.data.count,extent:g.Z.fromJSON(t.data.extent)})))}(this.url,s,r)}executeForIds(t,e){const r={...this.requestOptions,...e},s=this._normalizeQuery(t);return(0,D.G)(this.url,s,r)}executeRelationshipQuery(t,e){t=$.Z.from(t);const r={...this.requestOptions,...e};return(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),async function(t,e,r){return e=$.Z.from(e),async function(t,e,r){const s=await L(t,e,r),n=s.data,o=n.geometryType,a=n.spatialReference,i={};for(const t of n.relatedRecordGroups){const e={fields:void 0,objectIdFieldName:void 0,geometryType:o,spatialReference:a,hasZ:!!n.hasZ,hasM:!!n.hasM,features:t.relatedRecords};if(null!=t.objectId)i[t.objectId]=e;else for(const r in t)t.hasOwnProperty(r)&&"relatedRecords"!==r&&(i[t[r]]=e)}return{...s,data:i}}((0,x.en)(t),e,r).then((t=>{const e=t.data,r={};return Object.keys(e).forEach((t=>r[t]=U.default.fromJSON(e[t]))),r}))}(this.url,t,r)}executeRelationshipQueryForCount(t,e){t=$.Z.from(t);const r={...this.requestOptions,...e};return(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),async function(t,e,r){return e=$.Z.from(e),async function(t,e,r){const s=await L(t,e,r,{returnCountOnly:!0}),n=s.data,o={};for(const t of n.relatedRecordGroups)null!=t.objectId&&(o[t.objectId]=t.count);return{...s,data:o}}((0,x.en)(t),e,{...r}).then((t=>t.data))}(this.url,t,r)}executeAttachmentQuery(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,x.en)(t);return v(s,w.Z.from(e),{...r}).then((t=>q(t.data.attachmentGroups,s.path)))}(this.url,t,r)}executeTopFeaturesQuery(t,e){const r={...this.requestOptions,...e};return async function(t,e,r,s){const n=(0,x.en)(t),o={...s},{data:a}=await async function(t,e,r,s){const n=await K(t,e,"json",s);return(0,H.p)(e,r,n.data),n}(n,tt.Z.from(e),r,o);return U.default.fromJSON(a)}(this.parsedUrl,t,this.sourceSpatialReference,r)}executeForTopIds(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,x.en)(t);return(await async function(t,e,r){return(0,c.pC)(e.timeExtent)&&e.timeExtent.isEmpty?{data:{objectIds:[]}}:K(t,e,"json",r,{returnIdsOnly:!0})}(s,tt.Z.from(e),{...r})).data.objectIds}(this.parsedUrl,t,r)}executeForTopExtents(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,x.en)(t),n=await async function(t,e,r){return(0,c.pC)(e.timeExtent)&&e.timeExtent.isEmpty?{data:{count:0,extent:null}}:K(t,e,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((t=>{const e=t.data;if(e.hasOwnProperty("extent"))return t;if(e.features)throw new Error(X);if(e.hasOwnProperty("count"))throw new Error(X);return t}))}(s,tt.Z.from(e),{...r});return{count:n.data.count,extent:g.Z.fromJSON(n.data.extent)}}(this.parsedUrl,t,r)}executeForTopCount(t,e){const r={...this.requestOptions,...e};return async function(t,e,r){const s=(0,x.en)(t);return(await function(t,e,r){return(0,c.pC)(e.timeExtent)&&e.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):K(t,e,"json",r,{returnIdsOnly:!0,returnCountOnly:!0})}(s,tt.Z.from(e),{...r})).data.count}(this.parsedUrl,t,r)}_normalizeQuery(t){let e=T.Z.from(t);if(e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?C.n.from(t.dynamicDataSource):this.dynamicDataSource),(0,c.pC)(this.infoFor3D)&&this._queryIs3DObjectFormat(t)){e=e===t?e.clone():e,e.formatOf3DObjects=null;for(const t of this.infoFor3D.queryFormats){if("3D_glb"===t.id){e.formatOf3DObjects=t.id;break}"3D_gltf"!==t.id||e.formatOf3DObjects||(e.formatOf3DObjects=t.id)}if(!e.formatOf3DObjects)throw new i.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if((0,c.Wi)(e.outFields)||!e.outFields.includes("*")){e=e===t?e.clone():e,(0,c.Wi)(e.outFields)&&(e.outFields=[]);const{originX:r,originY:s,originZ:n,translationX:o,translationY:a,translationZ:i,scaleX:u,scaleY:l,scaleZ:d,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=this.infoFor3D.transformFieldRoles;e.outFields.push(r,s,n,o,a,i,u,l,d,p,h,y,f)}}return e}_normalizeFields(t){if((0,c.pC)(this.fieldsIndex)&&(0,c.pC)(t))for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryIs3DObjectFormat(t){return(0,c.pC)(this.infoFor3D)&&t.returnGeometry&&"xyFootprint"!==t.multipatchOption&&!t.outStatistics}};(0,s._)([(0,f.Cb)({type:C.n})],rt.prototype,"dynamicDataSource",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"fieldsIndex",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"format",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"gdbVersion",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"infoFor3D",void 0),(0,s._)([(0,f.Cb)()],rt.prototype,"sourceSpatialReference",void 0),rt=(0,s._)([(0,m.j)("esri.tasks.QueryTask")],rt);const st=rt;var nt=r(82971);const ot=new l.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),at=new Set(["Feature Layer","Table"]);let it=class extends d.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,h.Ds)((async()=>{var t,e;await this.load();const r=null==(t=this.sourceJSON.editingInfo)?void 0:t.lastEditDate;if(null==r)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const s=r!==(null==(e=this.sourceJSON.editingInfo)?void 0:e.lastEditDate);return{dataChanged:s,updates:s?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}))}load(t){const e=(0,c.pC)(t)?t.signal:null;return this.addResolvingPromise(this._fetchService(this.layer.sourceJSON,e)),Promise.resolve(this)}get queryTask(){const{capabilities:{query:{supportsFormatPBF:t}},parsedUrl:e,dynamicDataSource:r,infoFor3D:s,gdbVersion:n,spatialReference:o,fieldsIndex:a}=this.layer,i=(0,u.Z)("featurelayer-pbf")&&t&&(0,c.Wi)(s)?"pbf":"json";return new st({url:e.path,format:i,fieldsIndex:a,infoFor3D:s,dynamicDataSource:r,gdbVersion:n,sourceSpatialReference:o})}async addAttachment(t,e){await this.load();const r=t.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/addAttachment",n=this._getLayerRequestOptions(),a=this._getFormDataForAttachment(e,n.query);try{const t=await(0,o.default)(s,{body:a});return this._createFeatureEditResult(t.data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(r,t)}}async updateAttachment(t,e,r){await this.load();const s=t.attributes[this.layer.objectIdField],n=this.layer.parsedUrl.path+"/"+s+"/updateAttachment",a=this._getLayerRequestOptions({query:{attachmentId:e}}),i=this._getFormDataForAttachment(r,a.query);try{const t=await(0,o.default)(n,{body:i});return this._createFeatureEditResult(t.data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async applyEdits(t,e){await this.load();const r=t.addFeatures.map(this._serializeFeature,this),s=t.updateFeatures.map(this._serializeFeature,this),n=this._getFeatureIds(t.deleteFeatures,null==e?void 0:e.globalIdUsed);(0,R.P)(r,s,this.layer.spatialReference);const a=[],i=[],u=[...t.deleteAttachments];for(const e of t.addAttachments)a.push(await this._serializeAttachment(e));for(const e of t.updateAttachments)i.push(await this._serializeAttachment(e));const l=a.length||i.length||u.length?{adds:a,updates:i,deletes:u}:null,d={gdbVersion:(null==e?void 0:e.gdbVersion)||this.layer.gdbVersion,rollbackOnFailure:null==e?void 0:e.rollbackOnFailureEnabled,useGlobalIds:null==e?void 0:e.globalIdUsed,returnEditMoment:null==e?void 0:e.returnEditMoment,usePreviousEditMoment:null==e?void 0:e.usePreviousEditMoment,sessionId:null==e?void 0:e.sessionId};null!=e&&e.returnServiceEditsOption?(d.edits=JSON.stringify([{id:this.layer.layerId,adds:r,updates:s,deletes:n,attachments:l}]),d.returnServiceEditsOption=ot.toJSON(null==e?void 0:e.returnServiceEditsOption),d.returnServiceEditsInSourceSR=null==e?void 0:e.returnServiceEditsInSourceSR):(d.adds=r.length?JSON.stringify(r):null,d.updates=s.length?JSON.stringify(s):null,d.deletes=n.length?null!=e&&e.globalIdUsed?JSON.stringify(n):n.join(","):null,d.attachments=l&&JSON.stringify(l));const c=this._getLayerRequestOptions({method:"post",query:d}),p=null!=e&&e.returnServiceEditsOption?this.layer.url:this.layer.parsedUrl.path,h=await(0,o.default)(p+"/applyEdits",c);return this._createEditsResult(h)}async deleteAttachments(t,e){await this.load();const r=t.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,o.default)(s,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(t){throw this._createAttachmentErrorResult(r,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then((async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:n}=await(0,o.default)(`${s}/${r}`,e),{id:i,extent:u,fullExtent:l,timeExtent:d}=n,c=u||l;return{id:i,fullExtent:c&&g.Z.fromJSON(c),timeExtent:d&&a.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(t,e={}){const{parsedUrl:r}=this.layer,s=r.path;await this.load();const n=this._getLayerRequestOptions(e);if(!this.layer.get("capabilities.operations.supportsQueryAttachments")){const{objectIds:e}=t,r=[];for(const t of e){const e=s+"/"+t+"/attachments";r.push((0,o.default)(e,n))}return Promise.all(r).then((t=>e.map(((e,r)=>({parentObjectId:e,attachmentInfos:t[r].data.attachmentInfos}))))).then((t=>q(t,s)))}return this.queryTask.executeAttachmentQuery(t,n)}async queryFeatures(t,e){return await this.load(),this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...null==t?void 0:t.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const{data:r}=await(0,o.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,u.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:e}));t=r}this.sourceJSON=this._patchServiceJSON(t);const r=t.type;if(!at.has(r))throw new i.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}_patchServiceJSON(t){var e;if("Table"!==t.type&&t.geometryType&&(null==t||null==(e=t.drawingInfo)||!e.renderer)&&!t.defaultSymbol){const e=(0,F.bU)(t.geometryType).renderer;(0,p.RB)("drawingInfo.renderer",e,t)}return"esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),t}_serializeFeature(t){const{geometry:e,attributes:r}=t;return(0,c.Wi)(e)?{attributes:r}:"mesh"===e.type||"extent"===e.type?null:{geometry:e.toJSON(),attributes:r}}async _serializeAttachment(t){const{feature:e,attachment:r}=t,{globalId:s,name:n,contentType:o,data:a,uploadId:i}=r,u={globalId:s,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(e&&(u.parentGlobalId="attributes"in e?e.attributes&&e.attributes[this.layer.globalIdField]:e.globalId),i)u.uploadId=i;else if(a){const t=await async function(t){return"string"==typeof t?(0,y.sJ)(t)||{data:t}:new Promise(((e,r)=>{const s=new FileReader;s.readAsDataURL(t),s.onload=()=>e((0,y.sJ)(s.result)),s.onerror=t=>r(t)}))}(a);u.contentType=t.mediaType,u.data=t.data,a instanceof File&&(u.name=a.name)}return n&&(u.name=n),o&&(u.contentType=o),u}_getFeatureIds(t,e){const r=t[0];return r?this._canUseGlobalIds(e,t)?this._getGlobalIdsFromFeatureIdentifier(t):"objectId"in r?this._getObjectIdsFromFeatureIdentifier(t):this._getIdsFromFeatures(t):[]}_getIdsFromFeatures(t){const e=this.layer.objectIdField;return t.map((t=>t.attributes&&t.attributes[e]))}_canUseGlobalIds(t,e){return t&&"globalId"in e[0]}_getObjectIdsFromFeatureIdentifier(t){return t.map((t=>t.objectId))}_getGlobalIdsFromFeatureIdentifier(t){return t.map((t=>t.globalId))}_createEditsResult(t){var e;const r=t.data,{layerId:s}=this.layer,n=[];let o=null;if(Array.isArray(r))for(const t of r)n.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===s&&(o={addResults:t.addResults,updateResults:t.updateResults,deleteResults:t.deleteResults,attachments:t.attachments,editMoment:t.editMoment});else o=r;const a=null==(e=o)?void 0:e.attachments,i={addFeatureResults:o.addResults?o.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:o.updateResults?o.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:o.deleteResults?o.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:a&&a.addResults?a.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:a&&a.updateResults?a.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:a&&a.deleteResults?a.deleteResults.map(this._createFeatureEditResult,this):[]};if(o.editMoment&&(i.editMoment=o.editMoment),n.length>0){i.editedFeatureResults=[];for(const t of n){const{adds:e,updates:r,deletes:s,spatialReference:n}=t.editedFeatures,o=n?new nt.Z(n):null;i.editedFeatureResults.push({layerId:t.id,editedFeatures:{adds:(null==e?void 0:e.map((t=>this._createEditedFeature(t,o))))||[],updates:(null==r?void 0:r.map((t=>({original:this._createEditedFeature(t[0],o),current:this._createEditedFeature(t[1],o)}))))||[],deletes:(null==s?void 0:s.map((t=>this._createEditedFeature(t,o))))||[],spatialReference:o}})}}return i}_createEditedFeature(t,e){return new n.Z({attributes:t.attributes,geometry:(0,b.im)({...t.geometry,spatialReference:e})})}_createFeatureEditResult(t){const e=!0===t.success?null:t.error||{code:void 0,description:void 0};return{objectId:t.objectId,globalId:t.globalId,error:e?new i.Z("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}_createAttachmentErrorResult(t,e){const r=e.details.messages&&e.details.messages[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new i.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(t,e){const r=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(r)for(const t in e){const s=e[t];null!=s&&(r.set?r.set(t,s):r.append(t,s))}return r}_getLayerRequestOptions(t={}){const{parsedUrl:e,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...t,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...e.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}};(0,s._)([(0,f.Cb)()],it.prototype,"type",void 0),(0,s._)([(0,f.Cb)({constructOnly:!0})],it.prototype,"layer",void 0),(0,s._)([(0,f.Cb)({readOnly:!0})],it.prototype,"queryTask",null),it=(0,s._)([(0,m.j)("esri.layers.graphics.sources.FeatureLayerSource")],it);const ut=it},25278:(t,e,r)=>{r.d(e,{Dm:()=>d,Hq:()=>c,MS:()=>p,bU:()=>i});var s=r(80442),n=r(22974),o=r(61159),a=r(58333);function i(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.I4:"esriGeometryPolyline"===t?a.ET:a.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(t,e){if((0,s.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this.${e} = null;`;for(const e in t)r+=`this${u.test(e)?`.${e}`:`["${e}"]`} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function c(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(t)}}]}function p(t,e){return{attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0},editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},41818:(t,e,r)=>{r.d(e,{P:()=>a});var s=r(11282),n=r(34599),o=r(57444);async function a(t,e,r){const a=(0,s.en)(t);return(0,n.executeQueryForCount)(a,o.Z.from(e),{...r}).then((t=>t.data.count))}},5396:(t,e,r)=>{r.d(e,{G:()=>a});var s=r(11282),n=r(34599),o=r(57444);async function a(t,e,r){const a=(0,s.en)(t);return(0,n.executeQueryForIds)(a,o.Z.from(e),{...r}).then((t=>t.data.objectIds))}},4967:(t,e,r)=>{r.d(e,{F:()=>u,e:()=>i});var s=r(11282),n=r(34599),o=r(74889),a=r(57444);async function i(t,e,r){const s=await u(t,e,r);return o.default.fromJSON(s)}async function u(t,e,r){const o=(0,s.en)(t),i={...r},u=a.Z.from(e),{data:l}=await(0,n.executeQuery)(o,u,u.sourceSpatialReference,i);return l}},98326:(t,e,r)=>{r.d(e,{Z:()=>c});var s,n=r(43697),o=r(96674),a=r(5600),i=(r(67676),r(80442),r(75215)),u=r(52011);const l={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let d=s=class extends o.wq{constructor(t){super(t),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:t}=this,e=function(t){const{exifInfo:e,exifName:r,tagName:s}=t;if(!e||!r||!s)return null;const n=e.find((t=>t.name===r));return n?function(t){const{tagName:e,tags:r}=t;if(!r||!e)return null;const s=r.find((t=>t.name===e));return s&&s.value||null}({tagName:s,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:t});return l[e]||null}clone(){return new s({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,a.Cb)({type:String})],d.prototype,"contentType",void 0),(0,n._)([(0,a.Cb)()],d.prototype,"exifInfo",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],d.prototype,"orientationInfo",null),(0,n._)([(0,a.Cb)({type:i.z8})],d.prototype,"id",void 0),(0,n._)([(0,a.Cb)({type:String})],d.prototype,"globalId",void 0),(0,n._)([(0,a.Cb)({type:String})],d.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:String})],d.prototype,"name",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],d.prototype,"parentGlobalId",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],d.prototype,"parentObjectId",void 0),(0,n._)([(0,a.Cb)({type:i.z8})],d.prototype,"size",void 0),(0,n._)([(0,a.Cb)({json:{read:!1}})],d.prototype,"url",void 0),d=s=(0,n._)([(0,u.j)("esri.layers.support.AttachmentInfo")],d);const c=d},11282:(t,e,r)=>{r.d(e,{cv:()=>a,en:()=>o,lA:()=>n});var s=r(17452);function n(t,e){return e?{...e,query:{...t,...e.query}}:{query:t}}function o(t){return"string"==typeof t?(0,s.mN)(t):t}function a(t,e,r){const s={};for(const n in t){if("declaredClass"===n)continue;const o=t[n];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){s[n]=[];for(let t=0;t<o.length;t++)s[n][t]=a(o[t])}else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r&&r[n]);s[n]=e?t:JSON.stringify(t)}else s[n]=e?o:JSON.stringify(o);else s[n]=o}return s}r(91040)},59633:(t,e,r)=>{r.d(e,{Z:()=>l});var s=r(43697),n=r(15923),o=r(17452),a=r(5600),i=(r(67676),r(80442),r(75215),r(52011));let u=class extends n.Z{constructor(...t){super(...t),this.requestOptions=null,this.url=null}normalizeCtorArgs(t,e){return"string"!=typeof t?t:{url:t,...e}}get parsedUrl(){return this._parseUrl(this.url)}_parseUrl(t){return t?(0,o.mN)(t):null}_encode(t,e,r){const s={};for(const n in t){if("declaredClass"===n)continue;const o=t[n];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){s[n]=[];for(let t=0;t<o.length;t++)s[n][t]=this._encode(o[t])}else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r&&r[n]);s[n]=e?t:JSON.stringify(t)}else s[n]=e?o:JSON.stringify(o);else s[n]=o}return s}};(0,s._)([(0,a.Cb)({readOnly:!0})],u.prototype,"parsedUrl",null),(0,s._)([(0,a.Cb)()],u.prototype,"requestOptions",void 0),(0,s._)([(0,a.Cb)({type:String})],u.prototype,"url",void 0),u=(0,s._)([(0,i.j)("esri.tasks.Task")],u);const l=u}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7277],{7277:(e,t,s)=>{s.r(t),s.d(t,{toBinaryGLTF:()=>z});var i,n=s(17452),r=s(95330),E=s(13473);!function(e){e[e.JSON=1313821514]="JSON",e[e.BIN=5130562]="BIN"}(i||(i={}));class _{constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this.length=_.HEADER_SIZE,this.length+=_.CHUNK_HEADER_SIZE;const s=this._textToArrayBuffer(e);if(this.length+=this._alignTo(s.byteLength,4),t&&(this.length+=_.CHUNK_HEADER_SIZE,this.length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this.length),this.outView=new DataView(this.buffer),this._writeHeader();const n=this._writeChunk(s,12,i.JSON,32);t&&this._writeChunk(t,n,i.BIN)}_writeHeader(){this.outView.setUint32(0,_.MAGIC,!0),this.outView.setUint32(4,_.VERSION,!0),this.outView.setUint32(8,this.length,!0)}_writeChunk(e,t,s,i=0){const n=this._alignTo(e.byteLength,4);for(this.outView.setUint32(t,n,!0),this.outView.setUint32(t+=4,s,!0),this._writeArrayBuffer(this.outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)i&&this.outView.setUint8(t,i),t++;return t}_writeArrayBuffer(e,t,s,i,n){new Uint8Array(e,s,n).set(new Uint8Array(t,i,n),0)}_textToArrayBuffer(e){return(new TextEncoder).encode(e).buffer}_alignTo(e,t){return t*Math.ceil(e/t)}}_.HEADER_SIZE=12,_.CHUNK_HEADER_SIZE=8,_.MAGIC=1179937895,_.VERSION=2;var a,T,R,o,A,c,N,h=s(30175),f=s(70586),u=s(51305),S=s(94961),C=s(17896),O=s(65617),I=s(60746),l=s(66459);!function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(a||(a={})),function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(T||(T={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(R||(R={})),function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(o||(o={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(e){e.OPAQUE="OPAQUE",e.MASK="MASK",e.BLEND="BLEND"}(c||(c={})),function(e){e[e.NoColor=0]="NoColor",e[e.FaceColor=1]="FaceColor",e[e.VertexColor=2]="VertexColor"}(N||(N={}));var L=s(35371);class d{constructor(e,t,s,i,n){this.buffer=e,this.componentType=s,this.dataType=i,this.data=[],this.isFinalized=!1,this.accessorIndex=-1,this.accessorAttribute=null,this.accessorMin=null,this.accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this.bufferView={buffer:e.index,byteLength:-1,target:n};const r=this._getElementSize();r>=4&&n!==R.ELEMENT_ARRAY_BUFFER&&(this.bufferView.byteStride=r),t.bufferViews.push(this.bufferView),this.numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this.data.length;if(this.data.push(e),this.accessorIndex>=0){const s=t%this.numComponentsForDataType,i=this.accessorMin[s];this.accessorMin[s]="number"!=typeof i?e:Math.min(i,e);const n=this.accessorMax[s];this.accessorMax[s]="number"!=typeof n?e:Math.max(n,e)}}get dataSize(){return this.data.length*this._sizeComponentType()}get byteSize(){return e=this.dataSize,4*Math.ceil(e/4);var e}getByteOffset(){if(!this.isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this.buffer.getByteOffset(this)}get byteOffset(){if(!this.isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this.buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this.componentType){case L.g.BYTE:return new Int8Array(e,t);case L.g.FLOAT:return new Float32Array(e,t);case L.g.SHORT:return new Int16Array(e,t);case L.g.UNSIGNED_BYTE:return new Uint8Array(e,t);case L.g.UNSIGNED_INT:return new Uint32Array(e,t);case L.g.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this.data)}writeAsync(e){if(this.asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this.asyncWritePromise=e.then((e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this.data.push(t[e]);delete this.asyncWritePromise})),this.asyncWritePromise}startAccessor(e){if(this.accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this.accessorIndex=this.data.length,this.accessorAttribute=e;const t=this.numComponentsForDataType;this.accessorMin=new Array(t),this.accessorMax=new Array(t)}endAccessor(){if(this.accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this.numComponentsForDataType,s=(this.data.length-this.accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this.accessorMin.length;++e)"number"!=typeof this.accessorMin[e]&&(this.accessorMin[e]=0),"number"!=typeof this.accessorMax[e]&&(this.accessorMax[e]=0);const i={byteOffset:e*(this.accessorIndex/t),componentType:this.componentType,count:s,type:this.dataType,min:this.accessorMin,max:this.accessorMax,name:this.accessorAttribute};switch(this.accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this.componentType){case L.g.UNSIGNED_BYTE:case L.g.UNSIGNED_SHORT:i.normalized=!0}}return this.accessorIndex=-1,this.accessorAttribute=null,this.accessorMin=null,this.accessorMax=null,i}get finalized(){return this.finalizedPromise?this.finalizedPromise:this.isFinalized?this.finalizedPromise=Promise.resolve():this.finalizedPromise=new Promise((e=>this.finalizedPromiseResolve=e))}finalize(){const e=this.bufferView;return new Promise((e=>{const t=this.buffer.getViewFinalizePromises(this);this.asyncWritePromise&&t.push(this.asyncWritePromise),e((0,r.as)(t))})).then((()=>{this.isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this.finalizedPromiseResolve&&this.finalizedPromiseResolve()}))}_getElementSize(){return this._sizeComponentType()*this.numComponentsForDataType}_sizeComponentType(){switch(this.componentType){case L.g.BYTE:case L.g.UNSIGNED_BYTE:return 1;case L.g.SHORT:case L.g.UNSIGNED_SHORT:return 2;case L.g.UNSIGNED_INT:case L.g.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this.dataType){case o.SCALAR:return 1;case o.VEC2:return 2;case o.VEC3:return 3;case o.VEC4:case o.MAT2:return 4;case o.MAT3:return 9;case o.MAT4:return 16}}}class M{constructor(e){this.gltf=e,this.bufferViews=[],this.isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this.buffer=t}addBufferView(e,t,s){if(this.finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const i=new d(this,this.gltf,e,t,s);return this.bufferViews.push(i),i}getByteOffset(e){let t=0;for(const s of this.bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this.bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this.isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this.bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this.finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this.finalizePromise=new Promise((e=>{e((0,r.as)(this.getViewFinalizePromises()))})).then((()=>{this.isFinalized=!0;const e=this.getArrayBuffer();this.buffer.byteLength=e.byteLength,this.buffer.uri=e})),this.gltf.extras.promises.push(this.finalizePromise),this.finalizePromise}_getTotalSize(){let e=0;for(const t of this.bufferViews)e+=t.byteSize;return e}}function D(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&B(s,t)}function B(e,t){(0,f.Wi)(t.normal)&&(t.normal=new Float32Array(t.position.length));const s=e.faces,{position:i,normal:n}=t,r=s.length/3;for(let e=0;e<r;++e){const t=3*s[3*e+0],r=3*s[3*e+1],E=3*s[3*e+2],_=(0,C.s)(P,i[t+0],i[t+1],i[t+2]),a=(0,C.s)(g,i[r+0],i[r+1],i[r+2]),T=(0,C.s)(U,i[E+0],i[E+1],i[E+2]),R=(0,C.b)(a,a,_),o=(0,C.b)(T,T,_),A=(0,C.f)(R,R,o);n[t+0]+=A[0],n[t+1]+=A[1],n[t+2]+=A[2],n[r+0]+=A[0],n[r+1]+=A[1],n[r+2]+=A[2],n[E+0]+=A[0],n[E+1]+=A[1],n[E+2]+=A[2]}for(let e=0;e<n.length;e+=3)(0,C.s)(p,n[e],n[e+1],n[e+2]),(0,C.n)(p,p),n[e+0]=p[0],n[e+1]=p[1],n[e+2]=p[2]}const P=(0,O.c)(),g=(0,O.c)(),U=(0,O.c)(),p=(0,O.c)();s(80442);var G=s(20102);async function m(e){const t=F(e);if((0,f.Wi)(t))throw new G.Z("imageToArrayBuffer","Unsupported image type");const s=await async function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,n.HK)(t)){const{mediaType:e}=(0,n.sJ)(t);return"image/jpeg"===e?e:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),i=await new Promise((e=>t.toBlob(e,s)));if(!i)throw new G.Z("imageToArrayBuffer","Failed to encode image");return{data:await i.arrayBuffer(),type:s}}function F(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,e.width,e.height),t}class w{constructor(e,t,s){this.params={},this.materialMap=new Array,this.imageMap=new Map,this.textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{options:t,binChunkBuffer:null,promises:[]}},s&&(this.params=s),this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras.options.bufferOutputType===a.GLB||this.gltf.extras.options.imageOutputType===T.GLB;t&&(this.gltf.extras.binChunkBuffer=new M(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),t&&this.gltf.extras.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]);const s=this._addNode(e);t.nodes.push(s)})),this.gltf.scenes.push(t)}_addNode(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,C.k)(s,O.Z)||(t.translation=(0,O.a)(s));const i=e.rotation;(0,u.j)(i,S.I)||(t.rotation=(0,S.b)(i));const n=e.scale;(0,C.k)(n,O.O)||(t.scale=(0,O.a)(n)),e.mesh&&e.mesh.vertexAttributes.position?t.mesh=this._addMesh(e.mesh):e.forEachNode((e=>{t.children||(t.children=[]);const s=this._addNode(e);t.children.push(s)}));const r=this.gltf.nodes.length;return this.gltf.nodes.push(t),r}_addMesh(e){this.gltf.meshes||(this.gltf.meshes=[]);const t={primitives:[]},s=this.gltf.extras.options.bufferOutputType===a.GLB;let i;i=s?this.gltf.extras.binChunkBuffer:new M(this.gltf),this.params.origin||(this.params.origin=function(e){if((0,f.pC)(e.transform))return e.transform.getOriginPoint(e.spatialReference);const t=e.extent.xmax-e.extent.width/2,s=e.extent.ymax-e.extent.height/2,i=e.extent.zmin;return new E.Z({x:t,y:s,z:i,spatialReference:e.extent.spatialReference})}(e));const n=(0,l.Yq)(e.vertexAttributes,e.transform,this.params.origin,{geographic:this.params.geographic,unit:"meters"});D(e,n),this._flipYZAxis(n);const r=i.addBufferView(L.g.FLOAT,o.VEC3,R.ARRAY_BUFFER);let _,T,A,c;n.normal&&(_=i.addBufferView(L.g.FLOAT,o.VEC3,R.ARRAY_BUFFER)),e.vertexAttributes.uv&&(T=i.addBufferView(L.g.FLOAT,o.VEC2,R.ARRAY_BUFFER)),n.tangent&&(A=i.addBufferView(L.g.FLOAT,o.VEC4,R.ARRAY_BUFFER)),e.vertexAttributes.color&&(c=i.addBufferView(L.g.UNSIGNED_BYTE,o.VEC4,R.ARRAY_BUFFER)),r.startAccessor("POSITION"),_&&_.startAccessor("NORMAL"),T&&T.startAccessor("TEXCOORD_0"),A&&A.startAccessor("TANGENT"),c&&c.startAccessor("COLOR_0");const N=n.position.length/3,{position:h,normal:u,tangent:S}=n,{color:C,uv:O}=e.vertexAttributes;for(let e=0;e<N;++e)r.push(h[3*e+0]),r.push(h[3*e+1]),r.push(h[3*e+2]),_&&(0,f.pC)(u)&&(_.push(u[3*e+0]),_.push(u[3*e+1]),_.push(u[3*e+2])),T&&(0,f.pC)(O)&&(T.push(O[2*e+0]),T.push(O[2*e+1])),A&&(0,f.pC)(S)&&(A.push(S[4*e+0]),A.push(S[4*e+1]),A.push(S[4*e+2]),A.push(S[4*e+3])),c&&(0,f.pC)(C)&&(c.push(C[4*e+0]),c.push(C[4*e+1]),c.push(C[4*e+2]),c.push(C[4*e+3]));const I=r.endAccessor(),d=this._addAccessor(r.index,I);let B,P,g,U,p;if(_){const e=_.endAccessor();B=this._addAccessor(_.index,e)}if(T){const e=T.endAccessor();P=this._addAccessor(T.index,e)}if(A){const e=A.endAccessor();g=this._addAccessor(A.index,e)}if(c){const e=c.endAccessor();U=this._addAccessor(c.index,e)}e.components&&e.components.length>0&&e.components[0].faces?(p=i.addBufferView(L.g.UNSIGNED_INT,o.SCALAR,R.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(p,e.components,t,d,B,P,g,U)):this._addMeshVertexNonIndexed(e.components,t,d,B,P,g,U),r.finalize(),_&&_.finalize(),T&&T.finalize(),A&&A.finalize(),p&&p.finalize(),c&&c.finalize(),s||i.finalize();const G=this.gltf.meshes.length;return this.gltf.meshes.push(t),G}_flipYZAxis({position:e,normal:t,tangent:s}){this._flipYZBuffer(e,3),this._flipYZBuffer(t,3),this._flipYZBuffer(s,4)}_flipYZBuffer(e,t){if(!(0,f.Wi)(e))for(let s=1,i=2;s<e.length;s+=t,i+=t){const t=e[s],n=e[i];e[s]=n,e[i]=-t}}_addMaterial(e){if(null===e)return;const t=this.materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=c.MASK;break;case"auto":case"blend":s.alphaMode=c.BLEND}.5!==e.alphaCutoff&&(s.alphaCutoff=e.alphaCutoff),e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const i=e=>e**2.1,n=e=>{const t=e.toRgba();return t[0]=i(t[0]/255),t[1]=i(t[1]/255),t[2]=i(t[2]/255),t};if((0,f.pC)(e.color)&&(s.pbrMetallicRoughness.baseColorFactor=n(e.color)),(0,f.pC)(e.colorTexture)&&(s.pbrMetallicRoughness.baseColorTexture={index:this._addTexture(e.colorTexture)}),(0,f.pC)(e.normalTexture)&&(s.normalTexture={index:this._addTexture(e.normalTexture)}),e instanceof I.Z){if((0,f.pC)(e.emissiveTexture)&&(s.emissiveTexture={index:this._addTexture(e.emissiveTexture)}),(0,f.pC)(e.emissiveColor)){const t=n(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}(0,f.pC)(e.occlusionTexture)&&(s.occlusionTexture={index:this._addTexture(e.occlusionTexture)}),(0,f.pC)(e.metallicRoughnessTexture)&&(s.pbrMetallicRoughness.metallicRoughnessTexture={index:this._addTexture(e.metallicRoughnessTexture)}),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1;const r=this.gltf.materials.length;return this.gltf.materials.push(s),this.materialMap.push(e),r}_addTexture(e){return this.gltf.textures||(this.gltf.textures=[]),(0,h.s1)(this.textureMap,e,(()=>{const t={sampler:this._addSampler(e),source:this._addImage(e)},s=this.gltf.textures.length;return this.gltf.textures.push(t),s}))}_addImage(e){const t=this.imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{s.extras=e.data;for(let t=0;t<this.gltf.images.length;++t)if(e.data===this.gltf.images[t].extras)return t;switch(this.gltf.extras.options.imageOutputType){case T.GLB:{const t=this.gltf.extras.binChunkBuffer.addBufferView(L.g.UNSIGNED_BYTE,o.SCALAR),i=m(e.data).then((({data:e,type:t})=>(s.mimeType=t,e)));t.writeAsync(i).then((()=>{t.finalize()})),s.bufferView=t.index;break}case T.DataURI:s.uri=function(e){const t=F(e);return(0,f.pC)(t)?t.toDataURL():""}(e.data);break;default:this.gltf.extras.promises.push(m(e.data).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const i=this.gltf.images.length;return this.gltf.images.push(s),this.imageMap.set(e,i),i}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=L.e8.REPEAT,s=L.e8.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=L.e8.CLAMP_TO_EDGE,s=L.e8.CLAMP_TO_EDGE;break;case"mirror":t=L.e8.MIRRORED_REPEAT,s=L.e8.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=L.e8.CLAMP_TO_EDGE;break;case"mirror":s=L.e8.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=L.e8.CLAMP_TO_EDGE;break;case"mirror":t=L.e8.MIRRORED_REPEAT}}const i={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(i)===JSON.stringify(this.gltf.samplers[e]))return e;const n=this.gltf.samplers.length;return this.gltf.samplers.push(i),n}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const i=this.gltf.accessors.length;return this.gltf.accessors.push(s),i}_addMeshVertexIndexed(e,t,s,i,n,r,E,_){for(const a of t){e.startAccessor("INDICES");for(let t=0;t<a.faces.length;++t)e.push(a.faces[t]);const t=e.endAccessor(),T={attributes:{POSITION:i},indices:this._addAccessor(e.index,t),material:this._addMaterial(a.material)};n&&"flat"!==a.shading&&(T.attributes.NORMAL=n),r&&(T.attributes.TEXCOORD_0=r),E&&"flat"!==a.shading&&(T.attributes.TANGENT=E),_&&(T.attributes.COLOR_0=_),s.primitives.push(T)}}_addMeshVertexNonIndexed(e,t,s,i,n,r,E){const _={attributes:{POSITION:s}};i&&(_.attributes.NORMAL=i),n&&(_.attributes.TEXCOORD_0=n),r&&(_.attributes.TANGENT=r),E&&(_.attributes.COLOR_0=E),e&&(_.material=this._addMaterial(e[0].material)),t.primitives.push(_)}}var b=s(67676);class y{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,b.Od)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class H{constructor(e){this.mesh=e,this.name="",this.translation=(0,O.c)(),this.rotation=(0,S.a)(),this.scale=(0,O.a)(O.O),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,u.k)(this.rotation,e[0],e[1],e[2])}}const x="model.glb";class V{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}class Y{constructor(e,t){this._file={type:"model/gltf-binary",data:e},this.origin=t}buffer(){return Promise.resolve(this._file)}download(e){(0,n.io)(new Blob([this._file.data],{type:this._file.type}),e)}}function z(e,t){const s=new y,i=new V;return s.addScene(i),i.addNode(new H(e)),function(e,t){return function(e,t,s){const i=new w(e,t=t||{},s);let n=i.params;n?n.origin||(n.origin=new E.Z({x:-1,y:-1,z:-1})):n={origin:new E.Z({x:-1,y:-1,z:-1})};const R=n.origin,o=i.gltf,A=o.extras.promises;let c=1,N=1,h=null;return(0,r.as)(A).then((()=>{const e={origin:R};delete o.extras;const s="number"==typeof t.jsonSpacing?t.jsonSpacing:4,i=JSON.stringify(o,((s,i)=>{if("extras"!==s){if(i instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(i))switch(t.imageOutputType){case T.DataURI:case T.GLB:break;case T.External:default:{const t=`img${N}.png`;return N++,e[t]=i,t}}switch(t.bufferOutputType){case a.DataURI:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(i);case a.GLB:if(h)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(h=i);case a.External:default:{const t=`data${c}.bin`;return c++,e[t]=i,t}}}return i}}),s);return t.bufferOutputType===a.GLB||t.imageOutputType===T.GLB?e[x]=new _(i,h).buffer:e["model.gltf"]=i,e}))}(e,{bufferOutputType:a.GLB,imageOutputType:T.GLB,jsonSpacing:0},t)}(s,t).then((e=>new Y(e[x],e.origin)))}},35371:(e,t,s)=>{var i,n,r,E,_,a,T,R,o,A,c,N,h,f,u,S,C,O,I,l,L,d,M,D;s.d(t,{Br:()=>S,LR:()=>a,Lm:()=>L,Lu:()=>B,MX:()=>n,No:()=>h,OU:()=>d,Tg:()=>C,VI:()=>f,VY:()=>D,Wf:()=>T,_g:()=>M,cw:()=>c,db:()=>E,e8:()=>N,g:()=>R,l1:()=>O,lP:()=>u,q_:()=>P,qi:()=>l,w0:()=>_,wb:()=>o,xS:()=>A,zi:()=>r}),function(e){e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(i||(i={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(n||(n={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(r||(r={})),function(e){e[e.ADD=32774]="ADD",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(E||(E={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER"}(_||(_={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(a||(a={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(T||(T={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT"}(R||(R={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(o||(o={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(A||(A={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(N||(N={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(h||(h={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(f||(f={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(u||(u={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(S||(S={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(C||(C={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(O||(O={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(I||(I={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(l||(l={})),function(e){e[e.TEXTURE=0]="TEXTURE",e[e.RENDER_BUFFER=1]="RENDER_BUFFER",e[e.CUBEMAP=2]="CUBEMAP"}(L||(L={})),function(e){e[e.NONE=0]="NONE",e[e.DEPTH_RENDER_BUFFER=1]="DEPTH_RENDER_BUFFER",e[e.STENCIL_RENDER_BUFFER=2]="STENCIL_RENDER_BUFFER",e[e.DEPTH_STENCIL_RENDER_BUFFER=3]="DEPTH_STENCIL_RENDER_BUFFER",e[e.DEPTH_STENCIL_TEXTURE=4]="DEPTH_STENCIL_TEXTURE"}(d||(d={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.Sync=7]="Sync",e[e.COUNT=8]="COUNT"}(M||(M={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(D||(D={}));const B=33306;var P,g,U,p,G,m,F;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(P||(P={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(g||(g={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(U||(U={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(p||(p={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(G||(G={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(m||(m={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(F||(F={}))}}]);
|