// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("exports ./componentsUtils ./dom ./focusTrapComponent ./loadable ./observers ./openCloseComponent ./loader ./scrim".split(" "),function(d,b,e,c,f,k,l,m,n){function g(){"undefined"!==typeof customElements&&["calcite-sheet","calcite-loader","calcite-scrim"].forEach(a=>{switch(a){case "calcite-sheet":customElements.get(a)||customElements.define(a,h);break;case "calcite-loader":customElements.get(a)||m.defineCustomElement();break;case "calcite-scrim":customElements.get(a)||n.defineCustomElement()}})} const h=b.proxyCustomElement(class extends b.H{constructor(){super();this.__registerHost();this.__attachShadow();this.calciteSheetBeforeClose=b.createEvent(this,"calciteSheetBeforeClose",6);this.calciteSheetClose=b.createEvent(this,"calciteSheetClose",6);this.calciteSheetBeforeOpen=b.createEvent(this,"calciteSheetBeforeOpen",6);this.calciteSheetOpen=b.createEvent(this,"calciteSheetOpen",6);this.openTransitionProp="opacity";this.ignoreOpenChange=!1;this.mutationObserver=k.createObserver("mutation", ()=>this.handleMutationObserver());this.setTransitionEl=a=>{this.transitionEl=a;this.contentId=e.ensureId(a)};this.openEnd=()=>{this.setFocus();this.el.removeEventListener("calciteSheetOpen",this.openEnd)};this.handleOutsideClose=()=>{this.outsideCloseDisabled||(this.open=!1)};this.closeSheet=async()=>{if(this.beforeClose)try{await this.beforeClose(this.el)}catch(a){requestAnimationFrame(()=>{this.open=this.ignoreOpenChange=!0;this.ignoreOpenChange=!1});return}this.opened=!1;this.removeOverflowHiddenClass()}; this.beforeClose=void 0;this.displayMode="overlay";this.escapeDisabled=!1;this.heightScale="m";this.focusTrapDisabled=!1;this.label=void 0;this.outsideCloseDisabled=this.opened=this.open=!1;this.position="inline-start";this.slottedInShell=void 0;this.widthScale="m"}handleFocusTrapDisabled(a){this.open&&(a?c.deactivateFocusTrap(this):c.activateFocusTrap(this))}toggleSheet(a){this.ignoreOpenChange||(a?this.openSheet():this.closeSheet())}handleOpenedChange(){l.onToggleOpenCloseComponent(this)}async componentWillLoad(){f.setUpLoadableComponent(this); this.open&&requestAnimationFrame(()=>this.openSheet())}componentDidLoad(){f.setComponentLoaded(this)}connectedCallback(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0});c.connectFocusTrap(this)}disconnectedCallback(){this.removeOverflowHiddenClass();this.mutationObserver?.disconnect();c.deactivateFocusTrap(this);this.slottedInShell=!1}render(){const a=e.getElementDir(this.el);return b.h(b.Host,{key:"63e321ecb08bf8d274ed051308ac0a641f92feba","aria-describedby":this.contentId,"aria-label":this.label, "aria-modal":"true",role:"dialog"},b.h("div",{key:"7b05d963fc37d3e72cc9eaa5a391c4b72e30a322",class:{container:!0,["container--open"]:this.opened,["container--slotted-in-shell"]:this.slottedInShell,[b.CSS_UTILITY.rtl]:"rtl"===a}},b.h("calcite-scrim",{key:"4a449289c1ebbaee0ebab426b50f2fe4799da402",class:"scrim",onClick:this.handleOutsideClose}),b.h("div",{key:"867ffa02a11bd73464e0c03d4acc51edfba81564",class:{content:!0},ref:this.setTransitionEl},b.h("slot",{key:"b649ebed0a8a92e8ac9a1d5de824820554e5205d"}))))}handleEscape(a){!this.open|| this.escapeDisabled||"Escape"!==a.key||a.defaultPrevented||(this.open=!1,a.preventDefault())}async setFocus(){await f.componentFocusable(this);e.focusFirstTabbable(this.el)}async updateFocusTrapElements(){c.updateFocusTrapElements(this)}onBeforeOpen(){this.calciteSheetBeforeOpen.emit()}onOpen(){this.calciteSheetOpen.emit();c.activateFocusTrap(this)}onBeforeClose(){this.calciteSheetBeforeClose.emit()}onClose(){this.calciteSheetClose.emit();c.deactivateFocusTrap(this)}openSheet(){this.el.addEventListener("calciteSheetOpen", this.openEnd);this.opened=!0;this.slottedInShell||(this.initialOverflowCSS=document.documentElement.style.overflow,document.documentElement.style.setProperty("overflow","hidden"))}removeOverflowHiddenClass(){document.documentElement.style.setProperty("overflow",this.initialOverflowCSS)}handleMutationObserver(){this.updateFocusTrapElements()}get el(){return this}static get watchers(){return{focusTrapDisabled:["handleFocusTrapDisabled"],open:["toggleSheet"],opened:["handleOpenedChange"]}}static get style(){return":host{position:absolute;inset:0px;z-index:var(--calcite-z-index-overlay);display:flex;visibility:hidden !important;--calcite-sheet-scrim-background-internal:rgba(0, 0, 0, 0.85);--calcite-scrim-shadow-block-start-internal:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--calcite-scrim-shadow-block-end-internal:0 -4px 8px -1px rgba(0, 0, 0, 0.08), 0 -2px 4px -1px rgba(0, 0, 0, 0.04);--calcite-scrim-shadow-inline-start-internal:4px 0 8px -1px rgba(0, 0, 0, 0.08), 2px 0 4px -1px rgba(0, 0, 0, 0.04);--calcite-scrim-shadow-inline-end-internal:-4px 0 8px -1px rgba(0, 0, 0, 0.08), -2px 0 4px -1px rgba(0, 0, 0, 0.04)}.calcite--rtl{--calcite-scrim-shadow-inline-start-internal:-4px 0 8px -1px rgba(0, 0, 0, 0.08), -2px 0 4px -1px rgba(0, 0, 0, 0.04);--calcite-scrim-shadow-inline-end-internal:4px 0 8px -1px rgba(0, 0, 0, 0.08), 2px 0 4px -1px rgba(0, 0, 0, 0.04)}.container{visibility:hidden;position:fixed;z-index:var(--calcite-z-index-overlay);display:flex;overflow-y:hidden;color:var(--calcite-color-text-2);opacity:0;transition:visibility 0ms linear var(--calcite-internal-animation-timing-medium), opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(0.215, 0.44, 0.42, 0.88)}:host([position\x3dinline-start]) .container{justify-content:flex-start;inset-block:0;inset-inline:0 auto;--calcite-sheet-hidden-position-internal:translate3d(-1rem, 0, 0)}:host([position\x3dinline-end]) .container{justify-content:flex-end;inset-block:0;inset-inline:auto 0;--calcite-sheet-hidden-position-internal:translate3d(1rem, 0, 0)}:host([position\x3dblock-start]) .container{align-items:flex-start;inset-block:0 auto;inset-inline:0;--calcite-sheet-hidden-position-internal:translate3d(0, -1rem, 0)}:host([position\x3dblock-end]) .container{align-items:flex-end;inset-block:auto 0;inset-inline:0;--calcite-sheet-hidden-position-internal:translate3d(0, 1rem, 0)}:host([display-mode\x3dfloat]) .content{--tw-shadow:0 2px 12px -4px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.16);--tw-shadow-colored:0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([display-mode\x3doverlay][position\x3dinline-start]) .container{box-shadow:var(--calcite-scrim-shadow-inline-start-internal)}:host([display-mode\x3doverlay][position\x3dinline-end]) .container{box-shadow:var(--calcite-scrim-shadow-inline-end-internal)}:host([display-mode\x3doverlay][position\x3dblock-start]) .container{box-shadow:var(--calcite-scrim-shadow-block-start-internal)}:host([display-mode\x3doverlay][position\x3dblock-end]) .container{box-shadow:var(--calcite-scrim-shadow-block-end-internal)}:host([position^\x3dinline]) .container,:host([position^\x3dinline]) .content{inline-size:var(--calcite-sheet-width-internal);max-inline-size:var(--calcite-sheet-max-width-internal);min-inline-size:var(--calcite-sheet-min-width-internal)}:host([position^\x3dblock]) .container,:host([position^\x3dblock]) .content{block-size:var(--calcite-sheet-height-internal);max-block-size:var(--calcite-sheet-max-height-internal);min-block-size:var(--calcite-sheet-min-height-internal)}:host([display-mode\x3dfloat][position^\x3dinline]) .container{block-size:calc(100% - 1.5rem);max-block-size:calc(100% - 1.5rem);min-block-size:calc(100% - 1.5rem)}:host([display-mode\x3dfloat][position^\x3dblock]) .container{inline-size:calc(100% - 1.5rem);max-inline-size:calc(100% - 1.5rem);min-inline-size:calc(100% - 1.5rem)}:host([position^\x3dinline][width-scale\x3ds]){--calcite-sheet-width-internal:var(--calcite-sheet-width, 15vw);--calcite-sheet-max-width-internal:var(--calcite-sheet-max-width, 360px);--calcite-sheet-min-width-internal:var(--calcite-sheet-min-width, 260px)}:host([position^\x3dinline][width-scale\x3dm]){--calcite-sheet-width-internal:var(--calcite-sheet-width, 25vw);--calcite-sheet-max-width-internal:var(--calcite-sheet-max-width, 420px);--calcite-sheet-min-width-internal:var(--calcite-sheet-min-width, 300px)}:host([position^\x3dinline][width-scale\x3dl]){--calcite-sheet-width-internal:var(--calcite-sheet-width, 45vw);--calcite-sheet-max-width-internal:var(--calcite-sheet-max-width, 680px);--calcite-sheet-min-width-internal:var(--calcite-sheet-min-width, 340px)}:host([position^\x3dblock][height-scale\x3ds]){--calcite-sheet-min-height-internal:var(--calcite-sheet-min-height, 160px);--calcite-sheet-height-internal:var(--calcite-sheet-height, 30vh);--calcite-sheet-max-height-internal:var(--calcite-sheet-max-height, 30vh)}:host([position^\x3dblock][height-scale\x3dm]){--calcite-sheet-min-height-internal:var(--calcite-sheet-min-height, 200px);--calcite-sheet-height-internal:var(--calcite-sheet-height, 45vh);--calcite-sheet-max-height-internal:var(--calcite-sheet-max-height, 50vh)}:host([position^\x3dblock][height-scale\x3dl]){--calcite-sheet-min-height-internal:var(--calcite-sheet-min-height, 240px);--calcite-sheet-height-internal:var(--calcite-sheet-height, 60vh);--calcite-sheet-max-height-internal:var(--calcite-sheet-max-height, 70vh)}.scrim{--calcite-scrim-background:var(--calcite-sheet-scrim-background, var(--calcite-sheet-scrim-background-internal));position:fixed;inset:0px;display:flex;overflow-y:hidden}:host([opened]){visibility:visible !important}.content{position:relative;z-index:var(--calcite-z-index-modal);box-sizing:border-box;display:block;max-block-size:100%;max-inline-size:100%;overflow-y:hidden;padding:0px;background-color:var(--calcite-color-foreground-1);max-block-size:100%;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-medium) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear var(--calcite-internal-animation-timing-medium), opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(0.215, 0.44, 0.42, 0.88);transform:var(--calcite-sheet-hidden-position-internal)}.container--open .content{transform:translate3d(0, 0, 0)}:host([display-mode\x3dfloat]) .content,:host([display-mode\x3dfloat]) .container{border-radius:0.25rem}:host([display-mode\x3dfloat]) .container{padding:0.75rem}.container--open{visibility:visible;opacity:1;transition-delay:0ms}.container--open .content{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-medium) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear, opacity var(--calcite-internal-animation-timing-medium) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-inline-size var(--calcite-internal-animation-timing-medium) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-block-size var(--calcite-internal-animation-timing-medium) cubic-bezier(0.215, 0.44, 0.42, 0.88);transition-delay:0ms}:host([position\x3dinline-start]) .content,:host([position\x3dinline-end]) .content{block-size:100%}:host([position\x3dblock-start]) .content,:host([position\x3dblock-end]) .content{inline-size:100%}:host([position]) .container--slotted-in-shell{pointer-events:auto;position:absolute;inline-size:100%;max-inline-size:100%;min-inline-size:100%;block-size:100%;max-block-size:100%;min-block-size:100%}:host([position]) .container--slotted-in-shell calcite-scrim{position:absolute}:host([hidden]){display:none}[hidden]{display:none}"}}, [1,"calcite-sheet",{beforeClose:[16],displayMode:[513,"display-mode"],escapeDisabled:[516,"escape-disabled"],heightScale:[513,"height-scale"],focusTrapDisabled:[516,"focus-trap-disabled"],label:[1],open:[1540],opened:[1540],outsideCloseDisabled:[516,"outside-close-disabled"],position:[513],slottedInShell:[4,"slotted-in-shell"],widthScale:[513,"width-scale"],setFocus:[64],updateFocusTrapElements:[64]},[[8,"keydown","handleEscape"]],{focusTrapDisabled:["handleFocusTrapDisabled"],open:["toggleSheet"], opened:["handleOpenedChange"]}]);g();d.CalciteSheet=h;d.defineCustomElement=g;Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});