1import{a as s,N as b,j as t,Q as p,f as d}from"../../__generated__/components/demos-DhThR4g2.js";import{C as g}from"../../node_modules/-pnpm/color@4-2-3/node_modules/color/index-js-commonjs-es-import-DwF8kAFh.js";import{E as v}from"../../node_modules/-pnpm/@meronex-icons@4-0-0_react@18-3-1/node_modules/@meronex/icons/fa/FaRegEnvelope-js-commonjs-es-import-BolWlh1_.js";import{T as j,F as w,L as y}from"../../node_modules/-pnpm/@meronex-icons@4-0-0_react@18-3-1/node_modules/@meronex/icons/fa/FaFacebookF-js-commonjs-es-import-BWy1Tlu5.js";import{F as E}from"./utils/constants-7S-ZT5xm.js";import"../../node_modules/-pnpm/date-fns@2-30-0/node_modules/date-fns/addYears/index-js-commonjs-es-import-wvD8i_oy.js";import"../../node_modules/-pnpm/@theice-pushpop@3-5-0_@types-express@4-17-25/node_modules/@theice/pushpop/build/array/replace-BIxldC1J.js";const k=e=>e?g(e).luminosity()<.4:!1,f=({href:e,title:r,icon:o})=>t.jsx("a",{className:"text-primary flex flex-auto items-center justify-center py-4 text-lg hover:bg-black/20 focus:bg-black/20 active:bg-black",href:e,"aria-label":r,children:o}),C=({link:e,color:r})=>{const o={color:k(r)?"#f6f6f6":"#020303",backgroundColor:r};return t.jsxs("a",{href:e.url,style:o,className:d("group","flex flex-auto","duration-200 ease-linear","no-underline hover:no-underline active:no-underline","text-gray-800 hover:text-black active:text-black","bg-gray-800/70 hover:bg-gray-800/20 active:bg-gray-800/20","border-t border-gray-300 first:border-t-0"),children:[t.jsx("div",{className:"box-content min-w-[40px] flex-auto grow-0 p-2 group-hover:bg-black/20",children:t.jsx("img",{src:e.iconUrl,alt:e.iconAlt,height:"40"})}),t.jsx("div",{className:d("flex flex-auto items-center justify-start","px-4 py-2","text-inherit","group-hover:bg-black/20"),children:e.label})]})},I=(e,r)=>{s.useEffect(()=>{const o=e==null?void 0:e.defaultView;if(o)return o.addEventListener("scroll",r),()=>o.removeEventListener("scroll",r)},[r,e])},L=(e,r,o)=>{s.useEffect(()=>{const i=r.current,a=e==null?void 0:e.defaultView;if(i&&a){const n=c=>{i.contains(c.target)||o()};return a.addEventListener("mousedown",n),()=>a.removeEventListener("mousedown",n)}},[e,o,r])},D=({links:e,color:r=E[2],includeSocialLinks:o})=>{const i=s.useRef(null),a=s.useRef(null),[n,c]=s.useState(!0),l=b(a),[u,h]=s.useState(""),x=s.useCallback(()=>c(!1),[]);return I(l,x),L(l,i,x),s.useEffect(()=>{h(window.location.href)},[]),t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:a}),l!=null&&l.body?p.createPortal(t.jsxs("div",{"data-cms-snapshot-exclude":!0,ref:i,"data-testid":"floating-toolset",className:d("fixed right-0 top-1/2 hidden -translate-y-1/2 border border-r-0 border-gray-300 duration-300 ease-out lg:block",{"translate-x-[calc(100%-70px-1rem)]":!n}),onMouseEnter:()=>c(!0),children:[(e!=null?e:[]).map(m=>t.jsx(C,{link:m,color:r},m.id)),o?t.jsxs("div",{className:d("flex origin-top border-t border-gray-300 bg-gray-100 duration-300 ease-out",{"translate-x-full":!n,"translate-x-0":n}),style:r?{backgroundColor:r}:void 0,children:[t.jsx(f,{href:"http://twitter.com/share?url=".concat(encodeURIComponent(u)),title:"Share on Twitter",icon:t.jsx(j,{})}),t.jsx(f,{href:"https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(u)),title:"Share on Facebook",icon:t.jsx(w,{})}),t.jsx(f,{href:"https://www.linkedin.com/shareArticle?url=".concat(encodeURIComponent(u)),title:"Share on LinkedIn",icon:t.jsx(y,{})}),t.jsx(f,{href:"mailto:?body=".concat(encodeURIComponent(u)),title:"Share via Email",icon:t.jsx(v,{})})]}):null]}),l.body):null]})};export{D as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.