Lines 1-12javascript
1(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.RenderTag={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=null,n=null;function r(e){t=e,e===null&&(n=null)}function i(e){let t=typeof document<`u`,n=typeof OffscreenCanvas<`u`;if(t&&(e||!n))return document.createElement(`canvas`).getContext(`2d`);if(n)return new OffscreenCanvas(1,1).getContext(`2d`);throw Error(`render-tag: no canvas available for text measurement. In a non-br ...
2`,e.remove();t.body.normalize();let i=t.createDocumentFragment();for(;t.body.firstChild;)i.appendChild(t.body.firstChild);return{fragment:i,css:r}}var s=1,c=3
3`),document.head.appendChild(a));let o=E(r),u=e.ownerDocument.createElement(`div`);u.appendChild(e);function d(e,t){let n=new Set,r=e.getAttribute(`class`);if(r)for(let e of r.split(/\s+/))e&&n.add(e);return{tagName:e.tagName.toLowerCase(),classes:n,parent:t,el:e}}function f(e,t,r){let i=e.tagName.toLowerCase(),a=d(e,r),s=h(),c=new Set,l=[],u=new Set,f=o.byTag.get(i);if(f)for(let e of f)u.add(e),l.push(e);for(let e of a.classes){let t=o.byClass.get(e);if(t)for(let e of t)u.has(e)||(u.add(e),l.push(e))}for(let e of o.universal)u.has(e)||(u.add(e),l.push(e));let _=[],v=[];for(let e of l)if(m(e.s ...
4`))return null}let r={...t},i=t.whiteSpace,a=n;return i!==`pre`&&i!==`pre-wrap`&&i!==`pre-line`&&i!==`break-spaces`&&(a=n.replace(/[\n\r]/g,` `
5`}:f(r,t,n)}return{tree:f(u,h(),null),cleanup:()=>{a&&a.remove()}}}var P=!0,F,I=[],L=new Map;function R
6`)return;let r=n[e-1];if(!r||r.isSpace||!r.text.trim()||r.boxOpen||r.boxClose)return;let i=[...t.text][0],a=[...r.text][r.text.length-1];Q(i)||Q(a)||pe(t.text)||pe(r.text)||(t.noBreakBefore=!0)};if(t.includes(`
8`);for(let t=0;t<a.length;t++)if(t>0&&n.push({text:`
9`,width:0,style:r.style,isSpace:!1,boxStyle:r.boxStyle}),a[t]){let o=n.length;ge(e,a[t],r,n),i(o)}}else{let a=n.length;ge(e,t,r,n),i(a)}}return n}function Q(e){let t=e.codePointAt(0)||0;return t>=19968&&t<=40959||t>=13312&&t<=19903||t>=12288&&t<=12351||t>=12352&&t<=12447||t>=12448&&t<=12543||t>=44032&&t<=55215||t>=65280&&t<=65519||t>=131072&&t<=173791}var ve;function ye(){return ve||(typeof Intl<`u`&&Intl.Segmenter?(ve=new Intl.Segmenter(void 0,{granularity:`grapheme`}),ve):null)}var be=/\p{Extended_Pictographic}/u;function xe(e){for(let t of e)if(t.codePointAt(0)>=126976)return!0;return e.inc ...
CriticalTrojan Source Unicode
Source contains bidi control or invisible Unicode characters associated with Trojan Source attacks.
lib/render-tag.umd.jsView on unpkg · L9 10`){c.words.length===0?(c.lineHeight=h,c.endedByHardBreak=!0,s.push(c),c={words:[],totalWidth:0,lineHeight:0}):(c.endedByHardBreak=!0,p()),m=!0;continue}if(l
11`)break;let r=!!n.text&&Ce.test(n.text),i=!n.text&&!!n.boxClose,a=!!n.text&&!!n.noBreakBefore;if(r||i||a){_+=n.width;continue}break}for(let i of g){let l=i===g[g.length-1]?_:0,d=!i.isSpace&&i.text.length>0&&Ce.test(i.text)&&c.words.length>0&&!c.words[c.words.length-1].isSpace,v=i===g[0]&&i.noBreakBefore&&c.words.length>0&&!c.words[c.words.length-1].isSpace,y=0;if(!i.text&&i.boxOpen){let n=t[r+1];n&&!n.isSpace&&n.text&&(y=(n.text.length>1?Se(e,n,u(),0):[n])[0].width)}let b=0;if(i.isSoftHyphenBreak&&(z(e,i.style),e.letterSpacing=B(i.style.letterSpacing),b=R(e,`-`)),!i.isSpace&&!d&&!v&&c.words.le ...
12//# sourceMappingURL=render-tag.umd.js.map
Long lines were clipped for display.