@govtechsg/sgds-web-component 3.15.1-rc.0 → 3.15.1-rc.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 (90) hide show
  1. package/components/Accordion/index.umd.min.js +3 -3
  2. package/components/Accordion/index.umd.min.js.map +1 -1
  3. package/components/Accordion/sgds-accordion-item.d.ts +3 -0
  4. package/components/Accordion/sgds-accordion-item.js +6 -1
  5. package/components/Accordion/sgds-accordion-item.js.map +1 -1
  6. package/components/Badge/index.umd.min.js +1 -1
  7. package/components/Badge/index.umd.min.js.map +1 -1
  8. package/components/Breadcrumb/index.umd.min.js +6 -6
  9. package/components/Breadcrumb/index.umd.min.js.map +1 -1
  10. package/components/ComboBox/index.umd.min.js +2 -2
  11. package/components/ComboBox/index.umd.min.js.map +1 -1
  12. package/components/Datepicker/index.umd.min.js +1 -1
  13. package/components/Datepicker/index.umd.min.js.map +1 -1
  14. package/components/Drawer/drawer.js +1 -1
  15. package/components/Drawer/index.umd.min.js +1 -1
  16. package/components/Drawer/index.umd.min.js.map +1 -1
  17. package/components/Dropdown/dropdown-menu.js +1 -1
  18. package/components/Dropdown/index.umd.min.js +1 -1
  19. package/components/Dropdown/index.umd.min.js.map +1 -1
  20. package/components/Mainnav/index.umd.min.js +9 -9
  21. package/components/Mainnav/index.umd.min.js.map +1 -1
  22. package/components/Mainnav/mainnav.js +1 -1
  23. package/components/Modal/index.umd.min.js +12 -12
  24. package/components/Modal/index.umd.min.js.map +1 -1
  25. package/components/Modal/modal.js +1 -1
  26. package/components/Modal/sgds-modal.d.ts +2 -0
  27. package/components/Modal/sgds-modal.js +13 -6
  28. package/components/Modal/sgds-modal.js.map +1 -1
  29. package/components/OverflowMenu/index.umd.min.js +6 -6
  30. package/components/OverflowMenu/index.umd.min.js.map +1 -1
  31. package/components/Select/index.umd.min.js +1 -1
  32. package/components/Select/index.umd.min.js.map +1 -1
  33. package/components/Subnav/index.umd.min.js +1 -1
  34. package/components/Subnav/index.umd.min.js.map +1 -1
  35. package/components/Subnav/subnav.js +1 -1
  36. package/components/Table/index.umd.min.js +2 -2
  37. package/components/Table/index.umd.min.js.map +1 -1
  38. package/components/Table/table-head.js +1 -1
  39. package/components/Table/table.js +1 -1
  40. package/components/Toast/index.umd.min.js +1 -1
  41. package/components/Toast/index.umd.min.js.map +1 -1
  42. package/components/Toast/toast-container.js +1 -1
  43. package/components/Tooltip/index.umd.min.js +1 -1
  44. package/components/Tooltip/index.umd.min.js.map +1 -1
  45. package/components/Tooltip/tooltip.js +1 -1
  46. package/components/index.umd.min.js +18 -18
  47. package/components/index.umd.min.js.map +1 -1
  48. package/css/utility.css +26 -4
  49. package/index.umd.min.js +18 -18
  50. package/index.umd.min.js.map +1 -1
  51. package/package.json +1 -1
  52. package/react/components/Accordion/sgds-accordion-item.cjs.js +6 -1
  53. package/react/components/Accordion/sgds-accordion-item.cjs.js.map +1 -1
  54. package/react/components/Accordion/sgds-accordion-item.js +6 -1
  55. package/react/components/Accordion/sgds-accordion-item.js.map +1 -1
  56. package/react/components/Drawer/drawer.cjs.js +1 -1
  57. package/react/components/Drawer/drawer.js +1 -1
  58. package/react/components/Dropdown/dropdown-menu.cjs.js +1 -1
  59. package/react/components/Dropdown/dropdown-menu.js +1 -1
  60. package/react/components/Mainnav/mainnav.cjs.js +1 -1
  61. package/react/components/Mainnav/mainnav.js +1 -1
  62. package/react/components/Modal/modal.cjs.js +1 -1
  63. package/react/components/Modal/modal.js +1 -1
  64. package/react/components/Modal/sgds-modal.cjs.js +12 -5
  65. package/react/components/Modal/sgds-modal.cjs.js.map +1 -1
  66. package/react/components/Modal/sgds-modal.js +13 -6
  67. package/react/components/Modal/sgds-modal.js.map +1 -1
  68. package/react/components/Subnav/subnav.cjs.js +1 -1
  69. package/react/components/Subnav/subnav.js +1 -1
  70. package/react/components/Table/table-head.cjs.js +1 -1
  71. package/react/components/Table/table-head.js +1 -1
  72. package/react/components/Table/table.cjs.js +1 -1
  73. package/react/components/Table/table.js +1 -1
  74. package/react/components/Toast/toast-container.cjs.js +1 -1
  75. package/react/components/Toast/toast-container.js +1 -1
  76. package/react/components/Tooltip/tooltip.cjs.js +1 -1
  77. package/react/components/Tooltip/tooltip.js +1 -1
  78. package/themes/blue.css +11 -0
  79. package/themes/cyan.css +11 -0
  80. package/themes/gt/blue.css +11 -0
  81. package/themes/gt/cyan.css +11 -0
  82. package/themes/gt/magenta.css +11 -0
  83. package/themes/gt/pink.css +11 -0
  84. package/themes/gt/purple.css +11 -0
  85. package/themes/gt/red.css +11 -0
  86. package/themes/magenta.css +11 -0
  87. package/themes/pink.css +11 -0
  88. package/themes/purple.css +11 -0
  89. package/themes/red.css +11 -0
  90. package/themes/root.css +25 -3
@@ -1,6 +1,6 @@
1
1
  import { css } from 'lit';
2
2
 
