@tylertech/forge 2.24.5 → 2.24.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 (153) hide show
  1. package/custom-elements.json +36 -0
  2. package/dist/esm/accordion/index.js +1 -1
  3. package/dist/esm/app-bar/help-button/index.js +1 -1
  4. package/dist/esm/app-bar/index.js +1 -1
  5. package/dist/esm/app-bar/menu-button/index.js +1 -1
  6. package/dist/esm/app-bar/notification-button/index.js +1 -1
  7. package/dist/esm/app-bar/profile-button/index.js +1 -1
  8. package/dist/esm/app-bar/search/index.js +1 -1
  9. package/dist/esm/autocomplete/index.js +1 -1
  10. package/dist/esm/banner/index.js +1 -1
  11. package/dist/esm/bottom-sheet/index.js +1 -1
  12. package/dist/esm/button-area/index.js +1 -1
  13. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  14. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  15. package/dist/esm/calendar/index.js +1 -1
  16. package/dist/esm/checkbox/index.js +1 -1
  17. package/dist/esm/chip-field/index.js +1 -1
  18. package/dist/esm/chips/chip/index.js +1 -1
  19. package/dist/esm/chips/chip-set/index.js +1 -1
  20. package/dist/esm/chips/index.js +1 -1
  21. package/dist/esm/chunks/{chunk.KGMCBPGV.js → chunk.22XYSOBK.js} +2 -2
  22. package/dist/esm/chunks/chunk.3HRCB7FN.js +7 -0
  23. package/dist/esm/chunks/chunk.3HRCB7FN.js.map +7 -0
  24. package/dist/esm/chunks/{chunk.IY43YPCQ.js → chunk.3VO4CCLE.js} +2 -2
  25. package/dist/esm/chunks/{chunk.JFAOCIGZ.js → chunk.4TAJ2ISD.js} +2 -2
  26. package/dist/esm/chunks/{chunk.5DXXNYGP.js → chunk.64BPRKXV.js} +2 -2
  27. package/dist/esm/chunks/chunk.6VXZW2KP.js +12 -0
  28. package/dist/esm/chunks/chunk.6ZUV5N66.js +7 -0
  29. package/dist/esm/chunks/chunk.6ZUV5N66.js.map +7 -0
  30. package/dist/esm/chunks/{chunk.SXQ22MNR.js → chunk.ABB66VV2.js} +2 -2
  31. package/dist/esm/chunks/{chunk.WHQZNZHW.js → chunk.B5TEOESG.js} +2 -2
  32. package/dist/esm/chunks/{chunk.47EUT2BJ.js → chunk.B72LQPTW.js} +2 -2
  33. package/dist/esm/chunks/{chunk.C3G25JFG.js → chunk.BVMEPQRH.js} +2 -2
  34. package/dist/esm/chunks/{chunk.QBKSRXQK.js → chunk.CGT6H4RE.js} +2 -2
  35. package/dist/esm/chunks/{chunk.CL4FTBLR.js → chunk.DKP3U76M.js} +2 -2
  36. package/dist/esm/chunks/{chunk.TMEYQXRR.js → chunk.DT4G43BK.js} +2 -2
  37. package/dist/esm/chunks/{chunk.D3BHOS2E.js → chunk.HMJ3REU5.js} +2 -2
  38. package/dist/esm/chunks/chunk.J3YNMJ7K.js +7 -0
  39. package/dist/esm/chunks/chunk.J3YNMJ7K.js.map +7 -0
  40. package/dist/esm/chunks/{chunk.E3K6KM57.js → chunk.LAM6EDW3.js} +2 -2
  41. package/dist/esm/chunks/{chunk.FEU4FTVQ.js → chunk.LEOEVEFJ.js} +2 -2
  42. package/dist/esm/chunks/{chunk.EQEMCHMB.js → chunk.LKL5KWVY.js} +2 -2
  43. package/dist/esm/chunks/{chunk.TVWUZYVG.js → chunk.LQAXFDOO.js} +2 -2
  44. package/dist/esm/chunks/{chunk.6DVJ22IK.js → chunk.LQEVGZKN.js} +2 -2
  45. package/dist/esm/chunks/{chunk.6ENND42M.js → chunk.MSBAFZ54.js} +2 -2
  46. package/dist/esm/chunks/{chunk.ZVPPLZUU.js → chunk.P7AU3S6P.js} +2 -2
  47. package/dist/esm/chunks/{chunk.5SB5Z665.js → chunk.PLORKGHA.js} +2 -2
  48. package/dist/esm/chunks/{chunk.LFBYFJTX.js → chunk.PRD35UWX.js} +2 -2
  49. package/dist/esm/chunks/{chunk.3JFECXXZ.js → chunk.PTOAOW4U.js} +2 -2
  50. package/dist/esm/chunks/{chunk.MBJGQYCF.js → chunk.RZMTIEVK.js} +2 -2
  51. package/dist/esm/chunks/{chunk.XINI6PNZ.js → chunk.SCLNLPNS.js} +2 -2
  52. package/dist/esm/chunks/{chunk.QXFOGJAJ.js → chunk.SLK5TNHE.js} +2 -2
  53. package/dist/esm/chunks/{chunk.QXFOGJAJ.js.map → chunk.SLK5TNHE.js.map} +1 -1
  54. package/dist/esm/chunks/{chunk.CHVDZAGE.js → chunk.SMIOTQJL.js} +2 -2
  55. package/dist/esm/chunks/{chunk.W3DFKTAX.js → chunk.TJHXZ6PA.js} +2 -2
  56. package/dist/esm/chunks/{chunk.L5OECKS5.js → chunk.UOYOPTMC.js} +2 -2
  57. package/dist/esm/chunks/{chunk.3MMDUUTN.js → chunk.V6C2AEKZ.js} +2 -2
  58. package/dist/esm/chunks/{chunk.MA573DEE.js → chunk.VWLMQCC2.js} +2 -2
  59. package/dist/esm/chunks/{chunk.OBBYRQCY.js → chunk.XNUJPZIK.js} +2 -2
  60. package/dist/esm/chunks/{chunk.6NARYF7U.js → chunk.XRYKUVE3.js} +2 -2
  61. package/dist/esm/chunks/{chunk.WF24FWAT.js → chunk.XT4IC25K.js} +2 -2
  62. package/dist/esm/chunks/{chunk.MKHU4IPO.js → chunk.XTQO35SU.js} +2 -2
  63. package/dist/esm/chunks/{chunk.TLXWXBQO.js → chunk.YBEKNPIH.js} +2 -2
  64. package/dist/esm/chunks/{chunk.LEINPSKL.js → chunk.YKZ36ELA.js} +2 -2
  65. package/dist/esm/chunks/{chunk.4KKMVMPN.js → chunk.ZFVGFJUF.js} +2 -2
  66. package/dist/esm/color-picker/index.js +1 -1
  67. package/dist/esm/core/index.js +1 -1
  68. package/dist/esm/core/utils/index.js +1 -1
  69. package/dist/esm/date-picker/index.js +1 -1
  70. package/dist/esm/date-range-picker/index.js +1 -1
  71. package/dist/esm/expansion-panel/index.js +1 -1
  72. package/dist/esm/file-picker/index.js +1 -1
  73. package/dist/esm/icon/index.js +1 -1
  74. package/dist/esm/icon-button/index.js +1 -1
  75. package/dist/esm/index.js +1 -1
  76. package/dist/esm/list/index.js +1 -1
  77. package/dist/esm/list/list/index.js +1 -1
  78. package/dist/esm/list/list-item/index.js +1 -1
  79. package/dist/esm/list-dropdown/index.js +1 -1
  80. package/dist/esm/menu/index.js +1 -1
  81. package/dist/esm/open-icon/index.js +1 -1
  82. package/dist/esm/paginator/index.js +1 -1
  83. package/dist/esm/profile-card/index.js +1 -1
  84. package/dist/esm/quantity-field/index.js +1 -1
  85. package/dist/esm/radio/index.js +1 -1
  86. package/dist/esm/select/core/index.js +1 -1
  87. package/dist/esm/select/index.js +1 -1
  88. package/dist/esm/select/select/index.js +1 -1
  89. package/dist/esm/select/select-dropdown/index.js +1 -1
  90. package/dist/esm/slider/index.js +1 -1
  91. package/dist/esm/split-view/index.js +1 -1
  92. package/dist/esm/split-view/split-view/index.js +1 -1
  93. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  94. package/dist/esm/stepper/index.js +1 -1
  95. package/dist/esm/stepper/step/index.js +1 -1
  96. package/dist/esm/stepper/stepper/index.js +1 -1
  97. package/dist/esm/switch/index.js +1 -1
  98. package/dist/esm/table/index.js +1 -1
  99. package/dist/esm/tabs/index.js +1 -1
  100. package/dist/esm/tabs/tab-bar/index.js +1 -1
  101. package/dist/esm/time-picker/index.js +1 -1
  102. package/dist/esm/toast/index.js +1 -1
  103. package/esm/core/utils/date-utils.js +1 -1
  104. package/esm/date-picker/date-picker-foundation.d.ts +1 -0
  105. package/esm/date-picker/date-picker-foundation.js +9 -1
  106. package/esm/date-range-picker/date-range-picker-foundation.d.ts +1 -0
  107. package/esm/date-range-picker/date-range-picker-foundation.js +15 -0
  108. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  109. package/package.json +1 -1
  110. package/dist/esm/chunks/chunk.AH4YGLZ4.js +0 -7
  111. package/dist/esm/chunks/chunk.AH4YGLZ4.js.map +0 -7
  112. package/dist/esm/chunks/chunk.IUC6WXAH.js +0 -12
  113. package/dist/esm/chunks/chunk.OJ54J4L3.js +0 -7
  114. package/dist/esm/chunks/chunk.OJ54J4L3.js.map +0 -7
  115. package/dist/esm/chunks/chunk.U6WGJELL.js +0 -7
  116. package/dist/esm/chunks/chunk.U6WGJELL.js.map +0 -7
  117. /package/dist/esm/chunks/{chunk.KGMCBPGV.js.map → chunk.22XYSOBK.js.map} +0 -0
  118. /package/dist/esm/chunks/{chunk.IY43YPCQ.js.map → chunk.3VO4CCLE.js.map} +0 -0
  119. /package/dist/esm/chunks/{chunk.JFAOCIGZ.js.map → chunk.4TAJ2ISD.js.map} +0 -0
  120. /package/dist/esm/chunks/{chunk.5DXXNYGP.js.map → chunk.64BPRKXV.js.map} +0 -0
  121. /package/dist/esm/chunks/{chunk.IUC6WXAH.js.map → chunk.6VXZW2KP.js.map} +0 -0
  122. /package/dist/esm/chunks/{chunk.SXQ22MNR.js.map → chunk.ABB66VV2.js.map} +0 -0
  123. /package/dist/esm/chunks/{chunk.WHQZNZHW.js.map → chunk.B5TEOESG.js.map} +0 -0
  124. /package/dist/esm/chunks/{chunk.47EUT2BJ.js.map → chunk.B72LQPTW.js.map} +0 -0
  125. /package/dist/esm/chunks/{chunk.C3G25JFG.js.map → chunk.BVMEPQRH.js.map} +0 -0
  126. /package/dist/esm/chunks/{chunk.QBKSRXQK.js.map → chunk.CGT6H4RE.js.map} +0 -0
  127. /package/dist/esm/chunks/{chunk.CL4FTBLR.js.map → chunk.DKP3U76M.js.map} +0 -0
  128. /package/dist/esm/chunks/{chunk.TMEYQXRR.js.map → chunk.DT4G43BK.js.map} +0 -0
  129. /package/dist/esm/chunks/{chunk.D3BHOS2E.js.map → chunk.HMJ3REU5.js.map} +0 -0
  130. /package/dist/esm/chunks/{chunk.E3K6KM57.js.map → chunk.LAM6EDW3.js.map} +0 -0
  131. /package/dist/esm/chunks/{chunk.FEU4FTVQ.js.map → chunk.LEOEVEFJ.js.map} +0 -0
  132. /package/dist/esm/chunks/{chunk.EQEMCHMB.js.map → chunk.LKL5KWVY.js.map} +0 -0
  133. /package/dist/esm/chunks/{chunk.TVWUZYVG.js.map → chunk.LQAXFDOO.js.map} +0 -0
  134. /package/dist/esm/chunks/{chunk.6DVJ22IK.js.map → chunk.LQEVGZKN.js.map} +0 -0
  135. /package/dist/esm/chunks/{chunk.6ENND42M.js.map → chunk.MSBAFZ54.js.map} +0 -0
  136. /package/dist/esm/chunks/{chunk.ZVPPLZUU.js.map → chunk.P7AU3S6P.js.map} +0 -0
  137. /package/dist/esm/chunks/{chunk.5SB5Z665.js.map → chunk.PLORKGHA.js.map} +0 -0
  138. /package/dist/esm/chunks/{chunk.LFBYFJTX.js.map → chunk.PRD35UWX.js.map} +0 -0
  139. /package/dist/esm/chunks/{chunk.3JFECXXZ.js.map → chunk.PTOAOW4U.js.map} +0 -0
  140. /package/dist/esm/chunks/{chunk.MBJGQYCF.js.map → chunk.RZMTIEVK.js.map} +0 -0
  141. /package/dist/esm/chunks/{chunk.XINI6PNZ.js.map → chunk.SCLNLPNS.js.map} +0 -0
  142. /package/dist/esm/chunks/{chunk.CHVDZAGE.js.map → chunk.SMIOTQJL.js.map} +0 -0
  143. /package/dist/esm/chunks/{chunk.W3DFKTAX.js.map → chunk.TJHXZ6PA.js.map} +0 -0
  144. /package/dist/esm/chunks/{chunk.L5OECKS5.js.map → chunk.UOYOPTMC.js.map} +0 -0
  145. /package/dist/esm/chunks/{chunk.3MMDUUTN.js.map → chunk.V6C2AEKZ.js.map} +0 -0
  146. /package/dist/esm/chunks/{chunk.MA573DEE.js.map → chunk.VWLMQCC2.js.map} +0 -0
  147. /package/dist/esm/chunks/{chunk.OBBYRQCY.js.map → chunk.XNUJPZIK.js.map} +0 -0
  148. /package/dist/esm/chunks/{chunk.6NARYF7U.js.map → chunk.XRYKUVE3.js.map} +0 -0
  149. /package/dist/esm/chunks/{chunk.WF24FWAT.js.map → chunk.XT4IC25K.js.map} +0 -0
  150. /package/dist/esm/chunks/{chunk.MKHU4IPO.js.map → chunk.XTQO35SU.js.map} +0 -0
  151. /package/dist/esm/chunks/{chunk.TLXWXBQO.js.map → chunk.YBEKNPIH.js.map} +0 -0
  152. /package/dist/esm/chunks/{chunk.LEINPSKL.js.map → chunk.YKZ36ELA.js.map} +0 -0
  153. /package/dist/esm/chunks/{chunk.4KKMVMPN.js.map → chunk.ZFVGFJUF.js.map} +0 -0
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as k}from"./chunk.EQEMCHMB.js";import{e as V,h as B,j as H}from"./chunk.LEINPSKL.js";import{c as x}from"./chunk.K57IO236.js";import{a as m,b as N}from"./chunk.AJTQHK25.js";import{d as K}from"./chunk.B3LPXCVL.js";import{b as A}from"./chunk.P73BXRKY.js";import{e as F}from"./chunk.WCSVKQR2.js";import{d as P}from"./chunk.MZLPUI6R.js";import{d as w}from"./chunk.WHQZNZHW.js";import{a as y}from"./chunk.UWYANU5D.js";import{a as p}from"./chunk.KTGSZEAG.js";import{a as T,b as S,d as D}from"./chunk.DL7NX432.js";import{a as L,e as C}from"./chunk.LJLEPTLU.js";import{m as M}from"./chunk.4LA6HEA7.js";import{a as g,b as O,i as I,k as _}from"./chunk.J2M2MXP2.js";import{a as c,b,f as a}from"./chunk.MCIQXNKY.js";var l=`${S}menu`,G={POPUP:"forge-menu__popup",MENU:"mdc-menu"},U={TOGGLE:`.${l}__toggle,[${l}-toggle],button,[type=button],[role=button],a,[tabindex]:not([tabindex^="-"])`,MENU_LIST:"forge-list"},R={OPEN:"open",PLACEMENT:"placement",SELECTED_INDEX:"selected-index",SELECTED_VALUE:"selected-value",DENSE:"dense",ICON_CLASS:"icon-class",PERSIST_SELECTION:"persist-selection",MODE:"mode",SYNC_POPUP_WIDTH:"sync-popup-width",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},$={SELECT:`${l}-select`,OPEN:`${l}-open`,CLOSE:`${l}-close`,ACTIVE_CHANGE:`${l}-active-change`},z={CHILD_MOUSE_LEAVE_TIMEOUT:300,POPUP_MOUSE_LEAVE_TIMEOUT:500},i={elementName:l,classes:G,selectors:U,attributes:R,events:$,numbers:z};var u=class extends y{constructor(e){super(e);this._childMenus=new Map}get targetElement(){return this._targetElement}getDropdownElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}hasTargetElement(){return!!this._targetElement}initializeTarget(){this._targetElement=this._component.querySelector(i.selectors.TOGGLE),this._targetElement||(this._targetElement=this._component.firstElementChild)}initializeAccessibility(e){!this._targetElement||(this._targetElement.setAttribute("aria-atomic","true"),this._targetElement.setAttribute("aria-live","assertive"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.hasAttribute("aria-label")||this._targetElement.setAttribute("aria-label",this._targetElement.textContent||""))}addTargetListener(e,t,n=!1){this._targetElement&&this._targetElement.addEventListener(e,t,n)}removeTargetListener(e,t){this._targetElement&&this._targetElement.removeEventListener(e,t)}attachMenu(e){this._listDropdown||!this._targetElement||(this._listDropdown=new B(this._targetElement,e),this._listDropdown.open(),this._targetElement.setAttribute("aria-expanded","true"),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`))}setOptions(e){this._listDropdown&&this._listDropdown.setOptions(e)}detachMenu(){this._targetElement&&(this._targetElement.removeAttribute("aria-activedescendant"),this._targetElement.removeAttribute("aria-expanded"),this._targetElement.removeAttribute("aria-controls")),this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}setCascadeTargetInactive(){let e=this._targetElement;e!=null&&e.active&&(e.active=!1)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}focusTarget(){this._targetElement&&this._targetElement.focus()}isTargetFocused(){return document.activeElement===this._targetElement}updateActiveDescendant(e){!this._targetElement||(e?this._targetElement.setAttribute("aria-activedescendant",e):this._targetElement.removeAttribute("aria-activedescendant"))}addDropdownListener(e,t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(e,t)}isOwnElement(e){return!this._targetElement||!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._targetElement.contains(e)||!!this._listDropdown.dropdownElement.contains(e)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}proxyKeyboardEventToChild(e,t){if(!this.getDropdownElement())return;let n=this._getOpenChildMenu(t);n&&n.propagateKeyEvent(e)}toggleChildMenu(e,t){let r=this._getListItems()[e].parentElement;r&&r.tagName.toLowerCase()===i.elementName&&(t===void 0?r.open=!r.open:r.open=t,r.activateFirstOption())}createChildMenu(e,t,n,o,r){let d=document.createElement("forge-menu");return d.style.display="block",d.addEventListener(i.events.OPEN,()=>{this._childMenus.set(e,d),n(e)}),d.addEventListener(i.events.CLOSE,()=>{this._childMenus.delete(e),o(e)}),d.addEventListener(i.events.SELECT,f=>{f.stopPropagation(),r(b(c({},f.detail),{parentValue:t}))}),d}closeOtherChildMenus(e){let t=[];this._childMenus.forEach((n,o)=>{o!==e&&(n.open=!1,t.push(o))}),t.forEach(n=>this._childMenus.delete(n))}setSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}_getOpenChildMenu(e){if(!this.getDropdownElement())return null;let t=this._getOwnList(e);return t?t.querySelector(`${i.elementName}[${i.attributes.OPEN}]`):null}_getOwnList(e){let t=this.getDropdownElement();return t?t.querySelector(`${m.elementName}[id="list-dropdown-list-${e}"]`):null}_getListItems(){let e=this.getDropdownElement();if(!e)return[];let t=e.querySelector(m.elementName);return t?Array.from(t.querySelectorAll(N.elementName)):[]}};var h=class extends H{constructor(e){super({popupTimeout:i.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,targetTimeout:i.numbers.CHILD_MOUSE_LEAVE_TIMEOUT});this._adapter=e;this._placement="bottom-start";this._fallbackPlacements=[];this._dense=!1;this._iconClass=D;this._persistSelection=!1;this._mode="click";this._identifier=g(),this._clickListener=t=>this._onTargetClick(t),this._blurListener=t=>this._onTargetBlur(t),this._selectListener=t=>this._handleSelectEvent(t),this._keydownListener=t=>this.onKeydown(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t)}initialize(){this._adapter.initializeTarget(),this._adapter.initializeAccessibility(this._identifier),this._initializeInteractionListeners()}disconnect(){this._open&&this._closeDropdown(),this._destroyInteractionListeners()}activateFirstOption(){this._adapter.activateFirstOption()}_applyMode(){!this._adapter.hasTargetElement()||(this._mode!=="cascade"?this._adapter.addTargetListener("click",this._clickListener):this._attachCascadingListeners())}_initializeInteractionListeners(){!this._adapter.hasTargetElement()||(this._applyMode(),this._adapter.addTargetListener("keydown",this._keydownListener,!0),this._adapter.addTargetListener("focusout",this._blurListener))}_destroyInteractionListeners(){!this._adapter.hasTargetElement()||(this._adapter.removeTargetListener("keydown",this._clickListener),this._adapter.removeTargetListener("focusout",this._blurListener),this._adapter.removeTargetListener("click",this._clickListener),this._detachCascadingListeners())}_attachCascadingListeners(){this._adapter.addTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.addTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener)}_detachCascadingListeners(){this._adapter.removeTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.removeTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener)}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}get _flatOptions(){return this._flattenOptions(this._options)}_flattenOptions(e){return V(e,1)?e.reduce((t,n)=>n.options?t.concat(n.options):t,[]):e}_onTargetClick(e){if(this._open){this._closeDropdown();return}this.open=!this._open,this._open&&this._adapter.focusTarget()}_onTargetBlur(e){this._open&&this._closeDropdown()}_onActiveOptionChanged(e){let t={id:e},n=this._adapter.emitHostEvent(i.events.ACTIVE_CHANGE,t,!0,!0);this._mode!=="cascade"&&n&&this._adapter.updateActiveDescendant(e)}onKeydown(e){if(this._childOpen){this._adapter.proxyKeyboardEventToChild(e,this._identifier);return}switch(e.code){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Space":e.preventDefault(),this._open?this._closeDropdown():this._openDropdown({fromKeyboard:!0});break;case"Home":case"End":this._open&&(e.preventDefault(),this._adapter.propagateKey(e.code));break;case"Enter":if(e.preventDefault(),!this._open){e.preventDefault(),this._openDropdown({fromKeyboard:!0});return}e.stopImmediatePropagation(),this._adapter.propagateKey(e.code);let t=this._adapter.getActiveOptionIndex(),n=this._nonDividerOptions[t];n&&n.options&&n.options.length&&this._adapter.toggleChildMenu(t);break;case"ArrowUp":case"ArrowDown":if(this._open&&e.stopImmediatePropagation(),e.preventDefault(),!this._open&&e.code==="ArrowDown"){this._openDropdown({fromKeyboard:!0}),this._adapter.activateFirstOption();return}this._adapter.propagateKey(e.code);break;case"ArrowLeft":this._open&&e.stopImmediatePropagation(),this._mode==="cascade"&&this._open&&this._closeDropdown();break;case"ArrowRight":if(this._open&&e.stopImmediatePropagation(),!this._open)return;let o=this._adapter.getActiveOptionIndex(),r=this._nonDividerOptions[o];if(r&&r.options){this._adapter.toggleChildMenu(o,e.code==="ArrowRight");return}break}}async _openMenu({fromKeyboard:e}={}){this._open=!0;let t=[];if(typeof this._optionsFactory=="function")this._loadOptionsAsync(),this._options=[];else{if(!this._options||!this._options.length)return;t=this._options}this._persistSelection||t.forEach(r=>r.selected=!1),this._mapIconToLeadingIcon();let n=this._persistSelection?this._getSelectedValues():[],o={id:this._identifier,referenceElement:this._adapter.targetElement,type:"menu",options:this._options,selectedValues:n,iconClass:this._iconClass,dense:this._dense,multiple:!1,popupStatic:!0,allowBusy:!0,asyncStyle:"spinner",optionBuilder:this._optionBuilder,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._placement,popupFallbackPlacements:this._fallbackPlacements,activeStartIndex:e?0:void 0,popupClasses:[i.classes.POPUP,i.classes.MENU,...this._popupClasses],syncWidth:this._syncPopupWidth,activeChangeCallback:this._activeChangeListener,selectCallback:this._selectListener,popupOffset:this._popupOffset,cascadingElementFactory:r=>this._createCascadingElement(r)};this._adapter.setHostAttribute(i.attributes.OPEN,""),this._adapter.attachMenu(o),this._mode==="cascade"&&(this._adapter.addDropdownListener("mouseenter",this._childPopupMouseEnterListener),this._adapter.addDropdownListener("mouseleave",this._childPopupMouseLeaveListener)),this._adapter.addDropdownListener(i.events.ACTIVE_CHANGE,r=>{this._onActiveOptionChanged(r.detail.id)}),this._adapter.emitHostEvent(i.events.OPEN)}_closeMenu(){this._open=!1,this._childOpen=!1,this._adapter.detachMenu(),this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout),this._adapter.removeHostAttribute(i.attributes.OPEN),this._adapter.emitHostEvent(i.events.CLOSE)}_loadOptionsAsync(){return this._optionsFactory?Promise.resolve(this._optionsFactory()).then(e=>{if(this._persistSelection||this._flattenOptions(e).filter(n=>n.selected).forEach(n=>n.selected=!1),this._open)if(e&&I(e)&&e.length){this._options=e,this._mapIconToLeadingIcon(),this._adapter.setOptions(e);let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}else this._open&&this._closeDropdown()}).catch(e=>{console.error("An unexpected error ocurred while opening the menu:",e),this._open&&this._closeDropdown()}):(this._open&&this._closeMenu(),Promise.resolve())}_handleSelectEvent(e){let t=this._nonDividerOptions.findIndex(n=>n.value===e);t<0||this._selectOptionByIndex(t)}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._selectOptionByIndex(e)}_selectOptionByIndex(e){let{options:t,value:n}=this._nonDividerOptions[e];if(t){this._adapter.setActiveOption(e);return}this._closeDropdown();let o={index:e,value:n};!this._adapter.emitHostEvent(i.events.SELECT,o,!0,!0)||(this._selectedValue=this._persistSelection?n:void 0)}_getSelectedValues(){let e=this._flatOptions.filter(t=>t.selected).map(t=>t.value);return this._selectedValue!==void 0&&e.push(this._selectedValue),e}_onCascadingOptionSelected(e){this._persistSelection&&(this._selectedValue=e.value),this._adapter.emitHostEvent(i.events.SELECT,e),this._closeDropdown()}_onCascadingChildOpen(e){super._clearMouseLeaveTimeout(),this._adapter.closeOtherChildMenus(e),this._childOpen=!0,this._adapter.setActiveOption(e)}_onCascadingChildClose(e){this._childOpen=!1}_closeDropdown(){this._closeMenu()}_openDropdown({fromKeyboard:e}={}){this._openMenu({fromKeyboard:e})}_setCascadeTargetInactive(){this._adapter.setCascadeTargetInactive()}_isOwnElement(e){return this._adapter.isOwnElement(e)}_createCascadingElement({index:e,options:t,parentValue:n}){let o=this._adapter.createChildMenu(e,n,this._onCascadingChildOpen.bind(this),this._onCascadingChildClose.bind(this),this._onCascadingOptionSelected.bind(this));return o.mode="cascade",o.popupOffset={x:0,y:-8},o.dense=this._dense,o.placement="right-start",o.fallbackPlacements=["left-start","right-start"],o.persistSelection=this._persistSelection,this._persistSelection&&(o.selectedValue=this._selectedValue),o.options=t,o.optionBuilder=this._optionBuilder,o.iconClass=this._iconClass,o}_mapIconToLeadingIcon(){this._flatOptions.filter(e=>e.icon).forEach(e=>e.leadingIcon=e.icon)}get open(){return this._open}set open(e){e=Boolean(e),this._open!==e&&(this._open=e,e?this._openDropdown():this._closeDropdown())}set options(e){if(typeof e=="function")this.optionsFactory=e;else if(this.optionsFactory=void 0,this._options=e.map(t=>c({},t)),this._open&&(this._mapIconToLeadingIcon(),this._adapter.setOptions(this._options),this._persistSelection)){let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}}get options(){return this._options?this._flatOptions.map(e=>c({},e)):[]}set optionsFactory(e){this._optionsFactory=e}set selectedIndex(e){let t=this._nonDividerOptions[e];t&&t.value!==this._selectedValue&&(this.selectedValue=t.value)}get selectedIndex(){return this._selectedValue!==void 0?this._nonDividerOptions.findIndex(e=>e.value===this._selectedValue):-1}set selectedValue(e){this._selectedValue!==e&&(this._selectedValue=e,this._adapter.setSelectedValues(this._selectedValue))}get selectedValue(){return this._selectedValue}get placement(){return this._placement}set placement(e){this._placement!==e&&(this._placement=e||"bottom-start",this._adapter.setHostAttribute(i.attributes.PLACEMENT,this._placement))}get fallbackPlacements(){return this._fallbackPlacements}set fallbackPlacements(e){this._fallbackPlacements=Array.isArray(e)?e:[]}get dense(){return this._dense}set dense(e){this._dense=e}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass=e}get persistSelection(){return this._persistSelection}set persistSelection(e){this._persistSelection!==e&&(this._persistSelection=e,this._adapter.toggleHostAttribute(i.attributes.PERSIST_SELECTION,this._persistSelection),this._persistSelection||(this._flatOptions.forEach(t=>t.selected=!1),this._selectedValue=void 0))}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._destroyInteractionListeners(),this._applyMode(),this._adapter.setHostAttribute(i.attributes.MODE,this._mode))}get popupOffset(){return this._popupOffset}set popupOffset(e){this._popupOffset=e}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get popupElement(){return this._adapter.getDropdownElement()}};var q="<template><slot></slot></template>",W=":host{display:inline-block}:host([hidden]){display:none}",s=class extends k{constructor(){super();w.define(P),this._foundation=new h(new u(this)),C(this,q,W)}static get observedAttributes(){return[i.attributes.OPEN,i.attributes.PLACEMENT,i.attributes.SELECTED_INDEX,i.attributes.SELECTED_VALUE,i.attributes.DENSE,i.attributes.ICON_CLASS,i.attributes.PERSIST_SELECTION,i.attributes.MODE,i.attributes.SYNC_POPUP_WIDTH,i.attributes.POPUP_CLASSES,i.attributes.OPTION_LIMIT,i.attributes.OBSERVE_SCROLL,i.attributes.OBSERVE_SCROLL_THRESHOLD]}connectedCallback(){this.querySelector(i.selectors.TOGGLE)?this._foundation.initialize():M(this,i.selectors.TOGGLE).then(()=>this._foundation.initialize())}attributeChangedCallback(e,t,n){switch(super.attributeChangedCallback(e,t,n),e){case i.attributes.OPEN:this._foundation.open=O(n);break;case i.attributes.PLACEMENT:this._foundation.placement=n;break;case i.attributes.SELECTED_INDEX:this._foundation.selectedIndex=Number(n);break;case i.attributes.SELECTED_VALUE:this._foundation.selectedValue=n;break;case i.attributes.DENSE:this._foundation.dense=_(n);break;case i.attributes.ICON_CLASS:this._foundation.iconClass=n;break;case i.attributes.PERSIST_SELECTION:this.persistSelection=_(n);break;case i.attributes.MODE:this.mode=n;break}}disconnectedCallback(){this._foundation.disconnect()}propagateKeyEvent(e){this._foundation.onKeydown(e)}activateFirstOption(){this._foundation.activateFirstOption()}};a([p()],s.prototype,"open",2),a([p()],s.prototype,"options",2),a([p()],s.prototype,"selectedIndex",2),a([p()],s.prototype,"selectedValue",2),a([p()],s.prototype,"placement",2),a([p()],s.prototype,"fallbackPlacements",2),a([p()],s.prototype,"dense",2),a([p()],s.prototype,"iconClass",2),a([p()],s.prototype,"persistSelection",2),a([p()],s.prototype,"mode",2),a([p()],s.prototype,"popupOffset",2),a([p()],s.prototype,"optionBuilder",2),a([p({set:!1})],s.prototype,"popupElement",2),s=a([T({name:i.elementName,dependencies:[F,x,K,A]})],s);function je(){L(s)}export{i as a,u as b,h as c,s as d,je as e};
7
- //# sourceMappingURL=chunk.TMEYQXRR.js.map
6
+ import{a as k}from"./chunk.LKL5KWVY.js";import{e as V,h as B,j as H}from"./chunk.YKZ36ELA.js";import{c as x}from"./chunk.K57IO236.js";import{a as m,b as N}from"./chunk.AJTQHK25.js";import{d as K}from"./chunk.B3LPXCVL.js";import{b as A}from"./chunk.P73BXRKY.js";import{e as F}from"./chunk.WCSVKQR2.js";import{d as P}from"./chunk.MZLPUI6R.js";import{d as w}from"./chunk.B5TEOESG.js";import{a as y}from"./chunk.UWYANU5D.js";import{a as p}from"./chunk.KTGSZEAG.js";import{a as T,b as S,d as D}from"./chunk.DL7NX432.js";import{a as L,e as C}from"./chunk.LJLEPTLU.js";import{m as M}from"./chunk.4LA6HEA7.js";import{a as g,b as O,i as I,k as _}from"./chunk.J2M2MXP2.js";import{a as c,b,f as a}from"./chunk.MCIQXNKY.js";var l=`${S}menu`,G={POPUP:"forge-menu__popup",MENU:"mdc-menu"},U={TOGGLE:`.${l}__toggle,[${l}-toggle],button,[type=button],[role=button],a,[tabindex]:not([tabindex^="-"])`,MENU_LIST:"forge-list"},R={OPEN:"open",PLACEMENT:"placement",SELECTED_INDEX:"selected-index",SELECTED_VALUE:"selected-value",DENSE:"dense",ICON_CLASS:"icon-class",PERSIST_SELECTION:"persist-selection",MODE:"mode",SYNC_POPUP_WIDTH:"sync-popup-width",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},$={SELECT:`${l}-select`,OPEN:`${l}-open`,CLOSE:`${l}-close`,ACTIVE_CHANGE:`${l}-active-change`},z={CHILD_MOUSE_LEAVE_TIMEOUT:300,POPUP_MOUSE_LEAVE_TIMEOUT:500},i={elementName:l,classes:G,selectors:U,attributes:R,events:$,numbers:z};var u=class extends y{constructor(e){super(e);this._childMenus=new Map}get targetElement(){return this._targetElement}getDropdownElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}hasTargetElement(){return!!this._targetElement}initializeTarget(){this._targetElement=this._component.querySelector(i.selectors.TOGGLE),this._targetElement||(this._targetElement=this._component.firstElementChild)}initializeAccessibility(e){!this._targetElement||(this._targetElement.setAttribute("aria-atomic","true"),this._targetElement.setAttribute("aria-live","assertive"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.hasAttribute("aria-label")||this._targetElement.setAttribute("aria-label",this._targetElement.textContent||""))}addTargetListener(e,t,n=!1){this._targetElement&&this._targetElement.addEventListener(e,t,n)}removeTargetListener(e,t){this._targetElement&&this._targetElement.removeEventListener(e,t)}attachMenu(e){this._listDropdown||!this._targetElement||(this._listDropdown=new B(this._targetElement,e),this._listDropdown.open(),this._targetElement.setAttribute("aria-expanded","true"),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`))}setOptions(e){this._listDropdown&&this._listDropdown.setOptions(e)}detachMenu(){this._targetElement&&(this._targetElement.removeAttribute("aria-activedescendant"),this._targetElement.removeAttribute("aria-expanded"),this._targetElement.removeAttribute("aria-controls")),this._listDropdown&&(this._listDropdown.close(),this._listDropdown.destroy(),this._listDropdown=void 0)}setActiveOption(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}setCascadeTargetInactive(){let e=this._targetElement;e!=null&&e.active&&(e.active=!1)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:-1}focusTarget(){this._targetElement&&this._targetElement.focus()}isTargetFocused(){return document.activeElement===this._targetElement}updateActiveDescendant(e){!this._targetElement||(e?this._targetElement.setAttribute("aria-activedescendant",e):this._targetElement.removeAttribute("aria-activedescendant"))}addDropdownListener(e,t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(e,t)}isOwnElement(e){return!this._targetElement||!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._targetElement.contains(e)||!!this._listDropdown.dropdownElement.contains(e)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}proxyKeyboardEventToChild(e,t){if(!this.getDropdownElement())return;let n=this._getOpenChildMenu(t);n&&n.propagateKeyEvent(e)}toggleChildMenu(e,t){let r=this._getListItems()[e].parentElement;r&&r.tagName.toLowerCase()===i.elementName&&(t===void 0?r.open=!r.open:r.open=t,r.activateFirstOption())}createChildMenu(e,t,n,o,r){let d=document.createElement("forge-menu");return d.style.display="block",d.addEventListener(i.events.OPEN,()=>{this._childMenus.set(e,d),n(e)}),d.addEventListener(i.events.CLOSE,()=>{this._childMenus.delete(e),o(e)}),d.addEventListener(i.events.SELECT,f=>{f.stopPropagation(),r(b(c({},f.detail),{parentValue:t}))}),d}closeOtherChildMenus(e){let t=[];this._childMenus.forEach((n,o)=>{o!==e&&(n.open=!1,t.push(o))}),t.forEach(n=>this._childMenus.delete(n))}setSelectedValues(e){var t;(t=this._listDropdown)==null||t.setSelectedValues(e)}_getOpenChildMenu(e){if(!this.getDropdownElement())return null;let t=this._getOwnList(e);return t?t.querySelector(`${i.elementName}[${i.attributes.OPEN}]`):null}_getOwnList(e){let t=this.getDropdownElement();return t?t.querySelector(`${m.elementName}[id="list-dropdown-list-${e}"]`):null}_getListItems(){let e=this.getDropdownElement();if(!e)return[];let t=e.querySelector(m.elementName);return t?Array.from(t.querySelectorAll(N.elementName)):[]}};var h=class extends H{constructor(e){super({popupTimeout:i.numbers.POPUP_MOUSE_LEAVE_TIMEOUT,targetTimeout:i.numbers.CHILD_MOUSE_LEAVE_TIMEOUT});this._adapter=e;this._placement="bottom-start";this._fallbackPlacements=[];this._dense=!1;this._iconClass=D;this._persistSelection=!1;this._mode="click";this._identifier=g(),this._clickListener=t=>this._onTargetClick(t),this._blurListener=t=>this._onTargetBlur(t),this._selectListener=t=>this._handleSelectEvent(t),this._keydownListener=t=>this.onKeydown(t),this._activeChangeListener=t=>this._onActiveOptionChanged(t)}initialize(){this._adapter.initializeTarget(),this._adapter.initializeAccessibility(this._identifier),this._initializeInteractionListeners()}disconnect(){this._open&&this._closeDropdown(),this._destroyInteractionListeners()}activateFirstOption(){this._adapter.activateFirstOption()}_applyMode(){!this._adapter.hasTargetElement()||(this._mode!=="cascade"?this._adapter.addTargetListener("click",this._clickListener):this._attachCascadingListeners())}_initializeInteractionListeners(){!this._adapter.hasTargetElement()||(this._applyMode(),this._adapter.addTargetListener("keydown",this._keydownListener,!0),this._adapter.addTargetListener("focusout",this._blurListener))}_destroyInteractionListeners(){!this._adapter.hasTargetElement()||(this._adapter.removeTargetListener("keydown",this._clickListener),this._adapter.removeTargetListener("focusout",this._blurListener),this._adapter.removeTargetListener("click",this._clickListener),this._detachCascadingListeners())}_attachCascadingListeners(){this._adapter.addTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.addTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener)}_detachCascadingListeners(){this._adapter.removeTargetListener("mouseenter",this._targetMouseEnterListener),this._adapter.removeTargetListener("mouseleave",this._targetMouseLeaveListener),this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener)}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}get _flatOptions(){return this._flattenOptions(this._options)}_flattenOptions(e){return V(e,1)?e.reduce((t,n)=>n.options?t.concat(n.options):t,[]):e}_onTargetClick(e){if(this._open){this._closeDropdown();return}this.open=!this._open,this._open&&this._adapter.focusTarget()}_onTargetBlur(e){this._open&&this._closeDropdown()}_onActiveOptionChanged(e){let t={id:e},n=this._adapter.emitHostEvent(i.events.ACTIVE_CHANGE,t,!0,!0);this._mode!=="cascade"&&n&&this._adapter.updateActiveDescendant(e)}onKeydown(e){if(this._childOpen){this._adapter.proxyKeyboardEventToChild(e,this._identifier);return}switch(e.code){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Space":e.preventDefault(),this._open?this._closeDropdown():this._openDropdown({fromKeyboard:!0});break;case"Home":case"End":this._open&&(e.preventDefault(),this._adapter.propagateKey(e.code));break;case"Enter":if(e.preventDefault(),!this._open){e.preventDefault(),this._openDropdown({fromKeyboard:!0});return}e.stopImmediatePropagation(),this._adapter.propagateKey(e.code);let t=this._adapter.getActiveOptionIndex(),n=this._nonDividerOptions[t];n&&n.options&&n.options.length&&this._adapter.toggleChildMenu(t);break;case"ArrowUp":case"ArrowDown":if(this._open&&e.stopImmediatePropagation(),e.preventDefault(),!this._open&&e.code==="ArrowDown"){this._openDropdown({fromKeyboard:!0}),this._adapter.activateFirstOption();return}this._adapter.propagateKey(e.code);break;case"ArrowLeft":this._open&&e.stopImmediatePropagation(),this._mode==="cascade"&&this._open&&this._closeDropdown();break;case"ArrowRight":if(this._open&&e.stopImmediatePropagation(),!this._open)return;let o=this._adapter.getActiveOptionIndex(),r=this._nonDividerOptions[o];if(r&&r.options){this._adapter.toggleChildMenu(o,e.code==="ArrowRight");return}break}}async _openMenu({fromKeyboard:e}={}){this._open=!0;let t=[];if(typeof this._optionsFactory=="function")this._loadOptionsAsync(),this._options=[];else{if(!this._options||!this._options.length)return;t=this._options}this._persistSelection||t.forEach(r=>r.selected=!1),this._mapIconToLeadingIcon();let n=this._persistSelection?this._getSelectedValues():[],o={id:this._identifier,referenceElement:this._adapter.targetElement,type:"menu",options:this._options,selectedValues:n,iconClass:this._iconClass,dense:this._dense,multiple:!1,popupStatic:!0,allowBusy:!0,asyncStyle:"spinner",optionBuilder:this._optionBuilder,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._placement,popupFallbackPlacements:this._fallbackPlacements,activeStartIndex:e?0:void 0,popupClasses:[i.classes.POPUP,i.classes.MENU,...this._popupClasses],syncWidth:this._syncPopupWidth,activeChangeCallback:this._activeChangeListener,selectCallback:this._selectListener,popupOffset:this._popupOffset,cascadingElementFactory:r=>this._createCascadingElement(r)};this._adapter.setHostAttribute(i.attributes.OPEN,""),this._adapter.attachMenu(o),this._mode==="cascade"&&(this._adapter.addDropdownListener("mouseenter",this._childPopupMouseEnterListener),this._adapter.addDropdownListener("mouseleave",this._childPopupMouseLeaveListener)),this._adapter.addDropdownListener(i.events.ACTIVE_CHANGE,r=>{this._onActiveOptionChanged(r.detail.id)}),this._adapter.emitHostEvent(i.events.OPEN)}_closeMenu(){this._open=!1,this._childOpen=!1,this._adapter.detachMenu(),this._activeMouseLeaveTimeout!==void 0&&window.clearTimeout(this._activeMouseLeaveTimeout),this._adapter.removeHostAttribute(i.attributes.OPEN),this._adapter.emitHostEvent(i.events.CLOSE)}_loadOptionsAsync(){return this._optionsFactory?Promise.resolve(this._optionsFactory()).then(e=>{if(this._persistSelection||this._flattenOptions(e).filter(n=>n.selected).forEach(n=>n.selected=!1),this._open)if(e&&I(e)&&e.length){this._options=e,this._mapIconToLeadingIcon(),this._adapter.setOptions(e);let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}else this._open&&this._closeDropdown()}).catch(e=>{console.error("An unexpected error ocurred while opening the menu:",e),this._open&&this._closeDropdown()}):(this._open&&this._closeMenu(),Promise.resolve())}_handleSelectEvent(e){let t=this._nonDividerOptions.findIndex(n=>n.value===e);t<0||this._selectOptionByIndex(t)}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._selectOptionByIndex(e)}_selectOptionByIndex(e){let{options:t,value:n}=this._nonDividerOptions[e];if(t){this._adapter.setActiveOption(e);return}this._closeDropdown();let o={index:e,value:n};!this._adapter.emitHostEvent(i.events.SELECT,o,!0,!0)||(this._selectedValue=this._persistSelection?n:void 0)}_getSelectedValues(){let e=this._flatOptions.filter(t=>t.selected).map(t=>t.value);return this._selectedValue!==void 0&&e.push(this._selectedValue),e}_onCascadingOptionSelected(e){this._persistSelection&&(this._selectedValue=e.value),this._adapter.emitHostEvent(i.events.SELECT,e),this._closeDropdown()}_onCascadingChildOpen(e){super._clearMouseLeaveTimeout(),this._adapter.closeOtherChildMenus(e),this._childOpen=!0,this._adapter.setActiveOption(e)}_onCascadingChildClose(e){this._childOpen=!1}_closeDropdown(){this._closeMenu()}_openDropdown({fromKeyboard:e}={}){this._openMenu({fromKeyboard:e})}_setCascadeTargetInactive(){this._adapter.setCascadeTargetInactive()}_isOwnElement(e){return this._adapter.isOwnElement(e)}_createCascadingElement({index:e,options:t,parentValue:n}){let o=this._adapter.createChildMenu(e,n,this._onCascadingChildOpen.bind(this),this._onCascadingChildClose.bind(this),this._onCascadingOptionSelected.bind(this));return o.mode="cascade",o.popupOffset={x:0,y:-8},o.dense=this._dense,o.placement="right-start",o.fallbackPlacements=["left-start","right-start"],o.persistSelection=this._persistSelection,this._persistSelection&&(o.selectedValue=this._selectedValue),o.options=t,o.optionBuilder=this._optionBuilder,o.iconClass=this._iconClass,o}_mapIconToLeadingIcon(){this._flatOptions.filter(e=>e.icon).forEach(e=>e.leadingIcon=e.icon)}get open(){return this._open}set open(e){e=Boolean(e),this._open!==e&&(this._open=e,e?this._openDropdown():this._closeDropdown())}set options(e){if(typeof e=="function")this.optionsFactory=e;else if(this.optionsFactory=void 0,this._options=e.map(t=>c({},t)),this._open&&(this._mapIconToLeadingIcon(),this._adapter.setOptions(this._options),this._persistSelection)){let t=this._getSelectedValues();t.length&&this._adapter.setSelectedValues(t)}}get options(){return this._options?this._flatOptions.map(e=>c({},e)):[]}set optionsFactory(e){this._optionsFactory=e}set selectedIndex(e){let t=this._nonDividerOptions[e];t&&t.value!==this._selectedValue&&(this.selectedValue=t.value)}get selectedIndex(){return this._selectedValue!==void 0?this._nonDividerOptions.findIndex(e=>e.value===this._selectedValue):-1}set selectedValue(e){this._selectedValue!==e&&(this._selectedValue=e,this._adapter.setSelectedValues(this._selectedValue))}get selectedValue(){return this._selectedValue}get placement(){return this._placement}set placement(e){this._placement!==e&&(this._placement=e||"bottom-start",this._adapter.setHostAttribute(i.attributes.PLACEMENT,this._placement))}get fallbackPlacements(){return this._fallbackPlacements}set fallbackPlacements(e){this._fallbackPlacements=Array.isArray(e)?e:[]}get dense(){return this._dense}set dense(e){this._dense=e}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass=e}get persistSelection(){return this._persistSelection}set persistSelection(e){this._persistSelection!==e&&(this._persistSelection=e,this._adapter.toggleHostAttribute(i.attributes.PERSIST_SELECTION,this._persistSelection),this._persistSelection||(this._flatOptions.forEach(t=>t.selected=!1),this._selectedValue=void 0))}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._destroyInteractionListeners(),this._applyMode(),this._adapter.setHostAttribute(i.attributes.MODE,this._mode))}get popupOffset(){return this._popupOffset}set popupOffset(e){this._popupOffset=e}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get popupElement(){return this._adapter.getDropdownElement()}};var q="<template><slot></slot></template>",W=":host{display:inline-block}:host([hidden]){display:none}",s=class extends k{constructor(){super();w.define(P),this._foundation=new h(new u(this)),C(this,q,W)}static get observedAttributes(){return[i.attributes.OPEN,i.attributes.PLACEMENT,i.attributes.SELECTED_INDEX,i.attributes.SELECTED_VALUE,i.attributes.DENSE,i.attributes.ICON_CLASS,i.attributes.PERSIST_SELECTION,i.attributes.MODE,i.attributes.SYNC_POPUP_WIDTH,i.attributes.POPUP_CLASSES,i.attributes.OPTION_LIMIT,i.attributes.OBSERVE_SCROLL,i.attributes.OBSERVE_SCROLL_THRESHOLD]}connectedCallback(){this.querySelector(i.selectors.TOGGLE)?this._foundation.initialize():M(this,i.selectors.TOGGLE).then(()=>this._foundation.initialize())}attributeChangedCallback(e,t,n){switch(super.attributeChangedCallback(e,t,n),e){case i.attributes.OPEN:this._foundation.open=O(n);break;case i.attributes.PLACEMENT:this._foundation.placement=n;break;case i.attributes.SELECTED_INDEX:this._foundation.selectedIndex=Number(n);break;case i.attributes.SELECTED_VALUE:this._foundation.selectedValue=n;break;case i.attributes.DENSE:this._foundation.dense=_(n);break;case i.attributes.ICON_CLASS:this._foundation.iconClass=n;break;case i.attributes.PERSIST_SELECTION:this.persistSelection=_(n);break;case i.attributes.MODE:this.mode=n;break}}disconnectedCallback(){this._foundation.disconnect()}propagateKeyEvent(e){this._foundation.onKeydown(e)}activateFirstOption(){this._foundation.activateFirstOption()}};a([p()],s.prototype,"open",2),a([p()],s.prototype,"options",2),a([p()],s.prototype,"selectedIndex",2),a([p()],s.prototype,"selectedValue",2),a([p()],s.prototype,"placement",2),a([p()],s.prototype,"fallbackPlacements",2),a([p()],s.prototype,"dense",2),a([p()],s.prototype,"iconClass",2),a([p()],s.prototype,"persistSelection",2),a([p()],s.prototype,"mode",2),a([p()],s.prototype,"popupOffset",2),a([p()],s.prototype,"optionBuilder",2),a([p({set:!1})],s.prototype,"popupElement",2),s=a([T({name:i.elementName,dependencies:[F,x,K,A]})],s);function je(){L(s)}export{i as a,u as b,h as c,s as d,je as e};
7
+ //# sourceMappingURL=chunk.DT4G43BK.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{b as Z}from"./chunk.H5IFZCUL.js";import{c as pe}from"./chunk.DXA626CF.js";import{a as le,b as ae}from"./chunk.EYGSUZWX.js";import{a as F}from"./chunk.5DXXNYGP.js";import{a as re}from"./chunk.IX2UHMIM.js";import{a as oe}from"./chunk.EQEMCHMB.js";import{h as ue,i as de}from"./chunk.LEINPSKL.js";import{b as se}from"./chunk.RQG6GVOI.js";import{c as ie}from"./chunk.K57IO236.js";import{e as te}from"./chunk.AJTQHK25.js";import{b as ee}from"./chunk.P73BXRKY.js";import{a as C,e as ne}from"./chunk.WCSVKQR2.js";import{c as W,g as K,h as q}from"./chunk.MZLPUI6R.js";import{a as D}from"./chunk.YI4JTY4T.js";import{d as j,l as Q,m as J}from"./chunk.WHQZNZHW.js";import{a as z}from"./chunk.2KXSGD3S.js";import{b as $,i as Y,j as X}from"./chunk.KYH5GKVI.js";import{a as R}from"./chunk.UWYANU5D.js";import{a}from"./chunk.KTGSZEAG.js";import{a as H,b as G,c as V}from"./chunk.DL7NX432.js";import{a as N,e as U,g as L}from"./chunk.LJLEPTLU.js";import{m as B,r as M,s as k,u as A}from"./chunk.4LA6HEA7.js";import{a as y,b as h,c as x,j as T,k as f,l as S,n as w,o as P}from"./chunk.J2M2MXP2.js";import{a as E,f as p}from"./chunk.MCIQXNKY.js";var g=`${G}autocomplete`,ve={MODE:"mode",MULTIPLE:"multiple",DEBOUNCE:"debounce",FILTER_ON_FOCUS:"filter-on-focus",FILTER_FOCUS_FIRST:"filter-focus-first",ALLOW_UNMATCHED:"allow-unmatched",POPUP_TARGET:"popup-target",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",OPEN:"open",MATCH_KEY:"match-key",FILTER_TEXT:"filter-text",DROPDOWN_ICON_OPEN:"data-forge-dropdown-icon-open"},be={INPUT:re.selectors.INPUT,DROPDOWN_ICON:"[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",CLEAR_BUTTON:"[data-forge-autocomplete-clear],[forge-autocomplete-clear]"},ge={DEFAULT_DEBOUNCE_TIME:500,NUM_SKELETON_ITEMS:3},Oe={CHANGE:`${g}-change`,SELECT:`${g}-select`,SCROLLED_BOTTOM:`${g}-scrolled-bottom`},o={elementName:g,attributes:ve,selectors:be,numbers:ge,events:Oe},ce=(e=>(e.Default="default",e.Stateless="stateless",e))(ce||{});var O=class extends R{constructor(e){super(e);this.setInputElement()}get inputElement(){return this._inputElement}setInputElement(){let e=M(this._component,o.selectors.INPUT,!1);return e.length&&(this._inputElement=e[0]),this._inputElement}setInputAttribute(e,t){this._inputElement.setAttribute(e,t)}addInputListener(e,t){this._inputElement.addEventListener(e,t)}removeInputListener(e,t){this._inputElement.removeEventListener(e,t)}initializeInputAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","polite"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-autocomplete","list"),Y(),X(this._inputElement)}isWrappingChipField(){return!!this._component.querySelector(F.elementName)}show(e,t){this._targetElement=this._getTargetElement(t),this._targetElement&&(this._listDropdown=new ue(this._targetElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-expanded","true"),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`),this._tryToggleDropdownIconRotation(!0))}hide(e){if(!this._listDropdown)return;let{targetElement:t}=this._listDropdown.dropdownElement;t.removeEventListener(C.events.BLUR,e),this.setBusyVisibility(!1),this._tryToggleDropdownIconRotation(!1),this._inputElement.removeAttribute("aria-activedescendant"),this._inputElement.removeAttribute("aria-controls"),this._inputElement.setAttribute("aria-expanded","false"),this._listDropdown.close(),this._listDropdown=void 0}setBusyVisibility(e){var t;(t=this._listDropdown)==null||t.setBusyVisibility(e)}setDismissListener(e){if(!this._listDropdown||!this._listDropdown.dropdownElement)return;let t=this._listDropdown.dropdownElement;t.targetElement&&t.targetElement.addEventListener(C.events.BLUR,e)}focus(){window.requestAnimationFrame(()=>this._inputElement.focus())}setOptions(e){var t;(t=this._listDropdown)==null||t.setOptions(e)}appendOptions(e){var t;(t=this._listDropdown)==null||t.appendOptions(e)}setSelectedText(e){this._inputElement.value=e}getInputValue(){return this._inputElement.value}setInputValue(e){this._inputElement.value=e}selectInputValue(){window.requestAnimationFrame(()=>this._inputElement.select())}isFocusWithinPopup(e){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(e)}hasFocus(){let e=k(this._component.ownerDocument);return e===this._inputElement||this.isFocusWithinPopup(e)}hasInputElement(){return!!this._inputElement}setDropdownIconListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.addEventListener(e,t)})}removeDropdownIconListener(e,t){let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.removeEventListener(e,t)}setClearButtonListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.addEventListener(e,t)})}removeClearButtonListener(e,t){let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.removeEventListener(e,t)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}updateActiveDescendant(e){!this._targetElement||A(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._targetElement||(this._targetElement=this._getTargetElement(e)),this._targetElement.getBoundingClientRect().width}getPopupElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}activateSelectedOption(){var e;(e=this._listDropdown)==null||e.activateSelectedOption()}activateOptionByIndex(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:null}clearActiveOption(){var e;(e=this._listDropdown)==null||e.clearActiveOption()}setSelectedOptions(e){if(this._listDropdown){let t=e.map(i=>i.value);this._listDropdown.setSelectedValues(t)}}queueDropdownPositionUpdate(){!this.getPopupElement()||window.requestAnimationFrame(()=>{let e=this.getPopupElement();e==null||e.position()})}_getTargetElement(e){return e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement()}_getDefaultTargetElement(){let e=this._component.querySelector("forge-text-field");if(e&&e.shadowRoot){let i=L(e,le.selectors.ROOT);if(i)return i}let t=this._component.querySelector("forge-chip-field");if(t&&t.shadowRoot){let i=L(t,F.selectors.ROOT);if(i)return i}return this._component.querySelector("input")||this._component}_tryToggleDropdownIconRotation(e){let t=this._component.querySelector(o.selectors.DROPDOWN_ICON);t&&A(t,e,o.attributes.DROPDOWN_ICON_OPEN)}};var he=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(he||{});function v(u,d){let e=u.some(i=>h(i)&&T(i)&&i.hasOwnProperty("options")&&(i.hasOwnProperty("text")||i.hasOwnProperty("builder"))),t=u.some(i=>h(i)&&T(i)&&i.hasOwnProperty("label")&&i.hasOwnProperty("value"));return e&&d===1||t&&d===0}function _e(u,d){return u.find(e=>e.value===d)}function b(u,d,e=null){return e?!(e in u.value)||!(e in d)?!1:w(u.value[e],d[e]):w(u.value,d)}var I=class extends de{constructor(e){super();this._adapter=e;this._isInitialized=!1;this._isDropdownOpen=!1;this._mode="default";this._multiple=!1;this._debounce=o.numbers.DEFAULT_DEBOUNCE_TIME;this._allowUnmatched=!1;this._filterOnFocus=!0;this._filterFocusFirst=!0;this._options=[];this._filterText="";this._selectedOptions=[];this._values=[];this._pendingFilterPromises=[];this._matchKey=null;this._clickListener=t=>this._onClick(t),this._focusListener=()=>this._onFocus(),this._blurListener=t=>this._onBlur(t),this._keydownListener=t=>this._onKeydown(t),this._dropdownIconClickListener=t=>this._onDropdownIconClick(t),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dropdownIconMouseDownListener=t=>this._onDropdownIconMouseDown(t),this._clearButtonListener=t=>this._onClear(t),this._dismissListener=()=>this._onDismiss(),this._activeChangeListener=t=>this._adapter.updateActiveDescendant(t),this._targetWidthCallback=()=>this._adapter.getTargetElementWidth(this._popupTarget),this._identifier=y()}async initialize(){if(!this._adapter.hasInputElement()&&!this._adapter.setInputElement())throw new Error("An input element is required as a child of the autocomplete component.");if(this._setInputListener(),this._setFilterCallback(),this._attachListeners(),this._initializeAccessibility(),this._values.length){if(!this._selectedOptions.length){try{await this._executeFilter()}catch(e){console.error(e)}this._updateSelectedOptions(this._values)}this._adapter.setSelectedText(this._getSelectedText())}this._isInitialized=!0}disconnect(){this._isInitialized&&(this._detachListeners(),this._isInitialized=!1),this._isDropdownOpen&&this._closeDropdown()}async forceFilter({preserveValue:e}){this._options=[],await this._executeFilter(!0,!0),e&&this._options.push(...this._selectedOptions),this._applyValue(this._values)}_attachListeners(){this._adapter.addInputListener("click",this._clickListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.addInputListener("input",this._inputListener),this._adapter.addInputListener("keydown",this._keydownListener),this._adapter.setDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.setDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.setClearButtonListener("click",this._clearButtonListener)}_detachListeners(){this._adapter.removeInputListener("click",this._clickListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("keydown",this._keydownListener),this._adapter.removeDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.removeDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.removeClearButtonListener("click",this._clearButtonListener)}_setInputListener(){this._inputListener=e=>this._onInput(e)}_setFilterCallback(){this._filterFn=h(this._debounce)&&this._debounce>0?P(this._debounceFilter,this._debounce,!1):this._debounceFilter}_initializeAccessibility(){this._adapter.initializeInputAccessibility(this._identifier)}get _flatOptions(){return v(this._options,1)?this._options.reduce((e,t)=>e.concat(t.options),[]):this._options}_onClick(e){!this._isDropdownOpen&&this._filterOnFocus&&this._showDropdown()}_onDropdownIconMouseDown(e){e.preventDefault()}_onDropdownIconClick(e){this._isDropdownOpen?this._closeDropdown():(this._adapter.focus(),window.requestAnimationFrame(()=>this._showDropdown()))}_onClear(e){this._filterText="",this._clearValue(),this._adapter.setSelectedText(this._getSelectedText())}_onDropdownScrollEnd(){this._adapter.emitHostEvent(o.events.SCROLLED_BOTTOM)}_onFocus(){!this._isDropdownOpen&&this._adapter.getInputValue()&&!D.isMobile&&this._adapter.selectInputValue()}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._applyBlur()}_applyBlur(){this._isDropdownOpen&&this._closeDropdown(),this._mode!=="stateless"&&(this._selectedOptions.length?this._adapter.setSelectedText(this._getSelectedText()):this._allowUnmatched||(this._filterText="",this._adapter.setSelectedText("")))}_onInput(e){this._selectedOptions.length&&!this._multiple&&(!this._adapter.getInputValue()||this._allowUnmatched)&&!this._adapter.isWrappingChipField()&&(this._selectedOptions=[],this._values=[],this._emitChangeEvent()),this._filterText=this._adapter.getInputValue(),this._filterFn()}async _debounceFilter({checkFocus:e=!0}={}){if(!e&&!this._adapter.hasFocus()){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}let t=this._filterText,i=this._executeFilter();this._pendingFilterPromises.push(i),this._isDropdownOpen?this._adapter.setBusyVisibility(!0):this._showDropdown({filter:!1});try{await i}catch(n){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}if(t===this._filterText)this._pendingFilterPromises=[],this._onFilterComplete();else{let n=this._pendingFilterPromises.indexOf(i);n!==-1&&this._pendingFilterPromises.splice(n,1)}}_onKeydown(e){switch(e.key){case"Tab":this._isDropdownOpen&&!this._multiple&&this._selectActiveOption(!1);break;case"Esc":case"Escape":this._isDropdownOpen&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Down":case"ArrowDown":e.preventDefault(),this._isDropdownOpen?this._adapter.propagateKey(e.key):this._showDropdown({activateFirst:!0,activateSelected:!0});break;case"Up":case"ArrowUp":e.preventDefault(),this._isDropdownOpen&&this._adapter.propagateKey(e.key);break;case"Enter":case"Home":case"End":this._isDropdownOpen&&(e.key==="Enter"&&e.stopPropagation(),e.preventDefault(),this._adapter.propagateKey(e.key));break;case"Backspace":case"Delete":let t=e.target,i=this._adapter.getInputValue(),n=t.value.substring(t.selectionStart,t.selectionEnd)===t.value,l=i.length===1&&t.selectionEnd===1,c=i.length===1&&t.selectionEnd===0,_=!i||n||l||c;!this._adapter.isWrappingChipField()&&_&&!this._multiple&&this._values.length&&this._clearValue();break}}_executeFilter(e=!0,t=!1){if(!this._filter||typeof this._filter!="function")throw new Error('A filter callback must be provided. Did you set the "filter" property?');let i=this._filter,n=e?this._filterText:"",l=t?this._getValue():null;return new Promise((c,_)=>Promise.resolve(i(n,l)).then(r=>{this._options=r,c(this._options)}).catch(r=>_(`An unexpected error occurred while filtering: ${r}`)))}_onFilterComplete(){if(!this._adapter.hasFocus()){this._isDropdownOpen&&this._closeDropdown();return}if(this._options.length){let e=this._allowUnmatched&&!this._selectedOptions.length;this._dropdownReady({userTriggered:e}),this._filterFocusFirst&&this._filterText&&this._adapter.activateFirstOption()}else this._closeDropdown()}_clearValue(){this._selectedOptions=[],this._values=[],this._isDropdownOpen&&(this._adapter.setSelectedOptions([]),this._adapter.clearActiveOption()),this._emitChangeEvent()}async _showDropdown({filter:e=!0,userTriggered:t=!0,activateFirst:i=!1,activateSelected:n=!1}={}){let l=this._allowUnmatched&&!this._selectedOptions.length;this._isDropdownOpen=!0;let c;if(this._optionBuilder){let r=this._optionBuilder;c=(m,fe)=>r(m,this._filterText,fe)}let _={options:this._options,referenceElement:this._adapter.inputElement,multiple:this._multiple,selectedValues:[...this._values],id:`forge-autocomplete-${this._identifier}`,asyncStyle:"skeleton",optionLimit:this._optionLimit,popupClasses:this._popupClasses,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,transform:r=>{if(this._filterText){let m=$(r,this._filterText);if(m)return m}return r},allowBusy:!0,optionBuilder:c,syncWidth:this._syncPopupWidth,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,selectCallback:r=>this._onSelect(r),closeCallback:()=>this._closeDropdown()};if(this._adapter.show(_,this._popupTarget),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen),e){this._options.length&&this._adapter.setBusyVisibility(!0);try{await this._executeFilter(l)}catch(r){console.error(r)}this._updateSelectedOptions(this._values)}this._pendingFilterPromises.length||this._dropdownReady({userTriggered:t,activateFirst:i,activateSelected:n})}_dropdownReady({userTriggered:e=!0,activateFirst:t=!1,activateSelected:i=!1}={}){if(!this._isDropdownOpen||!this._options.length||e&&!this._adapter.hasFocus()){this._closeDropdown();return}this._sortSelectedOptions(),this._adapter.setBusyVisibility(!1),this._adapter.setOptions(this._options),this._adapter.setSelectedOptions(this._selectedOptions),this._adapter.setDismissListener(this._dismissListener),i&&this._selectedOptions.length?this._adapter.activateSelectedOption():t&&this._adapter.activateFirstOption()}_closeDropdown(){this._multiple&&(this._filterText=""),this._isDropdownOpen=!1,this._adapter.hide(this._dismissListener),this._sortSelectedOptions(),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen)}_sortSelectedOptions(){if(this._multiple&&this._selectedOptions.length&&v(this._options,0)){let e=[],t=[];this._options.forEach(i=>{this._selectedOptions.find(n=>b(n,i.value,this._matchKey))?e.push(i):t.push(i)}),this._options=[...e,...t]}}async _onSelect(e,t=!0){if(this._valueChanging)return;if(this._mode==="stateless"){let n={value:e};this._adapter.emitHostEvent(o.events.SELECT,n,!0,!0)&&(this._filterText="",this._multiple||this._closeDropdown());return}let i=()=>{let l=this._flatOptions.find(r=>b(r,e,this._matchKey)),c=l?l.value:"",_=l?l.label:"";if(this._multiple){let r=_e(this._selectedOptions,c);if(r){let m=this._selectedOptions.indexOf(r);this._selectedOptions.splice(m,1)}else this._selectedOptions.push(l)}else h(c)?(this._selectedOptions[0]=l,this._filterText=_):(this._selectedOptions=[],this._filterText="");this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions),this._values=this._selectedOptions.map(r=>r.value),this._adapter.setSelectedText(this._getSelectedText()),!D.isMobile&&t&&this._adapter.selectInputValue(),this._emitChangeEvent(),this._tryUpdateDropdownPosition()};this._isDropdownOpen&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"?(this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,e,this._matchKey)),await this._valueChanging?i():this._tryUpdateDropdownPosition(),this._valueChanging=void 0):i()}_selectActiveOption(e=!0){let t=this._adapter.getActiveOptionIndex();if(typeof t=="number"&&t>=0){let i=this._flatOptions[t];i&&this._onSelect(i.value,e)}}_emitChangeEvent(){this._adapter.emitHostEvent(o.events.CHANGE,this._getValue(),!0)}_tryUpdateDropdownPosition(){this._isDropdownOpen&&this._adapter.queueDropdownPositionUpdate()}_getValue(){return this._values?this._values.length?this._multiple?[...this._values]:this._values[0]:this._multiple?[]:null:null}_getSelectedText(){var e,t;return this._adapter.isWrappingChipField()?"":this._selectedTextBuilder?this._selectedTextBuilder(this._selectedOptions):this._multiple?this._values.length?this._values.length===1?(t=(e=this._selectedOptions[0])==null?void 0:e.label)!=null?t:"":`${this._values.length} options selected`:"":this._selectedOptions.filter(i=>i&&i.label).map(i=>i.label).join(" ").trim()}_onDismiss(){this._closeDropdown()}async _applyValue(e){let t=[];this._selectedOptions=[],Array.isArray(e)?t=e:t=h(e)?[e]:[],!this._multiple&&t.length>1&&(t=[t[0]]),v(t,0)?(this._values=t.map(n=>n.value),this._selectedOptions=t):this._values=t;let i=this._flatOptions;if(t.length&&i.length&&this._updateSelectedOptions(t),this._values.length&&!this._selectedOptions.length&&!!this._filter&&this._isInitialized){try{await this._executeFilter(!1,!0)}catch(n){console.error(n)}this._updateSelectedOptions(this._values)}this._multiple?this._filterText="":this._filterText=this._selectedOptions.length?this._selectedOptions[0].label:"",this._isInitialized&&this._adapter.setSelectedText(this._getSelectedText()),this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions)}_updateSelectedOptions(e){let t=[...this._flatOptions,...this._selectedOptions];if(this._selectedOptions.length&&(this._selectedOptions=[]),v(e,0))for(let i of e){let n=t.find(l=>b(l,i.value,this._matchKey));n?this._selectedOptions.push(n):this._selectedOptions.push(i)}else for(let i of e){let n=t.find(l=>b(l,i,this._matchKey));n?this._selectedOptions.push(n):this._allowUnmatched&&this._selectedOptions.push({label:i,value:i})}}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._mode==="stateless"&&(this._selectedOptions=[],this._isDropdownOpen&&this._closeDropdown()),this._adapter.setHostAttribute(o.attributes.MODE,this._mode))}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._adapter.setHostAttribute(o.attributes.MULTIPLE,h(this._multiple)?this._multiple.toString():""))}get value(){return this._getValue()}set value(e){let t=[];e==null?t=[]:Array.isArray(e)?t=structuredClone(e):x(e)?t=[e]:t=[structuredClone(e)],(t.length!==this._values.length||t.some(n=>!this._values.includes(n)))&&this._applyValue(e)}get filterOnFocus(){return this._filterOnFocus}set filterOnFocus(e){this._filterOnFocus!==e&&(this._filterOnFocus=e,this._adapter.setHostAttribute(o.attributes.FILTER_ON_FOCUS,h(this._filterOnFocus)?this._filterOnFocus.toString():""))}get filterFocusFirst(){return this._filterFocusFirst}set filterFocusFirst(e){this._filterFocusFirst!==e&&(this._filterFocusFirst=e,this._adapter.toggleHostAttribute(o.attributes.FILTER_FOCUS_FIRST,this._filterFocusFirst))}get allowUnmatched(){return this._allowUnmatched}set allowUnmatched(e){this._allowUnmatched!==e&&(this._allowUnmatched=e,h(this._allowUnmatched)&&this._adapter.setHostAttribute(o.attributes.ALLOW_UNMATCHED,this._allowUnmatched.toString()))}get matchKey(){return this._matchKey}set matchKey(e){this._matchKey!==e&&(this._matchKey=e)}get popupTarget(){return this._popupTarget}set popupTarget(e){this._popupTarget!==e&&(this._popupTarget=e)}get filterText(){return this._filterText}set filterText(e){this._filterText!==e&&(this._filterText=this._allowUnmatched?e:"",this._isInitialized&&this._allowUnmatched&&(this._adapter.setInputValue(this._filterText),this._isDropdownOpen&&this._debounceFilter({checkFocus:!1})))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:[this._popupClasses]}set popupClasses(e){this._popupClasses!==e&&(this._popupClasses=Array.isArray(e)?[...e]:[e])}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}set popupFooterBuilder(e){this._popupFooterBuilder=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth!==e&&(this._syncPopupWidth=e)}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit!==e&&(this._optionLimit=e)}get debounce(){return this._debounce}set debounce(e){this._debounce!==e&&(this._debounce=e,this._isInitialized&&this._setFilterCallback(),this._adapter.setHostAttribute(o.attributes.DEBOUNCE,h(this._debounce)?this._debounce.toString():""))}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get filter(){return this._filter}set filter(e){this._filter!==e&&(this._filter=e,this._isInitialized&&this._values.length&&!this._flatOptions.length&&!!this._filter&&this._executeFilter().then(()=>{this._updateSelectedOptions(this._values),this._adapter.setSelectedText(this._getSelectedText())}))}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e,this._selectedOptions.length&&this._adapter.setSelectedText(this._getSelectedText())}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}appendOptions(e){!this._isDropdownOpen||(this._options=[...this._options,...e],this._adapter.appendOptions(e))}get isInitialized(){return this._isInitialized}get open(){return this._isDropdownOpen}set open(e){this._isDropdownOpen!==e&&(e?this._showDropdown({userTriggered:!1}):this._closeDropdown())}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){e!==this._beforeValueChange&&(this._beforeValueChange=e)}get popupElement(){return this._adapter.getPopupElement()}};var Ie="<template><slot></slot></template>",Ee=":host{display:block}:host([hidden]){display:none}",s=class extends oe{constructor(){super();j.define([W,q,K]),U(this,Ie,Ee),this._foundation=new I(new O(this))}static get observedAttributes(){return[o.attributes.MODE,o.attributes.MULTIPLE,o.attributes.DEBOUNCE,o.attributes.FILTER_ON_FOCUS,o.attributes.FILTER_FOCUS_FIRST,o.attributes.ALLOW_UNMATCHED,o.attributes.POPUP_TARGET,o.attributes.POPUP_CLASSES,o.attributes.OBSERVE_SCROLL,o.attributes.OBSERVE_SCROLL_THRESHOLD,o.attributes.OPTION_LIMIT,o.attributes.SYNC_POPUP_WIDTH,o.attributes.OPEN,o.attributes.MATCH_KEY,o.attributes.FILTER_TEXT]}connectedCallback(){this.querySelector(o.selectors.INPUT)?this._foundation.initialize():B(this,o.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,t,i){switch(super.attributeChangedCallback(e,t,i),e){case o.attributes.MODE:this.mode=i;break;case o.attributes.MULTIPLE:this.multiple=f(i);break;case o.attributes.DEBOUNCE:this.debounce=S(i);break;case o.attributes.FILTER_ON_FOCUS:this.filterOnFocus=f(i);break;case o.attributes.FILTER_FOCUS_FIRST:this.filterFocusFirst=f(i);break;case o.attributes.ALLOW_UNMATCHED:this.allowUnmatched=f(i);break;case o.attributes.POPUP_TARGET:this.popupTarget=i;break;case o.attributes.OPEN:this.open=f(i);break;case o.attributes.MATCH_KEY:this.matchKey=i;break;case o.attributes.FILTER_TEXT:this.filterText=i;break}}appendOptions(e){this._foundation.appendOptions(e)}openDropdown(){this.open=!0}closeDropdown(){this.open=!1}forceFilter(e={preserveValue:!1}){this._foundation.forceFilter(e)}};p([a()],s.prototype,"mode",2),p([a()],s.prototype,"multiple",2),p([a()],s.prototype,"value",2),p([a()],s.prototype,"debounce",2),p([a()],s.prototype,"filterOnFocus",2),p([a()],s.prototype,"filterFocusFirst",2),p([a()],s.prototype,"allowUnmatched",2),p([a()],s.prototype,"popupTarget",2),p([a()],s.prototype,"filterText",2),p([a()],s.prototype,"optionBuilder",2),p([a()],s.prototype,"filter",2),p([a()],s.prototype,"selectedTextBuilder",2),p([a()],s.prototype,"open",2),p([a()],s.prototype,"matchKey",2),p([a({set:!1})],s.prototype,"isInitialized",2),p([a({set:!1})],s.prototype,"popupElement",2),p([a()],s.prototype,"beforeValueChange",2),s=p([H({name:o.elementName,dependencies:[pe,ne,ie,te,Z,se,ee,Q]})],s);var me=class extends z{constructor(e){super(e)}_build(){let e=document.createElement(o.elementName);return this._attachTextField(e),e}get textFieldDelegate(){return this._textFieldDelegate}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(e){this._textFieldDelegate.inputElement.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(o.events.CHANGE,t=>e(t.detail))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",t=>e(t))}_attachTextField(e){var i,n,l,c,_,r;let t={props:E({},(n=(i=this._config.options)==null?void 0:i.textFieldDelegateConfig)==null?void 0:n.props),options:E({},(c=(l=this._config.options)==null?void 0:l.textFieldDelegateConfig)==null?void 0:c.options)};t.options||(t.options={}),((_=this._config.options)==null?void 0:_.useDropdownIcon)!==!1&&!((r=t.options)!=null&&r.trailingElement)&&(t.options.trailingElement=this._createDropdownIconElement()),this._textFieldDelegate=new ae(t),e.appendChild(this._textFieldDelegate.element)}_createDropdownIconElement(){let e={props:{slot:"trailing",name:"arrow_drop_down"},options:{attributes:{"forge-dropdown-icon":""}}};return new J(e).element}};function Kt(){N(s)}export{o as a,ce as b,O as c,he as d,v as e,_e as f,b as g,I as h,s as i,me as j,Kt as k};
7
- //# sourceMappingURL=chunk.D3BHOS2E.js.map
6
+ import{b as Z}from"./chunk.H5IFZCUL.js";import{c as pe}from"./chunk.DXA626CF.js";import{a as le,b as ae}from"./chunk.EYGSUZWX.js";import{a as F}from"./chunk.64BPRKXV.js";import{a as re}from"./chunk.IX2UHMIM.js";import{a as oe}from"./chunk.LKL5KWVY.js";import{h as ue,i as de}from"./chunk.YKZ36ELA.js";import{b as se}from"./chunk.RQG6GVOI.js";import{c as ie}from"./chunk.K57IO236.js";import{e as te}from"./chunk.AJTQHK25.js";import{b as ee}from"./chunk.P73BXRKY.js";import{a as C,e as ne}from"./chunk.WCSVKQR2.js";import{c as W,g as K,h as q}from"./chunk.MZLPUI6R.js";import{a as D}from"./chunk.YI4JTY4T.js";import{d as j,l as Q,m as J}from"./chunk.B5TEOESG.js";import{a as z}from"./chunk.2KXSGD3S.js";import{b as $,i as Y,j as X}from"./chunk.KYH5GKVI.js";import{a as R}from"./chunk.UWYANU5D.js";import{a}from"./chunk.KTGSZEAG.js";import{a as H,b as G,c as V}from"./chunk.DL7NX432.js";import{a as N,e as U,g as L}from"./chunk.LJLEPTLU.js";import{m as B,r as M,s as k,u as A}from"./chunk.4LA6HEA7.js";import{a as y,b as h,c as x,j as T,k as f,l as S,n as w,o as P}from"./chunk.J2M2MXP2.js";import{a as E,f as p}from"./chunk.MCIQXNKY.js";var g=`${G}autocomplete`,ve={MODE:"mode",MULTIPLE:"multiple",DEBOUNCE:"debounce",FILTER_ON_FOCUS:"filter-on-focus",FILTER_FOCUS_FIRST:"filter-focus-first",ALLOW_UNMATCHED:"allow-unmatched",POPUP_TARGET:"popup-target",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",OPEN:"open",MATCH_KEY:"match-key",FILTER_TEXT:"filter-text",DROPDOWN_ICON_OPEN:"data-forge-dropdown-icon-open"},be={INPUT:re.selectors.INPUT,DROPDOWN_ICON:"[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",CLEAR_BUTTON:"[data-forge-autocomplete-clear],[forge-autocomplete-clear]"},ge={DEFAULT_DEBOUNCE_TIME:500,NUM_SKELETON_ITEMS:3},Oe={CHANGE:`${g}-change`,SELECT:`${g}-select`,SCROLLED_BOTTOM:`${g}-scrolled-bottom`},o={elementName:g,attributes:ve,selectors:be,numbers:ge,events:Oe},ce=(e=>(e.Default="default",e.Stateless="stateless",e))(ce||{});var O=class extends R{constructor(e){super(e);this.setInputElement()}get inputElement(){return this._inputElement}setInputElement(){let e=M(this._component,o.selectors.INPUT,!1);return e.length&&(this._inputElement=e[0]),this._inputElement}setInputAttribute(e,t){this._inputElement.setAttribute(e,t)}addInputListener(e,t){this._inputElement.addEventListener(e,t)}removeInputListener(e,t){this._inputElement.removeEventListener(e,t)}initializeInputAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","polite"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-autocomplete","list"),Y(),X(this._inputElement)}isWrappingChipField(){return!!this._component.querySelector(F.elementName)}show(e,t){this._targetElement=this._getTargetElement(t),this._targetElement&&(this._listDropdown=new ue(this._targetElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-expanded","true"),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`),this._tryToggleDropdownIconRotation(!0))}hide(e){if(!this._listDropdown)return;let{targetElement:t}=this._listDropdown.dropdownElement;t.removeEventListener(C.events.BLUR,e),this.setBusyVisibility(!1),this._tryToggleDropdownIconRotation(!1),this._inputElement.removeAttribute("aria-activedescendant"),this._inputElement.removeAttribute("aria-controls"),this._inputElement.setAttribute("aria-expanded","false"),this._listDropdown.close(),this._listDropdown=void 0}setBusyVisibility(e){var t;(t=this._listDropdown)==null||t.setBusyVisibility(e)}setDismissListener(e){if(!this._listDropdown||!this._listDropdown.dropdownElement)return;let t=this._listDropdown.dropdownElement;t.targetElement&&t.targetElement.addEventListener(C.events.BLUR,e)}focus(){window.requestAnimationFrame(()=>this._inputElement.focus())}setOptions(e){var t;(t=this._listDropdown)==null||t.setOptions(e)}appendOptions(e){var t;(t=this._listDropdown)==null||t.appendOptions(e)}setSelectedText(e){this._inputElement.value=e}getInputValue(){return this._inputElement.value}setInputValue(e){this._inputElement.value=e}selectInputValue(){window.requestAnimationFrame(()=>this._inputElement.select())}isFocusWithinPopup(e){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(e)}hasFocus(){let e=k(this._component.ownerDocument);return e===this._inputElement||this.isFocusWithinPopup(e)}hasInputElement(){return!!this._inputElement}setDropdownIconListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.addEventListener(e,t)})}removeDropdownIconListener(e,t){let i=this._component.querySelector(o.selectors.DROPDOWN_ICON);i&&i.removeEventListener(e,t)}setClearButtonListener(e,t){window.requestAnimationFrame(()=>{let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.addEventListener(e,t)})}removeClearButtonListener(e,t){let i=this._component.querySelector(o.selectors.CLEAR_BUTTON);i&&i.removeEventListener(e,t)}propagateKey(e){var t;(t=this._listDropdown)==null||t.handleKey(e)}updateActiveDescendant(e){!this._targetElement||A(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._targetElement||(this._targetElement=this._getTargetElement(e)),this._targetElement.getBoundingClientRect().width}getPopupElement(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.dropdownElement)!=null?t:null}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}activateSelectedOption(){var e;(e=this._listDropdown)==null||e.activateSelectedOption()}activateOptionByIndex(e){var t;(t=this._listDropdown)==null||t.activateOption(e)}getActiveOptionIndex(){var e,t;return(t=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?t:null}clearActiveOption(){var e;(e=this._listDropdown)==null||e.clearActiveOption()}setSelectedOptions(e){if(this._listDropdown){let t=e.map(i=>i.value);this._listDropdown.setSelectedValues(t)}}queueDropdownPositionUpdate(){!this.getPopupElement()||window.requestAnimationFrame(()=>{let e=this.getPopupElement();e==null||e.position()})}_getTargetElement(e){return e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement()}_getDefaultTargetElement(){let e=this._component.querySelector("forge-text-field");if(e&&e.shadowRoot){let i=L(e,le.selectors.ROOT);if(i)return i}let t=this._component.querySelector("forge-chip-field");if(t&&t.shadowRoot){let i=L(t,F.selectors.ROOT);if(i)return i}return this._component.querySelector("input")||this._component}_tryToggleDropdownIconRotation(e){let t=this._component.querySelector(o.selectors.DROPDOWN_ICON);t&&A(t,e,o.attributes.DROPDOWN_ICON_OPEN)}};var he=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(he||{});function v(u,d){let e=u.some(i=>h(i)&&T(i)&&i.hasOwnProperty("options")&&(i.hasOwnProperty("text")||i.hasOwnProperty("builder"))),t=u.some(i=>h(i)&&T(i)&&i.hasOwnProperty("label")&&i.hasOwnProperty("value"));return e&&d===1||t&&d===0}function _e(u,d){return u.find(e=>e.value===d)}function b(u,d,e=null){return e?!(e in u.value)||!(e in d)?!1:w(u.value[e],d[e]):w(u.value,d)}var I=class extends de{constructor(e){super();this._adapter=e;this._isInitialized=!1;this._isDropdownOpen=!1;this._mode="default";this._multiple=!1;this._debounce=o.numbers.DEFAULT_DEBOUNCE_TIME;this._allowUnmatched=!1;this._filterOnFocus=!0;this._filterFocusFirst=!0;this._options=[];this._filterText="";this._selectedOptions=[];this._values=[];this._pendingFilterPromises=[];this._matchKey=null;this._clickListener=t=>this._onClick(t),this._focusListener=()=>this._onFocus(),this._blurListener=t=>this._onBlur(t),this._keydownListener=t=>this._onKeydown(t),this._dropdownIconClickListener=t=>this._onDropdownIconClick(t),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dropdownIconMouseDownListener=t=>this._onDropdownIconMouseDown(t),this._clearButtonListener=t=>this._onClear(t),this._dismissListener=()=>this._onDismiss(),this._activeChangeListener=t=>this._adapter.updateActiveDescendant(t),this._targetWidthCallback=()=>this._adapter.getTargetElementWidth(this._popupTarget),this._identifier=y()}async initialize(){if(!this._adapter.hasInputElement()&&!this._adapter.setInputElement())throw new Error("An input element is required as a child of the autocomplete component.");if(this._setInputListener(),this._setFilterCallback(),this._attachListeners(),this._initializeAccessibility(),this._values.length){if(!this._selectedOptions.length){try{await this._executeFilter()}catch(e){console.error(e)}this._updateSelectedOptions(this._values)}this._adapter.setSelectedText(this._getSelectedText())}this._isInitialized=!0}disconnect(){this._isInitialized&&(this._detachListeners(),this._isInitialized=!1),this._isDropdownOpen&&this._closeDropdown()}async forceFilter({preserveValue:e}){this._options=[],await this._executeFilter(!0,!0),e&&this._options.push(...this._selectedOptions),this._applyValue(this._values)}_attachListeners(){this._adapter.addInputListener("click",this._clickListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.addInputListener("input",this._inputListener),this._adapter.addInputListener("keydown",this._keydownListener),this._adapter.setDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.setDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.setClearButtonListener("click",this._clearButtonListener)}_detachListeners(){this._adapter.removeInputListener("click",this._clickListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("keydown",this._keydownListener),this._adapter.removeDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.removeDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.removeClearButtonListener("click",this._clearButtonListener)}_setInputListener(){this._inputListener=e=>this._onInput(e)}_setFilterCallback(){this._filterFn=h(this._debounce)&&this._debounce>0?P(this._debounceFilter,this._debounce,!1):this._debounceFilter}_initializeAccessibility(){this._adapter.initializeInputAccessibility(this._identifier)}get _flatOptions(){return v(this._options,1)?this._options.reduce((e,t)=>e.concat(t.options),[]):this._options}_onClick(e){!this._isDropdownOpen&&this._filterOnFocus&&this._showDropdown()}_onDropdownIconMouseDown(e){e.preventDefault()}_onDropdownIconClick(e){this._isDropdownOpen?this._closeDropdown():(this._adapter.focus(),window.requestAnimationFrame(()=>this._showDropdown()))}_onClear(e){this._filterText="",this._clearValue(),this._adapter.setSelectedText(this._getSelectedText())}_onDropdownScrollEnd(){this._adapter.emitHostEvent(o.events.SCROLLED_BOTTOM)}_onFocus(){!this._isDropdownOpen&&this._adapter.getInputValue()&&!D.isMobile&&this._adapter.selectInputValue()}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._applyBlur()}_applyBlur(){this._isDropdownOpen&&this._closeDropdown(),this._mode!=="stateless"&&(this._selectedOptions.length?this._adapter.setSelectedText(this._getSelectedText()):this._allowUnmatched||(this._filterText="",this._adapter.setSelectedText("")))}_onInput(e){this._selectedOptions.length&&!this._multiple&&(!this._adapter.getInputValue()||this._allowUnmatched)&&!this._adapter.isWrappingChipField()&&(this._selectedOptions=[],this._values=[],this._emitChangeEvent()),this._filterText=this._adapter.getInputValue(),this._filterFn()}async _debounceFilter({checkFocus:e=!0}={}){if(!e&&!this._adapter.hasFocus()){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}let t=this._filterText,i=this._executeFilter();this._pendingFilterPromises.push(i),this._isDropdownOpen?this._adapter.setBusyVisibility(!0):this._showDropdown({filter:!1});try{await i}catch(n){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}if(t===this._filterText)this._pendingFilterPromises=[],this._onFilterComplete();else{let n=this._pendingFilterPromises.indexOf(i);n!==-1&&this._pendingFilterPromises.splice(n,1)}}_onKeydown(e){switch(e.key){case"Tab":this._isDropdownOpen&&!this._multiple&&this._selectActiveOption(!1);break;case"Esc":case"Escape":this._isDropdownOpen&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Down":case"ArrowDown":e.preventDefault(),this._isDropdownOpen?this._adapter.propagateKey(e.key):this._showDropdown({activateFirst:!0,activateSelected:!0});break;case"Up":case"ArrowUp":e.preventDefault(),this._isDropdownOpen&&this._adapter.propagateKey(e.key);break;case"Enter":case"Home":case"End":this._isDropdownOpen&&(e.key==="Enter"&&e.stopPropagation(),e.preventDefault(),this._adapter.propagateKey(e.key));break;case"Backspace":case"Delete":let t=e.target,i=this._adapter.getInputValue(),n=t.value.substring(t.selectionStart,t.selectionEnd)===t.value,l=i.length===1&&t.selectionEnd===1,c=i.length===1&&t.selectionEnd===0,_=!i||n||l||c;!this._adapter.isWrappingChipField()&&_&&!this._multiple&&this._values.length&&this._clearValue();break}}_executeFilter(e=!0,t=!1){if(!this._filter||typeof this._filter!="function")throw new Error('A filter callback must be provided. Did you set the "filter" property?');let i=this._filter,n=e?this._filterText:"",l=t?this._getValue():null;return new Promise((c,_)=>Promise.resolve(i(n,l)).then(r=>{this._options=r,c(this._options)}).catch(r=>_(`An unexpected error occurred while filtering: ${r}`)))}_onFilterComplete(){if(!this._adapter.hasFocus()){this._isDropdownOpen&&this._closeDropdown();return}if(this._options.length){let e=this._allowUnmatched&&!this._selectedOptions.length;this._dropdownReady({userTriggered:e}),this._filterFocusFirst&&this._filterText&&this._adapter.activateFirstOption()}else this._closeDropdown()}_clearValue(){this._selectedOptions=[],this._values=[],this._isDropdownOpen&&(this._adapter.setSelectedOptions([]),this._adapter.clearActiveOption()),this._emitChangeEvent()}async _showDropdown({filter:e=!0,userTriggered:t=!0,activateFirst:i=!1,activateSelected:n=!1}={}){let l=this._allowUnmatched&&!this._selectedOptions.length;this._isDropdownOpen=!0;let c;if(this._optionBuilder){let r=this._optionBuilder;c=(m,fe)=>r(m,this._filterText,fe)}let _={options:this._options,referenceElement:this._adapter.inputElement,multiple:this._multiple,selectedValues:[...this._values],id:`forge-autocomplete-${this._identifier}`,asyncStyle:"skeleton",optionLimit:this._optionLimit,popupClasses:this._popupClasses,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,transform:r=>{if(this._filterText){let m=$(r,this._filterText);if(m)return m}return r},allowBusy:!0,optionBuilder:c,syncWidth:this._syncPopupWidth,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,selectCallback:r=>this._onSelect(r),closeCallback:()=>this._closeDropdown()};if(this._adapter.show(_,this._popupTarget),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen),e){this._options.length&&this._adapter.setBusyVisibility(!0);try{await this._executeFilter(l)}catch(r){console.error(r)}this._updateSelectedOptions(this._values)}this._pendingFilterPromises.length||this._dropdownReady({userTriggered:t,activateFirst:i,activateSelected:n})}_dropdownReady({userTriggered:e=!0,activateFirst:t=!1,activateSelected:i=!1}={}){if(!this._isDropdownOpen||!this._options.length||e&&!this._adapter.hasFocus()){this._closeDropdown();return}this._sortSelectedOptions(),this._adapter.setBusyVisibility(!1),this._adapter.setOptions(this._options),this._adapter.setSelectedOptions(this._selectedOptions),this._adapter.setDismissListener(this._dismissListener),i&&this._selectedOptions.length?this._adapter.activateSelectedOption():t&&this._adapter.activateFirstOption()}_closeDropdown(){this._multiple&&(this._filterText=""),this._isDropdownOpen=!1,this._adapter.hide(this._dismissListener),this._sortSelectedOptions(),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._isDropdownOpen)}_sortSelectedOptions(){if(this._multiple&&this._selectedOptions.length&&v(this._options,0)){let e=[],t=[];this._options.forEach(i=>{this._selectedOptions.find(n=>b(n,i.value,this._matchKey))?e.push(i):t.push(i)}),this._options=[...e,...t]}}async _onSelect(e,t=!0){if(this._valueChanging)return;if(this._mode==="stateless"){let n={value:e};this._adapter.emitHostEvent(o.events.SELECT,n,!0,!0)&&(this._filterText="",this._multiple||this._closeDropdown());return}let i=()=>{let l=this._flatOptions.find(r=>b(r,e,this._matchKey)),c=l?l.value:"",_=l?l.label:"";if(this._multiple){let r=_e(this._selectedOptions,c);if(r){let m=this._selectedOptions.indexOf(r);this._selectedOptions.splice(m,1)}else this._selectedOptions.push(l)}else h(c)?(this._selectedOptions[0]=l,this._filterText=_):(this._selectedOptions=[],this._filterText="");this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions),this._values=this._selectedOptions.map(r=>r.value),this._adapter.setSelectedText(this._getSelectedText()),!D.isMobile&&t&&this._adapter.selectInputValue(),this._emitChangeEvent(),this._tryUpdateDropdownPosition()};this._isDropdownOpen&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"?(this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,e,this._matchKey)),await this._valueChanging?i():this._tryUpdateDropdownPosition(),this._valueChanging=void 0):i()}_selectActiveOption(e=!0){let t=this._adapter.getActiveOptionIndex();if(typeof t=="number"&&t>=0){let i=this._flatOptions[t];i&&this._onSelect(i.value,e)}}_emitChangeEvent(){this._adapter.emitHostEvent(o.events.CHANGE,this._getValue(),!0)}_tryUpdateDropdownPosition(){this._isDropdownOpen&&this._adapter.queueDropdownPositionUpdate()}_getValue(){return this._values?this._values.length?this._multiple?[...this._values]:this._values[0]:this._multiple?[]:null:null}_getSelectedText(){var e,t;return this._adapter.isWrappingChipField()?"":this._selectedTextBuilder?this._selectedTextBuilder(this._selectedOptions):this._multiple?this._values.length?this._values.length===1?(t=(e=this._selectedOptions[0])==null?void 0:e.label)!=null?t:"":`${this._values.length} options selected`:"":this._selectedOptions.filter(i=>i&&i.label).map(i=>i.label).join(" ").trim()}_onDismiss(){this._closeDropdown()}async _applyValue(e){let t=[];this._selectedOptions=[],Array.isArray(e)?t=e:t=h(e)?[e]:[],!this._multiple&&t.length>1&&(t=[t[0]]),v(t,0)?(this._values=t.map(n=>n.value),this._selectedOptions=t):this._values=t;let i=this._flatOptions;if(t.length&&i.length&&this._updateSelectedOptions(t),this._values.length&&!this._selectedOptions.length&&!!this._filter&&this._isInitialized){try{await this._executeFilter(!1,!0)}catch(n){console.error(n)}this._updateSelectedOptions(this._values)}this._multiple?this._filterText="":this._filterText=this._selectedOptions.length?this._selectedOptions[0].label:"",this._isInitialized&&this._adapter.setSelectedText(this._getSelectedText()),this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions)}_updateSelectedOptions(e){let t=[...this._flatOptions,...this._selectedOptions];if(this._selectedOptions.length&&(this._selectedOptions=[]),v(e,0))for(let i of e){let n=t.find(l=>b(l,i.value,this._matchKey));n?this._selectedOptions.push(n):this._selectedOptions.push(i)}else for(let i of e){let n=t.find(l=>b(l,i,this._matchKey));n?this._selectedOptions.push(n):this._allowUnmatched&&this._selectedOptions.push({label:i,value:i})}}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._mode==="stateless"&&(this._selectedOptions=[],this._isDropdownOpen&&this._closeDropdown()),this._adapter.setHostAttribute(o.attributes.MODE,this._mode))}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._adapter.setHostAttribute(o.attributes.MULTIPLE,h(this._multiple)?this._multiple.toString():""))}get value(){return this._getValue()}set value(e){let t=[];e==null?t=[]:Array.isArray(e)?t=structuredClone(e):x(e)?t=[e]:t=[structuredClone(e)],(t.length!==this._values.length||t.some(n=>!this._values.includes(n)))&&this._applyValue(e)}get filterOnFocus(){return this._filterOnFocus}set filterOnFocus(e){this._filterOnFocus!==e&&(this._filterOnFocus=e,this._adapter.setHostAttribute(o.attributes.FILTER_ON_FOCUS,h(this._filterOnFocus)?this._filterOnFocus.toString():""))}get filterFocusFirst(){return this._filterFocusFirst}set filterFocusFirst(e){this._filterFocusFirst!==e&&(this._filterFocusFirst=e,this._adapter.toggleHostAttribute(o.attributes.FILTER_FOCUS_FIRST,this._filterFocusFirst))}get allowUnmatched(){return this._allowUnmatched}set allowUnmatched(e){this._allowUnmatched!==e&&(this._allowUnmatched=e,h(this._allowUnmatched)&&this._adapter.setHostAttribute(o.attributes.ALLOW_UNMATCHED,this._allowUnmatched.toString()))}get matchKey(){return this._matchKey}set matchKey(e){this._matchKey!==e&&(this._matchKey=e)}get popupTarget(){return this._popupTarget}set popupTarget(e){this._popupTarget!==e&&(this._popupTarget=e)}get filterText(){return this._filterText}set filterText(e){this._filterText!==e&&(this._filterText=this._allowUnmatched?e:"",this._isInitialized&&this._allowUnmatched&&(this._adapter.setInputValue(this._filterText),this._isDropdownOpen&&this._debounceFilter({checkFocus:!1})))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:[this._popupClasses]}set popupClasses(e){this._popupClasses!==e&&(this._popupClasses=Array.isArray(e)?[...e]:[e])}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}set popupFooterBuilder(e){this._popupFooterBuilder=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth!==e&&(this._syncPopupWidth=e)}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit!==e&&(this._optionLimit=e)}get debounce(){return this._debounce}set debounce(e){this._debounce!==e&&(this._debounce=e,this._isInitialized&&this._setFilterCallback(),this._adapter.setHostAttribute(o.attributes.DEBOUNCE,h(this._debounce)?this._debounce.toString():""))}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get filter(){return this._filter}set filter(e){this._filter!==e&&(this._filter=e,this._isInitialized&&this._values.length&&!this._flatOptions.length&&!!this._filter&&this._executeFilter().then(()=>{this._updateSelectedOptions(this._values),this._adapter.setSelectedText(this._getSelectedText())}))}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e,this._selectedOptions.length&&this._adapter.setSelectedText(this._getSelectedText())}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}appendOptions(e){!this._isDropdownOpen||(this._options=[...this._options,...e],this._adapter.appendOptions(e))}get isInitialized(){return this._isInitialized}get open(){return this._isDropdownOpen}set open(e){this._isDropdownOpen!==e&&(e?this._showDropdown({userTriggered:!1}):this._closeDropdown())}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){e!==this._beforeValueChange&&(this._beforeValueChange=e)}get popupElement(){return this._adapter.getPopupElement()}};var Ie="<template><slot></slot></template>",Ee=":host{display:block}:host([hidden]){display:none}",s=class extends oe{constructor(){super();j.define([W,q,K]),U(this,Ie,Ee),this._foundation=new I(new O(this))}static get observedAttributes(){return[o.attributes.MODE,o.attributes.MULTIPLE,o.attributes.DEBOUNCE,o.attributes.FILTER_ON_FOCUS,o.attributes.FILTER_FOCUS_FIRST,o.attributes.ALLOW_UNMATCHED,o.attributes.POPUP_TARGET,o.attributes.POPUP_CLASSES,o.attributes.OBSERVE_SCROLL,o.attributes.OBSERVE_SCROLL_THRESHOLD,o.attributes.OPTION_LIMIT,o.attributes.SYNC_POPUP_WIDTH,o.attributes.OPEN,o.attributes.MATCH_KEY,o.attributes.FILTER_TEXT]}connectedCallback(){this.querySelector(o.selectors.INPUT)?this._foundation.initialize():B(this,o.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,t,i){switch(super.attributeChangedCallback(e,t,i),e){case o.attributes.MODE:this.mode=i;break;case o.attributes.MULTIPLE:this.multiple=f(i);break;case o.attributes.DEBOUNCE:this.debounce=S(i);break;case o.attributes.FILTER_ON_FOCUS:this.filterOnFocus=f(i);break;case o.attributes.FILTER_FOCUS_FIRST:this.filterFocusFirst=f(i);break;case o.attributes.ALLOW_UNMATCHED:this.allowUnmatched=f(i);break;case o.attributes.POPUP_TARGET:this.popupTarget=i;break;case o.attributes.OPEN:this.open=f(i);break;case o.attributes.MATCH_KEY:this.matchKey=i;break;case o.attributes.FILTER_TEXT:this.filterText=i;break}}appendOptions(e){this._foundation.appendOptions(e)}openDropdown(){this.open=!0}closeDropdown(){this.open=!1}forceFilter(e={preserveValue:!1}){this._foundation.forceFilter(e)}};p([a()],s.prototype,"mode",2),p([a()],s.prototype,"multiple",2),p([a()],s.prototype,"value",2),p([a()],s.prototype,"debounce",2),p([a()],s.prototype,"filterOnFocus",2),p([a()],s.prototype,"filterFocusFirst",2),p([a()],s.prototype,"allowUnmatched",2),p([a()],s.prototype,"popupTarget",2),p([a()],s.prototype,"filterText",2),p([a()],s.prototype,"optionBuilder",2),p([a()],s.prototype,"filter",2),p([a()],s.prototype,"selectedTextBuilder",2),p([a()],s.prototype,"open",2),p([a()],s.prototype,"matchKey",2),p([a({set:!1})],s.prototype,"isInitialized",2),p([a({set:!1})],s.prototype,"popupElement",2),p([a()],s.prototype,"beforeValueChange",2),s=p([H({name:o.elementName,dependencies:[pe,ne,ie,te,Z,se,ee,Q]})],s);var me=class extends z{constructor(e){super(e)}_build(){let e=document.createElement(o.elementName);return this._attachTextField(e),e}get textFieldDelegate(){return this._textFieldDelegate}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(e){this._textFieldDelegate.inputElement.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(o.events.CHANGE,t=>e(t.detail))}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",t=>e(t))}_attachTextField(e){var i,n,l,c,_,r;let t={props:E({},(n=(i=this._config.options)==null?void 0:i.textFieldDelegateConfig)==null?void 0:n.props),options:E({},(c=(l=this._config.options)==null?void 0:l.textFieldDelegateConfig)==null?void 0:c.options)};t.options||(t.options={}),((_=this._config.options)==null?void 0:_.useDropdownIcon)!==!1&&!((r=t.options)!=null&&r.trailingElement)&&(t.options.trailingElement=this._createDropdownIconElement()),this._textFieldDelegate=new ae(t),e.appendChild(this._textFieldDelegate.element)}_createDropdownIconElement(){let e={props:{slot:"trailing",name:"arrow_drop_down"},options:{attributes:{"forge-dropdown-icon":""}}};return new J(e).element}};function Kt(){N(s)}export{o as a,ce as b,O as c,he as d,v as e,_e as f,b as g,I as h,s as i,me as j,Kt as k};
7
+ //# sourceMappingURL=chunk.HMJ3REU5.js.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Tyler Technologies, Inc.
4
+ * License: Apache-2.0
5
+ */
6
+ import{g}from"./chunk.J2M2MXP2.js";var b=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,A=/a-z/i,h=10;function T(t){if(t=t.replace(/_|\s/g,""),b.test(t)){let f=new Date(t);if(A.test(t)||f.setMinutes(f.getMinutes()+f.getTimezoneOffset()),g(f))return f}let e=[];t.indexOf("/")!==-1?e=t.split("/"):t.indexOf("-")!==-1?e=t.split("-"):(t.length===6||t.length===8)&&!isNaN(+t)&&(e=[t.substring(0,2),t.substring(2,4),t.substring(4)]);let o=e.length===3,[n,s,r]=e;if(n==="0"&&(n="1"),s==="0"&&(s="1"),typeof r=="string"&&r.length===3&&(r=r.padStart(4,"0")),o){let f=n.length===1||n.length===2,l=s.length===1||s.length===2,c=r.length===2||r.length===4;if(!f||!l||!c)return null}else return null;if(r.length===2){let f=new Date().getFullYear()-(100-h),l=new Date().getFullYear()+h,c=String(f).slice(0,2),D=String(l).slice(0,2),M=+String(l).slice(2);r=+r<=M?`${D}${r}`:`${c}${r}`}let a=+n,i=+s,u=+r;a>12&&(a=12);let m=new Date(u,a,0).getDate();i>m&&(i=m);let d=new Date(u,a-1,i,0,0,0,0);return g(d)?d:null}function w(t){let e=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),n=String(t.getFullYear()).padStart(4,"0");return[e,o,n].join("/")}function y(t,e){return!t&&!e?!0:!t||!e||!g(t)||!g(e)?!1:new Date(t).setHours(0,0,0,0)===new Date(e).setHours(0,0,0,0)}function _(t,e){return new Date(e!=null?e:1970,t+1,0)}function C(t,e){return _(t,e).getDate()}function O(t,e){let o=document.createElement("div");o.innerHTML=t;for(let s=o.childNodes.length-1;s>=0;s--)o.childNodes[s].nodeName.toLowerCase()!=="svg"&&o.removeChild(o.childNodes[s]);let n=o.firstElementChild;return n&&n.nodeName.toLowerCase()==="svg"&&p(n)?(e&&n.setAttribute("viewBox",e),!n.hasAttribute("viewBox")&&e&&n.setAttribute("viewBox",e),n.removeAttribute("height"),n.removeAttribute("width"),n):null}function p(t){if(t.nodeType!==1)return!0;if(t.nodeName.toLowerCase()==="script")return!1;let e=Array.from(t.attributes);for(let n of e)if(typeof n.name=="string"&&n.name.toLowerCase().startsWith("on"))return!1;let o=Array.from(t.childNodes);for(let n of o)if(!p(n))return!1;return!0}var E=/^(0?[0-9]|1\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/,x=/^(0?[1-9]|1[0-2]):([0-5]\d)(:([0-5]\d))?\s*([AaPp][Mm])?$/,N=/^(\d?\d?):?(\d?\d?)(:?(\d?\d?))?\s*([AaPp][Mm]?)?$/,S=/[AaPp][Mm]?/;function $(t){let e=t.match(E)||[null,0,0,null,0],o=e[1],n=e[2],s=e[4];return{hours:o,minutes:n,seconds:s}}function I(t){let e=t.match(x)||[null,0,0,null,0,"AM"],o=e[1],n=e[2],s=e[4],r=e[5];return{hours:o,minutes:n,seconds:s,meridiem:r}}function G(t){return E.test(t)||x.test(t)}function F(t,e,o){if(t=t&&typeof t=="string"?t.replace(/_|\s/g,""):"",/^\s*$/.test(t)||/^:+$/.test(t))return"";let n=t.match(N);if(!n)return"";let s=n[1],r=n[2],a=n[4],i=n[5],u=t.match(S);u&&(i=u[0],t=t.replace(i,""),i.length===1&&(i+="m")),t.length===3&&!t.includes(":")&&(s=t[0],r=t.substring(1)),e?i="":S.test(i)?i=i.toUpperCase():/^[AaPp]/.test(i)?i.toLowerCase().startsWith("a")?i="AM":i.toLowerCase().startsWith("p")&&(i="PM"):i="";let m=+s||0,d=+r||0,f=!i||e?23:12;if(m>=f?s=String(f):m<0&&(s="00"),s=s.padStart(2,"0"),r!==void 0&&(d>59?r="59":d<0?r="00":r=r.padStart(2,"0")),a!==void 0){let c=+a||0;c>59?a="59":c<0?a="00":a=a.padStart(2,"0")}let l=s;return r!==void 0&&(l+=`:${r}`,a===void 0&&o&&(a="00")),a!==void 0&&(l+=`:${a}`),i&&(l+=` ${i}`),l}export{b as a,A as b,T as c,w as d,y as e,_ as f,C as g,O as h,p as i,E as j,x as k,N as l,S as m,$ as n,I as o,G as p,F as q};
7
+ //# sourceMappingURL=chunk.J3YNMJ7K.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/core/utils/date-utils.ts", "../../src/core/utils/svg-utils.ts", "../../src/core/utils/time-utils.ts"],
4
+ "sourcesContent": ["import { isValidDate } from '@tylertech/forge-core';\n\nexport const ISO_8601_REGEX = /^([\\+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$/;\nexport const ISO_TIMEZONE_REGEX = /a-z/i;\nconst FUTURE_YEAR_COERCION = 10; // The number of years in the future to coerce two-digit years into current century\n\n/**\n * Parses a date string value to a `Date` object in local time.\n * @param str The date string value.\n */\nexport function parseDateString(value: string): Date | null {\n value = value.replace(/_|\\s/g, ''); // Remove potential extraneous characters\n\n // We first check if this is a valid date in ISO 8601 format and return it if so\n if (ISO_8601_REGEX.test(value)) {\n const iso8601Date = new Date(value);\n\n // This is an ISO string, but does it have a timezone? If not, we add current timezone offset\n if (!ISO_TIMEZONE_REGEX.test(value)) {\n iso8601Date.setMinutes(iso8601Date.getMinutes() + iso8601Date.getTimezoneOffset());\n }\n\n if (isValidDate(iso8601Date)) {\n return iso8601Date;\n }\n }\n\n let values: string[] = [];\n\n // We accept dates with a \"/\" or \"-\" separator and in the format of MM/DD/YYYY\n if (value.indexOf('/') !== -1) {\n values = value.split('/');\n } else if (value.indexOf('-') !== -1) {\n values = value.split('-');\n } else if ((value.length === 6 || value.length === 8) && !isNaN(+value)) {\n values = [value.substring(0, 2), value.substring(2, 4), value.substring(4)];\n }\n\n const hasMonthDayYear = values.length === 3;\n let [month, day, year] = values;\n\n // Ensure are month and year values are coerced from 0 to 1 in case of incomplete entry\n if (month === '0') {\n month = '1';\n }\n if (day === '0') {\n day = '1';\n }\n\n // Trap for the case where only 3 digit years are entered\n if (typeof year === 'string' && year.length === 3) {\n year = year.padStart(4, '0');\n }\n \n if (hasMonthDayYear) {\n const isValidMonthLength = month.length === 1 || month.length === 2;\n const isValidDayLength = day.length === 1 || day.length === 2;\n const isValidYearLength = year.length === 2 || year.length === 4;\n\n if (!isValidMonthLength || !isValidDayLength || !isValidYearLength) {\n return null;\n }\n } else {\n return null;\n }\n\n // Check if we need to coerce two-digit years to the four-digit equivalent\n if (year.length === 2) {\n const minYear = new Date().getFullYear() - (100 - FUTURE_YEAR_COERCION);\n const maxYear = new Date().getFullYear() + FUTURE_YEAR_COERCION;\n const minYearCentury = String(minYear).slice(0, 2);\n const maxYearCentury = String(maxYear).slice(0, 2);\n const normalizedMaxYear = +String(maxYear).slice(2);\n year = +year <= normalizedMaxYear ? `${maxYearCentury}${year}` : `${minYearCentury}${year}`;\n }\n\n let numMonth = +month;\n let numDay = +day;\n const numYear = +year;\n\n if (numMonth > 12) {\n numMonth = 12;\n }\n\n const maxDaysInMonth = new Date(numYear, numMonth, 0).getDate();\n\n if (numDay > maxDaysInMonth) {\n numDay = maxDaysInMonth;\n }\n\n const parsedDate = new Date(numYear, numMonth - 1, numDay, 0, 0, 0, 0);\n return isValidDate(parsedDate) ? parsedDate : null;\n}\n\n/**\n * Formats a `Date` to a specified format.\n * @param str The date string value.\n */\nexport function formatDate(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const day = String(date.getDate()).padStart(2, '0');\n const year = String(date.getFullYear()).padStart(4, '0');\n return [month, day, year].join('/');\n}\n\n/**\n * Determines if two date objects are equal.\n * \n * Note: Time values are ignored.\n * @param first The date to compare.\n * @param second The date to compare the first date to. \n * @returns A boolean whether the two dates are equivalent.\n */\nexport function isSameDate(first?: Date | null, second?: Date | null): boolean {\n if (!first && !second) {\n return true;\n } else if (!first || !second) {\n return false;\n } else if (!isValidDate(first) || !isValidDate(second)) {\n return false;\n }\n return new Date(first).setHours(0, 0, 0, 0) === new Date(second).setHours(0, 0, 0, 0);\n}\n\n/** \n * Returns the last date on a month.\n * \n * @param month The month.\n * @param year The year of the month, needed for February otherwise optional.\n * @returns The last date of the given month.\n */\nexport function getLastDateOfMonth(month: number, year?: number): Date {\n return new Date(year ?? 1970, month + 1, 0);\n}\n\n/**\n * Returns the number of days in a month.\n * \n * @param month The month to find the length of.\n * @param year The year to check within, needed for February otherwise optional.\n * @returns The number of days in the month.\n */\nexport function getMonthLength(month: number, year?: number): number {\n return getLastDateOfMonth(month, year).getDate();\n}\n", "/**\n * Creates an SVG element from a string.\n */\nexport function createSvgFromString(svgContent: string, defaultViewBox?: string): SVGSVGElement | null {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // Remove all non-svg child nodes\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n const svgElm = div.firstElementChild as SVGSVGElement;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg' && isSafeSvg(svgElm)) {\n // Check if a custom viewbox value was provided and use that if so\n if (defaultViewBox) {\n svgElm.setAttribute('viewBox', defaultViewBox);\n }\n\n // Force a default viewBox if one doesn't exist (this ensures our icon is scalable)\n if (!svgElm.hasAttribute('viewBox') && defaultViewBox) {\n svgElm.setAttribute('viewBox', defaultViewBox);\n }\n\n // Remove any height and width attributes to ensure that the icon is properly scalable\n svgElm.removeAttribute('height');\n svgElm.removeAttribute('width');\n\n return svgElm;\n }\n\n return null;\n}\n\n/**\n * Determines if the provided element is a safe SVG to use.\n * @param el The element reference to test.\n */\nexport function isSafeSvg(el: Element): boolean {\n if (el.nodeType !== 1) {\n return true;\n }\n\n // Validate no <script> tags exist\n if (el.nodeName.toLowerCase() === 'script') {\n return false;\n }\n\n // Ensure there are no inline listeners\n const attributes = Array.from(el.attributes);\n for (const attr of attributes) {\n if (typeof attr.name === 'string' && attr.name.toLowerCase().startsWith('on')) {\n return false;\n }\n }\n\n // Ensure all child nodes are valid\n const childNodes = Array.from(el.childNodes) as Element[];\n for (const node of childNodes) {\n if (!isSafeSvg(node)) {\n return false;\n }\n }\n\n return true;\n}\n", "export const TWENTY_FOUR_HOUR_TIME_REGEX = /^(0?[0-9]|1\\d|2[0-3]):([0-5]\\d)(:([0-5]\\d))?$/;\nexport const TWELVE_HOUR_TIME_REGEX = /^(0?[1-9]|1[0-2]):([0-5]\\d)(:([0-5]\\d))?\\s*([AaPp][Mm])?$/;\nexport const PARSEABLE_TIME_FORMAT = /^(\\d?\\d?):?(\\d?\\d?)(:?(\\d?\\d?))?\\s*([AaPp][Mm]?)?$/;\nexport const HAS_MERIDIEM_REGEX = /[AaPp][Mm]?/;\n\nexport function tokenize24HourTimeString(value: string): { hours: string; minutes: string; seconds: string } {\n const matches = value.match(TWENTY_FOUR_HOUR_TIME_REGEX) as RegExpMatchArray || [null, 0, 0, null, 0];\n const hours = matches[1];\n const minutes = matches[2];\n const seconds = matches[4];\n return { hours, minutes, seconds };\n}\n\nexport function tokenize12HourTimeString(value: string): { hours: string; minutes: string; seconds: string; meridiem: string } {\n const matches = value.match(TWELVE_HOUR_TIME_REGEX) as RegExpMatchArray || [null, 0, 0, null, 0, 'AM'];\n const hours = matches[1];\n const minutes = matches[2];\n const seconds = matches[4];\n const meridiem = matches[5];\n return { hours, minutes, seconds, meridiem };\n}\n\nexport function isSupportedTimeFormat(value: string): boolean {\n return TWENTY_FOUR_HOUR_TIME_REGEX.test(value) ||\n TWELVE_HOUR_TIME_REGEX.test(value);\n}\n\nexport function tryCoerceTimeString(str: string, use24HourTime: boolean, allowSeconds: boolean): string {\n str = str && typeof str === 'string' ? str.replace(/_|\\s/g, '') : '';\n if (/^\\s*$/.test(str) || /^:+$/.test(str)) {\n return '';\n }\n\n const matches = str.match(PARSEABLE_TIME_FORMAT);\n if (!matches) {\n return '';\n }\n\n let hoursStr = matches[1];\n let minutesStr = matches[2];\n let secondsStr = matches[4];\n let meridiem = matches[5];\n\n // Special case detection for meridiem\n const meridiemMatches = str.match(HAS_MERIDIEM_REGEX);\n if (meridiemMatches) {\n meridiem = meridiemMatches[0];\n str = str.replace(meridiem, ''); // Remove the meridiem from the input string our next special case\n\n // We allow for entering an \"a\" or \"p\" shorthand so let's coerce it to the proper value\n if (meridiem.length === 1) {\n meridiem += 'm';\n }\n }\n\n // Special case handling for 3-digit \"shorthand\" time values (ex. \"130\" => \"1:30 AM\")\n if (str.length === 3 && !str.includes(':')) {\n hoursStr = str[0];\n minutesStr = str.substring(1);\n }\n\n // Normalize the meridiem string\n if (use24HourTime) {\n meridiem = '';\n } else if (HAS_MERIDIEM_REGEX.test(meridiem)) {\n meridiem = meridiem.toUpperCase();\n } else {\n if (/^[AaPp]/.test(meridiem)) {\n if (meridiem.toLowerCase().startsWith('a')) {\n meridiem = 'AM';\n } else if (meridiem.toLowerCase().startsWith('p')) {\n meridiem = 'PM';\n }\n } else {\n meridiem = '';\n }\n }\n\n const hoursNum = +hoursStr || 0;\n const minutesNum = +minutesStr || 0;\n\n // Clamp and normalize hours\n const maxHours = !meridiem || use24HourTime ? 23 : 12;\n if (hoursNum >= maxHours) {\n hoursStr = String(maxHours);\n } else if (hoursNum < 0) {\n hoursStr = '00';\n }\n\n hoursStr = hoursStr.padStart(2, '0');\n\n // Clamp and normalize minutes\n if (minutesStr !== undefined) {\n if (minutesNum > 59) {\n minutesStr = '59';\n } else if (minutesNum < 0) {\n minutesStr = '00';\n } else {\n minutesStr = minutesStr.padStart(2, '0');\n }\n }\n\n // Clamp and normalize seconds (if applicable)\n if (secondsStr !== undefined) {\n const secondsNum = +secondsStr || 0;\n if (secondsNum > 59) {\n secondsStr = '59';\n } else if (secondsNum < 0) {\n secondsStr = '00';\n } else {\n secondsStr = secondsStr.padStart(2, '0');\n }\n }\n\n // Build resulting time string\n let timeStr = hoursStr;\n if (minutesStr !== undefined) {\n timeStr += `:${minutesStr}`;\n if (secondsStr === undefined && allowSeconds) {\n secondsStr = '00';\n }\n }\n if (secondsStr !== undefined) {\n timeStr += `:${secondsStr}`;\n }\n if (meridiem) {\n timeStr += ` ${meridiem}`;\n }\n\n return timeStr;\n}\n"],
5
+ "mappings": "mCAEO,IAAMA,EAAiB,8RACjBC,EAAqB,OAC5BC,EAAuB,GAMtB,SAASC,EAAgBC,EAA4B,CAI1D,GAHAA,EAAQA,EAAM,QAAQ,QAAS,EAAE,EAG7BJ,EAAe,KAAKI,CAAK,EAAG,CAC9B,IAAMC,EAAc,IAAI,KAAKD,CAAK,EAOlC,GAJKH,EAAmB,KAAKG,CAAK,GAChCC,EAAY,WAAWA,EAAY,WAAW,EAAIA,EAAY,kBAAkB,CAAC,EAG/EC,EAAYD,CAAW,EACzB,OAAOA,CAEX,CAEA,IAAIE,EAAmB,CAAC,EAGpBH,EAAM,QAAQ,GAAG,IAAM,GACzBG,EAASH,EAAM,MAAM,GAAG,EACfA,EAAM,QAAQ,GAAG,IAAM,GAChCG,EAASH,EAAM,MAAM,GAAG,GACdA,EAAM,SAAW,GAAKA,EAAM,SAAW,IAAM,CAAC,MAAM,CAACA,CAAK,IACpEG,EAAS,CAACH,EAAM,UAAU,EAAG,CAAC,EAAGA,EAAM,UAAU,EAAG,CAAC,EAAGA,EAAM,UAAU,CAAC,CAAC,GAG5E,IAAMI,EAAkBD,EAAO,SAAW,EACtC,CAACE,EAAOC,EAAKC,CAAI,EAAIJ,EAezB,GAZIE,IAAU,MACZA,EAAQ,KAENC,IAAQ,MACVA,EAAM,KAIJ,OAAOC,GAAS,UAAYA,EAAK,SAAW,IAC9CA,EAAOA,EAAK,SAAS,EAAG,GAAG,GAGzBH,EAAiB,CACnB,IAAMI,EAAqBH,EAAM,SAAW,GAAKA,EAAM,SAAW,EAC5DI,EAAmBH,EAAI,SAAW,GAAKA,EAAI,SAAW,EACtDI,EAAoBH,EAAK,SAAW,GAAKA,EAAK,SAAW,EAE/D,GAAI,CAACC,GAAsB,CAACC,GAAoB,CAACC,EAC/C,OAAO,IAEX,KACE,QAAO,KAIT,GAAIH,EAAK,SAAW,EAAG,CACrB,IAAMI,EAAU,IAAI,KAAK,EAAE,YAAY,GAAK,IAAMb,GAC5Cc,EAAU,IAAI,KAAK,EAAE,YAAY,EAAId,EACrCe,EAAiB,OAAOF,CAAO,EAAE,MAAM,EAAG,CAAC,EAC3CG,EAAiB,OAAOF,CAAO,EAAE,MAAM,EAAG,CAAC,EAC3CG,EAAoB,CAAC,OAAOH,CAAO,EAAE,MAAM,CAAC,EAClDL,EAAO,CAACA,GAAQQ,EAAoB,GAAGD,IAAiBP,IAAS,GAAGM,IAAiBN,GACvF,CAEA,IAAIS,EAAW,CAACX,EACZY,EAAS,CAACX,EACRY,EAAU,CAACX,EAEbS,EAAW,KACbA,EAAW,IAGb,IAAMG,EAAiB,IAAI,KAAKD,EAASF,EAAU,CAAC,EAAE,QAAQ,EAE1DC,EAASE,IACXF,EAASE,GAGX,IAAMC,EAAa,IAAI,KAAKF,EAASF,EAAW,EAAGC,EAAQ,EAAG,EAAG,EAAG,CAAC,EACrE,OAAOf,EAAYkB,CAAU,EAAIA,EAAa,IAChD,CAMO,SAASC,EAAWC,EAAoB,CAC7C,IAAMjB,EAAQ,OAAOiB,EAAK,SAAS,EAAI,CAAC,EAAE,SAAS,EAAG,GAAG,EACnDhB,EAAM,OAAOgB,EAAK,QAAQ,CAAC,EAAE,SAAS,EAAG,GAAG,EAC5Cf,EAAO,OAAOe,EAAK,YAAY,CAAC,EAAE,SAAS,EAAG,GAAG,EACvD,MAAO,CAACjB,EAAOC,EAAKC,CAAI,EAAE,KAAK,GAAG,CACpC,CAUO,SAASgB,EAAWC,EAAqBC,EAA+B,CAC7E,MAAI,CAACD,GAAS,CAACC,EACN,GACE,CAACD,GAAS,CAACC,GAEX,CAACvB,EAAYsB,CAAK,GAAK,CAACtB,EAAYuB,CAAM,EAD5C,GAIF,IAAI,KAAKD,CAAK,EAAE,SAAS,EAAG,EAAG,EAAG,CAAC,IAAM,IAAI,KAAKC,CAAM,EAAE,SAAS,EAAG,EAAG,EAAG,CAAC,CACtF,CASO,SAASC,EAAmBrB,EAAeE,EAAqB,CACrE,OAAO,IAAI,KAAKA,GAAA,KAAAA,EAAQ,KAAMF,EAAQ,EAAG,CAAC,CAC5C,CASO,SAASsB,EAAetB,EAAeE,EAAuB,CACnE,OAAOmB,EAAmBrB,EAAOE,CAAI,EAAE,QAAQ,CACjD,CC7IO,SAASqB,EAAoBC,EAAoBC,EAA+C,CACrG,IAAMC,EAAM,SAAS,cAAc,KAAK,EACxCA,EAAI,UAAYF,EAGhB,QAASG,EAAID,EAAI,WAAW,OAAS,EAAGC,GAAK,EAAGA,IAC1CD,EAAI,WAAWC,GAAG,SAAS,YAAY,IAAM,OAC/CD,EAAI,YAAYA,EAAI,WAAWC,EAAE,EAIrC,IAAMC,EAASF,EAAI,kBACnB,OAAIE,GAAUA,EAAO,SAAS,YAAY,IAAM,OAASC,EAAUD,CAAM,GAEnEH,GACFG,EAAO,aAAa,UAAWH,CAAc,EAI3C,CAACG,EAAO,aAAa,SAAS,GAAKH,GACrCG,EAAO,aAAa,UAAWH,CAAc,EAI/CG,EAAO,gBAAgB,QAAQ,EAC/BA,EAAO,gBAAgB,OAAO,EAEvBA,GAGF,IACT,CAMO,SAASC,EAAUC,EAAsB,CAC9C,GAAIA,EAAG,WAAa,EAClB,MAAO,GAIT,GAAIA,EAAG,SAAS,YAAY,IAAM,SAChC,MAAO,GAIT,IAAMC,EAAa,MAAM,KAAKD,EAAG,UAAU,EAC3C,QAAWE,KAAQD,EACjB,GAAI,OAAOC,EAAK,MAAS,UAAYA,EAAK,KAAK,YAAY,EAAE,WAAW,IAAI,EAC1E,MAAO,GAKX,IAAMC,EAAa,MAAM,KAAKH,EAAG,UAAU,EAC3C,QAAWI,KAAQD,EACjB,GAAI,CAACJ,EAAUK,CAAI,EACjB,MAAO,GAIX,MAAO,EACT,CCnEO,IAAMC,EAA8B,gDAC9BC,EAAyB,4DACzBC,EAAwB,qDACxBC,EAAqB,cAE3B,SAASC,EAAyBC,EAAoE,CAC3G,IAAMC,EAAUD,EAAM,MAAML,CAA2B,GAAyB,CAAC,KAAM,EAAG,EAAG,KAAM,CAAC,EAC9FO,EAAQD,EAAQ,GAChBE,EAAUF,EAAQ,GAClBG,EAAUH,EAAQ,GACxB,MAAO,CAAE,MAAAC,EAAO,QAAAC,EAAS,QAAAC,CAAQ,CACnC,CAEO,SAASC,EAAyBL,EAAsF,CAC7H,IAAMC,EAAUD,EAAM,MAAMJ,CAAsB,GAAyB,CAAC,KAAM,EAAG,EAAG,KAAM,EAAG,IAAI,EAC/FM,EAAQD,EAAQ,GAChBE,EAAUF,EAAQ,GAClBG,EAAUH,EAAQ,GAClBK,EAAWL,EAAQ,GACzB,MAAO,CAAE,MAAAC,EAAO,QAAAC,EAAS,QAAAC,EAAS,SAAAE,CAAS,CAC7C,CAEO,SAASC,EAAsBP,EAAwB,CAC5D,OAAOL,EAA4B,KAAKK,CAAK,GACtCJ,EAAuB,KAAKI,CAAK,CAC1C,CAEO,SAASQ,EAAoBC,EAAaC,EAAwBC,EAA+B,CAEtG,GADAF,EAAMA,GAAO,OAAOA,GAAQ,SAAWA,EAAI,QAAQ,QAAS,EAAE,EAAI,GAC9D,QAAQ,KAAKA,CAAG,GAAK,OAAO,KAAKA,CAAG,EACtC,MAAO,GAGT,IAAMR,EAAUQ,EAAI,MAAMZ,CAAqB,EAC/C,GAAI,CAACI,EACH,MAAO,GAGT,IAAIW,EAAWX,EAAQ,GACnBY,EAAaZ,EAAQ,GACrBa,EAAab,EAAQ,GACrBK,EAAWL,EAAQ,GAGjBc,EAAkBN,EAAI,MAAMX,CAAkB,EAChDiB,IACFT,EAAWS,EAAgB,GAC3BN,EAAMA,EAAI,QAAQH,EAAU,EAAE,EAG1BA,EAAS,SAAW,IACtBA,GAAY,MAKZG,EAAI,SAAW,GAAK,CAACA,EAAI,SAAS,GAAG,IACvCG,EAAWH,EAAI,GACfI,EAAaJ,EAAI,UAAU,CAAC,GAI1BC,EACFJ,EAAW,GACFR,EAAmB,KAAKQ,CAAQ,EACzCA,EAAWA,EAAS,YAAY,EAE5B,UAAU,KAAKA,CAAQ,EACrBA,EAAS,YAAY,EAAE,WAAW,GAAG,EACvCA,EAAW,KACFA,EAAS,YAAY,EAAE,WAAW,GAAG,IAC9CA,EAAW,MAGbA,EAAW,GAIf,IAAMU,EAAW,CAACJ,GAAY,EACxBK,EAAa,CAACJ,GAAc,EAG5BK,EAAW,CAACZ,GAAYI,EAAgB,GAAK,GAqBnD,GApBIM,GAAYE,EACdN,EAAW,OAAOM,CAAQ,EACjBF,EAAW,IACpBJ,EAAW,MAGbA,EAAWA,EAAS,SAAS,EAAG,GAAG,EAG/BC,IAAe,SACbI,EAAa,GACfJ,EAAa,KACJI,EAAa,EACtBJ,EAAa,KAEbA,EAAaA,EAAW,SAAS,EAAG,GAAG,GAKvCC,IAAe,OAAW,CAC5B,IAAMK,EAAa,CAACL,GAAc,EAC9BK,EAAa,GACfL,EAAa,KACJK,EAAa,EACtBL,EAAa,KAEbA,EAAaA,EAAW,SAAS,EAAG,GAAG,CAE3C,CAGA,IAAIM,EAAUR,EACd,OAAIC,IAAe,SACjBO,GAAW,IAAIP,IACXC,IAAe,QAAaH,IAC9BG,EAAa,OAGbA,IAAe,SACjBM,GAAW,IAAIN,KAEbR,IACFc,GAAW,IAAId,KAGVc,CACT",
6
+ "names": ["ISO_8601_REGEX", "ISO_TIMEZONE_REGEX", "FUTURE_YEAR_COERCION", "parseDateString", "value", "iso8601Date", "isValidDate", "values", "hasMonthDayYear", "month", "day", "year", "isValidMonthLength", "isValidDayLength", "isValidYearLength", "minYear", "maxYear", "minYearCentury", "maxYearCentury", "normalizedMaxYear", "numMonth", "numDay", "numYear", "maxDaysInMonth", "parsedDate", "formatDate", "date", "isSameDate", "first", "second", "getLastDateOfMonth", "getMonthLength", "createSvgFromString", "svgContent", "defaultViewBox", "div", "i", "svgElm", "isSafeSvg", "el", "attributes", "attr", "childNodes", "node", "TWENTY_FOUR_HOUR_TIME_REGEX", "TWELVE_HOUR_TIME_REGEX", "PARSEABLE_TIME_FORMAT", "HAS_MERIDIEM_REGEX", "tokenize24HourTimeString", "value", "matches", "hours", "minutes", "seconds", "tokenize12HourTimeString", "meridiem", "isSupportedTimeFormat", "tryCoerceTimeString", "str", "use24HourTime", "allowSeconds", "hoursStr", "minutesStr", "secondsStr", "meridiemMatches", "hoursNum", "minutesNum", "maxHours", "secondsNum", "timeStr"]
7
+ }
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as e}from"./chunk.MV327MYK.js";import{b as E}from"./chunk.EC5JFSHR.js";import{a as g}from"./chunk.WHQZNZHW.js";import{c as f}from"./chunk.KYH5GKVI.js";import{a as b}from"./chunk.BESB4RGK.js";import{a as d,d as h}from"./chunk.DL7NX432.js";import{a as u,i as _,l as m}from"./chunk.LJLEPTLU.js";import{f as r,m as c,t as p}from"./chunk.4LA6HEA7.js";import{k as s,l as a}from"./chunk.J2M2MXP2.js";import{f as l}from"./chunk.MCIQXNKY.js";var o=class extends m{constructor(){super();this._toggle=!1;this._isOn=!1;this._dense=!1;this._densityLevel=5}static get observedAttributes(){return[e.attributes.IS_ON,e.attributes.DENSE,e.attributes.DENSITY_LEVEL,e.attributes.TOGGLE]}connectedCallback(){this.querySelector(e.selectors.BUTTON)?this._initialize():c(this,e.selectors.BUTTON).then(()=>this._initialize())}disconnectedCallback(){typeof this._destroyUserInteractionListener=="function"&&(this._destroyUserInteractionListener(),this._destroyUserInteractionListener=void 0),this._buttonAttrMutationObserver&&this._buttonAttrMutationObserver.disconnect(),this._rippleInstance&&this._rippleInstance.destroy()}attributeChangedCallback(t,n,i){switch(t){case e.attributes.IS_ON:this.isOn=s(i);break;case e.attributes.DENSE:this.dense=s(i);break;case e.attributes.DENSITY_LEVEL:this.densityLevel=a(i);break;case e.attributes.TOGGLE:this.toggle=s(i);break}}get toggle(){return this._toggle}set toggle(t){this._toggle=t,this._toggle?this._initializeToggle():this._destroyToggle()}get isOn(){return this._isOn}set isOn(t){this._isOn!==t&&(this._isOn=t,this._applyToggle())}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._applyDensity())}get densityLevel(){return this._densityLevel}set densityLevel(t){this._densityLevel!==t&&(this._densityLevel=t,this._densityLevel<=0?this._densityLevel=1:this._densityLevel>6?this._densityLevel=6:typeof this._densityLevel!="number"&&(this._densityLevel=5),this._applyDensity())}_initialize(){this._buttonElement=this.querySelector(e.selectors.BUTTON),this._buttonElement&&(this._buttonElement.classList.add(e.classes.BUTTON),this._applyToggle(),this._applyDensity(),this._toggleHandler=()=>{this._toggleValue(),_(this,e.events.CHANGE,this._isOn,!0)},this._buttonAttrMutationObserver=new MutationObserver(t=>{var n;t.some(i=>i.attributeName==="disabled")&&this._buttonElement.hasAttribute("disabled")&&((n=this._rippleInstance)==null||n.handleBlur())}),this._buttonAttrMutationObserver.observe(this._buttonElement,{attributes:!0,attributeFilter:["disabled"]}),this._toggle&&this._initializeToggle(),this._deferRippleInitialization())}async _deferRippleInitialization(){typeof this._destroyUserInteractionListener=="function"&&this._destroyUserInteractionListener();let{userInteraction:t,destroy:n}=f(this._buttonElement);this._destroyUserInteractionListener=n;let{type:i}=await t;this._destroyUserInteractionListener=void 0,this.isConnected&&(this._rippleInstance=this._createRipple(),i==="focusin"&&this._rippleInstance.handleFocus())}_createRipple(){this._rippleInstance&&this._rippleInstance.destroy();let t=new E(this._buttonElement);return t.unbounded=!0,t}_toggleValue(){this._isOn=!this._isOn,this._applyToggle()}_applyToggle(){!this._buttonElement||(p(this._buttonElement,this._isOn,e.classes.BUTTON_ON),this._toggle&&this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))}_applyDensity(){if(!!this._buttonElement){if(e.classes.DENSITY.forEach(t=>this._buttonElement.classList.remove(t)),this._dense){if(this.setAttribute(e.attributes.DENSE,""),this._buttonElement.classList.add(e.classes.BUTTON_DENSE),this._densityLevel<7&&this._densityLevel>0&&this.densityLevel!==5){let t=e.classes.DENSITY[this._densityLevel-1];this._buttonElement.classList.add(t),this.setAttribute(e.attributes.DENSITY_LEVEL,this._densityLevel.toString())}}else this.removeAttribute(e.attributes.DENSE),this._buttonElement.classList.remove(e.classes.BUTTON_DENSE);this._rippleInstance&&this._rippleInstance.layout()}}_initializeToggle(){if(!this._buttonElement)return;let t=Array.from(this._buttonElement.querySelectorAll(e.selectors.ICON));if(t.length!==2){console.error('You must specify two icons, one for "on" and one for "off".');return}if(t.forEach(n=>n.classList.add(e.classes.ICON)),!t.some(n=>n.classList.contains(e.classes.ICON_ON))){let n=t.find(i=>i.hasAttribute(e.attributes.ICON_ON));n?n.classList.add(e.classes.ICON_ON):t[0].classList.add(e.classes.ICON_ON)}this._buttonElement.addEventListener("click",this._toggleHandler),window.requestAnimationFrame(()=>{this._isOn&&(this._buttonElement.classList.add(e.classes.BUTTON_ON),this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))})}_destroyToggle(){!this._buttonElement||this._buttonElement.removeEventListener("click",this._toggleHandler)}layout(){this._rippleInstance&&this._rippleInstance.layout()}};o=l([d({name:e.elementName})],o);var v=class extends b{constructor(t){super(t)}_build(){var n;let t=document.createElement(e.elementName);if(this._buttonElement=document.createElement("button"),this._buttonElement.type="button",t.appendChild(this._buttonElement),(n=this._config.options)!=null&&n.tooltip){let i=document.createElement("forge-tooltip");i.textContent=this._config.options.tooltip,this._config.options.tooltipPosition&&(i.position=this._config.options.tooltipPosition),t.appendChild(i)}return t}get iconElement(){return this._iconElement}get disabled(){return!!this._buttonElement.disabled}set disabled(t){this._buttonElement.disabled=t}get butttonElement(){return this._buttonElement}get buttonElement(){return this._buttonElement}_configure(){this._configureIcon()}_configureIcon(){var n,i;if(!((n=this._config.options)!=null&&n.iconName))return;switch(((i=this._config.options)==null?void 0:i.iconType)||"component"){case"font":let C=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[h];r(C,this._buttonElement),this._buttonElement.textContent=this._config.options.iconName;break;case"component":this._iconElement=document.createElement(g.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&r(this._config.options.iconClass,this._iconElement),this._buttonElement.appendChild(this._iconElement);break}}onClick(t){this._buttonElement.addEventListener("click",t)}onFocus(t){this._buttonElement.addEventListener("focus",n=>t(n))}onBlur(t){this._buttonElement.addEventListener("blur",n=>t(n))}};function w(){u(o)}export{o as a,v as b,w as c};
7
- //# sourceMappingURL=chunk.E3K6KM57.js.map
6
+ import{a as e}from"./chunk.MV327MYK.js";import{b as E}from"./chunk.EC5JFSHR.js";import{a as g}from"./chunk.B5TEOESG.js";import{c as f}from"./chunk.KYH5GKVI.js";import{a as b}from"./chunk.BESB4RGK.js";import{a as d,d as h}from"./chunk.DL7NX432.js";import{a as u,i as _,l as m}from"./chunk.LJLEPTLU.js";import{f as r,m as c,t as p}from"./chunk.4LA6HEA7.js";import{k as s,l as a}from"./chunk.J2M2MXP2.js";import{f as l}from"./chunk.MCIQXNKY.js";var o=class extends m{constructor(){super();this._toggle=!1;this._isOn=!1;this._dense=!1;this._densityLevel=5}static get observedAttributes(){return[e.attributes.IS_ON,e.attributes.DENSE,e.attributes.DENSITY_LEVEL,e.attributes.TOGGLE]}connectedCallback(){this.querySelector(e.selectors.BUTTON)?this._initialize():c(this,e.selectors.BUTTON).then(()=>this._initialize())}disconnectedCallback(){typeof this._destroyUserInteractionListener=="function"&&(this._destroyUserInteractionListener(),this._destroyUserInteractionListener=void 0),this._buttonAttrMutationObserver&&this._buttonAttrMutationObserver.disconnect(),this._rippleInstance&&this._rippleInstance.destroy()}attributeChangedCallback(t,n,i){switch(t){case e.attributes.IS_ON:this.isOn=s(i);break;case e.attributes.DENSE:this.dense=s(i);break;case e.attributes.DENSITY_LEVEL:this.densityLevel=a(i);break;case e.attributes.TOGGLE:this.toggle=s(i);break}}get toggle(){return this._toggle}set toggle(t){this._toggle=t,this._toggle?this._initializeToggle():this._destroyToggle()}get isOn(){return this._isOn}set isOn(t){this._isOn!==t&&(this._isOn=t,this._applyToggle())}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._applyDensity())}get densityLevel(){return this._densityLevel}set densityLevel(t){this._densityLevel!==t&&(this._densityLevel=t,this._densityLevel<=0?this._densityLevel=1:this._densityLevel>6?this._densityLevel=6:typeof this._densityLevel!="number"&&(this._densityLevel=5),this._applyDensity())}_initialize(){this._buttonElement=this.querySelector(e.selectors.BUTTON),this._buttonElement&&(this._buttonElement.classList.add(e.classes.BUTTON),this._applyToggle(),this._applyDensity(),this._toggleHandler=()=>{this._toggleValue(),_(this,e.events.CHANGE,this._isOn,!0)},this._buttonAttrMutationObserver=new MutationObserver(t=>{var n;t.some(i=>i.attributeName==="disabled")&&this._buttonElement.hasAttribute("disabled")&&((n=this._rippleInstance)==null||n.handleBlur())}),this._buttonAttrMutationObserver.observe(this._buttonElement,{attributes:!0,attributeFilter:["disabled"]}),this._toggle&&this._initializeToggle(),this._deferRippleInitialization())}async _deferRippleInitialization(){typeof this._destroyUserInteractionListener=="function"&&this._destroyUserInteractionListener();let{userInteraction:t,destroy:n}=f(this._buttonElement);this._destroyUserInteractionListener=n;let{type:i}=await t;this._destroyUserInteractionListener=void 0,this.isConnected&&(this._rippleInstance=this._createRipple(),i==="focusin"&&this._rippleInstance.handleFocus())}_createRipple(){this._rippleInstance&&this._rippleInstance.destroy();let t=new E(this._buttonElement);return t.unbounded=!0,t}_toggleValue(){this._isOn=!this._isOn,this._applyToggle()}_applyToggle(){!this._buttonElement||(p(this._buttonElement,this._isOn,e.classes.BUTTON_ON),this._toggle&&this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))}_applyDensity(){if(!!this._buttonElement){if(e.classes.DENSITY.forEach(t=>this._buttonElement.classList.remove(t)),this._dense){if(this.setAttribute(e.attributes.DENSE,""),this._buttonElement.classList.add(e.classes.BUTTON_DENSE),this._densityLevel<7&&this._densityLevel>0&&this.densityLevel!==5){let t=e.classes.DENSITY[this._densityLevel-1];this._buttonElement.classList.add(t),this.setAttribute(e.attributes.DENSITY_LEVEL,this._densityLevel.toString())}}else this.removeAttribute(e.attributes.DENSE),this._buttonElement.classList.remove(e.classes.BUTTON_DENSE);this._rippleInstance&&this._rippleInstance.layout()}}_initializeToggle(){if(!this._buttonElement)return;let t=Array.from(this._buttonElement.querySelectorAll(e.selectors.ICON));if(t.length!==2){console.error('You must specify two icons, one for "on" and one for "off".');return}if(t.forEach(n=>n.classList.add(e.classes.ICON)),!t.some(n=>n.classList.contains(e.classes.ICON_ON))){let n=t.find(i=>i.hasAttribute(e.attributes.ICON_ON));n?n.classList.add(e.classes.ICON_ON):t[0].classList.add(e.classes.ICON_ON)}this._buttonElement.addEventListener("click",this._toggleHandler),window.requestAnimationFrame(()=>{this._isOn&&(this._buttonElement.classList.add(e.classes.BUTTON_ON),this._buttonElement.setAttribute("aria-pressed",`${this._isOn}`))})}_destroyToggle(){!this._buttonElement||this._buttonElement.removeEventListener("click",this._toggleHandler)}layout(){this._rippleInstance&&this._rippleInstance.layout()}};o=l([d({name:e.elementName})],o);var v=class extends b{constructor(t){super(t)}_build(){var n;let t=document.createElement(e.elementName);if(this._buttonElement=document.createElement("button"),this._buttonElement.type="button",t.appendChild(this._buttonElement),(n=this._config.options)!=null&&n.tooltip){let i=document.createElement("forge-tooltip");i.textContent=this._config.options.tooltip,this._config.options.tooltipPosition&&(i.position=this._config.options.tooltipPosition),t.appendChild(i)}return t}get iconElement(){return this._iconElement}get disabled(){return!!this._buttonElement.disabled}set disabled(t){this._buttonElement.disabled=t}get butttonElement(){return this._buttonElement}get buttonElement(){return this._buttonElement}_configure(){this._configureIcon()}_configureIcon(){var n,i;if(!((n=this._config.options)!=null&&n.iconName))return;switch(((i=this._config.options)==null?void 0:i.iconType)||"component"){case"font":let C=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[h];r(C,this._buttonElement),this._buttonElement.textContent=this._config.options.iconName;break;case"component":this._iconElement=document.createElement(g.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&r(this._config.options.iconClass,this._iconElement),this._buttonElement.appendChild(this._iconElement);break}}onClick(t){this._buttonElement.addEventListener("click",t)}onFocus(t){this._buttonElement.addEventListener("focus",n=>t(n))}onBlur(t){this._buttonElement.addEventListener("blur",n=>t(n))}};function w(){u(o)}export{o as a,v as b,w as c};
7
+ //# sourceMappingURL=chunk.LAM6EDW3.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{b as O}from"./chunk.EOZITZSP.js";import{d as w}from"./chunk.6D5ERZ3Y.js";import{c as k}from"./chunk.RHXQ2GMV.js";import{m as T}from"./chunk.WHQZNZHW.js";import{a as x}from"./chunk.UWYANU5D.js";import{a}from"./chunk.KTGSZEAG.js";import{a as v,b as y}from"./chunk.DL7NX432.js";import{a as m,e as _,g as n,l as h}from"./chunk.LJLEPTLU.js";import{d as c}from"./chunk.4LA6HEA7.js";import{k as d,l as g}from"./chunk.J2M2MXP2.js";import{f as i}from"./chunk.MCIQXNKY.js";var u=`${y}profile-card`,A={FULL_NAME:"full-name",EMAIL:"email",SIGN_OUT:"sign-out",PROFILE:"profile",SIGN_OUT_TEXT:"sign-out-text",PROFILE_TEXT:"profile-text",AVATAR_TEXT:"avatar-text",AVATAR_ICON:"avatar-icon",AVATAR_IMAGE_URL:"avatar-image-url",AVATAR_LETTER_COUNT:"avatar-letter-count"},E={FULL_NAME:".forge-profile-card__full-name",EMAIL:".forge-profile-card__email",AVATAR:".forge-profile-card__info-avatar > forge-avatar",ACTION_TOOLBAR:"#action-toolbar",PROFILE_BUTTON:"#profile-button",SIGN_OUT_BUTTON:"#sign-out-button"},I={SHOW_SIGN_OUT_BUTTON:!0,SHOW_PROFILE_BUTTON:!1,SIGN_OUT_BUTTON_TEXT:"Sign out",PROFILE_BUTTON_TEXT:"Profile"},B={SIGN_OUT:`${u}-sign-out`,PROFILE:`${u}-profile`},e={elementName:u,attributes:A,selectors:E,defaults:I,events:B};var l=class extends x{constructor(t){super(t);this._fullNameElement=n(t,e.selectors.FULL_NAME),this._emailElement=n(t,e.selectors.EMAIL),this._avatarElement=n(t,e.selectors.AVATAR),this._actionToolbar=n(t,e.selectors.ACTION_TOOLBAR),this._profileButton=n(t,e.selectors.PROFILE_BUTTON),this._signOutButton=n(t,e.selectors.SIGN_OUT_BUTTON)}setFullName(t){this._component.setAttribute(e.attributes.FULL_NAME,t),this._fullNameElement.textContent=t}setEmail(t){this._component.setAttribute(e.attributes.EMAIL,t),this._emailElement.textContent=t}setAvatarText(t){this._component.setAttribute(e.attributes.AVATAR_TEXT,t),this._avatarElement.text=t,c(this._avatarElement)}setAvatarIcon(t){if(t){let b=new T({props:{name:t}});this._avatarElement.replaceChildren(b.element)}else c(this._avatarElement)}setAvatarImageUrl(t){this._component.setAttribute(e.attributes.AVATAR_IMAGE_URL,t),this._avatarElement.imageUrl=t}setAvatarLetterCount(t){this._component.setAttribute(e.attributes.AVATAR_LETTER_COUNT,String(t)),this._avatarElement.letterCount=t}setActionToolbarVisibility(t){t?this._actionToolbar.style.removeProperty("display"):this._actionToolbar.style.display="none"}setProfileButtonVisibility(t){t?this._profileButton.style.removeProperty("display"):this._profileButton.style.display="none"}setSignOutButtonVisibility(t){t?this._signOutButton.style.removeProperty("display"):this._signOutButton.style.display="none"}setSignOutButtonText(t){this._signOutButton.textContent=t}setProfileButtonText(t){this._profileButton.textContent=t}setProfileButtonListener(t){this._profileButton.addEventListener("click",t)}setSignOutButtonListener(t){this._signOutButton.addEventListener("click",t)}removeProfileButtonListener(t){this._profileButton.removeEventListener("click",t)}removeSignOutButtonListener(t){this._signOutButton.removeEventListener("click",t)}requestProfileButtonFocus(){window.requestAnimationFrame(()=>this._profileButton.focus())}requestSignOutButtonFocus(){window.requestAnimationFrame(()=>this._signOutButton.focus())}};var s=class{constructor(r){this._adapter=r;this._showSignOutButton=e.defaults.SHOW_SIGN_OUT_BUTTON;this._showProfileButton=e.defaults.SHOW_PROFILE_BUTTON;this._signOutButtonText=e.defaults.SIGN_OUT_BUTTON_TEXT;this._profileButtonText=e.defaults.PROFILE_BUTTON_TEXT;this._profileListener=t=>this._onProfileButtonClick(t),this._signOutListener=t=>this._onSignOutButtonClick(t)}initialize(){this._adapter.setProfileButtonListener(this._profileListener),this._adapter.setSignOutButtonListener(this._signOutListener),(this._showSignOutButton||this._showProfileButton)&&this._requestInitialFocus(),this._setActionVisibility(),this._adapter.setSignOutButtonText(this._signOutButtonText),this._adapter.setProfileButtonText(this._profileButtonText)}_requestInitialFocus(){this._showSignOutButton?this._adapter.requestSignOutButtonFocus():this._showProfileButton&&this._adapter.requestProfileButtonFocus()}_setActionVisibility(){let r=this._showSignOutButton||this._showProfileButton;this._adapter.setActionToolbarVisibility(r),this._adapter.setSignOutButtonVisibility(this._showSignOutButton),this._adapter.setProfileButtonVisibility(this._showProfileButton)}_onProfileButtonClick(r){r.stopPropagation(),this._adapter.emitHostEvent(e.events.PROFILE)}_onSignOutButtonClick(r){r.stopPropagation(),this._adapter.emitHostEvent(e.events.SIGN_OUT)}get fullName(){return this._fullName}set fullName(r){this._fullName!==r&&(this._fullName=r,this._adapter.setFullName(this._fullName))}get email(){return this._email}set email(r){this._email!==r&&(this._email=r,this._adapter.setEmail(this._email))}get avatarText(){return this._avatarText}set avatarText(r){this._avatarText!==r&&(this._avatarText=r,this._adapter.setAvatarText(this._avatarText))}get avatarIcon(){return this._avatarIcon}set avatarIcon(r){this._avatarIcon!==r&&(this._avatarIcon=r,this._adapter.setAvatarIcon(this._avatarIcon))}get avatarImageUrl(){return this._avatarImageUrl}set avatarImageUrl(r){this._avatarImageUrl!==r&&(this._avatarImageUrl=r,this._adapter.setAvatarImageUrl(this._avatarImageUrl))}get avatarLetterCount(){return this._avatarLetterCount}set avatarLetterCount(r){this._avatarLetterCount!==r&&(this._avatarLetterCount=r,this._adapter.setAvatarLetterCount(this._avatarLetterCount))}get signOut(){return this._showSignOutButton}set signOut(r){this._showSignOutButton!==r&&(this._showSignOutButton=r,this._setActionVisibility())}get profile(){return this._showProfileButton}set profile(r){this._showProfileButton!==r&&(this._showProfileButton=r,this._setActionVisibility())}get signOutText(){return this._signOutButtonText}set signOutText(r){this._signOutButtonText!==r&&(this._signOutButtonText=r||e.defaults.SIGN_OUT_BUTTON_TEXT,this._adapter.setSignOutButtonText(this._signOutButtonText))}get profileText(){return this._profileButtonText}set profileText(r){this._profileButtonText!==r&&(this._profileButtonText=r||e.defaults.PROFILE_BUTTON_TEXT,this._adapter.setProfileButtonText(this._profileButtonText))}};var L='<template><div class="forge-profile-card" part="root"><div class="forge-profile-card__info" part="info-container"><div class="forge-profile-card__info-avatar" part="avatar-container"><forge-avatar part="avatar"></forge-avatar></div><div class="forge-profile-card__info-text" part="info-text"><div class="forge-profile-card__full-name" part="name"></div><div class="forge-profile-card__email" part="email"></div></div></div><slot></slot><forge-toolbar inverted id="action-toolbar" part="footer"><forge-button type="outlined" slot="end" style="margin-right: 8px;" part="profile-button"><button type="button" id="profile-button" aria-label="View profile" part="profile-button-element">Profile</button></forge-button><forge-button slot="end" part="sign-out-button"><button type="button" id="sign-out-button" aria-label="Sign out" part="sign-out-button-element">Sign out</button></forge-button></forge-toolbar></div></template>',N='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.forge-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);position:relative;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:64px;border:none;outline:0;line-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle}.forge-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.forge-button::-moz-focus-inner{padding:0;border:0}.forge-button:active{outline:0}.forge-button:hover{cursor:pointer}.forge-button:disabled{cursor:default;pointer-events:none}.forge-button .forge-button__icon{margin-left:0;margin-right:8px;display:inline-block;font-size:1.125rem;height:1.125rem;vertical-align:top;width:1.125rem}.forge-button .forge-button__icon[dir=rtl],[dir=rtl] .forge-button .forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button__label~.forge-button__icon{margin-left:0;margin-right:8px}svg.forge-button__icon{fill:currentColor}.forge-button--outlined .forge-button__icon,.forge-button--raised .forge-button__icon,.forge-button--unelevated .forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button--outlined .forge-button__icon[dir=rtl],.forge-button--raised .forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon,.forge-button--raised .forge-button__label~.forge-button__icon,.forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--raised .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-button .forge-button__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button .forge-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button.mdc-ripple-upgraded .forge-button__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button.mdc-ripple-upgraded--unbounded .forge-button__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button.mdc-ripple-upgraded--foreground-activation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button.mdc-ripple-upgraded--foreground-deactivation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button .forge-button__ripple{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:100%;height:100%;overflow:hidden}.forge-button:not(.forge-button--outlined) .forge-button__ripple{top:0;left:0}.forge-button--raised{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1)}.forge-button--raised:focus,.forge-button--raised:hover{-webkit-box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.forge-button--raised:active{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.forge-button--raised:disabled{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.forge-button--outlined{border-style:solid}.forge-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 8px 0 8px}.forge-button:not(:disabled){background-color:transparent}.forge-button:disabled{background-color:transparent}.forge-button:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--unelevated:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--unelevated:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--unelevated .forge-button__ripple::after,.forge-button--unelevated .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--unelevated.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--unelevated:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--unelevated.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--unelevated:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--unelevated:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--unelevated:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--unelevated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--unelevated .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--raised:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--raised:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--raised:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--raised .forge-button__ripple::after,.forge-button--raised .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--raised.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--raised:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--raised.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--raised:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--raised:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--raised:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--raised.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--raised .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 15px 0 15px;border-width:1px}.forge-button--outlined:not(:disabled){background-color:transparent}.forge-button--outlined:disabled{background-color:transparent}.forge-button--outlined:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple::after,.forge-button--outlined .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button--outlined.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--outlined:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button--outlined.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--outlined:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button--outlined:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--outlined:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button--outlined.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button--outlined .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined:not(:disabled){border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--outlined .forge-button__ripple{top:-1px;left:-1px;border:1px solid transparent}.forge-button--dense{height:24px;margin-top:0;margin-bottom:0;height:1.5rem}forge-button{display:inline-block}forge-button[hidden]{display:none}forge-button[disabled]{cursor:not-allowed}a.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);text-decoration:underline;cursor:pointer}a.forge-hyperlink:visited{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}a.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);cursor:pointer;border:none;background-color:transparent;font-size:inherit;padding:0;outline:0;text-align:left}button.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink:hover:not([disabled]){text-decoration:underline}.forge-profile-card{min-width:360px;border-radius:4px}@media (max-width:399px){.forge-profile-card{width:100vw;min-width:unset;overflow:auto}}.forge-profile-card__info{padding:8px 16px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.forge-profile-card__info-avatar{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:8px;margin-right:16px;--forge-avatar-size:56px}.forge-profile-card__info-text{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:start;align-items:flex-start}.forge-profile-card__full-name{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1rem;font-size:var(--forge-typography-subtitle1-secondary-font-size, 1rem);line-height:1.75rem;line-height:var(--forge-typography-subtitle1-secondary-line-height, 1.75rem);font-weight:500;font-weight:var(--forge-typography-subtitle1-secondary-font-weight,500);letter-spacing:.01em;letter-spacing:var(--forge-typography-subtitle1-secondary-letter-spacing, .01em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-subtitle1-secondary-text-decoration,inherit);text-decoration:var(--forge-typography-subtitle1-secondary-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-subtitle1-secondary-text-transform,inherit);line-height:1.25rem}.forge-profile-card__email{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-subtitle2-font-size, .875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight,500);letter-spacing:.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle2-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}forge-toolbar#action-toolbar::part(root){border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host{display:inline}:host([hidden]){display:none}forge-toolbar{--mdc-theme-surface:var(--forge-theme-elevated-surface)}',o=class extends h{constructor(){super();_(this,L,N),this._foundation=new s(new l(this))}static get observedAttributes(){return[e.attributes.FULL_NAME,e.attributes.EMAIL,e.attributes.SIGN_OUT,e.attributes.PROFILE,e.attributes.SIGN_OUT_TEXT,e.attributes.PROFILE_TEXT,e.attributes.AVATAR_TEXT,e.attributes.AVATAR_ICON,e.attributes.AVATAR_IMAGE_URL,e.attributes.AVATAR_LETTER_COUNT]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(t,b,p){switch(t){case e.attributes.FULL_NAME:this.fullName=p;break;case e.attributes.EMAIL:this.email=p;break;case e.attributes.SIGN_OUT:this.signOut=d(e.attributes.SIGN_OUT);break;case e.attributes.PROFILE:this.profile=d(e.attributes.PROFILE);break;case e.attributes.SIGN_OUT_TEXT:this.signOutText=e.attributes.SIGN_OUT_TEXT;break;case e.attributes.PROFILE_TEXT:this.profileText=e.attributes.PROFILE_TEXT;break;case e.attributes.AVATAR_TEXT:this.avatarText=p;break;case e.attributes.AVATAR_ICON:this.avatarIcon=p;break;case e.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=p;break;case e.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=g(p);break}}};i([a()],o.prototype,"fullName",2),i([a()],o.prototype,"email",2),i([a()],o.prototype,"signOut",2),i([a()],o.prototype,"profile",2),i([a()],o.prototype,"signOutText",2),i([a()],o.prototype,"profileText",2),i([a()],o.prototype,"avatarText",2),i([a()],o.prototype,"avatarIcon",2),i([a()],o.prototype,"avatarImageUrl",2),i([a()],o.prototype,"avatarLetterCount",2),o=i([v({name:e.elementName,dependencies:[O,k,w]})],o);function tt(){m(o)}export{e as a,l as b,s as c,o as d,tt as e};
7
- //# sourceMappingURL=chunk.FEU4FTVQ.js.map
6
+ import{b as O}from"./chunk.EOZITZSP.js";import{d as w}from"./chunk.6D5ERZ3Y.js";import{c as k}from"./chunk.RHXQ2GMV.js";import{m as T}from"./chunk.B5TEOESG.js";import{a as x}from"./chunk.UWYANU5D.js";import{a}from"./chunk.KTGSZEAG.js";import{a as v,b as y}from"./chunk.DL7NX432.js";import{a as m,e as _,g as n,l as h}from"./chunk.LJLEPTLU.js";import{d as c}from"./chunk.4LA6HEA7.js";import{k as d,l as g}from"./chunk.J2M2MXP2.js";import{f as i}from"./chunk.MCIQXNKY.js";var u=`${y}profile-card`,A={FULL_NAME:"full-name",EMAIL:"email",SIGN_OUT:"sign-out",PROFILE:"profile",SIGN_OUT_TEXT:"sign-out-text",PROFILE_TEXT:"profile-text",AVATAR_TEXT:"avatar-text",AVATAR_ICON:"avatar-icon",AVATAR_IMAGE_URL:"avatar-image-url",AVATAR_LETTER_COUNT:"avatar-letter-count"},E={FULL_NAME:".forge-profile-card__full-name",EMAIL:".forge-profile-card__email",AVATAR:".forge-profile-card__info-avatar > forge-avatar",ACTION_TOOLBAR:"#action-toolbar",PROFILE_BUTTON:"#profile-button",SIGN_OUT_BUTTON:"#sign-out-button"},I={SHOW_SIGN_OUT_BUTTON:!0,SHOW_PROFILE_BUTTON:!1,SIGN_OUT_BUTTON_TEXT:"Sign out",PROFILE_BUTTON_TEXT:"Profile"},B={SIGN_OUT:`${u}-sign-out`,PROFILE:`${u}-profile`},e={elementName:u,attributes:A,selectors:E,defaults:I,events:B};var l=class extends x{constructor(t){super(t);this._fullNameElement=n(t,e.selectors.FULL_NAME),this._emailElement=n(t,e.selectors.EMAIL),this._avatarElement=n(t,e.selectors.AVATAR),this._actionToolbar=n(t,e.selectors.ACTION_TOOLBAR),this._profileButton=n(t,e.selectors.PROFILE_BUTTON),this._signOutButton=n(t,e.selectors.SIGN_OUT_BUTTON)}setFullName(t){this._component.setAttribute(e.attributes.FULL_NAME,t),this._fullNameElement.textContent=t}setEmail(t){this._component.setAttribute(e.attributes.EMAIL,t),this._emailElement.textContent=t}setAvatarText(t){this._component.setAttribute(e.attributes.AVATAR_TEXT,t),this._avatarElement.text=t,c(this._avatarElement)}setAvatarIcon(t){if(t){let b=new T({props:{name:t}});this._avatarElement.replaceChildren(b.element)}else c(this._avatarElement)}setAvatarImageUrl(t){this._component.setAttribute(e.attributes.AVATAR_IMAGE_URL,t),this._avatarElement.imageUrl=t}setAvatarLetterCount(t){this._component.setAttribute(e.attributes.AVATAR_LETTER_COUNT,String(t)),this._avatarElement.letterCount=t}setActionToolbarVisibility(t){t?this._actionToolbar.style.removeProperty("display"):this._actionToolbar.style.display="none"}setProfileButtonVisibility(t){t?this._profileButton.style.removeProperty("display"):this._profileButton.style.display="none"}setSignOutButtonVisibility(t){t?this._signOutButton.style.removeProperty("display"):this._signOutButton.style.display="none"}setSignOutButtonText(t){this._signOutButton.textContent=t}setProfileButtonText(t){this._profileButton.textContent=t}setProfileButtonListener(t){this._profileButton.addEventListener("click",t)}setSignOutButtonListener(t){this._signOutButton.addEventListener("click",t)}removeProfileButtonListener(t){this._profileButton.removeEventListener("click",t)}removeSignOutButtonListener(t){this._signOutButton.removeEventListener("click",t)}requestProfileButtonFocus(){window.requestAnimationFrame(()=>this._profileButton.focus())}requestSignOutButtonFocus(){window.requestAnimationFrame(()=>this._signOutButton.focus())}};var s=class{constructor(r){this._adapter=r;this._showSignOutButton=e.defaults.SHOW_SIGN_OUT_BUTTON;this._showProfileButton=e.defaults.SHOW_PROFILE_BUTTON;this._signOutButtonText=e.defaults.SIGN_OUT_BUTTON_TEXT;this._profileButtonText=e.defaults.PROFILE_BUTTON_TEXT;this._profileListener=t=>this._onProfileButtonClick(t),this._signOutListener=t=>this._onSignOutButtonClick(t)}initialize(){this._adapter.setProfileButtonListener(this._profileListener),this._adapter.setSignOutButtonListener(this._signOutListener),(this._showSignOutButton||this._showProfileButton)&&this._requestInitialFocus(),this._setActionVisibility(),this._adapter.setSignOutButtonText(this._signOutButtonText),this._adapter.setProfileButtonText(this._profileButtonText)}_requestInitialFocus(){this._showSignOutButton?this._adapter.requestSignOutButtonFocus():this._showProfileButton&&this._adapter.requestProfileButtonFocus()}_setActionVisibility(){let r=this._showSignOutButton||this._showProfileButton;this._adapter.setActionToolbarVisibility(r),this._adapter.setSignOutButtonVisibility(this._showSignOutButton),this._adapter.setProfileButtonVisibility(this._showProfileButton)}_onProfileButtonClick(r){r.stopPropagation(),this._adapter.emitHostEvent(e.events.PROFILE)}_onSignOutButtonClick(r){r.stopPropagation(),this._adapter.emitHostEvent(e.events.SIGN_OUT)}get fullName(){return this._fullName}set fullName(r){this._fullName!==r&&(this._fullName=r,this._adapter.setFullName(this._fullName))}get email(){return this._email}set email(r){this._email!==r&&(this._email=r,this._adapter.setEmail(this._email))}get avatarText(){return this._avatarText}set avatarText(r){this._avatarText!==r&&(this._avatarText=r,this._adapter.setAvatarText(this._avatarText))}get avatarIcon(){return this._avatarIcon}set avatarIcon(r){this._avatarIcon!==r&&(this._avatarIcon=r,this._adapter.setAvatarIcon(this._avatarIcon))}get avatarImageUrl(){return this._avatarImageUrl}set avatarImageUrl(r){this._avatarImageUrl!==r&&(this._avatarImageUrl=r,this._adapter.setAvatarImageUrl(this._avatarImageUrl))}get avatarLetterCount(){return this._avatarLetterCount}set avatarLetterCount(r){this._avatarLetterCount!==r&&(this._avatarLetterCount=r,this._adapter.setAvatarLetterCount(this._avatarLetterCount))}get signOut(){return this._showSignOutButton}set signOut(r){this._showSignOutButton!==r&&(this._showSignOutButton=r,this._setActionVisibility())}get profile(){return this._showProfileButton}set profile(r){this._showProfileButton!==r&&(this._showProfileButton=r,this._setActionVisibility())}get signOutText(){return this._signOutButtonText}set signOutText(r){this._signOutButtonText!==r&&(this._signOutButtonText=r||e.defaults.SIGN_OUT_BUTTON_TEXT,this._adapter.setSignOutButtonText(this._signOutButtonText))}get profileText(){return this._profileButtonText}set profileText(r){this._profileButtonText!==r&&(this._profileButtonText=r||e.defaults.PROFILE_BUTTON_TEXT,this._adapter.setProfileButtonText(this._profileButtonText))}};var L='<template><div class="forge-profile-card" part="root"><div class="forge-profile-card__info" part="info-container"><div class="forge-profile-card__info-avatar" part="avatar-container"><forge-avatar part="avatar"></forge-avatar></div><div class="forge-profile-card__info-text" part="info-text"><div class="forge-profile-card__full-name" part="name"></div><div class="forge-profile-card__email" part="email"></div></div></div><slot></slot><forge-toolbar inverted id="action-toolbar" part="footer"><forge-button type="outlined" slot="end" style="margin-right: 8px;" part="profile-button"><button type="button" id="profile-button" aria-label="View profile" part="profile-button-element">Profile</button></forge-button><forge-button slot="end" part="sign-out-button"><button type="button" id="sign-out-button" aria-label="Sign out" part="sign-out-button-element">Sign out</button></forge-button></forge-toolbar></div></template>',N='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.forge-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);position:relative;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:64px;border:none;outline:0;line-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle}.forge-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.forge-button::-moz-focus-inner{padding:0;border:0}.forge-button:active{outline:0}.forge-button:hover{cursor:pointer}.forge-button:disabled{cursor:default;pointer-events:none}.forge-button .forge-button__icon{margin-left:0;margin-right:8px;display:inline-block;font-size:1.125rem;height:1.125rem;vertical-align:top;width:1.125rem}.forge-button .forge-button__icon[dir=rtl],[dir=rtl] .forge-button .forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button__label~.forge-button__icon{margin-left:0;margin-right:8px}svg.forge-button__icon{fill:currentColor}.forge-button--outlined .forge-button__icon,.forge-button--raised .forge-button__icon,.forge-button--unelevated .forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button--outlined .forge-button__icon[dir=rtl],.forge-button--raised .forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon,.forge-button--raised .forge-button__label~.forge-button__icon,.forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--raised .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-button .forge-button__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button .forge-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button.mdc-ripple-upgraded .forge-button__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button.mdc-ripple-upgraded--unbounded .forge-button__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button.mdc-ripple-upgraded--foreground-activation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button.mdc-ripple-upgraded--foreground-deactivation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button .forge-button__ripple{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:100%;height:100%;overflow:hidden}.forge-button:not(.forge-button--outlined) .forge-button__ripple{top:0;left:0}.forge-button--raised{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1)}.forge-button--raised:focus,.forge-button--raised:hover{-webkit-box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.forge-button--raised:active{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.forge-button--raised:disabled{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.forge-button--outlined{border-style:solid}.forge-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 8px 0 8px}.forge-button:not(:disabled){background-color:transparent}.forge-button:disabled{background-color:transparent}.forge-button:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--unelevated:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--unelevated:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--unelevated .forge-button__ripple::after,.forge-button--unelevated .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--unelevated.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--unelevated:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--unelevated.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--unelevated:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--unelevated:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--unelevated:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--unelevated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--unelevated .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--raised:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--raised:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--raised:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--raised .forge-button__ripple::after,.forge-button--raised .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--raised.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--raised:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--raised.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--raised:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--raised:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--raised:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--raised.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--raised .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 15px 0 15px;border-width:1px}.forge-button--outlined:not(:disabled){background-color:transparent}.forge-button--outlined:disabled{background-color:transparent}.forge-button--outlined:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple::after,.forge-button--outlined .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button--outlined.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--outlined:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button--outlined.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--outlined:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button--outlined:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--outlined:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button--outlined.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button--outlined .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined:not(:disabled){border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--outlined .forge-button__ripple{top:-1px;left:-1px;border:1px solid transparent}.forge-button--dense{height:24px;margin-top:0;margin-bottom:0;height:1.5rem}forge-button{display:inline-block}forge-button[hidden]{display:none}forge-button[disabled]{cursor:not-allowed}a.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);text-decoration:underline;cursor:pointer}a.forge-hyperlink:visited{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}a.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);cursor:pointer;border:none;background-color:transparent;font-size:inherit;padding:0;outline:0;text-align:left}button.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink:hover:not([disabled]){text-decoration:underline}.forge-profile-card{min-width:360px;border-radius:4px}@media (max-width:399px){.forge-profile-card{width:100vw;min-width:unset;overflow:auto}}.forge-profile-card__info{padding:8px 16px;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.forge-profile-card__info-avatar{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:8px;margin-right:16px;--forge-avatar-size:56px}.forge-profile-card__info-text{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-align:start;align-items:flex-start}.forge-profile-card__full-name{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1rem;font-size:var(--forge-typography-subtitle1-secondary-font-size, 1rem);line-height:1.75rem;line-height:var(--forge-typography-subtitle1-secondary-line-height, 1.75rem);font-weight:500;font-weight:var(--forge-typography-subtitle1-secondary-font-weight,500);letter-spacing:.01em;letter-spacing:var(--forge-typography-subtitle1-secondary-letter-spacing, .01em);text-decoration:inherit;-webkit-text-decoration:var(--forge-typography-subtitle1-secondary-text-decoration,inherit);text-decoration:var(--forge-typography-subtitle1-secondary-text-decoration,inherit);text-transform:inherit;text-transform:var(--forge-typography-subtitle1-secondary-text-transform,inherit);line-height:1.25rem}.forge-profile-card__email{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-subtitle2-font-size, .875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight,500);letter-spacing:.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, .0071428571em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-subtitle2-text-decoration,inherit);text-decoration:var(--mdc-typography-subtitle2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform,inherit);color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54))}forge-toolbar#action-toolbar::part(root){border-bottom-left-radius:4px;border-bottom-right-radius:4px}:host{display:inline}:host([hidden]){display:none}forge-toolbar{--mdc-theme-surface:var(--forge-theme-elevated-surface)}',o=class extends h{constructor(){super();_(this,L,N),this._foundation=new s(new l(this))}static get observedAttributes(){return[e.attributes.FULL_NAME,e.attributes.EMAIL,e.attributes.SIGN_OUT,e.attributes.PROFILE,e.attributes.SIGN_OUT_TEXT,e.attributes.PROFILE_TEXT,e.attributes.AVATAR_TEXT,e.attributes.AVATAR_ICON,e.attributes.AVATAR_IMAGE_URL,e.attributes.AVATAR_LETTER_COUNT]}connectedCallback(){this._foundation.initialize()}attributeChangedCallback(t,b,p){switch(t){case e.attributes.FULL_NAME:this.fullName=p;break;case e.attributes.EMAIL:this.email=p;break;case e.attributes.SIGN_OUT:this.signOut=d(e.attributes.SIGN_OUT);break;case e.attributes.PROFILE:this.profile=d(e.attributes.PROFILE);break;case e.attributes.SIGN_OUT_TEXT:this.signOutText=e.attributes.SIGN_OUT_TEXT;break;case e.attributes.PROFILE_TEXT:this.profileText=e.attributes.PROFILE_TEXT;break;case e.attributes.AVATAR_TEXT:this.avatarText=p;break;case e.attributes.AVATAR_ICON:this.avatarIcon=p;break;case e.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=p;break;case e.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=g(p);break}}};i([a()],o.prototype,"fullName",2),i([a()],o.prototype,"email",2),i([a()],o.prototype,"signOut",2),i([a()],o.prototype,"profile",2),i([a()],o.prototype,"signOutText",2),i([a()],o.prototype,"profileText",2),i([a()],o.prototype,"avatarText",2),i([a()],o.prototype,"avatarIcon",2),i([a()],o.prototype,"avatarImageUrl",2),i([a()],o.prototype,"avatarLetterCount",2),o=i([v({name:e.elementName,dependencies:[O,k,w]})],o);function tt(){m(o)}export{e as a,l as b,s as c,o as d,tt as e};
7
+ //# sourceMappingURL=chunk.LEOEVEFJ.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as t}from"./chunk.LEINPSKL.js";import{a as r}from"./chunk.KTGSZEAG.js";import{l}from"./chunk.LJLEPTLU.js";import{k as p,l as s}from"./chunk.J2M2MXP2.js";import{f as o}from"./chunk.MCIQXNKY.js";var e=class extends l{constructor(){super()}attributeChangedCallback(a,u,i){switch(a){case t.attributes.POPUP_CLASSES:this.popupClasses=i;break;case t.attributes.OPTION_LIMIT:this.optionLimit=s(i);break;case t.attributes.OBSERVE_SCROLL:this.observeScroll=p(i);break;case t.attributes.OBSERVE_SCROLL_THRESHOLD:this.observeScrollThreshold=s(i);break;case t.attributes.SYNC_POPUP_WIDTH:this.syncPopupWidth=p(i);break;case t.attributes.CONSTRAIN_POPUP_WIDTH:this.constrainPopupWidth=p(i);break;case t.attributes.WRAP_OPTION_TEXT:this.wrapOptionText=p(i);break}}};o([r()],e.prototype,"popupClasses",2),o([r()],e.prototype,"popupHeaderBuilder",2),o([r()],e.prototype,"popupFooterBuilder",2),o([r()],e.prototype,"syncPopupWidth",2),o([r()],e.prototype,"optionLimit",2),o([r()],e.prototype,"observeScroll",2),o([r()],e.prototype,"observeScrollThreshold",2),o([r()],e.prototype,"constrainPopupWidth",2),o([r()],e.prototype,"wrapOptionText",2);export{e as a};
7
- //# sourceMappingURL=chunk.EQEMCHMB.js.map
6
+ import{a as t}from"./chunk.YKZ36ELA.js";import{a as r}from"./chunk.KTGSZEAG.js";import{l}from"./chunk.LJLEPTLU.js";import{k as p,l as s}from"./chunk.J2M2MXP2.js";import{f as o}from"./chunk.MCIQXNKY.js";var e=class extends l{constructor(){super()}attributeChangedCallback(a,u,i){switch(a){case t.attributes.POPUP_CLASSES:this.popupClasses=i;break;case t.attributes.OPTION_LIMIT:this.optionLimit=s(i);break;case t.attributes.OBSERVE_SCROLL:this.observeScroll=p(i);break;case t.attributes.OBSERVE_SCROLL_THRESHOLD:this.observeScrollThreshold=s(i);break;case t.attributes.SYNC_POPUP_WIDTH:this.syncPopupWidth=p(i);break;case t.attributes.CONSTRAIN_POPUP_WIDTH:this.constrainPopupWidth=p(i);break;case t.attributes.WRAP_OPTION_TEXT:this.wrapOptionText=p(i);break}}};o([r()],e.prototype,"popupClasses",2),o([r()],e.prototype,"popupHeaderBuilder",2),o([r()],e.prototype,"popupFooterBuilder",2),o([r()],e.prototype,"syncPopupWidth",2),o([r()],e.prototype,"optionLimit",2),o([r()],e.prototype,"observeScroll",2),o([r()],e.prototype,"observeScrollThreshold",2),o([r()],e.prototype,"constrainPopupWidth",2),o([r()],e.prototype,"wrapOptionText",2);export{e as a};
7
+ //# sourceMappingURL=chunk.LKL5KWVY.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as o}from"./chunk.MKHU4IPO.js";import{a as n}from"./chunk.2KXSGD3S.js";var l=class extends n{constructor(e){super(e)}_build(){return document.createElement(o.elementName)}_configure(){var e;typeof((e=this._config.options)==null?void 0:e.helperText)=="string"&&this.setHelperText(this._config.options.helperText)}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._element.invalid||!1}set invalid(e){this._element.invalid=e}onChange(e){this._element.addEventListener("change",t=>e(t.detail))}onFocus(e){this._element.addEventListener("focus",t=>e(t))}onBlur(e){this._element.addEventListener("blur",t=>e(t))}setHelperText(e){e?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=e):this._helperTextElement&&this._helperTextElement.isConnected&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}};export{l as a};
7
- //# sourceMappingURL=chunk.TVWUZYVG.js.map
6
+ import{a as o}from"./chunk.XTQO35SU.js";import{a as n}from"./chunk.2KXSGD3S.js";var l=class extends n{constructor(e){super(e)}_build(){return document.createElement(o.elementName)}_configure(){var e;typeof((e=this._config.options)==null?void 0:e.helperText)=="string"&&this.setHelperText(this._config.options.helperText)}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._element.invalid||!1}set invalid(e){this._element.invalid=e}onChange(e){this._element.addEventListener("change",t=>e(t.detail))}onFocus(e){this._element.addEventListener("focus",t=>e(t))}onBlur(e){this._element.addEventListener("blur",t=>e(t))}setHelperText(e){e?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=e):this._helperTextElement&&this._helperTextElement.isConnected&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}};export{l as a};
7
+ //# sourceMappingURL=chunk.LQAXFDOO.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as C,d as h}from"./chunk.TMEYQXRR.js";import{a as A}from"./chunk.E3K6KM57.js";import{o as B}from"./chunk.MZLPUI6R.js";import{d as M}from"./chunk.TEHQWMFI.js";import{d as _,l as b}from"./chunk.WHQZNZHW.js";import{a as f}from"./chunk.UWYANU5D.js";import{a as d}from"./chunk.KTGSZEAG.js";import{a as u,b as I}from"./chunk.DL7NX432.js";import{a,d as s,h as l,l as c}from"./chunk.LJLEPTLU.js";import{a as m,f as p}from"./chunk.MCIQXNKY.js";var n=class extends f{constructor(o){super(o)}initialize(){this._menuElement=l(this._component,C.elementName)}setMenuOptions(o){this._menuElement.options=o}};var i=class{constructor(e){this._adapter=e;this._options=[];this._isInitialized=!1}initialize(){this._adapter.initialize(),this._adapter.setMenuOptions(this._options),this._isInitialized=!0}disconnect(){this._isInitialized=!1}get options(){return this._options}set options(e){this._options=e.map(o=>m({},o)),this._isInitialized&&this._adapter.setMenuOptions(e)}};var g=`${I}app-bar-help-button`,O={elementName:g};var x='<template><forge-icon-button><forge-menu placement="bottom-end"><button type="button" aria-label="Open help menu"><forge-icon name="help"></forge-icon></button></forge-menu><forge-tooltip delay="500" position="bottom">Help</forge-tooltip></forge-icon-button></template>',t=class extends c{constructor(){super();_.define(B),this._foundation=new i(new n(this))}initializedCallback(){s(this,x)}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}};p([d()],t.prototype,"options",2),t=p([u({name:O.elementName,dependencies:[h,A,M,b]})],t);function W(){a(t)}export{n as a,i as b,O as c,t as d,W as e};
7
- //# sourceMappingURL=chunk.6DVJ22IK.js.map
6
+ import{a as C,d as h}from"./chunk.DT4G43BK.js";import{a as A}from"./chunk.LAM6EDW3.js";import{o as B}from"./chunk.MZLPUI6R.js";import{d as M}from"./chunk.TEHQWMFI.js";import{d as _,l as b}from"./chunk.B5TEOESG.js";import{a as f}from"./chunk.UWYANU5D.js";import{a as d}from"./chunk.KTGSZEAG.js";import{a as u,b as I}from"./chunk.DL7NX432.js";import{a,d as s,h as l,l as c}from"./chunk.LJLEPTLU.js";import{a as m,f as p}from"./chunk.MCIQXNKY.js";var n=class extends f{constructor(o){super(o)}initialize(){this._menuElement=l(this._component,C.elementName)}setMenuOptions(o){this._menuElement.options=o}};var i=class{constructor(e){this._adapter=e;this._options=[];this._isInitialized=!1}initialize(){this._adapter.initialize(),this._adapter.setMenuOptions(this._options),this._isInitialized=!0}disconnect(){this._isInitialized=!1}get options(){return this._options}set options(e){this._options=e.map(o=>m({},o)),this._isInitialized&&this._adapter.setMenuOptions(e)}};var g=`${I}app-bar-help-button`,O={elementName:g};var x='<template><forge-icon-button><forge-menu placement="bottom-end"><button type="button" aria-label="Open help menu"><forge-icon name="help"></forge-icon></button></forge-menu><forge-tooltip delay="500" position="bottom">Help</forge-tooltip></forge-icon-button></template>',t=class extends c{constructor(){super();_.define(B),this._foundation=new i(new n(this))}initializedCallback(){s(this,x)}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}};p([d()],t.prototype,"options",2),t=p([u({name:O.elementName,dependencies:[h,A,M,b]})],t);function W(){a(t)}export{n as a,i as b,O as c,t as d,W as e};
7
+ //# sourceMappingURL=chunk.LQEVGZKN.js.map