@arcgis/core 4.34.0-next.70 → 4.34.0-next.71

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.
Files changed (85) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{f47a0b9e500af2b9453b.js → 1f51c94d392826fdbdf4.js} +1 -1
  3. package/assets/esri/core/workers/chunks/ada8e07ff12bc5d4a1d9.js +1 -0
  4. package/assets/esri/core/workers/chunks/{6f4079b7a2b45f304ee6.js → e21eeb4e78a46fb7e32e.js} +1 -1
  5. package/assets/esri/core/workers/chunks/ed8a85efbd90241512bb.js +1 -0
  6. package/config.js +1 -1
  7. package/geometry/support/aaBoundingBox.js +1 -1
  8. package/geometry/support/aaBoundingRect.js +1 -1
  9. package/geometry/support/rotate.js +1 -1
  10. package/interfaces.d.ts +10 -10
  11. package/kernel.js +1 -1
  12. package/layers/BaseElevationLayer.js +1 -1
  13. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  14. package/networks/CircuitManager.js +1 -1
  15. package/networks/support/Circuit.js +5 -0
  16. package/networks/support/CircuitLocation.js +5 -0
  17. package/networks/support/CircuitPath.js +5 -0
  18. package/networks/support/CircuitPathConnectivityElement.js +5 -0
  19. package/networks/support/CircuitSection.js +5 -0
  20. package/networks/support/Subcircuit.js +5 -0
  21. package/networks/support/typeUtils.js +1 -1
  22. package/package.json +1 -1
  23. package/rest/networks/circuits/support/CircuitTraceResult.js +5 -0
  24. package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
  25. package/rest/networks/circuits/support/CreateAlterCircuitParameters.js +1 -1
  26. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  27. package/rest/networks/circuits/support/QueryCircuitsResult.js +1 -1
  28. package/rest/networks/support/TraceLocation.js +1 -1
  29. package/rest/networks/support/TraceResult.js +1 -1
  30. package/rest/print.js +1 -1
  31. package/smartMapping/heuristics/scaleRange.js +1 -1
  32. package/smartMapping/heuristics/sizeRange.js +1 -1
  33. package/support/revision.js +1 -1
  34. package/views/2d/navigation/actions/Pan.js +1 -1
  35. package/views/2d/navigation/actions/Pinch.js +1 -1
  36. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  37. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  38. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  39. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  40. package/views/3d/camera/intersectionUtils.js +1 -1
  41. package/views/3d/constraints/Constraints.js +1 -1
  42. package/views/3d/layers/FlowSubView3D.js +1 -1
  43. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  44. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  45. package/views/3d/state/ConstraintsManager.js +1 -1
  46. package/views/3d/state/NearFarHeuristic.js +1 -1
  47. package/views/3d/state/ViewState.js +1 -1
  48. package/views/3d/state/ViewStateManager.js +1 -1
  49. package/views/3d/state/controllers/CameraController.js +1 -1
  50. package/views/3d/state/controllers/InteractiveController.js +1 -1
  51. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  52. package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +1 -1
  53. package/views/3d/state/controllers/momentum/MomentumController.js +1 -1
  54. package/views/3d/state/controllers/momentum/RotationMomentumController.js +1 -1
  55. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  56. package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
  57. package/views/3d/support/MemoryController.js +1 -1
  58. package/views/3d/support/flow/loadUtils.js +1 -1
  59. package/views/3d/{support → terrain}/ElevationUpdateEvent.js +1 -1
  60. package/views/3d/terrain/Overlay.js +1 -1
  61. package/views/3d/terrain/OverlayManager.js +1 -1
  62. package/views/3d/terrain/TerrainSurface.js +1 -1
  63. package/views/3d/webgl/RenderCamera.js +1 -1
  64. package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
  65. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  66. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  67. package/views/SceneView.js +1 -1
  68. package/views/draw/support/Reshape.js +1 -1
  69. package/views/draw/support/drawUtils.js +1 -1
  70. package/views/draw/support/reshapeTooltipUtils.js +1 -1
  71. package/views/draw/support/reshapeUtils.js +5 -0
  72. package/views/interactive/tooltip/content/TooltipContentElevation.js +5 -0
  73. package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
  74. package/views/interactive/tooltip/infos/ElevationTooltipInfo.js +5 -0
  75. package/views/navigation/Momentum.js +1 -1
  76. package/widgets/Editor/Upload.js +1 -1
  77. package/assets/esri/core/workers/chunks/57a579b0cbc1bcf0d903.js +0 -1
  78. package/assets/esri/core/workers/chunks/dd120d562b63618e71c0.js +0 -1
  79. package/rest/networks/support/Circuit.js +0 -5
  80. package/rest/networks/support/CircuitLocation.js +0 -5
  81. package/rest/networks/support/CircuitPath.js +0 -5
  82. package/rest/networks/support/CircuitPathConnectivityElement.js +0 -5
  83. package/rest/networks/support/CircuitSection.js +0 -5
  84. package/rest/networks/support/CircuitTraceResult.js +0 -5
  85. package/rest/networks/support/Subcircuit.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[603],{70603:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>ie});var i=n(52106),r=n(66131),o=n(47609),a=n(66395),s=n(59534),l=n(85935),u=n(93833),d=n(40334),c=n(93818),f=n(78878),m=n(80672),p=n(68423),y=n(35704),w=n(86691),g=n(54461),I=n(85978),h=n(30235),F=n(87594),b=n(33325),D=n(80609),N=n(334),A=n(74887),T=n(88368),v=n(29784),k=n(20437),C=n(20655),E=n(78888),S=n(51447),$=n(53966),x=n(66552);new x.J({Clean:"clean",Dirty:"dirty"}),new x.J({Physical:"physical",Virtual:"virtual"}),new x.J({"Start and end":"start-and-end",Start:"start",Midspan:"midspan",End:"end"}),new x.J({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path",circuit:"circuit"});const Z=new x.J({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"});new x.J({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});var j=n(2272),U=n(31635),M=n(25482),L=n(10107),P=(n(44208),n(87811),n(40608)),R=n(36005),O=n(43937),G=n(82799);let B=class extends M.o{constructor(e){super(e),this.type="networkElement",this.assetGroupCode=null,this.assetTypeCode=null,this.globalId=null,this.networkSourceId=null,this.objectId=null,this.positionFrom=null,this.positionTo=null,this.terminalId=null}};(0,U.Cg)([(0,L.MZ)({json:{write:!1}})],B.prototype,"type",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],B.prototype,"assetGroupCode",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],B.prototype,"assetTypeCode",void 0),(0,U.Cg)([(0,L.MZ)({type:String,json:{write:!0}})],B.prototype,"globalId",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],B.prototype,"networkSourceId",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],B.prototype,"objectId",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],B.prototype,"positionFrom",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],B.prototype,"positionTo",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],B.prototype,"terminalId",void 0),B=(0,U.Cg)([(0,P.$)("esri.rest.networks.support.NetworkElement")],B);let J=class extends B{constructor(e){super(e),this.type="telecomNetworkElement",this.firstUnit=null,this.numUnits=null}};(0,U.Cg)([(0,L.MZ)({json:{write:!1}})],J.prototype,"type",void 0),(0,U.Cg)([(0,L.MZ)({json:{write:!0}})],J.prototype,"firstUnit",void 0),(0,U.Cg)([(0,L.MZ)({json:{write:!0}})],J.prototype,"numUnits",void 0),J=(0,U.Cg)([(0,P.$)("esri.rest.networks.support.TelecomNetworkElement")],J);let V=class extends M.o{constructor(e){super(e),this.globalId=null,this.associationType=null,this.fromNetworkElement=null,this.toNetworkElement=null,this.geometry=null,this.errorMessage=null,this.percentAlong=null,this.errorCode=null,this.isContentVisible=null,this.status=null}readFromNetworkElement(e,t){return t.fromFirstUnit||t.fromNumUnits?new J({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId,firstUnit:t.fromFirstUnit,numUnits:t.fromNumUnits}):new B({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId})}writeFromNetworkElement(e,t){if(e&&(t.fromGlobalId=e.globalId,t.fromNetworkSourceId=e.networkSourceId,t.fromTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.fromFirstUnit=n.firstUnit,t.fromNumUnits=n.numUnits}}readToNetworkElement(e,t){return t.toFirstUnit||t.toNumUnits?new J({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId,firstUnit:t.toFirstUnit,numUnits:t.toNumUnits}):new B({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId})}writeToNetworkElement(e,t){if(e&&(t.toGlobalId=e.globalId,t.toNetworkSourceId=e.networkSourceId,t.toTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.toFirstUnit=n.firstUnit,t.toNumUnits=n.numUnits}}};(0,U.Cg)([(0,L.MZ)({type:String,json:{write:!0}})],V.prototype,"globalId",void 0),(0,U.Cg)([(0,L.MZ)({type:Z.apiValues,json:{type:Z.jsonValues,read:Z.read,write:Z.write}})],V.prototype,"associationType",void 0),(0,U.Cg)([(0,L.MZ)({type:B,json:{write:{target:{fromGlobalId:{type:String},fromNetworkSourceId:{type:Number},fromTerminalId:{type:Number},fromFirstUnit:{type:Number},fromNumUnits:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId","fromFirstUnit","fromNumUnits"]}}})],V.prototype,"fromNetworkElement",void 0),(0,U.Cg)([(0,R.w)("fromNetworkElement")],V.prototype,"readFromNetworkElement",null),(0,U.Cg)([(0,O.K)("fromNetworkElement")],V.prototype,"writeFromNetworkElement",null),(0,U.Cg)([(0,L.MZ)({type:B,json:{write:{target:{toGlobalId:{type:String},toNetworkSourceId:{type:Number},toTerminalId:{type:Number},toFirstUnit:{type:Number},toNumUnits:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId","toFirstUnit","toNumUnits"]}}})],V.prototype,"toNetworkElement",void 0),(0,U.Cg)([(0,R.w)("toNetworkElement")],V.prototype,"readToNetworkElement",null),(0,U.Cg)([(0,O.K)("toNetworkElement")],V.prototype,"writeToNetworkElement",null),(0,U.Cg)([(0,L.MZ)({type:G.A,json:{write:!0}})],V.prototype,"geometry",void 0),(0,U.Cg)([(0,L.MZ)({type:String,json:{write:!0}})],V.prototype,"errorMessage",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],V.prototype,"percentAlong",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],V.prototype,"errorCode",void 0),(0,U.Cg)([(0,L.MZ)({type:Boolean,json:{write:!0}})],V.prototype,"isContentVisible",void 0),(0,U.Cg)([(0,L.MZ)({type:Number,json:{write:!0}})],V.prototype,"status",void 0),V=(0,U.Cg)([(0,P.$)("esri.rest.networks.support.Association")],V);let K=class extends M.o{constructor(e){super(e),this.associations=[]}};function H(e){const{returnDeletes:t,elements:n,gdbVersion:i,moment:r}=e.toJSON();return{returnDeletes:t,elements:JSON.stringify(n.map(e=>({globalId:e.globalId,networkSourceId:e.networkSourceId,terminalId:e.terminalId}))),types:JSON.stringify(e.types.map(e=>Z.toJSON(e))).replaceAll('"connectivity"','"junctionJunctionConnectivity"'),gdbVersion:i,moment:r??Date.now()}}(0,U.Cg)([(0,L.MZ)({type:[V],json:{write:!0}})],K.prototype,"associations",void 0),K=(0,U.Cg)([(0,P.$)("esri.rest.networks.support.QueryAssociationsResult")],K);var z,W=n(56507);let _=z=class extends M.o{static from(e){return(0,W.PZ)(z,e)}constructor(e){super(e),this.returnDeletes=!1,this.elements=[],this.types=[],this.gdbVersion=null,this.moment=null}};(0,U.Cg)([(0,L.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"returnDeletes",void 0),(0,U.Cg)([(0,L.MZ)({type:[B],json:{write:!0}})],_.prototype,"elements",void 0),(0,U.Cg)([(0,L.MZ)({type:[Z.apiValues],json:{type:Z.jsonValues,read:Z.read,write:Z.write}})],_.prototype,"types",void 0),(0,U.Cg)([(0,L.MZ)({type:String,json:{write:!0}})],_.prototype,"gdbVersion",void 0),(0,U.Cg)([(0,L.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?.getTime()}}}})],_.prototype,"moment",void 0),_=z=(0,U.Cg)([(0,P.$)("esri.rest.networks.support.QueryAssociationsParameters")],_);var Q=n(54218);function q(e,t,n){const i=e.getVariables();if(i.length>0){const r={};for(const e of i)r[e]=t.evaluateIdentifier(n,{name:e});e.parameters=r}return e}function Y(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function X(e){if(null===e)return null;const t={type:Y(e,"type",""),name:Y(e,"name","")};if("range"===t.type)t.range=Y(e,"range",[]);else{t.codedValues=[];for(const n of Y(e,"codedValues",[]))t.codedValues.push({name:Y(n,"name",""),code:Y(n,"code",null)})}return t}function ee(e){if(null===e)return null;const t={},n=Y(e,"wkt");null!==n&&(t.wkt=n);const i=Y(e,"wkid");return null!==i&&(t.wkid=i),t}function te(e){if(null===e)return null;const t={hasZ:Y(e,"hasz",!1),hasM:Y(e,"hasm",!1)},n=Y(e,"spatialreference");null!=n&&(t.spatialReference=ee(n));const i=Y(e,"x",null);if(null!==i)return t.x=i,t.y=Y(e,"y",null),t.hasZ&&(t.z=Y(e,"z",null)),t.hasM&&(t.m=Y(e,"m",null)),t;const r=Y(e,"rings",null);if(null!==r)return t.rings=r,t;const o=Y(e,"paths",null);if(null!==o)return t.paths=o,t;const a=Y(e,"points",null);if(null!==a)return t.points=a,t;for(const n of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const i=Y(e,n,null);null!==i&&(t[n]=i)}return t}function ne(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function ie(e){if("async"===e.mode){e.functions.timezone=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,o)=>{if((0,f.B)(o,1,2,t,n),(0,f.g)(o[0]))return"Unknown";if((0,f.f)(o[0]))return"Unknown";if((0,f.m)(o[0])){if(await o[0].load(),1===o.length||null===o[1])return o[0].datesInUnknownTimezone?ne("unknown"):ne(o[0].dateFieldsTimeZone);if(!(o[1]instanceof a.A)||!1===o[1].hasField("type"))throw new l.D$(t,"InvalidParameter",n);const e=o[1].field("type");if(!1===(0,Q.Kg)(e))throw new l.D$(t,"InvalidParameter",n);switch((0,f.u)(e).toLowerCase()){case"preferredtimezone":return ne(o[0].preferredTimeZone);case"editfieldsinfo":return ne(o[0].editFieldsInfo?.timeZone??null);case"timeinfo":return ne(o[0].timeInfo?.timeZone??null);case"field":if(o[1].hasField("fieldname")&&(0,Q.Kg)(o[1].field("fieldname")))return ne(o[0].fieldTimeZone((0,f.u)(o[1].field("fieldname"))))}throw new l.D$(t,"InvalidParameter",n)}const s=(0,f.N)(o[0],(0,f.K)(t));if(null===s)return null;const u=s.timeZone;return"system"===u?r.lY.systemTimeZoneCanonicalName:"utc"===u.toLowerCase()?"UTC":"unknown"===u.toLowerCase()?"Unknown":u})},e.functions.sqltimestamp=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,r)=>{(0,f.B)(r,1,3,t,n);const o=r[0];if((0,f.e)(o)){if(1===r.length)return o.toSQLWithKeyword();if(2===r.length)return o.changeTimeZone((0,f.u)(r[1])).toSQLWithKeyword();throw new l.D$(t,"InvalidParameter",n)}if((0,f.f)(o))return o.toSQLWithKeyword();if((0,f.m)(o)){if(3!==r.length)throw new l.D$(t,"InvalidParameter",n);await o.load();const e=(0,f.u)(r[1]);if((0,f.f)(r[2]))return r[2].toSQLWithKeyword();if(!1===(0,f.e)(r[2]))throw new l.D$(t,"InvalidParameter",n);const i=o.fieldTimeZone(e);return null==i?r[2].toSQLWithKeyword():r[2].changeTimeZone(i).toSQLWithKeyword()}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(t,n){return e.standardFunctionAsync(t,n,(e,i,r)=>{if((0,f.B)(r,2,4,t,n),(0,f.l)(r[0])){const e=(0,f.u)(r[1]);let i=(0,f.J)(r[2],null);const o=(0,f.H)((0,f.J)(r[3],!0));if(null===i&&(i=["*"]),!1===(0,Q.cy)(i))throw new l.D$(t,"InvalidParameter",n);return r[0].featureSetById(e,o,i)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyid",min:2,max:4});const t=new s.b(["datasource","parent","root"]);e.functions.getfeatureset=function(n,i){return e.standardFunctionAsync(n,i,async(e,r,o)=>{if((0,f.B)(o,1,2,n,i),(0,f.k)(o[0])){const e=null==o[1]?"datasource":t.lookup((0,f.u)(o[1]));return(0,d.convertToFeatureSet)(o[0].fullSchema(),e,n.lrucache,n.interceptor,n.spatialReference)}throw new l.D$(n,"InvalidParameter",i)})},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(t,n){return e.standardFunctionAsync(t,n,(e,i,r)=>{if((0,f.B)(r,2,5,t,n),null===r[0])throw new l.D$(t,"PortalRequired",n);if(r[0]instanceof o.A){const e=(0,f.u)(r[1]),i=(0,f.u)(r[2]);let o=(0,f.J)(r[3],null);const a=(0,f.H)((0,f.J)(r[4],!0));if(null===o&&(o=["*"]),!1===(0,Q.cy)(o))throw new l.D$(t,"InvalidParameter",n);let s;return s=t.services?.portal?t.services.portal:C.A.getDefault(),s=(0,m.R)(r[0],s),(0,d.constructFeatureSetFromPortalItem)(e,i,t.spatialReference,o,a,s,t.lrucache,t.interceptor)}if(!1===(0,Q.Kg)(r[0]))throw new l.D$(t,"PortalRequired",n);const a=(0,f.u)(r[0]),s=(0,f.u)(r[1]);let u=(0,f.J)(r[2],null);const c=(0,f.H)((0,f.J)(r[3],!0));if(null===u&&(u=["*"]),!1===(0,Q.cy)(u))throw new l.D$(t,"InvalidParameter",n);return(0,d.constructFeatureSetFromPortalItem)(a,s,t.spatialReference,u,c,t.services?.portal??C.A.getDefault(),t.lrucache,t.interceptor)})},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(t,n){return e.standardFunctionAsync(t,n,(e,i,r)=>{if((0,f.B)(r,2,4,t,n),(0,f.l)(r[0])){const e=(0,f.u)(r[1]);let i=(0,f.J)(r[2],null);const o=(0,f.H)((0,f.J)(r[3],!0));if(null===i&&(i=["*"]),!1===(0,Q.cy)(i))throw new l.D$(t,"InvalidParameter",n);return r[0].featureSetByName(e,o,i)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(t,n){return e.standardFunction(t,n,(e,i,r)=>{(0,f.B)(r,1,1,t,n);const o={layerDefinition:{geometryType:"",objectIdField:"",globalIdField:"",typeIdField:"",hasM:!1,hasZ:!1,fields:[]},featureSet:{geometryType:"",features:[]}};if((0,Q.Kg)(r[0])){const e=JSON.parse(r[0]);void 0!==e.layerDefinition?(o.layerDefinition=e.layerDefinition,o.featureSet=e.featureSet,e.layerDefinition.spatialReference&&(o.layerDefinition.spatialReference=e.layerDefinition.spatialReference)):(o.featureSet.features=e.features,o.featureSet.geometryType=e.geometryType,o.layerDefinition.geometryType=o.featureSet.geometryType,o.layerDefinition.objectIdField=e.objectIdFieldName??"",o.layerDefinition.typeIdField=e.typeIdFieldName,o.layerDefinition.globalIdField=e.globalIdFieldName,o.layerDefinition.fields=e.fields,e.spatialReference&&(o.layerDefinition.spatialReference=e.spatialReference))}else{if(!(r[0]instanceof a.A))throw new l.D$(t,"InvalidParameter",n);{const e=JSON.parse(r[0].castToText(!0)),i=Y(e,"layerdefinition");if(null!==i){o.layerDefinition.geometryType=Y(i,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.globalIdField=Y(i,"globalidfield",""),o.layerDefinition.objectIdField=Y(i,"objectidfield",""),o.layerDefinition.typeIdField=Y(i,"typeidfield",""),o.layerDefinition.hasZ=!0===Y(i,"hasz",!1),o.layerDefinition.hasM=!0===Y(i,"hasm",!1);const t=Y(i,"spatialreference");t&&(o.layerDefinition.spatialReference=ee(t));const n=[];for(const e of Y(i,"fields",[])){const t={name:Y(e,"name",""),alias:Y(e,"alias",""),type:Y(e,"type",""),nullable:Y(e,"nullable",!0),editable:Y(e,"editable",!0),length:Y(e,"length",null),domain:X(Y(e,"domain"))};n.push(t)}o.layerDefinition.fields=n;const r=Y(e,"featureset");if(r){const e={};for(const t of n)e[t.name.toLowerCase()]=t.name;for(const t of Y(r,"features",[])){const n={},i=Y(t,"attributes",{});for(const t in i)n[e[t.toLowerCase()]]=i[t];o.featureSet.features.push({attributes:n,geometry:te(Y(t,"geometry"))})}}}else{o.layerDefinition.hasZ=!0===Y(e,"hasz",!1),o.layerDefinition.hasM=!0===Y(e,"hasm",!1),o.layerDefinition.geometryType=Y(e,"geometrytype",""),o.featureSet.geometryType=o.layerDefinition.geometryType,o.layerDefinition.objectIdField=Y(e,"objectidfieldname",""),o.layerDefinition.typeIdField=Y(e,"typeidfieldname","");const i=Y(e,"spatialreference");i&&(o.layerDefinition.spatialReference=ee(i));const r=[],a=Y(e,"fields",null);if(!(0,Q.cy)(a))throw new l.D$(t,"InvalidParameter",n);for(const e of a){const t={name:Y(e,"name",""),alias:Y(e,"alias",""),type:Y(e,"type",""),nullable:Y(e,"nullable",!0),editable:Y(e,"editable",!0),length:Y(e,"length",null),domain:X(Y(e,"domain"))};r.push(t)}o.layerDefinition.fields=r;const s={};for(const e of r)s[e.name.toLowerCase()]=e.name;let u=Y(e,"features",null);if((0,Q.cy)(u))for(const e of u){const t={},n=Y(e,"attributes",{});for(const e in n)t[s[e.toLowerCase()]]=n[e];o.featureSet.features.push({attributes:t,geometry:te(Y(e,"geometry",null))})}else u=null,o.featureSet.features=u}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e){for(const t of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(t===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,Q.cy)(e.layerDefinition.fields)&&!1!==(0,Q.cy)(e.featureSet.features)}(o))throw new l.D$(t,"InvalidParameter",n);return o.layerDefinition.geometryType||(o.layerDefinition.geometryType="esriGeometryNull"),h.A.create(o,t.spatialReference)})},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(t,n){return e.standardFunctionAsync(t,n,async(i,r,o)=>{if((0,f.B)(o,2,2,t,n),(0,Q.cy)(o[0])||(0,f.j)(o[0])){const e=[];let i,r=o[0];if(r instanceof c.A&&(r=r.toArray()),!(0,f.i)(o[1]))throw new l.D$(t,"InvalidParameter",n);i=o[1].createFunction(t);for(const t of r){const n=i(t);(0,A.$X)(n)?!0===await n&&e.push(t):!0===n&&e.push(t)}return e}if((0,f.m)(o[0])){const n=await o[0].load(),i=T.A.create(o[1],{fieldsIndex:n.getFieldsIndex(),timeZone:n.dateFieldsTimeZoneDefaultUTC}),r=i.getVariables();if(r.length>0){const n={};for(const i of r)n[i]=e.evaluateIdentifier(t,{name:i});i.parameters=n}return new y.A({parentfeatureset:o[0],whereclause:i})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,r)=>{if((0,f.B)(r,2,2,t,n),(0,f.m)(r[0])){const e=new F.A(r[1]);return new w.A({parentfeatureset:r[0],orderbyclause:e})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,r)=>{if((0,f.B)(r,2,2,t,n),(0,f.m)(r[0]))return new g.A({parentfeatureset:r[0],topnum:r[1]});if((0,Q.cy)(r[0]))return(0,f.s)(r[1])>=r[0].length?r[0].slice():r[0].slice(0,(0,f.s)(r[1]));if((0,f.j)(r[0]))return(0,f.s)(r[1])>=r[0].length()?r[0].slice():r[0].slice(0,(0,f.s)(r[1]));throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,r)=>{if((0,f.B)(r,1,1,t,n),(0,f.m)(r[0])){const n=await r[0].first(e.abortSignal);if(null!==n){const e=u.A.createFromGraphicLikeObject(n.geometry,n.attributes,r[0],t.timeZone);return e._underlyingGraphic=n,e}return n}return(0,Q.cy)(r[0])?0===r[0].length?null:r[0][0]:(0,f.j)(r[0])?0===r[0].length()?null:r[0].get(0):null})},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,r)=>{(0,f.B)(r,1,2,t,n);const o={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(r.length>1)if(r[1]instanceof a.A){if(r[1].hasField("minsize")&&(o.minsize=(0,f.s)(r[1].field("minsize"))),r[1].hasField("metadata")&&(o.returnMetadata=(0,f.H)(r[1].field("metadata"))),r[1].hasField("maxsize")&&(o.maxsize=(0,f.s)(r[1].field("maxsize"))),r[1].hasField("types")){const e=(0,f.L)(r[1].field("types"),!1);e.length>0&&(o.types=e)}}else if(null!==r[1])throw new l.D$(t,"InvalidParameter",n);if((0,f.k)(r[0])){const e=r[0]._layer;let n;if((0,f.m)(e))n=e;else{if(null==e||!(0,b.eB)(e))return[];n=(0,d.constructFeatureSet)(e,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}return await n.load(),n.queryAttachments(r[0].field(n.objectIdField),o.minsize,o.maxsize,o.types,o.returnMetadata)}if(null===r[0])return[];throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,r)=>{(0,f.B)(r,2,4,t,n);const o=r[0],a=(0,f.u)(r[1]);let s=(0,f.J)(r[2],null);const u=(0,f.H)((0,f.J)(r[3],!0));if(null===s&&(s=["*"]),!1===(0,Q.cy)(s))throw new l.D$(t,"InvalidParameter",n);if(null===r[0])return null;if(!(0,f.k)(r[0]))throw new l.D$(t,"InvalidParameter",n);const c=o._layer;let m;if((0,f.m)(c))m=c;else{if(null==c||!(0,b.eB)(c))return null;m=(0,d.constructFeatureSet)(c,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}m=await m.load();const p=m.relationshipMetaData().filter(e=>e.name===a);if(0===p.length)return null;if(void 0!==p[0].relationshipTableId&&null!==p[0].relationshipTableId&&p[0].relationshipTableId>-1)return(0,d.constructFeatureSetFromRelationship)(m,p[0],o.field(m.objectIdField),m.spatialReference,s,u,t.lrucache,t.interceptor);let y=m.serviceUrl();if(!y)return null;y=y.endsWith("/")?y+p[0].relatedTableId.toString():y+"/"+p[0].relatedTableId.toString();const w=await(0,d.constructFeatureSetFromUrl)(y,m.spatialReference,s,u,t.lrucache,t.interceptor);await w.load();let g=w.relationshipMetaData();if(g=g.filter(e=>e.id===p[0].id),!1===o.hasField(p[0].keyField)||null===o.field(p[0].keyField)){const e=await m.getFeatureByObjectId(o.field(m.objectIdField),[p[0].keyField]);if(e){const t=T.A.create(g[0].keyField+"= @id",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});return t.parameters={id:e.attributes[p[0].keyField]},w.filter(t)}return new I.A({parentfeatureset:w})}const h=T.A.create(g[0].keyField+"= @id",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});return h.parameters={id:o.field(p[0].keyField)},w.filter(h)})},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,o)=>{(0,f.B)(o,2,3,t,n);const a=o[0],u=(0,s.B)((0,f.u)((0,f.J)(o[1],""))),c=(0,Q.Kg)(o[2])?(0,f.u)(o[2]):null;if(null===o[0])return null;if(!(0,f.k)(o[0]))throw new l.D$(t,"InvalidParameter",n);let m=a._layer;if(m instanceof v.default&&(m=(0,d.constructFeatureSet)(m,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===m)return null;if(!1===(0,f.m)(m))return null;await m.load();const y=m.serviceUrl(),w=await(0,d.constructAssociationMetaDataFeatureSetFromUrl)(y,t.spatialReference,!0);if(w.unVersion>=8)return await async function(e,t,n,r,o,a,s){const u=await e.getFeatureSetInfo();if(null===(u?.layerId??null))return null;if(!o.layerIdLookup.get(u.layerId))return null;const c=e.serviceUrl().replace(/\/FeatureServer/i,"/UtilityNetworkServer"),f=[];switch(n){case"connected":f.push("connectivity"),f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity"),f.push("junction-edge-midspan-connectivity"),f.push("junction-junction-connectivity");break;case"container":case"content":f.push("containment");break;case"structure":case"attached":f.push("attachment");break;case"junctionedge":f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity");break;case"midspan":f.push("junction-edge-midspan-connectivity");break;default:throw new l.D$(a,"InvalidParameter",s)}let m=null,p=!1;if(null!==r&&""!==r&&void 0!==r){for(const e of o.terminals)e.terminalName===r&&(m=e.terminalId);null===m&&(p=!0)}const y=[];if(!p){const r=new B({globalId:t.field(e.globalIdField),networkSourceId:o.layerIdLookup.get(u.layerId).sourceId,...m?{terminalId:m}:""}),a=await async function(e,t){const n=(0,j.Dl)(e),i={...H(t),f:"json"},r=(0,j.lF)({...n.query,...i}),o=(0,j.jV)(r,{method:"post"}),a=`${n.path}/associations/query`,{data:s}=await(0,E.A)(a,o),l=K.fromJSON(s);return t.types.includes("connectivity")&&(0,S.Lx)($.A.getLogger("esri/rest/networks/support/QueryAssociationsParameters"),"types",{replacement:"Please use 'junction-junction-connectivity' instead of 'connectivity'.",see:"https://arcg.is/11Tr8a#types",version:"4.29",warnOnce:!0}),l}(c,new _({types:f,elements:[r]}));let s=0;for(const e of a.associations){let t=null,a="",l="";if(e.fromNetworkElement?.globalId===r.globalId?(t=e.toNetworkElement,l="to"):e.toNetworkElement?.globalId===r.globalId&&(t=e.fromNetworkElement,l="from"),!t)continue;switch(n){case"attached":if("attachment"!==e.associationType)continue;if("to"!==l)continue;break;case"structure":if("attachment"!==e.associationType)continue;if("from"!==l)continue;break;case"container":if("containment"!==e.associationType)continue;if("from"!==l)continue;break;case"content":if("containment"!==e.associationType)continue;if("to"!==l)continue;break;case"connected":break;case"junctionedge":"junction-edge-to-connectivity"===e.associationType?a="to":"junction-edge-from-connectivity"===e.associationType&&(a="from");break;case"midspan":if("junction-edge-midspan-connectivity"!==e.associationType)continue}const u=o.sourceIdLookup.get(t.networkSourceId)?.className??"";y.push(new i.A({geometry:null,attributes:{objectId:s++,globalId:t.globalId,percentAlong:e.percentAlong??0,isContentVisible:e.isContentVisible?0:1,className:u,side:a}}))}}const w=new v.default({source:y,geometryType:null,objectIdField:"objectId",globalIdField:"globalId",fields:[new k.A({name:"objectId",alias:"objectId",type:"oid"}),new k.A({name:"globalId",alias:"globalId",type:"global-id"}),new k.A({name:"percentAlong",alias:"percentAlong",type:"double"}),new k.A({name:"side",alias:"side",type:"string"}),new k.A({name:"isContentVisible",alias:"isContentVisible",type:"integer"}),new k.A({name:"className",alias:"className",type:"string"})]});return(0,d.constructFeatureSet)(w)}(m,a,u,c,w,t,n);const g=w.associations;let I=null,h=null,F=!1;if(null!==c&&""!==c&&void 0!==c){for(const e of w.terminals)e.terminalName===c&&(h=e.terminalId);null===h&&(F=!0)}const D=g.getFieldsIndex(),N=D.get("TOGLOBALID").name,A=D.get("FROMGLOBALID").name,C=D.get("TOTERMINALID").name,x=D.get("FROMTERMINALID").name,Z=D.get("FROMNETWORKSOURCEID").name,U=D.get("TONETWORKSOURCEID").name,M=D.get("ASSOCIATIONTYPE").name,L=D.get("ISCONTENTVISIBLE").name,P=D.get("OBJECTID").name;for(const e of m.fields)if("global-id"===e.type){I=a.field(e.name);break}let R=null,O=new p.Gr(new k.A({name:"percentalong",alias:"percentalong",type:"double"}),T.A.create("0",{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC})),G=new p.Gr(new k.A({name:"side",alias:"side",type:"string"}),T.A.create("''",{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC}));const J="globalid",V="globalId",z={};for(const e in w.lkp)z[e]=w.lkp[e].sourceId;const W=new p.bV(new k.A({name:"classname",alias:"classname",type:"string"}),null,z);let q="";switch(u){case"midspan":{q=`((${N}='${I}') OR ( ${A}='${I}')) AND (${M} IN (5))`,W.codefield=T.A.create(`CASE WHEN (${N}='${I}') THEN ${Z} ELSE ${U} END`,{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC});const e=(0,b.ke)(p.a.findField(g.fields,A));e.name=J,e.alias=J,R=new p.Gr(e,T.A.create(`CASE WHEN (${A}='${I}') THEN ${N} ELSE ${A} END`,{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC})),O=w.unVersion>=4?new p.IO(p.a.findField(g.fields,D.get("PERCENTALONG").name)):new p.Gr(new k.A({name:"percentalong",alias:"percentalong",type:"double"}),T.A.create("0",{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC}));break}case"junctionedge":{q=`((${N}='${I}') OR ( ${A}='${I}')) AND (${M} IN (4,6))`,W.codefield=T.A.create(`CASE WHEN (${N}='${I}') THEN ${Z} ELSE ${U} END`,{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC});const e=(0,b.ke)(p.a.findField(g.fields,A));e.name=J,e.alias=J,R=new p.Gr(e,T.A.create(`CASE WHEN (${A}='${I}') THEN ${N} ELSE ${A} END`,{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC})),G=new p.Gr(new k.A({name:"side",alias:"side",type:"string"}),T.A.create(`CASE WHEN (${M}=4) THEN 'from' ELSE 'to' END`,{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC}));break}case"connected":{let e=`${N}='@T'`,t=`${A}='@T'`;null!==h&&(e+=` AND ${C}=@A`,t+=` AND ${x}=@A`),q="(("+e+") OR ("+t+"))",q=(0,f.Y)(q,"@T",I??""),e=(0,f.Y)(e,"@T",I??""),null!==h&&(e=(0,f.Y)(e,"@A",h.toString()),q=(0,f.Y)(q,"@A",h.toString())),W.codefield=T.A.create("CASE WHEN "+e+` THEN ${Z} ELSE ${U} END`,{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC});const n=(0,b.ke)(p.a.findField(g.fields,A));n.name=J,n.alias=J,R=new p.Gr(n,T.A.create("CASE WHEN "+e+` THEN ${A} ELSE ${N} END`,{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC}));break}case"container":q=`${N}='${I}' AND ${M} = 2`,null!==h&&(q+=` AND ${C} = `+h.toString()),W.codefield=Z,q="( "+q+" )",R=new p.p8(p.a.findField(g.fields,A),J,J);break;case"content":q=`(${A}='${I}' AND ${M} = 2)`,null!==h&&(q+=` AND ${x} = `+h.toString()),W.codefield=U,q="( "+q+" )",R=new p.p8(p.a.findField(g.fields,N),J,J);break;case"structure":q=`(${N}='${I}' AND ${M} = 3)`,null!==h&&(q+=` AND ${C} = `+h.toString()),W.codefield=Z,q="( "+q+" )",R=new p.p8(p.a.findField(g.fields,A),J,V);break;case"attached":q=`(${A}='${I}' AND ${M} = 3)`,null!==h&&(q+=` AND ${x} = `+h.toString()),W.codefield=U,q="( "+q+" )",R=new p.p8(p.a.findField(g.fields,N),J,V);break;default:throw new l.D$(t,"InvalidParameter",n)}return F&&(q="1 <> 1"),new p.a({parentfeatureset:g,adaptedFields:[new p.IO(p.a.findField(g.fields,P)),new p.IO(p.a.findField(g.fields,L)),R,G,W,O],extraFilter:q?T.A.create(q,{fieldsIndex:g.getFieldsIndex(),timeZone:g.dateFieldsTimeZoneDefaultUTC}):null})})},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(t,n){return e.standardFunctionAsync(t,n,async(i,r,o)=>{if((0,f.B)(o,3,3,t,n),!(0,f.m)(o[0]))throw new l.D$(t,"InvalidParameter",n);const s=await o[0].load(),u=[],d=[];let c=!1,m=[];if((0,Q.Kg)(o[1]))m.push(o[1]);else if(o[1]instanceof a.A)m.push(o[1]);else if((0,Q.cy)(o[1]))m=o[1];else{if(!(0,f.j)(o[1]))throw new l.D$(t,"InvalidParameter",n);m=o[1].toArray()}for(const e of m)if((0,Q.Kg)(e)){const t=T.A.create((0,f.u)(e),{fieldsIndex:s.getFieldsIndex(),timeZone:s.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,D.DA)(t)?(0,f.u)(e):"%%%%FIELDNAME";u.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(c=!0)}else{if(!(e instanceof a.A))throw new l.D$(t,"InvalidParameter",n);{const i=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",r=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===i&&(c=!0),!i)throw new l.D$(t,"InvalidParameter",n);u.push({name:i,expression:T.A.create(r||i,{fieldsIndex:s.getFieldsIndex(),timeZone:s.dateFieldsTimeZoneDefaultUTC})})}}if(m=[],(0,Q.Kg)(o[2]))m.push(o[2]);else if((0,Q.cy)(o[2]))m=o[2];else if((0,f.j)(o[2]))m=o[2].toArray();else{if(!(o[2]instanceof a.A))throw new l.D$(t,"InvalidParameter",n);m.push(o[2])}for(const e of m){if(!(e instanceof a.A))throw new l.D$(t,"InvalidParameter",n);{const i=e.hasField("name")?e.field("name"):"",r=e.hasField("statistic")?e.field("statistic"):"",o=e.hasField("expression")?e.field("expression"):"";if(!(i&&r&&(0,Q.Kg)(r)&&o))throw new l.D$(t,"InvalidParameter",n);d.push({name:i,statistic:r,expression:T.A.create(o,{fieldsIndex:s.getFieldsIndex(),timeZone:s.dateFieldsTimeZoneDefaultUTC})})}}if(c){const e={};for(const t of s.fields)e[t.name.toLowerCase()]=1;for(const t of u)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);for(const t of d)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of u)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of u)q(n.expression,e,t);for(const n of d)q(n.expression,e,t);return o[0].groupby(u,d)})},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(t,n){return e.standardFunctionAsync(t,n,async(i,r,o)=>{if((0,f.m)(o[0])){(0,f.B)(o,2,2,t,n);const i=await o[0].load(),r=[];let s=[];if((0,Q.Kg)(o[1]))s.push(o[1]);else if(o[1]instanceof a.A)s.push(o[1]);else if((0,Q.cy)(o[1]))s=o[1];else{if(!(0,f.j)(o[1]))throw new l.D$(t,"InvalidParameter",n);s=o[1].toArray()}let u=!1;for(const e of s)if((0,Q.Kg)(e)){const t=T.A.create((0,f.u)(e),{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,D.DA)(t)?(0,f.u)(e):"%%%%FIELDNAME";r.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(u=!0)}else{if(!(e instanceof a.A))throw new l.D$(t,"InvalidParameter",n);{const o=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",a=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===o&&(u=!0),!o)throw new l.D$(t,"InvalidParameter",n);r.push({name:o,expression:T.A.create(a||o,{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC})})}}if(u){const e={};for(const t of i.fields)e[t.name.toLowerCase()]=1;for(const t of r)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of r)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of r)q(n.expression,e,t);return o[0].groupby(r,[])}return function(e){if(1===e.length){if((0,Q.cy)(e[0]))return(0,N.t)("distinct",e[0],-1);if((0,f.j)(e[0]))return(0,N.t)("distinct",e[0].toArray(),-1)}return(0,N.t)("distinct",e,-1)}(o)})},e.functions.getfeaturesetinfo=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,r)=>{if((0,f.B)(r,1,1,t,n),!(0,f.m)(r[0]))return null;const o=await r[0].getFeatureSetInfo();return o?a.A.convertObjectToArcadeDictionary({layerId:o.layerId,layerName:o.layerName,itemId:o.itemId,serviceLayerUrl:o.serviceLayerUrl,webMapLayerId:o.webMapLayerId??null,webMapLayerTitle:o.webMapLayerTitle??null,className:null,objectClassId:null},(0,f.K)(t),!1,!1):null})},e.signatures.push({name:"getfeaturesetinfo",min:1,max:1}),e.functions.filterbysubtypecode=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,r)=>{if((0,f.B)(r,2,2,t,n),(0,f.m)(r[0])){const e=await r[0].load(),i=r[1];if(!(0,Q.Fq)(i))throw new l.D$(t,"InvalidParameter",n);if(e.subtypeField){const t=T.A.create(`${e.subtypeField}= ${r[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new y.A({parentfeatureset:r[0],whereclause:t})}if(null===e.typeIdField||""===e.typeIdField)throw new l.D$(t,"FeatureSetDoesNotHaveSubtypes",n);const o=T.A.create(`${e.typeIdField}= ${r[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new y.A({parentfeatureset:r[0],whereclause:o})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filterbysubtypecode",min:2,max:2})}}},80672:(e,t,n)=>{n.d(t,{R:()=>r});var i=n(20655);function r(e,t){return null===e?t:new i.A({url:e.field("url")})}}}]);
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
- */
5
- import{__decorate as t}from"tslib";import{isSome as o}from"../../../core/arrayUtils.js";import{JSONSupport as e}from"../../../core/JSONSupport.js";import s from"../../../core/Logger.js";import{watch as i,initial as r}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import{reader as c}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../../core/accessorSupport/decorators/writer.js";import{CircuitTypeKebabDict as l,CircuitStatusKebabDict as u}from"../../../networks/support/typeUtils.js";import d from"./CircuitLocation.js";import h from"./CircuitSection.js";import y from"./Subcircuit.js";let m=class extends e{constructor(t){super(t),this._sectionIdLookup=new Map,this.circuitType="physical",this.globalId=null,this.isDeleted=!1,this.lastExportedTime=null,this.lastVerifiedTime=null,this.name=null,this.sections=null,this.startLocation=null,this.status="dirty",this.stopLocation=null,this.subcircuits=[]}initialize(){this.addHandles([i(()=>this.sections,t=>{this._sectionIdLookup.clear(),null!=t&&Array.from(t.keys()).forEach(t=>this._sectionIdLookup.set(t.sectionId,t))},r)])}normalizeCtorArgs(t){if(void 0===t)return t;const{name:o,startLocation:e,stopLocation:i,sections:r}=t;return(e||i)&&r?(delete t.startLocation,delete t.stopLocation,s.getLogger(this).warn("Cannot instantiate Circuit with both start/stop locations and sections.",`Circuit '${o}' was defaulted to having sections only.`)):(e&&!i||!e&&i)&&!r&&s.getLogger(this).warn(`Non-sectioned circuit '${o}' must have both start and stop locations.`,"Create/alter operations involving this circuit will fail unless both are populated."),t}get isSectioned(){return null==this.startLocation&&null==this.stopLocation&&null!=this.sections}readSections(t,e){const{sectionOrder:s,sections:i}=e,r=new Map;if(null==s||null==i)return r;i.forEach(t=>{this._sectionIdLookup.set(t.sectionId,h.fromJSON(t))});for(const[n,c]of Object.entries(s)){const t=Number(n),e=this._sectionIdLookup.get(t);if(null==e)continue;const s=c.map(t=>this._sectionIdLookup.get(t)).filter(o);r.set(e,s)}return r}writeSections(t,o){const e={},s=[];t?.forEach((t,o)=>{const i=o.sectionId.toString(),r=t.map(t=>t.sectionId);e[i]=r,s.push(o.toJSON())}),o.sectionOrder=e,o.sections=s}getSectionById(t){return this._sectionIdLookup.get(t)??null}setStartStopLocations(t,o){this.startLocation=t,this.stopLocation=o,this.sections=null}setSections(t){this.sections=t,this.startLocation=null,this.stopLocation=null}};t([n({type:l.apiValues,json:{type:l.jsonValues,read:l.read,write:l.write}})],m.prototype,"circuitType",void 0),t([n({type:String,json:{write:!0}})],m.prototype,"globalId",void 0),t([n({type:Boolean,readOnly:!0})],m.prototype,"isDeleted",void 0),t([n({type:Boolean,json:{write:!0},readOnly:!0})],m.prototype,"isSectioned",null),t([n({type:Date,json:{read:{reader:t=>"number"==typeof t?new Date(t):null}},readOnly:!0})],m.prototype,"lastExportedTime",void 0),t([n({type:Date,json:{read:{reader:t=>"number"==typeof t?new Date(t):null}},readOnly:!0})],m.prototype,"lastVerifiedTime",void 0),t([n({type:String,json:{write:!0}})],m.prototype,"name",void 0),t([n({json:{read:{source:["sectionOrder","sections"]},write:!0}})],m.prototype,"sections",void 0),t([c("sections")],m.prototype,"readSections",null),t([p("sections")],m.prototype,"writeSections",null),t([n({type:d,json:{write:!0}})],m.prototype,"startLocation",void 0),t([n({type:u.apiValues,json:{type:u.jsonValues,read:u.read}})],m.prototype,"status",void 0),t([n({type:d,json:{write:!0}})],m.prototype,"stopLocation",void 0),t([n({type:[y],json:{write:!0}})],m.prototype,"subcircuits",void 0),m=t([a("esri.rest.networks.support.Circuit")],m);const f=m;export{f as default};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
- */
5
- import{__decorate as o}from"tslib";import{JSONSupport as t}from"../../../core/JSONSupport.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";let s=class extends t{constructor(o){super(o),this.sourceId=null,this.globalId=null,this.terminalId=null,this.firstUnit=null,this.numUnits=null}};o([r({type:Number,json:{write:!0}})],s.prototype,"sourceId",void 0),o([r({type:String,json:{write:!0}})],s.prototype,"globalId",void 0),o([r({type:Number,json:{write:!0}})],s.prototype,"terminalId",void 0),o([r({type:Number,json:{write:!0}})],s.prototype,"firstUnit",void 0),o([r({type:Number,json:{write:!0}})],s.prototype,"numUnits",void 0),s=o([e("esri.rest.networks.support.CircuitLocation")],s);const i=s;export{i as default};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
- */
5
- import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../../core/JSONSupport.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../../geometry/Polyline.js";import p from"./CircuitPathConnectivityElement.js";import s from"./TraceLocation.js";let n=class extends o{constructor(t){super(t),this.pathId=null,this.order=null,this.startingPoint=null,this.stoppingPoint=null,this.pathConnectivity=[],this.geometry=null}};t([r({type:Number,json:{write:!0}})],n.prototype,"pathId",void 0),t([r({type:Number,json:{write:!0}})],n.prototype,"order",void 0),t([r({type:s,json:{write:!0}})],n.prototype,"startingPoint",void 0),t([r({type:s,json:{write:!0}})],n.prototype,"stoppingPoint",void 0),t([r({type:[p],json:{write:!0}})],n.prototype,"pathConnectivity",void 0),t([r({type:i,json:{write:!0}})],n.prototype,"geometry",void 0),n=t([e("esri.rest.networks.support.CircuitPath")],n);const c=n;export{c as default};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
- */
5
- import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../../core/JSONSupport.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{reader as n}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as i}from"../../../core/accessorSupport/decorators/writer.js";import d from"./TelecomNetworkElement.js";let c=class extends t{constructor(e){super(e),this.edgeElement=null,this.junctionElement=null}readEdgeElement(e,t){return new d({networkSourceId:t.edgeNetworkSourceId,globalId:t.edgeGlobalId,objectId:t.edgeObjectId,positionFrom:t.edgePositionFrom,positionTo:t.edgePositionTo,firstUnit:t.edgeFirstUnit,numUnits:t.edgeNumUnits})}writeEdgeElement(e,t){t.edgeNetworkSourceId=e.networkSourceId,t.edgeGlobalId=e.globalId,t.edgeObjectId=e.objectId,t.edgePositionFrom=e.positionFrom,t.edgePositionTo=e.positionTo,t.edgeFirstUnit=e.firstUnit,t.edgeNumUnits=e.numUnits}readJunctionElement(e,t){return new d({networkSourceId:t.junctionNetworkSourceId,globalId:t.junctionGlobalId,objectId:t.junctionObjectId,terminalId:t.junctionTerminalId,firstUnit:t.junctionFirstUnit,numUnits:t.junctionNumUnits})}writeJunctionElement(e,t){t.junctionNetworkSourceId=e.networkSourceId,t.junctionGlobalId=e.globalId,t.junctionObjectId=e.objectId,t.junctionTerminalId=e.terminalId,t.junctionFirstUnit=e.firstUnit,t.junctionNumUnits=e.numUnits}};e([o({type:d,json:{read:{source:["edgeNetworkSourceId","edgeGlobalId","edgeObjectId","edgePositionFrom","edgePositionTo","edgeFirstUnit","edgeNumUnits"]},write:!0}})],c.prototype,"edgeElement",void 0),e([n("edgeElement")],c.prototype,"readEdgeElement",null),e([i("edgeElement")],c.prototype,"writeEdgeElement",null),e([o({type:d,json:{read:{source:["junctionNetworkSourceId","junctionGlobalId","junctionObjectId","junctionTerminalId","junctionFirstUnit","junctionNumUnits"]},write:!0}})],c.prototype,"junctionElement",void 0),e([n("junctionElement")],c.prototype,"readJunctionElement",null),e([i("junctionElement")],c.prototype,"writeJunctionElement",null),c=e([r("esri.rest.networks.support.CircuitPathConnectivityElement")],c);const s=c;export{s as default};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
- */
5
- import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../../core/JSONSupport.js";import i from"../../../core/Logger.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{CircuitSectionRoleKebabDict as e,CircuitTypeKebabDict as a}from"../../../networks/support/typeUtils.js";import n from"./CircuitLocation.js";import c from"./CircuitPath.js";import p from"./Subcircuit.js";let u=class extends o{constructor(t){super(t),this.sectionId=null,this.role="start-and-end",this.sectionType="physical",this.startLocation=null,this.stopLocation=null,this.subcircuit=null,this.path=null}normalizeCtorArgs(t){if(void 0===t)return t;const{sectionId:o,startLocation:r,stopLocation:s,subcircuit:e}=t;return(r||s)&&e?(delete t.startLocation,delete t.stopLocation,i.getLogger(this).warn("Cannot instantiate CircuitSection with both start/stop locations and subcircuit.",`CircuitSection with ID '${o}' was defaulted to having a subcircuit only.`)):(r&&!s||!r&&s)&&!e&&i.getLogger(this).warn(`CircuitSection with ID '${o}' must have both start and stop locations.`,"Create/alter operations involving this section will fail unless both are populated."),t}setStartStopLocations(t,o){this.startLocation=t,this.stopLocation=o,this.subcircuit=null}setSubcircuit(t){this.subcircuit=t,this.startLocation=null,this.stopLocation=null}};t([r({type:Number,json:{write:!0}})],u.prototype,"sectionId",void 0),t([r({type:e.apiValues,json:{type:e.jsonValues,read:e.read},readOnly:!0})],u.prototype,"role",void 0),t([r({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"sectionType",void 0),t([r({type:n,json:{write:!0}})],u.prototype,"startLocation",void 0),t([r({type:n,json:{write:!0}})],u.prototype,"stopLocation",void 0),t([r({type:p,json:{write:!0}})],u.prototype,"subcircuit",void 0),t([r({type:c,readOnly:!0})],u.prototype,"path",void 0),u=t([s("esri.rest.networks.support.CircuitSection")],u);const l=u;export{l as default};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
- */
5
- import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../../core/JSONSupport.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{reader as r}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as s}from"../../../core/accessorSupport/decorators/writer.js";import c from"../../../geometry/Polyline.js";import a from"./CircuitPath.js";let p=class extends e{constructor(t){super(t),this.circuit=null,this.geometry=null,this.path=null}readCircuit(t,e){const o=e.sections?.map(t=>({...t,path:a.fromJSON(t.path)}));return{name:e.name,globalId:e.globalId,isSectioned:e.isSectioned,sectionOrder:e.sectionOrder,startLocation:e.startLocation,stopLocation:e.stopLocation,sections:o,subcircuits:e.subcircuits,lastVerifiedTime:e.lastVerifiedTime?new Date(e.lastVerifiedTime):null,lastExportedTime:e.lastExportedTime?new Date(e.lastExportedTime):null,circuitType:e.circuitType,status:e.status}}writeCircuit(t,e){const o=t.sections?.map(t=>({...t,path:t.path?.toJSON()}));e.name=t.name,e.globalId=t.globalId,e.isSectioned=t.isSectioned,e.sectionOrder=t.sectionOrder,e.startLocation=t.startLocation,e.stopLocation=t.stopLocation,e.sections=o,e.subcircuits=t.subcircuits,e.lastVerifiedTime=t.lastVerifiedTime?.getTime(),e.lastExportedTime=t.lastExportedTime?.getTime(),e.circuitType=t.circuitType,e.status=t.status}};t([o({type:Object,json:{write:!0,read:{source:["name","globalId","isSectioned","sectionOrder","startLocation","stopLocation","sections","subcircuits","lastVerifiedTime","lastExportedTime","circuitType","status"]}}})],p.prototype,"circuit",void 0),t([r("circuit")],p.prototype,"readCircuit",null),t([s("circuit")],p.prototype,"writeCircuit",null),t([o({type:c,json:{write:!0}})],p.prototype,"geometry",void 0),t([o({type:a,json:{write:!0}})],p.prototype,"path",void 0),p=t([i("esri.rest.networks.support.CircuitTraceResult")],p);const n=p;export{n as default};
@@ -1,5 +0,0 @@
1
- /*
2
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
- */
5
- import{__decorate as o}from"tslib";import{JSONSupport as r}from"../../../core/JSONSupport.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";let s=class extends r{constructor(o){super(o),this.name=null,this.globalId=null,this.providerId=null,this.consumerId=null,this.isReserved=!1}};o([t({type:String,json:{write:!0}})],s.prototype,"name",void 0),o([t({type:String,json:{write:!0}})],s.prototype,"globalId",void 0),o([t({type:String})],s.prototype,"providerId",void 0),o([t({type:String})],s.prototype,"consumerId",void 0),o([t({type:Boolean,json:{write:!0}})],s.prototype,"isReserved",void 0),s=o([e("esri.rest.networks.support.Subcircuit")],s);const p=s;export{p as default};