1(function(){const ICON=".yaydp-tooltip-icon";const CONTENT=".yaydp-tooltip-content";const OPEN="is-open";const BELOW="is-below";const VIEWPORT_MARGIN=8;let tooltipCounter=0;function build(contents){const id=`yaydp-tooltip-js-${++tooltipCounter}`;const icon=document.createElement("span");icon.className="yaydp-tooltip-icon";icon.tabIndex=0;icon.setAttribute("role","button");icon.setAttribute("aria-expanded","false");icon.setAttribute("aria-describedby",id);icon.setAttribute("aria-label",window.yaydp_tooltip_data?.label||"Discount details");const content=document.createElement("div");content.className="yaydp-tooltip-content";content.id=id;content.setAttribute("role","tooltip");contents.forEach((html)=>{const row=document.createElement("div");row.innerHTML=html;content.appendChild(row)});icon.appendChild(content);return icon} 2function clipTop(icon){let node=icon.parentElement;while(node&&node!==document.body){const overflowY=window.getComputedStyle(node).overflowY;if(overflowY==="auto"||overflowY==="scroll"){return Math.max(0,node.getBoundingClientRect().top)} 3node=node.parentElement} 4return 0} 5function position(icon){const content=icon.querySelector(CONTENT);if(!content){return} 6const iconRect=icon.getBoundingClientRect();const width=content.offsetWidth;const height=content.offsetHeight;const viewportWidth=document.documentElement.clientWidth;const center=iconRect.left+iconRect.width/2;let shift=0;if(center-width/2<VIEWPORT_MARGIN){shift=VIEWPORT_MARGIN-(center-width/2)}else if(center+width/2>viewportWidth-VIEWPORT_MARGIN){shift=viewportWidth-VIEWPORT_MARGIN-(center+width/2)} 7content.style.setProperty("--yaydp-tooltip-shift",`${Math.round(shift)}px`);icon.classList.toggle(BELOW,iconRect.top-clipTop(icon)<height+16)} 8function setOpen(icon,open){icon.classList.toggle(OPEN,open);icon.setAttribute("aria-expanded",open?"true":"false");if(open){position(icon)}} 9function closeAll(except){document.querySelectorAll(`${ICON}.${OPEN}`).forEach((icon)=>{if(icon!==except){setOpen(icon,!1)}})} 10document.addEventListener("mouseover",(event)=>{const icon=event.target.closest?.(ICON);if(icon&&!icon.contains(event.relatedTarget)){position(icon)}});document.addEventListener("focusin",(event)=>{const icon=event.target.closest?.(ICON);if(icon){closeAll(icon);setOpen(icon,!0)}});document.addEventListener("focusout",(event)=>{const icon=event.target.closest?.(ICON);if(icon&&!icon.contains(event.relatedTarget)){setOpen(icon,!1)}});document.addEventListener("pointerdown",(event)=>{if(event.target.closest?.(ICON)&&!event.target.closest?.(CONTENT)){event.preventDefault()}});document.addEventListener("click",(event)=>{if(event.target.closest?.(CONTENT)){return} 11const icon=event.target.closest?.(ICON);closeAll(icon);if(icon){setOpen(icon,!icon.classList.contains(OPEN))}});document.addEventListener("keydown",(event)=>{if(event.key==="Escape"){closeAll();if(document.activeElement?.closest?.(ICON)){document.activeElement.blur()} 12return} 13const icon=event.target.closest?.(ICON);if(icon&&(event.key==="Enter"||event.key===" ")){event.preventDefault();closeAll(icon);setOpen(icon,!icon.classList.contains(OPEN))}});window.yaydpTooltip={build,position}})()
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.