????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/48.f24dea00c31ef924b07c.js |
(function(){var e={"esri/widgets/Feature/support/featureUtils":"2/rQ","esri/widgets/Feature":"2K2M","esri/widgets/Feature/FeatureViewModel":"2Nu0","esri/widgets/Attachments/support/attachmentUtils":"6Rpf","esri/widgets/Feature/FeatureContent/FeatureContentViewModel":"7the","esri/widgets/Attachments":"9wQ6","esri/widgets/Feature/support/RelatedFeatures":"NKTt","esri/widgets/Feature/FeatureContent":"UCuD","esri/widgets/support/chartUtils":"WV+D","esri/widgets/Feature/FeatureFields":"dvWg","esri/widgets/Feature/FeatureFields/FeatureFieldsViewModel":"lWc8","esri/widgets/support/uriUtils":"o3EH","esri/widgets/Attachments/AttachmentsViewModel":"qAIg","esri/core/unitFormatUtils":"s37w"},t=this||window,r=t.webpackJsonp=t.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(e):(r.absMidsWaiting=r.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{"2/rQ":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht")],void 0===(n=(function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceLayer=function(e){if(e)return e.get("sourceLayer")||e.get("layer")},t.graphicCallback=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,"function"==typeof e?e.call(null,t):e]}))}))},t.shouldOpenInNewTab=function(e){if(void 0===e&&(e=""),e)return!/^(?:mailto:|tel:)/.test(e.trim().toLowerCase())};var i=/^\s*expression\//i;function n(e){return i.test(e)}t.isExpressionField=n,t.getFieldInfoLabel=function(e,t){var r=function(e,t){if(!n(t)||!e)return null;var r,a=t.replace(i,"").toLowerCase();return e.some((function(e){return e.name.toLowerCase()===a&&(r=e,!0)})),r}(t,null==e?void 0:e.fieldName);return r?r.title||null:e?e.label||e.fieldName:null}}).apply(null,i))||(e.exports=n)},"2K2M":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("cTAJ"),r("a97G"),r("rMND"),r("8MXS"),r("Vx27"),r("9wQ6"),r("RHxK"),r("UCuD"),r("dvWg"),r("2Nu0"),r("oA+l"),r("2/rQ"),r("WV+D"),r("bC3G"),r("ZOxB")],n=(function(e,t,r,i,n,a,o,s,l,u,c,d,p,h,f,m,_,y){var v="esri-icon-left-triangle-arrow",g="esri-icon-right-triangle-arrow",b="esri-feature__icon",w="esri-feature__content-element",x={title:!0,content:!0,lastEditedInfo:!0};return function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._chartUIds=new Map,n._contentElementCharts=new Map,n._activeMediaMap=new Map,n._refreshTimers=new Map,n._mediaInfo=new Map,n._renderChartThrottled=a.throttle((function(e){return n._renderChart(e)}),100),n._contentWidgets=[],n.graphic=null,n.defaultPopupTemplateEnabled=!1,n.label=void 0,n.messages=null,n.messagesURIUtils=null,n.spatialReference=null,n.title=null,n.visibleElements=r.__assign({},x),n.map=null,n.view=null,n.viewModel=new p,n}return r.__extends(t,e),t.prototype.initialize=function(){var e=this;this.own(o.init(this,"viewModel.content",(function(){e._setupMediaRefreshTimers(),e._setupContentWidgets()})),o.init(this,"viewModel.graphic",(function(){return e._disposeCharts()})))},t.prototype.destroy=function(){this._clearMediaRefreshTimers(),this._activeMediaMap.clear(),this._activeMediaMap=null,this._destroyContentWidgets(),this._disposeCharts()},t.prototype.castVisibleElements=function(e){return r.__assign(r.__assign({},x),e)},t.prototype.render=function(){var e=this.viewModel.waitingForContent;return _.tsx("div",{class:this.classes("esri-feature","esri-widget")},_.tsx("div",{class:"esri-feature__size-container"},this.renderTitle(),e?this.renderLoading():this.renderContentContainer()))},t.prototype.goToMedia=function(e,t){this._setContentElementMedia(e,t)},t.prototype.nextMedia=function(e){this._pageContentElementMedia(e,"next")},t.prototype.previousMedia=function(e){this._pageContentElementMedia(e,"previous")},t.prototype.renderLoading=function(){return _.tsx("div",{key:"loading-container",class:"esri-feature__loading-container"},_.tsx("span",{class:this.classes("esri-icon-loading-indicator esri-rotating","esri-feature__loading-spinner")}))},t.prototype.renderContentContainer=function(){return this.visibleElements.content?_.tsx("div",{class:"esri-feature__main-container"},[this.renderContent(),this.renderLastEditInfo()]):null},t.prototype.renderTitle=function(){return this.visibleElements.title?_.tsx("h4",{class:"esri-feature__title",innerHTML:this.title}):null},t.prototype.renderContent=function(){var e=this.viewModel.content;if(!e)return null;if(Array.isArray(e))return e.length?_.tsx("div",{key:"content-content-elements"},e.map(this.renderContentElement,this)):null;if("string"==typeof e){var t=this._contentWidgets[0];return!t||t.destroyed?null:_.tsx("div",{key:"content-content"},t.render())}return this.renderNodeContent(e)},t.prototype.renderContentElement=function(e,t){var r=this.visibleElements;if("boolean"!=typeof r.content&&!r.content[e.type])return null;switch(e.type){case"attachments":return this.renderAttachments(t);case"custom":return this.renderCustom(e,t);case"fields":return this.renderFields(t);case"media":return this.renderMedia(e,t);case"text":return this.renderText(e,t);default:return null}},t.prototype.renderAttachments=function(e){var t=this._contentWidgets[e];if(!t||t.destroyed)return null;var r=t.viewModel;return"loading"===r.state||r.attachmentInfos.length>0?_.tsx("div",{key:this._buildKey("attachments-element",e),class:this.classes("esri-feature__attachments",w)},_.tsx("h2",null,this.messages.attach),t.render()):null},t.prototype.renderCustom=function(e,t){var r=this._contentWidgets[t];return!r||r.destroyed?null:e.creator?_.tsx("div",{key:this._buildKey("custom-element",t),class:w},r.render()):null},t.prototype.renderFields=function(e){var t=this._contentWidgets[e];return!t||t.destroyed?null:_.tsx("div",{key:this._buildKey("fields-element",e),class:w},t.render())},t.prototype.renderMediaInfoType=function(e){var t=e.mediaInfo,r=e.total,i=e.contentElementIndex,n=e.activeMediaIndex;if(!t)return null;var a=t.title,o=void 0===a?"":a,s=t.altText,l=void 0===s?"":s;if("image"===t.type){var u=t.value,c=t.refreshInterval,d=u.sourceURL,p=u.linkURL,h=f.shouldOpenInNewTab(p)?"_blank":"_self",m="_blank"===h?"noreferrer":"",y=c?this._mediaInfo.get(i):null,v=y?y.sourceURL:d,g=_.tsx("img",{alt:l||o,key:this._buildKey(t.type,r,i,n,y?y.timestamp:0),src:v});return(p?_.tsx("a",{title:o,href:p,rel:m,target:h},g):null)||g}return-1!==t.type.indexOf("chart")?_.tsx("div",{key:this._buildKey(t.type,r,i,n),bind:this,"data-media-info":t,"data-content-element-index":i,class:"esri-feature__media-chart",afterCreate:this._getChartDependencies,afterRemoved:this._disposeChartByNode}):void 0},t.prototype.renderMediaInfo=function(e){var t=e.total,r=e.mediaInfo,i=e.contentElementIndex,n=e.activeMediaIndex;if(!r)return null;var a=r.title?_.tsx("div",{key:this._buildKey("media-title",r.type,t,i),class:"esri-feature__media-item-title",innerHTML:r.title}):null,o=r.caption?_.tsx("div",{key:this._buildKey("media-caption",r.type,t,i),class:"esri-feature__media-item-caption",innerHTML:r.caption}):null;return _.tsx("div",{key:this._buildKey("media-container",r.type,t,i),class:"esri-feature__media-item-container"},a,o,_.tsx("div",{key:this._buildKey("media-item-container",r.type,t,i),class:"esri-feature__media-item"},this.renderMediaInfoType({total:t,mediaInfo:r,contentElementIndex:i,activeMediaIndex:n})))},t.prototype.renderMediaPageButton=function(e,t){var r="previous"===e,i=r?this.messages.previous:this.messages.next,n=this.classes("esri-feature__button",r?"esri-feature__media-previous":"esri-feature__media-next"),a=r?this.classes(b,"esri-feature__media-previous-icon",v):this.classes(b,"esri-feature__media-next-icon",g),o=r?this.classes(b,"esri-feature__media-previous-icon--rtl",g):this.classes(b,"esri-feature__media-next-icon--rtl",v),s=r?this._previousClick:this._nextClick;return _.tsx("div",{key:this._buildKey(r?"media-previous":"media-next",t),title:i,tabIndex:0,role:"button",class:n,"data-content-element-index":t,bind:this,onkeydown:s,onclick:s},_.tsx("span",{"aria-hidden":"true",class:a}),_.tsx("span",{"aria-hidden":"true",class:o}),_.tsx("span",{class:"esri-icon-font-fallback-text"},i))},t.prototype.renderMedia=function(e,t){var r,i,n=null===(i=e.mediaInfos)||void 0===i?void 0:i.filter(Boolean),a=(null==n?void 0:n.length)||0,o=((r={})["esri-feature--media-pagination-visible"]=a>1,r),s=this.renderMediaPageButton("previous",t),l=this.renderMediaPageButton("next",t),u=this._activeMediaMap.get(t);return isNaN(u)&&(this._activeMediaMap.set(t,0),u=0),a?_.tsx("div",{key:this._buildKey("media-element",t),"data-content-element-index":t,bind:this,onkeyup:this._handleMediaKeyup,class:this.classes("esri-feature__media",w,o)},_.tsx("div",{key:this._buildKey("media-element-container",t),class:"esri-feature__media-container"},s,this.renderMediaInfo({total:a,mediaInfo:n[u],contentElementIndex:t,activeMediaIndex:u}),l)):null},t.prototype.renderLastEditInfo=function(){var e=this.messages,t=this.viewModel.lastEditInfo;if(!t||!this.visibleElements.lastEditedInfo)return null;var r=t.user,n=i.substitute("edit"===t.type?r?e.lastEditedByUser:e.lastEdited:r?e.lastCreatedByUser:e.lastCreated,{date:t.date,user:r});return _.tsx("div",{key:"edit-info-element",class:this.classes("esri-feature__last-edited-info",w)},n)},t.prototype.renderText=function(e,t){var r=this._contentWidgets[t];return!r||r.destroyed?null:e.text?_.tsx("div",{key:this._buildKey("text-element",t),class:this.classes(w,"esri-feature__text")},r.render()):null},t.prototype._buildKey=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return e+"__"+(this.get("viewModel.graphic.uid")||"0")+"-"+t.join("-")},t.prototype._disposeCharts=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return this._chartUIds.forEach((function(e){return e.dispose()})),this._chartUIds.clear(),this._contentElementCharts.forEach((function(e){return e.dispose()})),this._contentElementCharts.clear(),[2]}))}))},t.prototype._clearMediaRefreshTimers=function(){this._refreshTimers.forEach((function(e){return clearTimeout(e)})),this._refreshTimers.clear()},t.prototype._clearMediaRefreshTimer=function(e){var t=this._refreshTimers.get(e);t&&(clearTimeout(t),this._refreshTimers.delete(e))},t.prototype._getImageSource=function(e,t){var r=-1!==e.indexOf("?")?"&":"?",i=e.split("#"),n=i[1],a=void 0===n?"":n;return""+i[0]+r+"timestamp="+t+(a?"#":"")+a},t.prototype._setupMediaRefreshTimer=function(e){var t=this.get("viewModel.content");if(Array.isArray(t)){var r=t[e];if(r&&"media"===r.type){var i=this._activeMediaMap.get(e);isNaN(i)&&(i=0);var n=r.mediaInfos[i];n&&"image"===n.type&&n.refreshInterval&&this._setRefreshTimeout(e,n)}}},t.prototype._destroyContentWidgets=function(){this._contentWidgets.forEach((function(e){return e&&!e.destroyed&&e.destroy()})),this._contentWidgets=[]},t.prototype._setupContentWidgets=function(){var e=this;this._destroyContentWidgets(),this._activeMediaMap.clear();var t=this.get("viewModel.content"),r=this.viewModel.contentVMs;if(Array.isArray(t))t.forEach((function(t,i){"attachments"===t.type&&(e._contentWidgets[i]=new l({displayType:t.displayType,viewModel:r[i]})),"fields"===t.type&&(e._contentWidgets[i]=new d({viewModel:r[i]})),"text"===t.type&&(e._contentWidgets[i]=new c({viewModel:r[i]})),"custom"===t.type&&(e._contentWidgets[i]=new c({viewModel:r[i]}))}),this);else{var i=r[0];i&&!i.destroyed&&(this._contentWidgets[0]=new c({viewModel:i}))}this.scheduleRender()},t.prototype._setupMediaRefreshTimers=function(){var e=this;this._clearMediaRefreshTimers();var t=this.get("viewModel.content");Array.isArray(t)&&t.forEach((function(t,r){return e._setupMediaRefreshTimer(r)}))},t.prototype._updateMediaInfoTimestamp=function(e,t){var r=Date.now();this._mediaInfo.set(t,{timestamp:r,sourceURL:this._getImageSource(e,r)}),this.scheduleRender()},t.prototype._setRefreshTimeout=function(e,t){var r=this,i=t.refreshInterval,n=t.value;if(i){var a=6e4*i;this._updateMediaInfoTimestamp(n.sourceURL,e);var o=setInterval((function(){r._updateMediaInfoTimestamp(n.sourceURL,e)}),a);this._refreshTimers.set(e,o)}},t.prototype._getChartDependencies=function(e){var t=this,r=e["data-media-info"],i=e["data-content-element-index"];this._disposeChartByNode(e),this._disposeChartByContgentElementIndex(i);var n=r.value,a=r.type;m.loadChartsModule().then((function(o){return t._renderChartThrottled({chartDiv:e,mediaInfo:r,contentElementIndex:i,type:a,value:n,chartsModule:o})}))},t.prototype._disposeChartByContgentElementIndex=function(e){var t=this._contentElementCharts.get(e);t&&t.dispose()},t.prototype._disposeChartByNode=function(e){var t=e.getAttribute("data-chart-uid"),r=this._chartUIds.get(t);r&&r.dispose()},t.prototype._customizeChartTooltip=function(e,t){e.label.wrap=!0,e.label.maxWidth=200,e.autoTextColor=!1,e.getFillFromObject=!1,e.label.fill=t.color("#ffffff"),e.background.fill=t.color({r:0,g:0,b:0,a:.7})},t.prototype._createPieChart=function(e){var t=e.chartsModule,r=t.am4core,i=t.am4charts,n=r.create(e.chartDiv,i.PieChart);n.rtl=y.isRTL();var a=n.series.push(new i.PieSeries);return a.labels.template.disabled=!0,a.ticks.template.disabled=!0,a.dataFields.value="y",a.dataFields.category="x",this._customizeChartTooltip(a.tooltip,r),n},t.prototype._getMinSeriesValue=function(e){var t=0;return e.forEach((function(e){return t=Math.min(e.x,t)})),t},t.prototype._createXYChart=function(e){var t=e.type,r=e.value,i=e.chartsModule,n=i.am4core,a=i.am4charts,o=n.create(e.chartDiv,a.XYChart);o.rtl=y.isRTL();var s=r.series.length>15;if("column-chart"===t){var l=o.xAxes.push(new a.CategoryAxis);l.dataFields.category="x",l.renderer.labels.template.disabled=!0,this._customizeChartTooltip(l.tooltip,n),l.tooltip.events.on("sizechanged",(function(){l.tooltip.dy=-l.tooltip.contentHeight}));var u=(d=o.yAxes.push(new a.ValueAxis)).renderer.labels.template;d.renderer.minLabelPosition=.05,d.renderer.maxLabelPosition=.95,d.min=this._getMinSeriesValue(r.series),this._customizeChartTooltip(d.tooltip,n),u.wrap=!0,(p=o.series.push(new a.ColumnSeries)).dataFields.valueY="y",p.dataFields.categoryX="x",o.cursor=new a.XYCursor,s&&(o.scrollbarX=new n.Scrollbar)}if("bar-chart"===t){var c=o.yAxes.push(new a.CategoryAxis);c.dataFields.category="x",c.renderer.inversed=!0,c.renderer.labels.template.disabled=!0,this._customizeChartTooltip(c.tooltip,n),c.tooltip.events.on("sizechanged",(function(){c.tooltip.dx=c.tooltip.contentWidth})),u=(d=o.xAxes.push(new a.ValueAxis)).renderer.labels.template,d.renderer.minLabelPosition=.05,d.renderer.maxLabelPosition=.95,d.min=this._getMinSeriesValue(r.series),this._customizeChartTooltip(d.tooltip,n),u.wrap=!0,(p=o.series.push(new a.ColumnSeries)).dataFields.valueX="y",p.dataFields.categoryY="x",o.cursor=new a.XYCursor,s&&(o.scrollbarY=new n.Scrollbar)}if("line-chart"===t){var d,p,h=o.xAxes.push(new a.CategoryAxis);h.dataFields.category="x",h.renderer.labels.template.disabled=!0,this._customizeChartTooltip(h.tooltip,n),h.tooltip.events.on("sizechanged",(function(){h.tooltip.dy=-h.tooltip.contentHeight})),u=(d=o.yAxes.push(new a.ValueAxis)).renderer.labels.template,d.renderer.minLabelPosition=.05,d.renderer.maxLabelPosition=.95,d.min=this._getMinSeriesValue(r.series),this._customizeChartTooltip(d.tooltip,n),u.wrap=!0,(p=o.series.push(new a.LineSeries)).dataFields.categoryX="x",p.dataFields.valueY="y",o.cursor=new a.XYCursor,s&&(o.scrollbarX=new n.Scrollbar)}return o},t.prototype._renderChart=function(e){var t=e.type,r=e.mediaInfo,i=e.contentElementIndex,n=e.value,a=e.chartsModule,o=e.chartDiv;a.am4core.useTheme(a.am4themes_animated);var s="pie-chart"===t?this._createPieChart(e):this._createXYChart(e);this._chartUIds.set(s.uid,s),this._contentElementCharts.set(i,s),o.setAttribute("data-chart-uid",s.uid),o.setAttribute("aria-label",r.altText||r.title),s.data=n.series.map((function(e){return{x:e.tooltip,y:e.y}}))},t.prototype._handleMediaKeyup=function(e){var t=e.currentTarget["data-content-element-index"],r=n.eventKey(e);"ArrowLeft"===r&&(e.stopPropagation(),this.previousMedia(t)),"ArrowRight"===r&&(e.stopPropagation(),this.nextMedia(t))},t.prototype._setContentElementMedia=function(e,t){this._clearMediaRefreshTimer(e);var r=this.viewModel.content,i=r&&r[e],n=i&&i.mediaInfos;n&&n.length&&(this._activeMediaMap.set(e,(t+n.length)%n.length),this._setupMediaRefreshTimer(e),this.scheduleRender())},t.prototype._pageContentElementMedia=function(e,t){var r="previous"===t?-1:1,i=this._activeMediaMap.get(e)+r;this._setContentElementMedia(e,i)},t.prototype._previousClick=function(e){this.previousMedia(e.currentTarget["data-content-element-index"])},t.prototype._nextClick=function(e){this.nextMedia(e.currentTarget["data-content-element-index"])},r.__decorate([s.aliasOf("viewModel.graphic")],t.prototype,"graphic",void 0),r.__decorate([s.aliasOf("viewModel.defaultPopupTemplateEnabled")],t.prototype,"defaultPopupTemplateEnabled",void 0),r.__decorate([s.property({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],t.prototype,"label",void 0),r.__decorate([s.property(),_.renderable(),_.messageBundle("esri/widgets/Feature/t9n/Feature")],t.prototype,"messages",void 0),r.__decorate([s.property(),_.renderable(),_.messageBundle("esri/widgets/support/t9n/uriUtils")],t.prototype,"messagesURIUtils",void 0),r.__decorate([s.aliasOf("viewModel.spatialReference")],t.prototype,"spatialReference",void 0),r.__decorate([s.aliasOf("viewModel.title")],t.prototype,"title",void 0),r.__decorate([s.property(),_.renderable()],t.prototype,"visibleElements",void 0),r.__decorate([s.cast("visibleElements")],t.prototype,"castVisibleElements",null),r.__decorate([s.aliasOf("viewModel.map")],t.prototype,"map",void 0),r.__decorate([s.aliasOf("viewModel.view")],t.prototype,"view",void 0),r.__decorate([s.property({type:p}),_.renderable(["viewModel.waitingForContent","viewModel.content","viewModel.lastEditInfo","viewModel.contentVMs"])],t.prototype,"viewModel",void 0),r.__decorate([_.accessibleHandler()],t.prototype,"_previousClick",null),r.__decorate([_.accessibleHandler()],t.prototype,"_nextClick",null),r.__decorate([s.subclass("esri.widgets.Feature")],t)}(h.FeatureContentMixin(u))}).apply(null,i),void 0===n||(e.exports=n)},"2Nu0":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("jZlN"),r("cTAJ"),r("ma1f"),r("eIBl"),r("rg9i"),r("qsST"),r("qMld"),r("nRUF"),r("rMND"),r("8MXS"),r("Vx27"),r("hCwm"),r("ICCr"),r("k7g7"),r("Ctes"),r("An8T"),r("3Bgw"),r("BwRt"),r("qAIg"),r("7the"),r("lWc8"),r("2/rQ"),r("NKTt"),r("2Kdy")],void 0===(n=(function(e,t,i,n,a,o,s,l,u,c,d,p,h,f,m,_,y,v,g,b,w,x,I,F,A,M){var C=["$datastore","$map","$layer"];function T(e){return"string"==typeof e?e.replace(/(\n)/gi,'<br class="esri-text-new-line" />'):e}function L(e,t){return e&&"function"==typeof e.getField?e.getField(t):null}function R(e){return(""+e).trim()}function k(e){return e.replace(/[\u00A0-\u9999<>\&]/gim,(function(e){return"&#"+e.charCodeAt(0)+";"}))}var E=u.getLogger("esri.widgets.FeatureViewModel"),P=m.convertDateFormatToIntlOptions("short-date-short-time");return function(e){function t(t){var r=e.call(this,t)||this;return r._handles=new s,r._featureAbortController=null,r._graphicChangedThrottled=p.throttle(r._graphicChanged,1,r),r._effectivePopupTemplate=null,r._graphic=null,r._fieldInfoMap=null,r.content=null,r.contentVMs=[],r.defaultPopupTemplateEnabled=!1,r.formattedAttributes=null,r.graphic=null,r.lastEditInfo=null,r.title="",r.view=null,r._handles.add(h.init(r,["graphic","graphic.sourceLayer.popupTemplate.title","graphic.sourceLayer.popupTemplate.content","graphic.sourceLayer.popupTemplate.expressionInfos","graphic.sourceLayer.popupTemplate.fieldInfos","graphic.sourceLayer.popupTemplate.lastEditInfoEnabled","graphic.sourceLayer.popupTemplate.outFields","graphic.sourceLayer.popupTemplate.relatedRecordsInfo","graphic.popupTemplate.title","graphic.popupTemplate.content","graphic.popupTemplate.expressionInfos","graphic.popupTemplate.fieldInfos","graphic.popupTemplate.lastEditInfoEnabled","graphic.popupTemplate.outFields","graphic.popupTemplate.relatedRecordsInfo"],(function(){return r._graphicChangedThrottled()}))),r}return i.__extends(t,e),t.prototype.destroy=function(){this._clear(),this._cancelFeatureQuery(),this._handles.destroy(),this._handles=null,this.graphic=null,this._graphic=null,this._destroyContentViewModels()},Object.defineProperty(t.prototype,"spatialReference",{get:function(){return this.get("view.spatialReference")||null},set:function(e){void 0!==e?this._override("spatialReference",e):this._clearOverride("spatialReference")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"map",{get:function(){return this.get("view.map")||null},set:function(e){void 0!==e?this._override("map",e):this._clearOverride("map")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"waitingForContent",{get:function(){return!!this._featureAbortController},enumerable:!0,configurable:!0}),t.prototype._clear=function(){this._set("title",""),this._set("content",null),this._set("formattedAttributes",null)},t.prototype._graphicChanged=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t,r,n;return i.__generator(this,(function(i){switch(i.label){case 0:if(this._cancelFeatureQuery(),this._clear(),t=(e=this.graphic)?e.clone():null,this._graphic=t,!t)return[2];r=c.createAbortController(),this._featureAbortController=r,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this._queryFeature({signal:r.signal})];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),E.error("error","error loading template",n),[3,4];case 4:return this._featureAbortController=null,[2]}}))}))},t.prototype._cancelFeatureQuery=function(){var e=this._featureAbortController;e&&e.abort(),this._featureAbortController=null},t.prototype._compileContent=function(e){var t=this;if(this._destroyContentViewModels(),this._graphic)return Array.isArray(e)?e.map((function(e,r){return"attachments"===e.type?t._compileAttachments(e,r):"custom"===e.type?t._compileCustom(e,r):"fields"===e.type?t._compileFields(e,r):"media"===e.type?t._compileMedia(e):"text"===e.type?t._compileText(e,r):void 0})):"string"==typeof e?this._compileText(new g({text:e}),0).text:e},t.prototype._destroyContentViewModels=function(){this.contentVMs.forEach((function(e){return e&&!e.destroyed&&e.destroy()})),this._set("contentVMs",[])},t.prototype._compileAttachments=function(e,t){return this.contentVMs[t]=new x({graphic:this.graphic}),e},t.prototype._compileCustom=function(e,t){return this.contentVMs[t]=new I({graphic:this.graphic,creator:e.creator,destroyer:e.destroyer}),e},t.prototype._compileFields=function(e,t){var r=this._effectivePopupTemplate,n=this.formattedAttributes,a=e.clone(),o=(null==e?void 0:e.fieldInfos)||(null==r?void 0:r.fieldInfos),s=null==r?void 0:r.expressionInfos,u=i.__assign(i.__assign({},n.global),n.content[t]),c=new F({attributes:u,expressionInfos:s,fieldInfos:o});return this.contentVMs[t]=c,a.fieldInfos=l.clone(c.formattedFieldInfos),a},t.prototype._setImageValue=function(e){var t=e.value,r=e.formattedAttributes,i=e.layer,n=t.linkURL,a=t.sourceURL;if(a){var o=this._fixTokens(a,i);t.sourceURL=this._substituteAttributes(r,o)}if(n){var s=this._fixTokens(n,i);t.linkURL=this._substituteAttributes(r,s)}},t.prototype._compileMedia=function(e){var t=this,r=this._graphic,n=l.clone(e),a=n.mediaInfos,o=r.attributes,s=A.getSourceLayer(r),u=this.formattedAttributes.global,c=i.__assign(i.__assign({},u),o);return n.mediaInfos=a&&a.map((function(e){var r=l.clone(e);if(r){var i=r.title?t._processFieldsInLinks(r.title,c):"";r.title=i?t._substituteAttributes(u,i):"";var n=r.caption?t._processFieldsInLinks(r.caption,c):"";r.caption=n?t._substituteAttributes(u,n):"";var a=r.altText?t._processFieldsInLinks(r.altText,c):"";if(r.altText=a?t._substituteAttributes(u,a):"","image"===r.type){var d=r.value;return t._setImageValue({value:d,formattedAttributes:u,layer:s}),r.value.sourceURL?r:void 0}if("pie-chart"===r.type||"line-chart"===r.type||"column-chart"===r.type||"bar-chart"===r.type)return t._setChartValue({value:d=r.value,chartType:r.type,attributes:o,formattedAttributes:u,layer:s}),r}})).filter(Boolean),n},t.prototype._normalizeTemplateFields=function(e){var t=this._fieldInfoMap.get(e.toLowerCase());return"{"+(t&&t.fieldName||e)+"}"},t.prototype._substituteAttributes=function(e,t){var r=this;return R(this._removeEmptyHref(d.replace(d.replace(t,(function(e){return r._normalizeTemplateFields(e)})),e)))},t.prototype._compileText=function(e,t){var r=l.clone(e),n=this._graphic;if(r&&r.text){var a=n.attributes,o=this.formattedAttributes.global,s=this._processFieldsInLinks(r.text,i.__assign(i.__assign({},o),a));r.text=this._substituteAttributes(o,s)}return this.contentVMs[t]=new I({graphic:n,creator:r.text}),r},t.prototype._formatEditInfo=function(e,t){var r=e.creatorField,i=e.creationDateField;if(t){var n=t[e.editDateField];if("number"==typeof n){var o=t[e.editorField];return{type:"edit",date:a.formatDate(n,P),user:o}}var s=t[i];if("number"==typeof s){var l=t[r];return{type:"create",date:a.formatDate(s,P),user:l}}}},t.prototype._compileLastEditInfo=function(){var e=this._effectivePopupTemplate,t=this._graphic;if(e){var r=e.lastEditInfoEnabled,i=t.get("sourceLayer.editFieldsInfo");if(r&&i)return this._formatEditInfo(i,t.attributes)}},t.prototype._compileTitle=function(e){var t=this._graphic.attributes,r=this.formattedAttributes.global;if(e){var n=this._processFieldsInLinks(e,i.__assign(i.__assign({},r),t));return this._substituteAttributes(r,n)}return""},t.prototype._fixTokens=function(e,t){return e.replace(/(\{([^\{\r\n]+)\})/g,(function(e,r,i){var n=L(t,i);return n?"{"+n.name+"}":r}))},t.prototype._encodeAttributes=function(e){var t=e?l.clone(e):{};return Object.keys(t).forEach((function(e){return function(e,t){var r=t[e];if("string"==typeof r){var i=encodeURIComponent(r).replace(/\'/g,"'");t[e]=i}}(e,t)})),t},t.prototype._createfieldInfoMap=function(e,t){var r=this,i=new Map;return e&&e.forEach((function(e){var n=r._getFixedFieldName(e.fieldName,t);e.fieldName=n,i.set(n.toLowerCase(),e)})),i},t.prototype._formatAttributeValue=function(e){var t=e.value,r=e.fieldName,i=e.fieldInfos,n=e.fieldInfoMap,o=e.layer;if(null==t)return"";var s=this._getDomainName(r,t);if(s)return s;var l=this._getTypeName(r);if(l)return l;if(n.get(r.toLowerCase()))return this._formatValueToFieldInfo(t,{fieldInfos:i,fieldName:r,layer:o});var u=o&&o.fieldsIndex;return u&&u.isDateField(r)?a.formatDate(t,P):T(t)},t.prototype._formatAttributes=function(e){var t=this,r=this._graphic,i=A.getSourceLayer(r),n=l.clone(r.attributes);this.addRelatedFeatureAttributes(n);var a=this._createfieldInfoMap(e,i);return this._fieldInfoMap=a,Object.keys(n).forEach((function(r){n[r]=t._formatAttributeValue({fieldName:r,fieldInfos:e,fieldInfoMap:a,layer:i,value:n[r]})})),n},t.prototype._parseNumberFromString=function(e,t){if("string"==typeof e&&t&&null==t.dateFormat&&(null!=t.places||null!=t.digitSeparator)){var r=Number(e);if(!isNaN(r))return r}return e},t.prototype._formatValueToFieldInfo=function(e,t){var r=t.fieldName,n=this._getFieldInfo(t.fieldInfos,r),a=l.clone(n),o=t.preventPlacesFormatting,s=L(t.layer,r);if(s&&"date"===s.type){var u=a.format||new w;u.dateFormat=u.dateFormat||"short-date-short-time",a.format=u}var c=a&&a.format;return"string"==typeof(e=this._parseNumberFromString(e,c))||null==e||null==c?e:o?_.formatNumber(e,i.__assign(i.__assign({},_.convertNumberFormatToIntlOptions(c)),{minimumFractionDigits:0,maximumFractionDigits:20})):c.format(e)},t.prototype._getDomainName=function(e,t){if(this.isRelatedField(e))return null;var r=this._graphic,i=A.getSourceLayer(r);if(!i||"function"!=typeof i.getFieldDomain)return null;var n=i.getFieldDomain(e,{feature:r});return n&&"coded-value"===n.type?n.getName(t):null},t.prototype._getFieldInfo=function(e,t){if(e&&e.length&&t){var r=t.toLowerCase(),i=void 0;return e.some((function(e){return!(!e.fieldName||e.fieldName.toLowerCase()!==r||(i=e,0))})),i}},t.prototype._getTypeName=function(e){if(this.isRelatedField(e))return null;var t=this._graphic,r=A.getSourceLayer(t);if(!r||"function"!=typeof r.getFeatureType)return null;var i=r.typeIdField;if(!i||e!==i)return null;var n=r.getFeatureType(t);return n?n.name:null},t.prototype._removeEmptyHref=function(e){return e.replace(/href=(""|'')/gi,"")},t.prototype._processFieldsInLinks=function(e,t){var r=this.get("_graphic.layer"),i=this._fixTokens(e,r),n=this._encodeAttributes(t);return i?i.replace(/href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/gi,(function(e,r,i){return function(e,t,r,i){return t=R(t),d.replace(e,t&&"{"===t[0]?r:i)}(e,r||i,t,n)})):i},t.prototype._getTitle=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t;return i.__generator(this,(function(r){return t=(e=this)._effectivePopupTemplate,[2,A.graphicCallback(t&&t.title,{graphic:e._graphic})]}))}))},t.prototype._getContent=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t;return i.__generator(this,(function(r){return t=(e=this)._effectivePopupTemplate,[2,A.graphicCallback(t&&t.content,{graphic:e._graphic})]}))}))},t.prototype._querySourceLayer=function(e,t){var r,i,n=e.layer,a=e.graphic,s=e.outFields,l=e.objectIds,u=l[0];if("number"!=typeof u){var d=new o("layer-query-features-invalid-objectid",r="Could not query required fields for the specified feature. The feature's ID is invalid.",i={layer:n,graphic:a,objectId:u,requiredFields:s});return E.warn(r,i),c.reject(d)}if("function"!=typeof n.queryFeatures)return d=new o("layer-query-features-unsupported",r="The specified layer does not support the method 'queryFeatures'. The following fields will not be available.",i={layer:n,graphic:a,requiredFields:s}),E.warn(r,i),c.reject(d);var p=n.createQuery();return p.objectIds=l,p.outFields=s,p.returnGeometry=!0,n.queryFeatures(p,t).then((function(e){return e.features[0]}))},t.prototype._queryRequiredFieldsFeature=function(e){var t=this,r=this._graphic,i=this._effectivePopupTemplate,n=r.sourceLayer;return n&&i?("function"==typeof n.load?n.load(e):c.resolve()).then((function(){var a=[r.attributes[n.objectIdField]];return i.getRequiredFields(n.fields).then((function(i){return y.featureHasFields(i,r)?null:t._querySourceLayer({layer:n,graphic:r,outFields:i,objectIds:a},e)}))})):c.resolve(null)},t.prototype._queryFeature=function(e){var t=this,r=this._featureAbortController,n=this._graphic;return this._effectivePopupTemplate=n&&n.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled),c.eachAlways({content:this._getContent(),title:this._getTitle()}).then((function(a){var o=a.content.value,s=a.title.value;if(r===t._featureAbortController&&n){var l=t._checkForRelatedFeatures(o,e),u=t._createFormattedExpressions().then((function(e){n.attributes=i.__assign(i.__assign({},n.attributes),e)})),d=t._queryRequiredFieldsFeature(e).then((function(e){e&&(n.geometry=e.geometry,n.attributes=i.__assign(i.__assign({},n.attributes),e.attributes))}));return c.eachAlways([l,u,d]).then((function(){if(r===t._featureAbortController&&n){t._set("formattedAttributes",t._createFormattedAttributes(o)),t._set("title",t._compileTitle(s));var e=t._compileLastEditInfo();t._set("lastEditInfo",e||null);var i=t._compileContent(o);return t._set("content",i||null),i}}))}}))},t.prototype._formatArcadeArray=function(e){return'<ul class="esri-widget__list">'+e.map((function(e){return"<li>"+("string"==typeof e?T(k(e)):e)+"</li>"})).join("")+"</ul>"},t.prototype._formatArcadeDictionary=function(e){return'<table class="esri-widget__table">'+e.keys().map((function(t){var r=e.field(t);return"<tr><th>"+t+"</th><td>"+("string"==typeof r?T(k(r)):r)+"</td></tr>"})).join("")+"</table>"},t.prototype._createFormattedExpressions=function(){return i.__awaiter(this,void 0,void 0,(function(){var e,t,n,a,o,s,l,u,d,p,h=this;return i.__generator(this,(function(f){switch(f.label){case 0:return t=(e=this)._effectivePopupTemplate,n=e._graphic,o=[],s={},(a=t&&t.expressionInfos)&&a.length?[4,new Promise((function(e,t){Promise.all([r.e(0),r.e(25)]).then((function(){var t=[r("3568")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))]:[2,s];case 1:for(l=f.sent(),u=function(e){var t="expression/"+e.name,r=l.createSyntaxTree(e.expression),a=C.filter((function(e){return l.hasVariable(r,e)})),u=l.loadScriptDependencies(r,!0,a).then((function(){return i.__awaiter(h,void 0,void 0,(function(){var e,o,u,c=this;return i.__generator(this,(function(i){return e=l.getViewInfo({spatialReference:this.spatialReference}),(o=l.createExecContext(n,e)).useAsync=!0,this._addVarsToContext(l,a,o,e),u=l.createFunction(r,o),[2,l.executeAsyncFunction(u,o).then((function(e){s[t]="string"==typeof e?T(k(e)):Array.isArray(e)?c._formatArcadeArray(e):e&&"esri.arcade.Dictionary"===e.declaredClass?c._formatArcadeDictionary(e):e}),(function(e){return E.error("arcade-execution-error",e)}))]}))}))}));o.push(u)},d=0,p=a;d<p.length;d++)u(p[d]);return[2,c.eachAlways(o).then((function(){return s}))]}}))}))},t.prototype._addVarsToContext=function(e,t,r,i){var n=this.graphic,a=this.map;t.forEach((function(t){var o=t.toLowerCase();"$map"===o&&(r.vars[o]=e.convertMapToFeatureSetCollection({map:a,spatialReference:i.sr})),"$layer"===o&&(r.vars[o]=e.convertFeatureLayerToFeatureSet(n.sourceLayer,i.sr)),"$datastore"===o&&(r.vars[o]=e.convertServiceUrlToWorkspace(n.sourceLayer.url,i.sr))}))},t.prototype._createFormattedAttributes=function(e){var t=this,r=this._effectivePopupTemplate,i={global:this._formatAttributes(r&&r.fieldInfos),content:[]};return Array.isArray(e)&&e.forEach((function(e,r){"fields"===e.type&&e.fieldInfos&&(i.content[r]=t._formatAttributes(e.fieldInfos))})),i},t.prototype._getAllFieldInfos=function(e){var t=this._effectivePopupTemplate,r=[],i=t&&t.fieldInfos;return i&&r.push.apply(r,i),e&&Array.isArray(e)?(e.forEach((function(e){"fields"===e.type&&r.push.apply(r,e&&e.fieldInfos)})),r):r},t.prototype._checkForRelatedFeatures=function(e,t){var r=this._graphic,i=this._getAllFieldInfos(e);return this.queryRelatedInfos(r,i,t)},t.prototype._getTooltip=function(e){var t=e.label;return"pie-chart"===e.chartType?t:t+": "+e.value},t.prototype._getChartOption=function(e){var t,r=e.value,i=e.attributes,n=e.formattedAttributes,a=e.fieldName,o=e.relatedFieldName,s=e.fieldInfos,l=e.index,u=e.chartType,c=A.getSourceLayer(this._graphic),d=r.normalizeField,p=r.tooltipField,h=d?this.isRelatedField(d)?i[this.getRelatedFieldInfo(d).fieldName]:i[d]:null,f=o&&void 0!==i[o]?i[o]:void 0!==i[a]?i[a]:n[a],m=void 0===f?null:f&&h?f/h:f,_=new b({x:l,y:m});if(this.isRelatedField(a)){var y=this.getRelatedFieldInfo(a),g=this.getRelatedFieldInfo(p),w=g?g.fieldName:null,x=this._formatValueToFieldInfo(m,{fieldInfos:s,fieldName:o,layer:c,preventPlacesFormatting:!!h});return _.tooltip=this._getTooltip({label:w&&void 0!==i[w]?i[w]:y?y.label||y.fieldName:o,value:x,chartType:u}),_}var I=this._getFieldInfo(s,a),F=this._getFixedFieldName(a,c),M=p&&void 0!==n[p]?n[p]:A.getFieldInfoLabel(I||new v({fieldName:F}),null===(t=this._effectivePopupTemplate)||void 0===t?void 0:t.expressionInfos);return _.tooltip=this._getTooltip({label:M,value:n[F],chartType:u}),_},t.prototype._getFixedFieldName=function(e,t){var r=L(t,e);return r?r.name:e},t.prototype._getFixedFieldNames=function(e,t){var r=this;return e&&e.map((function(e){return r._getFixedFieldName(e,t)}))},t.prototype._setChartValue=function(e){var t=this,r=e.value,n=e.attributes,a=e.formattedAttributes,o=e.chartType,s=e.layer,l=this._effectivePopupTemplate,u=this.relatedInfoCount,c=r.fields,d=r.normalizeField;if(r.fields=this._getFixedFieldNames(c,s),d&&(r.normalizeField=this._getFixedFieldName(d,s)),c.some((function(e){return!!(null!=a[e]||t.isRelatedField(e)&&u)}))){var p=l&&l.fieldInfos;c.forEach((function(e,s){if(t.isRelatedField(e))r.series=i.__spreadArrays(r.series,t._getRelatedChartInfos({fieldInfos:p,fieldName:e,formattedAttributes:a,chartType:o,value:r}));else{var l=t._getChartOption({value:r,index:s,attributes:n,chartType:o,formattedAttributes:a,fieldName:e,fieldInfos:p});r.series.push(l)}}))}},t.prototype._getRelatedChartInfos=function(e){var t=this,r=e.fieldInfos,i=e.fieldName,n=e.formattedAttributes,a=e.chartType,o=e.value,s=[],l=this.getRelatedFieldInfo(i),u=l.fieldName,c=this.getRelatedInfo(l.layerId);if(!c)return s;var d=c.relatedFeatures,p=c.relation;if(!p||!d)return s;var h=p.cardinality;return d.forEach((function(e,l){var c=e.attributes;c&&Object.keys(c).forEach((function(e){e===u&&s.push(t._getChartOption({value:o,index:l,attributes:c,formattedAttributes:n,fieldName:i,chartType:a,relatedFieldName:e,fieldInfos:r}))}))})),"one-to-many"===h||"many-to-many"===h?s:[s[0]]},i.__decorate([f.property()],t.prototype,"_featureAbortController",void 0),i.__decorate([f.property({readOnly:!0})],t.prototype,"content",void 0),i.__decorate([f.property({readOnly:!0})],t.prototype,"contentVMs",void 0),i.__decorate([f.property({type:Boolean})],t.prototype,"defaultPopupTemplateEnabled",void 0),i.__decorate([f.property({readOnly:!0})],t.prototype,"formattedAttributes",void 0),i.__decorate([f.property({type:n})],t.prototype,"graphic",void 0),i.__decorate([f.property({readOnly:!0})],t.prototype,"lastEditInfo",void 0),i.__decorate([f.property({dependsOn:["view"]})],t.prototype,"spatialReference",null),i.__decorate([f.property({readOnly:!0})],t.prototype,"title",void 0),i.__decorate([f.property({dependsOn:["view"]})],t.prototype,"map",null),i.__decorate([f.property({readOnly:!0,dependsOn:["_featureAbortController"]})],t.prototype,"waitingForContent",null),i.__decorate([f.property()],t.prototype,"view",void 0),i.__decorate([f.subclass("esri.widgets.FeatureViewModel")],t)}(M)}).apply(null,i))||(e.exports=n)},"6Rpf":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("KFwS")],void 0===(n=(function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var i=r.getAssetUrl("esri/themes/base/images/files/");t.isSupportedImage=function(e){var t=e.toLowerCase();return"image/bmp"===t||"image/emf"===t||"image/exif"===t||"image/gif"===t||"image/x-icon"===t||"image/jpeg"===t||"image/png"===t||"image/tiff"===t||"image/x-wmf"===t},t.getIconPath=function(e){return e?"text/plain"===e?i+"text-32.svg":"application/pdf"===e?i+"pdf-32.svg":"text/csv"===e?i+"csv-32.svg":"application/gpx+xml"===e?i+"gpx-32.svg":"application/x-dwf"===e?i+"cad-32.svg":"application/postscript"===e||"application/json"===e||"text/xml"===e||"model/vrml"===e?i+"code-32.svg":"application/x-zip-compressed"===e||"application/x-7z-compressed"===e||"application/x-gzip"===e||"application/x-tar"===e||"application/x-gtar"===e||"application/x-bzip2"===e||"application/gzip"===e||"application/x-compress"===e||"application/x-apple-diskimage"===e||"application/x-rar-compressed"===e||"application/zip"===e?i+"zip-32.svg":-1!==e.indexOf("image/")?i+"image-32.svg":-1!==e.indexOf("audio/")?i+"sound-32.svg":-1!==e.indexOf("video/")?i+"video-32.svg":-1!==e.indexOf("msexcel")||-1!==e.indexOf("ms-excel")||-1!==e.indexOf("spreadsheetml")?i+"excel-32.svg":-1!==e.indexOf("msword")||-1!==e.indexOf("ms-word")||-1!==e.indexOf("wordprocessingml")?i+"word-32.svg":-1!==e.indexOf("powerpoint")||-1!==e.indexOf("presentationml")?i+"report-32.svg":i+"generic-32.svg":i+"generic-32.svg"}}).apply(null,i))||(e.exports=n)},"7the":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("jZlN"),r("Gtr7"),r("7MDj"),r("8MXS"),r("Vx27"),r("2/rQ")],void 0===(n=(function(e,t,r,i,n,a,o,s,l){return function(e){function t(t){var r=e.call(this,t)||this;return r._loadingPromise=null,r.created=null,r.creator=null,r.destroyer=null,r.graphic=null,r.handles.add(o.init(r,"creator",(function(e){r._destroyContent(),r._createContent(e)}))),r}return r.__extends(t,e),t.prototype.destroy=function(){this._destroyContent()},Object.defineProperty(t.prototype,"state",{get:function(){return this._loadingPromise?"loading":"ready"},enumerable:!0,configurable:!0}),t.prototype._destroyContent=function(){this.created&&(l.graphicCallback(this.destroyer,{graphic:this.graphic}).catch((function(){return null})),this._set("created",null))},t.prototype._createContent=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,i;return r.__generator(this,(function(r){switch(r.label){case 0:return t=l.graphicCallback(e,{graphic:this.graphic}).catch((function(){return null})),this._loadingPromise=t,this.notifyChange("state"),[4,t];case 1:return i=r.sent(),t!==this._loadingPromise||(this._loadingPromise=null,this.notifyChange("state"),this._set("created",i)),[2]}}))}))},r.__decorate([s.property({readOnly:!0})],t.prototype,"created",void 0),r.__decorate([s.property()],t.prototype,"creator",void 0),r.__decorate([s.property()],t.prototype,"destroyer",void 0),r.__decorate([s.property({type:i})],t.prototype,"graphic",void 0),r.__decorate([s.property({readOnly:!0})],t.prototype,"state",null),r.__decorate([s.subclass("esri.widgets.Feature.FeatureContent.FeatureContentViewModel")],t)}(a.HandleOwnerMixin(n))}).apply(null,i))||(e.exports=n)},"9wQ6":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("ma1f"),r("s37w"),r("8MXS"),r("Vx27"),r("RHxK"),r("qAIg"),r("6Rpf"),r("bC3G")],void 0===(n=(function(e,t,r,i,n,a,o,s,l,u,c){var d={addButton:!0,addSubmitButton:!0,cancelAddButton:!0,cancelUpdateButton:!0,deleteButton:!0,errorMessage:!0,progressBar:!0,updateButton:!0},p="esri-attachments__item-button",h="esri-attachments__form-node",f="esri-attachments__file-fieldset",m="esri-attachments__file-label",_="esri-attachments__file-name",y="esri-attachments__file-input",v="esri-attachments__metadata-fieldset",g="esri-button",b="esri-button--disabled",w="esri-button--secondary",x="esri-button--tertiary",I="esri-button--third",F="esri-button--small",A="esri-button--half",M=window.CSS;return function(e){function t(t,i){var n=e.call(this,t,i)||this;return n.abilities=null,n.displayType="list",n.graphic=null,n.label=void 0,n.messages=null,n.messagesUnits=null,n.selectedFile=null,n.submitting=!1,n.viewModel=new l,n.visibleElements=r.__assign({},d),n._supportsImageOrientation=M&&M.supports&&M.supports("image-orientation","from-image"),n._addAttachmentForm=null,n._updateAttachmentForm=null,n}return r.__extends(t,e),t.prototype.initialize=function(){var e=this;this.own(a.on(this,"viewModel.attachmentInfos","change",(function(){return e.scheduleRender()})),a.init(this,"viewModel.mode",(function(){return e._modeChanged()})))},t.prototype.castVisibleElements=function(e){return r.__assign(r.__assign({},d),e)},t.prototype.addAttachment=function(){var e=this,t=this._addAttachmentForm,r=this.viewModel;return this._set("submitting",!0),this._set("error",null),r.addAttachment(t).then((function(t){return e._set("submitting",!1),e._set("error",null),r.mode="view",t})).catch((function(t){throw e._set("submitting",!1),e._set("error",new i("attachments:add-attachment",e.messages.addErrorMessage,t)),t}))},t.prototype.deleteAttachment=function(e){var t=this,r=this.viewModel;return this._set("submitting",!0),this._set("error",null),r.deleteAttachment(e).then((function(e){return t._set("submitting",!1),t._set("error",null),r.mode="view",e})).catch((function(e){throw t._set("submitting",!1),t._set("error",new i("attachments:delete-attachment",t.messages.deleteErrorMessage,e)),e}))},t.prototype.updateAttachment=function(){var e=this,t=this.viewModel,r=this._updateAttachmentForm;return this._set("submitting",!0),this._set("error",null),t.updateAttachment(r).then((function(r){return e._set("submitting",!1),e._set("error",null),t.mode="view",r})).catch((function(t){throw e._set("submitting",!1),e._set("error",new i("attachments:update-attachment",e.messages.updateErrorMessage,t)),t}))},t.prototype.render=function(){var e=this.submitting,t=this.viewModel.state;return c.tsx("div",{class:this.classes("esri-attachments","esri-widget")},e?this.renderProgressBar():null,"loading"===t?this.renderLoading():this.renderAttachments(),this.renderErrorMessage())},t.prototype.renderErrorMessage=function(){var e=this.error;return e&&this.visibleElements.errorMessage?c.tsx("div",{key:"error-message",class:"esri-attachments__error-message"},e.message):null},t.prototype.renderAttachments=function(){var e=this.viewModel,t=e.mode,r=e.activeAttachmentInfo;return"add"===t?this.renderAddForm():"edit"===t?this.renderDetailsForm(r):this.renderAttachmentContainer()},t.prototype.renderLoading=function(){return c.tsx("div",{class:"esri-attachments__loader-container",key:"loader"},c.tsx("div",{class:"esri-attachments__loader"}))},t.prototype.renderProgressBar=function(){return this.visibleElements.progressBar?c.tsx("div",{class:"esri-attachments__progress-bar",key:"progress-bar"}):null},t.prototype.renderAddForm=function(){var e,t=this.submitting,r=this.selectedFile,i=t||!r,n=this.visibleElements.cancelAddButton?c.tsx("button",{type:"button",bind:this,disabled:t,onclick:this._cancelForm,class:this.classes(g,x,F,A,t&&b)},this.messages.cancel):null,a=this.visibleElements.addSubmitButton?c.tsx("button",{type:"submit",disabled:i,class:this.classes(g,w,F,A,(e={},e[b]=i,e))},this.messages.add):null,o=r?c.tsx("span",{key:"file-name",class:_},r.name):null,s=c.tsx("form",{bind:this,afterCreate:c.storeNode,afterRemoved:c.discardNode,"data-node-ref":"_addAttachmentForm",onsubmit:this._submitAddAttachment},c.tsx("fieldset",{class:f},o,c.tsx("label",{class:this.classes(m,g,w)},r?this.messages.changeFile:this.messages.selectFile,c.tsx("input",{class:y,type:"file",name:"attachment",bind:this,onchange:this._handleFileInputChange}))),a,n);return c.tsx("div",{key:"add-form-container",class:h},s)},t.prototype.renderDetailsForm=function(e){var t,r,i,a=this,o=this.visibleElements,s=this.selectedFile,l=this.submitting,u=e.contentType,d=e.size,p=e.url,A=this.viewModel.abilities,M=l||!s,C=A.editing&&A.operations.delete&&o.deleteButton?c.tsx("button",{key:"delete-button",type:"button",disabled:l,bind:this,onclick:function(t){return a._submitDeleteAttachment(t,e)},class:this.classes(g,F,x,"esri-attachments__delete-button",(t={},t[b]=l,t))},this.messages.delete):null,T=A.editing&&A.operations.update&&o.updateButton?c.tsx("button",{disabled:M,key:"update-button",type:"submit",class:this.classes(g,F,I,(r={},r[b]=M,r))},this.messages.update):null,L=this.visibleElements.cancelUpdateButton?c.tsx("button",{disabled:l,key:"cancel-button",type:"button",bind:this,onclick:this._cancelForm,class:this.classes(g,F,x,I,(i={},i[b]=l,i))},this.messages.cancel):null,R=s?c.tsx("span",{key:"file-name",class:_},s.name):null,k=A.editing&&A.operations.update?c.tsx("fieldset",{key:"file",class:f},R,c.tsx("label",{class:this.classes(m,g,w)},this.messages.changeFile,c.tsx("input",{class:y,type:"file",name:"attachment",bind:this,onchange:this._handleFileInputChange}))):null,E=c.tsx("fieldset",{key:"size",class:v},c.tsx("label",null,n.formatFileSize(this.messagesUnits,d))),P=c.tsx("fieldset",{key:"content-type",class:v},c.tsx("label",null,u)),O=c.tsx("form",{bind:this,afterCreate:c.storeNode,afterRemoved:c.discardNode,"data-node-ref":"_updateAttachmentForm",onsubmit:this._submitUpdateAttachment},c.tsx("div",{class:"esri-attachments__metadata"},E,P),k,c.tsx("div",{class:"esri-attachments__actions"},C,L,T));return c.tsx("div",{key:"edit-form-container",class:h},c.tsx("a",{class:"esri-attachments__item-link",href:p,rel:"noreferrer",target:"_blank",alt:name},this.renderImageMask({attachmentInfo:e,size:400}),c.tsx("div",{class:"esri-attachments__item-link-overlay"},c.tsx("span",{class:"esri-attachments__item-link-overlay-icon"},c.tsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"},c.tsx("path",{d:"M28 13h1v16H3V3h16v1H4v24h24zm-5-9h4.293L15.646 15.638l.707.707L28 4.707V9h1V3h-6z"}),c.tsx("path",{fill:"none",d:"M0 0h32v32H0z"}))))),O)},t.prototype.renderImageMask=function(e){var t,r,i=e.attachmentInfo,n=e.size,a=this.viewModel.supportsResizeAttachments,o=i.contentType,s=i.url,l=a&&u.isSupportedImage(o),d=this._getCSSTransform(i,l),p=d?{transform:d,"image-orientation":"none"}:{},h=-1===s.indexOf("?")?"?":"&",f=l?""+s+h+"w="+n:u.getIconPath(o),m=((t={})["esri-attachments__item-mask--icon"]=!l,t),_=((r={})["esri-attachments__image--resizable"]=a,r);return c.tsx("div",{class:this.classes(m,"esri-attachments__item-mask")},c.tsx("img",{styles:p,alt:"",src:f,class:this.classes(_,"esri-attachments__image")}))},t.prototype.renderAttachmentInfo=function(e){var t=this,r=e.attachmentInfo,i=this.viewModel.abilities,n=r.name,a=r.url,o=this.renderImageMask({attachmentInfo:r,size:"list"===e.displayType?48:400}),s=i.editing?c.tsx("span",{"aria-hidden":"true",class:this.classes("esri-attachments__item-chevron-icon",c.isRTL()?"esri-icon-left":"esri-icon-right")}):null,l=[o,c.tsx("label",{class:"esri-attachments__label"},c.tsx("span",{class:"esri-attachments__filename"},n||this.messages.noTitle),s)],u=i.editing?c.tsx("button",{key:"details-button",bind:this,class:p,title:this.messages.attachmentDetails,"aria-label":this.messages.attachmentDetails,"data-attachment-info-id":r.id,onclick:function(){return t._startEditAttachment(r)}},l):c.tsx("a",{key:"details-link",class:p,href:a,target:"_blank"},l);return c.tsx("li",{class:"esri-attachments__item",key:r},u)},t.prototype.renderAttachmentContainer=function(){var e,t=this,r=this.displayType,i=this.viewModel,n=this.visibleElements,a=i.attachmentInfos,o=i.abilities,s=a&&a.length,l=((e={})["esri-attachments__container--list"]="preview"!==r,e["esri-attachments__container--preview"]="preview"===r,e),u=o.editing&&o.operations.add&&n.addButton?c.tsx("button",{bind:this,onclick:function(){return t._startAddAttachment()},class:this.classes(g,x,"esri-attachments__add-attachment-button")},c.tsx("span",{"aria-hidden":"true",class:this.classes("esri-attachments__item-add-icon","esri-icon-plus")}),this.messages.add):null,d=s?c.tsx("ul",{class:"esri-attachments__items"},a.toArray().map((function(e){return t.renderAttachmentInfo({attachmentInfo:e,displayType:r})}))):c.tsx("div",{class:"esri-widget__content--empty"},this.messages.noAttachments);return c.tsx("div",{key:"attachments-container",class:this.classes("esri-attachments__container",l)},d,u)},t.prototype._modeChanged=function(){this._set("error",null),this._set("selectedFile",null)},t.prototype._handleFileInputChange=function(e){var t=e.target,r=t&&t.files&&t.files.item(0);this._set("selectedFile",r)},t.prototype._submitDeleteAttachment=function(e,t){e.preventDefault(),this.deleteAttachment(t)},t.prototype._submitAddAttachment=function(e){e.preventDefault(),this.addAttachment()},t.prototype._submitUpdateAttachment=function(e){e.preventDefault(),this.updateAttachment()},t.prototype._startEditAttachment=function(e){var t=this.viewModel;t.activeAttachmentInfo=e,t.mode="edit"},t.prototype._startAddAttachment=function(){this.viewModel.mode="add"},t.prototype._cancelForm=function(e){e.preventDefault(),this.viewModel.mode="view"},t.prototype._getCSSTransform=function(e,t){var r=e.orientationInfo;return!this._supportsImageOrientation&&t&&r?[r.rotation?"rotate("+r.rotation+"deg)":"",r.mirrored?"scaleX(-1)":""].join(" "):""},r.__decorate([o.aliasOf("viewModel.abilities")],t.prototype,"abilities",void 0),r.__decorate([o.property(),c.renderable()],t.prototype,"displayType",void 0),r.__decorate([o.aliasOf("viewModel.graphic")],t.prototype,"graphic",void 0),r.__decorate([o.property({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],t.prototype,"label",void 0),r.__decorate([o.property(),c.renderable(),c.messageBundle("esri/widgets/Attachments/t9n/Attachments")],t.prototype,"messages",void 0),r.__decorate([o.property(),c.renderable(),c.messageBundle("esri/core/t9n/Units")],t.prototype,"messagesUnits",void 0),r.__decorate([o.property({readOnly:!0})],t.prototype,"selectedFile",void 0),r.__decorate([c.renderable(),o.property({readOnly:!0})],t.prototype,"submitting",void 0),r.__decorate([c.renderable(),o.property({readOnly:!0})],t.prototype,"error",void 0),r.__decorate([o.property({type:l}),c.renderable(["viewModel.activeAttachmentInfo","viewModel.mode","viewModel.state","viewModel.supportsResizeAttachments","viewModel.attachmentInfos","viewModel.graphic","viewModel.abilities","viewModel.abilities.editing","viewModel.abilities.operations"])],t.prototype,"viewModel",void 0),r.__decorate([o.property(),c.renderable()],t.prototype,"visibleElements",void 0),r.__decorate([o.cast("visibleElements")],t.prototype,"castVisibleElements",null),r.__decorate([o.subclass("esri.widgets.Attachments")],t)}(s)}).apply(null,i))||(e.exports=n)},NKTt:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("zp6E"),r("Gtr7"),r("ma1f"),r("qsST"),r("qMld"),r("Vx27"),r("uajq"),r("IpeC"),r("aZmZ"),r("2/rQ")],void 0===(n=(function(e,t,r,i,n,a,o,s,l,u,c,d,p){var h=new Map,f="esri.widgets.Popup.support.RelatedFeatures",m=o.getLogger(f);return function(e){function t(t){var r=e.call(this,t)||this;return r.relatedInfoCount=null,r.relatedInfos=new Map,r}return r.__extends(t,e),t.prototype.destroy=function(){this.relatedInfos.clear()},t.prototype.addRelatedFeatureAttributes=function(e){var t=this;this.relatedInfos.forEach((function(r){return t._addRelatedFeatureAttribute(e,r)}))},t.prototype.getRelatedFieldInfo=function(e){if(-1===e.indexOf("relationships/"))return null;var t=e.split("/").slice(1);return{layerId:t[0],fieldName:t[1]}},t.prototype.getRelatedInfo=function(e){return this.relatedInfos.get(e.toString())},t.prototype.isRelatedField=function(e){return void 0===e&&(e=""),!!e&&-1!==e.indexOf("relationships/")},t.prototype.queryRelatedInfos=function(e,t,r){var i=this;this.relatedInfos.clear();var n=p.getSourceLayer(e);if(!n)return s.resolve();var a=t.filter((function(e){return e&&i.isRelatedField(e.fieldName)}));return a&&a.length?(this._createRelatedInfos(t,n),this._queryLayerInfos(n,r).then((function(t){return i._updateRelatedInfoLayerInfos(t),i._queryRelatedFeatureMap(e,r).then((function(e){return Object.keys(e).forEach((function(t){i._setRelatedFeatures(e[t],t.toString())})),e}))}))):s.resolve()},t.prototype._addRelatedFeatureAttribute=function(e,t){var r=this;e&&t&&(t.relatedFeatures&&t.relatedFeatures&&t.relatedFeatures.forEach((function(i){return r._addAttributesFromFeature(e,i,t)})),t.relatedStatsFeatures&&t.relatedStatsFeatures&&t.relatedStatsFeatures.forEach((function(i){return r._addAttributesFromFeature(e,i,t)})))},t.prototype._updateRelatedInfoLayerInfo=function(e,t){var r=e.value;r&&(this.getRelatedInfo(t).layerInfo=r.data)},t.prototype._updateRelatedInfoLayerInfos=function(e){var t=this;Object.keys(e).forEach((function(r){return t._updateRelatedInfoLayerInfo(e[r],r.toString())}))},t.prototype._addAttributesFromFeature=function(e,t,r){var i=this;e&&t&&r&&Object.keys(t.attributes).forEach((function(n){var a=i._relatedFieldInfoToString({layerId:r.relation.id.toString(),fieldName:n});e[a]=t.attributes[n]}))},t.prototype._relatedFieldInfoToString=function(e){return e?"relationships/"+e.layerId+"/"+e.fieldName:""},t.prototype._createRelatedInfoForFieldInfo=function(e,t){var r=this.getRelatedFieldInfo(e.fieldName);if(r){var i=r.layerId,n=r.fieldName;if(i){var a=this.getRelatedInfo(i)||this._createRelatedInfo(i,t);if(a&&(a.relatedFields.push(n),e.statisticType)){var o=new d({statisticType:e.statisticType,onStatisticField:n,outStatisticFieldName:n});a.outStatistics.push(o)}}}},t.prototype._createRelatedInfos=function(e,t){var r=this;e.forEach((function(e){return r._createRelatedInfoForFieldInfo(e,t)}))},t.prototype._queryRelatedFeatureMap=function(e,t){var r=this,i={};return this.relatedInfos.forEach((function(n,a){n.layerInfo&&(i[a]=r._queryRelatedLayerFeatures(e,n,t))})),s.eachAlways(i)},t.prototype._queryLayerInfos=function(e,t){var r=this,i={};return this.relatedInfos.forEach((function(n,o){var s=n.relation;if(!s){var l=new a("relation-required","A relation is required on a layer to retrieve related records.");throw m.error(l),l}var u=s.relatedTableId;if("number"!=typeof u)throw l=new a("A related table ID is required on a layer to retrieve related records."),m.error(l),l;var c=e.url+"/"+u,d=h.get(c),p=d||r._queryLayerInfo(c,t);d||h.set(c,p),i[o]=p})),s.eachAlways(i)},t.prototype._queryLayerInfo=function(e,t){return i(e,{query:{f:"json"},signal:t&&t.signal})},t.prototype._queryRelatedLayerFeatures=function(e,t,r){var i=p.getSourceLayer(e).layerId.toString(),n=t.layerInfo,a=t.queryTask,o=t.relation,l=this._getDestinationRelation(n,i);if(l){var u=o.keyField,d=l.keyField,h="string"===this._getDestinationFieldType(n,l)?d+"='"+e.attributes[u]+"'":d+"="+e.attributes[u],f=a.execute(new c({where:h,outFields:t.relatedFields}),r),m=t.outStatistics&&t.outStatistics.length>0&&n.supportsStatistics?a.execute(new c({where:h,outFields:t.relatedFields,outStatistics:t.outStatistics}),r):null;return s.eachAlways({features:f,statsFeatures:m||s.resolve()})}return s.resolve()},t.prototype._setRelatedFeatures=function(e,t){var r=this.getRelatedInfo(t);if(r){var i=e.value;if(i){var n=i.features,a=i.statsFeatures,o=n&&n.value;r.relatedFeatures=o?o.features:[];var s=a&&a.value;r.relatedStatsFeatures=s?s.features:[]}}},t.prototype._getRelation=function(e,t){if(!t.relationships)return null;var r=null;return t.relationships.some((function(t){return t.id===parseInt(e,10)&&(r=t,!0)})),r},t.prototype._createRelatedInfo=function(e,t){var r=this._getRelation(e,t);if(r){var i=t.url+"/"+r.relatedTableId,n={url:i,queryTask:new u({url:i,sourceSpatialReference:t.spatialReference}),relation:r,relatedFields:[],outStatistics:[]};return this.relatedInfos.set(e,n),n}},t.prototype._getDestinationRelation=function(e,t){var r;return e&&e.relationships&&e.relationships.some((function(e){return""+e.relatedTableId===t&&(r=e,!0)})),r},t.prototype._getDestinationFieldType=function(e,t){var r=void 0;return e.fields.some((function(e){return e.name===t.keyField&&(r=-1!==["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble"].indexOf(e.type)?"number":"string",!0)})),r},r.__decorate([l.aliasOf("relatedInfos.size")],t.prototype,"relatedInfoCount",void 0),r.__decorate([l.property()],t.prototype,"relatedInfos",void 0),r.__decorate([l.subclass(f)],t)}(n)}).apply(null,i))||(e.exports=n)},UCuD:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("KY0m"),r("Vx27"),r("RHxK"),r("7the"),r("2/rQ"),r("bC3G")],void 0===(n=(function(e,t,r,i,n,a,o,s,l){return function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.creator=null,n.graphic=null,n.viewModel=null,n._addTargetToAnchors=function(e){i.from(e.querySelectorAll("a")).forEach((function(e){s.shouldOpenInNewTab(e.href)&&!e.hasAttribute("target")&&e.setAttribute("target","_blank")}))},n}return r.__extends(t,e),t.prototype.renderLoading=function(){return l.tsx("div",{class:"esri-feature-content__loader-container",key:"loader"},l.tsx("div",{class:"esri-feature-content__loader"}))},t.prototype.renderCreated=function(){var e,t=null===(e=this.viewModel)||void 0===e?void 0:e.created;return t?t instanceof HTMLElement?l.tsx("div",{key:t,bind:t,afterCreate:this._attachToNode}):l.isWidget(t)?l.tsx("div",{key:t},!t.destroyed&&t.render()):l.tsx("div",{key:t,innerHTML:t,afterCreate:this._addTargetToAnchors}):null},t.prototype.render=function(){var e,t=null===(e=this.viewModel)||void 0===e?void 0:e.state;return l.tsx("div",{class:"esri-feature-content"},"loading"===t?this.renderLoading():this.renderCreated())},t.prototype._attachToNode=function(e){e.appendChild(this)},r.__decorate([n.aliasOf("viewModel.creator")],t.prototype,"creator",void 0),r.__decorate([n.aliasOf("viewModel.graphic")],t.prototype,"graphic",void 0),r.__decorate([l.renderable(["viewModel.created","viewModel.state"]),n.property({type:o})],t.prototype,"viewModel",void 0),r.__decorate([n.subclass("esri.widgets.Feature.FeatureContent")],t)}(a)}).apply(null,i))||(e.exports=n)},"WV+D":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("cTAJ"),r("R2Zq"),r("qMld"),r("nRUF"),r("2Kdy")],void 0===(n=(function(e,t,i,n,a,o,s){Object.defineProperty(t,"__esModule",{value:!0});var l,u,c=a.MapFromValues([["ar",function(){return new Promise((function(e,t){r.e(126).then((function(){var t=[r("wJKZ")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["bs-ba",function(){return new Promise((function(e,t){r.e(127).then((function(){var t=[r("9KsC")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["ca-es",function(){return new Promise((function(e,t){r.e(128).then((function(){var t=[r("ukQu")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["cs-cz",function(){return new Promise((function(e,t){r.e(129).then((function(){var t=[r("s4iU")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["da-dk",function(){return new Promise((function(e,t){r.e(130).then((function(){var t=[r("lL0i")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["de-de",function(){return new Promise((function(e,t){r.e(132).then((function(){var t=[r("NJ9G")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["de-ch",function(){return new Promise((function(e,t){r.e(131).then((function(){var t=[r("30tw")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["el-gr",function(){return new Promise((function(e,t){r.e(133).then((function(){var t=[r("Ud4B")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["en-us",function(){return new Promise((function(e,t){r.e(135).then((function(){var t=[r("9okU")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["en-ca",function(){return new Promise((function(e,t){r.e(134).then((function(){var t=[r("gB4k")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["es-es",function(){return new Promise((function(e,t){r.e(136).then((function(){var t=[r("vr0E")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["et-ee",function(){return new Promise((function(e,t){r.e(137).then((function(){var t=[r("jrzD")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["fi-fi",function(){return new Promise((function(e,t){r.e(138).then((function(){var t=[r("A7te")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["fr-fr",function(){return new Promise((function(e,t){r.e(139).then((function(){var t=[r("CNAt")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["he-il",function(){return new Promise((function(e,t){r.e(140).then((function(){var t=[r("R9Sy")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["hr-hr",function(){return new Promise((function(e,t){r.e(141).then((function(){var t=[r("qjlF")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["hu-hu",function(){return new Promise((function(e,t){r.e(142).then((function(){var t=[r("jNrb")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["id-id",function(){return new Promise((function(e,t){r.e(143).then((function(){var t=[r("E130")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["it-it",function(){return new Promise((function(e,t){r.e(144).then((function(){var t=[r("GYRP")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["ja-jp",function(){return new Promise((function(e,t){r.e(145).then((function(){var t=[r("5RVe")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["ko-kr",function(){return new Promise((function(e,t){r.e(146).then((function(){var t=[r("LjUL")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["lt-lt",function(){return new Promise((function(e,t){r.e(147).then((function(){var t=[r("cIqG")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["lv-lv",function(){return new Promise((function(e,t){r.e(148).then((function(){var t=[r("0SWo")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["nb-no",function(){return new Promise((function(e,t){r.e(149).then((function(){var t=[r("1Bzr")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["nl-nl",function(){return new Promise((function(e,t){r.e(150).then((function(){var t=[r("Rtpe")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["pl-pl",function(){return new Promise((function(e,t){r.e(151).then((function(){var t=[r("E9+c")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["pt-br",function(){return new Promise((function(e,t){r.e(152).then((function(){var t=[r("fHz8")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["pt-pt",function(){return new Promise((function(e,t){r.e(153).then((function(){var t=[r("IdH8")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["ro-ro",function(){return new Promise((function(e,t){r.e(154).then((function(){var t=[r("muxt")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["ru-ru",function(){return new Promise((function(e,t){r.e(155).then((function(){var t=[r("aoLe")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["sl-sl",function(){return new Promise((function(e,t){r.e(156).then((function(){var t=[r("Hohx")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["sr-rs",function(){return new Promise((function(e,t){r.e(157).then((function(){var t=[r("cAqH")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["sv-se",function(){return new Promise((function(e,t){r.e(158).then((function(){var t=[r("VHGb")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["th-th",function(){return new Promise((function(e,t){r.e(159).then((function(){var t=[r("O91k")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["tr-tr",function(){return new Promise((function(e,t){r.e(160).then((function(){var t=[r("GZQm")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["uk-ua",function(){return new Promise((function(e,t){r.e(161).then((function(){var t=[r("Vbcx")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["vi-vn",function(){return new Promise((function(e,t){r.e(162).then((function(){var t=[r("h484")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["zh-cn",function(){return new Promise((function(e,t){r.e(163).then((function(){var t=[r("VMzr")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["zh-hk",function(){return new Promise((function(e,t){r.e(37).then((function(){var t=[r("Ee67")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}],["zh-tw",function(){return new Promise((function(e,t){r.e(37).then((function(){var t=[r("Ee67")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))}]]);function d(e){return e?c.has(e.toLowerCase())?e.toLowerCase():function(e){for(var t=e.split("-")[0].toLowerCase(),r=null,i=0,n=a.keysOfMap(c);i<n.length;i++){var o=n[i];if(s.startsWith(o,t)){r=o;break}}return r}(e)||"en-us":"en-us"}t.getChartLocale=d,t.loadChartsModule=function(e){return void 0===e&&(e=n.getLocale()),i.__awaiter(this,void 0,void 0,(function(){var t,n,a,s;return i.__generator(this,(function(i){switch(i.label){case 0:if(e=d(e),l&&e===u)return[2,l];l=new Promise((function(e,t){r.e(125).then((function(){var t=[r("zB98")];e.apply(null,t)}).bind(this)).catch(t.bind(this))})),u=e,i.label=1;case 1:return i.trys.push([1,5,,6]),[4,o.all([l,c.get(u)()])];case 2:return t=i.sent(),n=t[0],a=t[1],u===e&&(n.am4core.options.defaultLocale=a.default),"function"==typeof Object.assign?[3,4]:[4,new Promise((function(e,t){r.e(228).then((function(){var t=[r("xZHw")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))];case 3:s=i.sent(),Object.defineProperty(Object,"assign",{value:s.assign,writable:!0,configurable:!0}),i.label=4;case 4:return[3,6];case 5:return i.sent(),l=null,u=null,[2,null];case 6:return[2,l]}}))}))}}).apply(null,i))||(e.exports=n)},dvWg:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("Vx27"),r("RHxK"),r("lWc8"),r("o3EH"),r("bC3G")],void 0===(n=(function(e,t,r,i,n,a,o,s){return function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.attributes=null,i.expressionInfos=null,i.fieldInfos=null,i.viewModel=new a,i.messages=null,i.messagesURIUtils=null,i}return r.__extends(t,e),t.prototype.renderFieldInfo=function(e,t){var r,i=this.viewModel.attributes,n=e.fieldName,a=e.label||n,l=i?null==i[n]?"":i[n]:"",u=!(!e.format||!e.format.dateFormat),c="number"!=typeof l||u?o.autoLink(this.messagesURIUtils,l):this._forceLTR(l),d=((r={})["esri-feature-fields__field-data--date"]=u,r);return s.tsx("tr",{key:"fields-element-info-row-"+n+"-"+t},s.tsx("th",{key:"fields-element-info-row-header-"+n+"-"+t,class:"esri-feature-fields__field-header",innerHTML:a}),s.tsx("td",{key:"fields-element-info-row-data-"+n+"-"+t,class:this.classes("esri-feature-fields__field-data",d),innerHTML:c}))},t.prototype.renderFields=function(){var e=this,t=this.viewModel.formattedFieldInfos;return t.length?s.tsx("table",{class:"esri-widget__table",summary:this.messages.fieldsSummary},s.tsx("tbody",null,t.map((function(t,r){return e.renderFieldInfo(t,r)})))):null},t.prototype.render=function(){return s.tsx("div",{class:"esri-feature-fields"},this.renderFields())},t.prototype._forceLTR=function(e){return"‎"+e},r.__decorate([i.aliasOf("viewModel.attributes")],t.prototype,"attributes",void 0),r.__decorate([i.aliasOf("viewModel.expressionInfos")],t.prototype,"expressionInfos",void 0),r.__decorate([i.aliasOf("viewModel.fieldInfos")],t.prototype,"fieldInfos",void 0),r.__decorate([i.property({type:a}),s.renderable(["viewModel.attributes","viewModel.formattedFieldInfos"])],t.prototype,"viewModel",void 0),r.__decorate([i.property(),s.renderable(),s.messageBundle("esri/widgets/Feature/t9n/Feature")],t.prototype,"messages",void 0),r.__decorate([i.property(),s.renderable(),s.messageBundle("esri/widgets/support/t9n/uriUtils")],t.prototype,"messagesURIUtils",void 0),r.__decorate([i.subclass("esri.widgets.Feature.FeatureFields")],t)}(n)}).apply(null,i))||(e.exports=n)},lWc8:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("Gtr7"),r("Vx27"),r("jX7U"),r("Ctes"),r("2/rQ")],void 0===(n=(function(e,t,r,i,n,a,o,s){return function(e){function t(t){var r=e.call(this,t)||this;return r.attributes=null,r.expressionInfos=null,r.fieldInfos=null,r}return r.__extends(t,e),Object.defineProperty(t.prototype,"formattedFieldInfos",{get:function(){var e=this.expressionInfos,t=this.fieldInfos,r=[];return null==t||t.forEach((function(t){if(!t.hasOwnProperty("visible")||t.visible){var i=t.clone();i.label=s.getFieldInfoLabel(i,e),r.push(i)}})),r},enumerable:!0,configurable:!0}),r.__decorate([n.property()],t.prototype,"attributes",void 0),r.__decorate([n.property({type:[a]})],t.prototype,"expressionInfos",void 0),r.__decorate([n.property({type:[o]})],t.prototype,"fieldInfos",void 0),r.__decorate([n.property({readOnly:!0,dependsOn:["expressionInfos","fieldInfos"]})],t.prototype,"formattedFieldInfos",null),r.__decorate([n.subclass("esri.widgets.Feature.FeatureFields.FeatureFieldsViewModel")],t)}(i)}).apply(null,i))||(e.exports=n)},o3EH:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("nRUF")],void 0===(n=(function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var i=[{pattern:/^\s*(https?:\/\/([^\s]+))\s*$/i,target:"_blank",label:"{messages.view}"},{pattern:/^\s*(tel:([^\s]+))\s*$/i,label:"{hierPart}"},{pattern:/^\s*(mailto:([^\s]+))\s*$/i,label:"{hierPart}"},{pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"App Studio Player"},{pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Collector"},{pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Explorer"},{pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Navigator"},{pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Survey123"},{pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Trek2There"},{pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Workforce"},{pattern:/^\s*(iform:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"iForm"},{pattern:/^\s*(flow:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"FlowFinity"},{pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Laserfische"},{pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Microsoft Power Bi"}];t.autoLink=function(e,t){if("string"!=typeof t||!t)return t;var n=function(e){var t=null;return i.some((function(r){return r.pattern.test(e)&&(t=r),!!t})),t}(t);if(!n)return t;var a=t.match(n.pattern),o=r.replace(r.replace(n.label,{messages:e,hierPart:a&&a[2]}),{appName:n.appName});return t.replace(n.pattern,"<a"+(n.target?' target="'+n.target+'"':"")+' href="$1"'+("_blank"===n.target?' rel="noreferrer"':"")+">"+o+"</a>")}}).apply(null,i))||(e.exports=n)},qAIg:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("jZlN"),r("y4WC"),r("ma1f"),r("7MDj"),r("8MXS"),r("Vx27"),r("dHbm"),r("TsGx"),r("2/rQ")],void 0===(n=(function(e,t,r,i,n,a,o,s,l,u,c,d){var p={editing:!1,operations:{add:!0,update:!0,delete:!0}},h=n.ofType(u);return function(e){function t(t){var i=e.call(this,t)||this;return i._getAttachmentsPromise=null,i._attachmentLayer=null,i.abilities=r.__assign({},p),i.activeAttachmentInfo=null,i.attachmentInfos=new h,i.graphic=null,i.mode="view",i.handles.add([s.init(i,"graphic",(function(){return i._graphicChanged()}))]),i}return r.__extends(t,e),t.prototype.destroy=function(){this._attachmentLayer=null,this.graphic=null},t.prototype.castAbilities=function(e){return r.__assign(r.__assign({},p),e)},Object.defineProperty(t.prototype,"state",{get:function(){return this._getAttachmentsPromise?"loading":this.graphic?"ready":"disabled"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"supportsResizeAttachments",{get:function(){return this.get("graphic.layer.capabilities.operations.supportsResizeAttachments")||!1},enumerable:!0,configurable:!0}),t.prototype.getAttachments=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,s,l,u;return r.__generator(this,(function(r){switch(r.label){case 0:if(t=(e=this)._attachmentLayer,i=e.attachmentInfos,!t||"function"!=typeof t.queryAttachments)throw new a("invalid-layer","getAttachments(): A valid layer is required.");return n=this._getFeatureId(),o=new c({objectIds:[n],returnMetadata:!0}),s=[],l=t.queryAttachments(o).then((function(e){return e[n]||s})).catch((function(){return s})),this._getAttachmentsPromise=l,this.notifyChange("state"),[4,l];case 1:return u=r.sent(),i.removeAll(),u.length&&i.addMany(u),this._getAttachmentsPromise=null,this.notifyChange("state"),[2,u]}}))}))},t.prototype.addAttachment=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,i,n,o,s,l,u=this;return r.__generator(this,(function(r){switch(r.label){case 0:if(i=(t=this)._attachmentLayer,n=t.attachmentInfos,o=t.graphic,s=t.abilities,!e)throw new a("invalid-attachment","addAttachment(): An attachment is required.",{attachment:e});if(!s.operations.add)throw new a("invalid-abilities","addAttachment(): add abilities are required.");if(!i||"function"!=typeof i.addAttachment)throw new a("invalid-layer","addAttachment(): A valid layer is required.");return[4,i.addAttachment(o,e).then((function(e){return u._queryAttachment(e.objectId)}))];case 1:return l=r.sent(),n.add(l),[2,l]}}))}))},t.prototype.deleteAttachment=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,i,n,o,s,l;return r.__generator(this,(function(r){switch(r.label){case 0:if(i=(t=this)._attachmentLayer,n=t.attachmentInfos,o=t.graphic,s=t.abilities,!e)throw new a("invalid-attachment-info","deleteAttachment(): An attachmentInfo is required.",{attachmentInfo:e});if(!s.operations.delete)throw new a("invalid-abilities","deleteAttachment(): delete abilities are required.");if(!i||"function"!=typeof i.deleteAttachments)throw new a("invalid-layer","deleteAttachment(): A valid layer is required.");return[4,i.deleteAttachments(o,[e.id]).then((function(){return e}))];case 1:return l=r.sent(),n.remove(l),[2,l]}}))}))},t.prototype.updateAttachment=function(e,t){return void 0===t&&(t=this.activeAttachmentInfo),r.__awaiter(this,void 0,void 0,(function(){var i,n,o,s,l,u,c,d=this;return r.__generator(this,(function(r){switch(r.label){case 0:if(n=(i=this)._attachmentLayer,o=i.attachmentInfos,s=i.graphic,l=i.abilities,!e)throw new a("invalid-attachment","updateAttachment(): An attachment is required.",{attachment:e});if(!t)throw new a("invalid-attachment-info","updateAttachment(): An attachmentInfo is required.",{attachmentInfo:t});if(!l.operations.update)throw new a("invalid-abilities","updateAttachment(): Update abilities are required.");if(u=o.findIndex((function(e){return e===t})),!n||"function"!=typeof n.updateAttachment)throw new a("invalid-layer","updateAttachment(): A valid layer is required.");return[4,n.updateAttachment(s,t.id,e).then((function(e){return d._queryAttachment(e.objectId)}))];case 1:return c=r.sent(),o.splice(u,1,c),[2,c]}}))}))},t.prototype._queryAttachment=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,i,n;return r.__generator(this,(function(r){if(!e)throw new a("invalid-attachment-id","Could not query attachment.");return t=this._attachmentLayer,i=this._getFeatureId(),n=new c({objectIds:[i],attachmentsWhere:"AttachmentId="+e,returnMetadata:!0}),[2,t.queryAttachments(n).then((function(e){return e[i][0]}))]}))}))},t.prototype._getFeatureId=function(){var e=this._attachmentLayer,t=this.graphic;if(!e||!t)return null;var r=t.attributes;return r&&r[e.objectIdField]},t.prototype._graphicChanged=function(){this.graphic&&(this._setAttachmentLayer(),this.getAttachments().catch((function(){})))},t.prototype._setAttachmentLayer=function(){var e=d.getSourceLayer(this.graphic);this._attachmentLayer=e?"scene"===e.type&&e.associatedLayer?e.associatedLayer:e:null},r.__decorate([l.property()],t.prototype,"abilities",void 0),r.__decorate([l.cast("abilities")],t.prototype,"castAbilities",null),r.__decorate([l.property()],t.prototype,"activeAttachmentInfo",void 0),r.__decorate([l.property({readOnly:!0,type:h})],t.prototype,"attachmentInfos",void 0),r.__decorate([l.property({type:i})],t.prototype,"graphic",void 0),r.__decorate([l.property()],t.prototype,"mode",void 0),r.__decorate([l.property({dependsOn:["graphic"],readOnly:!0})],t.prototype,"state",null),r.__decorate([l.property({readOnly:!0,dependsOn:["graphic","graphic.layer","graphic.layer.loaded","graphic.layer.capabilities.operations.supportsResizeAttachments"]})],t.prototype,"supportsResizeAttachments",null),r.__decorate([l.subclass("esri.widgets.Attachments.AttachmentsViewModel")],t)}(o.HandleOwner)}).apply(null,i))||(e.exports=n)},s37w:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("xoE+"),r("nRUF"),r("8uEs"),r("ICCr")],void 0===(n=(function(e,t,r,i,n,a){function o(e,t,r){return e.units[t][r]}function s(e,t,r,i,n){return void 0===i&&(i=2),void 0===n&&(n="abbr"),a.formatNumber(t,{minimumFractionDigits:i,maximumFractionDigits:i})+" "+o(e,r,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.unitName=o,t.formatDecimal=s,t.formatMetricLength=function(e,t,r,i,a){void 0===i&&(i=2),void 0===a&&(a="abbr");var o=n.preferredMetricLengthUnit(t,r);return s(e,n.convertUnit(t,r,o),o,i,a)},t.formatMetricVerticalLength=function(e,t,r,i,a){void 0===i&&(i=2),void 0===a&&(a="abbr");var o=n.preferredMetricVerticalLengthUnit(t,r);return s(e,n.convertUnit(t,r,o),o,i,a)},t.formatImperialLength=function(e,t,r,i,a){void 0===i&&(i=2),void 0===a&&(a="abbr");var o=n.preferredImperialLengthUnit(t,r);return s(e,n.convertUnit(t,r,o),o,i,a)},t.formatImperialVerticalLength=function(e,t,r,i,a){void 0===i&&(i=2),void 0===a&&(a="abbr");var o=n.preferredImperialVerticalLengthUnit(t,r);return s(e,n.convertUnit(t,r,o),o,i,a)},t.formatMetricArea=function(e,t,r,i,a){void 0===i&&(i=2),void 0===a&&(a="abbr");var o=n.preferredMetricAreaUnit(t,r);return s(e,n.convertUnit(t,r,o),o,i,a)},t.formatImperialArea=function(e,t,r,i,a){void 0===i&&(i=2),void 0===a&&(a="abbr");var o=n.preferredImperialAreaUnit(t,r);return s(e,n.convertUnit(t,r,o),o,i,a)},t.formatDMS=function(e,t,r){void 0===r&&(r=2);var i=n.convertUnit(e,t,"degrees"),a=i-Math.floor(i);i-=a;var o=(a*=60)-Math.floor(a);return a-=o,o*=60,i.toFixed()+"\xb0 "+a.toFixed()+"' "+o.toFixed(r)+'"'};var l=["B","kB","MB","GB","TB"];t.formatFileSize=function(e,t){var n=0===t?0:Math.floor(Math.log(t)/Math.log(1024));n=r.clamp(n,0,l.length-1);var o=a.formatNumber(t/Math.pow(1024,n),{maximumFractionDigits:2});return i.replace(e.units.bytes[l[n]],{fileSize:o})}}).apply(null,i))||(e.exports=n)}}]);