// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built require({cache:{"esri/networks/UtilityNetwork":function(){define("require ../chunks/tslib.es6 ../Graphic ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../layers/FeatureLayer ../layers/support/featureQueryAll ./Network ./RulesTable ./support/NamedTraceConfiguration ./support/NetworkSystemLayers ./support/TerminalConfiguration ./support/TraceJobInfo ./support/typeUtils ../rest/support/Query".split(" "),function(b, a,c,d,h,v,q,l,g,m,r,k,D,n,B,x,u,z){async function E(f){const w=new z({where:"1\x3d1",outFields:["*"]});return(await m.queryAllJSON(f,w)).features}const I=f=>Object.freeze(Object.defineProperty({__proto__:null,default:f},Symbol.toStringTag,{value:"Module"}));h=class extends r{constructor(f){super(f);this.sharedNamedTraceConfigurations=[];this.type="utility"}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new n({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId, rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId, associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map(f=>B.fromJSON(f))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map(f=>f.domainNetworkName)||[]}get _utilityLayerList(){const f=new Set;this.dataElement?.domainNetworks?.map(w=>{w.edgeSources.map(C=>{f.add(C.layerId)});w.junctionSources.map(C=>{f.add(C.layerId)})});return f}async load(f){this.addResolvingPromise(super.load(f)); this.addResolvingPromise(this._loadNamedTraceConfigurationsFromNetwork(f));return this}getTerminalConfiguration(f){let w=null,C=null;var A=f.layer;let y=null;if("feature"===A?.type){if(y=A.layerId,null===y)return null}else if("subtype-sublayer"===A?.type){if(y=A?.parent?.layerId??null,null===y)return null}else return null;A=f.attributes;if(null==A)return null;for(const G of Object.keys(A))"ASSETGROUP"===G.toUpperCase()&&(w=f.getAttribute(G)),"ASSETTYPE"===G.toUpperCase()&&(C=f.getAttribute(G));if(!this.dataElement)return null; let p=null;f=this.dataElement.domainNetworks;for(var H of f)if(f=H.junctionSources?.find(G=>G.layerId===y))if(f=f.assetGroups?.find(G=>G.assetGroupCode===w))if(f=f.assetTypes?.find(G=>G.assetTypeCode===C)){p=f.terminalConfigurationId;break}return null!=p?(H=this.dataElement.terminalConfigurations?.find(G=>G.terminalConfigurationId===p))?B.fromJSON(H):null:null}getTierNames(f){return this.dataElement?.domainNetworks.find(w=>w.domainNetworkName===f)?.tiers.map(w=>w.name)||[]}async getRulesTable(){this._sharedRulesTable|| (this._sharedRulesTable=this._createRulesTable());return await this._sharedRulesTable}isUtilityLayer(f){return this._utilityLayerList.has(f.layerId)&&(f.url?.startsWith(this.featureServiceUrl)??!1)}async queryAssociations(f){const [{queryAssociations:w},{default:C}]=await Promise.all([new Promise((A,y)=>b(["../rest/networks/queryAssociations"],A,y)),new Promise((A,y)=>b(["../rest/networks/support/QueryAssociationsParameters"],p=>A(I(p)),y))]);f=C.from(f);f.gdbVersion=this.gdbVersion;f.moment=this.historicMoment; return(await w(this.networkServiceUrl,f)).associations}async synthesizeAssociationGeometries(f){const [{synthesizeAssociationGeometries:w},{default:C}]=await Promise.all([new Promise((A,y)=>b(["../rest/networks/synthesizeAssociationGeometries"],A,y)),new Promise((A,y)=>b(["../rest/networks/support/SynthesizeAssociationGeometriesParameters"],p=>A(I(p)),y))]);f=C.from(f);f.gdbVersion=this.gdbVersion;f.moment=this.historicMoment;return w(this.networkServiceUrl,f)}async trace(f){const [{trace:w},{default:C}]= await Promise.all([new Promise((A,y)=>b(["../rest/networks/trace"],A,y)),new Promise((A,y)=>b(["../rest/networks/support/TraceParameters"],p=>A(I(p)),y))]);f=C.from(f);f.gdbVersion=this.gdbVersion;f.moment=this.historicMoment;return w(this.networkServiceUrl,f)}async submitTraceJob(f){const [{submitTraceJob:w},{default:C}]=await Promise.all([new Promise((A,y)=>b(["../rest/networks/trace"],A,y)),new Promise((A,y)=>b(["../rest/networks/support/TraceParameters"],p=>A(I(p)),y))]);f=C.from(f);f.gdbVersion= this.gdbVersion;f.moment=this.historicMoment;f=await w(this.networkServiceUrl,f);return new x({statusUrl:f})}async canAddAssociation(f){const w=await this.getRulesTable();if(!w)return!1;await w.load();const C=(y,p)=>y?1===y.terminalId?p?.terminalId?p?.terminalId===y.terminalId:!0:y.terminalId===p?.terminalId:!p?.terminalId,A=(y,p)=>y.fromNetworkSource?.sourceId===p.fromNetworkElement?.networkSourceId&&y.toNetworkSource?.sourceId===p.toNetworkElement?.networkSourceId&&y.fromAssetGroup?.assetGroupCode=== p.fromNetworkElement?.assetGroupCode&&y.fromAssetType?.assetTypeCode===p.fromNetworkElement?.assetTypeCode&&y.toAssetGroup?.assetGroupCode===p.toNetworkElement?.assetGroupCode&&y.toAssetType?.assetTypeCode===p.toNetworkElement?.assetTypeCode&&C(y.fromTerminal,p.fromNetworkElement)&&C(y.toTerminal,p.toNetworkElement);return"containment"===f.associationType?w.rulesCategorized.containment.some(y=>A(y,f)):"attachment"===f.associationType?w.rulesCategorized.attachment.some(y=>A(y,f)):w.rulesCategorized.connectivity.some(y=> y.viaNetworkSource?y.fromNetworkSource?.sourceId===f.fromNetworkElement?.networkSourceId&&y.viaNetworkSource?.sourceId===f.toNetworkElement?.networkSourceId&&y.fromAssetGroup?.assetGroupCode===f.fromNetworkElement?.assetGroupCode&&y.fromAssetType?.assetTypeCode===f.fromNetworkElement?.assetTypeCode&&y.viaAssetGroup?.assetGroupCode===f.toNetworkElement?.assetGroupCode&&y.viaAssetType?.assetTypeCode===f.toNetworkElement?.assetTypeCode&&C(y.fromTerminal,f.fromNetworkElement)&&C(y.viaTerminal,f.toNetworkElement)|| y.viaNetworkSource?.sourceId===f.fromNetworkElement?.networkSourceId&&y.toNetworkSource?.sourceId===f.toNetworkElement?.networkSourceId&&y.viaAssetGroup?.assetGroupCode===f.fromNetworkElement?.assetGroupCode&&y.viaAssetType?.assetTypeCode===f.fromNetworkElement?.assetTypeCode&&y.toAssetGroup?.assetGroupCode===f.toNetworkElement?.assetGroupCode&&y.toAssetType?.assetTypeCode===f.toNetworkElement?.assetTypeCode&&C(y.viaTerminal,f.fromNetworkElement)&&C(y.toTerminal,f.toNetworkElement):A(y,f))}generateAddAssociations(f){return{addFeatures:f.map(w=> new c({attributes:{fromnetworksourceid:w.fromNetworkElement?.networkSourceId,fromglobalid:w.fromNetworkElement?.globalId,fromterminalid:w.fromNetworkElement?.terminalId,tonetworksourceid:w.toNetworkElement?.networkSourceId,toglobalid:w.toNetworkElement?.globalId,toterminalid:w.toNetworkElement?.terminalId,associationtype:u.AssociationTypeEnum[w.associationType],iscontentvisible:w.isContentVisible?1:0,percentalong:w.percentAlong,globalid:w.globalId}})),id:this.networkSystemLayers.associationsTableId, identifierFields:{globalIdField:"globalid",objectIdField:"objectid"}}}generateDeleteAssociations(f){return{deleteFeatures:f.map(w=>({globalId:w.globalId})),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:"globalid",objectIdField:"objectid"}}}async _loadNamedTraceConfigurationsFromNetwork(f){if(0!==this.sharedNamedTraceConfigurations?.length){var w=this.sharedNamedTraceConfigurations.map(C=>C.globalId);f=await this.queryNamedTraceConfigurations({globalIds:w},f);for(const C of this.sharedNamedTraceConfigurations)if(w= f?.find(A=>A.globalId===C.globalId))w=w.write({},{origin:"service"}),C.read(w,{origin:"service"})}}async _createRulesTable(){const f=new g({url:this.networkSystemLayers.rulesTableUrl});await f.load();var w=this.dataElement?.domainNetworks;if(!w)return null;const C=w.flatMap(A=>[...(A.edgeSources||[]),...(A.junctionSources||[])]);w=(await E(f)).map(A=>this._hydrateRuleInfo(f,C,A));return new k({layer:f,rules:w})}_hydrateRuleInfo(f,w,C){var A=f.fieldsIndex;f=A.get("RULETYPE");var y=A.get("CREATIONDATE"), p=A.get("FROMNETWORKSOURCEID"),H=A.get("FROMASSETGROUP"),G=A.get("FROMASSETTYPE"),L=A.get("FROMTERMINALID"),M=A.get("TONETWORKSOURCEID"),J=A.get("TOASSETGROUP");const N=A.get("TOASSETTYPE"),O=A.get("TOTERMINALID"),Q=A.get("VIANETWORKSOURCEID"),W=A.get("VIAASSETGROUP"),X=A.get("VIAASSETTYPE");A=A.get("VIATERMINALID");f=C.attributes[f.name];y=new Date(C.attributes[y.name]);C=[{networkSourceId:C.attributes[p.name],assetGroupId:C.attributes[H.name],assetTypeId:C.attributes[G.name],terminalId:C.attributes[L.name]}, {networkSourceId:C.attributes[M.name],assetGroupId:C.attributes[J.name],assetTypeId:C.attributes[N.name],terminalId:C.attributes[O.name]},{networkSourceId:C.attributes[Q.name],assetGroupId:C.attributes[W.name],assetTypeId:C.attributes[X.name],terminalId:C.attributes[A.name]}];let S;(function(P){P[P.from=0]="from";P[P.to=1]="to";P[P.via=2]="via"})(S||={});p={ruleType:f,creationDate:y};for(const P of[S.from,S.to,S.via]){if(f!==u.RuleType.RTEdgeJunctionEdgeConnectivity&&P===S.via)continue;const R=C[P]; H=w.find(T=>T.sourceId===R.networkSourceId);G=H?.assetGroups.find(T=>T.assetGroupCode===R.assetGroupId);L=G?.assetTypes.find(T=>T.assetTypeCode===R.assetTypeId);M=this._getTerminal(L,R);J="";switch(P){case S.from:J="from";break;case S.to:J="to";break;case S.via:J="via"}p[`${J}NetworkSource`]=H;p[`${J}AssetGroup`]=G;p[`${J}AssetType`]=L;p[`${J}Terminal`]=M?.toJSON()}return p}_getTerminal(f,w){const C=f?.terminalConfigurationId;return this.terminalConfigurations?.find(A=>A.id===C)?.terminals?.find(A=> A.id===w.terminalId)??null}};a.__decorate([d.property({type:[D],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],h.prototype,"sharedNamedTraceConfigurations",void 0);a.__decorate([d.property({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],h.prototype,"type",void 0);a.__decorate([d.property({readOnly:!0})],h.prototype,"serviceTerritoryFeatureLayerId",null);a.__decorate([d.property({readOnly:!0})], h.prototype,"networkSystemLayers",null);a.__decorate([d.property({readOnly:!0})],h.prototype,"terminalConfigurations",null);a.__decorate([d.property({readOnly:!0})],h.prototype,"domainNetworkNames",null);return h=a.__decorate([l.subclass("esri.networks.UtilityNetwork")],h)})},"esri/networks/Network":function(){define("require ../chunks/tslib.es6 ../geometry ../Graphic ../request ../core/Error ../core/Loadable ../core/Logger ../core/MultiOriginJSONSupport ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators/property ../core/has ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../geometry/Extent ../geometry/support/jsonUtils ../layers/mixins/EditBusLayer ../layers/support/arcgisLayerUrl ./support/TopologyValidationJobInfo ./support/utils ../versionManagement/support/versionManagementUtils ../geometry/SpatialReference".split(" "), function(b,a,c,d,h,v,q,l,g,m,r,k,D,n,B,x,u,z,E,I,f,w,C){function A(p,H){return new d({attributes:p.attributes,geometry:u.fromJSON({...p.geometry,spatialReference:H})})}const y=p=>Object.freeze(Object.defineProperty({__proto__:null,default:p},Symbol.toStringTag,{value:"Module"}));c=class extends g.MultiOriginJSONMixin(q){static fromPortalItem(p){return f.networkFromPortalItem(p)}constructor(p){super(p);this.historicMoment=this.gdbVersion=this.sourceJSON=this.type=this.spatialReference=this.fullExtent= this.dataElement=this.layerUrl=this.title=this.id=null;this._applyEditsHandler=H=>{const {serviceUrl:G,gdbVersion:L,result:M}=H;H=G===this.featureServiceUrl;const J=z.versionMatches(G,L,this.gdbVersion);H&&J&&M.then(N=>{w.isVersionInEditSession(G,L)&&(this.historicMoment=N.historicMoment)})};this._updateMomentHandler=H=>{const {serviceUrl:G,gdbVersion:L,moment:M}=H;H=G===this.featureServiceUrl;const J=z.versionMatches(G,L,this.gdbVersion);H&&J&&(this.historicMoment=M)};this.when().then(()=>{this.addHandles([z.onApplyEditsEvent(this._applyEditsHandler), z.onUpdateMomentEvent(this._updateMomentHandler)])},()=>{})}initialize(){this.when().catch(p=>{m.isAbortError(p)||l.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:p})})}get datasetName(){return this.dataElement?.name??null}get owner(){return this.dataElement?.userIdentity??null}get schemaGeneration(){return this.dataElement?.schemaGeneration??null}get parsedUrl(){return r.urlToObject(this.layerUrl)}get featureServiceUrl(){return E.parse(this.parsedUrl.path).url.path}get networkServiceUrl(){return this.featureServiceUrl.replace(/\/FeatureServer/i, "/UtilityNetworkServer")}get layerId(){return E.parse(this.parsedUrl.path).sublayer}get networkSystemLayers(){return null}async load(p){this.addResolvingPromise(this._fetchDataElement(this.featureServiceUrl,this.layerId.toString(),p));this.addResolvingPromise(this._fetchLayerMetaData(this.layerUrl,p));return this}getLayerIdBySourceId(p){if(this.dataElement){const H=this.dataElement.domainNetworks;for(const G of H){for(const L of G.edgeSources??[])if(L.sourceId===p)return L.layerId;for(const L of G.junctionSources?? [])if(L.sourceId===p)return L.layerId}}return null}async queryNamedTraceConfigurations(p,H){const [{queryNamedTraceConfigurations:G},{default:L}]=await Promise.all([new Promise((J,N)=>b(["../rest/networks/queryNamedTraceConfigurations"],J,N)),new Promise((J,N)=>b(["../rest/networks/support/QueryNamedTraceConfigurationsParameters"],O=>J(y(O)),N))]),M=this.networkServiceUrl;p=L.from(p);return(await G(M,p,{...H}))?.namedTraceConfigurations}async validateTopology(p,H){if(!p.validateArea)throw new v("network:undefined-validateArea", "the network must have validateArea defined in the validate network topology parameters.");const [{validateNetworkTopology:G},{default:L}]=await Promise.all([new Promise((N,O)=>b(["../rest/networks/validateNetworkTopology"],N,O)),new Promise((N,O)=>b(["../rest/networks/support/ValidateNetworkTopologyParameters"],Q=>N(y(Q)),O))]);var M=L.from(p);w.isVersionInEditSession(this.featureServiceUrl,this.gdbVersion||null)?(M.sessionID=w.currentSessionId,await w.isSafeToEditVersion(this.featureServiceUrl, this.gdbVersion,!0)):M.sessionID=null;M.gdbVersion=this.gdbVersion;var J=this.networkServiceUrl;p=z.emitApplyEditsEvent(this.featureServiceUrl,null,this.gdbVersion,!0);H=await G(J,M,{...H});if(H?.serviceEdits){M=[];for(const N of H.serviceEdits){({editedFeatures:J}=N);const O=J?.spatialReference?new C(J.spatialReference):null;M.push({layerId:N.layerId,editedFeatures:{adds:J?.adds?.map(Q=>A(Q,O))||[],updates:J?.updates?.map(Q=>({original:A(Q[0],O),current:A(Q[1],O)}))||[],deletes:J?.deletes?.map(Q=> A(Q,O))||[],spatialReference:O}})}p.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],editedFeatures:M,exceededTransferLimit:!1,historicMoment:H.moment})}return H}async submitTopologyValidationJob(p,H){var G=null;if(!p.validateArea)throw new v("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");this.gdbVersion||(G=this.layerUrl.replace(/\/FeatureServer/i, "/VersionManagementServer").replace(/\/\d*$/,""),G=(await h(G,{responseType:"json",query:{f:"json"}})).data.defaultVersionName);const [{submitValidateNetworkTopologyJob:L},{default:M}]=await Promise.all([new Promise((N,O)=>b(["../rest/networks/validateNetworkTopology"],N,O)),new Promise((N,O)=>b(["../rest/networks/support/ValidateNetworkTopologyParameters"],Q=>N(y(Q)),O))]);p=M.from(p);w.isVersionInEditSession(this.featureServiceUrl,this.gdbVersion||null)?(p.sessionID=w.currentSessionId,await w.isSafeToEditVersion(this.featureServiceUrl, this.gdbVersion,!0)):p.sessionID=null;p.gdbVersion=this.gdbVersion||G;const J=this.networkServiceUrl;G=this.featureServiceUrl?z.emitApplyEditsEvent(this.featureServiceUrl,null,this.gdbVersion,!0):void 0;H=await L(J,p,{...H});return new I({statusUrl:H,editsResolver:G})}async _fetchLayerMetaData(p,H){p=await h(p,{responseType:"json",query:{f:"json"},...H});this.sourceJSON=p.data;this.read(p.data,{origin:"service"})}async _fetchDataElement(p,H,G){this.dataElement||(p=await h(`${p}/queryDataElements`, {responseType:"json",query:{layers:JSON.stringify([H]),f:"json"},...G}).then(L=>L.data.layerDataElements?.[0]))&&this.read(p,{origin:"service"})}};a.__decorate([k.property({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:!0}},read:!1}})],c.prototype,"id",void 0);a.__decorate([k.property({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:{source:"name"}}},read:!1}})],c.prototype,"title",void 0);a.__decorate([k.property({type:String, nonNullable:!0,json:{origins:{"web-map":{read:{source:"url"},write:{target:"url",isRequired:!0}}},read:!1}})],c.prototype,"layerUrl",void 0);a.__decorate([k.property({type:Object,json:{origins:{service:{read:!0}},read:!1}})],c.prototype,"dataElement",void 0);a.__decorate([k.property({type:x,json:{origins:{service:{read:{source:"extent"}}},read:!1}})],c.prototype,"fullExtent",void 0);a.__decorate([k.property({type:C,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:!1}})],c.prototype, "spatialReference",void 0);a.__decorate([k.property({type:["utility","trace"],readOnly:!0,json:{read:!1,write:!1}})],c.prototype,"type",void 0);a.__decorate([k.property({readOnly:!0})],c.prototype,"datasetName",null);a.__decorate([k.property({readOnly:!0})],c.prototype,"owner",null);a.__decorate([k.property({readOnly:!0})],c.prototype,"schemaGeneration",null);a.__decorate([k.property({readOnly:!0})],c.prototype,"parsedUrl",null);a.__decorate([k.property({readOnly:!0})],c.prototype,"featureServiceUrl", null);a.__decorate([k.property({readOnly:!0})],c.prototype,"networkServiceUrl",null);a.__decorate([k.property({readOnly:!0})],c.prototype,"layerId",null);a.__decorate([k.property()],c.prototype,"sourceJSON",void 0);a.__decorate([k.property({readOnly:!0})],c.prototype,"networkSystemLayers",null);a.__decorate([k.property()],c.prototype,"gdbVersion",void 0);a.__decorate([k.property({type:Date})],c.prototype,"historicMoment",void 0);return c=a.__decorate([B.subclass("esri.networks.Network")],c)})},"esri/networks/support/TopologyValidationJobInfo":function(){define("../../chunks/tslib.es6 ../../request ../../core/has ../../core/jsonMap ../../core/promiseUtils ../../core/accessorSupport/decorators/property ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass ../../rest/networks/support/ValidateNetworkTopologyResult".split(" "), function(b,a,c,d,h,v,q,l,g,m,r){c=d.strict()({Pending:"job-waiting",InProgress:"job-executing",Completed:"job-succeeded"});r=class extends r{constructor(k){super(k);this.lastUpdatedTime=this.submissionTime=this.status=this.statusUrl=null;this._timer=void 0}destroy(){clearInterval(this._timer)}async checkJobStatus(k){({data:k}=await a(this.statusUrl,{...k,query:{f:"json"}}));this.read(k);this.editsResolver&&this.editsResolver.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[], addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!0,historicMoment:null});return this}async waitForJobCompletion(k={}){const {interval:D=1E3,statusCallback:n}=k;return new Promise((B,x)=>{this._clearTimer();this._timer=setInterval(()=>{this._timer||x(h.createAbortError());this.checkJobStatus().then(u=>{({status:u}=u);this.status=u;switch(u){case "job-succeeded":this._clearTimer();B(this);break;case "job-waiting":case "job-executing":n&&n(this)}},u=>{this._clearTimer(); x(u)})},D)})}_clearTimer(){clearInterval(this._timer);this._timer=void 0}};b.__decorate([v.property()],r.prototype,"editsResolver",void 0);b.__decorate([v.property({type:String,json:{write:!0}})],r.prototype,"statusUrl",void 0);b.__decorate([g.enumeration(c)],r.prototype,"status",void 0);b.__decorate([v.property({type:Date,json:{type:Number,write:{writer:(k,D)=>{D.submissionTime=k?k.getTime():null}}}})],r.prototype,"submissionTime",void 0);b.__decorate([v.property({type:Date,json:{type:Number,write:{writer:(k, D)=>{D.lastUpdatedTime=k?k.getTime():null}}}})],r.prototype,"lastUpdatedTime",void 0);return r=b.__decorate([m.subclass("esri.networks.support.TopologyValidationJobInfo")],r)})},"esri/rest/networks/support/ValidateNetworkTopologyResult":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,c,d,h, v,q){a=class extends a.JSONSupport{constructor(l){super(l);this.moment=null;this.validateErrorsCreated=this.fullUpdate=!1;this.discoveredSubnetworks=this.serviceEdits=this.exceededTransferLimit=this.dirtyAreaCount=null}};b.__decorate([c.property({type:Date,json:{type:Number,write:{writer:(l,g)=>{g.moment=l?l.getTime():null}}}})],a.prototype,"moment",void 0);b.__decorate([c.property({type:Boolean,json:{write:!0}})],a.prototype,"fullUpdate",void 0);b.__decorate([c.property({type:Boolean,json:{write:!0}})], a.prototype,"validateErrorsCreated",void 0);b.__decorate([c.property({type:Number,json:{write:!0}})],a.prototype,"dirtyAreaCount",void 0);b.__decorate([c.property({type:Boolean,json:{write:!0}})],a.prototype,"exceededTransferLimit",void 0);b.__decorate([c.property({type:[Object],json:{write:!0}})],a.prototype,"serviceEdits",void 0);b.__decorate([c.property({type:[Object],json:{write:!0}})],a.prototype,"discoveredSubnetworks",void 0);return a=b.__decorate([q.subclass("esri.rest.networks.support.ValidateNetworkTopologyResult")], a)})},"esri/networks/support/utils":function(){define("require exports ../../request ../../core/Error ../../layers/support/featureQueryAll ../../portal/PortalItem ../../rest/support/FeatureSet".split(" "),function(b,a,c,d,h,v,q){async function l(g,m){return"Utility Network Layer"===g?({default:g}=await new Promise((r,k)=>b(["../UtilityNetwork"],D=>r(Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"}))),k)),new g({layerUrl:m})):null}a.getFeaturesFromLayers= async function(g,m){const r=g.layers,k=g.layerInfos,D=g.returnGeometry||!1,n=g.outSpatialReference;await Promise.all(r.map(async B=>{await B.load()}));return(await Promise.all(r.map(async B=>{var x=k.find(z=>z.layerUrl===B.parsedUrl?.path);if(!x?.objectIds?.length)return{layer:B,featureSet:void 0};const u=B.createQuery();u.returnGeometry=D;u.outFields=x.outFields||["*"];u.outSpatialReference=n;u.gdbVersion=B.gdbVersion;u.objectIds=x.objectIds;m&&(u.where="1\x3d1");x=q.fromJSON(await h.queryAllJSON(B, u));return{layer:B,featureSet:x}}))).filter(B=>void 0!==B.featureSet)};a.getObjectIdsFromElements=function(g,m){const r=[],k=new Map;for(const n of m){m=g.getLayerIdBySourceId(n.networkSourceId);if(null==m)continue;let B=k.get(m);void 0===B&&(B=[]);B.push(n.objectId);k.set(m,B)}const D=g.featureServiceUrl;k.forEach((n,B)=>r.push({layerUrl:`${D}/${B}`,objectIds:n}));return r};a.networkFromPortalItem=async function(g){g="portalItem"in g?g:{portalItem:g};!g.portalItem||g.portalItem instanceof v||(g= {...g,portalItem:new v(g.portalItem)});g=g.portalItem;await g.load();if("Feature Service"!==g.type)throw new d("portal:unknown-item-type","Unknown item type '${type}'",{type:g.type});g=g.url;var m=await c(g,{responseType:"json",query:{f:"json"}});return m.data.type?.includes("Network Layer")?l(m.data.type,g):m.data.layers&&(m=m.data.layers.find(r=>r.type.includes("Network Layer")))?l(m.type,`${g}/${m.id}`):null};Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})})},"esri/networks/RulesTable":function(){define("../chunks/tslib.es6 ../request ../core/JSONSupport ../core/Loadable ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./support/typeUtils".split(" "), function(b,a,c,d,h,v,q,l,g,m){c=class extends c.JSONSupportMixin(d){constructor(r){super(r);this.rulesCategorized={attachment:[],containment:[],connectivity:[]};this.request=a}initialize(){}async load(r){r=this.layer.load(r).then(()=>this._initializeRulesTable());this.addResolvingPromise(r);return this}getFeatureSQL(r,k){var D=r.layerId.toString(),n=r.fieldsIndex?.normalizeFieldName("assetGroup");r=r.fieldsIndex?.normalizeFieldName("assetType");n=n?k.attributes[n]:null;k=r?k.attributes[r]:null;if(D= this.rulesHash[D])if(D=D.assetGroupHash[n])return D.assetTypeHash[k]||null;return null}async _initializeRulesTable(){const r={};let k;var D=k||={};D[D.from=0]="from";D[D.to=1]="to";D[D.via=2]="via";D=[{networkSourceId:"fromNetworkSource",assetGroupId:"fromAssetGroup",assetTypeId:"fromAssetType"},{networkSourceId:"toNetworkSource",assetGroupId:"toAssetGroup",assetTypeId:"toAssetType"},{networkSourceId:"viaNetworkSource",assetGroupId:"viaAssetGroup",assetTypeId:"viaAssetType"}];this.rulesCategorized= {attachment:[],containment:[],connectivity:[]};for(const E of this.rules)if(E.ruleType===m.RuleType.RTAttachment)this.rulesCategorized.attachment.push(E);else if(E.ruleType===m.RuleType.RTContainment)this.rulesCategorized.containment.push(E);else if(E.ruleType===m.RuleType.RTJunctionJunctionConnectivity)this.rulesCategorized.connectivity.push(E);else{this.rulesCategorized.connectivity.push(E);var n=[[k.from,k.to],[k.to,k.from]];E.ruleType===m.RuleType.RTEdgeJunctionEdgeConnectivity&&(n=[[k.from,k.via], [k.via,k.from],[k.to,k.via],[k.via,k.to]]);for(const I of n){n=I.shift();var B=I.shift(),x=!1;switch(E.ruleType){case m.RuleType.RTEdgeJunctionEdgeConnectivity:x=n===k.from||n===k.to;break;case m.RuleType.RTJunctionEdgeConnectivity:x=n===k.to}var u=D[n];n=E[u.networkSourceId]?.layerId.toString()??"";const f=E[u.assetGroupId]?.assetGroupCode?.toString();u=E[u.assetTypeId]?.assetTypeCode?.toString();var z=D[B];B=E[z.networkSourceId]?.layerId.toString()??"";const w=E[z.assetGroupId]?.assetGroupCode?.toString(); z=E[z.assetTypeId];const C=z?.assetTypeCode?.toString(),A=r[n]??{assetGroupHash:{}};if(!(f&&u&&w&&C))continue;const y=A.assetGroupHash[f]??{assetTypeHash:{}},p=y.assetTypeHash[u]??{};p[B]=p[B]??{};x&&(p[n]=p[n]??{},x=`(assetgroup = ${f} AND assettype = ${u})`,p[n].anyVertex=p[n].anyVertex?`${p[n].anyVertex}`:`${x}`,"esriNECPEndVertex"===z?.connectivityPolicy&&(p[n].endVertex=p[n]?.endVertex?`${p[n].endVertex}`:`${x}`));x=`(assetgroup = ${w} AND assettype = ${C})`;p[B].anyVertex=p[B]?.anyVertex?`${p[B].anyVertex} OR ${x}`: `${x}`;"esriNECPEndVertex"===z?.connectivityPolicy&&(p[B].endVertex=p[B]?.endVertex?`${p[B].endVertex} OR ${x}`:`${x}`);y.assetTypeHash[u]=p;A.assetGroupHash[f]=y;r[n]=A}}this.rulesHash=r}};b.__decorate([h.property({constructOnly:!0})],c.prototype,"layer",void 0);b.__decorate([h.property({constructOnly:!0})],c.prototype,"rules",void 0);b.__decorate([h.property()],c.prototype,"rulesHash",void 0);b.__decorate([h.property()],c.prototype,"rulesCategorized",void 0);b.__decorate([h.property({constructOnly:!0})], c.prototype,"request",void 0);return c=b.__decorate([g.subclass("esri.networks.RulesTable")],c)})},"esri/networks/support/typeUtils":function(){define(["exports","../../core/jsonMap"],function(b,a){b.RuleType=void 0;var c=b.RuleType||(b.RuleType={});c[c.RTJunctionJunctionConnectivity=1]="RTJunctionJunctionConnectivity";c[c.RTAttachment=2]="RTAttachment";c[c.RTContainment=3]="RTContainment";c[c.RTJunctionEdgeConnectivity=4]="RTJunctionEdgeConnectivity";c[c.RTEdgeJunctionEdgeConnectivity=5]="RTEdgeJunctionEdgeConnectivity"; c=new a.JSONMap({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation"});const d=new a.JSONMap({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionMidspanConnectivity:"junction-midspan-connectivity", junctionEdgeToConnectivity:"junction-edge-to-connectivity"});a=new a.JSONMap({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});b.AssociationTypeEnum={connectivity:1,"junction-junction-connectivity":1,attachment:2,containment:3,"junction-edge-from-connectivity":4,"junction-midspan-connectivity":5,"junction-edge-to-connectivity":6};b.associationTypeKebabDict=d;b.traceTypeKebabDict=c;b.validationTypeKebabDict=a;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/networks/support/NamedTraceConfiguration":function(){define("../../chunks/tslib.es6 ../../core/MultiOriginJSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ./TraceConfiguration ./typeUtils ./UNTraceConfiguration".split(" "), function(b,a,c,d,h,v,q,l,g,m,r){a=class extends a.MultiOriginJSONSupport{constructor(k){super(k);this.minStartingPoints=this.description=this.creator=this.creationDate=this.traceConfiguration=this.title=this.globalId=null;this.resultTypes=[];this.tags=[];this.traceType=null}readTraceConfiguration(k,D){return void 0!==k.tierName?r.fromJSON(k):g.fromJSON(k)}};b.__decorate([c.property({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"id"},write:{target:"id",isRequired:!0}},service:{read:{source:"globalId"}, write:{target:"globalId",isRequired:!0}}},read:!1}})],a.prototype,"globalId",void 0);b.__decorate([c.property({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"title"},write:{target:"title",isRequired:!0}},service:{read:{source:"name"},write:{target:"name",isRequired:!0}}},read:!1}})],a.prototype,"title",void 0);b.__decorate([c.property({type:g,json:{origins:{service:{read:!0,write:!0}},read:!1}})],a.prototype,"traceConfiguration",void 0);b.__decorate([q.reader("service","traceConfiguration")], a.prototype,"readTraceConfiguration",null);b.__decorate([c.property({type:Date,json:{origins:{service:{read:!0,write:!0}},read:!1}})],a.prototype,"creationDate",void 0);b.__decorate([c.property({type:String,json:{origins:{service:{read:!0,write:!0}},read:!1}})],a.prototype,"creator",void 0);b.__decorate([c.property({type:String,json:{origins:{service:{read:!0,write:!0}},read:!1}})],a.prototype,"description",void 0);b.__decorate([c.property({type:["none","one","many"],json:{origins:{service:{read:{source:"minNumStartingPoints"}, write:{target:"minNumStartingPoints"}}},read:!1}})],a.prototype,"minStartingPoints",void 0);b.__decorate([c.property({json:{origins:{service:{read:!0,write:!0}},read:!1}})],a.prototype,"resultTypes",void 0);b.__decorate([c.property({type:[String],json:{origins:{service:{read:!0,write:!0}},read:!1}})],a.prototype,"tags",void 0);b.__decorate([c.property({type:m.traceTypeKebabDict.apiValues,json:{type:m.traceTypeKebabDict.jsonValues,origins:{service:{read:m.traceTypeKebabDict.read,write:m.traceTypeKebabDict.write}}, read:!1}})],a.prototype,"traceType",void 0);return a=b.__decorate([l.subclass("esri.networks.support.NamedTraceConfiguration")],a)})},"esri/networks/support/TraceConfiguration":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,c,d,h,v,q){a=class extends a.JSONSupport{constructor(l){super(l);this.conditionBarriers= [];this.outputConditions=[];this.functions=[];this.functionBarriers=[];this.ignoreBarriersAtStartingPoints=this.validateConsistency=this.includeBarriers=this.shortestPathNetworkAttributeName=this.traversabilityScope=null}};b.__decorate([c.property({type:[Object],json:{write:!0}})],a.prototype,"conditionBarriers",void 0);b.__decorate([c.property({type:[Object],json:{write:!0}})],a.prototype,"outputConditions",void 0);b.__decorate([c.property({type:[Object],json:{write:!0}})],a.prototype,"functions", void 0);b.__decorate([c.property({type:[Object],json:{write:!0}})],a.prototype,"functionBarriers",void 0);b.__decorate([c.property({type:["junctions","edges","junctionsAndEdges"],json:{write:!0}})],a.prototype,"traversabilityScope",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"shortestPathNetworkAttributeName",void 0);b.__decorate([c.property({type:Boolean,json:{write:!0}})],a.prototype,"includeBarriers",void 0);b.__decorate([c.property({type:Boolean,json:{write:!0}})], a.prototype,"validateConsistency",void 0);b.__decorate([c.property({type:Boolean,json:{write:!0}})],a.prototype,"ignoreBarriersAtStartingPoints",void 0);return a=b.__decorate([q.subclass("esri.networks.support.TraceConfiguration")],a)})},"esri/networks/support/UNTraceConfiguration":function(){define("../../chunks/tslib.es6 ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./TraceConfiguration".split(" "), function(b,a,c,d,h,v,q){c=class extends q{constructor(l){super(l);this.filterBarriers=[];this.filterBitsetNetworkAttributeName=this.domainNetworkName=this.arcadeExpressionBarrier=null;this.filterFunctionBarriers=[];this.nearestNeighbor=this.includeUpToFirstSpatialContainer=this.allowIndeterminateFlow=this.includeStructures=this.includeIsolated=this.includeContent=this.includeContainers=this.filterScope=null;this.outputFilterCategories=[];this.outputFilters=[];this.propagators=[];this.validateLocatability= this.tierName=this.diagramTemplateName=this.targetTierName=this.subnetworkName=null}};b.__decorate([a.property({type:[Object],json:{write:!0}})],c.prototype,"filterBarriers",void 0);b.__decorate([a.property({type:String,json:{write:!0}})],c.prototype,"arcadeExpressionBarrier",void 0);b.__decorate([a.property({type:String,json:{write:!0}})],c.prototype,"domainNetworkName",void 0);b.__decorate([a.property({type:String,json:{write:!0}})],c.prototype,"filterBitsetNetworkAttributeName",void 0);b.__decorate([a.property({type:[Object], json:{write:!0}})],c.prototype,"filterFunctionBarriers",void 0);b.__decorate([a.property({type:["junctions","edges","junctionsAndEdges"],json:{write:!0}})],c.prototype,"filterScope",void 0);b.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"includeContainers",void 0);b.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"includeContent",void 0);b.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"includeIsolated",void 0);b.__decorate([a.property({type:Boolean, json:{write:!0}})],c.prototype,"includeStructures",void 0);b.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"allowIndeterminateFlow",void 0);b.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"includeUpToFirstSpatialContainer",void 0);b.__decorate([a.property({type:Object,json:{write:!0}})],c.prototype,"nearestNeighbor",void 0);b.__decorate([a.property({type:[Object],json:{write:!0}})],c.prototype,"outputFilterCategories",void 0);b.__decorate([a.property({type:[Object], json:{write:!0}})],c.prototype,"outputFilters",void 0);b.__decorate([a.property({type:[Object],json:{write:!0}})],c.prototype,"propagators",void 0);b.__decorate([a.property({type:String,json:{write:!0}})],c.prototype,"subnetworkName",void 0);b.__decorate([a.property({type:String,json:{write:!0}})],c.prototype,"targetTierName",void 0);b.__decorate([a.property({type:String,json:{write:!0}})],c.prototype,"diagramTemplateName",void 0);b.__decorate([a.property({type:String,json:{write:!0}})],c.prototype, "tierName",void 0);b.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"validateLocatability",void 0);return c=b.__decorate([v.subclass("esri.networks.support.UNTraceConfiguration")],c)})},"esri/networks/support/NetworkSystemLayers":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,c,d,h,v,q){a=class extends a{constructor(l){super(l); this.associationsTableUrl=this.associationsTableId=this.dirtyAreasLayerUrl=this.dirtyAreasLayerId=this.subnetworksTableUrl=this.subnetworksTableId=this.rulesTableUrl=this.rulesTableId=null}};b.__decorate([c.property({constructOnly:!0})],a.prototype,"rulesTableId",void 0);b.__decorate([c.property({constructOnly:!0})],a.prototype,"rulesTableUrl",void 0);b.__decorate([c.property({constructOnly:!0})],a.prototype,"subnetworksTableId",void 0);b.__decorate([c.property({constructOnly:!0})],a.prototype,"subnetworksTableUrl", void 0);b.__decorate([c.property({constructOnly:!0})],a.prototype,"dirtyAreasLayerId",void 0);b.__decorate([c.property({constructOnly:!0})],a.prototype,"dirtyAreasLayerUrl",void 0);b.__decorate([c.property({constructOnly:!0})],a.prototype,"associationsTableId",void 0);b.__decorate([c.property({constructOnly:!0})],a.prototype,"associationsTableUrl",void 0);return a=b.__decorate([q.subclass("esri.networks.support.NetworkSystemLayers")],a)})},"esri/networks/support/TerminalConfiguration":function(){define("../../chunks/tslib.es6 ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./Terminal".split(" "), function(b,a,c,d,h,v,q,l,g){a=new a.JSONMap({esriUNTMBidirectional:"bidirectional",esriUNTMDirectional:"directional"});c=class extends c.JSONSupport{constructor(m){super(m);this.name=this.id=this.defaultConfiguration=null;this.terminals=[];this.traversabilityModel=null}};b.__decorate([d.property({type:String,json:{write:!0}})],c.prototype,"defaultConfiguration",void 0);b.__decorate([d.property({type:Number,json:{read:{source:"terminalConfigurationId"},write:{target:"terminalConfigurationId"}}})], c.prototype,"id",void 0);b.__decorate([d.property({type:String,json:{read:{source:"terminalConfigurationName"},write:{target:"terminalConfigurationName"}}})],c.prototype,"name",void 0);b.__decorate([d.property({type:[g],json:{write:!0}})],c.prototype,"terminals",void 0);b.__decorate([d.property({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],c.prototype,"traversabilityModel",void 0);return c=b.__decorate([l.subclass("esri.networks.support.TerminalConfiguration")],c)})},"esri/networks/support/Terminal":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,c,d,h,v,q){a=class extends a.JSONSupport{constructor(l){super(l);this.name=this.id=null}};b.__decorate([c.property({type:Number,json:{read:{source:"terminalId"},write:{target:"terminalId"}}})],a.prototype,"id",void 0);b.__decorate([c.property({type:String,json:{read:{source:"terminalName"},write:{target:"terminalName"}}})],a.prototype,"name",void 0);b.__decorate([c.property({type:Boolean,json:{write:!0}})],a.prototype,"isUpstreamTerminal",void 0);return a=b.__decorate([q.subclass("esri.networks.support.Terminal")], a)})},"esri/networks/support/TraceJobInfo":function(){define("../../chunks/tslib.es6 ../../request ../../core/has ../../core/jsonMap ../../core/promiseUtils ../../core/accessorSupport/decorators/property ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass ../../rest/networks/support/TraceResult".split(" "),function(b,a,c,d,h,v,q,l,g,m,r){c=d.strict()({Pending:"job-waiting",InProgress:"job-executing",Completed:"job-succeeded"}); r=class extends r{constructor(k){super(k);this.lastUpdatedTime=this.submissionTime=this.status=this.statusUrl=null;this._timer=void 0}destroy(){clearInterval(this._timer)}async checkJobStatus(k){({data:k}=await a(this.statusUrl,{...k,query:{f:"json"}}));this.read(k.traceResults?{...k.traceResults,...k}:k);return this}async waitForJobCompletion(k={}){const {interval:D=1E3,statusCallback:n}=k;return new Promise((B,x)=>{this._clearTimer();this._timer=setInterval(()=>{this._timer||x(h.createAbortError()); this.checkJobStatus().then(u=>{({status:u}=u);this.status=u;switch(u){case "job-succeeded":this._clearTimer();B(this);break;case "job-waiting":case "job-executing":n&&n(this)}},u=>{this._clearTimer();x(u)})},D)})}_clearTimer(){clearInterval(this._timer);this._timer=void 0}};b.__decorate([v.property({type:String,json:{write:!0}})],r.prototype,"statusUrl",void 0);b.__decorate([g.enumeration(c)],r.prototype,"status",void 0);b.__decorate([v.property({type:Date,json:{type:Number,write:{writer:(k,D)=>{D.submissionTime= k?k.getTime():null}}}})],r.prototype,"submissionTime",void 0);b.__decorate([v.property({type:Date,json:{type:Number,write:{writer:(k,D)=>{D.lastUpdatedTime=k?k.getTime():null}}}})],r.prototype,"lastUpdatedTime",void 0);return r=b.__decorate([m.subclass("esri.networks.support.TraceJobInfo")],r)})},"esri/rest/networks/support/TraceResult":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ./AggregatedGeometry ./FunctionResult ./NetworkElement".split(" "), function(b,a,c,d,h,v,q,l,g,m){a=class extends a.JSONSupport{constructor(r){super(r);this.globalFunctionResults=this.elements=this.aggregatedGeometry=null;this.startingPointsIgnored=this.kFeaturesForKNNFound=!1;this.warnings=null}};b.__decorate([c.property({type:l,json:{write:!0},readOnly:!0})],a.prototype,"aggregatedGeometry",void 0);b.__decorate([c.property({type:[m],json:{write:!0},readOnly:!0})],a.prototype,"elements",void 0);b.__decorate([c.property({type:[g],json:{write:!0},readOnly:!0})],a.prototype, "globalFunctionResults",void 0);b.__decorate([c.property({type:Boolean,json:{write:!0},readOnly:!0})],a.prototype,"kFeaturesForKNNFound",void 0);b.__decorate([c.property({type:Boolean,json:{write:!0},readOnly:!0})],a.prototype,"startingPointsIgnored",void 0);b.__decorate([c.property({type:[String],json:{write:!0},readOnly:!0})],a.prototype,"warnings",void 0);return a=b.__decorate([q.subclass("esri.rest.networks.support.TraceResult")],a)})},"esri/rest/networks/support/AggregatedGeometry":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../geometry/Multipoint ../../../geometry/Polygon ../../../geometry/Polyline".split(" "), function(b,a,c,d,h,v,q,l,g,m){a=class extends a.JSONSupport{constructor(r){super(r);this.polygon=this.multipoint=this.line=null}};b.__decorate([c.property({type:m,json:{write:!0},readOnly:!0})],a.prototype,"line",void 0);b.__decorate([c.property({type:l,json:{read:{source:"point"},write:{target:"point"}},readOnly:!0})],a.prototype,"multipoint",void 0);b.__decorate([c.property({type:g,json:{write:!0},readOnly:!0})],a.prototype,"polygon",void 0);return a=b.__decorate([q.subclass("esri.rest.networks.support.AggregatedGeometry")], a)})},"esri/rest/networks/support/FunctionResult":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,c,d,h,v,q){a=class extends a.JSONSupport{constructor(l){super(l);this.result=this.networkAttributeName=this.functionType=null}};b.__decorate([c.property({type:"add subtract average count min max".split(" "), json:{write:!0},readOnly:!0})],a.prototype,"functionType",void 0);b.__decorate([c.property({type:String,json:{write:!0},readOnly:!0})],a.prototype,"networkAttributeName",void 0);b.__decorate([c.property({type:Number,json:{write:!0},readOnly:!0})],a.prototype,"result",void 0);return a=b.__decorate([q.subclass("esri.rest.networks.support.FunctionResult")],a)})},"esri/rest/networks/support/NetworkElement":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,c,d,h,v,q){a=class extends a.JSONSupport{constructor(l){super(l);this.terminalId=this.positionTo=this.positionFrom=this.objectId=this.networkSourceId=this.globalId=this.assetTypeCode=this.assetGroupCode=null}};b.__decorate([c.property({type:Number,json:{write:!0}})],a.prototype,"assetGroupCode",void 0);b.__decorate([c.property({type:Number,json:{write:!0}})],a.prototype,"assetTypeCode",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"globalId",void 0);b.__decorate([c.property({type:Number, json:{write:!0}})],a.prototype,"networkSourceId",void 0);b.__decorate([c.property({type:Number,json:{write:!0}})],a.prototype,"objectId",void 0);b.__decorate([c.property({type:Number,json:{write:!0}})],a.prototype,"positionFrom",void 0);b.__decorate([c.property({type:Number,json:{write:!0}})],a.prototype,"positionTo",void 0);b.__decorate([c.property({type:Number,json:{write:!0}})],a.prototype,"terminalId",void 0);return a=b.__decorate([q.subclass("esri.rest.networks.support.NetworkElement")],a)})}, "esri/support/MapFloorInfo":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../layers/support/FacilityLayerInfo ../layers/support/LevelLayerInfo ../layers/support/SiteLayerInfo".split(" "),function(b,a,c,d,h,v,q,l,g,m){a=class extends a.JSONSupport{constructor(r){super(r);this.siteLayer=this.facilityLayer=this.levelLayer=null}};b.__decorate([c.property({type:g, json:{write:!0}})],a.prototype,"levelLayer",void 0);b.__decorate([c.property({type:l,json:{write:!0}})],a.prototype,"facilityLayer",void 0);b.__decorate([c.property({type:m,json:{write:!0}})],a.prototype,"siteLayer",void 0);return a=b.__decorate([q.subclass("esri.support.MapFloorInfo")],a)})},"esri/layers/support/FacilityLayerInfo":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,c,d,h,v,q){a=class extends a.JSONSupport{constructor(l){super(l);this.sublayerId=this.siteIdField=this.nameField=this.layerId=this.facilityIdField=null}};b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"facilityIdField",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"layerId",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"nameField",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype, "siteIdField",void 0);b.__decorate([c.property({type:Number,json:{read:{source:"subLayerId"},write:{target:"subLayerId"},origins:{"web-scene":{read:!1,write:!1}}}})],a.prototype,"sublayerId",void 0);return a=b.__decorate([q.subclass("esri.layers.support.FacilityLayerInfo")],a)})},"esri/layers/support/LevelLayerInfo":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,c,d,h,v,q){a=class extends a.JSONSupport{constructor(l){super(l);this.verticalOrderField=this.sublayerId=this.shortNameField=this.longNameField=this.levelNumberField=this.levelIdField=this.layerId=this.facilityIdField=null}};b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"facilityIdField",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"layerId",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"levelIdField", void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"levelNumberField",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"longNameField",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"shortNameField",void 0);b.__decorate([c.property({type:Number,json:{read:{source:"subLayerId"},write:{target:"subLayerId"},origins:{"web-scene":{read:!1,write:!1}}}})],a.prototype,"sublayerId",void 0);b.__decorate([c.property({type:String, json:{write:!0}})],a.prototype,"verticalOrderField",void 0);return a=b.__decorate([q.subclass("esri.layers.support.LevelLayerInfo")],a)})},"esri/layers/support/SiteLayerInfo":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,c,d,h,v,q){a=class extends a.JSONSupport{constructor(l){super(l);this.sublayerId=this.siteIdField= this.nameField=this.layerId=null}};b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"layerId",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"nameField",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"siteIdField",void 0);b.__decorate([c.property({type:Number,json:{read:{source:"subLayerId"},write:{target:"subLayerId"},origins:{"web-scene":{read:!1,write:!1}}}})],a.prototype,"sublayerId",void 0);return a=b.__decorate([q.subclass("esri.layers.support.SiteLayerInfo")], a)})},"esri/webdoc/GeotriggersInfo":function(){define("../chunks/tslib.es6 ../core/Clonable ../core/JSONSupport ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./geotriggersInfo/support/geotriggerTypes".split(" "),function(b,a,c,d,h,v,q,l,g){a=class extends a.ClonableMixin(c.JSONSupport){constructor(m){super(m);this.geotriggers=null}};b.__decorate([d.property({types:[g.types],json:{write:{isRequired:!0}}})],a.prototype, "geotriggers",void 0);return a=b.__decorate([l.subclass("esri.webdoc.GeotriggersInfo")],a)})},"esri/webdoc/geotriggersInfo/support/geotriggerTypes":function(){define(["exports","../FenceGeotrigger","../Geotrigger"],function(b,a,c){b.types={base:c,key:"type",typeMap:{fence:a}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webdoc/geotriggersInfo/FenceGeotrigger":function(){define("../../chunks/tslib.es6 ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass ./DeviceLocationFeed ./FeatureFenceParameters ./Geotrigger ./GeotriggerNotificationOptions ./support/typeUtils".split(" "), function(b,a,c,d,h,v,q,l,g,m,r,k){c=class extends m{constructor(D){super(D);this.enterExitRule="enter-contains-and-exit-does-not-intersect";this.feed=null;this.feedAccuracyMode="use-geometry";this.notificationOptions=this.name=this.fenceParameters=this.fenceNotificationRule=null;this.type="fence"}};b.__decorate([v.enumeration(k.enterExitRuleKebabDict)],c.prototype,"enterExitRule",void 0);b.__decorate([a.property({type:l,json:{write:{isRequired:!0}}})],c.prototype,"feed",void 0);b.__decorate([v.enumeration(k.feedAccuracyModeKebabDict)], c.prototype,"feedAccuracyMode",void 0);b.__decorate([a.property({type:k.fenceNotificationRuleKebabDict.apiValues,json:{type:k.fenceNotificationRuleKebabDict.jsonValues,read:k.fenceNotificationRuleKebabDict.read,write:{writer:k.fenceNotificationRuleKebabDict.write,isRequired:!0}}})],c.prototype,"fenceNotificationRule",void 0);b.__decorate([a.property({type:g,json:{write:{isRequired:!0}}})],c.prototype,"fenceParameters",void 0);b.__decorate([a.property({type:String,json:{write:!0}})],c.prototype,"name", void 0);b.__decorate([a.property({type:r,json:{write:!0}})],c.prototype,"notificationOptions",void 0);b.__decorate([v.enumeration({fence:"fence"},{readOnly:!0})],c.prototype,"type",void 0);return c=b.__decorate([q.subclass("esri.webdoc.geotriggersInfo.FenceGeotrigger")],c)})},"esri/webdoc/geotriggersInfo/DeviceLocationFeed":function(){define("../../chunks/tslib.es6 ../../core/Clonable ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./ExpressionInfo".split(" "), function(b,a,c,d,h,v,q,l,g,m){c=new c.JSONMap({deviceLocation:"device-location"});a=class extends a.ClonableMixin(d.JSONSupport){constructor(r){super(r);this.filterExpression=null;this.type="device-location"}};b.__decorate([h.property({type:m,json:{write:!0}})],a.prototype,"filterExpression",void 0);b.__decorate([h.property({type:c.apiValues,readOnly:!0,json:{type:c.jsonValues,read:c.read,write:c.write}})],a.prototype,"type",void 0);return a=b.__decorate([g.subclass("esri.webdoc.geotriggersInfo.DeviceLocationFeed")], a)})},"esri/webdoc/geotriggersInfo/ExpressionInfo":function(){define("../../chunks/tslib.es6 ../../core/Clonable ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,c,d,h,v,q,l){a=class extends a.ClonableMixin(c.JSONSupport){constructor(g){super(g);this.expression=null;this.returnType="string";this.title=null}};b.__decorate([d.property({type:String,json:{write:{isRequired:!0}}})], a.prototype,"expression",void 0);b.__decorate([d.property({type:["number","string"],json:{write:!0}})],a.prototype,"returnType",void 0);b.__decorate([d.property({type:String,json:{write:!0}})],a.prototype,"title",void 0);return a=b.__decorate([l.subclass("esri.webdoc.geotriggersInfo.ExpressionInfo")],a)})},"esri/webdoc/geotriggersInfo/FeatureFenceParameters":function(){define("../../chunks/tslib.es6 ../../core/Clonable ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass ./FeatureFilter ./FeatureLayerSource".split(" "), function(b,a,c,d,h,v,q,l,g,m,r){a=class extends a.ClonableMixin(c.JSONSupport){constructor(k){super(k);this.bufferDistance=this.filter=this.fenceSource=null;this.type="features"}};b.__decorate([d.property({type:r,json:{write:{isRequired:!0}}})],a.prototype,"fenceSource",void 0);b.__decorate([d.property({type:m,json:{write:!0}})],a.prototype,"filter",void 0);b.__decorate([d.property({type:Number,json:{write:!0}})],a.prototype,"bufferDistance",void 0);b.__decorate([l.enumeration({features:"features"}, {readOnly:!0})],a.prototype,"type",void 0);return a=b.__decorate([g.subclass("esri.webdoc.geotriggersInfo.FeatureFenceParameters")],a)})},"esri/webdoc/geotriggersInfo/FeatureFilter":function(){define("../../chunks/tslib.es6 ../../geometry ../../core/Clonable ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../geometry/support/jsonUtils".split(" "),function(b,a,c,d,h,v,q,l,g, m){c=class extends c.ClonableMixin(d.JSONSupport){constructor(r){super(r);this.where=this.geometry=null}};b.__decorate([h.property({types:a.geometryTypes,json:{read:m.fromJSON,write:!0}})],c.prototype,"geometry",void 0);b.__decorate([h.property({type:String,json:{write:!0}})],c.prototype,"where",void 0);return c=b.__decorate([g.subclass("esri.webdoc.geotriggersInfo.FeatureFilter")],c)})},"esri/webdoc/geotriggersInfo/FeatureLayerSource":function(){define("../../chunks/tslib.es6 ../../core/Clonable ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,c,d,h,v,q,l,g){a=class extends a.ClonableMixin(c.JSONSupport){constructor(m){super(m);this.layerUrl=this.layerId=null;this.type="feature-layer"}};b.__decorate([d.property({type:String,json:{write:{overridePolicy(){return{isRequired:null===this.layerUrl}}}}})],a.prototype,"layerId",void 0);b.__decorate([d.property({type:String,json:{write:{overridePolicy(){return{isRequired:null===this.layerId}}}}})],a.prototype,"layerUrl",void 0);b.__decorate([l.enumeration({featureLayer:"feature-layer"}, {readOnly:!0})],a.prototype,"type",void 0);return a=b.__decorate([g.subclass("esri.webdoc.geotriggersInfo.FeatureLayerSource")],a)})},"esri/webdoc/geotriggersInfo/Geotrigger":function(){define("../../chunks/tslib.es6 ../../core/Clonable ../../core/JSONSupport ../../core/Logger ../../core/has ../../core/RandomLCG ../../core/Error ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,c,d,h,v,q,l,g){a=class extends a.ClonableMixin(c.JSONSupport){constructor(m){super(m); this.type="fence"}};b.__decorate([l.enumeration({fence:"fence"},{readOnly:!0})],a.prototype,"type",void 0);return a=b.__decorate([g.subclass("esri.webdoc.geotriggersInfo.Geotrigger")],a)})},"esri/webdoc/geotriggersInfo/GeotriggerNotificationOptions":function(){define("../../chunks/tslib.es6 ../../core/Clonable ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./ExpressionInfo".split(" "), function(b,a,c,d,h,v,q,l,g){a=class extends a.ClonableMixin(c.JSONSupport){constructor(m){super(m);this.requestedActions=this.expressionInfo=null}};b.__decorate([d.property({type:g,json:{write:!0}})],a.prototype,"expressionInfo",void 0);b.__decorate([d.property({type:[String],json:{write:!0}})],a.prototype,"requestedActions",void 0);return a=b.__decorate([l.subclass("esri.webdoc.geotriggersInfo.GeotriggerNotificationOptions")],a)})},"esri/webdoc/geotriggersInfo/support/typeUtils":function(){define(["exports", "../../../core/jsonMap"],function(b,a){const c=new a.JSONMap({enterContainsAndExitDoesNotContain:"enter-contains-and-exit-does-not-contain",enterContainsAndExitDoesNotIntersect:"enter-contains-and-exit-does-not-intersect",enterIntersectsAndExitDoesNotIntersect:"enter-intersects-and-exit-does-not-intersect"}),d=new a.JSONMap({useGeometry:"use-geometry",useGeometryWithAccuracy:"use-geometry-with-accuracy"});a=new a.JSONMap({enter:"enter",enterOrExit:"enter-or-exit",exit:"exit"});b.enterExitRuleKebabDict= c;b.feedAccuracyModeKebabDict=d;b.fenceNotificationRuleKebabDict=a;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webdoc/RangeInfo":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/accessorSupport/decorators/subclass".split(" "),function(b,a,c,d,h,v,q){var l;a=l=class extends a.JSONSupport{constructor(g){super(g);this.fullRangeExtent=this.currentRangeExtent=this.activeRange= null}clone(){return new l(c.clone({activeRange:this.activeRange,currentRangeExtent:this.currentRangeExtent,fullRangeExtent:this.fullRangeExtent}))}};b.__decorate([d.property({type:String,nonNullable:!0,json:{read:{source:"activeRangeName"},write:{target:"activeRangeName",isRequired:!0}}})],a.prototype,"activeRange",void 0);b.__decorate([d.property({type:[Number],json:{write:!0}})],a.prototype,"currentRangeExtent",void 0);b.__decorate([d.property({type:[Number],json:{write:!0}})],a.prototype,"fullRangeExtent", void 0);return a=l=b.__decorate([q.subclass("esri.webdoc.RangeInfo")],a)})},"esri/webdoc/Widgets":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/accessorSupport/decorators/subclass ./widgets/FloorFilter ./widgets/Range ./widgets/TimeSlider".split(" "),function(b,a,c,d,h,v,q,l,g,m){var r;a=r=class extends a.JSONSupport{constructor(k){super(k);this.floorFilter=this.timeSlider=this.range=null}clone(){return new r(c.clone({range:this.range, timeSlider:this.timeSlider,floorFilter:this.floorFilter}))}};b.__decorate([d.property({type:g,json:{write:!0}})],a.prototype,"range",void 0);b.__decorate([d.property({type:m,json:{write:!0}})],a.prototype,"timeSlider",void 0);b.__decorate([d.property({type:l,json:{write:!0}})],a.prototype,"floorFilter",void 0);return a=r=b.__decorate([q.subclass("esri.webdoc.Widgets")],a)})},"esri/webdoc/widgets/FloorFilter":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,c,d,h,v,q){var l;a=l=class extends a.JSONSupport{constructor(g){super(g);this.pinnedLevels=this.minimized=this.longNames=this.enabled=!1;this.level=this.facility=this.site=null}clone(){return new l(c.clone({enabled:this.enabled,longNames:this.longNames,minimized:this.minimized,pinnedLevels:this.pinnedLevels,site:this.site,facility:this.facility,level:this.level}))}};b.__decorate([d.property({type:Boolean,json:{read:{source:"enabled"},write:{target:"enabled"}}})],a.prototype,"enabled", void 0);b.__decorate([d.property({type:Boolean,json:{read:{source:"longNames"},write:{target:"longNames"}}})],a.prototype,"longNames",void 0);b.__decorate([d.property({type:Boolean,json:{read:{source:"minimized"},write:{target:"minimized"}}})],a.prototype,"minimized",void 0);b.__decorate([d.property({type:Boolean,json:{read:{source:"pinnedLevels"},write:{target:"pinnedLevels"}}})],a.prototype,"pinnedLevels",void 0);b.__decorate([d.property({type:String,json:{read:{source:"site"},write:{target:"site"}}})], a.prototype,"site",void 0);b.__decorate([d.property({type:String,json:{read:{source:"facility"},write:{target:"facility"}}})],a.prototype,"facility",void 0);b.__decorate([d.property({type:String,json:{read:{source:"level"},write:{target:"level"}}})],a.prototype,"level",void 0);return a=l=b.__decorate([q.subclass("esri.webdoc.widgets.FloorFilter")],a)})},"esri/webdoc/widgets/Range":function(){define("../../chunks/tslib.es6 ../../core/jsonMap ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/subclass".split(" "), function(b,a,c,d,h,v,q,l){var g;a=new a.JSONMap({slider:"slider",picker:"picker"});c=g=class extends c.JSONSupport{constructor(m){super(m);this.stopInterval=this.numStops=this.interactionMode=null}clone(){return new g({interactionMode:this.interactionMode,numStops:this.numStops,stopInterval:this.stopInterval})}};b.__decorate([d.property({type:a.apiValues,nonNullable:!0,json:{type:a.jsonValues,default:null,read:{reader:a.read},write:{isRequired:!0,writer:a.write}}})],c.prototype,"interactionMode", void 0);b.__decorate([d.property({type:h.Integer,json:{read:{source:"numberOfStops"},write:{target:"numberOfStops",overridePolicy(){const m=null!=this.stopInterval;return{enabled:!m,isRequired:!m}}}}})],c.prototype,"numStops",void 0);b.__decorate([d.property({type:Number,json:{write:{overridePolicy(){return{isRequired:null==this.numStops}}}}})],c.prototype,"stopInterval",void 0);return c=g=b.__decorate([l.subclass("esri.webdoc.widgets.Range")],c)})},"esri/webdoc/widgets/TimeSlider":function(){define("../../chunks/tslib.es6 ../../TimeExtent ../../TimeInterval ../../core/JSONSupport ../../core/lang ../../core/object ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../portal/timeUnitKebabDictionary".split(" "), function(b,a,c,d,h,v,q,l,g,m,r,k){var D;d=D=class extends d.JSONSupport{constructor(n){super(n);this.fullTimeExtent=this.currentTimeExtent=null;this.loop=!1;this.stops=this.stopInterval=this.stopDelay=this.numThumbs=this.numStops=null}readCurrentTimeExtent(n){if(n)return new a({start:null!=n[0]?new Date(n[0]):null,end:null!=n[1]?new Date(n[1]):null})}writeCurrentTimeExtent(n,B,x){n&&v.setDeepValue(x,[null!=n.start?n.start.getTime():null,null!=n.end?n.end.getTime():null],B)}readFullTimeExtent(n,B){if(n= B.properties)return new a({start:null!=n.startTime?new Date(n.startTime):null,end:null!=n.endTime?new Date(n.endTime):null})}writeFullTimeExtent(n,B){if(n){B=B.properties=B.properties||{};var x=n.end;n=n.start;x&&(B.endTime=null!=x?x.getTime():null);n&&(B.startTime=null!=n?n.getTime():null)}}readStopInterval(n,B,x){return n?c.fromJSON({value:n.interval,unit:n.units},x):null}writeStopInterval(n,B,x,u){n&&(n=n.toJSON(u),v.setDeepValue("properties.timeStopInterval",{interval:n.value,units:n.unit},B))}readStops(n){return n?.length? n.map(B=>new Date(B)):null}writeStops(n,B,x){n?.length&&v.setDeepValue(x,n.map(u=>u.getTime()),B)}clone(){return new D(h.clone({currentTimeExtent:this.currentTimeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:this.numStops,numThumbs:this.numThumbs,stopDelay:this.stopDelay,stopInterval:this.stopInterval,stops:this.stops}))}};b.__decorate([q.property({type:a,json:{type:[[l.Integer,l.Null]],read:{source:"properties.currentTimeExtent"},write:{target:"properties.currentTimeExtent"}}})], d.prototype,"currentTimeExtent",void 0);b.__decorate([g.reader("currentTimeExtent")],d.prototype,"readCurrentTimeExtent",null);b.__decorate([r.writer("currentTimeExtent")],d.prototype,"writeCurrentTimeExtent",null);b.__decorate([q.property({type:a,json:{read:{source:["properties.endTime","properties.startTime"]},write:{target:{"properties.endTime":{type:Number},"properties.startTime":{type:Number}}}}})],d.prototype,"fullTimeExtent",void 0);b.__decorate([g.reader("fullTimeExtent")],d.prototype,"readFullTimeExtent", null);b.__decorate([r.writer("fullTimeExtent")],d.prototype,"writeFullTimeExtent",null);b.__decorate([q.property({type:Boolean,nonNullable:!0,json:{default:!1,read:{source:"properties.loop"},write:{target:"properties.loop"}}})],d.prototype,"loop",void 0);b.__decorate([q.property({type:l.Integer,json:{read:{source:"properties.numberOfStops"},write:{target:"properties.numberOfStops",overridePolicy(){var n=!!this.stops?.length;n=!(this.stopInterval||n);return{enabled:n,isRequired:n}}}}})],d.prototype, "numStops",void 0);b.__decorate([q.property({type:[1,2],nonNullable:!0,json:{type:l.Integer,read:{source:"properties.thumbCount"},write:{target:"properties.thumbCount",isRequired:!0}}})],d.prototype,"numThumbs",void 0);b.__decorate([q.property({type:Number,nonNullable:!0,json:{read:{source:"properties.thumbMovingRate"},write:{target:"properties.thumbMovingRate",isRequired:!0}}})],d.prototype,"stopDelay",void 0);b.__decorate([q.property({type:c,json:{read:{source:"properties.timeStopInterval"},write:{target:{"properties.timeStopInterval.interval":{type:Number}, "properties.timeStopInterval.units":{type:k.timeUnitKebabDictionary.jsonValues.filter(n=>"esriTimeUnitsUnknown"!==n)}},overridePolicy(){const n=!!this.stops?.length;return{enabled:!n,isRequired:!(null!=this.numStops||n)}}}}})],d.prototype,"stopInterval",void 0);b.__decorate([g.reader("stopInterval")],d.prototype,"readStopInterval",null);b.__decorate([r.writer("stopInterval")],d.prototype,"writeStopInterval",null);b.__decorate([q.property({type:[Date],json:{type:[l.Integer],read:{source:"properties.stops"}, write:{target:"properties.stops",overridePolicy(){return{isRequired:null==this.numStops&&!this.stopInterval}}}}})],d.prototype,"stops",void 0);b.__decorate([g.reader("stops")],d.prototype,"readStops",null);b.__decorate([r.writer("stops")],d.prototype,"writeStops",null);return d=D=b.__decorate([m.subclass("esri.webdoc.widgets.TimeSlider")],d)})},"esri/webdoc/support/thumbnailUtils":function(){define(["exports"],function(b){const a={width:600,height:400};b.getOptimalThumbnailSize=function(c,d){d=d|| a;let {width:h,height:v}=d;d=h/v;1.5>d?v=h/1.5:1.5c.width&&(v*=c.width/h,h=c.width);v>c.height&&(h*=c.height/v,v=c.height);return{width:Math.round(h),height:Math.round(v)}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webdoc/support/webdocLoadUtils":function(){define("require exports ../../Viewpoint ../../core/Error ../../core/Logger ../../geometry/support/webMercatorUtils ../../portal/Portal ../../portal/support/jsonContext ../../rest/geometryService/project ../../rest/support/ProjectParameters".split(" "), function(b,a,c,d,h,v,q,l,g,m){function r(x,u,z){const E={context:{...z,layerContainerType:"operational-layers"}};x.portalItem&&(E.context.portal=x.portalItem.portal||q.getDefault());return(new Promise((I,f)=>b(["../../layers/support/layersCreator"],I,f))).then(({populateOperationalLayers:I})=>{const f=[];var w=u.operationalLayers;w?.length&&f.push(I(x.layers,w,E));w={...E,context:{...E.context,layerContainerType:"tables"},defaultLayerType:"ArcGISFeatureLayer"};const C=u.tables;C?.length&&f.push(I(x.tables, C,w));return Promise.allSettled(f).then(()=>{})})}async function k(x,u,z){await z.load().catch(f=>{throw new d(`${x.name}:load-portal-item`,"Failed to load portal item",{error:f});});if(z.type!==x.itemType)throw new d(`${x.name}:invalid-portal-item`,`Invalid portal item type '${z.type}', expected '${x.itemType}'`,{type:z.type});var E=await z.fetchData();u.resourceInfo=E;const I=l.createForItemRead(z,x.origin);await D(x,u,E,I);u.resourceReferences={portalItem:z,paths:I.readResourcePaths};if(z=await n(u.initialViewProperties, z,h.getLogger(u)))E=u.initialViewProperties?.clone()??x.createInitialViewProperties(),E.viewpoint=z,u.initialViewProperties=E}function D(x,u,z,E){const I=x.parseVersion(z.version||"",x.name);x.currentVersion.validate(I);z.version=`${I.major}.${I.minor}`;u.read(z,E);return r(u,z,E)}async function n(x,u,z){return x?.viewpoint?.targetGeometry?null:(x=await B(x,u,z))?new c({targetGeometry:x}):null}async function B(x,u,z){x=x?.spatialReference;const E=u?.extent;if(!x||!E)return null;if(x.isWGS84)return E.clone(); if(x.isWebMercator)return v.geographicToWebMercator(E);const {getGeometryServiceURL:I}=await new Promise((f,w)=>b(["../../portal/support/geometryServiceUtils"],f,w));try{const f=await I(u),w=new m({geometries:[E],outSpatialReference:x});return(await g.project(f,w))[0]}catch(f){z.error("Error projecting item's extent:",f)}return null}a.loadFromSource=function(x,u){return u.resourceInfo?r(u,u.resourceInfo,{origin:x.origin}):u.portalItem?.id?k(x,u,u.portalItem):Promise.resolve()};Object.defineProperty(a, Symbol.toStringTag,{value:"Module"})})},"esri/portal/support/jsonContext":function(){define(["exports","../../core/urlUtils","../Portal"],function(b,a,c){function d(h,v){return{origin:v,url:a.urlToObject(h.itemUrl),portal:h.portal||c.getDefault(),portalItem:h}}b.createForItemRead=function(h,v){return{...d(h,v),readResourcePaths:[]}};b.createForItemWrite=function(h,v,q){const l=a.urlToObject(h.itemUrl);return{...d(h,v),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:l? {rootPath:l.path,writtenUrls:[]}:null,resources:q?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/rest/geometryService/project":function(){define("exports ../../request ../../core/accessorSupport/ensureType ../../geometry/support/jsonUtils ../utils ./utils ../support/ProjectParameters".split(" "),function(b,a,c,d,h,v,q){const l=c.ensureType(q);b.project=async function(g,m,r){m=l(m);g=h.parseUrl(g);const k={...g.query, f:"json",...m.toJSON()},D=m.outSpatialReference,n=d.getJsonType(m.geometries[0]);m=h.asValidOptions(k,r);return a(g.path+"/project",m).then(({data:{geometries:B}})=>v.decodeGeometries(B,n,D))};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/rest/support/ProjectParameters":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../geometry/support/jsonUtils ../../geometry/support/spatialReferenceUtils".split(" "), function(b,a,c,d,h,v,q,l,g){a=class extends a.JSONSupport{constructor(m){super(m);this.geometries=[];this.transformForward=this.transformation=this.outSpatialReference=null}toJSON(){const m=this.geometries.map(D=>D.toJSON()),r=this.geometries[0],k={};k.outSR=g.srToRESTValue(this.outSpatialReference);k.inSR=g.srToRESTValue(r.spatialReference);k.geometries=JSON.stringify({geometryType:l.getJsonType(r),geometries:m});this.transformation&&(k.transformation=this.transformation.wkid||JSON.stringify(this.transformation)); null!=this.transformForward&&(k.transformForward=this.transformForward);return k}};b.__decorate([c.property()],a.prototype,"geometries",void 0);b.__decorate([c.property({json:{read:{source:"outSR"}}})],a.prototype,"outSpatialReference",void 0);b.__decorate([c.property()],a.prototype,"transformation",void 0);b.__decorate([c.property()],a.prototype,"transformForward",void 0);return a=b.__decorate([q.subclass("esri.rest.support.ProjectParameters")],a)})},"esri/webmap/ApplicationProperties":function(){define("../chunks/tslib.es6 ../core/JSONSupport ../core/lang ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/accessorSupport/decorators/subclass ../webdoc/applicationProperties/Viewing".split(" "), function(b,a,c,d,h,v,q,l){var g;a=g=class extends a.JSONSupport{constructor(m){super(m);this.viewing=this.offline=this.editing=null}clone(){return new g(c.clone({editing:this.editing,offline:this.offline,viewing:this.viewing}))}};b.__decorate([d.property({json:{write:!0}})],a.prototype,"editing",void 0);b.__decorate([d.property({json:{write:!0}})],a.prototype,"offline",void 0);b.__decorate([d.property({type:l,json:{write:!0}})],a.prototype,"viewing",void 0);return a=g=b.__decorate([q.subclass("esri.webmap.ApplicationProperties")], a)})},"esri/webdoc/applicationProperties/Viewing":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/subclass ./Search".split(" "),function(b,a,c,d,h,v,q,l){var g;a=g=class extends a.JSONSupport{constructor(m){super(m);this.search=null}clone(){return new g(c.clone({search:this.search}))}};b.__decorate([d.property({type:l,json:{write:!0}})],a.prototype, "search",void 0);return a=g=b.__decorate([q.subclass("esri.webdoc.applicationProperties.Viewing")],a)})},"esri/webdoc/applicationProperties/Search":function(){define("../../chunks/tslib.es6 ../../core/Collection ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../core/accessorSupport/extensions/serializableProperty/writePolicyUtils ./SearchLayer ./SearchTable".split(" "), function(b,a,c,d,h,v,q,l,g,m,r,k,D){var n;const B=a.ofType(k),x=a.ofType(D);a=n=class extends c.JSONSupport{constructor(u){super(u);this.enabled=this.addressSearchEnabled=!0;this.hintText=null;this.layers=new B;this.tables=new x}readAddressSearchEnabled(u){return!u}writeAddressSearchEnabled(u,z,E){z[E]=!u}clone(){return new n(d.clone({addressSearchEnabled:this.addressSearchEnabled,enabled:this.enabled,hintText:this.hintText,layers:this.layers,tables:this.tables}))}};b.__decorate([h.property({type:Boolean, nonNullable:!0,json:{read:{source:"disablePlaceFinder"},write:{target:"disablePlaceFinder",isRequired:!0},origins:{"web-scene":{read:!1,write:!1}}}})],a.prototype,"addressSearchEnabled",void 0);b.__decorate([l.reader("addressSearchEnabled")],a.prototype,"readAddressSearchEnabled",null);b.__decorate([m.writer("addressSearchEnabled")],a.prototype,"writeAddressSearchEnabled",null);b.__decorate([h.property({type:Boolean,nonNullable:!0,json:{write:!0,origins:{"web-map":{write:{isRequired:!0}},"web-scene":{default:!0, write:!0}}}})],a.prototype,"enabled",void 0);b.__decorate([h.property({type:String,json:{write:!0}})],a.prototype,"hintText",void 0);b.__decorate([h.property({type:B,json:{write:{overridePolicy:r.writeNonEmptyCollectionPolicy},origins:{"web-scene":{write:{isRequired:!0}}}}})],a.prototype,"layers",void 0);b.__decorate([h.property({type:x,json:{read:!0,write:{overridePolicy:r.writeNonEmptyCollectionPolicy}}})],a.prototype,"tables",void 0);return a=n=b.__decorate([g.subclass("esri.webdoc.applicationProperties.Search")], a)})},"esri/core/accessorSupport/extensions/serializableProperty/writePolicyUtils":function(){define(["exports"],function(b){b.writeNonEmptyCollectionPolicy=function(a){return{enabled:!!a?.length}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/webdoc/applicationProperties/SearchLayer":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/accessorSupport/decorators/subclass ./SearchLayerField".split(" "), function(b,a,c,d,h,v,q){var l;a=l=class extends a.JSONSupport{constructor(g){super(g);this.subLayer=this.id=this.field=null}clone(){return new l(c.clone({field:this.field,id:this.id,subLayer:this.subLayer}))}};b.__decorate([d.property({type:q,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0);b.__decorate([d.property({type:String,json:{write:{isRequired:!0}}})],a.prototype,"id",void 0);b.__decorate([d.property({type:h.Integer,json:{write:!0}})],a.prototype,"subLayer",void 0);return a=l=b.__decorate([v.subclass("esri.webdoc.applicationProperties.SearchLayer")], a)})},"esri/webdoc/applicationProperties/SearchLayerField":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass ../../layers/support/fieldType".split(" "),function(b,a,c,d,h,v,q,l,g){var m;a=m=class extends a.JSONSupport{constructor(r){super(r);this.exactMatch=!1;this.type=this.name=null}clone(){return new m({exactMatch:this.exactMatch, type:this.type,name:this.name})}};b.__decorate([c.property({type:Boolean,json:{write:!0}})],a.prototype,"exactMatch",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"name",void 0);b.__decorate([q.enumeration(g.kebabDict)],a.prototype,"type",void 0);return a=m=b.__decorate([l.subclass("esri.webdoc.applicationProperties.SearchLayerField")],a)})},"esri/webdoc/applicationProperties/SearchTable":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/subclass ./SearchTableField".split(" "), function(b,a,c,d,h,v,q,l){var g;a=g=class extends a.JSONSupport{constructor(m){super(m);this.id=this.field=null}clone(){return new g(c.clone({field:this.field,id:this.id}))}};b.__decorate([d.property({type:l,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0);b.__decorate([d.property({type:String,json:{write:{isRequired:!0}}})],a.prototype,"id",void 0);return a=g=b.__decorate([q.subclass("esri.webdoc.applicationProperties.SearchTable")],a)})},"esri/webdoc/applicationProperties/SearchTableField":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/enumeration ../../core/accessorSupport/decorators/subclass ../../layers/support/fieldType".split(" "), function(b,a,c,d,h,v,q,l,g){var m;a=m=class extends a.JSONSupport{constructor(r){super(r);this.exactMatch=!1;this.type=this.name=null}clone(){return new m({exactMatch:this.exactMatch,type:this.type,name:this.name})}};b.__decorate([c.property({type:Boolean,json:{write:!0}})],a.prototype,"exactMatch",void 0);b.__decorate([c.property({type:String,json:{write:!0}})],a.prototype,"name",void 0);b.__decorate([q.enumeration(g.kebabDict)],a.prototype,"type",void 0);return a=m=b.__decorate([l.subclass("esri.webdoc.applicationProperties.SearchTableField")], a)})},"esri/webmap/Bookmark":function(){define("../chunks/tslib.es6 ../Viewpoint ../core/Error ../core/Identifiable ../core/JSONSupport ../core/lang ../core/Logger ../core/accessorSupport/decorators/property ../core/accessorSupport/decorators/cast ../core/accessorSupport/decorators/reader ../core/accessorSupport/decorators/subclass ../core/accessorSupport/decorators/writer ../core/accessorSupport/ensureType ../webdoc/support/SlideThumbnail ../webdoc/support/timeProperties".split(" "),function(b,a, c,d,h,v,q,l,g,m,r,k,D,n,B){var x;d=x=class extends d.IdentifiableMixin(h.JSONSupport){constructor(u){super(u);this.name=null;this.thumbnail=new n.SlideThumbnail;this.timeExtent=null}castThumbnail(u){return"string"===typeof u?new n.SlideThumbnail({url:u}):D.ensureType(n.SlideThumbnail,u)}set viewpoint(u){const {targetGeometry:z,scale:E}=u;null!=z&&"point"===z.type&&null==E&&q.getLogger(this).warn("Bookmark.viewpoint should include 'scale' when its targetGeometry is a point.",u);this._set("viewpoint", u)}readViewpoint(u,z){const {extent:E,viewpoint:I}=z;return a.fromJSON(I||{targetGeometry:E})}writeViewpoint(u,z,E,I){if(u){var {targetGeometry:f}=u;null!=f&&"extent"!==f.type?I?.messages?I.messages.push(new c("property:unsupported","Bookmark.viewpoint cannot be written to JSON when the viewpoint's targetGeometry is not an extent.")):q.getLogger(this).error("Bookmark.viewpoint cannot be written to JSON when the viewpoint's targetGeometry is not an extent."):(null!=f&&(z.extent=f.toJSON()),z[E]=u.toJSON())}}clone(){return new x(v.clone({name:this.name, thumbnail:this.thumbnail,timeExtent:this.timeExtent,viewpoint:this.viewpoint}))}};b.__decorate([l.property({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],d.prototype,"name",void 0);b.__decorate([l.property({type:n.SlideThumbnail,json:{write:{overridePolicy(u){return{enabled:!(!u||!u.url)}}}}})],d.prototype,"thumbnail",void 0);b.__decorate([g.cast("thumbnail")],d.prototype,"castThumbnail",null);b.__decorate([l.property(B.timeExtent)],d.prototype,"timeExtent",void 0);b.__decorate([l.property({type:a, nonNullable:!0,json:{write:!0}})],d.prototype,"viewpoint",null);b.__decorate([m.reader("viewpoint",["extent","viewpoint"])],d.prototype,"readViewpoint",null);b.__decorate([k.writer("viewpoint")],d.prototype,"writeViewpoint",null);return d=x=b.__decorate([r.subclass("esri.webmap.Bookmark")],d)})},"esri/webdoc/support/SlideThumbnail":function(){define("exports ../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../widgets/Bookmarks/bookmarkUtils".split(" "), function(b,a,c,d,h,v,q,l,g){var m;b.SlideThumbnail=m=class extends c.JSONSupport{constructor(){super(...arguments);this.url=""}destroy(){this.url=""}get isSecureUrl(){return g.isSecureUrl(this.url)}get isDataURI(){return g.isDataURI(this.url)}clone(){return new m({url:this.url})}};a.__decorate([d.property({type:String,json:{write:{isRequired:!0}}})],b.SlideThumbnail.prototype,"url",void 0);a.__decorate([d.property()],b.SlideThumbnail.prototype,"isSecureUrl",null);a.__decorate([d.property()],b.SlideThumbnail.prototype, "isDataURI",null);b.SlideThumbnail=m=a.__decorate([l.subclass("esri.webdoc.support.SlideThumbnail")],b.SlideThumbnail);Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Bookmarks/bookmarkUtils":function(){define(["exports"],function(b){b.ThumbnailInputPattern="https://.*";b.isDataURI=function(a){return a?/data:([-\w]+\/[-+\w.]+)?(;?\w+=[-\w]+)*(;base64)?,.*/gu.test(a):!1};b.isSecureUrl=function(a){return a?/^https:\/\/.*/i.test(a):!1};Object.defineProperty(b,Symbol.toStringTag, {value:"Module"})})},"esri/webdoc/support/timeProperties":function(){define(["exports","../../TimeExtent","../../core/Error","../../core/accessorSupport/ensureType"],function(b,a,c,d){b.timeExtent={type:a,json:{read:{source:"timeExtent",reader:h=>h?Array.isArray(h)?a.fromArray(h):a.fromJSON(h):null},write:{writer:(h,v,q,l)=>{h&&(h.isEmpty?l?.messages&&l.messages.push(new c("invalid-timeExtent","TimeExtent cannot be empty")):v[q]=h.toArray())},target:{timeExtent:{type:[[d.Integer,d.Null]]}}}}};Object.defineProperty(b, Symbol.toStringTag,{value:"Module"})})},"esri/webmap/InitialViewProperties":function(){define("../chunks/tslib.es6 ../Viewpoint ../core/Accessor ../core/Clonable ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../geometry/SpatialReference ../time/timeZoneUtils ../webdoc/RangeInfo ./background/ColorBackground".split(" "),function(b,a,c,d,h,v,q,l,g,m,r,k,D){c=class extends d.ClonableMixin(c){constructor(n){super(n); this.spatialReference=this.rangeInfo=this.background=null;this.timeZone=r.system;this.viewpoint=null}};b.__decorate([h.property({type:D})],c.prototype,"background",void 0);b.__decorate([h.property({type:k})],c.prototype,"rangeInfo",void 0);b.__decorate([h.property({type:m})],c.prototype,"spatialReference",void 0);b.__decorate([h.property({nonNullable:!0})],c.prototype,"timeZone",void 0);b.__decorate([h.property({type:a})],c.prototype,"viewpoint",void 0);return c=b.__decorate([g.subclass("esri.webmap.InitialViewProperties")], c)})},"esri/webmap/background/ColorBackground":function(){define("../../chunks/tslib.es6 ../../Color ../../core/JSONSupport ../../core/lang ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,c,d,h,v,q,l){var g;c=g=class extends c.JSONSupport{constructor(m){super(m);this.color=new a([0,0,0,1])}clone(){return new g(d.clone({color:this.color}))}};b.__decorate([h.property({type:a,json:{write:!0}})],c.prototype, "color",void 0);return c=g=b.__decorate([l.subclass("esri.webmap.background.ColorBackground")],c)})},"esri/webmap/Version":function(){define(["exports","../core/Version"],function(b,a){class c extends a.Version{constructor(d,h){super(d,h,"webmap")}}b.Version=c;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"*noref":1}}); define("require ./chunks/tslib.es6 ./kernel ./Map ./Viewpoint ./core/arrayUtils ./core/Collection ./core/Error ./core/Loadable ./core/loadAll ./core/Logger ./core/maybe ./core/MultiOriginJSONSupport ./core/Promise ./core/promiseUtils ./core/reactiveUtils ./core/urlUtils ./core/accessorSupport/decorators/property ./core/has ./core/accessorSupport/decorators/reader ./core/accessorSupport/decorators/subclass ./core/accessorSupport/decorators/writer ./core/accessorSupport/read ./geometry/SpatialReference ./networks/UtilityNetwork ./portal/PortalItem ./portal/support/portalItemUtils ./support/MapFloorInfo ./webdoc/GeotriggersInfo ./webdoc/interfaces ./webdoc/RangeInfo ./webdoc/Widgets ./webdoc/support/thumbnailUtils ./webdoc/support/webdocLoadUtils ./webdoc/support/writeUtils ./webmap/ApplicationProperties ./webmap/Bookmark ./webmap/InitialViewProperties ./webmap/Version ./webmap/background/ColorBackground".split(" "),function(b, a,c,d,h,v,q,l,g,m,r,k,D,n,B,x,u,z,E,I,f,w,C,A,y,p,H,G,L,M,J,N,O,Q,W,X,S,P,R,T){const V=new R.Version(2,31),Z=q.ofType(S);q=q.ofType(y);const aa=new Map([["image/jpeg","jpeg"],["image/jpg","jpg"],["image/png","png"],["image/gif","gif"]]),ba=H.typeKeyword.JSAPI,Y={currentVersion:V,createInitialViewProperties:()=>new P,parseVersion:R.Version.parse,itemType:"Web Map",name:"webmap",origin:"web-map"};d=class extends D.MultiOriginJSONMixin(g.LoadableMixin(n.EsriPromiseMixin(d))){constructor(e){super(e); this._isAuthoringAppVersionSetByUser=this._isAuthoringAppSetByUser=!1;this._updateFromPromise=this._thumbnailFilename=null;this.resourceReferences={portalItem:null,paths:[]};this.applicationProperties=null;this.bookmarks=new Z;this.geotriggersInfo=this.floorInfo=null;this.initialViewProperties=new P;this.utilityNetworks=this.widgets=this.sourceVersion=this.presentation=this.portalItem=this.ipsInfo=null;this._debouncedSaveOperations=B.debounce(async(t,F,K)=>{const {save:U,saveAs:ca}=await new Promise((da, ea)=>b(["./webdoc/support/webdocSaveUtils"],da,ea));switch(t){case M.SaveOperationType.SAVE:return U(Y,this,F);case M.SaveOperationType.SAVE_AS:return ca(Y,this,K,F)}});this.authoringApp=this.authoringAppVersion=null;this._isAuthoringAppSetByUser=this._isAuthoringAppVersionSetByUser=!1}destroy(){this.portalItem=k.destroyMaybe(this.portalItem);if(this.utilityNetworks){const e=this.utilityNetworks.removeAll();for(const t of e)t.destroy();this.utilityNetworks.destroy()}}initialize(){this.when().catch(e=> {r.getLogger(this).error("#load()","Failed to load web map",e)});if(this.resourceInfo){let e;try{e=this._validateJSON(this.resourceInfo)}catch(t){this.addResolvingPromise(Promise.reject(t));return}this.read(e)}}set authoringApp(e){this._isAuthoringAppSetByUser=!0;this._set("authoringApp",e)}writeAuthoringApp(e,t){t.authoringApp=e&&this._isAuthoringAppSetByUser?e:ba}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0;this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,t){t.authoringAppVersion= e&&this._isAuthoringAppVersionSetByUser?e:c.version}readInitialViewProperties(e,t){e=new P;t.background&&(e.background=T.fromJSON(t.background));const F=t.initialState?.viewpoint;F&&(F.rotation&&R.Version.parse(t.version||"","webmap").lessThan(2,20)&&"ArcGIS Pro"===t.authoringApp&&(F.rotation*=-1),e.viewpoint=h.fromJSON(F));t.mapRangeInfo&&(e.rangeInfo=J.fromJSON(t.mapRangeInfo));t.spatialReference&&(e.spatialReference=A.fromJSON(t.spatialReference));t.timeZone&&(e.timeZone=t.timeZone);return e}writeInitialViewProperties(e, t,F,K){e&&(e.background?.color&&(t.background=e.background.write({},K)),e.viewpoint&&(t.initialState={viewpoint:e.viewpoint.write({},K)}),e.rangeInfo&&(t.mapRangeInfo=e.rangeInfo.toJSON(K)),e.spatialReference&&(t.spatialReference=e.spatialReference.write({},K)),t.timeZone=e.timeZone)}writeLayers(e,t,F,K){t[F]=this._writeLayers(e,K,"operational-layers")}readSourceVersion(e,t){const [F,K]=t.version.split(".");return new R.Version(parseInt(F,10),parseInt(K,10))}writeSourceVersion(e,t,F){t[F]=`${V.major}.${V.minor}`}writeTables(e, t,F,K){e=this._writeLayers(e,K,"tables");e.length&&(t[F]=e)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl||null}set thumbnailUrl(e){e?(this._override("thumbnailUrl",e),this._thumbnailFilename=this._generateCustomThumbnailFilename(e)):this._clearThumbnailOverride()}get updatingFromView(){return!!this._updateFromPromise}load(e){this.addResolvingPromise(Q.loadFromSource(Y,this));return Promise.resolve(this)}loadAll(){return m.loadAll(this,e=>{e(this.ground,this.basemap,this.layers,this.tables)})}read(e, t){t={...t,origin:"web-map"};const F=this._getAuthoringPropsState();C.readLoadable(this,e,K=>super.read(e,K),t);this._restoreAuthoringPropsFromState(F)}write(e,t){if("loaded"!==this.loadStatus)throw e=new l("webmap:not-loaded","Web map must be loaded before it can be serialized"),r.getLogger(this).error("#toJSON()","Web map must be loaded before it can be serialized",this.loadError||this.loadStatus),e;this._removeDanglingLayerRefs();t={...t,origin:"web-map",restrictedWebMapWriting:!0,webmap:this}; return super.write(e,t)}async save(e){return this._debouncedSaveOperations(M.SaveOperationType.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(M.SaveOperationType.SAVE_AS,t,e)}async updateFrom(e,t){this._updateFromPromise=e=this._updateFromInternal(e,t);await e;e===this._updateFromPromise&&(this._updateFromPromise=null)}getLayerJSONFromResourceInfo(e){const t=this.resourceInfo;return this._collectAllLayersJSON([...(t?.baseMap?.baseMapLayers||[]),...(t?.operationalLayers||[]),...(this.basemap?.resourceInfo?.data?.baseMapLayers|| [])]).find(F=>F.id===e.id)}async updateItemThumbnail(){this.thumbnailUrl&&this._isOverridden("thumbnailUrl")&&(await this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl,filename:this._thumbnailFilename}),this._clearThumbnailOverride())}getThumbnailState(){let e=this.thumbnailUrl;e&&=this._isOverridden("thumbnailUrl")?e:u.addQueryParameter(e,"w","8192");return{thumbnailUrl:e,filename:this._thumbnailFilename}}restoreThumbnailFromState(e){this.thumbnailUrl=e.thumbnailUrl;this._thumbnailFilename= e.filename}_collectAllLayersJSON(e){return e.reduce((t,F)=>{t.push(F);"GroupLayer"===F.layerType&&(t=t.concat(this._collectAllLayersJSON(F.layers||[])));return t},[])}_writeLayers(e,t,F){t={...t,layerContainerType:F};return e.map(K=>W.getLayerJSON(K,"tables"===F?null:this.getLayerJSONFromResourceInfo(K),t)).filter(v.isSome).toArray()}_validateJSON(e){const t=R.Version.parse(e.version||"","webmap");V.validate(t);e.version=`${t.major}.${t.minor}`;return e}_removeDanglingLayerRefs(){var e=this.applicationProperties, t=e?.viewing?.search;const F=K=>this.allLayers.some(U=>U.id===K);t?.layers&&(t.layers=t.layers.filter(K=>F(K.id)));t?.tables&&(t.tables=t.tables.filter(K=>this.tables.some(U=>U.id===K.id)));e&&(t=e.editing?.locationTracking,t?.info&&!F(t.info.layerId)&&(e.editing=null));(e=this.presentation?.slides)&&e.forEach(K=>{K.visibleLayers&&(K.visibleLayers=K.visibleLayers.filter(U=>F(U.id)))})}async _updateFromInternal(e,t){t??={};await x.whenOnce(()=>e.ready);this._updateInitialViewProperties(e,t);if(e.map=== this)for(const F of e.allLayerViews)"visible"in F&&"visible"in F.layer&&F._isOverridden("visible")&&(F.layer.visible=F.visible),"featureEffect"in F&&"featureEffect"in F.layer&&F._isOverridden("featureEffect")&&(F.layer.featureEffect=F.featureEffect);await this._updateThumbnailUrl(e,t)}_updateInitialViewProperties(e,t){t.backgroundExcluded||(this.initialViewProperties.background=e.background?.clone());this.initialViewProperties.spatialReference=e.spatialReference?.clone();this.initialViewProperties.timeZone= e.timeZone;t.viewpointExcluded||(this.initialViewProperties.viewpoint=new h({rotation:e.rotation,scale:t.scalePreserved?e.scale:null,targetGeometry:this._getViewExtent(e)}));if(!t.widgetsExcluded)for(const F of e.persistableViewModels)F.updateWebDocument(this)}_getViewExtent(e){const t=e.center.clone().normalize();e=e.extent.clone();const F=e.width/2;e.xmin=t.x-F;e.xmax=t.x+F;return e}async _updateThumbnailUrl(e,t){t.thumbnailExcluded||(t=O.getOptimalThumbnailSize(e,t.thumbnailSize),e=await e.takeScreenshot({format:"png", width:t.width,height:t.height}),this._setAutoGeneratedThumbnail(e.dataUrl))}_setAutoGeneratedThumbnail(e){this.thumbnailUrl=e;this._thumbnailFilename=null}_clearThumbnailOverride(){this._clearOverride("thumbnailUrl");this.clear("thumbnailUrl","user");this._thumbnailFilename=null}_generateCustomThumbnailFilename(e){if(u.isDataProtocol(e)){e=(e=u.dataComponents(e)?.mediaType)&&aa.get(e.toLowerCase())||null;const t=`thumbnail${Date.now()}`;return e?`${t}.${e}`:t}return null}_getAuthoringPropsState(){return{authoringApp:this.authoringApp, authoringAppVersion:this.authoringAppVersion,isAuthoringAppSetByUser:this._isAuthoringAppSetByUser,isAuthoringAppVersionSetByUser:this._isAuthoringAppVersionSetByUser}}_restoreAuthoringPropsFromState(e){e.isAuthoringAppSetByUser?this.authoringApp=e.authoringApp:this._isAuthoringAppSetByUser=!1;e.isAuthoringAppVersionSetByUser?this.authoringAppVersion=e.authoringAppVersion:this._isAuthoringAppVersionSetByUser=!1}static fromJSON(e){if(!e)throw new l("webmap:empty-resource","Expected a JSON resource but got nothing"); return new this({resourceInfo:e})}};d.VERSION=V;a.__decorate([z.property()],d.prototype,"_updateFromPromise",void 0);a.__decorate([z.property({type:X,json:{write:!0}})],d.prototype,"applicationProperties",void 0);a.__decorate([z.property({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],d.prototype,"authoringApp",null);a.__decorate([w.writer("authoringApp")],d.prototype,"writeAuthoringApp",null);a.__decorate([z.property({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],d.prototype, "authoringAppVersion",null);a.__decorate([w.writer("authoringAppVersion")],d.prototype,"writeAuthoringAppVersion",null);a.__decorate([z.property({type:Z,json:{write:{overridePolicy(e){return{enabled:!!(e&&0