@arcgis/core 4.33.0-next.20250321 → 4.33.0-next.20250323

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.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8613],{2073:(e,t,r)=>{r.d(t,{$n:()=>b,$r:()=>m,EM:()=>f,Ec:()=>N,JJ:()=>h,Mm:()=>A,OC:()=>P,Sr:()=>p,UO:()=>a,Vj:()=>G,WU:()=>E,Y8:()=>s,Z7:()=>l,_6:()=>v,aJ:()=>d,dd:()=>M,dn:()=>u,et:()=>S,fe:()=>w,gD:()=>T,hE:()=>c,hY:()=>o,iM:()=>_,mt:()=>g,ow:()=>y,vS:()=>R});var i=r(66552);const n={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},o=(0,i.O)()(n),s=(0,i.O)()({...n,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),a=(0,i.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),u=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),d=(0,i.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),p=(0,i.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),c=((0,i.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,i.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,i.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,i.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,i.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),h=(0,i.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),f=(0,i.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),m=(0,i.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),g=(0,i.O)()({1:"right",2:"left"},{useNumericKeys:!0}),_=(0,i.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),w=(0,i.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),v=(0,i.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),T=(0,i.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),b=(0,i.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),M=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),A=(0,i.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),S=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),P=(0,i.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),R=(0,i.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),G=(0,i.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),E=(0,i.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),N=(0,i.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"})},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),o=r(52106),s=r(66552),a=r(25482),l=r(4718),u=r(10107),d=(r(44208),r(53966),r(36005)),p=r(40608),c=r(43937),y=r(16930),h=r(65864),f=r(50498),m=r(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends a.A{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){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({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 r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(s)}return n}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(a[0]),n=r(a[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,h.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n._)([(0,d.w)("features")],_.prototype,"readFeatures",null),(0,n._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n._)([(0,u.MZ)({types:f.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n._)([(0,d.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n._)([(0,u.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n._)([(0,p.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},35448:(e,t,r)=>{var i,n,o,s,a,l,u;r.d(t,{Eq:()=>i,bV:()=>o,nP:()=>a,r5:()=>n,ti:()=>l,vy:()=>u,wr:()=>s}),function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(i||(i={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(n||(n={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(o||(o={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(s||(s={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(a||(a={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension",e[e.esriGraphPropertyProvenanceInstanceId=10]="esriGraphPropertyProvenanceInstanceId",e[e.esriGraphPropertyProvenanceSourceType=11]="esriGraphPropertyProvenanceSourceType",e[e.esriGraphPropertyProvenanceSourceName=12]="esriGraphPropertyProvenanceSourceName",e[e.esriGraphPropertyProvenanceSource=13]="esriGraphPropertyProvenanceSource",e[e.esriGraphPropertyProvenanceComment=14]="esriGraphPropertyProvenanceComment",e[e.esriGraphPropertyProvenanceTypeName=15]="esriGraphPropertyProvenanceTypeName",e[e.esriGraphPropertyProvenancePropertyName=16]="esriGraphPropertyProvenancePropertyName"}(l||(l={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(u||(u={}))},37807:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(66552),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const l=new n.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let u=class extends o.A{constructor(e){super(e),this.description=null,this.type=null}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,s.MZ)({type:String,json:{read:l.read,write:l.write}})],u.prototype,"type",void 0),u=(0,i._)([(0,a.$)("esri.rest.support.GPMessage")],u);const d=u},45724:(e,t,r)=>{r.d(t,{I:()=>l});var i=r(2741),n=r(44208);const o="esri/rest/knowledgeGraph/wasmInterface/";let s,a=null;async function l(){const e=a??s;if(e)return e;const t=!!(0,n.A)("wasm-simd");return s=u(t),s}async function u(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then((e=>e.a));return e({locateFile:e=>(0,i.s)(o+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then((e=>e.a));return t({locateFile:e=>(0,i.s)(o+e)})}},88613:(e,t,r)=>{r.r(t),r.d(t,{_esriRequestWrapper:()=>Ct,_fetchWrapper:()=>Ot,_getClientDataCacheCopy:()=>wt,_setMaxQueryParsingDurationForTesting:()=>Lt,_submitJobWrapper:()=>jt,clearClientDataCache:()=>xt,clientDataCache:()=>_t,executeApplyEdits:()=>Tt,executeFindPaths:()=>It,executeFindPathsAsynchronous:()=>Dt,executeQuery:()=>bt,executeQueryStreaming:()=>Mt,executeSearch:()=>At,executeSearchStreaming:()=>St,fetchAllClientDataKeys:()=>Pt,fetchAsynchronousFindPathsResultData:()=>kt,fetchClientDataAtKeys:()=>Rt,fetchKnowledgeGraph:()=>Gt,kgRestServices:()=>vt,refreshDataModel:()=>Et,refreshServiceDefinition:()=>Nt});var i,n=r(70333),o=r(78888),s=r(49186),a=r(53966),l=r(74887),u=r(91075),d=r(16930),p=r(90237),c=r(69622),y=r(10107),h=r(56507),f=(r(44208),r(87811),r(40608)),m=r(5443);let g=i=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,h.PZ)(i,e)}};(0,p._)([(0,y.MZ)({type:d.A})],g.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)({type:m.A})],g.prototype,"processExtent",void 0),(0,p._)([(0,y.MZ)({type:d.A})],g.prototype,"processSpatialReference",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnColumnName",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnFeatureCollection",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnM",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnZ",void 0),g=i=(0,p._)([(0,f.$)("esri.rest.geoprocessor.GPOptions")],g);const _=g;var w=r(17136),v=r(20437),T=r(25482);let b=class extends T.A{constructor(){super(...arguments),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,p._)([(0,y.MZ)({type:m.A})],b.prototype,"extent",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"height",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"href",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"opacity",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"rotation",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"scale",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"visible",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"width",void 0),b=(0,p._)([(0,f.$)("esri.layers.support.MapImage")],b);const M=b;var A=r(2272),S=r(93223),P=r(2073);let R=class extends T.A{constructor(e){super(e),this.area=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],R.prototype,"area",void 0),(0,p._)([(0,S.e)(P.UO)],R.prototype,"units",void 0),R=(0,p._)([(0,f.$)("esri.rest.support.ArealUnit")],R);const G=R;let E=class extends T.A{constructor(e){super(e),this.itemId=null,this.url=null}};(0,p._)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],E.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],E.prototype,"url",void 0),E=(0,p._)([(0,f.$)("esri.rest.support.DataFile")],E);const N=E;var D=r(22671);let I=class extends T.A{constructor(e){super(e),this.distance=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],I.prototype,"distance",void 0),(0,p._)([(0,S.e)(P.Y8)],I.prototype,"units",void 0),I=(0,p._)([(0,f.$)("esri.rest.support.LinearUnit")],I);const k=I;var x=r(66552);const O="multi-value-",j=new x.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${O}areal-unit`,"GPMultiValue:GPBoolean":`${O}boolean`,"GPMultiValue:GPComposite":`${O}composite`,"GPMultiValue:GPDataFile":`${O}data-file`,"GPMultiValue:GPDate":`${O}date`,"GPMultiValue:GPDouble":`${O}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${O}feature-record-set-layer`,"GPMultiValue:Field":`${O}field`,"GPMultiValue:GPLinearUnit":`${O}linear-unit`,"GPMultiValue:GPLong":`${O}long`,"GPMultiValue:GPRasterData":`${O}raster-data`,"GPMultiValue:GPRasterDataLayer":`${O}raster-data-layer`,"GPMultiValue:GPRecordSet":`${O}record-set`,"GPMultiValue:GPString":`${O}string`});let C=class extends T.A{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,p._)([(0,S.e)(j,{ignoreUnknown:!1})],C.prototype,"dataType",void 0),(0,p._)([(0,y.MZ)()],C.prototype,"paramName",void 0),(0,p._)([(0,y.MZ)()],C.prototype,"value",void 0),C=(0,p._)([(0,f.$)("esri.rest.support.ParameterValue")],C);const F=C;let U=class extends T.A{constructor(e){super(e),this.format=null,this.itemId=null,this.url=null}};(0,p._)([(0,y.MZ)()],U.prototype,"format",void 0),(0,p._)([(0,y.MZ)({json:{read:{source:"itemID"},write:{target:"itemID"}}})],U.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)()],U.prototype,"url",void 0),U=(0,p._)([(0,f.$)("esri.rest.support.RasterData")],U);const Z=U;async function q(e,t){switch(e){case"areal-unit":return G.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return N.fromJSON(t);case"linear-unit":return k.fromJSON(t);case"feature-record-set-layer":if("url"in t)return N.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(5055),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(3353)]).then(r.bind(r,13600))).default),{layerDefinition:i,featureSet:n}=t;return e.read({layerDefinition:i,featureSet:n},{origin:"portal-item"}),e.spatialReference=d.A.fromJSON(n.spatialReference??i.spatialReference??i.extent.spatialReference),e}return D.A.fromJSON(t);case"record-set":return"url"in t?N.fromJSON(t):D.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?M.fromJSON(t.mapImage):Z.fromJSON(t);case"field":return v.A.fromJSON(t)}}async function L(e){const t=j.fromJSON(e.dataType),{paramName:r}=e,i=function(e){return e.startsWith(O)}(t)?await async function(e,t){const r=function(e){return e.replace(O,"")}(e),i="composite"===r?t.map((e=>q(j.fromJSON(e.dataType),e.value))):t.map((e=>q(r,e)));return Promise.all(i)}(t,e.value):await q(t,e.value);return new F({dataType:t,paramName:r,value:i})}function z(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map((e=>z({item:e},!0).item))):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}var J,K=r(37807);const $=(0,x.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),B=1e3;let Y=class extends T.A{static{J=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:i}=(0,A.Dl)(r),n={...this.requestOptions,...e,query:{f:"json"}},s=`${i}/jobs/${t}/cancel`,{data:a}=await(0,o.A)(s,n),{messages:u,jobStatus:d,progress:p}=J.fromJSON(a);return this.set({messages:u,jobStatus:d,progress:p}),"job-cancelled"===d?this:new Promise(((t,r)=>{(0,l.u7)(n.signal,(()=>{this.clearCancelJobTimer(),r((0,l.NK)())})),this.clearCancelJobTimer();const i=()=>{this._cancelJobTimer||r((0,l.NK)()),this.checkJobStatus(e).then((({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(i,B);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}))};this._cancelJobTimer=setTimeout(i,B)}))}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{f:"json"}},i=`${t}/jobs/${this.jobId}`,{data:n}=await(0,o.A)(i,r),{messages:s,jobStatus:a,progress:l}=J.fromJSON(n);return this.set({messages:s,jobStatus:a,progress:l}),this}async fetchResultData(e,t,r){t=_.from(t||{});const{returnColumnName:i,returnFeatureCollection:n,returnM:s,returnZ:a,outSpatialReference:l}=t,{path:u}=(0,A.Dl)(this.sourceUrl),d=z({returnColumnName:i||null,returnFeatureCollection:n||null,returnM:s||null,returnZ:a||null,outSR:l,returnType:"data",f:"json"},null),p={...this.requestOptions,...r,query:d},c=`${u}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,o.A)(c,p);return L(y)}async fetchResultImage(e,t,r){const{path:i}=(0,A.Dl)(this.sourceUrl),n=z({...t.toJSON(),f:"json"}),s={...this.requestOptions,...r,query:n},a=`${i}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,o.A)(a,s);return L(l)}async fetchResultMapImageLayer(){const{path:e}=(0,A.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),i=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(5055),r.e(1214),r.e(1956),r.e(4796),r.e(4111),r.e(364),r.e(4341),r.e(7656),r.e(6911)]).then(r.bind(r,7656))).default)({url:i})}async waitForJobCompletion(e={}){const{interval:t=B,signal:r,statusCallback:i}=e;return new Promise(((e,n)=>{(0,l.u7)(r,(()=>{this.clearJobCompletionTimer(),n((0,l.NK)())})),this.clearJobCompletionTimer();const o=()=>{this._jobCompletionTimer||n((0,l.NK)()),this.checkJobStatus().then((({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":i&&i(this),this._jobCompletionTimer=setTimeout(o,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":n(this);break;default:this._jobCompletionTimer=setTimeout(o,t)}})).catch((e=>{n(e)}))};this._jobCompletionTimer=setTimeout(o,t)}))}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,p._)([(0,y.MZ)()],Y.prototype,"jobId",void 0),(0,p._)([(0,S.e)($,{ignoreUnknown:!1})],Y.prototype,"jobStatus",void 0),(0,p._)([(0,y.MZ)({type:[K.A]})],Y.prototype,"messages",void 0),(0,p._)([(0,y.MZ)()],Y.prototype,"progress",void 0),(0,p._)([(0,y.MZ)()],Y.prototype,"requestOptions",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],Y.prototype,"sourceUrl",void 0),Y=J=(0,p._)([(0,f.$)("esri.rest.support.JobInfo")],Y);const V=Y;let H=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,p._)([(0,y.MZ)()],H.prototype,"headerKeys",void 0),(0,p._)([(0,y.MZ)()],H.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)()],H.prototype,"exceededTransferLimit",void 0),H=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],H);const Q=H;let W=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new Q}};(0,p._)([(0,y.MZ)()],W.prototype,"resultRows",void 0),(0,p._)([(0,y.MZ)()],W.prototype,"resultHeader",void 0),W=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResult")],W);const X=W;let ee=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new Q}};(0,p._)([(0,y.MZ)()],ee.prototype,"resultRowsStream",void 0),(0,p._)([(0,y.MZ)()],ee.prototype,"resultHeader",void 0),ee=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],ee);const te=ee;let re=class extends T.A{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"unique",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"ascending",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],re.prototype,"fieldNames",void 0),re=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.FieldIndex")],re);const ie=re;let ne=class extends T.A{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"fieldType",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"geometryType",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"hasM",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"hasZ",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"nullable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"editable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"required",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"defaultVisibility",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"systemMaintained",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"role",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],ne.prototype,"defaultValue",void 0),ne=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphProperty")],ne);const oe=ne;let se=class extends T.A{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],se.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],se.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],se.prototype,"role",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],se.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:[oe],json:{write:!0}})],se.prototype,"properties",void 0),(0,p._)([(0,y.MZ)({type:[ie],json:{write:!0}})],se.prototype,"fieldIndexes",void 0),se=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphObjectType")],se);const ae=se;let le=class extends ae{constructor(e){super(e),this.type="entity"}};le=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.EntityType")],le);const ue=le;let de=class extends ae{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,p._)([(0,y.MZ)({json:{write:!0}})],de.prototype,"endPoints",void 0),de=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.RelationshipType")],de);const pe=de;let ce=class extends T.A{constructor(e){super(e),this.value=null,this.behavior=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ce.prototype,"value",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ce.prototype,"behavior",void 0),ce=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],ce);const ye=ce;let he=class extends T.A{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,p._)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],he.prototype,"timestamp",void 0),(0,p._)([(0,y.MZ)({type:d.A,json:{write:!0}})],he.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],he.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],he.prototype,"objectIdField",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],he.prototype,"globalIdField",void 0),(0,p._)([(0,y.MZ)()],he.prototype,"arcgisManaged",void 0),(0,p._)([(0,y.MZ)()],he.prototype,"identifierInfo",void 0),(0,p._)([(0,y.MZ)()],he.prototype,"searchIndexes",void 0),(0,p._)([(0,y.MZ)({type:[ue],json:{write:!0}})],he.prototype,"entityTypes",void 0),(0,p._)([(0,y.MZ)({type:[pe],json:{write:!0}})],he.prototype,"relationshipTypes",void 0),(0,p._)([(0,y.MZ)({type:[ue],json:{write:!0}})],he.prototype,"metaEntityTypes",void 0),(0,p._)([(0,y.MZ)({type:[ye],json:{write:!0}})],he.prototype,"provenanceSourceTypeValues",void 0),he=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.DataModel")],he);const fe=he;let me=class extends T.A{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],me.prototype,"capabilities",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"supportsSearch",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],me.prototype,"supportedQueryFormats",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"allowGeometryUpdates",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],me.prototype,"searchMaxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],me.prototype,"serviceCapabilities",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],me.prototype,"maxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"copyrightText",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"units",void 0),(0,p._)([(0,y.MZ)({type:d.A,json:{write:!0}})],me.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],me.prototype,"currentVersion",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],me.prototype,"dateFieldsTimeReference",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"serviceItemId",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"supportsDocuments",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"dataEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"schemaEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"supportsProvenance",void 0),me=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.ServiceDefinition")],me);const ge=me;let _e=class extends T.A{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],_e.prototype,"url",void 0),(0,p._)([(0,y.MZ)({type:fe,json:{write:!0}})],_e.prototype,"dataModel",void 0),(0,p._)([(0,y.MZ)({type:ge,json:{write:!0}})],_e.prototype,"serviceDefinition",void 0),_e=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],_e);const we=_e;function ve(e,t,r){if(0!==e.error_code)throw new s.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function Te(e,t,r,i){const n=new r.ClientDataKey;n.deleteLater(),n.key_string=e;const o=new r.ClientDataFetchRequestParameter;o.deleteLater(),o.set_key(n);const s=t.get(e);return s&&!i&&(o.v_tag={v_tag:s.version}),o}var be,Me,Ae,Se=r(45724),Pe=r(48526),Re=r(86738),Ge=r(39829),Ee=r(82799);function Ne(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(ke(e,t))})),r}function De(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[i,n]of Object.entries(e))r.set_key_value(i,ke(n,t));return r}function Ie(e,t){if(e instanceof Pe.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const i=[],n=[];n[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{i[o]=e,o++}))})),r.coords=new Float64Array(i),r.lengths=new Uint32Array(n),r}(e,t);if(e instanceof Re.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const i=[],n=[];n[0]=1,i[0]=e.x,i[1]=e.y;let o=2;return e.hasZ&&(i[o]=e.z,o++),e.hasM&&(i[o]=e.m,o++),r.coords=new Float64Array(i),r.lengths=new Uint32Array(n),r}(e,t);if(e instanceof Ee.A||e instanceof Ge.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const i=[],n=[];let o=[];e instanceof Ee.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof Ge.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{i[a]=e,a++}))})),n[s]=t,s++})),r.coords=new Float64Array(i),r.lengths=new Uint32Array(n),r}(e,t);throw new s.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function ke(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof u.A)return Ie(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(ke(e,t))})),r}return De(e,t)}!function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(be||(be={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(Me||(Me={})),function(e){e[e.exclude=0]="exclude",e[e.include=1]="include"}(Ae||(Ae={}));var xe,Oe,je,Ce,Fe=r(25927),Ue=r(23150);function Ze(e,t){if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(e instanceof Fe.A){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[i,n]of Object.entries(e.properties))r.set_key_value(i,qe(n,t));return e.id&&r.set_id(e.id),r}if(e instanceof Ue.A){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[i,n]of Object.entries(e.properties))r.set_key_value(i,qe(n,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new s.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function qe(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof u.A?Ie(e,t):null}!function(e){e[e.ClientDataKeyTypeUNSPECIFIED=0]="ClientDataKeyTypeUNSPECIFIED",e[e.ClientDataKeyTypeString=1]="ClientDataKeyTypeString"}(xe||(xe={})),function(e){e[e.ClientDataTypeUNSPECIFIED=0]="ClientDataTypeUNSPECIFIED",e[e.ClientDataTypeString=1]="ClientDataTypeString"}(Oe||(Oe={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.ClientData=1]="ClientData",e[e.NotModified=2]="NotModified"}(je||(je={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Error=1]="Error",e[e.ClientDataValue=2]="ClientDataValue"}(Ce||(Ce={}));let Le=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,p._)([(0,y.MZ)()],Le.prototype,"name",void 0),(0,p._)([(0,y.MZ)()],Le.prototype,"supportedCategory",void 0),(0,p._)([(0,y.MZ)()],Le.prototype,"analyzers",void 0),(0,p._)([(0,y.MZ)()],Le.prototype,"searchProperties",void 0),Le=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SearchIndex")],Le);const ze=Le;var Je=r(35448);let Ke=!1;function $e(e){return e.deleteLater(),new ue(Ye(e))}function Be(e){return e.deleteLater(),new ie({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:Xe(e.fields)})}function Ye(e){return{name:e.name,alias:e.alias,role:Je.Eq[e.role.value],strict:e.strict,properties:et(e.properties),fieldIndexes:tt(e.field_indexes)}}function Ve(e){return e.deleteLater(),new oe({alias:e.alias,name:e.name,fieldType:Je.r5[e.field_type.value]?Je.r5[e.field_type.value]:void 0,geometryType:Je.bV[e.geometry_type.value]?Je.bV[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Je.ti[e.role.value],defaultValue:e.default_value})}function He(e){e.deleteLater();const t=Ye(e),r=[];for(let t=0;t<e.end_points.size();t++){const i=e.end_points.get(t);r.push({originEntityType:i.origin_entity_type,destinationEntityType:i.dest_entity_type})}return e.end_points.delete(),new pe(Object.assign({endPoints:r},t))}function Qe(e){return new ye({behavior:e.behavior,value:e.value})}function We(e){const t=[];for(let r=0;r<e.size();r++)t.push($e(e.get(r)));return e.delete(),t}function Xe(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function et(e){const t=[];for(let r=0;r<e.size();r++){const i=Ve(e.get(r));"esriFieldTypeBigInteger"===i.fieldType&&(Ke=!0),t.push(i)}return e.delete(),t}function tt(e){const t=[];for(let r=0;r<e.size();r++)t.push(Be(e.get(r)));return e.delete(),t}function rt(e){const t=[];for(let r=0;r<e.size();r++)t.push(He(e.get(r)));return e.delete(),t}function it(e){const t=[];for(let r=0;r<e.size();r++){const i=e.get(r);i.deleteLater(),t.push(Qe(i))}return e.delete(),t}function nt(e){const t=[];for(let r=0;r<e.size();r++){const r=new ze,i=e.get(0);r.name=i.name,r.supportedCategory=Je.nP[i.supported_category.value];const n=i.analyzers.size();for(let e=0;e<n;e++)r.analyzers.push({name:i.analyzers.get(e).name});i.analyzers.delete();for(let e=0;e<i.search_properties.keys().size();e++){const t=i.search_properties.keys().get(e),n=i.search_properties.get(t),o=[];for(let e=0;e<n.property_names.size();e++)o.push(n.property_names.get(e));r.searchProperties.set(t,{propertyNames:o})}t.push(r)}return e.delete(),t}r(77901);var ot,st=r(40662),at=r(42095);function lt(e,t){const r={paths:[],hasM:!1,hasZ:!1},i=ut(e,r),{coords:n,geometry_type:o,lengths:a}=e;if(o.value!==t)throw new s.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return a.forEach((e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e[t]=n[l],l++;t.push(e)}r.paths.push(t)})),r}function ut(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(ot||(ot={}));const dt=()=>a.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function pt(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case ot.ESRI_GEOMETRY_POINT:return function(e,t){const r={spatialReference:t};let i=2;ut(e,r);const n=e.coords;return r.x=n[0],r.y=n[1],e.has_z&&(r.z=n[i],i++),e.has_m&&(r.m=n[i]),new Re.A(r)}(e,r);case ot.ESRI_GEOMETRY_MULTIPOINT:return function(e,t){const r={spatialReference:t},i=ut(e,r),n=e.lengths,o=e.coords,s=n[0];r.points=[];let a=0;for(let e=0;e<s;e++){const e=[];for(let t=0;t<i;t++)e[t]=o[a],a++;r.points.push(e)}return new Pe.A(r)}(e,r);case ot.ESRI_GEOMETRY_POLYLINE:return function(e,t){const{paths:r,hasM:i,hasZ:n}=lt(e,ot.ESRI_GEOMETRY_POLYLINE);return new Ee.A({paths:r,hasM:i,hasZ:n,spatialReference:t})}(e,r);case ot.ESRI_GEOMETRY_POLYGON:return function(e,t){const{paths:r,hasM:i,hasZ:n}=lt(e,ot.ESRI_GEOMETRY_POLYGON);return new Ge.A({rings:r,hasM:i,hasZ:n,spatialReference:t})}(e,r);case ot.ESRI_GEOMETRY_ENVELOPE:case ot.ESRI_GEOMETRY_MULTI_PATCH:return dt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case ot.ESRI_GEOMETRY_NULL:case ot.ESRI_GEOMETRY_ANY:default:return dt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return dt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case be.OBJECT:return function(e,t,r){return new st.A(yt(e,t,r))}(e,t,r);case be.ENTITY:return ct(e,t,r);case be.RELATIONSHIP:return ht(e,t,r);case be.PATH:return function(e,t,r){const i=e.entity_count(),n=e.relationship_count(),o=[];for(let s=0;s<i;s++)o.push(ct(e.get_entity_at(s),t,r)),s<n&&o.push(ht(e.get_relationship_at(s),t,r));return new at.A({path:o})}(e,t,r);case be.ARRAY:return function(e,t,r){const i=[],n=e.count();for(let o=0;o<n;o++){const n=e.get_value_at(o);i.push(pt(n,t,r))}return i}(e,t,r);default:return dt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function ct(e,t,r){const i=e.type_name,n=yt(e,t,r),o=e.get_id();return new Fe.A(Object.assign({typeName:i,id:o},n))}function yt(e,t,r){const i={},n=e.key_count();for(let o=0;o<n;o++)i[e.get_key_at(o)]=pt(e.get_value_at(o),t,r);return{properties:i}}function ht(e,t,r){const i=e.type_name,n=yt(e,t,r);return new Ue.A(Object.assign({typeName:i,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},n))}function ft(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new d.A(e.get_out_sr());return new Q({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let mt=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[]}};(0,p._)([(0,y.MZ)()],mt.prototype,"hasError",void 0),(0,p._)([(0,y.MZ)()],mt.prototype,"error",void 0),(0,p._)([(0,y.MZ)()],mt.prototype,"editResults",void 0),mt=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],mt);const gt=mt,_t=new Map,wt=()=>new Map(_t.entries()),vt={fetchKnowledgeGraph:async e=>{const t=new we({url:e}),r=[];return r.push(Et(t)),r.push(Nt(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await Kt(e)},refreshServiceDefinition:async e=>{const t=(await(0,o.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new ge(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const i=r[0];return await jt(`${i}/rest/services/System/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const i=r[0],n=await Ct(`${i}/rest/services/System/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(n.data.results.length<1)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",n);let o;for(const e of n.data.results)if("out_results_string"===e.paramName){o=e.value;break}if(!o)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",n);return o},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const i=`${e.url}/graph/query`;await Ft(e);const n=await Zt(i,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new s.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");n.data.body=await async function(e,t){const r=await(0,Se.I)(),i=new r.GraphQueryRequestEncoder;if(i.deleteLater(),e.outputSpatialReference?i.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:i.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),i.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,n]of Object.entries(e.bindParameters))Ut(t,n,i,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,i);else{if(t.dataModel||await Et(t),4326!==t.dataModel?.spatialReference?.wkid)throw new s.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");i.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,i,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:Ae[e]}}(e.provenanceBehavior,i);try{i.encode()}catch(e){throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const n=i.get_encoding_result();if(0!==n.error.error_code)throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t,e);const o=await Ot(n.data.url,n.data);if(e.dataModel){const t=await Jt(o,e.dataModel);return new te({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new s.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const i=`${e.url}/graph/applyEdits`;await Ft(e);const n=await Zt(i,r);return n.data.body=await async function(e,t){if(t.dataModel||await Et(t),!t.dataModel)throw new s.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,Se.I)(),i=!!e.options?.cascadeDelete,n=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());n.deleteLater(),n.cascade_delete=i;try{let t;e.entityAdds?.forEach((e=>{t=n.add_entity(Ze(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new s.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=n.add_relationship(Ze(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=n.update_entity(Ze(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=n.update_relationship(Ze(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=n.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=n.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),n.encode()}catch(e){throw new s.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const o=n.get_encoding_result();return ve(o.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(o.get_byte_buffer())}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,Se.I)()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=e.has_error(),r=new gt({hasError:t,error:t?{errorCode:e.error.error_code,errorMessage:e.error.error_message}:null}),i=e.get_edit_results_count();for(let t=0;t<i;t++){const i=e.get_edit_results_at(t),n=e.get_edit_results_type_name_at(t),o=[],s=[],a=[],l=i.get_add_results_count(),u=i.get_update_results_count(),d=i.get_delete_results_count();for(let e=0;e<l;e++){const t=i.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<u;e++){const t=i.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=i.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}r.editResults.push({typeName:n,adds:o,updates:s,deletes:a})}return r}(r)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await Ot(n.data.url,n.data))},executeQuery:async(e,t,r)=>{const i=`${e.url}/graph/query`,n=await(0,o.A)(i,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),a=n.getHeader?.("content-type"),l=n.data;if(a?.includes("application/x-protobuf")){const t=new((await(0,Se.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=zt({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new X({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:n.data})},executeSearch:async(e,t,r)=>{const i=t.typeCategoryFilter,n=`${e.url}/graph/search`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:i,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=a.getHeader?.("content-type"),u=a.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,Se.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=zt({wasmQueryDecoder:t,newArrayBufferToParse:u,dataModel:e.dataModel});return new X({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:a.data})},executeSearchStreaming:async(e,t,r)=>{const i=`${e.url}/graph/search`;await Ft(e);const n=await Zt(i,r);n.data.body=await async function(e){const t=await(0,Se.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(Ne(e.idsFilter,t))}catch(e){throw new s.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new s.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const i=r.get_encoding_result();if(0!==i.error.error_code)throw new s.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return structuredClone(i.get_byte_buffer())}(t);const o=await Ot(n.data.url,n.data);if(e.dataModel){const t=await Jt(o,e.dataModel);return new te({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let i=_t.get(e.url||"");i||(i=new Map,_t.set(e.url||"",i));const n=new Map(i.entries()),o=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const a=await(0,Se.I)(),l=function(e,t,r,i=!1){const n=new r.ClientDataFetchRequestEncoder;n.deleteLater();for(const o of e){const e=Te(o,t,r,i);n.add_client_data_fetch_request_parameter(e)}n.encode();const o=n.get_encoding_result();return ve(o.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(o.get_byte_buffer())}(t,i,a,r.ignoreCache),u=await Zt(o,r.requestOptions);u.data.body=l;const d=await Ot(u.data.url,u.data),p=d.headers.get("content-type");if(p?.includes("application/x-protobuf")){const e=new a.ClientDataFetchResponseDecoder;e.deleteLater();const t=await d.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&ve(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,i=!1){const n=new Map;for(let o=0;o<e.get_results_count();o++){const s=e.get_result_at(o);if(s.get_fetch_result_case().value!==Ce.ClientDataValue||0!==s.error().error_code){const e=s.get_key().key_string;r.has(e)&&t.delete(e);continue}const a=s.get_value(),l=s.get_key().key_string,u=r.get(l);let d;if(a.get_data_case().value===je.NotModified&&u)d=u.value;else{if(a.get_data_case().value!==je.ClientData)continue;{d=a.get_data().client_data_string;const e=s.get_value().get_v_tag().v_tag;i||t.set(l,{key:l,version:e,value:d})}}n.set(l,d)}return n}(e,i,n,r.ignoreCache)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:p,data:d})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,i=await(0,o.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),n=i.getHeader?.("content-type"),a=i.data;if(n?.includes("application/x-protobuf")){const e=new((await(0,Se.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(a)),e.has_error()&&ve(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const i=t.get_key_at(e);i.get_client_data_key_type().value===xe.ClientDataKeyTypeString&&r.push(i.key_string)}return r}(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:i.data})},clearClientDataCache:()=>_t.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,i)=>async function(e,t,r,i){return r=_.from(r||{}),async function(e,t,r,i,n){const s={},a={},l=[];return function(e,t,r){for(const i in e){const n=e[i];if(n&&"object"==typeof n&&n instanceof D.A){const{features:e}=n;r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}}}(i,l,s),(0,w.el)(l).then((l=>{const{outSpatialReference:u,processExtent:d,processSpatialReference:p,returnColumnName:c,returnFeatureCollection:y,returnM:h,returnZ:f}=r,{path:m}=(0,A.Dl)(e);for(const e in s){const[t,r]=s[e];a[e]=l.slice(t,r)}const g=u?u.wkid||u:null,_=p?p.wkid||p:null,w="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:y||void 0,returnM:h||void 0,returnZ:f||void 0}:null,v=z({...d?{context:{extent:d,outSR:g,processSR:_}}:{"env:outSR":g,"env:processSR":_},...i,...w,f:"json"},null,a),T={...n,query:v};return(0,o.A)(`${m}/${t}`,T)}))}(e,"submitJob",r,t??{},i).then((({data:t})=>{const r=V.fromJSON(t);return r.sourceUrl=e,r}))}(e,t,r,i),_esriRequestWrapper:async(e,t)=>(0,o.A)(e,t)};async function Tt(e,t,r){return vt.executeApplyEdits(e,t,r)}async function bt(e,t,r){return vt.executeQuery(e,t,r)}async function Mt(e,t,r){return vt.executeQueryStreaming(e,t,r)}async function At(e,t,r){return vt.executeSearch(e,t,r)}async function St(e,t,r){return vt.executeSearchStreaming(e,t,r)}function Pt(e,t){return vt.fetchAllClientDataKeys(e,t)}function Rt(e,t,r){return vt.fetchClientDataAtKeys(e,t,r)}async function Gt(e){return vt.fetchKnowledgeGraph(e)}async function Et(e){return vt.refreshDataModel(e)}async function Nt(e){return vt.refreshServiceDefinition(e)}async function Dt(e,t){return vt.executeFindPathsAsynchronous(e,t)}async function It(e,t){return vt.executeFindPaths(e,t)}async function kt(e,t){return vt.fetchAsynchronousFindPathsResultData(e,t)}function xt(){return vt.clearClientDataCache()}async function Ot(e,t){return vt._fetchWrapper(e,t)}async function jt(e,t,r,i){return vt._submitJobWrapper(e,t,r,i)}async function Ct(e,t){return vt._esriRequestWrapper(e,t)}async function Ft(e){const t=n.id?.findCredential(e.url);t||(e.dataModel?await Kt(e):await Et(e))}function Ut(e,t,r,i){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof u.A?r.set_param_key_value(e,Ie(t,i)):Array.isArray(t)?r.set_param_key_value(e,Ne(t,i)):r.set_param_key_value(e,De(t,i))}async function Zt(e,t){return(0,o.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}let qt=50;function Lt(e){qt=e}function zt({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:i,limitMaxProcessingTime:n=!1}){t&&e.push_buffer(new Uint8Array(t));const o=[];let a,l,u=0;const p=Date.now();let c=!0;for(;e.next_row();){a&&l||(a=i??ft(e),l=a.outSpatialReference??new d.A({wkid:4326})),u||(u=e.get_header_keys().size());const t=new Array(u);for(let i=0;i<u;i++){const n=e.get_value(i);t[i]=pt(n,r,l)}if(o.push(t),n&&Date.now()-p>qt){c=!1;break}}if(e.has_error())throw new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:a,resultRows:o,parsedAllResultsFromBuffer:c}}async function Jt(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),i=new((await(0,Se.I)()).GraphQueryDecoder);let n,o,u;i.deleteLater();const d=new Promise(((e,t)=>{o=e,u=t}));let p=!1,c=null;const y=new ReadableStream({pull:async function e(d){if(!r){const e=new s.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw u(e),e}const{done:y,value:h}=c?{done:!1,value:null}:await r.read().catch((e=>{throw u(e),r.releaseLock(),e}));h&&(c=h);try{if(y){let e;if(i.has_error()?e=new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:i.error.error_code,errorMessage:i.error.error_message}):p||o(new Q),r.releaseLock(),e)throw d.error(e),u(e),e;return void d.close()}const{resultHeader:a,resultRows:l,parsedAllResultsFromBuffer:f}=zt({wasmQueryDecoder:i,newArrayBufferToParse:h,dataModel:t,decodedHeader:n,limitMaxProcessingTime:!0});return f&&(c=null),!n&&a&&(n=a,o(a),p=!0),l.length>0?void d.enqueue(l):await e(d)}catch(e){throw a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),u(e),r.releaseLock(),(0,l.zf)(e)?e:new s.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:y,resultHeader:await d}}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function Kt(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),i=r.getHeader?.("content-type"),n=r.data;if(i?.includes("application/x-protobuf")){const e=(await(0,Se.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(n));if(!e)throw new s.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),Ke=!1;const t=new fe({timestamp:e.timestamp,spatialReference:new d.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:Je.vy[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:Je.wr[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:nt(e.search_indexes),entityTypes:We(e.entity_types),relationshipTypes:rt(e.relationship_types),metaEntityTypes:We(e.meta_entity_types),provenanceSourceTypeValues:it(e.provenance_source_type_values.value_behavior_array)});return Ke&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:i,data:r.data})}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8613],{2073:(e,t,r)=>{r.d(t,{$n:()=>b,$r:()=>m,EM:()=>f,Ec:()=>I,JJ:()=>h,Mm:()=>A,OC:()=>P,Sr:()=>p,UO:()=>a,Vj:()=>G,WU:()=>E,Y8:()=>s,Z7:()=>l,_6:()=>v,aJ:()=>d,dd:()=>M,dn:()=>u,et:()=>S,fe:()=>w,gD:()=>T,hE:()=>c,hY:()=>o,iM:()=>_,mt:()=>g,ow:()=>y,vS:()=>R});var i=r(66552);const n={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},o=(0,i.O)()(n),s=(0,i.O)()({...n,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),a=(0,i.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),u=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),d=(0,i.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),p=(0,i.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),c=((0,i.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,i.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,i.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,i.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,i.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),h=(0,i.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),f=(0,i.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),m=(0,i.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),g=(0,i.O)()({1:"right",2:"left"},{useNumericKeys:!0}),_=(0,i.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),w=(0,i.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),v=(0,i.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),T=(0,i.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),b=(0,i.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),M=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),A=(0,i.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),S=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),P=(0,i.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),R=(0,i.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),G=(0,i.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),E=(0,i.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),I=(0,i.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"})},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),o=r(52106),s=r(66552),a=r(25482),l=r(4718),u=r(10107),d=(r(44208),r(53966),r(36005)),p=r(40608),c=r(43937),y=r(16930),h=r(65864),f=r(50498),m=r(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=i=class extends a.A{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){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({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 r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=i);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(s)}return n}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(a[0]),n=r(a[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,h.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,n._)([(0,d.w)("features")],_.prototype,"readFeatures",null),(0,n._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,n._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,n._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,n._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,n._)([(0,u.MZ)({types:f.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,n._)([(0,d.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,n._)([(0,u.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,n._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,n._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=i=(0,n._)([(0,p.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},35448:(e,t,r)=>{var i,n,o,s,a,l,u;r.d(t,{Eq:()=>i,bV:()=>o,nP:()=>a,r5:()=>n,ti:()=>l,vy:()=>u,wr:()=>s}),function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(i||(i={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(n||(n={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(o||(o={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(s||(s={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(a||(a={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension",e[e.esriGraphPropertyProvenanceInstanceId=10]="esriGraphPropertyProvenanceInstanceId",e[e.esriGraphPropertyProvenanceSourceType=11]="esriGraphPropertyProvenanceSourceType",e[e.esriGraphPropertyProvenanceSourceName=12]="esriGraphPropertyProvenanceSourceName",e[e.esriGraphPropertyProvenanceSource=13]="esriGraphPropertyProvenanceSource",e[e.esriGraphPropertyProvenanceComment=14]="esriGraphPropertyProvenanceComment",e[e.esriGraphPropertyProvenanceTypeName=15]="esriGraphPropertyProvenanceTypeName",e[e.esriGraphPropertyProvenancePropertyName=16]="esriGraphPropertyProvenancePropertyName"}(l||(l={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(u||(u={}))},37807:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(66552),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const l=new n.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let u=class extends o.A{constructor(e){super(e),this.description=null,this.type=null}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],u.prototype,"description",void 0),(0,i._)([(0,s.MZ)({type:String,json:{read:l.read,write:l.write}})],u.prototype,"type",void 0),u=(0,i._)([(0,a.$)("esri.rest.support.GPMessage")],u);const d=u},45724:(e,t,r)=>{r.d(t,{I:()=>l});var i=r(2741),n=r(44208);const o="esri/rest/knowledgeGraph/wasmInterface/";let s,a=null;async function l(){const e=a??s;if(e)return e;const t=!!(0,n.A)("wasm-simd");return s=u(t),s}async function u(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then((e=>e.a));return e({locateFile:e=>(0,i.s)(o+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then((e=>e.a));return t({locateFile:e=>(0,i.s)(o+e)})}},88613:(e,t,r)=>{r.r(t),r.d(t,{_esriRequestWrapper:()=>Ct,_fetchWrapper:()=>Ot,_getClientDataCacheCopy:()=>wt,_setMaxQueryParsingDurationForTesting:()=>Lt,_submitJobWrapper:()=>jt,clearClientDataCache:()=>xt,clientDataCache:()=>_t,executeApplyEdits:()=>Tt,executeFindPaths:()=>Dt,executeFindPathsAsynchronous:()=>Nt,executeQuery:()=>bt,executeQueryStreaming:()=>Mt,executeSearch:()=>At,executeSearchStreaming:()=>St,fetchAllClientDataKeys:()=>Pt,fetchAsynchronousFindPathsResultData:()=>kt,fetchClientDataAtKeys:()=>Rt,fetchKnowledgeGraph:()=>Gt,kgRestServices:()=>vt,refreshDataModel:()=>Et,refreshServiceDefinition:()=>It});var i,n=r(70333),o=r(78888),s=r(49186),a=r(53966),l=r(74887),u=r(91075),d=r(16930),p=r(90237),c=r(69622),y=r(10107),h=r(56507),f=(r(44208),r(87811),r(40608)),m=r(5443);let g=i=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,h.PZ)(i,e)}};(0,p._)([(0,y.MZ)({type:d.A})],g.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)({type:m.A})],g.prototype,"processExtent",void 0),(0,p._)([(0,y.MZ)({type:d.A})],g.prototype,"processSpatialReference",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnColumnName",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnFeatureCollection",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnM",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnZ",void 0),g=i=(0,p._)([(0,f.$)("esri.rest.geoprocessor.GPOptions")],g);const _=g;var w=r(17136),v=r(20437),T=r(25482);let b=class extends T.A{constructor(){super(...arguments),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,p._)([(0,y.MZ)({type:m.A})],b.prototype,"extent",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"height",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"href",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"opacity",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"rotation",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"scale",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"visible",void 0),(0,p._)([(0,y.MZ)()],b.prototype,"width",void 0),b=(0,p._)([(0,f.$)("esri.layers.support.MapImage")],b);const M=b;var A=r(2272),S=r(93223),P=r(2073);let R=class extends T.A{constructor(e){super(e),this.area=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],R.prototype,"area",void 0),(0,p._)([(0,S.e)(P.UO)],R.prototype,"units",void 0),R=(0,p._)([(0,f.$)("esri.rest.support.ArealUnit")],R);const G=R;let E=class extends T.A{constructor(e){super(e),this.itemId=null,this.url=null}};(0,p._)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],E.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],E.prototype,"url",void 0),E=(0,p._)([(0,f.$)("esri.rest.support.DataFile")],E);const I=E;var N=r(22671);let D=class extends T.A{constructor(e){super(e),this.distance=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],D.prototype,"distance",void 0),(0,p._)([(0,S.e)(P.Y8)],D.prototype,"units",void 0),D=(0,p._)([(0,f.$)("esri.rest.support.LinearUnit")],D);const k=D;var x=r(66552);const O="multi-value-",j=new x.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${O}areal-unit`,"GPMultiValue:GPBoolean":`${O}boolean`,"GPMultiValue:GPComposite":`${O}composite`,"GPMultiValue:GPDataFile":`${O}data-file`,"GPMultiValue:GPDate":`${O}date`,"GPMultiValue:GPDouble":`${O}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${O}feature-record-set-layer`,"GPMultiValue:Field":`${O}field`,"GPMultiValue:GPLinearUnit":`${O}linear-unit`,"GPMultiValue:GPLong":`${O}long`,"GPMultiValue:GPRasterData":`${O}raster-data`,"GPMultiValue:GPRasterDataLayer":`${O}raster-data-layer`,"GPMultiValue:GPRecordSet":`${O}record-set`,"GPMultiValue:GPString":`${O}string`});let C=class extends T.A{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,p._)([(0,S.e)(j,{ignoreUnknown:!1})],C.prototype,"dataType",void 0),(0,p._)([(0,y.MZ)()],C.prototype,"paramName",void 0),(0,p._)([(0,y.MZ)()],C.prototype,"value",void 0),C=(0,p._)([(0,f.$)("esri.rest.support.ParameterValue")],C);const F=C;let U=class extends T.A{constructor(e){super(e),this.format=null,this.itemId=null,this.url=null}};(0,p._)([(0,y.MZ)()],U.prototype,"format",void 0),(0,p._)([(0,y.MZ)({json:{read:{source:"itemID"},write:{target:"itemID"}}})],U.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)()],U.prototype,"url",void 0),U=(0,p._)([(0,f.$)("esri.rest.support.RasterData")],U);const Z=U;async function q(e,t){switch(e){case"areal-unit":return G.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return I.fromJSON(t);case"linear-unit":return k.fromJSON(t);case"feature-record-set-layer":if("url"in t)return I.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(5055),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(3353)]).then(r.bind(r,13600))).default),{layerDefinition:i,featureSet:n}=t;return e.read({layerDefinition:i,featureSet:n},{origin:"portal-item"}),e.spatialReference=d.A.fromJSON(n.spatialReference??i.spatialReference??i.extent.spatialReference),e}return N.A.fromJSON(t);case"record-set":return"url"in t?I.fromJSON(t):N.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?M.fromJSON(t.mapImage):Z.fromJSON(t);case"field":return v.A.fromJSON(t)}}async function L(e){const t=j.fromJSON(e.dataType),{paramName:r}=e,i=function(e){return e.startsWith(O)}(t)?await async function(e,t){const r=function(e){return e.replace(O,"")}(e),i="composite"===r?t.map((e=>q(j.fromJSON(e.dataType),e.value))):t.map((e=>q(r,e)));return Promise.all(i)}(t,e.value):await q(t,e.value);return new F({dataType:t,paramName:r,value:i})}function z(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map((e=>z({item:e},!0).item))):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}var J,K=r(37807);const $=(0,x.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),B=1e3;let Y=class extends T.A{static{J=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:i}=(0,A.Dl)(r),n={...this.requestOptions,...e,query:{f:"json"}},s=`${i}/jobs/${t}/cancel`,{data:a}=await(0,o.A)(s,n),{messages:u,jobStatus:d,progress:p}=J.fromJSON(a);return this.set({messages:u,jobStatus:d,progress:p}),"job-cancelled"===d?this:new Promise(((t,r)=>{(0,l.u7)(n.signal,(()=>{this.clearCancelJobTimer(),r((0,l.NK)())})),this.clearCancelJobTimer();const i=()=>{this._cancelJobTimer||r((0,l.NK)()),this.checkJobStatus(e).then((({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(i,B);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}))};this._cancelJobTimer=setTimeout(i,B)}))}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{f:"json"}},i=`${t}/jobs/${this.jobId}`,{data:n}=await(0,o.A)(i,r),{messages:s,jobStatus:a,progress:l}=J.fromJSON(n);return this.set({messages:s,jobStatus:a,progress:l}),this}async fetchResultData(e,t,r){t=_.from(t||{});const{returnColumnName:i,returnFeatureCollection:n,returnM:s,returnZ:a,outSpatialReference:l}=t,{path:u}=(0,A.Dl)(this.sourceUrl),d=z({returnColumnName:i||null,returnFeatureCollection:n||null,returnM:s||null,returnZ:a||null,outSR:l,returnType:"data",f:"json"},null),p={...this.requestOptions,...r,query:d},c=`${u}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,o.A)(c,p);return L(y)}async fetchResultImage(e,t,r){const{path:i}=(0,A.Dl)(this.sourceUrl),n=z({...t.toJSON(),f:"json"}),s={...this.requestOptions,...r,query:n},a=`${i}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,o.A)(a,s);return L(l)}async fetchResultMapImageLayer(){const{path:e}=(0,A.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),i=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(5055),r.e(1214),r.e(1956),r.e(4796),r.e(4111),r.e(364),r.e(4341),r.e(7656),r.e(6911)]).then(r.bind(r,7656))).default)({url:i})}async waitForJobCompletion(e={}){const{interval:t=B,signal:r,statusCallback:i}=e;return new Promise(((e,n)=>{(0,l.u7)(r,(()=>{this.clearJobCompletionTimer(),n((0,l.NK)())})),this.clearJobCompletionTimer();const o=()=>{this._jobCompletionTimer||n((0,l.NK)()),this.checkJobStatus().then((({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":i&&i(this),this._jobCompletionTimer=setTimeout(o,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":n(this);break;default:this._jobCompletionTimer=setTimeout(o,t)}})).catch((e=>{n(e)}))};this._jobCompletionTimer=setTimeout(o,t)}))}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,p._)([(0,y.MZ)()],Y.prototype,"jobId",void 0),(0,p._)([(0,S.e)($,{ignoreUnknown:!1})],Y.prototype,"jobStatus",void 0),(0,p._)([(0,y.MZ)({type:[K.A]})],Y.prototype,"messages",void 0),(0,p._)([(0,y.MZ)()],Y.prototype,"progress",void 0),(0,p._)([(0,y.MZ)()],Y.prototype,"requestOptions",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],Y.prototype,"sourceUrl",void 0),Y=J=(0,p._)([(0,f.$)("esri.rest.support.JobInfo")],Y);const V=Y;let H=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,p._)([(0,y.MZ)()],H.prototype,"headerKeys",void 0),(0,p._)([(0,y.MZ)()],H.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)()],H.prototype,"exceededTransferLimit",void 0),H=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],H);const Q=H;let W=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new Q}};(0,p._)([(0,y.MZ)()],W.prototype,"resultRows",void 0),(0,p._)([(0,y.MZ)()],W.prototype,"resultHeader",void 0),W=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResult")],W);const X=W;let ee=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new Q}};(0,p._)([(0,y.MZ)()],ee.prototype,"resultRowsStream",void 0),(0,p._)([(0,y.MZ)()],ee.prototype,"resultHeader",void 0),ee=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],ee);const te=ee;let re=class extends T.A{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"unique",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"ascending",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],re.prototype,"fieldNames",void 0),re=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.FieldIndex")],re);const ie=re;let ne=class extends T.A{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"fieldType",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"geometryType",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"hasM",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"hasZ",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"nullable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"editable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"required",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"defaultVisibility",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"systemMaintained",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"role",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],ne.prototype,"defaultValue",void 0),ne=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphProperty")],ne);const oe=ne;let se=class extends T.A{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],se.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],se.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],se.prototype,"role",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],se.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:[oe],json:{write:!0}})],se.prototype,"properties",void 0),(0,p._)([(0,y.MZ)({type:[ie],json:{write:!0}})],se.prototype,"fieldIndexes",void 0),se=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphObjectType")],se);const ae=se;let le=class extends ae{constructor(e){super(e),this.type="entity"}};le=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.EntityType")],le);const ue=le;let de=class extends ae{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,p._)([(0,y.MZ)({json:{write:!0}})],de.prototype,"endPoints",void 0),de=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.RelationshipType")],de);const pe=de;let ce=class extends T.A{constructor(e){super(e),this.value=null,this.behavior=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ce.prototype,"value",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ce.prototype,"behavior",void 0),ce=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],ce);const ye=ce;let he=class extends T.A{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,p._)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],he.prototype,"timestamp",void 0),(0,p._)([(0,y.MZ)({type:d.A,json:{write:!0}})],he.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],he.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],he.prototype,"objectIdField",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],he.prototype,"globalIdField",void 0),(0,p._)([(0,y.MZ)()],he.prototype,"arcgisManaged",void 0),(0,p._)([(0,y.MZ)()],he.prototype,"identifierInfo",void 0),(0,p._)([(0,y.MZ)()],he.prototype,"searchIndexes",void 0),(0,p._)([(0,y.MZ)({type:[ue],json:{write:!0}})],he.prototype,"entityTypes",void 0),(0,p._)([(0,y.MZ)({type:[pe],json:{write:!0}})],he.prototype,"relationshipTypes",void 0),(0,p._)([(0,y.MZ)({type:[ue],json:{write:!0}})],he.prototype,"metaEntityTypes",void 0),(0,p._)([(0,y.MZ)({type:[ye],json:{write:!0}})],he.prototype,"provenanceSourceTypeValues",void 0),he=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.DataModel")],he);const fe=he;let me=class extends T.A{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],me.prototype,"capabilities",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"supportsSearch",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],me.prototype,"supportedQueryFormats",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"allowGeometryUpdates",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],me.prototype,"searchMaxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],me.prototype,"serviceCapabilities",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],me.prototype,"maxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"copyrightText",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"units",void 0),(0,p._)([(0,y.MZ)({type:d.A,json:{write:!0}})],me.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],me.prototype,"currentVersion",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],me.prototype,"dateFieldsTimeReference",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],me.prototype,"serviceItemId",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"supportsDocuments",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"dataEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"schemaEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"supportsProvenance",void 0),me=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.ServiceDefinition")],me);const ge=me;let _e=class extends T.A{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],_e.prototype,"url",void 0),(0,p._)([(0,y.MZ)({type:fe,json:{write:!0}})],_e.prototype,"dataModel",void 0),(0,p._)([(0,y.MZ)({type:ge,json:{write:!0}})],_e.prototype,"serviceDefinition",void 0),_e=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],_e);const we=_e;function ve(e,t,r){if(0!==e.error_code)throw new s.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function Te(e,t,r,i){const n=new r.ClientDataKey;n.deleteLater(),n.key_string=e;const o=new r.ClientDataFetchRequestParameter;o.deleteLater(),o.set_key(n);const s=t.get(e);return s&&!i&&(o.v_tag={v_tag:s.version}),o}var be,Me,Ae,Se,Pe,Re,Ge,Ee=r(45724),Ie=r(48526),Ne=r(86738),De=r(39829),ke=r(82799);function xe(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(Ce(e,t))})),r}function Oe(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[i,n]of Object.entries(e))r.set_key_value(i,Ce(n,t));return r}function je(e,t){if(e instanceof Ie.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const i=[],n=[];n[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{i[o]=e,o++}))})),r.coords=new Float64Array(i),r.lengths=new Uint32Array(n),r}(e,t);if(e instanceof Ne.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const i=[],n=[];n[0]=1,i[0]=e.x,i[1]=e.y;let o=2;return e.hasZ&&(i[o]=e.z,o++),e.hasM&&(i[o]=e.m,o++),r.coords=new Float64Array(i),r.lengths=new Uint32Array(n),r}(e,t);if(e instanceof ke.A||e instanceof De.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const i=[],n=[];let o=[];e instanceof ke.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof De.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{i[a]=e,a++}))})),n[s]=t,s++})),r.coords=new Float64Array(i),r.lengths=new Uint32Array(n),r}(e,t);throw new s.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function Ce(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof u.A)return je(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(Ce(e,t))})),r}return Oe(e,t)}function Fe(e,t){if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[i,n]of Object.entries(e.properties))r.set_key_value(i,Ue(n,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[i,n]of Object.entries(e.properties))r.set_key_value(i,Ue(n,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new s.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function Ue(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof u.A?je(e,t):null}!function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(be||(be={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(Me||(Me={})),function(e){e[e.exclude=0]="exclude",e[e.include=1]="include"}(Ae||(Ae={})),function(e){e[e.ClientDataKeyTypeUNSPECIFIED=0]="ClientDataKeyTypeUNSPECIFIED",e[e.ClientDataKeyTypeString=1]="ClientDataKeyTypeString"}(Se||(Se={})),function(e){e[e.ClientDataTypeUNSPECIFIED=0]="ClientDataTypeUNSPECIFIED",e[e.ClientDataTypeString=1]="ClientDataTypeString"}(Pe||(Pe={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.ClientData=1]="ClientData",e[e.NotModified=2]="NotModified"}(Re||(Re={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Error=1]="Error",e[e.ClientDataValue=2]="ClientDataValue"}(Ge||(Ge={}));let Ze=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,p._)([(0,y.MZ)()],Ze.prototype,"name",void 0),(0,p._)([(0,y.MZ)()],Ze.prototype,"supportedCategory",void 0),(0,p._)([(0,y.MZ)()],Ze.prototype,"analyzers",void 0),(0,p._)([(0,y.MZ)()],Ze.prototype,"searchProperties",void 0),Ze=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SearchIndex")],Ze);const qe=Ze;var Le=r(35448);let ze=!1;function Je(e){return e.deleteLater(),new ue($e(e))}function Ke(e){return e.deleteLater(),new ie({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:Qe(e.fields)})}function $e(e){return{name:e.name,alias:e.alias,role:Le.Eq[e.role.value],strict:e.strict,properties:We(e.properties),fieldIndexes:Xe(e.field_indexes)}}function Be(e){return e.deleteLater(),new oe({alias:e.alias,name:e.name,fieldType:Le.r5[e.field_type.value]?Le.r5[e.field_type.value]:void 0,geometryType:Le.bV[e.geometry_type.value]?Le.bV[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Le.ti[e.role.value],defaultValue:e.default_value})}function Ye(e){e.deleteLater();const t=$e(e),r=[];for(let t=0;t<e.end_points.size();t++){const i=e.end_points.get(t);r.push({originEntityType:i.origin_entity_type,destinationEntityType:i.dest_entity_type})}return e.end_points.delete(),new pe(Object.assign({endPoints:r},t))}function Ve(e){return new ye({behavior:e.behavior,value:e.value})}function He(e){const t=[];for(let r=0;r<e.size();r++)t.push(Je(e.get(r)));return e.delete(),t}function Qe(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function We(e){const t=[];for(let r=0;r<e.size();r++){const i=Be(e.get(r));"esriFieldTypeBigInteger"===i.fieldType&&(ze=!0),t.push(i)}return e.delete(),t}function Xe(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ke(e.get(r)));return e.delete(),t}function et(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ye(e.get(r)));return e.delete(),t}function tt(e){const t=[];for(let r=0;r<e.size();r++){const i=e.get(r);i.deleteLater(),t.push(Ve(i))}return e.delete(),t}function rt(e){const t=[];for(let r=0;r<e.size();r++){const r=new qe,i=e.get(0);r.name=i.name,r.supportedCategory=Le.nP[i.supported_category.value];const n=i.analyzers.size();for(let e=0;e<n;e++)r.analyzers.push({name:i.analyzers.get(e).name});i.analyzers.delete();for(let e=0;e<i.search_properties.keys().size();e++){const t=i.search_properties.keys().get(e),n=i.search_properties.get(t),o=[];for(let e=0;e<n.property_names.size();e++)o.push(n.property_names.get(e));r.searchProperties.set(t,{propertyNames:o})}t.push(r)}return e.delete(),t}var it,nt=r(25927),ot=(r(77901),r(40662)),st=r(42095),at=r(23150);function lt(e,t){const r={paths:[],hasM:!1,hasZ:!1},i=ut(e,r),{coords:n,geometry_type:o,lengths:a}=e;if(o.value!==t)throw new s.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return a.forEach((e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e[t]=n[l],l++;t.push(e)}r.paths.push(t)})),r}function ut(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(it||(it={}));const dt=()=>a.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function pt(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case it.ESRI_GEOMETRY_POINT:return function(e,t){const r={spatialReference:t};let i=2;ut(e,r);const n=e.coords;return r.x=n[0],r.y=n[1],e.has_z&&(r.z=n[i],i++),e.has_m&&(r.m=n[i]),new Ne.A(r)}(e,r);case it.ESRI_GEOMETRY_MULTIPOINT:return function(e,t){const r={spatialReference:t},i=ut(e,r),n=e.lengths,o=e.coords,s=n[0];r.points=[];let a=0;for(let e=0;e<s;e++){const e=[];for(let t=0;t<i;t++)e[t]=o[a],a++;r.points.push(e)}return new Ie.A(r)}(e,r);case it.ESRI_GEOMETRY_POLYLINE:return function(e,t){const{paths:r,hasM:i,hasZ:n}=lt(e,it.ESRI_GEOMETRY_POLYLINE);return new ke.A({paths:r,hasM:i,hasZ:n,spatialReference:t})}(e,r);case it.ESRI_GEOMETRY_POLYGON:return function(e,t){const{paths:r,hasM:i,hasZ:n}=lt(e,it.ESRI_GEOMETRY_POLYGON);return new De.A({rings:r,hasM:i,hasZ:n,spatialReference:t})}(e,r);case it.ESRI_GEOMETRY_ENVELOPE:case it.ESRI_GEOMETRY_MULTI_PATCH:return dt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case it.ESRI_GEOMETRY_NULL:case it.ESRI_GEOMETRY_ANY:default:return dt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return dt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case be.OBJECT:return function(e,t,r){return new ot.A(yt(e,t,r))}(e,t,r);case be.ENTITY:return ct(e,t,r);case be.RELATIONSHIP:return ht(e,t,r);case be.PATH:return function(e,t,r){const i=e.entity_count(),n=e.relationship_count(),o=[];for(let s=0;s<i;s++)o.push(ct(e.get_entity_at(s),t,r)),s<n&&o.push(ht(e.get_relationship_at(s),t,r));return new st.A({path:o})}(e,t,r);case be.ARRAY:return function(e,t,r){const i=[],n=e.count();for(let o=0;o<n;o++){const n=e.get_value_at(o);i.push(pt(n,t,r))}return i}(e,t,r);default:return dt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function ct(e,t,r){const i=e.type_name,n=yt(e,t,r),o=e.get_id();return new nt.A(Object.assign({typeName:i,id:o},n))}function yt(e,t,r){const i={},n=e.key_count();for(let o=0;o<n;o++)i[e.get_key_at(o)]=pt(e.get_value_at(o),t,r);return{properties:i}}function ht(e,t,r){const i=e.type_name,n=yt(e,t,r);return new at.A(Object.assign({typeName:i,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},n))}function ft(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new d.A(e.get_out_sr());return new Q({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let mt=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[]}};(0,p._)([(0,y.MZ)()],mt.prototype,"hasError",void 0),(0,p._)([(0,y.MZ)()],mt.prototype,"error",void 0),(0,p._)([(0,y.MZ)()],mt.prototype,"editResults",void 0),mt=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],mt);const gt=mt,_t=new Map,wt=()=>new Map(_t.entries()),vt={fetchKnowledgeGraph:async e=>{const t=new we({url:e}),r=[];return r.push(Et(t)),r.push(It(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await Kt(e)},refreshServiceDefinition:async e=>{const t=(await(0,o.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new ge(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const i=r[0];return await jt(`${i}/rest/services/System/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const i=r[0],n=await Ct(`${i}/rest/services/System/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(n.data.results.length<1)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",n);let o;for(const e of n.data.results)if("out_results_string"===e.paramName){o=e.value;break}if(!o)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",n);return o},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const i=`${e.url}/graph/query`;await Ft(e);const n=await Zt(i,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new s.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");n.data.body=await async function(e,t){const r=await(0,Ee.I)(),i=new r.GraphQueryRequestEncoder;if(i.deleteLater(),e.outputSpatialReference?i.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:i.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),i.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,n]of Object.entries(e.bindParameters))Ut(t,n,i,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,i);else{if(t.dataModel||await Et(t),4326!==t.dataModel?.spatialReference?.wkid)throw new s.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");i.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,i,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:Ae[e]}}(e.provenanceBehavior,i);try{i.encode()}catch(e){throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const n=i.get_encoding_result();if(0!==n.error.error_code)throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t,e);const o=await Ot(n.data.url,n.data);if(e.dataModel){const t=await Jt(o,e.dataModel);return new te({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new s.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const i=`${e.url}/graph/applyEdits`;await Ft(e);const n=await Zt(i,r);return n.data.body=await async function(e,t){if(t.dataModel||await Et(t),!t.dataModel)throw new s.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,Ee.I)(),i=!!e.options?.cascadeDelete,n=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());n.deleteLater(),n.cascade_delete=i;try{let t;e.entityAdds?.forEach((e=>{t=n.add_entity(Fe(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new s.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=n.add_relationship(Fe(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=n.update_entity(Fe(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=n.update_relationship(Fe(e,r)),ve(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=n.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=n.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),n.encode()}catch(e){throw new s.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const o=n.get_encoding_result();return ve(o.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(o.get_byte_buffer())}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,Ee.I)()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=e.has_error(),r=new gt({hasError:t,error:t?{errorCode:e.error.error_code,errorMessage:e.error.error_message}:null}),i=e.get_edit_results_count();for(let t=0;t<i;t++){const i=e.get_edit_results_at(t),n=e.get_edit_results_type_name_at(t),o=[],s=[],a=[],l=i.get_add_results_count(),u=i.get_update_results_count(),d=i.get_delete_results_count();for(let e=0;e<l;e++){const t=i.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<u;e++){const t=i.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=i.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}r.editResults.push({typeName:n,adds:o,updates:s,deletes:a})}return r}(r)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await Ot(n.data.url,n.data))},executeQuery:async(e,t,r)=>{const i=`${e.url}/graph/query`,n=await(0,o.A)(i,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),a=n.getHeader?.("content-type"),l=n.data;if(a?.includes("application/x-protobuf")){const t=new((await(0,Ee.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=zt({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new X({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:n.data})},executeSearch:async(e,t,r)=>{const i=t.typeCategoryFilter,n=`${e.url}/graph/search`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:i,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=a.getHeader?.("content-type"),u=a.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,Ee.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=zt({wasmQueryDecoder:t,newArrayBufferToParse:u,dataModel:e.dataModel});return new X({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:a.data})},executeSearchStreaming:async(e,t,r)=>{const i=`${e.url}/graph/search`;await Ft(e);const n=await Zt(i,r);n.data.body=await async function(e){const t=await(0,Ee.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(xe(e.idsFilter,t))}catch(e){throw new s.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new s.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const i=r.get_encoding_result();if(0!==i.error.error_code)throw new s.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return structuredClone(i.get_byte_buffer())}(t);const o=await Ot(n.data.url,n.data);if(e.dataModel){const t=await Jt(o,e.dataModel);return new te({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let i=_t.get(e.url||"");i||(i=new Map,_t.set(e.url||"",i));const n=new Map(i.entries()),o=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const a=await(0,Ee.I)(),l=function(e,t,r,i=!1){const n=new r.ClientDataFetchRequestEncoder;n.deleteLater();for(const o of e){const e=Te(o,t,r,i);n.add_client_data_fetch_request_parameter(e)}n.encode();const o=n.get_encoding_result();return ve(o.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(o.get_byte_buffer())}(t,i,a,r.ignoreCache),u=await Zt(o,r.requestOptions);u.data.body=l;const d=await Ot(u.data.url,u.data),p=d.headers.get("content-type");if(p?.includes("application/x-protobuf")){const e=new a.ClientDataFetchResponseDecoder;e.deleteLater();const t=await d.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&ve(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,i=!1){const n=new Map;for(let o=0;o<e.get_results_count();o++){const s=e.get_result_at(o);if(s.get_fetch_result_case().value!==Ge.ClientDataValue||0!==s.error().error_code){const e=s.get_key().key_string;r.has(e)&&t.delete(e);continue}const a=s.get_value(),l=s.get_key().key_string,u=r.get(l);let d;if(a.get_data_case().value===Re.NotModified&&u)d=u.value;else{if(a.get_data_case().value!==Re.ClientData)continue;{d=a.get_data().client_data_string;const e=s.get_value().get_v_tag().v_tag;i||t.set(l,{key:l,version:e,value:d})}}n.set(l,d)}return n}(e,i,n,r.ignoreCache)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:p,data:d})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,i=await(0,o.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),n=i.getHeader?.("content-type"),a=i.data;if(n?.includes("application/x-protobuf")){const e=new((await(0,Ee.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(a)),e.has_error()&&ve(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const i=t.get_key_at(e);i.get_client_data_key_type().value===Se.ClientDataKeyTypeString&&r.push(i.key_string)}return r}(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:i.data})},clearClientDataCache:()=>_t.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,i)=>async function(e,t,r,i){return r=_.from(r||{}),async function(e,t,r,i,n){const s={},a={},l=[];return function(e,t,r){for(const i in e){const n=e[i];if(n&&"object"==typeof n&&n instanceof N.A){const{features:e}=n;r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}}}(i,l,s),(0,w.el)(l).then((l=>{const{outSpatialReference:u,processExtent:d,processSpatialReference:p,returnColumnName:c,returnFeatureCollection:y,returnM:h,returnZ:f}=r,{path:m}=(0,A.Dl)(e);for(const e in s){const[t,r]=s[e];a[e]=l.slice(t,r)}const g=u?u.wkid||u:null,_=p?p.wkid||p:null,w="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:y||void 0,returnM:h||void 0,returnZ:f||void 0}:null,v=z({...d?{context:{extent:d,outSR:g,processSR:_}}:{"env:outSR":g,"env:processSR":_},...i,...w,f:"json"},null,a),T={...n,query:v};return(0,o.A)(`${m}/${t}`,T)}))}(e,"submitJob",r,t??{},i).then((({data:t})=>{const r=V.fromJSON(t);return r.sourceUrl=e,r}))}(e,t,r,i),_esriRequestWrapper:async(e,t)=>(0,o.A)(e,t)};async function Tt(e,t,r){return vt.executeApplyEdits(e,t,r)}async function bt(e,t,r){return vt.executeQuery(e,t,r)}async function Mt(e,t,r){return vt.executeQueryStreaming(e,t,r)}async function At(e,t,r){return vt.executeSearch(e,t,r)}async function St(e,t,r){return vt.executeSearchStreaming(e,t,r)}function Pt(e,t){return vt.fetchAllClientDataKeys(e,t)}function Rt(e,t,r){return vt.fetchClientDataAtKeys(e,t,r)}async function Gt(e){return vt.fetchKnowledgeGraph(e)}async function Et(e){return vt.refreshDataModel(e)}async function It(e){return vt.refreshServiceDefinition(e)}async function Nt(e,t){return vt.executeFindPathsAsynchronous(e,t)}async function Dt(e,t){return vt.executeFindPaths(e,t)}async function kt(e,t){return vt.fetchAsynchronousFindPathsResultData(e,t)}function xt(){return vt.clearClientDataCache()}async function Ot(e,t){return vt._fetchWrapper(e,t)}async function jt(e,t,r,i){return vt._submitJobWrapper(e,t,r,i)}async function Ct(e,t){return vt._esriRequestWrapper(e,t)}async function Ft(e){const t=n.id?.findCredential(e.url);t||(e.dataModel?await Kt(e):await Et(e))}function Ut(e,t,r,i){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof u.A?r.set_param_key_value(e,je(t,i)):Array.isArray(t)?r.set_param_key_value(e,xe(t,i)):r.set_param_key_value(e,Oe(t,i))}async function Zt(e,t){return(0,o.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}let qt=50;function Lt(e){qt=e}function zt({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:i,limitMaxProcessingTime:n=!1}){t&&e.push_buffer(new Uint8Array(t));const o=[];let a,l,u=0;const p=Date.now();let c=!0;for(;e.next_row();){a&&l||(a=i??ft(e),l=a.outSpatialReference??new d.A({wkid:4326})),u||(u=e.get_header_keys().size());const t=new Array(u);for(let i=0;i<u;i++){const n=e.get_value(i);t[i]=pt(n,r,l)}if(o.push(t),n&&Date.now()-p>qt){c=!1;break}}if(e.has_error())throw new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:a,resultRows:o,parsedAllResultsFromBuffer:c}}async function Jt(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),i=new((await(0,Ee.I)()).GraphQueryDecoder);let n,o,u;i.deleteLater();const d=new Promise(((e,t)=>{o=e,u=t}));let p=!1,c=null;const y=new ReadableStream({pull:async function e(d){if(!r){const e=new s.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw u(e),e}const{done:y,value:h}=c?{done:!1,value:null}:await r.read().catch((e=>{throw u(e),r.releaseLock(),e}));h&&(c=h);try{if(y){let e;if(i.has_error()?e=new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:i.error.error_code,errorMessage:i.error.error_message}):p||o(new Q),r.releaseLock(),e)throw d.error(e),u(e),e;return void d.close()}const{resultHeader:a,resultRows:l,parsedAllResultsFromBuffer:f}=zt({wasmQueryDecoder:i,newArrayBufferToParse:h,dataModel:t,decodedHeader:n,limitMaxProcessingTime:!0});return f&&(c=null),!n&&a&&(n=a,o(a),p=!0),l.length>0?void d.enqueue(l):await e(d)}catch(e){throw a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),u(e),r.releaseLock(),(0,l.zf)(e)?e:new s.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:y,resultHeader:await d}}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function Kt(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),i=r.getHeader?.("content-type"),n=r.data;if(i?.includes("application/x-protobuf")){const e=(await(0,Ee.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(n));if(!e)throw new s.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),ze=!1;const t=new fe({timestamp:e.timestamp,spatialReference:new d.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:Le.vy[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:Le.wr[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:rt(e.search_indexes),entityTypes:He(e.entity_types),relationshipTypes:et(e.relationship_types),metaEntityTypes:He(e.meta_entity_types),provenanceSourceTypeValues:tt(e.provenance_source_type_values.value_behavior_array)});return ze&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:i,data:r.data})}}}]);
@@ -1 +1 @@
1
- {"widgetLabel":"Feature table","header":"{title} (Total: {count} | Selection: {selected})","headerNoSelection":"{title} (Total: {count})","untitled":"Untitled","relatedRecords":"Related records","attachments":"Attachments","loading":"Loading...","syncing":"Syncing...","errorData":"Data error.","errorLayer":"Layer error.","errorUpdateFailed":"Update failed.","errorDomainType":"Domain type is not supported.","show":"Show","hide":"Hide","menu":"Menu","options":"Options","allColums":"All columns","sortAsc":"Sort ascending","sortDesc":"Sort descending","toggleColumns":"Show/hide columns","clearSelection":"Clear selection","centerOnSelection":"Center on selection","showSelected":"Show selection","filter":"Filter","addField":"Add field","refreshData":"Refresh data","date":"Date","number":"Number","string":"String","showAllRecords":"Show all","zoomToSelection":"Zoom to selection","deleteSelection":"Delete selection","deleteSelectionCount":"Delete selection: {count}","deleteRecordsRemoved":"These records will be permanently removed","keepRecords":"Keep records","recordsCount":"Records ({count})","noLayer":"No layer","exitRelatedRecords":"Exit related records","showAllTables":"Show all tables","selectALayer":"Select a layer","exportSelectionCSV":"Export selection to CSV","noValue":"No value","editingPreventedColumn":"Editing is prevented for cells in this column.","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."},"addAttachment":"Add attachment","attachmentsCount":"Attachments ({count})","attachmentThumbnail":"Attachment thumbnail","deleteAttachment":"Delete attachment","deleteAttachmentConfirmation":"Are you sure you want to delete the attachments?","deleteAttachmentCount":"Delete attachments ({count})","downloadAttachment":"Download attachment","dragAndDropToUpload":"Drag and drop file to upload an attachment.","editingDisabled":"Editing is disabled","editingRestricted":"Editing is restricted","errorFileName":"Upload failed. File name is too long.","errorFileSize":"Upload failed. File size too large","errorFileUnsupported":"Upload failed. File type not supported","errorOccured":"An error occurred","exitAttachments":"Exit attachments view","fileName":"File name","noAttachments":"There are no attachments","noFeature":"No feature provided","replaceFile":"Replace file","selectedCount":"Selected: {count}","selectFile":"Select file","size":"Size","updateAttachment":"Update attachment","viewAttachment":"View attachment","viewAttachments":"View attachments"}
1
+ {"widgetLabel":"Feature table","header":"{title} (Total: {count} | Selection: {selected})","headerNoSelection":"{title} (Total: {count})","untitled":"Untitled","relatedRecords":"Related records","attachments":"Attachments","loading":"Loading...","syncing":"Syncing...","errorData":"Data error.","errorLayer":"Layer error.","errorUpdateFailed":"Update failed.","errorDomainType":"Domain type is not supported.","show":"Show","hide":"Hide","menu":"Menu","options":"Options","allColums":"All columns","sortAsc":"Sort ascending","sortDesc":"Sort descending","toggleColumns":"Show/hide columns","clearSelection":"Clear selection","centerOnSelection":"Center on selection","showSelected":"Show selection","filter":"Filter","addField":"Add field","refreshData":"Refresh data","date":"Date","number":"Number","string":"String","showAllRecords":"Show all","zoomToSelection":"Zoom to selection","deleteSelection":"Delete selection","deleteSelectionCount":"Delete selection: {count}","deleteRecordsRemoved":"These records will be permanently removed","keepRecords":"Keep records","recordsCount":"Records ({count})","noLayer":"No layer","exitRelatedRecords":"Exit related records","showAllTables":"Show all tables","selectALayer":"Select a layer","exportSelectionCSV":"Export selection to CSV","noValue":"No value","editingPreventedColumn":"Editing is prevented for cells in this column.","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."},"addAttachment":"Add attachment","attachmentsCount":"Attachments ({count})","attachmentThumbnail":"Attachment thumbnail","deleteAttachment":"Delete attachment","deleteAttachmentConfirmation":"Are you sure you want to delete the attachments?","deleteAttachmentCount":"Delete attachments ({count})","downloadAttachment":"Download attachment","dragAndDropToUpload":"Drag and drop file to upload an attachment.","editingDisabled":"Editing is disabled","editingRestricted":"Editing is restricted","errorFileName":"Upload failed. File name is too long.","errorFileSize":"Upload failed. File size too large","errorFileUnsupported":"Upload failed. File type not supported","errorOccured":"An error occurred","exitAttachments":"Exit attachments view","fileName":"File name","noAttachments":"There are no attachments","noFeature":"No feature provided","replaceFile":"Replace file","selectedCount":"Selected: {count}","selectFile":"Select file","size":"Size","updateAttachment":"Update attachment","viewAttachment":"View attachment","viewAttachments":"View attachments","noDataFound":"No data found"}
@@ -1 +1 @@
1
- {"widgetLabel":"Feature table","header":"{title} (Total: {count} | Selection: {selected})","headerNoSelection":"{title} (Total: {count})","untitled":"Untitled","relatedRecords":"Related records","attachments":"Attachments","loading":"Loading...","syncing":"Syncing...","errorData":"Data error.","errorLayer":"Layer error.","errorUpdateFailed":"Update failed.","errorDomainType":"Domain type is not supported.","show":"Show","hide":"Hide","menu":"Menu","options":"Options","allColums":"All columns","sortAsc":"Sort ascending","sortDesc":"Sort descending","toggleColumns":"Show/hide columns","clearSelection":"Clear selection","centerOnSelection":"Center on selection","showSelected":"Show selection","filter":"Filter","addField":"Add field","refreshData":"Refresh data","date":"Date","number":"Number","string":"String","showAllRecords":"Show all","zoomToSelection":"Zoom to selection","deleteSelection":"Delete selection","deleteSelectionCount":"Delete selection: {count}","deleteRecordsRemoved":"These records will be permanently removed","keepRecords":"Keep records","recordsCount":"Records ({count})","noLayer":"No layer","exitRelatedRecords":"Exit related records","showAllTables":"Show all tables","selectALayer":"Select a layer","exportSelectionCSV":"Export selection to CSV","noValue":"No value","editingPreventedColumn":"Editing is prevented for cells in this column.","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."},"addAttachment":"Add attachment","attachmentsCount":"Attachments ({count})","attachmentThumbnail":"Attachment thumbnail","deleteAttachment":"Delete attachment","deleteAttachmentConfirmation":"Are you sure you want to delete the attachments?","deleteAttachmentCount":"Delete attachments ({count})","downloadAttachment":"Download attachment","dragAndDropToUpload":"Drag and drop file to upload an attachment.","editingDisabled":"Editing is disabled","editingRestricted":"Editing is restricted","errorFileName":"Upload failed. File name is too long.","errorFileSize":"Upload failed. File size too large","errorFileUnsupported":"Upload failed. File type not supported","errorOccured":"An error occurred","exitAttachments":"Exit attachments view","fileName":"File name","noAttachments":"There are no attachments","noFeature":"No feature provided","replaceFile":"Replace file","selectedCount":"Selected: {count}","selectFile":"Select file","size":"Size","updateAttachment":"Update attachment","viewAttachment":"View attachment","viewAttachments":"View attachments"}
1
+ {"widgetLabel":"Feature table","header":"{title} (Total: {count} | Selection: {selected})","headerNoSelection":"{title} (Total: {count})","untitled":"Untitled","relatedRecords":"Related records","attachments":"Attachments","loading":"Loading...","syncing":"Syncing...","errorData":"Data error.","errorLayer":"Layer error.","errorUpdateFailed":"Update failed.","errorDomainType":"Domain type is not supported.","show":"Show","hide":"Hide","menu":"Menu","options":"Options","allColums":"All columns","sortAsc":"Sort ascending","sortDesc":"Sort descending","toggleColumns":"Show/hide columns","clearSelection":"Clear selection","centerOnSelection":"Center on selection","showSelected":"Show selection","filter":"Filter","addField":"Add field","refreshData":"Refresh data","date":"Date","number":"Number","string":"String","showAllRecords":"Show all","zoomToSelection":"Zoom to selection","deleteSelection":"Delete selection","deleteSelectionCount":"Delete selection: {count}","deleteRecordsRemoved":"These records will be permanently removed","keepRecords":"Keep records","recordsCount":"Records ({count})","noLayer":"No layer","exitRelatedRecords":"Exit related records","showAllTables":"Show all tables","selectALayer":"Select a layer","exportSelectionCSV":"Export selection to CSV","noValue":"No value","editingPreventedColumn":"Editing is prevented for cells in this column.","subtypes":{"changeWarning":"The subtype {newType} may have different default values from {originalType}. Keeping the current values may cause unexpected results.","changeWarningTitle":"Subtype changed","useDefaultValuesOption":"Use default values","keepCurrentValuesOption":"Keep current values","unsupportedDomainGroupTitle":"Unsupported","fieldOutOfSubtypeDomainWarning":"This field's value is out of range for its domain."},"addAttachment":"Add attachment","attachmentsCount":"Attachments ({count})","attachmentThumbnail":"Attachment thumbnail","deleteAttachment":"Delete attachment","deleteAttachmentConfirmation":"Are you sure you want to delete the attachments?","deleteAttachmentCount":"Delete attachments ({count})","downloadAttachment":"Download attachment","dragAndDropToUpload":"Drag and drop file to upload an attachment.","editingDisabled":"Editing is disabled","editingRestricted":"Editing is restricted","errorFileName":"Upload failed. File name is too long.","errorFileSize":"Upload failed. File size too large","errorFileUnsupported":"Upload failed. File type not supported","errorOccured":"An error occurred","exitAttachments":"Exit attachments view","fileName":"File name","noAttachments":"There are no attachments","noFeature":"No feature provided","replaceFile":"Replace file","selectedCount":"Selected: {count}","selectFile":"Select file","size":"Size","updateAttachment":"Update attachment","viewAttachment":"View attachment","viewAttachments":"View attachments","noDataFound":"No data found"}
@@ -2,4 +2,8 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{BackgroundGrid as e}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js";import{BlendLayersOutput as r}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BlendLayersOutput.js";import{TileBackground as o}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{TileComposite as i}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{Float3PassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";var t;function u(u){const g=new d,c=g.fragment;if(g.include(i),u.background===t.Only){const o=u.output===r.ColorComposite;return o?c.uniforms.add(new n("backgroundColor",(e=>e.backgroundColor))):c.include(e),c.main.add(s`fragColor = vec4(${o?s`backgroundColor`:s`gridColor(uv)`}, 1.0);`),g}return g.include(o,u),c.uniforms.add(new l("tex",(e=>e.texture)),new a("opacity",(e=>e.opacity))),c.main.add(s`fragColor = blendLayers(uv, texture(tex, uv), opacity);`),g}!function(e){e[e.BelowLayer=0]="BelowLayer",e[e.Only=1]="Only",e[e.COUNT=2]="COUNT"}(t||(t={}));const g=Object.freeze(Object.defineProperty({__proto__:null,get BackgroundMode(){return t},build:u},Symbol.toStringTag,{value:"Module"}));export{g as B,t as a,u as b};
5
+ import{BackgroundGrid as e}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BackgroundGrid.glsl.js";import{BlendLayersOutput as r}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/BlendLayersOutput.js";import{TileBackground as o}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import{TileComposite as i}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{BooleanPassUniform as n}from"../views/3d/webgl-engine/core/shaderModules/BooleanPassUniform.js";import{Float3PassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";import{isCompressedWithPremultiplyAlpha as u}from"../views/webgl/textureUtils.js";var g;function m(m){const c=new d,w=c.fragment;if(c.include(i),m.background===g.Only){const o=m.output===r.ColorComposite;return o?w.uniforms.add(new l("backgroundColor",(e=>e.backgroundColor))):w.include(e),w.main.add(a`fragColor = vec4(${o?a`backgroundColor`:a`gridColor(uv)`}, 1.0);`),c}return c.include(o,m),w.uniforms.add(new t("tex",(e=>e.texture)),new s("opacity",(e=>e.opacity)),new n("premultiplyAlpha",(e=>u(e.texture)))),w.main.add(a`vec4 color = texture(tex, uv);
6
+ if(premultiplyAlpha) {
7
+ color.rgb *= color.a;
8
+ }
9
+ fragColor = blendLayers(uv, color, opacity);`),c}!function(e){e[e.BelowLayer=0]="BelowLayer",e[e.Only=1]="Only",e[e.COUNT=2]="COUNT"}(g||(g={}));const c=Object.freeze(Object.defineProperty({__proto__:null,get BackgroundMode(){return g},build:m},Symbol.toStringTag,{value:"Module"}));export{c as B,g as a,m as b};
package/interfaces.d.ts CHANGED
@@ -114354,6 +114354,12 @@ declare namespace __esri {
114354
114354
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#multiSortEnabled Read more...}
114355
114355
  */
114356
114356
  multiSortEnabled: boolean;
114357
+ /**
114358
+ * This property can be used to override the text displayed when the table is fully loaded but no rows are available.
114359
+ *
114360
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#noDataMessage Read more...}
114361
+ */
114362
+ noDataMessage: string | nullish;
114357
114363
  /**
114358
114364
  * An array of field names from the table's data source to include when the table requests data.
114359
114365
  *
@@ -114880,6 +114886,12 @@ declare namespace __esri {
114880
114886
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#multiSortEnabled Read more...}
114881
114887
  */
114882
114888
  multiSortEnabled?: boolean;
114889
+ /**
114890
+ * This property can be used to override the text displayed when the table is fully loaded but no rows are available.
114891
+ *
114892
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#noDataMessage Read more...}
114893
+ */
114894
+ noDataMessage?: string | nullish;
114883
114895
  /**
114884
114896
  * This property accepts and returns a collection of feature object IDs.
114885
114897
  *
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{id as e}from"../../kernel.js";import t from"../../request.js";function n(e){return y(e)||o(e)}function r(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}function i(e){return null!=e&&"object"==typeof e&&"type"in e&&"graphics"===e.type}function u(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-notes"===e.type&&"sublayers"in e}function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph"===e.type&&"layers"in e}function a(e){return null!=e&&"object"==typeof e&&"type"in e&&"link-chart"===e.type&&"layers"in e}function o(e){return"scene"===e?.type}function c(e){return null!=e&&"object"==typeof e&&"type"in e&&"subtype-group"===e.type&&"sublayers"in e}function l(e){return"subtype-sublayer"===e?.type}function y(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function f(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function p(e){return null!=e&&"type"in e&&"group"===e.type}const g={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function b(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function d(e){return"IntegratedMeshLayer"===e||"IntegratedMesh3DTilesLayer"===e}function m(e){return"integrated-mesh"===e||"integrated-mesh-3dtiles"===e}function h(e){return"voxel"===e?.type}function v(e){return"imagery-tile"===e?.type}function j(e){return null!=e?.parent&&"declaredClass"in e.parent&&"esri.Basemap"===e.parent.declaredClass&&e.parent.baseLayers.includes(e)}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function L(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function E(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function S(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach(((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)})),n.length>0)){let e;if(r){const t={};n.forEach((e=>{t[e[0]]=e[1]})),e=JSON.stringify(t)}else{const t=[];n.forEach((e=>{t.push(e[0]+":"+e[1])})),e=t.join(";")}return e}return null}function C(e){if(!e)return;const t=[];return e.forEach(((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))})),t.length?"{"+t.join(",")+"}":void 0}function M(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function x(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const s=`${n.slice(0,u)}/rest/info`,a=null!=r?r.signal:null,{data:o}=await t(s,{query:{f:"json"},responseType:"json",signal:a});return o?.owningSystemUrl||null}function I(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function k(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function O(e){return I(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function T(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function B(e){return!!T(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function P(e){if(!e)return[];return("subtypes"in e?e.subtypes:c(e.parent)?e.parent.subtypes:[])??[]}function q(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}export{B as getEffectiveEditingEnabled,O as getEffectiveLayerCapabilities,x as getOwningPortalUrl,P as getSubtypesFromLayer,M as getTileMaxtrixSetFromActiveLayer,j as isBaseLayer,n as isBasemap3DSupportedLayer,y as isBasemapSupportedTiledLayer,w as isFeatureCollectionLayer,r as isFeatureLayer,E as isFeatureServiceLayer,i as isGraphicsLayer,p as isGroupLayer,v as isImageryTileLayer,m as isIntegratedMeshLayer,d as isIntegratedMeshOperationalLayer,s as isKnowledgeGraphLayer,I as isLayerWithFeatureCapabilities,L as isLayerWithFeatureLayerSource,q as isLayerWithFlowRenderer,a as isLinkChartLayer,u as isMapNotesLayer,o as isSceneLayer,b as isSceneServiceLayer,c as isSubtypeGroupLayer,l as isSubtypeSublayer,k as isTable,f as isTiledLayer,h as isVoxelLayer,g as sceneServiceLayerTypeToClassName,S as serializeLayerDefinitions,C as serializeTimeOptions};
5
+ import{id as e}from"../../kernel.js";import t from"../../request.js";function n(e){return y(e)||o(e)}function r(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}function i(e){return null!=e&&"object"==typeof e&&"type"in e&&"graphics"===e.type}function u(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-notes"===e.type&&"sublayers"in e}function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph"===e.type&&"layers"in e}function a(e){return null!=e&&"object"==typeof e&&"type"in e&&"link-chart"===e.type&&"layers"in e}function o(e){return"scene"===e?.type}function c(e){return null!=e&&"object"==typeof e&&"type"in e&&"subtype-group"===e.type&&"sublayers"in e}function l(e){return"subtype-sublayer"===e?.type}function y(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function f(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function p(e){return null!=e&&"type"in e&&"group"===e.type}const g={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function b(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function d(e){return"IntegratedMeshLayer"===e||"IntegratedMesh3DTilesLayer"===e}function m(e){return"integrated-mesh"===e||"integrated-mesh-3dtiles"===e}function h(e){return"voxel"===e?.type}function v(e){return"imagery-tile"===e?.type}function j(e,t){return null!=e?.parent&&"declaredClass"in e.parent&&"esri.Basemap"===e.parent.declaredClass&&e.parent[t].includes(e)}function w(e){return j(e,"baseLayers")}function L(e){return j(e,"referenceLayers")}function E(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function S(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function C(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function M(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach(((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)})),n.length>0)){let e;if(r){const t={};n.forEach((e=>{t[e[0]]=e[1]})),e=JSON.stringify(t)}else{const t=[];n.forEach((e=>{t.push(e[0]+":"+e[1])})),e=t.join(";")}return e}return null}function x(e){if(!e)return;const t=[];return e.forEach(((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))})),t.length?"{"+t.join(",")+"}":void 0}function I(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function k(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const s=`${n.slice(0,u)}/rest/info`,a=null!=r?r.signal:null,{data:o}=await t(s,{query:{f:"json"},responseType:"json",signal:a});return o?.owningSystemUrl||null}function O(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function T(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function B(e){return O(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function P(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function q(e){return!!P(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function D(e){if(!e)return[];return("subtypes"in e?e.subtypes:c(e.parent)?e.parent.subtypes:[])??[]}function J(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}export{q as getEffectiveEditingEnabled,B as getEffectiveLayerCapabilities,k as getOwningPortalUrl,D as getSubtypesFromLayer,I as getTileMaxtrixSetFromActiveLayer,w as isBaseLayer,n as isBasemap3DSupportedLayer,y as isBasemapSupportedTiledLayer,E as isFeatureCollectionLayer,r as isFeatureLayer,C as isFeatureServiceLayer,i as isGraphicsLayer,p as isGroupLayer,v as isImageryTileLayer,m as isIntegratedMeshLayer,d as isIntegratedMeshOperationalLayer,s as isKnowledgeGraphLayer,O as isLayerWithFeatureCapabilities,S as isLayerWithFeatureLayerSource,J as isLayerWithFlowRenderer,a as isLinkChartLayer,u as isMapNotesLayer,L as isReferenceLayer,o as isSceneLayer,b as isSceneServiceLayer,c as isSubtypeGroupLayer,l as isSubtypeSublayer,T as isTable,f as isTiledLayer,h as isVoxelLayer,g as sceneServiceLayerTypeToClassName,M as serializeLayerDefinitions,x as serializeTimeOptions};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.33.0-next.20250321",
3
+ "version": "4.33.0-next.20250323",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import t from"../../../geometry/Geometry.js";import o from"../Entity.js";import i from"../Relationship.js";import{geometryToWasm as n}from"./queryToWasmEncodedFactories.js";function r(t,n){if(!t.typeName)throw new e("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(t instanceof o){const e=new n.EntityValue;e.deleteLater(),e.type_name=t.typeName;for(const[o,i]of Object.entries(t.properties))e.set_key_value(o,a(i,n));return t.id&&e.set_id(t.id),e}if(t instanceof i){const e=new n.RelationshipValue;e.deleteLater(),e.type_name=t.typeName;for(const[o,i]of Object.entries(t.properties))e.set_key_value(o,a(i,n));return t.id&&e.set_id(t.id),t.originId&&t.destinationId&&e.set_related_entity_ids(t.originId,t.destinationId),e}throw new e("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function s(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}function a(e,o){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof t?n(e,o):null}export{s as inputQuantizationParametersToWasmFormat,r as namedObjectToWasm};
5
+ import e from"../../../core/Error.js";import t from"../../../geometry/Geometry.js";import{geometryToWasm as i}from"./queryToWasmEncodedFactories.js";function n(t,i){if(!t.typeName)throw new e("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in t)){const e=new i.EntityValue;e.deleteLater(),e.type_name=t.typeName;for(const[n,o]of Object.entries(t.properties))e.set_key_value(n,r(o,i));return t.id&&e.set_id(t.id),e}if("originId"in t&&"destinationId"in t){const e=new i.RelationshipValue;e.deleteLater(),e.type_name=t.typeName;for(const[n,o]of Object.entries(t.properties))e.set_key_value(n,r(o,i));return t.id&&e.set_id(t.id),t.originId&&t.destinationId&&e.set_related_entity_ids(t.originId,t.destinationId),e}throw new e("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function o(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}function r(e,n){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof t?i(e,n):null}export{o as inputQuantizationParametersToWasmFormat,n as namedObjectToWasm};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- const d="20250321",a="c5aa68b1e291f690906b6d33498ad8f1f9dd9dc3";export{d as buildDate,a as commitHash};
5
+ const a="20250323",e="aefdb1e0a7ca6a8797c71febf06d79f1ce7a8214";export{a as buildDate,e as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import r from"../../../core/Evented.js";import{when as o}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{afterDispatch as s}from"../../../core/accessorSupport/watch.js";import{fromValues as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as l}from"../../../geometry/ellipsoidUtils.js";import p from"../../ViewAnimation.js";import{ViewingMode as c,viewingModeFromString as m}from"../../ViewingMode.js";import{Constraints as h}from"./Constraints.js";import{AnimationController as d}from"./controllers/AnimationController.js";import{State as u}from"./controllers/CameraController.js";import g from"../webgl/RenderCamera.js";import{PaddingSide as y}from"../webgl-engine/lib/rendererUtils.js";import{maximumHighlights as C}from"../../support/HighlightDefaults.js";import{PropertiesPool as f}from"../../support/PropertiesPool.js";import{RenderState as w}from"../../support/RenderState.js";let _=class extends t{constructor(e){super(e),this._propertiesPool=new f({camera:g},this),this._lastSeenCameraProjectionValues=new g,this.mode=w.ANIMATING,this._cssCamera=new g,this._camera=new g,this.rasterPixelRatio=1,this.contentPixelRatio=1,this.constraints=new h({state:this}),this.events=new r,this._cameraChanged=!1,this._updateQueue=new Array,this._processingUpdates=!1}reset(){this.cameraController=null,this._propertiesPool.destroy(),this._propertiesPool=new f({camera:g},this)}destroy(){this.cameraController=null,this._propertiesPool?.destroy(),this._propertiesPool=null}createInitialCamera(){if(this.viewingMode===c.Global){const e=l(this.spatialReference).radius;this.camera=new g({eye:n(4*e,0,0),center:n(e,0,0),up:n(0,0,1)})}else this.camera=new g({eye:n(0,0,100),center:n(0,0,0),up:n(0,1,0)})}get animation(){return this.cameraController instanceof d&&null!=this.cameraController.viewAnimation?this.cameraController.viewAnimation:null}get cssCamera(){const e=this._cssCamera.copyFrom(this.camera),{height:t,width:r,pixelRatio:o}=this.camera;return e.pixelRatio=1,e.height=Math.round(t/o),e.width=Math.round(r/o),e}get camera(){return this._camera}set camera(e){e!==O&&O.copyFrom(e),O.computeUp(this.viewingMode),this.events.emit("before-camera-change",O);const t=this._camera;if(j(this._lastSeenCameraProjectionValues,O)&&(this._lastSeenCameraProjectionValues.copyFrom(O),this.events.emit("camera-projection-changed",this._lastSeenCameraProjectionValues)),!t.equals(O)&&(this._camera=this._propertiesPool.get("camera").copyFrom(O),this._cameraChanged=!t.almostEquals(O),this._cameraChanged)){const e=s((()=>{this._cameraChanged=!1,e.remove()}))}}get pixelRatio(){return this.camera.pixelRatio}get alignPixelEnabled(){return this.pixelRatio===this.rasterPixelRatio&&this.mode===w.IDLE}get updating(){return this.mode!==w.IDLE}get contentCamera(){return this._contentCamera??this.camera}set contentCamera(e){this._contentCamera=null!=e?e.clone():null}get fixedContentCamera(){return null!=this._contentCamera}get isGlobal(){return this.viewingMode===c.Global}get isLocal(){return this.viewingMode===c.Local}get viewingMode(){return m(this.view.viewingMode)}get spatialReference(){return this.view.spatialReference}get highlights(){const e=this.view.highlights.items.slice(0,C);for(let t=0;t<e.length;){const r=e[t],o=e.findIndex((e=>e.name===r.name));o>=0&&t>o?e.splice(t,1):++t}return e}get highlightOrderMap(){const e=new Map;return this.highlights.forEach(((t,r)=>e.set(t.name,r))),e}get navigating(){return!!this.cameraController?.isInteractive}get stationary(){return!this._cameraChanged&&!this.navigating}get cameraController(){return this._get("cameraController")}set cameraController(e){this.stopActiveCameraController()?(this.cameraController?.destroy(),e&&(this.removeHandles(P),this.addHandles(o((()=>e.state===u.Finished||e.state===u.Stopped),(()=>{this._set("cameraController",null),this.updateCamera((t=>e.onControllerEnd(t)))}),{sync:!0,once:!0}),P),e.onControllerStart(this.camera)),this._set("cameraController",e)):e&&(e.state=u.Rejected)}switchCameraController(e){this.cameraController=e}stopActiveCameraController(){return!this.cameraController||this.cameraController.stopController()}updateCamera(e){this._updateQueue.push(e),this._processUpdateQueue()}_processUpdateQueue(){if(0===this._updateQueue.length||this._processingUpdates)return;this._processingUpdates=!0;const e=this._updateQueue.shift();O.copyFrom(this._get("camera")),e(O),this.camera=O,this._processingUpdates=!1,this._processUpdateQueue()}};e([a({constructOnly:!0})],_.prototype,"view",void 0),e([a()],_.prototype,"mode",void 0),e([a({readOnly:!0,type:p})],_.prototype,"animation",null),e([a({type:g})],_.prototype,"cssCamera",null),e([a()],_.prototype,"_cssCamera",void 0),e([a({type:g})],_.prototype,"camera",null),e([a()],_.prototype,"_camera",void 0),e([a({readOnly:!0})],_.prototype,"pixelRatio",null),e([a()],_.prototype,"rasterPixelRatio",void 0),e([a()],_.prototype,"contentPixelRatio",void 0),e([a({readOnly:!0})],_.prototype,"alignPixelEnabled",null),e([a({readOnly:!0})],_.prototype,"updating",null),e([a({})],_.prototype,"_contentCamera",void 0),e([a({type:g})],_.prototype,"contentCamera",null),e([a({readOnly:!0})],_.prototype,"fixedContentCamera",null),e([a({readOnly:!0})],_.prototype,"events",void 0),e([a({readOnly:!0})],_.prototype,"isGlobal",null),e([a({readOnly:!0})],_.prototype,"isLocal",null),e([a({readOnly:!0})],_.prototype,"viewingMode",null),e([a({readOnly:!0})],_.prototype,"highlights",null),e([a({readOnly:!0})],_.prototype,"highlightOrderMap",null),e([a({readOnly:!0})],_.prototype,"navigating",null),e([a({readOnly:!0})],_.prototype,"stationary",null),e([a()],_.prototype,"_cameraChanged",void 0),e([a()],_.prototype,"cameraController",null),_=e([i("esri.views.3d.state.ViewState")],_);const v=_;function j(e,t){return e.fov!==t.fov||(e.fullViewport[0]!==t.fullViewport[0]||e.fullViewport[1]!==t.fullViewport[1]||e.fullViewport[2]!==t.fullViewport[2]||e.fullViewport[3]!==t.fullViewport[3]||(e.padding[y.TOP]!==t.padding[y.TOP]||e.padding[y.RIGHT]!==t.padding[y.RIGHT]||e.padding[y.BOTTOM]!==t.padding[y.BOTTOM]||e.padding[y.LEFT]!==t.padding[y.LEFT]))}const O=new g,P="ViewStateHandles";export{v as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import r from"../../../core/Evented.js";import{when as o}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{afterDispatch as s}from"../../../core/accessorSupport/watch.js";import{fromValues as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as l}from"../../../geometry/ellipsoidUtils.js";import p from"../../ViewAnimation.js";import{ViewingMode as c,viewingModeFromString as m}from"../../ViewingMode.js";import{Constraints as h}from"./Constraints.js";import{AnimationController as d}from"./controllers/AnimationController.js";import{State as u}from"./controllers/CameraController.js";import g from"../webgl/RenderCamera.js";import{PaddingSide as C}from"../webgl-engine/lib/rendererUtils.js";import{maximumHighlights as y}from"../../support/HighlightDefaults.js";import{PropertiesPool as f}from"../../support/PropertiesPool.js";import{RenderState as w}from"../../support/RenderState.js";let _=class extends t{constructor(e){super(e),this._propertiesPool=new f({camera:g},this),this._lastSeenCameraProjectionValues=new g,this.mode=w.ANIMATING,this._cssCamera=new g,this._camera=new g,this.rasterPixelRatio=1,this.contentPixelRatio=1,this.constraints=new h({state:this}),this.events=new r,this._cameraChanged=!1,this._updateQueue=new Array,this._processingUpdates=!1}reset(){this.cameraController=null,this._propertiesPool.destroy(),this._propertiesPool=new f({camera:g},this)}destroy(){this.cameraController=null,this._propertiesPool?.destroy(),this._propertiesPool=null}createInitialCamera(){if(this.viewingMode===c.Global){const e=l(this.spatialReference).radius;this.camera=new g({eye:n(4*e,0,0),center:n(e,0,0),up:n(0,0,1)})}else this.camera=new g({eye:n(0,0,100),center:n(0,0,0),up:n(0,1,0)})}get animation(){return this.cameraController instanceof d&&null!=this.cameraController.viewAnimation?this.cameraController.viewAnimation:null}get cssCamera(){const e=this._cssCamera.copyFrom(this.camera),{height:t,width:r,pixelRatio:o}=this.camera;return e.pixelRatio=1,e.height=Math.round(t/o),e.width=Math.round(r/o),e}get camera(){return this._camera}set camera(e){e!==O&&O.copyFrom(e),O.computeUp(this.viewingMode),this.events.emit("before-camera-change",O);const t=this._camera;if(j(this._lastSeenCameraProjectionValues,O)&&(this._lastSeenCameraProjectionValues.copyFrom(O),this.events.emit("camera-projection-changed",this._lastSeenCameraProjectionValues)),!t.equals(O)&&(this._camera=this._propertiesPool.get("camera").copyFrom(O),this._cameraChanged=!t.almostEquals(O),this._cameraChanged)){const e=s((()=>{this._cameraChanged=!1,e.remove()}))}}get pixelRatio(){return this.camera.pixelRatio}get alignPixelEnabled(){return this.pixelRatio===this.rasterPixelRatio&&this.mode===w.IDLE}get updating(){return this.mode!==w.IDLE}get contentCamera(){return this._contentCamera??this.camera}set contentCamera(e){if(null==e)return void(this._contentCamera=null);const t=e.clone();this.view.state.events.emit("before-camera-change",t),this._contentCamera=t}get fixedContentCamera(){return null!=this._contentCamera}get isGlobal(){return this.viewingMode===c.Global}get isLocal(){return this.viewingMode===c.Local}get viewingMode(){return m(this.view.viewingMode)}get spatialReference(){return this.view.spatialReference}get highlights(){const e=this.view.highlights.items.slice(0,y);for(let t=0;t<e.length;){const r=e[t],o=e.findIndex((e=>e.name===r.name));o>=0&&t>o?e.splice(t,1):++t}return e}get highlightOrderMap(){const e=new Map;return this.highlights.forEach(((t,r)=>e.set(t.name,r))),e}get navigating(){return!!this.cameraController?.isInteractive}get stationary(){return!this._cameraChanged&&!this.navigating}get cameraController(){return this._get("cameraController")}set cameraController(e){this.stopActiveCameraController()?(this.cameraController?.destroy(),e&&(this.removeHandles(P),this.addHandles(o((()=>e.state===u.Finished||e.state===u.Stopped),(()=>{this._set("cameraController",null),this.updateCamera((t=>e.onControllerEnd(t)))}),{sync:!0,once:!0}),P),e.onControllerStart(this.camera)),this._set("cameraController",e)):e&&(e.state=u.Rejected)}switchCameraController(e){this.cameraController=e}stopActiveCameraController(){return!this.cameraController||this.cameraController.stopController()}updateCamera(e){this._updateQueue.push(e),this._processUpdateQueue()}_processUpdateQueue(){if(0===this._updateQueue.length||this._processingUpdates)return;this._processingUpdates=!0;const e=this._updateQueue.shift();O.copyFrom(this._get("camera")),e(O),this.camera=O,this._processingUpdates=!1,this._processUpdateQueue()}};e([a({constructOnly:!0})],_.prototype,"view",void 0),e([a()],_.prototype,"mode",void 0),e([a({readOnly:!0,type:p})],_.prototype,"animation",null),e([a({type:g})],_.prototype,"cssCamera",null),e([a()],_.prototype,"_cssCamera",void 0),e([a({type:g})],_.prototype,"camera",null),e([a()],_.prototype,"_camera",void 0),e([a({readOnly:!0})],_.prototype,"pixelRatio",null),e([a()],_.prototype,"rasterPixelRatio",void 0),e([a()],_.prototype,"contentPixelRatio",void 0),e([a({readOnly:!0})],_.prototype,"alignPixelEnabled",null),e([a({readOnly:!0})],_.prototype,"updating",null),e([a({})],_.prototype,"_contentCamera",void 0),e([a({type:g})],_.prototype,"contentCamera",null),e([a({readOnly:!0})],_.prototype,"fixedContentCamera",null),e([a({readOnly:!0})],_.prototype,"events",void 0),e([a({readOnly:!0})],_.prototype,"isGlobal",null),e([a({readOnly:!0})],_.prototype,"isLocal",null),e([a({readOnly:!0})],_.prototype,"viewingMode",null),e([a({readOnly:!0})],_.prototype,"highlights",null),e([a({readOnly:!0})],_.prototype,"highlightOrderMap",null),e([a({readOnly:!0})],_.prototype,"navigating",null),e([a({readOnly:!0})],_.prototype,"stationary",null),e([a()],_.prototype,"_cameraChanged",void 0),e([a()],_.prototype,"cameraController",null),_=e([i("esri.views.3d.state.ViewState")],_);const v=_;function j(e,t){return e.fov!==t.fov||(e.fullViewport[0]!==t.fullViewport[0]||e.fullViewport[1]!==t.fullViewport[1]||e.fullViewport[2]!==t.fullViewport[2]||e.fullViewport[3]!==t.fullViewport[3]||(e.padding[C.TOP]!==t.padding[C.TOP]||e.padding[C.RIGHT]!==t.padding[C.RIGHT]||e.padding[C.BOTTOM]!==t.padding[C.BOTTOM]||e.padding[C.LEFT]!==t.padding[C.LEFT]))}const O=new g,P="ViewStateHandles";export{v as default};