3
- var css_248z = css`.top-start{top:var(--toast-container-top)}.middle-start,.top-start{left:var(--toast-container-left)}.middle-start{top:50%;transform:translateY(-50%)}.middle-center{left:50%;top:50%;transform:translate(-50%,-50%)}.middle-end{right:var(--toast-container-right);top:50%;transform:translateY(-50%)}.toast-container{--toast-container-top:calc(108px + var(--sgds-spacer-8));--toast-container-right:var(--sgds-spacer-8);--toast-container-left:var(--sgds-spacer-8);--toast-container-bottom:var(--sgds-spacer-8);max-width:100%;pointer-events:none;position:fixed;width:max-content;z-index:1200}.top-center{left:50%;transform:translateX(-50%)}.top-center,.top-end{top:var(--toast-container-top)}.top-end{right:var(--toast-container-right)}.bottom-start{left:var(--toast-container-left)}.bottom-center,.bottom-start{bottom:var(--toast-container-bottom)}.bottom-center{left:50%;transform:translateX(-50%)}.bottom-end{bottom:var(--toast-container-bottom);right:var(--toast-container-right)}slot{display:flex;flex-direction:column;gap:.5rem}`;
3
+ var css_248z = css`.top-start{top:var(--toast-container-top)}.middle-start,.top-start{left:var(--toast-container-left)}.middle-start{top:50%;transform:translateY(-50%)}.middle-center{left:50%;top:50%;transform:translate(-50%,-50%)}.middle-end{right:var(--toast-container-right);top:50%;transform:translateY(-50%)}.toast-container{--toast-container-top:calc(108px + var(--sgds-spacer-8));--toast-container-right:var(--sgds-spacer-8);--toast-container-left:var(--sgds-spacer-8);--toast-container-bottom:var(--sgds-spacer-8);max-width:100%;pointer-events:none;position:fixed;width:max-content;z-index:var(--sgds-z-index-overlay)}.top-center{left:50%;transform:translateX(-50%)}.top-center,.top-end{top:var(--toast-container-top)}.top-end{right:var(--toast-container-right)}.bottom-start{left:var(--toast-container-left)}.bottom-center,.bottom-start{bottom:var(--toast-container-bottom)}.bottom-center{left:50%;transform:translateX(-50%)}.bottom-end{bottom:var(--toast-container-bottom);right:var(--toast-container-right)}slot{display:flex;gap:var(--sgds-layout-gap-md)}:host([position^=top]) slot{flex-direction:column-reverse}:host([position^=bottom]) slot{flex-direction:column}`;
4
4
 
5
5
  export { css_248z as default };
6
6
  //# sourceMappingURL=toast-container.js.map
@@ -48,7 +48,7 @@ window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch&&window.ShadyDOM.wrap;cons
48
48
  * @license
49
49
  * Copyright 2020 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
