@esri/solutions-components 5.0.5 → 5.0.6-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/cdn/{67TUHEUB.js → 25PMTP3B.js} +1 -1
  2. package/dist/cdn/{NORNRIIE.js → 26TMYOYZ.js} +1 -1
  3. package/dist/cdn/{MWCQXZOT.js → 2DQVL4PQ.js} +2 -2
  4. package/dist/cdn/{UV4D2QFA.js → 3EQGUDZX.js} +1 -1
  5. package/dist/cdn/{IQ6XED24.js → 3F54GEFA.js} +1 -1
  6. package/dist/cdn/{WXE6AACQ.js → 3PRSB2WR.js} +1 -1
  7. package/dist/cdn/{MP5X6HGT.js → 4573HUN4.js} +1 -1
  8. package/dist/cdn/{X5T6TZW3.js → 4G6KHS4L.js} +1 -1
  9. package/dist/cdn/{VW52F2EM.js → 5QKEOPB7.js} +1 -1
  10. package/dist/cdn/{K2BF5736.js → 6F7LDQBQ.js} +1 -1
  11. package/dist/cdn/{R47OTDC2.js → 6QCS7IPP.js} +1 -1
  12. package/dist/cdn/6T2CYQFT.js +2 -0
  13. package/dist/cdn/{TF3C523O.js → 72IO4UYP.js} +1 -1
  14. package/dist/cdn/{57INLFON.js → 7GFJCKLV.js} +1 -1
  15. package/dist/cdn/{XLBMKYPQ.js → 7SJMHEHX.js} +1 -1
  16. package/dist/cdn/{VPMYUEFF.js → AR4OZU5R.js} +1 -1
  17. package/dist/cdn/{M6DR7QBF.js → ARCFSWJ6.js} +1 -1
  18. package/dist/cdn/{2JBJVGPJ.js → AX25AFSB.js} +1 -1
  19. package/dist/cdn/{SIUK7OO4.js → AYHK3JMP.js} +1 -1
  20. package/dist/cdn/{5BEMMNL7.js → BMPHKAGI.js} +1 -1
  21. package/dist/cdn/{YT2I5RUD.js → BS4VUABM.js} +1 -1
  22. package/dist/cdn/{RYRVUHB7.js → CLTYMWDG.js} +1 -1
  23. package/dist/cdn/{Y3CBLTF5.js → CVDB3QYI.js} +1 -1
  24. package/dist/cdn/{RQEYXUDW.js → CYPPGLZ3.js} +1 -1
  25. package/dist/cdn/{EIQZRLWQ.js → D2GJ4T5F.js} +1 -1
  26. package/dist/cdn/{NJJEOZ2G.js → DNJQPNJ3.js} +1 -1
  27. package/dist/cdn/{EKZZ7R2V.js → DV2GHKER.js} +1 -1
  28. package/dist/cdn/{2YCDW2EI.js → DYW2SU7R.js} +1 -1
  29. package/dist/cdn/{ZD3OZO6O.js → EMNCN6KS.js} +1 -1
  30. package/dist/cdn/{N6EQBPC2.js → FANNDI5E.js} +1 -1
  31. package/dist/cdn/{VEUUNFWR.js → FB22NJZE.js} +1 -1
  32. package/dist/cdn/{6QODI424.js → FCRKDTT7.js} +1 -1
  33. package/dist/cdn/{BA4FCDQY.js → FWQFXM4U.js} +1 -1
  34. package/dist/cdn/{MDHKDE77.js → GBI67V7K.js} +1 -1
  35. package/dist/cdn/{TAZIMIFF.js → GFTF6RL4.js} +1 -1
  36. package/dist/cdn/{XWJFP7BZ.js → I4Z6ZYWZ.js} +1 -1
  37. package/dist/cdn/{DY3BUOEI.js → I5NNLEMS.js} +1 -1
  38. package/dist/cdn/{RTVWZSKJ.js → IGVKJKZ2.js} +1 -1
  39. package/dist/cdn/{SQYHEYVJ.js → J3QFN6BO.js} +1 -1
  40. package/dist/cdn/J5QSDMW3.js +2 -0
  41. package/dist/cdn/{HNPTTIXC.js → KUAZAYII.js} +1 -1
  42. package/dist/cdn/{IHDRZQU4.js → LC7RF2LP.js} +1 -1
  43. package/dist/cdn/{33HIGVEX.js → LHEE2HNJ.js} +1 -1
  44. package/dist/cdn/{BGBLGDVO.js → LNSJ2ZWF.js} +1 -1
  45. package/dist/cdn/{7DOH2ZMP.js → M4JIHV72.js} +1 -1
  46. package/dist/cdn/{NARQQKRW.js → M4OFY7R4.js} +1 -1
  47. package/dist/cdn/{6HNQQRYK.js → N2A3DN7Q.js} +1 -1
  48. package/dist/cdn/{YE7JMYIB.js → NCDWEPYU.js} +1 -1
  49. package/dist/cdn/{6LSHZOMB.js → NCT25XQN.js} +1 -1
  50. package/dist/cdn/{5QP3RIEO.js → NWPFF4JA.js} +1 -1
  51. package/dist/cdn/{23DKMPGJ.js → OD3XSVPE.js} +1 -1
  52. package/dist/cdn/{YUWQWOOF.js → OFJ2VFW7.js} +1 -1
  53. package/dist/cdn/{RGFLXW4Q.js → OOQS6ORV.js} +1 -1
  54. package/dist/cdn/ORNE3UXL.js +2 -0
  55. package/dist/cdn/{QPRIL54J.js → OSIVL3Y2.js} +1 -1
  56. package/dist/cdn/{QZZ2CQWS.js → OX2MZA6F.js} +1 -1
  57. package/dist/cdn/{Z6NMQGEQ.js → P26AU4WZ.js} +1 -1
  58. package/dist/cdn/{TGH6D5IY.js → P37VIDKK.js} +1 -1
  59. package/dist/cdn/{VGIXK3YM.js → PKMTEIHQ.js} +1 -1
  60. package/dist/cdn/PXMCZFXG.js +2 -0
  61. package/dist/cdn/{EQXQ6YNY.js → QDB6OFX7.js} +1 -1
  62. package/dist/cdn/QP2PUPF2.js +2 -0
  63. package/dist/cdn/{W33YWBF5.js → RIYBW73O.js} +1 -1
  64. package/dist/cdn/{M2MN2QB7.js → RMAKST5E.js} +1 -1
  65. package/dist/cdn/{2ECRQJCU.js → RN52WDXY.js} +1 -1
  66. package/dist/cdn/{DV233ITZ.js → RPVEVHKH.js} +1 -1
  67. package/dist/cdn/{S42I3DOW.js → S5YGWXQI.js} +1 -1
  68. package/dist/cdn/{MJDNGEFJ.js → SQX3V4JQ.js} +1 -1
  69. package/dist/cdn/{MSGOASUF.js → SWWGEAN4.js} +1 -1
  70. package/dist/cdn/{RBCOT3CJ.js → T63EH4IH.js} +1 -1
  71. package/dist/cdn/{JSX7H42C.js → U5UZNUM3.js} +1 -1
  72. package/dist/cdn/{VVURRW2F.js → U6YFX3FW.js} +1 -1
  73. package/dist/cdn/{KUZQPBVI.js → UIUEU6HZ.js} +1 -1
  74. package/dist/cdn/{K7O46PDI.js → UJMP6BUY.js} +1 -1
  75. package/dist/cdn/{5YORDAVH.js → VDV3ULRF.js} +1 -1
  76. package/dist/cdn/{ZNG42S47.js → VQZ5PAL6.js} +1 -1
  77. package/dist/cdn/{LLIZZGSY.js → VSUINSCJ.js} +1 -1
  78. package/dist/cdn/{BADKNCL4.js → VYS6Q3TC.js} +1 -1
  79. package/dist/cdn/{EPMMVHPO.js → XDWBG3UR.js} +1 -1
  80. package/dist/cdn/{ZFSMRICA.js → XSUHVXCX.js} +1 -1
  81. package/dist/cdn/{BCTFO27G.js → YQYASRD5.js} +1 -1
  82. package/dist/cdn/{5G3AHODR.js → Z2OGHOS2.js} +1 -1
  83. package/dist/cdn/{ADJCIRZS.js → ZEEVP73V.js} +1 -1
  84. package/dist/cdn/index.js +1 -1
  85. package/dist/chunks/Auth.js +45 -27
  86. package/dist/chunks/cardFetchingUtils.js +11 -11
  87. package/dist/chunks/cardsHelpers.js +5 -5
  88. package/dist/chunks/getRelatedInfos.js +1 -1
  89. package/dist/chunks/{interfaces.js → helpers.js} +196 -196
  90. package/dist/chunks/runtime.js +1 -1
  91. package/dist/chunks/solution-deploy-dialog.js +1 -1
  92. package/dist/chunks/solutions-deploy-app-nav.js +70 -69
  93. package/dist/components/arcgis-solutions-assistant/customElement.js +20 -20
  94. package/dist/components/layer-table/customElement.js +1 -1
  95. package/dist/components/map-card/customElement.js +1 -1
  96. package/dist/components/solution-configure-titles/customElement.js +1 -1
  97. package/dist/components/solution-delete-dialog/customElement.js +1 -1
  98. package/dist/components/solution-deploy-dialog/customElement.js +1 -1
  99. package/dist/components/solution-deployed-card/customElement.js +1 -1
  100. package/dist/components/solution-deployed-card-panel/customElement.js +4 -4
  101. package/dist/components/solution-details-card/customElement.js +6 -6
  102. package/dist/components/solution-details-panel/customElement.js +5 -5
  103. package/dist/components/solution-resource-card/customElement.js +1 -1
  104. package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
  105. package/dist/components/solution-social-share/customElement.js +1 -1
  106. package/dist/components/solution-user-avatar/customElement.js +1 -1
  107. package/dist/components/solutions-all-panel/customElement.js +1 -1
  108. package/dist/components/solutions-all-shell/customElement.js +1 -1
  109. package/dist/components/solutions-deploy-app/customElement.js +8 -7
  110. package/dist/components/solutions-deploy-app-nav/customElement.js +1 -1
  111. package/dist/components/solutions-deployed-panel/customElement.js +1 -1
  112. package/dist/components/solutions-deployed-shell/customElement.js +1 -1
  113. package/dist/components/solutions-filter-panel/customElement.js +1 -1
  114. package/dist/components/solutions-searchsort-toolbar/customElement.js +1 -1
  115. package/dist/docs/api.json +1 -1
  116. package/dist/docs/docs.json +1 -1
  117. package/dist/docs/vscode.html-custom-data.json +1 -1
  118. package/dist/docs/web-types.json +1 -1
  119. package/dist/index.js +1 -1
  120. package/dist/solutions-components_commit.txt +7 -7
  121. package/dist/utils/Auth.d.ts +8 -1
  122. package/package.json +1 -1
  123. package/dist/cdn/4O4QS3DG.js +0 -2
  124. package/dist/cdn/5QSIKX2L.js +0 -2
  125. package/dist/cdn/BXKV2QC3.js +0 -2
  126. package/dist/cdn/SFZEAERJ.js +0 -2
  127. package/dist/cdn/TZPSZTAH.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as S}from"./JOQDD4HN.js";import"./JM5FJEHU.js";import c from"./5QSIKX2L.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as v}from"./EIQZRLWQ.js";import{F as p,G as r,H as I,J as f,h as y,i as l,l as m,r as d,u as g}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([F,x,P,,{c:w,j:M},{C:u,o:L}])=>{function k(n){return n?.indexOf("http://")!==-1}function b(n){return k(n)?n.replace(/^http:\/\//,"https://"):n}function T(n,e,i){return i&&i.forEach(a=>{n.allLayers.forEach(t=>{t&&t.url===a.sourceUrl&&(t.url=b(a.proxyUrl),t.portalItem&&t.portalItem.when(()=>{t.portalItem.url=b(a.proxyUrl)}),e.request?.interceptors?.push({urls:a.sourceUrl,before:s=>{s.url&&s.url===a.sourceUrl&&(s.url=b(a.proxyUrl))}}))})}),n}var V=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0;--calcite-block-padding: 0}.map-height{height:calc(100% - 53px)}.height-full{height:100%}.height-49-px{height:49px}.box-shadow{box-shadow:none!important}.visibility-hidden-1{visibility:hidden;height:1px}.hidden{visibility:hidden!important}.display-flex{display:flex}.display-none{display:none}.display-block{display:block}.absolute-right{position:absolute;right:0;left:unset}.esri-ui-inner-container.esri-ui-corner-container{direction:ltr}html[dir=rtl] .absolute-right{left:0;right:unset}.panel-header-override{--calcite-panel-header-content-space: 0px;--calcite-internal-panel-action-spacing: 0px !important}@media only screen and (max-width:1024px){.esri-zoom{display:none!important}}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,_=class extends I{constructor(){super(),this.defaultWebmapId="",this.defaultLayerId="",this.enableHome=!1,this.enableLegend=!1,this.enableLayerList=!0,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableShare=!1,this.enableMapLayerPicker=!1,this.enableMapPicker=!1,this.enableSingleExpand=!1,this.enableSearch=!1,this.enableBasemap=!1,this.featureSelectionMode="multiple",this.hide=!1,this.zoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-leading",this.mobileMapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.stackTools=!1,this.mapToolsOrder=[],this.mobileToolsOrder=[],this.isMapLayout=!1,this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.selectedFeaturesIds=[],this.showOnlyUpdatableLayers=!1,this.isMobile=!1,this.enableSelectionTool=!1,this.visibilityIcon="eyeball",this._configLayerOrderDefined=!1,this._translations=$({name:"map-card",blocking:!0}),this._toolInfos=[],this._filterActive=!1,this._layerIds=[],this._enabledLayerIds=[],this._defaultWebmapHonored=!1,this._loadedId="",this._mapDiv=p(),this._mapPicker=p(),this._mapTools=p(),this._mobMapTools=p(),this._mapLayerPicker=p(),this._selectedWebMapId="",this._isValidWebMap=!0,this.mapChanged=d(),this.beforeMapChanged=d(),this.toggleFilter=d(),this.clearSelection=d(),this.editMultipleFeatures=d(),this.listenOn(window,"mapInfoChange",this.mapInfoChange),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"idsFound",this._idsFound),this.enableSingleExpand=!0,this.stackTools=!0,S(window)}static{this.properties={appLayout:1,appProxies:1,defaultWebmapId:1,defaultLayerId:1,enableHome:5,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableShare:5,enableMapLayerPicker:5,enableMapPicker:5,enableSingleExpand:5,enableSearch:5,enableBasemap:5,featureSelectionMode:1,basemapConfig:0,hide:5,zoomToolsSize:1,mapInfos:0,mapWidgetsIndex:9,mapWidgetsPosition:1,mobileMapWidgetsPosition:1,mapWidgetsSize:1,mapView:0,stackTools:5,theme:1,mapToolsOrder:0,mobileToolsOrder:0,isMapLayout:5,shareIncludeEmbed:5,shareIncludeSocial:5,selectedFeaturesIds:0,selectedLayer:0,zoomToScale:9,showOnlyUpdatableLayers:5,isMobile:5,mapInfo:0,enableSelectionTool:5,visibilityIcon:1,_configLayerOrderDefined:16,_translations:16,_searchConfiguration:16,_webMapInfo:16,_toolInfos:16,_filterActive:16,_mapDivHeight:16,_mapDivWidth:16,_layerIds:16}}static{this.styles=V}static{this.shadowRootOptions=g}willUpdate(e){e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("selectedFeaturesIds")&&this.selectedFeaturesIdsWatchHandler()}appLayoutWatchHandler(){this._updateShareUrl()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=L(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder)}async mapViewWatchHandler(){this.mapView&&this._updateShareUrl()}async selectedFeaturesIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}async resetFilter(){this._filterActive=!1,this._updateShareUrl()}async updateFilterState(e){this._filterActive=e,this._updateShareUrl()}async updateLayer(){this._mapLayerPicker.value&&this._mapLayerPicker.value.updateLayer()}async mapInfoChange(e){this._selectedWebMapId=e.detail.id,await this._loadMap(e.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}layerSelectionChange(){setTimeout(()=>{this._initToolInfos()},50)}_idsFound(e){this._layerIds=e.detail}async load(){this._initToolInfos(),this._mapSizeObserver||(this._mapSizeObserver=new ResizeObserver(()=>{this._mapDivWidth&&this._mapDiv.value&&(this._mapDivWidth=this._mapDiv.value.offsetWidth)}))}render(){let e=this.hide?"visibility-hidden-1":"",i=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",a="height-full",t=this.isMapLayout?"":"display-none",s=this._isValidWebMap?"":"hidden",h=this.isMobile?"":"hidden",o=this.enableMapPicker&&this.mapInfos.length>1,c=this.enableMapLayerPicker&&this._layerIds.length>1;return this._handleMapVisibility(),this._validateActiveActions(),l`<calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker()}${this._getHeaderActions()}<div slot=header-actions-end>${this.enableShare&&this.isMapLayout?this._getShare("share"):void 0}</div><calcite-progress class=${f(t)} value=0></calcite-progress><div class=${`${e} ${a}`}><div class="height-full" ${r(this._mapDiv)}></div></div>${l`<map-tools .basemapConfig=${this.basemapConfig} class=${`box-shadow ${i} ${s}`} .defaultLayerId=${this.defaultLayerId} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSingleExpand=${this.enableSingleExpand} .enableSelectionTool=${this.enableSelectionTool} .isMobile=${this.isMobile} .parentComponentHeight=${this._mapDivHeight} .parentComponentWidth=${this._mapDivWidth} .zoomToolsSize=${this.zoomToolsSize} layout=horizontal .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .position=${this.mapWidgetsPosition} .selectedFeaturesIds=${this.selectedFeaturesIds} .selectedLayer=${this.selectedLayer} .searchConfiguration=${this._searchConfiguration} .stackTools=${this.stackTools} .toolOrder=${this.mapToolsOrder} .visibilityIcon=${this.visibilityIcon} ${r(this._mapTools)}></map-tools><map-tools class=${`box-shadow ${i} ${h}`} .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this._enabledLayerIds} .enableMapLayerPicker=${c} .enableMapPicker=${o} .isMobile=${this.isMobile} .zoomToolsSize=${this.zoomToolsSize} layout=vertical .mapInfos=${this.mapInfos} .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .parentComponentHeight=${this._mapDivHeight} .position=${this.mobileMapWidgetsPosition} .selectedLayer=${this.selectedLayer} .selectedWebMapId=${this._selectedWebMapId} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} .stackTools=${this.stackTools} .toolOrder=${this.mobileToolsOrder} ${r(this._mobMapTools)}></map-tools>`}</calcite-panel>`}updated(){this._mapDivHeight=this._mapDiv.value?.offsetHeight??0,document.onclick=e=>this._handleDocumentClick(e)}loaded(){this._mapDiv.value&&this._mapSizeObserver?.observe(this._mapDiv.value),this._updateShareUrl()}async _loadMap(e){let i=!this._defaultWebmapHonored&&this.defaultWebmapId,a=this.mapInfos?.filter(o=>o.id===this.defaultWebmapId),t=JSON.stringify(e)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&a?a[0]:!e?.id&&this.mapInfos.length>0?this.mapInfos[0]:e;let s=this._webMapInfo.id,h=i&&e?.id===this.defaultWebmapId;if(this._loadedId!==s&&!i||h){let o=new P({portalItem:{id:s}});try{o&&await o.load(),this.appProxies&&o&&await T(o,F,this.appProxies),this.mapView=new x({container:this._mapDiv.value,map:o,resizeAlign:"center"}),this._loadedId=s,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapView&&await this.mapView.when(()=>{this.mapView&&(this._mapDivWidth=this._mapDiv.value&&this._mapDiv.value.offsetWidth,this._mapTools.value&&this.mapView.ui.add(this._mapTools.value,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._mobMapTools.value&&this.mapView.ui.add(this._mobMapTools.value,{position:this.mobileMapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=h?!0:this._defaultWebmapHonored,this._isValidWebMap=!0,this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}),this.isMobile||document.getElementsByClassName("esri-zoom")[0]?.classList.remove("display-none"))})}catch(c){console.error(c),this._loadedId=s,this._isValidWebMap=!1,this.mapChanged.emit({id:s,mapView:void 0,isValid:!1}),document.getElementsByClassName("esri-zoom")[0]?.classList.add("display-none");return}}else i?(this._defaultWebmapHonored=!0,this._mapPicker.value&&this._mapPicker.value.setMapByID(s)):t&&this.mapView&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}));this._updateShareUrl()}_getMapLayerPicker(){let e=this.isMapLayout?"header-actions-start":"",i=this.mapInfos?.length>1?"":"display-none",a=this.isMapLayout?"height-0":"width-full",t="display-flex",s=this.isMapLayout?"":"display-none";return l`${!this.isMobile&&l`<div slot=${e??m}><map-picker class=${`${i} ${a}`} id=map-picker .isMapLayout=${this.isMapLayout} .mapInfos=${this.mapInfos} .selectedWebMapId=${this._selectedWebMapId} ${r(this._mapPicker)}></map-picker></div>`||""}<div slot=header-actions-start class=${`mapView-header display-flex ${s}`} id=solutions-map-layer-picker-container><div class=${`border-end ${t}`}>${this.mapView&&l`<map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-single-layer-as-label show-tables show-tables-disabled type=dropdown ${r(this._mapLayerPicker)}></map-layer-picker>`||""}</div></div>`}_getHeaderActions(){return l`<div slot=header-content><calcite-action-bar class=${f("display-flex")} expand-disabled expanded id=${this._getId("bar")??m} layout=horizontal><calcite-action-group>${this.isMapLayout?this._getActions():void 0}</calcite-action-group></calcite-action-bar></div>`}_getShare(e){return l`<div class="share-action" id=${this._getId(e)??m}>${this.mapView&&l`<instant-apps-social-share class="instant-app-share" .embed=${this.shareIncludeEmbed} flip-rtl popover-button-icon-scale=s scale=m share-button-color=neutral share-button-type=action .socialMedia=${this.shareIncludeSocial} .view=${this.mapView} ${r(i=>{i&&(this._shareNode=i,this._updateShareUrl())})}></instant-apps-social-share>`||""}${this._getToolTip("bottom",`map-${e}`,this._translations?.share)}</div>`}_updateShareUrl(){let e=this._shareNode?.shareUrl;if(!e)return;let i=new URL(e);this._loadedId?i.searchParams.set("webmap",this._loadedId):i.searchParams.delete("webmap"),this.selectedLayer?.id?i.searchParams.set("layer",this.selectedLayer.id):i.searchParams.delete("layer"),this.selectedFeaturesIds?.length>0?i.searchParams.set("oid",this.selectedFeaturesIds.join(",")):i.searchParams.delete("oid"),this.appLayout&&i.searchParams.set("applayout",this.appLayout),this._shareNode&&(this._shareNode.autoUpdateShareUrl=!1,this._shareNode.shareUrl=i.href)}_initToolInfos(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=this.featureSelectionMode==="multiple"&&this.selectedLayer?.capabilities?.operations.supportsUpdate,t=[];t.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>{this._toggleFilter()},disabled:!1,toolTip:this._translations.filters}),t.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>{this._zoom()},disabled:!e,toolTip:this._translations.zoom}),a&&t.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this.selectedFeaturesIds),disabled:i,toolTip:this._translations.editMultiple}),t.push({active:!1,icon:"refresh",indicator:!1,label:this._translations.refresh,func:()=>this.selectedLayer?.refresh(),disabled:!1,toolTip:this._translations.refresh}),t.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this.clearSelection.emit(),disabled:!e,toolTip:this._translations.clearSelection}),this._toolInfos=[...t]}_validateActiveActions(){let e=["filter"];this._toolInfos?.forEach(i=>{i&&e.indexOf(i.icon)>-1&&i.icon==="filter"&&(i.indicator=this._filterActive)})}_handleMapVisibility(){if(this._mapDiv.value){let e=this._mapDiv.value.getElementsByClassName("esri-view-surface")[0],i=this._mapDiv.value.getElementsByClassName("esri-attribution")[0];this._isValidWebMap?(e?.classList.remove("hidden"),i?.classList.remove("hidden")):(e?.classList.add("hidden"),i?.classList.add("hidden"))}}_validateEnabledActions(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=["zoom-to-object","pencil","erase"];this._toolInfos?.forEach(t=>{t&&a.indexOf(t.icon)>-1&&(t.disabled=t.icon==="pencil"?i:!e,t.toolTip=t.icon==="pencil"?this.selectedFeaturesIds.length>u?this._translations.featureEditLimitNotice:this._translations.editMultiple:t.toolTip)})}_handleDocumentClick(e){e.target.tagName!=="MAP-PICKER"&&this._mapPicker.value&&this._mapPicker.value.close()}async _zoom(){if(this.selectedLayer&&this.mapView){let e=await w(this.mapView,this.selectedLayer.id);e&&await M(this.selectedFeaturesIds,e,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_getActions(){return this._toolInfos?.reduce((e,i)=>(i&&e.push(this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,i.toolTip)),e),[])}_getToolTip(e,i,a){return l`<calcite-tooltip .placement=${e} .referenceElement=${i}><span>${a}</span></calcite-tooltip>`}_getAction(e,i,a,t,s,h,o,c){let W=this.selectedLayer===void 0?!0:h;return l`<calcite-action .active=${e} appearance=solid .disabled=${W} .icon=${i} .id=${`map-${i}`} .indicator=${a} .label=${t} .loading=${o} @click=${s} .text=${t} text-enabled></calcite-action>${this._getToolTip("auto",`map-${i}`,c)}`}_getId(e){return`solutions-action-${e}`}};v("map-card",_);return _},"config","views/MapView","WebMap",a,b,c)
