@arcgis/common-components 5.2.4 → 5.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cdn/{2GBIDGIK.js → 24JPS4UK.js} +1 -1
  2. package/dist/cdn/{PJX34XKX.js → 2KO6YLJI.js} +1 -1
  3. package/dist/cdn/{RHEPCTDX.js → 2XDK2KWM.js} +1 -1
  4. package/dist/cdn/{E6LVFD3S.js → 34KFQEIR.js} +1 -1
  5. package/dist/cdn/{PHW4TZXW.js → 46VEJ4PR.js} +1 -1
  6. package/dist/cdn/{YY2GCBWQ.js → 54NZJUOI.js} +1 -1
  7. package/dist/cdn/{B4MSRQLW.js → 5VRXYQB3.js} +1 -1
  8. package/dist/cdn/{P3MNNMBR.js → 6XHIOKYK.js} +1 -1
  9. package/dist/cdn/{RESQTFUG.js → ARXE5DJD.js} +1 -1
  10. package/dist/cdn/{JGHUIE7K.js → BSFCSOJ5.js} +1 -1
  11. package/dist/cdn/{P7F647MW.js → BWQGYY7A.js} +1 -1
  12. package/dist/cdn/{777NEAW4.js → DFRTZWXG.js} +1 -1
  13. package/dist/cdn/{WLX2SENR.js → HJICUPOG.js} +1 -1
  14. package/dist/cdn/{YPUQA6VS.js → ISPXU6V4.js} +1 -1
  15. package/dist/cdn/{V4L3PXBZ.js → IWZ6TPQL.js} +1 -1
  16. package/dist/cdn/{UE3LF2VY.js → J45DFT5G.js} +1 -1
  17. package/dist/cdn/{3X2MVQTG.js → JEPW4X7U.js} +1 -1
  18. package/dist/cdn/{I6LJN2SJ.js → JO42ZXGS.js} +1 -1
  19. package/dist/cdn/{XDBI7TX7.js → LCBR3JQ7.js} +1 -1
  20. package/dist/cdn/{AVAVKE2C.js → LZIX4SAR.js} +1 -1
  21. package/dist/cdn/{SL5UWHYF.js → MCB3OMOK.js} +1 -1
  22. package/dist/cdn/{DZUTJ747.js → PNWMWVH6.js} +1 -1
  23. package/dist/cdn/{RWGWZAMM.js → R37S375C.js} +1 -1
  24. package/dist/cdn/{5WROHG4L.js → RMYNVT3P.js} +1 -1
  25. package/dist/cdn/{TQL7NKXO.js → S5UB4SRW.js} +1 -1
  26. package/dist/cdn/{E3VHT6BQ.js → T3OK3M4E.js} +1 -1
  27. package/dist/cdn/{S26IP5GE.js → TL6RF27T.js} +1 -1
  28. package/dist/cdn/{BEAJKSDR.js → UX3IMY5J.js} +1 -1
  29. package/dist/cdn/{GZXN456V.js → VTAQRKNF.js} +1 -1
  30. package/dist/cdn/{I23I3NHX.js → WW2A4SYG.js} +1 -1
  31. package/dist/cdn/{H5QWBJTH.js → X3Q4E66O.js} +1 -1
  32. package/dist/cdn/{4BQVTE3X.js → XGRQMQZL.js} +1 -1
  33. package/dist/cdn/{IS5NWPTN.js → XTRVP6QD.js} +1 -1
  34. package/dist/cdn/{HX2ZECWM.js → Y3APNPN4.js} +1 -1
  35. package/dist/cdn/{S5YQPDLN.js → YK3IKSGP.js} +1 -1
  36. package/dist/cdn/{RZWLH7SD.js → YL7W53II.js} +1 -1
  37. package/dist/cdn/{XQJALRRE.js → Z6JVEBKQ.js} +1 -1
  38. package/dist/cdn/{KK62TWI2.js → ZA4TGNE2.js} +1 -1
  39. package/dist/cdn/index.js +1 -1
  40. package/dist/chunks/runtime.js +1 -1
  41. package/dist/docs/api.json +1 -1
  42. package/dist/docs/docs.json +1 -1
  43. package/dist/docs/web-types.json +1 -1
  44. package/package.json +5 -5
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{e as n}from"./GZXN456V.js";import"./H4Q2JVNO.js";import{L as r,R as c,h as s,j as a}from"./3X2MVQTG.js";var o=s`:host{display:flex;flex:auto;inline-size:300px;min-inline-size:0;padding:var(--calcite-space-sm)}:host([disabled]){opacity:var(--calcite-opacity-disabled);pointer-events:none}.container{align-items:center;border:solid var(--calcite-border-width-sm) var(--calcite-color-border-3);display:flex;flex:auto;padding-inline:var(--calcite-space-sm)}.text{color:var(--calcite-color-text-1);flex:auto;font-family:inherit;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-regular);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--calcite-space-none)}`,i=class extends r{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.disabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=n()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,disabled:7,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}static{this.styles=o}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.[0]}step(e){if(!this.items||!this.currentValue)return;let t=this.items.findIndex(({value:l})=>l===this.currentValue?.value)+(e==="next"?1:-1);t>=this.items.length||t<0||(this.currentValue=this.items[t],this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(e){(e.has("currentValue")||e.has("items"))&&this.items?.length&&!this.currentValue&&(this.currentValue=this.items[0]),this.el.hidden=!this.items?.length,this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let e=this.items.findIndex(({value:t})=>t===this.currentValue?.value);this.canNext=e<this.items.length-1,this.canPrevious=e>0}render(){return a`<div class="container"><div class="text">${this.currentValue?.label}</div></div>`}};c("arcgis-value-picker-label",i);export{i as ArcgisValuePickerLabel};
2
+ import{e as n}from"./VTAQRKNF.js";import"./H4Q2JVNO.js";import{L as r,R as c,h as s,j as a}from"./JEPW4X7U.js";var o=s`:host{display:flex;flex:auto;inline-size:300px;min-inline-size:0;padding:var(--calcite-space-sm)}:host([disabled]){opacity:var(--calcite-opacity-disabled);pointer-events:none}.container{align-items:center;border:solid var(--calcite-border-width-sm) var(--calcite-color-border-3);display:flex;flex:auto;padding-inline:var(--calcite-space-sm)}.text{color:var(--calcite-color-text-1);flex:auto;font-family:inherit;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-regular);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:var(--calcite-space-none)}`,i=class extends r{constructor(){super(...arguments),this.autoDestroyDisabled=!1,this.disabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=n()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,disabled:7,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}static{this.styles=o}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.[0]}step(e){if(!this.items||!this.currentValue)return;let t=this.items.findIndex(({value:l})=>l===this.currentValue?.value)+(e==="next"?1:-1);t>=this.items.length||t<0||(this.currentValue=this.items[t],this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(e){(e.has("currentValue")||e.has("items"))&&this.items?.length&&!this.currentValue&&(this.currentValue=this.items[0]),this.el.hidden=!this.items?.length,this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let e=this.items.findIndex(({value:t})=>t===this.currentValue?.value);this.canNext=e<this.items.length-1,this.canPrevious=e>0}render(){return a`<div class="container"><div class="text">${this.currentValue?.label}</div></div>`}};c("arcgis-value-picker-label",i);export{i as ArcgisValuePickerLabel};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as R}from"./5IM4X2GT.js";import{a as w}from"./RZWLH7SD.js";import{a as h,c as v,e as A}from"./OBMF3G26.js";import{a as y,b as x}from"./PL2HCI3R.js";import"./GZXN456V.js";import"./H4Q2JVNO.js";import{K as u,L as g,M as C,O as b,R as _,j as p}from"./3X2MVQTG.js";var $=class extends g{constructor(){super(...arguments),this._elementReferenceController=new w(this),this._childrenObserver=new MutationObserver(()=>{this._syncChildren()}),this.priority=h.Medium,this.menuAppearance="action-menu",this.overflowActionLabel="More actions"}static{this.properties={_children:16,priority:9,menuAppearance:1,overflowActionLabel:1}}measure(e){let t=this._children?.length??0;if(!t)return[0];let o=v(e),l=t*o;if(!(this.priority<h.NeverCollapse&&t>2))return[l];let n=Math.min(t,2)*o,r=[n];if(t<=2||this.priority<=h.ForceCollapse)return r;for(let i=1;i<t-1;i++)r.push(n+o*i);return x(r)}proxiedRender(e,t){let o=this._children;if(!o)return;let{visible:l,hidden:n}=this._resolveActionsFromBudget(o,e,t),r="hamburger",i=this.overflowActionLabel,c=e.tooltipAppearance,s=c!=="native",a=this._elementReferenceController.element,m=c==="calcite-dark"?"calcite-mode-dark":void 0,f=y(e),k=this.menuAppearance==="action-menu"?p`<calcite-action-menu .label=${i} overlay-positioning=fixed .placement=${f}><calcite-action .icon=${r} .scale=${e.scale} slot=trigger .text=${i} title=${(c==="native"?i:"")??b} ${u(this._elementReferenceController.ref)}></calcite-action>${n.map(d=>d.proxiedRender(e,"expanded-action"))}</calcite-action-menu>`:p`<calcite-action .icon=${r} .scale=${e.scale} .text=${i} title=${(c==="native"?i:"")??b} ${u(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown overlay-positioning=fixed .placement=${f} .referenceElement=${a}><calcite-dropdown-group selection-mode=none>${n.map(d=>d.proxiedRender(e,"dropdown-item"))}</calcite-dropdown-group></calcite-dropdown>`;return p`${l.map(d=>d.proxiedRender(e,"collapsed-action"))}${n.length?k:void 0}${n.length&&s?p`<calcite-tooltip class=${C(m)} close-on-click overlay-positioning=fixed .placement=${f} .referenceElement=${a}><span>${i}</span></calcite-tooltip>`:void 0}`}connectedCallback(){super.connectedCallback(),this._childrenObserver.observe(this.el,{childList:!0}),this._syncChildren()}disconnectedCallback(){this._childrenObserver.disconnect(),super.disconnectedCallback()}_syncChildren(){this._componentWaitAbortController?.abort();let e=Array.from(this.el.querySelectorAll("arcgis-toolbar-item")),t=new AbortController;this._componentWaitAbortController=t,Promise.all(e.map(o=>o.componentOnReady())).then(()=>{!this.isConnected||t.signal.aborted||(this._children=e)})}_resolveActionsFromBudget(e,t,o){let l=e.find(a=>a.active)??e?.toSorted(R)?.at(0),n=v(t),r=Math.floor(o/n);if(A((r+1)*n,o)&&r++,r>=e.length)return{visible:[...e],hidden:[]};let i=r-1,c=e.slice(0,i),s=e.slice(i);if(l&&s.includes(l)){let[a]=s.splice(s.indexOf(l),1),m=c.pop();c.push(a),m&&s.unshift(m)}return{visible:c,hidden:s}}};_("arcgis-toolbar-more-button",$);export{$ as ArcgisToolbarMoreButton};
2
+ import{a as R}from"./5IM4X2GT.js";import{a as w}from"./YL7W53II.js";import{a as h,c as v,e as A}from"./OBMF3G26.js";import{a as y,b as x}from"./PL2HCI3R.js";import"./VTAQRKNF.js";import"./H4Q2JVNO.js";import{K as u,L as g,M as C,O as b,R as _,j as p}from"./JEPW4X7U.js";var $=class extends g{constructor(){super(...arguments),this._elementReferenceController=new w(this),this._childrenObserver=new MutationObserver(()=>{this._syncChildren()}),this.priority=h.Medium,this.menuAppearance="action-menu",this.overflowActionLabel="More actions"}static{this.properties={_children:16,priority:9,menuAppearance:1,overflowActionLabel:1}}measure(e){let t=this._children?.length??0;if(!t)return[0];let o=v(e),l=t*o;if(!(this.priority<h.NeverCollapse&&t>2))return[l];let n=Math.min(t,2)*o,r=[n];if(t<=2||this.priority<=h.ForceCollapse)return r;for(let i=1;i<t-1;i++)r.push(n+o*i);return x(r)}proxiedRender(e,t){let o=this._children;if(!o)return;let{visible:l,hidden:n}=this._resolveActionsFromBudget(o,e,t),r="hamburger",i=this.overflowActionLabel,c=e.tooltipAppearance,s=c!=="native",a=this._elementReferenceController.element,m=c==="calcite-dark"?"calcite-mode-dark":void 0,f=y(e),k=this.menuAppearance==="action-menu"?p`<calcite-action-menu .label=${i} overlay-positioning=fixed .placement=${f}><calcite-action .icon=${r} .scale=${e.scale} slot=trigger .text=${i} title=${(c==="native"?i:"")??b} ${u(this._elementReferenceController.ref)}></calcite-action>${n.map(d=>d.proxiedRender(e,"expanded-action"))}</calcite-action-menu>`:p`<calcite-action .icon=${r} .scale=${e.scale} .text=${i} title=${(c==="native"?i:"")??b} ${u(this._elementReferenceController.ref)}></calcite-action><calcite-dropdown overlay-positioning=fixed .placement=${f} .referenceElement=${a}><calcite-dropdown-group selection-mode=none>${n.map(d=>d.proxiedRender(e,"dropdown-item"))}</calcite-dropdown-group></calcite-dropdown>`;return p`${l.map(d=>d.proxiedRender(e,"collapsed-action"))}${n.length?k:void 0}${n.length&&s?p`<calcite-tooltip class=${C(m)} close-on-click overlay-positioning=fixed .placement=${f} .referenceElement=${a}><span>${i}</span></calcite-tooltip>`:void 0}`}connectedCallback(){super.connectedCallback(),this._childrenObserver.observe(this.el,{childList:!0}),this._syncChildren()}disconnectedCallback(){this._childrenObserver.disconnect(),super.disconnectedCallback()}_syncChildren(){this._componentWaitAbortController?.abort();let e=Array.from(this.el.querySelectorAll("arcgis-toolbar-item")),t=new AbortController;this._componentWaitAbortController=t,Promise.all(e.map(o=>o.componentOnReady())).then(()=>{!this.isConnected||t.signal.aborted||(this._children=e)})}_resolveActionsFromBudget(e,t,o){let l=e.find(a=>a.active)??e?.toSorted(R)?.at(0),n=v(t),r=Math.floor(o/n);if(A((r+1)*n,o)&&r++,r>=e.length)return{visible:[...e],hidden:[]};let i=r-1,c=e.slice(0,i),s=e.slice(i);if(l&&s.includes(l)){let[a]=s.splice(s.indexOf(l),1),m=c.pop();c.push(a),m&&s.unshift(m)}return{visible:c,hidden:s}}};_("arcgis-toolbar-more-button",$);export{$ as ArcgisToolbarMoreButton};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as N}from"./Y5Y7IXOV.js";import{a as K,b as Q}from"./B4MSRQLW.js";import{a as X}from"./2GBIDGIK.js";import"./GZXN456V.js";import"./H4Q2JVNO.js";import{a as _}from"./KK62TWI2.js";import{A as V,B as z,C as S,D as $,E as U,F as j,G as I,J as w,K as u,L as q,M as E,N as k,O as v,P,R as J,h as H,j as a,l as R,o as b,p as G,t as F,z as W}from"./3X2MVQTG.js";var Y=(l,e,t)=>{let s=new Map;for(let i=e;i<=t;i++)s.set(l[i],i);return s},D=V(class extends z{constructor(l){if(super(l),l.type!==W.CHILD)throw Error("repeat() can only be used in text expressions")}dt(l,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);let i=[],o=[],n=0;for(let r of l)i[n]=s?s(r,n):n,o[n]=t(r,n),n++;return{values:o,keys:i}}render(l,e,t){return this.dt(l,e,t).values}update(l,[e,t,s]){let i=j(l),{values:o,keys:n}=this.dt(e,t,s);if(!Array.isArray(i))return this.ut=n,o;let r=this.ut??=[],f=[],x,A,d=0,p=i.length-1,c=0,m=o.length-1;for(;d<=p&&c<=m;)if(i[d]===null)d++;else if(i[p]===null)p--;else if(r[d]===n[c])f[c]=$(i[d],o[c]),d++,c++;else if(r[p]===n[m])f[m]=$(i[p],o[m]),p--,m--;else if(r[d]===n[m])f[m]=$(i[d],o[m]),S(l,f[m+1],i[d]),d++,m--;else if(r[p]===n[c])f[c]=$(i[p],o[c]),S(l,i[d],i[p]),p--,c++;else if(x===void 0&&(x=Y(n,c,m),A=Y(r,d,p)),x.has(r[d]))if(x.has(r[p])){let g=A.get(n[c]),T=g!==void 0?i[g]:null;if(T===null){let M=S(l,i[d]);$(M,o[c]),f[c]=M}else f[c]=$(T,o[c]),S(l,i[d],T),i[g]=null;c++}else I(i[p]),p--;else I(i[d]),d++;for(;c<=m;){let g=S(l,f[m+1]);$(g,o[c]),f[c++]=g}for(;d<=p;){let g=i[d++];g!==null&&I(g)}return this.ut=n,U(l,f),R}});var h=new Map;h.set("oid","key");h.set("guid","key");h.set("global-id","key");h.set("blob","binary");h.set("integer","integer");h.set("small-integer","integer");h.set("big-integer","integer");h.set("single","number");h.set("double","number");h.set("long","number");h.set("number","number");h.set("date","date-time");h.set("date-only","calendar");h.set("time-only","clock");h.set("timestamp-offset","time-zone");h.set("string","string");var Z=({fieldType:l})=>a`<calcite-icon scale=s .icon=${h.get(l)}></calcite-icon>`;function ee(l){return!!l.length&&"fields"in l[0]}function y(l){return!!l.length&&"subFieldInfos"in l[0]}function te(l){return l.filter(e=>y(e.fields))}function ie(l){return l.flatMap(e=>e.fields)}function se(l){return l.flatMap(e=>y(e.fields)?[]:e.fields)}function C(l){return l.flatMap(e=>y(e.fields)?e.fields.flatMap(t=>t.subFieldInfos):e.fields)}function le(l,e){return l.flatMap(t=>y(t.fields)?t.fields.flatMap(s=>s.subFieldInfos.filter(i=>L(i,e,!0))):t.fields.filter(s=>B(s,e)))}function B(l,e){return e?"subFieldInfos"in l?L(l,e)||l.subFieldInfos.some(t=>L(t,e,!0)):L(l,e):!0}function L(l,e,t=!1){return[t?l.name.split("/").pop():l.name,l.alias,l.description].some(s=>s?.toLocaleLowerCase().includes(e.toLocaleLowerCase()))}var oe=H`.panel{min-height:250px}.list-wrapper{max-height:50vh;overflow:auto}.list-controls{display:grid;grid-template-columns:1fr auto}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,O=class extends q{constructor(){super(...arguments),this._messages=X({blocking:!0}),this.popoverNode=w(),this.listWrapper=w(),this.listNode=w(),this.flowElement=w(),this.panelElement=w(),this.dropdownNode=w(),this.fieldInfoFlowItemEl=w(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this.initialized=!1,this._propWatcherTask=new K(this,{task:async([e])=>{if(!this.listOnly&&!Q(e?.refElement))throw b("error",this,G("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=F(),this.arcgisClose=F(),this.arcgisDeleteField=F(),this.arcgisEditField=F(),this.arcgisFieldPickListChange=F(),this.arcgisFieldPickListDismissed=F(),this.arcgisFieldPickListSortByChange=F(),this.arcgisSortByChange=F()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=oe}async reposition(){await this.popoverNode.value?.reposition()}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,b("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists(),this.initialized=!0}willUpdate(e){this.initialized&&(e.has("fields")||e.has("sortBy")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&(e.has("sortBy")&&(this.lastSortBy=this.sortBy??this.lastSortBy),this.updateGroupedLists())}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listWrapper.value?.getBoundingClientRect();t&&(this.listWrapper.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],s=t.filter(i=>i.type==="none");return t=t.filter(i=>i.type!=="none"),this.lastSortBy==="display"?t.sort((i,o)=>i.alias.localeCompare(o.alias)):this.lastSortBy==="field"?t.sort((i,o)=>i.name.localeCompare(o.name)):this.lastSortBy==="type"&&t.sort((i,o)=>i.type.localeCompare(o.type)),t=t.concat(s),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(N.expression)}canDeselectAll(){let e=C(this.allLists);return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(N.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],ee(this.fields))for(let e of this.fields){if(this.listOnly&&y(e.fields)){b("error",this,"subFieldInfos are not supported if listOnly is true.");continue}this.allLists.push({title:e.title,fields:this.getSortedGroupFields(e.fields)})}else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:this.getSortedList(this.fields)}]}getSortedGroupFields(e){return y(e)?this.getSortedList(e).map(t=>({...t,subFieldInfos:this.getSortedList(t.subFieldInfos).map(s=>({...s,name:`${t.name}/${s.name}`}))})):this.getSortedList(e)}addFieldInfoFlowItem(e,t){let s=this.flowElement.value,i=P(a`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${k(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${o=>{o.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${u(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??v} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);s.appendChild(i),this.panelElement.value.selected=!1,setTimeout(()=>{this.fieldInfoFlowItemEl?.value.setFocus()},1)}addSubFieldInfoFlowItem(e,t){let s=this.flowElement.value,i=e.subFieldInfos.filter(n=>L(n,this.filterText,!0)),o=P(a`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.description??void 0} class="panel" style=${k(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${n=>{n.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${u(this.fieldInfoFlowItemEl)}><calcite-list .label=${e.alias??e.name} .selectionMode=${this.multiple?"multiple":"single"} @calciteListChange=${n=>{this.updateSelectedFieldsForList(n.currentTarget,e.subFieldInfos),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}}>${i.map(n=>this.renderCalciteListItem(n,!1))}</calcite-list>${this.filterText&&!i.length&&this.filterNoResultsText?.length!==0?a`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}</calcite-flow-item>`);s.appendChild(o),this.panelElement.value.selected=!1,setTimeout(()=>{this.fieldInfoFlowItemEl.value?.setFocus()},1)}shouldRenderSelectionButton(e){return this.multiple&&this.showSelectionAll&&(!e||!this.filterText||!!this.filterFields?.length)}handleListSelectionChange(e){this.updateSelectedFieldsForList(this.listNode.value,e),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}updateSelectedFieldsForList(e,t){let s=new Set(t.map(r=>r.name)),i=e.selectedItems.map(r=>r.value),o=this.selectedFields.filter(r=>!s.has(r)||i.includes(r)),n=i.filter(r=>!this.selectedFields.includes(r));this.selectedFields=this.multiple?[...new Set([...o,...n])]:i,this.reorderSelectedFieldsByCurrentListOrder()}setSortBy(e){this.lastSortBy=e,this.updateGroupedLists(),this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy),this.reorderSelectedFieldsByCurrentListOrder()&&(this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}))}reorderSelectedFieldsByCurrentListOrder(){if(!this.selectedFields.length)return!1;let e=C(this.allLists).map(o=>o.name),t=new Set(this.selectedFields),s=e.filter(o=>t.has(o)),i=s.length!==this.selectedFields.length||s.some((o,n)=>o!==this.selectedFields[n]);return i&&(this.selectedFields=[...s]),i}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),_(`${t.autoClose}`,a`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${u(this.popoverNode)}><calcite-flow style=${k({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${u(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${u(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple||!this.hideCancel)&&a`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?a`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:a`${this.renderAddButton()}${this.renderCancelButton()}`}</div>`||""}</calcite-flow-item></calcite-flow></calcite-popover>`)},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=se(this.allLists),s=te(this.allLists),i=C(this.allLists).length>=this.showFilterLength;return t.length||s.length?s.length?this.renderSplitLists(t,s,i):this.renderTopLevelOnlyFieldList(e,t,i):a`<slot name=no-fields></slot>`}renderSplitLists(e,t,s){let i=C(this.allLists),o=ie(this.allLists).some(n=>B(n,this.filterText));return a`${s?a`<div class="list-controls"><calcite-filter .items=${i} .filterProps=${["name","alias","description"]} .placeholder=${this.filterPlaceholderText??this._messages.filter} @calciteFilterChange=${n=>{this.filterText=n.currentTarget.value,this.filterFields=this.filterText?le(this.allLists,this.filterText).map(r=>r.name):void 0}}></calcite-filter>${this.renderSortButton()}</div>`:null}<div class=${E(this.listOnly?"":"list-wrapper")} ${u(this.listWrapper)}>${this.shouldRenderSelectionButton(s)?this.renderSelectionButton():null}${this.renderSplitSubFieldLists(t)}${e.length?this.renderSplitTopLevelFieldList(e,!0):null}</div>${this.filterText&&!o&&this.filterNoResultsText?.length!==0?a`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSplitSubFieldLists(e){let t=e.map(s=>({...s,fields:s.fields.filter(i=>B(i,this.filterText))})).filter(s=>!!s.fields.length);return D(t,s=>s.title,s=>a`<calcite-list selection-mode=none .label=${s.title??this.heading??""}><calcite-list-item-group .heading=${s.title}>${D(s.fields,i=>i.name,i=>a`<calcite-list-item .label=${i.alias||i.name} .description=${this.multiple?this._messages.subFieldsSelected.replace("${count}",`${i.subFieldInfos.filter(o=>this.selectedFields.includes(o.name)).length}`):void 0} .value=${i.name} @click=${o=>this.addSubFieldInfoFlowItem(i,o.currentTarget)} @keydown=${o=>{o.key==="Enter"&&this.addSubFieldInfoFlowItem(i,o.currentTarget)}}><calcite-icon slot=actions-end icon=chevron-right flip-rtl scale=s></calcite-icon></calcite-list-item>`)}</calcite-list-item-group></calcite-list>`)}renderSplitTopLevelFieldList(e,t){return a`<calcite-list .label=${this.heading||(this.multiple?this._messages.headerSelect:this._messages.header)} .selectionMode=${this.multiple?"multiple":"single"} @calciteListChange=${()=>this.handleListSelectionChange(e)} ${u(this.listNode)}><slot name=content-center></slot>${this.renderGroupedListItems(t)}</calcite-list>`}renderTopLevelOnlyFieldList(e,t,s){return a`<div class=${E(this.listOnly?"":"list-wrapper")} ${u(this.listWrapper)}><calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>this.handleListSelectionChange(t)} @calciteListFilter=${i=>{i.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(o=>o.value),this.filterText=this.listNode.value.filterText}} ${u(this.listNode)}>${this.renderSortButton("filter-actions-end")}${this.shouldRenderSelectionButton(s)?this.renderSelectionButton():null}<slot name=content-center></slot>${this.renderGroupedListItems(!1)}</calcite-list></div>`}renderSortButton(e){let t=C(this.allLists);if(!(t.length>=this.showFilterLength&&!this.hideSort))return"";let s=t.every(i=>!!i.type);return a`<calcite-dropdown slot=${e??v} placement=bottom-end overlay-positioning=fixed @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${u(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??v}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @calciteDropdownItemSelect=${()=>this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @calciteDropdownItemSelect=${()=>this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${s&&a`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @calciteDropdownItemSelect=${()=>this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @calciteDropdownItemSelect=${()=>this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return a`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=C(this.allLists);this.selectedFields=e.map(t=>t.name)}this.reorderSelectedFieldsByCurrentListOrder(),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderGroupedListItems(e){let t=this.allLists.filter(s=>!!s.fields.length&&!y(s.fields)).map(s=>({...s,fields:e?s.fields.filter(i=>B(i,this.filterText)):s.fields})).filter(s=>!!s.fields.length);return t.length===1&&!t[0].title?this.renderListItems(t[0].fields):t.map(s=>a`<calcite-list-item-group .heading=${s.title}>${this.renderListItems(s.fields)}</calcite-list-item-group>`)}renderListItems(e){return e.map(t=>this.renderCalciteListItem(t))}renderCalciteListItem(e,t=!0){let s=t&&this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return _(e.name,a`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&a`<div slot=actions-end class="field-icons">${Z({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,s)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:s}=this;return t?a`<calcite-action slot=actions-end .text=${s.info} title=${s.info??v} scale=s icon=information @click=${i=>{i.stopPropagation();let o=i.currentTarget;this.addFieldInfoFlowItem(e,o)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?a`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??v} scale=s icon=pencil @click=${s=>{s.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?a`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??v} scale=s icon=trash @click=${s=>{s.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){return this.multiple?a`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`:""}renderCancelButton(){return this.hideCancel?"":a`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};J("arcgis-field-pick-list",O);export{O as ArcgisFieldPickList};
2
+ import{a as N}from"./Y5Y7IXOV.js";import{a as K,b as Q}from"./5VRXYQB3.js";import{a as X}from"./24JPS4UK.js";import"./VTAQRKNF.js";import"./H4Q2JVNO.js";import{a as _}from"./ZA4TGNE2.js";import{A as V,B as z,C as S,D as $,E as U,F as j,G as I,J as w,K as u,L as q,M as E,N as k,O as v,P,R as J,h as H,j as a,l as R,o as b,p as G,t as F,z as W}from"./JEPW4X7U.js";var Y=(l,e,t)=>{let s=new Map;for(let i=e;i<=t;i++)s.set(l[i],i);return s},D=V(class extends z{constructor(l){if(super(l),l.type!==W.CHILD)throw Error("repeat() can only be used in text expressions")}dt(l,e,t){let s;t===void 0?t=e:e!==void 0&&(s=e);let i=[],o=[],n=0;for(let r of l)i[n]=s?s(r,n):n,o[n]=t(r,n),n++;return{values:o,keys:i}}render(l,e,t){return this.dt(l,e,t).values}update(l,[e,t,s]){let i=j(l),{values:o,keys:n}=this.dt(e,t,s);if(!Array.isArray(i))return this.ut=n,o;let r=this.ut??=[],f=[],x,A,d=0,p=i.length-1,c=0,m=o.length-1;for(;d<=p&&c<=m;)if(i[d]===null)d++;else if(i[p]===null)p--;else if(r[d]===n[c])f[c]=$(i[d],o[c]),d++,c++;else if(r[p]===n[m])f[m]=$(i[p],o[m]),p--,m--;else if(r[d]===n[m])f[m]=$(i[d],o[m]),S(l,f[m+1],i[d]),d++,m--;else if(r[p]===n[c])f[c]=$(i[p],o[c]),S(l,i[d],i[p]),p--,c++;else if(x===void 0&&(x=Y(n,c,m),A=Y(r,d,p)),x.has(r[d]))if(x.has(r[p])){let g=A.get(n[c]),T=g!==void 0?i[g]:null;if(T===null){let M=S(l,i[d]);$(M,o[c]),f[c]=M}else f[c]=$(T,o[c]),S(l,i[d],T),i[g]=null;c++}else I(i[p]),p--;else I(i[d]),d++;for(;c<=m;){let g=S(l,f[m+1]);$(g,o[c]),f[c++]=g}for(;d<=p;){let g=i[d++];g!==null&&I(g)}return this.ut=n,U(l,f),R}});var h=new Map;h.set("oid","key");h.set("guid","key");h.set("global-id","key");h.set("blob","binary");h.set("integer","integer");h.set("small-integer","integer");h.set("big-integer","integer");h.set("single","number");h.set("double","number");h.set("long","number");h.set("number","number");h.set("date","date-time");h.set("date-only","calendar");h.set("time-only","clock");h.set("timestamp-offset","time-zone");h.set("string","string");var Z=({fieldType:l})=>a`<calcite-icon scale=s .icon=${h.get(l)}></calcite-icon>`;function ee(l){return!!l.length&&"fields"in l[0]}function y(l){return!!l.length&&"subFieldInfos"in l[0]}function te(l){return l.filter(e=>y(e.fields))}function ie(l){return l.flatMap(e=>e.fields)}function se(l){return l.flatMap(e=>y(e.fields)?[]:e.fields)}function C(l){return l.flatMap(e=>y(e.fields)?e.fields.flatMap(t=>t.subFieldInfos):e.fields)}function le(l,e){return l.flatMap(t=>y(t.fields)?t.fields.flatMap(s=>s.subFieldInfos.filter(i=>L(i,e,!0))):t.fields.filter(s=>B(s,e)))}function B(l,e){return e?"subFieldInfos"in l?L(l,e)||l.subFieldInfos.some(t=>L(t,e,!0)):L(l,e):!0}function L(l,e,t=!1){return[t?l.name.split("/").pop():l.name,l.alias,l.description].some(s=>s?.toLocaleLowerCase().includes(e.toLocaleLowerCase()))}var oe=H`.panel{min-height:250px}.list-wrapper{max-height:50vh;overflow:auto}.list-controls{display:grid;grid-template-columns:1fr auto}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,O=class extends q{constructor(){super(...arguments),this._messages=X({blocking:!0}),this.popoverNode=w(),this.listWrapper=w(),this.listNode=w(),this.flowElement=w(),this.panelElement=w(),this.dropdownNode=w(),this.fieldInfoFlowItemEl=w(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this.initialized=!1,this._propWatcherTask=new K(this,{task:async([e])=>{if(!this.listOnly&&!Q(e?.refElement))throw b("error",this,G("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=F(),this.arcgisClose=F(),this.arcgisDeleteField=F(),this.arcgisEditField=F(),this.arcgisFieldPickListChange=F(),this.arcgisFieldPickListDismissed=F(),this.arcgisFieldPickListSortByChange=F(),this.arcgisSortByChange=F()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=oe}async reposition(){await this.popoverNode.value?.reposition()}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,b("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists(),this.initialized=!0}willUpdate(e){this.initialized&&(e.has("fields")||e.has("sortBy")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&(e.has("sortBy")&&(this.lastSortBy=this.sortBy??this.lastSortBy),this.updateGroupedLists())}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listWrapper.value?.getBoundingClientRect();t&&(this.listWrapper.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],s=t.filter(i=>i.type==="none");return t=t.filter(i=>i.type!=="none"),this.lastSortBy==="display"?t.sort((i,o)=>i.alias.localeCompare(o.alias)):this.lastSortBy==="field"?t.sort((i,o)=>i.name.localeCompare(o.name)):this.lastSortBy==="type"&&t.sort((i,o)=>i.type.localeCompare(o.type)),t=t.concat(s),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(N.expression)}canDeselectAll(){let e=C(this.allLists);return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(N.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],ee(this.fields))for(let e of this.fields){if(this.listOnly&&y(e.fields)){b("error",this,"subFieldInfos are not supported if listOnly is true.");continue}this.allLists.push({title:e.title,fields:this.getSortedGroupFields(e.fields)})}else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:this.getSortedList(this.fields)}]}getSortedGroupFields(e){return y(e)?this.getSortedList(e).map(t=>({...t,subFieldInfos:this.getSortedList(t.subFieldInfos).map(s=>({...s,name:`${t.name}/${s.name}`}))})):this.getSortedList(e)}addFieldInfoFlowItem(e,t){let s=this.flowElement.value,i=P(a`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${k(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${o=>{o.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${u(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??v} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);s.appendChild(i),this.panelElement.value.selected=!1,setTimeout(()=>{this.fieldInfoFlowItemEl?.value.setFocus()},1)}addSubFieldInfoFlowItem(e,t){let s=this.flowElement.value,i=e.subFieldInfos.filter(n=>L(n,this.filterText,!0)),o=P(a`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.description??void 0} class="panel" style=${k(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${n=>{n.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${u(this.fieldInfoFlowItemEl)}><calcite-list .label=${e.alias??e.name} .selectionMode=${this.multiple?"multiple":"single"} @calciteListChange=${n=>{this.updateSelectedFieldsForList(n.currentTarget,e.subFieldInfos),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}}>${i.map(n=>this.renderCalciteListItem(n,!1))}</calcite-list>${this.filterText&&!i.length&&this.filterNoResultsText?.length!==0?a`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}</calcite-flow-item>`);s.appendChild(o),this.panelElement.value.selected=!1,setTimeout(()=>{this.fieldInfoFlowItemEl.value?.setFocus()},1)}shouldRenderSelectionButton(e){return this.multiple&&this.showSelectionAll&&(!e||!this.filterText||!!this.filterFields?.length)}handleListSelectionChange(e){this.updateSelectedFieldsForList(this.listNode.value,e),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}updateSelectedFieldsForList(e,t){let s=new Set(t.map(r=>r.name)),i=e.selectedItems.map(r=>r.value),o=this.selectedFields.filter(r=>!s.has(r)||i.includes(r)),n=i.filter(r=>!this.selectedFields.includes(r));this.selectedFields=this.multiple?[...new Set([...o,...n])]:i,this.reorderSelectedFieldsByCurrentListOrder()}setSortBy(e){this.lastSortBy=e,this.updateGroupedLists(),this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy),this.reorderSelectedFieldsByCurrentListOrder()&&(this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}))}reorderSelectedFieldsByCurrentListOrder(){if(!this.selectedFields.length)return!1;let e=C(this.allLists).map(o=>o.name),t=new Set(this.selectedFields),s=e.filter(o=>t.has(o)),i=s.length!==this.selectedFields.length||s.some((o,n)=>o!==this.selectedFields[n]);return i&&(this.selectedFields=[...s]),i}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),_(`${t.autoClose}`,a`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${u(this.popoverNode)}><calcite-flow style=${k({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${u(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${u(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot>${(this.multiple||!this.hideCancel)&&a`<div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?a`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:a`${this.renderAddButton()}${this.renderCancelButton()}`}</div>`||""}</calcite-flow-item></calcite-flow></calcite-popover>`)},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=se(this.allLists),s=te(this.allLists),i=C(this.allLists).length>=this.showFilterLength;return t.length||s.length?s.length?this.renderSplitLists(t,s,i):this.renderTopLevelOnlyFieldList(e,t,i):a`<slot name=no-fields></slot>`}renderSplitLists(e,t,s){let i=C(this.allLists),o=ie(this.allLists).some(n=>B(n,this.filterText));return a`${s?a`<div class="list-controls"><calcite-filter .items=${i} .filterProps=${["name","alias","description"]} .placeholder=${this.filterPlaceholderText??this._messages.filter} @calciteFilterChange=${n=>{this.filterText=n.currentTarget.value,this.filterFields=this.filterText?le(this.allLists,this.filterText).map(r=>r.name):void 0}}></calcite-filter>${this.renderSortButton()}</div>`:null}<div class=${E(this.listOnly?"":"list-wrapper")} ${u(this.listWrapper)}>${this.shouldRenderSelectionButton(s)?this.renderSelectionButton():null}${this.renderSplitSubFieldLists(t)}${e.length?this.renderSplitTopLevelFieldList(e,!0):null}</div>${this.filterText&&!o&&this.filterNoResultsText?.length!==0?a`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSplitSubFieldLists(e){let t=e.map(s=>({...s,fields:s.fields.filter(i=>B(i,this.filterText))})).filter(s=>!!s.fields.length);return D(t,s=>s.title,s=>a`<calcite-list selection-mode=none .label=${s.title??this.heading??""}><calcite-list-item-group .heading=${s.title}>${D(s.fields,i=>i.name,i=>a`<calcite-list-item .label=${i.alias||i.name} .description=${this.multiple?this._messages.subFieldsSelected.replace("${count}",`${i.subFieldInfos.filter(o=>this.selectedFields.includes(o.name)).length}`):void 0} .value=${i.name} @click=${o=>this.addSubFieldInfoFlowItem(i,o.currentTarget)} @keydown=${o=>{o.key==="Enter"&&this.addSubFieldInfoFlowItem(i,o.currentTarget)}}><calcite-icon slot=actions-end icon=chevron-right flip-rtl scale=s></calcite-icon></calcite-list-item>`)}</calcite-list-item-group></calcite-list>`)}renderSplitTopLevelFieldList(e,t){return a`<calcite-list .label=${this.heading||(this.multiple?this._messages.headerSelect:this._messages.header)} .selectionMode=${this.multiple?"multiple":"single"} @calciteListChange=${()=>this.handleListSelectionChange(e)} ${u(this.listNode)}><slot name=content-center></slot>${this.renderGroupedListItems(t)}</calcite-list>`}renderTopLevelOnlyFieldList(e,t,s){return a`<div class=${E(this.listOnly?"":"list-wrapper")} ${u(this.listWrapper)}><calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>this.handleListSelectionChange(t)} @calciteListFilter=${i=>{i.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(o=>o.value),this.filterText=this.listNode.value.filterText}} ${u(this.listNode)}>${this.renderSortButton("filter-actions-end")}${this.shouldRenderSelectionButton(s)?this.renderSelectionButton():null}<slot name=content-center></slot>${this.renderGroupedListItems(!1)}</calcite-list></div>`}renderSortButton(e){let t=C(this.allLists);if(!(t.length>=this.showFilterLength&&!this.hideSort))return"";let s=t.every(i=>!!i.type);return a`<calcite-dropdown slot=${e??v} placement=bottom-end overlay-positioning=fixed @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${u(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??v}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @calciteDropdownItemSelect=${()=>this.setSortBy("default")}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @calciteDropdownItemSelect=${()=>this.setSortBy("display")}>${this._messages.displayName}</calcite-dropdown-item>${s&&a`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @calciteDropdownItemSelect=${()=>this.setSortBy("type")}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @calciteDropdownItemSelect=${()=>this.setSortBy("field")}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return a`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=C(this.allLists);this.selectedFields=e.map(t=>t.name)}this.reorderSelectedFieldsByCurrentListOrder(),this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderGroupedListItems(e){let t=this.allLists.filter(s=>!!s.fields.length&&!y(s.fields)).map(s=>({...s,fields:e?s.fields.filter(i=>B(i,this.filterText)):s.fields})).filter(s=>!!s.fields.length);return t.length===1&&!t[0].title?this.renderListItems(t[0].fields):t.map(s=>a`<calcite-list-item-group .heading=${s.title}>${this.renderListItems(s.fields)}</calcite-list-item-group>`)}renderListItems(e){return e.map(t=>this.renderCalciteListItem(t))}renderCalciteListItem(e,t=!0){let s=t&&this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return _(e.name,a`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&a`<div slot=actions-end class="field-icons">${Z({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,s)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:s}=this;return t?a`<calcite-action slot=actions-end .text=${s.info} title=${s.info??v} scale=s icon=information @click=${i=>{i.stopPropagation();let o=i.currentTarget;this.addFieldInfoFlowItem(e,o)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?a`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??v} scale=s icon=pencil @click=${s=>{s.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?a`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??v} scale=s icon=trash @click=${s=>{s.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){return this.multiple?a`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`:""}renderCancelButton(){return this.hideCancel?"":a`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};J("arcgis-field-pick-list",O);export{O as ArcgisFieldPickList};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as E}from"./XEK22IDA.js";import{a as k}from"./2GBIDGIK.js";import"./GZXN456V.js";import{f}from"./H4Q2JVNO.js";import{a as n}from"./KK62TWI2.js";import{J as g,K as l,L as w,R as v,h as C,j as i,k as u,n as m,t as r}from"./3X2MVQTG.js";function y(a,e,t){window.localStorage.setItem(a,JSON.stringify(e))}function S(a,e){let t=window.localStorage.getItem(a);return t&&e?JSON.parse(t):t}var R=C`:host,arcgis-picker-input{display:block}.color-picker-container{display:flex;flex-direction:column}.color-picker{--calcite-color-border-1: transparent;overflow-x:hidden}.preview-swatch{width:100%;height:24px}.recent-colors-container{align-items:center;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-input);display:flex;gap:var(--calcite-space-sm);height:32px;padding:0 var(--calcite-space-xs);transition:outline-offset .1s ease-in-out,outline-color .1s ease-in-out}.preview-recent-swatch{cursor:pointer}.recent-colors-container:focus,.preview-recent-swatch:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-brand);outline-offset:var(--calcite-border-width-md)}.empty-swatch{cursor:default}.end-action{display:flex}`,h=class extends w{constructor(){super(),this._messages=k(),this.actionEl=g(),this.open=!1,this.setRecentColorElement=e=>t=>{switch(e){case 1:this.recentColor1El=t;break;case 2:this.recentColor2El=t;break;default:this.recentColor3El=t}},this.recentColors=[],this.clearable=!1,this.compact=!1,this.disabled=!1,this.placement="auto",this.storageId="arcgis-color-input-storage-colors",this.hideRecentColors=!1,this.showTransparency=!1,this.arcgisChange=r(),this.arcgisColorInputChange=r(),this.arcgisColorInputPopoverClose=r(),this.arcgisColorInputPopoverOpen=r(),this.arcgisColorInputSwatchUpdate=r(),this.arcgisInternalStoredColor=r(),this.arcgisPickerClose=r(),this.arcgisPickerOpen=r(),this.arcgisSwatchUpdate=r(),this.listenOn(document,"arcgisInternalStoredColor",this.handleUpdateRecentColors),this.listenOn(document,"arcgisRecentColorsUpdate",this.handleStoreNewRecentColor)}static{this.properties={recentColors:16,clearable:5,color:1,compact:5,disabled:5,messageOverrides:0,placement:1,popoverProps:0,storageId:1,hideRecentColors:5,showTransparency:5}}static{this.styles=R}async close(){await this.inlineInputEl?.close({focus:!1})}async setFocus(){await this.inlineInputEl?.setFocus()}isOpen(){return this.open}load(){this.setRecentColorsFromStorage()}disconnectedCallback(){super.disconnectedCallback(),this.removeTooltip()}async handleOpen(){await this.colorPickerEl?.setFocus(),this.open=!0,this.arcgisPickerOpen.emit(),this.arcgisColorInputPopoverOpen.emit()}setInlineInputRef(e){this.inlineInputEl=e}setColorPickerRef(e){e&&(this.colorPickerEl=e)}getRecentColorElement(e){switch(e){case 1:return this.recentColor1El;case 2:return this.recentColor2El;default:return this.recentColor3El}}setRecentColorsFromStorage(){let e=S(this.storageId,!0);e&&(this.recentColors=[...e])}handleSwatchClickOrKeyUp(e){if("key"in e&&e.key!=="Enter"&&e.key!=="Space")return;let t=e.currentTarget.color||void 0;this.updateColor(t),this.arcgisSwatchUpdate.emit(t),this.arcgisColorInputSwatchUpdate.emit(t),setTimeout(()=>this.recentColor1El?.focus(),200)}handleRecentColorsKeyDown(e){if(this.recentColors.length===1)return;let t=e.key,o;this.activeColorSwatchEl===this.recentColor1El?o=1:this.activeColorSwatchEl===this.recentColor2El?o=2:this.activeColorSwatchEl===this.recentColor3El&&(o=3),t==="ArrowLeft"&&(!o||o===1?this.getRecentColorElement(this.recentColors.length)?.focus():this.getRecentColorElement(o-1)?.focus()),t==="ArrowRight"&&(!o||o===this.recentColors.length?this.recentColor1El?.focus():this.getRecentColorElement(o+1)?.focus())}handleUpdateActiveSwatch(e){this.activeColorSwatchEl=e.currentTarget}handleStoreNewRecentColor(e){this.storeRecentColorToStorage(e.detail)}handleUpdateRecentColors(e){e.composedPath().includes(this.el)||this.setRecentColorsFromStorage()}handleClearColor(){this.updateColor(void 0)}updateColor(e,t=!0){e!==this.color&&(this.color=e,this.arcgisChange.emit(),this.arcgisColorInputChange.emit(),t&&this.storeRecentColorToStorage(e))}storeRecentColorToStorage(e){if(!e)return;e.length>7&&(e=e.slice(0,7));let t=[e,...this.recentColors.filter(o=>o!==e)].slice(0,3);y(this.storageId,t),this.recentColors=t,this.arcgisInternalStoredColor.emit()}handleClose(e){e.stopPropagation(),this.storeRecentColorToStorage(this.colorPickerEl?.value),this.open=!1,this.arcgisPickerClose.emit(this.colorPickerEl?.value),this.arcgisColorInputPopoverClose.emit(this.colorPickerEl?.value)}addTooltip(e){this.removeTooltip(),this.tooltipContainerEl=document.createElement("div"),m(i`<calcite-tooltip .placement=${e.placement??"auto"} .referenceElement=${e.referenceElement} overlay-positioning=fixed open>${e.innerHTML}</calcite-tooltip>`,this.tooltipContainerEl),document.body.append(this.tooltipContainerEl)}removeTooltip(){this.tooltipContainerEl?.parentNode&&(this.tooltipContainerEl.remove(),this.tooltipContainerEl=void 0)}render(){let{compact:e,disabled:t,recentColors:o,_messages:s}=this,p=[o[0],o[1]],$=f(this.el)==="rtl";return e||p.push(o[2]),i`<arcgis-picker-input .disabled=${t} .intlDone=${s.commitColor} .heading=${s.selectColor} .label=${s.selectColor} @arcgisPopoverOpen=${this.handleOpen} @arcgisPopoverClose=${this.handleClose} .popoverProps=${this.popoverProps} ${l(this.setInlineInputRef)}><div class="color-picker-container" slot=content>${n(`color-picker${e?"--compact":""}`,i`<calcite-color-picker .clearable=${this.clearable} class="color-picker" @calciteColorPickerInput=${E(c=>{c.stopPropagation(),this.updateColor(this.colorPickerEl.value,!1)},500)} .scale=${e?"s":"m"} .storageId=${this.storageId} .alphaChannel=${this.showTransparency} .value=${this.color} ${l(this.setColorPickerRef)}></calcite-color-picker>`)}</div><div slot=preview><calcite-color-picker-swatch class="preview-swatch" .color=${this.color} scale=s></calcite-color-picker-swatch></div>${!this.hideRecentColors&&i`<div slot=content-end class="recent-colors-container" @keydown=${this.handleRecentColorsKeyDown} tabindex=-1>${p.map((c,d)=>c?n(c,i`<calcite-color-picker-swatch class="preview-recent-swatch" role=button scale=s tabindex=0 .active=${c===this.color} .color=${c} @click=${this.handleSwatchClickOrKeyUp} @keyup=${this.handleSwatchClickOrKeyUp} @focus=${this.handleUpdateActiveSwatch} ${l(this.setRecentColorElement(d+1))}></calcite-color-picker-swatch>`):this.renderEmptySwatch(`empty-swatch-${d}`))}</div>`||""}${this.clearable&&i`<div slot=content-end class="end-action"><calcite-action icon=circle-disallowed scale=s .label=${s.clearColor} .text=${s.clearColor??""} @click=${this.handleClearColor} @mouseover=${()=>this.addTooltip({referenceElement:this.actionEl.value,placement:$?"right-start":"left-start",innerHTML:s.noColor??""})} @mouseout=${()=>this.removeTooltip()} ${l(this.actionEl)}></calcite-action></div>`||""}</arcgis-picker-input>`}renderEmptySwatch(e){return n(e,i`<svg class="empty-swatch" viewBox="0 0 20 20" xmlns=http://www.w3.org/2000/svg width=20>${u`<rect width=20 height=20 fill=#f8f8f8 stroke=#000 stroke-dasharray=2 />`}</svg>`)}};v("arcgis-color-input",h);export{h as ArcgisColorInput};
2
+ import{a as E}from"./XEK22IDA.js";import{a as k}from"./24JPS4UK.js";import"./VTAQRKNF.js";import{f}from"./H4Q2JVNO.js";import{a as n}from"./ZA4TGNE2.js";import{J as g,K as l,L as w,R as v,h as C,j as i,k as u,n as m,t as r}from"./JEPW4X7U.js";function y(a,e,t){window.localStorage.setItem(a,JSON.stringify(e))}function S(a,e){let t=window.localStorage.getItem(a);return t&&e?JSON.parse(t):t}var R=C`:host,arcgis-picker-input{display:block}.color-picker-container{display:flex;flex-direction:column}.color-picker{--calcite-color-border-1: transparent;overflow-x:hidden}.preview-swatch{width:100%;height:24px}.recent-colors-container{align-items:center;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-input);display:flex;gap:var(--calcite-space-sm);height:32px;padding:0 var(--calcite-space-xs);transition:outline-offset .1s ease-in-out,outline-color .1s ease-in-out}.preview-recent-swatch{cursor:pointer}.recent-colors-container:focus,.preview-recent-swatch:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-brand);outline-offset:var(--calcite-border-width-md)}.empty-swatch{cursor:default}.end-action{display:flex}`,h=class extends w{constructor(){super(),this._messages=k(),this.actionEl=g(),this.open=!1,this.setRecentColorElement=e=>t=>{switch(e){case 1:this.recentColor1El=t;break;case 2:this.recentColor2El=t;break;default:this.recentColor3El=t}},this.recentColors=[],this.clearable=!1,this.compact=!1,this.disabled=!1,this.placement="auto",this.storageId="arcgis-color-input-storage-colors",this.hideRecentColors=!1,this.showTransparency=!1,this.arcgisChange=r(),this.arcgisColorInputChange=r(),this.arcgisColorInputPopoverClose=r(),this.arcgisColorInputPopoverOpen=r(),this.arcgisColorInputSwatchUpdate=r(),this.arcgisInternalStoredColor=r(),this.arcgisPickerClose=r(),this.arcgisPickerOpen=r(),this.arcgisSwatchUpdate=r(),this.listenOn(document,"arcgisInternalStoredColor",this.handleUpdateRecentColors),this.listenOn(document,"arcgisRecentColorsUpdate",this.handleStoreNewRecentColor)}static{this.properties={recentColors:16,clearable:5,color:1,compact:5,disabled:5,messageOverrides:0,placement:1,popoverProps:0,storageId:1,hideRecentColors:5,showTransparency:5}}static{this.styles=R}async close(){await this.inlineInputEl?.close({focus:!1})}async setFocus(){await this.inlineInputEl?.setFocus()}isOpen(){return this.open}load(){this.setRecentColorsFromStorage()}disconnectedCallback(){super.disconnectedCallback(),this.removeTooltip()}async handleOpen(){await this.colorPickerEl?.setFocus(),this.open=!0,this.arcgisPickerOpen.emit(),this.arcgisColorInputPopoverOpen.emit()}setInlineInputRef(e){this.inlineInputEl=e}setColorPickerRef(e){e&&(this.colorPickerEl=e)}getRecentColorElement(e){switch(e){case 1:return this.recentColor1El;case 2:return this.recentColor2El;default:return this.recentColor3El}}setRecentColorsFromStorage(){let e=S(this.storageId,!0);e&&(this.recentColors=[...e])}handleSwatchClickOrKeyUp(e){if("key"in e&&e.key!=="Enter"&&e.key!=="Space")return;let t=e.currentTarget.color||void 0;this.updateColor(t),this.arcgisSwatchUpdate.emit(t),this.arcgisColorInputSwatchUpdate.emit(t),setTimeout(()=>this.recentColor1El?.focus(),200)}handleRecentColorsKeyDown(e){if(this.recentColors.length===1)return;let t=e.key,o;this.activeColorSwatchEl===this.recentColor1El?o=1:this.activeColorSwatchEl===this.recentColor2El?o=2:this.activeColorSwatchEl===this.recentColor3El&&(o=3),t==="ArrowLeft"&&(!o||o===1?this.getRecentColorElement(this.recentColors.length)?.focus():this.getRecentColorElement(o-1)?.focus()),t==="ArrowRight"&&(!o||o===this.recentColors.length?this.recentColor1El?.focus():this.getRecentColorElement(o+1)?.focus())}handleUpdateActiveSwatch(e){this.activeColorSwatchEl=e.currentTarget}handleStoreNewRecentColor(e){this.storeRecentColorToStorage(e.detail)}handleUpdateRecentColors(e){e.composedPath().includes(this.el)||this.setRecentColorsFromStorage()}handleClearColor(){this.updateColor(void 0)}updateColor(e,t=!0){e!==this.color&&(this.color=e,this.arcgisChange.emit(),this.arcgisColorInputChange.emit(),t&&this.storeRecentColorToStorage(e))}storeRecentColorToStorage(e){if(!e)return;e.length>7&&(e=e.slice(0,7));let t=[e,...this.recentColors.filter(o=>o!==e)].slice(0,3);y(this.storageId,t),this.recentColors=t,this.arcgisInternalStoredColor.emit()}handleClose(e){e.stopPropagation(),this.storeRecentColorToStorage(this.colorPickerEl?.value),this.open=!1,this.arcgisPickerClose.emit(this.colorPickerEl?.value),this.arcgisColorInputPopoverClose.emit(this.colorPickerEl?.value)}addTooltip(e){this.removeTooltip(),this.tooltipContainerEl=document.createElement("div"),m(i`<calcite-tooltip .placement=${e.placement??"auto"} .referenceElement=${e.referenceElement} overlay-positioning=fixed open>${e.innerHTML}</calcite-tooltip>`,this.tooltipContainerEl),document.body.append(this.tooltipContainerEl)}removeTooltip(){this.tooltipContainerEl?.parentNode&&(this.tooltipContainerEl.remove(),this.tooltipContainerEl=void 0)}render(){let{compact:e,disabled:t,recentColors:o,_messages:s}=this,p=[o[0],o[1]],$=f(this.el)==="rtl";return e||p.push(o[2]),i`<arcgis-picker-input .disabled=${t} .intlDone=${s.commitColor} .heading=${s.selectColor} .label=${s.selectColor} @arcgisPopoverOpen=${this.handleOpen} @arcgisPopoverClose=${this.handleClose} .popoverProps=${this.popoverProps} ${l(this.setInlineInputRef)}><div class="color-picker-container" slot=content>${n(`color-picker${e?"--compact":""}`,i`<calcite-color-picker .clearable=${this.clearable} class="color-picker" @calciteColorPickerInput=${E(c=>{c.stopPropagation(),this.updateColor(this.colorPickerEl.value,!1)},500)} .scale=${e?"s":"m"} .storageId=${this.storageId} .alphaChannel=${this.showTransparency} .value=${this.color} ${l(this.setColorPickerRef)}></calcite-color-picker>`)}</div><div slot=preview><calcite-color-picker-swatch class="preview-swatch" .color=${this.color} scale=s></calcite-color-picker-swatch></div>${!this.hideRecentColors&&i`<div slot=content-end class="recent-colors-container" @keydown=${this.handleRecentColorsKeyDown} tabindex=-1>${p.map((c,d)=>c?n(c,i`<calcite-color-picker-swatch class="preview-recent-swatch" role=button scale=s tabindex=0 .active=${c===this.color} .color=${c} @click=${this.handleSwatchClickOrKeyUp} @keyup=${this.handleSwatchClickOrKeyUp} @focus=${this.handleUpdateActiveSwatch} ${l(this.setRecentColorElement(d+1))}></calcite-color-picker-swatch>`):this.renderEmptySwatch(`empty-swatch-${d}`))}</div>`||""}${this.clearable&&i`<div slot=content-end class="end-action"><calcite-action icon=circle-disallowed scale=s .label=${s.clearColor} .text=${s.clearColor??""} @click=${this.handleClearColor} @mouseover=${()=>this.addTooltip({referenceElement:this.actionEl.value,placement:$?"right-start":"left-start",innerHTML:s.noColor??""})} @mouseout=${()=>this.removeTooltip()} ${l(this.actionEl)}></calcite-action></div>`||""}</arcgis-picker-input>`}renderEmptySwatch(e){return n(e,i`<svg class="empty-swatch" viewBox="0 0 20 20" xmlns=http://www.w3.org/2000/svg width=20>${u`<rect width=20 height=20 fill=#f8f8f8 stroke=#000 stroke-dasharray=2 />`}</svg>`)}};v("arcgis-color-input",h);export{h as ArcgisColorInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as h}from"./4TZVXSQZ.js";import"./PMV2N3L3.js";import{a as d}from"./2GBIDGIK.js";import"./GZXN456V.js";import"./H4Q2JVNO.js";import{J as u,K as p,L as v,R as c,h as m,j as g,t as r}from"./3X2MVQTG.js";var y=m`:host{display:block;width:100%;height:100%}`,b="double",o=class extends v{constructor(){super(...arguments),this.#t=u(),this.#s=void 0,this.messages=d({}),this._strategy=h(b),this.disabled=!1,this.fieldType=b,this.fillPlacement="start",this.layout="horizontal",this.max="",this.min="",this.mirrored=!1,this.popoverLabel="",this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.showRangeLabels=!1,this.value="",this.valueLabelsEditingEnabled=!1,this.valueLabelsDisplay="always",this.valueLabelsPlacement="start",this.arcgisActiveValueChange=r({cancelable:!1}),this.arcgisChange=r({cancelable:!1}),this.arcgisInput=r({cancelable:!1}),this.arcgisRangeChange=r({cancelable:!1})}static{this.properties={_strategy:16,activeValue:32,disabled:5,fieldType:1,fillPlacement:1,label:1,labelFormatter:0,layout:1,max:1,messageOverrides:0,min:1,mirrored:5,popoverLabel:1,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:1,showRangeLabels:5,value:1,values:1,valueLabelsEditingEnabled:5,valueLabelsDisplay:1,valueLabelsPlacement:1,valueAsNumbers:32,valueAsDateOnly:32,valueAsTimeOnly:32,valueAsTimestampOffset:32,valueAsFieldType:32}}static{this.styles=y}#t;#s;get activeValue(){let e=this.#t.value?.activeValue;return typeof e=="number"?this._strategy.serialize(e):e}get values(){return this.value}set values(e){this.value=e}get valueAsNumbers(){return this.#e(this.value).map(e=>e??NaN)}get valueAsDateOnly(){return this.#e(this.value).map(e=>e===void 0?null:this._strategy.toDateOnly(e))}get valueAsTimeOnly(){return this.#e(this.value).map(e=>e===void 0?null:this._strategy.toTimeOnly(e))}get valueAsTimestampOffset(){return this.#e(this.value).map(e=>e===void 0?null:this._strategy.toTimestampOffset(e))}get valueAsFieldType(){return this.#e(this.value).map(e=>e===void 0?NaN:this._strategy.toFieldType(e))}willUpdate(e){super.willUpdate(e),e.has("fieldType")&&(this._strategy=h(this.fieldType)),(e.has("messages")||e.has("fieldType")||e.has("labelFormatter"))&&(this.#s=this.#m(this.messages._lang)),(e.has("value")||e.has("min")||e.has("max")||e.has("fieldType"))&&this.#u()}#r(e){e.stopPropagation(),this.#a(e.currentTarget.values),this.arcgisInput.emit()}#n(e){e.stopPropagation(),this.#a(e.currentTarget.values),this.arcgisChange.emit()}#h(e){e.stopPropagation(),this.arcgisActiveValueChange.emit()}#o(e){e.stopPropagation();let t=e.currentTarget;this.min=this._strategy.serialize(t.min),this.max=this._strategy.serialize(t.max),this.#a(t.values),this.arcgisRangeChange.emit()}#m(e){return(t,a,s)=>{let i=l=>this._strategy.format(e,l,a,s)??s(l);return this.labelFormatter?.(t,a,i)??i(t)}}#a(e){this.value=e.map(t=>this._strategy.serialize(t)).join(",")}#e(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0).map(t=>this._strategy.parse(t))}#i(e){return this.#e(e).filter(t=>Number.isFinite(t))}#l(e){let t=this._strategy,a=t.parse(this.min),s=t.parse(this.max),i=Number.isFinite(a)?a:void 0,l=Number.isFinite(s)?s:void 0;i!=null&&l!=null&&i>=l&&(i=void 0,l=void 0);let n=t.resolveRange(e,i,l);return n.min>=n.max?t.resolveRange(e,void 0,void 0):n}#g(e,t,a){return e.map(s=>Math.min(a,Math.max(t,s))).sort((s,i)=>s-i)}#u(){let e=this.#i(this.value),t=this.#l(e),a=this._strategy.serialize(t.min),s=this._strategy.serialize(t.max);a!==this.min&&(this.min=a),s!==this.max&&(this.max=s);let i=this.#g(e,t.min,t.max).map(l=>this._strategy.serialize(l)).join(",");i!==this.value&&(this.value=i)}render(){let e=this.#i(this.value),t=this.#l(e),a=this._strategy.editable,s=this._strategy.steps;return g`<arcgis-slider .ariaLabel=${this.label} .disabled=${this.disabled} .labelFormatter=${this.#s} .layout=${this.layout} .max=${t.max} .min=${t.min} .mirrored=${this.mirrored} .popoverLabel=${this.popoverLabel} .precision=${this._strategy.precision} .fillPlacement=${this.fillPlacement} .steps=${s} .rangeLabelsEditingEnabled=${a&&this.rangeLabelsEditingEnabled} .rangeLabelsPlacement=${this.rangeLabelsPlacement} .showRangeLabels=${this.showRangeLabels} .valueLabelsDisplay=${this.valueLabelsDisplay} .valueLabelsEditingEnabled=${a&&this.valueLabelsEditingEnabled} .valueLabelsPlacement=${this.valueLabelsPlacement} .values=${e} @arcgisChange=${this.#n} @arcgisInput=${this.#r} @arcgisActiveValueChange=${this.#h} @arcgisRangeChange=${this.#o} ${p(this.#t)}><slot name=content-start slot=content-start></slot><slot name=content-end slot=content-end></slot><slot name=popover slot=popover></slot></arcgis-slider>`}};c("arcgis-slider-field",o);export{o as ArcgisSliderField};
2
+ import{a as h}from"./4TZVXSQZ.js";import"./PMV2N3L3.js";import{a as d}from"./24JPS4UK.js";import"./VTAQRKNF.js";import"./H4Q2JVNO.js";import{J as u,K as p,L as v,R as c,h as m,j as g,t as r}from"./JEPW4X7U.js";var y=m`:host{display:block;width:100%;height:100%}`,b="double",o=class extends v{constructor(){super(...arguments),this.#t=u(),this.#s=void 0,this.messages=d({}),this._strategy=h(b),this.disabled=!1,this.fieldType=b,this.fillPlacement="start",this.layout="horizontal",this.max="",this.min="",this.mirrored=!1,this.popoverLabel="",this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.showRangeLabels=!1,this.value="",this.valueLabelsEditingEnabled=!1,this.valueLabelsDisplay="always",this.valueLabelsPlacement="start",this.arcgisActiveValueChange=r({cancelable:!1}),this.arcgisChange=r({cancelable:!1}),this.arcgisInput=r({cancelable:!1}),this.arcgisRangeChange=r({cancelable:!1})}static{this.properties={_strategy:16,activeValue:32,disabled:5,fieldType:1,fillPlacement:1,label:1,labelFormatter:0,layout:1,max:1,messageOverrides:0,min:1,mirrored:5,popoverLabel:1,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:1,showRangeLabels:5,value:1,values:1,valueLabelsEditingEnabled:5,valueLabelsDisplay:1,valueLabelsPlacement:1,valueAsNumbers:32,valueAsDateOnly:32,valueAsTimeOnly:32,valueAsTimestampOffset:32,valueAsFieldType:32}}static{this.styles=y}#t;#s;get activeValue(){let e=this.#t.value?.activeValue;return typeof e=="number"?this._strategy.serialize(e):e}get values(){return this.value}set values(e){this.value=e}get valueAsNumbers(){return this.#e(this.value).map(e=>e??NaN)}get valueAsDateOnly(){return this.#e(this.value).map(e=>e===void 0?null:this._strategy.toDateOnly(e))}get valueAsTimeOnly(){return this.#e(this.value).map(e=>e===void 0?null:this._strategy.toTimeOnly(e))}get valueAsTimestampOffset(){return this.#e(this.value).map(e=>e===void 0?null:this._strategy.toTimestampOffset(e))}get valueAsFieldType(){return this.#e(this.value).map(e=>e===void 0?NaN:this._strategy.toFieldType(e))}willUpdate(e){super.willUpdate(e),e.has("fieldType")&&(this._strategy=h(this.fieldType)),(e.has("messages")||e.has("fieldType")||e.has("labelFormatter"))&&(this.#s=this.#m(this.messages._lang)),(e.has("value")||e.has("min")||e.has("max")||e.has("fieldType"))&&this.#u()}#r(e){e.stopPropagation(),this.#a(e.currentTarget.values),this.arcgisInput.emit()}#n(e){e.stopPropagation(),this.#a(e.currentTarget.values),this.arcgisChange.emit()}#h(e){e.stopPropagation(),this.arcgisActiveValueChange.emit()}#o(e){e.stopPropagation();let t=e.currentTarget;this.min=this._strategy.serialize(t.min),this.max=this._strategy.serialize(t.max),this.#a(t.values),this.arcgisRangeChange.emit()}#m(e){return(t,a,s)=>{let i=l=>this._strategy.format(e,l,a,s)??s(l);return this.labelFormatter?.(t,a,i)??i(t)}}#a(e){this.value=e.map(t=>this._strategy.serialize(t)).join(",")}#e(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0).map(t=>this._strategy.parse(t))}#i(e){return this.#e(e).filter(t=>Number.isFinite(t))}#l(e){let t=this._strategy,a=t.parse(this.min),s=t.parse(this.max),i=Number.isFinite(a)?a:void 0,l=Number.isFinite(s)?s:void 0;i!=null&&l!=null&&i>=l&&(i=void 0,l=void 0);let n=t.resolveRange(e,i,l);return n.min>=n.max?t.resolveRange(e,void 0,void 0):n}#g(e,t,a){return e.map(s=>Math.min(a,Math.max(t,s))).sort((s,i)=>s-i)}#u(){let e=this.#i(this.value),t=this.#l(e),a=this._strategy.serialize(t.min),s=this._strategy.serialize(t.max);a!==this.min&&(this.min=a),s!==this.max&&(this.max=s);let i=this.#g(e,t.min,t.max).map(l=>this._strategy.serialize(l)).join(",");i!==this.value&&(this.value=i)}render(){let e=this.#i(this.value),t=this.#l(e),a=this._strategy.editable,s=this._strategy.steps;return g`<arcgis-slider .ariaLabel=${this.label} .disabled=${this.disabled} .labelFormatter=${this.#s} .layout=${this.layout} .max=${t.max} .min=${t.min} .mirrored=${this.mirrored} .popoverLabel=${this.popoverLabel} .precision=${this._strategy.precision} .fillPlacement=${this.fillPlacement} .steps=${s} .rangeLabelsEditingEnabled=${a&&this.rangeLabelsEditingEnabled} .rangeLabelsPlacement=${this.rangeLabelsPlacement} .showRangeLabels=${this.showRangeLabels} .valueLabelsDisplay=${this.valueLabelsDisplay} .valueLabelsEditingEnabled=${a&&this.valueLabelsEditingEnabled} .valueLabelsPlacement=${this.valueLabelsPlacement} .values=${e} @arcgisChange=${this.#n} @arcgisInput=${this.#r} @arcgisActiveValueChange=${this.#h} @arcgisRangeChange=${this.#o} ${p(this.#t)}><slot name=content-start slot=content-start></slot><slot name=content-end slot=content-end></slot><slot name=popover slot=popover></slot></arcgis-slider>`}};c("arcgis-slider-field",o);export{o as ArcgisSliderField};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as m}from"./4TZVXSQZ.js";import"./PMV2N3L3.js";import{a as x}from"./2GBIDGIK.js";import"./GZXN456V.js";import"./H4Q2JVNO.js";import{J as b,K as p,L as $,N as f,R as y,h as d,j as v,t as g}from"./3X2MVQTG.js";export default $arcgis.t(([{sqlName:E,sqlLiteral:L}])=>{var C=d`:host{display:block;height:100%;width:100%}arcgis-histogram{align-self:flex-end;height:var(--arcgis-slider-histogram-range-histogram-height, 100%);width:100%}`,c=class extends ${constructor(){super(...arguments),this.#e=b(),this.#a=(e,i,r)=>{let o=a=>m(this.fieldType).format(this.#t._lang,a,"value",r)??r(a);return this.labelFormatter?.(e,i,o)??o(e)},this.#t=x(),this.fieldType="double",this.fillPlacement="start",this.layout="horizontal",this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.showRangeLabels=!1,this.standardDeviationCount=1,this.valueLabelsDisplay="always",this.valueLabelsEditingEnabled=!1,this.arcgisActiveValueChange=g({cancelable:!1}),this.arcgisChange=g({cancelable:!1}),this.arcgisInput=g({cancelable:!1}),this.arcgisRangeChange=g({cancelable:!1})}static{this.properties={activeValue:32,average:9,bins:0,dataLines:0,excludedBarColor:0,fieldType:1,fillPlacement:1,includedBarColor:0,label:1,labelFormatter:0,layout:1,max:1,min:1,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:1,showRangeLabels:5,standardDeviation:9,standardDeviationCount:9,valueLabelsDisplay:1,valueLabelsEditingEnabled:5,values:1,value:1}}static{this.styles=C}#e;#a;#t;get activeValue(){return this.#e.value?.activeValue}get values(){return this.value}set values(e){this.value=e}async destroy(){await this.manager.destroy()}async generateWhereClause(e){let{fillPlacement:i,value:r}=this;if(!r?.length)return;let o=m(this.fieldType),a=r.split(",").map(u=>u.trim()).filter(u=>u.length>0),h=E(e),l=u=>{let s=o.parse(u);return typeof s=="number"?L(o.toFieldType(s),{type:this.fieldType}):void 0},t=a[0]?l(a[0]):void 0,n=a.length>1&&a.at(-1)?l(a.at(-1)):void 0;if(!(t==null||a.length>1&&n==null))switch(i){case"start":return a.length>1?`${h} BETWEEN ${t} AND ${n}`:`${h} <= ${t}`;case"end":return a.length>1?`${h} BETWEEN ${t} AND ${n}`:`${h} >= ${t}`;case"between":return a.length>1?`${h} BETWEEN ${t} AND ${n}`:`${h} <= ${t}`;case"not-between":return a.length>1?`${h} NOT BETWEEN ${t} AND ${n}`:`${h} <= ${t}`;case"none":return"1=0";default:return}}async updateFromHistogramResult(e,i){let r=m(this.fieldType);this.bins=e.bins,e.minValue!=null&&(this.min=r.serialize(e.minValue)),e.maxValue!=null&&(this.max=r.serialize(e.maxValue)),i&&(this.average=i.avg??void 0,this.standardDeviation=i.stddev??void 0)}willUpdate(e){(e.has("fieldType")||e.has("max")||e.has("min")||e.has("value"))&&this.#s()}#i(){let{bins:e,value:i,fillPlacement:r}=this,o=e?.[0],a=e?.at(-1);if(o==null||a==null||!i)return;let h=m(this.fieldType),l=i.split(",").map(u=>h.parse(u)).filter(u=>Number.isFinite(u)).sort((u,s)=>u-s),t=l.at(0),n=l.at(-1);if(!(t==null||n==null))switch(r){case"start":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:o.minValue,maxValue:t}];case"end":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:n,maxValue:a.maxValue}];case"between":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:o.minValue,maxValue:t}];case"not-between":return l.length>1?[{minValue:o.minValue,maxValue:t},{minValue:t,maxValue:n,color:"var(--arcgis-histogram-bar-color)"},{minValue:n,maxValue:a.maxValue}]:[{minValue:o.minValue,maxValue:t}];default:return}}#s(){let e=m(this.fieldType),i=(this.value??"").split(",").map(s=>s.trim()).filter(s=>s.length>0).map(s=>e.parse(s)).filter(s=>Number.isFinite(s)),r=e.parse(this.min??""),o=e.parse(this.max??""),a=Number.isFinite(r)?r:void 0,h=Number.isFinite(o)?o:void 0;a!=null&&h!=null&&a>=h&&(a=void 0,h=void 0);let l=e.resolveRange(i,a,h);l.min>=l.max&&(l=e.resolveRange(i,void 0,void 0));let t=e.serialize(l.min),n=e.serialize(l.max),u=i.map(s=>Math.min(l.max,Math.max(l.min,s))).sort((s,V)=>s-V).map(s=>e.serialize(s)).join(",");t!==this.min&&(this.min=t),n!==this.max&&(this.max=n),u!==this.value&&(this.value=u)}#l(e){e.stopPropagation(),this.value=e.currentTarget.value,this.arcgisInput.emit()}#n(e){e.stopPropagation();let i=e.currentTarget;this.min=i.min,this.max=i.max,this.value=i.value,this.arcgisRangeChange.emit()}#r(e){e.stopPropagation(),this.value=e.currentTarget.value,this.arcgisChange.emit()}#h(e){e.stopPropagation(),this.arcgisActiveValueChange.emit()}render(){let e=m(this.fieldType),i=e.parse(this.min??""),r=e.parse(this.max??"");return v`<arcgis-slider-field .fieldType=${this.fieldType} .fillPlacement=${this.fillPlacement} .label=${this.label} .labelFormatter=${this.labelFormatter} .max=${this.max??""} .min=${this.min??""} .layout=${this.layout} @arcgisActiveValueChange=${this.#h} @arcgisChange=${this.#r} @arcgisInput=${this.#l} @arcgisRangeChange=${this.#n} .rangeLabelsEditingEnabled=${this.rangeLabelsEditingEnabled} .valueLabelsEditingEnabled=${this.valueLabelsEditingEnabled} .rangeLabelsPlacement=${this.rangeLabelsPlacement} .valueLabelsDisplay=${this.valueLabelsDisplay} .showRangeLabels=${this.showRangeLabels} .value=${this.value??""} .valueLabelsPlacement=${this.layout==="horizontal"?"end":"start"} ${p(this.#e)}><arcgis-histogram .slot=${this.layout==="horizontal"?"content-start":"content-end"} .average=${this.average} .bins=${this.bins} .dataLines=${this.dataLines} .max=${r} .min=${i} .label=${this.label} .layout=${this.layout} .standardDeviation=${this.standardDeviation} .standardDeviationCount=${this.standardDeviationCount} color-blending-enabled .colorStops=${this.#i()} style=${f({...this.includedBarColor&&{"--arcgis-histogram-stop-color":this.includedBarColor.toCss()},...this.excludedBarColor&&{"--arcgis-histogram-bar-color":this.excludedBarColor.toCss()}})} .labelFormatter=${this.#a}></arcgis-histogram></arcgis-slider-field>`}};y("arcgis-slider-histogram-range",c);return c},"core/sql")
2
+ import{a as m}from"./4TZVXSQZ.js";import"./PMV2N3L3.js";import{a as x}from"./24JPS4UK.js";import"./VTAQRKNF.js";import"./H4Q2JVNO.js";import{J as b,K as p,L as $,N as f,R as y,h as d,j as v,t as g}from"./JEPW4X7U.js";export default $arcgis.t(([{sqlName:E,sqlLiteral:L}])=>{var C=d`:host{display:block;height:100%;width:100%}arcgis-histogram{align-self:flex-end;height:var(--arcgis-slider-histogram-range-histogram-height, 100%);width:100%}`,c=class extends ${constructor(){super(...arguments),this.#e=b(),this.#a=(e,i,r)=>{let o=a=>m(this.fieldType).format(this.#t._lang,a,"value",r)??r(a);return this.labelFormatter?.(e,i,o)??o(e)},this.#t=x(),this.fieldType="double",this.fillPlacement="start",this.layout="horizontal",this.rangeLabelsEditingEnabled=!1,this.rangeLabelsPlacement="center",this.showRangeLabels=!1,this.standardDeviationCount=1,this.valueLabelsDisplay="always",this.valueLabelsEditingEnabled=!1,this.arcgisActiveValueChange=g({cancelable:!1}),this.arcgisChange=g({cancelable:!1}),this.arcgisInput=g({cancelable:!1}),this.arcgisRangeChange=g({cancelable:!1})}static{this.properties={activeValue:32,average:9,bins:0,dataLines:0,excludedBarColor:0,fieldType:1,fillPlacement:1,includedBarColor:0,label:1,labelFormatter:0,layout:1,max:1,min:1,rangeLabelsEditingEnabled:5,rangeLabelsPlacement:1,showRangeLabels:5,standardDeviation:9,standardDeviationCount:9,valueLabelsDisplay:1,valueLabelsEditingEnabled:5,values:1,value:1}}static{this.styles=C}#e;#a;#t;get activeValue(){return this.#e.value?.activeValue}get values(){return this.value}set values(e){this.value=e}async destroy(){await this.manager.destroy()}async generateWhereClause(e){let{fillPlacement:i,value:r}=this;if(!r?.length)return;let o=m(this.fieldType),a=r.split(",").map(u=>u.trim()).filter(u=>u.length>0),h=E(e),l=u=>{let s=o.parse(u);return typeof s=="number"?L(o.toFieldType(s),{type:this.fieldType}):void 0},t=a[0]?l(a[0]):void 0,n=a.length>1&&a.at(-1)?l(a.at(-1)):void 0;if(!(t==null||a.length>1&&n==null))switch(i){case"start":return a.length>1?`${h} BETWEEN ${t} AND ${n}`:`${h} <= ${t}`;case"end":return a.length>1?`${h} BETWEEN ${t} AND ${n}`:`${h} >= ${t}`;case"between":return a.length>1?`${h} BETWEEN ${t} AND ${n}`:`${h} <= ${t}`;case"not-between":return a.length>1?`${h} NOT BETWEEN ${t} AND ${n}`:`${h} <= ${t}`;case"none":return"1=0";default:return}}async updateFromHistogramResult(e,i){let r=m(this.fieldType);this.bins=e.bins,e.minValue!=null&&(this.min=r.serialize(e.minValue)),e.maxValue!=null&&(this.max=r.serialize(e.maxValue)),i&&(this.average=i.avg??void 0,this.standardDeviation=i.stddev??void 0)}willUpdate(e){(e.has("fieldType")||e.has("max")||e.has("min")||e.has("value"))&&this.#s()}#i(){let{bins:e,value:i,fillPlacement:r}=this,o=e?.[0],a=e?.at(-1);if(o==null||a==null||!i)return;let h=m(this.fieldType),l=i.split(",").map(u=>h.parse(u)).filter(u=>Number.isFinite(u)).sort((u,s)=>u-s),t=l.at(0),n=l.at(-1);if(!(t==null||n==null))switch(r){case"start":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:o.minValue,maxValue:t}];case"end":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:n,maxValue:a.maxValue}];case"between":return l.length>1?[{minValue:t,maxValue:n}]:[{minValue:o.minValue,maxValue:t}];case"not-between":return l.length>1?[{minValue:o.minValue,maxValue:t},{minValue:t,maxValue:n,color:"var(--arcgis-histogram-bar-color)"},{minValue:n,maxValue:a.maxValue}]:[{minValue:o.minValue,maxValue:t}];default:return}}#s(){let e=m(this.fieldType),i=(this.value??"").split(",").map(s=>s.trim()).filter(s=>s.length>0).map(s=>e.parse(s)).filter(s=>Number.isFinite(s)),r=e.parse(this.min??""),o=e.parse(this.max??""),a=Number.isFinite(r)?r:void 0,h=Number.isFinite(o)?o:void 0;a!=null&&h!=null&&a>=h&&(a=void 0,h=void 0);let l=e.resolveRange(i,a,h);l.min>=l.max&&(l=e.resolveRange(i,void 0,void 0));let t=e.serialize(l.min),n=e.serialize(l.max),u=i.map(s=>Math.min(l.max,Math.max(l.min,s))).sort((s,V)=>s-V).map(s=>e.serialize(s)).join(",");t!==this.min&&(this.min=t),n!==this.max&&(this.max=n),u!==this.value&&(this.value=u)}#l(e){e.stopPropagation(),this.value=e.currentTarget.value,this.arcgisInput.emit()}#n(e){e.stopPropagation();let i=e.currentTarget;this.min=i.min,this.max=i.max,this.value=i.value,this.arcgisRangeChange.emit()}#r(e){e.stopPropagation(),this.value=e.currentTarget.value,this.arcgisChange.emit()}#h(e){e.stopPropagation(),this.arcgisActiveValueChange.emit()}render(){let e=m(this.fieldType),i=e.parse(this.min??""),r=e.parse(this.max??"");return v`<arcgis-slider-field .fieldType=${this.fieldType} .fillPlacement=${this.fillPlacement} .label=${this.label} .labelFormatter=${this.labelFormatter} .max=${this.max??""} .min=${this.min??""} .layout=${this.layout} @arcgisActiveValueChange=${this.#h} @arcgisChange=${this.#r} @arcgisInput=${this.#l} @arcgisRangeChange=${this.#n} .rangeLabelsEditingEnabled=${this.rangeLabelsEditingEnabled} .valueLabelsEditingEnabled=${this.valueLabelsEditingEnabled} .rangeLabelsPlacement=${this.rangeLabelsPlacement} .valueLabelsDisplay=${this.valueLabelsDisplay} .showRangeLabels=${this.showRangeLabels} .value=${this.value??""} .valueLabelsPlacement=${this.layout==="horizontal"?"end":"start"} ${p(this.#e)}><arcgis-histogram .slot=${this.layout==="horizontal"?"content-start":"content-end"} .average=${this.average} .bins=${this.bins} .dataLines=${this.dataLines} .max=${r} .min=${i} .label=${this.label} .layout=${this.layout} .standardDeviation=${this.standardDeviation} .standardDeviationCount=${this.standardDeviationCount} color-blending-enabled .colorStops=${this.#i()} style=${f({...this.includedBarColor&&{"--arcgis-histogram-stop-color":this.includedBarColor.toCss()},...this.excludedBarColor&&{"--arcgis-histogram-bar-color":this.excludedBarColor.toCss()}})} .labelFormatter=${this.#a}></arcgis-histogram></arcgis-slider-field>`}};y("arcgis-slider-histogram-range",c);return c},"core/sql")
@@ -1,4 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),kt=new WeakMap,M=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=kt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&kt.set(e,t))}return t}toString(){return this.cssText}},jt=s=>new M(typeof s=="string"?s:s+"",void 0,Et),Ce=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,r)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[r+1],s[0]);return new M(e,s,Et)},Ht=(s,t)=>{if(Z)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=Y.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},$t=Z?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return jt(e)})(s):s;var{is:we,defineProperty:Oe,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Se,getOwnPropertySymbols:Pe,getPrototypeOf:Ne}=Object,tt=globalThis,zt=tt.trustedTypes,De=zt?zt.emptyScript:"",xe=tt.reactiveElementPolyfillSupport,k=(s,t)=>s,X={toAttribute(s,t){switch(t){case Boolean:s=s?De:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},j=(s,t)=>!we(s,t),Vt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Oe(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:r}=Te(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);r?.call(this,i),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Vt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,o=[...Se(e),...Pe(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift($t(n))}else t!==void 0&&e.push($t(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ht(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let r=(o.converter?.toAttribute!==void 0?o.converter:X).toAttribute(e,o.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let r=o.getPropertyOptions(n),i=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:X;this._$Em=n;let a=i.fromAttribute(e,r.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=!1,r){if(t!==void 0){let i=this.constructor;if(n===!1&&(r=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??j)(r,e)||o.useDefault&&o.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:r},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),r!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,r]of o){let{wrapped:i}=r,a=this[n];i!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[k("elementProperties")]=new Map,A[k("finalized")]=new Map,xe?.({ReactiveElement:A}),(tt.reactiveElementVersions??=[]).push("2.1.2");var At=globalThis,Bt=s=>s,et=At.trustedTypes,Wt=et?et.createPolicy("lit-html",{createHTML:s=>s}):void 0,_t="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,Ct="?"+_,Ue=`<${Ct}>`,T=document,z=()=>T.createComment(""),V=s=>s===null||typeof s!="object"&&typeof s!="function",wt=Array.isArray,Jt=s=>wt(s)||typeof s?.[Symbol.iterator]=="function",bt=`[
3
3
  \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ft=/-->/g,qt=/>/g,w=RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
4
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,Kt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Ot=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ys=Ot(1),gs=Ot(2),vs=Ot(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Qt=new WeakMap,O=T.createTreeWalker(T,129);function Zt(s,t){if(!wt(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wt!==void 0?Wt.createHTML(t):t}var Xt=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Ft:u[1]!==void 0?i=qt:u[2]!==void 0?(Yt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=n??H,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?w:u[3]==='"'?Kt:Gt):i===Kt||i===Gt?i=w:i===Ft||i===qt?i=H:(i=w,n=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";r+=i===H?c+Ue:h>=0?(o.push(l),c.slice(0,h)+_t+c.slice(h)+_+v):c+_+(h===-2?a:v)}return[Zt(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,a=t.length-1,c=this.parts,[l,u]=Xt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(_t)){let m=u[i++],v=n.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:r,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?nt:C[1]==="@"?rt:P}),n.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:r}),n.removeAttribute(h));if(Yt.test(n.tagName)){let h=n.textContent.split(_),m=h.length-1;if(m>0){n.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],z()),O.nextNode(),c.push({type:2,index:++r});n.append(h[m],z())}}}else if(n.nodeType===8)if(n.data===Ct)c.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:r}),h+=_.length-1}r++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function S(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=V(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=S(s,n._$AS(s,t.values),n,o)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);O.currentNode=n;let r=O.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new U(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new it(r,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(r=O.nextNode(),i++)}return O.currentNode=T,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},U=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Jt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Zt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new st(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=Qt.get(t.strings);return e===void 0&&Qt.set(t.strings,e=new B(t)),e}k(t){wt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Bt(t).nextSibling;Bt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=S(this,t,e,0),i=!V(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=S(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),i||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}i&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},rt=class extends P{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},te={M:_t,P:_,A:Ct,C:1,L:Xt,R:st,D:Jt,V:S,I:U,H:P,N:nt,U:rt,B:ot,F:it},Le=At.litHtmlPolyfillSupport;Le?.(B,U),(At.litHtmlVersions??=[]).push("3.3.2");var at=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new U(t.insertBefore(z(),r),r,void 0,e??{})}return n._$AI(s),n};var Tt=globalThis,E=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Tt.litElementHydrateSupport?.({LitElement:E});var Re=Tt.litElementPolyfillSupport;Re?.({LitElement:E});(Tt.litElementVersions??=[]).push("4.2.2");var ee=new Set,se;var oe=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ds=(s,t,e,o)=>{let n=oe(t);if(o?.once){let i=`${s}${n}${e}`;if(ee.has(i))return;ee.add(i)}let r;if(o?.detail){r={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(r,i,{enumerable:!0,get(){return c.deref()}})}else r[i]=a;se?.log.interceptors?.forEach(i=>i(s,n,e,r)),console[s](`[${n}]: ${e}`,r)}else se?.log.interceptors?.forEach(i=>i(s,n,e)),console[s](`[${n}]: ${e}`)},ne=s=>{let t=`[${oe(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},xs=s=>`The property \`${s.toString()}\` is required but missing.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),Ie=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Rs=s=>typeof s?.then=="function";var F,D=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],lt=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},re=()=>N,L,Is=s=>{L!==s&&(L=s,queueMicrotask(()=>L===s?L=void 0:0))},Me=()=>{let s=L;return L=void 0,s},ie=async(s,t)=>{let e=ht(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ae=async s=>{let t=ht(s);return await t.ready,t},ht=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(Ie(s))return s;let o=Me();if(o!==void 0)return o},ct=!1,Ms=s=>{ct=!0;try{return s()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ce=(s,t)=>{let e=t>ke?je:t/He,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},ke=4e3,je=2e3,He=4;var ze=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let r=R.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},R.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},Ve=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,r)=>p(t,void 0,e===r?n:void 0)),e},Be=(s=[G(),...re()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,r=i=>{n-=1,i!==void 0&&(n=Math.min(n,0)),n===0&&t(i)};o.forEach(i=>ze(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){Ve(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&I();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&Be(void 0,n=>s=n.key,o),o},Fe=We.bind(null,""),de;de=q;var St=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#r=[],this.#c=[],this.#l=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=he(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(lt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#r;#c;#l;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(ne(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return D(this.#o),ie}get useRef(){return D(this.#o),ae}get useRefSync(){return D(this.#o),ht}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#i.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#i.push(n.remove)})}};function le(s){p(s,void 0,this)}var he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,r){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,r)}},e=new Proxy(s,t);return e};var pe=St;var dt=s=>s.replace(qe,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),qe=/[A-Z]+(?![a-z])|[A-Z]/gu;var Ge="randomUUID"in crypto,Gs=()=>{if(Ge)return crypto.randomUUID();let s=crypto.getRandomValues(new Uint16Array(8));s[3]=s[3]&4095|16384,s[4]=s[4]&16383|32768;let t=e=>s[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Nt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Dt={};function xt(){}function Ut(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var Ke=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(Qe):void 0,vt=C?.map(([x])=>x),J=class extends Pt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=vt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},pt=Object.defineProperty,Qe=s=>{let t=s.split(":");return t.length===1?[t[0],dt(t[0])]:t},Je=globalThis.HTMLElement??xt,Pt=class extends Je{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])pt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])pt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])pt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Ut(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Nt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,r=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);Ze(a),!e.A&&(e.A=r,customElements.define(i,r)),r.N=this;let l=document.createElement(i);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(Ye,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function Ye([s,t]){this[s]=t}var Ze=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},pt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:Xe}=te,fe=s=>s;var ut=s=>s.strings===void 0,me=()=>document.createComment(""),ro=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(me(),n),i=o.insertBefore(me(),n);e=new Xe(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==i._$AU&&e._$AP(c)}if(r!==n||a){let c=e._$AA;for(;c!==r;){let l=fe(c).nextSibling;fe(o).insertBefore(c,n),c=l}}}return e},io=(s,t,e=s)=>(s._$AI(t,e),s),ts={},ye=(s,t=ts)=>s._$AH=t,ao=s=>s._$AH,co=s=>{s._$AR(),s._$AA.remove()},lo=s=>{s._$AR()};var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},ft=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ge=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),os(t)}};function es(s){this._$AN!==void 0?(ft(this),this._$AM=s,ge(this)):this._$AM=s}function ss(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let r=e;r<o.length;r++)K(o[r],!1),ft(o[r]);else o!=null&&(K(o,!1),ft(o));else K(this,s)}var os=s=>{s.type==y.CHILD&&(s._$AP??=ss,s._$AQ??=es)},mt=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ge(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),ft(this))}setValue(t){if(ut(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Eo=()=>new Rt,Rt=class{},Lt=new WeakMap,It=$(class extends mt{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Lt.get(t);e===void 0&&(e=new WeakMap,Lt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?Lt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var yt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=gt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${gt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),lt(void 0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ce(t,rs)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},rs=1e3,gt="autoDestroyDisabled";var ve=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",is=" !"+Ee,$e=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(is);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?Ee:""):e[o]=n}}return f}});var as=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ut(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return ye(s),t}});var be=class s extends E{constructor(){super(),this.M=[],this.manager=new yt(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,r=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=xt,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),n&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Dt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,r=n?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?dt(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=r(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let n=this.K,r=super.getPropertyDescriptor(t,e,o);return o.d=r,{...r,get(){return n.t?.(this.#t.get(t)),r.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);r.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{Ut(this)}#t;#e;#s;#n;#r;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Dt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#i(){let t=this.el.G??Nt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(gt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var _e=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.K=o,r.L=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o};var Un=s=>typeof s=="object"&&s!=null?ve(s):s,Ln=s=>typeof s=="object"&&s!=null?$e(s):s;var Mt=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,It(this.#e)):It(t)}},Rn=$(Mt);var In=d;var Mn=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=_e({defaultAssetPath:"https://js.arcgis.com/5.2.4/common-components/",hydratedAttribute:"hydrated"}),{customElement:Vn,getAssetPath:Bn,setAssetPath:Wn}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Rs as a,D as b,G as c,lt as d,re as e,Is as f,Ms as g,Ce as h,j as i,ys as j,gs as k,f as l,d as m,at as n,Ds as o,xs as p,Ve as q,Be as r,We as s,Fe as t,St as u,pe as v,Gs as w,Dt as x,Ke as y,y as z,$ as A,g as B,ro as C,io as D,ye as E,ao as F,co as G,lo as H,mt as I,Eo as J,It as K,be as L,Un as M,Ln as N,In as O,Mn as P,Q,Vn as R,Bn as S};
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,Kt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Ot=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ys=Ot(1),gs=Ot(2),vs=Ot(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Qt=new WeakMap,O=T.createTreeWalker(T,129);function Zt(s,t){if(!wt(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wt!==void 0?Wt.createHTML(t):t}var Xt=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Ft:u[1]!==void 0?i=qt:u[2]!==void 0?(Yt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=n??H,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?w:u[3]==='"'?Kt:Gt):i===Kt||i===Gt?i=w:i===Ft||i===qt?i=H:(i=w,n=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";r+=i===H?c+Ue:h>=0?(o.push(l),c.slice(0,h)+_t+c.slice(h)+_+v):c+_+(h===-2?a:v)}return[Zt(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,a=t.length-1,c=this.parts,[l,u]=Xt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(_t)){let m=u[i++],v=n.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:r,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?nt:C[1]==="@"?rt:P}),n.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:r}),n.removeAttribute(h));if(Yt.test(n.tagName)){let h=n.textContent.split(_),m=h.length-1;if(m>0){n.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],z()),O.nextNode(),c.push({type:2,index:++r});n.append(h[m],z())}}}else if(n.nodeType===8)if(n.data===Ct)c.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:r}),h+=_.length-1}r++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function S(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=V(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=S(s,n._$AS(s,t.values),n,o)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);O.currentNode=n;let r=O.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new U(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new it(r,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(r=O.nextNode(),i++)}return O.currentNode=T,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},U=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Jt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Zt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new st(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=Qt.get(t.strings);return e===void 0&&Qt.set(t.strings,e=new B(t)),e}k(t){wt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Bt(t).nextSibling;Bt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=S(this,t,e,0),i=!V(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=S(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),i||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}i&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},rt=class extends P{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},te={M:_t,P:_,A:Ct,C:1,L:Xt,R:st,D:Jt,V:S,I:U,H:P,N:nt,U:rt,B:ot,F:it},Le=At.litHtmlPolyfillSupport;Le?.(B,U),(At.litHtmlVersions??=[]).push("3.3.2");var at=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new U(t.insertBefore(z(),r),r,void 0,e??{})}return n._$AI(s),n};var Tt=globalThis,E=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Tt.litElementHydrateSupport?.({LitElement:E});var Re=Tt.litElementPolyfillSupport;Re?.({LitElement:E});(Tt.litElementVersions??=[]).push("4.2.2");var ee=new Set,se;var oe=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ds=(s,t,e,o)=>{let n=oe(t);if(o?.once){let i=`${s}${n}${e}`;if(ee.has(i))return;ee.add(i)}let r;if(o?.detail){r={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(r,i,{enumerable:!0,get(){return c.deref()}})}else r[i]=a;se?.log.interceptors?.forEach(i=>i(s,n,e,r)),console[s](`[${n}]: ${e}`,r)}else se?.log.interceptors?.forEach(i=>i(s,n,e)),console[s](`[${n}]: ${e}`)},ne=s=>{let t=`[${oe(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},xs=s=>`The property \`${s.toString()}\` is required but missing.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),Ie=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Rs=s=>typeof s?.then=="function";var F,D=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],lt=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},re=()=>N,L,Is=s=>{L!==s&&(L=s,queueMicrotask(()=>L===s?L=void 0:0))},Me=()=>{let s=L;return L=void 0,s},ie=async(s,t)=>{let e=ht(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ae=async s=>{let t=ht(s);return await t.ready,t},ht=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(Ie(s))return s;let o=Me();if(o!==void 0)return o},ct=!1,Ms=s=>{ct=!0;try{return s()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ce=(s,t)=>{let e=t>ke?je:t/He,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},ke=4e3,je=2e3,He=4;var ze=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let r=R.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},R.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},Ve=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,r)=>p(t,void 0,e===r?n:void 0)),e},Be=(s=[G(),...re()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,r=i=>{n-=1,i!==void 0&&(n=Math.min(n,0)),n===0&&t(i)};o.forEach(i=>ze(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){Ve(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&I();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&Be(void 0,n=>s=n.key,o),o},Fe=We.bind(null,""),de;de=q;var St=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#r=[],this.#c=[],this.#l=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=he(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(lt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#r;#c;#l;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(ne(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return D(this.#o),ie}get useRef(){return D(this.#o),ae}get useRefSync(){return D(this.#o),ht}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#i.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#i.push(n.remove)})}};function le(s){p(s,void 0,this)}var he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,r){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,r)}},e=new Proxy(s,t);return e};var pe=St;var dt=s=>s.replace(qe,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),qe=/[A-Z]+(?![a-z])|[A-Z]/gu;var Ge="randomUUID"in crypto,Gs=()=>{if(Ge)return crypto.randomUUID();let s=crypto.getRandomValues(new Uint16Array(8));s[3]=s[3]&4095|16384,s[4]=s[4]&16383|32768;let t=e=>s[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Nt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Dt={};function xt(){}function Ut(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var Ke=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(Qe):void 0,vt=C?.map(([x])=>x),J=class extends Pt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=vt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},pt=Object.defineProperty,Qe=s=>{let t=s.split(":");return t.length===1?[t[0],dt(t[0])]:t},Je=globalThis.HTMLElement??xt,Pt=class extends Je{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])pt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])pt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])pt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Ut(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Nt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,r=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);Ze(a),!e.A&&(e.A=r,customElements.define(i,r)),r.N=this;let l=document.createElement(i);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(Ye,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function Ye([s,t]){this[s]=t}var Ze=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},pt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:Xe}=te,fe=s=>s;var ut=s=>s.strings===void 0,me=()=>document.createComment(""),ro=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(me(),n),i=o.insertBefore(me(),n);e=new Xe(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==i._$AU&&e._$AP(c)}if(r!==n||a){let c=e._$AA;for(;c!==r;){let l=fe(c).nextSibling;fe(o).insertBefore(c,n),c=l}}}return e},io=(s,t,e=s)=>(s._$AI(t,e),s),ts={},ye=(s,t=ts)=>s._$AH=t,ao=s=>s._$AH,co=s=>{s._$AR(),s._$AA.remove()},lo=s=>{s._$AR()};var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},ft=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ge=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),os(t)}};function es(s){this._$AN!==void 0?(ft(this),this._$AM=s,ge(this)):this._$AM=s}function ss(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let r=e;r<o.length;r++)K(o[r],!1),ft(o[r]);else o!=null&&(K(o,!1),ft(o));else K(this,s)}var os=s=>{s.type==y.CHILD&&(s._$AP??=ss,s._$AQ??=es)},mt=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ge(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),ft(this))}setValue(t){if(ut(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Eo=()=>new Rt,Rt=class{},Lt=new WeakMap,It=$(class extends mt{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Lt.get(t);e===void 0&&(e=new WeakMap,Lt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?Lt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var yt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=gt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${gt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),lt(void 0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ce(t,rs)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},rs=1e3,gt="autoDestroyDisabled";var ve=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",is=" !"+Ee,$e=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(is);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?Ee:""):e[o]=n}}return f}});var as=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ut(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return ye(s),t}});var be=class s extends E{constructor(){super(),this.M=[],this.manager=new yt(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,r=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=xt,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),n&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Dt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,r=n?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?dt(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=r(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let n=this.K,r=super.getPropertyDescriptor(t,e,o);return o.d=r,{...r,get(){return n.t?.(this.#t.get(t)),r.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);r.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{Ut(this)}#t;#e;#s;#n;#r;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Dt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#i(){let t=this.el.G??Nt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(gt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var _e=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.K=o,r.L=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o};var Un=s=>typeof s=="object"&&s!=null?ve(s):s,Ln=s=>typeof s=="object"&&s!=null?$e(s):s;var Mt=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,It(this.#e)):It(t)}},Rn=$(Mt);var In=d;var Mn=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=_e({defaultAssetPath:"https://js.arcgis.com/5.2.6/common-components/",hydratedAttribute:"hydrated"}),{customElement:Vn,getAssetPath:Bn,setAssetPath:Wn}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Rs as a,D as b,G as c,lt as d,re as e,Is as f,Ms as g,Ce as h,j as i,ys as j,gs as k,f as l,d as m,at as n,Ds as o,xs as p,Ve as q,Be as r,We as s,Fe as t,St as u,pe as v,Gs as w,Dt as x,Ke as y,y as z,$ as A,g as B,ro as C,io as D,ye as E,ao as F,co as G,lo as H,mt as I,Eo as J,It as K,be as L,Un as M,Ln as N,In as O,Mn as P,Q,Vn as R,Bn as S};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{L as l,R as e,h as r,j as a}from"./3X2MVQTG.js";var h=r`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}arcgis-ramp-color{block-size:inherit;inline-size:inherit}`,s=class extends l{constructor(){super(...arguments),this._rampStops=[],this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={layout:1,min:9,max:9,stops:0}}static{this.styles=h}willUpdate(t){if(super.willUpdate(t),t.has("stops")){let{stops:p}=this,i=[];p.forEach(c=>{let{color:o,max:m,min:n}=c;i.push({value:n,color:o},{value:m,color:o})}),this._rampStops=i}}render(){return a`<arcgis-ramp-color .layout=${this.layout} .min=${this.min} .max=${this.max} .stops=${this._rampStops}></arcgis-ramp-color>`}};e("arcgis-ramp-color-break",s);export{s as ArcgisRampColorBreak};
2
+ import{L as l,R as e,h as r,j as a}from"./JEPW4X7U.js";var h=r`:host{display:block;block-size:30px;inline-size:100%}:host([layout="vertical"]){writing-mode:vertical-lr}arcgis-ramp-color{block-size:inherit;inline-size:inherit}`,s=class extends l{constructor(){super(...arguments),this._rampStops=[],this.layout="horizontal",this.min=0,this.max=1,this.stops=[]}static{this.properties={layout:1,min:9,max:9,stops:0}}static{this.styles=h}willUpdate(t){if(super.willUpdate(t),t.has("stops")){let{stops:p}=this,i=[];p.forEach(c=>{let{color:o,max:m,min:n}=c;i.push({value:n,color:o},{value:m,color:o})}),this._rampStops=i}}render(){return a`<arcgis-ramp-color .layout=${this.layout} .min=${this.min} .max=${this.max} .stops=${this._rampStops}></arcgis-ramp-color>`}};e("arcgis-ramp-color-break",s);export{s as ArcgisRampColorBreak};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as y,b as f,c as $,d as R,e as x,f as B}from"./HX2ZECWM.js";import{b as v,f as o}from"./OBMF3G26.js";import{c as _}from"./GZXN456V.js";import"./H4Q2JVNO.js";import{a as b}from"./KK62TWI2.js";import{K as u,L as m,N as h,R as g,j as l,t as p}from"./3X2MVQTG.js";var d=class extends m{constructor(){super(),this.#e=new ResizeObserver(e=>this._updateMeasurement(e)),this.#t=new MutationObserver(()=>this._syncGroups()),this.#r=_(),this.#a=new B(this),this._layout="horizontal",this._setRenderedBar=e=>{e==null&&(this._renderedBar=void 0,this._hydratedRenderedBar=void 0),!(e===this._renderedBar||e===this._hydratedRenderedBar)&&(this._renderedBar=e,this._hydratedRenderedBar=void 0,e&&e.componentOnReady().then(()=>{!this.isConnected||this._renderedBar!==e||(this._hydratedRenderedBar=e)}))},this.scale="m",this.tooltipAppearance="native",this.relativePosition="top-left",this.toolbarKind="floating",this.arcgisInternalLayoutUpdate=p(),this.listen("arcgisInternalLayoutUpdate",e=>{e.target!==this.el&&this.requestUpdate(),this.el.parentElement?.localName!=="arcgis-toolbar-stack"&&e.stopPropagation()})}static{this.properties={_observedSize:16,_availableLength:16,_groups:16,_renderedBar:16,_hydratedRenderedBar:16,layout:3,scale:3,tooltipAppearance:1,relativePosition:1,toolbarKind:3,allocatedLength:11,barElement:32,effectiveRelativeDirection:16}}static{this.styles=[$,y,f,x]}#e;#t;#i;#r;#a;get _availableLength(){return this.allocatedLength??(this.layout==="horizontal"?this._observedSize?.width:this._observedSize?.height)??0}get layout(){return this._layout}set layout(e){e!==this._layout&&(this._layout=e)}get barElement(){return this._hydratedRenderedBar}get effectiveRelativeDirection(){let[e,t]=this.relativePosition.split("-"),i=this.#r;switch(t){case"left":case"right":return`${e}-${t}`;case"end":return`${e}-${i==="ltr"?"right":"left"}`;case"start":return`${e}-${i==="ltr"?"left":"right"}`}}measure(e){let t=this._groups;if(!t?.length)return[0];let i=t.map(r=>r.measure(e)).reduce((r,a)=>r.flatMap(s=>a.map(n=>s+n)),[0]).map(r=>o(t,e,r).reduce((a,{budget:s})=>a+s,0));return Array.from(new Set(i)).sort((r,a)=>r-a)}measureIntrinsicSize(e){let t=this._groups??[],i=r=>o(t,e,r).reduce((a,{budget:s})=>a+s,0);return{minimum:i(0),maximum:i(1/0)}}allocate(e,t){let i=this._groups;return i?.length?o(i,e,t):[]}proxiedRender(e,t,i=this.toolbarKind,r=t){if(!this._groups?.length)return;let a=this.allocate(e,t),[s,n]=e.relativePosition.split("-"),c=e.layout==="horizontal"?{maxWidth:`${r}px`}:{maxHeight:`${r}px`};return b(this,l`<div class=${`toolbar-grid-wrapper ${n} ${s}`} style=${h(c)}><div class="toolbar-shadow-wrapper" style=${h(c)}><calcite-action-bar expand-toggle-disabled .floating=${i==="floating"} .layout=${e.layout} overflow-mode=none .scale=${e.scale} ${u(this._setRenderedBar)}>${a.map(({group:L,budget:z})=>L.proxiedRender(e,z))}</calcite-action-bar></div></div>`)}connectedCallback(){super.connectedCallback(),this.el.parentElement?.localName!=="arcgis-toolbar-stack"&&this.#e.observe(this.el),this.#t.observe(this.el,{childList:!0}),this._syncGroups()}disconnectedCallback(){this.#e.disconnect(),this.#t.disconnect(),super.disconnectedCallback()}_updateMeasurement(e){this._observedSize=e?.at(0)?.contentRect}_syncGroups(){this.#i?.abort();let e=Array.from(this.el.children).filter(v),t=new AbortController;this.#i=t,Promise.all(e.map(i=>i.componentOnReady())).then(()=>{!this.isConnected||t.signal.aborted||(this._groups=e,this.arcgisInternalLayoutUpdate.emit())})}render(){if(!this._groups?.length||this.el.parentElement?.localName==="arcgis-toolbar-stack")return;let e=this.#a.exports;if(!e)return;let t={sizes:e,layout:this.layout,relativePosition:this.effectiveRelativeDirection,scale:this.scale,tooltipAppearance:this.tooltipAppearance,toolbarKind:this.toolbarKind},i=this.allocate(t,this._availableLength).reduce((r,{budget:a})=>r+a,0);if(this.allocatedLength===void 0){let{minimum:r,maximum:a}=this.measureIntrinsicSize(t);return l`<div class="intrinsic-sizing-container">${R(r,a,this.layout)}${this.proxiedRender(t,i,this.toolbarKind,this._availableLength)}</div>`}return this.proxiedRender(t,i,this.toolbarKind,this._availableLength)}};g("arcgis-toolbar",d);export{d as ArcgisToolbar};
2
+ import{a as y,b as f,c as $,d as R,e as x,f as B}from"./Y3APNPN4.js";import{b as v,f as o}from"./OBMF3G26.js";import{c as _}from"./VTAQRKNF.js";import"./H4Q2JVNO.js";import{a as b}from"./ZA4TGNE2.js";import{K as u,L as m,N as h,R as g,j as l,t as p}from"./JEPW4X7U.js";var d=class extends m{constructor(){super(),this.#e=new ResizeObserver(e=>this._updateMeasurement(e)),this.#t=new MutationObserver(()=>this._syncGroups()),this.#r=_(),this.#a=new B(this),this._layout="horizontal",this._setRenderedBar=e=>{e==null&&(this._renderedBar=void 0,this._hydratedRenderedBar=void 0),!(e===this._renderedBar||e===this._hydratedRenderedBar)&&(this._renderedBar=e,this._hydratedRenderedBar=void 0,e&&e.componentOnReady().then(()=>{!this.isConnected||this._renderedBar!==e||(this._hydratedRenderedBar=e)}))},this.scale="m",this.tooltipAppearance="native",this.relativePosition="top-left",this.toolbarKind="floating",this.arcgisInternalLayoutUpdate=p(),this.listen("arcgisInternalLayoutUpdate",e=>{e.target!==this.el&&this.requestUpdate(),this.el.parentElement?.localName!=="arcgis-toolbar-stack"&&e.stopPropagation()})}static{this.properties={_observedSize:16,_availableLength:16,_groups:16,_renderedBar:16,_hydratedRenderedBar:16,layout:3,scale:3,tooltipAppearance:1,relativePosition:1,toolbarKind:3,allocatedLength:11,barElement:32,effectiveRelativeDirection:16}}static{this.styles=[$,y,f,x]}#e;#t;#i;#r;#a;get _availableLength(){return this.allocatedLength??(this.layout==="horizontal"?this._observedSize?.width:this._observedSize?.height)??0}get layout(){return this._layout}set layout(e){e!==this._layout&&(this._layout=e)}get barElement(){return this._hydratedRenderedBar}get effectiveRelativeDirection(){let[e,t]=this.relativePosition.split("-"),i=this.#r;switch(t){case"left":case"right":return`${e}-${t}`;case"end":return`${e}-${i==="ltr"?"right":"left"}`;case"start":return`${e}-${i==="ltr"?"left":"right"}`}}measure(e){let t=this._groups;if(!t?.length)return[0];let i=t.map(r=>r.measure(e)).reduce((r,a)=>r.flatMap(s=>a.map(n=>s+n)),[0]).map(r=>o(t,e,r).reduce((a,{budget:s})=>a+s,0));return Array.from(new Set(i)).sort((r,a)=>r-a)}measureIntrinsicSize(e){let t=this._groups??[],i=r=>o(t,e,r).reduce((a,{budget:s})=>a+s,0);return{minimum:i(0),maximum:i(1/0)}}allocate(e,t){let i=this._groups;return i?.length?o(i,e,t):[]}proxiedRender(e,t,i=this.toolbarKind,r=t){if(!this._groups?.length)return;let a=this.allocate(e,t),[s,n]=e.relativePosition.split("-"),c=e.layout==="horizontal"?{maxWidth:`${r}px`}:{maxHeight:`${r}px`};return b(this,l`<div class=${`toolbar-grid-wrapper ${n} ${s}`} style=${h(c)}><div class="toolbar-shadow-wrapper" style=${h(c)}><calcite-action-bar expand-toggle-disabled .floating=${i==="floating"} .layout=${e.layout} overflow-mode=none .scale=${e.scale} ${u(this._setRenderedBar)}>${a.map(({group:L,budget:z})=>L.proxiedRender(e,z))}</calcite-action-bar></div></div>`)}connectedCallback(){super.connectedCallback(),this.el.parentElement?.localName!=="arcgis-toolbar-stack"&&this.#e.observe(this.el),this.#t.observe(this.el,{childList:!0}),this._syncGroups()}disconnectedCallback(){this.#e.disconnect(),this.#t.disconnect(),super.disconnectedCallback()}_updateMeasurement(e){this._observedSize=e?.at(0)?.contentRect}_syncGroups(){this.#i?.abort();let e=Array.from(this.el.children).filter(v),t=new AbortController;this.#i=t,Promise.all(e.map(i=>i.componentOnReady())).then(()=>{!this.isConnected||t.signal.aborted||(this._groups=e,this.arcgisInternalLayoutUpdate.emit())})}render(){if(!this._groups?.length||this.el.parentElement?.localName==="arcgis-toolbar-stack")return;let e=this.#a.exports;if(!e)return;let t={sizes:e,layout:this.layout,relativePosition:this.effectiveRelativeDirection,scale:this.scale,tooltipAppearance:this.tooltipAppearance,toolbarKind:this.toolbarKind},i=this.allocate(t,this._availableLength).reduce((r,{budget:a})=>r+a,0);if(this.allocatedLength===void 0){let{minimum:r,maximum:a}=this.measureIntrinsicSize(t);return l`<div class="intrinsic-sizing-container">${R(r,a,this.layout)}${this.proxiedRender(t,i,this.toolbarKind,this._availableLength)}</div>`}return this.proxiedRender(t,i,this.toolbarKind,this._availableLength)}};g("arcgis-toolbar",d);export{d as ArcgisToolbar};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as g}from"./2GBIDGIK.js";import{c as y,e as p}from"./GZXN456V.js";import{b as u}from"./H4Q2JVNO.js";import{L as d,M as r,O as n,R as m,h,j as i,t as s}from"./3X2MVQTG.js";var _=h`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"]){min-block-size:var(--calcite-size-xl)}:host([layout="vertical"]){min-inline-size:var(--calcite-size-xl);calcite-action-bar{min-block-size:min-content}}slot{display:flex;flex:1 1 auto;min-block-size:var(--calcite-size-xl);min-inline-size:0}slot.empty{display:none}.container{display:flex;flex-direction:column;block-size:100%;inline-size:100%;min-block-size:0;min-inline-size:0}.root{display:flex;flex-direction:row;align-items:stretch;flex:1;background-color:var(--calcite-color-surface-2);min-block-size:0;min-inline-size:0}.root.vertical-slider{flex-direction:column}.root.vertical-slider slot{flex-direction:column}.root.vertical-slider .separator{border-inline-end:none;border-block-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}calcite-action-bar{flex-shrink:0}:host([floating]) .root{border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-sm));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md));overflow:hidden}calcite-action{align-self:center}:host([layout="vertical"]) calcite-action{margin-block-start:auto}:host([layout="vertical"]) calcite-action:last-of-type{margin-block-end:auto}.separator{border-inline-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}`,c=class extends d{constructor(){super(),this._direction=y(),this.messages=g({blocking:!0}),this._isPlaying=!1,this.autoDestroyDisabled=!1,this.disabled=!1,this.floating=!1,this.hideNextButton=!1,this.hidePlayButton=!1,this.hidePreviousButton=!1,this.icon="list-rectangle",this.label="",this.layout="horizontal",this.loop=!1,this.playRate=1e3,this.arcgisAnimate=s(),this.arcgisNext=s(),this.arcgisPause=s(),this.arcgisPlay=s(),this.arcgisPrevious=s(),this.arcgisPropertyChange=p()("layout","loop","playRate","state"),this.arcgisSlottedElementChange=s(),this.listen("arcgisPropertyChange",()=>this.requestUpdate())}static{this.properties={_isPlaying:16,_slottedElement:16,autoDestroyDisabled:5,disabled:5,floating:7,hideNextButton:5,hidePlayButton:5,hidePreviousButton:5,icon:1,label:1,layout:3,loop:5,playRate:9,state:32}}static{this.styles=_}get state(){return this._isPlaying?"playing":"ready"}async destroy(){await this.manager.destroy()}next(){this.arcgisNext.emit(),this._slottedElement?.canNext&&this._slottedElement.step("next")}pause(){this._isPlaying=!1,this.arcgisPause.emit()}play(){this._isPlaying||(this._isPlaying=!0,this.arcgisPlay.emit(),this._startPlayRate(!0))}previous(){this.arcgisPrevious.emit(),this._slottedElement?.canPrevious&&this._slottedElement.step("previous")}willUpdate(t){t.has("layout")&&this._isElementWithLayout(this._slottedElement)&&(this._slottedElement.layout=this.layout),t.has("disabled")&&this._isElementWithDisabled(this._slottedElement)&&(this._slottedElement.disabled=this.disabled)}disconnectedCallback(){super.disconnectedCallback(),this._isPlaying&&this.pause()}_handleSlotChange(t){let[e]=u(t);this._slottedElement=e,this.arcgisSlottedElementChange.emit({slottedElement:e}),!e&&this._isPlaying&&this.pause(),this._isElementWithLayout(e)&&(e.layout=this.layout),this._isElementWithDisabled(e)&&(e.disabled=this.disabled),this._isElementWithComponentOnReady(e)&&e.componentOnReady().then(()=>{this._slottedElement===e&&this.requestUpdate()})}_isElementWithComponentOnReady(t){return!!t&&"componentOnReady"in t}_isElementWithLayout(t){return!!t&&"layout"in t}_isElementWithDisabled(t){return!!t&&"disabled"in t}_startPlayRate(t){if(this._isPlaying){if(!this._slottedElement?.canNext&&(this.loop||t))this._slottedElement?.reset();else if(this._slottedElement?.step("next"),this._slottedElement&&!this._slottedElement?.canNext&&!this.loop){this.pause();return}this.arcgisAnimate.emit({first:t}),setTimeout(()=>{this._startPlayRate(!1)},this.playRate)}}_renderActions(){let t=this.state==="playing",e=this.layout==="vertical"&&this._slottedElement?.localName==="arcgis-value-picker-slider",a=!this.hidePlayButton&&i`<calcite-action alignment=center .disabled=${this.disabled||this._slottedElement&&!this._slottedElement.canPlay} .icon=${t?"pause":"play"} .text=${t?this.messages.pause:this.messages.play} title=${(t?this.messages.pause:this.messages.play)??n} @click=${()=>{t?this.pause():this.play()}}></calcite-action>`||"",l=!this.hidePreviousButton&&i`<calcite-action alignment=center .disabled=${this.disabled||t||this._slottedElement&&!this._slottedElement.canPrevious} .icon=${this.layout==="horizontal"?"chevron-left":e?"chevron-down":"chevron-up"} .text=${this.messages.previous} title=${this.messages.previous??n} @click=${this.previous}></calcite-action>`||"",o=!this.hideNextButton&&i`<calcite-action alignment=center .disabled=${this.disabled||t||this._slottedElement&&!this._slottedElement.canNext} .icon=${this.layout==="horizontal"?"chevron-right":e?"chevron-up":"chevron-down"} .text=${this.messages.next} title=${this.messages.next??n} @click=${this.next}></calcite-action>`||"";return(this._direction==="rtl"&&this.layout==="horizontal"||e?[a,o,l]:[a,l,o]).filter(Boolean)}render(){let t=!!this._slottedElement&&!this._slottedElement.hidden,e=this._renderActions(),a=e.length>0&&t,l=this.layout==="vertical"&&this._slottedElement?.localName==="arcgis-value-picker-slider";return i`<div class="container"><div class=${r(l?"root vertical-slider":"root")}>${e.length>0&&i`<calcite-action-bar expand-toggle-disabled .layout=${this.layout}>${e}</calcite-action-bar>`||""}${a&&i`<div class="separator"></div>`||""}<slot @slotchange=${({currentTarget:o})=>{this._handleSlotChange(o)}} class=${r(t?"component-slot":"empty")}></slot></div></div>`}};m("arcgis-value-picker",c);export{c as ArcgisValuePicker};
2
+ import{a as g}from"./24JPS4UK.js";import{c as y,e as p}from"./VTAQRKNF.js";import{b as u}from"./H4Q2JVNO.js";import{L as d,M as r,O as n,R as m,h,j as i,t as s}from"./JEPW4X7U.js";var _=h`:host{display:inline-flex;max-inline-size:100%}:host([layout="horizontal"]){min-block-size:var(--calcite-size-xl)}:host([layout="vertical"]){min-inline-size:var(--calcite-size-xl);calcite-action-bar{min-block-size:min-content}}slot{display:flex;flex:1 1 auto;min-block-size:var(--calcite-size-xl);min-inline-size:0}slot.empty{display:none}.container{display:flex;flex-direction:column;block-size:100%;inline-size:100%;min-block-size:0;min-inline-size:0}.root{display:flex;flex-direction:row;align-items:stretch;flex:1;background-color:var(--calcite-color-surface-2);min-block-size:0;min-inline-size:0}.root.vertical-slider{flex-direction:column}.root.vertical-slider slot{flex-direction:column}.root.vertical-slider .separator{border-inline-end:none;border-block-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}calcite-action-bar{flex-shrink:0}:host([floating]) .root{border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-sm));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md));overflow:hidden}calcite-action{align-self:center}:host([layout="vertical"]) calcite-action{margin-block-start:auto}:host([layout="vertical"]) calcite-action:last-of-type{margin-block-end:auto}.separator{border-inline-end:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}`,c=class extends d{constructor(){super(),this._direction=y(),this.messages=g({blocking:!0}),this._isPlaying=!1,this.autoDestroyDisabled=!1,this.disabled=!1,this.floating=!1,this.hideNextButton=!1,this.hidePlayButton=!1,this.hidePreviousButton=!1,this.icon="list-rectangle",this.label="",this.layout="horizontal",this.loop=!1,this.playRate=1e3,this.arcgisAnimate=s(),this.arcgisNext=s(),this.arcgisPause=s(),this.arcgisPlay=s(),this.arcgisPrevious=s(),this.arcgisPropertyChange=p()("layout","loop","playRate","state"),this.arcgisSlottedElementChange=s(),this.listen("arcgisPropertyChange",()=>this.requestUpdate())}static{this.properties={_isPlaying:16,_slottedElement:16,autoDestroyDisabled:5,disabled:5,floating:7,hideNextButton:5,hidePlayButton:5,hidePreviousButton:5,icon:1,label:1,layout:3,loop:5,playRate:9,state:32}}static{this.styles=_}get state(){return this._isPlaying?"playing":"ready"}async destroy(){await this.manager.destroy()}next(){this.arcgisNext.emit(),this._slottedElement?.canNext&&this._slottedElement.step("next")}pause(){this._isPlaying=!1,this.arcgisPause.emit()}play(){this._isPlaying||(this._isPlaying=!0,this.arcgisPlay.emit(),this._startPlayRate(!0))}previous(){this.arcgisPrevious.emit(),this._slottedElement?.canPrevious&&this._slottedElement.step("previous")}willUpdate(t){t.has("layout")&&this._isElementWithLayout(this._slottedElement)&&(this._slottedElement.layout=this.layout),t.has("disabled")&&this._isElementWithDisabled(this._slottedElement)&&(this._slottedElement.disabled=this.disabled)}disconnectedCallback(){super.disconnectedCallback(),this._isPlaying&&this.pause()}_handleSlotChange(t){let[e]=u(t);this._slottedElement=e,this.arcgisSlottedElementChange.emit({slottedElement:e}),!e&&this._isPlaying&&this.pause(),this._isElementWithLayout(e)&&(e.layout=this.layout),this._isElementWithDisabled(e)&&(e.disabled=this.disabled),this._isElementWithComponentOnReady(e)&&e.componentOnReady().then(()=>{this._slottedElement===e&&this.requestUpdate()})}_isElementWithComponentOnReady(t){return!!t&&"componentOnReady"in t}_isElementWithLayout(t){return!!t&&"layout"in t}_isElementWithDisabled(t){return!!t&&"disabled"in t}_startPlayRate(t){if(this._isPlaying){if(!this._slottedElement?.canNext&&(this.loop||t))this._slottedElement?.reset();else if(this._slottedElement?.step("next"),this._slottedElement&&!this._slottedElement?.canNext&&!this.loop){this.pause();return}this.arcgisAnimate.emit({first:t}),setTimeout(()=>{this._startPlayRate(!1)},this.playRate)}}_renderActions(){let t=this.state==="playing",e=this.layout==="vertical"&&this._slottedElement?.localName==="arcgis-value-picker-slider",a=!this.hidePlayButton&&i`<calcite-action alignment=center .disabled=${this.disabled||this._slottedElement&&!this._slottedElement.canPlay} .icon=${t?"pause":"play"} .text=${t?this.messages.pause:this.messages.play} title=${(t?this.messages.pause:this.messages.play)??n} @click=${()=>{t?this.pause():this.play()}}></calcite-action>`||"",l=!this.hidePreviousButton&&i`<calcite-action alignment=center .disabled=${this.disabled||t||this._slottedElement&&!this._slottedElement.canPrevious} .icon=${this.layout==="horizontal"?"chevron-left":e?"chevron-down":"chevron-up"} .text=${this.messages.previous} title=${this.messages.previous??n} @click=${this.previous}></calcite-action>`||"",o=!this.hideNextButton&&i`<calcite-action alignment=center .disabled=${this.disabled||t||this._slottedElement&&!this._slottedElement.canNext} .icon=${this.layout==="horizontal"?"chevron-right":e?"chevron-up":"chevron-down"} .text=${this.messages.next} title=${this.messages.next??n} @click=${this.next}></calcite-action>`||"";return(this._direction==="rtl"&&this.layout==="horizontal"||e?[a,o,l]:[a,l,o]).filter(Boolean)}render(){let t=!!this._slottedElement&&!this._slottedElement.hidden,e=this._renderActions(),a=e.length>0&&t,l=this.layout==="vertical"&&this._slottedElement?.localName==="arcgis-value-picker-slider";return i`<div class="container"><div class=${r(l?"root vertical-slider":"root")}>${e.length>0&&i`<calcite-action-bar expand-toggle-disabled .layout=${this.layout}>${e}</calcite-action-bar>`||""}${a&&i`<div class="separator"></div>`||""}<slot @slotchange=${({currentTarget:o})=>{this._handleSlotChange(o)}} class=${r(t?"component-slot":"empty")}></slot></div></div>`}};m("arcgis-value-picker",c);export{c as ArcgisValuePicker};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as b}from"./PL2HCI3R.js";import{a as g}from"./KK62TWI2.js";import{K as h,L as m,M as p,O as s,R as u,h as r,j as o,t as l}from"./3X2MVQTG.js";var v=r`:host([text-enabled][data-layout="vertical"]){.interaction-container>button{flex-direction:column;>.text-container{writing-mode:vertical-lr}}}`,d=class extends m{constructor(){super(...arguments),this.#e=t=>{t!==this._element&&(this.#t?.disconnect(),this._element=t,this._hydratedElement=void 0,this.isConnected&&this.arcgisRenderedActionChanged.emit({element:t}),t&&(this._measureAction(),this.#t??=new ResizeObserver(e=>{!this.textEnabled||!this._element||this._measureAction(e)}),this.#t.observe(t),t.componentOnReady().then(()=>{!this.isConnected||this._element!==t||(this._hydratedElement=t,t.shadowRoot?.adoptedStyleSheets.push(v.styleSheet))})))},this._measuredWidth=0,this._measuredHeight=0,this.active=!1,this.tooltipText="",this.labelText="",this.disabled=!1,this.loading=!1,this.indicator=!1,this.textEnabled=!1,this.appearance="transparent",this.iconFlipRtl=!1,this.arcgisRenderedActionChanged=l(),this.arcgisToolbarItemSelected=l()}static{this.properties={_element:16,_hydratedElement:16,_measuredWidth:16,_measuredHeight:16,icon:1,active:7,tooltipText:1,labelText:1,disabled:5,loading:5,indicator:5,textEnabled:5,kind:3,appearance:3,iconFlipRtl:5,actionElement:32}}#t;#e;get actionElement(){return this._element}measure({layout:t,scale:e,sizes:i}){let a=i.actionPadding[e],n=i.action[t][e],c=t==="horizontal"?this._measuredWidth:this._measuredHeight;return[Math.max(n,c)+a]}proxiedRender(t){let{tooltipAppearance:e,scale:i}=t,a=this.tooltipText||this.labelText,n=this._hydratedElement,c=e!=="native"&&!!this.tooltipText&&n,_=e==="calcite-dark"?"calcite-mode-dark":void 0,$=b(t);return o`${g(this,o`<calcite-action .active=${this.active} data-appearance=${this.appearance??s} data-kind=${this.kind??s} data-layout=${t.layout??s} .disabled=${this.disabled} .icon=${this.icon} .iconFlipRtl=${this.iconFlipRtl} .indicator=${this.indicator} .label=${a} .loading=${this.loading} @click=${x=>this._handleActionClick(x)} .scale=${i} .text=${this.labelText} .textEnabled=${this.textEnabled} title=${(e==="native"?a:void 0)??s} ${h(this.#e)}></calcite-action>`)}${c?o`<calcite-tooltip class=${p(_)} overlay-positioning=fixed .placement=${$} .referenceElement=${n} .scale=${i}><span>${a}</span></calcite-tooltip>`:void 0}`}disconnectedCallback(){this.#t?.disconnect(),super.disconnectedCallback()}_handleActionClick(t){this.arcgisToolbarItemSelected?.emit({element:t.currentTarget})}_measureAction(t){let e=t?.at(0)?.contentRect??this._element?.getBoundingClientRect();e&&(this._measuredWidth=Math.round(e.width),this._measuredHeight=Math.round(e.height))}};u("arcgis-toolbar-action",d);export{d as ArcgisToolbarAction};
2
+ import{a as b}from"./PL2HCI3R.js";import{a as g}from"./ZA4TGNE2.js";import{K as h,L as m,M as p,O as s,R as u,h as r,j as o,t as l}from"./JEPW4X7U.js";var v=r`:host([text-enabled][data-layout="vertical"]){.interaction-container>button{flex-direction:column;>.text-container{writing-mode:vertical-lr}}}`,d=class extends m{constructor(){super(...arguments),this.#e=t=>{t!==this._element&&(this.#t?.disconnect(),this._element=t,this._hydratedElement=void 0,this.isConnected&&this.arcgisRenderedActionChanged.emit({element:t}),t&&(this._measureAction(),this.#t??=new ResizeObserver(e=>{!this.textEnabled||!this._element||this._measureAction(e)}),this.#t.observe(t),t.componentOnReady().then(()=>{!this.isConnected||this._element!==t||(this._hydratedElement=t,t.shadowRoot?.adoptedStyleSheets.push(v.styleSheet))})))},this._measuredWidth=0,this._measuredHeight=0,this.active=!1,this.tooltipText="",this.labelText="",this.disabled=!1,this.loading=!1,this.indicator=!1,this.textEnabled=!1,this.appearance="transparent",this.iconFlipRtl=!1,this.arcgisRenderedActionChanged=l(),this.arcgisToolbarItemSelected=l()}static{this.properties={_element:16,_hydratedElement:16,_measuredWidth:16,_measuredHeight:16,icon:1,active:7,tooltipText:1,labelText:1,disabled:5,loading:5,indicator:5,textEnabled:5,kind:3,appearance:3,iconFlipRtl:5,actionElement:32}}#t;#e;get actionElement(){return this._element}measure({layout:t,scale:e,sizes:i}){let a=i.actionPadding[e],n=i.action[t][e],c=t==="horizontal"?this._measuredWidth:this._measuredHeight;return[Math.max(n,c)+a]}proxiedRender(t){let{tooltipAppearance:e,scale:i}=t,a=this.tooltipText||this.labelText,n=this._hydratedElement,c=e!=="native"&&!!this.tooltipText&&n,_=e==="calcite-dark"?"calcite-mode-dark":void 0,$=b(t);return o`${g(this,o`<calcite-action .active=${this.active} data-appearance=${this.appearance??s} data-kind=${this.kind??s} data-layout=${t.layout??s} .disabled=${this.disabled} .icon=${this.icon} .iconFlipRtl=${this.iconFlipRtl} .indicator=${this.indicator} .label=${a} .loading=${this.loading} @click=${x=>this._handleActionClick(x)} .scale=${i} .text=${this.labelText} .textEnabled=${this.textEnabled} title=${(e==="native"?a:void 0)??s} ${h(this.#e)}></calcite-action>`)}${c?o`<calcite-tooltip class=${p(_)} overlay-positioning=fixed .placement=${$} .referenceElement=${n} .scale=${i}><span>${a}</span></calcite-tooltip>`:void 0}`}disconnectedCallback(){this.#t?.disconnect(),super.disconnectedCallback()}_handleActionClick(t){this.arcgisToolbarItemSelected?.emit({element:t.currentTarget})}_measureAction(t){let e=t?.at(0)?.contentRect??this._element?.getBoundingClientRect();e&&(this._measuredWidth=Math.round(e.width),this._measuredHeight=Math.round(e.height))}};u("arcgis-toolbar-action",d);export{d as ArcgisToolbarAction};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as o}from"./2GBIDGIK.js";import{e as n}from"./GZXN456V.js";import"./H4Q2JVNO.js";import{L as l,R as r,h as c,j as i}from"./3X2MVQTG.js";var h=c`:host{align-items:center;display:flex;flex:auto;inline-size:300px;min-inline-size:0;padding-inline:var(--calcite-space-sm);--calcite-color-border-input: var(--calcite-color-border-3)}calcite-combobox{flex:auto;width:var(--calcite-space-none)}`,a=class extends l{constructor(){super(...arguments),this.messages=o({blocking:!0}),this.autoDestroyDisabled=!1,this.disabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=n()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,disabled:5,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}static{this.styles=h}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.[0]}step(e){if(!this.items||!this.currentValue)return;let t=this.items.findIndex(({value:s})=>s===this.currentValue?.value)+(e==="next"?1:-1);t>=this.items.length||t<0||(this.currentValue=this.items[t],this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(e){(e.has("currentValue")||e.has("items"))&&this.items?.length&&(this.currentValue??=this.items[0]),this.el.hidden=!this.items?.length,this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let e=this.items.findIndex(({value:t})=>t===this.currentValue?.value);this.canNext=e<this.items.length-1,this.canPrevious=e>0}render(){return i`<calcite-combobox .disabled=${this.disabled} selection-mode=single .label=${this.messages.comboboxLabel} @calciteComboboxChange=${({currentTarget:e})=>{let t=e.selectedItems[0]?.value;this.currentValue=this.items?.find(({value:s})=>s===t),this._checkState()}}>${this.items?.map(e=>i`<calcite-combobox-item .value=${e.value} .heading=${e.label} .selected=${e.value===this.currentValue?.value}></calcite-combobox-item>`)}</calcite-combobox>`}};r("arcgis-value-picker-combobox",a);export{a as ArcgisValuePickerCombobox};
2
+ import{a as o}from"./24JPS4UK.js";import{e as n}from"./VTAQRKNF.js";import"./H4Q2JVNO.js";import{L as l,R as r,h as c,j as i}from"./JEPW4X7U.js";var h=c`:host{align-items:center;display:flex;flex:auto;inline-size:300px;min-inline-size:0;padding-inline:var(--calcite-space-sm);--calcite-color-border-input: var(--calcite-color-border-3)}calcite-combobox{flex:auto;width:var(--calcite-space-none)}`,a=class extends l{constructor(){super(...arguments),this.messages=o({blocking:!0}),this.autoDestroyDisabled=!1,this.disabled=!1,this.canNext=!1,this.canPlay=!1,this.canPrevious=!1,this.arcgisPropertyChange=n()("canNext","canPlay","canPrevious","currentValue")}static{this.properties={autoDestroyDisabled:5,disabled:5,items:0,currentValue:0,canNext:5,canPlay:5,canPrevious:5}}static{this.styles=h}async destroy(){await this.manager.destroy()}reset(){this.currentValue=this.items?.[0]}step(e){if(!this.items||!this.currentValue)return;let t=this.items.findIndex(({value:s})=>s===this.currentValue?.value)+(e==="next"?1:-1);t>=this.items.length||t<0||(this.currentValue=this.items[t],this._checkState())}connectedCallback(){super.connectedCallback(),this.el.hidden=!0}willUpdate(e){(e.has("currentValue")||e.has("items"))&&this.items?.length&&(this.currentValue??=this.items[0]),this.el.hidden=!this.items?.length,this._checkState()}_checkState(){if(!this.items?.length){this.canPlay=!1,this.canNext=!1,this.canPrevious=!1;return}this.canPlay=!0;let e=this.items.findIndex(({value:t})=>t===this.currentValue?.value);this.canNext=e<this.items.length-1,this.canPrevious=e>0}render(){return i`<calcite-combobox .disabled=${this.disabled} selection-mode=single .label=${this.messages.comboboxLabel} @calciteComboboxChange=${({currentTarget:e})=>{let t=e.selectedItems[0]?.value;this.currentValue=this.items?.find(({value:s})=>s===t),this._checkState()}}>${this.items?.map(e=>i`<calcite-combobox-item .value=${e.value} .heading=${e.label} .selected=${e.value===this.currentValue?.value}></calcite-combobox-item>`)}</calcite-combobox>`}};r("arcgis-value-picker-combobox",a);export{a as ArcgisValuePickerCombobox};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as L}from"./PMV2N3L3.js";import{a as E}from"./2GBIDGIK.js";import"./GZXN456V.js";import"./H4Q2JVNO.js";import{L as D,M as C,N as y,O as h,R as k,h as _,j as x,k as d}from"./3X2MVQTG.js";export default $arcgis.t(([{substitute:N}])=>{var B=_`:host{display:block;--arcgis-histogram-bar-color: var(--calcite-color-border-1);--arcgis-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:block;direction:ltr;width:100%;height:100%}.svg{display:block;width:100%;height:100%;overflow:visible}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;function O(t,n,i,e,r,a){let[s,o]=r;if(!t||o===0||s===0||i==null||n==null)return null;let l=i-n,c=(t.length>1?t[t.length-1].maxValue-t[0].minValue:0)/l,[u,m]=e==="vertical"?[o*c,s]:[o,s*c],b=t?t.map(g=>g.count):[],p=Math.max(...b);return t.map(g=>{let[v,f]=e==="vertical"?[u/t.length,p!==0?g.count/p*m:0]:[p!==0?g.count/p*u:0,m/t.length],{maxValue:I}=g,V=i-I,[$,S]=e==="vertical"?[0,V*(o/l)]:[s-f-V*(s/l),o-v];return a&&($=s-$-f),[$,S,f,v]})}function A(t,n,i,e,r,a){if(e===void 0||r===void 0)return[];let s=[];return t!=null&&s.push({value:t,symbol:"x\u0304",lineClass:"average-data-line"}),n!=null&&e!=null&&r!=null&&s.push(...U(e,r,n,i,t)),a&&s.push(...a),s.filter(({value:o})=>o>=e&&o<=r)}function P(t,n,i,e,r,a){if(i==null)return[0,0,0,0];let s=Math.round((r-i)/e*100)/100;a&&n==="horizontal"&&(s=1-s);let[o,l]=t;if(n==="vertical"){let u=l-s*l||1;return u=Math.round(u)+.5,[0,"100%",u,u]}let c=s*o||1;return c=Math.round(c)+.5,[c,c,"100%",0]}function T(t,n,i,e,r,a){if(i==null)return[0,0];let s=Math.round((r-i)/e*100)/100;a&&n==="horizontal"&&(s=1-s);let[o,l]=t;return a&&n==="vertical"?[0,l-s*l]:n==="vertical"?[o,l-s*l]:[0,s*o]}function R(t,n,i){if(!t||t.length===0)return null;if(F(t)){let e=t.map(r=>({...r,color:M(r.color??i)}));return e.unshift({color:n,minValue:Number.NEGATIVE_INFINITY,maxValue:e[0].minValue}),e.push({color:n,minValue:e[e.length-1].maxValue,maxValue:Number.POSITIVE_INFINITY}),e}else return t.map(e=>({...e,color:M(e.color??i)}))}function G(t,n,i,e){if(!t||t.length===0)return i;if(F(t)){let r=Y(t,n);if(r.length===0)return i;if(e){let{color:a=i,weight:s}=r[0],{color:o=i,weight:l}=r[1]??r[0],c=s+l;return`color-mix(in srgb, ${a} ${s/c*100}%, ${o} ${l/c*100}%)`}return r[0].color??i}return H(t,n)}function Y(t,n){let i=[];for(let e of t){let r=Math.max(0,Math.min(n.maxValue,e.maxValue)-Math.max(n.minValue,e.minValue));r>0&&i.push({color:e.color,weight:r})}return i.sort((e,r)=>r.weight-e.weight)}function H(t,n){let i=(n.maxValue-n.minValue)/2+n.minValue;if(i>t[t.length-1].value)return t[t.length-1].color;for(let e=0;e<t.length-1;e++){let r=t[e],a=t[e+1];if(i<=r.value)return r.color;if(i<a.value){let s=(i-r.value)/(a.value-r.value)*100;return`color-mix(in srgb, ${r.color}, ${a.color} ${s}%)`}}return t[t.length-1].color}function F(t){return t[0]!=null&&"minValue"in t[0]}function M(t){if(typeof t=="string")return t;if(Array.isArray(t))return`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]??1})`;let{r:n,g:i,b:e,a:r=1}=t;return`rgba(${n}, ${i}, ${e}, ${r})`}function U(t,n,i,e,r){let a=.06*(n-t);return j(i,e,r).map((s,o,l)=>{let c=l.length/2,u=s>r?"+":"-",m=o>=c?o-c+1:c-o;return{symbol:`${u}${m===1?"":m}\u03C3`,value:s}}).filter(({value:s})=>Math.abs(r-s)>a)}function j(t,n,i){if(i==null||t==null)return[];let e=n,r=[];for(let a=e*-1;a<=e;a++)a!==0&&r.push(i+a*t);return r}var z="var(--arcgis-histogram-bar-color)",J="var(--arcgis-histogram-stop-color)",w=class extends D{constructor(){super(...arguments),this._messages=E(),this._normalizedStops=null,this.#t=(n,i)=>{let e=r=>L(this._messages._lang,this._numberFormatterOptions).format(r);return this.labelFormatter?.(n,i,e)??e(n)},this._numberFormatterOptions={maximumFractionDigits:2},this.containerDimensions=[0,0],this.icon="graph-histogram",this.layout="horizontal",this.mirrored=!1,this.colorBlendingEnabled=!1,this.standardDeviationCount=1}static{this.properties={containerDimensions:16,colorStops:0,icon:3,labelFormatter:0,average:11,messageOverrides:0,standardDeviation:11,bins:0,dataLines:0,label:1,layout:3,max:11,min:11,mirrored:7,colorBlendingEnabled:5,standardDeviationCount:9}}static{this.styles=B}#t;loaded(){let n=new ResizeObserver(r=>{for(let a of r){let{width:s,height:o}=a.contentRect;this.containerDimensions=[s,o]}}),{width:i,height:e}=this.el.getBoundingClientRect();this.containerDimensions=[i,e],n.observe(this.el)}willUpdate(n){n.has("colorStops")&&(this._normalizedStops=R(this.colorStops,z,J))}render(){let{label:n}=this;return x`<div role=img .ariaLabel=${n??void 0} class="content">${this._renderContent()}</div>`}_renderContent(){let{containerDimensions:[n,i]}=this,e="bg-fill",r=n?[d`<defs><clipPath id=${e}><rect height=${i??h} width=${n??h} x=0 y=0 /></clipPath></defs>`,d`<g style=${y({clipPath:`url(#${e})`})}><g>${this._renderBars()}</g></g>`,d`<g>${this._renderLines()}</g>`]:[];return x`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${r}</svg>`}_renderBars(){let{bins:n,_messages:i}=this,e=O(this.bins,this.min,this.max,this.layout,this.containerDimensions,this.mirrored);return!e||!n?null:e.map((r,a)=>{let[s,o,l,c]=r,u=n[a],m=i?.barLabel?N(i.barLabel,u):"";return d`<rect style=${y({fill:G(this._normalizedStops,u,z,this.colorBlendingEnabled)})} .ariaLabel=${m} data-index=${a??h} height=${c??h} role=img shape-rendering=crispEdges stroke-width=0 width=${l??h} x=${s??h} y=${o??h} />`})}_renderLines(){return A(this.average,this.standardDeviation,this.standardDeviationCount,this.min,this.max,this.dataLines)?.map(n=>W({dataLine:n,containerDimensions:this.containerDimensions,layout:this.layout,min:this.min,max:this.max,labelFormatter:this.#t,mirrored:this.mirrored}))}},W=t=>{let{containerDimensions:n,layout:i,min:e,max:r,dataLine:a,labelFormatter:s,mirrored:o}=t,l=r!=null&&e!=null?r-e:0,[c,u,m,b]=P(n,i,e,l,a.value,o),[p,g]=T(n,i,e,l,a.value,o),v="symbol"in a?[d`<tspan class="data-line-symbol">${a.symbol}</tspan>`,d`<tspan>${s(a.value,a.lineClass==="average-data-line"?"average":"standard-deviation")}</tspan>`]:a.label,f="lineClass"in a&&a.lineClass?a.lineClass:"data-line";return d`<g><title>${a.value}</title><line class=${C(f)} shape-rendering=crispEdges x1=${c??h} x2=${u??h} y1=${m??h} y2=${b??h} /><text class="label" text-anchor=${o&&i==="vertical"?"start":"end"} transform=${(i==="horizontal"?"rotate(270)":void 0)??h} x=${p??h} y=${g-2}>${v}</text></g>`};k("arcgis-histogram",w);return w},"intl")
2
+ import{a as L}from"./PMV2N3L3.js";import{a as E}from"./24JPS4UK.js";import"./VTAQRKNF.js";import"./H4Q2JVNO.js";import{L as D,M as C,N as y,O as h,R as k,h as _,j as x,k as d}from"./JEPW4X7U.js";export default $arcgis.t(([{substitute:N}])=>{var B=_`:host{display:block;--arcgis-histogram-bar-color: var(--calcite-color-border-1);--arcgis-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:block;direction:ltr;width:100%;height:100%}.svg{display:block;width:100%;height:100%;overflow:visible}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;function O(t,n,i,e,r,a){let[s,o]=r;if(!t||o===0||s===0||i==null||n==null)return null;let l=i-n,c=(t.length>1?t[t.length-1].maxValue-t[0].minValue:0)/l,[u,m]=e==="vertical"?[o*c,s]:[o,s*c],b=t?t.map(g=>g.count):[],p=Math.max(...b);return t.map(g=>{let[v,f]=e==="vertical"?[u/t.length,p!==0?g.count/p*m:0]:[p!==0?g.count/p*u:0,m/t.length],{maxValue:I}=g,V=i-I,[$,S]=e==="vertical"?[0,V*(o/l)]:[s-f-V*(s/l),o-v];return a&&($=s-$-f),[$,S,f,v]})}function A(t,n,i,e,r,a){if(e===void 0||r===void 0)return[];let s=[];return t!=null&&s.push({value:t,symbol:"x\u0304",lineClass:"average-data-line"}),n!=null&&e!=null&&r!=null&&s.push(...U(e,r,n,i,t)),a&&s.push(...a),s.filter(({value:o})=>o>=e&&o<=r)}function P(t,n,i,e,r,a){if(i==null)return[0,0,0,0];let s=Math.round((r-i)/e*100)/100;a&&n==="horizontal"&&(s=1-s);let[o,l]=t;if(n==="vertical"){let u=l-s*l||1;return u=Math.round(u)+.5,[0,"100%",u,u]}let c=s*o||1;return c=Math.round(c)+.5,[c,c,"100%",0]}function T(t,n,i,e,r,a){if(i==null)return[0,0];let s=Math.round((r-i)/e*100)/100;a&&n==="horizontal"&&(s=1-s);let[o,l]=t;return a&&n==="vertical"?[0,l-s*l]:n==="vertical"?[o,l-s*l]:[0,s*o]}function R(t,n,i){if(!t||t.length===0)return null;if(F(t)){let e=t.map(r=>({...r,color:M(r.color??i)}));return e.unshift({color:n,minValue:Number.NEGATIVE_INFINITY,maxValue:e[0].minValue}),e.push({color:n,minValue:e[e.length-1].maxValue,maxValue:Number.POSITIVE_INFINITY}),e}else return t.map(e=>({...e,color:M(e.color??i)}))}function G(t,n,i,e){if(!t||t.length===0)return i;if(F(t)){let r=Y(t,n);if(r.length===0)return i;if(e){let{color:a=i,weight:s}=r[0],{color:o=i,weight:l}=r[1]??r[0],c=s+l;return`color-mix(in srgb, ${a} ${s/c*100}%, ${o} ${l/c*100}%)`}return r[0].color??i}return H(t,n)}function Y(t,n){let i=[];for(let e of t){let r=Math.max(0,Math.min(n.maxValue,e.maxValue)-Math.max(n.minValue,e.minValue));r>0&&i.push({color:e.color,weight:r})}return i.sort((e,r)=>r.weight-e.weight)}function H(t,n){let i=(n.maxValue-n.minValue)/2+n.minValue;if(i>t[t.length-1].value)return t[t.length-1].color;for(let e=0;e<t.length-1;e++){let r=t[e],a=t[e+1];if(i<=r.value)return r.color;if(i<a.value){let s=(i-r.value)/(a.value-r.value)*100;return`color-mix(in srgb, ${r.color}, ${a.color} ${s}%)`}}return t[t.length-1].color}function F(t){return t[0]!=null&&"minValue"in t[0]}function M(t){if(typeof t=="string")return t;if(Array.isArray(t))return`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]??1})`;let{r:n,g:i,b:e,a:r=1}=t;return`rgba(${n}, ${i}, ${e}, ${r})`}function U(t,n,i,e,r){let a=.06*(n-t);return j(i,e,r).map((s,o,l)=>{let c=l.length/2,u=s>r?"+":"-",m=o>=c?o-c+1:c-o;return{symbol:`${u}${m===1?"":m}\u03C3`,value:s}}).filter(({value:s})=>Math.abs(r-s)>a)}function j(t,n,i){if(i==null||t==null)return[];let e=n,r=[];for(let a=e*-1;a<=e;a++)a!==0&&r.push(i+a*t);return r}var z="var(--arcgis-histogram-bar-color)",J="var(--arcgis-histogram-stop-color)",w=class extends D{constructor(){super(...arguments),this._messages=E(),this._normalizedStops=null,this.#t=(n,i)=>{let e=r=>L(this._messages._lang,this._numberFormatterOptions).format(r);return this.labelFormatter?.(n,i,e)??e(n)},this._numberFormatterOptions={maximumFractionDigits:2},this.containerDimensions=[0,0],this.icon="graph-histogram",this.layout="horizontal",this.mirrored=!1,this.colorBlendingEnabled=!1,this.standardDeviationCount=1}static{this.properties={containerDimensions:16,colorStops:0,icon:3,labelFormatter:0,average:11,messageOverrides:0,standardDeviation:11,bins:0,dataLines:0,label:1,layout:3,max:11,min:11,mirrored:7,colorBlendingEnabled:5,standardDeviationCount:9}}static{this.styles=B}#t;loaded(){let n=new ResizeObserver(r=>{for(let a of r){let{width:s,height:o}=a.contentRect;this.containerDimensions=[s,o]}}),{width:i,height:e}=this.el.getBoundingClientRect();this.containerDimensions=[i,e],n.observe(this.el)}willUpdate(n){n.has("colorStops")&&(this._normalizedStops=R(this.colorStops,z,J))}render(){let{label:n}=this;return x`<div role=img .ariaLabel=${n??void 0} class="content">${this._renderContent()}</div>`}_renderContent(){let{containerDimensions:[n,i]}=this,e="bg-fill",r=n?[d`<defs><clipPath id=${e}><rect height=${i??h} width=${n??h} x=0 y=0 /></clipPath></defs>`,d`<g style=${y({clipPath:`url(#${e})`})}><g>${this._renderBars()}</g></g>`,d`<g>${this._renderLines()}</g>`]:[];return x`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${r}</svg>`}_renderBars(){let{bins:n,_messages:i}=this,e=O(this.bins,this.min,this.max,this.layout,this.containerDimensions,this.mirrored);return!e||!n?null:e.map((r,a)=>{let[s,o,l,c]=r,u=n[a],m=i?.barLabel?N(i.barLabel,u):"";return d`<rect style=${y({fill:G(this._normalizedStops,u,z,this.colorBlendingEnabled)})} .ariaLabel=${m} data-index=${a??h} height=${c??h} role=img shape-rendering=crispEdges stroke-width=0 width=${l??h} x=${s??h} y=${o??h} />`})}_renderLines(){return A(this.average,this.standardDeviation,this.standardDeviationCount,this.min,this.max,this.dataLines)?.map(n=>W({dataLine:n,containerDimensions:this.containerDimensions,layout:this.layout,min:this.min,max:this.max,labelFormatter:this.#t,mirrored:this.mirrored}))}},W=t=>{let{containerDimensions:n,layout:i,min:e,max:r,dataLine:a,labelFormatter:s,mirrored:o}=t,l=r!=null&&e!=null?r-e:0,[c,u,m,b]=P(n,i,e,l,a.value,o),[p,g]=T(n,i,e,l,a.value,o),v="symbol"in a?[d`<tspan class="data-line-symbol">${a.symbol}</tspan>`,d`<tspan>${s(a.value,a.lineClass==="average-data-line"?"average":"standard-deviation")}</tspan>`]:a.label,f="lineClass"in a&&a.lineClass?a.lineClass:"data-line";return d`<g><title>${a.value}</title><line class=${C(f)} shape-rendering=crispEdges x1=${c??h} x2=${u??h} y1=${m??h} y2=${b??h} /><text class="label" text-anchor=${o&&i==="vertical"?"start":"end"} transform=${(i==="horizontal"?"rotate(270)":void 0)??h} x=${p??h} y=${g-2}>${v}</text></g>`};k("arcgis-histogram",w);return w},"intl")