- */const Mt=()=>new Ut;class Ut{}const zt=new WeakMap;const Dt=(Wt=class extends Nt{render(t){return it}update(t,[e]){const i=e!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=e,this._context=t.options?.host,this._updateRefValue(this._element=t.element)),it}_updateRefValue(t){if(this.isConnected||(t=void 0),"function"==typeof this._ref){const e=this._context??globalThis;let i=zt.get(e);void 0===i&&(i=new WeakMap,zt.set(e,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,t),void 0!==t&&this._ref.call(this._context,t)}else this._ref.value=t}get _lastElementForRef(){return"function"==typeof this._ref?zt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}},(...t)=>({_$litDirective$:Wt,values:t}));var Wt;const It=["top","right","bottom","left"],Ft=Math.min,Bt=Math.max,Ht=Math.round,jt=Math.floor,qt=t=>({x:t,y:t}),Zt={left:"right",right:"left",bottom:"top",top:"bottom"},Jt={start:"end",end:"start"};function Yt(t,e,i){return Bt(t,Ft(e,i))}function Xt(t,e){return"function"==typeof t?t(e):t}function Gt(t){return t.split("-")[0]}function Kt(t){return t.split("-")[1]}function Qt(t){return"x"===t?"y":"x"}function te(t){return"y"===t?"height":"width"}const ee=new Set(["top","bottom"]);function ie(t){return ee.has(Gt(t))?"y":"x"}function ne(t){return Qt(ie(t))}function se(t,e,i){void 0===i&&(i=!1);const n=Kt(t),s=ne(t),o=te(s);let r="x"===s?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=he(r)),[r,he(r)]}function oe(t){return t.replace(/start|end/g,t=>Jt[t])}const re=["left","right"],ae=["right","left"],le=["top","bottom"],ce=["bottom","top"];function de(t,e,i,n){const s=Kt(t);let o=function(t,e,i){switch(t){case"top":case"bottom":return i?e?ae:re:e?re:ae;case"left":case"right":return e?le:ce;default:return[]}}(Gt(t),"start"===i,n);return s&&(o=o.map(t=>t+"-"+s),e&&(o=o.concat(o.map(oe)))),o}function he(t){return t.replace(/left|right|bottom|top/g,t=>Zt[t])}function ue(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function pe(t){const{x:e,y:i,width:n,height:s}=t;return{width:n,height:s,top:i,left:e,right:e+n,bottom:i+s,x:e,y:i}}function fe(t,e,i){let{reference:n,floating:s}=t;const o=ie(e),r=ne(e),a=te(r),l=Gt(e),c="y"===o,d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,u=n[a]/2-s[a]/2;let p;switch(l){case"top":p={x:d,y:n.y-s.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-s.width,y:h};break;default:p={x:n.x,y:n.y}}switch(Kt(e)){case"start":p[r]-=u*(i&&c?-1:1);break;case"end":p[r]+=u*(i&&c?-1:1)}return p}async function me(t,e){var i;void 0===e&&(e={});const{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=Xt(e,t),f=ue(p),m=a[u?"floating"===h?"reference":"floating":h],g=pe(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(m)))||i?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),y="floating"===h?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,_=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),v=await(null==o.isElement?void 0:o.isElement(_))&&await(null==o.getScale?void 0:o.getScale(_))||{x:1,y:1},b=pe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:_,strategy:l}):y);return{top:(g.top-b.top+f.top)/v.y,bottom:(b.bottom-g.bottom+f.bottom)/v.y,left:(g.left-b.left+f.left)/v.x,right:(b.right-g.right+f.right)/v.x}}function ge(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ye(t){return It.some(e=>t[e]>=0)}const _e=new Set(["left","top"]);function ve(){return"undefined"!=typeof window}function be(t){return $e(t)?(t.nodeName||"").toLowerCase():"#document"}function we(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function xe(t){var e;return null==(e=($e(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function $e(t){return!!ve()&&(t instanceof Node||t instanceof we(t).Node)}function Se(t){return!!ve()&&(t instanceof Element||t instanceof we(t).Element)}function Ee(t){return!!ve()&&(t instanceof HTMLElement||t instanceof we(t).HTMLElement)}function Pe(t){return!(!ve()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof we(t).ShadowRoot)}const Ce=new Set(["inline","contents"]);function Te(t){const{overflow:e,overflowX:i,overflowY:n,display:s}=We(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!Ce.has(s)}const ke=new Set(["table","td","th"]);function Re(t){return ke.has(be(t))}const Oe=[":popover-open",":modal"];function Ve(t){return Oe.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const Ae=["transform","translate","scale","rotate","perspective"],Le=["transform","translate","scale","rotate","perspective","filter"],Ne=["paint","layout","strict","content"];function Me(t){const e=Ue(),i=Se(t)?We(t):t;return Ae.some(t=>!!i[t]&&"none"!==i[t])||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||Le.some(t=>(i.willChange||"").includes(t))||Ne.some(t=>(i.contain||"").includes(t))}function Ue(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ze=new Set(["html","body","#document"]);function De(t){return ze.has(be(t))}function We(t){return we(t).getComputedStyle(t)}function Ie(t){return Se(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fe(t){if("html"===be(t))return t;const e=t.assignedSlot||t.parentNode||Pe(t)&&t.host||xe(t);return Pe(e)?e.host:e}function Be(t){const e=Fe(t);return De(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ee(e)&&Te(e)?e:Be(e)}function He(t,e,i){var n;void 0===e&&(e=[]),void 0===i&&(i=!0);const s=Be(t),o=s===(null==(n=t.ownerDocument)?void 0:n.body),r=we(s);if(o){const t=je(r);return e.concat(r,r.visualViewport||[],Te(s)?s:[],t&&i?He(t):[])}return e.concat(s,He(s,[],i))}function je(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function qe(t){const e=We(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Ee(t),o=s?t.offsetWidth:i,r=s?t.offsetHeight:n,a=Ht(i)!==o||Ht(n)!==r;return a&&(i=o,n=r),{width:i,height:n,$:a}}function Ze(t){return Se(t)?t:t.contextElement}function Je(t){const e=Ze(t);if(!Ee(e))return qt(1);const i=e.getBoundingClientRect(),{width:n,height:s,$:o}=qe(e);let r=(o?Ht(i.width):i.width)/n,a=(o?Ht(i.height):i.height)/s;return r&&Number.isFinite(r)||(r=1),a&&Number.isFinite(a)||(a=1),{x:r,y:a}}const Ye=qt(0);function Xe(t){const e=we(t);return Ue()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Ye}function Ge(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1);const s=t.getBoundingClientRect(),o=Ze(t);let r=qt(1);e&&(n?Se(n)&&(r=Je(n)):r=Je(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==we(t))&&e}(o,i,n)?Xe(o):qt(0);let l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,d=s.width/r.x,h=s.height/r.y;if(o){const t=we(o),e=n&&Se(n)?we(n):n;let i=t,s=je(i);for(;s&&n&&e!==i;){const t=Je(s),e=s.getBoundingClientRect(),n=We(s),o=e.left+(s.clientLeft+parseFloat(n.paddingLeft))*t.x,r=e.top+(s.clientTop+parseFloat(n.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,h*=t.y,l+=o,c+=r,i=we(s),s=je(i)}}return pe({width:d,height:h,x:l,y:c})}function Ke(t,e){const i=Ie(t).scrollLeft;return e?e.left+i:Ge(xe(t)).left+i}function Qe(t,e){const i=t.getBoundingClientRect();return{x:i.left+e.scrollLeft-Ke(t,i),y:i.top+e.scrollTop}}const ti=new Set(["absolute","fixed"]);function ei(t,e,i){let n;if("viewport"===e)n=function(t,e){const i=we(t),n=xe(t),s=i.visualViewport;let o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;const t=Ue();(!t||t&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}const c=Ke(n);if(c<=0){const t=n.ownerDocument,e=t.body,i=getComputedStyle(e),s="CSS1Compat"===t.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,r=Math.abs(n.clientWidth-e.clientWidth-s);r<=25&&(o-=r)}else c<=25&&(o+=c);return{width:o,height:r,x:a,y:l}}(t,i);else if("document"===e)n=function(t){const e=xe(t),i=Ie(t),n=t.ownerDocument.body,s=Bt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Bt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+Ke(t);const a=-i.scrollTop;return"rtl"===We(n).direction&&(r+=Bt(e.clientWidth,n.clientWidth)-s),{width:s,height:o,x:r,y:a}}(xe(t));else if(Se(e))n=function(t,e){const i=Ge(t,!0,"fixed"===e),n=i.top+t.clientTop,s=i.left+t.clientLeft,o=Ee(t)?Je(t):qt(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:s*o.x,y:n*o.y}}(e,i);else{const i=Xe(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return pe(n)}function ii(t,e){const i=Fe(t);return!(i===e||!Se(i)||De(i))&&("fixed"===We(i).position||ii(i,e))}function ni(t,e,i){const n=Ee(e),s=xe(e),o="fixed"===i,r=Ge(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=qt(0);function c(){l.x=Ke(s)}if(n||!n&&!o)if(("body"!==be(e)||Te(s))&&(a=Ie(e)),n){const t=Ge(e,!0,o,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&c();o&&!n&&s&&c();const d=!s||n||o?qt(0):Qe(s,a);return{x:r.left+a.scrollLeft-l.x-d.x,y:r.top+a.scrollTop-l.y-d.y,width:r.width,height:r.height}}function si(t){return"static"===We(t).position}function oi(t,e){if(!Ee(t)||"fixed"===We(t).position)return null;if(e)return e(t);let i=t.offsetParent;return xe(t)===i&&(i=i.ownerDocument.body),i}function ri(t,e){const i=we(t);if(Ve(t))return i;if(!Ee(t)){let e=Fe(t);for(;e&&!De(e);){if(Se(e)&&!si(e))return e;e=Fe(e)}return i}let n=oi(t,e);for(;n&&Re(n)&&si(n);)n=oi(n,e);return n&&De(n)&&si(n)&&!Me(n)?i:n||function(t){let e=Fe(t);for(;Ee(e)&&!De(e);){if(Me(e))return e;if(Ve(e))return null;e=Fe(e)}return null}(t)||i}const ai={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:n,strategy:s}=t;const o="fixed"===s,r=xe(n),a=!!e&&Ve(e.floating);if(n===r||a&&o)return i;let l={scrollLeft:0,scrollTop:0},c=qt(1);const d=qt(0),h=Ee(n);if((h||!h&&!o)&&(("body"!==be(n)||Te(r))&&(l=Ie(n)),Ee(n))){const t=Ge(n);c=Je(n),d.x=t.x+n.clientLeft,d.y=t.y+n.clientTop}const u=!r||h||o?qt(0):Qe(r,l);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+d.x+u.x,y:i.y*c.y-l.scrollTop*c.y+d.y+u.y}},getDocumentElement:xe,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:s}=t;const o=[..."clippingAncestors"===i?Ve(e)?[]:function(t,e){const i=e.get(t);if(i)return i;let n=He(t,[],!1).filter(t=>Se(t)&&"body"!==be(t)),s=null;const o="fixed"===We(t).position;let r=o?Fe(t):t;for(;Se(r)&&!De(r);){const e=We(r),i=Me(r);i||"fixed"!==e.position||(s=null),(o?!i&&!s:!i&&"static"===e.position&&s&&ti.has(s.position)||Te(r)&&!i&&ii(t,r))?n=n.filter(t=>t!==r):s=e,r=Fe(r)}return e.set(t,n),n}(e,this._c):[].concat(i),n],r=o[0],a=o.reduce((t,i)=>{const n=ei(e,i,s);return t.top=Bt(n.top,t.top),t.right=Ft(n.right,t.right),t.bottom=Ft(n.bottom,t.bottom),t.left=Bt(n.left,t.left),t},ei(e,r,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ri,getElementRects:async function(t){const e=this.getOffsetParent||ri,i=this.getDimensions,n=await i(t.floating);return{reference:ni(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=qe(t);return{width:e,height:i}},getScale:Je,isElement:Se,isRTL:function(t){return"rtl"===We(t).direction}};function li(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ci(t,e,i,n){void 0===n&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Ze(t),d=s||o?[...c?He(c):[],...He(e)]:[];d.forEach(t=>{s&&t.addEventListener("scroll",i,{passive:!0}),o&&t.addEventListener("resize",i)});const h=c&&a?function(t,e){let i,n=null;const s=xe(t);function o(){var t;clearTimeout(i),null==(t=n)||t.disconnect(),n=null}return function r(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const c=t.getBoundingClientRect(),{left:d,top:h,width:u,height:p}=c;if(a||e(),!u||!p)return;const f={rootMargin:-jt(h)+"px "+-jt(s.clientWidth-(d+u))+"px "+-jt(s.clientHeight-(h+p))+"px "+-jt(d)+"px",threshold:Bt(0,Ft(1,l))||1};let m=!0;function g(e){const n=e[0].intersectionRatio;if(n!==l){if(!m)return r();n?r(!1,n):i=setTimeout(()=>{r(!1,1e-7)},1e3)}1!==n||li(c,t.getBoundingClientRect())||r(),m=!1}try{n=new IntersectionObserver(g,{...f,root:s.ownerDocument})}catch(t){n=new IntersectionObserver(g,f)}n.observe(t)}(!0),o}(c,i):null;let u,p=-1,f=null;r&&(f=new ResizeObserver(t=>{let[n]=t;n&&n.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var t;null==(t=f)||t.observe(e)})),i()}),c&&!l&&f.observe(c),f.observe(e));let m=l?Ge(t):null;return l&&function e(){const n=Ge(t);m&&!li(m,n)&&i();m=n,u=requestAnimationFrame(e)}(),i(),()=>{var t;d.forEach(t=>{s&&t.removeEventListener("scroll",i),o&&t.removeEventListener("resize",i)}),null==h||h(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(u)}}const di=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,n;const{x:s,y:o,placement:r,middlewareData:a}=e,l=await async function(t,e){const{placement:i,platform:n,elements:s}=t,o=await(null==n.isRTL?void 0:n.isRTL(s.floating)),r=Gt(i),a=Kt(i),l="y"===ie(i),c=_e.has(r)?-1:1,d=o&&l?-1:1,h=Xt(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*d,y:u*c}:{x:u*c,y:p*d}}(e,t);return r===(null==(i=a.offset)?void 0:i.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},hi=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:s}=e,{mainAxis:o=!0,crossAxis:r=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=Xt(t,e),c={x:i,y:n},d=await me(e,l),h=ie(Gt(s)),u=Qt(h);let p=c[u],f=c[h];if(o){const t="y"===u?"bottom":"right";p=Yt(p+d["y"===u?"top":"left"],p,p-d[t])}if(r){const t="y"===h?"bottom":"right";f=Yt(f+d["y"===h?"top":"left"],f,f-d[t])}const m=a.fn({...e,[u]:p,[h]:f});return{...m,data:{x:m.x-i,y:m.y-n,enabled:{[u]:o,[h]:r}}}}}},ui=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=Xt(t,e);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const y=Gt(s),_=ie(a),v=Gt(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=u||(v||!m?[he(a)]:function(t){const e=he(t);return[oe(t),e,oe(e)]}(a)),x="none"!==f;!u&&x&&w.push(...de(a,m,f,b));const $=[a,...w],S=await me(e,g),E=[];let P=(null==(n=o.flip)?void 0:n.overflows)||[];if(d&&E.push(S[y]),h){const t=se(s,r,b);E.push(S[t[0]],S[t[1]])}if(P=[...P,{placement:s,overflows:E}],!E.every(t=>t<=0)){var C,T;const t=((null==(C=o.flip)?void 0:C.index)||0)+1,e=$[t];if(e){if(!("alignment"===h&&_!==ie(e))||P.every(t=>ie(t.placement)!==_||t.overflows[0]>0))return{data:{index:t,overflows:P},reset:{placement:e}}}let i=null==(T=P.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:T.placement;if(!i)switch(p){case"bestFit":{var k;const t=null==(k=P.filter(t=>{if(x){const e=ie(t.placement);return e===_||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:k[0];t&&(i=t);break}case"initialPlacement":i=a}if(s!==i)return{reset:{placement:i}}}return{}}}},pi=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:i}=e,{strategy:n="referenceHidden",...s}=Xt(t,e);switch(n){case"referenceHidden":{const t=ge(await me(e,{...s,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:ye(t)}}}case"escaped":{const t=ge(await me(e,{...s,altBoundary:!0}),i.floating);return{data:{escapedOffsets:t,escaped:ye(t)}}}default:return{}}}}},fi=(t,e,i)=>{const n=new Map,s={platform:ai,...i},o={...s.platform,_c:n};return(async(t,e,i)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=i,a=o.filter(Boolean),l=await(null==r.isRTL?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:h}=fe(c,n,l),u=n,p={},f=0;for(let i=0;i<a.length;i++){const{name:o,fn:m}=a[i],{x:g,y:y,data:_,reset:v}=await m({x:d,y:h,initialPlacement:n,placement:u,strategy:s,middlewareData:p,rects:c,platform:r,elements:{reference:t,floating:e}});d=null!=g?g:d,h=null!=y?y:h,p={...p,[o]:{...p[o],..._}},v&&f<=50&&(f++,"object"==typeof v&&(v.placement&&(u=v.placement),v.rects&&(c=!0===v.rects?await r.getElementRects({reference:t,floating:e,strategy:s}):v.rects),({x:d,y:h}=fe(c,u,l))),i=-1)}return{x:d,y:h,placement:u,strategy:s,middlewareData:p}})(t,e,{...s,platform:o})};var mi=r`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class gi extends bt{emit(t,e){const i=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(i),i}static define(t,e=this,i={}){if(customElements.get(t));else try{customElements.define(t,e,i)}catch(n){customElements.define(t,class extends e{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([t,e])=>{this.constructor.define(t,e)})}firstUpdated(t){var e;super.firstUpdated(t),this.ssr&&(null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("slot").forEach(t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}gi.styles=[mi],gi.dependencies={},t([Pt({type:Boolean,reflect:!0})],gi.prototype,"ssr",void 0);var yi,_i,vi,bi=r`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-14);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:900}div{max-width:fit-content}`;class wi extends gi{constructor(){super(...arguments),this._myTooltip=Mt(),this._tooltipBubble=Mt(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=t=>{this.open&&(t.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(t){super.firstUpdated(t),this._tooltipTargetElements.forEach(t=>{t.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(t.addEventListener("mouseenter",()=>this.show()),t.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(t.addEventListener("focus",()=>this.show()),t.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&t.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(t=>t.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:t,y:e,placement:i,strategy:n,middlewareData:s}=await fi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[di(8),ui(),hi(),pi()]});this._tooltipBubble.value.setAttribute("data-placement",i),Object.assign(this._tooltipBubble.value.style,{position:n,left:`${t}px`,top:`${e}px`});const{referenceHidden:o,escaped:r}=s.hide||{};this._tooltipBubble.value.style.visibility=o||r?"hidden":"visible"}async show(){this.open||(this.open=!0,this.emit("sgds-show"),await this.updateComplete,await this.updateFloatingPosition(),this._myTooltip.value&&this._tooltipBubble.value&&(this._cleanupAutoUpdate=ci(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return Q`
51
+ */const Mt=()=>new Ut;class Ut{}const zt=new WeakMap;const Dt=(Wt=class extends Nt{render(t){return it}update(t,[e]){const i=e!==this._ref;return i&&void 0!==this._ref&&this._updateRefValue(void 0),(i||this._lastElementForRef!==this._element)&&(this._ref=e,this._context=t.options?.host,this._updateRefValue(this._element=t.element)),it}_updateRefValue(t){if(this.isConnected||(t=void 0),"function"==typeof this._ref){const e=this._context??globalThis;let i=zt.get(e);void 0===i&&(i=new WeakMap,zt.set(e,i)),void 0!==i.get(this._ref)&&this._ref.call(this._context,void 0),i.set(this._ref,t),void 0!==t&&this._ref.call(this._context,t)}else this._ref.value=t}get _lastElementForRef(){return"function"==typeof this._ref?zt.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){this._lastElementForRef===this._element&&this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}},(...t)=>({_$litDirective$:Wt,values:t}));var Wt;const It=["top","right","bottom","left"],Ft=Math.min,Bt=Math.max,Ht=Math.round,jt=Math.floor,qt=t=>({x:t,y:t}),Zt={left:"right",right:"left",bottom:"top",top:"bottom"},Jt={start:"end",end:"start"};function Yt(t,e,i){return Bt(t,Ft(e,i))}function Xt(t,e){return"function"==typeof t?t(e):t}function Gt(t){return t.split("-")[0]}function Kt(t){return t.split("-")[1]}function Qt(t){return"x"===t?"y":"x"}function te(t){return"y"===t?"height":"width"}const ee=new Set(["top","bottom"]);function ie(t){return ee.has(Gt(t))?"y":"x"}function ne(t){return Qt(ie(t))}function se(t,e,i){void 0===i&&(i=!1);const n=Kt(t),s=ne(t),o=te(s);let r="x"===s?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=he(r)),[r,he(r)]}function oe(t){return t.replace(/start|end/g,t=>Jt[t])}const re=["left","right"],ae=["right","left"],le=["top","bottom"],ce=["bottom","top"];function de(t,e,i,n){const s=Kt(t);let o=function(t,e,i){switch(t){case"top":case"bottom":return i?e?ae:re:e?re:ae;case"left":case"right":return e?le:ce;default:return[]}}(Gt(t),"start"===i,n);return s&&(o=o.map(t=>t+"-"+s),e&&(o=o.concat(o.map(oe)))),o}function he(t){return t.replace(/left|right|bottom|top/g,t=>Zt[t])}function ue(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function pe(t){const{x:e,y:i,width:n,height:s}=t;return{width:n,height:s,top:i,left:e,right:e+n,bottom:i+s,x:e,y:i}}function fe(t,e,i){let{reference:n,floating:s}=t;const o=ie(e),r=ne(e),a=te(r),l=Gt(e),c="y"===o,d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,u=n[a]/2-s[a]/2;let p;switch(l){case"top":p={x:d,y:n.y-s.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:h};break;case"left":p={x:n.x-s.width,y:h};break;default:p={x:n.x,y:n.y}}switch(Kt(e)){case"start":p[r]-=u*(i&&c?-1:1);break;case"end":p[r]+=u*(i&&c?-1:1)}return p}async function me(t,e){var i;void 0===e&&(e={});const{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=Xt(e,t),f=ue(p),m=a[u?"floating"===h?"reference":"floating":h],g=pe(await o.getClippingRect({element:null==(i=await(null==o.isElement?void 0:o.isElement(m)))||i?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),y="floating"===h?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,_=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),v=await(null==o.isElement?void 0:o.isElement(_))&&await(null==o.getScale?void 0:o.getScale(_))||{x:1,y:1},b=pe(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:_,strategy:l}):y);return{top:(g.top-b.top+f.top)/v.y,bottom:(b.bottom-g.bottom+f.bottom)/v.y,left:(g.left-b.left+f.left)/v.x,right:(b.right-g.right+f.right)/v.x}}function ge(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ye(t){return It.some(e=>t[e]>=0)}const _e=new Set(["left","top"]);function ve(){return"undefined"!=typeof window}function be(t){return $e(t)?(t.nodeName||"").toLowerCase():"#document"}function we(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function xe(t){var e;return null==(e=($e(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function $e(t){return!!ve()&&(t instanceof Node||t instanceof we(t).Node)}function Se(t){return!!ve()&&(t instanceof Element||t instanceof we(t).Element)}function Ee(t){return!!ve()&&(t instanceof HTMLElement||t instanceof we(t).HTMLElement)}function Pe(t){return!(!ve()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof we(t).ShadowRoot)}const Ce=new Set(["inline","contents"]);function Te(t){const{overflow:e,overflowX:i,overflowY:n,display:s}=We(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!Ce.has(s)}const ke=new Set(["table","td","th"]);function Re(t){return ke.has(be(t))}const Oe=[":popover-open",":modal"];function Ve(t){return Oe.some(e=>{try{return t.matches(e)}catch(t){return!1}})}const Ae=["transform","translate","scale","rotate","perspective"],Le=["transform","translate","scale","rotate","perspective","filter"],Ne=["paint","layout","strict","content"];function Me(t){const e=Ue(),i=Se(t)?We(t):t;return Ae.some(t=>!!i[t]&&"none"!==i[t])||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||Le.some(t=>(i.willChange||"").includes(t))||Ne.some(t=>(i.contain||"").includes(t))}function Ue(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ze=new Set(["html","body","#document"]);function De(t){return ze.has(be(t))}function We(t){return we(t).getComputedStyle(t)}function Ie(t){return Se(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fe(t){if("html"===be(t))return t;const e=t.assignedSlot||t.parentNode||Pe(t)&&t.host||xe(t);return Pe(e)?e.host:e}function Be(t){const e=Fe(t);return De(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ee(e)&&Te(e)?e:Be(e)}function He(t,e,i){var n;void 0===e&&(e=[]),void 0===i&&(i=!0);const s=Be(t),o=s===(null==(n=t.ownerDocument)?void 0:n.body),r=we(s);if(o){const t=je(r);return e.concat(r,r.visualViewport||[],Te(s)?s:[],t&&i?He(t):[])}return e.concat(s,He(s,[],i))}function je(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function qe(t){const e=We(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Ee(t),o=s?t.offsetWidth:i,r=s?t.offsetHeight:n,a=Ht(i)!==o||Ht(n)!==r;return a&&(i=o,n=r),{width:i,height:n,$:a}}function Ze(t){return Se(t)?t:t.contextElement}function Je(t){const e=Ze(t);if(!Ee(e))return qt(1);const i=e.getBoundingClientRect(),{width:n,height:s,$:o}=qe(e);let r=(o?Ht(i.width):i.width)/n,a=(o?Ht(i.height):i.height)/s;return r&&Number.isFinite(r)||(r=1),a&&Number.isFinite(a)||(a=1),{x:r,y:a}}const Ye=qt(0);function Xe(t){const e=we(t);return Ue()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Ye}function Ge(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1);const s=t.getBoundingClientRect(),o=Ze(t);let r=qt(1);e&&(n?Se(n)&&(r=Je(n)):r=Je(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==we(t))&&e}(o,i,n)?Xe(o):qt(0);let l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,d=s.width/r.x,h=s.height/r.y;if(o){const t=we(o),e=n&&Se(n)?we(n):n;let i=t,s=je(i);for(;s&&n&&e!==i;){const t=Je(s),e=s.getBoundingClientRect(),n=We(s),o=e.left+(s.clientLeft+parseFloat(n.paddingLeft))*t.x,r=e.top+(s.clientTop+parseFloat(n.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,h*=t.y,l+=o,c+=r,i=we(s),s=je(i)}}return pe({width:d,height:h,x:l,y:c})}function Ke(t,e){const i=Ie(t).scrollLeft;return e?e.left+i:Ge(xe(t)).left+i}function Qe(t,e){const i=t.getBoundingClientRect();return{x:i.left+e.scrollLeft-Ke(t,i),y:i.top+e.scrollTop}}const ti=new Set(["absolute","fixed"]);function ei(t,e,i){let n;if("viewport"===e)n=function(t,e){const i=we(t),n=xe(t),s=i.visualViewport;let o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;const t=Ue();(!t||t&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}const c=Ke(n);if(c<=0){const t=n.ownerDocument,e=t.body,i=getComputedStyle(e),s="CSS1Compat"===t.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,r=Math.abs(n.clientWidth-e.clientWidth-s);r<=25&&(o-=r)}else c<=25&&(o+=c);return{width:o,height:r,x:a,y:l}}(t,i);else if("document"===e)n=function(t){const e=xe(t),i=Ie(t),n=t.ownerDocument.body,s=Bt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Bt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+Ke(t);const a=-i.scrollTop;return"rtl"===We(n).direction&&(r+=Bt(e.clientWidth,n.clientWidth)-s),{width:s,height:o,x:r,y:a}}(xe(t));else if(Se(e))n=function(t,e){const i=Ge(t,!0,"fixed"===e),n=i.top+t.clientTop,s=i.left+t.clientLeft,o=Ee(t)?Je(t):qt(1);return{width:t.clientWidth*o.x,height:t.clientHeight*o.y,x:s*o.x,y:n*o.y}}(e,i);else{const i=Xe(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return pe(n)}function ii(t,e){const i=Fe(t);return!(i===e||!Se(i)||De(i))&&("fixed"===We(i).position||ii(i,e))}function ni(t,e,i){const n=Ee(e),s=xe(e),o="fixed"===i,r=Ge(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=qt(0);function c(){l.x=Ke(s)}if(n||!n&&!o)if(("body"!==be(e)||Te(s))&&(a=Ie(e)),n){const t=Ge(e,!0,o,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else s&&c();o&&!n&&s&&c();const d=!s||n||o?qt(0):Qe(s,a);return{x:r.left+a.scrollLeft-l.x-d.x,y:r.top+a.scrollTop-l.y-d.y,width:r.width,height:r.height}}function si(t){return"static"===We(t).position}function oi(t,e){if(!Ee(t)||"fixed"===We(t).position)return null;if(e)return e(t);let i=t.offsetParent;return xe(t)===i&&(i=i.ownerDocument.body),i}function ri(t,e){const i=we(t);if(Ve(t))return i;if(!Ee(t)){let e=Fe(t);for(;e&&!De(e);){if(Se(e)&&!si(e))return e;e=Fe(e)}return i}let n=oi(t,e);for(;n&&Re(n)&&si(n);)n=oi(n,e);return n&&De(n)&&si(n)&&!Me(n)?i:n||function(t){let e=Fe(t);for(;Ee(e)&&!De(e);){if(Me(e))return e;if(Ve(e))return null;e=Fe(e)}return null}(t)||i}const ai={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:n,strategy:s}=t;const o="fixed"===s,r=xe(n),a=!!e&&Ve(e.floating);if(n===r||a&&o)return i;let l={scrollLeft:0,scrollTop:0},c=qt(1);const d=qt(0),h=Ee(n);if((h||!h&&!o)&&(("body"!==be(n)||Te(r))&&(l=Ie(n)),Ee(n))){const t=Ge(n);c=Je(n),d.x=t.x+n.clientLeft,d.y=t.y+n.clientTop}const u=!r||h||o?qt(0):Qe(r,l);return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+d.x+u.x,y:i.y*c.y-l.scrollTop*c.y+d.y+u.y}},getDocumentElement:xe,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:s}=t;const o=[..."clippingAncestors"===i?Ve(e)?[]:function(t,e){const i=e.get(t);if(i)return i;let n=He(t,[],!1).filter(t=>Se(t)&&"body"!==be(t)),s=null;const o="fixed"===We(t).position;let r=o?Fe(t):t;for(;Se(r)&&!De(r);){const e=We(r),i=Me(r);i||"fixed"!==e.position||(s=null),(o?!i&&!s:!i&&"static"===e.position&&s&&ti.has(s.position)||Te(r)&&!i&&ii(t,r))?n=n.filter(t=>t!==r):s=e,r=Fe(r)}return e.set(t,n),n}(e,this._c):[].concat(i),n],r=o[0],a=o.reduce((t,i)=>{const n=ei(e,i,s);return t.top=Bt(n.top,t.top),t.right=Ft(n.right,t.right),t.bottom=Ft(n.bottom,t.bottom),t.left=Bt(n.left,t.left),t},ei(e,r,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:ri,getElementRects:async function(t){const e=this.getOffsetParent||ri,i=this.getDimensions,n=await i(t.floating);return{reference:ni(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=qe(t);return{width:e,height:i}},getScale:Je,isElement:Se,isRTL:function(t){return"rtl"===We(t).direction}};function li(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ci(t,e,i,n){void 0===n&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Ze(t),d=s||o?[...c?He(c):[],...He(e)]:[];d.forEach(t=>{s&&t.addEventListener("scroll",i,{passive:!0}),o&&t.addEventListener("resize",i)});const h=c&&a?function(t,e){let i,n=null;const s=xe(t);function o(){var t;clearTimeout(i),null==(t=n)||t.disconnect(),n=null}return function r(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),o();const c=t.getBoundingClientRect(),{left:d,top:h,width:u,height:p}=c;if(a||e(),!u||!p)return;const f={rootMargin:-jt(h)+"px "+-jt(s.clientWidth-(d+u))+"px "+-jt(s.clientHeight-(h+p))+"px "+-jt(d)+"px",threshold:Bt(0,Ft(1,l))||1};let m=!0;function g(e){const n=e[0].intersectionRatio;if(n!==l){if(!m)return r();n?r(!1,n):i=setTimeout(()=>{r(!1,1e-7)},1e3)}1!==n||li(c,t.getBoundingClientRect())||r(),m=!1}try{n=new IntersectionObserver(g,{...f,root:s.ownerDocument})}catch(t){n=new IntersectionObserver(g,f)}n.observe(t)}(!0),o}(c,i):null;let u,p=-1,f=null;r&&(f=new ResizeObserver(t=>{let[n]=t;n&&n.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var t;null==(t=f)||t.observe(e)})),i()}),c&&!l&&f.observe(c),f.observe(e));let m=l?Ge(t):null;return l&&function e(){const n=Ge(t);m&&!li(m,n)&&i();m=n,u=requestAnimationFrame(e)}(),i(),()=>{var t;d.forEach(t=>{s&&t.removeEventListener("scroll",i),o&&t.removeEventListener("resize",i)}),null==h||h(),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(u)}}const di=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,n;const{x:s,y:o,placement:r,middlewareData:a}=e,l=await async function(t,e){const{placement:i,platform:n,elements:s}=t,o=await(null==n.isRTL?void 0:n.isRTL(s.floating)),r=Gt(i),a=Kt(i),l="y"===ie(i),c=_e.has(r)?-1:1,d=o&&l?-1:1,h=Xt(e,t);let{mainAxis:u,crossAxis:p,alignmentAxis:f}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*d,y:u*c}:{x:u*c,y:p*d}}(e,t);return r===(null==(i=a.offset)?void 0:i.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},hi=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:s}=e,{mainAxis:o=!0,crossAxis:r=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=Xt(t,e),c={x:i,y:n},d=await me(e,l),h=ie(Gt(s)),u=Qt(h);let p=c[u],f=c[h];if(o){const t="y"===u?"bottom":"right";p=Yt(p+d["y"===u?"top":"left"],p,p-d[t])}if(r){const t="y"===h?"bottom":"right";f=Yt(f+d["y"===h?"top":"left"],f,f-d[t])}const m=a.fn({...e,[u]:p,[h]:f});return{...m,data:{x:m.x-i,y:m.y-n,enabled:{[u]:o,[h]:r}}}}}},ui=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=Xt(t,e);if(null!=(i=o.arrow)&&i.alignmentOffset)return{};const y=Gt(s),_=ie(a),v=Gt(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=u||(v||!m?[he(a)]:function(t){const e=he(t);return[oe(t),e,oe(e)]}(a)),x="none"!==f;!u&&x&&w.push(...de(a,m,f,b));const $=[a,...w],S=await me(e,g),E=[];let P=(null==(n=o.flip)?void 0:n.overflows)||[];if(d&&E.push(S[y]),h){const t=se(s,r,b);E.push(S[t[0]],S[t[1]])}if(P=[...P,{placement:s,overflows:E}],!E.every(t=>t<=0)){var C,T;const t=((null==(C=o.flip)?void 0:C.index)||0)+1,e=$[t];if(e){if(!("alignment"===h&&_!==ie(e))||P.every(t=>ie(t.placement)!==_||t.overflows[0]>0))return{data:{index:t,overflows:P},reset:{placement:e}}}let i=null==(T=P.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:T.placement;if(!i)switch(p){case"bestFit":{var k;const t=null==(k=P.filter(t=>{if(x){const e=ie(t.placement);return e===_||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:k[0];t&&(i=t);break}case"initialPlacement":i=a}if(s!==i)return{reset:{placement:i}}}return{}}}},pi=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:i}=e,{strategy:n="referenceHidden",...s}=Xt(t,e);switch(n){case"referenceHidden":{const t=ge(await me(e,{...s,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:ye(t)}}}case"escaped":{const t=ge(await me(e,{...s,altBoundary:!0}),i.floating);return{data:{escapedOffsets:t,escaped:ye(t)}}}default:return{}}}}},fi=(t,e,i)=>{const n=new Map,s={platform:ai,...i},o={...s.platform,_c:n};return(async(t,e,i)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=i,a=o.filter(Boolean),l=await(null==r.isRTL?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:h}=fe(c,n,l),u=n,p={},f=0;for(let i=0;i<a.length;i++){const{name:o,fn:m}=a[i],{x:g,y:y,data:_,reset:v}=await m({x:d,y:h,initialPlacement:n,placement:u,strategy:s,middlewareData:p,rects:c,platform:r,elements:{reference:t,floating:e}});d=null!=g?g:d,h=null!=y?y:h,p={...p,[o]:{...p[o],..._}},v&&f<=50&&(f++,"object"==typeof v&&(v.placement&&(u=v.placement),v.rects&&(c=!0===v.rects?await r.getElementRects({reference:t,floating:e,strategy:s}):v.rects),({x:d,y:h}=fe(c,u,l))),i=-1)}return{x:d,y:h,placement:u,strategy:s,middlewareData:p}})(t,e,{...s,platform:o})};var mi=r`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-16);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:1em;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:top;width:1em}::slotted(svg){vertical-align:middle}}`;class gi extends bt{emit(t,e){const i=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(i),i}static define(t,e=this,i={}){if(customElements.get(t));else try{customElements.define(t,e,i)}catch(n){customElements.define(t,class extends e{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach(([t,e])=>{this.constructor.define(t,e)})}firstUpdated(t){var e;super.firstUpdated(t),this.ssr&&(null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("slot").forEach(t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}))}}gi.styles=[mi],gi.dependencies={},t([Pt({type:Boolean,reflect:!0})],gi.prototype,"ssr",void 0);var yi,_i,vi,bi=r`:host{display:contents}.tooltip-placeholder{display:inline-block;max-width:100%}.tooltip{word-wrap:break-word;background-color:var(--sgds-surface-fixed-dark);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);color:var(--sgds-color-fixed-light);display:block;font-size:var(--sgds-font-size-14);line-break:auto;max-width:var(--sgds-dimension-320);padding:var(--sgds-padding-xs) var(--sgds-padding-sm);text-align:left;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;z-index:var(--sgds-z-index-overlay)}div{max-width:fit-content}`;class wi extends gi{constructor(){super(...arguments),this._myTooltip=Mt(),this._tooltipBubble=Mt(),this.content="",this.placement="top",this.trigger="hover focus",this.open=!1,this._handleClickOutOfElement=t=>{this.open&&(t.composedPath().includes(this)||this.hide())}}connectedCallback(){super.connectedCallback(),this.trigger.includes("click")&&document.addEventListener("click",this._handleClickOutOfElement)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(t){super.firstUpdated(t),this._tooltipTargetElements.forEach(t=>{t.setAttribute("data-sgds-tooltip",this.content),this.trigger.includes("hover")&&(t.addEventListener("mouseenter",()=>this.show()),t.addEventListener("mouseleave",()=>this.hide())),this.trigger.includes("focus")&&(t.addEventListener("focus",()=>this.show()),t.addEventListener("blur",()=>this.hide())),"click"===this.trigger&&t.addEventListener("click",()=>this.toggle())})}_handleSlotChange(){this._tooltipTargetElements.forEach(t=>t.setAttribute("data-sgds-tooltip",this.content))}async updateFloatingPosition(){if(!this._myTooltip.value||!this._tooltipBubble.value)return;const{x:t,y:e,placement:i,strategy:n,middlewareData:s}=await fi(this._tooltipTargetElements[0],this._tooltipBubble.value,{strategy:"fixed",placement:this.placement,middleware:[di(8),ui(),hi(),pi()]});this._tooltipBubble.value.setAttribute("data-placement",i),Object.assign(this._tooltipBubble.value.style,{position:n,left:`${t}px`,top:`${e}px`});const{referenceHidden:o,escaped:r}=s.hide||{};this._tooltipBubble.value.style.visibility=o||r?"hidden":"visible"}async show(){this.open||(this.open=!0,this.emit("sgds-show"),await this.updateComplete,await this.updateFloatingPosition(),this._myTooltip.value&&this._tooltipBubble.value&&(this._cleanupAutoUpdate=ci(this._tooltipTargetElements[0],this._tooltipBubble.value,()=>this.updateFloatingPosition())),this.emit("sgds-after-show"))}hide(){this.open&&(this.emit("sgds-hide"),this.open=!1,this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0),setTimeout(()=>this.emit("sgds-after-hide"),0))}toggle(){this.open?this.hide():this.show()}render(){return Q`
52
52
  <div ${Dt(this._myTooltip)} class="tooltip-placeholder">
53
53
  <slot @slotchange=${()=>this._handleSlotChange()}></slot>
54
54
  ${this.open?Q`<div ${Dt(this._tooltipBubble)} class="tooltip" role="tooltip">${this.content}</div>`:null}