PageSourceSearch

https://calculang-editables.netlify.app/_npm/[email protected]/79b8ab24.js

js calculang-editables.netlify.app collected 2026-10-03 10:33:15 UTC 4,161 bytes, 7 lines download raw bytes

1/**
2 * Bundled by jsDelivr using Rollup v2.79.1 and Terser v5.19.2.
3 * Original file: /npm/[email protected]/build/vega-tooltip.module.js
4 *
5 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6 */
7import{isArray as t,isString as e,isObject as n}from"../[email protected]/a0ac0a5c.js";var i="0.34.0";function o(i,o,l,r){if(t(i))return`[${i.map((t=>o(e(t)?t:s(t,l)))).join(", ")}]`;if(n(i)){let t="";const{title:e,image:d,...h}=i;e&&(t+=`<h2>${o(e)}</h2>`),d&&(t+=`<img src="${new URL(o(d),r||location.href).href}">`);const a=Object.keys(h);if(a.length>0){t+="<table>";for(const e of a){let i=h[e];void 0!==i&&(n(i)&&(i=s(i,l)),t+=`<tr><td class="key">${o(e)}</td><td class="value">${o(i)}</td></tr>`)}t+="</table>"}return t||"{}"}return o(i)}function l(t){const e=[];return function(n,i){if("object"!=typeof i||null===i)return i;const o=e.indexOf(this)+1;return e.length=o,e.length>t?"[Object]":e.indexOf(i)>=0?"[Circular]":(e.push(i),i)}}function s(t,e){return JSON.stringify(t,l(e))}var r="#vg-tooltip-element {\n  visibility: hidden;\n  padding: 8px;\n  position: fixed;\n  z-index: 1000;\n  font-family: sans-serif;\n  font-size: 11px;\n  border-radius: 3px;\n  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n  /* The default theme is the light theme. */\n  background-color: rgba(255, 255, 255, 0.95);\n  border: 1px solid #d9d9d9;\n  color: black;\n}\n#vg-tooltip-element.visible {\n  visibility: visible;\n}\n#vg-tooltip-element h2 {\n  margin-top: 0;\n  margin-bottom: 10px;\n  font-size: 13px;\n}\n#vg-tooltip-element table {\n  border-spacing: 0;\n}\n#vg-tooltip-element table tr {\n  border: none;\n}\n#vg-tooltip-element table tr td {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding-top: 2px;\n  padding-bottom: 2px;\n}\n#vg-tooltip-element table tr td.key {\n  color: #808080;\n  max-width: 150px;\n  text-align: right;\n  padding-right: 4px;\n}\n#vg-tooltip-element table tr td.value {\n  display: block;\n  max-width: 300px;\n  max-height: 7em;\n  text-align: left;\n}\n#vg-tooltip-element.dark-theme {\n  background-color: rgba(32, 32, 32, 0.9);\n  border: 1px solid #f5f5f5;\n  color: white;\n}\n#vg-tooltip-element.dark-theme td.key {\n  color: #bfbfbf;\n}\n";const d="vg-tooltip-element",h={offsetX:10,offsetY:10,id:d,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:a,maxDepth:2,formatTooltip:o,baseURL:""};function a(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;")}function p(t){if(!/^[A-Za-z]+[-:.\w]*$/.test(t))throw new Error("Invalid HTML ID");return r.toString().replace(d,t)}function c(t,e,n,i){let o=t.clientX+n;o+e.width>window.innerWidth&&(o=+t.clientX-n-e.width);let l=t.clientY+i;return l+e.height>window.innerHeight&&(l=+t.clientY-i-e.height),{x:o,y:l}}class f{constructor(t){this.options={...h,...t};const e=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const t=document.createElement("style");t.setAttribute("id",this.options.styleId),t.innerHTML=p(e);const n=document.head;n.childNodes.length>0?n.insertBefore(t,n.childNodes[0]):n.appendChild(t)}}tooltipHandler(t,e,n,i){if(this.el=document.getElementById(this.options.id),!this.el){this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip");(document.fullscreenElement??document.body).appendChild(this.el)}if(null==i||""===i)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=this.options.formatTooltip(i,this.options.sanitize,this.options.maxDepth,this.options.baseURL),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:o,y:l}=c(e,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.style.top=`${l}px`,this.el.style.left=`${o}px`}}const m=i;function g(t,e){const n=new f(e);return t.tooltip(n.call).run(),n}export{h as DEFAULT_OPTIONS,f as Handler,c as calculatePosition,p as createDefaultStyle,g as default,a as escapeHTML,o as formatValue,l as replacer,s as 
7stringify,m as version};

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.