"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_primer_react_lib-esm_TooltipV2_Tooltip_js"],{48030:(e,t,o)=>{o.d(t,{N:()=>i});let n={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},r={start:["end","center"],end:["start","center"],center:["end","start"]};function i(e,t,o={}){let i=function(e){if(function(e){var t;if("DIALOG"===e.tagName)return!0;try{if(e.matches(":popover-open")&&/native code/.test(null===(t=document.body.showPopover)||void 0===t?void 0:t.toString()))return!0}catch(e){}return!1}(e))return document.body;let t=e.parentNode;for(;null!==t;){if(t instanceof HTMLElement&&"static"!==getComputedStyle(t).position)return t;t=t.parentNode}return document.body}(e),s=function(e){let t=e;for(;null!==t&&t instanceof Element;){let e=getComputedStyle(t);if("visible"!==e.overflow)break;t=t.parentNode}let o=t!==document.body&&t instanceof HTMLElement?t:document.body,n=o.getBoundingClientRect(),r=getComputedStyle(o),[i,l,a,s]=[r.borderTopWidth,r.borderLeftWidth,r.borderRightWidth,r.borderBottomWidth].map(e=>parseInt(e,10)||0);return{top:n.top+i,left:n.left+l,width:n.width-a-l,height:Math.max(n.height-i-s,o===document.body?window.innerHeight:-1/0)}}(i),p=getComputedStyle(i),u=i.getBoundingClientRect(),[d,c]=[p.borderTopWidth,p.borderLeftWidth].map(e=>parseInt(e,10)||0),f={top:u.top+d,left:u.left+c};return function(e,t,o,i,{side:l,align:s,allowOutOfBounds:p,anchorOffset:u,alignmentOffset:d}){let c={top:e.top-t.top,left:e.left-t.left,width:e.width,height:e.height},f=a(o,i,l,s,u,d),h=l,m=s;if(f.top-=t.top,f.left-=t.left,!p){var g,b,v,w;let p=n[l],y=0;if(p){let e=l;for(;yc.height+c.top:b.leftc.width+c.left);){let n=p[y++];e=n,f=a(o,i,n,s,u,d),f.top-=t.top,f.left-=t.left,h=n}}let E=r[s],T=0;if(E){let e=s;for(;Tc.left+c.width||w.lefte.width+c.left&&(f.left=e.width+c.left-o.width),p&&ye.height+c.top&&(f.top=Math.max(e.height+c.top-o.height,0))}return Object.assign(Object.assign({},f),{anchorSide:h,anchorAlign:m})}(s,f,e.getBoundingClientRect(),t instanceof Element?t.getBoundingClientRect():t,function(e={}){var t,o,n,r,i;let a=null!==(t=e.side)&&void 0!==t?t:l.side,s=null!==(o=e.align)&&void 0!==o?o:l.align;return{side:a,align:s,anchorOffset:null!==(n=e.anchorOffset)&&void 0!==n?n:"inside-center"===a?0:l.anchorOffset,alignmentOffset:null!==(r=e.alignmentOffset)&&void 0!==r?r:"center"!==s&&a.startsWith("inside")?l.alignmentOffset:0,allowOutOfBounds:null!==(i=e.allowOutOfBounds)&&void 0!==i?i:l.allowOutOfBounds}}(o))}let l={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function a(e,t,o,n,r,i){let l=t.left+t.width,a=t.top+t.height,s=-1,p=-1;return"outside-top"===o?s=t.top-r-e.height:"outside-bottom"===o?s=a+r:"outside-left"===o?p=t.left-r-e.width:"outside-right"===o&&(p=l+r),("outside-top"===o||"outside-bottom"===o)&&(p="start"===n?t.left+i:"center"===n?t.left-(e.width-t.width)/2+i:l-e.width-i),("outside-left"===o||"outside-right"===o)&&(s="start"===n?t.top+i:"center"===n?t.top-(e.height-t.height)/2+i:a-e.height-i),"inside-top"===o?s=t.top+r:"inside-bottom"===o?s=a-r-e.height:"inside-left"===o?p=t.left+r:"inside-right"===o?p=l-r-e.width:"inside-center"===o&&(p=(l+t.left)/2-e.width/2+r),"inside-top"===o||"inside-bottom"===o?p="start"===n?t.left+i:"center"===n?t.left-(e.width-t.width)/2+i:l-e.width-i:("inside-left"===o||"inside-right"===o||"inside-center"===o)&&(s="start"===n?t.top+i:"center"===n?t.top-(e.height-t.height)/2+i:a-e.height-i),{top:s,left:p}}},41436:(e,t,o)=>{o.d(t,{u:()=>K});var n=o(67294),r=o(15173),i=o(66044),l=o(48030),a=o(14543),s=o(34918),p=o(15388),u=o(42379),d=class extends Event{oldState;newState;constructor(e,{oldState:t="",newState:o="",...n}={}){super(e,n),this.oldState=String(t||""),this.newState=String(o||"")}},c=new WeakMap;function f(e,t,o){c.set(e,setTimeout(()=>{c.has(e)&&e.dispatchEvent(new d("toggle",{cancelable:!1,oldState:t,newState:o}))},0))}var h=globalThis.ShadowRoot||function(){},m=globalThis.HTMLDialogElement||function(){},g=new WeakMap,b=new WeakMap,v=new WeakMap;function w(e){return v.get(e)||"hidden"}var y=new WeakMap;function E(e,t){return!("auto"!==e.popover&&"manual"!==e.popover||!e.isConnected||t&&"showing"!==w(e)||!t&&"hidden"!==w(e)||e instanceof m&&e.hasAttribute("open"))&&document.fullscreenElement!==e}function T(e){return e?Array.from(b.get(e.ownerDocument)||[]).indexOf(e)+1:0}function M(e){let t=b.get(e);for(let e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function S(e){return"function"==typeof e.getRootNode?e.getRootNode():e.parentNode?S(e.parentNode):e}function L(e){for(;e;){if(e instanceof HTMLElement&&"auto"===e.popover&&"showing"===v.get(e))return e;if((e=e.parentElement||S(e))instanceof h&&(e=e.host),e instanceof Document)return}}var k=new WeakMap;function A(e){if(!E(e,!1))return;let t=e.ownerDocument;if(!e.dispatchEvent(new d("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!E(e,!1))return;let o=!1;if("auto"===e.popover){let o=e.getAttribute("popover"),n=function(e){let t=new Map,o=0,n=e.ownerDocument;for(let e of b.get(n)||[])t.set(e,o),o+=1;t.set(e,o),o+=1;let r=null;return!function(e){let o=L(e);if(null===o)return;let n=t.get(o);(null===r||t.get(r)T(o)?t:o}(t);if(r&&"pointerdown"===e.type)C.set(o,r);else if("pointerup"===e.type){let e=C.get(o)===r;C.delete(o),e&&H(r||o,!1,!0)}}var N=new WeakMap;function R(e,t=!1){if(!e)return;N.has(e)||N.set(e,e.getAttribute("aria-expanded"));let o=e.popoverTargetElement;if(o instanceof HTMLElement&&"auto"===o.popover)e.setAttribute("aria-expanded",String(t));else{let t=N.get(e);t?e.setAttribute("aria-expanded",t):e.removeAttribute("aria-expanded")}}var P=globalThis.ShadowRoot||function(){};function W(e,t,o){let n=e[t];Object.defineProperty(e,t,{value(e){return n.call(this,o(e))}})}var B=/(^|[^\\]):popover-open\b/g,I="function"==typeof window.CSSLayerBlockRule,j=` ${I?"@layer popover-polyfill {":""} :where([popover]) { position: fixed; z-index: 2147483647; inset: 0; padding: 0.25em; width: fit-content; height: fit-content; border-width: initial; border-color: initial; border-image: initial; border-style: solid; background-color: canvas; color: canvastext; overflow: auto; margin: auto; } :where(dialog[popover][open]) { display: revert; } :where([anchor].\\:popover-open) { inset: auto; } :where([anchor]:popover-open) { inset: auto; } @supports not (background-color: canvas) { :where([popover]) { background-color: white; color: black; } } @supports (width: -moz-fit-content) { :where([popover]) { width: -moz-fit-content; height: -moz-fit-content; } } @supports not (inset: 0) { :where([popover]) { top: 0; left: 0; right: 0; bottom: 0; } } :where([popover]:not(.\\:popover-open)) { display: none; } ${I?"}":""} `,_=null;function q(e){if(null===_)try{(_=new CSSStyleSheet).replaceSync(j)}catch{_=!1}if(!1===_){let t=document.createElement("style");t.textContent=j,e instanceof Document?e.head.prepend(t):e.prepend(t)}else e.adoptedStyleSheets=[_,...e.adoptedStyleSheets]}function F(){return(F=Object.assign?Object.assign.bind():function(e){for(var t=1;tV.some(t=>e.matches(t))||e.hasAttribute("role")&&"button"===e.getAttribute("role"),J=n.createContext({}),K=n.forwardRef(({direction:e="s",text:t,type:o="description",children:r,id:p,...u},c)=>{let f=(0,a.M)(p),h=n.Children.only(r),m=(0,i.i)(c),g=(0,n.useRef)(null),[b,T]=(0,n.useState)(e),M=()=>{if(g.current&&m.current&&!g.current.matches(":popover-open")){let t=g.current,o=m.current;t.showPopover();let n={side:U[e].side,align:U[e].align},{top:r,left:i,anchorAlign:a,anchorSide:s}=(0,l.N)(t,o,n),p=G[`${s}-${a}`];T(p),t.style.top=`${r}px`,t.style.left=`${i}px`}},L=()=>{g.current&&m.current&&g.current.matches(":popover-open")&&g.current.hidePopover()};return(0,n.useEffect)(()=>{if(!g.current||!m.current)return;let e=Z(m.current),t=m.current.childNodes,n=Array.from(t).some(e=>e instanceof HTMLElement&&Z(e));e||n||(0,s.k)(!1),"label"===o&&(m.current.hasAttribute("aria-label"),Array.from(m.current.childNodes).some(e=>e instanceof HTMLElement&&e.hasAttribute("aria-label"))),"undefined"==typeof window||"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){var e;function t(e){return e?.includes(":popover-open")&&(e=e.replace(B,"$1.\\:popover-open")),e}window.ToggleEvent=window.ToggleEvent||d,W(Document.prototype,"querySelector",t),W(Document.prototype,"querySelectorAll",t),W(Element.prototype,"querySelector",t),W(Element.prototype,"querySelectorAll",t),W(Element.prototype,"matches",t),W(Element.prototype,"closest",t),W(DocumentFragment.prototype,"querySelectorAll",t),W(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let e=(this.getAttribute("popover")||"").toLowerCase();return""===e||"auto"==e?"auto":"manual"},set(e){this.setAttribute("popover",e)}},showPopover:{enumerable:!0,configurable:!0,value(){A(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){O(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(e){"showing"===v.get(this)&&void 0===e||!1===e?O(this,!0,!0):(void 0===e||!0===e)&&A(this)}}});let o=Element.prototype.attachShadow;o&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(e){let t=o.call(this,e);return q(t),t}}});let n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let e=n.call(this);return e.shadowRoot&&q(e.shadowRoot),e}}});let r=new WeakMap;function i(e){Object.defineProperties(e.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(e){if(null===e)this.removeAttribute("popovertarget"),r.delete(this);else if(e instanceof Element)this.setAttribute("popovertarget",""),r.set(this,e);else throw TypeError("popoverTargetElement must be an element or null")},get(){if("button"!==this.localName&&"input"!==this.localName||"input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type||this.disabled||this.form&&"submit"===this.type)return null;let e=r.get(this);if(e&&e.isConnected)return e;if(e&&!e.isConnected)return r.delete(this),null;let t=S(this),o=this.getAttribute("popovertarget");return(t instanceof Document||t instanceof P)&&o&&t.getElementById(o)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let e=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===e||"hide"===e?e:"toggle"},set(e){this.setAttribute("popovertargetaction",e)}}})}i(HTMLButtonElement),i(HTMLInputElement),(e=document).addEventListener("click",e=>{let t=e.composedPath(),o=t[0];if(!(o instanceof Element)||o?.shadowRoot)return;let n=S(o);if(!(n instanceof P||n instanceof Document))return;let r=t.find(e=>e.matches?.("[popovertargetaction],[popovertarget]"));if(r){(function(e){let t=e.popoverTargetElement;if(!(t instanceof HTMLElement))return;let o=w(t);("show"!==e.popoverTargetAction||"showing"!==o)&&("hide"!==e.popoverTargetAction||"hidden"!==o)&&("showing"===o?O(t,!0,!0):E(t,!1)&&(y.set(t,e),A(t)))})(r),e.preventDefault();return}}),e.addEventListener("keydown",e=>{let t=e.key,o=e.target;!e.defaultPrevented&&o&&("Escape"===t||"Esc"===t)&&H(o.ownerDocument,!0,!0)}),e.addEventListener("pointerdown",D),e.addEventListener("pointerup",D),q(document)}();let r=g.current;r.setAttribute("popover","auto")},[g,m,e,o]),n.createElement(J.Provider,{value:{tooltipId:f}},n.createElement(n.Fragment,null,n.isValidElement(h)&&n.cloneElement(h,{ref:m,"aria-describedby":"description"===o?f:h.props["aria-describedby"],"aria-labelledby":"label"===o?f:h.props["aria-labelledby"],onBlur:e=>{var t,o;L(),null===(t=(o=h.props).onBlur)||void 0===t||t.call(o,e)},onFocus:e=>{var t,o;M(),null===(t=(o=h.props).onFocus)||void 0===t||t.call(o,e)},onMouseEnter:e=>{var t,o;M(),null===(t=(o=h.props).onMouseEnter)||void 0===t||t.call(o,e)},onMouseLeave:e=>{var t,o;L(),null===(t=(o=h.props).onMouseLeave)||void 0===t||t.call(o,e)}}),n.createElement(z,F({ref:g,"data-direction":b},u,{role:"description"===o?"tooltip":void 0,"aria-hidden":"label"===o||void 0,id:f,onMouseEnter:M,onMouseLeave:L}),t)))})},14543:(e,t,o)=>{o.d(t,{M:()=>r});var n=o(67294);function r(e){let t=(0,n.useId)();return e||t}},66044:(e,t,o)=>{o.d(t,{i:()=>r});var n=o(67294);function r(e){let t=n.useRef(null);return null!=e?e:t}},34918:(e,t,o)=>{o.d(t,{k:()=>n});let n=function(){}}}]); //# sourceMappingURL=vendors-node_modules_primer_react_lib-esm_TooltipV2_Tooltip_js-70e75c9b2500.js.map