calcite-flow-item.b0c63329.js 44 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import{hk as n,hi as g,hj as b,hm as d,hn as x,ho as te,hp as ie,hq as K,hr as A,hs as ne,ht as X,hu as j}from"./index.6c049565.js";import{g as V}from"./guid.ae96513b.js";import{d as v,a as y}from"./action.30bade26.js";import{d as C}from"./icon.801bf0d0.js";import{d as ae,f as oe,c as se,u as le,a as ce,r as re,F,b as de}from"./tooltip.19efc493.js";import{u as q}from"./interactive.d71a7a54.js";import{c as he}from"./observers.905cc9f1.js";/*!
  2. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  4. * v1.0.0-beta.97
  5. */const W=(e,t)=>{const i=`h${e.level}`;return delete e.level,n(i,{...e},t)};/*!
  6. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  7. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  8. * v1.0.0-beta.97
  9. */function M(e,t){return(e+t)%t}/*!
  10. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  11. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  12. * v1.0.0-beta.97
  13. */function Y(e){return e==="Enter"||e===" "}/*!
  14. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  15. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  16. * v1.0.0-beta.97
  17. */const w=new WeakMap;function me(e){e.propertyName===this.openTransitionProp&&e.target===this.transitionEl&&(this.open?this.onBeforeOpen():this.onBeforeClose())}function ue(e){e.propertyName===this.openTransitionProp&&e.target===this.transitionEl&&(this.open?this.onOpen():this.onClose())}function O(e){if(G(e),e.transitionEl){const t=me.bind(e),i=ue.bind(e);w.set(e,[e.transitionEl,t,i]),e.transitionEl.addEventListener("transitionstart",t),e.transitionEl.addEventListener("transitionend",i)}}function G(e){if(!w.has(e))return;const[t,i,o]=w.get(e);t.removeEventListener("transitionstart",i),t.removeEventListener("transitionend",o),w.delete(e)}/*!
  18. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  19. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  20. * v1.0.0-beta.97
  21. */const m={container:"container",arrow:"arrow",imageContainer:"image-container",closeButtonContainer:"close-button-container",closeButton:"close-button",content:"content",hasHeader:"has-header",header:"header",headerContent:"header-content",heading:"heading"},fe={close:"Close"},pe="auto",z="aria-controls",L="aria-expanded",ge=2;class be{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=t=>{const{registeredElements:i}=this,o=t.find(a=>i.has(a));return i.get(o)},this.togglePopovers=t=>{const i=t.composedPath(),o=this.queryPopover(i);o&&!o.triggerDisabled&&o.toggle(),Array.from(this.registeredElements.values()).filter(a=>a!==o&&a.autoClose&&a.open&&!i.includes(a)).forEach(a=>a.toggle(!1))},this.keyHandler=t=>{t.defaultPrevented||!Y(t.key)||this.togglePopovers(t)},this.clickHandler=t=>{A(t)&&this.togglePopovers(t)}}registerElement(t,i){this.registeredElementCount++,this.registeredElements.set(t,i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(t){this.registeredElements.delete(t)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}addListeners(){document.addEventListener("pointerdown",this.clickHandler,{capture:!0}),document.addEventListener("keydown",this.keyHandler,{capture:!0})}removeListeners(){document.removeEventListener("pointerdown",this.clickHandler,{capture:!0}),document.removeEventListener("keydown",this.keyHandler,{capture:!0})}}const ve='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block;position:absolute;z-index:900}.calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}:host([data-placement^=bottom]) .calcite-floating-ui-anim{transform:translateY(-5px)}:host([data-placement^=top]) .calcite-floating-ui-anim{transform:translateY(5px)}:host([data-placement^=left]) .calcite-floating-ui-anim{transform:translateX(5px)}:host([data-placement^=right]) .calcite-floating-ui-anim{transform:translateX(-5px)}:host([data-placement]) .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.arrow,.arrow::before{position:absolute;inline-size:8px;block-size:8px;z-index:-1}.arrow::before{content:"";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-placement^=top]) .arrow{inset-block-end:-4px}:host([data-placement^=bottom]) .arrow{inset-block-start:-4px}:host([data-placement^=left]) .arrow{direction:ltr;inset-inline-end:-4px}:host([data-placement^=right]) .arrow{direction:ltr;inset-inline-start:-4px}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-floating-ui-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-block-end-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;flex:1 1 auto;align-self:center;white-space:normal;padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:flex;block-size:100%;flex-direction:row;flex-wrap:nowrap;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}.container.has-header{flex-direction:column}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:0.25rem;border-end-end-radius:0.25rem}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%}',R=new be,Ee=g(class extends b{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calcitePopoverBeforeClose=d(this,"calcitePopoverBeforeClose",6),this.calcitePopoverClose=d(this,"calcitePopoverClose",6),this.calcitePopoverBeforeOpen=d(this,"calcitePopoverBeforeOpen",6),this.calcitePopoverOpen=d(this,"calcitePopoverOpen",6),this.autoClose=!1,this.closeButton=!1,this.dismissible=!1,this.closable=!1,this.disableFlip=!1,this.disablePointer=!1,this.offsetDistance=ae,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=pe,this.triggerDisabled=!1,this.intlClose=fe.close,this.guid=`calcite-popover-${V()}`,this.openTransitionProp="opacity",this.hasLoaded=!1,this.setTransitionEl=e=>{this.transitionEl=e,O(this)},this.setFilteredPlacements=()=>{const{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?oe(t,e):null},this.setUpReferenceElement=(e=!0)=>{this.removeReferences(),this.effectiveReferenceElement=this.getReferenceElement(),se(this,this.effectiveReferenceElement,this.el);const{el:t,referenceElement:i,effectiveReferenceElement:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences()},this.getId=()=>this.el.id||this.guid,this.setExpandedAttr=()=>{const{effectiveReferenceElement:e,open:t}=this;!e||"setAttribute"in e&&e.setAttribute(L,x(t))},this.addReferences=()=>{const{effectiveReferenceElement:e}=this;if(!e)return;const t=this.getId();"setAttribute"in e&&e.setAttribute(z,t),R.registerElement(e,this.el),this.setExpandedAttr()},this.removeReferences=()=>{const{effectiveReferenceElement:e}=this;!e||("removeAttribute"in e&&(e.removeAttribute(z),e.removeAttribute(L)),R.unregisterElement(e))},this.hide=()=>{this.open=!1},this.storeArrowEl=e=>{this.arrowEl=e,this.reposition(!0)}}handleDismissible(e){this.closable=e}handleClosable(e){this.dismissible=e}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}offsetDistanceOffsetHandler(){this.reposition(!0)}offsetSkiddingHandler(){this.reposition(!0)}openHandler(e){e?this.reposition(!0):le(this.el),this.setExpandedAttr()}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}connectedCallback(){this.setFilteredPlacements(),O(this);const e=this.closable||this.dismissible;e&&this.handleDismissible(e),e&&this.handleClosable(e),this.setUpReferenceElement(this.hasLoaded)}componentDidLoad(){this.referenceElement&&!this.effectiveReferenceElement&&this.setUpReferenceElement(),this.reposition(),this.hasLoaded=!0}disconnectedCallback(){this.removeReferences(),ce(this,this.effectiveReferenceElement,this.el),G(this)}async reposition(e=!1){const{el:t,effectiveReferenceElement:i,placement:o,overlayPositioning:a,disableFlip:s,filteredFlipPlacements:l,offsetDistance:h,offsetSkidding:p,arrowEl:u}=this;return re(this,{floatingEl:t,referenceEl:i,overlayPositioning:a,placement:o,disableFlip:s,flipPlacements:l,offsetDistance:h,offsetSkidding:p,includeArrow:!this.disablePointer,arrowEl:u,type:"popover"},e)}async setFocus(e){var t;const{closeButtonEl:i}=this;if(e==="close-button"&&i){te(i),i.setFocus();return}(t=this.el)===null||t===void 0||t.focus()}async toggle(e=!this.open){this.open=e}getReferenceElement(){const{referenceElement:e,el:t}=this;return(typeof e=="string"?ie(t,{id:e}):e)||null}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit()}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit()}renderCloseButton(){const{closeButton:e,intlClose:t,heading:i,closable:o}=this;return o||e?n("div",{class:m.closeButtonContainer},n("calcite-action",{class:m.closeButton,onClick:this.hide,ref:a=>this.closeButtonEl=a,scale:i?"s":"m",text:t},n("calcite-icon",{icon:"x",scale:i?"s":"m"}))):null}renderHeader(){const{heading:e,headingLevel:t}=this,i=e?n(W,{class:m.heading,level:t||ge},e):null;return i?n("div",{class:m.header},i,this.renderCloseButton()):null}render(){const{effectiveReferenceElement:e,heading:t,label:i,open:o,disablePointer:a}=this,s=e&&o,l=!s,h=a?null:n("div",{class:m.arrow,ref:this.storeArrowEl});return n(K,{"aria-hidden":x(l),"aria-label":i,"aria-live":"polite","calcite-hydrated-hidden":l,id:this.getId(),role:"dialog"},n("div",{class:{[F.animation]:!0,[F.animationActive]:s},ref:this.setTransitionEl},h,n("div",{class:{[m.hasHeader]:!!t,[m.container]:!0}},this.renderHeader(),n("div",{class:m.content},n("slot",null)),t?null:this.renderCloseButton())))}get el(){return this}static get watchers(){return{dismissible:["handleDismissible"],closable:["handleClosable"],flipPlacements:["flipPlacementsHandler"],offsetDistance:["offsetDistanceOffsetHandler"],offsetSkidding:["offsetSkiddingHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"],referenceElement:["referenceElementHandler"]}}static get style(){return ve}},[1,"calcite-popover",{autoClose:[516,"auto-close"],closeButton:[516,"close-button"],dismissible:[1540],closable:[1540],disableFlip:[516,"disable-flip"],disablePointer:[516,"disable-pointer"],flipPlacements:[16],heading:[1],headingLevel:[514,"heading-level"],label:[1],offsetDistance:[514,"offset-distance"],offsetSkidding:[514,"offset-skidding"],open:[1540],overlayPositioning:[513,"overlay-positioning"],placement:[513],referenceElement:[1,"reference-element"],triggerDisabled:[516,"trigger-disabled"],intlClose:[1,"intl-close"],effectiveReferenceElement:[32],reposition:[64],setFocus:[64],toggle:[64]}]);function B(){if(typeof customElements=="undefined")return;["calcite-popover","calcite-action","calcite-icon","calcite-loader"].forEach(t=>{switch(t){case"calcite-popover":customElements.get(t)||customElements.define(t,Ee);break;case"calcite-action":customElements.get(t)||y();break;case"calcite-icon":customElements.get(t)||C();break;case"calcite-loader":customElements.get(t)||v();break}})}B();/*!
  22. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  23. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  24. * v1.0.0-beta.97
  25. */const T={menu:"menu",defaultTrigger:"default-trigger"},H={tooltip:"tooltip",trigger:"trigger"},ke={menu:"ellipsis"},we="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size-1);color:var(--calcite-ui-text-2)}.menu ::slotted(calcite-action){margin:0.125rem;display:flex;outline-color:transparent}.menu ::slotted(calcite-action[active]){outline:2px solid var(--calcite-ui-brand);outline-offset:0px}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{flex-direction:column;flex-wrap:nowrap;outline:2px solid transparent;outline-offset:2px}",xe=["ArrowUp","ArrowDown","End","Home"],ye=g(class extends b{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calciteActionMenuOpenChange=d(this,"calciteActionMenuOpenChange",6),this.expanded=!1,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.actionElements=[],this.guid=`calcite-action-menu-${V()}`,this.menuId=`${this.guid}-menu`,this.menuButtonId=`${this.guid}-menu-button`,this.activeMenuItemIndex=-1,this.connectMenuButtonEl=()=>{const{menuButtonId:e,menuId:t,open:i,label:o}=this,a=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==a&&(this.disconnectMenuButtonEl(),this.menuButtonEl=a,this.setTooltipReferenceElement(),a&&(a.active=i,a.setAttribute("aria-controls",t),a.setAttribute("aria-expanded",x(i)),a.setAttribute("aria-haspopup","true"),a.id||(a.id=e),a.label||(a.label=o),a.text||(a.text=o),a.addEventListener("pointerdown",this.menuButtonClick),a.addEventListener("keydown",this.menuButtonKeyDown)))},this.disconnectMenuButtonEl=()=>{const{menuButtonEl:e}=this;!e||(e.removeEventListener("pointerdown",this.menuButtonClick),e.removeEventListener("keydown",this.menuButtonKeyDown))},this.setMenuButtonEl=e=>{const t=e.target.assignedElements({flatten:!0}).filter(i=>i==null?void 0:i.matches("calcite-action"));this.slottedMenuButtonEl=t[0],this.connectMenuButtonEl()},this.setDefaultMenuButtonEl=e=>{this.defaultMenuButtonEl=e,this.connectMenuButtonEl()},this.handleCalciteActionClick=()=>{this.open=!1,this.setFocus()},this.menuButtonClick=e=>{!A(e)||this.toggleOpen()},this.updateTooltip=e=>{const t=e.target.assignedElements({flatten:!0}).filter(i=>i==null?void 0:i.matches("calcite-tooltip"));this.tooltipEl=t[0],this.setTooltipReferenceElement()},this.setTooltipReferenceElement=()=>{const{tooltipEl:e,expanded:t,menuButtonEl:i,open:o}=this;e&&(e.referenceElement=!t&&!o?i:null)},this.updateAction=(e,t)=>{const{guid:i,activeMenuItemIndex:o}=this,a=`${i}-action-${t}`;e.tabIndex=-1,e.setAttribute("role","menuitem"),e.id||(e.id=a),e.active=t===o},this.updateActions=e=>{e==null||e.forEach(this.updateAction)},this.handleDefaultSlotChange=e=>{const t=e.target.assignedElements({flatten:!0}).filter(i=>i==null?void 0:i.matches("calcite-action"));this.actionElements=t},this.menuButtonKeyDown=e=>{const{key:t}=e,{actionElements:i,activeMenuItemIndex:o,open:a}=this;if(!!i.length){if(Y(t)){if(e.preventDefault(),!a){this.toggleOpen();return}const s=i[o];s?s.click():this.toggleOpen(!1)}if(t==="Tab"){this.open=!1;return}if(t==="Escape"){this.toggleOpen(!1),e.preventDefault();return}this.handleActionNavigation(e,t,i)}},this.handleActionNavigation=(e,t,i)=>{if(!this.isValidKey(t,xe))return;if(e.preventDefault(),!this.open){this.toggleOpen(),(t==="Home"||t==="ArrowDown")&&(this.activeMenuItemIndex=0),(t==="End"||t==="ArrowUp")&&(this.activeMenuItemIndex=i.length-1);return}t==="Home"&&(this.activeMenuItemIndex=0),t==="End"&&(this.activeMenuItemIndex=i.length-1);const o=this.activeMenuItemIndex;t==="ArrowUp"&&(this.activeMenuItemIndex=M(Math.max(o-1,-1),i.length)),t==="ArrowDown"&&(this.activeMenuItemIndex=M(o+1,i.length))},this.toggleOpenEnd=()=>{this.setFocus(),this.el.removeEventListener("calcitePopoverOpen",this.toggleOpenEnd)},this.toggleOpen=(e=!this.open)=>{this.el.addEventListener("calcitePopoverOpen",this.toggleOpenEnd),this.open=e}}disconnectedCallback(){this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}openHandler(e){this.activeMenuItemIndex=this.open?0:-1,this.menuButtonEl&&(this.menuButtonEl.active=e),this.calciteActionMenuOpenChange.emit(e),this.setTooltipReferenceElement()}closeCalciteActionMenuOnClick(e){!A(e)||e.composedPath().includes(this.el)||(this.open=!1)}activeMenuItemIndexHandler(){this.updateActions(this.actionElements)}async setFocus(){ne(this.menuButtonEl)}renderMenuButton(){const{label:e,scale:t,expanded:i}=this;return n("slot",{name:H.trigger,onSlotchange:this.setMenuButtonEl},n("calcite-action",{class:T.defaultTrigger,icon:ke.menu,ref:this.setDefaultMenuButtonEl,scale:t,text:e,textEnabled:i}))}renderMenuItems(){const{actionElements:e,activeMenuItemIndex:t,open:i,menuId:o,menuButtonEl:a,label:s,placement:l,overlayPositioning:h,flipPlacements:p}=this,u=e[t],S=(u==null?void 0:u.id)||null;return n("calcite-popover",{disablePointer:!0,flipPlacements:p,label:s,offsetDistance:0,open:i,overlayPositioning:h,placement:l,referenceElement:a},n("div",{"aria-activedescendant":S,"aria-labelledby":a==null?void 0:a.id,class:T.menu,id:o,onClick:this.handleCalciteActionClick,role:"menu",tabIndex:-1},n("slot",{onSlotchange:this.handleDefaultSlotChange})))}render(){return n(X,null,this.renderMenuButton(),this.renderMenuItems(),n("slot",{name:H.tooltip,onSlotchange:this.updateTooltip}))}isValidKey(e,t){return!!t.find(i=>i===e)}get el(){return this}static get watchers(){return{expanded:["expandedHandler"],open:["openHandler"],activeMenuItemIndex:["activeMenuItemIndexHandler"]}}static get style(){return we}},[1,"calcite-action-menu",{expanded:[516],flipPlacements:[16],label:[1],open:[1540],overlayPositioning:[513,"overlay-positioning"],placement:[513],scale:[513],menuButtonEl:[32],activeMenuItemIndex:[32],setFocus:[64]},[[9,"pointerdown","closeCalciteActionMenuOnClick"]]]);function P(){if(typeof customElements=="undefined")return;["calcite-action-menu","calcite-action","calcite-icon","calcite-loader","calcite-popover"].forEach(t=>{switch(t){case"calcite-action-menu":customElements.get(t)||customElements.define(t,ye);break;case"calcite-action":customElements.get(t)||y();break;case"calcite-icon":customElements.get(t)||C();break;case"calcite-loader":customElements.get(t)||v();break;case"calcite-popover":customElements.get(t)||B();break}})}P();/*!
  26. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  27. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  28. * v1.0.0-beta.97
  29. */const $={scrim:"scrim",content:"content"},Ce={loading:"Loading"},Be="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:absolute;inset:0px;z-index:700;display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity:0}100%{--tw-text-opacity:1}}.scrim{position:absolute;inset:0px;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background)}.content{padding:1rem}",Se=g(class extends b{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.intlLoading=Ce.loading,this.loading=!1}render(){const{el:e,loading:t,intlLoading:i}=this,o=e.innerHTML.trim().length>0,a=t?n("calcite-loader",{active:!0,label:i}):null,s=o?n("div",{class:$.content},n("slot",null)):null;return n("div",{class:$.scrim},a,s)}get el(){return this}static get style(){return Be}},[1,"calcite-scrim",{intlLoading:[1,"intl-loading"],loading:[516]}]);function I(){if(typeof customElements=="undefined")return;["calcite-scrim","calcite-loader"].forEach(t=>{switch(t){case"calcite-scrim":customElements.get(t)||customElements.define(t,Se);break;case"calcite-loader":customElements.get(t)||v();break}})}I();/*!
  30. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  31. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  32. * v1.0.0-beta.97
  33. */const c={backButton:"back-button",container:"container",header:"header",heading:"heading",summary:"summary",description:"description",headerContent:"header-content",headerActions:"header-actions",headerActionsEnd:"header-actions--end",headerActionsStart:"header-actions--start",contentWrapper:"content-wrapper",contentContainer:"content-container",contentHeight:"content-height",fabContainer:"fab-container",footer:"footer"},E={close:"x",menu:"ellipsis",backLeft:"chevron-left",backRight:"chevron-right"},r={headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerActions:"footer-actions"},k={back:"Back",close:"Close",open:"Open",options:"Options"},Ae=3,He="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden;--calcite-min-header-height:calc(var(--calcite-icon-size) * 3);--calcite-panel-max-height:unset;--calcite-panel-width:100%;--calcite-panel-min-width:unset;--calcite-panel-max-width:unset}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.header{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:0.5rem}.container{margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;background-color:var(--calcite-ui-background);padding:0px;max-block-size:var(--calcite-panel-max-height);inline-size:var(--calcite-panel-width);max-inline-size:var(--calcite-panel-max-width);min-inline-size:var(--calcite-panel-min-width);transition:max-block-size var(--calcite-animation-timing), inline-size var(--calcite-animation-timing)}:host([height-scale=s]){--calcite-panel-max-height:40vh}:host([height-scale=m]){--calcite-panel-max-height:60vh}:host([height-scale=l]){--calcite-panel-max-height:80vh}:host([width-scale=s]){--calcite-panel-width:calc(var(--calcite-panel-width-multiplier) * 12vw);--calcite-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 300px);--calcite-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 150px)}:host([width-scale=m]){--calcite-panel-width:calc(var(--calcite-panel-width-multiplier) * 20vw);--calcite-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 420px);--calcite-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 240px)}:host([width-scale=l]){--calcite-panel-width:calc(var(--calcite-panel-width-multiplier) * 45vw);--calcite-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 680px);--calcite-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 340px)}.container[hidden]{display:none}.header{border-block-end:1px solid;position:sticky;inset-block-start:0px;z-index:400;inline-size:100%;align-items:stretch;justify-content:flex-start;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3);flex:0 0 auto}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:0.75rem;padding-block:0.875rem;margin-inline-end:auto}.header-content .heading,.header-content .description{display:block;overflow-wrap:break-word;padding:0px}.header-content .heading{margin-inline:0px;margin-block:0px 0.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-medium)}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}.back-button{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch}.header-actions--end{margin-inline-start:auto}.content-wrapper{overflow:auto}.content-height{block-size:100%}.content-container{display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;background-color:var(--calcite-ui-background)}.footer{border-block-start:1px solid;position:sticky;inset-block-end:0px;display:flex;inline-size:100%;justify-content:space-evenly;background-color:var(--calcite-ui-foreground-1);border-block-start-color:var(--calcite-ui-border-3);flex:0 0 auto;min-block-size:3rem;padding:0.5rem}.fab-container{position:sticky;inset-block-end:0px;z-index:300;margin-block:0px;margin-inline:auto;display:block;padding:0.5rem;inset-inline:0;inline-size:-moz-fit-content;inline-size:fit-content}[hidden]{display:none}",Pe=g(class extends b{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calcitePanelClose=d(this,"calcitePanelClose",6),this.calcitePanelDismiss=d(this,"calcitePanelDismiss",6),this.calcitePanelDismissedChange=d(this,"calcitePanelDismissedChange",6),this.calcitePanelScroll=d(this,"calcitePanelScroll",6),this.calcitePanelBackClick=d(this,"calcitePanelBackClick",6),this.dismissed=!1,this.closed=!1,this.disabled=!1,this.dismissible=!1,this.closable=!1,this.showBackButton=!1,this.loading=!1,this.menuOpen=!1,this.resizeObserver=he("resize",()=>this.resizeHandler()),this.hasStartActions=!1,this.hasEndActions=!1,this.hasMenuItems=!1,this.hasHeaderContent=!1,this.hasFooterContent=!1,this.hasFooterActions=!1,this.hasFab=!1,this.resizeHandler=()=>{const{panelScrollEl:e}=this;!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number"||(e.tabIndex=e.scrollHeight>e.offsetHeight?0:-1)},this.setContainerRef=e=>{this.containerEl=e},this.setCloseRef=e=>{this.closeButtonEl=e},this.setBackRef=e=>{this.backButtonEl=e},this.panelKeyDownHandler=e=>{this.closable&&e.key==="Escape"&&!e.defaultPrevented&&(this.close(),e.preventDefault())},this.close=()=>{this.closed=!0,this.calcitePanelDismiss.emit(),this.calcitePanelClose.emit()},this.panelScrollHandler=()=>{this.calcitePanelScroll.emit()},this.backButtonClick=()=>{this.calcitePanelBackClick.emit()},this.handleHeaderActionsStartSlotChange=e=>{const t=e.target.assignedElements({flatten:!0});this.hasStartActions=!!t.length},this.handleHeaderActionsEndSlotChange=e=>{const t=e.target.assignedElements({flatten:!0});this.hasEndActions=!!t.length},this.handleHeaderMenuActionsSlotChange=e=>{const t=e.target.assignedElements({flatten:!0});this.hasMenuItems=!!t.length},this.handleHeaderContentSlotChange=e=>{const t=e.target.assignedElements({flatten:!0});this.hasHeaderContent=!!t.length},this.handleFooterSlotChange=e=>{const t=e.target.assignedElements({flatten:!0});this.hasFooterContent=!!t.length},this.handleFooterActionsSlotChange=e=>{const t=e.target.assignedElements({flatten:!0});this.hasFooterActions=!!t.length},this.handleFabSlotChange=e=>{const t=e.target.assignedElements({flatten:!0});this.hasFab=!!t.length},this.setPanelScrollEl=e=>{var t,i;this.panelScrollEl=e,(t=this.resizeObserver)===null||t===void 0||t.disconnect(),e&&((i=this.resizeObserver)===null||i===void 0||i.observe(e),this.resizeHandler())}}dismissedHandler(e){this.closed=e,this.calcitePanelDismissedChange.emit()}closedHandler(e){this.dismissed=e}dismissibleHandler(e){this.closable=e}closableHandler(e){this.dismissible=e}componentDidRender(){q(this)}connectedCallback(){const e=this.dismissed||this.closed,t=this.dismissible||this.closable;e&&(this.dismissedHandler(e),this.closedHandler(e)),t&&(this.dismissibleHandler(t),this.closableHandler(t))}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0||e.disconnect()}async setFocus(e){const{backButtonEl:t,closeButtonEl:i,containerEl:o}=this;if(e==="back-button"){t==null||t.setFocus();return}if(e==="dismiss-button"){i==null||i.setFocus();return}if(t){t.setFocus();return}if(i){i.setFocus();return}o==null||o.focus()}async scrollContentTo(e){var t;(t=this.panelScrollEl)===null||t===void 0||t.scrollTo(e)}renderBackButton(){const{el:e}=this,t=j(e)==="rtl",{showBackButton:i,intlBack:o,backButtonClick:a}=this,s=o||k.back,l=t?E.backRight:E.backLeft;return i?n("calcite-action",{"aria-label":s,class:c.backButton,icon:l,key:"back-button",onClick:a,ref:this.setBackRef,scale:"s",slot:r.headerActionsStart,text:s}):null}renderHeaderContent(){const{heading:e,headingLevel:t,summary:i,description:o,hasHeaderContent:a}=this,s=e?n(W,{class:c.heading,level:t||Ae},e):null,l=o||i?n("span",{class:c.description},o||i):null;return!a&&(s||l)?n("div",{class:c.headerContent,key:"header-content"},s,l):null}renderHeaderSlottedContent(){return n("div",{class:c.headerContent,hidden:!this.hasHeaderContent,key:"slotted-header-content"},n("slot",{name:r.headerContent,onSlotchange:this.handleHeaderContentSlotChange}))}renderHeaderStartActions(){const{hasStartActions:e}=this;return n("div",{class:{[c.headerActionsStart]:!0,[c.headerActions]:!0},hidden:!e,key:"header-actions-start"},n("slot",{name:r.headerActionsStart,onSlotchange:this.handleHeaderActionsStartSlotChange}))}renderHeaderActionsEnd(){const{close:e,hasEndActions:t,intlClose:i,closable:o}=this,a=i||k.close,s=o?n("calcite-action",{"aria-label":a,icon:E.close,onClick:e,ref:this.setCloseRef,text:a}):null,l=n("slot",{name:r.headerActionsEnd,onSlotchange:this.handleHeaderActionsEndSlotChange}),h=t||s;return n("div",{class:{[c.headerActionsEnd]:!0,[c.headerActions]:!0},hidden:!h,key:"header-actions-end"},l,s)}renderMenu(){const{hasMenuItems:e,intlOptions:t,menuOpen:i}=this;return n("calcite-action-menu",{flipPlacements:["top","bottom"],hidden:!e,key:"menu",label:t||k.options,open:i,placement:"bottom-end"},n("calcite-action",{icon:E.menu,slot:H.trigger,text:t||k.options}),n("slot",{name:r.headerMenuActions,onSlotchange:this.handleHeaderMenuActionsSlotChange}))}renderHeaderNode(){const{showBackButton:e,hasHeaderContent:t,hasStartActions:i,hasEndActions:o,closable:a,hasMenuItems:s}=this,l=this.renderHeaderContent(),h=e||t||l||i||o||a||s;return n("header",{class:c.header,hidden:!h},this.renderBackButton(),this.renderHeaderStartActions(),this.renderHeaderSlottedContent(),l,this.renderHeaderActionsEnd(),this.renderMenu())}renderFooterNode(){const{hasFooterContent:e,hasFooterActions:t}=this,i=e||t;return n("footer",{class:c.footer,hidden:!i},n("slot",{key:"footer-slot",name:r.footer,onSlotchange:this.handleFooterSlotChange}),n("slot",{key:"footer-actions-slot",name:r.footerActions,onSlotchange:this.handleFooterActionsSlotChange}))}renderContent(){const{hasFab:e}=this,t=n("slot",{key:"default-slot"}),i=e?n("section",{class:c.contentContainer},t):t;return n("div",{class:{[c.contentWrapper]:!0,[c.contentContainer]:!e,[c.contentHeight]:e},onScroll:this.panelScrollHandler,ref:this.setPanelScrollEl},i,this.renderFab())}renderFab(){return n("div",{class:c.fabContainer,hidden:!this.hasFab},n("slot",{name:r.fab,onSlotchange:this.handleFabSlotChange}))}render(){const{loading:e,panelKeyDownHandler:t,closed:i,closable:o}=this,a=n("article",{"aria-busy":x(e),class:c.container,hidden:i,onKeyDown:t,ref:this.setContainerRef,tabIndex:o?0:-1},this.renderHeaderNode(),this.renderContent(),this.renderFooterNode());return n(X,null,e?n("calcite-scrim",{loading:e}):null,a)}get el(){return this}static get watchers(){return{dismissed:["dismissedHandler"],closed:["closedHandler"],dismissible:["dismissibleHandler"],closable:["closableHandler"]}}static get style(){return He}},[1,"calcite-panel",{dismissed:[1540],closed:[1540],beforeBack:[16],disabled:[516],dismissible:[1540],closable:[1540],headingLevel:[514,"heading-level"],showBackButton:[516,"show-back-button"],intlBack:[1,"intl-back"],heightScale:[513,"height-scale"],widthScale:[513,"width-scale"],loading:[516],intlClose:[1,"intl-close"],intlOptions:[1,"intl-options"],heading:[1],summary:[1],description:[1],menuOpen:[516,"menu-open"],hasStartActions:[32],hasEndActions:[32],hasMenuItems:[32],hasHeaderContent:[32],hasFooterContent:[32],hasFooterActions:[32],hasFab:[32],setFocus:[64],scrollContentTo:[64]}]);function J(){if(typeof customElements=="undefined")return;["calcite-panel","calcite-action","calcite-action-menu","calcite-icon","calcite-loader","calcite-popover","calcite-scrim"].forEach(t=>{switch(t){case"calcite-panel":customElements.get(t)||customElements.define(t,Pe);break;case"calcite-action":customElements.get(t)||y();break;case"calcite-action-menu":customElements.get(t)||P();break;case"calcite-icon":customElements.get(t)||C();break;case"calcite-loader":customElements.get(t)||v();break;case"calcite-popover":customElements.get(t)||B();break;case"calcite-scrim":customElements.get(t)||I();break}})}J();/*!
  34. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  35. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  36. * v1.0.0-beta.97
  37. */const Ie={backButton:"back-button"},U={backLeft:"chevron-left",backRight:"chevron-right"},De={back:"Back"},f={headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerActions:"footer-actions"},_e="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.back-button{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}",Q=g(class extends b{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.calciteFlowItemBack=d(this,"calciteFlowItemBack",6),this.calciteFlowItemBackClick=d(this,"calciteFlowItemBackClick",6),this.calciteFlowItemScroll=d(this,"calciteFlowItemScroll",6),this.calciteFlowItemClose=d(this,"calciteFlowItemClose",6),this.closable=!1,this.closed=!1,this.disabled=!1,this.loading=!1,this.menuOpen=!1,this.showBackButton=!1,this.handlePanelScroll=e=>{e.stopPropagation(),this.calciteFlowItemScroll.emit()},this.handlePanelClose=e=>{e.stopPropagation(),this.calciteFlowItemClose.emit()},this.backButtonClick=()=>{this.calciteFlowItemBackClick.emit(),this.calciteFlowItemBack.emit()},this.setBackRef=e=>{this.backButtonEl=e},this.setContainerRef=e=>{this.containerEl=e},this.getBackLabel=()=>this.intlBack||De.back}componentDidRender(){q(this)}async setFocus(){const{backButtonEl:e,containerEl:t}=this;if(e){e.setFocus();return}t==null||t.setFocus()}async scrollContentTo(e){var t;await((t=this.containerEl)===null||t===void 0?void 0:t.scrollContentTo(e))}renderBackButton(){const{el:e}=this,t=j(e)==="rtl",{showBackButton:i,backButtonClick:o}=this,a=this.getBackLabel(),s=t?U.backRight:U.backLeft;return i?n("calcite-action",{"aria-label":a,class:Ie.backButton,icon:s,key:"flow-back-button",onClick:o,ref:this.setBackRef,scale:"s",slot:"header-actions-start",text:a}):null}render(){const{closable:e,closed:t,description:i,disabled:o,heading:a,headingLevel:s,heightScale:l,intlBack:h,intlClose:p,intlOptions:u,loading:S,menuOpen:N,widthScale:ee,backButtonEl:D}=this,_=this.getBackLabel();return n(K,null,n("calcite-panel",{closable:e,closed:t,description:i,disabled:o,heading:a,headingLevel:s,heightScale:l,intlBack:h,intlClose:p,intlOptions:u,loading:S,menuOpen:N,onCalcitePanelClose:this.handlePanelClose,onCalcitePanelScroll:this.handlePanelScroll,ref:this.setContainerRef,widthScale:ee},this.renderBackButton(),n("slot",{name:f.headerActionsStart,slot:r.headerActionsStart}),n("slot",{name:f.headerActionsEnd,slot:r.headerActionsEnd}),n("slot",{name:f.headerContent,slot:r.headerContent}),n("slot",{name:f.headerMenuActions,slot:r.headerMenuActions}),n("slot",{name:f.fab,slot:r.fab}),n("slot",{name:f.footerActions,slot:r.footerActions}),n("slot",{name:f.footer,slot:r.footer}),n("slot",null)),D?n("calcite-tooltip",{label:_,placement:"auto",referenceElement:D},_):null)}get el(){return this}static get style(){return _e}},[1,"calcite-flow-item",{closable:[1540],closed:[1540],beforeBack:[16],description:[1],disabled:[516],heading:[1],headingLevel:[514,"heading-level"],heightScale:[513,"height-scale"],intlBack:[1,"intl-back"],intlClose:[1,"intl-close"],intlOptions:[1,"intl-options"],loading:[516],menuOpen:[516,"menu-open"],showBackButton:[516,"show-back-button"],widthScale:[513,"width-scale"],backButtonEl:[32],setFocus:[64],scrollContentTo:[64]}]);function Z(){if(typeof customElements=="undefined")return;["calcite-flow-item","calcite-action","calcite-action-menu","calcite-icon","calcite-loader","calcite-panel","calcite-popover","calcite-scrim","calcite-tooltip"].forEach(t=>{switch(t){case"calcite-flow-item":customElements.get(t)||customElements.define(t,Q);break;case"calcite-action":customElements.get(t)||y();break;case"calcite-action-menu":customElements.get(t)||P();break;case"calcite-icon":customElements.get(t)||C();break;case"calcite-loader":customElements.get(t)||v();break;case"calcite-panel":customElements.get(t)||J();break;case"calcite-popover":customElements.get(t)||B();break;case"calcite-scrim":customElements.get(t)||I();break;case"calcite-tooltip":customElements.get(t)||de();break}})}Z();const $e=Q,Ue=Z;export{$e as CalciteFlowItem,Ue as defineCustomElement};