@govtechsg/sgds-web-component 3.6.0 → 3.6.2

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 (88) hide show
  1. package/base/dropdown-element.d.ts +1 -1
  2. package/base/dropdown-element.js +3 -3
  3. package/base/dropdown-element.js.map +1 -1
  4. package/components/Breadcrumb/index.umd.min.js +7 -7
  5. package/components/Breadcrumb/index.umd.min.js.map +1 -1
  6. package/components/Checkbox/checkbox.js +1 -1
  7. package/components/Checkbox/index.umd.min.js +6 -6
  8. package/components/Checkbox/index.umd.min.js.map +1 -1
  9. package/components/Checkbox/sgds-checkbox.js +1 -1
  10. package/components/Checkbox/sgds-checkbox.js.map +1 -1
  11. package/components/ComboBox/index.umd.min.js +274 -260
  12. package/components/ComboBox/index.umd.min.js.map +1 -1
  13. package/components/ComboBox/sgds-combo-box-option.d.ts +0 -3
  14. package/components/ComboBox/sgds-combo-box-option.js +2 -20
  15. package/components/ComboBox/sgds-combo-box-option.js.map +1 -1
  16. package/components/ComboBox/sgds-combo-box.d.ts +4 -0
  17. package/components/ComboBox/sgds-combo-box.js +79 -24
  18. package/components/ComboBox/sgds-combo-box.js.map +1 -1
  19. package/components/Datepicker/index.umd.min.js +2 -2
  20. package/components/Datepicker/index.umd.min.js.map +1 -1
  21. package/components/Dropdown/index.umd.min.js +1 -1
  22. package/components/Dropdown/index.umd.min.js.map +1 -1
  23. package/components/Footer/index.umd.min.js +1 -1
  24. package/components/Footer/index.umd.min.js.map +1 -1
  25. package/components/Input/index.umd.min.js +1 -1
  26. package/components/Input/index.umd.min.js.map +1 -1
  27. package/components/Link/index.umd.min.js +9 -9
  28. package/components/Link/index.umd.min.js.map +1 -1
  29. package/components/Link/link.js +1 -1
  30. package/components/Mainnav/index.umd.min.js +1 -1
  31. package/components/Mainnav/index.umd.min.js.map +1 -1
  32. package/components/OverflowMenu/index.umd.min.js +1 -1
  33. package/components/OverflowMenu/index.umd.min.js.map +1 -1
  34. package/components/QuantityToggle/index.umd.min.js +1 -1
  35. package/components/QuantityToggle/index.umd.min.js.map +1 -1
  36. package/components/Radio/index.umd.min.js +6 -6
  37. package/components/Radio/index.umd.min.js.map +1 -1
  38. package/components/Radio/radio.js +1 -1
  39. package/components/Select/index.umd.min.js +1 -1
  40. package/components/Select/index.umd.min.js.map +1 -1
  41. package/components/Switch/index.umd.min.js +1 -1
  42. package/components/Switch/index.umd.min.js.map +1 -1
  43. package/components/Switch/switch.js +1 -1
  44. package/components/SystemBanner/index.umd.min.js +5 -1
  45. package/components/SystemBanner/index.umd.min.js.map +1 -1
  46. package/components/SystemBanner/sgds-system-banner.js +5 -1
  47. package/components/SystemBanner/sgds-system-banner.js.map +1 -1
  48. package/components/Textarea/index.umd.min.js +1 -1
  49. package/components/Textarea/index.umd.min.js.map +1 -1
  50. package/components/index.umd.min.js +33 -14
  51. package/components/index.umd.min.js.map +1 -1
  52. package/index.umd.min.js +33 -14
  53. package/index.umd.min.js.map +1 -1
  54. package/package.json +1 -1
  55. package/react/base/dropdown-element.cjs.js +3 -3
  56. package/react/base/dropdown-element.cjs.js.map +1 -1
  57. package/react/base/dropdown-element.js +3 -3
  58. package/react/base/dropdown-element.js.map +1 -1
  59. package/react/components/Checkbox/checkbox.cjs.js +1 -1
  60. package/react/components/Checkbox/checkbox.js +1 -1
  61. package/react/components/Checkbox/sgds-checkbox.cjs.js +1 -1
  62. package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
  63. package/react/components/Checkbox/sgds-checkbox.js +1 -1
  64. package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
  65. package/react/components/ComboBox/sgds-combo-box-option.cjs.js +2 -20
  66. package/react/components/ComboBox/sgds-combo-box-option.cjs.js.map +1 -1
  67. package/react/components/ComboBox/sgds-combo-box-option.js +2 -20
  68. package/react/components/ComboBox/sgds-combo-box-option.js.map +1 -1
  69. package/react/components/ComboBox/sgds-combo-box.cjs.js +79 -24
  70. package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
  71. package/react/components/ComboBox/sgds-combo-box.js +79 -24
  72. package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
  73. package/react/components/Link/link.cjs.js +1 -1
  74. package/react/components/Link/link.js +1 -1
  75. package/react/components/Radio/radio.cjs.js +1 -1
  76. package/react/components/Radio/radio.js +1 -1
  77. package/react/components/Switch/switch.cjs.js +1 -1
  78. package/react/components/Switch/switch.js +1 -1
  79. package/react/components/SystemBanner/sgds-system-banner.cjs.js +5 -1
  80. package/react/components/SystemBanner/sgds-system-banner.cjs.js.map +1 -1
  81. package/react/components/SystemBanner/sgds-system-banner.js +5 -1
  82. package/react/components/SystemBanner/sgds-system-banner.js.map +1 -1
  83. package/react/styles/form-check.cjs.js +1 -1
  84. package/react/styles/form-check.js +1 -1
  85. package/react/styles/form-text-control.cjs.js +1 -1
  86. package/react/styles/form-text-control.js +1 -1
  87. package/styles/form-check.js +1 -1
  88. package/styles/form-text-control.js +1 -1
