Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

577 lines
298 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
require({cache:{"esri/widgets/Features":function(){define("require ../chunks/tslib.es6 ../intl ../core/Collection ../core/Logger ../core/reactiveUtils ../core/throttle ../core/accessorSupport/decorators/property ../core/has ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../geometry/support/geometryUtils ../support/actions/actionUtils ./Feature ./Spinner ./Widget ./Feature/resources ./Feature/support/FeatureContentMixin ./Features/css ./Features/FeaturesRelatedRecords ./Features/FeaturesViewModel ./Features/FeaturesVisibleElements ./Popup/actions ../chunks/componentsUtils ./support/globalCss ./support/Heading ./support/widgetUtils ./support/decorators/messageBundle ./support/decorators/vmEvent ./support/jsxFactory ../intl/substitute ../intl/number".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,l,E,u,d,t,a,e,B,J,P,M,A,w,H){g=class extends z.FeatureContentMixin(x){constructor(q,N){super(q,N);this._featureMenuIntersectionObserverCallback=([r])=>{r?.isIntersecting&&null!=this.viewModel.featurePage&&this.viewModel.featurePage++};this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document});this._feature=this._spinner=this._focusOn=this._featureMenuIntersectionObserverNode=null;
this._relatedRecordsFlowItems=new y;this._relatedRecordsWidget=new E({flowItems:this._relatedRecordsFlowItems});this._actionBarMenuNode=this._featureMenuViewportNode=this._rootFlowItemNode=null;this.featureNavigationTop=this.collapsed=!1;this.headerActions=new t.ActionsCollection;this.headingLevel=2;this.messagesCommon=this.messages=null;this.responsiveActionsEnabled=!1;this.viewModel=new u;this.visibleElements=new d;this._renderAction=(r,p)=>{const C=this._getActionTitle(r),{type:Q,active:T,uid:V,
disabled:aa,indicator:ca}=r;return r.visible?A.tsx("calcite-action",{active:"toggle"===Q?r.value:!1,appearance:"solid",bind:this,"data-action-uid":V,disabled:aa,icon:this._getActionIcon(r),indicator:ca,key:`action-${p}`,loading:T,onclick:this._triggerAction,scale:"s",text:C,title:this._hideActionText?C:void 0},this._getFallbackIcon(r)):null};this._openFeatureMenu=()=>{this.featureMenuOpen=!0;this._focusOn="menu-flow-item"};this._previousFeature=()=>{this.viewModel.selectedFeatureIndex--};this._nextFeature=
()=>{this.viewModel.selectedFeatureIndex++};this._handleFeatureMenuBack=()=>{this.featureMenuOpen&&(this._focusOn="root-flow-item",this.featureMenuOpen=!1)};this._focusFlowItemNode=r=>{this._focusOn===r&&requestAnimationFrame(async()=>{switch(r){case "menu-flow-item":await this._featureMenuViewportNode?.setFocus();break;case "root-flow-item":await this._rootFlowItemNode?.setFocus()}this._focusOn=null})};this._focusFlowItemNodeThrottled=K.throttle(this._focusFlowItemNode,50);this._displaySpinnerThrottled=
K.throttle(()=>this._displaySpinner(),0);this._addSelectedFeatureIndexHandle();this.addHandles([this._displaySpinnerThrottled,this._focusFlowItemNodeThrottled,D.watch(()=>this.viewModel?.active,()=>this._toggleScreenLocationEnabled()),D.watch(()=>this.viewModel?.active,r=>this._relatedRecordsWidget.closed=!r),D.watch(()=>this.visibleElements?.closeButton,r=>this._relatedRecordsWidget.closable=r),D.watch(()=>this.visibleElements?.spinner,r=>this._spinnerEnabledChange(r)),D.watch(()=>this.viewModel?.view,
(r,p)=>this._viewChange(r,p)),D.watch(()=>this.viewModel?.view?.ready,(r,p)=>this._viewReadyChange(r??!1,p??!1)),D.watch(()=>[this.viewModel?.waitingForResult,this.viewModel?.location],()=>{this._hideSpinner();this._displaySpinnerThrottled()}),D.watch(()=>this.viewModel?.screenLocation,()=>this._closeOpenActionMenu()),D.watch(()=>this.selectedFeatureWidget,()=>this._destroyRelatedRecordsFlowItemWidgets()),D.watch(()=>{const r=this.selectedFeatureWidget?.viewModel;return[r?.title,r?.state]},()=>this._setTitleFromFeatureWidget()),
D.watch(()=>{const r=this.selectedFeatureWidget?.viewModel;return[r?.content,r?.state]},()=>this._setContentFromFeatureWidget()),D.watch(()=>this.viewModel?.featureViewModels,()=>this._featureMenuViewportScrollTop()),this._relatedRecordsWidget.on("close",()=>this.close()),this._relatedRecordsWidget.on("exit",()=>this._destroyRelatedRecordsFlowItemWidgets()),this._relatedRecordsWidget.on("open-related-feature",({feature:r})=>this._openRelatedFeature(r))])}loadDependencies(){return a.loadCalciteComponents({action:()=>
new Promise((q,N)=>b(["../chunks/calcite-action"],q,N)),"action-bar":()=>new Promise((q,N)=>b(["../chunks/calcite-action-bar"],q,N)),"action-group":()=>new Promise((q,N)=>b(["../chunks/calcite-action-group"],q,N)),button:()=>new Promise((q,N)=>b(["../chunks/calcite-button"],q,N)),flow:()=>new Promise((q,N)=>b(["../chunks/calcite-flow"],q,N)),"flow-item":()=>new Promise((q,N)=>b(["../chunks/calcite-flow-item"],q,N)),list:()=>new Promise((q,N)=>b(["../chunks/calcite-list"],q,N)),"list-item":()=>new Promise((q,
N)=>b(["../chunks/calcite-list-item"],q,N)),"list-item-group":()=>new Promise((q,N)=>b(["../chunks/calcite-list-item-group"],q,N)),loader:()=>new Promise((q,N)=>b(["../chunks/calcite-loader"],q,N))})}destroy(){this._destroyRelatedRecordsFlowItemWidgets();this._destroySelectedFeatureWidget();this._destroySpinner();this._unobserveFeatureMenuObserver();this._featureMenuIntersectionObserver?.disconnect();this._relatedRecordsWidget?.destroy()}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;
const q=this.view?.widthBreakpoint;return"xsmall"===q||"small"===q||"medium"===q}get _featureNavigationVisible(){return this.viewModel.active&&1<this.viewModel.featureCount&&this.visibleElements.featureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.visibleElements.collapseButton&&!!this.title&&!!this.content}get active(){return this.viewModel.active}get content(){return this.viewModel.content}set content(q){this.viewModel.content=q}get icon(){return null}get featureMenuOpen(){return this.viewModel.featureMenuOpen}set featureMenuOpen(q){this.viewModel.featureMenuOpen=
q}get features(){return this.viewModel.features}set features(q){this.viewModel.features=q}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(q){this.viewModel.goToOverride=q}get location(){return this.viewModel.location}set location(q){this.viewModel.location=q}get label(){return this.messages?.widgetLabel??""}set label(q){this._overrideIfSome("label",q)}get map(){return this.viewModel.map}set map(q){this.viewModel.map=q}get promises(){return this.viewModel.promises}set promises(q){this.viewModel.promises=
q}get selectedFeature(){return this.viewModel.selectedFeature}get selectedFeatureIndex(){return this.viewModel.selectedFeatureIndex}set selectedFeatureIndex(q){this.viewModel.selectedFeatureIndex=q}get selectedFeatureWidget(){const {_feature:q,headingLevel:N,_relatedRecordsFlowItems:r,timeZone:p,spatialReference:C,map:Q}=this,{selectedFeatureViewModel:T}=this.viewModel,V={title:!1};if(!T)return null;q?(q.viewModel=T,q.visibleElements=V):this._feature=new f({flowItems:r,headingLevel:N+1,timeZone:p,
spatialReference:C,map:Q,viewModel:T,visibleElements:V});return this._feature}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(q){this.viewModel.spatialReference=q}get title(){return this.viewModel.title}set title(q){this.viewModel.title=q}get timeZone(){return this.viewModel.timeZone}set timeZone(q){this.viewModel.timeZone=q}get updateLocationEnabled(){return this.viewModel.updateLocationEnabled}set updateLocationEnabled(q){this.viewModel.updateLocationEnabled=q}get view(){return this.viewModel.view}set view(q){this.viewModel.view=
q}get visible(){return this.viewModel.visible}set visible(q){this.viewModel.visible=q}blur(){const {active:q}=this.viewModel;q?this._rootFlowItemNode?.blur():v.getLogger(this).warn("Features can only be blurred when currently active.")}clear(){return this.viewModel.clear()}close(){this.viewModel.visible=!1}fetchFeatures(q,N){return this.viewModel.fetchFeatures(q,N)}focus(){const {active:q}=this.viewModel;q?this._setFocusOn():v.getLogger(this).warn("Features can only be focused when currently active.")}next(){return this.viewModel.next()}open(q){this.removeHandles("selected-index");
this.set({collapsed:q?.collapsed??!1});this.viewModel.open(q);this.addHandles(D.when(()=>!this.viewModel.waitingForResult,()=>this._addSelectedFeatureIndexHandle(),{once:!0}))}previous(){return this.viewModel.previous()}triggerAction(q){return this.viewModel.triggerAction(q)}render(){return A.tsx("div",{bind:this,class:this.classes(l.css.base,e.globalCss.widget,e.globalCss.panel),onkeydown:this._onMainKeydown},this._renderHeader(),this._renderContentContainer())}_renderFeatureNavigation(){return[this._renderPagination(),
this._renderFeatureMenuButton()]}_renderHeader(){return!this.featureMenuOpen&&this.featureNavigationTop&&this._featureNavigationVisible?A.tsx("div",{class:l.css.header,key:"header-actions"},this._renderFeatureNavigation()):null}_renderFooter(){return this.featureMenuOpen||this.featureNavigationTop||!this._featureNavigationVisible?null:A.tsx("div",{class:l.css.footer,key:"footer-actions",slot:"footer"},this._renderFeatureNavigation())}_renderFeatureMenuButton(){const {messages:q,viewModel:N}=this,
{featureCount:r,selectedFeatureIndex:p,pendingPromisesCount:C}=N;return A.tsx("calcite-action",{appearance:"solid",bind:this,icon:"list",key:"feature-menu-button",label:q.selectFeature,loading:0<C,onclick:this._openFeatureMenu,scale:"s",text:w.substitute(q.pageText,{index:H.formatNumber(p+1),total:H.formatNumber(r)}),textEnabled:!0,title:q.selectFeature})}_renderPagination(){const {previous:q,next:N}=this.messagesCommon.pagination;return A.tsx("calcite-action-bar",{class:l.css.paginationActionBar,
expandDisabled:!0,key:"pagination-action-bar",layout:"horizontal",overflowActionsDisabled:!0,scale:"s"},A.tsx("calcite-action-group",{scale:"s"},A.tsx("calcite-action",{appearance:"solid",class:l.css.paginationPrevious,icon:"chevron-left",iconFlipRtl:!0,label:q,onclick:this._previousFeature,scale:"s",text:q,title:q}),A.tsx("calcite-action",{appearance:"solid",icon:"chevron-right",iconFlipRtl:!0,label:N,onclick:this._nextFeature,scale:"s",text:N,title:N})))}_renderFeatureMenuItem(q){const {selectedFeatureViewModel:N,
featureViewModels:r}=this.viewModel,p=q===N,C=r.indexOf(q);return A.tsx("calcite-list-item",{bind:this,"data-feature-index":C,key:`feature-menu-item-${q.uid}`,onblur:this._removeActiveFeature,onfocus:this._setActiveFeature,onmouseleave:this._removeActiveFeature,onmouseover:this._setActiveFeature,selected:p,onCalciteListItemSelect:this._selectFeature},A.tsx("span",{innerHTML:q.title||this.messagesCommon.untitled,slot:"content"}))}_groupResultsByLayer(){const {featureViewModels:q}=this.viewModel,N=
new Map;q.forEach(r=>{var p=r?.graphic;if(p){var {layer:C,sourceLayer:Q}=p;p=(C?.declaredClass.startsWith("esri.layers.")??!1?C:null)||(Q?.declaredClass.startsWith("esri.layers.")??!1?Q:null);var T=N.get(p)??[];N.set(p,[...T,r])}});return N}_renderFeatureMenu(){const {featureViewModels:q}=this.viewModel,N=this._groupResultsByLayer();return q.length?A.tsx("calcite-list",{selectionAppearance:"icon",selectionMode:"single"},Array.from(N.keys(),r=>{const p=N.get(r)?.map(Q=>this._renderFeatureMenuItem(Q)),
C=r?r.title??this.messagesCommon.untitled:null;return this.visibleElements.featureListLayerTitle&&null!==C?A.tsx("calcite-list-item-group",{heading:C,key:r?.uid||"map-graphics"},p):p})):null}_renderHeaderAction(q,N){const r=q.title||"";return q.visible?A.tsx("calcite-action",{active:"toggle"===q.type?q.value:!1,appearance:"solid",bind:this,"data-action-uid":q.uid,disabled:q.disabled,icon:q.icon??void 0,indicator:q.indicator,key:`header-action-${N}`,loading:q.active,onclick:this._triggerHeaderAction,
slot:"header-actions-end",text:r,title:r}):null}_renderHeaderActions(){return this.headerActions.map((q,N)=>this._renderHeaderAction(q,N)).toArray()}_renderContentFeature(){const {headingLevel:q,visibleElements:N,_isCollapsed:r,_collapseEnabled:p,featureNavigationTop:C}=this,{title:Q,active:T}=this.viewModel,V=N.heading&&Q?Q:"";return A.tsx("calcite-flow-item",{afterCreate:this._storeRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,class:this.classes({[l.css.contentFeature]:!0,[l.css.flowItemCollapsed]:r}),
closable:N.closeButton,closed:!T,collapsed:r,collapseDirection:C?"down":"up",collapsible:p,headingLevel:q,key:"root-flow-item",onCalciteFlowItemClose:this.close,onCalciteFlowItemToggle:this._handleCollapseToggle},V?A.tsx(B.Heading,{class:this.classes(l.css.featuresHeading,e.globalCss.heading),innerHTML:V,key:"header-content",level:this.headingLevel,slot:"header-content"}):null,this._renderHeaderActions(),this._renderActionBar(),r?null:A.tsx("div",{class:this.classes(l.css.container,l.css.contentContainer)},
this._renderContent()),this._renderFooter())}_renderFeatureMenuContainer(){const {viewModel:q,featureMenuOpen:N,messages:r,messagesCommon:p}=this,{active:C,featureViewModels:Q,pendingPromisesCount:T}=q;return N?A.tsx("calcite-flow-item",{afterCreate:this._storeFeatureMenuFlowItemNode,afterUpdate:this._focusFeatureMenuFlowItemNode,bind:this,closable:!1,closed:!C,description:w.substitute(r.total,{total:Q.length}),heading:r.selectFeature,key:"feature-menu",loading:q.waitingForContents,onCalciteFlowItemBack:V=>
{V.preventDefault();this._handleFeatureMenuBack()}},0<T?A.tsx("calcite-loader",{class:l.css.loader,inline:!0,key:"feature-menu-loader",label:p.loading,slot:"header-actions-end"}):null,A.tsx("div",{class:l.css.container},this._renderFeatureMenu()),A.tsx("div",{afterCreate:this._featureMenuIntersectionObserverCreated,bind:this,class:l.css.featureMenuObserver}),A.tsx("calcite-button",{appearance:"transparent",onclick:this._handleFeatureMenuBack,slot:"footer-actions",width:"full"},p.back)):null}_renderContentContainer(){const q=
[this._renderContentFeature(),this._renderFeatureMenuContainer(),this._relatedRecordsWidget.render()];return this.visibleElements.flow?A.tsx("calcite-flow",{key:"content-container"},q):q}_getFallbackIcon(q){const {className:N,icon:r}=q;if(r)return null;q=m.substituteActionImage({action:q,feature:this.selectedFeature});const p={[l.css.icon]:!!N,[l.css.actionImage]:!!q};N&&(p[N]=!0);return q||N?A.tsx("span",{"aria-hidden":"true",class:this.classes(l.css.icon,p),key:"icon",styles:m.getActionStyles(q)}):
null}_renderActionBar(){return!this._isCollapsed&&this.visibleElements.actionBar&&this.viewModel.allActions?.length?A.tsx("calcite-action-bar",{expandDisabled:!0,expanded:!this._hideActionText,key:"header-action-bar",scale:"s",slot:"action-bar"},A.tsx("calcite-action-group",{afterCreate:q=>this._actionBarMenuNode=q,overlayPositioning:"fixed",scale:"s"},this._renderActions())):null}_renderActions(){return this.viewModel.allActions.toArray().map(this._renderAction)}_renderContent(){const q=this.viewModel?.content;
return q?"string"===typeof q?A.tsx("div",{class:n.css.contentNode,innerHTML:q,key:q}):this.renderNodeContent(q):null}_setFocusOn(){this.renderNow();requestAnimationFrame(()=>{this._focusOn=this.featureMenuOpen?"menu-flow-item":"root-flow-item"})}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(q){await q.viewModel.updateGeometry();q=q.graphic;var N=q?.geometry;null!=N&&null!=q&&(this._destroyRelatedRecordsFlowItemWidgets(),await this.viewModel.zoomTo({target:N}),N=
c.getPointFromGeometry(N),this.open({features:[q],location:null!=N?N:void 0}))}_focusRootFlowItemNode(){this._focusFlowItemNodeThrottled("root-flow-item")}_focusFeatureMenuFlowItemNode(){this._focusFlowItemNodeThrottled("menu-flow-item")}_storeRootFlowItemNode(q){this._rootFlowItemNode=q;this._focusFlowItemNodeThrottled("root-flow-item")}_storeFeatureMenuFlowItemNode(q){this._featureMenuViewportNode=q;this._focusFlowItemNodeThrottled("menu-flow-item")}_setActiveFeature(q){const {viewModel:N}=this;
q=q.currentTarget["data-feature-index"];N.activeFeature=N.features?.[q]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(q){q=q.currentTarget["data-feature-index"];isNaN(q)||(this.viewModel.selectedFeatureIndex=q);this._handleFeatureMenuBack()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(q){this._unobserveFeatureMenuObserver();
this._featureMenuIntersectionObserver.observe(q);this._featureMenuIntersectionObserverNode=q}_getActionIcon(q){if(q.icon)return q.icon;if(!q.image&&!q.className)return"question"}_getActionTitle(q){const {messages:N,selectedFeature:r,messagesCommon:p}=this,{id:C}=q,Q=r?.attributes,T=q.title??"";return(q="zoom-to-feature"===C?w.substitute(T,{messages:N}):"remove-selected-feature"===C?w.substitute(T,{messages:p}):"zoom-to-clustered-features"===C?w.substitute(T,{messages:N}):"browse-clustered-features"===
C?w.substitute(T,{messages:N}):q.title)&&Q?w.substitute(q,Q):q??""}_onMainKeydown(q){const {key:N}=q;"ArrowLeft"===N&&(q.stopPropagation(),this._handleFeatureMenuBack(),this.previous());"ArrowRight"===N&&(q.stopPropagation(),this._handleFeatureMenuBack(),this.next())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&this._featureMenuViewportNode.scrollContentTo({top:0})}_setContentFromFeatureWidget(){const {selectedFeatureWidget:q}=this;q&&(this.viewModel.content=q)}_setTitleFromFeatureWidget(){const {selectedFeatureWidget:q,
messagesCommon:N}=this,r=q?.viewModel;q&&(this.viewModel.title="error"===r?.state?N?.errorMessage:r?.title||"")}_addSelectedFeatureIndexHandle(){const q=D.watch(()=>this.viewModel?.selectedFeatureIndex,(N,r)=>this._selectedFeatureIndexUpdated(N,r));this.addHandles(q,"selected-index")}_selectedFeatureIndexUpdated(q,N){const {featureCount:r}=this.viewModel;r&&q!==N&&-1!==q&&(this._destroyRelatedRecordsFlowItemWidgets(),this._rootFlowItemNode&&this._rootFlowItemNode.scrollContentTo({top:0}))}_triggerHeaderAction(q){q=
q.currentTarget;if(!q.disabled){var N=q.dataset.actionUid;(q=this.headerActions.find(({uid:r})=>r===N))&&!q.disabled&&("toggle"===q?.type&&(q.value=!q.value),this.emit("trigger-header-action",{action:q}))}}_triggerAction(q){q=q.currentTarget;if(!q.disabled){var N=q.dataset.actionUid,{allActions:r}=this.viewModel;q=r.findIndex(p=>p.uid===N);(r=r.at(q))&&"toggle"===r.type&&(r.value=!r.value);this.viewModel.triggerAction(q)}}_createSpinner(q){q&&(this._spinner=new k({view:q}),q.ui.add(this._spinner,
{key:"features-spinner",position:"manual",internal:!0}))}_wireUpView(q){this._destroySpinner();q&&this.visibleElements?.spinner&&this._createSpinner(q)}_hideSpinner(){const {_spinner:q}=this;q&&(q.location=null,q.hide())}_viewReadyChange(q,N){q?this._wireUpView(this.viewModel?.view):N&&this.viewModel.clear()}_viewChange(q,N){q&&N&&this.viewModel.clear()}_destroySelectedFeatureWidget(){const {_feature:q}=this;q&&(q.viewModel=null,!q.destroyed&&q.destroy());this._feature=null}_closeOpenActionMenu(){const {_actionBarMenuNode:q}=
this;q&&(q.menuOpen=!1)}_destroyRelatedRecordsFlowItemWidgets(){this._relatedRecordsFlowItems.drain(q=>{"showAllEnabled"in q.viewModel&&(q.viewModel.showAllEnabled=!1);q.viewModel=null;q.destroy()})}_toggleScreenLocationEnabled(){const {viewModel:q}=this;q&&(q.screenLocationEnabled=q.active)}_displaySpinner(){const {_spinner:q}=this;if(q){var {location:N,waitingForResult:r}=this.viewModel;r&&N?q.show({location:N}):q.hide()}}_destroySpinner(){const {_spinner:q,view:N}=this;q&&(N?.ui?.remove(q,"features-spinner"),
q.destroy(),this._spinner=null)}_spinnerEnabledChange(q){this._destroySpinner();q&&this._createSpinner(this.viewModel?.view)}};h.__decorate([L.property()],g.prototype,"_focusOn",void 0);h.__decorate([L.property()],g.prototype,"_relatedRecordsFlowItems",void 0);h.__decorate([L.property()],g.prototype,"_hideActionText",null);h.__decorate([L.property()],g.prototype,"_featureNavigationVisible",null);h.__decorate([L.property()],g.prototype,"_isCollapsed",null);h.__decorate([L.property()],g.prototype,"_collapseEnabled",
null);h.__decorate([L.property({readOnly:!0})],g.prototype,"active",null);h.__decorate([L.property()],g.prototype,"collapsed",void 0);h.__decorate([L.property()],g.prototype,"content",null);h.__decorate([L.property()],g.prototype,"icon",null);h.__decorate([L.property()],g.prototype,"featureMenuOpen",null);h.__decorate([L.property()],g.prototype,"featureNavigationTop",void 0);h.__decorate([L.property()],g.prototype,"features",null);h.__decorate([L.property()],g.prototype,"goToOverride",null);h.__decorate([L.property({type:t.ActionsCollection})],
g.prototype,"headerActions",void 0);h.__decorate([L.property()],g.prototype,"headingLevel",void 0);h.__decorate([L.property()],g.prototype,"location",null);h.__decorate([L.property()],g.prototype,"label",null);h.__decorate([L.property()],g.prototype,"map",null);h.__decorate([L.property(),P.messageBundle("esri/widgets/Features/t9n/Features")],g.prototype,"messages",void 0);h.__decorate([L.property(),P.messageBundle("esri/t9n/common")],g.prototype,"messagesCommon",void 0);h.__decorate([L.property()],
g.prototype,"promises",null);h.__decorate([L.property()],g.prototype,"responsiveActionsEnabled",void 0);h.__decorate([L.property({readOnly:!0})],g.prototype,"selectedFeature",null);h.__decorate([L.property()],g.prototype,"selectedFeatureIndex",null);h.__decorate([L.property({readOnly:!0})],g.prototype,"selectedFeatureWidget",null);h.__decorate([L.property()],g.prototype,"spatialReference",null);h.__decorate([L.property()],g.prototype,"title",null);h.__decorate([L.property()],g.prototype,"timeZone",
null);h.__decorate([L.property()],g.prototype,"updateLocationEnabled",null);h.__decorate([L.property()],g.prototype,"view",null);h.__decorate([L.property({type:u}),M.vmEvent(["triggerAction","trigger-action"])],g.prototype,"viewModel",void 0);h.__decorate([L.property({type:d,nonNullable:!0})],g.prototype,"visibleElements",void 0);h.__decorate([L.property()],g.prototype,"visible",null);return g=h.__decorate([F.subclass("esri.widgets.Features")],g)})},"esri/core/throttle":function(){define(["exports"],
function(b){b.throttle=function(h,g,y,v){let D=null,K=1E3;"number"===typeof g?(K=g,v=y):(D=g??null,K=y);let L=0,R;const I=()=>{L=0;h.apply(v,R)};g=(...F)=>{D&&D.apply(v,F);R=F;K?L||=setTimeout(I,K):I()};g.remove=()=>{L&&(clearTimeout(L),L=0)};g.forceUpdate=()=>{L&&(clearTimeout(L),I())};g.hasPendingUpdates=()=>!!L;return g};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/geometryUtils":function(){define(["exports","../../geometry","./scaleUtils","../Extent"],
function(b,h,g,y){function v(D,K,L){const R=D.hasZ?D.z:void 0;if(K?.map)return(null!=L?g.getExtentForScale(K,L):K.extent).clone().centerAt(D).set({zmax:R,zmin:R});const {x:I,y:F,spatialReference:c}=D;return new y({xmin:I-.25,ymin:F-.25,xmax:I+.25,ymax:F+.25,spatialReference:c,zmin:R,zmax:R})}b.createExtentFromGeometry=function(D,K,L){switch(D?.type){case "extent":return D;case "multipoint":case "polygon":case "polyline":return D.extent;case "point":return v(D,K,L);default:return null}};b.createExtentFromPoint=
v;b.getPointFromGeometry=function(D){switch(D?.type){case "point":return D;case "extent":return D.center;case "polygon":return D.centroid;case "multipoint":case "polyline":return D.extent?.center;default:return null}};b.getPointWithElevation=async function(D,K){if(D.hasZ||"2d"===K.type)return D;const L=K.map?.ground;if(!L?.layers.length)return D;({geometry:D}=await L.queryElevation(D,{cache:K.basemapTerrain?.elevationQueryCache}));return D};b.scaleExtent=function(D,K,L){return v(D.center,K,L)};Object.defineProperty(b,
Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/scaleUtils":function(){define(["exports","../../core/mathUtils","../../core/unitUtils"],function(b,h,g){function y(v,D){D=g.getMetersPerUnitForSR(D);return v/(D*g.inchesPerMeter*96)}b.getExtentForScale=function(v,D){const K=v.extent;v=v.width-(v.padding?v.padding.left+v.padding.right:0);D=y(D,K.spatialReference);return K.clone().expand(D*v/K.width)};b.getResolutionForScale=y;b.getResolutionInMetersForScale=function(v){return v/(96*g.inchesPerMeter)};
b.getScale=function(v,D){D=D||v.extent;v=v.width;const K=g.getMetersPerUnitForSR(D?.spatialReference);return D&&v?D.width/v*K*g.inchesPerMeter*96:0};b.getScaleForResolution=function(v,D){D=g.getMetersPerUnitForSR(D);return v*D*g.inchesPerMeter*96};b.isInScaleRange=function(v,D,K){if(D=0===D||h.floatEqualAbsolute(v,D)||v<D)D=0===K||h.floatEqualAbsolute(v,K)||v>K;return D};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/support/actions/actionUtils":function(){define(["exports",
"../../intl","../../intl/substitute"],function(b,h,g){b.getActionIcon=function(y){if(y.icon)return y.icon;if(!("image"in y&&y.image||y.className))return"question"};b.getActionStyles=function(y){return y?{backgroundImage:`url(${y})`}:{}};b.substituteActionImage=function({action:y,feature:v}){v=v?.attributes;return(y="image"in y?y.image:void 0)&&v?g.substitute(y,v):y??""};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Feature":function(){define("require ../chunks/tslib.es6 ../intl ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/accessorSupport/decorators/cast ../core/RandomLCG ../core/has ../core/accessorSupport/decorators/subclass ./Widget ./Feature/FeatureAttachments ./Feature/FeatureContent ./Feature/FeatureExpression ./Feature/FeatureFields ./Feature/FeatureMedia ./Feature/FeatureRelationship ./Feature/FeatureViewModel ./Feature/resources ./Feature/support/FeatureContentMixin ../chunks/componentsUtils ./support/globalCss ./support/Heading ./support/widgetUtils ./support/decorators/messageBundle ./support/jsxFactory ../intl/substitute".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,l,E,u,d,t,a,e,B){var J;const P={title:!0,content:!0,lastEditedInfo:!0};g=J=class extends l.FeatureContentMixin(I){constructor(M,A){super(M,A);this._contentWidgets=[];this.flowItems=null;this.headingLevel=2;this.messagesCommon=this.messages=null;this.visibleElements={...P};this.viewModel=new n}initialize(){this.addHandles(y.watch(()=>this.viewModel?.contentViewModels,()=>this._setupContentWidgets(),y.initial))}loadDependencies(){return E.loadCalciteComponents({notice:()=>
new Promise((M,A)=>b(["../chunks/calcite-notice"],M,A)),loader:()=>new Promise((M,A)=>b(["../chunks/calcite-loader"],M,A))})}destroy(){this._destroyContentWidgets()}get graphic(){return this.viewModel.graphic}set graphic(M){this.viewModel.graphic=M}get defaultPopupTemplateEnabled(){return this.viewModel.defaultPopupTemplateEnabled}set defaultPopupTemplateEnabled(M){this.viewModel.defaultPopupTemplateEnabled=M}get isTable(){return this.viewModel.isTable}get icon(){return"polygon"}set icon(M){this._overrideIfSome("icon",
M)}get label(){return this.messages?.widgetLabel??""}set label(M){this._overrideIfSome("label",M)}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(M){this.viewModel.spatialReference=M}get timeZone(){return this.viewModel.timeZone}set timeZone(M){this.viewModel.timeZone=M}get title(){return this.viewModel.title}castVisibleElements(M){return{...P,...M}}get map(){return this.viewModel.map}set map(M){this.viewModel.map=M}get view(){return this.viewModel.view}set view(M){this.viewModel.view=
M}setActiveMedia(M,A){return this.viewModel.setActiveMedia(M,A)}nextMedia(M){return this.viewModel.nextMedia(M)}previousMedia(M){return this.viewModel.previousMedia(M)}render(){var {state:M}=this.viewModel;M=e.tsx("div",{class:z.css.container,key:"container"},this._renderTitle(),"error"===M?this._renderError():"loading"===M?this._renderLoading():this._renderContentContainer());return e.tsx("div",{class:this.classes(z.css.base,u.globalCss.widget)},M)}_renderError(){const {messagesCommon:M,messages:A,
visibleElements:w}=this;return e.tsx("calcite-notice",{icon:"exclamation-mark-circle",kind:"danger",open:!0,scale:"s"},w.title?e.tsx("div",{key:"error-title",slot:"title"},M.errorMessage):null,e.tsx("div",{key:"error-message",slot:"message"},A.loadingError))}_renderLoading(){return e.tsx("div",{class:z.css.loadingSpinnerContainer,key:"loading-container"},e.tsx("calcite-loader",{inline:!0,label:""}))}_renderContentContainer(){const {visibleElements:M}=this;return M.content?e.tsx("div",{class:z.css.main},
[this._renderContent(),this._renderLastEditInfo()]):null}_renderTitle(){const {visibleElements:M,title:A}=this;return M.title?e.tsx(d.Heading,{class:z.css.title,innerHTML:A,level:this.headingLevel}):null}_renderContent(){var M=this.viewModel.content;return M?Array.isArray(M)?M.length?e.tsx("div",{class:z.css.contentNode,key:"content-content-elements"},M.map(this._renderContentElement,this)):null:"string"===typeof M?(M=this._contentWidgets[0],!M||M.destroyed?null:e.tsx("div",{class:this.classes(z.css.contentNode,
z.css.contentNodeText),key:"content-content"},M.render())):this.renderNodeContent(M):null}_renderContentElement(M,A){const {visibleElements:w}=this;if("boolean"!==typeof w.content&&!w.content?.[M.type])return null;switch(M.type){case "attachments":return this._renderAttachments(A);case "custom":return this._renderCustom(M,A);case "fields":return this._renderFields(A);case "media":return this._renderMedia(A);case "text":return this._renderText(M,A);case "expression":return this._renderExpression(A);
case "relationship":return this._renderRelationship(A);default:return null}}_renderAttachments(M){const A=this._contentWidgets[M];if(!A||A.destroyed)return null;const {state:w,attachmentInfos:H}=A.viewModel;return"loading"===w||0<H.length?e.tsx("div",{class:this.classes(z.css.contentElement),key:this._buildKey("attachments-element",M)},A.render()):null}_renderRelationship(M){const A=this._contentWidgets[M];return A&&!A.destroyed&&this.flowItems?e.tsx("div",{class:z.css.contentElement,key:this._buildKey("relationship-element",
M)},A.render()):null}_renderExpression(M){const A=this._contentWidgets[M];return!A||A.destroyed?null:e.tsx("div",{class:z.css.contentElement,key:this._buildKey("expression-element",M)},A.render())}_renderCustom(M,A){({creator:M}=M);const w=this._contentWidgets[A];return!w||w.destroyed?null:M?e.tsx("div",{class:z.css.contentElement,key:this._buildKey("custom-element",A)},w.render()):null}_renderFields(M){const A=this._contentWidgets[M];return!A||A.destroyed?null:e.tsx("div",{class:z.css.contentElement,
key:this._buildKey("fields-element",M)},A.render())}_renderMedia(M){const A=this._contentWidgets[M];return!A||A.destroyed?null:e.tsx("div",{class:z.css.contentElement,key:this._buildKey("media-element",M)},A.render())}_renderLastEditInfo(){const {visibleElements:M,messages:A}=this;var {lastEditInfo:w}=this.viewModel;if(!w||!M.lastEditedInfo)return null;const {date:H,user:q}=w;w=B.substitute("edit"===w.type?q?A.lastEditedByUser:A.lastEdited:q?A.lastCreatedByUser:A.lastCreated,{date:H,user:q});return e.tsx("div",
{class:this.classes(z.css.lastEditedInfo,z.css.contentElement),key:"edit-info-element"},w)}_renderText(M,A){const w=this._contentWidgets[A];return!w||w.destroyed?null:M.text?e.tsx("div",{class:this.classes(z.css.contentElement,z.css.text),key:this._buildKey("text-element",A)},w.render()):null}_buildKey(M,...A){const w=this.viewModel?.graphic?.uid||"0";A=A.join("-");return`${M}__${w}-${A}`}_destroyContentWidget(M){M&&(M.viewModel=null,!M.destroyed&&M.destroy())}_destroyContentWidgets(){this.removeHandles("relationship-handles");
this._contentWidgets.forEach(M=>this._destroyContentWidget(M));this._contentWidgets=[]}_addFeatureRelationshipHandles(M){const {flowItems:A,visibleElements:w}=this;this.addHandles([y.on(()=>M,"select-record",({featureViewModel:H})=>{A&&(H.abilities={relationshipContent:!0},A.push(new J({flowItems:A,viewModel:H,visibleElements:w})))}),y.on(()=>M,"show-all-records",()=>{if(A){var {viewModel:H}=M;H.showAllEnabled=!0;H=new x({visibleElements:{title:!1,description:!1},viewModel:H});this._addFeatureRelationshipHandles(H);
A.push(H)}})],"relationship-handles")}_setupContentWidgets(){this._destroyContentWidgets();const {headingLevel:M,visibleElements:A}=this;var w=this.viewModel?.content;const {contentViewModels:H}=this.viewModel;Array.isArray(w)?w.forEach((q,N)=>{"attachments"===q.type&&(this._contentWidgets[N]=new F({displayType:q.displayType,headingLevel:A.title&&6>M?M+1:M,viewModel:H[N]}));"fields"===q.type&&(this._contentWidgets[N]=new f({viewModel:H[N]}));"media"===q.type&&(this._contentWidgets[N]=new k({viewModel:H[N]}));
"text"===q.type&&(this._contentWidgets[N]=new c({viewModel:H[N]}));"custom"===q.type&&(this._contentWidgets[N]=new c({viewModel:H[N]}));"expression"===q.type&&(this._contentWidgets[N]=new m({viewModel:H[N]}));"relationship"===q.type&&(q=new x({viewModel:H[N]}),this._addFeatureRelationshipHandles(q),this._contentWidgets[N]=q)},this):(w=H[0])&&!w.destroyed&&(this._contentWidgets[0]=new c({viewModel:w}));this.scheduleRender()}};h.__decorate([v.property()],g.prototype,"graphic",null);h.__decorate([v.property()],
g.prototype,"defaultPopupTemplateEnabled",null);h.__decorate([v.property()],g.prototype,"flowItems",void 0);h.__decorate([v.property()],g.prototype,"headingLevel",void 0);h.__decorate([v.property({readOnly:!0})],g.prototype,"isTable",null);h.__decorate([v.property()],g.prototype,"icon",null);h.__decorate([v.property()],g.prototype,"label",null);h.__decorate([v.property(),a.messageBundle("esri/widgets/Feature/t9n/Feature")],g.prototype,"messages",void 0);h.__decorate([v.property(),a.messageBundle("esri/t9n/common")],
g.prototype,"messagesCommon",void 0);h.__decorate([v.property()],g.prototype,"spatialReference",null);h.__decorate([v.property()],g.prototype,"timeZone",null);h.__decorate([v.property({readOnly:!0})],g.prototype,"title",null);h.__decorate([v.property()],g.prototype,"visibleElements",void 0);h.__decorate([D.cast("visibleElements")],g.prototype,"castVisibleElements",null);h.__decorate([v.property()],g.prototype,"map",null);h.__decorate([v.property()],g.prototype,"view",null);h.__decorate([v.property({type:n})],
g.prototype,"viewModel",void 0);return g=J=h.__decorate([R.subclass("esri.widgets.Feature")],g)})},"esri/widgets/Feature/FeatureAttachments":function(){define("../../chunks/tslib.es6 ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../Attachments ../Widget ./FeatureAttachments/FeatureAttachmentsViewModel ./support/FeatureElementInfo ../support/widgetUtils ../support/jsxFactory".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m){y=class extends R{constructor(f,k){super(f,k);this._featureElementInfo=null;this.attachmentsWidget=new L;this.headingLevel=2;this.viewModel=new I}initialize(){this._featureElementInfo=new F;this.addHandles([h.watch(()=>[this.viewModel?.description,this.viewModel?.title,this.headingLevel],()=>this._setupFeatureElementInfo(),h.initial),h.watch(()=>this.viewModel,f=>this.attachmentsWidget.viewModel=f,h.initial)])}destroy(){this.attachmentsWidget.viewModel=null;this.attachmentsWidget.destroy();
this._featureElementInfo?.destroy()}get description(){return this.viewModel.description}set description(f){this.viewModel.description=f}get displayType(){return this.attachmentsWidget.displayType}set displayType(f){this.attachmentsWidget.displayType=f}get graphic(){return this.viewModel.graphic}set graphic(f){this.viewModel.graphic=f}get title(){return this.viewModel.title}set title(f){this.viewModel.title=f}render(){const {attachmentsWidget:f}=this;return m.tsx("div",{class:"esri-feature-attachments"},
this._featureElementInfo?.render(),f?.render())}_setupFeatureElementInfo(){const {description:f,title:k,headingLevel:x}=this;this._featureElementInfo?.set({description:f,title:k,headingLevel:x})}};b.__decorate([g.property({readOnly:!0})],y.prototype,"attachmentsWidget",void 0);b.__decorate([g.property()],y.prototype,"description",null);b.__decorate([g.property()],y.prototype,"displayType",null);b.__decorate([g.property()],y.prototype,"graphic",null);b.__decorate([g.property()],y.prototype,"headingLevel",
void 0);b.__decorate([g.property()],y.prototype,"title",null);b.__decorate([g.property({type:I})],y.prototype,"viewModel",void 0);return y=b.__decorate([K.subclass("esri.widgets.Feature.FeatureAttachments")],y)})},"esri/widgets/Attachments":function(){define("require ../chunks/tslib.es6 ../core/Error ../core/reactiveUtils ../core/unitFormatUtils ../core/accessorSupport/decorators/property ../core/accessorSupport/decorators/cast ../core/RandomLCG ../core/has ../core/accessorSupport/decorators/subclass ./Widget ./Attachments/AttachmentsViewModel ./Attachments/support/attachmentUtils ../chunks/componentsUtils ./support/globalCss ./support/legacyIcon ./support/widgetUtils ./support/decorators/messageBundle ./support/jsxFactory".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,l){const E={addButton:!0,addSubmitButton:!0,cancelAddButton:!0,cancelUpdateButton:!0,deleteButton:!0,errorMessage:!0,progressBar:!0,updateButton:!0},u=window.CSS;L=class extends F{constructor(d,t){super(d,t);this.displayType="auto";this.selectedFile=this.messagesUnits=this.messages=null;this.submitting=!1;this.viewModel=null;this.visibleElements={...E};this._supportsImageOrientation=u&&u.supports&&u.supports("image-orientation","from-image");this._updateAttachmentForm=
this._addAttachmentForm=null}normalizeCtorArgs(d){d?.viewModel||(d={viewModel:new c,...d});return d}initialize(){this.addHandles([y.on(()=>this.viewModel?.attachmentInfos,"change",()=>this.scheduleRender()),y.on(()=>this.viewModel?.fileInfos,"change",()=>this.scheduleRender()),y.watch(()=>this.viewModel?.mode,()=>this._modeChanged(),y.initial)])}loadDependencies(){return f.loadCalciteComponents({icon:()=>new Promise((d,t)=>b(["../chunks/calcite-icon"],d,t))})}get capabilities(){return this.viewModel.capabilities}set capabilities(d){this.viewModel.capabilities=
d}get effectiveDisplayType(){const {displayType:d}=this;return d&&"auto"!==d?d:this.viewModel.supportsResizeAttachments?"preview":"list"}get graphic(){return this.viewModel.graphic}set graphic(d){this.viewModel.graphic=d}get icon(){return"attachment"}set icon(d){this._overrideIfSome("icon",d)}get label(){return this.messages?.widgetLabel??""}set label(d){this._overrideIfSome("label",d)}castVisibleElements(d){return{...E,...d}}addAttachment(){const {_addAttachmentForm:d,viewModel:t}=this;this._set("submitting",
!0);this._set("error",null);return t.addAttachment(d).then(a=>{this._set("submitting",!1);this._set("error",null);t.mode="view";return a}).catch(a=>{this._set("submitting",!1);this._set("error",new g("attachments:add-attachment",this.messages.addErrorMessage,a));throw a;})}deleteAttachment(d){const {viewModel:t}=this;this._set("submitting",!0);this._set("error",null);return t.deleteAttachment(d).then(a=>{this._set("submitting",!1);this._set("error",null);t.mode="view";return a}).catch(a=>{this._set("submitting",
!1);this._set("error",new g("attachments:delete-attachment",this.messages.deleteErrorMessage,a));throw a;})}updateAttachment(){const {viewModel:d}=this,{_updateAttachmentForm:t}=this;this._set("submitting",!0);this._set("error",null);return d.updateAttachment(t).then(a=>{this._set("submitting",!1);this._set("error",null);d.mode="view";return a}).catch(a=>{this._set("submitting",!1);this._set("error",new g("attachments:update-attachment",this.messages.updateErrorMessage,a));throw a;})}addFile(){const d=
this.viewModel.addFile(this.selectedFile,this._addAttachmentForm);this.viewModel.mode="view";return d}updateFile(){const {viewModel:d}=this,t=d.updateFile(this.selectedFile,this._updateAttachmentForm,d.activeFileInfo);d.mode="view";return t}deleteFile(d){d=this.viewModel.deleteFile(d||this.viewModel.activeFileInfo?.file);this.viewModel.mode="view";return d}render(){const {submitting:d,viewModel:t}=this,{state:a}=t;return l.tsx("div",{class:this.classes("esri-attachments",k.globalCss.widget)},d?this._renderProgressBar():
null,"loading"===a?this._renderLoading():this._renderAttachments(),this._renderErrorMessage())}_renderErrorMessage(){const {error:d,visibleElements:t}=this;return d&&t.errorMessage?l.tsx("div",{class:"esri-attachments__error-message",key:"error-message"},d.message):null}_renderAttachments(){const {activeFileInfo:d,mode:t,activeAttachmentInfo:a}=this.viewModel;return"add"===t?this._renderAddForm():"edit"===t?this._renderDetailsForm(a||d):this._renderAttachmentContainer()}_renderLoading(){return l.tsx("div",
{class:"esri-attachments__loader-container",key:"loader"},l.tsx("div",{class:"esri-attachments__loader"}))}_renderProgressBar(){return this.visibleElements.progressBar?l.tsx("div",{class:"esri-attachments__progress-bar",key:"progress-bar"}):null}_renderAddForm(){const {submitting:d,selectedFile:t}=this;var a=d||!t,e=this.visibleElements.cancelAddButton?l.tsx("button",{bind:this,class:this.classes(k.globalCss.button,k.globalCss.buttonTertiary,k.globalCss.buttonSmall,k.globalCss.buttonHalf,d&&k.globalCss.buttonDisabled),
disabled:d,onclick:this._cancelForm,type:"button"},this.messages.cancel):null;a=this.visibleElements.addSubmitButton?l.tsx("button",{class:this.classes(k.globalCss.button,k.globalCss.buttonSecondary,k.globalCss.buttonSmall,k.globalCss.buttonHalf,{[k.globalCss.buttonDisabled]:a}),disabled:a,type:"submit"},this.messages.add):null;const B=t?l.tsx("span",{class:"esri-attachments__file-name",key:"file-name"},t.name):null;e=l.tsx("form",{afterCreate:n.storeNode,afterRemoved:n.discardNode,bind:this,"data-node-ref":"_addAttachmentForm",
onsubmit:this._submitAddAttachment},l.tsx("fieldset",{class:"esri-attachments__file-fieldset"},B,l.tsx("label",{class:this.classes("esri-attachments__file-label",k.globalCss.button,k.globalCss.buttonSecondary)},t?this.messages.changeFile:this.messages.selectFile,l.tsx("input",{bind:this,class:"esri-attachments__file-input",name:"attachment",onchange:this._handleFileInputChange,type:"file"}))),a,e);return l.tsx("div",{class:"esri-attachments__form-node",key:"add-form-container"},e)}_renderDetailsForm(d){const {visibleElements:t,
viewModel:a,selectedFile:e,submitting:B}=this;var {capabilities:J}=a,P=B||!e;let M;if(e){var A=e.type;M=e.name;var w=e.size}else if(d&&"file"in d)A=d.file.type,M=d.file.name,w=d.file.size;else if(d&&"contentType"in d){A=d.contentType;M=d.name;w=d.size;var H=d.url}var q=J.editing&&J.operations?.delete&&t.deleteButton?l.tsx("button",{bind:this,class:this.classes(k.globalCss.button,k.globalCss.buttonSmall,k.globalCss.buttonTertiary,"esri-attachments__delete-button",{[k.globalCss.buttonDisabled]:B}),
disabled:B,key:"delete-button",onclick:r=>this._submitDeleteAttachment(r,d),type:"button"},this.messages.delete):void 0;P=J.editing&&J.operations?.update&&t.updateButton?l.tsx("button",{class:this.classes(k.globalCss.button,k.globalCss.buttonSmall,k.globalCss.buttonThird,{[k.globalCss.buttonDisabled]:P}),disabled:P,key:"update-button",type:"submit"},this.messages.update):void 0;const N=this.visibleElements.cancelUpdateButton?l.tsx("button",{bind:this,class:this.classes(k.globalCss.button,k.globalCss.buttonSmall,
k.globalCss.buttonTertiary,k.globalCss.buttonThird,{[k.globalCss.buttonDisabled]:B}),disabled:B,key:"cancel-button",onclick:this._cancelForm,type:"button"},this.messages.cancel):void 0;J=J.editing&&J.operations?.update?l.tsx("fieldset",{class:"esri-attachments__file-fieldset",key:"file"},l.tsx("span",{class:"esri-attachments__file-name",key:"file-name"},M),l.tsx("label",{class:this.classes("esri-attachments__file-label",k.globalCss.button,k.globalCss.buttonSecondary)},this.messages.changeFile,l.tsx("input",
{bind:this,class:"esri-attachments__file-input",name:"attachment",onchange:this._handleFileInputChange,type:"file"}))):void 0;w=l.tsx("fieldset",{class:"esri-attachments__metadata-fieldset",key:"size"},l.tsx("label",null,v.formatFileSize(this.messagesUnits,w??0)));A=l.tsx("fieldset",{class:"esri-attachments__metadata-fieldset",key:"content-type"},l.tsx("label",null,A));H=null!=H?l.tsx("a",{class:"esri-attachments__item-link",href:H,rel:"noreferrer",target:"_blank"},this._renderImageMask(d,400),l.tsx("div",
{class:"esri-attachments__item-link-overlay"},l.tsx("span",{class:"esri-attachments__item-link-overlay-icon"},l.tsx("calcite-icon",{icon:"launch"})))):this._renderImageMask(d,400);q=l.tsx("form",{afterCreate:n.storeNode,afterRemoved:n.discardNode,bind:this,"data-node-ref":"_updateAttachmentForm",onsubmit:r=>this._submitUpdateAttachment(r,d)},l.tsx("div",{class:"esri-attachments__metadata"},w,A),J,l.tsx("div",{class:"esri-attachments__actions"},q,N,P));return l.tsx("div",{class:"esri-attachments__form-node",
key:"edit-form-container"},H,q)}_renderImageMask(d,t){return d?"file"in d?this._renderGenericImageMask(d.file.name,d.file.type):this._renderImageMaskForAttachment(d,t):null}_renderGenericImageMask(d,t){var {supportsResizeAttachments:a}=this.viewModel;t=m.getIconPath(t);a={["esri-attachments__image--resizable"]:a};return l.tsx("div",{class:this.classes("esri-attachments__item-mask--icon","esri-attachments__item-mask"),key:t},l.tsx("img",{alt:d,class:this.classes(a,"esri-attachments__image"),src:t,
title:d}))}_renderImageMaskForAttachment(d,t){var {supportsResizeAttachments:a}=this.viewModel;if(!d)return null;const {contentType:e,name:B,url:J}=d;if(!a||!m.isSupportedImage(e))return this._renderGenericImageMask(B,e);d=(d=this._getCSSTransform(d))?{transform:d,"image-orientation":"none"}:{};t=`${J}${J?.includes("?")?"\x26":"?"}w=${t}`;a={["esri-attachments__image--resizable"]:a};return l.tsx("div",{class:this.classes("esri-attachments__item-mask"),key:t},l.tsx("img",{alt:B,class:this.classes(a,
"esri-attachments__image"),src:t,styles:d,title:B}))}_renderFile(d){const {file:t}=d;return l.tsx("li",{class:"esri-attachments__item",key:t},l.tsx("button",{"aria-label":this.messages.attachmentDetails,bind:this,class:"esri-attachments__item-button",key:"details-button",onclick:()=>this._startEditFile(d),title:this.messages.attachmentDetails,type:"button"},this._renderImageMask(d),l.tsx("label",{class:"esri-attachments__label"},l.tsx("span",{class:"esri-attachments__filename"},t.name||this.messages.noTitle),
l.tsx("span",{"aria-hidden":"true",class:this.classes("esri-attachments__item-chevron-icon",n.isRTL(this.container)?x.legacyIcon.left:x.legacyIcon.right)}))))}_renderAttachmentInfo({attachmentInfo:d,displayType:t}){const {viewModel:a,effectiveDisplayType:e}=this,{capabilities:B,supportsResizeAttachments:J}=a,{contentType:P,name:M,url:A}=d;t=this._renderImageMask(d,"list"===t?48:400);var w=B.editing?l.tsx("span",{"aria-hidden":"true",class:this.classes("esri-attachments__item-chevron-icon",n.isRTL(this.container)?
x.legacyIcon.left:x.legacyIcon.right)}):null;w="preview"===e&&J&&m.isSupportedImage(P)?null:l.tsx("label",{class:"esri-attachments__label"},l.tsx("span",{class:"esri-attachments__filename"},M||this.messages.noTitle),w);t=[t,w];t=B.editing?l.tsx("button",{"aria-label":this.messages.attachmentDetails,bind:this,class:"esri-attachments__item-button","data-attachment-info-id":d.id,key:"details-button",onclick:()=>this._startEditAttachment(d),title:this.messages.attachmentDetails,type:"button"},t):l.tsx("a",
{class:"esri-attachments__item-button",href:A??void 0,key:"details-link",rel:"noreferrer",target:"_blank"},t);return l.tsx("li",{class:"esri-attachments__item",key:d},t)}_renderAttachmentContainer(){const {effectiveDisplayType:d,viewModel:t,visibleElements:a}=this,{attachmentInfos:e,capabilities:B,fileInfos:J}=t;var P=!!e?.length;const M=!!J?.length,A={["esri-attachments__container--list"]:"preview"!==d,["esri-attachments__container--preview"]:"preview"===d},w=B.editing&&B.operations?.add&&a.addButton?
l.tsx("button",{bind:this,class:this.classes(k.globalCss.button,k.globalCss.buttonTertiary,"esri-attachments__add-attachment-button"),onclick:()=>this._startAddAttachment(),type:"button"},l.tsx("span",{"aria-hidden":"true",class:this.classes("esri-attachments__item-add-icon",x.legacyIcon.plus)}),this.messages.add):void 0,H=P?l.tsx("ul",{class:"esri-attachments__items",key:"attachments-list"},e.toArray().map(N=>this._renderAttachmentInfo({attachmentInfo:N,displayType:d}))):void 0,q=M?l.tsx("ul",{class:"esri-attachments__items",
key:"file-list"},J.toArray().map(N=>this._renderFile(N))):void 0;P=M||P?void 0:l.tsx("div",{class:k.globalCss.empty},this.messages.noAttachments);return l.tsx("div",{class:this.classes("esri-attachments__container",A),key:"attachments-container"},H,q,P,w)}_modeChanged(){this._set("error",null);this._set("selectedFile",null)}_handleFileInputChange(d){d=d.target.files?.item(0);this._set("selectedFile",d)}_submitDeleteAttachment(d,t){d.preventDefault();t&&("file"in t?this.deleteFile(t.file):t&&this.deleteAttachment(t))}_submitAddAttachment(d){d.preventDefault();
this.viewModel.filesEnabled?this.addFile():this.addAttachment()}_submitUpdateAttachment(d,t){d.preventDefault();t&&"file"in t?this.updateFile():this.updateAttachment()}_startEditAttachment(d){const {viewModel:t}=this;t.activeFileInfo=null;t.activeAttachmentInfo=d;t.mode="edit"}_startEditFile(d){const {viewModel:t}=this;t.activeAttachmentInfo=null;t.activeFileInfo=d;t.mode="edit"}_startAddAttachment(){this.viewModel.mode="add"}_cancelForm(d){d.preventDefault();this.viewModel.mode="view"}_getCSSTransform(d){({orientationInfo:d}=
d);return!this._supportsImageOrientation&&d?[d.rotation?`rotate(${d.rotation}deg)`:"",d.mirrored?"scaleX(-1)":""].join(" "):""}};h.__decorate([D.property()],L.prototype,"capabilities",null);h.__decorate([D.property()],L.prototype,"displayType",void 0);h.__decorate([D.property({readOnly:!0})],L.prototype,"effectiveDisplayType",null);h.__decorate([D.property()],L.prototype,"graphic",null);h.__decorate([D.property()],L.prototype,"icon",null);h.__decorate([D.property()],L.prototype,"label",null);h.__decorate([D.property(),
z.messageBundle("esri/widgets/Attachments/t9n/Attachments")],L.prototype,"messages",void 0);h.__decorate([D.property(),z.messageBundle("esri/core/t9n/Units")],L.prototype,"messagesUnits",void 0);h.__decorate([D.property({readOnly:!0})],L.prototype,"selectedFile",void 0);h.__decorate([D.property({readOnly:!0})],L.prototype,"submitting",void 0);h.__decorate([D.property({readOnly:!0})],L.prototype,"error",void 0);h.__decorate([D.property({type:c})],L.prototype,"viewModel",void 0);h.__decorate([D.property()],
L.prototype,"visibleElements",void 0);h.__decorate([K.cast("visibleElements")],L.prototype,"castVisibleElements",null);return L=h.__decorate([I.subclass("esri.widgets.Attachments")],L)})},"esri/core/unitFormatUtils":function(){define("exports ./ByteSizeUnit ./Cyclical ./mathUtils ./quantityUtils ./string ./unitUtils ../intl/number".split(" "),function(b,h,g,y,v,D,K,L){function R(k,x,n){return k.units[x][n]}function I(k,x,n,z=2,l="abbr"){return`${L.formatNumber(x,{minimumFractionDigits:z,maximumFractionDigits:z,
signDisplay:0<x?"never":"exceptZero"})} ${R(k,n,l)}`}function F(k,x,n,z=2,l="abbr"){return`${L.formatNumber(x,{minimumFractionDigits:z,maximumFractionDigits:z,signDisplay:"exceptZero"})} ${R(k,n,l)}`}function c(k,x){const n=JSON.stringify(x);let z=m.get(n);z||(z=new Intl.NumberFormat("en-US",x),m.set(n,z));return/^[-+]?360\.?0*\u00b0?$/.test(z.format(k))?0:k}const m=new Map,f=["B","kB","MB","GB","TB"];b.formatAngleDegrees=function(k,x,n,z,l,E=g.cyclicalDegrees,u=!0){k=E.normalize(v.convertRotationType(K.convertUnit(k,
x,"degrees"),n,z),0,u);l=l??2;l={style:"unit",unitDisplay:"narrow",unit:"degree",maximumFractionDigits:l,minimumFractionDigits:l,signDisplay:0<k?"never":"exceptZero"};k=c(k,l);return L.formatNumber(k,l)};b.formatDMS=function(k,x,n=2){k=K.convertUnit(k,x,"degrees");x=k-Math.floor(k);k-=x;x*=60;let z=x-Math.floor(x);x-=z;z*=60;return`${k.toFixed()}\u00b0 ${x.toFixed()}' ${z.toFixed(n)}"`};b.formatDecimal=I;b.formatFileSize=function(k,x){x=Math.round(x);let n=0===x?0:Math.floor(Math.log(x)/Math.log(h.ByteSizeUnit.KILOBYTES));
n=y.clamp(n,0,f.length-1);x=L.formatNumber(x/h.ByteSizeUnit.KILOBYTES**n,{maximumFractionDigits:2});return D.replace(k.units.bytes[f[n]],{fileSize:x})};b.formatImperialArea=function(k,x,n,z=2,l="abbr"){const E=K.adaptiveImperialAreaUnit(x,n);return I(k,K.convertUnit(x,n,E),E,z,l)};b.formatImperialLength=function(k,x,n,z=2,l="abbr"){const E=K.adaptiveImperialLengthUnit(x,n);return I(k,K.convertUnit(x,n,E),E,z,l)};b.formatImperialRelativeLength=function(k,x,n,z=2,l="abbr"){const E=K.adaptiveImperialLengthUnit(x,
n);return F(k,K.convertUnit(x,n,E),E,z,l)};b.formatImperialRelativeVerticalLength=function(k,x,n,z=2,l="abbr"){const E=K.adaptiveImperialVerticalLengthUnit(x,n);return F(k,K.convertUnit(x,n,E),E,z,l)};b.formatImperialVerticalLength=function(k,x,n,z=2,l="abbr"){const E=K.adaptiveImperialVerticalLengthUnit(x,n);return I(k,K.convertUnit(x,n,E),E,z,l)};b.formatMetricArea=function(k,x,n,z=2,l="abbr"){const E=K.adaptiveMetricAreaUnit(x,n);return I(k,K.convertUnit(x,n,E),E,z,l)};b.formatMetricLength=function(k,
x,n,z=2,l="abbr"){const E=K.adaptiveMetricLengthUnit(x,n);return I(k,K.convertUnit(x,n,E),E,z,l)};b.formatMetricRelativeLength=function(k,x,n,z=2,l="abbr"){const E=K.adaptiveMetricLengthUnit(x,n);return F(k,K.convertUnit(x,n,E),E,z,l)};b.formatMetricRelativeVerticalLength=function(k,x,n,z=2,l="abbr"){const E=K.adaptiveMetricVerticalLengthUnit(x,n);return F(k,K.convertUnit(x,n,E),E,z,l)};b.formatMetricVerticalLength=function(k,x,n,z=2,l="abbr"){const E=K.adaptiveMetricVerticalLengthUnit(x,n);return I(k,
K.convertUnit(x,n,E),E,z,l)};b.formatRelativeAngleDegrees=function(k,x,n,z,l){n!==z&&(k=-k);l=l??2;n={style:"unit",unitDisplay:"narrow",unit:"degree",maximumFractionDigits:l,minimumFractionDigits:l,signDisplay:"exceptZero"};k=K.convertUnit(k,x,"degrees")%360;k=c(k,n);return L.formatNumber(k,n)};b.formatRelativeDecimal=F;b.unitName=R;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/core/ByteSizeUnit":function(){define(["exports"],function(b){b.ByteSizeUnit=void 0;var h=b.ByteSizeUnit||
(b.ByteSizeUnit={});h[h.KILOBYTES=1024]="KILOBYTES";h[h.MEGABYTES=1048576]="MEGABYTES";h[h.GIGABYTES=1073741824]="GIGABYTES";Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/core/quantityUtils":function(){define(["exports","./unitUtils"],function(b,h){function g(f,k){return{type:h.unitType(k),value:f,unit:k}}function y(f,k){return{type:h.unitType(k),value:f,unit:k}}function v(f,k){return{type:h.unitType(k),value:f,unit:k}}function D(f,k,x="arithmetic"){return{type:h.unitType(k),
value:f,unit:k,rotationType:x}}function K(f,k){const x=L(f,k);return"angle"===f.type?D(x,k,f.rotationType):g(x,k)}function L(f,k){return h.convertUnit(f.value,f.unit,k)}const R=y(0,"meters"),I=v(0,"square-meters"),F=D(0,"radians"),c=D(0,"degrees"),m=D(0,"degrees","geographic");b.convertRotationType=function(f,k,x){if(k===x)return f;switch(x){case "arithmetic":case "geographic":return-f+90}};b.createAngle=D;b.createArea=v;b.createLength=y;b.createQuantity=g;b.createScalar=function(f){return{value:f}};
b.isBaseUnit=function(f){return h.isBaseUnit(f.unit)};b.max=function(f,k){return null==f?k:null==k?f:f.value>h.convertUnit(k.value,k.unit,f.unit)?f:k};b.min=function(f,k){return null==f?k:null==k?f:f.value<h.convertUnit(k.value,k.unit,f.unit)?f:k};b.scale=function(f,k){return null==f?null:{...f,value:f.value*k}};b.toBaseUnit=function(f){return K(f,h.baseUnitForUnit(f.unit))};b.toUnit=K;b.valueInUnit=L;b.zeroDegrees=c;b.zeroDegreesGeographic=m;b.zeroMeters=R;b.zeroRadians=F;b.zeroSquareMeters=I;Object.defineProperty(b,
Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Attachments/AttachmentsViewModel":function(){define("../../chunks/tslib.es6 ../../Graphic ../../core/Accessor ../../core/Collection ../../core/Error ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/accessorSupport/decorators/cast ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/subclass ../../rest/query/support/AttachmentInfo ../../rest/support/AttachmentQuery ../Feature/support/featureUtils".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f){const k={editing:!1,operations:{add:!0,update:!0,delete:!0}},x=y.ofType(c);g=class extends g{constructor(n){super(n);this._attachmentLayer=this._getAttachmentsPromise=null;this.capabilities={...k};this.activeFileInfo=this.activeAttachmentInfo=null;this.attachmentInfos=new x;this.fileInfos=new y;this.graphic=null;this.mode="view";this.filesEnabled=!1;this.addHandles(D.watch(()=>this.graphic,()=>this._graphicChanged(),D.initial))}destroy(){this.graphic=this._attachmentLayer=
null}castCapabilities(n){return{...k,...n}}get state(){return this._getAttachmentsPromise?"loading":this.graphic?"ready":"disabled"}get supportsResizeAttachments(){var {graphic:n}=this;if(!n)return!1;n=n.layer||n.sourceLayer;return n?.loaded&&"capabilities"in n&&n.capabilities&&"operations"in n.capabilities&&"supportsResizeAttachments"in n.capabilities.operations&&n.capabilities.operations.supportsResizeAttachments||!1}async getAttachments(){const {_attachmentLayer:n,attachmentInfos:z}=this;if(!n||
"function"!==typeof n.queryAttachments)throw new v("invalid-layer","getAttachments(): A valid layer is required.");const l=this._getObjectId();var E=new m({objectIds:[l],returnMetadata:!0});const u=[];this._getAttachmentsPromise=E=n.queryAttachments(E).then(d=>d[l]||u).catch(()=>u);this.notifyChange("state");E=await E;z.destroyAll();E.length&&z.addMany(E);this._getAttachmentsPromise=null;this.notifyChange("state");return E}async addAttachment(n,z=this.graphic){const {_attachmentLayer:l,attachmentInfos:E,
capabilities:u}=this;if(!z)throw new v("invalid-graphic","addAttachment(): A valid graphic is required.",{graphic:z});if(!n)throw new v("invalid-attachment","addAttachment(): An attachment is required.",{attachment:n});if(!u.operations?.add)throw new v("invalid-capabilities","addAttachment(): add capabilities are required.");if(!l||"function"!==typeof l.addAttachment)throw new v("invalid-layer","addAttachment(): A valid layer is required.");n=await l.addAttachment(z,n).then(d=>this._queryAttachment(d.objectId,
z));E.add(n);return n}async deleteAttachment(n){const {_attachmentLayer:z,attachmentInfos:l,graphic:E,capabilities:u}=this;if(!n)throw new v("invalid-attachment-info","deleteAttachment(): An attachmentInfo is required.",{attachmentInfo:n});if(!u.operations?.delete)throw new v("invalid-capabilities","deleteAttachment(): delete capabilities are required.");if(!z||"function"!==typeof z.deleteAttachments)throw new v("invalid-layer","deleteAttachment(): A valid layer is required.");if(!E)throw new v("invalid-graphic",
"deleteAttachment(): A graphic is required.");const d=await z.deleteAttachments(E,[n.id]).then(()=>n);l.remove(d);d.destroy();return d}async updateAttachment(n,z=this.activeAttachmentInfo){const {_attachmentLayer:l,attachmentInfos:E,graphic:u,capabilities:d}=this;if(!n)throw new v("invalid-attachment","updateAttachment(): An attachment is required.",{attachment:n});if(!z)throw new v("invalid-attachment-info","updateAttachment(): An attachmentInfo is required.",{attachmentInfo:z});if(!d.operations?.update)throw new v("invalid-capabilities",
"updateAttachment(): Update capabilities are required.");const t=E.indexOf(z);if(!l||"function"!==typeof l.updateAttachment)throw new v("invalid-layer","updateAttachment(): A valid layer is required.");if(!u)throw new v("invalid-graphic","updateAttachment(): A graphic is required.");n=await l.updateAttachment(u,z.id,n).then(a=>this._queryAttachment(a.objectId));E.splice(t,1,n);return n}async commitFiles(){await Promise.all(this.fileInfos.items.map(n=>this.addAttachment(n.form)));this.fileInfos.removeAll();
return this.getAttachments()}addFile(n,z){if(!n||!z)return null;n={file:n,form:z};this.fileInfos.add(n);return n}updateFile(n,z,l=this.activeFileInfo){if(!n||!z||!l)return null;l=this.fileInfos.indexOf(l);-1<l&&this.fileInfos.splice(l,1,{file:n,form:z});return this.fileInfos.items[l]}deleteFile(n){const z=this.fileInfos.find(l=>l.file===n);return z?(this.fileInfos.remove(z),z):null}async _queryAttachment(n,z){const {_attachmentLayer:l}=this;if(!n||!l?.queryAttachments)throw new v("invalid-attachment-id",
"Could not query attachment.");const E=this._getObjectId(z);n=new m({objectIds:[E],attachmentsWhere:`AttachmentId=${n}`,returnMetadata:!0});return l.queryAttachments(n).then(u=>u[E][0])}_getObjectId(n=this.graphic){return n?.getObjectId()??null}_graphicChanged(){this.graphic&&(this._setAttachmentLayer(),this.getAttachments().catch(()=>{}))}_setAttachmentLayer(){var {graphic:n}=this;this._attachmentLayer=(n=f.getSourceLayer(n))?"scene"===n.type&&null!=n.associatedLayer?n.associatedLayer:n:null}};b.__decorate([K.property()],
g.prototype,"capabilities",void 0);b.__decorate([L.cast("capabilities")],g.prototype,"castCapabilities",null);b.__decorate([K.property()],g.prototype,"activeAttachmentInfo",void 0);b.__decorate([K.property()],g.prototype,"activeFileInfo",void 0);b.__decorate([K.property({readOnly:!0,type:x})],g.prototype,"attachmentInfos",void 0);b.__decorate([K.property()],g.prototype,"fileInfos",void 0);b.__decorate([K.property({type:h})],g.prototype,"graphic",void 0);b.__decorate([K.property()],g.prototype,"mode",
void 0);b.__decorate([K.property({readOnly:!0})],g.prototype,"state",null);b.__decorate([K.property()],g.prototype,"filesEnabled",void 0);b.__decorate([K.property({readOnly:!0})],g.prototype,"supportsResizeAttachments",null);return g=b.__decorate([F.subclass("esri.widgets.Attachments.AttachmentsViewModel")],g)})},"esri/rest/query/support/AttachmentInfo":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/accessorSupport/ensureType ../../../core/RandomLCG ../../../core/has ../../../core/accessorSupport/decorators/subclass ../../../layers/support/exifUtils".split(" "),
function(b,h,g,y,v,D,K,L){var R;const I={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};h=R=class extends h.JSONSupport{constructor(F){super(F);this.url=this.size=this.parentObjectId=this.parentGlobalId=this.name=this.keywords=this.globalId=this.id=this.exifInfo=this.contentType=null}get orientationInfo(){var {exifInfo:F}=
this;F=L.getExifValue({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:F});return I[F]||null}clone(){return new R({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};b.__decorate([g.property({type:String})],h.prototype,"contentType",void 0);b.__decorate([g.property()],h.prototype,"exifInfo",void 0);b.__decorate([g.property({readOnly:!0})],
h.prototype,"orientationInfo",null);b.__decorate([g.property({type:y.Integer})],h.prototype,"id",void 0);b.__decorate([g.property({type:String})],h.prototype,"globalId",void 0);b.__decorate([g.property({type:String})],h.prototype,"keywords",void 0);b.__decorate([g.property({type:String})],h.prototype,"name",void 0);b.__decorate([g.property({json:{read:!1}})],h.prototype,"parentGlobalId",void 0);b.__decorate([g.property({json:{read:!1}})],h.prototype,"parentObjectId",void 0);b.__decorate([g.property({type:y.Integer})],
h.prototype,"size",void 0);b.__decorate([g.property({json:{read:!1}})],h.prototype,"url",void 0);return h=R=b.__decorate([K.subclass("esri.rest.query.support.AttachmentInfo")],h)})},"esri/layers/support/exifUtils":function(){define(["exports"],function(b){function h(g){const {tagName:y,tags:v}=g;return v&&y?v.find(D=>D.name===y)?.value||null:null}b.getExifValue=function(g){const {exifInfo:y,exifName:v,tagName:D}=g;return y&&v&&D?(g=y.find(K=>K.name===v))?h({tagName:D,tags:g.tags}):null:null};Object.defineProperty(b,
Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Feature/support/featureUtils":function(){define("exports ../../../core/Logger ../../../core/string ../../../intl/date ../../../intl/number ../../../layers/support/fieldUtils ../../../layers/support/layerUtils ../../../smartMapping/support/utils ../../../support/arcadeOnDemand ../../../time/timeZoneUtils".split(" "),function(b,h,g,y,v,D,K,L,R,I){function F(G){return G?V.test(G):!1}function c(G,O){if(O&&F(O)&&G){var S=O.replace(V,"").toLowerCase();
return G.find(({name:U})=>U.toLowerCase()===S)}}function m(G,O){return(O=f(O,G))?O.name:G}function f(G,O){return G&&"function"===typeof G.getField&&O?G.getField(O)??null:null}function k({formattedAttributes:G,template:O,fieldInfoMap:S}){return`${g.replace(g.replace(O,U=>`{${S.get(U.toLowerCase())?.fieldName||U}}`),G).replaceAll(C,"")}`.trim()}function x(G,O,S=!1){const U=O[G];"string"===typeof U&&(S=(S?encodeURIComponent(U):U).replaceAll(T,"%27"),O[G]=S)}function n(G,O=!1){const S={...G};Object.keys(S).forEach(U=>
x(U,S,O));return S}function z(G,O){return G.replaceAll(Q,(S,U,W)=>(S=f(O,W))?`{${S.name}}`:U)}function l(G,O,S){return(G=z(G,S))?G.replaceAll(Z,(U,W,X)=>{W=`${W||X}`.trim();return g.replace(U,n(O,W&&"{"!==W[0]||!1))}):G}function E(G){return null!=G&&"object"===typeof G&&"fieldsIndex"in G&&"geometryType"in G&&"getField"in G&&"load"in G&&"loaded"in G&&"objectIdField"in G&&"spatialReference"in G&&"type"in G&&("feature"===G.type||"scene"===G.type||"sublayer"===G.type)&&"when"in G}function u(G){return null!=
G&&"object"===typeof G&&"createQuery"in G&&"queryFeatureCount"in G&&"queryObjectIds"in G&&"queryRelatedFeatures"in G&&"queryRelatedFeaturesCount"in G&&"relationships"in G}function d(G){return E(G)&&u(G)}function t(G,O){const {fieldInfos:S,fieldName:U,preventPlacesFormatting:W,layer:X,timeZone:fa}=O;O=e(S,U);var ha=f(X,U);if(O&&!D.isRasterPixelValueField(U)){ha=ha?.type;const ia=O.format?.dateFormat;if("date"===ha||"date-only"===ha||"time-only"===ha||"timestamp-offset"===ha||ia)return L.formatAnyDate(G,
{format:ia,fieldType:ha,timeZoneOptions:{layerTimeZone:X&&"preferredTimeZone"in X?X.preferredTimeZone:null,viewTimeZone:fa,datesInUnknownTimezone:X&&"datesInUnknownTimezone"in X?!!X.datesInUnknownTimezone:!1}})}O=O?.format;if("string"===typeof G&&D.isRasterPixelValueField(U)&&O)return G=G.trim(),/\d{2}-\d{2}/.test(G)?G:G.includes(",")?a(G,",",", ",O):G.includes(";")?a(G,";","; ",O):G.includes(" ")?a(G," "," ",O):v.formatNumber(Number(G),v.convertNumberFormatToIntlOptions(O));"string"!==typeof G||
!O||null!=O.dateFormat||null==O.places&&null==O.digitSeparator||(ha=Number(G),isNaN(ha)||(G=ha));return"string"===typeof G||null==G||null==O?P(G):W?v.formatNumber(G,{...v.convertNumberFormatToIntlOptions(O),minimumFractionDigits:0,maximumFractionDigits:20}):v.formatNumber(G,v.convertNumberFormatToIntlOptions(O))}function a(G,O,S,U){return G.trim().split(O).map(W=>v.formatNumber(Number(W),v.convertNumberFormatToIntlOptions(U))).join(S)}function e(G,O){if(G?.length&&O)return G.find(S=>S.fieldName?.toLowerCase()===
O.toLowerCase())}function B({fieldName:G,graphic:O,layer:S}){if(H(G)||!S||"function"!==typeof S.getFeatureType)return null;const {typeIdField:U}=S;return U&&G===U?(G=S.getFeatureType(O))?G.name:null:null}function J({fieldName:G,value:O,graphic:S,layer:U}){return H(G)||!U||"function"!==typeof U.getFieldDomain?null:(G=S&&U.getFieldDomain(G,{feature:S}))&&"coded-value"===G.type?G.getName(O):null}function P(G){return"string"===typeof G?G.replaceAll(aa,'\x3cbr class\x3d"esri-text-new-line" /\x3e'):G}function M(G){const {value:O,
fieldName:S,fieldInfos:U,fieldInfoMap:W,layer:X,graphic:fa,timeZone:ha}=G;return null==O?"":(G=J({fieldName:S,value:O,graphic:fa,layer:X}))||(G=B({fieldName:S,graphic:fa,layer:X}))?G:W.get(S.toLowerCase())?t(O,{fieldInfos:U||Array.from(W.values()),fieldName:S,layer:X,timeZone:ha}):(G=X?.fieldsIndex?.get(S))&&(L.isAnyDateField(G)||D.isTimeOnlyField(G))?L.formatAnyDate(O,{fieldType:G.type,timeZoneOptions:{layerTimeZone:X&&"preferredTimeZone"in X?X.preferredTimeZone:null,viewTimeZone:ha,datesInUnknownTimezone:X&&
"datesInUnknownTimezone"in X?!!X.datesInUnknownTimezone:!1}}):P(O)}async function A(G,O){const {layer:S,graphic:U,outFields:W,objectIds:X,returnGeometry:fa,spatialReference:ha}=G;G=X[0];if("number"!==typeof G&&"string"!==typeof G)return O={layer:S,graphic:U,objectId:G,requiredFields:W},h.getLogger("esri.widgets.Feature.support.featureUtils").warn("Could not query required fields for the specified feature. The feature's ID is invalid.",O),null;if(!K.getEffectiveLayerCapabilities(S)?.operations?.supportsQuery)return O=
{layer:S,graphic:U,requiredFields:W,returnGeometry:fa},h.getLogger("esri.widgets.Feature.support.featureUtils").warn("The specified layer cannot be queried. The following fields will not be available.",O),null;G=S.createQuery();G.objectIds=X;G.outFields=W?.length?W:[S.objectIdField];G.returnGeometry=!!fa;G.returnZ=!!fa;G.returnM=!!fa;G.outSpatialReference=ha;return(await S.queryFeatures(G,O)).features[0]}async function w(G){if(!G.expressionInfos?.length)return!1;var O=await R.loadArcade();({arcadeUtils:{hasGeometryFunctions:O}}=
O);return O(G)}function H(G=""){return G?G.includes("relationships/"):!1}function q({attributes:G,graphic:O,relatedInfo:S,fieldInfos:U,fieldInfoMap:W,layer:X,timeZone:fa}){G&&O&&S&&Object.keys(O.attributes).forEach(ha=>{var ia=(ia={layerId:S.relation.id.toString(),fieldName:ha},`${"relationships/"}${ia.layerId}/${ia.fieldName}`);G[ia]=M({fieldName:ia,fieldInfos:U,fieldInfoMap:W,layer:X,value:O.attributes[ha],graphic:O,timeZone:fa})})}function N({attributes:G,relatedInfo:O,fieldInfoMap:S,fieldInfos:U,
layer:W,timeZone:X}){G&&O&&(O.relatedFeatures?.forEach(fa=>q({attributes:G,graphic:fa,relatedInfo:O,fieldInfoMap:S,fieldInfos:U,layer:W,timeZone:X})),O.relatedStatsFeatures?.forEach(fa=>q({attributes:G,graphic:fa,relatedInfo:O,fieldInfoMap:S,fieldInfos:U,layer:W,timeZone:X})))}function r(G,O){return G?.allTables.find(S=>"feature"===S.type&&S.layerId===O.id&&S.url===O.layer?.url)}function p({map:G,relationship:O,relationship:{relatedTableId:S},relatedLayer:U,layers:W}){if(!W)return null;for(const X of W)if("map-image"===
X.type){if(W=p({layers:X.sublayers,map:G,relatedLayer:U,relationship:O})||p({layers:X.subtables,map:G,relatedLayer:U,relationship:O}))return W}else if(d(X))if("sublayer"===U.type){if(X!==U&&X.id===S)return X.isTable?r(G,X):X}else{W="scene"===U.type&&U.associatedLayer?U.associatedLayer.url:U.url;if(!W)break;if("sublayer"===X.type){if(X!==U&&X.layer?.url===W&&X.id===S)return X.isTable?r(G,X):X}else if(X!==U&&X.url===W&&X.layerId===S)return X}return null}const C=/href=(""|'')/gi,Q=/(\{([^{\r\n]+)\})/g,
T=/'/g,V=/^\s*expression\//i,aa=/(\n)/gi,ca=/[\u00A0-\u9999<>&]/gim,Z=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,ea=/^(?:mailto:|tel:)/,Y=y.convertDateFormatToIntlOptions("short-date-short-time"),ba=G=>{if(!G)return!1;G=G.toUpperCase();return G.includes("CURRENT_TIMESTAMP")||G.includes("CURRENT_DATE")||G.includes("CURRENT_TIME")},da=({layer:G,method:O,query:S,definitionExpression:U})=>{G.capabilities?.query?.supportsCacheHint&&"attachments"!==O&&(G=null!=S.where?S.where:null,O=null!=S.geometry?S.geometry:
null,ba(U)||ba(G)||"extent"===O?.type||"tile"===S.resultType||(S.cacheHint=!0))};b.applyTextFormattingHTML=P;b.createFieldInfoMap=function(G,O){const S=new Map;if(!G)return S;for(const U of G)U.fieldName&&(G=m(U.fieldName,O),U.fieldName=G,S.set(G.toLowerCase(),U));return S};b.findRelatedLayer=function(G,O,S){return G&&O&&S?"sublayer"===O.type?p({layers:O.layer?.sublayers,map:G,relatedLayer:O,relationship:S})||p({layers:O.layer?.subtables,map:G,relatedLayer:O,relationship:S}):p({layers:G.allLayers,
map:G,relatedLayer:O,relationship:S})||p({layers:G.allTables,map:G,relatedLayer:O,relationship:S}):null};b.fixTokens=z;b.formatAttributes=function({fieldInfos:G,attributes:O,layer:S,graphic:U,fieldInfoMap:W,relatedInfos:X,timeZone:fa}){const ha={};X?.forEach(ia=>N({attributes:ha,relatedInfo:ia,fieldInfoMap:W,fieldInfos:G,layer:S,timeZone:fa}));O&&Object.keys(O).forEach(ia=>{ha[ia]=M({fieldName:ia,fieldInfos:G,fieldInfoMap:W,layer:S,value:O[ia],graphic:U,timeZone:fa})});return ha};b.formatEditInfo=
function(G,O,S,U){const {creatorField:W,creationDateField:X,editorField:fa,editDateField:ha}=G;if(O){G=I.getTimeZoneFormattingOptions(U&&"preferredTimeZone"in U?U.preferredTimeZone:null,U&&"datesInUnknownTimezone"in U?!!U.datesInUnknownTimezone:!1,S,Y,"date");G={...Y,...G};S=O[ha];if("number"===typeof S)return O=O[fa],{type:"edit",date:y.formatDate(S,G),user:O};S=O[X];return"number"===typeof S?(O=O[W],{type:"create",date:y.formatDate(S,G),user:O}):null}};b.formatValueToFieldInfo=t;b.getAllFieldInfos=
function(G){const O=[];if(!G)return O;const {fieldInfos:S,content:U}=G;S&&O.push(...S);if(!U||!Array.isArray(U))return O;U.forEach(W=>{"fields"===W.type&&(W=W?.fieldInfos)&&O.push(...W)});return O};b.getFieldInfo=e;b.getFieldInfoLabel=function(G,O){return(O=c(O,G?.fieldName))?O.title||null:G?G.label||G.fieldName:null};b.getFixedFieldName=m;b.getFixedFieldNames=function(G,O){return G&&G.map(S=>m(S,O))};b.getHighlightKeyForFeature=function(G){const O=G.getObjectId();return null!=O?`oid:${O}`:`uid:${G.uid}`};
b.getSourceLayer=function(G){if(null!=G)return(G.sourceLayer||G.layer)??void 0};b.graphicCallback=async function({type:G,value:O,event:S}){try{return"function"===typeof O?O(S):O}catch(U){h.getLogger("esri.widgets.Feature.support.featureUtils").error("error",`An error occurred when calling the "${G}" function`,{error:U,graphic:S.graphic,value:O})}};b.htmlEntities=function(G){return G.replaceAll(ca,O=>`&#${O.charCodeAt(0)};`)};b.isExpressionField=F;b.isFeatureSupportedLayer=E;b.isGraphicForRelatableFeatureSupportedLayer=
function(G){return!!G&&"object"===typeof G&&"sourceLayer"in G&&d(G.sourceLayer)};b.isRelatableFeatureSupportedLayer=d;b.isRelatableLayer=u;b.isRelatedField=H;b.preLayerQueryCallback=({query:G,layer:O,method:S})=>{da({layer:O,method:S,query:G,definitionExpression:`${O.definitionExpression} ${O.serviceDefinitionExpression??""}`})};b.preRequestCallback=({queryPayload:G,layer:O,method:S})=>{da({layer:O,method:S,query:G,definitionExpression:`${O.definitionExpression} ${O.serviceDefinitionExpression??""}`})};
b.querySourceLayer=A;b.queryUpdatedFeature=async function({graphic:G,popupTemplate:O,layer:S,spatialReference:U},W){if(S&&O&&("function"===typeof S.load&&await S.load(W),G.attributes)){var X=S.objectIdField,fa=G.attributes[X];if(null!=fa){fa=[fa];var ha=await O.getRequiredFields(S.fieldsIndex),ia=D.featureHasFields(ha,G);X=ia?[]:ha.includes(X)?ha:[...ha,X];O=O.returnGeometry||await w(O);if(!ia||O)if(S=await A({layer:S,graphic:G,outFields:X,objectIds:fa,returnGeometry:O,spatialReference:U},W))S.geometry&&
(G.geometry=S.geometry),S.attributes&&(G.attributes={...G.attributes,...S.attributes})}}};b.shouldOpenInNewTab=function(G=""){if(G)return!ea.test(G.trim().toLowerCase())};b.substituteAttributes=k;b.substituteFieldsInLinksAndAttributes=function({attributes:G,globalAttributes:O,layer:S,text:U,expressionAttributes:W,fieldInfoMap:X}){return U?k({formattedAttributes:O,template:l(U,{...O,...W,...G},S),fieldInfoMap:X}):""};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/smartMapping/support/utils":function(){define("exports ../../intl/date ../../layers/support/fieldUtils ../../support/arcadeOnDemand ../../support/basemapUtils ../../time/timeZoneUtils".split(" "),
function(b,h,g,y,v,D){function K(f){return String(f).padStart(2,"0")}function L(f,k,x){if("date"===k||"number"===k){"number"===k&&(f=new Date(f));k=x?f.getFullYear():f.getUTCFullYear();const n=K((x?f.getMonth():f.getUTCMonth())+1),z=K(x?f.getDate():f.getUTCDate()),l=K(x?f.getHours():f.getUTCHours()),E=K(x?f.getMinutes():f.getUTCMinutes());f=K(x?f.getSeconds():f.getUTCSeconds());f=`TIMESTAMP'${k}-${n}-${z} ${l}:${E}:${f}'`}return f}function R(f,k){if(k instanceof Date)return"date";if("number"===typeof k)return"number";
if("string"===typeof k&&(f=f.getField(k),"\x3cnow\x3e"!==k.toLowerCase()&&g.isDateField(f)))return"field"}const I={light:"streets gray topo terrain oceans osm gray-vector streets-vector topo-vector streets-relief-vector streets-navigation-vector topo-3d navigation-3d streets-3d osm-3d gray-3d arcgis-light-gray arcgis-navigation arcgis-streets arcgis-streets-relief arcgis-topographic arcgis-oceans osm-standard osm-standard-relief osm-streets osm-streets-relief osm-light-gray arcgis-terrain arcgis-charted-territory arcgis-community arcgis-colored-pencil arcgis-modern-antique arcgis-midcentury arcgis-newspaper arcgis-hillshade-light".split(" "),
dark:"satellite hybrid dark-gray dark-gray-vector streets-night-vector navigation-dark-3d streets-dark-3d dark-gray-3d arcgis-imagery arcgis-imagery-standard arcgis-dark-gray arcgis-navigation-night arcgis-streets-night osm-dark-gray arcgis-nova arcgis-hillshade-dark".split(" ")},F={years:365,months:30,days:1,hours:1/24,minutes:1/1440,seconds:1/86400,milliseconds:1/864E5},c=new Set(["integer","small-integer"]);let m=null;b.castIntegerFieldToFloat=function(f){return`cast(${f} as float)`};b.dateTypes=
["date","date-only","timestamp-offset"];b.defaultBasemapGroups=I;b.fieldDelimiter=",";b.formatAnyDate=function(f,k){const {format:x,timeZoneOptions:n,fieldType:z}=k??{};let l;n&&({timeZone:E,timeZoneName:l}=D.getTimeZoneFormattingOptions(n.layerTimeZone,n.datesInUnknownTimezone,n.viewTimeZone,h.convertDateFormatToIntlOptions(x||"short-date-short-time"),z));if("string"===typeof f&&isNaN(Date.parse("time-only"===z?`1970-01-01T${f}Z`:f)))return f;switch(z){case "date-only":var E=h.convertDateFormatToIntlOptions(x||
"short-date");return"string"===typeof f?h.formatDateOnly(f,{...E}):h.formatDate(f,{...E,timeZone:D.utc});case "time-only":return E=h.convertDateFormatToIntlOptions(x||"short-time"),"string"===typeof f?h.formatTimeOnly(f,E):h.formatDate(f,{...E,timeZone:D.utc});case "timestamp-offset":if(!E&&"string"===typeof f&&(new Date(f)).toISOString()!==f)return f;E=(k=x||n?h.convertDateFormatToIntlOptions(x||"short-date-short-time"):void 0)?{...k,timeZone:E,timeZoneName:l}:void 0;return"string"===typeof f?h.formatTimestamp(f,
E):h.formatDate(f,E);default:return k=x||n?h.convertDateFormatToIntlOptions(x||"short-date-short-time"):void 0,h.formatDate("string"===typeof f?new Date(f):f,k?{...k,timeZone:E,timeZoneName:l}:void 0)}};b.getBasemapGroup=function(f,k=I){for(const x in k)if(k[x].includes(f))return x};b.getBasemapId=function(f,k,x=!0){let n=null;f&&("string"===typeof f?k.includes(f)&&(n=f):n=v.getWellKnownBasemapId(f));return x?n||"gray":n};b.getDateDiffSQL=function(f,k,x,n){const {hasQueryEngine:z}=f;x=L(x,R(f,x),
z);f=L(k,R(f,k),z);f=`(${x} - ${f})`;n=F[n];k="/";1>n&&(n=1/n,k="*");return{sqlExpression:1===n?f:`(${f} ${k} ${n})`,sqlWhere:null}};b.getDateType=R;b.getFieldsList=async function(f){const {field:k,field2:x,field3:n,normalizationField:z,valueExpression:l}=f;f=[];l&&(m||({arcadeUtils:f}=await y.loadArcade(),m=f),f=m.extractFieldNames(l));k&&f.push(k);x&&f.push(x);n&&f.push(n);z&&f.push(z);return f};b.getNormalizationType=function(f){let k=f.normalizationType;k||(f.normalizationField?k="field":null!=
f.normalizationTotal&&(k="percent-of-total"));return k??void 0};b.isAnyDateField=function(f){return g.isDateField(f)||g.isDateOnlyField(f)||g.isTimestampOffsetField(f)};b.isIntegerField=function(f,k){f=k&&f.getField(k);return!!f&&c.has(f.type)};b.unitValueInDays=F;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Attachments/support/attachmentUtils":function(){define(["exports","../../../assets"],function(b,h){b.getIconPath=function(g){const y=h.getAssetUrl("esri/themes/base/images/files/");
return g?"text/plain"===g?`${y}text-32.svg`:"application/pdf"===g?`${y}pdf-32.svg`:"text/csv"===g?`${y}csv-32.svg`:"application/gpx+xml"===g?`${y}gpx-32.svg`:"application/x-dwf"===g?`${y}cad-32.svg`:"application/postscript"===g||"application/json"===g||"text/xml"===g||"model/vrml"===g?`${y}code-32.svg`:"application/x-zip-compressed"===g||"application/x-7z-compressed"===g||"application/x-gzip"===g||"application/x-tar"===g||"application/x-gtar"===g||"application/x-bzip2"===g||"application/gzip"===g||
"application/x-compress"===g||"application/x-apple-diskimage"===g||"application/x-rar-compressed"===g||"application/zip"===g?`${y}zip-32.svg`:g.includes("image/")?`${y}image-32.svg`:g.includes("audio/")?`${y}sound-32.svg`:g.includes("video/")?`${y}video-32.svg`:g.includes("msexcel")||g.includes("ms-excel")||g.includes("spreadsheetml")?`${y}excel-32.svg`:g.includes("msword")||g.includes("ms-word")||g.includes("wordprocessingml")?`${y}word-32.svg`:g.includes("powerpoint")||g.includes("presentationml")?
`${y}report-32.svg`:`${y}generic-32.svg`:`${y}generic-32.svg`};b.isSupportedImage=function(g){g=g.toLowerCase();return"image/bmp"===g||"image/emf"===g||"image/exif"===g||"image/gif"===g||"image/x-icon"===g||"image/jpeg"===g||"image/png"===g||"image/tiff"===g||"image/x-wmf"===g};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/support/globalCss":function(){define(["exports"],function(b){b.globalCss={anchor:"esri-widget__anchor",anchorDisabled:"esri-widget__anchor--disabled",
button:"esri-button",buttonDisabled:"esri-button--disabled",buttonHalf:"esri-button--half",buttonSecondary:"esri-button--secondary",buttonSmall:"esri-button--small",buttonTertiary:"esri-button--tertiary",buttonThird:"esri-button--third",disabled:"esri-disabled",empty:"esri-widget__content--empty",emptyIllustration:"esri-widget__content-illustration--empty",heading:"esri-widget__heading",hidden:"esri-hidden",input:"esri-input",interactive:"esri-interactive",loader:"esri-widget__loader",loaderAnimation:"esri-widget__loader-animation",
loaderText:"esri-widget__loader-text",menu:"esri-menu",menuHeader:"esri-menu__header",menuItem:"esri-menu__list-item",menuItemActive:"esri-menu__list-item--active",menuItemFocus:"esri-menu__list-item--focus",menuList:"esri-menu__list",panel:"esri-widget--panel",panelHeightOnly:"esri-widget--panel-height-only",primaryTick:"primary-tick",primaryTickAmPm:"primary-tick__ampm",primaryTickLabel:"primary-tick__label",rotating:"esri-rotating",secondaryTick:"secondary-tick",select:"esri-select",table:"esri-widget__table",
widget:"esri-widget",widgetButton:"esri-widget--button",widgetButtonActive:"esri-widget--button-active",widgetDisabled:"esri-widget--disabled"};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/support/legacyIcon":function(){define(["exports"],function(b){b.legacyIcon={checkMark:"esri-icon-check-mark",close:"esri-icon-close",collapse:"esri-icon-collapse",down:"esri-icon-down",downArrow:"esri-icon-down-arrow",dragHorizontal:"esri-icon-drag-horizontal",dragVertical:"esri-icon-drag-vertical",
duplicate:"esri-icon-duplicate",expand:"esri-icon-expand",fontFallbackText:"esri-icon-font-fallback-text",forward:"esri-icon-forward",handleVertical:"esri-icon-handle-vertical",icon:"esri-icon",left:"esri-icon-left",loadingIndicator:"esri-icon-loading-indicator",locateCircled:"esri-icon-locate-circled",minus:"esri-icon-minus",noticeTriangle:"esri-icon-notice-triangle",pause:"esri-icon-pause",play:"esri-icon-play",plus:"esri-icon-plus",radioChecked:"esri-icon-radio-checked",radioUnchecked:"esri-icon-radio-unchecked",
refresh:"esri-icon-refresh",reverse:"esri-icon-reverse",right:"esri-icon-right",search:"esri-icon-search",swap:"esri-icon-swap",table:"esri-icon-table",trash:"esri-icon-trash",up:"esri-icon-up",upArrow:"esri-icon-up-arrow",upDownArrows:"esri-icon-up-down-arrows",urbanModel:"esri-icon-urban-model",zoomInMagnifyingGlass:"esri-icon-zoom-in-magnifying-glass",zoomToObject:"esri-icon-zoom-to-object"};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Feature/FeatureAttachments/FeatureAttachmentsViewModel":function(){define("../../../chunks/tslib.es6 ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../Attachments/AttachmentsViewModel".split(" "),
function(b,h,g,y,v,D,K){g=class extends K{constructor(L){super(L);this.title=this.description=null}};b.__decorate([h.property()],g.prototype,"description",void 0);b.__decorate([h.property()],g.prototype,"title",void 0);return g=b.__decorate([D.subclass("esri.widgets.Feature.FeatureAttachments.FeatureAttachmentsViewModel")],g)})},"esri/widgets/Feature/support/FeatureElementInfo":function(){define("../../../chunks/tslib.es6 ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../Widget ../../support/Heading ../../support/widgetUtils ../../support/jsxFactory".split(" "),
function(b,h,g,y,v,D,K,L,R,I){g=class extends K{constructor(F,c){super(F,c);this.description=null;this.headingLevel=2;this.title=null}render(){return I.tsx("div",{class:"esri-feature-element-info"},this._renderTitle(),this._renderDescription())}_renderTitle(){const {title:F}=this;return F?I.tsx(L.Heading,{class:"esri-feature-element-info__title",innerHTML:F,level:this.headingLevel}):null}_renderDescription(){const {description:F}=this;return F?I.tsx("div",{class:"esri-feature-element-info__description",
innerHTML:F,key:"description"}):null}};b.__decorate([h.property()],g.prototype,"description",void 0);b.__decorate([h.property()],g.prototype,"headingLevel",void 0);b.__decorate([h.property()],g.prototype,"title",void 0);return g=b.__decorate([D.subclass("esri.widgets.Feature.support.FeatureElementInfo")],g)})},"esri/widgets/support/Heading":function(){define(["exports","../../core/mathUtils","./globalCss","./widgetUtils","./jsxFactory"],function(b,h,g,y,v){b.Heading=function({level:D,class:K,...L},
R){D=h.clamp(Math.ceil(D),1,6);return v.tsx(`h${D}`,{...L,"aria-level":String(D),class:y.classes(g.globalCss.heading,K),role:"heading"},R)};b.incrementHeadingLevel=function(D,K=1){return h.clamp(Math.ceil(D+K),1,6)};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Feature/FeatureContent":function(){define("../../chunks/tslib.es6 ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../Widget ./FeatureContent/FeatureContentViewModel ./support/featureUtils ../support/widget ../support/jsxFactory".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F){g=class extends K{constructor(c,m){super(c,m);this.viewModel=null;this._addTargetToAnchors=f=>{Array.from(f.querySelectorAll("a")).forEach(k=>{R.shouldOpenInNewTab(k.href)&&!k.hasAttribute("target")&&k.setAttribute("target","_blank")})}}get creator(){return this.viewModel?.creator}set creator(c){this.viewModel&&(this.viewModel.creator=c)}get graphic(){return this.viewModel?.graphic}set graphic(c){this.viewModel&&(this.viewModel.graphic=c)}render(){return F.tsx("div",
{class:"esri-feature-content"},"loading"===this.viewModel?.state?this._renderLoading():this._renderCreated())}_renderLoading(){return F.tsx("div",{class:"esri-feature-content__loader-container",key:"loader"},F.tsx("div",{class:"esri-feature-content__loader"}))}_renderCreated(){const c=this.viewModel?.created;return c?c instanceof HTMLElement?F.tsx("div",{afterCreate:this._attachToNode,bind:c,key:c}):I.isWidget(c)?F.tsx("div",{key:c},!c.destroyed&&c.render()):F.tsx("div",{afterCreate:this._addTargetToAnchors,
innerHTML:c,key:c}):null}_attachToNode(c){c.appendChild(this)}};b.__decorate([h.property()],g.prototype,"creator",null);b.__decorate([h.property()],g.prototype,"graphic",null);b.__decorate([h.property({type:L})],g.prototype,"viewModel",void 0);return g=b.__decorate([D.subclass("esri.widgets.Feature.FeatureContent")],g)})},"esri/widgets/Feature/FeatureContent/FeatureContentViewModel":function(){define("../../../chunks/tslib.es6 ../../../Graphic ../../../core/Accessor ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../support/featureUtils".split(" "),
function(b,h,g,y,v,D,K,L,R,I){g=class extends g{constructor(F){super(F);this.graphic=this.destroyer=this.creator=this.created=this._loadingPromise=null;this.addHandles(y.watch(()=>this.creator,c=>{this._destroyContent();this._createContent(c)},y.initial))}destroy(){this._destroyContent()}get state(){return this._loadingPromise?"loading":"ready"}_destroyContent(){const {created:F,graphic:c,destroyer:m}=this;F&&c&&(I.graphicCallback({type:"content",value:m,event:{graphic:c}}),this._set("created",null))}async _createContent(F){var c=
this.graphic;c&&F&&(this._loadingPromise=F=I.graphicCallback({type:"content",value:F,event:{graphic:c}}),this.notifyChange("state"),c=await F,F===this._loadingPromise&&(this._loadingPromise=null,this.notifyChange("state"),this._set("created",c)))}};b.__decorate([v.property({readOnly:!0})],g.prototype,"created",void 0);b.__decorate([v.property()],g.prototype,"creator",void 0);b.__decorate([v.property()],g.prototype,"destroyer",void 0);b.__decorate([v.property({type:h})],g.prototype,"graphic",void 0);
b.__decorate([v.property({readOnly:!0})],g.prototype,"state",null);return g=b.__decorate([R.subclass("esri.widgets.Feature.FeatureContent.FeatureContentViewModel")],g)})},"esri/widgets/Feature/FeatureExpression":function(){define("require ../../chunks/tslib.es6 ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../Widget ./FeatureContent ./FeatureFields ./FeatureMedia ./FeatureExpression/FeatureExpressionViewModel ../../chunks/componentsUtils ../support/widgetUtils ../support/jsxFactory".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x){v=class extends R{constructor(n,z){super(n,z);this._contentWidget=null;this.viewModel=new m}initialize(){this.addHandles(g.watch(()=>this.viewModel?.contentElementViewModel,()=>this._setupExpressionWidget(),g.initial))}loadDependencies(){return f.loadCalciteComponents({loader:()=>new Promise((n,z)=>b(["../../chunks/calcite-loader"],n,z))})}destroy(){this._destroyContentWidget()}render(){const {state:n}=this.viewModel;return x.tsx("div",{class:"esri-feature-expression"},
"loading"===n?this._renderLoading():"disabled"===n?null:this._contentWidget?.render())}_renderLoading(){return x.tsx("div",{class:"esri-feature__loading-container",key:"loading-container"},x.tsx("calcite-loader",{inline:!0,label:""}))}_destroyContentWidget(){const {_contentWidget:n}=this;n&&(n.viewModel=null,n.destroy());this._contentWidget=null}_setupExpressionWidget(){const {contentElementViewModel:n,contentElement:z}=this.viewModel,l=z?.type;this._destroyContentWidget();this._contentWidget=n?"fields"===
l?new F({viewModel:n}):"media"===l?new c({viewModel:n}):"text"===l?new I({viewModel:n}):null:null;this.scheduleRender()}};h.__decorate([y.property({type:m})],v.prototype,"viewModel",void 0);return v=h.__decorate([L.subclass("esri.widgets.Feature.FeatureExpression")],v)})},"esri/widgets/Feature/FeatureFields":function(){define("../../chunks/tslib.es6 ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../Widget ./FeatureFields/FeatureFieldsViewModel ./support/FeatureElementInfo ../support/globalCss ../support/uriUtils ../support/widgetUtils ../support/decorators/messageBundle ../support/jsxFactory".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k){y=class extends L{constructor(x,n){super(x,n);this._featureElementInfo=null;this.viewModel=new R;this.messagesURIUtils=this.messages=null}initialize(){this._featureElementInfo=new I;this.addHandles(h.watch(()=>[this.viewModel?.description,this.viewModel?.title],()=>this._setupFeatureElementInfo(),h.initial))}destroy(){this._featureElementInfo?.destroy()}get attributes(){return this.viewModel.attributes}set attributes(x){this.viewModel.attributes=x}get description(){return this.viewModel.description}set description(x){this.viewModel.description=
x}get expressionInfos(){return this.viewModel.expressionInfos}set expressionInfos(x){this.viewModel.expressionInfos=x}get fieldInfos(){return this.viewModel.fieldInfos}set fieldInfos(x){this.viewModel.fieldInfos=x}get title(){return this.viewModel.title}set title(x){this.viewModel.title=x}render(){return k.tsx("div",{class:"esri-feature-fields"},this._featureElementInfo?.render(),this._renderFields())}_renderFieldInfo(x,n){var {attributes:z}=this.viewModel;const l=x.fieldName||"",E=x.label||l;z=z?
null==z[l]?"":z[l]:"";x=!!x.format?.dateFormat;z="number"!==typeof z||x?c.autoLink(this.messagesURIUtils,z):this._forceLTR(z);x={["esri-feature-fields__field-data--date"]:x};return k.tsx("tr",{key:`fields-element-info-row-${l}-${n}`},k.tsx("th",{class:"esri-feature-fields__field-header",innerHTML:E,key:`fields-element-info-row-header-${l}-${n}`}),k.tsx("td",{class:this.classes("esri-feature-fields__field-data",x),innerHTML:z,key:`fields-element-info-row-data-${l}-${n}`}))}_renderFields(){const {formattedFieldInfos:x}=
this.viewModel;return x?.length?k.tsx("table",{class:F.globalCss.table,summary:this.messages.fieldsSummary},k.tsx("tbody",null,x.map((n,z)=>this._renderFieldInfo(n,z)))):null}_setupFeatureElementInfo(){const {description:x,title:n}=this;this._featureElementInfo?.set({description:x,title:n})}_forceLTR(x){return`&lrm;${x}`}};b.__decorate([g.property()],y.prototype,"attributes",null);b.__decorate([g.property()],y.prototype,"description",null);b.__decorate([g.property()],y.prototype,"expressionInfos",
null);b.__decorate([g.property()],y.prototype,"fieldInfos",null);b.__decorate([g.property()],y.prototype,"title",null);b.__decorate([g.property({type:R,nonNullable:!0})],y.prototype,"viewModel",void 0);b.__decorate([g.property(),f.messageBundle("esri/widgets/Feature/t9n/Feature")],y.prototype,"messages",void 0);b.__decorate([g.property(),f.messageBundle("esri/widgets/support/t9n/uriUtils")],y.prototype,"messagesURIUtils",void 0);return y=b.__decorate([K.subclass("esri.widgets.Feature.FeatureFields")],
y)})},"esri/widgets/Feature/FeatureFields/FeatureFieldsViewModel":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../popup/ExpressionInfo ../../../popup/FieldInfo ../support/featureUtils".split(" "),function(b,h,g,y,v,D,K,L,R,I){h=class extends h{constructor(F){super(F);this.title=this.fieldInfos=this.description=
this.expressionInfos=this.attributes=null}get formattedFieldInfos(){const {expressionInfos:F,fieldInfos:c}=this,m=[];c?.forEach(f=>{if(!f.hasOwnProperty("visible")||f.visible)f=f.clone(),f.label=I.getFieldInfoLabel(f,F),m.push(f)});return m}};b.__decorate([g.property()],h.prototype,"attributes",void 0);b.__decorate([g.property({type:[L]})],h.prototype,"expressionInfos",void 0);b.__decorate([g.property()],h.prototype,"description",void 0);b.__decorate([g.property({type:[R]})],h.prototype,"fieldInfos",
void 0);b.__decorate([g.property({readOnly:!0})],h.prototype,"formattedFieldInfos",null);b.__decorate([g.property()],h.prototype,"title",void 0);return h=b.__decorate([K.subclass("esri.widgets.Feature.FeatureFields.FeatureFieldsViewModel")],h)})},"esri/widgets/support/uriUtils":function(){define(["exports","../../core/string"],function(b,h){const g=[{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"}];b.autoLink=function(y,v){if("string"!==typeof v||!v)return v;const D=g.find(L=>L.pattern.test(v));if(!D)return v;const K=v.match(D.pattern);y=h.replace(h.replace(D.label,{messages:y,hierPart:K?.[2]}),{appName:D.appName});return v.replace(D.pattern,`<a${D.target?` target="${D.target}"`:""} href="$1"${"_blank"===D.target?' rel\x3d"noreferrer"':""}>${y}</a>`)};Object.defineProperty(b,Symbol.toStringTag,
{value:"Module"})})},"esri/widgets/Feature/FeatureMedia":function(){define("require ../../chunks/tslib.es6 ../../intl ../../core/a11yUtils ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../renderers/support/utils ../Widget ./FeatureMedia/FeatureMediaViewModel ./support/FeatureElementInfo ./support/featureUtils ../../chunks/componentsUtils ../support/widgetUtils ../support/decorators/messageBundle ../support/jsxFactory ../../support/themeUtils ../../intl/substitute".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,l,E,u){g=class extends c{constructor(d,t){super(d,t);this._featureElementInfo=this._refreshIntervalInfo=this._refreshTimer=null;this._chartRootMap=new WeakMap;this.viewModel=new m;this.messages=null;this._disposeChart=a=>{this._chartRootMap.get(a)?.dispose();this._chartRootMap.delete(a)};this._createChart=async a=>{const {destroyed:e,viewModel:B}=this;if(!e&&B&&a){var {createRoot:J}=await new Promise((P,M)=>b(["../support/chartUtilsAm5"],P,M));J=await J(a);
this._chartRootMap.set(a,J);this._renderChart({mediaInfo:B.activeMediaInfo,root:J})}}}initialize(){this._featureElementInfo=new f;this.addHandles([v.watch(()=>[this.viewModel?.activeMediaInfo,this.viewModel?.activeMediaInfoIndex],()=>this._setupMediaRefreshTimer(),v.initial),v.watch(()=>[this.viewModel?.description,this.viewModel?.title],()=>this._setupFeatureElementInfo(),v.initial)])}loadDependencies(){return x.loadCalciteComponents({icon:()=>new Promise((d,t)=>b(["../../chunks/calcite-icon"],d,
t))})}destroy(){this._clearMediaRefreshTimer();this._featureElementInfo?.destroy()}get attributes(){return this.viewModel.attributes}set attributes(d){this.viewModel.attributes=d}get activeMediaInfoIndex(){return this.viewModel.activeMediaInfoIndex}set activeMediaInfoIndex(d){this.viewModel.activeMediaInfoIndex=d}get description(){return this.viewModel.description}set description(d){this.viewModel.description=d}get fieldInfoMap(){return this.viewModel.fieldInfoMap}set fieldInfoMap(d){this.viewModel.fieldInfoMap=
d}get layer(){return this.viewModel.layer}set layer(d){this.viewModel.layer=d}get mediaInfos(){return this.viewModel.mediaInfos}set mediaInfos(d){this.viewModel.mediaInfos=d}get popupTemplate(){return this.viewModel.popupTemplate}set popupTemplate(d){this.viewModel.popupTemplate=d}get relatedInfos(){return this.viewModel.relatedInfos}set relatedInfos(d){this.viewModel.relatedInfos=d}get title(){return this.viewModel.title}set title(d){this.viewModel.title=d}render(){return l.tsx("div",{bind:this,
class:"esri-feature-media",onkeyup:this._handleMediaKeyup},this._featureElementInfo?.render(),this._renderMedia())}_renderMedia(){const {formattedMediaInfoCount:d,activeMediaInfoIndex:t}=this.viewModel,a=this._renderMediaText();return d?l.tsx("div",{class:"esri-feature-media__container",key:"media-element-container"},this._renderMediaInfo(),l.tsx("div",{class:"esri-feature-media__item-navigation"},a,1<d?l.tsx("div",{class:"esri-feature-media__pagination"},this._renderMediaPageButton("previous"),l.tsx("span",
{class:"esri-feature-media__pagination-text"},u.substitute(this.messages.pageText,{index:t+1,total:d})),this._renderMediaPageButton("next")):null)):null}_renderMediaText(){var {activeMediaInfo:d}=this.viewModel;if(!d)return null;const t=d&&d.title?l.tsx("div",{class:"esri-feature-media__item-title",innerHTML:d.title,key:"media-title"}):null;d=d&&d.caption?l.tsx("div",{class:"esri-feature-media__item-caption",innerHTML:d.caption,key:"media-caption"}):null;return t||d?l.tsx("div",{class:"esri-feature-media__item-text",
key:"media-text"},t,d):null}_renderImageMediaInfo(d){if(!d.value)return null;var {_refreshIntervalInfo:t}=this;const {activeMediaInfoIndex:a,formattedMediaInfoCount:e}=this.viewModel,{value:B,refreshInterval:J,altText:P,title:M,type:A}=d,{sourceURL:w,linkURL:H}=B;d=k.shouldOpenInNewTab(H??void 0)?"_blank":"_self";const q="_blank"===d?"noreferrer":"";t=J?t:null;t=l.tsx("img",{alt:P||M,key:`media-${A}-${a}-${e}-${t?t.timestamp:0}`,src:(t?t.sourceURL:w)??void 0});return(H?l.tsx("a",{href:H,rel:q,target:d,
title:M},t):null)??t}_renderChartMediaInfo(d){const {activeMediaInfoIndex:t,formattedMediaInfoCount:a}=this.viewModel;return l.tsx("div",{afterCreate:this._createChart,afterRemoved:this._disposeChart,bind:this,class:"esri-feature-media__chart",key:`media-${d.type}-${t}-${a}`})}_renderMediaInfoType(){const {activeMediaInfo:d}=this.viewModel;return d?"image"===d.type?this._renderImageMediaInfo(d):d.type.includes("chart")?this._renderChartMediaInfo(d):null:null}_renderMediaInfo(){const {activeMediaInfo:d}=
this.viewModel;return d?l.tsx("div",{class:"esri-feature-media__item-container",key:"media-container"},l.tsx("div",{class:"esri-feature-media__item",key:"media-item-container"},this._renderMediaInfoType())):null}_renderMediaPageButton(d){if(2>this.viewModel.formattedMediaInfoCount)return null;const t=(d="previous"===d)?this.messages.previous:this.messages.next;return l.tsx("button",{"aria-label":t,bind:this,class:"esri-feature-media__pagination-button",key:d?"media-previous":"media-next",onclick:d?
this._previous:this._next,tabIndex:0,title:t,type:"button"},l.tsx("calcite-icon",{class:"esri-feature-media__pagination-icon",icon:d?"chevron-left":"chevron-right",scale:"s"}))}_setupFeatureElementInfo(){const {description:d,title:t}=this;this._featureElementInfo?.set({description:d,title:t})}_next(){this.viewModel.next()}_previous(){this.viewModel.previous()}_getRenderer(){if(this.viewModel){var {isAggregate:d,layer:t}=this.viewModel;return d&&t?.featureReduction&&"renderer"in t.featureReduction?
t.featureReduction.renderer:t?.renderer}}async _getSeriesColors(d){const {colorAm5:t}=await new Promise((e,B)=>b(["./FeatureMedia/chartCommon"],e,B)),a=new Map;d.forEach(e=>{e.color&&a.set(e,t(e.color.toCss(!0)))});return a}async _getRendererColors(){const {colorAm5:d}=await new Promise((B,J)=>b(["./FeatureMedia/chartCommon"],B,J)),t=new Map,a=this._getRenderer();if(!a)return t;const e=await F.getColorsFromRenderer(a);e.delete("default");if(!Array.from(e.values()).every(B=>1===B?.length))return t;
Array.from(e.keys()).forEach(B=>{const J=e.get(B)?.[0]?.toCss(!0);J&&t.set(B,d(J))});return t}_handleMediaKeyup(d){const {key:t}=d;"ArrowLeft"===t&&(d.stopPropagation(),this.viewModel.previous());"ArrowRight"===t&&(d.stopPropagation(),this.viewModel.next())}_canAnimateChart(){return this.viewModel?!!this.viewModel.abilities.chartAnimation&&!y.prefersReducedMotion():!1}_getChartAnimationMS(){return this._canAnimateChart()?250:0}_getChartSeriesAnimationMS(){return this._canAnimateChart()?500:0}async _renderChart(d){const {root:t,
mediaInfo:a}=d,{value:e,type:B}=a,{ResponsiveThemeAm5:J,DarkThemeAm5:P,AnimatedThemeAm5:M,ColorSetAm5:A,ThemeAm5:w,esriChartColorSet:H}=await new Promise((Q,T)=>b(["./FeatureMedia/chartCommon"],Q,T));var q=w.new(t);q.rule("ColorSet").set("colors",H);q.rule("ColorSet").set("reuse",!0);q=[J.new(t),q];E.isDarkTheme()&&q.push(P.new(t));this._canAnimateChart()&&q.push(M.new(t));t.setThemes(q);const N=await this._getRendererColors(),r=await this._getSeriesColors(e.series),p=A.new(t,{}),C=(q=r.get(e.series[0]))?
{lineSettings:{stroke:q}}:void 0;q=e.series.map((Q,T)=>{T=r.get(Q)||N.get(Q.fieldName)||p.getIndex(T);return{category:Q.tooltip,value:Q.value,columnSettings:{fill:T,stroke:T},...C}}).filter(Q=>"pie-chart"===B?null!=Q.value&&0<Q.value:!0);"pie-chart"===B?this._createPieChart(d,q):this._createXYChart(d,q)}_getDirection(){return n.isRTL(this.container)?"rtl":"ltr"}_isInversed(){return!!n.isRTL(this.container)}async _customizeChartTooltip(d,t="horizontal"){const {colorAm5:a}=await new Promise((e,B)=>
b(["./FeatureMedia/chartCommon"],e,B));d.setAll({pointerOrientation:t});d.get("background")?.setAll({stroke:a("rgba(50, 50, 50, 1)")});d.label.setAll({direction:this._getDirection(),oversizedBehavior:"wrap",maxWidth:200})}async _createPieChart(d,t){var {TooltipAm5:a}=await new Promise((A,w)=>b(["./FeatureMedia/chartCommon"],A,w));const {PieChartAm5:e,PieSeriesAm5:B}=await new Promise((A,w)=>b(["./FeatureMedia/pieChart"],A,w)),{mediaInfo:J,root:P}=d;var {title:M}=J;d=P.container.children.push(e.new(P,
{ariaLabel:J?.altText||J?.title||"",focusable:!0,paddingBottom:5,paddingTop:5,paddingLeft:5,paddingRight:5}));a=a.new(P,{labelText:"{category}: {valuePercentTotal.formatNumber('0.00')}%\n ({value})"});M=d.series.push(B.new(P,{name:M,valueField:"value",categoryField:"category",tooltip:a}));M.ticks.template.set("forceHidden",!0);M.labels.template.set("forceHidden",!0);M.slices.template.states.create("active",{shiftRadius:5});this._customizeChartTooltip(a);M.slices.template.setAll({ariaLabel:"{category}: {valuePercentTotal.formatNumber('0.00')}%\n ({value})",
focusable:!0,templateField:"columnSettings"});M.data.setAll(t);M.appear(this._getChartSeriesAnimationMS());d.appear(this._getChartAnimationMS());d.root.dom.classList.toggle("esri-feature-media__chart--rendered",!0)}_getMinSeriesValue(d){let t=0;d.forEach(a=>t=Math.min(a.value,t));return t}async _createColumnChart(d,t,a){const {TooltipAm5:e,ScrollbarAm5:B}=await new Promise((Q,T)=>b(["./FeatureMedia/chartCommon"],Q,T)),{CategoryAxisAm5:J,AxisRendererXAm5:P,ValueAxisAm5:M,AxisRendererYAm5:A,ColumnSeriesAm5:w}=
await new Promise((Q,T)=>b(["./FeatureMedia/xyChart"],Q,T)),{mediaInfo:H,root:q}=t,{value:N,title:r}=H;d.setAll({wheelX:"panX",wheelY:"zoomX"});t=d.xAxes.push(J.new(q,{renderer:P.new(q,{inversed:this._isInversed()}),categoryField:"category"}));t.get("renderer").labels.template.setAll({forceHidden:!0});var p=d.yAxes.push(M.new(q,{renderer:A.new(q,{inside:!1}),min:this._getMinSeriesValue(N.series)}));p.get("renderer").labels.template.setAll({direction:this._getDirection()});const C=e.new(q,{labelText:"{categoryX}"});
p=d.series.push(w.new(q,{name:r,xAxis:t,yAxis:p,valueYField:"value",categoryXField:"category",tooltip:C}));this._customizeChartTooltip(C);p.columns.template.setAll({ariaLabel:"{categoryX}",focusable:!0,templateField:"columnSettings"});15<N.series.length&&d.set("scrollbarX",B.new(q,{orientation:"horizontal"}));t.data.setAll(a);p.data.setAll(a);p.appear(this._getChartSeriesAnimationMS());d.appear(this._getChartAnimationMS())}async _createBarChart(d,t,a){const {TooltipAm5:e,ScrollbarAm5:B}=await new Promise((Q,
T)=>b(["./FeatureMedia/chartCommon"],Q,T)),{CategoryAxisAm5:J,AxisRendererXAm5:P,ValueAxisAm5:M,AxisRendererYAm5:A,ColumnSeriesAm5:w}=await new Promise((Q,T)=>b(["./FeatureMedia/xyChart"],Q,T)),{mediaInfo:H,root:q}=t,{value:N,title:r}=H;d.setAll({wheelX:"panY",wheelY:"zoomY"});t=d.yAxes.push(J.new(q,{renderer:A.new(q,{inversed:!0}),categoryField:"category"}));t.get("renderer").labels.template.setAll({forceHidden:!0});var p=d.xAxes.push(M.new(q,{renderer:P.new(q,{inside:!1,inversed:this._isInversed()}),
min:this._getMinSeriesValue(N.series)}));p.get("renderer").labels.template.setAll({direction:this._getDirection()});const C=e.new(q,{labelText:"{categoryY}"});p=d.series.push(w.new(q,{name:r,xAxis:p,yAxis:t,valueXField:"value",categoryYField:"category",tooltip:C}));this._customizeChartTooltip(C,"vertical");p.columns.template.setAll({ariaLabel:"{categoryY}",focusable:!0,templateField:"columnSettings"});15<N.series.length&&d.set("scrollbarY",B.new(q,{orientation:"vertical"}));t.data.setAll(a);p.data.setAll(a);
p.appear(this._getChartSeriesAnimationMS());d.appear(this._getChartAnimationMS())}async _createLineChart(d,t,a){const {TooltipAm5:e,ScrollbarAm5:B}=await new Promise((T,V)=>b(["./FeatureMedia/chartCommon"],T,V)),{CategoryAxisAm5:J,AxisRendererXAm5:P,ValueAxisAm5:M,AxisRendererYAm5:A,LineSeriesAm5:w}=await new Promise((T,V)=>b(["./FeatureMedia/xyChart"],T,V)),{root:H,mediaInfo:q}=t,{value:N,title:r}=q;d.setAll({wheelX:"panX",wheelY:"zoomX"});t=d.xAxes.push(J.new(H,{renderer:P.new(H,{inversed:this._isInversed()}),
categoryField:"category"}));t.get("renderer").labels.template.setAll({forceHidden:!0});var p=d.yAxes.push(M.new(H,{renderer:A.new(H,{inside:!1}),min:this._getMinSeriesValue(N.series)}));p.get("renderer").labels.template.setAll({direction:this._getDirection()});const C=a[0]?.lineSettings?.stroke,Q=e.new(H,{getFillFromSprite:!C,labelText:"{categoryX}"});C&&Q.get("background")?.setAll({fill:C});p=d.series.push(w.new(H,{name:r,xAxis:t,yAxis:p,valueYField:"value",categoryXField:"category",tooltip:Q}));
p.strokes.template.setAll({templateField:"lineSettings"});this._customizeChartTooltip(Q,"vertical");15<N.series.length&&d.set("scrollbarX",B.new(H,{orientation:"horizontal"}));t.data.setAll(a);p.data.setAll(a);p.appear(this._getChartSeriesAnimationMS());d.appear(this._getChartAnimationMS())}async _createXYChart(d,t){const {XYChartAm5:a,XYCursorAm5:e}=await new Promise((A,w)=>b(["./FeatureMedia/xyChart"],A,w)),{root:B,mediaInfo:J}=d,{type:P}=J,M=B.container.children.push(a.new(B,{ariaLabel:J?.altText||
J?.title||"",focusable:!0,panX:!0,panY:!0}));M.set("cursor",e.new(B,{}));"column-chart"===P&&await this._createColumnChart(M,d,t);"bar-chart"===P&&await this._createBarChart(M,d,t);"line-chart"===P&&await this._createLineChart(M,d,t);M.root.dom.classList.toggle("esri-feature-media__chart--rendered",!0)}_clearMediaRefreshTimer(){const {_refreshTimer:d}=this;d&&(clearTimeout(d),this._refreshTimer=null)}_updateMediaInfoTimestamp(d){const t=Date.now();this._refreshIntervalInfo={timestamp:t,sourceURL:d&&
this._getImageSource(d,t)}}_setupMediaRefreshTimer(){this._clearMediaRefreshTimer();const {activeMediaInfo:d}=this.viewModel;"image"===d?.type&&0<d?.refreshInterval&&this._setRefreshTimeout(d)}_setRefreshTimeout(d){const {refreshInterval:t,value:a}=d;d=6E4*t;this._updateMediaInfoTimestamp(a.sourceURL);this._refreshTimer=setInterval(()=>{this._updateMediaInfoTimestamp(a.sourceURL)},d)}_getImageSource(d,t){const a=d.includes("?")?"\x26":"?",[e,B=""]=d.split("#");return`${e}${a}timestamp=${t}${B?"#":
""}${B}`}};h.__decorate([D.property()],g.prototype,"_refreshIntervalInfo",void 0);h.__decorate([D.property()],g.prototype,"attributes",null);h.__decorate([D.property()],g.prototype,"activeMediaInfoIndex",null);h.__decorate([D.property()],g.prototype,"description",null);h.__decorate([D.property()],g.prototype,"fieldInfoMap",null);h.__decorate([D.property()],g.prototype,"layer",null);h.__decorate([D.property()],g.prototype,"mediaInfos",null);h.__decorate([D.property()],g.prototype,"popupTemplate",null);
h.__decorate([D.property()],g.prototype,"relatedInfos",null);h.__decorate([D.property()],g.prototype,"title",null);h.__decorate([D.property({type:m})],g.prototype,"viewModel",void 0);h.__decorate([D.property(),z.messageBundle("esri/widgets/Feature/t9n/Feature")],g.prototype,"messages",void 0);return g=h.__decorate([I.subclass("esri.widgets.Feature.FeatureMedia")],g)})},"esri/renderers/support/utils":function(){define("exports ../../core/arrayUtils ../../core/Logger ../../core/MapUtils ../../intl/date ../../layers/support/fieldUtils ./numberUtils ../visualVariables/support/ColorStop ../../smartMapping/support/utils ../../symbols/support/utils ../../widgets/Legend/support/colorRampUtils ../../widgets/Legend/support/heatmapRampUtils".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c){async function m(E,u,d){y.getOrCreateMapValue(E,u,()=>[]).push(...d)}async function f(E,u,d){E=y.getOrCreateMapValue(E,u,()=>new Map);for(const t of d)E.set(t.value,t.color)}function k(E){let u=E.minValue,d=E.maxValue;const t=E.isFirstBreak?"":n.gt+" ";E="percent-of-total"===E.normalizationType?n.pct:"";u=null==u?"":K.format(u);d=null==d?"":K.format(d);return t+u+E+" "+n.ld+" "+d+E}function x(E,u){return"normalizationField"in E&&E.normalizationField?{type:"normalized-field",
field:E.field,normalizationField:E.normalizationField}:"field"in E&&E.field?{type:"field",field:E.field}:"valueExpression"in E&&E.valueExpression?{type:"expression",expression:E.valueExpression,title:E.valueExpressionTitle,returnType:u}:null}const n={lte:"\x3c\x3d",gte:"\x3e\x3d",lt:"\x3c",gt:"\x3e",pct:"%",ld:"\u2013"},z={millisecond:0,second:1,minute:2,hour:3,day:4,month:5,year:6},l=v.convertDateFormatToIntlOptions("short-date");b.calculateDateFormatInterval=function(E){E=E.map(e=>new Date(e));
const u=E.length;let d=Infinity,t=null;for(let e=0;e<u-1;e++){const B=E[e];let J=Infinity,P=null;for(let M=e+1;M<u;M++){var a=E[M];a=B.getFullYear()!==a.getFullYear()&&"year"||B.getMonth()!==a.getMonth()&&"month"||B.getDate()!==a.getDate()&&"day"||B.getHours()!==a.getHours()&&"hour"||B.getMinutes()!==a.getMinutes()&&"minute"||B.getSeconds()!==a.getSeconds()&&"second"||"millisecond";const A=z[a];A<J&&(J=A,P=a)}J<d&&(d=J,t=P)}return t};b.createClassBreakLabel=k;b.createColorStops=function(E){const {values:u,
colors:d,labelIndexes:t,isDate:a}=E;return u.map((e,B)=>{var J=null;if(!t||t.includes(B)){const P=a?v.formatDate(e):K.format(e);P&&(J="",0===B?J=n.lt+" ":B===u.length-1&&(J=n.gt+" "),J+=P)}return new L({value:e,color:d[B],label:J})})};b.createUniqueValueLabel=function(E){const {value:u,domain:d,fieldInfo:t,dateFormatOptions:a}=E;E=String(u);const e=d&&"codedValues"in d&&d.codedValues?d.getName(u):null;e?E=e:null!=u&&t&&(R.isAnyDateField(t)||D.isTimeOnlyField(t))?E=R.formatAnyDate(u,a??{fieldType:t.type}):
"number"===typeof u&&(E=K.format(u));return E};b.dateFormatIntervalOptions={millisecond:"long-month-day-year-long-time",second:"long-month-day-year-long-time",minute:"long-month-day-year-short-time",hour:"long-month-day-year-short-time",day:"long-month-day-year",month:"long-month-day-year",year:"year"};b.getAttribute=x;b.getAttributes=function(E,u){const d=[];if("class-breaks"===E.type||"heatmap"===E.type)d.push(x(E,"number"));else if("unique-value"===E.type){var t=E.authoringInfo;if(t&&"relationship"===
t.type){if(t.field1&&t.field2){var a=t.field2.field;const e=t.field2.normalizationField;d.push(x({field:t.field1.field,normalizationField:t.field1.normalizationField}));d.push(x({field:a,normalizationField:e}))}}else a=E.uniqueValueInfos?.[0],t=null,a?.value&&(a=typeof a.value,"string"===a||"number"===a)&&(t=a),d.push(x(E,t)),[E.field2,E.field3].forEach(e=>e&&d.push({type:"field",field:e}))}else"attributes"in E&&E.attributes?.forEach(e=>d.push(x(e,"number")));(E=u?u(E):"visualVariables"in E?E.visualVariables:
null)&&E.forEach(e=>d.push(x(e,"number")));return h.unique(d.filter(h.isSome),(e,B)=>"field"===e.type&&"field"===B.type?e.field===B.field:"normalized-field"===e.type&&"normalized-field"===B.type?e.field===B.field&&e.normalizationField===B.normalizationField:"expression"===e.type&&"expression"===B.type?e.expression===B.expression:!1)};b.getColorsForRendererValues=async function(E){const u=new Map;if(!E)return u;if("unique-value"!==E.type||E.authoringInfo?.type)if("class-breaks"===E.type){var d=E.classBreakInfos.map(e=>
({value:e.minValue,color:I.getColorFromSymbol(e.symbol,null)})).reverse();const {field:t,valueExpression:a}=E;await f(u,t??a,d)}else"simple"===E.type&&await f(u,"default",[{value:"default",color:I.getColorFromSymbol(E.symbol,null)}]);else{d=(E.uniqueValueInfos??[]).map(M=>({value:M.value,color:I.getColorFromSymbol(M.symbol,null)}));const {field:t,field2:a,field3:e,valueExpression:B,fieldDelimiter:J}=E,P=[t,a,e].filter(Boolean).join(J||"");(P||B)&&await f(u,P||B,d)}"defaultSymbol"in E&&E.defaultSymbol&&
await f(u,"default",[{value:"default",color:I.getColorFromSymbol(E.defaultSymbol,null)}]);if("visualVariables"in E&&E.visualVariables){E=E.visualVariables.filter(t=>"color"===t.type);for(const t of E)E=await F.getRampStops(t)??[],await f(u,t.field||t.valueExpression,E)}return u};b.getColorsFromRenderer=async function(E){const u=new Map;if(!E)return u;if("visualVariables"in E&&E.visualVariables){var d=E.visualVariables.filter(a=>"color"===a.type);for(var t of d)d=(await F.getRampStops(t)??[]).map(a=>
a.color),await m(u,t.field||t.valueExpression,d)}if("heatmap"===E.type)t=c.getHeatmapRampStops(E).map(a=>a.color),await m(u,E.field||E.valueExpression,t);else if("pie-chart"===E.type){for(const a of E.attributes)await m(u,a.field||a.valueExpression,[a.color]);await m(u,"default",[E?.othersCategory?.color,I.getColorFromSymbol(E.backgroundFillSymbol,null)])}else if("dot-density"===E.type){for(const a of E.attributes)await m(u,a.field||a.valueExpression,[a.color]);await m(u,"default",[E.backgroundColor])}else if("unique-value"===
E.type)if("predominance"===E.authoringInfo?.type)for(const a of E.uniqueValueInfos??[])await m(u,a.value.toString(),[I.getColorFromSymbol(a.symbol,null)]);else{t=(E.uniqueValueInfos??[]).map(P=>I.getColorFromSymbol(P.symbol,null));const {field:a,field2:e,field3:B,valueExpression:J}=E;(a||J)&&await m(u,a||J,t);e&&await m(u,e,t);B&&await m(u,B,t)}else if("class-breaks"===E.type){t=E.classBreakInfos.map(B=>I.getColorFromSymbol(B.symbol,null));const {field:a,valueExpression:e}=E;await m(u,a??e,t)}else"simple"===
E.type&&await m(u,"default",[I.getColorFromSymbol(E.symbol,null)]);"defaultSymbol"in E&&E.defaultSymbol&&await m(u,"default",[I.getColorFromSymbol(E.defaultSymbol,null)]);u.forEach((a,e)=>{a=h.unique(a.filter(Boolean),(B,J)=>JSON.stringify(B)===JSON.stringify(J));u.set(e,a)});return u};b.setLabelsForClassBreaks=function(E){const u=E.classBreakInfos,d=E.normalizationType;let t=[];if(u?.length)if("standard-deviation"===E.classificationMethod)g.getLogger("esri.renderers.support.utils").warn("setLabelsForClassBreaks",
"cannot set labels for class breaks generated using 'standard-deviation' method.");else if(E.round){t.push(u[0].minValue);for(const a of u)t.push(a.maxValue);t=K.round(t);u.forEach((a,e)=>{a.label=k({minValue:0===e?t[0]:t[e],maxValue:t[e+1],isFirstBreak:0===e,normalizationType:d})})}else u.forEach((a,e)=>{a.label=k({minValue:a.minValue,maxValue:a.maxValue,isFirstBreak:0===e,normalizationType:d})})};b.timelineDateFormatOptions=l;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/renderers/support/numberUtils":function(){define(["exports",
"../../intl","../../intl/number"],function(b,h,g){function y(F,c){return F-c}function v(F,c){let m;m=Number(F.toFixed(c));m<F?F=m+1/10**c:(F=m,m-=1/10**c);m=Number(m.toFixed(c));F=Number(F.toFixed(c));return[m,F]}function D(F,c,m,f,k){F=L(F,c,m,f);c=null==F.next||F.next<=k;return(null==F.previous||F.previous<=k)&&c||F.previous+F.next<=2*k}function K(F){F=String(F);var c=F.match(R);if(c?.[1])return{integer:c[1].split("").length,fractional:c[3]?c[3].split("").length:0};if(F.toLowerCase().includes("e")&&
(c=F.split("e"),F=c[0],c=c[1],F&&c)){F=Number(F);c=Number(c);const m=0<c;m||(c=Math.abs(c));F=K(F);m?(F.integer+=c,F.fractional=c>F.fractional?0:F.fractional-c):(F.fractional+=c,F.integer=c>F.integer?1:F.integer-c);return F}return{integer:0,fractional:0}}function L(F,c,m,f){const k={previous:null,next:null};if(null!=m){const x=F-m;k.previous=Math.floor(Math.abs(100*(c-m-x)/x))}null!=f&&(F=f-F,k.next=Math.floor(Math.abs(100*(f-c-F)/F)));return k}const R=/^-?(\d+)(\.(\d+))?$/i,I={maximumFractionDigits:20};
b.format=function(F){return g.formatNumber(F,I)};b.numDigits=K;b.percentChange=L;b.round=function(F,c={}){F=F.slice(0);const {tolerance:m=2,strictBounds:f=!1,indexes:k=F.map((n,z)=>z)}=c;k.sort(y);for(c=0;c<k.length;c++){const n=k[c],z=F[n],l=0===n?null:F[n-1],E=n===F.length-1?null:F[n+1],u=K(z).fractional;if(u){let d=0,t=!1;for(var x=void 0;d<=u&&!t;)x=v(z,d),x=f&&0===c?x[1]:x[0],t=D(z,x,l,E,m),d++;t&&(F[n]=x)}}return F};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/support/utils":function(){define("require exports ../../Color ../../symbols ../../core/asyncUtils ../../core/has ../../core/screenUtils ../../core/libs/gl-matrix-2/factories/vec3f64 ../../layers/effects/jsonUtils ./cimSymbolUtils ./gfxUtils ./Symbol3DMaterial".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c){function m(a){a=a.symbolLayers;if(!a)return null;let e=null;a.forEach(B=>{"object"===B.type&&B.resource?.href||(e="water"===B.type?B.color:B.material?B.material.color:null)});return e?new g(e):null}function f(a,e){if(null==e||null==a)return a;a=a.toRgba();a[3]*=e;return new g(a)}function k(a,e,B){if(a=a.symbolLayers){var J=P=>{e=e??P??(null!=B?t:null);return f(e,B)};a.forEach(P=>{if("object"!==P.type||!P.resource?.href||e)if("water"===P.type)P.color=J(P.color);else{const M=
J(null!=P.material?P.material.color:null);null==P.material?P.material=new c.Symbol3DMaterial({color:M}):P.material.color=M;null!=B&&"outline"in P&&null!=P.outline?.color&&(P.outline.color=f(P.outline.color,B))}})}}async function x(a,e){(a=a.symbolLayers)&&await v.forEach(a,async B=>n(B,e))}async function n(a,e){switch(a.type){case "extrude":a.size="number"===typeof e[2]?e[2]:0;break;case "icon":case "line":case "text":e=z(e);null!=e&&(a.size=e);break;case "path":const B=E(e,L.ONES,[a.width,void 0,
a.height]);a.width=d(e[0],a.width,1,B);a.height=d(e[2],a.height,1,B);break;case "object":await l(a,e)}}function z(a){for(const e of a)if("number"===typeof e)return e;return null}async function l(a,e){const {resourceSize:B,symbolSize:J}=await u(a),P=E(e,B,J);a.width=d(e[0],J[0],B[0],P);a.depth=d(e[1],J[1],B[1],P);a.height=d(e[2],J[2],B[2],P)}function E(a,e,B){for(let J=0;3>J;J++){const P=a[J];switch(P){case "symbol-value":return a=B[J],null!=a?a/e[J]:1;case "proportional":break;default:if(P&&e[J])return P/
e[J]}}return 1}async function u(a){var {computeObjectLayerResourceSize:e}=await new Promise((w,H)=>b(["./symbolLayerUtils"],w,H));e=await e(a,10);const {width:B,height:J,depth:P}=a;a=[B,P,J];let M=1;for(var A=0;3>A;A++){const w=a[A];if(null!=w){M=w/e[A];break}}for(A=0;3>A;A++)null==a[A]&&(a[A]=e[A]*M);return{resourceSize:e,symbolSize:a}}function d(a,e,B,J){switch(a){case "proportional":return B*J;case "symbol-value":return null!=e?e:B;default:return a}}const t=new g("white");h.applyColorToSymbol=
function(a,e,B){if(a&&(e||null!=B))if(e&&=new g(e),y.isSymbol3D(a))k(a,e,B);else if(y.isSymbol2D(a)){if(e=e??a.color)a.color=f(e,B);null!=B&&"outline"in a&&a.outline?.color&&(a.outline.color=f(a.outline.color,B))}};h.applyOpacityToColor=f;h.applyRotationToSymbol=function(a,e,B){a&&null!=e&&(y.isSymbol3D(a)?(a=a.symbolLayers)&&a.forEach(J=>{if(J&&"object"===J.type)switch(B){case "tilt":J.tilt=(J.tilt??0)+e;break;case "roll":J.roll=(J.roll??0)+e;break;default:J.heading=(J.heading??0)+e}}):!y.isSymbol2D(a)||
"simple-marker"!==a.type&&"picture-marker"!==a.type&&"text"!==a.type||(a.angle+=e))};h.applySizesToSymbol=async function(a,e){if(a&&e){if(y.isSymbol3D(a))return x(a,e);if(y.isSymbol2D(a)&&(e=z(e),null!=e))switch(a.type){case "simple-marker":a.size=e;break;case "picture-marker":const B=a.width/a.height;1<B?(a.width=e,a.height=e*B):(a.width=e*B,a.height=e);break;case "simple-line":a.width=e;break;case "text":a.font.size=e}}};h.fetchWebStyleSymbol=async function(a,e){const B=await a.fetchSymbol(e);return B?
B:a.fetchCIMSymbol(e)};h.getCSSFilterFromEffectList=function(a){if(!a)return null;a=a.effects.filter(e=>"bloom"!==e.type).map(e=>e.toJSON());return R.effectFunctionsFromJSON(a)};h.getColorFromSymbol=function(a,e){if(!a)return null;let B=null;y.isSymbol3D(a)?B=m(a):y.isSymbol2D(a)&&(B="cim"===a.type?I.getCIMSymbolColor(a):a.color?new g(a.color):null);return B?f(B,e):null};h.getIconHref=function(a){return a.resource?.href??""};h.getSymbolOutlineSize=function(a){return a?y.isSymbol3D(a)?(a=(a=a.symbolLayers?.at(-1))&&
"outline"in a?a?.outline?.size:void 0,null!=a?a:0):K.px2pt(F.getStroke(a)?.width):0};h.isVolumetricSymbol=function(a){if(null==a||!("symbolLayers"in a)||null==a.symbolLayers)return!1;switch(a.type){case "point-3d":return a.symbolLayers.some(e=>"object"===e.type);case "line-3d":return a.symbolLayers.some(e=>"path"===e.type);case "polygon-3d":return a.symbolLayers.some(e=>"object"===e.type||"extrude"===e.type);default:return!1}};h.symbolHasExtrudeSymbolLayer=function(a){return null!=a&&"polygon-3d"===
a.type&&a.symbolLayers.some(e=>"extrude"===e.type)};Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/support/cimSymbolUtils":function(){define(["exports","../../Color","../cim/utils"],function(b,h,g){function y(c){c=g.toCIMSymbolJSON(c);if("CIMTextSymbol"===c?.type)return c.height??0;let m=0;if(c?.symbolLayers)for(const f of c.symbolLayers)g.isCIMMarker(f)&&null!=f.size&&f.size>m?m=f.size:g.isCIMStroke(f)&&null!=f.width&&f.width>m?m=f.width:g.isCIMFill(f);return m}function v(c,
m,f,k){if(c)if("CIMTextSymbol"===c.type)null!=c.height&&(c.height*=m);else{if(f&&c.effects)for(const x of c.effects)L(x,m);if(c.symbolLayers)for(const x of c.symbolLayers)switch(x.type){case "CIMPictureMarker":case "CIMVectorMarker":D(x,m,k);break;case "CIMPictureStroke":case "CIMSolidStroke":!k?.preserveOutlineWidth&&x.width&&(x.width*=m);break;case "CIMPictureFill":x.height&&(x.height*=m);x.offsetX&&(x.offsetX*=m);x.offsetY&&(x.offsetY*=m);break;case "CIMHatchFill":v(x.lineSymbol,m,!0,{...k,preserveOutlineWidth:!1}),
x.offsetX&&(x.offsetX*=m),x.offsetY&&(x.offsetY*=m),x.separation&&(x.separation*=m)}}}function D(c,m,f){if(c&&(c.markerPlacement&&K(c.markerPlacement,m),c.offsetX&&(c.offsetX*=m),c.offsetY&&(c.offsetY*=m),c.anchorPoint&&"Absolute"===c.anchorPointUnits&&(c.anchorPoint={x:c.anchorPoint.x*m,y:c.anchorPoint.y*m}),c.size=null!=c.size?c.size*m:0,"CIMVectorMarker"===c.type&&c.markerGraphics))for(const k of c.markerGraphics)c.scaleSymbolsProportionally||v(k.symbol,m,!0,f)}function K(c,m){g.isCIMMarkerStrokePlacement(c)&&
c.offset&&(c.offset*=m);switch(c.type){case "CIMMarkerPlacementAlongLineRandomSize":case "CIMMarkerPlacementAlongLineSameSize":c.customEndingOffset&&(c.customEndingOffset*=m);c.offsetAlongLine&&(c.offsetAlongLine*=m);if(c.placementTemplate&&c.placementTemplate.length){var f=c.placementTemplate.map(k=>k*m);c.placementTemplate=f}break;case "CIMMarkerPlacementAlongLineVariableSize":c.maxRandomOffset&&(c.maxRandomOffset*=m);c.placementTemplate&&c.placementTemplate.length&&(f=c.placementTemplate.map(k=>
k*m),c.placementTemplate=f);break;case "CIMMarkerPlacementOnLine":c.startPointOffset&&(c.startPointOffset*=m);break;case "CIMMarkerPlacementAtExtremities":c.offsetAlongLine&&(c.offsetAlongLine*=m);break;case "CIMMarkerPlacementAtRatioPositions":c.beginPosition&&(c.beginPosition*=m);c.endPosition&&(c.endPosition*=m);break;case "CIMMarkerPlacementPolygonCenter":c.offsetX&&(c.offsetX*=m);c.offsetY&&(c.offsetY*=m);break;case "CIMMarkerPlacementInsidePolygon":c.offsetX&&(c.offsetX*=m),c.offsetY&&(c.offsetY*=
m),c.stepX&&(c.stepX*=m),c.stepY&&(c.stepY*=m)}}function L(c,m){switch(c.type){case "CIMGeometricEffectArrow":case "CIMGeometricEffectDonut":c.width&&(c.width*=m);break;case "CIMGeometricEffectBuffer":c.size&&(c.size*=m);break;case "CIMGeometricEffectCut":c.beginCut&&(c.beginCut*=m);c.endCut&&(c.endCut*=m);c.middleCut&&(c.middleCut*=m);break;case "CIMGeometricEffectDashes":c.customEndingOffset&&(c.customEndingOffset*=m);c.offsetAlongLine&&(c.offsetAlongLine*=m);if(c.dashTemplate&&c.dashTemplate.length){const f=
c.dashTemplate.map(k=>k*m);c.dashTemplate=f}break;case "CIMGeometricEffectExtension":case "CIMGeometricEffectJog":case "CIMGeometricEffectRadial":c.length&&(c.length*=m);break;case "CIMGeometricEffectMove":c.offsetX&&(c.offsetX*=m);c.offsetY&&(c.offsetY*=m);break;case "CIMGeometricEffectOffset":case "CIMGeometricEffectOffsetTangent":c.offset&&(c.offset*=m);break;case "CIMGeometricEffectRegularPolygon":c.radius&&(c.radius*=m);break;case "CIMGeometricEffectTaperedPolygon":c.fromWidth&&(c.fromWidth*=
m);c.length&&(c.length*=m);c.toWidth&&(c.toWidth*=m);break;case "CIMGeometricEffectWave":c.amplitude&&(c.amplitude*=m),c.period&&(c.period*=m)}}function R(c,m){if(c){var f="CIMTextSymbol"===c.type?c.symbol:c;c="CIMPolygonSymbol"===c.type;if(f?.symbolLayers)for(const k of f.symbolLayers)if(!(k.colorLocked||c&&(g.isCIMStroke(k)||g.isCIMMarker(k)&&k.markerPlacement&&g.isCIMMarkerStrokePlacement(k.markerPlacement))))switch(k.type){case "CIMPictureMarker":case "CIMPictureStroke":case "CIMPictureFill":k.tintColor&&
I(m,k.tintColor);break;case "CIMVectorMarker":k.markerGraphics?.forEach(x=>{R(x.symbol,m)});break;case "CIMSolidStroke":case "CIMSolidFill":I(m,k.color);break;case "CIMHatchFill":R(k.lineSymbol,m)}}}function I(c,m){for(const f of c)if(f.join(".")===m.join("."))return;c.push(m)}function F(c,m,f){if(c){var k="CIMTextSymbol"===c.type?c.symbol:c;c="CIMPolygonSymbol"===k?.type;if(k?.symbolLayers)for(const x of k.symbolLayers)if(!x.colorLocked){if(c)if(f){if({layersToColor:k}=f,(g.isCIMStroke(x)||g.isCIMMarker(x)&&
x.markerPlacement&&g.isCIMMarkerStrokePlacement(x.markerPlacement))&&"fill"===k||g.isCIMFill(x)&&"outline"===k)continue}else if(g.isCIMStroke(x)||g.isCIMMarker(x)&&x.markerPlacement&&g.isCIMMarkerStrokePlacement(x.markerPlacement))continue;k=m.toArray();switch(x.type){case "CIMPictureMarker":case "CIMPictureStroke":case "CIMPictureFill":x.tintColor=k;break;case "CIMVectorMarker":x.markerGraphics?.forEach(n=>{F(n.symbol,m,f)});break;case "CIMSolidStroke":case "CIMSolidFill":x.color=k;break;case "CIMHatchFill":F(x.lineSymbol,
m,f)}}}}b.applyCIMSymbolColor=function(c,m,f){m instanceof h||(m=new h(m));(c=g.toCIMSymbolJSON(c))&&F(c,m,f)};b.applyCIMSymbolRotation=function(c,m,f=!1){c=g.toCIMSymbolJSON(c);f&&(m=360-m);if("CIMTextSymbol"===c?.type)c.angle=m;else if("CIMPointSymbol"===c?.type&&c.symbolLayers){f=m-(c.angle||0);for(const k of c.symbolLayers)if(g.isCIMMarker(k)){let x=k.rotation||0;x=k.rotateClockwise?x-f:x+f;k.rotation=x}c.angle=m}};b.getCIMSymbolColor=function(c){c=g.toCIMSymbolJSON(c);const m=[];R(c,m);return m.length?
new h(g.normalizeAlpha(m[0])):null};b.getCIMSymbolRotation=function(c,m=!1){c=g.toCIMSymbolJSON(c);return"CIMTextSymbol"===c?.type||"CIMPointSymbol"===c?.type?(c=c.angle,null!=c&&m?360-c:c??0):0};b.getCIMSymbolSize=y;b.getCIMSymbolType=function(c){c=g.toCIMSymbolJSON(c);if(!c)return null;switch(c.type){case "CIMPointSymbol":return"CIMPointSymbol";case "CIMLineSymbol":return"CIMLineSymbol";case "CIMPolygonSymbol":return"CIMPolygonSymbol";case "CIMTextSymbol":return"CIMTextSymbol";case "CIMMeshSymbol":return"CIMMeshSymbol";
default:return null}};b.scaleCIMMarker=D;b.scaleCIMSymbol=v;b.scaleCIMSymbolTo=function(c,m,f){if(c){var k=g.toCIMSymbolJSON(c);c=y(c);if(0===c){if(k)if("CIMTextSymbol"===k.type)k.height=m;else if(k.symbolLayers)for(const x of k.symbolLayers)switch(x.type){case "CIMPictureMarker":case "CIMVectorMarker":x.size=m;break;case "CIMPictureStroke":case "CIMSolidStroke":x.width=m}}else v(k,m/c,!1,f)}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/support/gfxUtils":function(){define("exports ../../assets ../../Color ../../request ../../core/LRUCache ../../core/screenUtils ./cimSymbolUtils".split(" "),
function(b,h,g,y,v,D,K){function L(m){if(!m)return null;let f=null;switch(m.type){case "simple-fill":case "picture-fill":case "simple-marker":f=L(m.outline);break;case "simple-line":const k=D.pt2px(m.width);null!=m.style&&"none"!==m.style&&0!==k&&(f={color:m.color,style:c(m.style),width:k,cap:m.cap,join:"miter"===m.join?D.pt2px(m.miterLimit):m.join},f.dashArray=R(f).join(",")||"none");break;default:f=null}return f}function R(m){if(!m?.style)return[];const {dashArray:f,style:k,width:x}=m;if("string"===
typeof f&&"none"!==f)return f.split(",").map(l=>Number(l));const n=x??0,z=I.has(k)?I.get(k).map(l=>l*n):[];if("butt"!==m.cap)for(const [l,E]of z.entries())z[l]=1===l%2?E+n:Math.max(E-n,1);return z}const I=new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),F=new v.LRUCache(1E3),c=(()=>{const m={};return f=>
{if(m[f])return m[f];const k=f.replaceAll("-","");return m[f]=k}})();g=new g([128,128,128]);b.defaultThematicColor=g;b.dekebabifyLineStyle=c;b.getDashArray=R;b.getFill=function(m){const f=m.style;let k=null;if(m)switch(m.type){case "simple-marker":"cross"!==f&&"x"!==f&&(k=m.color);break;case "simple-fill":f&&"solid"!==f?"none"!==f&&(k={type:"pattern",x:0,y:0,src:h.getAssetUrl(`esri/symbols/patterns/${f}.png`),width:5,height:5}):k=m.color;break;case "picture-fill":k={type:"pattern",src:m.url,width:D.pt2px(m.width)*
m.xscale,height:D.pt2px(m.height)*m.yscale,x:D.pt2px(m.xoffset),y:D.pt2px(m.yoffset)};break;case "text":k=m.color;break;case "cim":k=K.getCIMSymbolColor(m)}return k};b.getPatternUrlWithColor=function(m,f){const k=m+"-"+f;return void 0!==F.get(k)?Promise.resolve(F.get(k)):y(m,{responseType:"image"}).then(x=>{x=x.data;const n=x.naturalWidth,z=x.naturalHeight,l=document.createElement("canvas");l.width=n;l.height=z;const E=l.getContext("2d");E.fillStyle=f;E.fillRect(0,0,n,z);E.globalCompositeOperation=
"destination-in";E.drawImage(x,0,0);x=l.toDataURL();F.put(k,x);return x})};b.getStroke=L;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Legend/support/colorRampUtils":function(){define(["require","exports","../../../Color","./utils"],function(b,h,g,y){function v(I,F){const c=[],m=I.length-1;5===I.length?c.push(0,2,4):c.push(0,m);return I.map((f,k)=>c.includes(k)?y.createStopLabel(f,k,m,F):null)}async function D(I,F,c){c=new g(c??R);I=(await new Promise((m,f)=>b(["../../../renderers/visualVariables/support/visualVariableUtils"],
m,f))).getOpacity(F,I);null!=I&&(c.a=I);return c}function K(I,F){const {startIndex:c,endIndex:m,weight:f}=L(I,F);if(c===m)return F[c].color;I=g.blendColors(F[c].color,F[m].color,f);return new g(I)}function L(I,F){let c=0,m=F.length-1;F.some((f,k)=>{if(I<f.value)return m=k,!0;c=k;return!1});return{startIndex:c,endIndex:m,weight:(I-F[c].value)/(F[m].value-F[c].value)}}const R=new g([64,64,64]);h.getColorFromPointCloudStops=K;h.getRampStops=async function(I,F,c){let m=!1,f=[],k=[];if(I.stops){var x=
I.stops;f=x.map(z=>z.value);(m=x.some(z=>!!z.label))&&(k=x.map(z=>z.label))}x=f[f.length-1];if(null==f[0]&&null==x)return null;const n=m?null:v(f,c);return(await Promise.all(f.map(async(z,l)=>{const E="opacity"===I.type?await D(z,I,F):(await new Promise((u,d)=>b(["../../../renderers/visualVariables/support/visualVariableUtils"],u,d))).getColor(I,z);return{value:z,color:E,label:m?k[l]:n?.[l]??""}}))).reverse()};h.getRampStopsForPointCloud=function(I){let F=!1,c=[],m=[];c=I.map(x=>x.value);(F=I.some(x=>
!!x.label))&&(m=I.map(x=>x.label??""));const f=c[c.length-1];if(null==c[0]&&null==f)return null;const k=F?null:v(c);return c.map((x,n)=>{const z=K(x,I);return{value:x,color:z,label:F?m[n]:k?.[n]??""}}).reverse()};h.getStretchRampStops=function(I,F){let c=[];if(I&&"multipart"===I.type)I.colorRamps.reverse().forEach((m,f)=>{0===f?c.push({value:F.max,color:new g(m.toColor),label:"high"}):c.push({value:null,color:new g(m.toColor),label:""});f===I.colorRamps.length-1?c.push({value:F.min,color:new g(m.fromColor),
label:"low"}):c.push({value:null,color:new g(m.fromColor),label:""})});else{let m,f;I&&"algorithmic"===I.type?(m=I.fromColor,f=I.toColor):(m=[0,0,0,1],f=[255,255,255,1]);c=[{value:F.max,color:new g(f),label:"high"},{value:F.min,color:new g(m),label:"low"}]}return c};Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Legend/support/utils":function(){define("require exports ../../../symbols ../../../core/timeUtils ../../../layers/support/fieldUtils ../../../renderers/support/numberUtils ../../../smartMapping/support/utils ../../../symbols/SimpleLineSymbol".split(" "),
function(b,h,g,y,v,D,K,L){async function R(c){if(!("visualVariables"in c&&c.visualVariables))return null;c=c.visualVariables.find(k=>"color"===k.type);if(!c)return null;var m=null,f=null;if(c.stops){if(1===c.stops.length)return c.stops[0].color;m=c.stops[0].value;f=c.stops[c.stops.length-1].value}m=null!=m&&null!=f?m+(f-m)/2:0;({getColor:f}=await new Promise((k,x)=>b(["../../../renderers/visualVariables/support/visualVariableUtils"],k,x)));return f(c,m)??null}function I(c,m){if(!m.field)return null;
if("featureReduction"in c)switch(c.featureReduction?.type){case "cluster":case "binning":const f=c.featureReduction.fields.find(({name:k})=>k.toLowerCase()===m.field.toLowerCase());return f&&"getField"in c?c.getField(f.onStatisticField):null}return"getField"in c?c.getField?.(m.field):null}function F(c,m){c="popupTemplate"in c?c.popupTemplate?.fieldInfos:null;if(c?.length&&m)return c.find(f=>f.fieldName?.toLowerCase()===m.toLowerCase())?.format?.dateFormat}h.createStopLabel=function(c,m,f,k){let x=
"";0===m?x="\x3c ":m===f&&(x="\x3e ");c=k?K.formatAnyDate(c,k):D.format(c);return x+c};h.getDateFormatOptions=function(c,m,f){const k=I(c,m);if(!k||!K.isAnyDateField(k)&&!v.isTimeOnlyField(k))return null;var x=F(c,k.name);if(!x&&"date"===k.type){let n=x=0;m.stops?(x=m.stops?.at(0)?.value??x,n=m.stops?.at(-1)?.value??n):"minDataValue"in m&&"maxDataValue"in m&&(x=m.minDataValue??x,n=m.maxDataValue??n);x=n-x>2*y.millisecondsPerTimeUnit.days?"short-date":"short-date-short-time"}return{fieldType:k.type,
format:x,timeZoneOptions:{layerTimeZone:"preferredTimeZone"in c?c.preferredTimeZone:null,viewTimeZone:f,datesInUnknownTimezone:"datesInUnknownTimezone"in c&&c.datesInUnknownTimezone}}};h.getMedianColor=R;h.getReferenceSizeAuthoringInfoVisualVariable=function(c){if("authoringInfo"in c)return c.authoringInfo?.visualVariables?.find(({theme:m})=>"reference-size"===m)};h.getSymbolForFlowRenderer=async function(c,m){const f=c.trailCap,k=c.trailWidth||1;c=m||await R(c)||c.color;return new L({cap:f,color:c,
width:k})};h.isRasterBandStatistics=function(c){return null!=c&&"object"===typeof c&&"min"in c&&"max"in c};h.rgbImgSource=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAAAAAAAAAHqZRakAAAANUlEQVQ4jWPMy8v7z0BFwMLAwMAwcdIkqhiWn5fHwEQVk5DAqIGjBo4aOGrgqIEQwEjtKgAATl0Hu6JrzFUAAAAASUVORK5CYII\x3d","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAAAAAAAAAHqZRakAAAANUlEQVQ4jWPMy8v7z0BFwMLAwMAwaeIkqhiWl5/HwEQVk5DAqIGjBo4aOGrgqIEQwEjtKgAATl0Hu6sKxboAAAAASUVORK5CYII\x3d",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAAAAAAAAAHqZRakAAAANUlEQVQ4jWPMy8v7z0BFwMLAwMAwadJEqhiWl5fPwEQVk5DAqIGjBo4aOGrgqIEQwEjtKgAATl0Hu75+IUcAAAAASUVORK5CYII\x3d"];h.specialCharsGreaterThan="\x3e";h.specialCharsLessThan="\x3c";Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Legend/support/heatmapRampUtils":function(){define(["exports","../../../renderers/support/HeatmapColorStop"],function(b,h){b.getHeatmapRampStops=function(g){if(!g.colorStops)return[];
const y=[...g.colorStops].filter(D=>0<D.color?.a);let v=y.length-1;if(y&&y[0]){const D=y[v];D&&1!==D.ratio&&(y.push(new h({ratio:1,color:D.color})),v++)}return y.map((D,K)=>{let L="";0===K?L=g.legendOptions?.minLabel||"low":K===v&&(L=g.legendOptions?.maxLabel||"high");return{color:D.color,label:L,ratio:D.ratio}}).reverse()};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Feature/FeatureMedia/FeatureMediaViewModel":function(){define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/arrayUtils ../../../core/accessorSupport/decorators/property ../../../core/accessorSupport/decorators/cast ../../../core/has ../../../core/accessorSupport/decorators/subclass ../../../popup/FieldInfo ../../../popup/content/support/ChartMediaInfoValueSeries ../support/featureUtils ../support/relatedFeatureUtils".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F){const c={chartAnimation:!0};h=class extends h{constructor(m){super(m);this.abilities={...c};this.activeMediaInfoIndex=0;this.expressionAttributes=this.formattedAttributes=this.fieldInfoMap=this.description=this.attributes=null;this.isAggregate=!1;this.title=this.relatedInfos=this.popupTemplate=this.mediaInfos=this.layer=null}castAbilities(m){return{...c,...m}}get activeMediaInfo(){return this.formattedMediaInfos[this.activeMediaInfoIndex]||null}get formattedMediaInfos(){return this._formatMediaInfos()||
[]}get formattedMediaInfoCount(){return this.formattedMediaInfos.length}setActiveMedia(m){this._setContentElementMedia(m)}next(){this._pageContentElementMedia(1)}previous(){this._pageContentElementMedia(-1)}_setContentElementMedia(m){const {formattedMediaInfoCount:f}=this;this.activeMediaInfoIndex=(m+f)%f}_pageContentElementMedia(m){const {activeMediaInfoIndex:f}=this;this._setContentElementMedia(f+m)}_formatMediaInfos(){const {mediaInfos:m,layer:f}=this,k=this.attributes??{},x=this.formattedAttributes??
{},n=this.expressionAttributes??{},z=this.fieldInfoMap??new Map;return m?.map(l=>{l=l?.clone();if(!l)return null;l.title=I.substituteFieldsInLinksAndAttributes({attributes:k,fieldInfoMap:z,globalAttributes:x,expressionAttributes:n,layer:f,text:l.title});l.caption=I.substituteFieldsInLinksAndAttributes({attributes:k,fieldInfoMap:z,globalAttributes:x,expressionAttributes:n,layer:f,text:l.caption});l.altText=I.substituteFieldsInLinksAndAttributes({attributes:k,fieldInfoMap:z,globalAttributes:x,expressionAttributes:n,
layer:f,text:l.altText});if("image"===l.type){if(!l.value)return;this._setImageValue({value:l.value,formattedAttributes:x,layer:f});return l.value.sourceURL?l:void 0}if("pie-chart"===l.type||"line-chart"===l.type||"column-chart"===l.type||"bar-chart"===l.type){if(!l.value)return;this._setChartValue({value:l.value,chartType:l.type,attributes:k,formattedAttributes:x,layer:f,expressionAttributes:n});return l}return null}).filter(g.isSome)??[]}_setImageValue(m){const f=this.fieldInfoMap??new Map,{value:k,
formattedAttributes:x,layer:n}=m,{linkURL:z,sourceURL:l}=k;l&&(m=I.fixTokens(l,n),k.sourceURL=I.substituteAttributes({formattedAttributes:x,template:m,fieldInfoMap:f}));z&&(m=I.fixTokens(z,n),k.linkURL=I.substituteAttributes({formattedAttributes:x,template:m,fieldInfoMap:f}))}_setChartValue(m){const {value:f,attributes:k,formattedAttributes:x,chartType:n,layer:z,expressionAttributes:l}=m,{popupTemplate:E,relatedInfos:u}=this,{fields:d,normalizeField:t}=f;f.fields=I.getFixedFieldNames(d,z);t&&(f.normalizeField=
I.getFixedFieldName(t,z));if(d.some(e=>!!(null!=x[e]||I.isRelatedField(e)&&u?.size))){var a=E?.fieldInfos??[];d.forEach((e,B)=>{B=f.colors?.[B];I.isRelatedField(e)?f.series=[...f.series,...this._getRelatedChartInfos({fieldInfos:a,fieldName:e,formattedAttributes:x,chartType:n,value:f,color:B})]:(e=this._getChartOption({value:f,attributes:k,chartType:n,formattedAttributes:x,expressionAttributes:l,fieldName:e,fieldInfos:a,color:B}),f.series.push(e))})}}_getRelatedChartInfos(m){const {fieldInfos:f,fieldName:k,
formattedAttributes:x,chartType:n,value:z,color:l}=m,E=[],u=F.getRelatedFieldInfo(k);m=u&&this.relatedInfos?.get(u.layerId.toString());if(!m)return E;const {relatedFeatures:d,relation:t}=m;if(!t||!d)return E;({cardinality:m}=t);d.forEach(a=>{const {attributes:e}=a;e&&Object.keys(e).forEach(B=>{B===u.fieldName&&E.push(this._getChartOption({value:z,attributes:e,formattedAttributes:x,fieldName:k,chartType:n,relatedFieldName:B,hasMultipleRelatedFeatures:1<d?.length,fieldInfos:f,color:l}))})});return"one-to-many"===
m||"many-to-many"===m?E:[E[0]]}_getTooltip({label:m,value:f,chartType:k}){return"pie-chart"===k?`${m}`:`${m}: ${f}`}_getChartOption(m){const {value:f,attributes:k,formattedAttributes:x,expressionAttributes:n,fieldName:z,relatedFieldName:l,fieldInfos:E,chartType:u,hasMultipleRelatedFeatures:d,color:t}=m;var a=this.layer,e=this.fieldInfoMap??new Map;const {normalizeField:B,tooltipField:J}=f;m=B?I.isRelatedField(B)?k[F.getRelatedFieldInfo(B).fieldName]:k[B]:null;var P=I.isExpressionField(z)&&n&&void 0!==
n[z]?n[z]:l&&void 0!==k[l]?k[l]:void 0!==k[z]?k[z]:x[z];m=new R({fieldName:z,color:t,value:void 0===P?null:P&&m?P/m:P});if(I.isRelatedField(z))return a=e.get(z.toLowerCase()),P=J&&e.get(J.toLowerCase()),e=a?.fieldName??z,P=d&&J?F.getRelatedFieldInfo(J).fieldName:P?.fieldName??J,m.tooltip=this._getTooltip({label:d&&P?k[P]:x[P]??a?.label??a?.fieldName??l,value:d&&l?k[l]:x[e],chartType:u}),m;e=I.getFieldInfo(E,z);a=I.getFixedFieldName(z,a);e=J&&void 0!==x[J]?x[J]:I.getFieldInfoLabel(e||new L({fieldName:a}),
this.popupTemplate?.expressionInfos);m.tooltip=this._getTooltip({label:e,value:x[a],chartType:u});return m}};b.__decorate([y.property()],h.prototype,"abilities",void 0);b.__decorate([v.cast("abilities")],h.prototype,"castAbilities",null);b.__decorate([y.property()],h.prototype,"activeMediaInfoIndex",void 0);b.__decorate([y.property({readOnly:!0})],h.prototype,"activeMediaInfo",null);b.__decorate([y.property()],h.prototype,"attributes",void 0);b.__decorate([y.property()],h.prototype,"description",
void 0);b.__decorate([y.property()],h.prototype,"fieldInfoMap",void 0);b.__decorate([y.property()],h.prototype,"formattedAttributes",void 0);b.__decorate([y.property()],h.prototype,"expressionAttributes",void 0);b.__decorate([y.property({readOnly:!0})],h.prototype,"formattedMediaInfos",null);b.__decorate([y.property()],h.prototype,"isAggregate",void 0);b.__decorate([y.property()],h.prototype,"layer",void 0);b.__decorate([y.property({readOnly:!0})],h.prototype,"formattedMediaInfoCount",null);b.__decorate([y.property()],
h.prototype,"mediaInfos",void 0);b.__decorate([y.property()],h.prototype,"popupTemplate",void 0);b.__decorate([y.property()],h.prototype,"relatedInfos",void 0);b.__decorate([y.property()],h.prototype,"title",void 0);return h=b.__decorate([K.subclass("esri.widgets.Feature.FeatureMedia.FeatureMediaViewModel")],h)})},"esri/widgets/Feature/support/relatedFeatureUtils":function(){define("exports ../../../request ../../../core/arrayUtils ../../../core/Error ../../../core/Logger ../../../core/promiseUtils ../../../layers/support/fieldUtils ../../../core/has ../../../layers/support/source/DataLayerSource ../../../rest/query/executeQueryJSON ../../../config ../../../kernel ../../../core/urlUtils ../../../core/unitUtils ../../../geometry/ellipsoidUtils ../../../geometry/support/spatialReferenceUtils ../../../geometry/support/aaBoundingBox ../../../core/mathUtils ../../../geometry/Extent ../../../geometry/Geometry ../../../geometry/Multipoint ../../../geometry/Point ../../../geometry/Polygon ../../../geometry/Polyline ../../../geometry/support/normalizeUtilsCommon ../../../geometry/SpatialReference ../../../geometry/support/Ellipsoid ../../../geometry ../../../core/pbf ../../../rest/support/FeatureSet ../../../rest/support/Query ../../../rest/query/support/AttachmentInfo ../../../rest/support/AttachmentQuery ../../../rest/support/RelationshipQuery ../../../rest/support/TopFeaturesQuery ../../../rest/support/StatisticDefinition ./featureUtils".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,l,E,u,d,t,a,e,B,J,P,M,A,w,H,q,N,r,p,C){function Q(G,O){if(!O.relationships)return null;let S=null;({relationships:O}=O);O.some(U=>U.id===parseInt(G,10)?(S=U,!0):!1);return S}function T({originRelationship:G,relationships:O,layerId:S}){return O.find(({relatedTableId:U,id:W})=>`${U}`===S&&W===G?.id)??null}function V(G,O){O=O.toLowerCase();for(const S in G)if(S.toLowerCase()===O)return G[S];return null}function aa(G,O,S,U){const W=new N;W.outFields=["*"];
W.relationshipId="number"===typeof O.id?O.id:parseInt(O.id,10);W.objectIds=[G.attributes[S.objectIdField]];W.gdbVersion=S.gdbVersion??null;W.historicMoment=S.historicMoment??null;return S.queryRelatedFeatures?.(W,U)??Promise.resolve({})}function ca(G,O,S){let U=0;const W=[];for(;U<O.length;)W.push(`${G} IN (${O.slice(U,S+U)})`),U+=S;return W.join(" OR ")}function Z(G){return G?g.unique(G):void 0}function ea(G){return G?g.unique(G,(O,S)=>JSON.stringify(O.toJSON())===JSON.stringify(S.toJSON())):void 0}
async function Y(G,O,S,U){var W=S.layerId.toString();const {layerInfo:X,relation:fa,relatedFields:ha,outStatistics:ia,url:ja,sourceSpatialReference:ka}=O;O=Z(ha);const la=ea(ia);if(!X||!fa)return null;const ma=T({originRelationship:fa,relationships:X.relationships,layerId:W});if(ma?.relationshipTableId&&ma.keyFieldInRelationshipTable){W=(await aa(G,ma,S,U))[G.attributes[S.objectIdField]];if(!W)return null;var na=W.features.map(oa=>oa.attributes[X.objectIdField]);if(la?.length&&X.supportsStatistics)return U=
new w,U.where=ca(X.objectIdField,na,1E3),U.outFields=O,U.outStatistics=la,U.sourceSpatialReference=ka,U={features:Promise.resolve(W),statsFeatures:I.executeQueryJSON(ja,U)},D.eachAlways(U)}return(W=ma?.keyField)?(na=K.isNumericField(ba(X.fields,W)),G=V(G.attributes,fa.keyField),G=na?`${W}=${G}`:`${W}='${G}'`,S=I.executeQueryJSON(ja,new w({where:G,outFields:O,sourceSpatialReference:ka,historicMoment:S.historicMoment,gdbVersion:S.gdbVersion}),U),U=la?.length&&X.supportsStatistics?I.executeQueryJSON(ja,
new w({where:G,outFields:O,outStatistics:la,sourceSpatialReference:ka}),U):null,O={features:S},U&&(O.statsFeatures=U),D.eachAlways(O)):null}function ba(G,O){if(null!=G){O=O.toLowerCase();for(const S of G)if(S&&S.name.toLowerCase()===O)return S}return null}const da=new Map;b.createRelatedInfo=function(G,O){if(G=Q(G,O))return{url:`${O.url}/${G.relatedTableId}`,sourceSpatialReference:O.spatialReference,relation:G,relatedFields:[],outStatistics:[]}};b.getDestinationRelation=T;b.getRelatedFieldInfo=function(G){if(!C.isRelatedField(G))return null;
const [O,S]=G.split("/").slice(1);return{layerId:O,fieldName:S}};b.getUniqueOutFields=Z;b.getUniqueOutStatistics=ea;b.queryLayerInfos=function({relatedInfos:G,layer:O},S){const U={};G.forEach((W,X)=>{({relation:W}=W);if(!W)throw X=new y("relation-required","A relation is required on a layer to retrieve related records."),v.getLogger("esri.widgets.Feature.support.relatedFeatureUtils").error(X),X;({relatedTableId:W}=W);if("number"!==typeof W)throw X=new y("A related table ID is required on a layer to retrieve related records."),
v.getLogger("esri.widgets.Feature.support.relatedFeatureUtils").error(X),X;W=`${O.url}/${W}`;const fa=da.get(W),ha=fa??h(W,{query:{f:"json"},signal:(void 0)?.signal});fa||da.set(W,ha);U[X]=ha});return D.whenOrAbort(D.eachAlways(U),S)};b.queryRelatedFeatures=function({graphic:G,relatedInfos:O,layer:S},U){const W={};O.forEach((X,fa)=>{X.layerInfo&&(W[fa]=Y(G,X,S,U))});return D.eachAlways(W)};b.setRelatedFeatures=function(G,O){if(O&&G){var {features:S,statsFeatures:U}=G;G=S?.value;O.relatedFeatures=
G?G.features:[];G=U?.value;O.relatedStatsFeatures=G?G.features:[]}};b.updateRelatedInfo=function({relatedInfo:G,fieldName:O,fieldInfo:S}){G.relatedFields?.push(O);S.statisticType&&(O=new p({statisticType:S.statisticType,onStatisticField:O,outStatisticFieldName:O}),G.outStatistics?.push(O))};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Feature/FeatureExpression/FeatureExpressionViewModel":function(){define("../../../chunks/tslib.es6 ../../../geometry ../../../Graphic ../../../core/Accessor ../../../core/reactiveUtils ../../../core/throttle ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../popup/content/AttachmentsContent ../../../popup/content/Content ../../../popup/content/CustomContent ../../../popup/content/ExpressionContent ../../../popup/content/FieldsContent ../../../popup/content/MediaContent ../../../popup/content/RelationshipContent ../../../popup/content/TextContent ../../../popup/ElementExpressionInfo ../FeatureContent/FeatureContentViewModel ../FeatureFields/FeatureFieldsViewModel ../FeatureMedia/FeatureMediaViewModel ../support/arcadeFeatureUtils ../../../geometry/Point".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,l,E,u,d,t,a,e){h=class extends y{constructor(B){super(B);this.view=this.location=this.interceptor=this.contentElementViewModel=this.contentElement=this.graphic=this.expressionInfo=this._abortController=null;this._cancelQuery=()=>{const {_abortController:J}=this;J&&J.abort();this._abortController=null};this._createVM=()=>{var J=this.contentElement?.type;this.contentElementViewModel?.destroy();J="fields"===J?new d:"media"===J?new t:"text"===J?new u:null;
this._set("contentElementViewModel",J)};this._compile=async()=>{this._cancelQuery();const J=new AbortController;this._abortController=J;await this._compileExpression();this._abortController===J&&(this._abortController=null)};this._compileThrottled=D.throttle(this._compile,1,this);this._compileExpression=async()=>{const {expressionInfo:J,graphic:P,interceptor:M,spatialReference:A,map:w,location:H,view:q,_abortController:N}=this;if(J&&P){var r=await a.loadArcade();if(N===this._abortController)if((r=
await a.createCompiledExpression({arcade:r,expressionInfo:J,graphic:P,location:H,interceptor:M,map:w,spatialReference:A,view:q}))&&"esri.arcade.Dictionary"===r.declaredClass){r=await r.castAsJsonAsync(N?.signal);var p=r?.type;r="media"===p?n.fromJSON(r):"text"===p?l.fromJSON(r):"fields"===p?x.fromJSON(r):null;this._set("contentElement",r)}else this._set("contentElement",null)}else this._set("contentElement",null)};this.addHandles([v.watch(()=>[this.expressionInfo,this.graphic,this.map,this.spatialReference,
this.view],()=>this._compileThrottled(),v.initial),v.watch(()=>[this.contentElement],()=>this._createVM(),v.initial)])}initialize(){this.addHandles(this._compileThrottled)}destroy(){this._cancelQuery();this.contentElementViewModel?.destroy();this._set("contentElementViewModel",null);this._set("contentElement",null)}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(B){this._override("spatialReference",B)}get state(){const {_abortController:B,contentElement:J,contentElementViewModel:P}=
this;return B?"loading":J||P?"ready":"disabled"}get map(){return this.view?.map??null}set map(B){this._override("map",B)}};b.__decorate([K.property()],h.prototype,"_abortController",void 0);b.__decorate([K.property({type:E})],h.prototype,"expressionInfo",void 0);b.__decorate([K.property({type:g})],h.prototype,"graphic",void 0);b.__decorate([K.property({readOnly:!0})],h.prototype,"contentElement",void 0);b.__decorate([K.property({readOnly:!0})],h.prototype,"contentElementViewModel",void 0);b.__decorate([K.property()],
h.prototype,"interceptor",void 0);b.__decorate([K.property({type:e})],h.prototype,"location",void 0);b.__decorate([K.property()],h.prototype,"spatialReference",null);b.__decorate([K.property({readOnly:!0})],h.prototype,"state",null);b.__decorate([K.property()],h.prototype,"map",null);b.__decorate([K.property()],h.prototype,"view",void 0);return h=b.__decorate([F.subclass("esri.widgets.Feature.FeatureExpression.FeatureExpressionViewModel")],h)})},"esri/widgets/Feature/support/arcadeFeatureUtils":function(){define("require exports ../../../core/Logger ../../../core/promiseUtils ../../../layers/FeatureLayer ./featureUtils ../../support/globalCss".split(" "),
function(b,h,g,y,v,D,K){function L(f){return`<ul class="esri-widget__list">${f.map(k=>`<li>${"string"===typeof k?D.applyTextFormattingHTML(D.htmlEntities(k)):k}</li>`).join("")}</ul>`}function R(f){const k=f.keys().map(x=>{var n=f.field(x);n="string"===typeof n?D.applyTextFormattingHTML(D.htmlEntities(n)):n;return`<tr><th>${x}</th><td>${n}</td></tr>`}).join("");return`<table class="${K.globalCss.table}">${k}</table>`}function I(){return new Promise((f,k)=>b(["../../../arcade"],f,k))}async function F({graphic:f,
view:k,options:x}){const {isAggregate:n,layer:z}=f;if(!n||!z||"2d"!==k?.type)return[];k=await k.whenLayerView(z);if(!("createQuery"in k&&"queryFeatures"in k))return[];const l=k.createQuery();f=f.getObjectId();l.aggregateIds=null!=f?[f]:[];({features:x}=await k.queryFeatures(l,x));return x}function c({layer:f,aggregatedFeatures:k,interceptor:x}){const {fields:n,objectIdField:z,geometryType:l,spatialReference:E,displayField:u}=f;return new v({fields:n,objectIdField:z,geometryType:l,spatialReference:E,
displayField:u,interceptor:x,...("feature"===f.type?{templates:f.templates,typeIdField:f.typeIdField,types:f.types}:null),source:k})}async function m({expressionInfo:f,arcade:k,interceptor:x,spatialReference:n,map:z,graphic:l,location:E,view:u,options:d}){if(!f?.expression)return null;var {isAggregate:t}=l;const a=(l.sourceLayer||l.layer)??void 0;t=t?"feature-reduction-popup":"popup";const e=k.createArcadeProfile(t);k=k.createArcadeExecutor(f.expression,e).catch(M=>g.getLogger("esri.widgets.Feature.support.arcadeFeatureUtils").error("arcade-executor-error",
{error:M,expressionInfo:f}));const [B,J]=await Promise.all([F({graphic:l,view:u,options:d}),k]);if(!J)return null;const P="feature-reduction-popup"===t?c({layer:a,aggregatedFeatures:B,interceptor:x}):void 0;return await J.executeAsync({...("feature-reduction-popup"===t?{$aggregatedFeatures:P}:{$datastore:a?.url,$layer:"feature"===a?.type||"subtype-sublayer"===a?.type||"catalog-footprint"===a?.type||"oriented-imagery"===a?.type?a:"scene"===a?.type&&null!=a.associatedLayer?a.associatedLayer:void 0,
$map:z,$userInput:E,$graph:"knowledge-graph-sublayer"===a?.type?a?.parentCompositeLayer?.knowledgeGraph:void 0}),$feature:l},{abortSignal:d?.signal??void 0,interceptor:x??void 0,rawOutput:!0,spatialReference:n??void 0,timeZone:u?.timeZone}).catch(M=>g.getLogger("esri.widgets.Feature.support.arcadeFeatureUtils").error("arcade-execution-error",{error:M,graphic:l,expressionInfo:f})).finally(()=>P?.destroy())}h.createCompiledExpression=m;h.createCompiledExpressions=async function({expressionInfos:f,spatialReference:k,
graphic:x,interceptor:n,map:z,view:l,location:E,options:u}){if(!f?.length)return{};const d=await I(),t={};for(const a of f)t[`expression/${a.name}`]=m({expressionInfo:a,arcade:d,interceptor:n,spatialReference:k,map:z,graphic:x,location:E,view:l,options:u});f=await y.eachAlways(t);k={};for(const a in f)x=f[a].value,x="string"===typeof x?D.applyTextFormattingHTML(D.htmlEntities(x)):Array.isArray(x)?L(x):"esri.arcade.Dictionary"===x?.declaredClass?R(x):x,k[a]=x;return k};h.loadArcade=I;Object.defineProperty(h,
Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Feature/FeatureRelationship":function(){define("require ../../chunks/tslib.es6 ../../intl ../../core/maybe ../../core/promiseUtils ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/accessorSupport/decorators/cast ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/subclass ../Widget ./FeatureRelationship/FeatureRelationshipViewModel ./support/FeatureElementInfo ../../chunks/componentsUtils ../support/globalCss ../support/widgetUtils ../support/decorators/messageBundle ../support/jsxFactory ../../intl/substitute".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,l,E){const u={title:!0,description:!0};g=class extends c{constructor(d,t){super(d,t);this._relatedFeatureIntersectionObserverNode=this._featureElementInfo=null;this._relatedFeatureIntersectionObserver=new IntersectionObserver(([a])=>{a?.isIntersecting&&this._increaseFeaturePage()},{root:window.document});this.headingLevel=2;this.viewModel=new m;this.messagesCommon=this.messages=null;this.visibleElements={...u};this._increaseFeaturePage=()=>{const {state:a,
showAllEnabled:e,relatedFeatures:B,featuresPerPage:J,featurePage:P}=this.viewModel;"ready"===a&&e&&B.length>=J*P&&this.viewModel.featurePage++}}initialize(){this._featureElementInfo=new f;this.addHandles([D.watch(()=>[this.viewModel.description,this.viewModel.title,this.headingLevel],()=>this._setupFeatureElementInfo(),D.initial),D.watch(()=>[this.viewModel.state,this.viewModel.showAllEnabled,this._relatedFeatureIntersectionObserverNode],()=>this._handleRelatedFeatureObserverChange()),D.on(()=>this.viewModel.relatedFeatureViewModels,
"change",()=>this._setupRelatedFeatureViewModels())])}loadDependencies(){return k.loadCalciteComponents({icon:()=>new Promise((d,t)=>b(["../../chunks/calcite-icon"],d,t)),list:()=>new Promise((d,t)=>b(["../../chunks/calcite-list"],d,t)),"list-item":()=>new Promise((d,t)=>b(["../../chunks/calcite-list-item"],d,t)),loader:()=>new Promise((d,t)=>b(["../../chunks/calcite-loader"],d,t)),notice:()=>new Promise((d,t)=>b(["../../chunks/calcite-notice"],d,t))})}destroy(){this._unobserveRelatedFeatureObserver();
this._featureElementInfo=y.destroyMaybe(this._featureElementInfo)}get displayShowAllButton(){const {showAllEnabled:d,featureCount:t,displayCount:a,state:e}=this.viewModel;return!d&&!!t&&"ready"===e&&(t>a||0===a)}get displayListItems(){return this.displayShowAllButton||0<this.viewModel.relatedFeatureViewModels.length}get description(){return this.viewModel.description}set description(d){this.viewModel.description=d}get featureCountDescription(){const {messages:d}=this,{featureCount:t}=this.viewModel;
return E.substitute(d?.numberRecords,{number:t})}get title(){return this.viewModel.title}set title(d){this.viewModel.title=d}castVisibleElements(d){return{...u,...d}}render(){const {state:d}=this.viewModel;return l.tsx("div",{class:this.classes("esri-feature-relationship",x.globalCss.widget)},this._featureElementInfo?.render(),"loading"===d?this._renderLoading():"disabled"===d?this._renderRelationshipNotFound():this._renderRelatedFeatures())}_renderStickyLoading(){return"querying"===this.viewModel.state?
l.tsx("div",{class:"esri-feature__sticky-loading-container",key:"sticky-loader"},this._renderLoadingIcon()):null}_renderLoadingIcon(){return l.tsx("calcite-loader",{inline:!0,label:""})}_renderLoading(){return l.tsx("div",{class:"esri-feature__loading-container",key:"loading-container"},this._renderLoadingIcon())}_renderShowAllIconNode(){return l.tsx("calcite-icon",{icon:"list",scale:"s",slot:"content-end"})}_renderChevronIconNode(){const d=n.isRTL(this.container)?"chevron-left":"chevron-right";return l.tsx("calcite-icon",
{icon:d,scale:"s",slot:"content-end"})}_renderRelatedFeature(d){const {itemDescriptionFieldName:t}=this.viewModel,a=d.title;d.description=t&&d.formattedAttributes?.global[t];return l.tsx("calcite-list-item",{class:this.classes("esri-feature-relationship__list-item",{["esri-feature-relationship__list-item--hidden"]:"loading"===d.state}),description:d.description??"",key:d.uid,label:a,onCalciteListItemSelect:()=>this.emit("select-record",{featureViewModel:d})},this._renderChevronIconNode())}_renderShowAllListItem(){return this.displayShowAllButton?
l.tsx("calcite-list-item",{description:this.featureCountDescription,key:"show-all-item",label:this.messages?.showAll,onCalciteListItemSelect:()=>this.emit("show-all-records")},this._renderShowAllIconNode()):null}_renderNoRelatedFeaturesMessage(){return l.tsx("calcite-notice",{icon:"information",key:"no-related-features-message",kind:"brand",open:!0,scale:"s",width:"full"},l.tsx("div",{slot:"message"},this.messages?.noRelatedFeatures))}_renderFeatureObserver(){return l.tsx("div",{afterCreate:this._relatedFeatureIntersectionObserverCreated,
bind:this,class:"esri-feature__feature-observer",key:"feature-observer"})}_renderList(){const {relatedFeatureViewModels:d}=this.viewModel;return l.tsx("calcite-list",null,d.toArray().map(t=>this._renderRelatedFeature(t)),this._renderShowAllListItem())}_renderRelatedFeatures(){const {displayListItems:d}=this,{state:t}=this.viewModel;return l.tsx("div",{class:this.classes("esri-feature-relationship__list",{["esri-feature-relationship__list--querying"]:"querying"===t}),key:"list-container"},d?this._renderList():
"ready"===t?this._renderNoRelatedFeaturesMessage():null,this._renderStickyLoading(),this._renderFeatureObserver())}_renderRelationshipNotFound(){return l.tsx("calcite-notice",{icon:"exclamation-mark-triangle",key:"relationship-not-found",kind:"danger",open:!0,scale:"s",width:"full"},l.tsx("div",{slot:"message"},this.messages?.relationshipNotFound))}_setupRelatedFeatureViewModels(){const {relatedFeatureViewModels:d}=this.viewModel;this.removeHandles("related-feature-viewmodels");d?.forEach(t=>{this.addHandles(D.watch(()=>
[t.title,t.state],()=>this.scheduleRender(),D.initial),"related-feature-viewmodels")});this.scheduleRender()}_setupFeatureElementInfo(){const {headingLevel:d,visibleElements:t}=this,a=t.description&&this.description,e=t.title&&this.title;this._featureElementInfo?.set({description:a,title:e,headingLevel:d})}async _handleRelatedFeatureObserverChange(){this._unobserveRelatedFeatureObserver();const {state:d,showAllEnabled:t}=this.viewModel;await v.after(0);this._relatedFeatureIntersectionObserverNode&&
"ready"===d&&t&&this._relatedFeatureIntersectionObserver.observe(this._relatedFeatureIntersectionObserverNode)}_relatedFeatureIntersectionObserverCreated(d){this._relatedFeatureIntersectionObserverNode=d}_unobserveRelatedFeatureObserver(){this._relatedFeatureIntersectionObserverNode&&this._relatedFeatureIntersectionObserver.unobserve(this._relatedFeatureIntersectionObserverNode)}};h.__decorate([K.property()],g.prototype,"_relatedFeatureIntersectionObserverNode",void 0);h.__decorate([K.property({readOnly:!0})],
g.prototype,"displayShowAllButton",null);h.__decorate([K.property({readOnly:!0})],g.prototype,"displayListItems",null);h.__decorate([K.property()],g.prototype,"description",null);h.__decorate([K.property({readOnly:!0})],g.prototype,"featureCountDescription",null);h.__decorate([K.property()],g.prototype,"headingLevel",void 0);h.__decorate([K.property()],g.prototype,"title",null);h.__decorate([K.property({type:m})],g.prototype,"viewModel",void 0);h.__decorate([K.property(),z.messageBundle("esri/widgets/Feature/t9n/Feature")],
g.prototype,"messages",void 0);h.__decorate([K.property(),z.messageBundle("esri/t9n/common")],g.prototype,"messagesCommon",void 0);h.__decorate([K.property()],g.prototype,"visibleElements",void 0);h.__decorate([L.cast("visibleElements")],g.prototype,"castVisibleElements",null);return g=h.__decorate([F.subclass("esri.widgets.Feature.FeatureRelationship")],g)})},"esri/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel":function(){define("../../../chunks/tslib.es6 ../../../Graphic ../../../core/Accessor ../../../core/arrayUtils ../../../core/Clonable ../../../core/Collection ../../../core/Identifiable ../../../core/promiseUtils ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/accessorSupport/decorators/subclass ../../../rest/support/RelationshipQuery ../support/featureUtils ../../FeatureForm/featureFormUtils".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x){g=class extends v.ClonableMixin(K.IdentifiableMixin(g)){constructor(n){super(n);this._loaded=!1;this._queryFeatureCountAbortController=this._queryPageAbortController=this._queryAbortController=null;this.featuresPerPage=10;this.orderByFields=this.map=this.layer=this.graphic=this.description=null;this.featureCount=0;this.relationshipId=null;this.showAllEnabled=!1;this.title=null;this._cancelQuery=()=>{const {_queryAbortController:z}=this;z&&z.abort();this._queryAbortController=
null};this._cancelQueryFeatureCount=()=>{const {_queryFeatureCountAbortController:z}=this;z&&z.abort();this._queryFeatureCountAbortController=null};this._cancelQueryPage=()=>{const {_queryPageAbortController:z}=this;z&&z.abort();this._queryPageAbortController=null};this._queryController=async()=>{this._cancelQuery();const z=new AbortController;this._queryAbortController=z;await L.ignoreAbortErrors(this._query());this._queryAbortController===z&&(this._queryAbortController=null)};this._queryFeatureCountController=
async()=>{this._loaded=!1;this._cancelQueryFeatureCount();const z=new AbortController;this._queryFeatureCountAbortController=z;await L.ignoreAbortErrors(this._queryFeatureCount());this._queryFeatureCountAbortController===z&&(this._queryFeatureCountAbortController=null);this._loaded=!0};this._queryPageController=async()=>{const z=new AbortController;this._queryPageAbortController=z;await L.ignoreAbortErrors(this._queryPage());this._queryPageAbortController===z&&(this._queryPageAbortController=null)};
this._queryDebounced=L.debounce(this._queryController,100);this._queryFeatureCountDebounced=L.debounce(this._queryFeatureCountController,100);this._queryPageDebounced=L.debounce(this._queryPageController,100);this._query=async()=>{const {_queryAbortController:z,relatedFeatures:l}=this;this.featureCount&&(this._destroyRelatedFeatureViewModels(),this.featurePage=1,l.destroyAll(),this.destroyed||l.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:z?.signal}))))};this.addHandles([R.watch(()=>
[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount],()=>this._queryDebounced(),R.initial),R.watch(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),R.watch(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery],()=>this._queryFeatureCountDebounced())])}destroy(){this._destroyRelatedFeatureViewModels();this.relatedFeatures.destroyAll();
this._cancelQuery();this._cancelQueryFeatureCount();this._cancelQueryPage()}set featurePage(n){const {featuresPerPage:z,featureCount:l}=this;this._set("featurePage",Math.min(Math.max(n,1),Math.ceil(l/z)||1))}get featurePage(){return this._get("featurePage")}get orderByFieldsFixedCasing(){const {orderByFields:n,relatedLayer:z}=this;return n&&z?.loaded?n.map(l=>{const E=l.clone();E.field=k.getFixedFieldName(l.field,z);return E}):n??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get canLoad(){return!!this.map&&
null!=this.relationshipId&&"number"===typeof this.objectId}get canQuery(){const n=this.layer?.capabilities?.queryRelated;return!!this.relatedLayer&&!!this.relationship&&null!=this.relationshipId&&null!=this.objectId&&!!n?.supportsCount&&!!n?.supportsPagination}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}set displayCount(n){this._set("displayCount",Math.min(Math.max(n,0),10))}get displayCount(){return this._get("displayCount")}get objectId(){return(this.objectIdField&&
this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedFeatures(){return this._get("relatedFeatures")||new D}get relatedLayer(){const {layer:n,map:z,relationship:l}=this;return n?.loaded&&z&&l?k.findRelatedLayer(z,n,l)??null:null}get relationship(){const {relationshipId:n,layer:z}=this;return null!=n?z?.relationships?.find(({id:l})=>l===n)??null:null}get relatedFeatureViewModels(){return this._get("relatedFeatureViewModels")||new D}get state(){const {_queryAbortController:n,
_queryFeatureCountAbortController:z,_queryPageAbortController:l,canQuery:E,_loaded:u,canLoad:d}=this;return z||d&&!u?"loading":n||l?"querying":E?"ready":"disabled"}getRelatedFeatureByObjectId(n){return this.relatedFeatures.find(z=>z.getObjectId()===n)}refresh(){this._queryFeatureCountDebounced()}_destroyRelatedFeatureViewModels(){this.relatedFeatureViewModels?.destroyAll()}async _queryFeatureCount(){const {layer:n,relatedLayer:z,relationshipId:l,objectId:E,_queryFeatureCountAbortController:u,canQuery:d,
supportsCacheHint:t}=this;await n?.load();await z?.load();if(d&&n&&z&&null!=E){var a=z.createQuery(),{historicMoment:e,gdbVersion:B}=n;a=new f({cacheHint:t,gdbVersion:B,historicMoment:e,relationshipId:l,returnGeometry:!1,objectIds:[E],where:a.where??void 0});a=await n.queryRelatedFeaturesCount(a,{signal:u?.signal});this._set("featureCount",a[E]||0)}else this._set("featureCount",0)}_sliceFeatures(n){const {showAllEnabled:z,displayCount:l}=this;return z?n:l?n.slice(0,l):[]}async _queryPage(){const {relatedFeatures:n,
featurePage:z,showAllEnabled:l,_queryPageAbortController:E,featureCount:u}=this;!l||2>z||!u||n.addMany(await this._queryRelatedFeatures({signal:E?.signal}))}async _queryRelatedFeatures(n){const {orderByFieldsFixedCasing:z,showAllEnabled:l,featuresPerPage:E,displayCount:u,layer:d,relationshipId:t,featurePage:a,featureCount:e,relatedLayer:B,supportsCacheHint:J}=this,{canQuery:P,objectId:M}=this;if(!P||!d||!B||null==M)return[];var A=l?((a-1)*E+e)%e:0;const w=l?E:u;var H=B.objectIdField;H=[...z.map(C=>
C.field),...x.getFieldsInTitleAndDesc(B),H].filter(y.isSome);const q=z.map(C=>`${C.field} ${C.order}`),N=B.createQuery(),{historicMoment:r,gdbVersion:p}=d;A=new f({orderByFields:q,start:A,num:w,outFields:H,cacheHint:J,historicMoment:r,gdbVersion:p,relationshipId:t,returnGeometry:!1,objectIds:[M],where:N.where??void 0});n=(await d.queryRelatedFeatures(A,{signal:n?.signal}))[M]?.features||[];n.forEach(C=>{C.sourceLayer=B;C.layer=B});return n}};b.__decorate([I.property()],g.prototype,"_loaded",void 0);
b.__decorate([I.property()],g.prototype,"_queryAbortController",void 0);b.__decorate([I.property()],g.prototype,"_queryPageAbortController",void 0);b.__decorate([I.property()],g.prototype,"_queryFeatureCountAbortController",void 0);b.__decorate([I.property({value:1})],g.prototype,"featurePage",null);b.__decorate([I.property()],g.prototype,"featuresPerPage",void 0);b.__decorate([I.property({readOnly:!0})],g.prototype,"orderByFieldsFixedCasing",null);b.__decorate([I.property({readOnly:!0})],g.prototype,
"supportsCacheHint",null);b.__decorate([I.property({readOnly:!0})],g.prototype,"canLoad",null);b.__decorate([I.property({readOnly:!0})],g.prototype,"canQuery",null);b.__decorate([I.property()],g.prototype,"description",void 0);b.__decorate([I.property({readOnly:!0})],g.prototype,"itemDescriptionFieldName",null);b.__decorate([I.property({value:3})],g.prototype,"displayCount",null);b.__decorate([I.property({type:h})],g.prototype,"graphic",void 0);b.__decorate([I.property()],g.prototype,"layer",void 0);
b.__decorate([I.property()],g.prototype,"map",void 0);b.__decorate([I.property({readOnly:!0})],g.prototype,"objectId",null);b.__decorate([I.property({readOnly:!0})],g.prototype,"objectIdField",null);b.__decorate([I.property()],g.prototype,"orderByFields",void 0);b.__decorate([I.property({readOnly:!0})],g.prototype,"relatedFeatures",null);b.__decorate([I.property({readOnly:!0})],g.prototype,"relatedLayer",null);b.__decorate([I.property({readOnly:!0})],g.prototype,"relationship",null);b.__decorate([I.property()],
g.prototype,"featureCount",void 0);b.__decorate([I.property({readOnly:!0})],g.prototype,"relatedFeatureViewModels",null);b.__decorate([I.property()],g.prototype,"relationshipId",void 0);b.__decorate([I.property()],g.prototype,"showAllEnabled",void 0);b.__decorate([I.property()],g.prototype,"state",null);b.__decorate([I.property()],g.prototype,"title",void 0);return g=b.__decorate([m.subclass("esri.widgets.Feature.FeatureRelationship.FeatureRelationshipViewModel")],g)})},"esri/widgets/FeatureForm/featureFormUtils":function(){define("exports ../../intl ../../core/arrayUtils ../../core/compilerUtils ../../core/lang ../../core/Logger ../../core/string ../../form/support/formUtils ../../layers/support/domainUtils ../../layers/support/fieldUtils ../../smartMapping/support/utils ../support/dateUtils ../../intl/substitute".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m){function f(a){const {fields:e,values:B}=a,J=a.timeZone??void 0;a=e.map((P,M)=>{let A=B[M];P.domain&&"coded-value"===P.domain.type&&(M=P.domain.codedValues.find(w=>w.code===A),M?.name&&(A=M.name));if(F.isAnyDateField(P)||I.isTimeOnlyField(P))A=c.getLabelForDateFieldValue(P,A,{timeZone:J,...c.getIntlOptionsForField(P)});return[P.name,A]});return Object.fromEntries(a)}function k(a,e){return K.replace(K.replace(a,B=>`{${B.toLowerCase()}}`),Object.fromEntries(Object.entries(e).map(([B,
J])=>[B.toLowerCase(),J])))}function x(a){return 1E7<=a||-1E7>=a}function n(a,{validationErrors:e}){return null!=a.max&&null!=a.min?e.outsideRange:null!=a.max?e.outsideRangeMax:e.outsideRangeMin}const z=a=>"field"===a?.type,l=a=>"relationship"===a?.type,E=a=>a.reduce((e,B)=>"group"===B?.type?[...e,...B.inputs]:[...e,B],[]),u=(a,e)=>null!=a&&a.input?.type===e;b.LengthValidationError=void 0;(function(a){a.TOO_SHORT="length-validation-error::too-short";a.TOO_LONG="length-validation-error::too-long"})(b.LengthValidationError||
(b.LengthValidationError={}));const d={type:"number"},t={type:"number",intlOptions:{notation:"scientific"}};b.capabilitiesAllowEditType=(a,e)=>{if(!a)return!0;({operations:a}=a);switch(e){case "INSERT":return a.supportsAdd;case "UPDATE":case "DELETE":return a.supportsUpdate;default:return!0}};b.extractExpressionNameFromString=function(a){const [e,B]=a.split("expression/");return""===e&&B?B:(D.getLogger("esri.widgets.FeatureForm/featureFormUtils").error("extractExpressionNameFromString:invalid-input",
`The string ${a} is not a valid expression reference of the form '${"expression/"}/expressionName'`),"")};b.flattenFieldInputs=a=>E(a).filter(z);b.flattenInputs=E;b.flattenRelationshipInputs=a=>E(a).filter(l);b.formTemplateHasInvalidFields=function(a,e){return(e=e??("formTemplate"in a&&a.formTemplate))?(e.elements?.filter(L.isFieldElement)??[]).some(({fieldName:B})=>!a.fieldsIndex.get(B)):!1};b.getComputedAttributes=f;b.getErrorMessageForFieldInput=(a,e,B)=>{const {dataType:J,error:P,minLength:M,
value:A,required:w}=a,H=e?.validationErrors;if(!H||!P)return null;if(w&&null===A)return H.cannotBeNull;if(P===R.DomainValidationError.VALUE_OUT_OF_RANGE||P===I.NumericRangeValidationError.OUT_OF_RANGE){const {field:q,range:N}=a;a={type:"date",intlOptions:{timeZone:"date"===q.type&&B?B:void 0,...c.getIntlOptionsForField(q)}};e=n(N,e);return m.substitute(e,N,{format:{max:"date"===J?a:null!=N.max&&x(N.max)?t:d,min:"date"===J?a:null!=N.min&&x(N.min)?t:d}})}return P===R.DomainValidationError.INVALID_CODED_VALUE?
H.invalidCodedValue:P===I.TypeValidationError.INVALID_TYPE?H.invalidType:P===b.LengthValidationError.TOO_SHORT?m.substitute(H.tooShort,{min:M}):null};b.getFieldsInTitleAndDesc=a=>{const e=[];if(a.formTemplate){const {description:B,title:J}=a.formTemplate;a.fields?.forEach(P=>{const M=J&&K.templateHasKey(J,P.name),A=B&&K.templateHasKey(B,P.name);(M||A)&&e.push(P.name)})}return e};b.getIconForFeature=a=>{if(a){var e=a.layer;e=e&&"geometryType"in e?e.geometryType:void 0;a=a.geometry?.type;return"polyline"===
a||"polyline"===e?"line":"mesh"===a||"mesh"===e||"multipatch"===e?"cube":"multipoint"===a||"multipoint"===e?"point":a||e||"table"}};b.getNormalizedFeatureTypeInfo=a=>{const e={typeFieldName:null,types:[]};if(!a)return e;"subtype-sublayer"===a.type?(e.typeFieldName=a.parent?.subtypeField,e.types=a.parent?.subtypes??[]):"subtype-group"===a.type||"feature"===a.type&&a.subtypes?.length?(e.typeFieldName=a.subtypeField,e.types=a.subtypes??[]):"types"in a&&a.types&&(e.typeFieldName=a.typeIdField,e.types=
a.types.map(({id:B,name:J,domains:P})=>({code:B,name:J,domains:P})));null!=e.typeFieldName&&(e.typeFieldName=a.getField(e.typeFieldName)?.name??e.typeFieldName);return e};b.isExpressionReference=function(a){return a.startsWith("expression/")};b.isFieldElementWithInputType=u;b.isFieldElementWithShowNoValueOptionInput=a=>null!=a&&(u(a,"combo-box")||u(a,"radio-buttons"));b.isFieldElementWithTextInput=a=>null!=a&&(u(a,"text-box")||u(a,"text-area"));b.isFieldInput=z;b.isGroupInput=a=>"group"===a?.type;
b.isInputInGroupInput=a=>"group"!==a?.type&&null!=a.group;b.isLegacyFieldMapsExpressionReference=function(a){return a.startsWith("expr/")};b.isNumberFieldInput=({domain:a,inputType:e="text-box",dataType:B})=>"number"===B&&"text-box"===e&&(!a||"coded-value"!==a.type);b.isRelationshipInput=l;b.isTemplateItemGroup=a=>"items"in a;b.isTextElementInput=a=>"text"===a.type;b.parseFormTemplateString=function(a){const {attributes:e,fieldsIndex:B,label:J,timeZone:P}=a;if(!e||"object"!==typeof e)return J;var M=
Object.keys(e).filter(A=>K.templateHasKey(J,A));a=M.map(A=>e[A]);M=M.map(A=>B.get(A)).filter(g.isSome);return k(J,f({values:a,fields:M,timeZone:P}))};b.prependExpressionPrefix=function(a){return`${"expression/"}${a}`};b.prependFieldPrefix=function(a){return`${"field/"}${a}`};b.substituteFieldTemplatesInString=k;b.subtypeChangeShouldPrompt=function(a,e,B){if(!(a&&"subtypes"in a))return!1;const J=a.subtypes?.find(P=>P.code===B);if(!J)return!1;a=a.subtypes?.find(P=>P.code===e);return v.equalsShallow(J.defaultValues,
a?.defaultValues)?!1:Object.values(J.defaultValues).some(P=>null!=P)};b.valueIsInvalidSwitchValue=function(a,e){return null==a||e.onValue!==a&&e.offValue!==a};b.valueIsValidContingentValue=function(a,e){switch(e.objectType){case "any":return!0;case "null":return null==a;case "code":return a===e.codedValue?.code;case "range":return null!=a&&null!=e.minValue&&null!=e.maxValue&&+a>=e.minValue&&+a<=e.maxValue;default:return y.neverReached(e.objectType),!1}};Object.defineProperty(b,Symbol.toStringTag,
{value:"Module"})})},"esri/widgets/Feature/FeatureViewModel":function(){define("../../chunks/tslib.es6 ../../geometry ../../Graphic ../../arcade/featureset/support/FeatureSetQueryInterceptor ../../core/Accessor ../../core/arrayUtils ../../core/Identifiable ../../core/Logger ../../core/promiseUtils ../../core/reactiveUtils ../../core/throttle ../../core/accessorSupport/decorators/property ../../core/accessorSupport/decorators/cast ../../core/has ../../core/accessorSupport/decorators/subclass ../../popup/content/TextContent ../../time/timeZoneUtils ./FeatureAttachments/FeatureAttachmentsViewModel ./FeatureContent/FeatureContentViewModel ./FeatureExpression/FeatureExpressionViewModel ./FeatureFields/FeatureFieldsViewModel ./FeatureMedia/FeatureMediaViewModel ./FeatureRelationship/FeatureRelationshipViewModel ./support/arcadeFeatureUtils ./support/featureUtils ./support/relatedFeatureUtils ../../geometry/Point".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,l,E,u,d,t,a,e,B,J){var P;const M={attachmentsContent:!0,chartAnimation:!0,customContent:!0,expressionContent:!0,fieldsContent:!0,mediaContent:!0,textContent:!0,relationshipContent:!0};h=P=class extends K.IdentifiableMixin(v){constructor(A){super(A);this._featureAbortController=this._error=null;this._graphicChangedThrottled=F.throttle(this._graphicChanged,1,this);this._graphicExpressionAttributes=this._expressionAttributes=null;this.abilities={...M};this.content=
null;this.contentViewModels=[];this.description=null;this.defaultPopupTemplateEnabled=!1;this.location=this.lastEditInfo=this.formattedAttributes=null;this.relatedInfos=new Map;this.title="";this.view=null;this._isAllowedContentType=w=>{const {abilities:H}=this;return"attachments"===w.type&&!!H.attachmentsContent||"custom"===w.type&&!!H.customContent||"fields"===w.type&&!!H.fieldsContent||"media"===w.type&&!!H.mediaContent||"text"===w.type&&!!H.textContent||"expression"===w.type&&!!H.expressionContent||
"relationship"===w.type&&!!H.relationshipContent};this.addHandles(I.watch(()=>[this.graphic,this._effectivePopupTemplate,this.abilities,this.timeZone],()=>this._graphicChangedThrottled(),I.initial))}initialize(){this.addHandles(this._graphicChangedThrottled)}destroy(){this._clear();this._cancelFeatureQuery();this.graphic=this._error=null;this._destroyContentViewModels();this.relatedInfos.clear()}get _effectivePopupTemplate(){return null!=this.graphic?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):
null}get _fieldInfoMap(){return e.createFieldInfoMap(e.getAllFieldInfos(this._effectivePopupTemplate),this._sourceLayer)}get _sourceLayer(){return e.getSourceLayer(this.graphic)}castAbilities(A){return{...M,...A}}get isTable(){return this._sourceLayer?.isTable||!1}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}set graphic(A){this._set("graphic",A?.clone()??null)}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(A){this._override("spatialReference",
A)}get timeZone(){return this.view?.timeZone??n.system}set timeZone(A){this._overrideIfSome("timeZone",A)}get map(){return this.view?.map||null}set map(A){this._override("map",A)}get waitingForContent(){return!!this._featureAbortController}setActiveMedia(A,w){A=this.contentViewModels[A];A instanceof d&&A.setActiveMedia(w)}nextMedia(A){A=this.contentViewModels[A];A instanceof d&&A.next()}previousMedia(A){A=this.contentViewModels[A];A instanceof d&&A.previous()}async updateGeometry(){const {graphic:A,
spatialReference:w,_sourceLayer:H}=this;await H?.load();var q=H?.objectIdField;q&&A&&H&&(q=A?.attributes?.[q],null!=q&&(q=[q],!A.geometry&&(q=(await e.querySourceLayer({layer:H,graphic:A,outFields:[],objectIds:q,returnGeometry:!0,spatialReference:w}))?.geometry)))&&(A.geometry=q)}_clear(){this._set("title","");this._set("content",null);this._set("formattedAttributes",null)}async _graphicChanged(){this._cancelFeatureQuery();this._error=null;this._clear();const {graphic:A}=this;if(A){var w=new AbortController;
this._featureAbortController=w;try{await this._queryFeature({signal:w.signal})}catch(H){R.isAbortError(H)||(this._error=H,L.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:H,graphic:A,popupTemplate:this._effectivePopupTemplate}))}this._featureAbortController===w&&(this._featureAbortController=null)}}_cancelFeatureQuery(){const {_featureAbortController:A}=this;A&&A.abort();this._featureAbortController=null}_compileContentElement(A,w){if("attachments"===
A.type)return this._compileAttachments(A,w);if("custom"===A.type)return this._compileCustom(A,w);if("fields"===A.type)return this._compileFields(A,w);if("media"===A.type)return this._compileMedia(A,w);if("text"===A.type)return this._compileText(A,w);if("expression"===A.type)return this._compileExpression(A,w);if("relationship"===A.type)return this._compileRelationship(A,w)}_compileContent(A){this._destroyContentViewModels();if(this.graphic)return Array.isArray(A)?A.filter(this._isAllowedContentType).map((w,
H)=>this._compileContentElement(w,H)).filter(D.isSome):"string"===typeof A?this._compileText(new x({text:A}),0).text:A}_destroyContentViewModels(){this.removeHandles("relationship-view-models");this.removeHandles("content-view-models");this.contentViewModels.forEach(A=>A&&!A.destroyed&&A.destroy());this._set("contentViewModels",[])}_matchesFeature(A,w){A=A?.graphic?.getObjectId();w=w?.getObjectId();return null!=A&&null!=w&&A===w}_setRelatedFeaturesViewModels({relatedFeatureViewModels:A,relatedFeatures:w,
map:H}){const {view:q,spatialReference:N,timeZone:r}=this;w?.filter(Boolean).forEach(p=>{A.some(C=>this._matchesFeature(C,p))||A.add(new P({abilities:{relationshipContent:!1},map:H,view:q,spatialReference:N,timeZone:r,graphic:p}))});A.forEach(p=>{w?.find(C=>this._matchesFeature(p,C))||A.remove(p)})}_setExpressionContentVM(A,w){const H=this.formattedAttributes,{contentElement:q,contentElementViewModel:N}=A;A=q?.type;N&&A&&("fields"===A&&(this._createFieldsFormattedAttributes({contentElement:q,contentElementIndex:w,
formattedAttributes:H}),N.set(this._createFieldsVMParams(q,w))),"media"===A&&(this._createMediaFormattedAttributes({contentElement:q,contentElementIndex:w,formattedAttributes:H}),N.set(this._createMediaVMParams(q,w))),"text"===A&&N.set(this._createTextVMParams(q)))}_compileRelationship(A,w){const {displayCount:H,orderByFields:q,relationshipId:N,title:r,description:p}=A,{_sourceLayer:C,graphic:Q,map:T}=this;if(e.isRelatableFeatureSupportedLayer(C)){var V=new t({displayCount:H,graphic:Q,orderByFields:q,
relationshipId:N,layer:C,map:T,...this._compileTitleAndDesc({title:r,description:p})});this.contentViewModels[w]=V;this.addHandles(I.on(()=>V.relatedFeatures,"change",()=>this._setRelatedFeaturesViewModels(V)),"relationship-view-models");return A}}_compileExpression(A,w){const {expressionInfo:H}=A,{graphic:q,map:N,spatialReference:r,view:p,location:C}=this,Q=new E({expressionInfo:H,graphic:q,interceptor:P.interceptor,map:N,spatialReference:r,view:p,location:C});this.contentViewModels[w]=Q;this.addHandles(I.watch(()=>
Q.contentElementViewModel,()=>this._setExpressionContentVM(Q,w),I.initial),"content-view-models");return A}_compileAttachments(A,w){const {graphic:H}=this,{description:q,title:N}=A;this.contentViewModels[w]=new z({graphic:H,...this._compileTitleAndDesc({title:N,description:q})});return A}_compileCustom(A,w){const {graphic:H}=this,{creator:q,destroyer:N}=A;this.contentViewModels[w]=new l({graphic:H,creator:q,destroyer:N});return A}_compileTitleAndDesc({title:A,description:w}){const {_fieldInfoMap:H,
_sourceLayer:q,graphic:N,formattedAttributes:r}=this,p=N?.attributes,C=this._expressionAttributes,Q=r.global;return{title:e.substituteFieldsInLinksAndAttributes({attributes:p,fieldInfoMap:H,globalAttributes:Q,expressionAttributes:C,layer:q,text:A}),description:e.substituteFieldsInLinksAndAttributes({attributes:p,fieldInfoMap:H,globalAttributes:Q,expressionAttributes:C,layer:q,text:w})}}_createFieldsVMParams(A,w){const H=this._effectivePopupTemplate,q=this.formattedAttributes,N={...q?.global,...q?.content[w]};
w=(A?.fieldInfos||H?.fieldInfos)?.filter(({fieldName:C})=>!!C&&(e.isExpressionField(C)||e.isRelatedField(C)||N.hasOwnProperty(C)));const {description:r,title:p}=A;return{attributes:N,expressionInfos:H?.expressionInfos,fieldInfos:w,...this._compileTitleAndDesc({title:p,description:r})}}_compileFields(A,w){const H=A.clone();A=new u(this._createFieldsVMParams(A,w));this.contentViewModels[w]=A;H.fieldInfos=A.formattedFieldInfos.slice(0);return H}_createMediaVMParams(A,w){const {abilities:H,graphic:q,
_fieldInfoMap:N,_effectivePopupTemplate:r,relatedInfos:p,_sourceLayer:C,_expressionAttributes:Q}=this,T=this.formattedAttributes,V=q?.attributes??{},{description:aa,mediaInfos:ca,title:Z}=A;return{abilities:{chartAnimation:H.chartAnimation},activeMediaInfoIndex:A.activeMediaInfoIndex||0,attributes:V,isAggregate:q?.isAggregate,layer:C,fieldInfoMap:N,formattedAttributes:{...T?.global,...T?.content[w]},expressionAttributes:Q,mediaInfos:ca,popupTemplate:r,relatedInfos:p,...this._compileTitleAndDesc({title:Z,
description:aa})}}_compileMedia(A,w){const H=A.clone();A=new d(this._createMediaVMParams(A,w));H.mediaInfos=A.formattedMediaInfos.slice(0);this.contentViewModels[w]=A;return H}_createTextVMParams(A){const {graphic:w,_fieldInfoMap:H,_sourceLayer:q,_expressionAttributes:N}=this;A&&A.text&&(A.text=e.substituteFieldsInLinksAndAttributes({attributes:w?.attributes??{},fieldInfoMap:H,globalAttributes:this.formattedAttributes?.global??{},expressionAttributes:N,layer:q,text:A.text}));return{graphic:w,creator:A.text}}_compileText(A,
w){A=A.clone();this.contentViewModels[w]=new l(this._createTextVMParams(A));return A}_compileLastEditInfo(){const {_effectivePopupTemplate:A,_sourceLayer:w,graphic:H,timeZone:q}=this;if(A){var {lastEditInfoEnabled:N}=A,r=w?.editFieldsInfo;if(N&&r)return e.formatEditInfo(r,H?.attributes,q,w)}}_compileTitle(A){const {_fieldInfoMap:w,_sourceLayer:H,graphic:q,_expressionAttributes:N}=this;return e.substituteFieldsInLinksAndAttributes({attributes:q?.attributes??{},fieldInfoMap:w,globalAttributes:this.formattedAttributes?.global??
{},expressionAttributes:N,layer:H,text:A})}async _getTitle(){const {_effectivePopupTemplate:A,graphic:w}=this;return w?e.graphicCallback({type:"title",value:A?.title,event:{graphic:w}}):null}async _getContent(){const {_effectivePopupTemplate:A,graphic:w}=this;return w?e.graphicCallback({type:"content",value:A?.content,event:{graphic:w}}):null}async _queryFeature(A){const {_featureAbortController:w,_sourceLayer:H,graphic:q,_effectivePopupTemplate:N}=this,r=this.map,p=this.view,C=this.spatialReference,
Q=this.location;if(w===this._featureAbortController&&q){await e.queryUpdatedFeature({graphic:q,popupTemplate:N,layer:H,spatialReference:C},A);var {content:{value:T},title:{value:V}}=await R.eachAlways({content:this._getContent(),title:this._getTitle()});({expressionAttributes:{value:A}}=await R.eachAlways({checkForRelatedFeatures:this._checkForRelatedFeatures(A),expressionAttributes:a.createCompiledExpressions({expressionInfos:N?.expressionInfos,spatialReference:C,graphic:q,map:r,interceptor:P.interceptor,
view:p,options:A,location:Q})}));w===this._featureAbortController&&q&&(this._expressionAttributes=A,this._graphicExpressionAttributes={...q.attributes,...A},this._set("formattedAttributes",this._createFormattedAttributes(T)),this._set("title",this._compileTitle(V)),this._set("lastEditInfo",this._compileLastEditInfo()||null),this._set("content",this._compileContent(T)||null))}}_createMediaFormattedAttributes({contentElement:A,contentElementIndex:w,formattedAttributes:H}){const {_effectivePopupTemplate:q,
graphic:N,relatedInfos:r,_sourceLayer:p,_fieldInfoMap:C,_graphicExpressionAttributes:Q,timeZone:T}=this;H.content[w]=e.formatAttributes({fieldInfos:q?.fieldInfos,graphic:N,attributes:{...Q,...A.attributes},layer:p,fieldInfoMap:C,relatedInfos:r,timeZone:T})}_createFieldsFormattedAttributes({contentElement:A,contentElementIndex:w,formattedAttributes:H}){if(A.fieldInfos){const {graphic:q,relatedInfos:N,_sourceLayer:r,_fieldInfoMap:p,_graphicExpressionAttributes:C,timeZone:Q}=this;H.content[w]=e.formatAttributes({fieldInfos:A.fieldInfos,
graphic:q,attributes:{...C,...A.attributes},layer:r,fieldInfoMap:p,relatedInfos:N,timeZone:Q})}}_createFormattedAttributes(A){const {_effectivePopupTemplate:w,graphic:H,relatedInfos:q,_sourceLayer:N,_fieldInfoMap:r,_graphicExpressionAttributes:p,timeZone:C}=this,Q={global:e.formatAttributes({fieldInfos:w?.fieldInfos,graphic:H,attributes:p,layer:N,fieldInfoMap:r,relatedInfos:q,timeZone:C}),content:[]};Array.isArray(A)&&A.forEach((T,V)=>{"fields"===T.type&&this._createFieldsFormattedAttributes({contentElement:T,
contentElementIndex:V,formattedAttributes:Q});"media"===T.type&&this._createMediaFormattedAttributes({contentElement:T,contentElementIndex:V,formattedAttributes:Q})});return Q}_checkForRelatedFeatures(A){const {graphic:w,_effectivePopupTemplate:H}=this;return this._queryRelatedInfos(w,e.getAllFieldInfos(H),A)}async _queryRelatedInfos(A,w,H){const {relatedInfos:q,_sourceLayer:N}=this;q.clear();const r=null!=N?.associatedLayer?await N?.associatedLayer.load(H):N;if(r&&A&&w.filter(Q=>!!Q.fieldName&&e.isRelatedField(Q.fieldName))?.length){w.forEach(Q=>
this._configureRelatedInfo(Q,r));var p=await B.queryLayerInfos({relatedInfos:q,layer:r},H);Object.keys(p).forEach(Q=>{const T=q.get(Q.toString());Q=p[Q]?.value;T&&Q&&(T.layerInfo=Q.data)});var C=await B.queryRelatedFeatures({graphic:A,relatedInfos:q,layer:r},H);Object.keys(C).forEach(Q=>{B.setRelatedFeatures(C[Q]?.value,q.get(Q.toString()))})}}_configureRelatedInfo(A,w){const {relatedInfos:H}=this,q=B.getRelatedFieldInfo(A.fieldName||"");if(q){var {layerId:N,fieldName:r}=q;N&&(w=H.get(N.toString())||
B.createRelatedInfo(N,w))&&(B.updateRelatedInfo({relatedInfo:w,fieldName:r,fieldInfo:A}),this.relatedInfos.set(N,w))}}};h.interceptor=new y.FeatureSetQueryInterceptor(e.preLayerQueryCallback,e.preRequestCallback);b.__decorate([c.property()],h.prototype,"_error",void 0);b.__decorate([c.property()],h.prototype,"_featureAbortController",void 0);b.__decorate([c.property({readOnly:!0})],h.prototype,"_effectivePopupTemplate",null);b.__decorate([c.property({readOnly:!0})],h.prototype,"_fieldInfoMap",null);
b.__decorate([c.property({readOnly:!0})],h.prototype,"_sourceLayer",null);b.__decorate([c.property()],h.prototype,"abilities",void 0);b.__decorate([m.cast("abilities")],h.prototype,"castAbilities",null);b.__decorate([c.property({readOnly:!0})],h.prototype,"content",void 0);b.__decorate([c.property({readOnly:!0})],h.prototype,"contentViewModels",void 0);b.__decorate([c.property()],h.prototype,"description",void 0);b.__decorate([c.property({type:Boolean})],h.prototype,"defaultPopupTemplateEnabled",
void 0);b.__decorate([c.property({readOnly:!0})],h.prototype,"isTable",null);b.__decorate([c.property({readOnly:!0})],h.prototype,"state",null);b.__decorate([c.property({readOnly:!0})],h.prototype,"formattedAttributes",void 0);b.__decorate([c.property({type:g,value:null})],h.prototype,"graphic",null);b.__decorate([c.property({readOnly:!0})],h.prototype,"lastEditInfo",void 0);b.__decorate([c.property({type:J})],h.prototype,"location",void 0);b.__decorate([c.property({readOnly:!0})],h.prototype,"relatedInfos",
void 0);b.__decorate([c.property()],h.prototype,"spatialReference",null);b.__decorate([c.property()],h.prototype,"timeZone",null);b.__decorate([c.property({readOnly:!0})],h.prototype,"title",void 0);b.__decorate([c.property()],h.prototype,"map",null);b.__decorate([c.property({readOnly:!0})],h.prototype,"waitingForContent",null);b.__decorate([c.property()],h.prototype,"view",void 0);return h=P=b.__decorate([k.subclass("esri.widgets.Feature.FeatureViewModel")],h)})},"esri/arcade/featureset/support/FeatureSetQueryInterceptor":function(){define(["exports"],
function(b){class h{constructor(g,y){this.preLayerQueryCallback=g;this.preRequestCallback=y;this.preLayerQueryCallback||(this.preLayerQueryCallback=v=>{});this.preRequestCallback||(this.preLayerQueryCallback=v=>{})}}b.FeatureSetQueryInterceptor=h;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Feature/resources":function(){define(["exports"],function(b){b.css={base:"esri-feature",container:"esri-feature__size-container",title:"esri-feature__title",main:"esri-feature__main-container",
btn:"esri-feature__button",icon:"esri-feature__icon",content:"esri-feature__content",contentNode:"esri-feature__content-node",contentNodeText:"esri-feature__content-node--text",contentElement:"esri-feature__content-element",text:"esri-feature__text",lastEditedInfo:"esri-feature__last-edited-info",fields:"esri-feature__fields",fieldHeader:"esri-feature__field-header",fieldData:"esri-feature__field-data",fieldDataDate:"esri-feature__field-data--date",loadingSpinnerContainer:"esri-feature__loading-container"};
Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Feature/support/FeatureContentMixin":function(){define("exports ../../../chunks/tslib.es6 ../../../core/Logger ../../../core/has ../../../core/RandomLCG ../../../core/Error ../../../core/accessorSupport/decorators/subclass ../resources ../../support/widget ../../support/jsxFactory".split(" "),function(b,h,g,y,v,D,K,L,R,I){b.FeatureContentMixin=F=>{F=class extends F{constructor(){super(...arguments);this.renderNodeContent=
c=>R.isWidget(c)&&!c.destroyed?I.tsx("div",{class:L.css.contentNode,key:c},c.render()):c instanceof HTMLElement?I.tsx("div",{afterCreate:this._attachToNode,bind:c,class:L.css.contentNode,key:c}):R.hasDomNode(c)?I.tsx("div",{afterCreate:this._attachToNode,bind:c.domNode,class:L.css.contentNode,key:c}):null}_attachToNode(c){c.appendChild(this)}};return F=h.__decorate([K.subclass("esri.widgets.Feature.support.FeatureContentMixin")],F)};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},
"esri/widgets/Spinner":function(){define("../chunks/tslib.es6 ../core/promiseUtils ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ./Widget ./Spinner/SpinnerViewModel ./support/widgetUtils ./support/jsxFactory".split(" "),function(b,h,g,y,v,D,K,L,R,I,F,c){v=class extends R{constructor(m,f){super(m,f);this._animationDelay=500;this._animationPromise=null;this.viewModel=new I}initialize(){this.addHandles(g.watch(()=>
this.visible,m=>this._visibleChange(m)))}destroy(){this._animationPromise=null}get location(){return this.viewModel.location}set location(m){this.viewModel.location=m}get view(){return this.viewModel.view}set view(m){this.viewModel.view=m}get visible(){return this.viewModel.visible}set visible(m){this.viewModel.visible=m}show(m){const {location:f,promise:k}=m??{};f&&(this.viewModel.location=f);this.visible=!0;m=()=>this.hide();k&&k.catch(()=>{}).then(m)}hide(){this.visible=!1}render(){var {visible:m}=
this,{screenLocation:f}=this.viewModel;f=!!f;m={["esri-spinner--start"]:m&&f,["esri-spinner--finish"]:!m&&f};f=this._getPositionStyles();return c.tsx("div",{class:this.classes("esri-spinner",m),styles:f})}_visibleChange(m){if(m)this.viewModel.screenLocationEnabled=!0;else{var f=h.after(this._animationDelay);this._animationPromise=f;f.catch(()=>{}).then(()=>{this._animationPromise===f&&(this.viewModel.screenLocationEnabled=!1,this._animationPromise=null)})}}_getPositionStyles(){const {screenLocation:m,
view:f}=this.viewModel;if(null==f||null==m)return{};const {padding:k}=f;return{left:`${m.x-k.left}px`,top:`${m.y-k.top}px`}}};b.__decorate([y.property()],v.prototype,"location",null);b.__decorate([y.property()],v.prototype,"view",null);b.__decorate([y.property({type:I})],v.prototype,"viewModel",void 0);b.__decorate([y.property()],v.prototype,"visible",null);return v=b.__decorate([L.subclass("esri.widgets.Spinner")],v)})},"esri/widgets/Spinner/SpinnerViewModel":function(){define("../../chunks/tslib.es6 ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../support/AnchorElementViewModel".split(" "),
function(b,h,g,y,v,D,K){g=class extends K{constructor(L){super(L);this.visible=!1}};b.__decorate([h.property()],g.prototype,"visible",void 0);return g=b.__decorate([D.subclass("esri.widgets.Spinner.SpinnerViewModel")],g)})},"esri/widgets/support/AnchorElementViewModel":function(){define("../../chunks/tslib.es6 ../../core/Evented ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../geometry/projection".split(" "),
function(b,h,g,y,v,D,K,L,R){h=class extends h.EventedAccessor{constructor(I){super(I);this.location=null;this.screenLocationEnabled=!1;this.view=null;this.addHandles([g.when(()=>{const F=this.screenLocationEnabled?this.view:null;return F?[F.size,"3d"===F.type?F.camera:F.viewpoint]:null},()=>this.notifyChange("screenLocation")),g.watch(()=>this.screenLocation,(F,c)=>{null!=F&&null!=c&&this.emit("view-change")})])}destroy(){this.view=null}get screenLocation(){const {location:I,view:F,screenLocationEnabled:c}=
this;var m=F?.spatialReference;m=m?R.projectOrLoad(I,m).geometry:null;return c&&m&&F?.ready?F.toScreen(m):null}};b.__decorate([y.property()],h.prototype,"location",void 0);b.__decorate([y.property()],h.prototype,"screenLocation",null);b.__decorate([y.property()],h.prototype,"screenLocationEnabled",void 0);b.__decorate([y.property()],h.prototype,"view",void 0);return h=b.__decorate([L.subclass("esri.widgets.support.AnchorElementViewModel")],h)})},"esri/widgets/Features/css":function(){define(["exports"],
function(b){b.css={icon:"esri-features__icon",actionImage:"esri-features__action-image",base:"esri-features",container:"esri-features__container",contentContainer:"esri-features__content-container",contentFeature:"esri-features__content-feature",flowItemCollapsed:"esri-features__flow-item--collapsed",header:"esri-features__header",footer:"esri-features__footer",featureMenuObserver:"esri-features__feature-menu-observer",actionExit:"esri-features__action--exit",loader:"esri-features__loader",featuresHeading:"esri-features__heading",
paginationActionBar:"esri-features__pagination-action-bar",paginationPrevious:"esri-features__pagination-previous",paginationNext:"esri-features__pagination-next"};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Features/FeaturesRelatedRecords":function(){define("require ../../chunks/tslib.es6 ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../Widget ./css ../../chunks/componentsUtils ../support/widgetUtils ../support/decorators/messageBundle ../support/jsxFactory".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m){y=class extends L{constructor(f,k){super(f,k);this.messages=null;this.closed=!1;this.closable=!0;this._handleOpenRelatedFeature=x=>{this.emit("open-related-feature",{feature:x})}}loadDependencies(){return I.loadCalciteComponents({action:()=>new Promise((f,k)=>b(["../../chunks/calcite-action"],f,k)),"flow-item":()=>new Promise((f,k)=>b(["../../chunks/calcite-flow-item"],f,k))})}render(){var {flowItems:f}=this;f=f?.toArray();return m.tsx(m.tsxFragment,null,f?.map(k=>
this._renderRelatedRecordsFlowItem(k)))}_handleCloseClick(){this.emit("close")}_handleExitClick(){this.emit("exit")}_handleRelatedRecordsBackClick(){const f=this.flowItems?.pop();f&&("showAllEnabled"in f.viewModel&&(f.viewModel.showAllEnabled=!1),f&&(f.viewModel=null,f.destroy()))}_renderRelatedRecordsFlowItem(f){const {messages:k,closable:x,closed:n}=this,z="graphic"in f&&!f.isTable&&f.graphic?.geometry,l=k.exitRelatedRecords,E=k.selectFeature;return m.tsx("calcite-flow-item",{bind:this,closable:x,
closed:n,description:this._getRelatedRecordsFlowItemDescription(f),heading:f.title??"",key:`flow-item-${f.viewModel.uid}`,onCalciteFlowItemBack:u=>{u.preventDefault();this._handleRelatedRecordsBackClick()},onCalciteFlowItemClose:this._handleCloseClick},m.tsx("calcite-action",{appearance:"transparent",bind:this,class:R.css.actionExit,icon:"move-up",key:"exit-related-records-action",onclick:this._handleExitClick,slot:"header-actions-start",text:l,title:l}),z?m.tsx("calcite-action",{appearance:"transparent",
bind:this,icon:"zoom-to-object",key:"open-related-feature-action",onclick:()=>this._handleOpenRelatedFeature(f),slot:"header-actions-end",text:E,title:E}):null,m.tsx("div",{class:R.css.container},f.render()))}_getRelatedRecordsFlowItemDescription(f){return"featureCountDescription"in f?f.featureCountDescription:f.viewModel.description??""}};h.__decorate([g.property()],y.prototype,"flowItems",void 0);h.__decorate([g.property(),c.messageBundle("esri/widgets/Features/t9n/Features")],y.prototype,"messages",
void 0);h.__decorate([g.property()],y.prototype,"closed",void 0);h.__decorate([g.property()],y.prototype,"closable",void 0);return y=h.__decorate([K.subclass("esri.widgets.Features.FeaturesRelatedRecords")],y)})},"esri/widgets/Features/FeaturesViewModel":function(){define("require ../../chunks/tslib.es6 ../../geometry ../../Graphic ../../symbols ../../core/arrayUtils ../../core/Error ../../core/Logger ../../core/promiseUtils ../../core/ReactiveSet ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/accessorSupport/decorators/subclass ../../geometry/projection ../../geometry/support/geometryUtils ../../geometry/support/webMercatorUtils ../../layers/Layer ../../layers/LayerConstants ../../symbols/support/symbolUtils ../../time/timeZoneUtils ../../views/support/layerViewUtils ../Feature/FeatureViewModel ../Popup/actions ../Popup/actionUtils ../support/AnchorElementViewModel ../support/GoTo ../../symbols/SimpleFillSymbol ../../geometry/Point".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,l,E,u,d,t,a,e,B,J,P,M){let A=null;g=class extends J.GoToMixin(B){constructor(w){super(w);this._pendingPromises=new I;this._selectedClusterFeature=this._highlightActiveFeaturePromise=this._highlightSelectedFeaturePromise=this._fetchFeaturesController=null;this.actions=new a.ActionsCollection;this.activeFeature=null;this.browseClusterEnabled=this.autoCloseEnabled=!1;this.content=null;this.defaultPopupTemplateEnabled=!1;this.featurePage=null;this.featuresPerPage=
20;this.featureMenuOpen=!1;this.featureViewModelAbilities=null;this.featureViewModels=[];this.includeDefaultActions=this.highlightEnabled=!0;this.selectedClusterBoundaryFeature=new y({symbol:new P({outline:{width:1.5,color:"cyan"},style:"none"})});this.title=null;this.updateLocationEnabled=!1;this.view=null;this.visible=!1;this.zoomFactor=4;this.zoomToLocation=null;this._debouncedLocationUpdate=R.debounce(async H=>{const {spatialReference:q}=this,N=this.selectedFeature?.geometry?.type;H=this.location??
H;if(N&&"mesh"!==N&&q&&H&&this.selectedFeature)if("point"===N)this.location=x.getPointFromGeometry(this.selectedFeature.geometry)??H;else try{const r=this.selectedFeature;let p=r.geometry;const C=this._getHighlightLayer(r),Q=r.getObjectId();if(C&&this.view){if(Q){const T=this.view?.allLayerViews.find(ca=>ca.layer.uid===C.uid);if(!(T&&"queryFeatures"in T))return;const V=T.createQuery();V.outSpatialReference=q;V.objectIds=[Q];V.returnGeometry=!0;const {features:aa}=await T.queryFeatures(V);p=aa[0]?.geometry}if(p&&
"mesh"!==p.type&&(p=k.project(p,q),A||=await new Promise((T,V)=>b(["../../geometry/geometryEngineAsync"],T,V)),!await A.intersects(p,H))){const T=(await A.nearestCoordinate(p,H)).coordinate??H;this.selectedFeature===r&&(this.location=T)}}}catch(r){R.isAbortError(r)||L.getLogger(this).error(r)}})}initialize(){this.addHandles([this.on("view-change",()=>this._autoClose()),F.watch(()=>[this.highlightEnabled,this.selectedFeature,this.visible,this.view],()=>this._highlightSelectedFeature()),F.watch(()=>
[this.highlightEnabled,this.activeFeature,this.visible,this.view],()=>this._highlightActiveFeature()),F.watch(()=>this.view?.animation?.state,w=>this._animationStateChange(w)),F.watch(()=>this.location,w=>this._locationChange(w)),F.watch(()=>this.selectedFeature,w=>this._selectedFeatureChange(w)),F.watch(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),F.watch(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,
this.featureViewModels],()=>this._setGraphicOnFeatureViewModels()),F.watch(()=>this.featureViewModels,()=>this._featureViewModelsChange()),this.on("trigger-action",w=>e.triggerAction({event:w,viewModel:this,view:this.view})),F.when(()=>!this.waitingForResult,()=>this._waitingForResultChange(),F.sync),F.watch(()=>[this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureVMs()),F.watch(()=>this.view?.scale,()=>this._viewScaleChange()),F.when(()=>!this.visible,()=>this.browseClusterEnabled=
!1),F.watch(()=>this.browseClusterEnabled,w=>w?this.enableClusterBrowsing():this.disableClusterBrowsing())])}destroy(){this._cancelFetchingFeatures();this._pendingPromises.clear();this.browseClusterEnabled=!1;this.timeZone=this.spatialReference=this.map=this.view=null}get active(){return!(!this.visible||this.waitingForResult)}get allActions(){const w=this._get("allActions")||new a.ActionsCollection;w.removeAll();const {actions:H,defaultActions:q,defaultPopupTemplateEnabled:N,includeDefaultActions:r,
selectedFeature:p}=this,C=r?q.concat(H):H,Q=p&&("function"===typeof p.getEffectivePopupTemplate&&p.getEffectivePopupTemplate(N)||p.popupTemplate),T=Q?.actions;(Q?.overwriteActions?T:T?.concat(C)??C)?.filter(Boolean).forEach(V=>w.add(V));return w}get defaultActions(){const w=this._get("defaultActions")||new a.ActionsCollection;w.removeAll();w.addMany(e.isClusterFeature(this.selectedFeature)?[a.zoomToClusteredFeatures.clone(),a.browseClusteredFeatures.clone()]:[a.zoomToFeature.clone()]);return w}get featureCount(){return this.features.length}set features(w){w=
w||[];this._set("features",w);const {pendingPromisesCount:H,promiseCount:q,selectedFeatureIndex:N}=this,r=q&&w.length;r&&H&&-1===N?this.selectedFeatureIndex=0:r&&-1!==N||(this.selectedFeatureIndex=w.length?0:-1)}set location(w){let H=w;const q=this.spatialReference?.isWebMercator;w?.spatialReference?.isWGS84&&q&&(H=n.geographicToWebMercator(w));this._set("location",H)}get map(){return this.view?.map??null}set map(w){this._override("map",w)}get pendingPromisesCount(){return this._pendingPromises.size}get promiseCount(){return this.promises.length}get promises(){return this._get("promises")||
[]}set promises(w){this._pendingPromises.clear();this.features=[];Array.isArray(w)&&w.length?(this._set("promises",w),w=w.slice(0),w.forEach(H=>this._pendingPromises.add(H)),w.reduce((H,q)=>H.finally(()=>q.then(N=>{this._pendingPromises.has(q)&&this._updateFeatures(N)}).finally(()=>this._pendingPromises.delete(q)).catch(()=>{})),Promise.resolve())):this._set("promises",[])}get selectedFeature(){const {features:w,selectedFeatureIndex:H}=this;return-1===H?null:w[H]||null}get selectedFeatureIndex(){const w=
this._get("selectedFeatureIndex");return"number"===typeof w?w:-1}set selectedFeatureIndex(w){const {featureCount:H}=this;w=isNaN(w)||-1>w||!H?-1:(w+H)%H;this.activeFeature=null;this._set("selectedFeatureIndex",w)}get selectedFeatureViewModel(){return this.featureViewModels[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(w){this._override("spatialReference",w)}get state(){const {view:w,map:H}=this;return w?w.ready?"ready":"disabled":
H?"ready":"disabled"}get timeZone(){return this.view?.timeZone??u.system}set timeZone(w){this._overrideIfSome("timeZone",w)}get waitingForContents(){return this.featureViewModels.some(w=>w.waitingForContent)}get waitingForResult(){return!(!(this._fetchFeaturesController||0<this.pendingPromisesCount)||0!==this.featureCount)}centerAtLocation(){const {view:w}=this,H=e.getSelectedTarget(this);return H&&w?this.callGoTo({target:{target:H,scale:w.scale}}):Promise.reject(new K("center-at-location:invalid-target-or-view",
"Cannot center at a location without a target and view.",{target:H,view:w}))}zoomTo(w){return this.callGoTo(w)}clear(){this.set({promises:[],features:[],content:null,title:null,location:null,activeFeature:null})}fetchFeatures(w,H){const {view:q}=this;if(!q||!w)throw new K("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:w,view:q});return q.fetchPopupFeatures(w,{pointerType:H?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,
signal:H?.signal})}open(w){w={updateLocationEnabled:!1,promises:[],fetchFeatures:!1,...w,visible:!0};var {fetchFeatures:H}=w;delete w.fetchFeatures;H&&this._setFetchFeaturesPromises(w.location);H=["actionsMenuOpen","collapsed"];for(const q of H)delete w[q];this.set(w)}triggerAction(w){(w=this.allActions.at(w))&&!w.disabled&&this.emit("trigger-action",{action:w})}next(){this.selectedFeatureIndex++;return this}previous(){this.selectedFeatureIndex--;return this}disableClusterBrowsing(){e.removeClusteredFeaturesForBrowsing(this);
this._clearBrowsedClusterGraphics()}async enableClusterBrowsing(){const {view:w,selectedFeature:H}=this;"2d"!==w?.type?L.getLogger(this).warn("enableClusterBrowsing:invalid-view: View must be 2d MapView.",H):e.isClusterFeature(H)?(await e.displayClusterExtent(this),await e.browseAggregateFeatures(this)):L.getLogger(this).warn("enableClusterBrowsing:invalid-selectedFeature: Selected feature must represent an aggregate/cluster graphic.",H)}handleViewClick(w){this._fetchFeaturesAndOpen(w)}_animationStateChange(w){this.zoomToLocation||
(a.zoomToFeature.disabled="waiting-for-target"===w)}_clearBrowsedClusterGraphics(){const w=[this.selectedClusterBoundaryFeature,this._selectedClusterFeature].filter(D.isSome);this.view?.graphics?.removeMany(w);this._selectedClusterFeature=null;this.selectedClusterBoundaryFeature.geometry=null}_viewScaleChange(){e.isClusterFeature(this.selectedFeature)?(this.visible=this.browseClusterEnabled=!1,this.clear()):this.browseClusterEnabled&&(this.features=this.selectedFeature?[this.selectedFeature]:[])}_locationChange(w){const {selectedFeature:H,
updateLocationEnabled:q,view:N}=this;N&&q&&w&&(!H||H.geometry)&&this.centerAtLocation()}_selectedFeatureIndexChange(){this.featurePage=1<this.featureCount?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null}_featureViewModelsChange(){this.featurePage=1<this.featureCount?1:null}_setGraphicOnFeatureViewModels(){const {features:w,featureCount:H,featurePage:q,featuresPerPage:N,featureViewModels:r}=this;if(null!==q){var p=((q-1)*N+H)%H;r.slice(p,p+N).forEach((C,Q)=>{C&&(C.graphic??(C.graphic=
w[p+Q]))})}}async _selectedFeatureChange(w){const {location:H,updateLocationEnabled:q,view:N}=this;if(w&&N)if(this.browseClusterEnabled)this._selectedClusterFeature&&(N.graphics.remove(this._selectedClusterFeature),this._selectedClusterFeature=null),e.isClusterFeature(w)||(w.symbol=await E.getDisplayedSymbol(w),this._selectedClusterFeature=w,N.graphics.add(this._selectedClusterFeature));else{var r=w.sourceLayer?.type;if("map-image"===r||"imagery"===r||"imagery-tile"===r)w.symbol=await E.getDisplayedSymbol(w);
!q&&H||!w.geometry?q&&!w.geometry&&(await this.centerAtLocation(),w=N.center?.clone())&&(this.location=w):this.location=x.getPointFromGeometry(w.geometry)}}_waitingForResultChange(){!this.featureCount&&this.promises&&(this.visible=!1)}async _setFetchFeaturesPromises(w){({pendingFeatures:w}=await this._fetchFeaturesWithController({mapPoint:w}));this.promises=w}_destroyFeatureVMs(){this.featureViewModels.forEach(w=>w&&!w.destroyed&&w.destroy());this._set("featureViewModels",[])}_updateFeatureVMs(){const {selectedFeature:w,
features:H,featureViewModels:q,view:N,spatialReference:r,map:p,timeZone:C,location:Q}=this;e.isClusterFeature(w)||(this.browseClusterEnabled=!1);this._destroyFeatureVMs();if(H?.length){var T=q.slice(0),V=[];H.forEach((aa,ca)=>{if(aa){var Z=null;T.some((ea,Y)=>{ea&&ea.graphic===aa&&(Z=ea,T.splice(Y,1));return!!Z});if(Z)V[ca]=Z;else{const ea=new t({abilities:this.featureViewModelAbilities,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:r,graphic:aa===w?aa:null,location:Q,
map:p,view:N,timeZone:C});V[ca]=ea}}});T.forEach(aa=>aa&&!aa.destroyed&&aa.destroy());this._set("featureViewModels",V)}}async _getScreenPoint(w,H){const {spatialReference:q,view:N}=this;if(!N)return null;await N?.when();const r=w?.spatialReference;if(!r||!q)return null;await k.initializeProjection(r,q,null,H);return N.toScreen(w)}_cancelFetchingFeatures(){const w=this._fetchFeaturesController;w&&w.abort();this._fetchFeaturesController=null}async _projectScreenPointAndFetchFeatures({mapPoint:w,screenPoint:H,
event:q,signal:N}){return this.fetchFeatures(H??await this._getScreenPoint(w??this.location,{signal:N}),{signal:N,event:q})}_fetchFeaturesWithController({mapPoint:w,screenPoint:H,event:q}){this._cancelFetchingFeatures();const N=new AbortController,{signal:r}=N;this._fetchFeaturesController=N;w=this._projectScreenPointAndFetchFeatures({mapPoint:w,screenPoint:H,signal:r,event:q});w.catch(()=>{}).then(()=>{this._fetchFeaturesController=null});return w}async _fetchFeaturesAndOpen(w){const {mapPoint:H,
screenPoint:q}=w,{view:N}=this;this.removeHandles("location-scale-handle");this.addHandles([F.watch(()=>this.view?.scale,()=>this._debouncedLocationUpdate(H).catch(r=>{R.isAbortError(r)||L.getLogger(this).error(r)})),F.when(()=>!this.visible,()=>{this.removeHandles("location-scale-handle")},{once:!0})],"location-scale-handle");({pendingFeatures:w}=await this._fetchFeaturesWithController({mapPoint:H,screenPoint:q,event:w}));N?.popup&&"open"in N.popup&&N.popup.open({location:H??void 0,promises:w})}_autoClose(){this.autoCloseEnabled&&
(this.visible=!1)}async _getLayerView(w,H){await w.when();return w.whenLayerView(H)}_getHighlightLayer(w){const {layer:H,sourceLayer:q}=w;return q&&"layer"in q&&q.layer?q.layer:"map-notes"===q?.type||"subtype-group"===q?.type?q:H}_getHighlightTarget(w,H,q){var N=H.type;if("building-scene"===N||"2d"===q&&("map-image"===N||"tile"===N||"imagery"===N||"imagery-tile"===N))return w;q=w.getObjectId();if(null!=q)return q;H="imagery"===H.type?void 0:"objectIdField"in H?H.objectIdField||l.fallbackObjectIDAttribute:
null;return(q=w.attributes)&&H&&q[H]||w}_mapIncludesLayer(w){return!!this.map?.allLayers?.includes(w)}async _highlightActiveFeature(){this.removeHandles("highlight-active-feature");const {highlightEnabled:w,view:H,activeFeature:q,visible:N}=this;if(q&&H&&w&&N){var r=this._getHighlightLayer(q);if(r&&r instanceof z&&this._mapIncludesLayer(r)){var p=this._getLayerView(H,r);this._highlightActiveFeaturePromise=p;var C=await p;C&&d.highlightsSupported(C)&&this._highlightActiveFeaturePromise===p&&this.activeFeature&&
this.highlightEnabled&&(r=C.highlight(this._getHighlightTarget(q,r,H.type)),this.addHandles(r,"highlight-active-feature"))}}}async _highlightSelectedFeature(){this.removeHandles("highlight-selected-feature");const {selectedFeature:w,highlightEnabled:H,view:q,visible:N}=this;if(w&&q&&H&&N){var r=this._getHighlightLayer(w);if(r&&r instanceof z&&this._mapIncludesLayer(r)){var p=this._getLayerView(q,r);this._highlightSelectedFeaturePromise=p;var C=await p;C&&d.highlightsSupported(C)&&this._highlightSelectedFeaturePromise===
p&&this.selectedFeature&&this.highlightEnabled&&this.visible&&(r=C.highlight(this._getHighlightTarget(w,r,q.type)),this.addHandles(r,"highlight-selected-feature"))}}}_updateFeatures(w){const {features:H}=this;w=w.filter(q=>!H.includes(q));w?.length&&(this.features=H.concat(w))}};h.__decorate([c.property()],g.prototype,"_fetchFeaturesController",void 0);h.__decorate([c.property({type:a.ActionsCollection})],g.prototype,"actions",void 0);h.__decorate([c.property({readOnly:!0})],g.prototype,"active",
null);h.__decorate([c.property()],g.prototype,"activeFeature",void 0);h.__decorate([c.property({readOnly:!0})],g.prototype,"allActions",null);h.__decorate([c.property()],g.prototype,"autoCloseEnabled",void 0);h.__decorate([c.property()],g.prototype,"browseClusterEnabled",void 0);h.__decorate([c.property()],g.prototype,"content",void 0);h.__decorate([c.property({type:a.ActionsCollection,readOnly:!0})],g.prototype,"defaultActions",null);h.__decorate([c.property({type:Boolean})],g.prototype,"defaultPopupTemplateEnabled",
void 0);h.__decorate([c.property({readOnly:!0})],g.prototype,"featureCount",null);h.__decorate([c.property()],g.prototype,"featurePage",void 0);h.__decorate([c.property({value:[]})],g.prototype,"features",null);h.__decorate([c.property()],g.prototype,"featuresPerPage",void 0);h.__decorate([c.property()],g.prototype,"featureMenuOpen",void 0);h.__decorate([c.property()],g.prototype,"featureViewModelAbilities",void 0);h.__decorate([c.property({readOnly:!0})],g.prototype,"featureViewModels",void 0);h.__decorate([c.property()],
g.prototype,"highlightEnabled",void 0);h.__decorate([c.property()],g.prototype,"includeDefaultActions",void 0);h.__decorate([c.property({type:M})],g.prototype,"location",null);h.__decorate([c.property()],g.prototype,"map",null);h.__decorate([c.property({readOnly:!0})],g.prototype,"pendingPromisesCount",null);h.__decorate([c.property({readOnly:!0})],g.prototype,"promiseCount",null);h.__decorate([c.property()],g.prototype,"promises",null);h.__decorate([c.property({readOnly:!0})],g.prototype,"selectedClusterBoundaryFeature",
void 0);h.__decorate([c.property({value:null,readOnly:!0})],g.prototype,"selectedFeature",null);h.__decorate([c.property({value:-1})],g.prototype,"selectedFeatureIndex",null);h.__decorate([c.property({readOnly:!0})],g.prototype,"selectedFeatureViewModel",null);h.__decorate([c.property({readOnly:!0})],g.prototype,"state",null);h.__decorate([c.property()],g.prototype,"timeZone",null);h.__decorate([c.property()],g.prototype,"title",void 0);h.__decorate([c.property()],g.prototype,"updateLocationEnabled",
void 0);h.__decorate([c.property()],g.prototype,"view",void 0);h.__decorate([c.property()],g.prototype,"visible",void 0);h.__decorate([c.property({readOnly:!0})],g.prototype,"waitingForContents",null);h.__decorate([c.property({readOnly:!0})],g.prototype,"waitingForResult",null);h.__decorate([c.property()],g.prototype,"zoomFactor",void 0);h.__decorate([c.property()],g.prototype,"zoomToLocation",void 0);h.__decorate([c.property()],g.prototype,"centerAtLocation",null);return g=h.__decorate([f.subclass("esri.widgets.Features.FeaturesViewModel")],
g)})},"esri/core/ReactiveSet":function(){define(["./accessorSupport/tracking","./accessorSupport/tracking/SimpleObservable"],function(b,h){class g{constructor(y){this._observable=new h.SimpleObservable;this._set=new Set(y)}get size(){b.trackAccess(this._observable);return this._set.size}add(y){const v=this._set.size;this._set.add(y);this._set.size!==v&&this._observable.notify();return this}clear(){0<this._set.size&&(this._set.clear(),this._observable.notify())}delete(y){(y=this._set.delete(y))&&this._observable.notify();
return y}entries(){b.trackAccess(this._observable);return this._set.entries()}forEach(y,v){b.trackAccess(this._observable);this._set.forEach((D,K)=>y.call(v,D,K,this),v)}has(y){b.trackAccess(this._observable);return this._set.has(y)}keys(){b.trackAccess(this._observable);return this._set.keys()}values(){b.trackAccess(this._observable);return this._set.values()}[Symbol.iterator](){b.trackAccess(this._observable);return this._set[Symbol.iterator]()}get [Symbol.toStringTag](){return this._set[Symbol.toStringTag]}}
return g})},"esri/layers/LayerConstants":function(){define(["exports"],function(b){b.fallbackObjectIDAttribute="OBJECTID";Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/support/symbolUtils":function(){define("require exports ../../core/has ../../support/arcadeOnDemand ./gfxUtils ./previewUtils ./renderUtils ./utils ../../widgets/Legend/styles/support/relationshipUtils ../../widgets/Legend/support/relationshipRampUtils".split(" "),function(b,h,g,y,v,D,K,L,R,I){function F(n,
z){if(z&&(n.style.filter=L.getCSSFilterFromEffectList(z),z=z.effects))for(const l of z)if("drop-shadow"===l?.type){0>l.offsetX?n.style.marginLeft=`${Math.abs(l.offsetX)}px`:n.style.marginRight=`${l.offsetX}px`;break}}async function c(n,z){switch(n.type){case "web-style":var {previewWebStyleSymbol:l}=await new Promise((E,u)=>b(["./previewWebStyleSymbol"],E,u));return l(n,c,z);case "label-3d":case "line-3d":case "mesh-3d":case "point-3d":case "polygon-3d":return{previewSymbol3D:l}=await new Promise((E,
u)=>b(["./previewSymbol3D"],E,u)),l(n,z);case "simple-marker":case "simple-line":case "simple-fill":case "picture-marker":case "picture-fill":case "text":return{previewSymbol2D:l}=await new Promise((E,u)=>b(["./previewSymbol2D"],E,u)),l(n,z);case "cim":return{previewCIMSymbol:l}=await new Promise((E,u)=>b(["./previewCIMSymbol"],E,u)),l(n,z)}}function m(n){return n&&"opacity"in n?n.opacity*m(n.parent):1}function f(n){if(n)return"renderer"in n?n.renderer:void 0}let k=null;const x=[255,255,255];h.getDisplayedColor=
async function(n,z){if(n){var {layer:l,sourceLayer:E}=n,u=m(l??E);if(null!=n.symbol&&(null==z||!0!==z.ignoreGraphicSymbol))return n="web-style"===n.symbol.type?await L.fetchWebStyleSymbol(n.symbol,z):n.symbol.clone(),L.getColorFromSymbol(n,u);var d=z?.renderer??f(l)??f(E),t=d&&"getSymbolAsync"in d?await d.getSymbolAsync(n,z):void 0;if(t){t="web-style"===t.type?await L.fetchWebStyleSymbol(t,z):t.clone();t=L.getColorFromSymbol(t,u);if(!(d&&"visualVariables"in d)||"visualVariables"in d&&!d.visualVariables||
"visualVariables"in d&&!d.visualVariables?.length)return t;"arcadeRequiredForVisualVariables"in d&&d.arcadeRequiredForVisualVariables&&null==z?.arcade&&(z={...z},z.arcade=await y.loadArcade());var {getColor:a,getOpacity:e}=await new Promise((P,M)=>b(["../../renderers/visualVariables/support/visualVariableUtils"],P,M)),B=[],J=[];for(const P of d.visualVariables)switch(P.type){case "color":B.push(P);break;case "opacity":J.push(P)}d=(d=0<B.length?B[B.length-1]:null)?a(d,n,z):t;n=(t=0<J.length?J[J.length-
1]:null)?e(t,n,z):null;null!=u&&(n=null!=n?n*u:u);return d?L.applyOpacityToColor(d,n):null}}};h.getDisplayedSymbol=async function(n,z){if(n){var l=n.sourceLayer,E=(null!=z&&(z.useSourceLayer??!1)?l:n.layer)??l;l=m(E);if(null!=n.symbol&&(null==z||!0!==z.ignoreGraphicSymbol))return n="web-style"===n.symbol.type?await L.fetchWebStyleSymbol(n.symbol,{...z,cache:null!=z?z.webStyleCache:null}):n.symbol.clone(),L.applyColorToSymbol(n,null,l),n;var u=z?.renderer??f(E);if(E=u&&"getSymbolAsync"in u?await u.getSymbolAsync(n,
z):null){E="web-style"===E.type?await E.fetchSymbol({...z,cache:null!=z?z.webStyleCache:null}):E.clone();if(!(u&&"visualVariables"in u&&u.visualVariables?.length))return L.applyColorToSymbol(E,null,l),E;"arcadeRequiredForVisualVariables"in u&&u.arcadeRequiredForVisualVariables&&null==z?.arcade&&(z={...z},z.arcade=await y.loadArcade());var {getColor:d,getOpacity:t,getAllSizes:a,getRotationAngle:e}=await new Promise((w,H)=>b(["../../renderers/visualVariables/support/visualVariableUtils"],w,H)),B=[],
J=[],P=[],M=[];for(var A of u.visualVariables)switch(A.type){case "color":B.push(A);break;case "opacity":J.push(A);break;case "rotation":M.push(A);break;case "size":A.target||P.push(A)}A=(A=!!B.length&&B[B.length-1])?d(A,n,z):null;J=(J=!!J.length&&J[J.length-1])?t(J,n,z):null;null!=l&&(J=null!=J?J*l:l);L.applyColorToSymbol(E,A,J);P.length&&(l=a(P,n,z),await L.applySizesToSymbol(E,l));for(const w of M)L.applyRotationToSymbol(E,e(w,n,z),w.axis);return E}}};h.getLegendLabel=async function(n,z,l){if(n){var {layer:E,
sourceLayer:u}=n,d=l?.renderer??f(E)??f(u);if(!d)return null;if("visualVariables"in d&&d.visualVariables?.length){const {getRampStops:a}=await new Promise((P,M)=>b(["../../widgets/Legend/support/colorRampUtils"],P,M)),{getRampStops:e}=await new Promise((P,M)=>b(["../../widgets/Legend/support/sizeRampUtils"],P,M)),{getDateFormatOptions:B}=await new Promise((P,M)=>b(["../../widgets/Legend/support/utils"],P,M));let J=null;for(const P of d.visualVariables){var t=z?B(E,P,z.timeZone):null;let M=null;switch(P.type){case "color":M=
await a(P,null,t);break;case "opacity":M=await a(P);break;case "size":P.target||(M=await e(d,P,null,l?.scale||z?.scale,z,t))}if(M?.length&&(t=M.find((A,w)=>{const H=n.attributes[P.field];return 0===w?H>=A.value:w===M?.length-1?H<=A.value:A.value===H}))){J=t.label;break}}if(J)return J}switch(d.type){case "class-breaks":return z="getClassBreakInfo"in d?await d.getClassBreakInfo(n,l):null,z?.label??(z&&1<d.classBreakInfos?.length)?`${z.minValue} - ${z.maxValue}`:null;case "unique-value":return("getUniqueValueInfo"in
d?await d.getUniqueValueInfo(n,l):null)?.label}return null}};h.renderColorRampPreviewHTML=function(n,z={}){var l="horizontal"===z.align;const E=z.width??(l?75:24),u=z.height??(l?24:75);var d=z.gradient??!0,t=window.devicePixelRatio,a=E*t,e=u*t;t=document.createElement("canvas");t.width=a;t.height=e;t.ariaLabel=z.ariaLabel??null;t.style.width=`${E}px`;t.style.height=`${u}px`;const B=t.getContext("2d");var J=l?a:0;const P=l?0:e;if(d){const M=B.createLinearGradient(0,0,J,P);l=n.length;const A=1===l?
0:1/(l-1);n.forEach((w,H)=>M.addColorStop(H*A,w.toString()));B.fillStyle=M;B.fillRect(0,0,a,e)}else{a=l?a/n.length:a;e=l?e:e/n.length;J=d=0;for(const M of n)B.fillStyle=M.toString(),B.fillRect(d,J,a,e),d=l?d+a:0,J=l?0:J+e}n=document.createElement("div");n.style.width=`${E}px`;n.style.height=`${u}px`;F(n,z?.effectList);n.appendChild(t);return n};h.renderDotDensityPreviewHTML=function(n,z,l){const {backgroundColor:E,outline:u,dotSize:d}=n;var t=l?.swatchSize||D.SymbolSizeDefaults.size;const a=Math.round(t*
t/Math.max(d,.5)**2*.8),e=window.devicePixelRatio;n=document.createElement("canvas");const B=t*e;n.width=B;n.height=B;n.style.width=`${n.width/e}px`;n.style.height=`${n.height/e}px`;const J=n.getContext("2d");E&&(J.fillStyle=E.toCss(!0),J.fillRect(0,0,B,B),J.fill());J.fillStyle=z?.toCss(!0)??"";if(k&&k.length/2===a)for(z=0;z<2*a;z+=2)J.fillRect(k[z],k[z+1],d*e,d*e),J.fill();else for(k=[],z=0;z<2*a;z+=2){const P=Math.floor(Math.random()*(B-0+1)),M=Math.floor(Math.random()*(B-0+1));k.push(P,M);J.fillRect(P,
M,d*e,d*e);J.fill()}u&&(u.color&&(J.strokeStyle=u.color.toCss(!0)),J.lineWidth=u.width,J.strokeRect(0,0,B,B));t=new Image(t,t);t.src=n.toDataURL();t.ariaLabel=l?.ariaLabel??null;t.alt=l?.ariaLabel??"";return t};h.renderPieChartPreviewHTML=function(n,z={}){const l=z.radius||40;var E=2*Math.PI*l,u=n.length;const d=E/u,t=[],a=v.getStroke(z.outline);null!=a?.width&&(a.width*=2);(a||z.backgroundColor)&&t.push({shape:{type:"circle",cx:l,cy:l,r:l},fill:z.backgroundColor,stroke:a,offset:[0,0]});const e=z.values,
B=e&&e.length===u&&100===e.reduce((P,M)=>P+M,0),J=[0];for(let P=0;P<u;P++){let M=null;B&&(M=e[P]*E/100,J.push(M+J[P]));t.push({shape:{type:"circle",cx:l,cy:l,r:l/2},fill:[0,0,0,0],stroke:{width:l,dashArray:`${(M??d)/2} ${E}`,dashoffset:`-${B?J[P]/2:d/2*P}`,color:n[P]},offset:[0,0]})}u=null;n=2*l+(a?.width||0);if(E=z.holePercentage)a&&t.push({shape:{type:"circle",cx:l,cy:l,r:l*E},fill:null,stroke:a,offset:[0,0]}),u=n/2,u=[[{shape:{type:"circle",cx:u,cy:u,r:u},fill:x,stroke:a?{...a,color:x}:null,offset:[0,
0]},{shape:{type:"circle",cx:u,cy:u,r:l*E},fill:[0,0,0],stroke:null,offset:[0,0]}]];return K.renderSymbol([t],[n,n],{effectView:z.effectList,ignoreStrokeWidth:!0,masking:u,rotation:-90,ariaLabel:z.ariaLabel})};h.renderPreviewHTML=c;h.renderRelationshipRampPreviewHTML=function(n,z={}){const l=n?.authoringInfo;if("relationship"!==l?.type||!l?.numClasses||!n.uniqueValueInfos)return null;const {focus:E,numClasses:u}=l,d=I.getRelationshipRampElement({focus:E,numClasses:u,infos:n.uniqueValueInfos});n=z?.node||
document.createElement("div");K.renderOnce(n,()=>R.renderRelationshipRamp(d,z.id||"relationship",{opacity:z.opacity||1,effectList:z.effectList,ariaLabel:z.ariaLabel}));return n};Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/support/previewUtils":function(){define(["exports","../../Color"],function(b,h){function g(y,v){return Math.round(Math.min(Math.max(y+191.25*v,0),255))}b.SymbolSizeDefaults=void 0;(function(y){y[y.size=22]="size";y[y.lineWidth=50]="lineWidth";y[y.maxSize=
120]="maxSize";y[y.maxOutlineSize=80]="maxOutlineSize";y[y.tallSymbolWidth=20]="tallSymbolWidth"})(b.SymbolSizeDefaults||(b.SymbolSizeDefaults={}));b.adjustColorBrightness=function(y,v){if(null==y)return new h;if("type"in y&&("linear"===y.type||"pattern"===y.type))return y;y=new h(y);return new h([g(y.r,v),g(y.g,v),g(y.b,v),y.a])};b.adjustColorComponentBrightness=g;b.getConeShapes=function(y,v){let D=v?b.SymbolSizeDefaults.tallSymbolWidth:y;v=v?4:6;D=D<=b.SymbolSizeDefaults.size?D-.5*v:D-v;v=.15*
D;const K=D;y-=v;return[{type:"ellipse",cx:.5*D,cy:y,rx:.5*D,ry:v},{type:"path",path:[{command:"M",values:[.5*K,0]},{command:"L",values:[K,y]},{command:"L",values:[0,y]},{command:"Z",values:[]}]}]};b.getCubeShapes=function(y,v){let D=v?b.SymbolSizeDefaults.tallSymbolWidth:y;var K=v?4:6;K=D=D<=b.SymbolSizeDefaults.size?D-.5*K:D-K;v=v?.35*D:.5*D;return[{type:"path",path:[{command:"M",values:[.5*K,0]},{command:"L",values:[K,.5*v]},{command:"L",values:[.5*K,v]},{command:"L",values:[0,.5*v]},{command:"Z",
values:[]}]},{type:"path",path:[{command:"M",values:[0,.5*v]},{command:"L",values:[.5*K,v]},{command:"L",values:[.5*K,y]},{command:"L",values:[0,y-.5*v]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.5*K,v]},{command:"L",values:[.5*K,y]},{command:"L",values:[K,y-.5*v]},{command:"L",values:[K,.5*v]},{command:"Z",values:[]}]}]};b.getCylinderShapes=function(y,v){var D=v?b.SymbolSizeDefaults.tallSymbolWidth:y;v=v?4:6;D=D<=b.SymbolSizeDefaults.size?D-.5*v:D-v;v=.5*D;const K=.15*D;
y-=K;return[{type:"ellipse",cx:.5*D,cy:y,rx:v,ry:K},{type:"path",path:[{command:"M",values:[0,K]},{command:"L",values:[0,y]},{command:"L",values:[D,y]},{command:"L",values:[D,K]},{command:"Z",values:[]}]},{type:"ellipse",cx:.5*D,cy:K,rx:v,ry:K}]};b.getDiamondShapes=function(y){var v=y;v=v<b.SymbolSizeDefaults.size?v-2:v-4;const D=Math.floor(y/10)-1||1;return[{type:"path",path:[{command:"M",values:[.45*v,0]},{command:"L",values:[v,.5*y-D]},{command:"L",values:[.45*v-D,.5*y+D]},{command:"Z",values:[]}]},
{type:"path",path:[{command:"M",values:[.45*v,0]},{command:"L",values:[.45*v-D,.5*y+D]},{command:"L",values:[0,.5*y-D]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[0,.5*y-D]},{command:"L",values:[.45*v-D,.5*y+D]},{command:"L",values:[.45*v,y]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.45*v,y]},{command:"L",values:[v,.5*y-D]},{command:"L",values:[.45*v-D,.5*y+D]},{command:"Z",values:[]}]}]};b.getExtrudeSymbolShapes=function(y){const v=b.SymbolSizeDefaults.size;
y*=.5;return[{type:"path",path:[{command:"M",values:[0,.35*v]},{command:"L",values:[.3*v,.7*v]},{command:"L",values:[.3*v,.7*v+y]},{command:"L",values:[0,.7*v+y-.35*v]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.3*v,.7*v]},{command:"L",values:[.3*v,.7*v+y]},{command:"L",values:[v,y]},{command:"L",values:[v,0]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.3*v,0]},{command:"L",values:[v,0]},{command:"L",values:[.3*v,.7*v]},{command:"L",values:[0,.35*v]},
{command:"Z",values:[]}]}]};b.getInvertedConeShapes=function(y){let v=y;v=v<b.SymbolSizeDefaults.size?v-3:v-6;const D=.15*v,K=v;return[{type:"path",path:[{command:"M",values:[0,0]},{command:"L",values:[K,0]},{command:"L",values:[.5*K,y-D]},{command:"Z",values:[]}]},{type:"ellipse",cx:.5*v,cy:0,rx:.5*v,ry:D}]};b.getPathSymbolShapes=function(y,v,D){var K=b.SymbolSizeDefaults.size;let L=K,R=K;1>y?L*=.75:1<y&&(R*=1.25);y=K;v&&D&&(L=R=y=K=0);return[{type:"path",path:[{command:"M",values:[y,0]},{command:"L",
values:[D?y:.875*y,0]},{command:"L",values:[D?L-.5*y:0,R-.5*K]},{command:"L",values:[L-.5*y,R-.5*K]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[y,0]},{command:"L",values:[y,v?0:.125*K]},{command:"L",values:[L-.5*y,v?R-.5*K:K]},{command:"L",values:[L-.5*y,R-.5*K]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[L-.5*y,R-.5*K]},{command:"L",values:[D?L-.5*y:0,R-.5*K]},{command:"L",values:[D?L-.5*y:0,v?R-.5*K:K]},{command:"L",values:[L-.5*y,v?R-.5*K:K]},{command:"Z",
values:[]}]}]};b.getTetrahedronShapes=function(y){var v=y;v=v<b.SymbolSizeDefaults.size?v-1:v-2;return[{type:"path",path:[{command:"M",values:[.45*y,0]},{command:"L",values:[y,v]},{command:"L",values:[.45*y,.6*v]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[.45*y,0]},{command:"L",values:[.45*y,.6*v]},{command:"L",values:[0,v]},{command:"Z",values:[]}]},{type:"path",path:[{command:"M",values:[0,v]},{command:"L",values:[.45*y,.6*v]},{command:"L",values:[y,v]},{command:"Z",values:[]}]}]};
b.getWaterSymbolShapes=function(){return[{type:"path",path:"M80,80.2v-27c-1.5,0.7-2.8,1.6-3.9,2.8c-1.8,2.1-4.4,3.3-7.1,3.5c-2.7-0.1-5.3-1.4-7.1-3.4c-2.2-2.3-4.7-3.6-7.4-3.6s-5.1,1.3-7.3,3.6c-1.8,2.1-4.4,3.3-7.2,3.4c-2.7-0.1-5.3-1.4-7.1-3.4c-2.2-2.3-4.7-3.6-7.4-3.6s-5.1,1.3-7.4,3.6c-1.8,2.1-4.4,3.3-7.2,3.4C8.3,59.3,5.7,58,3.9,56c-1.1-1.2-2.4-2.1-3.9-2.8v27"},{type:"path",path:"M11,59.4c2.7-0.1,5.3-1.4,7.1-3.4c2.2-2.3,4.7-3.6,7.4-3.6s5.1,1.3,7.4,3.6c1.8,2,4.4,3.3,7.2,3.4c2.7-0.1,5.3-1.4,7.1-3.4c2.2-2.3,4.7-3.6,7.3-3.6s5.1,1.3,7.4,3.6c1.8,2.1,4.4,3.3,7.2,3.4c2.7-0.1,5.3-1.4,7.1-3.4c1.1-1.2,2.4-2.1,3.9-2.8v-24c-1.5,0.7-2.8,1.6-3.9,2.8c-1.8,2.1-4.4,3.3-7.1,3.5c-2.7-0.1-5.3-1.4-7.1-3.4c-2.2-2.3-4.7-3.6-7.4-3.6s-5.1,1.3-7.3,3.6c-1.8,2.1-4.4,3.3-7.2,3.4c-2.7-0.1-5.3-1.4-7.1-3.4c-2.2-2.3-4.7-3.6-7.4-3.6s-5.1,1.3-7.4,3.6c-1.8,2.1-4.4,3.3-7.2,3.4c-2.7-0.1-5.3-1.4-7.1-3.4c-1.1-1.2-2.4-2.1-3.9-2.8v24c1.5,0.7,2.8,1.6,3.9,2.8C5.7,58,8.3,59.3,11,59.4z"},
{type:"path",path:"M11,35.4c2.7-0.1,5.3-1.4,7.1-3.4c2.2-2.3,4.7-3.6,7.4-3.6s5.1,1.3,7.4,3.6c1.8,2,4.4,3.3,7.2,3.4c2.7-0.1,5.3-1.4,7.1-3.4c2.2-2.3,4.7-3.6,7.3-3.6s5.1,1.3,7.4,3.6c1.8,2.1,4.4,3.3,7.2,3.4c2.7-0.1,5.3-1.4,7.1-3.4c1.1-1.2,2.4-2.1,3.9-2.8V3.6c-1.5,0.7-2.8,1.6-3.9,2.8c-2.2,2.1-4.6,3.4-7.1,3.4s-5-1.3-7.1-3.4s-4.7-3.6-7.4-3.6s-5.1,1.3-7.3,3.6S42.5,9.9,40,9.9s-5-1.3-7.1-3.4s-4.7-3.6-7.4-3.6s-5.1,1.3-7.3,3.6c-1.8,2.1-4.4,3.3-7.2,3.4c-2.5,0-5-1.3-7.1-3.4C2.8,5.3,1.4,4.3,0,3.6v25.6c1.5,0.7,2.8,1.6,3.9,2.8C5.7,34.1,8.3,35.3,11,35.4z"}]};
b.shapes={fill:[{type:"path",path:"M -10,-10 L 10,0 L 10,10 L -10,10 L -10,-10 Z"}],squareFill:[{type:"path",path:"M -10,-10 L 10,-10 L 10,10 L -10,10 L -10,-10 Z"}],meshSymbol3DFill:[{type:"path",path:"M -10,-8 L 6,0 L 6,6 L -10,6 L -10,-8 Z"},{type:"path",path:"M -10,-8 L -7,-10 L 9,-2 L 6,0 L -10,-8 Z"},{type:"path",path:"M 6,0 L 9,-2 L 9,4 L 6,6 L 6,0 Z"}],pathSymbol3DLayer:[{type:"path",path:"M 3,12 L 12,0 L 11,-2 L -4,5 L -1,5 L 1,7 L 3,10 L 3,12 Z"},{type:"circle",cx:-2,cy:10,r:5}],extrudeSymbol3DLayer:[{type:"path",
path:"M -7,-5 L -2,0 L -2,7 L -7,3 L -7,-5 Z"},{type:"path",path:"M -2,0 L -2,7 L 10,-3 L 10,-10 L -2,0 Z"},{type:"path",path:"M -7,-5 L -2,0 L 10,-10 L -2,-10 L -7,-5 Z"}],cone:[{type:"path",path:"M 0,-10 L -8,5 L -4,6.5 L 0,7 L 4,6.5 L 8,5 Z"}],tallCone:[{type:"path",path:"M 0,-9 L -3.5,7 L -1.5,7.8 L 0,8 L 1.5,7.8 L 3.5,7 L 0,-9 Z"}],invertedCone:[{type:"path",path:"M 0,7 L -8,-8 L 8,-8 Z"},{type:"path",path:"M -8,-8 L -4,-9.5 L 0,-10 L 4,-9.5 L 8,-8 L 4,-6.5 L 0,-6 L -4,-6.5 Z"}],cube:[{type:"path",
path:"M -10,-7 L 0,-12 L 10,-7 L 0,-2 L -10,-7 Z"},{type:"path",path:"M -10,-7 L 0,-2 L 0,12 L -10,7 L -10,-7 Z"},{type:"path",path:"M 0,-2 L 10,-7 L 10,7 L 0,12 L 0,-2 Z"}],tallCube:[{type:"path",path:"M -3.5,-8.5 L 0,-9.5 L 3.5,-8.5 L 0,-7.5 L -3.5,-8.5 Z"},{type:"path",path:"M -3.5,-8.5 L 0,-7.5 L 0,9 L -3.5,8 L -3.5,-8.5 Z"},{type:"path",path:"M 0,-7.5 L 3.5,-8.5 L 3.5,8 L 0,9 L 0,-7.5 Z"}],cylinder:[{type:"path",path:"M -8,-9 L -8,7 L -4,8.5 L 0,9 L 4,8.5 L 8,7 L 8,-9 Z"},{type:"ellipse",cx:0,
cy:-9,rx:8,ry:2}],tallCylinder:[{type:"path",path:"M -3.5,-9 L -3.5,7 L -1.5,7.8 L 0,8 L 1.5,7.8 L 3.5,7 L 3.5,-9 Z"},{type:"ellipse",cx:0,cy:-9,rx:3.5,ry:1}],diamond:[{type:"path",path:"M 0,-10 L 10,-1 L -1,1 L 0,-10 Z"},{type:"path",path:"M 0,-10 L -1,1 L -8,-1 L 0,-10 Z"},{type:"path",path:"M -1,1 L 0,10 L -8,-1 L -1,1 Z"},{type:"path",path:"M -1,0 L 0,10 L 10,-1 L -1,1 Z"}],tetrahedron:[{type:"path",path:"M 0,-10 L 10,7 L 0,0 L 0,-10 Z"},{type:"path",path:"M 0,-10 L 0,0 L -8,7 L 0,-10 Z"},{type:"path",
path:"M 10,7 L 0,0 L -8,7 L 10,7 Z"}]};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/support/renderUtils":function(){define("exports ../../kernel ../../request ../../core/colorUtils ../../core/Error ../../core/has ../../libs/maquette/projection ../../libs/maquette/projector ./svgUtils ./utils".split(" "),function(b,h,g,y,v,D,K,L,R,I){function F(f,k){m.append(f,k);m.detach(k)}function c(f,k,x){return f?g(f,{responseType:"image"}).then(n=>{n=n.data;const z=n.width,l=
n.height,E=z/l;let u=k;x&&(u=Math.min(u,Math.max(z,l)));return{image:n,width:1>=E?Math.ceil(u*E):u,height:1>=E?u:Math.ceil(u/E)}}):Promise.reject(new v("renderUtils: imageDataSize","href not provided."))}const m=L.createProjector();b.renderOnce=F;b.renderSymbol=function(f,k,x){const n=Math.ceil(k[0]),z=Math.ceil(k[1]);if(!f.some(l=>!!l.length))return null;k=x?.node||document.createElement("div");null!=x.opacity&&(k.style.opacity=x.opacity.toString());null!=x.effectView&&(k.style.filter=I.getCSSFilterFromEffectList(x.effectView));
F(k,()=>R.renderSVG(f,n,z,x));return k};b.tintImageWithColor=function(f,k,x,n,z){return c(f,k,z).then(l=>{const E=l.width??k,u=l.height??k;var d;if(d=l.image)d=x&&"ignore"!==n?"multiply"===n&&255===x.r&&255===x.g&&255===x.b&&1===x.a?!1:!0:!1;if(d){var t=l.image.width,a=l.image.height;D("edge")&&/\.svg$/i.test(f)&&(--t,--a);d=Math.ceil(E);var e=Math.ceil(u);var B=document.createElement("canvas");B.width=d;B.height=e;B.style.width=d+"px";B.style.height=e+"px";B=B.getContext("2d");B.clearRect(0,0,d,
e);d=B;d.drawImage(l.image,0,0,t,a,0,0,E,u);e=d.getImageData(0,0,E,u);B=[x.r/255,x.g/255,x.b/255,x.a];const P=y.toHSV(x);for(let M=0;M<e.data.length;M+=4){l=e.data;t=M;a=B;var J=P;switch(n){case "multiply":l[t]*=a[0];l[t+1]*=a[1];l[t+2]*=a[2];l[t+3]*=a[3];break;default:const A=y.toHSV({r:l[t],g:l[t+1],b:l[t+2]});A.h=J.h;A.s=J.s;A.v=A.v/100*J.v;J=y.toRGB(A);l[t]=J.r;l[t+1]=J.g;l[t+2]=J.b;l[t+3]*=a[3]}}d.putImageData(e,0,0);f=d.canvas.toDataURL("image/png")}else d=h.id?.findCredential(f),d?.token&&
(l=f.includes("?")?"\x26":"?",f=`${f}${l}token=${d.token}`);return{url:f,width:E,height:u}}).catch(()=>({url:f,width:k,height:k}))};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/support/svgUtils":function(){define("exports ../../Color ../../core/has ../../core/maybe ../../core/libs/gl-matrix-2/factories/mat2df32 ../../core/libs/gl-matrix-2/math/mat2d ./gfxUtils ../../widgets/support/widgetUtils ../../widgets/support/jsxFactory".split(" "),function(b,h,g,y,v,D,K,L,R){function I(r,
p){r*=q/180;return Math.abs(p*Math.sin(r))+Math.abs(p*Math.cos(r))}function F(r){return r.map(p=>`${p.command} ${p.values.join(" ")}`).join(" ").trim()}function c(r,p,C,Q,T){if(r){if("circle"===r.type)return R.tsx("circle",{cx:r.cx,cy:r.cy,fill:p,"fill-rule":"evenodd",r:r.r,stroke:C.color,"stroke-dasharray":C.dashArray,"stroke-dashoffset":C.dashOffset,"stroke-linecap":C.cap,"stroke-linejoin":C.join,"stroke-miterlimit":"4","stroke-width":C.width});if("ellipse"===r.type)return R.tsx("ellipse",{cx:r.cx,
cy:r.cy,fill:p,"fill-rule":"evenodd",rx:r.rx,ry:r.ry,stroke:C.color,"stroke-dasharray":C.dashArray,"stroke-linecap":C.cap,"stroke-linejoin":C.join,"stroke-miterlimit":"4","stroke-width":C.width});if("rect"===r.type)return R.tsx("rect",{fill:p,"fill-rule":"evenodd",height:r.height,stroke:C.color,"stroke-dasharray":C.dashArray,"stroke-linecap":C.cap,"stroke-linejoin":C.join,"stroke-miterlimit":"4","stroke-width":C.width,width:r.width,x:r.x,y:r.y});if("image"===r.type)return R.tsx("image",{alt:T||"image",
height:r.height,href:r.src,preserveAspectRatio:"none",width:r.width,x:r.x,y:r.y});if("path"===r.type)return r="string"!==typeof r.path?F(r.path):r.path,R.tsx("path",{d:r,fill:p,"fill-rule":"evenodd",stroke:C.color,"stroke-dasharray":C.dashArray,"stroke-linecap":C.cap,"stroke-linejoin":C.join,"stroke-miterlimit":"4","stroke-width":C.width});if("text"===r.type)return y.assertIsSome(Q),R.tsx("text",{"dominant-baseline":Q.dominantBaseline,fill:p,"fill-rule":"evenodd","font-family":Q.font.family,"font-size":Q.font.size,
"font-style":Q.font.style,"font-variant":Q.font.variant,"font-weight":Q.font.weight,kerning:Q.kerning,rotate:Q.rotate,stroke:C.color,"stroke-dasharray":C.dashArray,"stroke-linecap":C.cap,"stroke-linejoin":C.join,"stroke-miterlimit":"4","stroke-width":C.width,"text-anchor":Q.align,"text-decoration":Q.decoration,"text-rendering":P,x:r.x,y:r.y},r.text)}return null}function m(r){const p={fill:"none",pattern:null,linearGradient:null};if(r)if("type"in r&&"pattern"===r.type){var C=`patternId-${++B}`;p.fill=
`url(#${C})`;p.pattern={id:C,x:r.x,y:r.y,width:r.width,height:r.height,image:{x:0,y:0,width:r.width,height:r.height,href:r.src}}}else"type"in r&&"linear"===r.type?(C=`linearGradientId-${++J}`,p.fill=`url(#${C})`,p.linearGradient={id:C,x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,stops:r.colors.map(Q=>({offset:Q.offset,color:Q.color&&(new h(Q.color)).toString()}))}):r&&(r=new h(r),p.fill=r.toString());return p}function f(r){const p={color:"none",width:1,cap:"butt",join:"4",dashArray:"none",dashOffset:"0"};r&&(null!=
r.width&&(p.width=r.width),r.cap&&(p.cap=r.cap),r.join&&(p.join=r.join.toString()),r.color&&(p.color=(new h(r.color)).toString()),r.dashArray&&(p.dashArray=r.dashArray),r.dashoffset&&(p.dashOffset=r.dashoffset),r.style&&!r.dashArray&&(p.dashArray=K.getDashArray(r).join(",")||"none"));return p}function k(r,p){const C={align:null,decoration:null,kerning:null,rotate:null,font:{style:null,variant:null,weight:null,size:null,family:null}};if(r){const Q=r.alignBaseline;C.align=r.align;C.dominantBaseline=
"baseline"===Q?"auto":"top"===Q?"text-top":"bottom"===Q?"hanging":Q;C.decoration=r.decoration;C.kerning=r.kerning?"auto":"0";C.rotate=r.rotated?"90":"0";y.assertIsSome(p);C.font.style=p.style||"normal";C.font.variant=p.variant||"normal";C.font.weight=p.weight||"normal";C.font.size=p.size&&p.size.toString()||"10pt";C.font.family=p.family||"serif"}return C}function x(r){const {pattern:p,linearGradient:C}=r;return p?R.tsx("pattern",{height:p.height,id:p.id,patternUnits:"userSpaceOnUse",width:p.width,
x:p.x,y:p.y},R.tsx("image",{height:p.image.height,href:p.image.href,width:p.image.width,x:p.image.x,y:p.image.y})):C?(r=C.stops.map((Q,T)=>R.tsx("stop",{key:`${T}-stop`,offset:Q.offset,"stop-color":Q.color})),R.tsx("linearGradient",{gradientUnits:"userSpaceOnUse",id:C.id,x1:C.x1,x2:C.x2,y1:C.y1,y2:C.y2},r)):null}function n(r,p){if(!r||0===r.length)return null;const C=[];for(const Q of r){const {shape:T,fill:V,stroke:aa,font:ca}=Q;r=m(V);const Z=f(aa),ea="text"===T.type?k(T,ca):null;(r=c(T,r.fill,
Z,ea))&&C.push(r)}return R.tsx("mask",{id:p,maskUnits:"userSpaceOnUse"},R.tsx("g",null,C))}function z(r,p,C,Q,T){D.scale(r,D.identity(r),[p,C]);r[4]=r[4]*p-Q*p+Q;r[5]=r[5]*C-T*C+T;return r}function l(r,p){if(w&&"left"in w){null!=w.left&&w.left>r&&(w.left=r);if(null==w.right||w.right<r)w.right=r;if(null==w.top||w.top>p)w.top=p;if(null==w.bottom||w.bottom<p)w.bottom=p}else w={left:r,bottom:p,right:r,top:p}}function E(r){const p=r.args,C=p.length;switch(r.action){case "M":case "L":case "C":case "S":case "Q":case "T":for(r=
0;r<C;r+=2)l(p[r],p[r+1]);H.x=p[C-2];H.y=p[C-1];break;case "H":for(r=0;r<C;++r)l(p[r],H.y);H.x=p[C-1];break;case "V":for(r=0;r<C;++r)l(H.x,p[r]);H.y=p[C-1];break;case "m":r=0;"x"in H||(l(H.x=p[0],H.y=p[1]),r=2);for(;r<C;r+=2)l(H.x+=p[r],H.y+=p[r+1]);break;case "l":case "t":for(r=0;r<C;r+=2)l(H.x+=p[r],H.y+=p[r+1]);break;case "h":for(r=0;r<C;++r)l(H.x+=p[r],H.y);break;case "v":for(r=0;r<C;++r)l(H.x,H.y+=p[r]);break;case "c":for(r=0;r<C;r+=6)l(H.x+p[r],H.y+p[r+1]),l(H.x+p[r+2],H.y+p[r+3]),l(H.x+=p[r+
4],H.y+=p[r+5]);break;case "s":case "q":for(r=0;r<C;r+=4)l(H.x+p[r],H.y+p[r+1]),l(H.x+=p[r+2],H.y+=p[r+3]);break;case "A":for(r=0;r<C;r+=7)l(p[r+5],p[r+6]);H.x=p[C-2];H.y=p[C-1];break;case "a":for(r=0;r<C;r+=7)l(H.x+=p[r+5],H.y+=p[r+6])}}function u(r,p,C){const Q=M[r.toLowerCase()];"number"===typeof Q&&(Q?p.length>=Q&&(r={action:r,args:p.slice(0,p.length-p.length%Q)},C.push(r),E(r)):(r={action:r,args:[]},C.push(r),E(r)))}function d(r){const p={x:0,y:0,width:0,height:0};if("circle"===r.type)p.x=r.cx-
r.r,p.y=r.cy-r.r,p.width=2*r.r,p.height=2*r.r;else if("ellipse"===r.type)p.x=r.cx-r.rx,p.y=r.cy-r.ry,p.width=2*r.rx,p.height=2*r.ry;else if("image"===r.type||"rect"===r.type)p.x=r.x,p.y=r.y,p.width=r.width,p.height=r.height;else if("path"===r.type){{const T=("string"!==typeof r.path?F(r.path):r.path).match(A),V=[];w={};H={};if(T){r="";var C=[],Q=T.length;for(let aa=0;aa<Q;++aa){const ca=T[aa],Z=parseFloat(ca);isNaN(Z)?(r&&u(r,C,V),C=[],r=ca):C.push(Z)}u(r,C,V);r={x:0,y:0,width:0,height:0};w&&"left"in
w&&(r.x=w.left,r.y=w.top,r.width=w.right-w.left,r.height=w.bottom-w.top)}else r=null}p.x=r.x;p.y=r.y;p.width=r.width;p.height=r.height}return p}function t(r){const p={x:0,y:0,width:0,height:0};let C=null,Q=Number.NEGATIVE_INFINITY,T=Number.NEGATIVE_INFINITY;for(const V of r)C?(C.x=Math.min(C.x,V.x),C.y=Math.min(C.y,V.y),Q=Math.max(Q,V.x+V.width),T=Math.max(T,V.y+V.height)):(C=p,C.x=V.x,C.y=V.y,Q=V.x+V.width,T=V.y+V.height);C&&(C.width=Q-C.x,C.height=T-C.y);return C}function a(r,p,C,Q,T,V,aa,ca,Z){var ea=
(aa&&V?I(V,p):p)/2,Y=(aa&&V?I(V,C):C)/2;if(Z){var ba=Z[0];Z=Z[1];ea=(aa&&V?I(V,ba):ba)/2;Y=(aa&&V?I(V,Z):Z)/2}ba=r.width+Q;var da=r.height+Q;Z=v.create();aa=v.create();var G=!1;if(T&&0!==ba&&0!==da){T=p!==C?p/C:ba/da;G=p>C?p:C;let O=1,S=1;isNaN(G)||(1<T?(O=G/ba,S=G/T/da):(S=G/da,O=G*T/ba));D.multiply(aa,aa,z(Z,O,S,ea,Y));G=!0}T=r.x+(ba-Q)/2;r=r.y+(da-Q)/2;Q=D.multiply;ea-=T;Y-=r;ea=D.translate(Z,D.identity(Z),[ea,Y]);Q.call(D,aa,aa,ea);!G&&(ba>p||da>C)&&(ea=ba/p>da/C,p=(ea?p:C)/(ea?ba:da),D.multiply(aa,
aa,z(Z,p,p,T,r)));V&&(p=D.multiply,C=V%360*Math.PI/180,D.rotate(Z,D.identity(Z),C),V=Math.cos(C),C=Math.sin(C),ba=Z[4],da=Z[5],Z[4]=ba*V-da*C+r*C-T*V+T,Z[5]=da*V+ba*C-T*C-r*V+r,p.call(D,aa,aa,Z));ca&&(V=D.multiply,p=ca[0],ca=ca[1],ca=D.translate(Z,D.identity(Z),[p,ca]),V.call(D,aa,aa,ca));return`matrix(${aa[0]},${aa[1]},${aa[2]},${aa[3]},${aa[4]},${aa[5]})`}function e(r,p,C){r=r?.effects.find(ca=>"bloom"===ca.type);if(!r)return null;const {strength:Q,radius:T}=r;r=0<Q?T:0;const V=(Q+r)*p,aa=4*Q+1;
return R.tsx("filter",{filterUnits:"userSpaceOnUse",height:"300%",id:`bloom${C}`,width:"300%",x:"-100%",y:"-100%"},R.tsx("feMorphology",{in:"SourceGraphic",operator:"dilate",radius:(Q+.5*r)*5**(p/100)*(.4+p/100),result:"dilate"}),R.tsx("feGaussianBlur",{in:"dilate",result:"blur",stdDeviation:V/25}),R.tsx("feGaussianBlur",{in:"blur",result:"intensityBlur",stdDeviation:V/50}),R.tsx("feComponentTransfer",{in:"SourceGraphic",result:"intensityBrightness"},R.tsx("feFuncR",{slope:aa,type:"linear"}),R.tsx("feFuncG",
{slope:aa,type:"linear"}),R.tsx("feFuncB",{slope:aa,type:"linear"})),R.tsx("feMerge",null,R.tsx("feMergeNode",{in:"intensityBlur"}),R.tsx("feMergeNode",{in:"intensityBrightness"}),R.tsx("feGaussianBlur",{stdDeviation:Q/10})))}let B=0,J=0;L=g("android");const P=g("chrome")||L&&4<=L?"auto":"optimizeLegibility",M={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},A=/([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g;let w={},H={};const q=Math.PI;let N=1;b.computeBBox=t;b.generateFillAttributes=m;b.generateStrokeAttributes=
f;b.generateTextAttributes=k;b.getBoundingBox=d;b.getTransformMatrix=a;b.renderDef=x;b.renderSVG=function(r,p,C,Q={}){const T=[],V=[],aa=++N,ca=e(Q.effectView,p,aa);var Z=null;ca&&(Z=Q.effectView?.effects.find(G=>"bloom"===G.type),Z=(Z.strength?Z.strength+Z.radius/2:0)/3,Z=[Math.max(p+p*Z,10),Math.max(C+C*Z,10)]);for(let G=0;G<r.length;G++){var ea=r[G];const O=[];var Y=[],ba=0,da=0;let S=0;for(const U of ea){const {shape:W,fill:X,stroke:fa,font:ha,offset:ia}=U;Q.ignoreStrokeWidth||"text"===W.type||
(ba+=fa?.width||0);ea=m(X);const ja=f(fa),ka="text"===W.type?k(W,ha):null;T.push(x(ea));O.push(c(W,ea.fill,ja,ka,Q.ariaLabel));Y.push(d(W));ia&&(da+=ia[0],S+=ia[1])}Y=t(Y);ba=a(Y,p,C,ba,Q.scale??!1,Q.rotation,Q.useRotationSize??!1,[da,S],Z);da=null;Q.masking&&(da=`mask-${G}`,T.push(n(Q.masking[G],da)),da=`url(#${da})`);V.push(da?R.tsx("g",{mask:da},R.tsx("g",{transform:ba},O)):R.tsx("g",{transform:ba},O))}Q.useRotationSize&&Q.rotation&&(p=I(Q.rotation,p),C=I(Q.rotation,C));ca&&(y.assertIsSome(Z),
p=Z[0],C=Z[1]);return R.tsx("svg",{"aria-label":Q.ariaLabel,focusable:!1,height:C,role:"img",style:"display: block;",width:p,xmlns:"http://www.w3.org/2000/svg"},ca,R.tsx("defs",null,T),ca?R.tsx("g",{filter:`url(#bloom${aa})`},V):V)};b.renderShape=c;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/factories/mat2df32":function(){define(["exports"],function(b){function h(){const R=new Float32Array(6);R[0]=1;R[3]=1;return R}function g(R){const I=new Float32Array(6);
I[0]=R[0];I[1]=R[1];I[2]=R[2];I[3]=R[3];I[4]=R[4];I[5]=R[5];return I}function y(R,I,F,c,m,f){const k=new Float32Array(6);k[0]=R;k[1]=I;k[2]=F;k[3]=c;k[4]=m;k[5]=f;return k}function v(R,I){return new Float32Array(R,I,6)}function D(R,I,F,c){const m=I[c];I=I[c+1];R[c]=F[0]*m+F[2]*I+F[4];R[c+1]=F[1]*m+F[3]*I+F[5]}function K(R,I,F,c=0,m=0,f=2){for(m=m||I.length/f;c<m;c++)D(R,I,F,c*f)}const L=Object.freeze(Object.defineProperty({__proto__:null,clone:g,create:h,createView:v,fromValues:y,transform:D,transformMany:K},
Symbol.toStringTag,{value:"Module"}));b.clone=g;b.create=h;b.createView=v;b.fromValues=y;b.mat2df32=L;b.transform=D;b.transformMany=K;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/core/libs/gl-matrix-2/math/mat2d":function(){define(["exports","./common"],function(b,h){function g(a,e){a[0]=e[0];a[1]=e[1];a[2]=e[2];a[3]=e[3];a[4]=e[4];a[5]=e[5];return a}function y(a){a[0]=1;a[1]=0;a[2]=0;a[3]=1;a[4]=0;a[5]=0;return a}function v(a,e,B,J,P,M,A){a[0]=e;a[1]=B;a[2]=J;a[3]=P;a[4]=
M;a[5]=A;return a}function D(a,e){const B=e[0],J=e[1],P=e[2],M=e[3],A=e[4];e=e[5];let w=B*M-J*P;if(!w)return null;w=1/w;a[0]=M*w;a[1]=-J*w;a[2]=-P*w;a[3]=B*w;a[4]=(P*e-M*A)*w;a[5]=(J*A-B*e)*w;return a}function K(a){return a[0]*a[3]-a[1]*a[2]}function L(a,e,B){const J=e[0],P=e[1],M=e[2],A=e[3],w=e[4];e=e[5];const H=B[0],q=B[1],N=B[2],r=B[3],p=B[4];B=B[5];a[0]=J*H+M*q;a[1]=P*H+A*q;a[2]=J*N+M*r;a[3]=P*N+A*r;a[4]=J*p+M*B+w;a[5]=P*p+A*B+e;return a}function R(a,e,B){const J=e[0],P=e[1],M=e[2],A=e[3],w=
e[4];e=e[5];const H=Math.sin(B);B=Math.cos(B);a[0]=J*B+M*H;a[1]=P*B+A*H;a[2]=J*-H+M*B;a[3]=P*-H+A*B;a[4]=w;a[5]=e;return a}function I(a,e,B){const J=e[1],P=e[2],M=e[3],A=e[4],w=e[5],H=B[0];B=B[1];a[0]=e[0]*H;a[1]=J*H;a[2]=P*B;a[3]=M*B;a[4]=A;a[5]=w;return a}function F(a,e,B){const J=e[0],P=e[1],M=e[2],A=e[3],w=e[4];e=e[5];const H=B[0];B=B[1];a[0]=J;a[1]=P;a[2]=M;a[3]=A;a[4]=J*H+M*B+w;a[5]=P*H+A*B+e;return a}function c(a,e){const B=Math.sin(e);e=Math.cos(e);a[0]=e;a[1]=B;a[2]=-B;a[3]=e;a[4]=0;a[5]=
0;return a}function m(a,e){a[0]=e[0];a[1]=0;a[2]=0;a[3]=e[1];a[4]=0;a[5]=0;return a}function f(a,e){a[0]=1;a[1]=0;a[2]=0;a[3]=1;a[4]=e[0];a[5]=e[1];return a}function k(a){return"mat2d("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}function x(a){return Math.sqrt(a[0]**2+a[1]**2+a[2]**2+a[3]**2+a[4]**2+a[5]**2+1)}function n(a,e,B){a[0]=e[0]+B[0];a[1]=e[1]+B[1];a[2]=e[2]+B[2];a[3]=e[3]+B[3];a[4]=e[4]+B[4];a[5]=e[5]+B[5];return a}function z(a,e,B){a[0]=e[0]-B[0];a[1]=e[1]-B[1];a[2]=e[2]-
B[2];a[3]=e[3]-B[3];a[4]=e[4]-B[4];a[5]=e[5]-B[5];return a}function l(a,e,B){a[0]=e[0]*B;a[1]=e[1]*B;a[2]=e[2]*B;a[3]=e[3]*B;a[4]=e[4]*B;a[5]=e[5]*B;return a}function E(a,e,B,J){a[0]=e[0]+B[0]*J;a[1]=e[1]+B[1]*J;a[2]=e[2]+B[2]*J;a[3]=e[3]+B[3]*J;a[4]=e[4]+B[4]*J;a[5]=e[5]+B[5]*J;return a}function u(a,e){return a[0]===e[0]&&a[1]===e[1]&&a[2]===e[2]&&a[3]===e[3]&&a[4]===e[4]&&a[5]===e[5]}function d(a,e){const B=a[0],J=a[1],P=a[2],M=a[3],A=a[4];a=a[5];const w=e[0],H=e[1],q=e[2],N=e[3],r=e[4];e=e[5];
const p=h.getEpsilon();return Math.abs(B-w)<=p*Math.max(1,Math.abs(B),Math.abs(w))&&Math.abs(J-H)<=p*Math.max(1,Math.abs(J),Math.abs(H))&&Math.abs(P-q)<=p*Math.max(1,Math.abs(P),Math.abs(q))&&Math.abs(M-N)<=p*Math.max(1,Math.abs(M),Math.abs(N))&&Math.abs(A-r)<=p*Math.max(1,Math.abs(A),Math.abs(r))&&Math.abs(a-e)<=p*Math.max(1,Math.abs(a),Math.abs(e))}const t=Object.freeze(Object.defineProperty({__proto__:null,add:n,copy:g,determinant:K,equals:d,exactEquals:u,frob:x,fromRotation:c,fromScaling:m,fromTranslation:f,
identity:y,invert:D,mul:L,multiply:L,multiplyScalar:l,multiplyScalarAndAdd:E,rotate:R,scale:I,set:v,str:k,sub:z,subtract:z,translate:F},Symbol.toStringTag,{value:"Module"}));b.add=n;b.copy=g;b.determinant=K;b.equals=d;b.exactEquals=u;b.frob=x;b.fromRotation=c;b.fromScaling=m;b.fromTranslation=f;b.identity=y;b.invert=D;b.mat2d=t;b.mul=L;b.multiply=L;b.multiplyScalar=l;b.multiplyScalarAndAdd=E;b.rotate=R;b.scale=I;b.set=v;b.str=k;b.sub=z;b.subtract=z;b.translate=F;Object.defineProperty(b,Symbol.toStringTag,
{value:"Module"})})},"esri/widgets/Legend/styles/support/relationshipUtils":function(){define(["exports","../../../../symbols/support/svgUtils","../../../../symbols/support/utils","../../../support/widgetUtils","../../../support/jsxFactory"],function(b,h,g,y,v){function D(R,I,F){const c=`${F}_arrowStart`;F=`${F}_arrowEnd`;R="left"===R;const m={markerStart:null,markerEnd:null};switch(I){case "HL":R?m.markerStart=`url(#${F})`:m.markerEnd=`url(#${c})`;break;case "LL":m.markerStart=`url(#${F})`;break;
case "LH":R?m.markerEnd=`url(#${c})`:m.markerStart=`url(#${F})`;break;default:m.markerEnd=`url(#${c})`}return m}function K(R,I,F={}){const {focus:c,numClasses:m,colors:f,rotation:k}=R,{opacity:x,effectList:n,ariaLabel:z}=F;R=F.size??60;F=!!c;const l=Math.sqrt(R**2+R**2)+(F?0:5),E=[],u=[];var d=[],t=(R||75)/m;for(var a=0;a<m;a++){var e=a*t;for(var B=0;B<m;B++){var J=B*t,P=h.generateFillAttributes(f[a][B]);const M=h.generateStrokeAttributes(null);J={type:"rect",x:J,y:e,width:t,height:t};const A=h.renderDef(P);
A&&E.push(A);(P=h.renderShape(J,P.fill,M,null))&&u.push(P);d.push(h.getBoundingBox(J))}}t=null;F||(t="margin: -15px -15px -18px -15px");a=D("left",c,I);e=D("right",c,I);B=h.computeBBox(d);d=h.getTransformMatrix(B,l,l,0,!1,k,!1);B=h.getTransformMatrix(B,l,l,0,!1,F?-45:null,!1);P={filter:g.getCSSFilterFromEffectList(n)??void 0,opacity:null==x?"":`${x}`};return v.tsx("div",{class:F?L.diamondMidColRamp:L.squareTableCell,styles:P},v.tsx("svg",{"aria-label":z,focusable:!1,height:l,role:"image",style:t,
width:l,xmlns:"http://www.w3.org/2000/svg"},v.tsx("defs",null,v.tsx("marker",{id:`${I}_arrowStart`,markerHeight:"10",markerUnits:"strokeWidth",markerWidth:"10",orient:"auto",refX:"5",refY:"5"},v.tsx("polyline",{fill:"none",points:"0,0 5,5 0,10",stroke:"#555555","stroke-width":"1"})),v.tsx("marker",{id:`${I}_arrowEnd`,markerHeight:"10",markerUnits:"strokeWidth",markerWidth:"10",orient:"auto",refX:"0",refY:"5"},v.tsx("polyline",{fill:"none",points:"5,0 0,5 5,10",stroke:"#555555","stroke-width":"1"})),
E),v.tsx("g",{transform:d},u),v.tsx("g",{transform:B},v.tsx("line",{fill:"none","marker-end":a.markerEnd,"marker-start":a.markerStart,stroke:"#555555","stroke-width":"1",x1:-10,x2:-10,y1:R-15,y2:15}),v.tsx("line",{fill:"none","marker-end":e.markerEnd,"marker-start":e.markerStart,stroke:"#555555","stroke-width":"1",x1:15,x2:R-15,y1:R+10,y2:R+10}))))}const L={diamondContainer:"esri-relationship-ramp--diamond__container",diamondLeftCol:"esri-relationship-ramp--diamond__left-column",diamondRightCol:"esri-relationship-ramp--diamond__right-column",
diamondMidCol:"esri-relationship-ramp--diamond__middle-column",diamondMidColLabel:"esri-relationship-ramp--diamond__middle-column--label",diamondMidColRamp:"esri-relationship-ramp--diamond__middle-column--ramp",squareTable:"esri-relationship-ramp--square__table",squareTableRow:"esri-relationship-ramp--square__table-row",squareTableCell:"esri-relationship-ramp--square__table-cell",squareTableLabel:"esri-relationship-ramp--square__table-label",squareTableLabelLeftBottom:"esri-relationship-ramp--square__table-label--left-bottom",
squareTableLabelRightBottom:"esri-relationship-ramp--square__table-label--right-bottom",squareTableLabelLeftTop:"esri-relationship-ramp--square__table-label--left-top",squareTableLabelRightTop:"esri-relationship-ramp--square__table-label--right-top"};b.renderRelationshipRamp=function(R,I,F={}){const {focus:c,labels:m}=R,f=!!c;R=K(R,I,F);I={justifyContent:"center"};F=y.isRTL();return f?v.tsx("div",{class:L.diamondContainer,styles:I},v.tsx("div",{class:L.diamondLeftCol},F?m.right:m.left),v.tsx("div",
{class:L.diamondMidCol},v.tsx("div",{class:L.diamondMidColLabel},m.top),R,v.tsx("div",{class:L.diamondMidColLabel},m.bottom)),v.tsx("div",{class:L.diamondRightCol},F?m.left:m.right)):v.tsx("div",{class:L.squareTable},v.tsx("div",{class:L.squareTableRow},v.tsx("div",{class:y.classes(L.squareTableCell,L.squareTableLabel,L.squareTableLabelRightBottom)},F?m.top:m.left),v.tsx("div",{class:L.squareTableCell}),v.tsx("div",{class:y.classes(L.squareTableCell,L.squareTableLabel,L.squareTableLabelLeftBottom)},
F?m.left:m.top)),v.tsx("div",{class:L.squareTableRow},v.tsx("div",{class:L.squareTableCell}),R,v.tsx("div",{class:L.squareTableCell})),v.tsx("div",{class:L.squareTableRow},v.tsx("div",{class:y.classes(L.squareTableCell,L.squareTableLabel,L.squareTableLabelRightTop)},F?m.right:m.bottom),v.tsx("div",{class:L.squareTableCell}),v.tsx("div",{class:y.classes(L.squareTableCell,L.squareTableLabel,L.squareTableLabelLeftTop)},F?m.bottom:m.right)))};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},
"esri/widgets/Legend/support/relationshipRampUtils":function(){define(["exports","../../../core/lang","../../../symbols/support/gfxUtils","../../../symbols/support/previewSymbol3D"],function(b,h,g,y){function v(I){if(I){var {type:F}=I;return F.includes("3d")?y.getSymbolLayerFill(I.symbolLayers.at(0)):"simple-line"===F||"simple-marker"===I.type&&("x"===I.style||"cross"===I.style)?(I=g.getStroke(I))&&I.color:g.getFill(I)}}function D(I,F){const c=F.HH.label,m=F.LL.label,f=F.HL.label;F=F.LH.label;switch(I){case "HH":return{top:c,
bottom:m,left:f,right:F};case "HL":return{top:f,bottom:F,left:m,right:c};case "LL":return{top:m,bottom:c,left:F,right:f};case "LH":return{top:F,bottom:f,left:c,right:m};default:return{top:c,bottom:m,left:f,right:F}}}function K(I){let F=L[I];I&&null==F&&(F=L.HH);return F||0}const L={HH:315,HL:45,LL:135,LH:225},R={2:[["HL","HH"],["LL","LH"]],3:[["HL","HM","HH"],["ML","MM","MH"],["LL","LM","LH"]],4:[["HL","HM1","HM2","HH"],["M2L","M2M1","M2M2","M2H"],["M1L","M1M1","M1M2","M1H"],["LL","LM1","LM2","LH"]]};
b.getRelationshipRampColors2D=function(I,F){const c=[],m=I.length**.5;I=h.clone(I);var f=(F||"HH").split("");F=f[0];for(f="H"===f[1];I.length;){const k=[];for(;k.length<m;)k.push(I.shift());f&&k.reverse();c.push(k)}"L"===F&&c.reverse();return c};b.getRelationshipRampElement=function(I){const {focus:F,infos:c,numClasses:m}=I;var f=R[m];const k={};c.forEach(x=>{k[x.value]={label:x.label,fill:v(x.symbol)}});I=[];for(let x=0;x<m;x++){const n=[];for(let z=0;z<m;z++)n.push(k[f[x][z]].fill);I.push(n)}f=
D(F,k);return{type:"relationship-ramp",numClasses:m,focus:F,colors:I,labels:f,rotation:K(F)}};b.getRotationAngleForFocus=K;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/support/previewSymbol3D":function(){define("exports ../../assets ../../core/colorUtils ../../core/has ../../core/Error ../../core/Logger ../../core/screenUtils ./gfxUtils ./IconSymbol3DLayerResource ./ObjectSymbol3DLayerResource ./previewUtils ./renderUtils ./utils ./webStyleSymbolUtils".split(" "),
function(b,h,g,y,v,D,K,L,R,I,F,c,m,f){function k(p){const C=p.outline;var Q=null!=p.material?p.material.color:null;Q=null!=Q?Q.toHex():null;if(null==C||"pattern"in C&&null!=C.pattern&&"style"===C.pattern.type&&"none"===C.pattern.style)return"fill"===p.type&&"#ffffff"===Q?{color:"#bdc3c7",width:.75}:null;p=K.pt2px(C.size)||0;return{color:"rgba("+(null!=C.color?C.color.toRgba():"255,255,255,1")+")",width:Math.min(p,q),style:"pattern"in C&&null!=C.pattern&&"style"===C.pattern.type?L.dekebabifyLineStyle(C.pattern.style):
null,join:"butt",cap:"patternCap"in C?C.patternCap:"butt"}}async function x(p,C){if(p.thumbnail?.url)return p.thumbnail.url;if("icon"===C.type&&C?.resource?.href)return m.getIconHref(C);C=h.getAssetUrl("esri/images/Legend/legend3dsymboldefault.png");return p.styleOrigin&&(p.styleOrigin.styleName||p.styleOrigin.styleUrl)&&(p=await f.resolveWebStyleSymbol(p.styleOrigin,{portal:p.styleOrigin.portal},"webRef").catch(()=>null))&&"thumbnail"in p&&p.thumbnail?.url?p.thumbnail.url:C}function n(p,C=1){const Q=
p.a;p=g.toHSV(p);const {r:T,g:V,b:aa}=g.toRGB({h:p.h,s:p.s/C,v:100-(100-p.v)/C});return[T,V,aa,Q]}function z(p){return"water"===p.type?null==p.color?null:p.color:null==p.material?.color?null:p.material.color}function l(p,C=0){var Q=z(p);if(!Q){if("fill"===p.type)return null;C=F.adjustColorComponentBrightness(L.defaultThematicColor.r,C);return[C,C,C,100]}p=Q.toRgba();for(Q=0;3>Q;Q++)p[Q]=F.adjustColorComponentBrightness(p[Q],C);return p}async function E(p,C){p=p.style;return"none"===p?null:{type:"pattern",
x:0,y:0,src:await L.getPatternUrlWithColor(h.getAssetUrl(`esri/symbols/patterns/${p}.png`),C.toCss(!0)),width:5,height:5}}function u(p){return p.outline?k(p):{color:"rgba(0, 0, 0, 1)",width:1.5}}function d(p,C){p=z(p);if(!p)return null;let Q;Q="rgba("+(F.adjustColorComponentBrightness(p.r,C)+",");Q+=F.adjustColorComponentBrightness(p.g,C)+",";Q+=F.adjustColorComponentBrightness(p.b,C)+",";return Q+p.a+");"}function t(p,C){C=d(p,C);if(!C)return{};if("pattern"in p&&null!=p.pattern&&"style"===p.pattern.type&&
"none"===p.pattern.style)return null;const Q=Math.min(p.size?K.pt2px(p.size):.75,q);return{color:C,width:Q,style:"pattern"in p&&null!=p.pattern&&"style"===p.pattern.type?L.dekebabifyLineStyle(p.pattern.style):null,cap:"cap"in p?p.cap:null,join:"join"in p?"miter"===p.join?K.pt2px(2):p.join:null}}function a(p,C,Q){Q=null!=Q?.75*Q:0;return{type:"linear",x1:Q?.25*Q:0,y1:Q?.5*Q:0,x2:Q||4,y2:Q?.5*Q:4,colors:[{color:p,offset:0},{color:C,offset:1}]}}function e(p){const C=p.depth,Q=p.height;p=p.width;return 0!==
p&&0!==C&&0!==Q&&p===C&&null!=p&&null!=Q&&p<Q}function B(p,C,Q){const T=[];if(!p)return T;switch(p.type){case "icon":switch(p.resource?.primitive??R.defaultPrimitive){case "circle":T.push({shape:{type:"circle",cx:0,cy:0,r:.5*C},fill:l(p,0),stroke:k(p)});break;case "square":T.push({shape:{type:"path",path:[{command:"M",values:[0,C]},{command:"L",values:[0,0]},{command:"L",values:[C,0]},{command:"L",values:[C,C]},{command:"Z",values:[]}]},fill:l(p,0),stroke:k(p)});break;case "triangle":T.push({shape:{type:"path",
path:[{command:"M",values:[0,C]},{command:"L",values:[.5*C,0]},{command:"L",values:[C,C]},{command:"Z",values:[]}]},fill:l(p,0),stroke:k(p)});break;case "cross":T.push({shape:{type:"path",path:[{command:"M",values:[.5*C,0]},{command:"L",values:[.5*C,C]},{command:"M",values:[0,.5*C]},{command:"L",values:[C,.5*C]}]},stroke:u(p)});break;case "x":T.push({shape:{type:"path",path:[{command:"M",values:[0,0]},{command:"L",values:[C,C]},{command:"M",values:[C,0]},{command:"L",values:[0,C]}]},stroke:u(p)});
break;case "kite":T.push({shape:{type:"path",path:[{command:"M",values:[0,.5*C]},{command:"L",values:[.5*C,0]},{command:"L",values:[C,.5*C]},{command:"L",values:[.5*C,C]},{command:"Z",values:[]}]},fill:l(p,0),stroke:k(p)})}break;case "object":switch(p.resource?.primitive??I.defaultPrimitive){case "cone":var V=l(p,0);p=l(p,-.6);p=a(V,p,Q?r:C);C=F.getConeShapes(C,Q);T.push({shape:C[0],fill:p},{shape:C[1],fill:p});break;case "inverted-cone":Q=l(p,0);p=l(p,-.6);p=a(Q,p,C);C=F.getInvertedConeShapes(C);
T.push({shape:C[0],fill:p},{shape:C[1],fill:Q});break;case "cube":C=F.getCubeShapes(C,Q);T.push({shape:C[0],fill:l(p,0)},{shape:C[1],fill:l(p,-.3)},{shape:C[2],fill:l(p,-.5)});break;case "cylinder":V=l(p,0);const aa=l(p,-.6);V=a(V,aa,Q?r:C);C=F.getCylinderShapes(C,Q);T.push({shape:C[0],fill:V},{shape:C[1],fill:V},{shape:C[2],fill:l(p,0)});break;case "diamond":C=F.getDiamondShapes(C);T.push({shape:C[0],fill:l(p,-.3)},{shape:C[1],fill:l(p,0)},{shape:C[2],fill:l(p,-.3)},{shape:C[3],fill:l(p,-.7)});break;
case "sphere":Q=l(p,0);p=l(p,-.6);p=a(Q,p);p.x1=0;p.y1=0;p.x2=.25*C;p.y2=.25*C;T.push({shape:{type:"circle",cx:0,cy:0,r:.5*C},fill:p});break;case "tetrahedron":C=F.getTetrahedronShapes(C),T.push({shape:C[0],fill:l(p,-.3)},{shape:C[1],fill:l(p,0)},{shape:C[2],fill:l(p,-.6)})}}return T}function J(p){return(p="number"===typeof p?.size?p?.size:null)?K.pt2px(p):null}async function P(p,C){const Q=J(C),T=C?.maxSize?K.pt2px(C.maxSize):null,V=C?.disableUpsampling??!1,aa=p.symbolLayers,ca=[];let Z=0,ea=0;const Y=
aa.at(-1);let ba;Y&&"icon"===Y.type&&(ba=Y.size&&K.pt2px(Y.size));aa.forEach(G=>{if("icon"===G.type||"object"===G.type){var O="icon"===G.type?G.size&&K.pt2px(G.size):0,S=Q||O?Math.ceil(Math.min(Q||O,T||H)):w;if(G?.resource?.href){var U=x(p,G).then(W=>{const X=G?.material?.color;var fa="icon"===G.type?"multiply":"tint";return c.tintImageWithColor(W,S,X,fa,V)}).then(W=>{const X=W.width,fa=W.height;Z=Math.max(Z,X);ea=Math.max(ea,fa);return[{shape:{type:"image",x:0,y:0,width:X,height:fa,src:W.url},fill:null,
stroke:null}]});ca.push(U)}else U=S,"icon"===G.type&&ba&&Q&&(U=O/ba*S),O="tall"===C?.symbolConfig||C?.symbolConfig?.isTall||("object"===G.type?e(G):!1),Z=Math.max(Z,O?r:U),ea=Math.max(ea,U),ca.push(Promise.resolve(B(G,U,O)))}});const da=[];(await Promise.allSettled(ca)).forEach(G=>{"fulfilled"===G.status?da.push(G.value):G.reason&&D.getLogger("esri.symbols.support.previewSymbol3D").warn("error while building swatchInfo!",G.reason)});return c.renderSymbol(da,[Z,ea],{node:C?.node,scale:!1,opacity:C?.opacity,
ariaLabel:C?.ariaLabel})}function M(p,C){const Q=p.symbolLayers,T=[];p=m.isVolumetricSymbol(p);const V=J(C),aa=(C?.maxSize?K.pt2px(C.maxSize):null)||q;let ca=0,Z=0,ea;Q.forEach((Y,ba)=>{if(Y&&("line"===Y.type||"path"===Y.type)){var da=[];switch(Y.type){case "line":var G=t(Y,0);if(null==G)break;var O=G?.width||0;0===ba&&(ea=O);Y=Math.min(V||O,aa);ba=0===ba?Y:V?O/ea*Y:Y;O=ba>N/2?2*ba:N;Z=Math.max(Z,ba);ca=Math.max(ca,O);G.width=ba;da.push({shape:{type:"path",path:[{command:"M",values:[0,.5*Z]},{command:"L",
values:[ca,.5*Z]}]},stroke:G});break;case "path":G=Math.min(V||w,aa);ba=l(Y,0);O=l(Y,-.2);var S=d(Y,-.4);S=S?{color:S,width:1}:{};if("quad"===Y.profile){const U=Y.width;Y=Y.height;Y=F.getPathSymbolShapes(U&&Y?U/Y:1,0===Y,0===U);S={...S,join:"bevel"};da.push({shape:Y[0],fill:O,stroke:S},{shape:Y[1],fill:O,stroke:S},{shape:Y[2],fill:ba,stroke:S})}else da.push({shape:F.shapes.pathSymbol3DLayer[0],fill:O,stroke:S},{shape:F.shapes.pathSymbol3DLayer[1],fill:ba,stroke:S});ca=Z=Math.max(Z,G)}T.push(da)}});
return Promise.resolve(c.renderSymbol(T,[ca,Z],{node:C?.node,scale:p,opacity:C?.opacity,ariaLabel:C?.ariaLabel}))}async function A(p,C){const Q="mesh-3d"===p.type;p=p.symbolLayers;var T=J(C);const V=C?.maxSize?K.pt2px(C.maxSize):null;T=T||w;const aa=[];let ca=0,Z=0;var ea=!1;for(let O=0;O<p.length;O++){var Y=p.at(O);const S=[];if(!Q||"fill"===Y.type){switch(Y.type){case "fill":ea=Math.min(T,V||H);ca=Math.max(ca,ea);Z=Math.max(Z,ea);ea=!0;if(Q){var ba=F.shapes.meshSymbol3DFill,da=d(Y,-.4);da=da?{color:da,
width:1,join:"round"}:{};S.push({shape:ba[0],fill:l(Y,0),stroke:da},{shape:ba[1],fill:l(Y,-.2),stroke:da},{shape:ba[2],fill:l(Y,-.6),stroke:da})}else{ba=l(Y,0);da="pattern"in Y?Y.pattern:null;var G=k(Y);Y=z(Y);null!=da&&"style"===da.type&&"solid"!==da.style&&Y&&(ba=await E(da,Y));S.push({shape:F.shapes.fill[0],fill:ba,stroke:G})}break;case "line":Y=t(Y,0);if(null==Y)break;Y={stroke:Y,shape:F.shapes.fill[0]};ca=Math.max(ca,w);Z=Math.max(Z,w);S.push(Y);break;case "extrude":ba={join:"round",width:1,
...t(Y,-.4)};da=l(Y,0);Y=l(Y,-.2);G=Math.min(T,V||H);const U=F.getExtrudeSymbolShapes(G);ba.width=1;S.push({shape:U[0],fill:Y,stroke:ba},{shape:U[1],fill:Y,stroke:ba},{shape:U[2],fill:da,stroke:ba});Y=.7*w+.5*G;ca=Math.max(ca,w);Z=Math.max(Z,Y);break;case "water":ea=z(Y),Y=n(ea),ba=n(ea,2),da=n(ea,3),G=F.getWaterSymbolShapes(),ea=!0,S.push({shape:G[0],fill:Y},{shape:G[1],fill:ba},{shape:G[2],fill:da}),Y=Math.min(T,V||H),ca=Math.max(ca,Y),Z=Math.max(Z,Y)}aa.push(S)}}return c.renderSymbol(aa,[ca,Z],
{node:C?.node,scale:ea,opacity:C?.opacity,ariaLabel:C?.ariaLabel})}const w=F.SymbolSizeDefaults.size,H=F.SymbolSizeDefaults.maxSize,q=F.SymbolSizeDefaults.maxOutlineSize,N=F.SymbolSizeDefaults.lineWidth,r=F.SymbolSizeDefaults.tallSymbolWidth;b.getPatternDescriptor=E;b.getSizeFromOptions=J;b.getSymbolLayerFill=l;b.previewSymbol3D=function(p,C){if(0===p.symbolLayers.length)return Promise.reject(new v("symbolPreview: renderPreviewHTML3D","No symbolLayers in the symbol."));switch(p.type){case "point-3d":return P(p,
C);case "line-3d":return M(p,C);case "polygon-3d":case "mesh-3d":return A(p,C)}return Promise.reject(new v("symbolPreview: swatchInfo3D","symbol not supported."))};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/support/webStyleSymbolUtils":function(){define("exports ../../symbols ../../core/devEnvironmentUtils ../../core/Error ../../core/urlUtils ../../portal/Portal ../../chunks/persistableUrlUtils ./jsonUtils ./StyleOrigin ./styleUtils ./Thumbnail".split(" "),function(b,
h,g,y,v,D,K,L,R,I,F){function c(k,x){return x.items.find(n=>n.name===k)}function m(k,x,n,z,l,E){const u=null!=n?.portal?n.portal:D.getDefault(),d={portal:u,url:v.urlToObject(k.baseUrl),origin:"portal-item"},t=c(x,k.data);if(!t)return Promise.reject(new y("symbolstyleutils:symbol-name-not-found",`The symbol name '${x}' could not be found`,{symbolName:x}));l=K.fromJSON(l(t,z),d);let a=t.thumbnail?.href??null;const e=t.thumbnail?.imageData;g.isDevEnvironment()&&(l=g.adjustStaticAGOUrl(l)??"",a=g.adjustStaticAGOUrl(a));
const B={portal:u,url:v.urlToObject(v.removeFile(l)),origin:"portal-item"};return I.requestJSON(l,E).then(J=>{J="cimRef"===z?I.makeCIMSymbolRef(J.data):J.data;if((J=L.fromJSON(J,B))&&h.isSymbol3D(J)){if(a){const P=K.fromJSON(a,d);J.thumbnail=new F.Thumbnail({url:P})}else e&&(J.thumbnail=new F.Thumbnail({url:`data:image/png;base64,${e}`}));k.styleUrl?J.styleOrigin=new R({portal:n.portal,styleUrl:k.styleUrl,name:x}):k.styleName&&(J.styleOrigin=new R({portal:n.portal,styleName:k.styleName,name:x}))}return J})}
function f(k,x,n){const z=I.Style2DUrlTemplate.replaceAll(/\{SymbolName\}/gi,k),l=null!=x.portal?x.portal:D.getDefault();return I.requestJSON(z,n).then(E=>{E=I.makeCIMSymbolRef(E.data);return L.fromJSON(E,{portal:l,url:v.urlToObject(v.removeFile(z)),origin:"portal-item"})})}b.fetchSymbolFromStyle=m;b.getStyleItemFromStyle=c;b.resolveWebStyleSymbol=function(k,x,n,z){const l=k.name;return null==l?Promise.reject(new y("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference")):
k.styleName&&"Esri2DPointSymbolsStyle"===k.styleName?f(l,x,z):I.fetchStyle(k,x,z).then(E=>m(E,l,x,n,I.symbolUrlFromStyleItem,z))};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/core/devEnvironmentUtils":function(){define(["exports"],function(b){const h=/^devext\.arcgis\.com$/,g=/^qaext\.arcgis\.com$/,y=/^[\w-]*\.mapsdevext\.arcgis\.com$/,v=/^[\w-]*\.mapsqa\.arcgis\.com$/,D=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,h,g,/^jsapps\.esri\.com$/,y,v];b.adjustStaticAGOUrl=function(K,
L){return K?(L=L||globalThis.location.hostname)?null!=L.match(h)||null!=L.match(y)?K.replace("static.arcgis.com","staticdev.arcgis.com"):null!=L.match(g)||null!=L.match(v)?K.replace("static.arcgis.com","staticqa.arcgis.com"):K:K:K};b.devHostnames=D;b.isDevEnvironment=function(K){K=K||globalThis.location.hostname;return D.some(L=>null!=K?.match(L))};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Popup/actions":function(){define("exports ../../core/Collection ../../support/actions/ActionBase ../../support/actions/ActionButton ../../support/actions/ActionToggle ../support/legacyIcon".split(" "),
function(b,h,g,y,v,D){h=h.ofType({key:"type",defaultKeyValue:"button",base:g,typeMap:{button:y,toggle:v}});g=new y({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}",className:D.legacyIcon.zoomInMagnifyingGlass});const K=new y({icon:"trash",id:"remove-selected-feature",title:"{messages.remove}",className:D.legacyIcon.trash});y=new y({icon:"magnifying-glass-plus",id:"zoom-to-clustered-features",title:"{messages.zoom}",className:D.legacyIcon.zoomInMagnifyingGlass});v=new v({icon:"table",
id:"browse-clustered-features",title:"{messages.browseClusteredFeatures}",className:D.legacyIcon.table,value:!1});D=[g,K,v,y];b.ActionsCollection=h;b.all=D;b.browseClusteredFeatures=v;b.removeSelectedFeature=K;b.zoomToClusteredFeatures=y;b.zoomToFeature=g;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Popup/actionUtils":function(){define(["exports","../../core/Error","../../core/Logger","../../core/promiseUtils","./actions"],function(b,h,g,y,v){function D(c){const {selectedFeature:m,
location:f,view:k}=c;return k?m??f??null:null}function K(c){return!!c&&c.isAggregate&&"cluster"===c.sourceLayer?.featureReduction?.type}async function L(c,m){if("3d"!==m?.type||!c||"esri.Graphic"!==c.declaredClass)return!0;if((m=m.getViewForGraphic(c))&&"whenGraphicBounds"in m){let f=null;try{f=await m.whenGraphicBounds(c,{useViewElevation:!0})}catch(k){}return!f||!f.boundingBox||f.boundingBox[0]===f.boundingBox[3]&&f.boundingBox[1]===f.boundingBox[4]&&f.boundingBox[2]===f.boundingBox[5]}return!0}
async function R(c){const {location:m,selectedFeature:f,view:k,zoomFactor:x}=c,n=D(c);if(!k||!n)throw c=new h("zoom-to:invalid-target-or-view","Cannot zoom to location without a target and view.",{target:n,view:k}),g.getLogger("esri.widgets.Popup.PopupViewModel").error(c),c;const z=k.scale/x,l=c.selectedFeature?.geometry??m,E=null!=l&&"point"===l.type&&await L(f,k);v.zoomToFeature.active=!0;v.zoomToFeature.disabled=!0;try{await c.zoomTo({target:{target:n,scale:E?z:void 0}})}catch(u){const d=new h("zoom-to:invalid-graphic",
"Could not zoom to the location of the graphic.",{graphic:f});g.getLogger("esri.widgets.Popup.PopupViewModel").error(d)}finally{v.zoomToFeature.active=!1,v.zoomToFeature.disabled=!1,c.zoomToLocation=null,E&&(c.location=l)}}async function I(c){const {selectedFeature:m,view:f}=c;if("2d"!==f?.type)throw c=new h("zoomToCluster:invalid-view","View must be 2d MapView.",{view:f}),g.getLogger("esri.widgets.Popup.PopupViewModel").error(c),c;if(!m||!K(m))throw c=new h("zoomToCluster:invalid-selectedFeature",
"Selected feature must represent an aggregate/cluster graphic.",{selectedFeature:m}),g.getLogger("esri.widgets.Popup.PopupViewModel").error(c),c;const [k,x]=await F(f,m);v.zoomToClusteredFeatures.active=!0;v.zoomToClusteredFeatures.disabled=!0;const {extent:n}=await k.queryExtent(x);n&&await c.zoomTo({target:n});v.zoomToClusteredFeatures.active=!1;v.zoomToClusteredFeatures.disabled=!1}async function F(c,m){c=await c.whenLayerView(m.sourceLayer);const f=c.createQuery();m=m.getObjectId();f.aggregateIds=
null!=m?[m]:[];return[c,f]}b.browseAggregateFeatures=async function(c){const {selectedFeature:m,view:f}=c;if(f&&m){var [k,x]=await F(f,m);v.browseClusteredFeatures.active=!0;v.browseClusteredFeatures.disabled=!0;var {features:n}=await k.queryFeatures(x);v.browseClusteredFeatures.active=!1;v.browseClusteredFeatures.disabled=!1;v.browseClusteredFeatures.value=!0;c?.open({features:[m].concat(n),featureMenuOpen:!0})}};b.displayClusterExtent=async function(c){const {view:m,selectedFeature:f}=c;if(m&&f){var [k,
x]=await F(m,f),{extent:n}=await k.queryExtent(x);c.selectedClusterBoundaryFeature.geometry=n;m.graphics.add(c.selectedClusterBoundaryFeature)}};b.getSelectedTarget=D;b.isClusterFeature=K;b.removeClusteredFeaturesForBrowsing=function(c){v.browseClusteredFeatures.value=!1;const m=c.features.filter(f=>K(f));m.length&&(c.features=m)};b.triggerAction=c=>{const {event:m,view:f,viewModel:k}=c;({action:c}=m);if(!c)return Promise.reject(new h("trigger-action:missing-arguments","Event has no action"));const {disabled:x,
id:n}=c;if(!n)return Promise.reject(new h("trigger-action:invalid-action","action.id is missing"));if(x)return Promise.reject(new h("trigger-action:invalid-action","Action is disabled"));if(n===v.zoomToFeature.id)return R(k).catch(y.throwIfNotAbortError);if(n===v.zoomToClusteredFeatures.id)return I(k);if(n===v.browseClusteredFeatures.id)return k.browseClusterEnabled=!k.browseClusterEnabled,k.featureMenuOpen=k.browseClusterEnabled,Promise.resolve();if(n===v.removeSelectedFeature.id){k.visible=!1;({selectedFeature:c}=
k);if(!c)return Promise.reject(new h(`trigger-action:${v.removeSelectedFeature.id}`,"selectedFeature is required",{selectedFeature:c}));const {sourceLayer:z}=c;z?z.remove(c):f?.graphics.remove(c)}return Promise.resolve()};b.zoomToClusterExtent=I;b.zoomToLocation=R;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/support/GoTo":function(){define("exports ../../chunks/tslib.es6 ../../core/maybe ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),
function(b,h,g,y,v,D,K,L){b.GoToMixin=R=>{R=class extends R{constructor(...I){super(...I);this.view=this.goToOverride=null}callGoTo(I){const {view:F}=this;g.assertIsSome(F);return this.goToOverride?this.goToOverride(F,I):F.goTo(I.target,I.options)}};h.__decorate([y.property()],R.prototype,"goToOverride",void 0);h.__decorate([y.property()],R.prototype,"view",void 0);return R=h.__decorate([L.subclass("esri.widgets.support.GoTo")],R)};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Features/FeaturesVisibleElements":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),
function(b,h,g,y,v,D,K){h=class extends h{constructor(){super(...arguments);this.closeButton=this.actionBar=!0;this.collapseButton=!1;this.spinner=this.heading=this.flow=this.featureListLayerTitle=this.featureNavigation=!0}};b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"actionBar",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"closeButton",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"collapseButton",void 0);b.__decorate([g.property({type:Boolean,
nonNullable:!0})],h.prototype,"featureNavigation",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"featureListLayerTitle",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"flow",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"heading",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"spinner",void 0);return h=b.__decorate([K.subclass("esri.widgets.Features.FeaturesVisibleElements")],
h)})},"esri/widgets/Popup/css":function(){define(["exports"],function(b){b.css={base:"esri-popup",baseHidden:"esri-popup--hidden",main:"esri-popup__main-container",shadow:"esri-popup--shadow",isDocked:"esri-popup--is-docked",isDockedTopLeft:"esri-popup--is-docked-top-left",isDockedTopCenter:"esri-popup--is-docked-top-center",isDockedTopRight:"esri-popup--is-docked-top-right",isDockedBottomLeft:"esri-popup--is-docked-bottom-left",isDockedBottomCenter:"esri-popup--is-docked-bottom-center",isDockedBottomRight:"esri-popup--is-docked-bottom-right",
alignTopCenter:"esri-popup--aligned-top-center",alignBottomCenter:"esri-popup--aligned-bottom-center",alignTopLeft:"esri-popup--aligned-top-left",alignBottomLeft:"esri-popup--aligned-bottom-left",alignTopRight:"esri-popup--aligned-top-right",alignBottomRight:"esri-popup--aligned-bottom-right",pointer:"esri-popup__pointer",pointerDirection:"esri-popup__pointer-direction"};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/Popup/PopupViewModel":function(){define("../../chunks/tslib.es6 ../../core/Logger ../../core/has ../../core/RandomLCG ../../core/Error ../../core/accessorSupport/decorators/subclass ../Features/FeaturesViewModel".split(" "),
function(b,h,g,y,v,D,K){h=class extends K{constructor(L){super(L)}};return h=b.__decorate([D.subclass("esri.widgets.Popup.PopupViewModel")],h)})},"esri/widgets/Popup/PopupVisibleElements":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(b,h,g,y,v,D,K){h=class extends h{constructor(){super(...arguments);this.spinner=this.heading=
this.featureListLayerTitle=this.featureNavigation=this.collapseButton=this.closeButton=this.actionBar=!0}};b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"actionBar",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"closeButton",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"collapseButton",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"featureNavigation",void 0);b.__decorate([g.property({type:Boolean,
nonNullable:!0})],h.prototype,"featureListLayerTitle",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"heading",void 0);b.__decorate([g.property({type:Boolean,nonNullable:!0})],h.prototype,"spinner",void 0);return h=b.__decorate([K.subclass("esri.widgets.Popup.PopupVisibleElements")],h)})},"*noref":1}});
define("../chunks/tslib.es6 ../core/deprecate ../core/Logger ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/has ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../support/actions/ActionButton ./Features ./Widget ./Popup/css ./Popup/PopupViewModel ./Popup/PopupVisibleElements ./support/globalCss ./support/widgetUtils ./support/decorators/messageBundle ./support/decorators/vmEvent ./support/jsxFactory".split(" "),function(b,h,g,y,v,D,K,L,R,I,F,c,m,f,k,x,n,z,
l){const E={buttonEnabled:!0,position:"auto",breakpoint:{width:544}};D=class extends F{constructor(u,d){super(u,d);this._dockAction=new R({id:"popup-dock-action"});this._featuresWidget=new I({responsiveActionsEnabled:!0});this._mainContainerNode=this._containerNode=null;this._pointerOffsetInPx=16;this.alignment="auto";this.dockEnabled=!1;this.headingLevel=2;this.messages=null;this.viewModel=new m;this.visibleElements=new f}initialize(){this.addHandles([y.watch(()=>[this.viewModel?.view?.widthBreakpoint,
this.dockEnabled],()=>this._handleDockIcon(),y.initial),y.watch(()=>[this.dockEnabled,this.messages?.undock,this.messages?.dock],()=>this._handleDockEnabled(),y.initial),y.watch(()=>this.dockOptions,u=>{const {_dockAction:d}=this,t=this._featuresWidget.headerActions;t.remove(d);u.buttonEnabled&&t.add(d)},y.initial),y.watch(()=>this.viewModel?.screenLocation,()=>this._positionContainer()),y.watch(()=>[this.viewModel?.active,this.dockEnabled],()=>this._toggleScreenLocationEnabled()),y.watch(()=>[this.viewModel?.screenLocation,
this.viewModel?.view?.padding,this.viewModel?.view?.size,this.viewModel?.active,this.viewModel?.location,this.alignment],()=>this.reposition()),y.watch(()=>this.viewModel?.view?.size,(u,d)=>this._updateDockEnabledForViewSize(u,d)),y.watch(()=>this.viewModel?.view,(u,d)=>this._viewChange(u,d)),y.watch(()=>this.viewModel?.view?.ready,(u,d)=>this._viewReadyChange(u??!1,d??!1)),y.watch(()=>this.viewModel,()=>this._featuresWidget.viewModel=this.viewModel,y.initial),y.watch(()=>this._featureNavigationTop,
u=>this._featuresWidget.featureNavigationTop=u,y.initial),y.watch(()=>this.headingLevel,u=>this._featuresWidget.headingLevel=u,y.initial),y.watch(()=>this.visibleElements.actionBar,u=>this._featuresWidget.visibleElements.actionBar=!!u,y.initial),y.watch(()=>this.visibleElements.closeButton,u=>this._featuresWidget.visibleElements.closeButton=!!u,y.initial),y.watch(()=>this.visibleElements.collapseButton,u=>this._featuresWidget.visibleElements.collapseButton=!!u,y.initial),y.watch(()=>this.visibleElements.heading,
u=>this._featuresWidget.visibleElements.heading=!!u,y.initial),y.watch(()=>this.visibleElements.spinner,u=>this._featuresWidget.visibleElements.spinner=!!u,y.initial),y.watch(()=>this.visibleElements.featureNavigation,u=>this._featuresWidget.visibleElements.featureNavigation=!!u,y.initial),y.watch(()=>this.visibleElements.featureListLayerTitle,u=>this._featuresWidget.visibleElements.featureListLayerTitle=!!u,y.initial),y.on(()=>this._featuresWidget,"trigger-header-action",u=>{u.action===this._dockAction&&
(this.dockEnabled=!this.dockEnabled)})])}normalizeCtorArgs(u){const d={...u};null!=u?.visibleElements&&(d.visibleElements=new f(u.visibleElements),null!=u.collapseEnabled&&(d.visibleElements.collapseButton=u.collapseEnabled),null!=u.spinnerEnabled&&(d.visibleElements.spinner=u.spinnerEnabled));return d}destroy(){this._dockAction.destroy();this._featuresWidget?.destroy()}get _featureNavigationTop(){const {currentAlignment:u,currentDockPosition:d}=this;return"bottom-left"===u||"bottom-center"===u||
"bottom-right"===u||"top-left"===d||"top-center"===d||"top-right"===d}get actions(){return this.viewModel.actions}set actions(u){this.viewModel.actions=u}get active(){return this.viewModel.active}get autoCloseEnabled(){return this.viewModel.autoCloseEnabled}set autoCloseEnabled(u){this.viewModel.autoCloseEnabled=u}get defaultPopupTemplateEnabled(){return this.viewModel.defaultPopupTemplateEnabled}set defaultPopupTemplateEnabled(u){this.viewModel.defaultPopupTemplateEnabled=u}get content(){return this.viewModel.content}set content(u){this.viewModel.content=
u}get collapsed(){return this._featuresWidget.collapsed}set collapsed(u){this._featuresWidget.collapsed=u}get collapseEnabled(){h.deprecatedProperty(g.getLogger(this),"collapseEnabled",{replacement:"PopupVisibleElements.collapseButton",version:"4.29"});return this.visibleElements.collapseButton}set collapseEnabled(u){h.deprecatedProperty(g.getLogger(this),"collapseEnabled",{replacement:"PopupVisibleElements.collapseButton",version:"4.29"});this.visibleElements.collapseButton=u}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||
E}set dockOptions(u){var d={...E};const t=this.viewModel?.view?.breakpoints;var a={};t&&(a.width=t.xsmall,a.height=t.xsmall);u={...d,...u};d={...d.breakpoint,...a};({breakpoint:a}=u);"object"===typeof a?u.breakpoint={...d,...a}:a&&(u.breakpoint=d);this._set("dockOptions",u);this._setCurrentDockPosition();this.reposition()}get featureCount(){return this.viewModel.featureCount}get featureMenuOpen(){return this.viewModel.featureMenuOpen}set featureMenuOpen(u){this.viewModel.featureMenuOpen=u}get features(){return this.viewModel.features}set features(u){this.viewModel.features=
u}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(u){this.viewModel.goToOverride=u}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(u){this.viewModel.highlightEnabled=u}get icon(){return"popup"}set icon(u){this._overrideIfSome("icon",u)}get location(){return this.viewModel.location}set location(u){this.viewModel.location=u}get label(){return this.messages?.widgetLabel??""}set label(u){this._overrideIfSome("label",u)}get promises(){return this.viewModel.promises}set promises(u){this.viewModel.promises=
u}get selectedFeature(){return this.viewModel.selectedFeature}get selectedFeatureIndex(){return this.viewModel.selectedFeatureIndex}set selectedFeatureIndex(u){this.viewModel.selectedFeatureIndex=u}get selectedFeatureWidget(){return this._featuresWidget.selectedFeatureWidget}get spinnerEnabled(){h.deprecatedProperty(g.getLogger(this),"spinnerEnabled",{replacement:"PopupVisibleElements.spinner",version:"4.29"});return this.visibleElements.spinner}set spinnerEnabled(u){h.deprecatedProperty(g.getLogger(this),
"spinnerEnabled",{replacement:"PopupVisibleElements.spinner",version:"4.29"});this.visibleElements.spinner=u}get title(){return this.viewModel.title}set title(u){this.viewModel.title=u}get updateLocationEnabled(){return this.viewModel.updateLocationEnabled}set updateLocationEnabled(u){this.viewModel.updateLocationEnabled=u}get view(){return this.viewModel.view}set view(u){this.viewModel.view=u}get visible(){return this.viewModel.visible}set visible(u){this.viewModel.visible=u}blur(){const {active:u}=
this.viewModel;u||g.getLogger(this).warn("Popup can only be blurred when currently active.");this._featuresWidget.blur()}clear(){return this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(u,d){return this.viewModel.fetchFeatures(u,d)}focus(){const {active:u}=this.viewModel;u||g.getLogger(this).warn("Popup can only be focused when currently active.");this.reposition();requestAnimationFrame(()=>{this._featuresWidget.focus()})}next(){return this.viewModel.next()}open(u){this.set({collapsed:u?
!!u.collapsed:!1,featureMenuOpen:u?!!u.featureMenuOpen:!1});this.viewModel.open(u);this._shouldFocus(u)}previous(){return this.viewModel.previous()}reposition(){this.renderNow();this._positionContainer();this._setCurrentAlignment()}triggerAction(u){return this.viewModel.triggerAction(u)}render(){const {dockEnabled:u,currentAlignment:d,currentDockPosition:t}=this,{active:a,screenLocation:e}=this.viewModel,B=this.selectedFeature?.layer?.title,J=this.selectedFeature?.layer?.id;return l.tsx("div",{afterCreate:this._positionContainer,
afterUpdate:this._positionContainer,bind:this,class:this.classes(c.css.base,{[c.css.alignTopCenter]:"top-center"===d,[c.css.alignBottomCenter]:"bottom-center"===d,[c.css.alignTopLeft]:"top-left"===d,[c.css.alignBottomLeft]:"bottom-left"===d,[c.css.alignTopRight]:"top-right"===d,[c.css.alignBottomRight]:"bottom-right"===d,[c.css.isDocked]:a&&u,[c.css.shadow]:a&&!u,[c.css.isDockedTopLeft]:"top-left"===t,[c.css.isDockedTopCenter]:"top-center"===t,[c.css.isDockedTopRight]:"top-right"===t,[c.css.isDockedBottomLeft]:"bottom-left"===
t,[c.css.isDockedBottomCenter]:"bottom-center"===t,[c.css.isDockedBottomRight]:"bottom-right"===t},{[c.css.baseHidden]:!e&&!u}),"data-layer-id":J,"data-layer-title":B,role:"presentation"},a?[this._renderMainContainer(),this._renderPointer()]:null)}_renderPointer(){return this.dockEnabled?null:l.tsx("div",{class:c.css.pointer,key:"popup-pointer",role:"presentation"},l.tsx("div",{class:this.classes(c.css.pointerDirection,c.css.shadow)}))}_renderMainContainer(){const {dockEnabled:u}=this;return l.tsx("div",
{afterCreate:this._setMainContainerNode,afterUpdate:this._setMainContainerNode,bind:this,class:this.classes(c.css.main,k.globalCss.widget,{[c.css.shadow]:u})},this._featuresWidget.render())}async _shouldFocus(u){u?.shouldFocus&&(await y.whenOnce(()=>!0===this.viewModel?.active),this.focus())}_isOutsideView(u){const {popupHeight:d,popupWidth:t,screenLocation:a,side:e,view:B}=u;if(isNaN(t)||isNaN(d)||!B||!a)return!1;u=B.padding;return"right"===e&&a.x+t/2>B.width-u.right||"left"===e&&a.x-t/2<u.left||
"top"===e&&a.y-d<u.top||"bottom"===e&&a.y+d>B.height-u.bottom?!0:!1}_calculateAutoAlignment(u){if("auto"!==u)return u;const {_pointerOffsetInPx:d,_containerNode:t,_mainContainerNode:a,viewModel:e}=this,{screenLocation:B,view:J}=e;if(null==B||!J||!t)return"top-center";var P=(u=a?window.getComputedStyle(a,null):null)?parseInt(u.getPropertyValue("max-height").replaceAll(/[^-\d.]/g,""),10):0,M=u?parseInt(u.getPropertyValue("height").replaceAll(/[^-\d.]/g,""),10):0;const {height:A,width:w}=t.getBoundingClientRect();
u=w+d;const H=Math.max(A,P,M)+d;P=this._isOutsideView({popupHeight:H,popupWidth:u,screenLocation:B,side:"right",view:J});M=this._isOutsideView({popupHeight:H,popupWidth:u,screenLocation:B,side:"left",view:J});const q=this._isOutsideView({popupHeight:H,popupWidth:u,screenLocation:B,side:"top",view:J});u=this._isOutsideView({popupHeight:H,popupWidth:u,screenLocation:B,side:"bottom",view:J});return M?q?"bottom-right":"top-right":P?q?"bottom-left":"top-left":q?u?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(u){return"function"===
typeof u?u.call(this):u}_getCurrentAlignment(){const {alignment:u,dockEnabled:d}=this;return d||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(u)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(u){const d=["left","right"];x.isRTL(this.container)&&d.reverse();return u?.replace(/leading/gi,
d[0]).replaceAll(/trailing/gi,d[1])}_callDockPosition(u){return"function"===typeof u?u.call(this):u}_getDockPosition(){return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_calculateAutoDockPosition(u){if("auto"!==u)return u;var d=this.viewModel?.view;u=x.isRTL(this.container)?"top-left":"top-right";if(!d)return u;var t=d.padding||
{left:0,right:0,top:0,bottom:0};t=d.width-t.left-t.right;({breakpoints:d}=d);return d&&t<=d.xsmall?"bottom-center":u}_getDockIcon(){const u=this._getDockPosition();if(this.dockEnabled)return"minimize";switch(u){case "top-left":case "bottom-left":return"dock-left";case "top-center":return"maximize";case "bottom-center":return"dock-bottom";default:return"dock-right"}}_handleDockIcon(){this._dockAction.icon=this._getDockIcon()}_handleDockEnabled(){this._dockAction.title=this.dockEnabled?this.messages?.undock:
this.messages?.dock}_setMainContainerNode(u){this._mainContainerNode=u}_positionContainer(u=this._containerNode){u&&(this._containerNode=u);if(this._containerNode){({screenLocation:u}=this.viewModel);var {width:d}=this._containerNode.getBoundingClientRect();(u=this._calculatePositionStyle(u,d))&&Object.assign(this._containerNode.style,u)}}_calculateFullWidth(u){const {currentAlignment:d,_pointerOffsetInPx:t}=this;return"top-left"===d||"bottom-left"===d||"top-right"===d||"bottom-right"===d?u+t:u}_calculateAlignmentPosition(u,
d,t,a){const {currentAlignment:e,_pointerOffsetInPx:B}=this;if(t){var {padding:J}=t;a/=2;var P=t.height-d;t=t.width-u;if("bottom-center"===e)return{top:d+B-J.top,left:u-a-J.left};if("top-left"===e)return{bottom:P+B-J.bottom,right:t+B-J.right};if("bottom-left"===e)return{top:d+B-J.top,right:t+B-J.right};if("top-right"===e)return{bottom:P+B-J.bottom,left:u+B-J.left};if("bottom-right"===e)return{top:d+B-J.top,left:u+B-J.left};if("top-center"===e)return{bottom:P+B-J.bottom,left:u-a-J.left}}}_calculatePositionStyle(u,
d){const {dockEnabled:t,view:a}=this;if(a){if(t)return{left:"",top:"",right:"",bottom:""};if(null!=u&&d&&(d=this._calculateFullWidth(d),u=this._calculateAlignmentPosition(u.x,u.y,a,d)))return{top:void 0!==u.top?`${u.top}px`:"auto",left:void 0!==u.left?`${u.left}px`:"auto",bottom:void 0!==u.bottom?`${u.bottom}px`:"auto",right:void 0!==u.right?`${u.right}px`:"auto"}}}_viewChange(u,d){u&&d&&(this.close(),this.clear())}_viewReadyChange(u,d){u?this._wireUpView():d&&(this.close(),this.clear())}_wireUpView(){this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(u,
d,t){const [a,e]=u,[B,J]=d,{width:P=0,height:M=0}=t??{};return a<=P&&B>P||a>P&&B<=P||e<=M&&J>M||e>M&&J<=M}_updateDockEnabledForViewSize(u,d){if(u&&d){var t=this.viewModel?.view?.padding||{left:0,right:0,top:0,bottom:0},a=t.left+t.right,e=t.top+t.bottom;t=[];var B=[];t[0]=u[0]-a;t[1]=u[1]-e;B[0]=d[0]-a;B[1]=d[1]-e;({dockOptions:u}=this);this._dockingThresholdCrossed(t,B,u.breakpoint)&&this._setDockEnabledForViewSize(u);this._setCurrentDockPosition()}}_toggleScreenLocationEnabled(){const {dockEnabled:u,
viewModel:d}=this;d&&(d.screenLocationEnabled=d.active&&!u)}_shouldDockAtCurrentViewSize(u){u=u.breakpoint;var d=this.viewModel?.view?.ui;if(!d)return!1;const {width:t,height:a}=d;if(isNaN(t)||isNaN(a)||!u)return!1;d=u.hasOwnProperty("width")&&t<=(u.width??0);u=u.hasOwnProperty("height")&&a<=(u.height??0);return d||u}_setDockEnabledForViewSize(u){u.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(u))}};b.__decorate([v.property({readOnly:!0})],D.prototype,"_featureNavigationTop",null);
b.__decorate([v.property()],D.prototype,"actions",null);b.__decorate([v.property({readOnly:!0})],D.prototype,"active",null);b.__decorate([v.property()],D.prototype,"alignment",void 0);b.__decorate([v.property()],D.prototype,"autoCloseEnabled",null);b.__decorate([v.property()],D.prototype,"defaultPopupTemplateEnabled",null);b.__decorate([v.property()],D.prototype,"content",null);b.__decorate([v.property()],D.prototype,"collapsed",null);b.__decorate([v.property()],D.prototype,"collapseEnabled",null);
b.__decorate([v.property({readOnly:!0})],D.prototype,"currentAlignment",null);b.__decorate([v.property({readOnly:!0})],D.prototype,"currentDockPosition",null);b.__decorate([v.property()],D.prototype,"dockOptions",null);b.__decorate([v.property()],D.prototype,"dockEnabled",void 0);b.__decorate([v.property({readOnly:!0})],D.prototype,"featureCount",null);b.__decorate([v.property()],D.prototype,"featureMenuOpen",null);b.__decorate([v.property()],D.prototype,"features",null);b.__decorate([v.property()],
D.prototype,"goToOverride",null);b.__decorate([v.property()],D.prototype,"headingLevel",void 0);b.__decorate([v.property()],D.prototype,"highlightEnabled",null);b.__decorate([v.property()],D.prototype,"icon",null);b.__decorate([v.property()],D.prototype,"location",null);b.__decorate([v.property()],D.prototype,"label",null);b.__decorate([v.property(),n.messageBundle("esri/widgets/Popup/t9n/Popup")],D.prototype,"messages",void 0);b.__decorate([v.property()],D.prototype,"promises",null);b.__decorate([v.property({readOnly:!0})],
D.prototype,"selectedFeature",null);b.__decorate([v.property()],D.prototype,"selectedFeatureIndex",null);b.__decorate([v.property({readOnly:!0})],D.prototype,"selectedFeatureWidget",null);b.__decorate([v.property()],D.prototype,"spinnerEnabled",null);b.__decorate([v.property()],D.prototype,"title",null);b.__decorate([v.property()],D.prototype,"updateLocationEnabled",null);b.__decorate([v.property()],D.prototype,"view",null);b.__decorate([v.property({type:m}),z.vmEvent(["triggerAction","trigger-action"])],
D.prototype,"viewModel",void 0);b.__decorate([v.property()],D.prototype,"visible",null);b.__decorate([v.property({type:f,nonNullable:!0})],D.prototype,"visibleElements",void 0);return D=b.__decorate([L.subclass("esri.widgets.Popup")],D)});