@esri/solutions-components 0.7.18 → 0.7.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/dist/cjs/calcite-alert_3.cjs.entry.js +93 -6
  2. package/dist/cjs/calcite-combobox_6.cjs.entry.js +1 -1
  3. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +1 -1
  4. package/dist/cjs/card-manager_3.cjs.entry.js +12 -5
  5. package/dist/cjs/crowdsource-manager.cjs.entry.js +4 -3
  6. package/dist/cjs/{downloadUtils-8f50633d.js → downloadUtils-9a13c6ac.js} +19 -14
  7. package/dist/cjs/{index.es-140aa937.js → index.es-284a020c.js} +2 -2
  8. package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
  9. package/dist/cjs/{mapViewUtils-569e9644.js → mapViewUtils-8aa325de.js} +4 -1
  10. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  11. package/dist/cjs/solution-contents_3.cjs.entry.js +4 -4
  12. package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +4 -1
  13. package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +3 -2
  14. package/dist/collection/components/edit-card/edit-card.js +1 -2
  15. package/dist/collection/components/info-card/info-card.js +3 -3
  16. package/dist/collection/components/layer-table/layer-table.css +4 -0
  17. package/dist/collection/components/layer-table/layer-table.js +9 -2
  18. package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -1
  19. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +4 -4
  20. package/dist/collection/utils/downloadUtils.js +17 -12
  21. package/dist/collection/utils/downloadUtils.ts +20 -12
  22. package/dist/collection/utils/interfaces.ts +5 -0
  23. package/dist/collection/utils/popupUtils.js +94 -0
  24. package/dist/collection/utils/popupUtils.ts +104 -0
  25. package/dist/collection/utils/queryUtils.js +4 -1
  26. package/dist/collection/utils/queryUtils.ts +5 -1
  27. package/dist/components/crowdsource-manager.js +4 -3
  28. package/dist/components/downloadUtils.js +17 -12
  29. package/dist/components/edit-card2.js +1 -2
  30. package/dist/components/info-card2.js +91 -3
  31. package/dist/components/layer-table2.js +10 -3
  32. package/dist/components/queryUtils.js +4 -1
  33. package/dist/components/solution-item-sharing2.js +1 -1
  34. package/dist/components/solution-spatial-ref2.js +4 -4
  35. package/dist/esm/calcite-alert_3.entry.js +93 -6
  36. package/dist/esm/calcite-combobox_6.entry.js +1 -1
  37. package/dist/esm/calcite-shell-panel_14.entry.js +1 -1
  38. package/dist/esm/card-manager_3.entry.js +12 -5
  39. package/dist/esm/crowdsource-manager.entry.js +4 -3
  40. package/dist/esm/{downloadUtils-9dee8bc0.js → downloadUtils-a4bbdb1d.js} +19 -14
  41. package/dist/esm/{index.es-54e86c8e.js → index.es-48fdb288.js} +2 -2
  42. package/dist/esm/map-select-tools_3.entry.js +2 -2
  43. package/dist/esm/{mapViewUtils-066602d5.js → mapViewUtils-8fe70944.js} +4 -1
  44. package/dist/esm/public-notification.entry.js +2 -2
  45. package/dist/esm/solution-contents_3.entry.js +4 -4
  46. package/dist/solutions-components/{p-d0c4572d.entry.js → p-1d56804c.entry.js} +18 -2
  47. package/dist/solutions-components/p-24b3ad7d.entry.js +6 -0
  48. package/dist/solutions-components/{p-6656c53e.entry.js → p-2abc02a1.entry.js} +1 -1
  49. package/dist/solutions-components/{p-825c045a.entry.js → p-2ddd9cf8.entry.js} +1 -1
  50. package/dist/solutions-components/{p-e8011829.entry.js → p-48a5ae32.entry.js} +1 -1
  51. package/dist/solutions-components/{p-dfdb8411.js → p-72dbfa77.js} +1 -1
  52. package/dist/solutions-components/{p-683cded6.entry.js → p-b1422b00.entry.js} +1 -1
  53. package/dist/solutions-components/p-b5d1b979.js +36 -0
  54. package/dist/solutions-components/{p-e405f393.entry.js → p-cf24ce53.entry.js} +1 -1
  55. package/dist/solutions-components/{p-1bdd64a0.js → p-d4afcf86.js} +4 -4
  56. package/dist/solutions-components/{p-f486c86d.entry.js → p-fdb1ace8.entry.js} +1 -1
  57. package/dist/solutions-components/solutions-components.css +1 -1
  58. package/dist/solutions-components/solutions-components.esm.js +1 -1
  59. package/dist/solutions-components/utils/downloadUtils.ts +20 -12
  60. package/dist/solutions-components/utils/interfaces.ts +5 -0
  61. package/dist/solutions-components/utils/popupUtils.ts +104 -0
  62. package/dist/solutions-components/utils/queryUtils.ts +5 -1
  63. package/dist/types/components/info-card/info-card.d.ts +5 -0
  64. package/dist/types/utils/downloadUtils.d.ts +3 -3
  65. package/dist/types/utils/interfaces.d.ts +4 -0
  66. package/dist/types/utils/popupUtils.d.ts +46 -0
  67. package/dist/types/utils/queryUtils.d.ts +1 -1
  68. package/package.json +1 -1
  69. package/dist/solutions-components/p-531d91d6.js +0 -36
  70. package/dist/solutions-components/p-8ca5d651.entry.js +0 -6