@@ -77,7 +77,7 @@ function et(e){return(t,i)=>{const{slot:l,selector:o}=e??{},n="slot"+(l?`[name=$
77
77
  * @license
78
78
  * Copyright 2020 Google LLC
79
79
  * SPDX-License-Identifier: BSD-3-Clause
80
- */const ut=()=>new gt;class gt{}const wt=new WeakMap;const ft=nt(class extends pt{render(e){return te}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),te}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=wt.get(t);void 0===i&&(i=new WeakMap,wt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?wt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),mt=Math.min,xt=Math.max,yt=Math.round,Ct=Math.floor,Zt=e=>({x:e,y:e}),bt={left:"right",right:"left",bottom:"top",top:"bottom"},_t={start:"end",end:"start"};function Mt(e,t,i){return xt(e,mt(t,i))}function Ht(e,t){return"function"==typeof e?e(t):e}function Vt(e){return e.split("-")[0]}function St(e){return e.split("-")[1]}function $t(e){return"x"===e?"y":"x"}function Bt(e){return"y"===e?"height":"width"}const Pt=new Set(["top","bottom"]);function At(e){return Pt.has(Vt(e))?"y":"x"}function Lt(e){return $t(At(e))}function kt(e,t,i){void 0===i&&(i=!1);const l=St(e),o=Lt(e),n=Bt(o);let a="x"===o?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=Nt(a)),[a,Nt(a)]}function Et(e){return e.replace(/start|end/g,(e=>_t[e]))}const Tt=["left","right"],Ot=["right","left"],Rt=["top","bottom"],Ut=["bottom","top"];function zt(e,t,i,l){const o=St(e);let n=function(e,t,i){switch(e){case"top":case"bottom":return i?t?Ot:Tt:t?Tt:Ot;case"left":case"right":return t?Rt:Ut;default:return[]}}(Vt(e),"start"===i,l);return o&&(n=n.map((e=>e+"-"+o)),t&&(n=n.concat(n.map(Et)))),n}function Nt(e){return e.replace(/left|right|bottom|top/g,(e=>bt[e]))}function Dt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function It(e){const{x:t,y:i,width:l,height:o}=e;return{width:l,height:o,top:i,left:t,right:t+l,bottom:i+o,x:t,y:i}}function Wt(e,t,i){let{reference:l,floating:o}=e;const n=At(t),a=Lt(t),r=Bt(a),s=Vt(t),c="y"===n,h=l.x+l.width/2-o.width/2,d=l.y+l.height/2-o.height/2,v=l[r]/2-o[r]/2;let p;switch(s){case"top":p={x:h,y:l.y-o.height};break;case"bottom":p={x:h,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:d};break;case"left":p={x:l.x-o.width,y:d};break;default:p={x:l.x,y:l.y}}switch(St(t)){case"start":p[a]-=v*(i&&c?-1:1);break;case"end":p[a]+=v*(i&&c?-1:1)}return p}async function Ft(e,t){var i;void 0===t&&(t={});const{x:l,y:o,platform:n,rects:a,elements:r,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:v=!1,padding:p=0}=Ht(t,e),u=Dt(p),g=r[v?"floating"===d?"reference":"floating":d],w=It(await n.getClippingRect({element:null==(i=await(null==n.isElement?void 0:n.isElement(g)))||i?g:g.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(r.floating)),boundary:c,rootBoundary:h,strategy:s})),f="floating"===d?{x:l,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(r.floating)),x=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},y=It(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:m,strategy:s}):f);return{top:(w.top-y.top+u.top)/x.y,bottom:(y.bottom-w.bottom+u.bottom)/x.y,left:(w.left-y.left+u.left)/x.x,right:(y.right-w.right+u.right)/x.x}}const jt=new Set(["left","top"]);function qt(){return"undefined"!=typeof window}function Jt(e){return Xt(e)?(e.nodeName||"").toLowerCase():"#document"}function Kt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Yt(e){var t;return null==(t=(Xt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Xt(e){return!!qt()&&(e instanceof Node||e instanceof Kt(e).Node)}function Gt(e){return!!qt()&&(e instanceof Element||e instanceof Kt(e).Element)}function Qt(e){return!!qt()&&(e instanceof HTMLElement||e instanceof Kt(e).HTMLElement)}function ei(e){return!(!qt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Kt(e).ShadowRoot)}const ti=new Set(["inline","contents"]);function ii(e){const{overflow:t,overflowX:i,overflowY:l,display:o}=ui(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!ti.has(o)}const li=new Set(["table","td","th"]);function oi(e){return li.has(Jt(e))}const ni=[":popover-open",":modal"];function ai(e){return ni.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const ri=["transform","translate","scale","rotate","perspective"],si=["transform","translate","scale","rotate","perspective","filter"],ci=["paint","layout","strict","content"];function hi(e){const t=di(),i=Gt(e)?ui(e):e;return ri.some((e=>!!i[e]&&"none"!==i[e]))||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||si.some((e=>(i.willChange||"").includes(e)))||ci.some((e=>(i.contain||"").includes(e)))}function di(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const vi=new Set(["html","body","#document"]);function pi(e){return vi.has(Jt(e))}function ui(e){return Kt(e).getComputedStyle(e)}function gi(e){return Gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wi(e){if("html"===Jt(e))return e;const t=e.assignedSlot||e.parentNode||ei(e)&&e.host||Yt(e);return ei(t)?t.host:t}function fi(e){const t=wi(e);return pi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qt(t)&&ii(t)?t:fi(t)}function mi(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=fi(e),n=o===(null==(l=e.ownerDocument)?void 0:l.body),a=Kt(o);if(n){const e=xi(a);return t.concat(a,a.visualViewport||[],ii(o)?o:[],e&&i?mi(e):[])}return t.concat(o,mi(o,[],i))}function xi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yi(e){const t=ui(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=Qt(e),n=o?e.offsetWidth:i,a=o?e.offsetHeight:l,r=yt(i)!==n||yt(l)!==a;return r&&(i=n,l=a),{width:i,height:l,$:r}}function Ci(e){return Gt(e)?e:e.contextElement}function Zi(e){const t=Ci(e);if(!Qt(t))return Zt(1);const i=t.getBoundingClientRect(),{width:l,height:o,$:n}=yi(t);let a=(n?yt(i.width):i.width)/l,r=(n?yt(i.height):i.height)/o;return a&&Number.isFinite(a)||(a=1),r&&Number.isFinite(r)||(r=1),{x:a,y:r}}const bi=Zt(0);function _i(e){const t=Kt(e);return di()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:bi}function Mi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),n=Ci(e);let a=Zt(1);t&&(l?Gt(l)&&(a=Zi(l)):a=Zi(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Kt(e))&&t}(n,i,l)?_i(n):Zt(0);let s=(o.left+r.x)/a.x,c=(o.top+r.y)/a.y,h=o.width/a.x,d=o.height/a.y;if(n){const e=Kt(n),t=l&&Gt(l)?Kt(l):l;let i=e,o=xi(i);for(;o&&l&&t!==i;){const e=Zi(o),t=o.getBoundingClientRect(),l=ui(o),n=t.left+(o.clientLeft+parseFloat(l.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(l.paddingTop))*e.y;s*=e.x,c*=e.y,h*=e.x,d*=e.y,s+=n,c+=a,i=Kt(o),o=xi(i)}}return It({width:h,height:d,x:s,y:c})}function Hi(e,t){const i=gi(e).scrollLeft;return t?t.left+i:Mi(Yt(e)).left+i}function Vi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Hi(e,i),y:i.top+t.scrollTop}}const Si=25;const $i=new Set(["absolute","fixed"]);function Bi(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Kt(e),l=Yt(e),o=i.visualViewport;let n=l.clientWidth,a=l.clientHeight,r=0,s=0;if(o){n=o.width,a=o.height;const e=di();(!e||e&&"fixed"===t)&&(r=o.offsetLeft,s=o.offsetTop)}const c=Hi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,a=Math.abs(l.clientWidth-t.clientWidth-o);a<=Si&&(n-=a)}else c<=Si&&(n+=c);return{width:n,height:a,x:r,y:s}}(e,i);else if("document"===t)l=function(e){const t=Yt(e),i=gi(e),l=e.ownerDocument.body,o=xt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),n=xt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let a=-i.scrollLeft+Hi(e);const r=-i.scrollTop;return"rtl"===ui(l).direction&&(a+=xt(t.clientWidth,l.clientWidth)-o),{width:o,height:n,x:a,y:r}}(Yt(e));else if(Gt(t))l=function(e,t){const i=Mi(e,!0,"fixed"===t),l=i.top+e.clientTop,o=i.left+e.clientLeft,n=Qt(e)?Zi(e):Zt(1);return{width:e.clientWidth*n.x,height:e.clientHeight*n.y,x:o*n.x,y:l*n.y}}(t,i);else{const i=_i(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return It(l)}function Pi(e,t){const i=wi(e);return!(i===t||!Gt(i)||pi(i))&&("fixed"===ui(i).position||Pi(i,t))}function Ai(e,t,i){const l=Qt(t),o=Yt(t),n="fixed"===i,a=Mi(e,!0,n,t);let r={scrollLeft:0,scrollTop:0};const s=Zt(0);function c(){s.x=Hi(o)}if(l||!l&&!n)if(("body"!==Jt(t)||ii(o))&&(r=gi(t)),l){const e=Mi(t,!0,n,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();n&&!l&&o&&c();const h=!o||l||n?Zt(0):Vi(o,r);return{x:a.left+r.scrollLeft-s.x-h.x,y:a.top+r.scrollTop-s.y-h.y,width:a.width,height:a.height}}function Li(e){return"static"===ui(e).position}function ki(e,t){if(!Qt(e)||"fixed"===ui(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Yt(e)===i&&(i=i.ownerDocument.body),i}function Ei(e,t){const i=Kt(e);if(ai(e))return i;if(!Qt(e)){let t=wi(e);for(;t&&!pi(t);){if(Gt(t)&&!Li(t))return t;t=wi(t)}return i}let l=ki(e,t);for(;l&&oi(l)&&Li(l);)l=ki(l,t);return l&&pi(l)&&Li(l)&&!hi(l)?i:l||function(e){let t=wi(e);for(;Qt(t)&&!pi(t);){if(hi(t))return t;if(ai(t))return null;t=wi(t)}return null}(e)||i}const Ti={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:o}=e;const n="fixed"===o,a=Yt(l),r=!!t&&ai(t.floating);if(l===a||r&&n)return i;let s={scrollLeft:0,scrollTop:0},c=Zt(1);const h=Zt(0),d=Qt(l);if((d||!d&&!n)&&(("body"!==Jt(l)||ii(a))&&(s=gi(l)),Qt(l))){const e=Mi(l);c=Zi(l),h.x=e.x+l.clientLeft,h.y=e.y+l.clientTop}const v=!a||d||n?Zt(0):Vi(a,s);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-s.scrollLeft*c.x+h.x+v.x,y:i.y*c.y-s.scrollTop*c.y+h.y+v.y}},getDocumentElement:Yt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:o}=e;const n=[..."clippingAncestors"===i?ai(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=mi(e,[],!1).filter((e=>Gt(e)&&"body"!==Jt(e))),o=null;const n="fixed"===ui(e).position;let a=n?wi(e):e;for(;Gt(a)&&!pi(a);){const t=ui(a),i=hi(a);i||"fixed"!==t.position||(o=null),(n?!i&&!o:!i&&"static"===t.position&&o&&$i.has(o.position)||ii(a)&&!i&&Pi(e,a))?l=l.filter((e=>e!==a)):o=t,a=wi(a)}return t.set(e,l),l}(t,this._c):[].concat(i),l],a=n[0],r=n.reduce(((e,i)=>{const l=Bi(t,i,o);return e.top=xt(l.top,e.top),e.right=mt(l.right,e.right),e.bottom=mt(l.bottom,e.bottom),e.left=xt(l.left,e.left),e}),Bi(t,a,o));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:Ei,getElementRects:async function(e){const t=this.getOffsetParent||Ei,i=this.getDimensions,l=await i(e.floating);return{reference:Ai(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=yi(e);return{width:t,height:i}},getScale:Zi,isElement:Gt,isRTL:function(e){return"rtl"===ui(e).direction}};function Oi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ri(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:o=!0,ancestorResize:n=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:s=!1}=l,c=Ci(e),h=o||n?[...c?mi(c):[],...mi(t)]:[];h.forEach((e=>{o&&e.addEventListener("scroll",i,{passive:!0}),n&&e.addEventListener("resize",i)}));const d=c&&r?function(e,t){let i,l=null;const o=Yt(e);function n(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function a(r,s){void 0===r&&(r=!1),void 0===s&&(s=1),n();const c=e.getBoundingClientRect(),{left:h,top:d,width:v,height:p}=c;if(r||t(),!v||!p)return;const u={rootMargin:-Ct(d)+"px "+-Ct(o.clientWidth-(h+v))+"px "+-Ct(o.clientHeight-(d+p))+"px "+-Ct(h)+"px",threshold:xt(0,mt(1,s))||1};let g=!0;function w(t){const l=t[0].intersectionRatio;if(l!==s){if(!g)return a();l?a(!1,l):i=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==l||Oi(c,e.getBoundingClientRect())||a(),g=!1}try{l=new IntersectionObserver(w,{...u,root:o.ownerDocument})}catch(e){l=new IntersectionObserver(w,u)}l.observe(e)}(!0),n}(c,i):null;let v,p=-1,u=null;a&&(u=new ResizeObserver((e=>{let[l]=e;l&&l.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=u)||e.observe(t)}))),i()})),c&&!s&&u.observe(c),u.observe(t));let g=s?Mi(e):null;return s&&function t(){const l=Mi(e);g&&!Oi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;h.forEach((e=>{o&&e.removeEventListener("scroll",i),n&&e.removeEventListener("resize",i)})),null==d||d(),null==(e=u)||e.disconnect(),u=null,s&&cancelAnimationFrame(v)}}const Ui=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:o,y:n,placement:a,middlewareData:r}=t,s=await async function(e,t){const{placement:i,platform:l,elements:o}=e,n=await(null==l.isRTL?void 0:l.isRTL(o.floating)),a=Vt(i),r=St(i),s="y"===At(i),c=jt.has(a)?-1:1,h=n&&s?-1:1,d=Ht(t,e);let{mainAxis:v,crossAxis:p,alignmentAxis:u}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return r&&"number"==typeof u&&(p="end"===r?-1*u:u),s?{x:p*h,y:v*c}:{x:v*c,y:p*h}}(t,e);return a===(null==(i=r.offset)?void 0:i.placement)&&null!=(l=r.arrow)&&l.alignmentOffset?{}:{x:o+s.x,y:n+s.y,data:{...s,placement:a}}}}},zi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:o}=t,{mainAxis:n=!0,crossAxis:a=!1,limiter:r={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...s}=Ht(e,t),c={x:i,y:l},h=await Ft(t,s),d=At(Vt(o)),v=$t(d);let p=c[v],u=c[d];if(n){const e="y"===v?"bottom":"right";p=Mt(p+h["y"===v?"top":"left"],p,p-h[e])}if(a){const e="y"===d?"bottom":"right";u=Mt(u+h["y"===d?"top":"left"],u,u-h[e])}const g=r.fn({...t,[v]:p,[d]:u});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:n,[d]:a}}}}}},Ni=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:o,middlewareData:n,rects:a,initialPlacement:r,platform:s,elements:c}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:v,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:g=!0,...w}=Ht(e,t);if(null!=(i=n.arrow)&&i.alignmentOffset)return{};const f=Vt(o),m=At(r),x=Vt(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=v||(x||!g?[Nt(r)]:function(e){const t=Nt(e);return[Et(e),t,Et(t)]}(r)),Z="none"!==u;!v&&Z&&C.push(...zt(r,g,u,y));const b=[r,...C],_=await Ft(t,w),M=[];let H=(null==(l=n.flip)?void 0:l.overflows)||[];if(h&&M.push(_[f]),d){const e=kt(o,a,y);M.push(_[e[0]],_[e[1]])}if(H=[...H,{placement:o,overflows:M}],!M.every((e=>e<=0))){var V,S;const e=((null==(V=n.flip)?void 0:V.index)||0)+1,t=b[e];if(t){if(!("alignment"===d&&m!==At(t))||H.every((e=>At(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:H},reset:{placement:t}}}let i=null==(S=H.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!i)switch(p){case"bestFit":{var $;const e=null==($=H.filter((e=>{if(Z){const t=At(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:$[0];e&&(i=e);break}case"initialPlacement":i=r}if(o!==i)return{reset:{placement:i}}}return{}}}},Di=(e,t,i)=>{const l=new Map,o={platform:Ti,...i},n={...o.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:n=[],platform:a}=i,r=n.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:d}=Wt(c,l,s),v=l,p={},u=0;for(let i=0;i<r.length;i++){const{name:n,fn:g}=r[i],{x:w,y:f,data:m,reset:x}=await g({x:h,y:d,initialPlacement:l,placement:v,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});h=null!=w?w:h,d=null!=f?f:d,p={...p,[n]:{...p[n],...m}},x&&u<=50&&(u++,"object"==typeof x&&(x.placement&&(v=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:h,y:d}=Wt(c,v,s))),i=-1)}return{x:h,y:d,placement:v,strategy:o,middlewareData:p}})(e,t,{...o,platform:n})};class Ii extends tt{constructor(){super(...arguments),this.myDropdown=ut(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=ut(),this._handleKeyboardMenuEvent=e=>{if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}},this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu())}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Ri(this.myDropdown.value,this.menuRef.value,(()=>this.updateFloatingPosition()))))}async hideMenu(){this.menuIsOpen&&(this.emit("sgds-hide"),this.menuIsOpen=!1,setTimeout((()=>this.emit("sgds-after-hide")),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}mergeMiddleware(e,t){const i=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},l=t.map(i),o=e.map((e=>{const o=i(e),n=l.indexOf(o);return-1!==n?t[n]:e})).concat(t.filter((t=>!e.some((e=>i(e)===i(t))))));return o}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Ui(8),this.noFlip?void 0:Ni(),zi()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:o,y:n,strategy:a,placement:r}=await Di(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:a,left:`${o}px`,top:`${n}px`})}}e([Ye({type:Boolean,state:!0})],Ii.prototype,"noFlip",void 0),e([Ye({type:Boolean,reflect:!0,state:!0})],Ii.prototype,"menuAlignRight",void 0),e([Ye({type:String,reflect:!0,state:!0})],Ii.prototype,"drop",void 0),e([Ye({type:Object})],Ii.prototype,"floatingOpts",void 0),e([Ye({type:Boolean,reflect:!0})],Ii.prototype,"menuIsOpen",void 0),e([Ye({type:Boolean,reflect:!0})],Ii.prototype,"disabled",void 0),e([Ye({type:Boolean,reflect:!0})],Ii.prototype,"readonly",void 0);class Wi extends Ii{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;e.target.disabled||(this.emit("sgds-select"),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach((e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.removeAttribute("tabindex")}))}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter((e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden")))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter((e=>!e.disabled&&!e.hidden))}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach((e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()}))}}var Fi,ji;Wi.styles=Ii.styles,e([(Fi="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(Fi)??null;if(null===i&&ji&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Qe("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${Fi}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return i};if(ji){const{get:o,set:n}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return Ge(e,t,{get(){let e=o.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&n.call(this,e)),e}})}return Ge(e,t,{get(){return l(this)}})})],Wi.prototype,"menu",void 0),e([Xe()],Wi.prototype,"nextDropdownItemNo",void 0),e([Xe()],Wi.prototype,"prevDropdownItemNo",void 0),e([Ye({type:Boolean,reflect:!0})],Wi.prototype,"hidden",void 0);var qi=Ze`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,Ji=Ze`.dropdown{display:flex;height:inherit;position:relative}`;class Ki extends Wi{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.menuRef=ft()}async _handleClick(){this.disabled||this.toggleMenu()}_handleCloseMenu(){const e=this._toggler[0];null==e||e.focus()}async connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._handleCloseMenu)}async disconnectedCallback(){this.removeEventListener("sgds-hide",this._handleCloseMenu)}async firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&await this.showMenu(),this._handleDisabled()}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return G`
80
+ */const ut=()=>new gt;class gt{}const wt=new WeakMap;const ft=nt(class extends pt{render(e){return te}update(e,[t]){const i=t!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=t,this._context=e.options?.host,this._updateRefValue(this._element=e.element)),te}_updateRefValue(e){if(this.isConnected||(e=void 0),"function"==typeof this._ref){const t=this._context??globalThis;let i=wt.get(t);void 0===i&&(i=new WeakMap,wt.set(t,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,e),void 0!==e&&this._ref.call(this._context,e)}else this._ref.value=e}get _lastElementForRef(){return"function"==typeof this._ref?wt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}),mt=Math.min,xt=Math.max,yt=Math.round,Ct=Math.floor,Zt=e=>({x:e,y:e}),bt={left:"right",right:"left",bottom:"top",top:"bottom"},_t={start:"end",end:"start"};function Mt(e,t,i){return xt(e,mt(t,i))}function Ht(e,t){return"function"==typeof e?e(t):e}function Vt(e){return e.split("-")[0]}function St(e){return e.split("-")[1]}function $t(e){return"x"===e?"y":"x"}function Bt(e){return"y"===e?"height":"width"}const Pt=new Set(["top","bottom"]);function At(e){return Pt.has(Vt(e))?"y":"x"}function Lt(e){return $t(At(e))}function kt(e,t,i){void 0===i&&(i=!1);const l=St(e),o=Lt(e),n=Bt(o);let a="x"===o?l===(i?"end":"start")?"right":"left":"start"===l?"bottom":"top";return t.reference[n]>t.floating[n]&&(a=Nt(a)),[a,Nt(a)]}function Et(e){return e.replace(/start|end/g,(e=>_t[e]))}const Tt=["left","right"],Ot=["right","left"],Rt=["top","bottom"],Ut=["bottom","top"];function zt(e,t,i,l){const o=St(e);let n=function(e,t,i){switch(e){case"top":case"bottom":return i?t?Ot:Tt:t?Tt:Ot;case"left":case"right":return t?Rt:Ut;default:return[]}}(Vt(e),"start"===i,l);return o&&(n=n.map((e=>e+"-"+o)),t&&(n=n.concat(n.map(Et)))),n}function Nt(e){return e.replace(/left|right|bottom|top/g,(e=>bt[e]))}function Dt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function It(e){const{x:t,y:i,width:l,height:o}=e;return{width:l,height:o,top:i,left:t,right:t+l,bottom:i+o,x:t,y:i}}function Wt(e,t,i){let{reference:l,floating:o}=e;const n=At(t),a=Lt(t),r=Bt(a),s=Vt(t),c="y"===n,h=l.x+l.width/2-o.width/2,d=l.y+l.height/2-o.height/2,v=l[r]/2-o[r]/2;let p;switch(s){case"top":p={x:h,y:l.y-o.height};break;case"bottom":p={x:h,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:d};break;case"left":p={x:l.x-o.width,y:d};break;default:p={x:l.x,y:l.y}}switch(St(t)){case"start":p[a]-=v*(i&&c?-1:1);break;case"end":p[a]+=v*(i&&c?-1:1)}return p}async function Ft(e,t){var i;void 0===t&&(t={});const{x:l,y:o,platform:n,rects:a,elements:r,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:v=!1,padding:p=0}=Ht(t,e),u=Dt(p),g=r[v?"floating"===d?"reference":"floating":d],w=It(await n.getClippingRect({element:null==(i=await(null==n.isElement?void 0:n.isElement(g)))||i?g:g.contextElement||await(null==n.getDocumentElement?void 0:n.getDocumentElement(r.floating)),boundary:c,rootBoundary:h,strategy:s})),f="floating"===d?{x:l,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==n.getOffsetParent?void 0:n.getOffsetParent(r.floating)),x=await(null==n.isElement?void 0:n.isElement(m))&&await(null==n.getScale?void 0:n.getScale(m))||{x:1,y:1},y=It(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:f,offsetParent:m,strategy:s}):f);return{top:(w.top-y.top+u.top)/x.y,bottom:(y.bottom-w.bottom+u.bottom)/x.y,left:(w.left-y.left+u.left)/x.x,right:(y.right-w.right+u.right)/x.x}}const jt=new Set(["left","top"]);function qt(){return"undefined"!=typeof window}function Jt(e){return Xt(e)?(e.nodeName||"").toLowerCase():"#document"}function Kt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Yt(e){var t;return null==(t=(Xt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Xt(e){return!!qt()&&(e instanceof Node||e instanceof Kt(e).Node)}function Gt(e){return!!qt()&&(e instanceof Element||e instanceof Kt(e).Element)}function Qt(e){return!!qt()&&(e instanceof HTMLElement||e instanceof Kt(e).HTMLElement)}function ei(e){return!(!qt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Kt(e).ShadowRoot)}const ti=new Set(["inline","contents"]);function ii(e){const{overflow:t,overflowX:i,overflowY:l,display:o}=ui(e);return/auto|scroll|overlay|hidden|clip/.test(t+l+i)&&!ti.has(o)}const li=new Set(["table","td","th"]);function oi(e){return li.has(Jt(e))}const ni=[":popover-open",":modal"];function ai(e){return ni.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const ri=["transform","translate","scale","rotate","perspective"],si=["transform","translate","scale","rotate","perspective","filter"],ci=["paint","layout","strict","content"];function hi(e){const t=di(),i=Gt(e)?ui(e):e;return ri.some((e=>!!i[e]&&"none"!==i[e]))||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||si.some((e=>(i.willChange||"").includes(e)))||ci.some((e=>(i.contain||"").includes(e)))}function di(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const vi=new Set(["html","body","#document"]);function pi(e){return vi.has(Jt(e))}function ui(e){return Kt(e).getComputedStyle(e)}function gi(e){return Gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wi(e){if("html"===Jt(e))return e;const t=e.assignedSlot||e.parentNode||ei(e)&&e.host||Yt(e);return ei(t)?t.host:t}function fi(e){const t=wi(e);return pi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qt(t)&&ii(t)?t:fi(t)}function mi(e,t,i){var l;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=fi(e),n=o===(null==(l=e.ownerDocument)?void 0:l.body),a=Kt(o);if(n){const e=xi(a);return t.concat(a,a.visualViewport||[],ii(o)?o:[],e&&i?mi(e):[])}return t.concat(o,mi(o,[],i))}function xi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yi(e){const t=ui(e);let i=parseFloat(t.width)||0,l=parseFloat(t.height)||0;const o=Qt(e),n=o?e.offsetWidth:i,a=o?e.offsetHeight:l,r=yt(i)!==n||yt(l)!==a;return r&&(i=n,l=a),{width:i,height:l,$:r}}function Ci(e){return Gt(e)?e:e.contextElement}function Zi(e){const t=Ci(e);if(!Qt(t))return Zt(1);const i=t.getBoundingClientRect(),{width:l,height:o,$:n}=yi(t);let a=(n?yt(i.width):i.width)/l,r=(n?yt(i.height):i.height)/o;return a&&Number.isFinite(a)||(a=1),r&&Number.isFinite(r)||(r=1),{x:a,y:r}}const bi=Zt(0);function _i(e){const t=Kt(e);return di()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:bi}function Mi(e,t,i,l){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),n=Ci(e);let a=Zt(1);t&&(l?Gt(l)&&(a=Zi(l)):a=Zi(e));const r=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Kt(e))&&t}(n,i,l)?_i(n):Zt(0);let s=(o.left+r.x)/a.x,c=(o.top+r.y)/a.y,h=o.width/a.x,d=o.height/a.y;if(n){const e=Kt(n),t=l&&Gt(l)?Kt(l):l;let i=e,o=xi(i);for(;o&&l&&t!==i;){const e=Zi(o),t=o.getBoundingClientRect(),l=ui(o),n=t.left+(o.clientLeft+parseFloat(l.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(l.paddingTop))*e.y;s*=e.x,c*=e.y,h*=e.x,d*=e.y,s+=n,c+=a,i=Kt(o),o=xi(i)}}return It({width:h,height:d,x:s,y:c})}function Hi(e,t){const i=gi(e).scrollLeft;return t?t.left+i:Mi(Yt(e)).left+i}function Vi(e,t){const i=e.getBoundingClientRect();return{x:i.left+t.scrollLeft-Hi(e,i),y:i.top+t.scrollTop}}const Si=25;const $i=new Set(["absolute","fixed"]);function Bi(e,t,i){let l;if("viewport"===t)l=function(e,t){const i=Kt(e),l=Yt(e),o=i.visualViewport;let n=l.clientWidth,a=l.clientHeight,r=0,s=0;if(o){n=o.width,a=o.height;const e=di();(!e||e&&"fixed"===t)&&(r=o.offsetLeft,s=o.offsetTop)}const c=Hi(l);if(c<=0){const e=l.ownerDocument,t=e.body,i=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,a=Math.abs(l.clientWidth-t.clientWidth-o);a<=Si&&(n-=a)}else c<=Si&&(n+=c);return{width:n,height:a,x:r,y:s}}(e,i);else if("document"===t)l=function(e){const t=Yt(e),i=gi(e),l=e.ownerDocument.body,o=xt(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),n=xt(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight);let a=-i.scrollLeft+Hi(e);const r=-i.scrollTop;return"rtl"===ui(l).direction&&(a+=xt(t.clientWidth,l.clientWidth)-o),{width:o,height:n,x:a,y:r}}(Yt(e));else if(Gt(t))l=function(e,t){const i=Mi(e,!0,"fixed"===t),l=i.top+e.clientTop,o=i.left+e.clientLeft,n=Qt(e)?Zi(e):Zt(1);return{width:e.clientWidth*n.x,height:e.clientHeight*n.y,x:o*n.x,y:l*n.y}}(t,i);else{const i=_i(e);l={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return It(l)}function Pi(e,t){const i=wi(e);return!(i===t||!Gt(i)||pi(i))&&("fixed"===ui(i).position||Pi(i,t))}function Ai(e,t,i){const l=Qt(t),o=Yt(t),n="fixed"===i,a=Mi(e,!0,n,t);let r={scrollLeft:0,scrollTop:0};const s=Zt(0);function c(){s.x=Hi(o)}if(l||!l&&!n)if(("body"!==Jt(t)||ii(o))&&(r=gi(t)),l){const e=Mi(t,!0,n,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();n&&!l&&o&&c();const h=!o||l||n?Zt(0):Vi(o,r);return{x:a.left+r.scrollLeft-s.x-h.x,y:a.top+r.scrollTop-s.y-h.y,width:a.width,height:a.height}}function Li(e){return"static"===ui(e).position}function ki(e,t){if(!Qt(e)||"fixed"===ui(e).position)return null;if(t)return t(e);let i=e.offsetParent;return Yt(e)===i&&(i=i.ownerDocument.body),i}function Ei(e,t){const i=Kt(e);if(ai(e))return i;if(!Qt(e)){let t=wi(e);for(;t&&!pi(t);){if(Gt(t)&&!Li(t))return t;t=wi(t)}return i}let l=ki(e,t);for(;l&&oi(l)&&Li(l);)l=ki(l,t);return l&&pi(l)&&Li(l)&&!hi(l)?i:l||function(e){let t=wi(e);for(;Qt(t)&&!pi(t);){if(hi(t))return t;if(ai(t))return null;t=wi(t)}return null}(e)||i}const Ti={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:l,strategy:o}=e;const n="fixed"===o,a=Yt(l),r=!!t&&ai(t.floating);if(l===a||r&&n)return i;let s={scrollLeft:0,scrollTop:0},c=Zt(1);const h=Zt(0),d=Qt(l);if((d||!d&&!n)&&(("body"!==Jt(l)||ii(a))&&(s=gi(l)),Qt(l))){const e=Mi(l);c=Zi(l),h.x=e.x+l.clientLeft,h.y=e.y+l.clientTop}const v=!a||d||n?Zt(0):Vi(a,s);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-s.scrollLeft*c.x+h.x+v.x,y:i.y*c.y-s.scrollTop*c.y+h.y+v.y}},getDocumentElement:Yt,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:l,strategy:o}=e;const n=[..."clippingAncestors"===i?ai(t)?[]:function(e,t){const i=t.get(e);if(i)return i;let l=mi(e,[],!1).filter((e=>Gt(e)&&"body"!==Jt(e))),o=null;const n="fixed"===ui(e).position;let a=n?wi(e):e;for(;Gt(a)&&!pi(a);){const t=ui(a),i=hi(a);i||"fixed"!==t.position||(o=null),(n?!i&&!o:!i&&"static"===t.position&&o&&$i.has(o.position)||ii(a)&&!i&&Pi(e,a))?l=l.filter((e=>e!==a)):o=t,a=wi(a)}return t.set(e,l),l}(t,this._c):[].concat(i),l],a=n[0],r=n.reduce(((e,i)=>{const l=Bi(t,i,o);return e.top=xt(l.top,e.top),e.right=mt(l.right,e.right),e.bottom=mt(l.bottom,e.bottom),e.left=xt(l.left,e.left),e}),Bi(t,a,o));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}},getOffsetParent:Ei,getElementRects:async function(e){const t=this.getOffsetParent||Ei,i=this.getDimensions,l=await i(e.floating);return{reference:Ai(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=yi(e);return{width:t,height:i}},getScale:Zi,isElement:Gt,isRTL:function(e){return"rtl"===ui(e).direction}};function Oi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ri(e,t,i,l){void 0===l&&(l={});const{ancestorScroll:o=!0,ancestorResize:n=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:r="function"==typeof IntersectionObserver,animationFrame:s=!1}=l,c=Ci(e),h=o||n?[...c?mi(c):[],...mi(t)]:[];h.forEach((e=>{o&&e.addEventListener("scroll",i,{passive:!0}),n&&e.addEventListener("resize",i)}));const d=c&&r?function(e,t){let i,l=null;const o=Yt(e);function n(){var e;clearTimeout(i),null==(e=l)||e.disconnect(),l=null}return function a(r,s){void 0===r&&(r=!1),void 0===s&&(s=1),n();const c=e.getBoundingClientRect(),{left:h,top:d,width:v,height:p}=c;if(r||t(),!v||!p)return;const u={rootMargin:-Ct(d)+"px "+-Ct(o.clientWidth-(h+v))+"px "+-Ct(o.clientHeight-(d+p))+"px "+-Ct(h)+"px",threshold:xt(0,mt(1,s))||1};let g=!0;function w(t){const l=t[0].intersectionRatio;if(l!==s){if(!g)return a();l?a(!1,l):i=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==l||Oi(c,e.getBoundingClientRect())||a(),g=!1}try{l=new IntersectionObserver(w,{...u,root:o.ownerDocument})}catch(e){l=new IntersectionObserver(w,u)}l.observe(e)}(!0),n}(c,i):null;let v,p=-1,u=null;a&&(u=new ResizeObserver((e=>{let[l]=e;l&&l.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=u)||e.observe(t)}))),i()})),c&&!s&&u.observe(c),u.observe(t));let g=s?Mi(e):null;return s&&function t(){const l=Mi(e);g&&!Oi(g,l)&&i();g=l,v=requestAnimationFrame(t)}(),i(),()=>{var e;h.forEach((e=>{o&&e.removeEventListener("scroll",i),n&&e.removeEventListener("resize",i)})),null==d||d(),null==(e=u)||e.disconnect(),u=null,s&&cancelAnimationFrame(v)}}const Ui=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,l;const{x:o,y:n,placement:a,middlewareData:r}=t,s=await async function(e,t){const{placement:i,platform:l,elements:o}=e,n=await(null==l.isRTL?void 0:l.isRTL(o.floating)),a=Vt(i),r=St(i),s="y"===At(i),c=jt.has(a)?-1:1,h=n&&s?-1:1,d=Ht(t,e);let{mainAxis:v,crossAxis:p,alignmentAxis:u}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return r&&"number"==typeof u&&(p="end"===r?-1*u:u),s?{x:p*h,y:v*c}:{x:v*c,y:p*h}}(t,e);return a===(null==(i=r.offset)?void 0:i.placement)&&null!=(l=r.arrow)&&l.alignmentOffset?{}:{x:o+s.x,y:n+s.y,data:{...s,placement:a}}}}},zi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:l,placement:o}=t,{mainAxis:n=!0,crossAxis:a=!1,limiter:r={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...s}=Ht(e,t),c={x:i,y:l},h=await Ft(t,s),d=At(Vt(o)),v=$t(d);let p=c[v],u=c[d];if(n){const e="y"===v?"bottom":"right";p=Mt(p+h["y"===v?"top":"left"],p,p-h[e])}if(a){const e="y"===d?"bottom":"right";u=Mt(u+h["y"===d?"top":"left"],u,u-h[e])}const g=r.fn({...t,[v]:p,[d]:u});return{...g,data:{x:g.x-i,y:g.y-l,enabled:{[v]:n,[d]:a}}}}}},Ni=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,l;const{placement:o,middlewareData:n,rects:a,initialPlacement:r,platform:s,elements:c}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:v,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:g=!0,...w}=Ht(e,t);if(null!=(i=n.arrow)&&i.alignmentOffset)return{};const f=Vt(o),m=At(r),x=Vt(r)===r,y=await(null==s.isRTL?void 0:s.isRTL(c.floating)),C=v||(x||!g?[Nt(r)]:function(e){const t=Nt(e);return[Et(e),t,Et(t)]}(r)),Z="none"!==u;!v&&Z&&C.push(...zt(r,g,u,y));const b=[r,...C],_=await Ft(t,w),M=[];let H=(null==(l=n.flip)?void 0:l.overflows)||[];if(h&&M.push(_[f]),d){const e=kt(o,a,y);M.push(_[e[0]],_[e[1]])}if(H=[...H,{placement:o,overflows:M}],!M.every((e=>e<=0))){var V,S;const e=((null==(V=n.flip)?void 0:V.index)||0)+1,t=b[e];if(t){if(!("alignment"===d&&m!==At(t))||H.every((e=>At(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:H},reset:{placement:t}}}let i=null==(S=H.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!i)switch(p){case"bestFit":{var $;const e=null==($=H.filter((e=>{if(Z){const t=At(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:$[0];e&&(i=e);break}case"initialPlacement":i=r}if(o!==i)return{reset:{placement:i}}}return{}}}},Di=(e,t,i)=>{const l=new Map,o={platform:Ti,...i},n={...o.platform,_c:l};return(async(e,t,i)=>{const{placement:l="bottom",strategy:o="absolute",middleware:n=[],platform:a}=i,r=n.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:h,y:d}=Wt(c,l,s),v=l,p={},u=0;for(let i=0;i<r.length;i++){const{name:n,fn:g}=r[i],{x:w,y:f,data:m,reset:x}=await g({x:h,y:d,initialPlacement:l,placement:v,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});h=null!=w?w:h,d=null!=f?f:d,p={...p,[n]:{...p[n],...m}},x&&u<=50&&(u++,"object"==typeof x&&(x.placement&&(v=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:h,y:d}=Wt(c,v,s))),i=-1)}return{x:h,y:d,placement:v,strategy:o,middlewareData:p}})(e,t,{...o,platform:n})};class Ii extends tt{constructor(){super(...arguments),this.myDropdown=ut(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=ut(),this._handleKeyboardMenuEvent=e=>{if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}},this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&this.updateFloatingPosition()}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Ri(this.myDropdown.value,this.menuRef.value,(()=>this.updateFloatingPosition()))))}async hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout((()=>this.emit("sgds-after-hide")),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}mergeMiddleware(e,t){const i=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},l=t.map(i),o=e.map((e=>{const o=i(e),n=l.indexOf(o);return-1!==n?t[n]:e})).concat(t.filter((t=>!e.some((e=>i(e)===i(t))))));return o}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Ui(8),this.noFlip?void 0:Ni(),zi()].filter(Boolean);let i=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(i=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const l=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:i}),{x:o,y:n,strategy:a,placement:r}=await Di(this.myDropdown.value,this.menuRef.value,l);this.menuRef.value.setAttribute("data-placement",r),Object.assign(this.menuRef.value.style,{position:a,left:`${o}px`,top:`${n}px`})}}e([Ye({type:Boolean,state:!0})],Ii.prototype,"noFlip",void 0),e([Ye({type:Boolean,reflect:!0,state:!0})],Ii.prototype,"menuAlignRight",void 0),e([Ye({type:String,reflect:!0,state:!0})],Ii.prototype,"drop",void 0),e([Ye({type:Object})],Ii.prototype,"floatingOpts",void 0),e([Ye({type:Boolean,reflect:!0})],Ii.prototype,"menuIsOpen",void 0),e([Ye({type:Boolean,reflect:!0})],Ii.prototype,"disabled",void 0),e([Ye({type:Boolean,reflect:!0})],Ii.prototype,"readonly",void 0);class Wi extends Ii{constructor(){super(...arguments),this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1,this.hidden=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._resetMenu)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("sgds-hide",this._resetMenu)}firstUpdated(e){super.firstUpdated(e),this.addEventListener("keydown",this._handleKeyboardMenuItemsEvent)}handleSelectSlot(e){const t=this._getActiveMenuItems(),i=t.indexOf(e.target);this.nextDropdownItemNo=i+1,this.prevDropdownItemNo=i<=0?t.length-1:i-1;e.target.disabled||(this.emit("sgds-select"),"outside"!==this.close&&this.hideMenu())}_resetMenu(){this.nextDropdownItemNo=0,this.prevDropdownItemNo=-1;this._getMenuItems().forEach((e=>{var t;const i=null===(t=null==e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-item");i&&i.removeAttribute("tabindex")}))}_handleKeyboardMenuItemsEvent(e){if(this.readonly)return;const t=this._getActiveMenuItems();if(0!==t.length)switch(e.key){case"ArrowDown":e.preventDefault(),this._setMenuItem(this.nextDropdownItemNo);break;case"ArrowUp":e.preventDefault(),this._setMenuItem(this.prevDropdownItemNo);break;case"Tab":if(!this.menuIsOpen)return;e.preventDefault(),e.shiftKey?this._setMenuItem(this.prevDropdownItemNo):this._setMenuItem(this.nextDropdownItemNo);break;case"Enter":t.includes(e.target)&&this.handleSelectSlot(e)}}_getMenuItems(){var e,t;if(this.shadowRoot.querySelector("slot#default")){return null===(e=this.shadowRoot.querySelector("slot#default"))||void 0===e?void 0:e.assignedElements({flatten:!0}).filter((e=>!e.classList.contains("empty-menu")&&!e.hasAttribute("hidden")))}if(null===(t=this.menu)||void 0===t?void 0:t.hasChildNodes()){return[...Array.from(this.menu.children)]}return[]}_getActiveMenuItems(){return this._getMenuItems().filter((e=>!e.disabled&&!e.hidden))}_setMenuItem(e){const t=this._getActiveMenuItems();if(0===t.length)return;const i=(e%t.length+t.length)%t.length,l=t[i];this.emit("i-sgds-option-focus",{detail:{option:l}}),this.nextDropdownItemNo=(i+1)%t.length,this.prevDropdownItemNo=(i-1+t.length)%t.length,t.forEach((e=>{const t=e.shadowRoot.querySelector(".dropdown-item");t.setAttribute("tabindex",e===l?"0":"-1"),e===l&&t.focus()}))}}var Fi,ji;Wi.styles=Ii.styles,e([(Fi="ul.dropdown-menu",(e,t,i)=>{const l=e=>{const i=e.renderRoot?.querySelector(Fi)??null;if(null===i&&ji&&!e.hasUpdated){const e="object"==typeof t?t.name:t;Qe("",`@query'd field ${JSON.stringify(String(e))} with the 'cache' flag set for selector '${Fi}' has been accessed before the first update and returned null. This is expected if the renderRoot tree has not been provided beforehand (e.g. via Declarative Shadow DOM). Therefore the value hasn't been cached.`)}return i};if(ji){const{get:o,set:n}="object"==typeof t?e:i??(()=>{const e=Symbol(`${String(t)} (@query() cache)`);return{get(){return this[e]},set(t){this[e]=t}}})();return Ge(e,t,{get(){let e=o.call(this);return void 0===e&&(e=l(this),(null!==e||this.hasUpdated)&&n.call(this,e)),e}})}return Ge(e,t,{get(){return l(this)}})})],Wi.prototype,"menu",void 0),e([Xe()],Wi.prototype,"nextDropdownItemNo",void 0),e([Xe()],Wi.prototype,"prevDropdownItemNo",void 0),e([Ye({type:Boolean,reflect:!0})],Wi.prototype,"hidden",void 0);var qi=Ze`:host([menuisopen]) .dropdown-menu{display:block}.dropdown-menu{background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 1px 0 hsla(0,0%,5%,.12),0 4px 8px 0 hsla(0,0%,5%,.12);color:var(--sgds-color-default);display:none;list-style:none;margin:0;max-height:var(--sgds-dimension-480);min-width:var(--sgds-dimension-280);overflow-y:auto;padding:var(--sgds-padding-xs) 0;position:absolute;text-align:left;z-index:1050}.nav-tabs .dropdown-menu{border-top-left-radius:0;border-top-right-radius:0;margin-top:calc(var(--sgds-nav-tabs-border-width)*-1)}@media (min-width:512px){.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:768px){.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1024px){.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1280px){.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}}@media (min-width:1440px){.navbar-expand-xxl .navbar-nav .dropdown-menu{position:absolute}}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.sgds.navbar .dropdown-menu.megamenu{left:0;right:0;width:100%}.sgds.combobox>.dropdown-menu{min-width:100%}`,Ji=Ze`.dropdown{display:flex;height:inherit;position:relative}`;class Ki extends Wi{constructor(){super(),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.menuRef=ft()}async _handleClick(){this.disabled||this.toggleMenu()}_handleCloseMenu(){const e=this._toggler[0];null==e||e.focus()}async connectedCallback(){super.connectedCallback(),this.addEventListener("sgds-hide",this._handleCloseMenu)}async disconnectedCallback(){this.removeEventListener("sgds-hide",this._handleCloseMenu)}async firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&await this.showMenu(),this._handleDisabled()}_handleDisabled(){const e=this._toggler[0];e&&(this.disabled?e.setAttribute("disabled","true"):e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}render(){return G`
81
81
  <div class="dropdown">
82
82
  <div
83
83
  class="toggler-container"