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

93 lines
46 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
require({cache:{"esri/support/actions/actionUtils":function(){define(["exports","../../intl","../../intl/substitute"],function(f,c,g){f.getActionIcon=function(r){if(r.icon)return r.icon;if(!("image"in r&&r.image||r.className))return"question"};f.getActionStyles=function(r){return r?{backgroundImage:`url(${r})`}:{}};f.substituteActionImage=function({action:r,feature:A}){A=A?.attributes;return(r="image"in r?r.image:void 0)&&A?g.substitute(r,A):r??""};Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},
"esri/widgets/LayerList/css":function(){define(["exports"],function(f){f.css={base:"esri-layer-list",actionMenu:"esri-layer-list__action-menu",actionGroup:"esri-layer-list__action-group",filterNoResults:"esri-layer-list__filter-no-results",item:"esri-layer-list__item",itemActive:"esri-layer-list__item--active",itemContent:"esri-layer-list__item-content",itemContentBottom:"esri-layer-list__item-content-bottom",itemMessage:"esri-layer-list__item-message",itemInvisible:"esri-layer-list__item--invisible",
itemActionIcon:"esri-layer-list__item-action-icon",itemActionImage:"esri-layer-list__item-action-image",itemTemporaryIcon:"esri-layer-list__item-temporary-icon",itemTableIcon:"esri-layer-list__item-table-icon",itemCatalogIcon:"esri-layer-list__item-catalog-icon",statusIndicator:"esri-layer-list__status-indicator",publishing:"esri-layer-list__publishing",updating:"esri-layer-list__updating",connectionStatus:"esri-layer-list__connection-status",connectionStatusConnected:"esri-layer-list__connection-status--connected",
visibleToggle:"esri-layer-list__visible-toggle",visibleIcon:"esri-layer-list__visible-icon"};Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/LayerList/LayerListViewModel":function(){define("../../chunks/tslib.es6 ../../core/Collection ../../core/Evented ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./ListItem ./support/layerListUtils".split(" "),
function(f,c,g,r,A,u,d,y,l,I,L){const O=c.ofType(I);c=class extends g.EventedAccessor{constructor(n){super(n);this.checkPublishStatusEnabled=!1;this.listItemCreatedFunction=null;this.listModeDisabled=!1;this.operationalItems=new O;this.view=null}initialize(){this.addHandles([r.watch(()=>!0===this.view?.ready,()=>this._viewHandles(),r.initial),r.watch(()=>[this.listItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._recompileList())],"view")}destroy(){this._removeAllItems();
this.view=null}get state(){const {view:n}=this;return n?.ready?"ready":n?"loading":"disabled"}get totalItems(){return this.operationalItems.flatten(n=>n.children).length}triggerAction(n,v){n&&!n.disabled&&this.emit("trigger-action",{action:n,item:v})}moveListItem(n,v,e,p){const w=n?.layer;if(w&&"subtype-sublayer"!==w.type&&"sublayer"!==w.type){var H=this.view?.map?.layers,B=v?L.getItemLayers(v):H;H=e?L.getItemLayers(e):H;if(B&&H){var {operationalItems:h}=this,q=e?.children||h;p=H.length-p;n.parent=
e||null;(v?.children||h).remove(n);B.remove(w);q.includes(n)||q.add(n,p);H.includes(w)||H.add(w,p);this._compileList()}}}_createLayerViewHandles(n){this.removeHandles("layer-views");this._compileList();n&&this.addHandles(n.on("change",()=>this._compileList()),"layer-views")}_createMapLayerHandles(n){this.removeHandles("map-layers");this._compileList();n&&this.addHandles(n.on("change",()=>this._compileList()),"map-layers")}_createListItem(n){const {view:v,listItemCreatedFunction:e,checkPublishStatusEnabled:p,
listModeDisabled:w}=this;return new I({checkPublishStatusEnabled:p,listModeDisabled:w,layer:n,listItemCreatedFunction:e,view:v})}_removeAllItems(){this.operationalItems.destroyAll()}_getViewableLayers(n){return n?this.listModeDisabled?n:n.filter(v=>"hide"!==L.findLayerListMode(v)):void 0}_watchLayersListMode(n){this.removeHandles("layer-list-mode");n&&!this.listModeDisabled&&this.addHandles(r.watch(()=>n.filter(v=>"listMode"in v).map(v=>v.listMode).toArray(),()=>this._compileList()),"layer-list-mode")}_compileList(){var n=
this.view?.map?.layers;this._watchLayersListMode(n);n=this._getViewableLayers(n);n?.length?(this._createNewItems(n),this._removeItems(n),this._sortItems(n)):this._removeAllItems()}_createNewItems(n){const {operationalItems:v}=this;n.forEach(e=>{v.some(p=>p.layer===e)||v.add(this._createListItem(e))})}_removeItems(n){const {operationalItems:v}=this,e=[];v.forEach(p=>{p&&n&&n.includes(p.layer)||e.push(p)});v.destroyMany(e)}_sortItems(n){const {operationalItems:v}=this;v.sort((e,p)=>{e=n.indexOf(e.layer);
p=n.indexOf(p.layer);return e>p?-1:e<p?1:0})}_recompileList(){this._removeAllItems();this._compileList()}_viewHandles(){const {view:n}=this;this.removeHandles(["map-layers","layer-views","view-layers"]);n?.ready?this.addHandles([r.watch(()=>this.view?.map?.allLayers,v=>this._createMapLayerHandles(v),r.initial),r.watch(()=>this.view?.allLayerViews,v=>this._createLayerViewHandles(v),r.initial)],"view-layers"):this._removeAllItems()}};f.__decorate([A.property()],c.prototype,"checkPublishStatusEnabled",
void 0);f.__decorate([A.property()],c.prototype,"listItemCreatedFunction",void 0);f.__decorate([A.property({nonNullable:!0})],c.prototype,"listModeDisabled",void 0);f.__decorate([A.property({type:O})],c.prototype,"operationalItems",void 0);f.__decorate([A.property({readOnly:!0})],c.prototype,"state",null);f.__decorate([A.property()],c.prototype,"totalItems",null);f.__decorate([A.property()],c.prototype,"view",void 0);return c=f.__decorate([l.subclass("esri.widgets.LayerList.LayerListViewModel")],
c)})},"esri/widgets/LayerList/ListItem":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/arrayUtils ../../core/Collection ../../core/Identifiable ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/accessorSupport/decorators/cast ../../core/has ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/get ../../support/actions/ActionBase ../../support/actions/ActionButton ../../support/actions/ActionSlider ../../support/actions/ActionToggle ./ListItemPanel ./support/layerListUtils".split(" "),
function(f,c,g,r,A,u,d,y,l,I,L,O,n,v,e,p,w){var H;l=r.ofType({key:"type",defaultKeyValue:"button",base:O,typeMap:{button:n,toggle:e,slider:v}});const B=r.ofType(l);c=H=class extends A.IdentifiableMixin(c){constructor(h){super(h);this.actionsSections=new B;this.checkPublishStatusEnabled=this.actionsOpen=!1;this.children=new (r.ofType(H));this.childrenSortable=!0;this.hidden=!1;this.listItemCreatedFunction=this.layer=null;this.open=this.listModeDisabled=!1;this.view=this.parent=this.panel=null}initialize(){this.addHandles([u.watch(()=>
[this.layer,this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),u.initial),u.watch(()=>this.checkPublishStatusEnabled,h=>this._updateChildrenPublishing(h),u.initial),u.watch(()=>this.view,h=>this._updateChildrenView(h),u.initial),u.watch(()=>this.panel,h=>this._setListItemOnPanel(h),u.initial)]);"function"===typeof this.listItemCreatedFunction&&this.listItemCreatedFunction.call(null,{item:this})}destroy(){this.panel?.destroy();this.children.destroyAll();this.view=
null}get connectionStatus(){const {layerView:h,publishing:q}=this;if(!q&&h&&"connectionStatus"in h)return h.connectionStatus}get error(){return this.layer?.loadError}get incompatible(){const {layerView:h}=this;return h&&"spatialReferenceSupported"in h?!h.spatialReferenceSupported:!1}get layerView(){const {layer:h,view:q}=this;if(!h||!q||"sublayer"===h.type)return null;const F="subtype-sublayer"===h.type?h.parent:h;return q.allLayerViews.find(M=>M.layer===F)??null}castPanel(h){this.panel?.open&&!h.hasOwnProperty("open")&&
(h.open=!0);return h?new p(h):null}get sortable(){return"knowledge-graph-sublayer"===this.layer?.type?!1:this._get("sortable")}set sortable(h){this._set("sortable",h)}get title(){const h=L.get(this,"layer.layer");return(!h||h&&L.get(this,"layer.layer.loaded"))&&L.get(this,"layer.title")||L.get(this,"layer.attributes.title")||""}set title(h){this._override("title",h)}get publishing(){const {layer:h,checkPublishStatusEnabled:q}=this;return q&&h&&"publishingInfo"in h&&"publishing"===h.publishingInfo?.status}get updating(){const {layerView:h,
connectionStatus:q,layer:F,publishing:M}=this;return M||q?!1:h?h.updating:"loading"===F?.loadStatus||!1}get visible(){return this.layer?.visible}set visible(h){const q=this.layer;q&&(q.visible=h)}get visibleAtCurrentScale(){return this.layerView?.visibleAtCurrentScale??!0}get visibleAtCurrentTimeExtent(){return this.layerView?.visibleAtCurrentTimeExtent??!0}get visibilityMode(){return w.findLayerVisibilityMode(this.layer)}clone(){return new H({actionsSections:this.actionsSections.clone(),actionsOpen:this.actionsOpen,
checkPublishStatusEnabled:this.checkPublishStatusEnabled,children:this.children.clone(),childrenSortable:this.childrenSortable,hidden:this.hidden,layer:this.layer,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,open:this.open,panel:this.panel,parent:this.parent,sortable:this.sortable,title:this.title,view:this.view,visible:this.visible})}_setListItemOnPanel(h){h&&(h.listItem=this)}_updateChildrenPublishing(h){const q=this.children;q&&q.forEach(F=>F.checkPublishStatusEnabled=
h)}_updateChildrenView(h){const q=this.children;q&&q.forEach(F=>F.view=h)}_createChildren(h){const {listModeDisabled:q,children:F}=this;h=h.filter(M=>!F.some(S=>S.layer===M));F.addMany(this._createChildItems(h,q))}_destroyChildren(h){const {children:q}=this,F=q.filter(M=>!h.includes(M.layer));q.destroyMany(F)}_sortChildren(h){this.children.sort((q,F)=>h.indexOf(F.layer)-h.indexOf(q.layer))}_destroyAllChildren(){this.removeHandles("child-list-mode");this.children.destroyAll()}_watchChildLayerListMode(h){this.removeHandles("child-list-mode");
this.listModeDisabled||this.addHandles(h.toArray().map(q=>u.watch(()=>q.listMode,()=>this._compileChildren(h))),"child-list-mode")}_compileChildren(h){const q=this.listModeDisabled?h:h?.filter(F=>"hide"!==w.findLayerListMode(F));q?.length?(this._createChildren(q),this._destroyChildren(q),this._sortChildren(q),this._watchChildLayerListMode(h)):this._destroyAllChildren()}_watchSublayerChanges(h){h&&this.addHandles(h.on("change",()=>this._compileChildren(h)),"layer")}_initializeChildLayers(h){this._compileChildren(h);
this._watchSublayerChanges(h)}_createChildItems(h,q){return h.map(F=>q||w.canDisplayLayer(F)?new H({layer:F,checkPublishStatusEnabled:this.checkPublishStatusEnabled,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,parent:this,view:this.view}):null).filter(g.isSome).reverse()}_watchLayerProperties(h){this.removeHandles("layer");this.removeHandles("child-list-mode");if(h)if("hide-children"===(!this.listModeDisabled&&w.findLayerListMode(h)))this.children.destroyAll();
else{var q=w.getNormalizedChildLayerProperty(h);q&&this.addHandles(u.watch(()=>h[q],F=>{h.hasOwnProperty(q)&&this._initializeChildLayers(F)},u.initial),"layer")}}};f.__decorate([d.property({type:B})],c.prototype,"actionsSections",void 0);f.__decorate([d.property()],c.prototype,"actionsOpen",void 0);f.__decorate([d.property()],c.prototype,"checkPublishStatusEnabled",void 0);f.__decorate([d.property({type:r})],c.prototype,"children",void 0);f.__decorate([d.property()],c.prototype,"childrenSortable",
void 0);f.__decorate([d.property({readOnly:!0})],c.prototype,"connectionStatus",null);f.__decorate([d.property({readOnly:!0})],c.prototype,"error",null);f.__decorate([d.property()],c.prototype,"hidden",void 0);f.__decorate([d.property({readOnly:!0})],c.prototype,"incompatible",null);f.__decorate([d.property()],c.prototype,"layer",void 0);f.__decorate([d.property({readOnly:!0})],c.prototype,"layerView",null);f.__decorate([d.property()],c.prototype,"listItemCreatedFunction",void 0);f.__decorate([d.property({nonNullable:!0})],
c.prototype,"listModeDisabled",void 0);f.__decorate([d.property()],c.prototype,"open",void 0);f.__decorate([d.property({type:p})],c.prototype,"panel",void 0);f.__decorate([y.cast("panel")],c.prototype,"castPanel",null);f.__decorate([d.property()],c.prototype,"parent",void 0);f.__decorate([d.property({value:!0})],c.prototype,"sortable",null);f.__decorate([d.property()],c.prototype,"title",null);f.__decorate([d.property({readOnly:!0})],c.prototype,"publishing",null);f.__decorate([d.property({readOnly:!0})],
c.prototype,"updating",null);f.__decorate([d.property()],c.prototype,"view",void 0);f.__decorate([d.property()],c.prototype,"visible",null);f.__decorate([d.property({readOnly:!0})],c.prototype,"visibleAtCurrentScale",null);f.__decorate([d.property({readOnly:!0})],c.prototype,"visibleAtCurrentTimeExtent",null);f.__decorate([d.property({readOnly:!0})],c.prototype,"visibilityMode",null);return c=H=f.__decorate([I.subclass("esri.widgets.LayerList.ListItem")],c)})},"esri/support/actions/ActionSlider":function(){define("../../chunks/tslib.es6 ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./ActionBase".split(" "),
function(f,c,g,r,A,u,d){var y;g=y=class extends d{constructor(l){super(l);this.displayValueEnabled=!1;this.max=1;this.min=0;this.step=.1;this.type="slider";this.value=null}clone(){return new y({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,displayValueEnabled:this.displayValueEnabled,max:this.max,min:this.min,step:this.step,value:this.value})}};f.__decorate([c.property()],g.prototype,"displayValueEnabled",
void 0);f.__decorate([c.property()],g.prototype,"max",void 0);f.__decorate([c.property()],g.prototype,"min",void 0);f.__decorate([c.property()],g.prototype,"step",void 0);f.__decorate([c.property()],g.prototype,"value",void 0);return g=y=f.__decorate([u.subclass("esri.support.actions.ActionSlider")],g)})},"esri/widgets/LayerList/ListItemPanel":function(){define("require ../../chunks/tslib.es6 ../../core/Identifiable ../../core/maybe ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../Widget ./support/layerListUtils ../support/widget ../support/jsxFactory".split(" "),
function(f,c,g,r,A,u,d,y,l,I,L,O,n,v){g=class extends g.IdentifiableMixin(L){constructor(e,p){super(e,p);this.content=this.className=this._legend=null;this.flowEnabled=!1;this.listItem=this.image=null;this.open=!1;this.visible=!0}initialize(){this.addHandles([A.watch(()=>this._canCreateLegend,()=>this._createLegend(),A.initial),A.watch(()=>[this._legend,this._legendOptions],()=>this._updateLegend(),A.initial)])}destroy(){this._legend=r.destroyMaybe(this._legend)}get _canCreateLegend(){const {content:e,
listItem:p}=this;return p?"legend"===e?!0:null!=e&&(Array.isArray(e)?e.includes("legend"):!1):!1}get _legendOptions(){const {listItem:e,_legendLayerInfo:p}=this,w=e?.view;return p&&w?{view:w,layerInfos:[p]}:{}}get _legendLayerInfo(){const e=this.listItem?.layer;if(!e||"subtype-sublayer"===e.type)return null;var p=O.isSublayer(e)?e:null;const w=e?.parent;return(p=null!=w&&"type"in w&&"map-image"===w.type?p?.source:null)&&w?{layer:w,title:"",sublayerIds:[p.mapLayerId]}:{layer:e,title:""}}get disabled(){const {listItem:e,
_legend:p,content:w}=this;return e?Array.isArray(w)&&1<w.length?!1:p?!p.activeLayerInfos?.length||!e.visibleAtCurrentScale||!e.visible:!1:!0}set disabled(e){this._overrideIfSome("disabled",e)}get icon(){const {image:e}=this,p=this._getFirstWidget();return this._get("icon")??(!e&&p?p.icon:null)}set icon(e){this._overrideIfSome("icon",e)}get title(){return this._get("title")||(this._getFirstWidget()?.label??"")}set title(e){this._override("title",e)}render(){return v.tsx("div",{class:"esri-list-item-panel"},
this._renderContents())}_renderContent(e){const {_legend:p,disabled:w,open:H}=this;return e&&!w&&H?"legend"===e&&p?v.tsx("div",{key:"legend-widget"},p.render()):"string"===typeof e?v.tsx("div",{innerHTML:e,key:e}):n.isWidget(e)?v.tsx("div",{key:"content-widget"},e.render()):e instanceof HTMLElement?v.tsx("div",{afterCreate:this._attachToNode,bind:e,key:"content-element"}):null:null}_renderContents(){const {content:e,open:p}=this;return p?Array.isArray(e)?e.map(w=>this._renderContent(w)):this._renderContent(e):
null}async _createLegend(){r.destroyMaybe(this._legend);this._legend=null;if(this._canCreateLegend){var {default:e}=await new Promise((p,w)=>f(["../Legend"],H=>p(Object.freeze(Object.defineProperty({__proto__:null,default:H},Symbol.toStringTag,{value:"Module"}))),w));this._legend=new e(this._legendOptions)}}_attachToNode(e){e.appendChild(this)}_updateLegend(){const e=this._legend;e&&e.set(this._legendOptions)}_getWidget(e){return"legend"===e?this._legend:n.isWidget(e)?e:null}_getFirstWidget(){const {content:e}=
this;return Array.isArray(e)?e.map(p=>this._getWidget(p)).find(p=>p):this._getWidget(e)}};c.__decorate([u.property()],g.prototype,"_legend",void 0);c.__decorate([u.property()],g.prototype,"_canCreateLegend",null);c.__decorate([u.property()],g.prototype,"_legendOptions",null);c.__decorate([u.property()],g.prototype,"_legendLayerInfo",null);c.__decorate([u.property()],g.prototype,"className",void 0);c.__decorate([u.property()],g.prototype,"content",void 0);c.__decorate([u.property()],g.prototype,"disabled",
null);c.__decorate([u.property()],g.prototype,"flowEnabled",void 0);c.__decorate([u.property()],g.prototype,"icon",null);c.__decorate([u.property()],g.prototype,"image",void 0);c.__decorate([u.property()],g.prototype,"listItem",void 0);c.__decorate([u.property()],g.prototype,"open",void 0);c.__decorate([u.property()],g.prototype,"title",null);c.__decorate([u.property()],g.prototype,"visible",void 0);return g=c.__decorate([I.subclass("esri.widgets.LayerList.ListItemPanel")],g)})},"esri/widgets/LayerList/support/layerListUtils":function(){define(["exports"],
function(f){function c(d){return d?.listMode??void 0}function g(d){if(d&&!("type"in d&&"wmts"===d.type))return"sublayers"in d?"sublayers":"layers"in d?"layers":void 0}function r(d,y){d?.sort((l,I)=>{l="uid"in l?y.indexOf(l.uid):-1;I="uid"in I?y.indexOf(I.uid):-1;return l>I?-1:l<I?1:0})}function A(d){return null!=d&&"layer"in d&&null!=d.layer}function u(d){return d&&"capabilities"in d&&null!=d.capabilities&&"exportMap"in d.capabilities?d.capabilities.exportMap:void 0}f.areChildrenHidden=function(d){return"hide-children"===
d?.listMode};f.canDisplayLayer=function(d){return"hide"!==c(d)};f.canSortSublayers=function(d){d=(d?.layer&&A(d.layer)?d.layer.layer:void 0)??d?.layer;if(!d)return!1;"catalog"===d.type?d=!1:(d=u(d),d=(null!=d&&"supportsDynamicLayers"in d?d.supportsDynamicLayers:void 0)??!0);return d};f.findLayerListMode=c;f.findLayerVisibilityMode=function(d){if(!d)return"inherited";var y=A(d)?d.layer:d;y=u(y);y=null!=y&&"supportsSublayerVisibility"in y?y.supportsSublayerVisibility:void 0;return null!=y?y?"independent":
"inherited":"visibilityMode"in d&&null!=d.visibilityMode?d.visibilityMode:"independent"};f.getItem=function(d){return d?.["data-item"]};f.getItemLayers=function(d){return(d=d?.layer)&&"layers"in d?d.layers:null};f.getLayerType=function(d){return d?.getAttribute("data-layer-type")};f.getNormalizedChildLayerProperty=g;f.getStatusIcon=function({connectionStatus:d,publishing:y}){return d?"connected"===d?"beacon":"offline":y?"square":"bullet-point"};f.getVisibilityIcon=function({exclusive:d,visible:y,
visibilityAppearance:l}){l="checkbox"===l;return y?d?"circle-f":l?"check-square-f":"view-visible":d?"circle":l?"square":"view-hide"};f.isSublayer=A;f.listItemHasChildren=function({children:d,error:y,incompatible:l}){return!!d?.filter(I=>!I.hidden).length&&!y&&!l};f.minDragEnabledItems=2;f.minFilterItems=10;f.sortChildLayersToIds=function(d,y){if(d=d?.layer){var l=g(d);if(l){if("layers"===l&&"layers"in d)var I=d.layers;else"sublayers"===l&&"sublayers"in d&&(I=d.sublayers);r(I,y)}}};f.sortLayersToIds=
r;Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},"esri/widgets/LayerList/LayerListVisibleElements":function(){define("../../chunks/tslib.es6 ../../core/Accessor ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass".split(" "),function(f,c,g,r,A,u,d){c=class extends c{constructor(){super(...arguments);this.catalogLayerList=!0;this.filter=this.errors=this.collapseButton=this.closeButton=!1;
this.flow=!0;this.heading=!1;this.statusIndicators=!0;this.temporaryLayerIndicators=!1}};f.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"catalogLayerList",void 0);f.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"closeButton",void 0);f.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"collapseButton",void 0);f.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"errors",void 0);f.__decorate([g.property({type:Boolean,nonNullable:!0})],
c.prototype,"filter",void 0);f.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"flow",void 0);f.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"heading",void 0);f.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"statusIndicators",void 0);f.__decorate([g.property({type:Boolean,nonNullable:!0})],c.prototype,"temporaryLayerIndicators",void 0);return c=f.__decorate([d.subclass("esri.widgets.LayerList.LayerListVisibleElements")],c)})},"esri/widgets/support/globalCss":function(){define(["exports"],
function(f){f.globalCss={anchor:"esri-widget__anchor",anchorDisabled:"esri-widget__anchor--disabled",button:"esri-button",buttonDisabled:"esri-button--disabled",buttonHalf:"esri-button--half",buttonSecondary:"esri-button--secondary",buttonSmall:"esri-button--small",buttonTertiary:"esri-button--tertiary",buttonThird:"esri-button--third",disabled:"esri-disabled",empty:"esri-widget__content--empty",emptyIllustration:"esri-widget__content-illustration--empty",heading:"esri-widget__heading",hidden:"esri-hidden",
input:"esri-input",interactive:"esri-interactive",loader:"esri-widget__loader",loaderAnimation:"esri-widget__loader-animation",loaderText:"esri-widget__loader-text",menu:"esri-menu",menuHeader:"esri-menu__header",menuItem:"esri-menu__list-item",menuItemActive:"esri-menu__list-item--active",menuItemFocus:"esri-menu__list-item--focus",menuList:"esri-menu__list",panel:"esri-widget--panel",panelHeightOnly:"esri-widget--panel-height-only",primaryTick:"primary-tick",primaryTickAmPm:"primary-tick__ampm",
primaryTickLabel:"primary-tick__label",rotating:"esri-rotating",secondaryTick:"secondary-tick",select:"esri-select",table:"esri-widget__table",widget:"esri-widget",widgetButton:"esri-widget--button",widgetButtonActive:"esri-widget--button-active",widgetDisabled:"esri-widget--disabled"};Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},"*noref":1}});
define("require ../chunks/tslib.es6 ../core/Collection ../core/deprecate ../core/Identifiable ../core/Logger ../core/ReactiveMap ../core/reactiveUtils ../core/accessorSupport/decorators/property ../core/has ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../support/actions/actionUtils ./Widget ./LayerList/css ./LayerList/LayerListViewModel ./LayerList/LayerListVisibleElements ./LayerList/ListItem ./LayerList/support/layerListUtils ../chunks/componentsUtils ./support/globalCss ./support/widgetUtils ./support/decorators/messageBundle ./support/decorators/vmEvent ./support/jsxFactory".split(" "),function(f,
c,g,r,A,u,d,y,l,I,L,O,n,v,e,p,w,H,B,h,q,F,M,S,t){const T=a=>Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"})),U=g.ofType(H);g=class extends A.IdentifiableMixin(v){constructor(a,b){super(a,b);this._activeItem=null;this._tooltipReferenceMap=new d;this._focusCatalogFlowItem=this._focusTableListFlowItem=this._focusPanelFlowItem=this._focusRootFlowItem=!1;this._selectedDragItemLayerUid=this._lastDragDetail=null;this._rootGroupUid=`operational-${this.uid}`;
this.catalogOptions=this.catalogLayerList=null;this.dragEnabled=this.collapsed=!1;this.filterText=this.filterPlaceholder="";this.headingLevel=2;this.messagesCommon=this.messages=this.listItemCanReceiveFunction=this.listItemCanGiveFunction=this.knowledgeGraphOptions=null;this.minDragEnabledItems=B.minDragEnabledItems;this.minFilterItems=B.minFilterItems;this.openTableListItem=this.openCatalogItem=null;this.selectedItems=new U;this.selectionMode="none";this.tableList=null;this.viewModel=new p;this.visibilityAppearance=
"default";this.visibleElements=new w;this._canMove=({dragEl:k,fromEl:m,toEl:x},z)=>{z="pull"===z?this.listItemCanGiveFunction:this.listItemCanReceiveFunction;k=B.getItem(k);if(!k?.sortable)return!1;var E=B.getItem(m),C=B.getLayerType(m),G=B.getItem(x),J=B.getLayerType(x);C=!!C&&!!J&&C===J;J={selected:k,from:E,to:G};m=m.group;x=x.group;E=E?.layer?.type??"";G=G?.layer?.type??"";const K=new Set(["map-image","catalog","knowledge-graph"]);return m&&x&&"function"===typeof z?z.call(null,J):C&&!K.has(E)&&
!K.has(G)&&"sublayer"!==k?.layer?.type};this._clearActiveItem=()=>{this._activeItem=null};this._setActiveItem=k=>{"default"===this.visibilityAppearance&&(k=Array.from(k.composedPath()).find(m=>m.classList?.contains(e.css.item)),this._activeItem=B.getItem(k))};this._onCalciteListOrderChange=k=>{const {_lastDragDetail:m}=this,{toEl:x,fromEl:z,dragEl:E,newIndex:C}=k;z&&x&&(m?.newIndex!==C||m?.dragEl!==E||m?.toEl!==x||m?.fromEl!==z)&&(this._lastDragDetail=k,z===x?(k=Array.from(z.children).filter(G=>G?.matches("calcite-list-item")).map(G=>
G.value),this._sortLayers(z,k)):this._moveLayerFromChildList({toEl:x,fromEl:z,dragEl:E,newIndex:C}))}}initialize(){this.addHandles([y.watch(()=>this.openCatalogItem,a=>a?this._createCatalog():this._destroyCatalog()),y.watch(()=>this.openTableListItem,a=>a?this._createTableList():this._destroyTableList())])}loadDependencies(){return h.loadCalciteComponents({action:()=>new Promise((a,b)=>f(["../chunks/calcite-action"],a,b)),"action-group":()=>new Promise((a,b)=>f(["../chunks/calcite-action-group"],
a,b)),"action-menu":()=>new Promise((a,b)=>f(["../chunks/calcite-action-menu"],a,b)),button:()=>new Promise((a,b)=>f(["../chunks/calcite-button"],a,b)),flow:()=>new Promise((a,b)=>f(["../chunks/calcite-flow"],a,b)),"flow-item":()=>new Promise((a,b)=>f(["../chunks/calcite-flow-item"],a,b)),icon:()=>new Promise((a,b)=>f(["../chunks/calcite-icon"],a,b)),list:()=>new Promise((a,b)=>f(["../chunks/calcite-list"],a,b)),"list-item":()=>new Promise((a,b)=>f(["../chunks/calcite-list-item"],a,b)),notice:()=>
new Promise((a,b)=>f(["../chunks/calcite-notice"],a,b)),tooltip:()=>new Promise((a,b)=>f(["../chunks/calcite-tooltip"],a,b))})}destroy(){this._destroyTableList();this._tooltipReferenceMap.clear()}get _totalItems(){return this.viewModel.operationalItems.flatten(a=>a.children.filter(b=>"catalog-dynamic-group"!==b.layer.type)).length}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.visibleElements.filter}get icon(){return"layers"}set icon(a){this._overrideIfSome("icon",
a)}get label(){return this.messages?.widgetLabel??""}set label(a){this._overrideIfSome("label",a)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(a){this.viewModel.listItemCreatedFunction=a}get multipleSelectionEnabled(){r.deprecatedProperty(u.getLogger(this),"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0});return"multiple"===this.selectionMode}set multipleSelectionEnabled(a){r.deprecatedProperty(u.getLogger(this),
"multipleSelectionEnabled",{replacement:"selectionMode",version:"4.29",warnOnce:!0});this.selectionMode=a?"multiple":this.selectionEnabled?"single":"none"}get operationalItems(){return this.viewModel.operationalItems}set operationalItems(a){this.viewModel.operationalItems=a}get selectionEnabled(){r.deprecatedProperty(u.getLogger(this),"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0});return"none"!==this.selectionMode&&this.dragEnabled}set selectionEnabled(a){r.deprecatedProperty(u.getLogger(this),
"selectionEnabled",{replacement:"selectionMode, dragEnabled",version:"4.29",warnOnce:!0});this.selectionMode=(this.dragEnabled=a)?this.multipleSelectionEnabled?"multiple":"single":"none"}get view(){return this.viewModel.view}set view(a){this.viewModel.view=a}triggerAction(a,b){return this.viewModel.triggerAction(a,b)}render(){var a=this.viewModel?.state;a={[q.globalCss.hidden]:"loading"===a,[q.globalCss.disabled]:"disabled"===a};const b=this.operationalItems?.filter(k=>!k.hidden&&(this.visibleElements.errors||
!k.error));return t.tsx("div",{class:this.classes(e.css.base,q.globalCss.widget,q.globalCss.panel,a)},b?.length?[this._renderItemTooltips(b),this._renderItems(b)]:this._renderNoItems())}_renderItemTooltip(a){const {_tooltipReferenceMap:b,messages:k}=this;return a?t.tsx("calcite-tooltip",{key:`tooltip-${a.layer.uid}`,referenceElement:b.get(a.layer.uid)},k.layerIncompatibleTooltip):null}_renderItemTooltipNodes(a){return a.incompatible?this._renderItemTooltip(a):a.children?.filter(b=>!b.hidden).toArray().map(b=>
this._renderItemTooltipNodes(b))}_renderItemTooltips(a){return a?.toArray().map(b=>this._renderItemTooltipNodes(b))}_renderNoItemsMessage(){return t.tsx("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return t.tsx("div",{class:e.css.itemMessage,key:"esri-layer-list__no-items"},t.tsx("calcite-notice",{icon:"information",kind:"info",open:!0,width:"full"},this._renderNoItemsMessage()))}_destroyCatalog(){this.catalogLayerList?.destroy();this._set("catalogLayerList",null)}_destroyTableList(){this.tableList?.destroy();
this._set("tableList",null)}async _createCatalog(){this._destroyCatalog();const {default:a}=await new Promise((J,K)=>f(["./CatalogLayerList"],P=>J(T(P)),K)),{headingLevel:b,catalogOptions:k,view:m,filterPlaceholder:x,listItemCreatedFunction:z,minFilterItems:E,selectionMode:C,visibilityAppearance:G}=this;this._set("catalogLayerList",new a({headingLevel:b,view:m,filterPlaceholder:x,listItemCreatedFunction:z,minFilterItems:E,selectionMode:C,visibilityAppearance:G,...k,catalogLayer:this.openCatalogItem?.layer}))}_getTableListParams(a){a=
a?.layer;return"knowledge-graph"===a?.type?{...this.knowledgeGraphOptions,tables:a?.tables}:null}async _createTableList(){this._destroyTableList();const {default:a}=await new Promise((z,E)=>f(["./TableList"],C=>z(T(C)),E)),b=this._getTableListParams(this.openTableListItem);if(b?.tables?.length){var {headingLevel:k,selectionMode:m,dragEnabled:x}=this;this._set("tableList",new a({headingLevel:k,selectionMode:m,dragEnabled:x,...b}))}}_renderCatalogFlowItem(){const {openCatalogItem:a,messages:b}=this;
if(!a)return null;const k=this._getLayerTitle(a);return t.tsx("calcite-flow-item",{afterCreate:this._focusCatalogFlowItemNode,afterUpdate:this._focusCatalogFlowItemNode,bind:this,description:k,heading:b.catalogLayers,headingLevel:this.headingLevel,key:`flow-catalog-${a.uid}`,onCalciteFlowItemBack:m=>{m.preventDefault();this.openCatalogItem=null;this._focusRootFlowItem=!0}},this.catalogLayerList?.render())}_renderTableListFlowItem(){const {openTableListItem:a,messages:b}=this;if(!a)return null;const k=
this._getLayerTitle(a);return t.tsx("calcite-flow-item",{afterCreate:this._focusTableListFlowItemNode,afterUpdate:this._focusTableListFlowItemNode,bind:this,description:k,heading:b.tables,headingLevel:this.headingLevel,key:`flow-table-list-${a.uid}`,onCalciteFlowItemBack:m=>{m.preventDefault();this.openTableListItem=null;this._focusRootFlowItem=!0}},this.tableList?.render())}_renderPanelFlowItems(a){return a?a.flatten(b=>b.children).filter(({hidden:b,panel:k})=>!b&&k?.open&&!k.disabled&&k.flowEnabled).toArray().map(({title:b,
panel:k})=>{const m=()=>this._handlePanelFlowItemBack(k);return t.tsx("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:b,heading:k.title,headingLevel:this.headingLevel,key:`flow-panel-${k.uid}`,onCalciteFlowItemBack:x=>{x.preventDefault();m()}},k.render(),t.tsx("calcite-button",{appearance:"transparent",onclick:m,slot:"footer-actions",width:"full"},this.messagesCommon.back))}):[]}_handlePanelFlowItemBack(a){a.open=!1;this._focusRootFlowItem=
!0}_focusRootFlowItemNode(a){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,requestAnimationFrame(()=>a?.setFocus()))}_focusCatalogFlowItemNode(a){this._focusCatalogFlowItem&&(this._focusCatalogFlowItem=!1,requestAnimationFrame(()=>a?.setFocus()))}_focusTableListFlowItemNode(a){this._focusTableListFlowItem&&(this._focusTableListFlowItem=!1,requestAnimationFrame(()=>a?.setFocus()))}_focusPanelFlowItemNode(a){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,requestAnimationFrame(()=>a?.setFocus()))}_renderItems(a){const {visible:b,
collapsed:k,_filterEnabled:m,_rootGroupUid:x,visibleElements:{closeButton:z,collapseButton:E,heading:C,flow:G},_dragEnabled:J,selectionMode:K,filterText:P,filterPlaceholder:Q,messages:R}=this;a=[t.tsx("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:z,closed:!b,collapsed:k,collapsible:E,heading:C?R.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",onCalciteFlowItemClose:()=>this.visible=!1},t.tsx("calcite-list",
{afterCreate:D=>{D.addEventListener("focusin",this._setActiveItem);D.addEventListener("focusout",this._clearActiveItem)},afterRemoved:D=>{D.removeEventListener("focusin",this._setActiveItem);D.removeEventListener("focusout",this._clearActiveItem)},canPull:D=>this._canMove(D,"pull"),canPut:D=>this._canMove(D,"put"),"data-layer-type":x,dragEnabled:J,filterEnabled:m,filterPlaceholder:Q,filterText:m?P:"",group:x,key:"root-list",label:R.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,
selectionAppearance:"border",selectionMode:K,onCalciteListChange:D=>this._handleCalciteListChange(D),onCalciteListDragEnd:D=>this._handleCalciteListDragEnd(D.detail),onCalciteListFilter:D=>this.filterText=D.target?.filterText??"",onCalciteListOrderChange:D=>this._onCalciteListOrderChange(D.detail)},a?.toArray().map(D=>this._renderItem(D)),a?.length&&m?t.tsx("div",{class:e.css.filterNoResults,slot:"filter-no-results"},t.tsx("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoItemsMessage())):
null)),this._renderPanelFlowItems(a),this._renderTableListFlowItem(),this._renderCatalogFlowItem()];return b?G?t.tsx("calcite-flow",{key:"root-flow"},a):a:null}_renderChildList(a,b=[]){const {_dragEnabled:k,_rootGroupUid:m,viewModel:{listModeDisabled:x},messages:z,selectionMode:E}=this,{children:C}=a,G="catalog-dynamic-group"!==a.layer?.type&&B.listItemHasChildren(a),J=!(x?0:B.areChildrenHidden(a.layer))&&!G&&k&&"group"===a.layer?.type;return G||J?t.tsx("calcite-list",{canPull:K=>this._canMove(K,
"pull"),canPut:K=>this._canMove(K,"put"),"data-item":a,"data-layer-type":m,dragEnabled:k?a.childrenSortable&&B.canSortSublayers(a):!1,group:`${m}-${a.layer.uid}`,key:`child-list-${a.layer.uid}`,selectionAppearance:"border",selectionMode:E},C?.filter(K=>!K.hidden).toArray().map(K=>this._renderItem(K,a,[...b,a.title])),this._getTableListParams(a)?.tables?.length?t.tsx("calcite-list-item",{class:e.css.item,"data-layer-id":a.layer.id,dragDisabled:!0,key:`list-item-table-list-tables-${a.layer.uid}`,title:z.tables,
onCalciteListItemSelect:()=>{this.openTableListItem=a;this._focusTableListFlowItem=!0}},t.tsx("div",{class:e.css.itemContent,slot:"content"},z.tables),t.tsx("calcite-icon",{class:e.css.itemTableIcon,icon:"table",scale:"s",slot:"content-start"}),t.tsx("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"})):null):null}_renderItemMessage(a){return a.error?t.tsx("div",{class:e.css.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},t.tsx("calcite-notice",{icon:"exclamation-mark-triangle",
kind:"warning",open:!0,scale:"s",width:"full"},t.tsx("div",{slot:"message"},this.messages.layerError))):a.incompatible?t.tsx("div",{class:e.css.itemMessage,key:"esri-layer-list__incompatible",slot:"content-bottom"},t.tsx("calcite-notice",{afterCreate:b=>this._setTooltipReference(b,a),afterRemoved:()=>this._removeTooltipReference(a),bind:this,icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",tabIndex:0,width:"full"},t.tsx("div",{slot:"message"},this.messages.layerIncompatible))):null}_getLayerTitle(a){return a.title||
this.messages.untitledLayer}_renderItem(a,b,k){const {_activeItem:m,_selectedDragItemLayerUid:x,selectionMode:z,selectedItems:E,messages:C,visibleElements:G}=this,J=this._getLayerTitle(a),K=a.visibleAtCurrentTimeExtent?a.visibleAtCurrentScale?J:`${J} (${C.layerInvisibleAtScale})`:`${J} (${C.layerInvisibleAtTime})`,P=this._filterActions(a.actionsSections),Q=this._countActions(P),R="catalog"===a.parent?.layer?.type;var D="catalog-dynamic-group"===a.layer?.type;const V="catalog-footprint"===a.layer?.type?
t.tsx("calcite-icon",{class:e.css.itemCatalogIcon,icon:"footprint",key:"footprint",scale:"s",slot:"content-start"}):null,W=D?t.tsx("calcite-icon",{class:e.css.itemCatalogIcon,icon:"catalog-dataset",key:"catalog-dataset",scale:"s",slot:"content-start"}):null;D=G.catalogLayerList&&D?t.tsx("calcite-action",{appearance:"transparent",disabled:!a.layer.visible,icon:"chevron-right",iconFlipRtl:!0,onclick:()=>{this.openCatalogItem=b;this._focusCatalogFlowItem=!0},scale:"s",slot:"actions-end",text:J}):null;
return t.tsx("calcite-list-item",{afterCreate:N=>this._focusSelectedDragEl(N,a),afterUpdate:N=>this._focusSelectedDragEl(N,a),class:this.classes(e.css.item,{[e.css.itemActive]:m===a}),"data-item":a,"data-layer-id":a.layer.id,dragDisabled:!a.sortable||R,dragSelected:a.layer.uid===x,id:a.layer.uid,key:`list-item-${a.layer.uid}`,label:J,metadata:{parentTitles:k,title:J},open:a.open,selected:"none"!==z?E.includes(a):!1,title:K,value:a.layer.uid,onCalciteListItemDragHandleChange:N=>this._handleCalciteListItemDragHandleChange(N,
a),onCalciteListItemSelect:N=>this._handleCalciteListItemSelect(N,a,b),onCalciteListItemToggle:N=>this._handleCalciteListItemToggle(N,a)},V,W,t.tsx("div",{class:this.classes({[e.css.itemContent]:!0,[e.css.itemInvisible]:!a.visibleAtCurrentScale||!a.visibleAtCurrentTimeExtent}),slot:"content"},J),this._renderItemStatus(a,b),this._renderItemToggle(a,b),D,this._renderItemTemporaryIcon(a),this._renderChildList(a,k),this._renderItemMessage(a),this._renderPanel(a.panel),this._renderPanelAction(a.panel),
1<Q?this._renderActionsSections(a,P):1===Q?this._renderAction({item:a,action:this._getSingleAction(P),textEnabled:!1}):null)}_renderItemStatus(a,b){const {visibleElements:k}=this;if(!k.statusIndicators)return null;const {connectionStatus:m,publishing:x,updating:z}=a;a=!!m;return t.tsx("calcite-icon",{class:this.classes({[e.css.statusIndicator]:!0,[e.css.publishing]:x,[e.css.updating]:z&&!b,[e.css.connectionStatus]:a,[e.css.connectionStatusConnected]:a&&"connected"===m}),icon:B.getStatusIcon({connectionStatus:m,
publishing:x}),key:"layer-item-status",scale:"s",slot:"actions-end"})}_renderItemTemporaryIcon(a){return this.visibleElements.temporaryLayerIndicators&&"persistenceEnabled"in a.layer&&!a.layer.persistenceEnabled?t.tsx("calcite-icon",{class:e.css.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"actions-start",title:this.messages.temporary}):null}_renderItemToggle(a,b){const {messages:k,visibilityAppearance:m}=this,{visible:x}=a,z=b?.visibilityMode;if("inherited"===z)return null;
const E=B.getVisibilityIcon({visible:x,exclusive:"exclusive"===z,visibilityAppearance:m}),C="checkbox"===m,G=k.layerVisibility;return t.tsx("calcite-action",{appearance:"transparent",class:e.css.visibleToggle,icon:C?E:void 0,key:"visibility-toggle",onclick:()=>this._toggleVisibility(a,b),scale:"s",slot:C?"actions-start":"actions-end",text:G,title:G},C?null:t.tsx("calcite-icon",{class:this.classes({[e.css.visibleIcon]:"exclusive"!==z&&x}),icon:E,scale:"s"}))}_renderPanel(a){return!a?.open||a.disabled||
a.flowEnabled?null:t.tsx("div",{class:e.css.itemContentBottom,key:`content-panel-${a.uid}`,slot:"content-bottom"},a.render())}_renderPanelAction(a){if(!a?.visible)return null;const {open:b,title:k,disabled:m}=a;return t.tsx("calcite-action",{active:b,appearance:"transparent",disabled:m,icon:n.getActionIcon(a),key:`action-${a.uid}`,onclick:()=>this._togglePanel(a),scale:"s",slot:"actions-end",text:k??"",title:k??void 0},this._renderFallbackIcon(a))}_renderActionsSections(a,b){const k=this.messagesCommon.options;
return t.tsx("calcite-action-menu",{appearance:"transparent",class:e.css.actionMenu,key:"item-action-menu",label:this.messagesCommon.menu,open:a.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",scale:"s",slot:"actions-end",onCalciteActionMenuOpen:m=>a.actionsOpen=m.target.open},t.tsx("calcite-action",{appearance:"transparent",icon:"ellipsis",scale:"s",slot:"trigger",text:k,title:k}),b.toArray().map((m,x)=>this._renderActionSection(a,m,x)))}_renderActionSection(a,b,k){return t.tsx("calcite-action-group",
{class:e.css.actionGroup,key:`action-section-${k}`},b.toArray().map(m=>this._renderAction({item:a,action:m,textEnabled:!0})))}_renderFallbackIcon(a){const {className:b,icon:k}=a;if(k)return null;a="image"in a?a.image:void 0;const m={[e.css.itemActionIcon]:!!b,[e.css.itemActionImage]:!!a};b&&(m[b]=!0);return a||b?t.tsx("span",{"aria-hidden":"true",class:this.classes(e.css.itemActionIcon,m),key:"icon",styles:n.getActionStyles(a)}):null}_renderAction(a){const {item:b,action:k,textEnabled:m}=a;if(!k)return null;
const {active:x,disabled:z,title:E,type:C,indicator:G}=k;return t.tsx("calcite-action",{active:"toggle"===C?k.value:!1,appearance:"transparent",disabled:z,icon:n.getActionIcon(k),indicator:G,key:`action-${k.uid}`,loading:x,onclick:()=>this._triggerAction(b,k),scale:"s",slot:m?void 0:"actions-end",text:E??"",textEnabled:m,title:E??void 0},this._renderFallbackIcon(k))}_setTooltipReference(a,b){this._tooltipReferenceMap.set(b.layer.uid,a)}_removeTooltipReference(a){this._tooltipReferenceMap.delete(a.layer.uid)}_moveLayerFromChildList({toEl:a,
fromEl:b,dragEl:k,newIndex:m}){k=B.getItem(k);a=B.getItem(a);b=B.getItem(b);this.viewModel.moveListItem(k,b,a,m)}_handleCalciteListDragEnd(a){const {fromEl:b,dragEl:k,oldIndex:m}=a;b.insertBefore(k,b.children[m])}_sortLayers(a,b){a&&(a.group===this._rootGroupUid?B.sortLayersToIds(this.view?.map?.layers,b):(a=B.getItem(a))&&B.sortChildLayersToIds(a,b))}_getSingleAction(a){return a.reduce(b=>b).find(b=>b&&("button"===b.type||"toggle"===b.type))}_filterActions(a){return a.map(b=>b.filter(k=>k.visible))}_countActions(a){return a.reduce((b,
k)=>b+k.length,0)}_triggerAction(a,b){b&&a&&("toggle"===b.type&&(b.value=!b.value),this.triggerAction(b,a))}_handleCalciteListChange(a){const {selectionMode:b,selectedItems:k}=this;"none"!==b&&(a=a.target.selectedItems.map(m=>B.getItem(m)).filter(Boolean),k.removeAll(),k.addMany(a))}_handleCalciteListItemToggle(a,b){a.stopPropagation();b.open=a.target.open}_focusSelectedDragEl(a,b){this._selectedDragItemLayerUid===b.layer.uid&&requestAnimationFrame(()=>a?.setFocus())}_handleCalciteListItemDragHandleChange(a,
b){a.stopPropagation();this._selectedDragItemLayerUid=a.target.dragSelected?b.layer.uid:null}_handleCalciteListItemSelect(a,b,k){B.getItem(a.target)===b&&"none"===this.selectionMode&&"inherited"!==k?.visibilityMode&&this._toggleVisibility(b,k)}_togglePanel(a){a.open=!a.open;a.open&&(this._focusPanelFlowItem=!0)}_toggleVisibility(a,b){!a||"exclusive"===b?.visibilityMode&&a.visible||(a.visible=!a.visible)}};c.__decorate([l.property()],g.prototype,"_activeItem",void 0);c.__decorate([l.property()],g.prototype,
"_tooltipReferenceMap",void 0);c.__decorate([l.property()],g.prototype,"_focusRootFlowItem",void 0);c.__decorate([l.property()],g.prototype,"_focusPanelFlowItem",void 0);c.__decorate([l.property()],g.prototype,"_focusTableListFlowItem",void 0);c.__decorate([l.property()],g.prototype,"_focusCatalogFlowItem",void 0);c.__decorate([l.property()],g.prototype,"_totalItems",null);c.__decorate([l.property()],g.prototype,"_dragEnabled",null);c.__decorate([l.property()],g.prototype,"_filterEnabled",null);c.__decorate([l.property({readOnly:!0})],
g.prototype,"catalogLayerList",void 0);c.__decorate([l.property()],g.prototype,"catalogOptions",void 0);c.__decorate([l.property()],g.prototype,"collapsed",void 0);c.__decorate([l.property()],g.prototype,"dragEnabled",void 0);c.__decorate([l.property()],g.prototype,"filterPlaceholder",void 0);c.__decorate([l.property()],g.prototype,"filterText",void 0);c.__decorate([l.property()],g.prototype,"headingLevel",void 0);c.__decorate([l.property()],g.prototype,"icon",null);c.__decorate([l.property()],g.prototype,
"knowledgeGraphOptions",void 0);c.__decorate([l.property()],g.prototype,"label",null);c.__decorate([l.property()],g.prototype,"listItemCanGiveFunction",void 0);c.__decorate([l.property()],g.prototype,"listItemCanReceiveFunction",void 0);c.__decorate([l.property()],g.prototype,"listItemCreatedFunction",null);c.__decorate([l.property(),M.messageBundle("esri/widgets/LayerList/t9n/LayerList")],g.prototype,"messages",void 0);c.__decorate([l.property(),M.messageBundle("esri/t9n/common")],g.prototype,"messagesCommon",
void 0);c.__decorate([l.property()],g.prototype,"minDragEnabledItems",void 0);c.__decorate([l.property()],g.prototype,"minFilterItems",void 0);c.__decorate([l.property()],g.prototype,"multipleSelectionEnabled",null);c.__decorate([l.property()],g.prototype,"openCatalogItem",void 0);c.__decorate([l.property()],g.prototype,"openTableListItem",void 0);c.__decorate([l.property()],g.prototype,"operationalItems",null);c.__decorate([l.property()],g.prototype,"selectionEnabled",null);c.__decorate([l.property()],
g.prototype,"selectedItems",void 0);c.__decorate([l.property()],g.prototype,"selectionMode",void 0);c.__decorate([l.property({readOnly:!0})],g.prototype,"tableList",void 0);c.__decorate([l.property()],g.prototype,"view",null);c.__decorate([S.vmEvent("trigger-action"),l.property({type:p})],g.prototype,"viewModel",void 0);c.__decorate([l.property()],g.prototype,"visibilityAppearance",void 0);c.__decorate([l.property({type:w,nonNullable:!0})],g.prototype,"visibleElements",void 0);return g=c.__decorate([O.subclass("esri.widgets.LayerList")],
g)});