@@ -3,4 +3,4 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as i,h as t,H as s,g as e,c as h}from"./p-78780f63.js";import{g as o}from"./p-6b943f52.js";import{q as a,a as l,g as n,b as d,c as r,d as c}from"./p-531d91d6.js";import{l as p}from"./p-48ff9cea.js";import{d as v}from"./p-1bdd64a0.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-4af32c75.js";import"./p-d89fff3a.js";import"./p-a230b270.js";import"./p-220ec0d1.js";const u=class{constructor(t){i(this,t),this.isMobile=void 0,this.layer=void 0,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._cardLoading=!1,this._graphics=void 0,this._translations=void 0}async featureSelectionChange(i){const t=i.detail;this._cardLoading=!0;const s=t.length>0?await a(t,this.layer,[],!1,this.mapView.spatialReference):[];this._graphics=s.sort(((i,s)=>t.indexOf(i.getObjectId())-t.indexOf(s.getObjectId()))),this._cardLoading=!1}async layerSelectionChange(i){const t=i.detail[0];this.layer=await l(this.mapView,t)}async componentWillLoad(){await this._getTranslations()}render(){var i,e;const h=(null===(i=this._graphics)||void 0===i?void 0:i.length)>0?"":"display-none",o=(null===(e=this._graphics)||void 0===e?void 0:e.length)>0?"display-none":"";return t(s,null,t("div",{class:"overflow-auto height-full"},t("calcite-shell",{class:"position-relative "+h},t("div",null,t("info-card",{graphics:this._graphics,isLoading:this._cardLoading,isMobile:this.isMobile,mapView:this.mapView,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))),t("calcite-shell",{class:"position-relative "+o},t("div",{class:"padding-1"},t("calcite-notice",{icon:"table",open:!0},t("div",{slot:"message"},this._translations.selectFeaturesToStart))))))}async _getTranslations(){const i=await o(this.el);this._translations=i[0]}get el(){return e(this)}};u.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.height-full{height:100%}card-manager{display:block}";const b=class{constructor(t){i(this,t),this.featureSelectionChange=h(this,"featureSelectionChange",7),this._allIds=[],this._ctrlIsPressed=!1,this._defaultGlobalIdHonored=!1,this._defaultOidHonored=!1,this._observerSet=!1,this._shiftIsPressed=!1,this._skipOnChange=!1,this._tableSorting=!1,this.onTableNodeCreate=i=>{this._tableNode=i},this.defaultLayerId=void 0,this.defaultGlobalId=void 0,this.defaultOid=void 0,this.enableAutoRefresh=void 0,this.enableColumnReorder=!0,this.enableCSV=void 0,this.enableInlineEdit=void 0,this.enableShare=void 0,this.isMobile=void 0,this.mapInfo=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=void 0,this.zoomAndScrollToSelected=void 0,this._confirmDelete=!1,this._controlsThatFit=void 0,this._fetchingData=!1,this._filterActive=!1,this._filterOpen=!1,this._isDeleting=!1,this._layer=void 0,this._selectAllActive=!1,this._selectedIndexes=[],this._showHideOpen=!1,this._showOnlySelected=!1,this._sortActive=!1,this._translations=void 0}enableCSVWatchHandler(){var i;(null===(i=this._toolInfos)||void 0===i?void 0:i.length)>0&&this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}_controlsThatFitWatchHandler(){var i;const t=this._controlsThatFit?this._controlsThatFit.reduce(((i,t)=>(i.push(t.id),i)),[]):[];this._toolInfos=null===(i=this._toolInfos)||void 0===i?void 0:i.map((i=>{if(i&&this._controlsThatFit){const s=this._getId(i.icon);return i.isOverflow=t.indexOf(s)<0,i}}))}isMobileWatchHandler(){this._toolInfos||this.isMobile||this._initToolInfos()}async mapInfoWatchHandler(){var i;(null===(i=this._toolInfos)||void 0===i?void 0:i.length)>0&&this._initToolInfos()}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._updateShareUrl(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",(i=>{this._mapClicked(i)})))}async _layerWatchHandler(){this._fetchingData=!0,this._definitionExpression=this._layer.definitionExpression,await this._resetTable(),this._updateShareUrl(),this._initLayerExpressions(),this._fetchingData=!1}async _selectedIndexesWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this._selectedIndexes.length!==this._allIds.length&&(this._selectAllActive=!1)}async _sortActiveWatchHandler(){this._sortActive||await this._sortTable()}async deleteFeatures(){return this._delete()}async selectionChanged(i){const t=i.detail[0],s=t.getObjectId();if(this.zoomAndScrollToSelected){const i=this._table.viewModel.getObjectIdIndex(s);this._table.scrollToIndex(i);const e=t.layer;let h;this.mapView.allLayerViews.toArray().some((i=>{if(i.layer.title===e.title&&"feature"===i.layer.type)return h=i,!0})),h&&await n([s],h,this.mapView,!0)}}async editsComplete(){await this._refresh()}noLayersFound(){this._layer=void 0,this._allIds=[],this._clearSelection()}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._onResize())))}render(){const i=this._fetchingData?"display-none":"",e=this._fetchingData?"":"display-none",h=this._allIds.length.toString(),o=this._selectedIndexes.length.toString(),a=this.isMobile?"height-full":"height-full-adjusted";return this._validateActiveActions(),t(s,null,t("calcite-shell",null,this._getTableControlRow("header"),t("div",{class:`width-full ${a}`},t("calcite-panel",{class:"height-full width-full"},t("calcite-loader",{class:e,label:this._translations.fetchingData,scale:"l"}),t("div",{class:i,ref:this.onTableNodeCreate})),this.isMobile?void 0:t("div",{class:"bottom-left text-color height-19"},this._translations.recordsSelected.replace("{{total}}",h).replace("{{selected}}",o)))),this._deleteMessage(),this._filterModal())}async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0),document.onclick=i=>this._handleDocumentClick(i),document.onkeydown=i=>this._handleKeyDown(i),document.onkeyup=i=>this._handleKeyUp(i)}componentDidRender(){this._updateToolbar()}async _initModules(){const[i,t]=await p(["esri/widgets/FeatureTable","esri/core/reactiveUtils"]);this.FeatureTable=i,this.reactiveUtils=t}_onResize(){this._updateToolbar()}_getTableControlRow(i){return t("div",{class:"display-flex border-bottom height-51",ref:i=>this._toolbar=i,slot:i},this._getActionBar(),this.isMobile?void 0:this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile?this._getShare("share"):void 0)}_getActionBar(){const i=this.isMobile?"width-full":"",s=this.isMobile?"border-top":"";return t("calcite-action-bar",{class:i,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},t("div",{class:`border-end ${i} ${s}`,id:"solutions-map-layer-picker-container"},t("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,mapView:this.mapView,onLayerSelectionChange:i=>this._layerSelectionChanged(i),onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this.isMobile?void 0:this._getActions())}_getActions(){return this._getActionItems().reduce(((i,s)=>(s&&!s.isOverflow&&i.push(s.isDanger?this._getDangerAction(s.icon,s.label,s.func,s.disabled):s.isSublist?t("calcite-dropdown",{closeOnSelectDisabled:!0,id:this._getId(s.icon),onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:i=>this._showHideDropdown=i},this._getAction(s.active,this._showHideOpen?"chevron-down":s.icon,s.indicator,s.label,s.func,s.disabled,"trigger"),this._showHideOpen?this._getFieldlist():void 0):this._getAction(s.active,s.icon,s.indicator,s.label,s.func,s.disabled)),i)),[])}_getFieldlist(){return this._columnsInfo?t("calcite-dropdown-group",{"selection-mode":"multiple"},Object.keys(this._columnsInfo).map((i=>t("calcite-dropdown-item",{id:i,onClick:i=>{const t=i.target;this._columnsInfo[t.id]=t.selected,t.selected?this._table.showColumn(t.id):this._table.hideColumn(t.id)},selected:this._columnsInfo[i]},i)))):void 0}_validateEnabledActions(){var i;const t=this._featuresSelected(),s=["zoom-to-object","trash","erase","selected-items-filter"];null===(i=this._toolInfos)||void 0===i||i.forEach((i=>{i&&s.indexOf(i.icon)>-1&&(i.disabled=!t)}))}_validateActiveActions(){var i;const t=["filter","list-check-all"];null===(i=this._toolInfos)||void 0===i||i.forEach((i=>{i&&t.indexOf(i.icon)>-1&&("filter"===i.icon&&(i.indicator=this._filterActive),"list-check-all"===i.icon&&(i.active=this._selectAllActive))}))}_initToolInfos(){const i=this._featuresSelected(),t=this._featuresEmpty(),s=this._hasFilterExpressions();this._toolInfos=[{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!i,isOverflow:!1},s?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this._toggleFilter(),disabled:!1,isOverflow:!1}:void 0,this._deleteEnabled?{active:!1,icon:"trash",indicator:!1,label:this._translations.delete,func:()=>this._delete(),disabled:!i,isDanger:!0,isOverflow:!1}:void 0,{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this._clearSelection(),disabled:!i,isOverflow:!1},{active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!i,isOverflow:!1},{active:!1,icon:"list-check-all",indicator:!1,func:()=>this._selectAll(),label:this._translations.selectAll,disabled:t,isOverflow:!1},{active:!1,icon:"compare",indicator:!1,func:()=>this._switchSelected(),label:this._translations.switchSelected,disabled:t,isOverflow:!1},{active:!1,icon:"refresh",indicator:!1,func:()=>this._refresh(),label:this._translations.refresh,disabled:!1,isOverflow:!1},this.enableCSV?{active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,disabled:t,isOverflow:!1}:void 0,{active:!1,icon:this._showHideOpen?"chevron-down":"chevron-right",indicator:!1,func:()=>this._toggleShowHide(),label:this._translations.showHideColumns,disabled:!1,isOverflow:!1,isSublist:!0}],this._defaultVisibleToolSizeInfos=void 0}_featuresSelected(){return this._selectedIndexes.length>0}_featuresEmpty(){return 0===this._allIds.length}_hasFilterExpressions(){var i,t,s;let e;return(null===(t=null===(i=this.mapInfo)||void 0===i?void 0:i.filterConfig)||void 0===t?void 0:t.layerExpressions)&&(null===(s=this._layer)||void 0===s?void 0:s.id)&&(e=this.mapInfo.filterConfig.layerExpressions.filter((i=>i.id===this._layer.id))),(null==e?void 0:e.length)>0}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),this.isMobile||(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const i=this._toolbar.offsetWidth;let t=this._toolbarSizeInfos.reduce(((i,t)=>i+t.width),0);const s=["solutions-more","solutions-map-layer-picker-container","solutions-action-share"];if(t>i){if(this._toolbarSizeInfos.length>0){const e=[...this._toolbarSizeInfos].reverse().reduce(((e,h)=>(s.indexOf(h.id)<0&&(t>i?t-=h.width:e.push(h)),e)),[]).reverse();this._setControlsThatFit(e,s)}}else if(this._defaultVisibleToolSizeInfos){const e=this._toolbarSizeInfos.reduce(((i,t)=>(i.push(t.id),i)),[]);let h=!1;const o=[...this._defaultVisibleToolSizeInfos].reduce(((o,a)=>(!h&&s.indexOf(a.id)<0&&(e.indexOf(a.id)>-1||t+a.width<=i)?(e.indexOf(a.id)<0&&(t+=a.width),o.push(a)):s.indexOf(a.id)<0&&t+a.width>i&&(h=!0),o)),[]);this._setControlsThatFit(o,s)}}),5))}_setControlsThatFit(i,t){let s=JSON.stringify(i)!==JSON.stringify(this._controlsThatFit);document.getElementById("solutions-action-bar").childNodes.forEach((i=>{t.indexOf(i.id)<0&&!s&&(s=this._controlsThatFit.map((i=>i.id)).indexOf(i.id)<0)})),s&&(this._controlsThatFit=[...i])}_setToolbarSizeInfos(){let i=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((t,s)=>{0===s?t.childNodes.forEach((t=>{this._toolbarSizeInfos.push({id:t.id,width:t.offsetWidth}),i||(i=t.offsetWidth>0)})):t.referenceElement||(this._toolbarSizeInfos.push({id:t.id,width:t.offsetWidth}),i||(i=t.offsetWidth>0))})),i&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionItems(){var i;return null===(i=this._toolInfos)||void 0===i?void 0:i.filter((i=>i&&!i.isOverflow))}_getDropdown(i){const s=this._getDropdownItems();return s.length>0?t("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this._layer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:i=>this._moreDropdown=i},t("calcite-action",{appearance:"solid",id:i,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},t("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),t("calcite-dropdown-group",{"selection-mode":"none"},s.map((i=>t("calcite-dropdown-group",{class:i.disabled?"disabled":"",selectionMode:i.disabled?"none":"single"},t("calcite-dropdown-item",{iconStart:i.isSublist&&this._showHideOpen?"chevron-down":i.icon,id:"solutions-subset-list",onClick:i.func},i.label))))),this._showHideOpen?this._getFieldlist():void 0):void 0}_getDropdownItems(){var i;return null===(i=this._toolInfos)||void 0===i?void 0:i.filter((i=>i&&i.isOverflow))}_getAction(i,s,e,h,o,a,l){const n=void 0===this._layer||a;return t("div",{class:"display-flex",id:this._getId(s),slot:l},t("calcite-action",{active:i,appearance:"solid",disabled:n,icon:s,id:s,indicator:e,label:h,onClick:o,text:h,textEnabled:!0}),this._getToolTip("bottom",s,h))}_getShare(i){return t("div",{class:"share-action",id:this._getId(i)},t("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:i=>this._shareNode=i,scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",i,this._translations.share))}_updateShareUrl(){var i,t,s,e;const h=null===(i=this._shareNode)||void 0===i?void 0:i.shareUrl;if(!h)return;const o=new URL(h);(null===(t=this.mapInfo)||void 0===t?void 0:t.id)&&o.searchParams.set("webmap",this.mapInfo.id),(null===(s=this._layer)||void 0===s?void 0:s.id)&&o.searchParams.set("layer",this._layer.id),(null===(e=this._selectedIndexes)||void 0===e?void 0:e.length)>0&&o.searchParams.set("oid",this._selectedIndexes.join(",")),this._shareNode.shareUrl=o.href}_getToolTip(i,s,e){return t("calcite-tooltip",{placement:i,"reference-element":s},t("span",null,e))}_getId(i){return`solutions-action-${i}`}_getDangerAction(i,s,e,h){const o=void 0===this._layer||h;return t("div",{class:"display-flex",id:this._getId(i)},t("calcite-action",{appearance:"solid",disabled:o,id:i,onClick:e,text:""},t("calcite-button",{appearance:"transparent",iconStart:i,kind:"danger"},s)),this._getToolTip("bottom",i,s))}async _getTable(i,t){this._layer&&(await this._layer.when((()=>{this._table=new this.FeatureTable({autoRefreshEnabled:this.enableAutoRefresh,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,highlightEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},tableTemplate:{columnTemplates:t},container:i})})),this._initColumnsInfo(),this._checkEditEnabled(),await this._table.when((()=>{this._table.highlightIds.on("change",(i=>{this._handleOnChange(i)})),this.reactiveUtils.watch((()=>this._table.activeSortOrders),(i=>{var t,s,e,h;this._sortActive=!!this._layer&&(i.length>0&&"asc"===(null===(t=i[0])||void 0===t?void 0:t.direction)||"desc"===(null===(s=i[0])||void 0===s?void 0:s.direction)||null===(null===(e=i[0])||void 0===e?void 0:e.direction)&&(null===(h=i[0])||void 0===h?void 0:h.fieldName)===this._layer.objectIdField)}))})))}async _handleOnChange(i){const t=[...this._table.highlightIds.toArray()];if(this._skipOnChange)this._skipOnChange=!1;else{if(this._ctrlIsPressed||this._shiftIsPressed){if(this._ctrlIsPressed)this._selectedIndexes=t.reverse();else if(this._shiftIsPressed&&(this._skipOnChange=!0,this._previousCurrentId=this._currentId,this._currentId=[...this._table.highlightIds.toArray()].reverse()[0],this._previousCurrentId!==this._currentId)){const i=this._table.activeSortOrders.reduce(((i,t)=>(i.push(`${t.fieldName} ${t.direction}`),i)),[]),s=await d(this._layer,this._layer.definitionExpression,i);let e=!1;const h=this._table.viewModel.getObjectIdIndex(this._previousCurrentId),o=this._table.viewModel.getObjectIdIndex(this._currentId),a=h<o?h:o,l=o>h?o:h;this._selectedIndexes=s.reduce(((i,t)=>{const s=t,h=this._table.viewModel.getObjectIdIndex(s);return s!==this._currentId&&s!==this._previousCurrentId||(e=!e,i.indexOf(s)<0&&i.push(s)),e&&i.indexOf(s)<0&&i.push(s),(this._selectedIndexes.indexOf(s)>-1||h>=a&&h<=l)&&i.indexOf(s)<0&&h>-1&&i.push(s),i}),[]),this._table.highlightIds.addMany(this._selectedIndexes.filter((i=>t.indexOf(i)<0)))}}else if(this._selectedIndexes.length>0){this._skipOnChange=!0;const s=this._selectedIndexes.length>1&&1===i.removed.length?i.removed:t.filter((i=>this._selectedIndexes.indexOf(i)<0));this._clearSelection(),this._selectedIndexes=[...s],s.length>0?this._table.highlightIds.add(s[0]):this._skipOnChange=!1}else this._selectedIndexes=t.reverse();this._finishOnChange()}this._currentId=[...this._table.highlightIds.toArray()].reverse()[0]}_finishOnChange(){this._showOnlySelected&&(this._featuresSelected()?this._table.filterBySelection():this._toggleShowSelected()),this.featureSelectionChange.emit(this._selectedIndexes)}async _resetTable(){var i;this._clearSelection(),this._allIds=[],this.featureSelectionChange.emit(this._selectedIndexes);const t=this._getColumnTemplates(this._layer.id,null===(i=this._layer)||void 0===i?void 0:i.fields);this._allIds=await r(this._layer),this._table?t&&(this._table.tableTemplate.columnTemplates=t):await this._getTable(this._tableNode,t),this._table.layer=this._layer,this._table.view=this.mapView,this._checkEditEnabled(),this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,this._initToolInfos(),await this._table.when((async()=>{var i,t;if(this._table.highlightIds.removeAll(),this._table.clearSelectionFilter(),this._initColumnsInfo(),!this._defaultOidHonored&&(null===(i=this.defaultOid)||void 0===i?void 0:i.length)>0&&this.defaultOid[0]>-1&&(this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0),!this._defaultGlobalIdHonored&&(null===(t=this.defaultGlobalId)||void 0===t?void 0:t.length)>0){const i=await c(this.defaultGlobalId,this._layer),t=(null==i?void 0:i.length)>0?i.map((i=>i.getObjectId())):void 0;t&&this._selectDefaultFeature(t),this._defaultGlobalIdHonored=!0}})),this._showOnlySelected=!1,this._sortActive=!1,await this._sortTable()}_initColumnsInfo(){this._columnsInfo=this._table.columns.reduce(((i,t)=>(i[t.name]=!t.hidden,i)),{})}_selectDefaultFeature(i){i.length>0&&(this._table.highlightIds.addMany(i),this._table.when((()=>{const t=this._table.viewModel.getObjectIdIndex(i[0]);this._table.viewModel.scrollToIndex(t)})))}_checkEditEnabled(){this._editEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsUpdate,this._deleteEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsDelete}async _sortTable(){this._table&&this._layer&&!this._sortActive&&!this._tableSorting&&this.showNewestFirst&&(this._tableSorting=!0,await this._table.when(),await this._layer.when((()=>{this._table.sortColumn(this._layer.objectIdField,"desc"),this._tableSorting=!1})))}_forceShowHide(){this._showHideDropdown&&(this._showHideDropdown.open=this._showHideOpen),this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_closeShowHide(){this._showHideOpen=!1}_handleDocumentClick(i){var t;const s=null===(t=i.target)||void 0===t?void 0:t.id;this._showHideOpen&&Object.keys(this._columnsInfo).indexOf(s)<0&&"solutions-subset-list"!==s&&"chevron-right"!==s&&(this._closeShowHide(),this._moreDropdown&&(this._moreDropdown.open=!1),this._showHideDropdown&&(this._showHideDropdown.open=!1))}_handleKeyDown(i){this._ctrlIsPressed=i.ctrlKey,this._shiftIsPressed=i.shiftKey}_handleKeyUp(i){this._ctrlIsPressed=i.ctrlKey,this._shiftIsPressed=i.shiftKey}_filterModal(){var i,s,e;return t("calcite-modal",{"aria-labelledby":"modal-title",kind:"brand",onCalciteModalClose:async()=>this._closeFilter(),open:this._filterOpen,widthScale:"s"},t("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},null===(s=null===(i=this._translations)||void 0===i?void 0:i.filter)||void 0===s?void 0:s.replace("{{title}}",null===(e=this._layer)||void 0===e?void 0:e.title)),t("div",{slot:"content"},t("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:async()=>this._closeFilter(),layerExpressions:this._layerExpressions,onFilterListReset:()=>this._handleFilterListReset(),onFilterUpdate:()=>this._handleFilterUpdate(),ref:i=>this._filterList=i,view:this.mapView})))}_handleFilterListReset(){this._filterActive=!1}_handleFilterUpdate(){this._filterActive=this._definitionExpression!==this._layer.definitionExpression}async _closeFilter(){this._filterOpen&&(this._allIds=await r(this._layer),this._filterOpen=!1)}_deleteMessage(){return t("calcite-modal",{"aria-labelledby":"modal-title",kind:"danger",onCalciteModalClose:()=>this._deleteClosed(),open:this._confirmDelete},t("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations.deleteFeature),t("div",{slot:"content"},this._translations.confirm),t("calcite-button",{appearance:"outline",kind:"danger",onClick:()=>this._deleteClosed(),slot:"secondary",width:"full"},this._translations.cancel),t("calcite-button",{kind:"danger",loading:this._isDeleting,onClick:()=>{this._deleteFeatures()},slot:"primary",width:"full"},this._translations.delete))}async _deleteFeatures(){this._isDeleting=!0;const i=this._table.highlightIds.toArray().map((i=>({objectId:i})));await this._layer.applyEdits({deleteFeatures:i}),await this._table.refresh(),this._allIds=await r(this._layer),this._isDeleting=!1,this._deleteClosed()}async _mapClicked(i){const t={include:this._layer},s=await this.mapView.hitTest(i.screenPoint,t);s.results.length>0&&(s.results.forEach((i=>{this._clearSelection();const t=i.graphic.getObjectId(),s=this._table.highlightIds.indexOf(t);s>-1?this._table.highlightIds.removeAt(s):this._table.highlightIds.add(t)})),this._showOnlySelected&&this._table.filterBySelection())}_deleteClosed(){this._confirmDelete=!1}_selectAll(){const i=this._allIds;this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(i),this._selectedIndexes=i,this._finishOnChange(),this._selectAllActive=!0}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.clearSelectionFilter()}_clearSelection(){var i;this._selectedIndexes=[],null===(i=this._table)||void 0===i||i.highlightIds.removeAll()}_toggleFilter(){this._filterOpen=!this._filterOpen}_initLayerExpressions(){var i,t;const s=null===(t=null===(i=this.mapInfo)||void 0===i?void 0:i.filterConfig)||void 0===t?void 0:t.layerExpressions;this._layerExpressions=s?s.filter((i=>i.id===this._layer.id)):[]}_switchSelected(){const i=[...this._selectedIndexes];this._table.highlightIds.removeAll();const t=this._allIds.reduce(((t,s)=>(i.indexOf(s)<0&&t.push(s),t)),[]).sort(((i,t)=>i-t));this._skipOnChange=!0,this._table.highlightIds.addMany(t),this._selectedIndexes=t,this._finishOnChange()}async _exportToCSV(){const i={},t=this._table.highlightIds.toArray();i[this._layer.id]={selectionSetNames:[this._layer.title],ids:t,layer:this._layer},v(null,i,!1,!1,!0)}async _refresh(){await this._table.refresh(),this.featureSelectionChange.emit(this._selectedIndexes)}_zoom(){this._table.zoomToSelection()}_delete(){this._confirmDelete=!0}async _layerSelectionChanged(i){var t;const s=i.detail[0];if(s!==(null===(t=this._layer)||void 0===t?void 0:t.id)||this._featuresEmpty()){this._fetchingData=!0;const i=await l(this.mapView,s);await i.when((()=>{this._layer=i}))}this._fetchingData=!1}_getColumnTemplates(i,t){var s;let e;null===(s=this.mapInfo.layerInfos)||void 0===s||s.some((t=>{if(t.id===i)return e=t,!0}));let h=null==e?void 0:e.columnTemplates;return t&&(h=h?h.map((i=>(t.some((t=>{if(t.name===i.fieldName)return i.label=t.alias,i.menuConfig=this._getMenuConfig(t.name),!0})),i))):t.map((i=>({type:"field",fieldName:i.name,label:i.alias,menuConfig:this._getMenuConfig(i.name)})))),h}_getMenuConfig(i){return{items:[{label:this._translations.hideField,iconClass:"esri-icon-non-visible",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(i)}}]}}_handleHideClick(i){this._columnsInfo[i]=!1,this._table.hideColumn(i),this._table.tableTemplate.columnTemplates.forEach((t=>{t.fieldName===i&&(t.visible=!1)}))}async _getTranslations(){const i=await o(this.el);this._translations=i[0]}get el(){return e(this)}static get watchers(){return{enableCSV:["enableCSVWatchHandler"],enableInlineEdit:["enableInlineEditWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"],isMobile:["isMobileWatchHandler"],mapInfo:["mapInfoWatchHandler"],mapView:["mapViewWatchHandler"],_layer:["_layerWatchHandler"],_selectedIndexes:["_selectedIndexesWatchHandler"],_sortActive:["_sortActiveWatchHandler"]}}};b.style=':host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir="rtl"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir="rtl"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}';const m=class{constructor(t){i(this,t),this.mapChanged=h(this,"mapChanged",7),this.beforeMapChanged=h(this,"beforeMapChanged",7),this._defaultWebmapHonored=!1,this._loadedId="",this.defaultWebmapId="",this.enableHome=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableMapToolsExpand=!0,this.enableSearch=void 0,this.enableBasemap=void 0,this.basemapConfig=void 0,this.hidden=void 0,this.homeZoomIndex=3,this.homeZoomPosition="top-left",this.homeZoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.mapView=void 0,this.stackTools=!0,this.theme=void 0,this.toolOrder=void 0,this._searchConfiguration=void 0,this._webMapInfo=void 0}enableHomeWatchHandler(){this._initHome()}async mapInfoChange(i){await this._loadMap(i.detail)}async componentWillLoad(){await this._initModules()}render(){var i,e;const h=this.hidden?"visibility-hidden":"",o="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",a=(null===(i=this.mapInfos)||void 0===i?void 0:i.length)>1?"":"display-none",l=(null===(e=this.mapInfos)||void 0===e?void 0:e.length)>1?"map-height":"height-full";return t(s,null,t("map-picker",{class:a,mapInfos:this.mapInfos,ref:i=>this._mapPicker=i}),t("div",{class:`${l} ${h}`,ref:i=>this._mapDiv=i}),t("map-tools",{basemapConfig:this.basemapConfig,class:`box-shadow ${o}`,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableLegend:this.enableLegend,enableMapToolsExpand:this.enableMapToolsExpand,enableSearch:this.enableSearch,homeZoomToolsSize:this.homeZoomToolsSize,mapView:this.mapView,mapWidgetsSize:this.mapWidgetsSize,ref:i=>this._mapTools=i,searchConfiguration:this._searchConfiguration,stackTools:this.stackTools,toolOrder:this.toolOrder}))}async _initModules(){const[i,t,s]=await p(["esri/WebMap","esri/views/MapView","esri/widgets/Home"]);this.WebMap=i,this.MapView=t,this.Home=s}async _loadMap(i){var t;const s=!this._defaultWebmapHonored&&this.defaultWebmapId,e=null===(t=this.mapInfos)||void 0===t?void 0:t.filter((i=>i.id===this.defaultWebmapId)),h=JSON.stringify(i)!==JSON.stringify(this._webMapInfo);this._webMapInfo=s&&e?e[0]:!(null==i?void 0:i.id)&&this.mapInfos.length>0?this.mapInfos[0]:i;const o=this._webMapInfo.id,a=s&&(null==i?void 0:i.id)===this.defaultWebmapId;if(this._loadedId!==o&&!s||a){const i=new this.WebMap({portalItem:{id:o}});this.mapView=new this.MapView({container:this._mapDiv,map:i,resizeAlign:"center"}),this._loadedId=o,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),await this.mapView.when((()=>{this._initHome(),this.mapView.ui.add(this._mapTools,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=!!a||this._defaultWebmapHonored,this.mapChanged.emit({id:o,mapView:this.mapView})}))}else s?(this._defaultWebmapHonored=!0,this._mapPicker.setMapByID(o)):h&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:o,mapView:this.mapView}))}_initHome(){if(this.enableHome){this._homeWidget=new this.Home({view:this.mapView}),this.mapView.ui.add(this._homeWidget,{position:this.homeZoomPosition,index:this.homeZoomIndex});const i="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";this._homeWidget.domNode.style.height=i,this._homeWidget.domNode.style.width=i}else this._homeWidget&&this.mapView.ui.remove(this._homeWidget)}get el(){return e(this)}static get watchers(){return{enableHome:["enableHomeWatchHandler"]}}};m.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 51px)}.height-full{height:100%}.box-shadow{box-shadow:none !important}.visibility-hidden{visibility:hidden}.display-none{display:none}";export{u as card_manager,b as layer_table,m as map_card}
6
+ import{r as i,h as t,H as s,g as e,c as h}from"./p-78780f63.js";import{g as o}from"./p-6b943f52.js";import{q as a,a as l,g as n,b as d,c as r,d as c}from"./p-b5d1b979.js";import{l as p}from"./p-48ff9cea.js";import{d as v}from"./p-d4afcf86.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-4af32c75.js";import"./p-d89fff3a.js";import"./p-a230b270.js";import"./p-220ec0d1.js";const u=class{constructor(t){i(this,t),this.isMobile=void 0,this.layer=void 0,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._cardLoading=!1,this._graphics=void 0,this._translations=void 0}async featureSelectionChange(i){const t=i.detail;this._cardLoading=!0;const s=t.length>0?await a(t,this.layer,[],!1,this.mapView.spatialReference):[];this._graphics=s.sort(((i,s)=>t.indexOf(i.getObjectId())-t.indexOf(s.getObjectId()))),this._cardLoading=!1}async layerSelectionChange(i){const t=i.detail[0];this.layer=await l(this.mapView,t)}async componentWillLoad(){await this._getTranslations()}render(){var i,e;const h=(null===(i=this._graphics)||void 0===i?void 0:i.length)>0?"":"display-none",o=(null===(e=this._graphics)||void 0===e?void 0:e.length)>0?"display-none":"";return t(s,null,t("div",{class:"overflow-auto height-full"},t("calcite-shell",{class:"position-relative "+h},t("div",null,t("info-card",{graphics:this._graphics,isLoading:this._cardLoading,isMobile:this.isMobile,mapView:this.mapView,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))),t("calcite-shell",{class:"position-relative "+o},t("div",{class:"padding-1"},t("calcite-notice",{icon:"table",open:!0},t("div",{slot:"message"},this._translations.selectFeaturesToStart))))))}async _getTranslations(){const i=await o(this.el);this._translations=i[0]}get el(){return e(this)}};u.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.height-full{height:100%}card-manager{display:block}";const b=class{constructor(t){i(this,t),this.featureSelectionChange=h(this,"featureSelectionChange",7),this._allIds=[],this._ctrlIsPressed=!1,this._defaultGlobalIdHonored=!1,this._defaultOidHonored=!1,this._observerSet=!1,this._shiftIsPressed=!1,this._skipOnChange=!1,this._tableSorting=!1,this.onTableNodeCreate=i=>{this._tableNode=i},this.defaultLayerId=void 0,this.defaultGlobalId=void 0,this.defaultOid=void 0,this.enableAutoRefresh=void 0,this.enableColumnReorder=!0,this.enableCSV=void 0,this.enableInlineEdit=void 0,this.enableShare=void 0,this.isMobile=void 0,this.mapInfo=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=void 0,this.zoomAndScrollToSelected=void 0,this._confirmDelete=!1,this._controlsThatFit=void 0,this._fetchingData=!1,this._filterActive=!1,this._filterOpen=!1,this._isDeleting=!1,this._layer=void 0,this._selectAllActive=!1,this._selectedIndexes=[],this._showHideOpen=!1,this._showOnlySelected=!1,this._sortActive=!1,this._translations=void 0}enableCSVWatchHandler(){var i;(null===(i=this._toolInfos)||void 0===i?void 0:i.length)>0&&this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}_controlsThatFitWatchHandler(){var i;const t=this._controlsThatFit?this._controlsThatFit.reduce(((i,t)=>(i.push(t.id),i)),[]):[];this._toolInfos=null===(i=this._toolInfos)||void 0===i?void 0:i.map((i=>{if(i&&this._controlsThatFit){const s=this._getId(i.icon);return i.isOverflow=t.indexOf(s)<0,i}}))}isMobileWatchHandler(){this._toolInfos||this.isMobile||this._initToolInfos()}async mapInfoWatchHandler(){var i;(null===(i=this._toolInfos)||void 0===i?void 0:i.length)>0&&this._initToolInfos()}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._updateShareUrl(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",(i=>{this._mapClicked(i)})))}async _layerWatchHandler(){this._fetchingData=!0,this._definitionExpression=this._layer.definitionExpression,await this._resetTable(),this._updateShareUrl(),this._initLayerExpressions(),this._fetchingData=!1}async _selectedIndexesWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this._selectedIndexes.length!==this._allIds.length&&(this._selectAllActive=!1)}async _sortActiveWatchHandler(){this._sortActive||await this._sortTable()}async deleteFeatures(){return this._delete()}async selectionChanged(i){const t=i.detail[0],s=t.getObjectId();if(this.zoomAndScrollToSelected){const i=this._table.viewModel.getObjectIdIndex(s);this._table.scrollToIndex(i);const e=t.layer;let h;this.mapView.allLayerViews.toArray().some((i=>{if(i.layer.title===e.title&&"feature"===i.layer.type)return h=i,!0})),h&&await n([s],h,this.mapView,!0)}}async editsComplete(){await this._refresh()}noLayersFound(){this._layer=void 0,this._allIds=[],this._clearSelection()}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver||(this._resizeObserver=new ResizeObserver((()=>this._onResize())))}render(){const i=this._fetchingData?"display-none":"",e=this._fetchingData?"":"display-none",h=this._allIds.length.toString(),o=this._selectedIndexes.length.toString(),a=this.isMobile?"height-full":"height-full-adjusted";return this._validateActiveActions(),t(s,null,t("calcite-shell",null,this._getTableControlRow("header"),t("div",{class:`width-full ${a}`},t("calcite-panel",{class:"height-full width-full"},t("calcite-loader",{class:e,label:this._translations.fetchingData,scale:"l"}),t("div",{class:i,ref:this.onTableNodeCreate})),this.isMobile?void 0:t("div",{class:"bottom-left text-color height-19"},this._translations.recordsSelected.replace("{{total}}",h).replace("{{selected}}",o)))),this._deleteMessage(),this._filterModal())}async componentDidLoad(){this.isMobile||this._observerSet||(this._resizeObserver.observe(this._toolbar),this._observerSet=!0),document.onclick=i=>this._handleDocumentClick(i),document.onkeydown=i=>this._handleKeyDown(i),document.onkeyup=i=>this._handleKeyUp(i)}componentDidRender(){this._updateToolbar()}async _initModules(){const[i,t]=await p(["esri/widgets/FeatureTable","esri/core/reactiveUtils"]);this.FeatureTable=i,this.reactiveUtils=t}_onResize(){this._updateToolbar()}_getTableControlRow(i){return t("div",{class:"display-flex border-bottom height-51",ref:i=>this._toolbar=i,slot:i},this._getActionBar(),this.isMobile?void 0:this._getDropdown("more-table-options"),this.enableShare&&!this.isMobile?this._getShare("share"):void 0)}_getActionBar(){const i=this.isMobile?"width-full":"",s=this.isMobile?"border-top":"";return t("calcite-action-bar",{class:i,expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},t("div",{class:`border-end ${i} ${s}`,id:"solutions-map-layer-picker-container"},t("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,display:"inline-flex",height:50,isMobile:this.isMobile,mapView:this.mapView,onLayerSelectionChange:i=>this._layerSelectionChanged(i),onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this.isMobile?void 0:this._getActions())}_getActions(){return this._getActionItems().reduce(((i,s)=>(s&&!s.isOverflow&&i.push(s.isDanger?this._getDangerAction(s.icon,s.label,s.func,s.disabled):s.isSublist?t("calcite-dropdown",{closeOnSelectDisabled:!0,id:this._getId(s.icon),onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:i=>this._showHideDropdown=i},this._getAction(s.active,this._showHideOpen?"chevron-down":s.icon,s.indicator,s.label,s.func,s.disabled,"trigger"),this._showHideOpen?this._getFieldlist():void 0):this._getAction(s.active,s.icon,s.indicator,s.label,s.func,s.disabled)),i)),[])}_getFieldlist(){return this._columnsInfo?t("calcite-dropdown-group",{"selection-mode":"multiple"},Object.keys(this._columnsInfo).map((i=>t("calcite-dropdown-item",{id:i,onClick:i=>{const t=i.target;this._columnsInfo[t.id]=t.selected,t.selected?this._table.showColumn(t.id):this._table.hideColumn(t.id)},selected:this._columnsInfo[i]},i)))):void 0}_validateEnabledActions(){var i;const t=this._featuresSelected(),s=["zoom-to-object","trash","erase","selected-items-filter"];null===(i=this._toolInfos)||void 0===i||i.forEach((i=>{i&&s.indexOf(i.icon)>-1&&(i.disabled=!t)}))}_validateActiveActions(){var i;const t=["filter","list-check-all"];null===(i=this._toolInfos)||void 0===i||i.forEach((i=>{i&&t.indexOf(i.icon)>-1&&("filter"===i.icon&&(i.indicator=this._filterActive),"list-check-all"===i.icon&&(i.active=this._selectAllActive))}))}_initToolInfos(){const i=this._featuresSelected(),t=this._featuresEmpty(),s=this._hasFilterExpressions();this._toolInfos=[{active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!i,isOverflow:!1},s?{active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this._toggleFilter(),disabled:!1,isOverflow:!1}:void 0,this._deleteEnabled?{active:!1,icon:"trash",indicator:!1,label:this._translations.delete,func:()=>this._delete(),disabled:!i,isDanger:!0,isOverflow:!1}:void 0,{active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>this._clearSelection(),disabled:!i,isOverflow:!1},{active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!i,isOverflow:!1},{active:!1,icon:"list-check-all",indicator:!1,func:()=>this._selectAll(),label:this._translations.selectAll,disabled:t,isOverflow:!1},{active:!1,icon:"compare",indicator:!1,func:()=>this._switchSelected(),label:this._translations.switchSelected,disabled:t,isOverflow:!1},{active:!1,icon:"refresh",indicator:!1,func:()=>this._refresh(),label:this._translations.refresh,disabled:!1,isOverflow:!1},this.enableCSV?{active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,disabled:t,isOverflow:!1}:void 0,{active:!1,icon:this._showHideOpen?"chevron-down":"chevron-right",indicator:!1,func:()=>this._toggleShowHide(),label:this._translations.showHideColumns,disabled:!1,isOverflow:!1,isSublist:!0}],this._defaultVisibleToolSizeInfos=void 0}_featuresSelected(){return this._selectedIndexes.length>0}_featuresEmpty(){return 0===this._allIds.length}_hasFilterExpressions(){var i,t,s;let e;return(null===(t=null===(i=this.mapInfo)||void 0===i?void 0:i.filterConfig)||void 0===t?void 0:t.layerExpressions)&&(null===(s=this._layer)||void 0===s?void 0:s.id)&&(e=this.mapInfo.filterConfig.layerExpressions.filter((i=>i.id===this._layer.id))),(null==e?void 0:e.length)>0}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),this.isMobile||(this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const i=this._toolbar.offsetWidth;let t=this._toolbarSizeInfos.reduce(((i,t)=>i+t.width),0);const s=["solutions-more","solutions-map-layer-picker-container","solutions-action-share"];if(t>i){if(this._toolbarSizeInfos.length>0){const e=[...this._toolbarSizeInfos].reverse().reduce(((e,h)=>(s.indexOf(h.id)<0&&(t>i?t-=h.width:e.push(h)),e)),[]).reverse();this._setControlsThatFit(e,s)}}else if(this._defaultVisibleToolSizeInfos){const e=this._toolbarSizeInfos.reduce(((i,t)=>(i.push(t.id),i)),[]);let h=!1;const o=[...this._defaultVisibleToolSizeInfos].reduce(((o,a)=>(!h&&s.indexOf(a.id)<0&&(e.indexOf(a.id)>-1||t+a.width<=i)?(e.indexOf(a.id)<0&&(t+=a.width),o.push(a)):s.indexOf(a.id)<0&&t+a.width>i&&(h=!0),o)),[]);this._setControlsThatFit(o,s)}}),5))}_setControlsThatFit(i,t){let s=JSON.stringify(i)!==JSON.stringify(this._controlsThatFit);document.getElementById("solutions-action-bar").childNodes.forEach((i=>{t.indexOf(i.id)<0&&!s&&(s=this._controlsThatFit.map((i=>i.id)).indexOf(i.id)<0)})),s&&(this._controlsThatFit=[...i])}_setToolbarSizeInfos(){let i=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((t,s)=>{0===s?t.childNodes.forEach((t=>{this._toolbarSizeInfos.push({id:t.id,width:t.offsetWidth}),i||(i=t.offsetWidth>0)})):t.referenceElement||(this._toolbarSizeInfos.push({id:t.id,width:t.offsetWidth}),i||(i=t.offsetWidth>0))})),i&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionItems(){var i;return null===(i=this._toolInfos)||void 0===i?void 0:i.filter((i=>i&&!i.isOverflow))}_getDropdown(i){const s=this._getDropdownItems();return s.length>0?t("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this._layer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:i=>this._moreDropdown=i},t("calcite-action",{appearance:"solid",id:i,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},t("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),t("calcite-dropdown-group",{"selection-mode":"none"},s.map((i=>t("calcite-dropdown-group",{class:i.disabled?"disabled":"",selectionMode:i.disabled?"none":"single"},t("calcite-dropdown-item",{iconStart:i.isSublist&&this._showHideOpen?"chevron-down":i.icon,id:"solutions-subset-list",onClick:i.func},i.label))))),this._showHideOpen?this._getFieldlist():void 0):void 0}_getDropdownItems(){var i;return null===(i=this._toolInfos)||void 0===i?void 0:i.filter((i=>i&&i.isOverflow))}_getAction(i,s,e,h,o,a,l){const n=void 0===this._layer||a;return t("div",{class:"display-flex",id:this._getId(s),slot:l},t("calcite-action",{active:i,appearance:"solid",disabled:n,icon:s,id:s,indicator:e,label:h,onClick:o,text:h,textEnabled:!0}),this._getToolTip("bottom",s,h))}_getShare(i){return t("div",{class:"share-action",id:this._getId(i)},t("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:i=>this._shareNode=i,scale:"m",shareButtonColor:"neutral",shareButtonType:"action",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",i,this._translations.share))}_updateShareUrl(){var i,t,s,e;const h=null===(i=this._shareNode)||void 0===i?void 0:i.shareUrl;if(!h)return;const o=new URL(h);(null===(t=this.mapInfo)||void 0===t?void 0:t.id)&&o.searchParams.set("webmap",this.mapInfo.id),(null===(s=this._layer)||void 0===s?void 0:s.id)&&o.searchParams.set("layer",this._layer.id),(null===(e=this._selectedIndexes)||void 0===e?void 0:e.length)>0&&o.searchParams.set("oid",this._selectedIndexes.join(",")),this._shareNode.shareUrl=o.href}_getToolTip(i,s,e){return t("calcite-tooltip",{placement:i,"reference-element":s},t("span",null,e))}_getId(i){return`solutions-action-${i}`}_getDangerAction(i,s,e,h){const o=void 0===this._layer||h;return t("div",{class:"display-flex",id:this._getId(i)},t("calcite-action",{appearance:"solid",disabled:o,id:i,onClick:e,text:""},t("calcite-button",{appearance:"transparent",iconStart:i,kind:"danger"},s)),this._getToolTip("bottom",i,s))}async _getTable(i,t){this._layer&&(await this._layer.when((()=>{this._table=new this.FeatureTable({autoRefreshEnabled:this.enableAutoRefresh,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,highlightEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},tableTemplate:{columnTemplates:t},container:i})})),this._initColumnsInfo(),this._checkEditEnabled(),await this._table.when((()=>{this._table.highlightIds.on("change",(i=>{this._handleOnChange(i)})),this.reactiveUtils.watch((()=>this._table.activeSortOrders),(i=>{var t,s,e,h;this._sortActive=!!this._layer&&(i.length>0&&"asc"===(null===(t=i[0])||void 0===t?void 0:t.direction)||"desc"===(null===(s=i[0])||void 0===s?void 0:s.direction)||null===(null===(e=i[0])||void 0===e?void 0:e.direction)&&(null===(h=i[0])||void 0===h?void 0:h.fieldName)===this._layer.objectIdField)}))})))}async _handleOnChange(i){const t=[...this._table.highlightIds.toArray()];if(this._skipOnChange)this._skipOnChange=!1;else{if(this._ctrlIsPressed||this._shiftIsPressed){if(this._ctrlIsPressed)this._selectedIndexes=t.reverse();else if(this._shiftIsPressed&&(this._skipOnChange=!0,this._previousCurrentId=this._currentId,this._currentId=[...this._table.highlightIds.toArray()].reverse()[0],this._previousCurrentId!==this._currentId)){const i=this._table.activeSortOrders.reduce(((i,t)=>(i.push(`${t.fieldName} ${t.direction}`),i)),[]),s=await d(this._layer,this._layer.definitionExpression,i);let e=!1;const h=this._table.viewModel.getObjectIdIndex(this._previousCurrentId),o=this._table.viewModel.getObjectIdIndex(this._currentId),a=h<o?h:o,l=o>h?o:h;this._selectedIndexes=s.reduce(((i,t)=>{const s=t,h=this._table.viewModel.getObjectIdIndex(s);return s!==this._currentId&&s!==this._previousCurrentId||(e=!e,i.indexOf(s)<0&&i.push(s)),e&&i.indexOf(s)<0&&i.push(s),(this._selectedIndexes.indexOf(s)>-1||h>=a&&h<=l)&&i.indexOf(s)<0&&h>-1&&i.push(s),i}),[]),this._table.highlightIds.addMany(this._selectedIndexes.filter((i=>t.indexOf(i)<0)))}}else if(this._selectedIndexes.length>0){this._skipOnChange=!0;const s=this._selectedIndexes.length>1&&1===i.removed.length?i.removed:t.filter((i=>this._selectedIndexes.indexOf(i)<0));this._clearSelection(),this._selectedIndexes=[...s],s.length>0?this._table.highlightIds.add(s[0]):this._skipOnChange=!1}else this._selectedIndexes=t.reverse();this._finishOnChange()}this._currentId=[...this._table.highlightIds.toArray()].reverse()[0]}_finishOnChange(){this._showOnlySelected&&(this._featuresSelected()?this._table.filterBySelection():this._toggleShowSelected()),this.featureSelectionChange.emit(this._selectedIndexes)}async _resetTable(){var i;this._clearSelection(),this._allIds=[],this.featureSelectionChange.emit(this._selectedIndexes);const t=this._getColumnTemplates(this._layer.id,null===(i=this._layer)||void 0===i?void 0:i.fields);this._allIds=await r(this._layer),this._table?t&&(this._table.tableTemplate.columnTemplates=t):await this._getTable(this._tableNode,t),this._table.layer=this._layer,this._table.view=this.mapView,this._checkEditEnabled(),this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,this._initToolInfos(),await this._table.when((async()=>{var i,t;if(this._table.highlightIds.removeAll(),this._table.clearSelectionFilter(),this._initColumnsInfo(),!this._defaultOidHonored&&(null===(i=this.defaultOid)||void 0===i?void 0:i.length)>0&&this.defaultOid[0]>-1&&(this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0),!this._defaultGlobalIdHonored&&(null===(t=this.defaultGlobalId)||void 0===t?void 0:t.length)>0){const i=await c(this.defaultGlobalId,this._layer),t=(null==i?void 0:i.length)>0?i.map((i=>i.getObjectId())):void 0;t&&this._selectDefaultFeature(t),this._defaultGlobalIdHonored=!0}})),this._showOnlySelected=!1,this._sortActive=!1,await this._sortTable()}_initColumnsInfo(){this._columnsInfo=this._table.columns.reduce(((i,t)=>(i[t.name]=!t.hidden,i)),{})}_selectDefaultFeature(i){i.length>0&&(this._table.highlightIds.addMany(i),this._table.when((()=>{const t=this._table.viewModel.getObjectIdIndex(i[0]);this._table.viewModel.scrollToIndex(t)})))}_checkEditEnabled(){this._editEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsUpdate,this._deleteEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsDelete}async _sortTable(){this._table&&this._layer&&!this._sortActive&&!this._tableSorting&&this.showNewestFirst&&(this._tableSorting=!0,await this._table.when(),await this._layer.when((()=>{this._table.sortColumn(this._layer.objectIdField,"desc"),this._tableSorting=!1})))}_forceShowHide(){this._showHideDropdown&&(this._showHideDropdown.open=this._showHideOpen),this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_closeShowHide(){this._showHideOpen=!1}_handleDocumentClick(i){var t;const s=null===(t=i.target)||void 0===t?void 0:t.id;this._showHideOpen&&Object.keys(this._columnsInfo).indexOf(s)<0&&"solutions-subset-list"!==s&&"chevron-right"!==s&&(this._closeShowHide(),this._moreDropdown&&(this._moreDropdown.open=!1),this._showHideDropdown&&(this._showHideDropdown.open=!1))}_handleKeyDown(i){this._ctrlIsPressed=i.ctrlKey,this._shiftIsPressed=i.shiftKey}_handleKeyUp(i){this._ctrlIsPressed=i.ctrlKey,this._shiftIsPressed=i.shiftKey}_filterModal(){var i,s,e;return t("calcite-modal",{"aria-labelledby":"modal-title",class:"modal",kind:"brand",onCalciteModalClose:async()=>this._closeFilter(),open:this._filterOpen,widthScale:"s"},t("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},null===(s=null===(i=this._translations)||void 0===i?void 0:i.filter)||void 0===s?void 0:s.replace("{{title}}",null===(e=this._layer)||void 0===e?void 0:e.title)),t("div",{slot:"content"},t("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:async()=>this._closeFilter(),layerExpressions:this._layerExpressions,onFilterListReset:()=>this._handleFilterListReset(),onFilterUpdate:()=>this._handleFilterUpdate(),ref:i=>this._filterList=i,view:this.mapView})))}_handleFilterListReset(){this._filterActive=!1}_handleFilterUpdate(){this._filterActive=this._definitionExpression!==this._layer.definitionExpression}async _closeFilter(){this._filterOpen&&(this._allIds=await r(this._layer),this._filterOpen=!1)}_deleteMessage(){return t("calcite-modal",{"aria-labelledby":"modal-title",kind:"danger",onCalciteModalClose:()=>this._deleteClosed(),open:this._confirmDelete},t("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations.deleteFeature),t("div",{slot:"content"},this._translations.confirm),t("calcite-button",{appearance:"outline",kind:"danger",onClick:()=>this._deleteClosed(),slot:"secondary",width:"full"},this._translations.cancel),t("calcite-button",{kind:"danger",loading:this._isDeleting,onClick:()=>{this._deleteFeatures()},slot:"primary",width:"full"},this._translations.delete))}async _deleteFeatures(){this._isDeleting=!0;const i=this._table.highlightIds.toArray().map((i=>({objectId:i})));await this._layer.applyEdits({deleteFeatures:i}),await this._table.refresh(),this._allIds=await r(this._layer),this._isDeleting=!1,this._deleteClosed()}async _mapClicked(i){const t={include:this._layer},s=await this.mapView.hitTest(i.screenPoint,t);s.results.length>0&&(s.results.forEach((i=>{this._clearSelection();const t=i.graphic.getObjectId(),s=this._table.highlightIds.indexOf(t);s>-1?this._table.highlightIds.removeAt(s):this._table.highlightIds.add(t)})),this._showOnlySelected&&this._table.filterBySelection())}_deleteClosed(){this._confirmDelete=!1}_selectAll(){const i=this._allIds;this._table.highlightIds.removeAll(),this._skipOnChange=!0,this._table.highlightIds.addMany(i),this._selectedIndexes=i,this._finishOnChange(),this._selectAllActive=!0}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.clearSelectionFilter()}_clearSelection(){var i;this._selectedIndexes=[],null===(i=this._table)||void 0===i||i.highlightIds.removeAll()}_toggleFilter(){this._filterOpen=!this._filterOpen}_initLayerExpressions(){var i,t;const s=null===(t=null===(i=this.mapInfo)||void 0===i?void 0:i.filterConfig)||void 0===t?void 0:t.layerExpressions;this._layerExpressions=s?s.filter((i=>i.id===this._layer.id)):[]}_switchSelected(){const i=[...this._selectedIndexes];this._table.highlightIds.removeAll();const t=this._allIds.reduce(((t,s)=>(i.indexOf(s)<0&&t.push(s),t)),[]).sort(((i,t)=>i-t));this._skipOnChange=!0,this._table.highlightIds.addMany(t),this._selectedIndexes=t,this._finishOnChange()}async _exportToCSV(){const i={},t=this._table.highlightIds.toArray();i[this._layer.id]={selectionSetNames:[this._layer.title],ids:t,layer:this._layer};const s=this._table.columns.toArray().reduce(((i,t)=>(t.hidden||i.push(t.name.toLocaleLowerCase()),i)),[]);v(null,i,!1,!1,!0,s)}async _refresh(){await this._table.refresh(),this.featureSelectionChange.emit(this._selectedIndexes)}_zoom(){this._table.zoomToSelection()}_delete(){this._confirmDelete=!0}async _layerSelectionChanged(i){var t;const s=i.detail[0];if(s!==(null===(t=this._layer)||void 0===t?void 0:t.id)||this._featuresEmpty()){this._fetchingData=!0;const i=await l(this.mapView,s);await i.when((()=>{this._layer=i}))}this._fetchingData=!1}_getColumnTemplates(i,t){var s;let e;null===(s=this.mapInfo.layerInfos)||void 0===s||s.some((t=>{if(t.id===i)return e=t,!0}));let h=null==e?void 0:e.columnTemplates;return t&&(h=h?h.map((i=>(t.some((t=>{if(t.name===i.fieldName)return i.label=t.alias,i.menuConfig=this._getMenuConfig(t.name),!0})),i))):t.map((i=>({type:"field",fieldName:i.name,label:i.alias,menuConfig:this._getMenuConfig(i.name)})))),h}_getMenuConfig(i){return{items:[{label:this._translations.hideField,iconClass:"esri-icon-non-visible",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(i)}}]}}_handleHideClick(i){this._columnsInfo[i]=!1,this._table.hideColumn(i),this._table.tableTemplate.columnTemplates.forEach((t=>{t.fieldName===i&&(t.visible=!1)}))}async _getTranslations(){const i=await o(this.el);this._translations=i[0]}get el(){return e(this)}static get watchers(){return{enableCSV:["enableCSVWatchHandler"],enableInlineEdit:["enableInlineEditWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"],isMobile:["isMobileWatchHandler"],mapInfo:["mapInfoWatchHandler"],mapView:["mapViewWatchHandler"],_layer:["_layerWatchHandler"],_selectedIndexes:["_selectedIndexesWatchHandler"],_sortActive:["_sortActiveWatchHandler"]}}};b.style=':host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir="rtl"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-color-background)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{font-size:14px !important;color:var(--calcite-color-text-3) !important}.share-action{position:absolute;right:0}html[dir="rtl"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.instant-app-share{height:50px !important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-modal-content-padding:0}';const m=class{constructor(t){i(this,t),this.mapChanged=h(this,"mapChanged",7),this.beforeMapChanged=h(this,"beforeMapChanged",7),this._defaultWebmapHonored=!1,this._loadedId="",this.defaultWebmapId="",this.enableHome=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableMapToolsExpand=!0,this.enableSearch=void 0,this.enableBasemap=void 0,this.basemapConfig=void 0,this.hidden=void 0,this.homeZoomIndex=3,this.homeZoomPosition="top-left",this.homeZoomToolsSize="m",this.mapInfos=[],this.mapWidgetsIndex=0,this.mapWidgetsPosition="top-right",this.mapWidgetsSize="m",this.mapView=void 0,this.stackTools=!0,this.theme=void 0,this.toolOrder=void 0,this._searchConfiguration=void 0,this._webMapInfo=void 0}enableHomeWatchHandler(){this._initHome()}async mapInfoChange(i){await this._loadMap(i.detail)}async componentWillLoad(){await this._initModules()}render(){var i,e;const h=this.hidden?"visibility-hidden":"",o="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",a=(null===(i=this.mapInfos)||void 0===i?void 0:i.length)>1?"":"display-none",l=(null===(e=this.mapInfos)||void 0===e?void 0:e.length)>1?"map-height":"height-full";return t(s,null,t("map-picker",{class:a,mapInfos:this.mapInfos,ref:i=>this._mapPicker=i}),t("div",{class:`${l} ${h}`,ref:i=>this._mapDiv=i}),t("map-tools",{basemapConfig:this.basemapConfig,class:`box-shadow ${o}`,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableLegend:this.enableLegend,enableMapToolsExpand:this.enableMapToolsExpand,enableSearch:this.enableSearch,homeZoomToolsSize:this.homeZoomToolsSize,mapView:this.mapView,mapWidgetsSize:this.mapWidgetsSize,ref:i=>this._mapTools=i,searchConfiguration:this._searchConfiguration,stackTools:this.stackTools,toolOrder:this.toolOrder}))}async _initModules(){const[i,t,s]=await p(["esri/WebMap","esri/views/MapView","esri/widgets/Home"]);this.WebMap=i,this.MapView=t,this.Home=s}async _loadMap(i){var t;const s=!this._defaultWebmapHonored&&this.defaultWebmapId,e=null===(t=this.mapInfos)||void 0===t?void 0:t.filter((i=>i.id===this.defaultWebmapId)),h=JSON.stringify(i)!==JSON.stringify(this._webMapInfo);this._webMapInfo=s&&e?e[0]:!(null==i?void 0:i.id)&&this.mapInfos.length>0?this.mapInfos[0]:i;const o=this._webMapInfo.id,a=s&&(null==i?void 0:i.id)===this.defaultWebmapId;if(this._loadedId!==o&&!s||a){const i=new this.WebMap({portalItem:{id:o}});this.mapView=new this.MapView({container:this._mapDiv,map:i,resizeAlign:"center"}),this._loadedId=o,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),await this.mapView.when((()=>{this._initHome(),this.mapView.ui.add(this._mapTools,{position:this.mapWidgetsPosition,index:this.mapWidgetsIndex}),this._defaultWebmapHonored=!!a||this._defaultWebmapHonored,this.mapChanged.emit({id:o,mapView:this.mapView})}))}else s?(this._defaultWebmapHonored=!0,this._mapPicker.setMapByID(o)):h&&(this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),this.mapChanged.emit({id:o,mapView:this.mapView}))}_initHome(){if(this.enableHome){this._homeWidget=new this.Home({view:this.mapView}),this.mapView.ui.add(this._homeWidget,{position:this.homeZoomPosition,index:this.homeZoomIndex});const i="s"===this.homeZoomToolsSize?"32px":"m"===this.homeZoomToolsSize?"40px":"48px";this._homeWidget.domNode.style.height=i,this._homeWidget.domNode.style.width=i}else this._homeWidget&&this.mapView.ui.remove(this._homeWidget)}get el(){return e(this)}static get watchers(){return{enableHome:["enableHomeWatchHandler"]}}};m.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 51px)}.height-full{height:100%}.box-shadow{box-shadow:none !important}.visibility-hidden{visibility:hidden}.display-none{display:none}";export{u as card_manager,b as layer_table,m as map_card}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{c as t,g as n}from"./p-e1a4994d.js";import{a as i}from"./p-78780f63.js";import{l as r}from"./p-48ff9cea.js";import{q as e}from"./p-531d91d6.js";import"./p-d89fff3a.js";import"./p-a230b270.js";import{_ as s,r as o,c as a,g as u}from"./p-220ec0d1.js";
6
+ import{c as t,g as n}from"./p-e1a4994d.js";import{a as i}from"./p-78780f63.js";import{l as r}from"./p-48ff9cea.js";import{q as e}from"./p-b5d1b979.js";import"./p-d89fff3a.js";import"./p-a230b270.js";import{_ as s,r as o,c as a,g as u}from"./p-220ec0d1.js";
7
7
  /* @preserve
8
8
  * arcgis-pdf-creator v0.0.1
9
9
  * Thu Apr 27 2023 17:20:32 GMT-0700 (Pacific Daylight Time)
@@ -310,7 +310,7 @@ function(t){var n=function(t){for(var n=t.length,i=new Uint8Array(n),r=0;r<n;r++
310
310
  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
311
311
  * ====================================================================
312
312
  */
