@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 35.9 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2869],{37838(t,e,o){o.d(e,{A:()=>Yt});var i,r=o(5482),s=o(69540),n=o(7762),l=o(25482),a=o(4718),p=o(53966),d=o(74887),u=o(91429),c=o(56507),y=o(30524),h=o(89893),m=o(84424);let g=i=class extends m.A{constructor(t){super(t),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new i({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?(0,a.o8)(this.outFields):null})}};(0,r.Cg)([(0,u.MZ)()],g.prototype,"creator",void 0),(0,r.Cg)([(0,u.MZ)()],g.prototype,"destroyer",void 0),(0,r.Cg)([(0,u.MZ)()],g.prototype,"outFields",void 0),(0,r.Cg)([(0,u.MZ)({type:["custom"],readOnly:!0})],g.prototype,"type",void 0),g=i=(0,r.Cg)([(0,u.$K)("esri.popup.content.CustomContent")],g);const f=g;var w;let v=w=class extends l.o{constructor(t){super(t),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new w({title:this.title,expression:this.expression})}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"title",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"expression",void 0),(0,r.Cg)([(0,u.MZ)({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],v.prototype,"returnType",void 0),v=w=(0,r.Cg)([(0,u.$K)("esri.popup.ElementExpressionInfo")],v);const C=v;var M;let x=M=class extends m.A{constructor(t){super(t),this.expressionInfo=null,this.type="expression"}clone(){return new M({expressionInfo:this.expressionInfo?.clone()})}};(0,r.Cg)([(0,u.MZ)({type:C,json:{write:!0}})],x.prototype,"expressionInfo",void 0),(0,r.Cg)([(0,u.MZ)({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],x.prototype,"type",void 0),x=M=(0,r.Cg)([(0,u.$K)("esri.popup.content.ExpressionContent")],x);const F=x;var Z=o(66159);let I=class extends l.o{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],I.prototype,"altText",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],I.prototype,"caption",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],I.prototype,"title",void 0),(0,r.Cg)([(0,u.MZ)({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],I.prototype,"type",void 0),I=(0,r.Cg)([(0,u.$K)("esri.popup.content.mixins.MediaInfo")],I);const j=I;var A,b=o(68197),N=o(69622);let S=A=class extends N.A{constructor(t){super(t),this.color=null,this.fieldName=null,this.tooltip=null,this.value=null}clone(){return new A({color:this.color?.clone(),fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};(0,r.Cg)([(0,u.MZ)()],S.prototype,"color",void 0),(0,r.Cg)([(0,u.MZ)()],S.prototype,"fieldName",void 0),(0,r.Cg)([(0,u.MZ)()],S.prototype,"tooltip",void 0),(0,r.Cg)([(0,u.MZ)()],S.prototype,"value",void 0),S=A=(0,r.Cg)([(0,u.$K)("esri.popup.content.support.ChartMediaInfoValueSeries")],S);const R=S;var _;let O=_=class extends l.o{constructor(t){super(t),this.colors=null,this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new _({colors:(0,a.o8)(this.colors),fields:(0,a.o8)(this.fields),normalizeField:this.normalizeField,series:(0,a.o8)(this.series),tooltipField:this.tooltipField})}};(0,r.Cg)([(0,u.MZ)({type:[b.A],json:{type:[[c.jz]],write:!0}})],O.prototype,"colors",void 0),(0,r.Cg)([(0,u.MZ)({type:[String],json:{write:{isRequired:!0}}})],O.prototype,"fields",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],O.prototype,"normalizeField",void 0),(0,r.Cg)([(0,u.MZ)({type:[R],json:{read:!1}})],O.prototype,"series",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],O.prototype,"tooltipField",void 0),O=_=(0,r.Cg)([(0,u.$K)("esri.popup.content.support.ChartMediaInfoValue")],O);const T=O;let $=class extends j{constructor(t){super(t),this.type=null,this.value=void 0}};(0,r.Cg)([(0,u.MZ)({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],$.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)({type:T,json:{write:{isRequired:!0}}})],$.prototype,"value",void 0),$=(0,r.Cg)([(0,u.$K)("esri.popup.content.mixins.ChartMediaInfo")],$);const K=$,E=(0,o(66552).O)()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"});var B;let k=B=class extends K{constructor(t){super(t),this.type="bar-chart"}clone(){return new B({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};(0,r.Cg)([(0,u.MZ)({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:{writer:E.write,isRequired:!0}}})],k.prototype,"type",void 0),k=B=(0,r.Cg)([(0,u.$K)("esri.popup.content.BarChartMediaInfo")],k);const J=k;var q;let D=q=class extends K{constructor(t){super(t),this.type="column-chart"}clone(){return new q({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};(0,r.Cg)([(0,u.MZ)({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:{writer:E.write,isRequired:!0}}})],D.prototype,"type",void 0),D=q=(0,r.Cg)([(0,u.$K)("esri.popup.content.ColumnChartMediaInfo")],D);const U=D;var L;let W=L=class extends l.o{constructor(t){super(t),this.linkURL=null,this.sourceURL=null}clone(){return new L({linkURL:this.linkURL,sourceURL:this.sourceURL})}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],W.prototype,"linkURL",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],W.prototype,"sourceURL",void 0),W=L=(0,r.Cg)([(0,u.$K)("esri.popup.content.support.ImageMediaInfoValue")],W);const z=W;var P;let G=P=class extends j{constructor(t){super(t),this.refreshInterval=0,this.type="image",this.value=void 0}clone(){return new P({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?.clone()})}};(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],G.prototype,"refreshInterval",void 0),(0,r.Cg)([(0,u.MZ)({type:["image"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],G.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)({type:z,json:{write:{isRequired:!0}}})],G.prototype,"value",void 0),G=P=(0,r.Cg)([(0,u.$K)("esri.popup.content.ImageMediaInfo")],G);const V=G;var H;let X=H=class extends K{constructor(t){super(t),this.type="line-chart"}clone(){return new H({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};(0,r.Cg)([(0,u.MZ)({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:{writer:E.write,isRequired:!0}}})],X.prototype,"type",void 0),X=H=(0,r.Cg)([(0,u.$K)("esri.popup.content.LineChartMediaInfo")],X);const Q=X;var Y;let tt=Y=class extends K{constructor(t){super(t),this.type="pie-chart"}clone(){return new Y({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};(0,r.Cg)([(0,u.MZ)({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:{writer:E.write,isRequired:!0}}})],tt.prototype,"type",void 0),tt=Y=(0,r.Cg)([(0,u.$K)("esri.popup.content.PieChartMediaInfo")],tt);const et=tt,ot={base:j,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":J,"column-chart":U,"line-chart":Q,"pie-chart":et,image:V}};var it,rt=o(36005),st=o(43937);let nt=it=class extends m.A{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map(t=>"image"===t.type?V.fromJSON(t):"barchart"===t.type?J.fromJSON(t):"columnchart"===t.type?U.fromJSON(t):"linechart"===t.type?Q.fromJSON(t):"piechart"===t.type?et.fromJSON(t):void 0).filter(Boolean)}writeMediaInfos(t,e){e.mediaInfos=t&&t.map(t=>t.toJSON())}clone(){return new it((0,a.o8)({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};(0,r.Cg)([(0,u.MZ)()],nt.prototype,"activeMediaInfoIndex",void 0),(0,r.Cg)([(0,u.MZ)({type:Object,json:{write:!0}})],nt.prototype,"attributes",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],nt.prototype,"description",void 0),(0,r.Cg)([(0,u.MZ)({types:[ot]})],nt.prototype,"mediaInfos",void 0),(0,r.Cg)([(0,rt.w)("mediaInfos")],nt.prototype,"readMediaInfos",null),(0,r.Cg)([(0,st.K)("mediaInfos")],nt.prototype,"writeMediaInfos",null),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],nt.prototype,"title",void 0),(0,r.Cg)([(0,u.MZ)({type:["media"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],nt.prototype,"type",void 0),nt=it=(0,r.Cg)([(0,u.$K)("esri.popup.content.MediaContent")],nt);const lt=nt;var at=o(49852);let pt=class extends((0,s.OU)(m.A)){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],pt.prototype,"description",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,json:{type:c.jz,write:!0}})],pt.prototype,"displayCount",void 0),(0,r.Cg)([(0,u.MZ)({type:["list"],json:{write:{isRequired:!0}}})],pt.prototype,"displayType",void 0),(0,r.Cg)([(0,u.MZ)({type:[at.A],json:{write:!0}})],pt.prototype,"orderByFields",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,json:{type:c.jz,write:{isRequired:!0}}})],pt.prototype,"relationshipId",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],pt.prototype,"title",void 0),(0,r.Cg)([(0,u.MZ)({type:["relationship"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],pt.prototype,"type",void 0),pt=(0,r.Cg)([(0,u.$K)("esri.popup.content.RelationshipContent")],pt);const dt=pt;var ut;let ct=ut=class extends m.A{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new ut({text:this.text})}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],ct.prototype,"text",void 0),(0,r.Cg)([(0,u.MZ)({type:["text"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],ct.prototype,"type",void 0),ct=ut=(0,r.Cg)([(0,u.$K)("esri.popup.content.TextContent")],ct);const yt=ct;var ht=o(83342),mt=o(93223);let gt=class extends((0,s.OU)(m.A)){constructor(t){super(t),this.description=null,this.displayCount=null,this.title=null,this.associationTypes=[],this.type="utility-network-associations"}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],gt.prototype,"description",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,json:{type:c.jz,write:!0}})],gt.prototype,"displayCount",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],gt.prototype,"title",void 0),(0,r.Cg)([(0,u.MZ)({type:[ht.A],json:{write:!0}})],gt.prototype,"associationTypes",void 0),(0,r.Cg)([(0,mt.e)({utilityNetworkAssociations:"utility-network-associations"})],gt.prototype,"type",void 0),gt=(0,r.Cg)([(0,u.$K)("esri.popup.content.UtilityNetworkAssociationsContent")],gt);const ft=gt,wt=h.A,vt=m.A,Ct=f,Mt=F,xt=Z.A,Ft=lt,Zt=dt,It=yt,jt=ft,At={base:null,key:"type",typeMap:{attachment:wt,media:Ft,text:It,expression:Mt,field:xt,relationship:Zt,utilityNetworkAssociations:jt}},bt={base:null,key:"type",typeMap:{attachment:wt,media:Ft,text:It,expression:Mt,field:xt,relationship:Zt}};var Nt,St=o(93705),Rt=o(41227);let _t=Nt=class extends l.o{constructor(t){super(t),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new Nt({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};(0,r.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],_t.prototype,"returnTopmostRaster",void 0),(0,r.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],_t.prototype,"showNoDataRecords",void 0),_t=Nt=(0,r.Cg)([(0,u.$K)("esri.popup.LayerOptions")],_t);const Ot=_t;var Tt;let $t=Tt=class extends l.o{constructor(t){super(t),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new Tt({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?(0,a.o8)(this.orderByFields):null})}};(0,r.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],$t.prototype,"showRelatedRecords",void 0),(0,r.Cg)([(0,u.MZ)({type:[at.A],json:{write:!0}})],$t.prototype,"orderByFields",void 0),$t=Tt=(0,r.Cg)([(0,u.$K)("esri.popup.RelatedRecordsInfo")],$t);const Kt=$t;var Et=o(4902);let Bt=class extends((0,Et.s)(N.A)){constructor(t){super(t),this.active=!1,this.className=null,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}};(0,r.Cg)([(0,u.MZ)()],Bt.prototype,"active",void 0),(0,r.Cg)([(0,u.MZ)()],Bt.prototype,"className",void 0),(0,r.Cg)([(0,u.MZ)()],Bt.prototype,"disabled",void 0),(0,r.Cg)([(0,u.MZ)()],Bt.prototype,"icon",void 0),(0,r.Cg)([(0,u.MZ)()],Bt.prototype,"id",void 0),(0,r.Cg)([(0,u.MZ)()],Bt.prototype,"indicator",void 0),(0,r.Cg)([(0,u.MZ)()],Bt.prototype,"title",void 0),(0,r.Cg)([(0,u.MZ)()],Bt.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)()],Bt.prototype,"visible",void 0),Bt=(0,r.Cg)([(0,u.$K)("esri.support.actions.ActionBase")],Bt);const kt=Bt;var Jt;let qt=Jt=class extends kt{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new Jt({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};(0,r.Cg)([(0,u.MZ)()],qt.prototype,"image",void 0),qt=Jt=(0,r.Cg)([(0,u.$K)("esri.support.actions.ActionButton")],qt);const Dt=qt;var Ut;let Lt=Ut=class extends kt{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new Ut({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};(0,r.Cg)([(0,u.MZ)()],Lt.prototype,"image",void 0),(0,r.Cg)([(0,u.MZ)()],Lt.prototype,"value",void 0),Lt=Ut=(0,r.Cg)([(0,u.$K)("esri.support.actions.ActionToggle")],Lt);const Wt=Lt,zt="relationships/",Pt="expression/",Gt=n.A.ofType({key:"type",defaultKeyValue:"button",base:kt,typeMap:{button:Dt,toggle:Wt}}),Vt={base:vt,key:"type",typeMap:{media:Ft,custom:Ct,text:It,attachments:wt,fields:xt,expression:Mt,relationship:Zt,utilityNetworkAssociations:jt}},Ht=new Set(["attachments","fields","media","text","expression","relationship"]),Xt=new Set([...Ht,"utility-network-associations"]);let Qt=class extends((0,s.OU)(l.o)){constructor(t){super(t),this.actions=null,this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}get content(){return this._get("content")??""}set content(t){this._set("content",t)}castContent(t){return Array.isArray(t)?t.map(t=>(0,c.aq)(Vt,t)):"string"==typeof t||"function"==typeof t||t instanceof HTMLElement||(0,d.$X)(t)?t:(p.A.getLogger(this).error("content error","unsupported content value",{value:t}),null)}readContent(t,e){const{popupElements:o}=e;return Array.isArray(o)&&o.length>0?this._readPopupInfoElements(e.description,e.mediaInfos,o):this._readPopupInfo(e)}writeWebSceneContent(t,e,o,i){this._writePopupTemplateContent(t,e,i)}writeWebMapContent(t,e,o,i){this._writePopupTemplateContent(t,e,i)}writeFieldInfos(t,e,o,i){const{content:r}=this,s=Array.isArray(r)?r:null,{writeFieldFormat:n,...l}=i||{};if(t){const o=s?s.filter(t=>"fields"===t.type):[],i=o.length&&o.every(t=>t.fieldInfos?.length);e.fieldInfos=t.filter(Boolean).map(t=>{const e=t.toJSON(l);return i&&(e.visible=!1),e})}if(s)for(const t of s)"fields"===t.type&&this._writeFieldsContent(t,e,l)}writeLayerOptions(t,e,o,i){e[o]=!t||null===t.showNoDataRecords&&null===t.returnTopmostRaster?null:t.toJSON(i)}writeTitle(t,e){e.title=t||""}async collectRequiredFields(t,e,o){const i=this.expressionInfos||[];await this._collectExpressionInfoFields(t,e,o,[...i,...this._getContentExpressionInfos(this.content,i)]),(0,y._w)(t,e,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(t,e){const o=new Set;return await this.collectRequiredFields(o,t,e),[...o].sort()}_writePopupTemplateContent(t,e,o){"string"!=typeof t?Array.isArray(t)&&(e.popupElements=t.filter(t=>"web-scene"===o?.origin?Ht.has(t.type):Xt.has(t.type)).map(t=>t?.toJSON(o)),e.popupElements.forEach(t=>{"attachments"===t.type?this._writeAttachmentContent(e):"media"===t.type?this._writeMediaContent(t,e):"text"===t.type?this._writeTextContent(t,e):"relationship"===t.type&&this._writeRelationshipContent(t,e)})):e.description=t}_writeFieldsContent(t,e,o){const i=t.fieldInfos;if(!Array.isArray(i)||!i.length)return;const r=e.fieldInfos;if(Array.isArray(r))for(const t of i){const e=r.find(e=>e.fieldName?.toLowerCase()===t.fieldName?.toLowerCase());e?e.visible=!0:r.push(t.toJSON(o))}else e.fieldInfos=i.map(t=>t.toJSON(o))}_writeAttachmentContent(t){t.showAttachments||(t.showAttachments=!0)}_writeRelationshipContent(t,e){const o=t.orderByFields?.map(e=>this._toFieldOrderJSON(e,t.relationshipId))||[],i=[...e.relatedRecordsInfo?.orderByFields||[],...o];e.relatedRecordsInfo={showRelatedRecords:!0,...i?.length&&{orderByFields:i}}}_writeTextContent(t,e){!e.description&&t.text&&(e.description=t.text)}_writeMediaContent(t,e){if(!Array.isArray(t.mediaInfos)||!t.mediaInfos.length)return;const o=(0,a.o8)(t.mediaInfos);Array.isArray(e.mediaInfos)?e.mediaInfos=[...e.mediaInfos,...o]:e.mediaInfos=o}_readPopupInfoElements(t,e,o){const i={description:!1,mediaInfos:!1};return o.map(o=>"media"===o.type?(o.mediaInfos||!e||i.mediaInfos||(o.mediaInfos=e,i.mediaInfos=!0),Ft.fromJSON(o)):"text"===o.type?(o.text||!t||i.description||(o.text=t,i.description=!0),It.fromJSON(o)):"attachments"===o.type?wt.fromJSON(o):"fields"===o.type?xt.fromJSON(o):"expression"===o.type?Mt.fromJSON(o):"relationship"===o.type?Zt.fromJSON(o):"utilityNetworkAssociations"===o.type?jt.fromJSON(o):void 0).filter(Boolean)}_toRelationshipContent(t){const{field:e,order:o}=t;if(!e?.startsWith(zt))return null;const i=e.replace(zt,"").split("/");if(2!==i.length)return null;const r=parseInt(i[0],10),s=i[1];return!Number.isNaN(r)&&s?Zt.fromJSON({relationshipId:r,orderByFields:[{field:s,order:o}]}):null}_toFieldOrderJSON(t,e){const{order:o,field:i}=t;return{field:`${zt}${e}/${i}`,order:o}}_readPopupInfo({description:t,mediaInfos:e,showAttachments:o,relatedRecordsInfo:i={showRelatedRecords:!1}}){const r=[];t?r.push(new It({text:t})):r.push(new xt),Array.isArray(e)&&e.length&&r.push(Ft.fromJSON({mediaInfos:e})),o&&r.push(wt.fromJSON({displayType:"auto"}));const{showRelatedRecords:s,orderByFields:n}=i;return s&&n?.length&&n.forEach(t=>{const e=this._toRelationshipContent(t);e&&r.push(e)}),r.length?r:t}_getContentElementFields(t){const e=t?.type;if("attachments"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)];if("custom"===e)return t.outFields||[];if("fields"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...this._getFieldInfoFields(t.fieldInfos??this.fieldInfos)];if("media"===e){const e=t.mediaInfos||[];return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...e.reduce((t,e)=>[...t,...this._getMediaInfoFields(e)],[])]}return"text"===e?this._extractFieldNames(t.text):"relationship"===e||"utility-network-associations"===e?[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)]:[]}_getMediaInfoFields(t){const{caption:e,title:o,value:i}=t,r=i||{},{fields:s,normalizeField:n,tooltipField:l,sourceURL:a,linkURL:p}=r,d=[...this._extractFieldNames(o),...this._extractFieldNames(e),...this._extractFieldNames(a),...this._extractFieldNames(p),...s??[]];return n&&d.push(n),l&&d.push(l),d}_getContentExpressionInfos(t,e){return Array.isArray(t)?t.reduce((t,e)=>[...t,..."expression"===e.type&&e.expressionInfo?[e.expressionInfo]:[]],e):[]}_getContentFields(t){return"string"==typeof t?this._extractFieldNames(t):Array.isArray(t)?t.reduce((t,e)=>[...t,...this._getContentElementFields(e)],[]):[]}async _collectExpressionInfoFields(t,e,o,i){i&&await Promise.all(i.map(i=>(0,y.Dx)(t,e,o,i.expression)))}_getFieldInfoFields(t){return t?t.filter(({fieldName:t,visible:e})=>!(void 0!==e&&!e||!t||t.startsWith(zt)||t.startsWith(Pt))).map(t=>t.fieldName):[]}_getActionsFields(t){return t?t.toArray().reduce((t,e)=>[...t,...this._getActionFields(e)],[]):[]}_getActionFields(t){const{className:e,title:o,type:i}=t,r="button"===i||"toggle"===i?t.image:"";return[...this._extractFieldNames(o),...this._extractFieldNames(e),...this._extractFieldNames(r)]}_getTitleFields(t){return"string"==typeof t?this._extractFieldNames(t):[]}_extractFieldNames(t){return(0,y.nw)(t).filter(t=>!(t.startsWith(zt)||t.startsWith(Pt)))}};(0,r.Cg)([(0,u.MZ)({type:Gt})],Qt.prototype,"actions",void 0),(0,r.Cg)([(0,u.MZ)()],Qt.prototype,"content",null),(0,r.Cg)([(0,u.wg)("content")],Qt.prototype,"castContent",null),(0,r.Cg)([(0,rt.w)("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],Qt.prototype,"readContent",null),(0,r.Cg)([(0,st.K)("web-scene","content",{popupElements:{type:n.A.ofType(bt)},showAttachments:{type:Boolean},mediaInfos:{type:n.A.ofType(ot)},description:{type:String},relatedRecordsInfo:{type:Kt}})],Qt.prototype,"writeWebSceneContent",null),(0,r.Cg)([(0,st.K)("content",{popupElements:{type:n.A.ofType(At)},showAttachments:{type:Boolean},mediaInfos:{type:n.A.ofType(ot)},description:{type:String},relatedRecordsInfo:{type:Kt}})],Qt.prototype,"writeWebMapContent",null),(0,r.Cg)([(0,u.MZ)({type:[St.A],json:{write:!0}})],Qt.prototype,"expressionInfos",void 0),(0,r.Cg)([(0,u.MZ)({type:[Rt.A]})],Qt.prototype,"fieldInfos",void 0),(0,r.Cg)([(0,st.K)("fieldInfos")],Qt.prototype,"writeFieldInfos",null),(0,r.Cg)([(0,u.MZ)({type:Ot})],Qt.prototype,"layerOptions",void 0),(0,r.Cg)([(0,st.K)("layerOptions")],Qt.prototype,"writeLayerOptions",null),(0,r.Cg)([(0,u.MZ)({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],Qt.prototype,"lastEditInfoEnabled",void 0),(0,r.Cg)([(0,u.MZ)()],Qt.prototype,"outFields",void 0),(0,r.Cg)([(0,u.MZ)()],Qt.prototype,"overwriteActions",void 0),(0,r.Cg)([(0,u.MZ)()],Qt.prototype,"returnGeometry",void 0),(0,r.Cg)([(0,u.MZ)({json:{type:String}})],Qt.prototype,"title",void 0),(0,r.Cg)([(0,st.K)("title")],Qt.prototype,"writeTitle",null),Qt=(0,r.Cg)([(0,u.$K)("esri.PopupTemplate")],Qt);const Yt=Qt},41227(t,e,o){o.d(e,{A:()=>y});var i=o(5482),r=o(69540),s=o(66552),n=o(25482),l=o(91429),a=o(62044),p=o(68780),d=o(36005),u=o(93223);let c=class extends((0,r.OU)(n.o)){constructor(t){super(t),this.fieldName=null,this.isEditable=!0,this.label=null,this.statisticType=null,this.stringFieldOption="text-box",this.tooltip=null,this.visible=!0}set fieldFormat(t){this._set("fieldFormat",t),this._set("format",t?(0,a.PK)(t):null)}set format(t){this._set("format",t),this._set("fieldFormat",t?(0,a.HK)(t):null)}readFormat(t,e){if(!e.fieldFormat)return t?p.A.fromJSON(t):null}clone(){const t=super.clone();return t._set("format",this.format?.clone()),t._set("fieldFormat",this.fieldFormat?.clone()),t}};(0,i.Cg)([(0,l.MZ)({value:null,clonable:!1,types:a.fg,json:{write:{overridePolicy(t,e,o){const{fieldName:i}=this;return{enabled:!(!i||i.startsWith("expression/")||i.startsWith("relationships/")||!o?.writeFieldFormat)}}}}})],c.prototype,"fieldFormat",null),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"fieldName",void 0),(0,i.Cg)([(0,l.MZ)({value:null,clonable:!1,type:p.A,json:{write:!0}})],c.prototype,"format",null),(0,i.Cg)([(0,d.w)("format")],c.prototype,"readFormat",null),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],c.prototype,"isEditable",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,i.Cg)([(0,l.MZ)({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],c.prototype,"statisticType",void 0),(0,i.Cg)([(0,u.e)(new s.J({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],c.prototype,"stringFieldOption",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"tooltip",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"visible",void 0),c=(0,i.Cg)([(0,l.$K)("esri.popup.FieldInfo")],c);const y=c},49852(t,e,o){o.d(e,{A:()=>a});var i,r=o(5482),s=o(25482),n=o(91429);let l=i=class extends s.o{constructor(t){super(t),this.field=null,this.order=null}clone(){return new i({field:this.field,order:this.order})}};(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"field",void 0),(0,r.Cg)([(0,n.MZ)({type:["asc","desc"],json:{write:!0}})],l.prototype,"order",void 0),l=i=(0,r.Cg)([(0,n.$K)("esri.popup.support.RelatedRecordsInfoFieldOrder")],l);const a=l},60950(t,e,o){o.d(e,{E_:()=>r,ym:()=>i});const i=Symbol("popupProvider");function r(t){return function(t){return!!t&&i in t}(t)?t[i]:null}},62044(t,e,o){o.d(e,{$P:()=>J,iu:()=>x,HK:()=>F,PK:()=>O,fg:()=>M,qH:()=>Z});var i=o(5482),r=o(10107),s=o(64108),n=o(69540),l=o(25482);let a=class extends((0,n.OU)(l.o)){constructor(){super(...arguments),this.type=null}};(0,i.Cg)([(0,r.MZ)({type:["date-time","number"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),a=(0,i.Cg)([(0,s.$)("esri.layers.support.FieldFormat")],a);const p=a,d="auto";let u=class extends p{constructor(t){super(t),this.dateStyle=null,this.hour12=d,this.month=null,this.timeStyle=null,this.type="date-time",this.year=null}};(0,i.Cg)([(0,r.MZ)({type:["full","long","medium","short"],json:{write:!0}})],u.prototype,"dateStyle",void 0),(0,i.Cg)([(0,r.MZ)({type:["always","auto","never"],nonNullable:!0,json:{default:d,write:!0}})],u.prototype,"hour12",void 0),(0,i.Cg)([(0,r.MZ)({type:["long","short"],json:{write:!0}})],u.prototype,"month",void 0),(0,i.Cg)([(0,r.MZ)({type:["full","long","medium","short"],json:{write:!0}})],u.prototype,"timeStyle",void 0),(0,i.Cg)([(0,r.MZ)({type:["date-time"]})],u.prototype,"type",void 0),(0,i.Cg)([(0,r.MZ)({type:["numeric"],json:{write:!0}})],u.prototype,"year",void 0),u=(0,i.Cg)([(0,s.$)("esri.layers.support.DateTimeFieldFormat")],u);const c=u;var y=o(30524),h=o(56507);const m={min:0,max:20},g="decimal",f="auto";let w=class extends p{constructor(t){super(t),this.maximumFractionDigits=2,this.minimumFractionDigits=0,this.style=g,this.type="number",this.useGrouping=f}};(0,i.Cg)([(0,r.MZ)({type:h.jz,nonNullable:!0,range:m,json:{default:2,write:!0}})],w.prototype,"maximumFractionDigits",void 0),(0,i.Cg)([(0,r.MZ)({type:h.jz,nonNullable:!0,range:m,json:{default:0,write:!0}})],w.prototype,"minimumFractionDigits",void 0),(0,i.Cg)([(0,r.MZ)({type:["decimal"],nonNullable:!0,json:{default:g,write:!0}})],w.prototype,"style",void 0),(0,i.Cg)([(0,r.MZ)({type:["number"]})],w.prototype,"type",void 0),(0,i.Cg)([(0,r.MZ)({type:["always","auto","never"],nonNullable:!0,json:{default:f,write:!0}})],w.prototype,"useGrouping",void 0),w=(0,i.Cg)([(0,s.$)("esri.layers.support.NumberFieldFormat")],w);const v=w;var C=o(68780);const M={base:p,key:"type",errorContext:"field-configuration-field-format",typeMap:{"date-time":c,number:v}};function x(t,e){const{format:o}=t;return e&&Z(e)?o?F(o,e):J(e,{hour12:"always",useGrouping:"always"}):null}function F(t,e){const{dateFormat:o}=t;if(!e)return o?A(t):j(t);if(!Z(e))return;const i={hour12:"always"};switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return I(t);case"single":case"double":return j(t);case"date":case"timestamp-offset":return o?A(t):J(e,i);case"date-only":return o?function(t){return new c({dateStyle:b(t),year:_(t),month:S(t)})}(t):J(e);case"time-only":return o?function(t){return new c({timeStyle:R(t),hour12:N(t)})}(t):J(e,i)}}function Z(t){return(0,y.Jl)(t)&&((0,y.WA)(t)||(0,y.vE)(t)||(0,y.zD)(t)||(0,y.OH)(t)||(0,y.Ah)(t))}function I(t){return new v({useGrouping:t.digitSeparator?"always":"never"})}function j(t){const e=I(t),{places:o}=t;return e.minimumFractionDigits=o??0,e.maximumFractionDigits=o??2,e}function A(t){return new c({dateStyle:b(t),year:_(t),month:S(t),timeStyle:R(t),hour12:N(t)})}function b(t){const{dateFormat:e}=t;return e?e.startsWith("short-date")?"short":e.startsWith("day-short-month-year")?"medium":e.startsWith("long-month-day-year")?"long":e.startsWith("long-date")?"full":null:null}function N(t){return t.dateFormat?.endsWith("-24")?"never":"always"}function S(t){switch(t.dateFormat){case"short-month-year":return"short";case"long-month-year":return"long";default:return null}}function R(t){const{dateFormat:e}=t;return e?e.includes("short-time")?"short":e.includes("long-time")?"medium":null:null}function _(t){switch(t.dateFormat){case"short-month-year":case"long-month-year":case"year":return"numeric";default:return null}}function O(t,e){const o="number"===t.type,i="date-time"===t.type;if(!e)return o?$(t):i?K(t):null;if(Z(e))switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return o?T(t):null;case"single":case"double":return o?$(t):null;case"date":case"timestamp-offset":return i?K(t):null;case"date-only":return i?function(t){let e;const o=E(t),i="numeric"===t.year?"year":null,r=k(t);return o?e=o:i&&r?e=`${r}-${i}`:i&&(e=i),e?new C.A({dateFormat:e}):null}(t):null;case"time-only":return i?function(t){let e;const o=B(t),i="never"===t.hour12?"24":null;return o&&i?e=`short-date-${o}-${i}`:o&&(e=`short-date-${o}`),e?new C.A({dateFormat:e}):null}(t):null}}function T(t){return new C.A({digitSeparator:"never"!==t.useGrouping})}function $(t){const e=T(t);return e.places=t.maximumFractionDigits,e}function K(t){let e;const o=E(t),i=B(t),r="never"===t.hour12?"24":null,s="numeric"===t.year?"year":null,n=k(t);return o&&i&&r?e=`${o}-${i}-${r}`:o&&i?e=`${o}-${i}`:o?e=o:s&&n?e=`${n}-${s}`:s&&(e=s),e?new C.A({dateFormat:e}):null}function E(t){switch(t.dateStyle){case"short":return"short-date";case"medium":return"day-short-month-year";case"long":return"long-month-day-year";case"full":return"long-date";default:return}}function B(t){return t.timeStyle&&("short"===t.timeStyle?"short-time":"long-time")}function k(t){switch(t.month){case"short":return"short-month";case"long":return"long-month";default:return}}function J(t,e){if(!Z(t))return;const o=e?.useGrouping??"auto",i=e?.hour12??"auto";switch(t.type){case"integer":case"small-integer":case"big-integer":case"long":return new v({minimumFractionDigits:0,maximumFractionDigits:0,useGrouping:o});case"single":case"double":return new v({minimumFractionDigits:0,maximumFractionDigits:2,useGrouping:o});case"date":case"timestamp-offset":return new c({dateStyle:"short",timeStyle:"short",hour12:i});case"date-only":return new c({dateStyle:"short"});case"time-only":return new c({timeStyle:"short",hour12:i})}}},66159(t,e,o){o.d(e,{A:()=>d});var i,r=o(5482),s=o(4718),n=o(91429),l=o(41227),a=o(84424);let p=i=class extends a.A{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}clone(){return new i((0,s.o8)({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};(0,r.Cg)([(0,n.MZ)({type:Object,json:{write:!0}})],p.prototype,"attributes",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"description",void 0),(0,r.Cg)([(0,n.MZ)({type:[l.A],json:{write:!0}})],p.prototype,"fieldInfos",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"title",void 0),(0,r.Cg)([(0,n.MZ)({type:["fields"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],p.prototype,"type",void 0),p=i=(0,r.Cg)([(0,n.$K)("esri.popup.content.FieldsContent")],p);const d=p},68780(t,e,o){o.d(e,{A:()=>u});var i=o(5482),r=o(69540),s=o(25482),n=o(91429),l=o(56507),a=o(97770),p=o(93223);let d=class extends((0,r.OU)(s.o)){constructor(t){super(t),this.dateFormat=null,this.digitSeparator=!1,this.places=null}};(0,i.Cg)([(0,p.e)(a._v)],d.prototype,"dateFormat",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],d.prototype,"digitSeparator",void 0),(0,i.Cg)([(0,n.MZ)({type:l.jz,json:{write:!0}})],d.prototype,"places",void 0),d=(0,i.Cg)([(0,n.$K)("esri.popup.support.FieldInfoFormat")],d);const u=d},78553(t,e,o){o.d(e,{D:()=>s,p:()=>r});var i=o(56507);function r(t){const e=(0,i.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},83342(t,e,o){o.d(e,{A:()=>p});var i=o(5482),r=o(69540),s=o(25482),n=o(91429),l=o(56507);let a=class extends((0,r.OU)(s.o)){constructor(t){super(t),this.title=null,this.description=null,this.type=null,this.associatedNetworkSourceId=null,this.associatedAssetGroup=null,this.associatedAssetType=null}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"description",void 0),(0,i.Cg)([(0,n.MZ)({type:["attachment","connectivity","container","content","structure"],json:{write:!0}})],a.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{type:l.jz,write:!0}})],a.prototype,"associatedNetworkSourceId",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{type:l.jz,write:!0}})],a.prototype,"associatedAssetGroup",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{type:l.jz,write:!0}})],a.prototype,"associatedAssetType",void 0),a=(0,i.Cg)([(0,n.$K)("esri.popup.support.UtilityNetworkAssociationType")],a);const p=a},84424(t,e,o){o.d(e,{A:()=>l});var i=o(5482),r=o(25482),s=o(91429);let n=class extends r.o{constructor(t){super(t),this.type=null}};(0,i.Cg)([(0,s.MZ)({type:["attachments","custom","fields","media","text","expression","relationship","utility-network-associations"],readOnly:!0,json:{read:!1,write:!0}})],n.prototype,"type",void 0),n=(0,i.Cg)([(0,s.$K)("esri.popup.content.Content")],n);const l=n},89893(t,e,o){o.d(e,{A:()=>y});var i=o(5482),r=o(69540),s=o(91429),n=o(84424),l=o(66552),a=o(25482);const p=new l.J({asc:"ascending",desc:"descending"});let d=class extends((0,r.OU)(a.o)){constructor(t){super(t),this.field=null,this.order="ascending"}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,i.Cg)([(0,s.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],d.prototype,"order",void 0),d=(0,i.Cg)([(0,s.$K)("esri.popup.support.AttachmentsOrderByInfo")],d);const u=d;let c=class extends((0,r.OU)(n.A)){constructor(t){super(t),this.attachmentKeywords=null,this.attachmentTypes=null,this.description=null,this.displayType="auto",this.orderByFields=null,this.title=null,this.type="attachments"}};(0,i.Cg)([(0,s.MZ)({type:[String],json:{write:!0}})],c.prototype,"attachmentKeywords",void 0),(0,i.Cg)([(0,s.MZ)({type:[["application","audio","image","model","text","video"]],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,i.Cg)([(0,s.MZ)({type:["auto","preview","list"],json:{write:!0}})],c.prototype,"displayType",void 0),(0,i.Cg)([(0,s.MZ)({type:[u],json:{write:!0}})],c.prototype,"orderByFields",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),(0,i.Cg)([(0,s.MZ)({type:["attachments"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],c.prototype,"type",void 0),c=(0,i.Cg)([(0,s.$K)("esri.popup.content.AttachmentsContent")],c);const y=c},93705(t,e,o){o.d(e,{A:()=>a});var i,r=o(5482),s=o(25482),n=o(91429);let l=i=class extends s.o{constructor(t){super(t),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new i({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"name",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"expression",void 0),(0,r.Cg)([(0,n.MZ)({type:["string","number"],json:{write:!0}})],l.prototype,"returnType",void 0),l=i=(0,r.Cg)([(0,n.$K)("esri.popup.ExpressionInfo")],l);const a=l}}]);