2
+ import{a as S}from"./JOQDD4HN.js";import"./JM5FJEHU.js";import c from"./ORNE3UXL.js";import"./PZ4L77M5.js";import"./JE7L7M3J.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import{a as $}from"./RPVEVHKH.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as v}from"./D2GJ4T5F.js";import{F as p,G as r,H as I,J as f,h as y,i as l,l as m,r as d,u as g}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([F,x,P,,{c:w,j:M},{G:L,k:u}])=>{function k(n){return n?.indexOf("http://")!==-1}function b(n){return k(n)?n.replace(/^http:\/\//,"https://"):n}function T(n,e,i){return i&&i.forEach(a=>{n.allLayers.forEach(t=>{t&&t.url===a.sourceUrl&&(t.url=b(a.proxyUrl),t.portalItem&&t.portalItem.when(()=>{t.portalItem.url=b(a.proxyUrl)}),e.request?.interceptors?.push({urls:a.sourceUrl,before:s=>{s.url&&s.url===a.sourceUrl&&(s.url=b(a.proxyUrl))}}))})}),n}var V=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0;--calcite-block-padding: 0}.map-height{height:calc(100% - 53px)}.height-full{height:100%}.height-49-px{height:49px}.box-shadow{box-shadow:none!important}.visibility-hidden-1{visibility:hidden;height:1px}.hidden{visibility:hidden!important}.display-flex{display:flex}.display-none{display:none}.display-block{display:block}.absolute-right{position:absolute;right:0;left:unset}.esri-ui-inner-container.esri-ui-corner-container{direction:ltr}html[dir=rtl] .absolute-right{left:0;right:unset}.panel-header-override{--calcite-panel-header-content-space: 0px;--calcite-internal-panel-action-spacing: 0px !important}@media only screen and (max-width:1024px){.esri-zoom{display:none!important}}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,_=class extends I{constructor(){super(),this.defaultWebmapId="",this.defaultLayerId="",this.enableHome=!1,this.enableLegend=!1,this.enableLayerList=!0,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableShare=!1,this.enableMapLayerPicker=!1,this.enableMapPicker=!1,this.enableSingleExpand=!1,this.enableSearch=!1,this.enableBasemap=!1,this.featureSelectionMode="multiple",this.hide=!1,this.zoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-leading",this.mobileMapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.stackTools=!1,this.mapToolsOrder=[],this.mobileToolsOrder=[],this.isMapLayout=!1,this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.selectedFeaturesIds=[],this.showOnlyUpdatableLayers=!1,this.isMobile=!1,this.enableSelectionTool=!1,this.visibilityIcon="eyeball",this._configLayerOrderDefined=!1,this._translations=$({name:"map-card",blocking:!0}),this._toolInfos=[],this._filterActive=!1,this._layerIds=[],this._enabledLayerIds=[],this._defaultWebmapHonored=!1,this._loadedId="",this._mapDiv=p(),this._mapPicker=p(),this._mapTools=p(),this._mobMapTools=p(),this._mapLayerPicker=p(),this._selectedWebMapId="",this._isValidWebMap=!0,this.mapChanged=d(),this.beforeMapChanged=d(),this.toggleFilter=d(),this.clearSelection=d(),this.editMultipleFeatures=d(),this.listenOn(window,"mapInfoChange",this.mapInfoChange),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"idsFound",this._idsFound),this.enableSingleExpand=!0,this.stackTools=!0,S(window)}static{this.properties={appLayout:1,appProxies:1,defaultWebmapId:1,defaultLayerId:1,enableHome:5,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableShare:5,enableMapLayerPicker:5,enableMapPicker:5,enableSingleExpand:5,enableSearch:5,enableBasemap:5,featureSelectionMode:1,basemapConfig:0,hide:5,zoomToolsSize:1,mapInfos:0,mapWidgetsIndex:9,mapWidgetsPosition:1,mobileMapWidgetsPosition:1,mapWidgetsSize:1,mapView:0,stackTools:5,theme:1,mapToolsOrder:0,mobileToolsOrder:0,isMapLayout:5,shareIncludeEmbed:5,shareIncludeSocial:5,selectedFeaturesIds:0,selectedLayer:0,zoomToScale:9,showOnlyUpdatableLayers:5,isMobile:5,mapInfo:0,enableSelectionTool:5,visibilityIcon:1,_configLayerOrderDefined:16,_translations:16,_searchConfiguration:16,_webMapInfo:16,_toolInfos:16,_filterActive:16,_mapDivHeight:16,_mapDivWidth:16,_layerIds:16}}static{this.styles=V}static{this.shadowRootOptions=g}willUpdate(e){e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("selectedFeaturesIds")&&this.selectedFeaturesIdsWatchHandler()}appLayoutWatchHandler(){this._updateShareUrl()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=L(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder)}async mapViewWatchHandler(){this.mapView&&this._updateShareUrl()}async selectedFeaturesIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}async resetFilter(){this._filterActive=!1,this._updateShareUrl()}async updateFilterState(e){this._filterActive=e,this._updateShareUrl()}async updateLayer(){this._mapLayerPicker.value&&this._mapLayerPicker.value.updateLayer()}async mapInfoChange(e){this._selectedWebMapId=e.detail.id,await this._loadMap(e.detail)}noLayersFound(){this.selectedLayer=void 0,this.selectedFeaturesIds=[]}layerSelectionChange(){setTimeout(()=>{this._initToolInfos()},50)}_idsFound(e){this._layerIds=e.detail}async load(){this._initToolInfos(),this._mapSizeObserver||(this._mapSizeObserver=new ResizeObserver(()=>{this._mapDivWidth&&this._mapDiv.value&&(this._mapDivWidth=this._mapDiv.value.offsetWidth)}))}render(){let e=this.hide?"visibility-hidden-1":"",i=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",a="height-full",t=this.isMapLayout?"":"display-none",s=this._isValidWebMap?"":"hidden",h=this.isMobile?"":"hidden",o=this.enableMapPicker&&this.mapInfos.length>1,c=this.enableMapLayerPicker&&this._layerIds.length>1;return this._handleMapVisibility(),this._validateActiveActions(),l`<calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker()}${this._getHeaderActions()}<div slot=header-actions-end>${this.enableShare&&this.isMapLayout?this._getShare("share"):void 0}</div><calcite-progress class=${f(t)} value=0></calcite-progress><div class=${`${e} ${a}`}><div class="height-full" ${r(this._mapDiv)}></div></div>${l`<map-tools .basemapConfig=${this.basemapConfig} class=${`box-shadow ${i} ${s}`} .defaultLayerId=${this.defaultLayerId} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSingleExpand=${this.enableSingleExpand} .enableSelectionTool=${this.enableSelectionTool} .isMobile=${this.isMobile} .parentComponentHeight=${this._mapDivHeight} .parentComponentWidth=${this._mapDivWidth} .zoomToolsSize=${this.zoomToolsSize} layout=horizontal .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .position=${this.mapWidgetsPosition} .selectedFeaturesIds=${this.selectedFeaturesIds} .selectedLayer=${this.selectedLayer} .searchConfiguration=${this._searchConfiguration} .stackTools=${this.stackTools} .toolOrder=${this.mapToolsOrder} .visibilityIcon=${this.visibilityIcon} ${r(this._mapTools)}></map-tools><map-tools class=${`box-shadow ${i} ${h}`} .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this._enabledLayerIds} .enableMapLayerPicker=${c} .enableMapPicker=${o} .isMobile=${this.isMobile} .zoomToolsSize=${this.zoomToolsSize} layout=vertical .mapInfos=${this.mapInfos} .mapView=${this.mapView} .mapWidgetsSize=${this.mapWidgetsSize} .parentComponentHeight=${this._mapDivHeight} .position=${this.mobileMapWidgetsPosition} .selectedLayer=${this.selectedLayer} .selectedWebMapId=${this._selectedWebMapId} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} .stackTools=${this.stackTools} .toolOrder=${this.mobileToolsOrder} ${r(this._mobMapTools)}></map-tools>`}</calcite-panel>`}updated(){this._mapDivHeight=this._mapDiv.value?.offsetHeight??0,document.onclick=e=>this._handleDocumentClick(e)}loaded(){this._mapDiv.value&&this._mapSizeObserver?.observe(this._mapDiv.value),this._updateShareUrl()}async _loadMap(e){let i=!this._defaultWebmapHonored&&this.defaultWebmapId,a=this.mapInfos?.filter(o=>o.id===this.defaultWebmapId),t=JSON.stringify(e)!==JSON.stringify(this._webMapInfo);this._webMapInfo=i&&a?a[0]:!e?.id&&this.mapInfos.length>0?this.mapInfos[0]:e;let s=this._webMapInfo.id,h=i&&e?.id===this.defaultWebmapId;if(this._loadedId!==s&&!i||h){let o=new P({portalItem:{id:s}});try{o&&await o.load(),this.appProxies&&o&&await T(o,F,this.appProxies),this.mapView=new x({container:this._mapDiv.value,map:o,resizeAlign:"center"}),this._loadedId=s,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapView&&await this.mapView.when(()=>{this.mapView&&(this._mapDivWidth=this._mapDiv.value&&this._mapDiv.value.offsetWidth,this._mapTools.value&&this.mapView.ui.add(this._mapTools.value,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._mobMapTools.value&&this.mapView.ui.add(this._mobMapTools.value,{position:this.mobileMapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=h?!0:this._defaultWebmapHonored,this._isValidWebMap=!0,this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}),this.isMobile||document.getElementsByClassName("esri-zoom")[0]?.classList.remove("display-none"))})}catch(c){console.error(c),this._loadedId=s,this._isValidWebMap=!1,this.mapChanged.emit({id:s,mapView:void 0,isValid:!1}),document.getElementsByClassName("esri-zoom")[0]?.classList.add("display-none");return}}else i?(this._defaultWebmapHonored=!0,this._mapPicker.value&&this._mapPicker.value.setMapByID(s)):t&&this.mapView&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:s,mapView:this.mapView,isValid:!0}));this._updateShareUrl()}_getMapLayerPicker(){let e=this.isMapLayout?"header-actions-start":"",i=this.mapInfos?.length>1?"":"display-none",a=this.isMapLayout?"height-0":"width-full",t="display-flex",s=this.isMapLayout?"":"display-none";return l`${!this.isMobile&&l`<div slot=${e??m}><map-picker class=${`${i} ${a}`} id=map-picker .isMapLayout=${this.isMapLayout} .mapInfos=${this.mapInfos} .selectedWebMapId=${this._selectedWebMapId} ${r(this._mapPicker)}></map-picker></div>`||""}<div slot=header-actions-start class=${`mapView-header display-flex ${s}`} id=solutions-map-layer-picker-container><div class=${`border-end ${t}`}>${this.mapView&&l`<map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-single-layer-as-label show-tables show-tables-disabled type=dropdown ${r(this._mapLayerPicker)}></map-layer-picker>`||""}</div></div>`}_getHeaderActions(){return l`<div slot=header-content><calcite-action-bar class=${f("display-flex")} expand-disabled expanded id=${this._getId("bar")??m} layout=horizontal><calcite-action-group>${this.isMapLayout?this._getActions():void 0}</calcite-action-group></calcite-action-bar></div>`}_getShare(e){return l`<div class="share-action" id=${this._getId(e)??m}>${this.mapView&&l`<instant-apps-social-share class="instant-app-share" .embed=${this.shareIncludeEmbed} flip-rtl popover-button-icon-scale=s scale=m share-button-color=neutral share-button-type=action .socialMedia=${this.shareIncludeSocial} .view=${this.mapView} ${r(i=>{i&&(this._shareNode=i,this._updateShareUrl())})}></instant-apps-social-share>`||""}${this._getToolTip("bottom",`map-${e}`,this._translations?.share)}</div>`}_updateShareUrl(){let e=this._shareNode?.shareUrl;if(!e)return;let i=new URL(e);this._loadedId?i.searchParams.set("webmap",this._loadedId):i.searchParams.delete("webmap"),this.selectedLayer?.id?i.searchParams.set("layer",this.selectedLayer.id):i.searchParams.delete("layer"),this.selectedFeaturesIds?.length>0?i.searchParams.set("oid",this.selectedFeaturesIds.join(",")):i.searchParams.delete("oid"),this.appLayout&&i.searchParams.set("applayout",this.appLayout),this._shareNode&&(this._shareNode.autoUpdateShareUrl=!1,this._shareNode.shareUrl=i.href)}_initToolInfos(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=this.featureSelectionMode==="multiple"&&this.selectedLayer?.capabilities?.operations.supportsUpdate,t=[];t.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>{this._toggleFilter()},disabled:!1,toolTip:this._translations.filters}),t.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>{this._zoom()},disabled:!e,toolTip:this._translations.zoom}),a&&t.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this.selectedFeaturesIds),disabled:i,toolTip:this._translations.editMultiple}),t.push({active:!1,icon:"refresh",indicator:!1,label:this._translations.refresh,func:()=>this.selectedLayer?.refresh(),disabled:!1,toolTip:this._translations.refresh}),t.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this.clearSelection.emit(),disabled:!e,toolTip:this._translations.clearSelection}),this._toolInfos=[...t]}_validateActiveActions(){let e=["filter"];this._toolInfos?.forEach(i=>{i&&e.indexOf(i.icon)>-1&&i.icon==="filter"&&(i.indicator=this._filterActive)})}_handleMapVisibility(){if(this._mapDiv.value){let e=this._mapDiv.value.getElementsByClassName("esri-view-surface")[0],i=this._mapDiv.value.getElementsByClassName("esri-attribution")[0];this._isValidWebMap?(e?.classList.remove("hidden"),i?.classList.remove("hidden")):(e?.classList.add("hidden"),i?.classList.add("hidden"))}}_validateEnabledActions(){let e=this.selectedFeaturesIds.length>0,i=this.selectedFeaturesIds.length<2||this.selectedFeaturesIds.length>u,a=["zoom-to-object","pencil","erase"];this._toolInfos?.forEach(t=>{t&&a.indexOf(t.icon)>-1&&(t.disabled=t.icon==="pencil"?i:!e,t.toolTip=t.icon==="pencil"?this.selectedFeaturesIds.length>u?this._translations.featureEditLimitNotice:this._translations.editMultiple:t.toolTip)})}_handleDocumentClick(e){e.target.tagName!=="MAP-PICKER"&&this._mapPicker.value&&this._mapPicker.value.close()}async _zoom(){if(this.selectedLayer&&this.mapView){let e=await w(this.mapView,this.selectedLayer.id);e&&await M(this.selectedFeaturesIds,e,this.mapView,!0,void 0,this.zoomToScale)}}async _toggleFilter(){this.toggleFilter.emit()}_getActions(){return this._toolInfos?.reduce((e,i)=>(i&&e.push(this._getAction(i.active,i.icon,i.indicator,i.label,i.func,i.disabled,i.loading,i.toolTip)),e),[])}_getToolTip(e,i,a){return l`<calcite-tooltip .placement=${e} .referenceElement=${i}><span>${a}</span></calcite-tooltip>`}_getAction(e,i,a,t,s,h,o,c){let W=this.selectedLayer===void 0?!0:h;return l`<calcite-action .active=${e} appearance=solid .disabled=${W} .icon=${i} .id=${`map-${i}`} .indicator=${a} .label=${t} .loading=${o} @click=${s} .text=${t} text-enabled></calcite-action>${this._getToolTip("auto",`map-${i}`,c)}`}_getId(e){return`solutions-action-${e}`}};v("map-card",_);return _},"config","views/MapView","WebMap",a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import c from"./RYRVUHB7.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import"./JE7L7M3J.js";import a from"./UUYUTETH.js";import{a as d}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as g}from"./EIQZRLWQ.js";import{F as p,G as o,H as b,h as n,i as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{b:P,c:m}])=>{var c=[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}],u=Object.freeze(Object.defineProperty({__proto__:null,default:c},Symbol.toStringTag,{value:"Module"})),y=n`:host{display:block}`,s=class extends b{constructor(){super(...arguments),this.disabled=!1,this._translations=d({name:"pdf-download",blocking:!0}),this._labelInfoElement=p()}static{this.properties={defaultNumLabelsPerPage:9,disabled:5,_translations:16}}static{this.styles=y}async downloadCSV(a,e,l,t=!0){return P(a,e,!0,l,t)}async downloadPDF(a,e,l=!1,t="",i=""){let h=this._labelInfoElement.value?this._labelInfoElement.value.selectedOption?.value:"";return m(a,e,h,l,t,i)}render(){return r`<calcite-select .disabled=${this.disabled} label ${o(this._labelInfoElement)}>${this._renderOptions()}</calcite-select>`}_getLabelSizeText(a){let e=a.descriptionPDF.labelsPerPageDisplay,l=a.descriptionPDF.labelWidthDisplay+" x "+a.descriptionPDF.labelHeightDisplay;return this._translations.pdfLabel?this._translations.pdfLabel.replace("{{n}}",e).replace("{{labelSize}}",l):""}_renderOptions(){let a=u;return(a.default||a).sort((e,l)=>{let t=Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10),i=Number.parseInt(l.descriptionPDF.labelsPerPageDisplay,10);return t<i?-1:t>i?1:0}).map((e,l)=>{let t=!1;return(this.defaultNumLabelsPerPage?Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:l===0)&&(t=!0),r`<calcite-option .selected=${t} .value=${e}>${this._getLabelSizeText(e)}</calcite-option>`})}};g("pdf-download",s);return s},a,c)
2
+ import c from"./CLTYMWDG.js";import"./MQF26HKA.js";import"./G4VIPBRX.js";import"./JE7L7M3J.js";import a from"./UUYUTETH.js";import{a as d}from"./RPVEVHKH.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as g}from"./D2GJ4T5F.js";import{F as p,G as o,H as b,h as n,i as r}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,{b:P,c:m}])=>{var c=[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}],u=Object.freeze(Object.defineProperty({__proto__:null,default:c},Symbol.toStringTag,{value:"Module"})),y=n`:host{display:block}`,s=class extends b{constructor(){super(...arguments),this.disabled=!1,this._translations=d({name:"pdf-download",blocking:!0}),this._labelInfoElement=p()}static{this.properties={defaultNumLabelsPerPage:9,disabled:5,_translations:16}}static{this.styles=y}async downloadCSV(a,e,l,t=!0){return P(a,e,!0,l,t)}async downloadPDF(a,e,l=!1,t="",i=""){let h=this._labelInfoElement.value?this._labelInfoElement.value.selectedOption?.value:"";return m(a,e,h,l,t,i)}render(){return r`<calcite-select .disabled=${this.disabled} label ${o(this._labelInfoElement)}>${this._renderOptions()}</calcite-select>`}_getLabelSizeText(a){let e=a.descriptionPDF.labelsPerPageDisplay,l=a.descriptionPDF.labelWidthDisplay+" x "+a.descriptionPDF.labelHeightDisplay;return this._translations.pdfLabel?this._translations.pdfLabel.replace("{{n}}",e).replace("{{labelSize}}",l):""}_renderOptions(){let a=u;return(a.default||a).sort((e,l)=>{let t=Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10),i=Number.parseInt(l.descriptionPDF.labelsPerPageDisplay,10);return t<i?-1:t>i?1:0}).map((e,l)=>{let t=!1;return(this.defaultNumLabelsPerPage?Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:l===0)&&(t=!0),r`<calcite-option .selected=${t} .value=${e}>${this._getLabelSizeText(e)}</calcite-option>`})}};g("pdf-download",s);return s},a,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as o}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as d}from"./EIQZRLWQ.js";import{H as n,h as l,i as e,l as a,r as t}from"./46DQNAMV.js";import"./OR4HXHSY.js";var h=l`:host{display:block}`,s=class extends n{constructor(){super(...arguments),this.buttonType="button",this.disabled=!1,this.ids=[],this.showDeleteCount=!0,this._confirmDelete=!1,this._deleteEndabled=!1,this._supportsDelete=!1,this._translations=o({name:"delete-button",blocking:!0}),this.editsComplete=t(),this.deleteClicked=t()}static{this.properties={deleteDialog:1,buttonType:1,disabled:5,icon:1,ids:0,layer:0,showDeleteCount:5,_confirmDelete:16,_deleteEndabled:16,_supportsDelete:16,_translations:16}}static{this.styles=h}willUpdate(i){i.has("ids")&&(this.hasUpdated||this.ids?.length>0)&&this.idsWatchHandler(),i.has("layer")&&this.layerWatchHandler()}async idsWatchHandler(){this._setDeleteEnabled()}async layerWatchHandler(){this._setDeleteEnabled()}render(){return e`${this.buttonType==="button"?e`<calcite-button appearance=outline .disabled=${!this._deleteEndabled} id=solutions-delete kind=danger @click=${()=>this._delete()} width=full>${this.showDeleteCount?this._translations.deleteCount?.replace("{{n}}",this.ids?.length.toString()):this._translations.delete}</calcite-button>`:e`<calcite-action appearance=solid .disabled=${!this._deleteEndabled} id=${this.icon??a} @click=${()=>this._delete()} scale=s .text=${this._translations.delete}><calcite-button appearance=transparent .iconStart=${this.icon} kind=danger>${this._translations.delete}</calcite-button></calcite-action>`}${this._deleteMessage()}<calcite-tooltip placement=bottom .referenceElement=${this.buttonType==="button"?"solutions-delete":this.icon}><span>${this._translations.delete}</span></calcite-tooltip>`}loaded(){this._setDeleteEnabled()}_setDeleteEnabled(){this._supportsDelete=!!(this.layer?.editingEnabled&&this.layer?.capabilities?.operations?.supportsDelete),this._deleteEndabled=!this.disabled||this._supportsDelete&&this.ids?.length>0}_delete(){this.deleteClicked.emit(),this._confirmDelete=!0}_deleteMessage(){return this.deleteDialog?this.deleteDialog:e`<delete-dialog id=solution-delete-dialog .ids=${this.ids} .layer=${this.layer} @deleteDialogClose=${()=>this._confirmDelete=!1} .open=${this._confirmDelete}></delete-dialog>`}};d("delete-button",s);export{s as DeleteButton};
2
+ import{a as o}from"./RPVEVHKH.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as d}from"./D2GJ4T5F.js";import{H as n,h as l,i as e,l as a,r as t}from"./46DQNAMV.js";import"./OR4HXHSY.js";var h=l`:host{display:block}`,s=class extends n{constructor(){super(...arguments),this.buttonType="button",this.disabled=!1,this.ids=[],this.showDeleteCount=!0,this._confirmDelete=!1,this._deleteEndabled=!1,this._supportsDelete=!1,this._translations=o({name:"delete-button",blocking:!0}),this.editsComplete=t(),this.deleteClicked=t()}static{this.properties={deleteDialog:1,buttonType:1,disabled:5,icon:1,ids:0,layer:0,showDeleteCount:5,_confirmDelete:16,_deleteEndabled:16,_supportsDelete:16,_translations:16}}static{this.styles=h}willUpdate(i){i.has("ids")&&(this.hasUpdated||this.ids?.length>0)&&this.idsWatchHandler(),i.has("layer")&&this.layerWatchHandler()}async idsWatchHandler(){this._setDeleteEnabled()}async layerWatchHandler(){this._setDeleteEnabled()}render(){return e`${this.buttonType==="button"?e`<calcite-button appearance=outline .disabled=${!this._deleteEndabled} id=solutions-delete kind=danger @click=${()=>this._delete()} width=full>${this.showDeleteCount?this._translations.deleteCount?.replace("{{n}}",this.ids?.length.toString()):this._translations.delete}</calcite-button>`:e`<calcite-action appearance=solid .disabled=${!this._deleteEndabled} id=${this.icon??a} @click=${()=>this._delete()} scale=s .text=${this._translations.delete}><calcite-button appearance=transparent .iconStart=${this.icon} kind=danger>${this._translations.delete}</calcite-button></calcite-action>`}${this._deleteMessage()}<calcite-tooltip placement=bottom .referenceElement=${this.buttonType==="button"?"solutions-delete":this.icon}><span>${this._translations.delete}</span></calcite-tooltip>`}loaded(){this._setDeleteEnabled()}_setDeleteEnabled(){this._supportsDelete=!!(this.layer?.editingEnabled&&this.layer?.capabilities?.operations?.supportsDelete),this._deleteEndabled=!this.disabled||this._supportsDelete&&this.ids?.length>0}_delete(){this.deleteClicked.emit(),this._confirmDelete=!0}_deleteMessage(){return this.deleteDialog?this.deleteDialog:e`<delete-dialog id=solution-delete-dialog .ids=${this.ids} .layer=${this.layer} @deleteDialogClose=${()=>this._confirmDelete=!1} .open=${this._confirmDelete}></delete-dialog>`}};d("delete-button",s);export{s as DeleteButton};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as b}from"./DV233ITZ.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as _}from"./EIQZRLWQ.js";import{H as p,J as w,h as m,i as h,r,u}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([g,n])=>{var y=m`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar,.display-none{display:none!important}.esri-editor__panel-content{padding-block:10px!important}.notice-msg{padding:10px;width:calc(100% - 20px)}}`,c=class extends p{constructor(){super(...arguments),this.customizeSubmit=!1,this.enableSnapping=!1,this.showGuidingMsg=!0,this._editorLoading=!1,this._translations=b({name:"create-related-feature",blocking:!0}),this._addingAttachment=!1,this._isSubmitBtnClicked=!1,this.success=r(),this.fail=r(),this.isActionPending=r(),this.formReady=r()}static{this.properties={customizeSubmit:5,enableSnapping:5,mapView:0,selectedFeature:0,showGuidingMsg:5,table:0,_editorLoading:16,_translations:16}}static{this.styles=y}static{this.shadowRootOptions=u}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("_editorLoading")&&(this.hasUpdated||this._editorLoading!==!1)&&this._editorLoadingWatchHandler(this._editorLoading)}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this.init()})}async _editorLoadingWatchHandler(t){t&&(this._container?.classList.add("display-none"),await this.startCreate(),this._container?.classList.remove("display-none"),this._editorLoading=!1)}async submit(){this._editor?.viewModel?.featureFormViewModel&&(this._isSubmitBtnClicked=!0,this._editor.viewModel.featureFormViewModel.submit())}async init(){this.mapView&&await this.createEditorWidget()}render(){let t=this._editorLoading?"":"display-none";return h`${this.showGuidingMsg&&h`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>`||""}<calcite-loader class=${w(t)} label scale=s></calcite-loader>`}loaded(){this.init()}disconnectedCallback(){super.disconnectedCallback(),this._editor&&this._editor.destroy()}async createEditorWidget(){this._editor&&this._editor.destroy(),this._container=document.createElement("div"),this._container?.classList.add("display-none"),this.enableSnapping||this._container.classList.add("hide-editor-toolbar"),this._editor=new g({view:this.mapView,visibleElements:{flow:!0,settingsMenu:this.enableSnapping,sketch:!1,snappingControls:this.enableSnapping},container:this._container}),this.el.appendChild(this._container);let t=n.watch(()=>this._editor?.viewModel.featureTemplatesViewModel.state,i=>{i==="ready"&&(this._editorLoading=!0)});this._editor?.viewModel.addHandles(t);let e=n.watch(()=>this._editor?.viewModel.state,i=>{i==="adding-attachment"||i==="editing-attachment"?(this._addingAttachment=!0,this.isActionPending.emit(!0)):this._addingAttachment&&(this.isActionPending.emit(!1),this._addingAttachment=!1)});this._editor?.viewModel.addHandles(e);let o=n.watch(()=>this._editor?.viewModel.featureFormViewModel?.state,i=>{i==="ready"&&this.formReady.emit()});this._editor?.viewModel.addHandles(o)}async startCreate(){let t=this.selectedFeature?.layer,e=this.table;if(t?.relationships&&e?.relationships&&this.selectedFeature&&e.templates){let o=t.relationships[0],i=e.relationships.find(a=>t.layerId===a.relatedTableId),s=Number(this.selectedFeature.getObjectId());if(!Number.isNaN(s)&&i){let a=(await t.queryFeatures({objectIds:[s],outFields:[t.objectIdField,o.keyField]})).features[0],d=e.templates[0],l={attributeOverrides:this.makeAttributesForRelatedFeature(a,o,i),layer:e,template:d};await this._editor?.startCreateFeaturesWorkflowAtFeatureCreation(l),await this.hideEditorsElements(),this._editor?.viewModel?.featureFormViewModel?.addHandles(this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this)))}}}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector(".esri-editor")?.querySelectorAll("calcite-flow-item")?.forEach(t=>{let e=t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");e?.querySelector("header")?.setAttribute("style","display: none"),e?.querySelector("footer")?.setAttribute("style","display: none")}))}makeAttributesForRelatedFeature(t,e,o){let i=e.keyField,s;t.attributes.hasOwnProperty(i)?s=t.getAttribute(i):t.attributes.hasOwnProperty(i.toLowerCase())?s=t.getAttribute(i.toLowerCase()):t.attributes.hasOwnProperty(i.toUpperCase())&&(s=t.getAttribute(i.toUpperCase()));let a=o.keyField,d=this.table?.fields.find(l=>l.name.toLocaleLowerCase()===a.toLocaleLowerCase());if(d)return a=d.name,{[a]:s}}async submitted(t){if(t.invalid.length){this._isSubmitBtnClicked=!1;return}if(t.valid.length&&this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{this._editor?.activeWorkflow&&(await this._editor.activeWorkflow.commit(),this._editor.viewModel.failures?.length&&this._editor.viewModel.failures.some(e=>{if(e.error)throw e.error}))}catch(e){this.fail.emit(e);return}this.success.emit()}}async timeout(t){return new Promise(e=>setTimeout(e,t))}};_("create-related-feature",c);return c},"widgets/Editor","core/reactiveUtils")
2
+ import{a as b}from"./RPVEVHKH.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as _}from"./D2GJ4T5F.js";import{H as p,J as w,h as m,i as h,r,u}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([g,n])=>{var y=m`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar,.display-none{display:none!important}.esri-editor__panel-content{padding-block:10px!important}.notice-msg{padding:10px;width:calc(100% - 20px)}}`,c=class extends p{constructor(){super(...arguments),this.customizeSubmit=!1,this.enableSnapping=!1,this.showGuidingMsg=!0,this._editorLoading=!1,this._translations=b({name:"create-related-feature",blocking:!0}),this._addingAttachment=!1,this._isSubmitBtnClicked=!1,this.success=r(),this.fail=r(),this.isActionPending=r(),this.formReady=r()}static{this.properties={customizeSubmit:5,enableSnapping:5,mapView:0,selectedFeature:0,showGuidingMsg:5,table:0,_editorLoading:16,_translations:16}}static{this.styles=y}static{this.shadowRootOptions=u}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("_editorLoading")&&(this.hasUpdated||this._editorLoading!==!1)&&this._editorLoadingWatchHandler(this._editorLoading)}async mapViewWatchHandler(){await this.mapView?.when(async()=>{await this.init()})}async _editorLoadingWatchHandler(t){t&&(this._container?.classList.add("display-none"),await this.startCreate(),this._container?.classList.remove("display-none"),this._editorLoading=!1)}async submit(){this._editor?.viewModel?.featureFormViewModel&&(this._isSubmitBtnClicked=!0,this._editor.viewModel.featureFormViewModel.submit())}async init(){this.mapView&&await this.createEditorWidget()}render(){let t=this._editorLoading?"":"display-none";return h`${this.showGuidingMsg&&h`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>`||""}<calcite-loader class=${w(t)} label scale=s></calcite-loader>`}loaded(){this.init()}disconnectedCallback(){super.disconnectedCallback(),this._editor&&this._editor.destroy()}async createEditorWidget(){this._editor&&this._editor.destroy(),this._container=document.createElement("div"),this._container?.classList.add("display-none"),this.enableSnapping||this._container.classList.add("hide-editor-toolbar"),this._editor=new g({view:this.mapView,visibleElements:{flow:!0,settingsMenu:this.enableSnapping,sketch:!1,snappingControls:this.enableSnapping},container:this._container}),this.el.appendChild(this._container);let t=n.watch(()=>this._editor?.viewModel.featureTemplatesViewModel.state,i=>{i==="ready"&&(this._editorLoading=!0)});this._editor?.viewModel.addHandles(t);let e=n.watch(()=>this._editor?.viewModel.state,i=>{i==="adding-attachment"||i==="editing-attachment"?(this._addingAttachment=!0,this.isActionPending.emit(!0)):this._addingAttachment&&(this.isActionPending.emit(!1),this._addingAttachment=!1)});this._editor?.viewModel.addHandles(e);let o=n.watch(()=>this._editor?.viewModel.featureFormViewModel?.state,i=>{i==="ready"&&this.formReady.emit()});this._editor?.viewModel.addHandles(o)}async startCreate(){let t=this.selectedFeature?.layer,e=this.table;if(t?.relationships&&e?.relationships&&this.selectedFeature&&e.templates){let o=t.relationships[0],i=e.relationships.find(a=>t.layerId===a.relatedTableId),s=Number(this.selectedFeature.getObjectId());if(!Number.isNaN(s)&&i){let a=(await t.queryFeatures({objectIds:[s],outFields:[t.objectIdField,o.keyField]})).features[0],d=e.templates[0],l={attributeOverrides:this.makeAttributesForRelatedFeature(a,o,i),layer:e,template:d};await this._editor?.startCreateFeaturesWorkflowAtFeatureCreation(l),await this.hideEditorsElements(),this._editor?.viewModel?.featureFormViewModel?.addHandles(this._editor.viewModel.featureFormViewModel.on("submit",this.submitted.bind(this)))}}}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector(".esri-editor")?.querySelectorAll("calcite-flow-item")?.forEach(t=>{let e=t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");e?.querySelector("header")?.setAttribute("style","display: none"),e?.querySelector("footer")?.setAttribute("style","display: none")}))}makeAttributesForRelatedFeature(t,e,o){let i=e.keyField,s;t.attributes.hasOwnProperty(i)?s=t.getAttribute(i):t.attributes.hasOwnProperty(i.toLowerCase())?s=t.getAttribute(i.toLowerCase()):t.attributes.hasOwnProperty(i.toUpperCase())&&(s=t.getAttribute(i.toUpperCase()));let a=o.keyField,d=this.table?.fields.find(l=>l.name.toLocaleLowerCase()===a.toLocaleLowerCase());if(d)return a=d.name,{[a]:s}}async submitted(t){if(t.invalid.length){this._isSubmitBtnClicked=!1;return}if(t.valid.length&&this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{this._editor?.activeWorkflow&&(await this._editor.activeWorkflow.commit(),this._editor.viewModel.failures?.length&&this._editor.viewModel.failures.some(e=>{if(e.error)throw e.error}))}catch(e){this.fail.emit(e);return}this.success.emit()}}async timeout(t){return new Promise(e=>setTimeout(e,t))}};_("create-related-feature",c);return c},"widgets/Editor","core/reactiveUtils")
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a}from"./EIQZRLWQ.js";import{v as e}from"./46DQNAMV.js";import"./OR4HXHSY.js";var o=e(a,{"arcgis-solutions-assistant":[()=>import("./MWCQXZOT.js"),"_translations:,open,serverRoot,userFirstName;handleSendMessage,loopRequest,requestAIServer;resetChat"],"buffer-tools":[()=>import("./TGH6D5IY.js"),"_translations:,appearance,disabled,distance,geometries:,max,min,sliderTicks,unionResults,unit;getTranslatedUnit"],"card-manager":[()=>import("./HNPTTIXC.js"),"_translations:,createBtnLabel,customInfoText,enableCreateFeatures,enableEditGeometry,enableSnapping,isMobile,layerOrTable:,mapView:,selectedFeaturesIds:,selectingFeatureFromMap,showSketchWidgets,zoomAndScrollToSelected"],"consent-manager":[()=>import("./EPMMVHPO.js"),"_translations:,amazonAppId,amazonAppName,amazonUserPoolID,amazonVersion,firstUseVar,measurementIds:,portal:;getInstance"],"create-feature":[()=>import("./EKZZ7R2V.js"),"_translations:,aiImageExtraction:,allowMultipleCreation,appName,customizeSubmit,enablePhotoLocation,enableSearch,enableSnapping,floorLevel,formElements,isMobile,mapView:,popupEnabled,reportingArea,reportingAreaLayer,reportingAreaMessage,searchConfiguration:,selectedLayerId,showGuidingMsg,showLayerVisibilityMsg,showSketchWidgets,submitNewReportsMessage,updateMapPosition;refresh,showForm,submit"],"create-related-feature":[()=>import("./ADJCIRZS.js"),"_translations:,customizeSubmit,enableSnapping,mapView:,selectedFeature:,showGuidingMsg,table:;submit"],"crowdsource-manager":[()=>import("./2JBJVGPJ.js"),"_translations:,appLayout,appProxies,basemapConfig:,coverPageEnabled,customInfoText,defaultAppLayout,defaultCenter,defaultGlobalId,defaultLayer,defaultLevel,defaultOid,defaultWebmap,enableAutoRefresh,enableBasemap,enableColumnReorder,enableCSV,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapList,enableSearch,enableSelectionTool,enableShare,enableSnapping,enableZoom,featureSelectionMode,honorMapFieldSettings,introductionWindowEnabled,mapInfos:,onlyShowUpdatableLayers,popupHeaderColor,popupHeaderHoverColor,popupHeaderHoverTextColor,popupHeaderTextColor,searchConfiguration:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,theme,visibilityIcon,zoomAndScrollToSelected,zoomToScale"],"crowdsource-reporter":[()=>import("./BA4FCDQY.js"),"_translations:,aiImageExtraction:,center,commentButtonText,commentSubmittedMessage,defaultWebmap,description,enableAnonymousAccess,enableAnonymousComments,enableComments,enableHome,enableLogin,enableNewReports,enablePhotoLocation,enableSearch,enableSnapping,enableZoom,filterByMapExtent,floorLevel,isMobile,layerExpressions:,layerId,level,loginTitle,mapInfos:,mapView:,objectId,reportButtonText,reportingArea,reportingAreaLayer,reportingAreaMessage,reportingOptions:,reportsHeader,reportSubmittedMessage,searchConfiguration:,showComments,showFeatureSymbol,showFullCommentTitle,showMyReportsOnly,showUserImageInCommentsList,sortOption,submitNewReportsMessage,theme,zoomToScale;updateLayerExpressionsT9n"],"deduct-calculator":[()=>import("./6LSHZOMB.js")],"delete-button":[()=>import("./5G3AHODR.js"),"_translations:,buttonType,deleteDialog,disabled,icon,ids:,layer:,showDeleteCount"],"delete-dialog":[()=>import("./RQEYXUDW.js"),"_translations:,ids:,layer:,open"],"edit-card":[()=>import("./IQ6XED24.js"),"_translations:,allowMultipleEditing,enableEditGeometry,enableSnapping,graphicIndex,graphics:,mapView:,open"],"feature-details":[()=>import("./X5T6TZW3.js"),"enableSnapping,graphics:,layerItemsHash:,mapView:,reportingOptions:,showFullCommentTitle,showUserImageInCommentsList;back,next,refresh,toggleListView"],"feature-list":[()=>import("./VPMYUEFF.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,highlightOnHover,highlightOnMap,mapView:,noFeaturesFoundMsg,pageSize,reportingOptions:,selectedLayerId,showErrorWhenNoFeatures,showFeatureSymbol,showFullTitle,showInitialLoading,showUserImageInList,sortingInfo:,textSize,whereClause;refresh"],"field-selection":[()=>import("./SQYHEYVJ.js"),"_translations:,configExtraFields,layer:,mapView:,table:,tableRef:"],"info-card":[()=>import("./5YORDAVH.js"),"_translations:,allowEditing,enableEditGeometry,enableSnapping,graphics:,highlightEnabled,isLoading,isMobile,mapView:,paginationEnabled,position,showCloseBtn;back,getSelectedFeature,next,refresh,toggleListView,updateCurrentGraphic"],"layer-list":[()=>import("./K7O46PDI.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,layers:,mapView:,showFeatureCount,showNextIcon;refresh"],"layer-list-widget":[()=>import("./23DKMPGJ.js"),"layerListWidget:,mapView:,visibilityIcon"],"layer-table":[()=>import("./Z6NMQGEQ.js"),"_translations:,appLayout,defaultGlobalId:,defaultLayerId,defaultOid:,enableAutoRefresh,enableColumnReorder,enableCSV,enableInlineEdit,enableShare,enableTableAutosave,featureSelectionMode,honorMapFieldSettings,isMobile,mapHidden,mapInfo:,mapView:,selectedIds:,selectedRelatedIds:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,showOnlyUpdatableLayers,zoomAndScrollToSelected,zoomToScale;closeFilter,filterReset,filterUpdate,refresh,setColumnOrder,validateActiveEdits,validateTableUpdate"],"map-basemap-gallery":[()=>import("./QPRIL54J.js"),"basemapConfig:,basemapWidget:,mapView:"],"map-card":[()=>import("./ZFSMRICA.js"),"_translations:,appLayout,appProxies,basemapConfig:,defaultLayerId,defaultWebmapId,enableBasemap,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableShare,enableSingleExpand,featureSelectionMode,hide,isMapLayout,isMobile,mapInfo:,mapInfos:,mapToolsOrder:,mapView:,mapWidgetsIndex,mapWidgetsPosition,mapWidgetsSize,mobileMapWidgetsPosition,mobileToolsOrder:,selectedFeaturesIds:,selectedLayer:,shareIncludeEmbed,shareIncludeSocial,showOnlyUpdatableLayers,stackTools,theme,visibilityIcon,zoomToolsSize,zoomToScale;resetFilter,updateFilterState,updateLayer"],"map-draw-tools":[()=>import("./YE7JMYIB.js"),"_translations:,active,drawMode,editGraphicsEnabled,graphics:,mapView:,pointSymbol:,polygonSymbol:,polylineSymbol:,redoEnabled,undoEnabled;clear,updateGraphics"],"map-floor-filter":[()=>import("./UV4D2QFA.js"),"enabled,floorFilterWidget:,mapView:"],"map-fullscreen":[()=>import("./YT2I5RUD.js"),"fullscreenWidget:,mapView:"],"map-layer-picker":[()=>import("./NJJEOZ2G.js"),"_translations:,appearance,configLayerOrderDefined,defaultLayerId,disabled,display,enabledLayerIds:,height,isMobile,mapView:,placeholderIcon,referenceElement,scale,selectedIds:,showLayersListInPopover,showOnlyUpdatableLayers,showSingleLayerAsLabel,showTables,showTablesDisabled,type;setLayerById,setLayerByIds,updateLayer"],"map-legend":[()=>import("./VEUUNFWR.js"),"legendWidget:,mapView:"],"map-picker":[()=>import("./NORNRIIE.js"),"_translations:,height,isMapLayout,mapInfos:,referenceElement,selectedWebMapId,showMapListInPopover;close,setMapByID,toggle"],"map-search":[()=>import("./NARQQKRW.js"),"mapView:,popupEnabled,resultGraphicEnabled,searchConfiguration:,searchTerm,searchWidget:"],"map-select-tools":[()=>import("./EQXQ6YNY.js"),"_translations:,bufferColor,bufferOutlineColor,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,enabledLayerIds:,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,geometries:,headerLabelClass,isUpdate,layerViews:,mapView:,noResultText,searchConfiguration:,searchDistanceEnabled,selectionLayerIds:,selectionSet:,selectLayerView:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:,useLayerFeaturesEnabled;clearSelection,getSelection"],"map-tools":[()=>import("./VVURRW2F.js"),"_translations:,basemapConfig:,defaultLayerId,enableBasemap,enabledLayerIds:,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableSingleExpand,isMobile,layout,mapInfo:,mapInfos:,mapView:,mapWidgetsSize,parentComponentHeight,parentComponentWidth,position,searchConfiguration:,selectedFeaturesIds:,selectedLayer:,selectedWebMapId,selectionTools:,showOnlyUpdatableLayers,stackTools,toolOrder:,visibilityIcon,zoomToolsSize"],"pci-calculator":[()=>import("./33HIGVEX.js")],"pdf-download":[()=>import("./BCTFO27G.js"),"_translations:,defaultNumLabelsPerPage,disabled;downloadCSV,downloadPDF"],"public-notification":[()=>import("./TF3C523O.js"),"_translations:,addresseeLayerIds:,bufferColor,bufferOutlineColor,customExport,customExportURL,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,defaultExportTitle,defaultNumLabelsPerPage,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,featureEffect:,featureHighlightEnabled,initialNotice,mapView:,noResultText,searchConfiguration:,selectionLayerIds:,showRefineSelection,showSearchSettings,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"refine-selection":[()=>import("./SFZEAERJ.js"),"_translations:,addresseeLayer:,bufferColor,bufferOutlineColor,defaultBufferDistance,defaultBufferUnit,drawnGraphicsArr:,enabledLayerIds:,enableSearchDistance,enableSearchDistanceOnLoad,geometries:,mapView:,searchDistanceEnabled,selectionSets:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"selection-tool":[()=>import("./BGBLGDVO.js"),"mapView:,selectedLayerId,tool;toggleSelectionTool"],"solution-configure-titles":[()=>import("./M2MN2QB7.js"),"_translations:,card:,open,solutionData,source,templateInfos:"],"solution-delete-dialog":[()=>import("./QZZ2CQWS.js"),"_translations:,card:,open,source;;close,delete"],"solution-deploy-dialog":[()=>import("./N6EQBPC2.js"),"_translations:,card:,debugFailDeployment,open,userOptions:;;close,deploy"],"solution-deployed-card":[()=>import("./BADKNCL4.js"),"_translations:,card:,deployedDate,description,diagramKey,heading,itemId,owner,templateInfos:,thumbnail,updateAvailable;getTemplates,renderDeleteDialog,renderDiagramDialog"],"solution-deployed-card-panel":[()=>import("./7DOH2ZMP.js"),"_translations:,card:,cardRef,diagramKey,open,templateInfos:"],"solution-deploying-dialog":[()=>import("./BXKV2QC3.js"),"_translations:,abortController:,card:,deploymentProgress,isWaitingForCard,open;;cancelDeployment,close,confirmCancel"],"solution-details-card":[()=>import("./XWJFP7BZ.js"),"_translations:,card:,referrerSolutionId,referrerSolutionTitle,referrerSolutionVersion,source"],"solution-details-panel":[()=>import("./57INLFON.js"),"_translations:,card:"],"solution-item-accordion":[()=>import("./5QP3RIEO.js"),"_translations:,itemRelationshipDependencies:,linkType,listSelectionMode,reuseWarning,templateInfos:,typeKeywords:;collapseAll,deselectAll,expandFirstItem,expandItemById,expandItems,selectFirstItem,selectItem,selectItems"],"solution-item-diagram":[()=>import("./VGIXK3YM.js"),"_translations:,diagramKey,templateInfoGraph:,typeKeywords:"],"solution-item-icon":[()=>import("./6HNQQRYK.js"),"isPortal,type,typeKeywords:"],"solution-resource-card":[()=>import("./2ECRQJCU.js"),"_translations:,description,heading,headingEn,icon,meridianIcon,sectionHeadingEn,url"],"solution-snapshot-gallery":[()=>import("./ZNG42S47.js"),"_translations:,card:,itemProperties:,open,screenshot:"],"solution-social-share":[()=>import("./LLIZZGSY.js"),"_translations:,actionApperance,autoUpdateShareUrl,buttonAppearance,inlineSuccessPopoverPlacement,mode,popoverButtonIconScale,popoverPositioning,removePopoverOffset,scale,shareButtonKind,shareButtonScale,shareButtonText,shareButtonType,shareIconsLayout,shareText,shareUrl,shortenShareUrl,socialMedia,solutionId,solutionTitle,solutionVersion,successMessage"],"solution-user-avatar":[()=>import("./M6DR7QBF.js"),"fullname,lookupProfile,thumbnailUrl,username"],"solutions-all-panel":[()=>import("./DY3BUOEI.js"),"_translations:,sortType;searchSolutions,setSearchOptions"],"solutions-all-shell":[()=>import("./KUZQPBVI.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-deploy-app":[()=>import("./TZPSZTAH.js"),"_translations:,appConfig,initTab,initTitleOrId,sortType,useLocalAppConfig;selectTab"],"solutions-deploy-app-nav":[()=>import("./RBCOT3CJ.js"),"_translations:,appConfig,initTab;;activateMenuItem,clearMenuItems"],"solutions-deployed-panel":[()=>import("./5BEMMNL7.js"),"_translations:,sortType;reload,searchSolutions,setSearchOptions"],"solutions-deployed-shell":[()=>import("./IHDRZQU4.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-filter-panel":[()=>import("./YUWQWOOF.js"),"_translations:,hideIndustryFilter,isAIDialogOpen,showReset;;changeIndustryFilter,clearFilters"],"solutions-resources-section":[()=>import("./RTVWZSKJ.js"),"cards,heading,subheading"],"solutions-resources-shell":[()=>import("./SIUK7OO4.js"),"_translations:"],"solutions-searchsort-toolbar":[()=>import("./2YCDW2EI.js"),"_translations:,defaultSortType,isOrgSolutions,scope;;changeOwnerFilter,changeSearchFilter,sortChanged"]});o({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-solutions-assistant,buffer-tools,card-manager,consent-manager,create-feature,create-related-feature,crowdsource-manager,crowdsource-reporter,deduct-calculator,delete-button,delete-dialog,edit-card,feature-details,feature-list,field-selection,info-card,layer-list,layer-list-widget,layer-table,map-basemap-gallery,map-card,map-draw-tools,map-floor-filter,map-fullscreen,map-layer-picker,map-legend,map-picker,map-search,map-select-tools,map-tools,pci-calculator,pdf-download,public-notification,refine-selection,selection-tool,solution-configure-titles,solution-delete-dialog,solution-deploy-dialog,solution-deployed-card,solution-deployed-card-panel,solution-deploying-dialog,solution-details-card,solution-details-panel,solution-item-accordion,solution-item-diagram,solution-item-icon,solution-resource-card,solution-snapshot-gallery,solution-social-share,solution-user-avatar,solutions-all-panel,solutions-all-shell,solutions-deploy-app,solutions-deploy-app-nav,solutions-deployed-panel,solutions-deployed-shell,solutions-filter-panel,solutions-resources-section,solutions-resources-shell,solutions-searchsort-toolbar){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,a)
2
+ import{a}from"./D2GJ4T5F.js";import{v as e}from"./46DQNAMV.js";import"./OR4HXHSY.js";var o=e(a,{"arcgis-solutions-assistant":[()=>import("./2DQVL4PQ.js"),"_translations:,open,serverRoot,userFirstName;handleSendMessage,loopRequest,requestAIServer;resetChat"],"buffer-tools":[()=>import("./P37VIDKK.js"),"_translations:,appearance,disabled,distance,geometries:,max,min,sliderTicks,unionResults,unit;getTranslatedUnit"],"card-manager":[()=>import("./KUAZAYII.js"),"_translations:,createBtnLabel,customInfoText,enableCreateFeatures,enableEditGeometry,enableSnapping,isMobile,layerOrTable:,mapView:,selectedFeaturesIds:,selectingFeatureFromMap,showSketchWidgets,zoomAndScrollToSelected"],"consent-manager":[()=>import("./XDWBG3UR.js"),"_translations:,amazonAppId,amazonAppName,amazonUserPoolID,amazonVersion,firstUseVar,measurementIds:,portal:;getInstance"],"create-feature":[()=>import("./DV2GHKER.js"),"_translations:,aiImageExtraction:,allowMultipleCreation,appName,customizeSubmit,enablePhotoLocation,enableSearch,enableSnapping,floorLevel,formElements,isMobile,mapView:,popupEnabled,reportingArea,reportingAreaLayer,reportingAreaMessage,searchConfiguration:,selectedLayerId,showGuidingMsg,showLayerVisibilityMsg,showSketchWidgets,submitNewReportsMessage,updateMapPosition;refresh,showForm,submit"],"create-related-feature":[()=>import("./ZEEVP73V.js"),"_translations:,customizeSubmit,enableSnapping,mapView:,selectedFeature:,showGuidingMsg,table:;submit"],"crowdsource-manager":[()=>import("./AX25AFSB.js"),"_translations:,appLayout,appProxies,basemapConfig:,coverPageEnabled,customInfoText,defaultAppLayout,defaultCenter,defaultGlobalId,defaultLayer,defaultLevel,defaultOid,defaultWebmap,enableAutoRefresh,enableBasemap,enableColumnReorder,enableCSV,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapList,enableSearch,enableSelectionTool,enableShare,enableSnapping,enableZoom,featureSelectionMode,honorMapFieldSettings,introductionWindowEnabled,mapInfos:,onlyShowUpdatableLayers,popupHeaderColor,popupHeaderHoverColor,popupHeaderHoverTextColor,popupHeaderTextColor,searchConfiguration:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,theme,visibilityIcon,zoomAndScrollToSelected,zoomToScale"],"crowdsource-reporter":[()=>import("./FWQFXM4U.js"),"_translations:,aiImageExtraction:,center,commentButtonText,commentSubmittedMessage,defaultWebmap,description,enableAnonymousAccess,enableAnonymousComments,enableComments,enableHome,enableLogin,enableNewReports,enablePhotoLocation,enableSearch,enableSnapping,enableZoom,filterByMapExtent,floorLevel,isMobile,layerExpressions:,layerId,level,loginTitle,mapInfos:,mapView:,objectId,reportButtonText,reportingArea,reportingAreaLayer,reportingAreaMessage,reportingOptions:,reportsHeader,reportSubmittedMessage,searchConfiguration:,showComments,showFeatureSymbol,showFullCommentTitle,showMyReportsOnly,showUserImageInCommentsList,sortOption,submitNewReportsMessage,theme,zoomToScale;updateLayerExpressionsT9n"],"deduct-calculator":[()=>import("./NCT25XQN.js")],"delete-button":[()=>import("./Z2OGHOS2.js"),"_translations:,buttonType,deleteDialog,disabled,icon,ids:,layer:,showDeleteCount"],"delete-dialog":[()=>import("./CYPPGLZ3.js"),"_translations:,ids:,layer:,open"],"edit-card":[()=>import("./3F54GEFA.js"),"_translations:,allowMultipleEditing,enableEditGeometry,enableSnapping,graphicIndex,graphics:,mapView:,open"],"feature-details":[()=>import("./4G6KHS4L.js"),"enableSnapping,graphics:,layerItemsHash:,mapView:,reportingOptions:,showFullCommentTitle,showUserImageInCommentsList;back,next,refresh,toggleListView"],"feature-list":[()=>import("./AR4OZU5R.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,highlightOnHover,highlightOnMap,mapView:,noFeaturesFoundMsg,pageSize,reportingOptions:,selectedLayerId,showErrorWhenNoFeatures,showFeatureSymbol,showFullTitle,showInitialLoading,showUserImageInList,sortingInfo:,textSize,whereClause;refresh"],"field-selection":[()=>import("./J3QFN6BO.js"),"_translations:,configExtraFields,layer:,mapView:,table:,tableRef:"],"info-card":[()=>import("./VDV3ULRF.js"),"_translations:,allowEditing,enableEditGeometry,enableSnapping,graphics:,highlightEnabled,isLoading,isMobile,mapView:,paginationEnabled,position,showCloseBtn;back,getSelectedFeature,next,refresh,toggleListView,updateCurrentGraphic"],"layer-list":[()=>import("./UJMP6BUY.js"),"_translations:,applyLayerViewFilter,filterByMapExtent,layers:,mapView:,showFeatureCount,showNextIcon;refresh"],"layer-list-widget":[()=>import("./OD3XSVPE.js"),"layerListWidget:,mapView:,visibilityIcon"],"layer-table":[()=>import("./P26AU4WZ.js"),"_translations:,appLayout,defaultGlobalId:,defaultLayerId,defaultOid:,enableAutoRefresh,enableColumnReorder,enableCSV,enableInlineEdit,enableShare,enableTableAutosave,featureSelectionMode,honorMapFieldSettings,isMobile,mapHidden,mapInfo:,mapView:,selectedIds:,selectedRelatedIds:,shareIncludeEmbed,shareIncludeSocial,showNewestFirst,showOnlyUpdatableLayers,zoomAndScrollToSelected,zoomToScale;closeFilter,filterReset,filterUpdate,refresh,setColumnOrder,validateActiveEdits,validateTableUpdate"],"map-basemap-gallery":[()=>import("./OSIVL3Y2.js"),"basemapConfig:,basemapWidget:,mapView:"],"map-card":[()=>import("./XSUHVXCX.js"),"_translations:,appLayout,appProxies,basemapConfig:,defaultLayerId,defaultWebmapId,enableBasemap,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableShare,enableSingleExpand,featureSelectionMode,hide,isMapLayout,isMobile,mapInfo:,mapInfos:,mapToolsOrder:,mapView:,mapWidgetsIndex,mapWidgetsPosition,mapWidgetsSize,mobileMapWidgetsPosition,mobileToolsOrder:,selectedFeaturesIds:,selectedLayer:,shareIncludeEmbed,shareIncludeSocial,showOnlyUpdatableLayers,stackTools,theme,visibilityIcon,zoomToolsSize,zoomToScale;resetFilter,updateFilterState,updateLayer"],"map-draw-tools":[()=>import("./NCDWEPYU.js"),"_translations:,active,drawMode,editGraphicsEnabled,graphics:,mapView:,pointSymbol:,polygonSymbol:,polylineSymbol:,redoEnabled,undoEnabled;clear,updateGraphics"],"map-floor-filter":[()=>import("./3EQGUDZX.js"),"enabled,floorFilterWidget:,mapView:"],"map-fullscreen":[()=>import("./BS4VUABM.js"),"fullscreenWidget:,mapView:"],"map-layer-picker":[()=>import("./DNJQPNJ3.js"),"_translations:,appearance,configLayerOrderDefined,defaultLayerId,disabled,display,enabledLayerIds:,height,isMobile,mapView:,placeholderIcon,referenceElement,scale,selectedIds:,showLayersListInPopover,showOnlyUpdatableLayers,showSingleLayerAsLabel,showTables,showTablesDisabled,type;setLayerById,setLayerByIds,updateLayer"],"map-legend":[()=>import("./FB22NJZE.js"),"legendWidget:,mapView:"],"map-picker":[()=>import("./26TMYOYZ.js"),"_translations:,height,isMapLayout,mapInfos:,referenceElement,selectedWebMapId,showMapListInPopover;close,setMapByID,toggle"],"map-search":[()=>import("./M4OFY7R4.js"),"mapView:,popupEnabled,resultGraphicEnabled,searchConfiguration:,searchTerm,searchWidget:"],"map-select-tools":[()=>import("./QDB6OFX7.js"),"_translations:,bufferColor,bufferOutlineColor,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,enabledLayerIds:,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,geometries:,headerLabelClass,isUpdate,layerViews:,mapView:,noResultText,searchConfiguration:,searchDistanceEnabled,selectionLayerIds:,selectionSet:,selectLayerView:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:,useLayerFeaturesEnabled;clearSelection,getSelection"],"map-tools":[()=>import("./U6YFX3FW.js"),"_translations:,basemapConfig:,defaultLayerId,enableBasemap,enabledLayerIds:,enableFloorFilter,enableFullscreen,enableHome,enableLayerList,enableLegend,enableMapLayerPicker,enableMapPicker,enableSearch,enableSelectionTool,enableSingleExpand,isMobile,layout,mapInfo:,mapInfos:,mapView:,mapWidgetsSize,parentComponentHeight,parentComponentWidth,position,searchConfiguration:,selectedFeaturesIds:,selectedLayer:,selectedWebMapId,selectionTools:,showOnlyUpdatableLayers,stackTools,toolOrder:,visibilityIcon,zoomToolsSize"],"pci-calculator":[()=>import("./LHEE2HNJ.js")],"pdf-download":[()=>import("./YQYASRD5.js"),"_translations:,defaultNumLabelsPerPage,disabled;downloadCSV,downloadPDF"],"public-notification":[()=>import("./72IO4UYP.js"),"_translations:,addresseeLayerIds:,bufferColor,bufferOutlineColor,customExport,customExportURL,customLabelEnabled,defaultBufferDistance,defaultBufferUnit,defaultExportTitle,defaultNumLabelsPerPage,enableLayerFeatures,enableLayerFeaturesOnLoad,enableSearchDistance,enableSearchDistanceOnLoad,enableSketchTools,featureEffect:,featureHighlightEnabled,initialNotice,mapView:,noResultText,searchConfiguration:,selectionLayerIds:,showRefineSelection,showSearchSettings,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"refine-selection":[()=>import("./PXMCZFXG.js"),"_translations:,addresseeLayer:,bufferColor,bufferOutlineColor,defaultBufferDistance,defaultBufferUnit,drawnGraphicsArr:,enabledLayerIds:,enableSearchDistance,enableSearchDistanceOnLoad,geometries:,mapView:,searchDistanceEnabled,selectionSets:,sketchLineSymbol:,sketchPointSymbol:,sketchPolygonSymbol:"],"selection-tool":[()=>import("./LNSJ2ZWF.js"),"mapView:,selectedLayerId,tool;toggleSelectionTool"],"solution-configure-titles":[()=>import("./RMAKST5E.js"),"_translations:,card:,open,solutionData,source,templateInfos:"],"solution-delete-dialog":[()=>import("./OX2MZA6F.js"),"_translations:,card:,open,source;;close,delete"],"solution-deploy-dialog":[()=>import("./FANNDI5E.js"),"_translations:,card:,debugFailDeployment,open,userOptions:;;close,deploy"],"solution-deployed-card":[()=>import("./VYS6Q3TC.js"),"_translations:,card:,deployedDate,description,diagramKey,heading,itemId,owner,templateInfos:,thumbnail,updateAvailable;getTemplates,renderDeleteDialog,renderDiagramDialog"],"solution-deployed-card-panel":[()=>import("./M4JIHV72.js"),"_translations:,card:,cardRef,diagramKey,open,templateInfos:"],"solution-deploying-dialog":[()=>import("./6T2CYQFT.js"),"_translations:,abortController:,card:,deploymentProgress,isWaitingForCard,open;;cancelDeployment,close,confirmCancel"],"solution-details-card":[()=>import("./I4Z6ZYWZ.js"),"_translations:,card:,referrerSolutionId,referrerSolutionTitle,referrerSolutionVersion,source"],"solution-details-panel":[()=>import("./7GFJCKLV.js"),"_translations:,card:"],"solution-item-accordion":[()=>import("./NWPFF4JA.js"),"_translations:,itemRelationshipDependencies:,linkType,listSelectionMode,reuseWarning,templateInfos:,typeKeywords:;collapseAll,deselectAll,expandFirstItem,expandItemById,expandItems,selectFirstItem,selectItem,selectItems"],"solution-item-diagram":[()=>import("./PKMTEIHQ.js"),"_translations:,diagramKey,templateInfoGraph:,typeKeywords:"],"solution-item-icon":[()=>import("./N2A3DN7Q.js"),"isPortal,type,typeKeywords:"],"solution-resource-card":[()=>import("./RN52WDXY.js"),"_translations:,description,heading,headingEn,icon,meridianIcon,sectionHeadingEn,url"],"solution-snapshot-gallery":[()=>import("./VQZ5PAL6.js"),"_translations:,card:,itemProperties:,open,screenshot:"],"solution-social-share":[()=>import("./VSUINSCJ.js"),"_translations:,actionApperance,autoUpdateShareUrl,buttonAppearance,inlineSuccessPopoverPlacement,mode,popoverButtonIconScale,popoverPositioning,removePopoverOffset,scale,shareButtonKind,shareButtonScale,shareButtonText,shareButtonType,shareIconsLayout,shareText,shareUrl,shortenShareUrl,socialMedia,solutionId,solutionTitle,solutionVersion,successMessage"],"solution-user-avatar":[()=>import("./ARCFSWJ6.js"),"fullname,lookupProfile,thumbnailUrl,username"],"solutions-all-panel":[()=>import("./I5NNLEMS.js"),"_translations:,sortType;searchSolutions,setSearchOptions"],"solutions-all-shell":[()=>import("./UIUEU6HZ.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-deploy-app":[()=>import("./QP2PUPF2.js"),"_translations:,appConfig,initTab,initTitleOrId,sortType,useLocalAppConfig;selectTab"],"solutions-deploy-app-nav":[()=>import("./T63EH4IH.js"),"_translations:,appConfig,initTab;;activateMenuItem,clearMenuItems"],"solutions-deployed-panel":[()=>import("./BMPHKAGI.js"),"_translations:,sortType;reload,searchSolutions,setSearchOptions"],"solutions-deployed-shell":[()=>import("./LC7RF2LP.js"),"_translations:,solutionsCount;searchSolutions"],"solutions-filter-panel":[()=>import("./OFJ2VFW7.js"),"_translations:,hideIndustryFilter,isAIDialogOpen,showReset;;changeIndustryFilter,clearFilters"],"solutions-resources-section":[()=>import("./IGVKJKZ2.js"),"cards,heading,subheading"],"solutions-resources-shell":[()=>import("./AYHK3JMP.js"),"_translations:"],"solutions-searchsort-toolbar":[()=>import("./DYW2SU7R.js"),"_translations:,defaultSortType,isOrgSolutions,scope;;changeOwnerFilter,changeSearchFilter,sortChanged"]});o({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-solutions-assistant,buffer-tools,card-manager,consent-manager,create-feature,create-related-feature,crowdsource-manager,crowdsource-reporter,deduct-calculator,delete-button,delete-dialog,edit-card,feature-details,feature-list,field-selection,info-card,layer-list,layer-list-widget,layer-table,map-basemap-gallery,map-card,map-draw-tools,map-floor-filter,map-fullscreen,map-layer-picker,map-legend,map-picker,map-search,map-select-tools,map-tools,pci-calculator,pdf-download,public-notification,refine-selection,selection-tool,solution-configure-titles,solution-delete-dialog,solution-deploy-dialog,solution-deployed-card,solution-deployed-card-panel,solution-deploying-dialog,solution-details-card,solution-details-panel,solution-item-accordion,solution-item-diagram,solution-item-icon,solution-resource-card,solution-snapshot-gallery,solution-social-share,solution-user-avatar,solutions-all-panel,solutions-all-shell,solutions-deploy-app,solutions-deploy-app-nav,solutions-deployed-panel,solutions-deployed-shell,solutions-filter-panel,solutions-resources-section,solutions-resources-shell,solutions-searchsort-toolbar){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,a)
@@ -1,11 +1,12 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import * as n from "@esri/solution-common";
2
+ import * as o from "@esri/solution-common";
3
3
  import a from "@arcgis/core/identity/IdentityManager.js";
4
4
  import h from "@arcgis/core/identity/OAuthInfo.js";
5
5
  import c from "@arcgis/core/portal/Portal.js";
6
- class g {
6
+ import { x as p } from "./helpers.js";
7
+ class S {
7
8
  constructor(t, e, r, s) {
8
- this._credential = void 0, this._isEnterprise = !1, this._locale = "en", this._portalSubset = void 0, this._portalUserSubset = void 0, this._searchArcGISOnlineEnabled = !0, this._signInParam = void 0, this._clientId = t ?? "", this._locale = r ?? "en", this._portalUrl = e ?? "https://www.arcgis.com", this._portalRestUrl = this._portalUrl + "/sharing/rest", this._portalUrl = location.origin.endsWith(".arcgis.com") ? window.location.origin : this._portalUrl, this._signInParam = s;
9
+ this._credential = void 0, this._isEnterprise = !1, this._locale = "en", this._portalSubset = void 0, this._portalUserSubset = void 0, this._arcGISOnlineReachable = !0, this._searchArcGISOnlineEnabled = !0, this._signInParam = void 0, this._clientId = t ?? "", this._locale = r ?? "en", this._portalUrl = e ?? "https://www.arcgis.com", this._portalRestUrl = this._portalUrl + "/sharing/rest", this._portalUrl = location.origin.endsWith(".arcgis.com") ? window.location.origin : this._portalUrl, this._signInParam = s;
9
10
  const i = new h({
10
11
  appId: this._clientId,
11
12
  locale: this._locale,
@@ -16,8 +17,8 @@ class g {
16
17
  });
17
18
  try {
18
19
  a.registerOAuthInfos([i]);
19
- } catch (o) {
20
- console.log(o);
20
+ } catch (n) {
21
+ console.log(n);
21
22
  }
22
23
  this._portal = new c({ url: this._portalUrl });
23
24
  }
@@ -69,10 +70,27 @@ class g {
69
70
  return this.PortalUserPrivileges.includes("portal:admin:viewItems");
70
71
  }
71
72
  get CanSearchArcGISOnline() {
72
- return this._searchArcGISOnlineEnabled;
73
+ return this._searchArcGISOnlineEnabled && this._arcGISOnlineReachable;
74
+ }
75
+ /** Checks if the ArcGIS Online group is reachable for Enterprise portals. */
76
+ async checkArcGISOnlineReachability(t) {
77
+ if (this._isEnterprise && this._searchArcGISOnlineEnabled && t) {
78
+ const r = `${p(this._portalUrl)}/sharing/rest`, s = new o.UserSession({});
79
+ try {
80
+ await o.searchItems({
81
+ q: `group:${t} type:Solution`,
82
+ num: 1,
83
+ start: 1,
84
+ authentication: s,
85
+ portal: r
86
+ }), this._arcGISOnlineReachable = !0;
87
+ } catch (i) {
88
+ this._arcGISOnlineReachable = !1, console.warn("ArcGIS Online solutions group not reachable:", i);
89
+ }
90
+ }
73
91
  }
74
92
  get RestUserSession() {
75
- const t = a.findServerInfo(this._portalRestUrl), e = this._credential ? n.UserSession.fromCredential(this._credential, t) : this._isEnterprise ? new n.UserSession({}) : new n.UserSession({ portal: this._portalRestUrl });
93
+ const t = a.findServerInfo(this._portalRestUrl), e = this._credential ? o.UserSession.fromCredential(this._credential, t) : this._isEnterprise ? new o.UserSession({}) : new o.UserSession({ portal: this._portalRestUrl });
76
94
  return e.portal = this.PortalSubset?.restUrl ? this.PortalSubset?.restUrl : e.portal, e.clientId = this._credential?._oAuthCred?.appId, e._refreshToken = this._credential?._oAuthCred?.refreshToken, e;
77
95
  }
78
96
  /**
@@ -81,9 +99,9 @@ class g {
81
99
  *
82
100
  * @returns Promise that resolves with the initialized Auth object
83
101
  */
84
- async initialize(t = !1) {
102
+ async initialize(t = !1, e) {
85
103
  try {
86
- await this._init(t);
104
+ await this._init(t, e);
87
105
  } catch {
88
106
  this.destroy();
89
107
  }
@@ -103,9 +121,9 @@ class g {
103
121
  const r = e.authorizeParams.redirect_uri;
104
122
  if (t.length > 0) {
105
123
  const s = r.split("?"), i = s[0];
106
- let o = "";
124
+ let n = "";
107
125
  const l = new URLSearchParams(s[1] || "");
108
- l.append("signInParam", t), o = "?" + l.toString(), e.authorizeParams.redirect_uri = i + o;
126
+ l.append("signInParam", t), n = "?" + l.toString(), e.authorizeParams.redirect_uri = i + n;
109
127
  }
110
128
  window.location.href = e.authorizeUrl + "?" + this._objectToQuery(e.authorizeParams);
111
129
  }), await a.getCredential((this._portalSubset?.portalUrl ?? this._portalUrl) + "/sharing").then(
@@ -153,21 +171,21 @@ class g {
153
171
  * If the user is not authorized to use the app, the page will be redirected to an error page.
154
172
  * @returns Promise that resolves with the initialized Auth object
155
173
  */
156
- async _init(t = !1) {
174
+ async _init(t = !1, e) {
157
175
  try {
158
176
  this._credential = await a.checkSignInStatus(this._portalUrl + "/sharing");
159
- } catch (r) {
160
- console.log(r);
177
+ } catch (s) {
178
+ console.log(s);
161
179
  }
162
180
  try {
163
- const r = await a.checkAppAccess(this._portalUrl + "/sharing", this._clientId);
164
- (typeof r.valid < "u" && !r.valid || r.viewOnlyUserTypeApp) && window.location.replace(`error.html?error=blocked&locale=${this._locale}`), this._credential = r.credential;
165
- } catch (r) {
166
- r.name;
181
+ const s = await a.checkAppAccess(this._portalUrl + "/sharing", this._clientId);
182
+ (typeof s.valid < "u" && !s.valid || s.viewOnlyUserTypeApp) && window.location.replace(`error.html?error=blocked&locale=${this._locale}`), this._credential = s.credential;
183
+ } catch (s) {
184
+ s.name;
167
185
  }
168
186
  this._searchArcGISOnlineEnabled = await this._checkSearchArcGISOnlineEnabled(t, this._portal.restUrl), this._portal.authMode = t ? "immediate" : "auto", await this._portal.load();
169
- const e = this._credential ? await n.getOrganizationSettings(this.RestUserSession) : {};
170
- return this._isEnterprise = this._portal.isPortal, this._portalSubset = {
187
+ const r = this._credential ? await o.getOrganizationSettings(this.RestUserSession) : {};
188
+ return this._isEnterprise = this._portal.isPortal, await this.checkArcGISOnlineReachability(e), this._portalSubset = {
171
189
  name: this._portal.name ?? "",
172
190
  id: this._portal.id ?? "",
173
191
  restUrl: this._portal.restUrl ?? "",
@@ -179,7 +197,7 @@ class g {
179
197
  hubPremiumEnabled: this._portal.portalProperties?.hub?.enabled || !1,
180
198
  workflowURL: this._portal.helperServices?.workflowManager?.url ?? this._portal.url,
181
199
  isReadOnly: this._portal.isReadOnly,
182
- orgSettings: e
200
+ orgSettings: r
183
201
  }, this._portalUserSubset = {
184
202
  fullName: this._portal.user?.fullName ?? "",
185
203
  username: this._portal.user?.username ?? "",
@@ -189,15 +207,15 @@ class g {
189
207
  privileges: this._portal.user.privileges,
190
208
  role: this._portal.user?.role ?? "",
191
209
  roleId: this._portal.user?.roleId ?? void 0
192
- }, this._isEnterprise && this._portalSubset && (this._portalSubset.workflowURL = await n.getWorkflowEnterpriseServerRootURL(
210
+ }, this._isEnterprise && this._portalSubset && (this._portalSubset.workflowURL = await o.getWorkflowEnterpriseServerRootURL(
193
211
  this._portal.restUrl,
194
- this.RestUserSession || new n.UserSession({})
212
+ this.RestUserSession || new o.UserSession({})
195
213
  )), this._portal?.user?.roleId && this._portalUserSubset && (this._portalUserSubset.roleId = this._portal.user.roleId), this;
196
214
  }
197
215
  async _checkSearchArcGISOnlineEnabled(t, e) {
198
216
  if (t)
199
217
  try {
200
- const r = `${e}/portals/self/settings`, s = await n.request(r, {
218
+ const r = `${e}/portals/self/settings`, s = await o.request(r, {
201
219
  authentication: this._credential ? this.RestUserSession : void 0
202
220
  });
203
221
  return s?.portalConfigProperties?.searchArcGISOnlineEnabled !== void 0 ? s.portalConfigProperties.searchArcGISOnlineEnabled : !1;
@@ -254,11 +272,11 @@ class g {
254
272
  const s = t[r];
255
273
  if (s == null)
256
274
  return "";
257
- const i = encodeURIComponent(r) + "=", o = e && e[r];
258
- return o ? i + encodeURIComponent(o(s)) : Array.isArray(s) ? s.map((l) => this._isSerializable(l) ? i + encodeURIComponent(JSON.stringify(l)) : i + encodeURIComponent(l)).join("&") : this._isSerializable(s) ? i + encodeURIComponent(JSON.stringify(s)) : i + encodeURIComponent(s);
275
+ const i = encodeURIComponent(r) + "=", n = e && e[r];
276
+ return n ? i + encodeURIComponent(n(s)) : Array.isArray(s) ? s.map((l) => this._isSerializable(l) ? i + encodeURIComponent(JSON.stringify(l)) : i + encodeURIComponent(l)).join("&") : this._isSerializable(s) ? i + encodeURIComponent(JSON.stringify(s)) : i + encodeURIComponent(s);
259
277
  }).filter((r) => r).join("&") : "";
260
278
  }
261
279
  }
262
280
  export {
263
- g as A
281
+ S as A
264
282
  };
@@ -1,8 +1,8 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
2
  import { s as O, d as D, e as g, b as I } from "./cardsHelpers.js";
3
3
  import * as l from "@esri/solution-common";
4
- import { N, y as B, O as T, Q as E, R as y, U as M, B as J } from "./interfaces.js";
5
- class x {
4
+ import { x as T, z as B, O as M, Q as E, R as N, U as y, B as J } from "./helpers.js";
5
+ class _ {
6
6
  /**
7
7
  * Constructor
8
8
  *
@@ -16,7 +16,7 @@ class x {
16
16
  categoriesAsStr: "[]",
17
17
  sortField: "title",
18
18
  sortOrder: "asc"
19
- }, this.locale = r, this.orgUrl = t, this.portalUrl = s, this.anonAgolSession = new l.UserSession({}), this.agolPortalUrl = N(s);
19
+ }, this.locale = r, this.orgUrl = t, this.portalUrl = s, this.anonAgolSession = new l.UserSession({}), this.agolPortalUrl = T(s);
20
20
  }
21
21
  /**
22
22
  * Adds a card to the cache to keep cache fresh between full refreshes.
@@ -216,9 +216,9 @@ class x {
216
216
  snippet: e.snippet || "",
217
217
  description: e.description || "",
218
218
  url: e.url || "",
219
- itemUrl: `${c}/home/item.html` + M([{ k: "id", v: e.id }]) || "",
219
+ itemUrl: `${c}/home/item.html` + y([{ k: "id", v: e.id }]) || "",
220
220
  thumbnailFilename: e.thumbnail,
221
- thumbnailUrl: y(
221
+ thumbnailUrl: N(
222
222
  e.id,
223
223
  e.thumbnail,
224
224
  this.cMissingImageDataURI,
@@ -233,7 +233,7 @@ class x {
233
233
  numViews: e.numViews,
234
234
  tags: e.tags,
235
235
  categories: e.groupCategories && e.groupCategories.length > 0 ? e.groupCategories : e.categories || [],
236
- licenseInfo: T(e.licenseInfo),
236
+ licenseInfo: M(e.licenseInfo),
237
237
  deployCommonId: B(e.typeKeywords || [], "solutionid-"),
238
238
  deployVersion: B(e.typeKeywords || [], "solutionversion-"),
239
239
  canDelete: e.created > 16183314e5,
@@ -282,7 +282,7 @@ class x {
282
282
  ) : [];
283
283
  }
284
284
  }
285
- async function z(h, r, t, s, e = J, i = "created", c = "desc", a = !1, o = [], C = [], f, p, u) {
285
+ async function j(h, r, t, s, e = J, i = "created", c = "desc", a = !1, o = [], C = [], f, p, u) {
286
286
  if (!h?.IsSignedIn)
287
287
  return;
288
288
  const P = {
@@ -294,7 +294,7 @@ async function z(h, r, t, s, e = J, i = "created", c = "desc", a = !1, o = [], C
294
294
  categories: o,
295
295
  num: 100
296
296
  };
297
- return P.q += k(h, p), await K(
297
+ return P.q += k(h, p), await x(
298
298
  r,
299
299
  P,
300
300
  s,
@@ -308,7 +308,7 @@ function k(h, r) {
308
308
  const s = h.PortalUserOrg, e = h.PortalUserName;
309
309
  return s && (t += " orgid:" + s), r !== "My organization's solutions" && e && (t += " owner:" + e), t;
310
310
  }
311
- async function K(h, r, t, s, e = "", i) {
311
+ async function x(h, r, t, s, e = "", i) {
312
312
  const c = await t.requestDeployedSolutionCards(r, h, e, i), a = I(c.cards, s);
313
313
  return {
314
314
  cards: c.cards,
@@ -316,6 +316,6 @@ async function K(h, r, t, s, e = "", i) {
316
316
  };
317
317
  }
318
318
  export {
319
- x as C,
320
- z as g
319
+ _ as C,
320
+ j as g
321
321
  };
@@ -1,13 +1,13 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
2
  import "@esri/solution-common";
3
- import { y as a } from "./interfaces.js";
4
- function S(o, t) {
3
+ import { z as a } from "./helpers.js";
4
+ function p(o, t) {
5
5
  const n = [];
6
6
  return o.forEach((e) => {
7
7
  t.has(e.id) && n.push(e);
8
8
  }), n;
9
9
  }
10
- function p(o, t, n) {
10
+ function y(o, t, n) {
11
11
  if (t < 1 || o.length < t)
12
12
  return {
13
13
  cards: [],
@@ -99,8 +99,8 @@ export {
99
99
  b as a,
100
100
  g as b,
101
101
  u as c,
102
- S as d,
103
- p as e,
102
+ p as d,
103
+ y as e,
104
104
  I as f,
105
105
  m as g,
106
106
  h,
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import { x as D } from "./interfaces.js";
2
+ import { y as D } from "./helpers.js";
3
3
  import { getItemRelatedItems as g } from "@esri/solution-common";
4
4
  async function R(o, r) {
5
5
  const s = await h(r, o);