313
- function(){function t(){return(Z.canvg?Promise.resolve(Z.canvg):import("./p-dfdb8411.js")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}Pt.API.addSvgAsImage=function(n,i,r,e,s,o,a,u){if(isNaN(i)||isNaN(r))throw tt.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(e)||isNaN(s))throw tt.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=e,f.height=s;var c=f.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,f.width,f.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},l=this;return t().then((function(t){return t.fromString(c,n,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){l.addImage(f.toDataURL("image/jpeg",1),i,r,e,s,a,u)}))}}(),Pt.API.putTotalPages=function(t){var n,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var e=0;e<this.internal.pages[r].length;e++)this.internal.pages[r][e]=this.internal.pages[r][e].replace(n,i);return this},Pt.API.viewerPreferences=function(t,n){var i;t=t||{},n=n||!1;var r,e,s,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(o),u=[],f=0,c=0,h=0;function v(t,n){var i,r=!1;for(i=0;i<t.length;i+=1)t[i]===n&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===n){var d=a.length;for(h=0;h<d;h+=1)i[a[h]].value=i[a[h]].defaultValue,i[a[h]].explicitSet=!1}if("object"===l(t))for(e in t)if(s=t[e],v(a,e)&&void 0!==s){if("boolean"===i[e].type&&"boolean"==typeof s)i[e].value=s;else if("name"===i[e].type&&v(i[e].valueSet,s))i[e].value=s;else if("integer"===i[e].type&&Number.isInteger(s))i[e].value=s;else if("array"===i[e].type){for(f=0;f<s.length;f+=1)if(r=!0,1===s[f].length&&"number"==typeof s[f][0])u.push(String(s[f]-1));else if(s[f].length>1){for(c=0;c<s[f].length;c+=1)"number"!=typeof s[f][c]&&(r=!1);!0===r&&u.push([s[f][0]-1,s[f][1]-1].join(" "))}i[e].value="["+u.join(" ")+"]"}else i[e].value=i[e].defaultValue;i[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,n=[];for(t in i)!0===i[t].explicitSet&&n.push("name"===i[t].type?"/"+t+" /"+i[t].value:"/"+t+" "+i[t].value);0!==n.length&&this.internal.write("/ViewerPreferences\n<<\n"+n.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this
313
+ function(){function t(){return(Z.canvg?Promise.resolve(Z.canvg):import("./p-72dbfa77.js")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}Pt.API.addSvgAsImage=function(n,i,r,e,s,o,a,u){if(isNaN(i)||isNaN(r))throw tt.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(e)||isNaN(s))throw tt.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var f=document.createElement("canvas");f.width=e,f.height=s;var c=f.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,f.width,f.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},l=this;return t().then((function(t){return t.fromString(c,n,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){l.addImage(f.toDataURL("image/jpeg",1),i,r,e,s,a,u)}))}}(),Pt.API.putTotalPages=function(t){var n,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(n=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(n=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var e=0;e<this.internal.pages[r].length;e++)this.internal.pages[r][e]=this.internal.pages[r][e].replace(n,i);return this},Pt.API.viewerPreferences=function(t,n){var i;t=t||{},n=n||!1;var r,e,s,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(o),u=[],f=0,c=0,h=0;function v(t,n){var i,r=!1;for(i=0;i<t.length;i+=1)t[i]===n&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===n){var d=a.length;for(h=0;h<d;h+=1)i[a[h]].value=i[a[h]].defaultValue,i[a[h]].explicitSet=!1}if("object"===l(t))for(e in t)if(s=t[e],v(a,e)&&void 0!==s){if("boolean"===i[e].type&&"boolean"==typeof s)i[e].value=s;else if("name"===i[e].type&&v(i[e].valueSet,s))i[e].value=s;else if("integer"===i[e].type&&Number.isInteger(s))i[e].value=s;else if("array"===i[e].type){for(f=0;f<s.length;f+=1)if(r=!0,1===s[f].length&&"number"==typeof s[f][0])u.push(String(s[f]-1));else if(s[f].length>1){for(c=0;c<s[f].length;c+=1)"number"!=typeof s[f][c]&&(r=!1);!0===r&&u.push([s[f][0]-1,s[f][1]-1].join(" "))}i[e].value="["+u.join(" ")+"]"}else i[e].value=i[e].defaultValue;i[e].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,n=[];for(t in i)!0===i[t].explicitSet&&n.push("name"===i[t].type?"/"+t+" /"+i[t].value:"/"+t+" "+i[t].value);0!==n.length&&this.internal.write("/ViewerPreferences\n<<\n"+n.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this
314
314
  /** ====================================================================
315
315
  * @license
316
316
  * jsPDF XMP metadata plugin
@@ -454,7 +454,7 @@ var Ni=function(){return Ni=Object.assign||function(t){for(var n,i=1,r=arguments
454
454
  * See the License for the specific language governing permissions and
455
455
  * limitations under the License.
456
456
  */
457
- const Li="|";async function gi(t,n,i=!0,s=!1,o=!1){const a=[];return Object.keys(n).forEach((u=>{var f;const c=n[u];a.push(async function(t,n,i,s=!0,o=!1){const a=await Mi(t,n,s),u=a.layer;let f=[];if(void 0!==a.relationshipId){const t=await function(t,n,i,r){const e=t.substring(t.lastIndexOf("/")+1);return isNaN(parseInt(e))&&(t+="/"+n.toString()),ji({definitionExpression:"1=1",httpMethod:"POST",objectIds:r,outFields:"*",relationshipId:i,url:t})}(n.url,n.layerId,a.relationshipId,i),r=[];t.forEach((t=>{t.relatedRecords.forEach((t=>{r.push(t.attributes)}))}));const e=n.objectIdField;if(r.sort(((t,n)=>t[e]<n[e]?-1:t[e]>n[e]?1:0)),f=r.filter(((t,n)=>0===n||t[e]!==r[n-1][e])),0===f.length)return Promise.resolve([])}else f=await e(i,u,[],!1);const c={},h={},l={};u.fields?u.fields.forEach((t=>{const n=t.name.toLowerCase();c[n]=t.name,l[n]=t.domain,h[n]=t.type})):Object.keys(f[0]).forEach((t=>{const n=t.toLowerCase();c[n]=t}));const v="pattern"===a.labelFormat.type?await async function(t,n,i,e,s,o,a,u=!1){var f;const[c]=await r(["esri/intl"]),h=function(t){const n=[];let i=0;for(;i<t.length;){const r=t.indexOf("{",i);if(r<0)break;const e=t.indexOf("}",r);if(e<0)break;const s=t.substring(r,e+1);n.push(s),i=e+1}const r=function(t){var n;return null!==(n=t.match(/\{expression\/\w+\}/g))&&void 0!==n?n:[]}(t);return n.filter((t=>r.indexOf(t)<0))}(a),l=h.map((t=>t.substring(1,t.length-1))),v=await async function(t,n){const i={};if(!Array.isArray(n.popupTemplate.expressionInfos)||0===n.popupTemplate.expressionInfos.length)return Promise.resolve(i);const e=t.match(/\{expression\/\w+\}/g);if(!e)return Promise.resolve(i);const[s]=await r(["esri/arcade"]),o={variables:[{name:"$feature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},{name:"$map",type:"featureSetCollection"}]},a={};e.forEach((t=>{const i=t.substring(t.indexOf("/")+1,t.length-1);(n.popupTemplate.expressionInfos||[]).forEach((t=>{t.name===i&&(a[i]=s.createArcadeExecutor(t.expression,o))}))}));const u=Object.values(a);return Promise.all(u).then((t=>{const n=Object.keys(a);for(let r=0;r<n.length;++r)i[n[r]]=t[r].valueOf();return i}))}(a,t),d=null!==(f=a.match(/\{expression\/\w+\}/g))&&void 0!==f?f:[],w=await Promise.all(n.map((async n=>{var r;let u=a;for(let i=0;i<d.length;i++){const r=d[i],e=r.substring(r.indexOf("/")+1,r.length-1),s=await v[e].executeAsync({$feature:n,$layer:t});u=u.replace(r,s)}const f=null!==(r=n.attributes)&&void 0!==r?r:n;l.forEach(((t,n)=>{const r=t.toLowerCase(),a=Pi(f[i[r]],e[r],s[r],o[r],c);u=u.replace(h[n],a)}));let w=u.split(Li);return w=w.map((t=>Si(t))),w})));return u&&w.unshift(l),Promise.resolve(w)}(n,f,c,h,l,a.attributeFormats,a.labelFormat.format,o):"executor"===a.labelFormat.type?await async function(t,n){const i=(await Promise.all(t.map((async t=>n.executeAsync({$feature:t}))))).filter((t=>t.text)).map((t=>Si(t.text).split(Li)));return Promise.resolve(i)}(f,a.labelFormat.format):await async function(t,n,i,e=!1){const[s]=await r(["esri/intl"]),o=t.map((t=>Object.keys(t.attributes).map((r=>{const e=r.toLowerCase();return Pi(t.attributes[r],n[e],i[e],null,s)}))));if(e){const n=[];Object.keys(t[0].attributes).forEach((t=>{n.push(t)})),o.unshift(n)}return Promise.resolve(o)}(f,h,l,o);return Promise.resolve(v)}(t,(null===(f=c.layerView)||void 0===f?void 0:f.layer)||c.layer,c.ids,i,s)),o&&a.push(Promise.resolve([[u]]))})),(await Promise.all(a)).reduce(((t,n)=>t.concat(n)),[])}async function Ai(t,n,i,r=!1,e=!1){let s=await gi(t,n,i,e,!0);s=r?ki(s):s;const o=Object.keys(n);let a=[];return s.forEach((t=>{const i=t[0];o.indexOf(i)<0?a.push(t):(
457
+ const Li="|";async function gi(t,n,i=!0,s=!1,o=!1,a=[]){const u=[];return Object.keys(n).forEach((f=>{var c;const h=n[f];u.push(async function(t,n,i,s=!0,o=!1,a=[]){const u=await Mi(t,n,s),f=u.layer;let c=[];if(void 0!==u.relationshipId){const t=await function(t,n,i,r){const e=t.substring(t.lastIndexOf("/")+1);return isNaN(parseInt(e))&&(t+="/"+n.toString()),ji({definitionExpression:"1=1",httpMethod:"POST",objectIds:r,outFields:"*",relationshipId:i,url:t})}(n.url,n.layerId,u.relationshipId,i),r=[];t.forEach((t=>{t.relatedRecords.forEach((t=>{r.push(t.attributes)}))}));const e=n.objectIdField;if(r.sort(((t,n)=>t[e]<n[e]?-1:t[e]>n[e]?1:0)),c=r.filter(((t,n)=>0===n||t[e]!==r[n-1][e])),0===c.length)return Promise.resolve([])}else{const t=a.length>0?a:void 0;c=await e(i,f,[],!1,void 0,t)}const h={},l={},v={};f.fields?f.fields.forEach((t=>{if(a.indexOf(t.name.toLowerCase())>-1){const n=t.name.toLowerCase();h[n]=t.name,v[n]=t.domain,l[n]=t.type}})):Object.keys(c[0]).forEach((t=>{if(a.indexOf(t.toLowerCase())>-1){const n=t.toLowerCase();h[n]=t}}));const d="pattern"===u.labelFormat.type?await async function(t,n,i,e,s,o,a,u=!1){var f;const[c]=await r(["esri/intl"]),h=function(t){const n=[];let i=0;for(;i<t.length;){const r=t.indexOf("{",i);if(r<0)break;const e=t.indexOf("}",r);if(e<0)break;const s=t.substring(r,e+1);n.push(s),i=e+1}const r=function(t){var n;return null!==(n=t.match(/\{expression\/\w+\}/g))&&void 0!==n?n:[]}(t);return n.filter((t=>r.indexOf(t)<0))}(a),l=h.map((t=>t.substring(1,t.length-1))),v=await async function(t,n){const i={};if(!Array.isArray(n.popupTemplate.expressionInfos)||0===n.popupTemplate.expressionInfos.length)return Promise.resolve(i);const e=t.match(/\{expression\/\w+\}/g);if(!e)return Promise.resolve(i);const[s]=await r(["esri/arcade"]),o={variables:[{name:"$feature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},{name:"$map",type:"featureSetCollection"}]},a={};e.forEach((t=>{const i=t.substring(t.indexOf("/")+1,t.length-1);(n.popupTemplate.expressionInfos||[]).forEach((t=>{t.name===i&&(a[i]=s.createArcadeExecutor(t.expression,o))}))}));const u=Object.values(a);return Promise.all(u).then((t=>{const n=Object.keys(a);for(let r=0;r<n.length;++r)i[n[r]]=t[r].valueOf();return i}))}(a,t),d=null!==(f=a.match(/\{expression\/\w+\}/g))&&void 0!==f?f:[],w=await Promise.all(n.map((async n=>{var r;let u=a;for(let i=0;i<d.length;i++){const r=d[i],e=r.substring(r.indexOf("/")+1,r.length-1),s=await v[e].executeAsync({$feature:n,$layer:t});u=u.replace(r,s)}const f=null!==(r=n.attributes)&&void 0!==r?r:n;l.forEach(((t,n)=>{const r=t.toLowerCase(),a=Pi(f[i[r]],e[r],s[r],o[r],c);u=u.replace(h[n],a)}));let w=u.split(Li);return w=w.map((t=>Si(t))),w})));return u&&w.unshift(l),Promise.resolve(w)}(n,c,h,l,v,u.attributeFormats,u.labelFormat.format,o):"executor"===u.labelFormat.type?await async function(t,n){const i=(await Promise.all(t.map((async t=>n.executeAsync({$feature:t}))))).filter((t=>t.text)).map((t=>Si(t.text).split(Li)));return Promise.resolve(i)}(c,u.labelFormat.format):await async function(t,n,i,e=!1){const[s]=await r(["esri/intl"]),o=t.map((t=>Object.keys(t.attributes).map((r=>{const e=r.toLowerCase();return Pi(t.attributes[r],n[e],i[e],null,s)}))));if(e){const n=[];Object.keys(t[0].attributes).forEach((t=>{n.push(t)})),o.unshift(n)}return Promise.resolve(o)}(c,l,v,o);return Promise.resolve(d)}(t,(null===(c=h.layerView)||void 0===c?void 0:c.layer)||h.layer,h.ids,i,s,a)),o&&u.push(Promise.resolve([[f]]))})),(await Promise.all(u)).reduce(((t,n)=>t.concat(n)),[])}async function Ai(t,n,i,r=!1,e=!1,s=[]){let o=await gi(t,n,i,e,!0,s);o=r?ki(o):o;const a=Object.keys(n);let u=[];return o.forEach((t=>{const i=t[0];a.indexOf(i)<0?u.push(t):(
458
458
  /** @license
459
459
  * Copyright 2022 Esri
460
460
  *
@@ -486,4 +486,4 @@ function(t,n){const i=n.map((t=>Object.values(t).map((t=>`"${t}"`)).join(",")+"\
486
486
  * See the License for the specific language governing permissions and
487
487
  * limitations under the License.
488
488
  */
489
- function(t,n){const i=document.createElement("a");void 0!==i.download&&(i.href=URL.createObjectURL(new Blob(n,{type:"text/csv;charset=utf-8;"})),i.download=`${t}.csv`||"export.csv",i.style.visibility="hidden",document.body.appendChild(i),i.click(),document.body.removeChild(i))}(t,i)}(qi(Ei(n,new RegExp(`\\b${i}\\b`))),a),a=[])})),Promise.resolve()}async function yi(t,n,r,e=!1,s="",o=""){let a=await gi(t,n);const u=Ei(n);return a=a.map((t=>t.filter((t=>t.length>0)))).filter((t=>t.length>0)),a=e?ki(a):a,function(t,n,r,e="",s=""){!function(t,n,r,e="",s=""){const o=new bi;o.initialize({pageType:"ANSI_A"},i("../assets/arcgis-pdf-creator/"),"en",t).then((()=>{const t=new pi;t.initialize(o).then((async()=>{const i=r.labelSpec;let a=1;if(s){const n=i.pageProperties,r=c.getPageSize(n.pageType);o.drawImage(s,{x:n.leftMargin,y:n.topMargin,width:r.width-n.leftMargin-n.rightMargin,height:r.height-n.topMargin-n.bottomMargin}),e&&t.drawSupplementalText(e,0,-.1),o.addPage(),++a}await t.addLabelsToDoc(n,i,a,e),o.save()}))}))}(t,n,r,e,s)}(s||qi(u),a,r,s,o),Promise.resolve()}function ki(t){const n=t.map((t=>JSON.stringify(t))),i=new Set(n);return Array.from(i,(t=>JSON.parse(t)))}function Si(t){for(t=(t=(t=(t=(t=(t=t.replace(/<br\s*\/?>/gi,Li)).replace(/<p[^>]*>/gi,Li).trim().replace(/^\|/,"")).replace(/<\/p>/gi,"")).replace(/\n/gi,"|")).replace(/<[\s.]*[^<>]*\/?>/gi,"").replace(/\xA0/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&nbsp;/gi," ")).replace(/\s*\|\s*/g,"|");t.match(/\|\|/);)t=t.replace(/\|\|/,"|");return(t=t.replace(/^\|/,"")).replace(/\|$/,"")}function xi(t,n=!1){const i=[];return t.forEach((t=>{(t.visible||n)&&i.push(`{${t.fieldName}}`)})),{type:"pattern",format:i.join(Li)}}function qi(t){return t.length>0?t.join(", "):"download"}function ji(t,n=[],i=0){return function(t){var n=function(t,n,i){var r=s(s({params:{}},i),t);return r.params=["objectIds","relationshipId","definitionExpression","outFields"].reduce((function(n,i){return(t[i]||"boolean"==typeof t[i])&&(n[i]=t[i]),n}),r.params),["params","httpMethod","rawResponse","authentication","portal","fetch","maxUrlLength","headers"].reduce((function(t,n){return r[n]&&(t[n]=r[n]),t}),{})}(t,0,{httpMethod:"GET",params:Ni({definitionExpression:"1=1",outFields:"*",relationshipId:0},t.params)});return o(a(t.url)+"/queryRelatedRecords",n)}(Object.assign(Object.assign({},t),{params:{resultOffset:i}})).then((r=>(n.push(...r.relatedRecordGroups),r.exceededTransferLimit?ji(t,n,i+r.relatedRecordGroups.length):Promise.resolve(n))))}async function Mi(t,n,i){var e,s;let o={layer:n,attributeFormats:{},relationshipId:void 0,labelFormat:{type:"unsupported",format:void 0}};if(n.popupEnabled&&(n.popupTemplate.fieldInfos.forEach((t=>{t.format&&(o.attributeFormats[t.fieldName.toLowerCase()]=t.format)})),i)){const a=null===(s=null===(e=n.popupTemplate)||void 0===e?void 0:e.content[0])||void 0===s?void 0:s.type;if("relationship"===a){const r=n.popupTemplate.content[0].relationshipId,e=n.relationships.find((t=>t.id===r));let s=t.layers.toArray().concat(t.tables.toArray());if(s=s.filter((t=>"feature"===t.type&&t.layerId===e.relatedTableId)),s.length>0)o=await Mi(t,s[0],i),o.relationshipId=r;else{s=t.layers.toArray().concat(t.tables.toArray());const e=[];let a;s=s.filter((t=>{if("feature"===t.type&&t.layerId!=n.layerId&&t.url){const n=t.url+"/"+t.layerId.toString();return e.push(u(n)),!0}return!1})),(await Promise.all(e)).some(((n,e)=>!(!n.relationships||!n.relationships.some((t=>t.id===r))||(a=Mi(t,s[e],i),0))))?(o=await a,o.relationshipId=r):o.labelFormat=xi(n.popupTemplate.fieldInfos)}}else"fields"===a?(o.labelFormat=xi(n.popupTemplate.fieldInfos),0===o.labelFormat.format.length&&(o.labelFormat=n.popupTemplate.title&&"string"==typeof n.popupTemplate.title?{type:"pattern",format:n.popupTemplate.title}:xi(n.popupTemplate.fieldInfos,!0))):o.labelFormat="text"===a?{type:"pattern",format:Si(n.popupTemplate.content[0].text)}:"expression"===a?await async function(t){const[n]=await r(["esri/arcade"]),i=await n.createArcadeExecutor(t.expression,{variables:[{name:"$feature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},{name:"$map",type:"featureSetCollection"}]});return Promise.resolve({type:"executor",format:i})}(n.popupTemplate.content[0].expressionInfo):xi(n.popupTemplate.fieldInfos)}return Promise.resolve(o)}function Ei(t,n=/.+/){let i=[];return Object.keys(t).forEach((r=>{const e=t[r];n.test(r)&&(i=i.concat(e.selectionSetNames))})),i}function Pi(t,n,i,r,e){if(null==t)return"";if(i&&"coded-value"===i.type)return i.getName(t).toString();{let i=t;switch(n){case"date":if(null==r?void 0:r.dateFormat){const t=e.convertDateFormatToIntlOptions(r.dateFormat);i=e.formatDate(i,t)}else i=e.formatDate(i);i=i.replace(/\xe2\x80\xaf/g,"");break;case"date-only":if(null==r?void 0:r.dateFormat){const t=e.convertDateFormatToIntlOptions(r.dateFormat);i=e.formatDateOnly(i,t)}else i=e.formatDateOnly(i);break;case"time-only":if(null==r?void 0:r.dateFormat){const t=e.convertDateFormatToIntlOptions(r.dateFormat);i=e.formatTimeOnly(i,t)}else i=e.formatTimeOnly(i);break;case"double":case"integer":case"long":case"small-integer":if(r){const t=e.convertNumberFormatToIntlOptions(r);i=e.formatNumber(i,t)}else i=e.formatNumber(i)}return i}}export{h as _,yi as a,gi as c,Ai as d,ki as r}
489
+ function(t,n){const i=document.createElement("a");void 0!==i.download&&(i.href=URL.createObjectURL(new Blob(n,{type:"text/csv;charset=utf-8;"})),i.download=`${t}.csv`||"export.csv",i.style.visibility="hidden",document.body.appendChild(i),i.click(),document.body.removeChild(i))}(t,i)}(qi(Ei(n,new RegExp(`\\b${i}\\b`))),u),u=[])})),Promise.resolve()}async function yi(t,n,r,e=!1,s="",o=""){let a=await gi(t,n);const u=Ei(n);return a=a.map((t=>t.filter((t=>t.length>0)))).filter((t=>t.length>0)),a=e?ki(a):a,function(t,n,r,e="",s=""){!function(t,n,r,e="",s=""){const o=new bi;o.initialize({pageType:"ANSI_A"},i("../assets/arcgis-pdf-creator/"),"en",t).then((()=>{const t=new pi;t.initialize(o).then((async()=>{const i=r.labelSpec;let a=1;if(s){const n=i.pageProperties,r=c.getPageSize(n.pageType);o.drawImage(s,{x:n.leftMargin,y:n.topMargin,width:r.width-n.leftMargin-n.rightMargin,height:r.height-n.topMargin-n.bottomMargin}),e&&t.drawSupplementalText(e,0,-.1),o.addPage(),++a}await t.addLabelsToDoc(n,i,a,e),o.save()}))}))}(t,n,r,e,s)}(s||qi(u),a,r,s,o),Promise.resolve()}function ki(t){const n=t.map((t=>JSON.stringify(t))),i=new Set(n);return Array.from(i,(t=>JSON.parse(t)))}function Si(t){for(t=(t=(t=(t=(t=(t=t.replace(/<br\s*\/?>/gi,Li)).replace(/<p[^>]*>/gi,Li).trim().replace(/^\|/,"")).replace(/<\/p>/gi,"")).replace(/\n/gi,"|")).replace(/<[\s.]*[^<>]*\/?>/gi,"").replace(/\xA0/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&nbsp;/gi," ")).replace(/\s*\|\s*/g,"|");t.match(/\|\|/);)t=t.replace(/\|\|/,"|");return(t=t.replace(/^\|/,"")).replace(/\|$/,"")}function xi(t,n=!1){const i=[];return t.forEach((t=>{(t.visible||n)&&i.push(`{${t.fieldName}}`)})),{type:"pattern",format:i.join(Li)}}function qi(t){return t.length>0?t.join(", "):"download"}function ji(t,n=[],i=0){return function(t){var n=function(t,n,i){var r=s(s({params:{}},i),t);return r.params=["objectIds","relationshipId","definitionExpression","outFields"].reduce((function(n,i){return(t[i]||"boolean"==typeof t[i])&&(n[i]=t[i]),n}),r.params),["params","httpMethod","rawResponse","authentication","portal","fetch","maxUrlLength","headers"].reduce((function(t,n){return r[n]&&(t[n]=r[n]),t}),{})}(t,0,{httpMethod:"GET",params:Ni({definitionExpression:"1=1",outFields:"*",relationshipId:0},t.params)});return o(a(t.url)+"/queryRelatedRecords",n)}(Object.assign(Object.assign({},t),{params:{resultOffset:i}})).then((r=>(n.push(...r.relatedRecordGroups),r.exceededTransferLimit?ji(t,n,i+r.relatedRecordGroups.length):Promise.resolve(n))))}async function Mi(t,n,i){var e,s;let o={layer:n,attributeFormats:{},relationshipId:void 0,labelFormat:{type:"unsupported",format:void 0}};if(n.popupEnabled&&(n.popupTemplate.fieldInfos.forEach((t=>{t.format&&(o.attributeFormats[t.fieldName.toLowerCase()]=t.format)})),i)){const a=null===(s=null===(e=n.popupTemplate)||void 0===e?void 0:e.content[0])||void 0===s?void 0:s.type;if("relationship"===a){const r=n.popupTemplate.content[0].relationshipId,e=n.relationships.find((t=>t.id===r));let s=t.layers.toArray().concat(t.tables.toArray());if(s=s.filter((t=>"feature"===t.type&&t.layerId===e.relatedTableId)),s.length>0)o=await Mi(t,s[0],i),o.relationshipId=r;else{s=t.layers.toArray().concat(t.tables.toArray());const e=[];let a;s=s.filter((t=>{if("feature"===t.type&&t.layerId!=n.layerId&&t.url){const n=t.url+"/"+t.layerId.toString();return e.push(u(n)),!0}return!1})),(await Promise.all(e)).some(((n,e)=>!(!n.relationships||!n.relationships.some((t=>t.id===r))||(a=Mi(t,s[e],i),0))))?(o=await a,o.relationshipId=r):o.labelFormat=xi(n.popupTemplate.fieldInfos)}}else"fields"===a?(o.labelFormat=xi(n.popupTemplate.fieldInfos),0===o.labelFormat.format.length&&(o.labelFormat=n.popupTemplate.title&&"string"==typeof n.popupTemplate.title?{type:"pattern",format:n.popupTemplate.title}:xi(n.popupTemplate.fieldInfos,!0))):o.labelFormat="text"===a?{type:"pattern",format:Si(n.popupTemplate.content[0].text)}:"expression"===a?await async function(t){const[n]=await r(["esri/arcade"]),i=await n.createArcadeExecutor(t.expression,{variables:[{name:"$feature",type:"feature"},{name:"$layer",type:"featureSet"},{name:"$datastore",type:"featureSetCollection"},{name:"$map",type:"featureSetCollection"}]});return Promise.resolve({type:"executor",format:i})}(n.popupTemplate.content[0].expressionInfo):xi(n.popupTemplate.fieldInfos)}return Promise.resolve(o)}function Ei(t,n=/.+/){let i=[];return Object.keys(t).forEach((r=>{const e=t[r];n.test(r)&&(i=i.concat(e.selectionSetNames))})),i}function Pi(t,n,i,r,e){if(null==t)return"";if(i&&"coded-value"===i.type)return i.getName(t).toString();{let i=t;switch(n){case"date":if(null==r?void 0:r.dateFormat){const t=e.convertDateFormatToIntlOptions(r.dateFormat);i=e.formatDate(i,t)}else i=e.formatDate(i);i=i.replace(/\xe2\x80\xaf/g,"");break;case"date-only":if(null==r?void 0:r.dateFormat){const t=e.convertDateFormatToIntlOptions(r.dateFormat);i=e.formatDateOnly(i,t)}else i=e.formatDateOnly(i);break;case"time-only":if(null==r?void 0:r.dateFormat){const t=e.convertDateFormatToIntlOptions(r.dateFormat);i=e.formatTimeOnly(i,t)}else i=e.formatTimeOnly(i);break;case"double":case"integer":case"long":case"small-integer":if(r){const t=e.convertNumberFormatToIntlOptions(r);i=e.formatNumber(i,t)}else i=e.formatNumber(i)}return i}}export{h as _,yi as a,gi as c,Ai as d,ki as r}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{h as t,r as i,c as e,H as s,g as n}from"./p-78780f63.js";import{f as o}from"./p-25dd768d.js";import{A as a,B as l,i as c,t as r,g as h,d,e as p}from"./p-ca97465b.js";import{d as m,f as u,c as b,r as g,a as f,F as v}from"./p-0511c98c.js";import{s as w,c as x,a as y,d as k,H as C}from"./p-cfccae7c.js";import{g as z}from"./p-fcefdfff.js";import{c as I,u as D,d as E}from"./p-0c97de08.js";import{c as H,d as $,g as S}from"./p-722ae773.js";import{b as j,c as A,s as O,a as P}from"./p-f10944e6.js";import{c as L,d as _}from"./p-ede84883.js";import{c as F}from"./p-5b566d55.js";import{o as M}from"./p-653af7e0.js";import{c as B,s as R,d as W,u as T}from"./p-79ba73cb.js";import{i as V,h as G,C as q,b as U,c as N,d as K,e as X,f as Y,g as J,a as Q}from"./p-f9eb2f2d.js";import{g as Z}from"./p-0c07ad8a.js";import{d as tt}from"./p-a82f35c9.js";import{c as it,d as et}from"./p-1be63b50.js";import{i as st}from"./p-1e2ffee3.js";import{g as nt}from"./p-6b943f52.js";import{n as ot,o as at}from"./p-531d91d6.js";import{s as lt}from"./p-8684a905.js";import"./p-29d68474.js";import"./p-c92fff33.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-4af32c75.js";import"./p-225c4ca4.js";
6
+ import{h as t,r as i,c as e,H as s,g as n}from"./p-78780f63.js";import{f as o}from"./p-25dd768d.js";import{A as a,B as l,i as c,t as r,g as h,d,e as p}from"./p-ca97465b.js";import{d as m,f as u,c as b,r as g,a as f,F as v}from"./p-0511c98c.js";import{s as w,c as x,a as y,d as k,H as C}from"./p-cfccae7c.js";import{g as z}from"./p-fcefdfff.js";import{c as I,u as D,d as E}from"./p-0c97de08.js";import{c as H,d as $,g as S}from"./p-722ae773.js";import{b as j,c as A,s as O,a as P}from"./p-f10944e6.js";import{c as L,d as _}from"./p-ede84883.js";import{c as F}from"./p-5b566d55.js";import{o as M}from"./p-653af7e0.js";import{c as B,s as R,d as W,u as T}from"./p-79ba73cb.js";import{i as V,h as G,C as q,b as U,c as N,d as K,e as X,f as Y,g as J,a as Q}from"./p-f9eb2f2d.js";import{g as Z}from"./p-0c07ad8a.js";import{d as tt}from"./p-a82f35c9.js";import{c as it,d as et}from"./p-1be63b50.js";import{i as st}from"./p-1e2ffee3.js";import{g as nt}from"./p-6b943f52.js";import{n as ot,o as at}from"./p-b5d1b979.js";import{s as lt}from"./p-8684a905.js";import"./p-29d68474.js";import"./p-c92fff33.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-4af32c75.js";import"./p-225c4ca4.js";
7
7
  /*!
8
8
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
9
  * See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
@@ -1 +1 @@
1
- html,body{display:flex;height:100%;width:100%;overflow-y:hidden;background-color:#F4F4F4;margin:0px}h1{line-height:unset;margin:unset;font-size:2rem;padding-left:0.5rem}#appContainer{height:100%;opacity:0;transition:1s}.block-group{margin-inline-start:0.625rem;margin-inline-end:0.625rem}calcite-tree-item[highlight]>div{font-weight:700}calcite-tree-item[childselected]>div{font-weight:700}calcite-tree-item>a:hover{text-decoration:none}calcite-switch>input{display:none}calcite-switch{position:static}calcite-tree a{color:black}input.input-group-input,.input-group-input{width:unset;display:flex;flex:auto}.display-none{display:none}.empty-box{width:200px;aspect-ratio:auto 200/133;border:1px dotted gray}
1
+ html,body{height:100%;width:100%;overflow-y:hidden;background-color:#F4F4F4;margin:0px}h1{line-height:unset;margin:unset;font-size:2rem;padding-left:0.5rem}#appContainer{height:100%;opacity:0;transition:1s}.block-group{margin-inline-start:0.625rem;margin-inline-end:0.625rem}calcite-tree-item[highlight]>div{font-weight:700}calcite-tree-item[childselected]>div{font-weight:700}calcite-tree-item>a:hover{text-decoration:none}calcite-switch>input{display:none}calcite-switch{position:static}calcite-tree a{color:black}input.input-group-input,.input-group-input{width:unset;display:flex;flex:auto}.display-none{display:none}.empty-box{width:200px;aspect-ratio:auto 200/133;border:1px dotted gray}