PageSourceSearch

https://dashboard.tesorio.com/static/MaxWidthTruncate--s3cUUF_.js

js tesorio.com collected 2026-09-25 14:07:55 UTC 5,607 bytes, 1 lines download raw bytes

1import{o as e,t}from"./rolldown-runtime-C0FnF6B9.js";import{YV as n,ax as r,tH as i}from"./common-C6qyii-d.js";import{D as a}from"./recharts-DmUCeYU7.js";var o=e(t(((e,t)=>{var n=a();function r(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var i=r(n);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function l(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var u={position:`absolute`,bottom:0,left:0,height:0,overflow:`hidden`,"padding-top":0,"padding-bottom":0,border:`none`},d=[`box-sizing`,`width`,`font-size`,`font-weight`,`font-family`,`font-style`,`letter-spacing`,`text-indent`,`white-space`,`word-break`,`overflow-wrap`,`padding-left`,`padding-right`];function f(e,t){if(!e||typeof e!=`object`)return e;var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)>-1||(n[r]=e[r])}),n}var p=[`component`,`className`,`unsafeHTML`];function m(e,t){if(t!==`letters`&&t!==`words`)throw Error(`Unsupported options basedOn: `+t);if(e.nodeType===Node.TEXT_NODE){var n=document.createDocumentFragment(),r;switch(t){case`words`:r=e.textContent.split(/\b|(?=\W)/);break;case`letters`:r=Array.from(e.textContent)}r.forEach(function(e){n.appendChild(h(e))}),e.parentNode.replaceChild(n,e)}else if(e.nodeType===Node.ELEMENT_NODE)for(var i=[].slice.call(e.childNodes),a=i.length,o=0;o<a;o++)m(i[o],t)}function h(e){var t=document.createElement(`span`);return t.className=`LinesEllipsis-unit`,t.textContent=e,t}function g(e){e.parentNode.replaceChild(document.createTextNode(e.textContent),e)}function _(e,t){if(!(!t.contains(e)||e===t)){for(;e.nextElementSibling;)e.parentNode.removeChild(e.nextElementSibling);_(e.parentNode,t)}}function v(e){for(var t=e;t=t.parentNode;)if(/p|div|main|section|h\d|ul|ol|li/.test(t.tagName.toLowerCase()))return t}function y(e){return!!(e.offsetHeight&&(e.offsetWidth||/\S/.test(e.textContent)))}var b={component:`div`,unsafeHTML:``,maxLine:1,ellipsis:`…`,ellipsisHTML:void 0,className:``,basedOn:void 0,onReflow:function(){},winWidth:void 0},x=Object.keys(b),S=function(e){s(t,e);function t(t){var n=e.call(this,t)||this;return n.state={html:t.unsafeHTML,clamped:!1},n.canvas=null,n.maxLine=0,n.nlUnits=[],n}var n=t.prototype;return n.componentDidMount=function(){this.initCanvas(),this.reflow(this.props)},n.componentDidUpdate=function(e){e.winWidth!==this.props.winWidth&&this.copyStyleToCanvas(),this.props!==e&&this.reflow(this.props)},n.componentWillUnmount=function(){this.canvas.parentNode.removeChild(this.canvas),this.canvas=null},n.setState=function(t,n){return t.clamped!==void 0&&(this.clamped=t.clamped),e.prototype.setState.call(this,t,n)},n.initCanvas=function(){if(!this.canvas){var e=this.canvas=document.createElement(`div`);e.className=`LinesEllipsis-canvas `+this.props.className,e.setAttribute(`aria-hidden`,`true`),this.copyStyleToCanvas(),Object.keys(u).forEach(function(t){e.style[t]=u[t]}),document.body.appendChild(e)}},n.copyStyleToCanvas=function(){var e=this,t=window.getComputedStyle(this.target);d.forEach(function(n){e.canvas.style[n]=t[n]})},n.reflow=function(e){this.maxLine=+e.maxLine||1,this.canvas.innerHTML=e.unsafeHTML;var t=e.basedOn||(/^[\x00-\x7F]+$/.test(e.unsafeHTML)?`words`:`letters`);m(this.canvas,t);var n={clamped:this.putEllipsis(this.calcIndexes()),html:this.canvas.innerHTML};this.setState(n,e.onReflow.bind(this,n))},n.calcIndexes=function(){var e=[0],t=this.nlUnits=Array.from(this.canvas.querySelectorAll(`.LinesEllipsis-unit`)),n=t.length;if(!t.length)return e;var r=t.find(y);if(!r)return e;for(var i=1,a=r.offsetTop,o=1;o<n&&!(y(t[o])&&t[o].offsetTop-a>1&&(i++,e.push(o),a=t[o].offsetTop,i>this.maxLine));o++);return e},n.putEllipsis=function(e){if(e.length<=this.maxLine)return!1;this.nlUnits=this.nlUnits.slice(0,e[this.maxLine]);var t=this.nlUnits.pop(),n=this.makeEllipsisSpan();do _(t,this.canvas),v(t).appendChild(n),t=this.nlUnits.pop();while(t&&(!y(t)||n.offsetHeight>t.offsetHeight||n.offsetTop>t.offsetTop));
1return t&&g(t),this.nlUnits.forEach(g),!0},n.makeEllipsisSpan=function(){var e=this.props,t=e.ellipsisHTML,n=e.ellipsis,r=document.createElement(`span`);r.appendChild(document.createElement(`wbr`));var i=document.createElement(`span`);return i.className=`LinesEllipsis-ellipsis`,t?i.innerHTML=t:i.textContent=n,r.appendChild(i),r},n.isClamped=function(){return this.clamped},n.render=function(){var e=this,t=this.state,n=t.html,r=t.clamped,a=this.props,s=a.component,c=a.className,u=a.unsafeHTML,d=l(a,p);return i.default.createElement(s,o({className:`LinesEllipsis `+(r?`LinesEllipsis--clamped`:``)+` `+c,ref:function(t){return e.target=t}},f(d,x)),i.default.createElement(`div`,{dangerouslySetInnerHTML:{__html:r?n:u}}))},t}(i.default.Component);S.defaultProps=b,t.exports=S}))(),1),s=i(),c=n(r)`word-wrap:break-word;`,l=n(o.default)`word-wrap:break-word;`,u=n.div`white-space:initial;${e=>e.maxWidth&&`max-width: ${e.maxWidth};`}`;function d({children:e,maxWidth:t,lines:n,variant:r=`text`}){return e?(0,s.jsx)(u,{maxWidth:t,children:r===`text`?(0,s.jsx)(c,{text:e||``,maxLine:n,ellipsis:`...`}):(0,s.jsx)(l,{unsafeHTML:e?.toString()||``,maxLine:n,ellipsis:`...`})}):null}d.defaultProps={lines:2};export{d as t};

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.