simplecov 1.0.0.rc3 → 1.0.0.rc5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- "use strict";(()=>{var hn=Object.create;var ct=Object.defineProperty;var mn=Object.getOwnPropertyDescriptor;var bn=Object.getOwnPropertyNames;var _n=Object.getPrototypeOf,En=Object.prototype.hasOwnProperty;var vn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var yn=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of bn(t))!En.call(e,i)&&i!==n&&ct(e,i,{get:()=>t[i],enumerable:!(s=mn(t,i))||s.enumerable});return e};var Mn=(e,t,n)=>(n=e!=null?hn(_n(e)):{},yn(t||!e||!e.__esModule?ct(n,"default",{value:e,enumerable:!0}):n,e));var J=(e,t,n)=>new Promise((s,i)=>{var c=l=>{try{o(n.next(l))}catch(d){i(d)}},r=l=>{try{o(n.throw(l))}catch(d){i(d)}},o=l=>l.done?s(l.value):Promise.resolve(l.value).then(c,r);o((n=n.apply(e,t)).next())});var $t=vn((Zs,It)=>{function yt(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],s=typeof n;(s==="object"||s==="function")&&!Object.isFrozen(n)&&yt(n)}),e}var Ee=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Mt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function G(e,...t){let n=Object.create(null);for(let s in e)n[s]=e[s];return t.forEach(function(s){for(let i in s)n[i]=s[i]}),n}var Ln="</span>",ht=e=>!!e.scope,xn=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((s,i)=>`${s}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`},$e=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Mt(t)}openNode(t){if(!ht(t))return;let n=xn(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){ht(t)&&(this.buffer+=Ln)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}},mt=(e={})=>{let t={children:[]};return Object.assign(t,e),t},He=class e{constructor(){this.rootNode=mt(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=mt({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(s=>this._walk(t,s)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},ke=class extends He{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let s=t.root;n&&(s.scope=`language:${n}`),this.add(s)}toHTML(){return new $e(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function le(e){return e?typeof e=="string"?e:e.source:null}function wt(e){return V("(?=",e,")")}function An(e){return V("(?:",e,")*")}function Cn(e){return V("(?:",e,")?")}function V(...e){return e.map(n=>le(n)).join("")}function Rn(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Be(...e){return"("+(Rn(e).capture?"":"?:")+e.map(s=>le(s)).join("|")+")"}function Tt(e){return new RegExp(e.toString()+"|").exec("").length-1}function Nn(e,t){let n=e&&e.exec(t);return n&&n.index===0}var On=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Pe(e,{joinWith:t}){let n=0;return e.map(s=>{n+=1;let i=n,c=le(s),r="";for(;c.length>0;){let o=On.exec(c);if(!o){r+=c;break}r+=c.substring(0,o.index),c=c.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?r+="\\"+String(Number(o[1])+i):(r+=o[0],o[0]==="("&&n++)}return r}).map(s=>`(${s})`).join(t)}var In=/\b\B/,St="[a-zA-Z]\\w*",Fe="[a-zA-Z_]\\w*",Lt="\\b\\d+(\\.\\d+)?",xt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",At="\\b(0b[01]+)",$n="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Hn=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=V(t,/.*\b/,e.binary,/\b.*/)),G({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,s)=>{n.index!==0&&s.ignoreMatch()}},e)},ae={begin:"\\\\[\\s\\S]",relevance:0},kn={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ae]},Dn={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ae]},Bn={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ye=function(e,t,n={}){let s=G({scope:"comment",begin:e,end:t,contains:[]},n);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=Be("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:V(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},Pn=ye("//","$"),Fn=ye("/\\*","\\*/"),Un=ye("#","$"),Wn={scope:"number",begin:Lt,relevance:0},jn={scope:"number",begin:xt,relevance:0},qn={scope:"number",begin:At,relevance:0},zn={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ae,{begin:/\[/,end:/\]/,relevance:0,contains:[ae]}]},Gn={scope:"title",begin:St,relevance:0},Kn={scope:"title",begin:Fe,relevance:0},Xn={begin:"\\.\\s*"+Fe,relevance:0},Zn=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},_e=Object.freeze({__proto__:null,APOS_STRING_MODE:kn,BACKSLASH_ESCAPE:ae,BINARY_NUMBER_MODE:qn,BINARY_NUMBER_RE:At,COMMENT:ye,C_BLOCK_COMMENT_MODE:Fn,C_LINE_COMMENT_MODE:Pn,C_NUMBER_MODE:jn,C_NUMBER_RE:xt,END_SAME_AS_BEGIN:Zn,HASH_COMMENT_MODE:Un,IDENT_RE:St,MATCH_NOTHING_RE:In,METHOD_GUARD:Xn,NUMBER_MODE:Wn,NUMBER_RE:Lt,PHRASAL_WORDS_MODE:Bn,QUOTE_STRING_MODE:Dn,REGEXP_MODE:zn,RE_STARTERS_RE:$n,SHEBANG:Hn,TITLE_MODE:Gn,UNDERSCORE_IDENT_RE:Fe,UNDERSCORE_TITLE_MODE:Kn});function Vn(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function Yn(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Qn(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Vn,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Jn(e,t){Array.isArray(e.illegal)&&(e.illegal=Be(...e.illegal))}function es(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function ts(e,t){e.relevance===void 0&&(e.relevance=1)}var ns=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(s=>{delete e[s]}),e.keywords=n.keywords,e.begin=V(n.beforeMatch,wt(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ss=["of","and","for","in","not","or","if","then","parent","list","value"],is="keyword";function Ct(e,t,n=is){let s=Object.create(null);return typeof e=="string"?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(c){Object.assign(s,Ct(e[c],t,c))}),s;function i(c,r){t&&(r=r.map(o=>o.toLowerCase())),r.forEach(function(o){let l=o.split("|");s[l[0]]=[c,rs(l[0],l[1])]})}}function rs(e,t){return t?Number(t):os(e)?0:1}function os(e){return ss.includes(e.toLowerCase())}var bt={},Z=e=>{console.error(e)},_t=(e,...t)=>{console.log(`WARN: ${e}`,...t)},te=(e,t)=>{bt[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),bt[`${e}/${t}`]=!0)},ve=new Error;function Rt(e,t,{key:n}){let s=0,i=e[n],c={},r={};for(let o=1;o<=t.length;o++)r[o+s]=i[o],c[o+s]=!0,s+=Tt(t[o-1]);e[n]=r,e[n]._emit=c,e[n]._multi=!0}function cs(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Z("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ve;if(typeof e.beginScope!="object"||e.beginScope===null)throw Z("beginScope must be object"),ve;Rt(e,e.begin,{key:"beginScope"}),e.begin=Pe(e.begin,{joinWith:""})}}function ls(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Z("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ve;if(typeof e.endScope!="object"||e.endScope===null)throw Z("endScope must be object"),ve;Rt(e,e.end,{key:"endScope"}),e.end=Pe(e.end,{joinWith:""})}}function as(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function us(e){as(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),cs(e),ls(e)}function ds(e){function t(r,o){return new RegExp(le(r),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,l){l.position=this.position++,this.matchIndexes[this.matchAt]=l,this.regexes.push([l,o]),this.matchAt+=Tt(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let o=this.regexes.map(l=>l[1]);this.matcherRe=t(Pe(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;let l=this.matcherRe.exec(o);if(!l)return null;let d=l.findIndex((E,w)=>w>0&&E!==void 0),p=this.matchIndexes[d];return l.splice(0,d),Object.assign(l,p)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];let l=new n;return this.rules.slice(o).forEach(([d,p])=>l.addRule(d,p)),l.compile(),this.multiRegexes[o]=l,l}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,l){this.rules.push([o,l]),l.type==="begin"&&this.count++}exec(o){let l=this.getMatcher(this.regexIndex);l.lastIndex=this.lastIndex;let d=l.exec(o);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){let p=this.getMatcher(0);p.lastIndex=this.lastIndex+1,d=p.exec(o)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function i(r){let o=new s;return r.contains.forEach(l=>o.addRule(l.begin,{rule:l,type:"begin"})),r.terminatorEnd&&o.addRule(r.terminatorEnd,{type:"end"}),r.illegal&&o.addRule(r.illegal,{type:"illegal"}),o}function c(r,o){let l=r;if(r.isCompiled)return l;[Yn,es,us,ns].forEach(p=>p(r,o)),e.compilerExtensions.forEach(p=>p(r,o)),r.__beforeBegin=null,[Qn,Jn,ts].forEach(p=>p(r,o)),r.isCompiled=!0;let d=null;return typeof r.keywords=="object"&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords),d=r.keywords.$pattern,delete r.keywords.$pattern),d=d||/\w+/,r.keywords&&(r.keywords=Ct(r.keywords,e.case_insensitive)),l.keywordPatternRe=t(d,!0),o&&(r.begin||(r.begin=/\B|\b/),l.beginRe=t(l.begin),!r.end&&!r.endsWithParent&&(r.end=/\B|\b/),r.end&&(l.endRe=t(l.end)),l.terminatorEnd=le(l.end)||"",r.endsWithParent&&o.terminatorEnd&&(l.terminatorEnd+=(r.end?"|":"")+o.terminatorEnd)),r.illegal&&(l.illegalRe=t(r.illegal)),r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map(function(p){return fs(p==="self"?r:p)})),r.contains.forEach(function(p){c(p,l)}),r.starts&&c(r.starts,o),l.matcher=i(l),l}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=G(e.classNameAliases||{}),c(e)}function Nt(e){return e?e.endsWithParent||Nt(e.starts):!1}function fs(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return G(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Nt(e)?G(e,{starts:e.starts?G(e.starts):null}):Object.isFrozen(e)?G(e):e}var gs="11.11.1",De=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},Ie=Mt,Et=G,vt=Symbol("nomatch"),ps=7,Ot=function(e){let t=Object.create(null),n=Object.create(null),s=[],i=!0,c="Could not find the language '{}', did you forget to load/include a language module?",r={disableAutodetect:!0,name:"Plain text",contains:[]},o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:ke};function l(a){return o.noHighlightRe.test(a)}function d(a){let g=a.className+" ";g+=a.parentNode?a.parentNode.className:"";let b=o.languageDetectRe.exec(g);if(b){let y=U(b[1]);return y||(_t(c.replace("{}",b[1])),_t("Falling back to no-highlight mode for this block.",a)),y?b[1]:"no-highlight"}return g.split(/\s+/).find(y=>l(y)||U(y))}function p(a,g,b){let y="",S="";typeof g=="object"?(y=a,b=g.ignoreIllegals,S=g.language):(te("10.7.0","highlight(lang, code, ...args) has been deprecated."),te("10.7.0",`Please use highlight(code, options) instead.
2
- https://github.com/highlightjs/highlight.js/issues/2277`),S=a,y=g),b===void 0&&(b=!0);let k={code:y,language:S};pe("before:highlight",k);let z=k.result?k.result:E(k.language,k.code,b);return z.code=k.code,pe("after:highlight",z),z}function E(a,g,b,y){let S=Object.create(null);function k(u,f){return u.keywords[f]}function z(){if(!h.keywords){L.addText(M);return}let u=0;h.keywordPatternRe.lastIndex=0;let f=h.keywordPatternRe.exec(M),m="";for(;f;){m+=M.substring(u,f.index);let v=B.case_insensitive?f[0].toLowerCase():f[0],x=k(h,v);if(x){let[W,gn]=x;if(L.addText(m),m="",S[v]=(S[v]||0)+1,S[v]<=ps&&(be+=gn),W.startsWith("_"))m+=f[0];else{let pn=B.classNameAliases[W]||W;D(f[0],pn)}}else m+=f[0];u=h.keywordPatternRe.lastIndex,f=h.keywordPatternRe.exec(M)}m+=M.substring(u),L.addText(m)}function he(){if(M==="")return;let u=null;if(typeof h.subLanguage=="string"){if(!t[h.subLanguage]){L.addText(M);return}u=E(h.subLanguage,M,!0,ot[h.subLanguage]),ot[h.subLanguage]=u._top}else u=T(M,h.subLanguage.length?h.subLanguage:null);h.relevance>0&&(be+=u.relevance),L.__addSublanguage(u._emitter,u.language)}function N(){h.subLanguage!=null?he():z(),M=""}function D(u,f){u!==""&&(L.startScope(f),L.addText(u),L.endScope())}function nt(u,f){let m=1,v=f.length-1;for(;m<=v;){if(!u._emit[m]){m++;continue}let x=B.classNameAliases[u[m]]||u[m],W=f[m];x?D(W,x):(M=W,z(),M=""),m++}}function st(u,f){return u.scope&&typeof u.scope=="string"&&L.openNode(B.classNameAliases[u.scope]||u.scope),u.beginScope&&(u.beginScope._wrap?(D(M,B.classNameAliases[u.beginScope._wrap]||u.beginScope._wrap),M=""):u.beginScope._multi&&(nt(u.beginScope,f),M="")),h=Object.create(u,{parent:{value:h}}),h}function it(u,f,m){let v=Nn(u.endRe,m);if(v){if(u["on:end"]){let x=new Ee(u);u["on:end"](f,x),x.isMatchIgnored&&(v=!1)}if(v){for(;u.endsParent&&u.parent;)u=u.parent;return u}}if(u.endsWithParent)return it(u.parent,f,m)}function ln(u){return h.matcher.regexIndex===0?(M+=u[0],1):(Oe=!0,0)}function an(u){let f=u[0],m=u.rule,v=new Ee(m),x=[m.__beforeBegin,m["on:begin"]];for(let W of x)if(W&&(W(u,v),v.isMatchIgnored))return ln(f);return m.skip?M+=f:(m.excludeBegin&&(M+=f),N(),!m.returnBegin&&!m.excludeBegin&&(M=f)),st(m,u),m.returnBegin?0:f.length}function un(u){let f=u[0],m=g.substring(u.index),v=it(h,u,m);if(!v)return vt;let x=h;h.endScope&&h.endScope._wrap?(N(),D(f,h.endScope._wrap)):h.endScope&&h.endScope._multi?(N(),nt(h.endScope,u)):x.skip?M+=f:(x.returnEnd||x.excludeEnd||(M+=f),N(),x.excludeEnd&&(M=f));do h.scope&&L.closeNode(),!h.skip&&!h.subLanguage&&(be+=h.relevance),h=h.parent;while(h!==v.parent);return v.starts&&st(v.starts,u),x.returnEnd?0:f.length}function dn(){let u=[];for(let f=h;f!==B;f=f.parent)f.scope&&u.unshift(f.scope);u.forEach(f=>L.openNode(f))}let me={};function rt(u,f){let m=f&&f[0];if(M+=u,m==null)return N(),0;if(me.type==="begin"&&f.type==="end"&&me.index===f.index&&m===""){if(M+=g.slice(f.index,f.index+1),!i){let v=new Error(`0 width match regex (${a})`);throw v.languageName=a,v.badRule=me.rule,v}return 1}if(me=f,f.type==="begin")return an(f);if(f.type==="illegal"&&!b){let v=new Error('Illegal lexeme "'+m+'" for mode "'+(h.scope||"<unnamed>")+'"');throw v.mode=h,v}else if(f.type==="end"){let v=un(f);if(v!==vt)return v}if(f.type==="illegal"&&m==="")return M+=`
3
- `,1;if(Ne>1e5&&Ne>f.index*3)throw new Error("potential infinite loop, way more iterations than matches");return M+=m,m.length}let B=U(a);if(!B)throw Z(c.replace("{}",a)),new Error('Unknown language: "'+a+'"');let fn=ds(B),Re="",h=y||fn,ot={},L=new o.__emitter(o);dn();let M="",be=0,X=0,Ne=0,Oe=!1;try{if(B.__emitTokens)B.__emitTokens(g,L);else{for(h.matcher.considerAll();;){Ne++,Oe?Oe=!1:h.matcher.considerAll(),h.matcher.lastIndex=X;let u=h.matcher.exec(g);if(!u)break;let f=g.substring(X,u.index),m=rt(f,u);X=u.index+m}rt(g.substring(X))}return L.finalize(),Re=L.toHTML(),{language:a,value:Re,relevance:be,illegal:!1,_emitter:L,_top:h}}catch(u){if(u.message&&u.message.includes("Illegal"))return{language:a,value:Ie(g),illegal:!0,relevance:0,_illegalBy:{message:u.message,index:X,context:g.slice(X-100,X+100),mode:u.mode,resultSoFar:Re},_emitter:L};if(i)return{language:a,value:Ie(g),illegal:!1,relevance:0,errorRaised:u,_emitter:L,_top:h};throw u}}function w(a){let g={value:Ie(a),illegal:!1,relevance:0,_top:r,_emitter:new o.__emitter(o)};return g._emitter.addText(a),g}function T(a,g){g=g||o.languages||Object.keys(t);let b=w(a),y=g.filter(U).filter(ge).map(N=>E(N,a,!1));y.unshift(b);let S=y.sort((N,D)=>{if(N.relevance!==D.relevance)return D.relevance-N.relevance;if(N.language&&D.language){if(U(N.language).supersetOf===D.language)return 1;if(U(D.language).supersetOf===N.language)return-1}return 0}),[k,z]=S,he=k;return he.secondBest=z,he}function H(a,g,b){let y=g&&n[g]||b;a.classList.add("hljs"),a.classList.add(`language-${y}`)}function A(a){let g=null,b=d(a);if(l(b))return;if(pe("before:highlightElement",{el:a,language:b}),a.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",a);return}if(a.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(a)),o.throwUnescapedHTML))throw new De("One of your code blocks includes unescaped HTML.",a.innerHTML);g=a;let y=g.textContent,S=b?p(y,{language:b,ignoreIllegals:!0}):T(y);a.innerHTML=S.value,a.dataset.highlighted="yes",H(a,b,S.language),a.result={language:S.language,re:S.relevance,relevance:S.relevance},S.secondBest&&(a.secondBest={language:S.secondBest.language,relevance:S.secondBest.relevance}),pe("after:highlightElement",{el:a,result:S,text:y})}function C(a){o=Et(o,a)}let oe=()=>{ce(),te("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function fe(){ce(),te("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ae=!1;function ce(){function a(){ce()}if(document.readyState==="loading"){Ae||window.addEventListener("DOMContentLoaded",a,!1),Ae=!0;return}document.querySelectorAll(o.cssSelector).forEach(A)}function et(a,g){let b=null;try{b=g(e)}catch(y){if(Z("Language definition for '{}' could not be registered.".replace("{}",a)),i)Z(y);else throw y;b=r}b.name||(b.name=a),t[a]=b,b.rawDefinition=g.bind(null,e),b.aliases&&Ce(b.aliases,{languageName:a})}function K(a){delete t[a];for(let g of Object.keys(n))n[g]===a&&delete n[g]}function tt(){return Object.keys(t)}function U(a){return a=(a||"").toLowerCase(),t[a]||t[n[a]]}function Ce(a,{languageName:g}){typeof a=="string"&&(a=[a]),a.forEach(b=>{n[b.toLowerCase()]=g})}function ge(a){let g=U(a);return g&&!g.disableAutodetect}function sn(a){a["before:highlightBlock"]&&!a["before:highlightElement"]&&(a["before:highlightElement"]=g=>{a["before:highlightBlock"](Object.assign({block:g.el},g))}),a["after:highlightBlock"]&&!a["after:highlightElement"]&&(a["after:highlightElement"]=g=>{a["after:highlightBlock"](Object.assign({block:g.el},g))})}function rn(a){sn(a),s.push(a)}function on(a){let g=s.indexOf(a);g!==-1&&s.splice(g,1)}function pe(a,g){let b=a;s.forEach(function(y){y[b]&&y[b](g)})}function cn(a){return te("10.7.0","highlightBlock will be removed entirely in v12.0"),te("10.7.0","Please use highlightElement now."),A(a)}Object.assign(e,{highlight:p,highlightAuto:T,highlightAll:ce,highlightElement:A,highlightBlock:cn,configure:C,initHighlighting:oe,initHighlightingOnLoad:fe,registerLanguage:et,unregisterLanguage:K,listLanguages:tt,getLanguage:U,registerAliases:Ce,autoDetection:ge,inherit:Et,addPlugin:rn,removePlugin:on}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=gs,e.regex={concat:V,lookahead:wt,either:Be,optional:Cn,anyNumberOfTimes:An};for(let a in _e)typeof _e[a]=="object"&&yt(_e[a]);return Object.assign(e,_e),e},ne=Ot({});ne.newInstance=()=>Ot({});It.exports=ne;ne.HighlightJS=ne;ne.default=ne});function R(e,t){return(t||document).querySelector(e)}function _(e,t){return Array.from((t||document).querySelectorAll(e))}function P(e,t,n,s){typeof n=="function"?e.addEventListener(t,n):e.addEventListener(t,function(i){let c=i.target.closest(n);c&&e.contains(c)&&s&&s.call(c,i)})}var wn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function I(e){return e.replace(/[&<>"']/g,t=>wn[t])}function lt(e){return J(this,null,function*(){let t=new TextEncoder().encode(e),n=yield crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(n,0,4),s=>s.toString(16).padStart(2,"0")).join("")})}var Tn=90,Sn=75;function F(e){return e>=Tn?"green":e>=Sn?"yellow":"red"}function O(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function j(e){return(Math.floor(e*100)/100).toFixed(2)}function at(e){return"g-"+e.replace(/[^a-zA-Z0-9_-]/gu,t=>`_${t.codePointAt(0).toString(16)}_`)}var ut=[[31536e3,"year"],[2592e3,"month"],[86400,"day"],[3600,"hour"],[60,"minute"],[1,"second"]];function dt(e){let t=Math.floor((Date.now()-e.getTime())/1e3);for(let[n,s]of ut){let i=Math.floor(t/n);if(i>=1)return i===1?`about 1 ${s} ago`:`${i} ${s}s ago`}return"just now"}function ft(e){let t=(Date.now()-e.getTime())/1e3;for(let[n]of ut){let s=Math.floor(t/n);if(s>=1){let i=(s+1)*n;return Math.max((i-t)*1e3+500,1e3)}}return 1e3}var gt={};function ee(e){return gt[e]}function pt(e){return J(this,null,function*(){let t=yield Promise.all(e.map(lt));e.forEach((n,s)=>{gt[n]=t[s]})})}var Ht=Mn($t(),1);var Ue=Ht.default;function kt(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=t.concat(s,/(::\w+)*/),r={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},d=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],p={className:"subst",begin:/#\{/,end:/\}/,keywords:r},E={className:"string",contains:[e.BACKSLASH_ESCAPE,p],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,p]})]}]},w="[1-9](_?[0-9])*|0",T="[0-9](_?[0-9])*",H={className:"number",relevance:0,variants:[{begin:`\\b(${w})(\\.(${T}))?([eE][+-]?(${T})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},A={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:r}]},K=[E,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:r},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:r},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[A]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[E,{begin:n}],relevance:0},H,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:r},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,p],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,d),relevance:0}].concat(l,d);p.contains=K,A.contains=K;let ge=[{begin:/^\s*=>/,starts:{end:"$",contains:K}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:r,contains:K}}];return d.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:r,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(ge).concat(d).concat(K)}}function je(e){let t=F(e),n=j(e);return`<div class="bar-sizer"><div class="coverage-bar"><div class="coverage-bar__fill coverage-bar__fill--${t}" style="width: ${n}%"></div></div></div>`}function Y(e,t,n,s,i){let c=F(e),r=j(e),o=`<div class="coverage-cell">${je(e)}<span class="coverage-pct">${r}%</span></div>`;if(i)return`<td class="cell--coverage strong t-totals__${s}-pct ${c}">${o}</td><td class="cell--numerator strong t-totals__${s}-num">${O(t)}/</td><td class="cell--denominator strong t-totals__${s}-den">${O(n)}</td>`;let l=` data-order="${j(e)}"`;return`<td class="cell--coverage cell--${s}-pct ${c}"${l}>${o}</td><td class="cell--numerator">${O(t)}/</td><td class="cell--denominator">${O(n)}</td>`}function Me(e,t,n,s){return`<th class="cell--coverage">
1
+ "use strict";(()=>{var xn=Object.create;var dt=Object.defineProperty;var An=Object.getOwnPropertyDescriptor;var Cn=Object.getOwnPropertyNames;var Rn=Object.getPrototypeOf,Nn=Object.prototype.hasOwnProperty;var On=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var In=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Cn(t))!Nn.call(e,r)&&r!==n&&dt(e,r,{get:()=>t[r],enumerable:!(s=An(t,r))||s.enumerable});return e};var Hn=(e,t,n)=>(n=e!=null?xn(Rn(e)):{},In(t||!e||!e.__esModule?dt(n,"default",{value:e,enumerable:!0}):n,e));var J=(e,t,n)=>new Promise((s,r)=>{var l=c=>{try{o(n.next(c))}catch(d){r(d)}},i=c=>{try{o(n.throw(c))}catch(d){r(d)}},o=c=>c.done?s(c.value):Promise.resolve(c.value).then(l,i);o((n=n.apply(e,t)).next())});var Bt=On((br,Dt)=>{function Tt(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],s=typeof n;(s==="object"||s==="function")&&!Object.isFrozen(n)&&Tt(n)}),e}var ye=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Lt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function G(e,...t){let n=Object.create(null);for(let s in e)n[s]=e[s];return t.forEach(function(s){for(let r in s)n[r]=s[r]}),n}var Bn="</span>",_t=e=>!!e.scope,Fn=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((s,r)=>`${s}${"_".repeat(r+1)}`)].join(" ")}return`${t}${e}`},ke=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Lt(t)}openNode(t){if(!_t(t))return;let n=Fn(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){_t(t)&&(this.buffer+=Bn)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}},vt=(e={})=>{let t={children:[]};return Object.assign(t,e),t},De=class e{constructor(){this.rootNode=vt(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=vt({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(s=>this._walk(t,s)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},Be=class extends De{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let s=t.root;n&&(s.scope=`language:${n}`),this.add(s)}toHTML(){return new ke(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function ae(e){return e?typeof e=="string"?e:e.source:null}function xt(e){return Z("(?=",e,")")}function Pn(e){return Z("(?:",e,")*")}function qn(e){return Z("(?:",e,")?")}function Z(...e){return e.map(n=>ae(n)).join("")}function Wn(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Pe(...e){return"("+(Wn(e).capture?"":"?:")+e.map(s=>ae(s)).join("|")+")"}function At(e){return new RegExp(e.toString()+"|").exec("").length-1}function Un(e,t){let n=e&&e.exec(t);return n&&n.index===0}var jn=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function qe(e,{joinWith:t}){let n=0;return e.map(s=>{n+=1;let r=n,l=ae(s),i="";for(;l.length>0;){let o=jn.exec(l);if(!o){i+=l;break}i+=l.substring(0,o.index),l=l.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?i+="\\"+String(Number(o[1])+r):(i+=o[0],o[0]==="("&&n++)}return i}).map(s=>`(${s})`).join(t)}var zn=/\b\B/,Ct="[a-zA-Z]\\w*",We="[a-zA-Z_]\\w*",Rt="\\b\\d+(\\.\\d+)?",Nt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ot="\\b(0b[01]+)",Gn="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Kn=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=Z(t,/.*\b/,e.binary,/\b.*/)),G({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,s)=>{n.index!==0&&s.ignoreMatch()}},e)},ue={begin:"\\\\[\\s\\S]",relevance:0},Xn={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ue]},Vn={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ue]},Zn={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},we=function(e,t,n={}){let s=G({scope:"comment",begin:e,end:t,contains:[]},n);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let r=Pe("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:Z(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},Yn=we("//","$"),Qn=we("/\\*","\\*/"),Jn=we("#","$"),es={scope:"number",begin:Rt,relevance:0},ts={scope:"number",begin:Nt,relevance:0},ns={scope:"number",begin:Ot,relevance:0},ss={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ue,{begin:/\[/,end:/\]/,relevance:0,contains:[ue]}]},rs={scope:"title",begin:Ct,relevance:0},is={scope:"title",begin:We,relevance:0},os={begin:"\\.\\s*"+We,relevance:0},ls=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},ve=Object.freeze({__proto__:null,APOS_STRING_MODE:Xn,BACKSLASH_ESCAPE:ue,BINARY_NUMBER_MODE:ns,BINARY_NUMBER_RE:Ot,COMMENT:we,C_BLOCK_COMMENT_MODE:Qn,C_LINE_COMMENT_MODE:Yn,C_NUMBER_MODE:ts,C_NUMBER_RE:Nt,END_SAME_AS_BEGIN:ls,HASH_COMMENT_MODE:Jn,IDENT_RE:Ct,MATCH_NOTHING_RE:zn,METHOD_GUARD:os,NUMBER_MODE:es,NUMBER_RE:Rt,PHRASAL_WORDS_MODE:Zn,QUOTE_STRING_MODE:Vn,REGEXP_MODE:ss,RE_STARTERS_RE:Gn,SHEBANG:Kn,TITLE_MODE:rs,UNDERSCORE_IDENT_RE:We,UNDERSCORE_TITLE_MODE:is});function cs(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function as(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function us(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=cs,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ds(e,t){Array.isArray(e.illegal)&&(e.illegal=Pe(...e.illegal))}function fs(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function gs(e,t){e.relevance===void 0&&(e.relevance=1)}var ps=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(s=>{delete e[s]}),e.keywords=n.keywords,e.begin=Z(n.beforeMatch,xt(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},hs=["of","and","for","in","not","or","if","then","parent","list","value"],ms="keyword";function It(e,t,n=ms){let s=Object.create(null);return typeof e=="string"?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(l){Object.assign(s,It(e[l],t,l))}),s;function r(l,i){t&&(i=i.map(o=>o.toLowerCase())),i.forEach(function(o){let c=o.split("|");s[c[0]]=[l,bs(c[0],c[1])]})}}function bs(e,t){return t?Number(t):Es(e)?0:1}function Es(e){return hs.includes(e.toLowerCase())}var yt={},V=e=>{console.error(e)},Mt=(e,...t)=>{console.log(`WARN: ${e}`,...t)},te=(e,t)=>{yt[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),yt[`${e}/${t}`]=!0)},Me=new Error;function Ht(e,t,{key:n}){let s=0,r=e[n],l={},i={};for(let o=1;o<=t.length;o++)i[o+s]=r[o],l[o+s]=!0,s+=At(t[o-1]);e[n]=i,e[n]._emit=l,e[n]._multi=!0}function _s(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw V("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Me;if(typeof e.beginScope!="object"||e.beginScope===null)throw V("beginScope must be object"),Me;Ht(e,e.begin,{key:"beginScope"}),e.begin=qe(e.begin,{joinWith:""})}}function vs(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw V("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Me;if(typeof e.endScope!="object"||e.endScope===null)throw V("endScope must be object"),Me;Ht(e,e.end,{key:"endScope"}),e.end=qe(e.end,{joinWith:""})}}function ys(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ms(e){ys(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),_s(e),vs(e)}function ws(e){function t(i,o){return new RegExp(ae(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,o]),this.matchAt+=At(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let o=this.regexes.map(c=>c[1]);this.matcherRe=t(qe(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;let c=this.matcherRe.exec(o);if(!c)return null;let d=c.findIndex((M,w)=>w>0&&M!==void 0),p=this.matchIndexes[d];return c.splice(0,d),Object.assign(c,p)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];let c=new n;return this.rules.slice(o).forEach(([d,p])=>c.addRule(d,p)),c.compile(),this.multiRegexes[o]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,c){this.rules.push([o,c]),c.type==="begin"&&this.count++}exec(o){let c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let d=c.exec(o);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){let p=this.getMatcher(0);p.lastIndex=this.lastIndex+1,d=p.exec(o)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function r(i){let o=new s;return i.contains.forEach(c=>o.addRule(c.begin,{rule:c,type:"begin"})),i.terminatorEnd&&o.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&o.addRule(i.illegal,{type:"illegal"}),o}function l(i,o){let c=i;if(i.isCompiled)return c;[as,fs,Ms,ps].forEach(p=>p(i,o)),e.compilerExtensions.forEach(p=>p(i,o)),i.__beforeBegin=null,[us,ds,gs].forEach(p=>p(i,o)),i.isCompiled=!0;let d=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),d=i.keywords.$pattern,delete i.keywords.$pattern),d=d||/\w+/,i.keywords&&(i.keywords=It(i.keywords,e.case_insensitive)),c.keywordPatternRe=t(d,!0),o&&(i.begin||(i.begin=/\B|\b/),c.beginRe=t(c.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(c.endRe=t(c.end)),c.terminatorEnd=ae(c.end)||"",i.endsWithParent&&o.terminatorEnd&&(c.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(c.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(p){return Ss(p==="self"?i:p)})),i.contains.forEach(function(p){l(p,c)}),i.starts&&l(i.starts,o),c.matcher=r(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=G(e.classNameAliases||{}),l(e)}function $t(e){return e?e.endsWithParent||$t(e.starts):!1}function Ss(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return G(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:$t(e)?G(e,{starts:e.starts?G(e.starts):null}):Object.isFrozen(e)?G(e):e}var Ts="11.11.1",Fe=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},$e=Lt,wt=G,St=Symbol("nomatch"),Ls=7,kt=function(e){let t=Object.create(null),n=Object.create(null),s=[],r=!0,l="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]},o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Be};function c(a){return o.noHighlightRe.test(a)}function d(a){let g=a.className+" ";g+=a.parentNode?a.parentNode.className:"";let b=o.languageDetectRe.exec(g);if(b){let v=q(b[1]);return v||(Mt(l.replace("{}",b[1])),Mt("Falling back to no-highlight mode for this block.",a)),v?b[1]:"no-highlight"}return g.split(/\s+/).find(v=>c(v)||q(v))}function p(a,g,b){let v="",S="";typeof g=="object"?(v=a,b=g.ignoreIllegals,S=g.language):(te("10.7.0","highlight(lang, code, ...args) has been deprecated."),te("10.7.0",`Please use highlight(code, options) instead.
2
+ https://github.com/highlightjs/highlight.js/issues/2277`),S=a,v=g),b===void 0&&(b=!0);let k={code:v,language:S};me("before:highlight",k);let z=k.result?k.result:M(k.language,k.code,b);return z.code=k.code,me("after:highlight",z),z}function M(a,g,b,v){let S=Object.create(null);function k(u,f){return u.keywords[f]}function z(){if(!h.keywords){T.addText(y);return}let u=0;h.keywordPatternRe.lastIndex=0;let f=h.keywordPatternRe.exec(y),m="";for(;f;){m+=y.substring(u,f.index);let _=B.case_insensitive?f[0].toLowerCase():f[0],L=k(h,_);if(L){let[W,Tn]=L;if(T.addText(m),m="",S[_]=(S[_]||0)+1,S[_]<=Ls&&(_e+=Tn),W.startsWith("_"))m+=f[0];else{let Ln=B.classNameAliases[W]||W;D(f[0],Ln)}}else m+=f[0];u=h.keywordPatternRe.lastIndex,f=h.keywordPatternRe.exec(y)}m+=y.substring(u),T.addText(m)}function be(){if(y==="")return;let u=null;if(typeof h.subLanguage=="string"){if(!t[h.subLanguage]){T.addText(y);return}u=M(h.subLanguage,y,!0,ut[h.subLanguage]),ut[h.subLanguage]=u._top}else u=A(y,h.subLanguage.length?h.subLanguage:null);h.relevance>0&&(_e+=u.relevance),T.__addSublanguage(u._emitter,u.language)}function O(){h.subLanguage!=null?be():z(),y=""}function D(u,f){u!==""&&(T.startScope(f),T.addText(u),T.endScope())}function ot(u,f){let m=1,_=f.length-1;for(;m<=_;){if(!u._emit[m]){m++;continue}let L=B.classNameAliases[u[m]]||u[m],W=f[m];L?D(W,L):(y=W,z(),y=""),m++}}function lt(u,f){return u.scope&&typeof u.scope=="string"&&T.openNode(B.classNameAliases[u.scope]||u.scope),u.beginScope&&(u.beginScope._wrap?(D(y,B.classNameAliases[u.beginScope._wrap]||u.beginScope._wrap),y=""):u.beginScope._multi&&(ot(u.beginScope,f),y="")),h=Object.create(u,{parent:{value:h}}),h}function ct(u,f,m){let _=Un(u.endRe,m);if(_){if(u["on:end"]){let L=new ye(u);u["on:end"](f,L),L.isMatchIgnored&&(_=!1)}if(_){for(;u.endsParent&&u.parent;)u=u.parent;return u}}if(u.endsWithParent)return ct(u.parent,f,m)}function vn(u){return h.matcher.regexIndex===0?(y+=u[0],1):(He=!0,0)}function yn(u){let f=u[0],m=u.rule,_=new ye(m),L=[m.__beforeBegin,m["on:begin"]];for(let W of L)if(W&&(W(u,_),_.isMatchIgnored))return vn(f);return m.skip?y+=f:(m.excludeBegin&&(y+=f),O(),!m.returnBegin&&!m.excludeBegin&&(y=f)),lt(m,u),m.returnBegin?0:f.length}function Mn(u){let f=u[0],m=g.substring(u.index),_=ct(h,u,m);if(!_)return St;let L=h;h.endScope&&h.endScope._wrap?(O(),D(f,h.endScope._wrap)):h.endScope&&h.endScope._multi?(O(),ot(h.endScope,u)):L.skip?y+=f:(L.returnEnd||L.excludeEnd||(y+=f),O(),L.excludeEnd&&(y=f));do h.scope&&T.closeNode(),!h.skip&&!h.subLanguage&&(_e+=h.relevance),h=h.parent;while(h!==_.parent);return _.starts&&lt(_.starts,u),L.returnEnd?0:f.length}function wn(){let u=[];for(let f=h;f!==B;f=f.parent)f.scope&&u.unshift(f.scope);u.forEach(f=>T.openNode(f))}let Ee={};function at(u,f){let m=f&&f[0];if(y+=u,m==null)return O(),0;if(Ee.type==="begin"&&f.type==="end"&&Ee.index===f.index&&m===""){if(y+=g.slice(f.index,f.index+1),!r){let _=new Error(`0 width match regex (${a})`);throw _.languageName=a,_.badRule=Ee.rule,_}return 1}if(Ee=f,f.type==="begin")return yn(f);if(f.type==="illegal"&&!b){let _=new Error('Illegal lexeme "'+m+'" for mode "'+(h.scope||"<unnamed>")+'"');throw _.mode=h,_}else if(f.type==="end"){let _=Mn(f);if(_!==St)return _}if(f.type==="illegal"&&m==="")return y+=`
3
+ `,1;if(Ie>1e5&&Ie>f.index*3)throw new Error("potential infinite loop, way more iterations than matches");return y+=m,m.length}let B=q(a);if(!B)throw V(l.replace("{}",a)),new Error('Unknown language: "'+a+'"');let Sn=ws(B),Oe="",h=v||Sn,ut={},T=new o.__emitter(o);wn();let y="",_e=0,X=0,Ie=0,He=!1;try{if(B.__emitTokens)B.__emitTokens(g,T);else{for(h.matcher.considerAll();;){Ie++,He?He=!1:h.matcher.considerAll(),h.matcher.lastIndex=X;let u=h.matcher.exec(g);if(!u)break;let f=g.substring(X,u.index),m=at(f,u);X=u.index+m}at(g.substring(X))}return T.finalize(),Oe=T.toHTML(),{language:a,value:Oe,relevance:_e,illegal:!1,_emitter:T,_top:h}}catch(u){if(u.message&&u.message.includes("Illegal"))return{language:a,value:$e(g),illegal:!0,relevance:0,_illegalBy:{message:u.message,index:X,context:g.slice(X-100,X+100),mode:u.mode,resultSoFar:Oe},_emitter:T};if(r)return{language:a,value:$e(g),illegal:!1,relevance:0,errorRaised:u,_emitter:T,_top:h};throw u}}function w(a){let g={value:$e(a),illegal:!1,relevance:0,_top:i,_emitter:new o.__emitter(o)};return g._emitter.addText(a),g}function A(a,g){g=g||o.languages||Object.keys(t);let b=w(a),v=g.filter(q).filter(he).map(O=>M(O,a,!1));v.unshift(b);let S=v.sort((O,D)=>{if(O.relevance!==D.relevance)return D.relevance-O.relevance;if(O.language&&D.language){if(q(O.language).supersetOf===D.language)return 1;if(q(D.language).supersetOf===O.language)return-1}return 0}),[k,z]=S,be=k;return be.secondBest=z,be}function $(a,g,b){let v=g&&n[g]||b;a.classList.add("hljs"),a.classList.add(`language-${v}`)}function C(a){let g=null,b=d(a);if(c(b))return;if(me("before:highlightElement",{el:a,language:b}),a.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",a);return}if(a.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(a)),o.throwUnescapedHTML))throw new Fe("One of your code blocks includes unescaped HTML.",a.innerHTML);g=a;let v=g.textContent,S=b?p(v,{language:b,ignoreIllegals:!0}):A(v);a.innerHTML=S.value,a.dataset.highlighted="yes",$(a,b,S.language),a.result={language:S.language,re:S.relevance,relevance:S.relevance},S.secondBest&&(a.secondBest={language:S.secondBest.language,relevance:S.secondBest.relevance}),me("after:highlightElement",{el:a,result:S,text:v})}function N(a){o=wt(o,a)}let le=()=>{ce(),te("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function pe(){ce(),te("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Re=!1;function ce(){function a(){ce()}if(document.readyState==="loading"){Re||window.addEventListener("DOMContentLoaded",a,!1),Re=!0;return}document.querySelectorAll(o.cssSelector).forEach(C)}function rt(a,g){let b=null;try{b=g(e)}catch(v){if(V("Language definition for '{}' could not be registered.".replace("{}",a)),r)V(v);else throw v;b=i}b.name||(b.name=a),t[a]=b,b.rawDefinition=g.bind(null,e),b.aliases&&Ne(b.aliases,{languageName:a})}function K(a){delete t[a];for(let g of Object.keys(n))n[g]===a&&delete n[g]}function it(){return Object.keys(t)}function q(a){return a=(a||"").toLowerCase(),t[a]||t[n[a]]}function Ne(a,{languageName:g}){typeof a=="string"&&(a=[a]),a.forEach(b=>{n[b.toLowerCase()]=g})}function he(a){let g=q(a);return g&&!g.disableAutodetect}function mn(a){a["before:highlightBlock"]&&!a["before:highlightElement"]&&(a["before:highlightElement"]=g=>{a["before:highlightBlock"](Object.assign({block:g.el},g))}),a["after:highlightBlock"]&&!a["after:highlightElement"]&&(a["after:highlightElement"]=g=>{a["after:highlightBlock"](Object.assign({block:g.el},g))})}function bn(a){mn(a),s.push(a)}function En(a){let g=s.indexOf(a);g!==-1&&s.splice(g,1)}function me(a,g){let b=a;s.forEach(function(v){v[b]&&v[b](g)})}function _n(a){return te("10.7.0","highlightBlock will be removed entirely in v12.0"),te("10.7.0","Please use highlightElement now."),C(a)}Object.assign(e,{highlight:p,highlightAuto:A,highlightAll:ce,highlightElement:C,highlightBlock:_n,configure:N,initHighlighting:le,initHighlightingOnLoad:pe,registerLanguage:rt,unregisterLanguage:K,listLanguages:it,getLanguage:q,registerAliases:Ne,autoDetection:he,inherit:wt,addPlugin:bn,removePlugin:En}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=Ts,e.regex={concat:Z,lookahead:xt,either:Pe,optional:qn,anyNumberOfTimes:Pn};for(let a in ve)typeof ve[a]=="object"&&Tt(ve[a]);return Object.assign(e,ve),e},ne=kt({});ne.newInstance=()=>kt({});Dt.exports=ne;ne.HighlightJS=ne;ne.default=ne});function R(e,t){return(t||document).querySelector(e)}function E(e,t){return Array.from((t||document).querySelectorAll(e))}function F(e,t,n,s){typeof n=="function"?e.addEventListener(t,n):e.addEventListener(t,function(r){let l=r.target.closest(n);l&&e.contains(l)&&s&&s.call(l,r)})}var $n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function I(e){return e.replace(/[&<>"']/g,t=>$n[t])}function ft(e){return J(this,null,function*(){let t=new TextEncoder().encode(e),n=yield crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(n,0,4),s=>s.toString(16).padStart(2,"0")).join("")})}var kn=90,Dn=75;function P(e){return e>=kn?"green":e>=Dn?"yellow":"red"}function x(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function U(e){return(Math.floor(e*100)/100).toFixed(2)}function gt(e){return"g-"+e.replace(/[^a-zA-Z0-9_-]/gu,t=>`_${t.codePointAt(0).toString(16)}_`)}var pt=[[31536e3,"year"],[2592e3,"month"],[86400,"day"],[3600,"hour"],[60,"minute"],[1,"second"]];function ht(e){let t=Math.floor((Date.now()-e.getTime())/1e3);for(let[n,s]of pt){let r=Math.floor(t/n);if(r>=1)return r===1?`about 1 ${s} ago`:`${r} ${s}s ago`}return"just now"}function mt(e){let t=(Date.now()-e.getTime())/1e3;for(let[n]of pt){let s=Math.floor(t/n);if(s>=1){let r=(s+1)*n;return Math.max((r-t)*1e3+500,1e3)}}return 1e3}var bt={};function ee(e){return bt[e]}function Et(e){return J(this,null,function*(){let t=yield Promise.all(e.map(ft));e.forEach((n,s)=>{bt[n]=t[s]})})}var Ft=Hn(Bt(),1);var Ue=Ft.default;function Pt(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(s,/(::\w+)*/),i={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},d=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],p={className:"subst",begin:/#\{/,end:/\}/,keywords:i},M={className:"string",contains:[e.BACKSLASH_ESCAPE,p],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,p]})]}]},w="[1-9](_?[0-9])*|0",A="[0-9](_?[0-9])*",$={className:"number",relevance:0,variants:[{begin:`\\b(${w})(\\.(${A}))?([eE][+-]?(${A})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},C={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:i}]},K=[M,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/\b(class|module)\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:i},{match:[/(include|extend)\s+/,r],scope:{2:"title.class"},keywords:i},{relevance:0,match:[r,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[C]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[M,{begin:n}],relevance:0},$,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,p],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,d),relevance:0}].concat(c,d);p.contains=K,C.contains=K;let he=[{begin:/^\s*=>/,starts:{end:"$",contains:K}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:i,contains:K}}];return d.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(he).concat(d).concat(K)}}function ze(e){let t=P(e),n=U(e);return`<div class="bar-sizer"><div class="coverage-bar"><div class="coverage-bar__fill coverage-bar__fill--${t}" style="width: ${n}%"></div></div></div>`}function Y(e,t,n,s,r){let l=P(e),i=U(e),o=`<div class="coverage-cell">${ze(e)}<span class="coverage-pct">${i}%</span></div>`;if(r)return`<td class="cell--coverage strong t-totals__${s}-pct ${l}">${o}</td><td class="cell--numerator strong t-totals__${s}-num">${x(t)}/</td><td class="cell--denominator strong t-totals__${s}-den">${x(n)}</td>`;let c=` data-order="${U(e)}"`;return`<td class="cell--coverage cell--${s}-pct ${l}"${c}>${o}</td><td class="cell--numerator">${x(t)}/</td><td class="cell--denominator">${x(n)}</td>`}function Se(e,t,n,s){return`<th class="cell--coverage">
4
4
  <div class="th-with-filter">
5
5
  <span class="th-label">${e}</span>
6
6
  <div class="col-filter__coverage">
@@ -10,9 +10,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`),S=a,y=g),b===void 0&&(
10
10
  </div>
11
11
  </th>
12
12
  <th class="cell--numerator">${n}</th>
13
- <th class="cell--denominator">${s}</th>`}function We(e){let{type:t,label:n,covered:s,total:i,enabled:c,toggle:r}=e;if(!c)return`<div class="t-${t}-summary">
13
+ <th class="cell--denominator">${s}</th>`}function je(e){let{type:t,label:n,covered:s,total:r,enabled:l,toggle:i}=e;if(!l)return`<div class="t-${t}-summary">
14
14
  ${n}: <span class="coverage-disabled">disabled</span>
15
- </div>`;let o=i-s,l=i>0?s*100/i:100,d=F(l),p=e.suffix||"covered",E=e.missedClass||"red",w=`<div class="t-${t}-summary">
16
- ${n}: <span class="${d}"><b>${j(l)}%</b></span><span class="coverage-cell__fraction"> ${s}/${i} ${p}</span>`;if(o>0){let T=r?`<a href="#" class="t-missed-method-toggle"><b>${o}</b> missed</a>`:`<span class="${E}"><b>${o}</b> missed</span>`;w+=`<span class="coverage-cell__fraction">,</span>
17
- ${T}`}return w+=`
18
- </div>`,w}function Dt(e){return'<div class="summary-stats">'+We({type:"line",label:"Line coverage",covered:e.coveredLines,total:e.totalLines,enabled:!0,suffix:"relevant lines covered"})+We({type:"branch",label:"Branch coverage",covered:e.coveredBranches,total:e.totalBranches,enabled:e.branchCoverage,missedClass:"missed-branch-text"})+We({type:"method",label:"Method coverage",covered:e.coveredMethods,total:e.totalMethods,enabled:e.methodCoverage,missedClass:"missed-method-text-color",toggle:e.showMethodToggle})+"</div>"}function hs(e){let{title:t,filenames:n,stats:s,branchCoverage:i,methodCoverage:c}=e,r=at(t),o=s.lines,l=i?s.branches:void 0,d=c?s.methods:void 0,p=[`<div class="file_list_container" id="${r}" data-total-files="${n.length}">`,`<span class="group_name hide">${I(t)}</span>`,`<span class="covered_percent hide"><span class="${F(o.percent)}">${j(o.percent)}%</span></span>`,'<div class="file_list--responsive"><table class="file_list"><thead><tr>','<th class="cell--left"><div class="th-with-filter"><span class="th-label">File Name</span><input type="search" class="col-filter col-filter--name" placeholder="Filter paths\u2026"></div></th>',Me("Line Coverage","line","Covered","Lines")];i&&p.push(Me("Branch Coverage","branch","Covered","Branches")),c&&p.push(Me("Method Coverage","method","Covered","Methods")),p.push("</tr>");let E=n.length===1?"file":"files";return p.push(`<tr class="totals-row"><td class="strong t-file-count">${O(n.length)} ${E}</td>`,Y(o.percent,o.covered,o.total,"line",!0)),l&&p.push(Y(l.percent,l.covered,l.total,"branch",!0)),d&&p.push(Y(d.percent,d.covered,d.total,"method",!0)),p.push("</tr></thead><tbody>"),p.join("")}function ms(e){let{filename:t,coverage:n,branchCoverage:s,methodCoverage:i}=e,c=ee(t),r=[`data-covered-lines="${n.covered_lines}"`,`data-relevant-lines="${n.total_lines}"`];s&&r.push(`data-covered-branches="${n.covered_branches||0}"`,`data-total-branches="${n.total_branches||0}"`),i&&r.push(`data-covered-methods="${n.covered_methods||0}"`,`data-total-methods="${n.total_methods||0}"`);let o=[`<tr class="t-file" ${r.join(" ")}>`,`<td class="strong t-file__name"><a href="#${c}" class="src_link" title="${I(t)}">${I(t)}</a></td>`,Y(n.lines_covered_percent,n.covered_lines,n.total_lines,"line",!1)];if(s){let l=n.branches_covered_percent===void 0?100:n.branches_covered_percent;o.push(Y(l,n.covered_branches||0,n.total_branches||0,"branch",!1))}if(i){let l=n.methods_covered_percent===void 0?100:n.methods_covered_percent;o.push(Y(l,n.covered_methods||0,n.total_methods||0,"method",!1))}return o.push("</tr>"),o.join("")}function qe(e){let{filenames:t,allCoverage:n,branchCoverage:s,methodCoverage:i}=e,c=[hs(e)];for(let r of t){let o=n[r];o&&c.push(ms({filename:r,coverage:o,branchCoverage:s,methodCoverage:i}))}return c.push("</tbody></table></div></div>"),c.join("")}function bs(e){let{lineIndex:t,lineCov:n,branchesReport:s,missedMethodLines:i,branchCoverage:c,methodCoverage:r}=e,o=t+1;if(n==="ignored")return"skipped";if(c){let l=s[o];if(l&&l.some(([,d])=>d===0))return"missed-branch"}return r&&i.has(o)?"missed-method":n===null?"never":n===0?"missed":"covered"}function _s(e){let t={};if(!e)return t;for(let{coverage:n,report_line:s,type:i}of e){if(n==="ignored")continue;(t[s]||(t[s]=[])).push([i,n])}return t}function Es(e){let t=new Set;if(!e)return t;for(let n of e)if(n.coverage===0&&n.start_line&&n.end_line)for(let s=n.start_line;s<=n.end_line;s++)t.add(s);return t}function vs(e){let{index:t,source:n,lineCov:s,status:i,branchCoverage:c,lineBranches:r}=e,o=t+1,l=s!==null&&s!=="ignored"?` data-hits="${s}"`:"",d=[`<li class="${i}"${l} data-linenumber="${o}">`];if(i==="covered"||s!==null&&s!=="ignored"&&s!==0?d.push(`<span class="hits" data-content="${s}"></span>`):s==="ignored"&&d.push('<span class="hits" data-content="skipped"></span>'),c&&r)for(let[p,E]of r){let w=I(p);d.push(`<span class="hits" data-content="${w}: ${E}" title="${w} branch hit ${E} times"></span>`)}return d.push(`<code class="ruby">${I(n)}</code></li>`),d.join("")}function Bt(e,t,n,s){let i=ee(e),c=t.covered_lines,r=t.total_lines,o=n&&t.covered_branches||0,l=n&&t.total_branches||0,d=s&&t.covered_methods||0,p=s&&t.total_methods||0,E=(t.methods||[]).filter(C=>C.coverage===0),w=s&&E.length>0,T=_s(t.branches),H=Es(t.methods),A=[`<div class="source_table" id="${i}">`,'<div class="header">',`<h2>${I(e)}</h2>`,Dt({coveredLines:c,totalLines:r,coveredBranches:o,totalBranches:l,coveredMethods:d,totalMethods:p,branchCoverage:n,methodCoverage:s,showMethodToggle:w})];w&&A.push('<div class="t-missed-method-list" style="display: none"><ul>',E.map(C=>`<li><tt>${I(C.name)}</tt></li>`).join(""),"</ul></div>"),A.push("</div>","<pre><ol>");for(let C=0;C<t.source.length;C++){let oe=t.lines[C],fe=bs({lineIndex:C,lineCov:oe,branchesReport:T,missedMethodLines:H,branchCoverage:n,methodCoverage:s});A.push(vs({index:C,source:t.source[C],lineCov:oe,status:fe,branchCoverage:n,lineBranches:n?T[C+1]:void 0}))}return A.push("</ol></pre></div>"),A.join("")}Ue.registerLanguage("ruby",kt);var se=null;function Pt(e){let t=e.meta,n=t.branch_coverage,s=t.method_coverage;document.title=`Code coverage for ${t.project_name}`;let i=Object.keys(e.coverage),c=e.total.lines.total>0?e.total.lines.percent:100,r=document.createElement("link");r.rel="icon",r.type="image/png",r.href=`favicon_${F(c)}.png`,document.head.appendChild(r),n&&document.body.setAttribute("data-branch-coverage","true");let o=document.getElementById("content"),l=[qe({title:"All Files",filenames:i,stats:e.total,allCoverage:e.coverage,branchCoverage:n,methodCoverage:s})];for(let H of Object.keys(e.groups)){let A=e.groups[H];l.push(qe({title:H,filenames:A.files||[],stats:A,allCoverage:e.coverage,branchCoverage:n,methodCoverage:s}))}o.innerHTML=l.join("");let d={};for(let H of i)d[ee(H)]=H;se={idToFilename:d,coverage:e.coverage,branchCoverage:n,methodCoverage:s};let p=new Date(t.timestamp),E=document.getElementById("footer");E.innerHTML=`Generated <abbr class="timeago" title="${p.toISOString()}">${p.toISOString()}</abbr> by <a href="https://github.com/simplecov-ruby/simplecov">simplecov</a> v${I(t.simplecov_version)} using ${I(t.command_name)}`;let w=document.getElementById("source-legend"),T='<span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--covered"></span>Covered</span><span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--skipped"></span>Skipped</span><span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--missed"></span>Missed line</span>';n&&(T+='<span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--missed-branch"></span>Missed branch</span>'),s&&(T+='<span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--missed-method"></span>Missed method</span>'),w.innerHTML=T}function Ft(e){let t=document.getElementById(e);if(t)return t;if(!se)return null;let n=se.idToFilename[e];if(!n)return null;let s=Bt(n,se.coverage[n],se.branchCoverage,se.methodCoverage),i=document.querySelector(".source_files"),c=document.createElement("div");c.innerHTML=s;let r=c.firstElementChild;return i.appendChild(r),_("pre code",r).forEach(o=>Ue.highlightElement(o)),r}var Ut={};function ys(e,t){var s;return(s=Array.from(e.children).filter(i=>i.style.display!=="none")[t])!=null?s:null}function Ms(e){if(!e)return"";let t=e.getAttribute("data-order");if(t!==null)return Number.parseFloat(t);let n=(e.textContent||"").trim(),s=Number.parseFloat(n);return Number.isNaN(s)?n.toLowerCase():s}function ws(e,t){let n=e.id||e.getAttribute("data-sort-id")||"default",s=Ut[n],i=s&&s.colIndex===t&&s.direction==="asc"?"desc":"asc";Ut[n]={colIndex:t,direction:i};let c=e.querySelector("tbody"),r=Array.from(c.querySelectorAll("tr.t-file")).map(d=>({row:d,value:Ms(ys(d,t))}));r.sort((d,p)=>{let E=d.value,w=p.value,T;return typeof E=="number"&&typeof w=="number"?T=E-w:T=String(E).localeCompare(String(w)),i==="asc"?T:-T});let o=document.createDocumentFragment();r.forEach(({row:d})=>o.appendChild(d)),c.appendChild(o);let l=0;_("thead tr:first-child th",e).forEach(d=>{let p=Number.parseInt(d.getAttribute("colspan")||"1",10);d.classList.remove("sorting_asc","sorting_desc","sorting");let E=t>=l&&t<l+p;d.classList.add(E?i==="asc"?"sorting_asc":"sorting_desc":"sorting"),l+=p})}function Ts(e,t){let n=0;for(let s of _("thead tr:first-child th",e)){let i=Number.parseInt(s.getAttribute("colspan")||"1",10);if(s===t)return n+i-1;n+=i}return n}function Wt(){_("table.file_list").forEach(e=>{_("thead tr:first-child th",e).forEach(t=>{t.classList.add("sorting"),t.style.cursor="pointer",t.addEventListener("click",()=>ws(e,Ts(e,t)))})})}var ue=null;function we(){ue=null}function jt(){if(ue)return ue;let e=_(".file_list_container").filter(t=>t.style.display!=="none");return e.length?(ue=_("tbody tr.t-file",e[0]).filter(t=>t.style.display!=="none"),ue):[]}var Ss=240,Ls=160;function qt(e,t){let n=t+"px";e.forEach(s=>{let i=s.style;i.width=n,i.minWidth=n,i.maxWidth=n})}function Ge(){_(".file_list_container").forEach(e=>{if(e.style.display==="none"||e.offsetWidth===0)return;let t=R("table.file_list",e);if(!t)return;let n=_(".bar-sizer",t);if(n.length===0)return;let s=t.closest(".file_list--responsive");if(!s)return;s.style.visibility="hidden";let i=Ls,c=Ss;for(;i<c;){let r=Math.ceil((i+c)/2);qt(n,r),t.offsetWidth,t.scrollWidth<=s.clientWidth?i=r:c=r-1}qt(n,i),s.style.visibility=""})}var ze=0;function ie(){ze||(ze=requestAnimationFrame(()=>{ze=0,Ge()}))}var Te={line:{covered:"coveredLines",total:"relevantLines"},branch:{covered:"coveredBranches",total:"totalBranches"},method:{covered:"coveredMethods",total:"totalMethods"}};function zt(e){let t=_("tbody tr.t-file",e).filter(c=>c.style.display!=="none");function n(c){return t.reduce((r,o)=>r+(Number.parseInt(o.dataset[c]||"0",10)||0),0)}let s=R(".t-file-count",e),i=Number.parseInt(e.getAttribute("data-total-files")||"0",10);if(s){let c=t.length===1?" file":" files";s.textContent=t.length===i?O(i)+c:O(t.length)+"/"+O(i)+c}for(let c of Object.keys(Te)){let r=Te[c],o=`.t-totals__${c}`;R(o+"-pct",e)&&xs(e,o,n(r.covered),n(r.total))}}function xs(e,t,n,s){let i=R(t+"-pct",e),c=R(t+"-num",e),r=R(t+"-den",e);if(s===0){i&&(i.innerHTML="",i.classList.remove("green","yellow","red")),c&&(c.textContent=""),r&&(r.textContent="");return}let o=n*100/s,l=F(o);i&&(i.innerHTML=`<div class="coverage-cell">${je(o)}<span class="coverage-pct">${j(o)}%</span></div>`,i.classList.remove("green","yellow","red"),i.classList.add(l)),c&&(c.textContent=O(n)+"/"),r&&(r.textContent=O(s))}var As={gt:(e,t)=>e>t,gte:(e,t)=>e>=t,eq:(e,t)=>e===t,lte:(e,t)=>e<=t,lt:(e,t)=>e<t};function Cs(e,t,n){let s=As[e];return s?s(t,n):!0}function Rs(e){let t=[];for(let n of _(".col-filter__value",e)){let s=n;if(!s.value)continue;let i=Number.parseFloat(s.value);if(Number.isNaN(i))continue;let c=s.dataset.type||"",r=R(`.col-filter__op[data-type="${c}"]`,e),o=r?r.value:"",l=Te[c];o&&l&&t.push({attrs:l,op:o,threshold:i})}return t}function Gt(e){let t=R("table.file_list",e);if(!t)return;let n=R(".col-filter--name",e),s=n?n.value.trim().toLowerCase():"",i=Rs(e);_("tbody tr.t-file",t).forEach(c=>{let r=c,o=(c.children[0].textContent||"").toLowerCase(),l=(!s||o.includes(s))&&i.every(d=>{let p=Number.parseInt(r.dataset[d.attrs.covered]||"0",10)||0,E=Number.parseInt(r.dataset[d.attrs.total]||"0",10)||0,w=E>0?p*100/E:100;return Cs(d.op,w,d.threshold)});r.style.display=l?"":"none"}),we(),zt(e),ie()}function Ke(e){let t=Number.parseFloat(e.value),n=e.closest(".col-filter__coverage"),s=n?n.querySelector(".col-filter__op"):null;if(!s)return;let i=s.querySelector('option[value="gt"]'),c=s.querySelector('option[value="lt"]');if(i&&(i.disabled=t>=100),c&&(c.disabled=t<=0),s.selectedOptions[0]&&s.selectedOptions[0].disabled){let r=s.querySelector("option:not(:disabled)");r&&(s.value=r.value)}}function Kt(){_(".col-filter__value").forEach(e=>Ke(e)),_(".col-filter--name, .col-filter__op, .col-filter__value, .col-filter__coverage").forEach(e=>{e.addEventListener("click",t=>t.stopPropagation())}),P(document,"input",".col-filter--name, .col-filter__op, .col-filter__value",function(){this.classList.contains("col-filter__value")&&Ke(this),Gt(this.closest(".file_list_container"))}),P(document,"change",".col-filter__op, .col-filter__value",function(){this.classList.contains("col-filter__value")&&Ke(this),Gt(this.closest(".file_list_container"))})}var $=null;function Xe(){return $!==null}function re(e){$&&$.classList.remove("keyboard-focus"),$=e,$&&($.classList.add("keyboard-focus"),$.scrollIntoView({block:"nearest"}))}function Ze(e){let t=jt();if(!t.length)return;if(!$||t.indexOf($)===-1){re(e===1?t[0]:t[t.length-1]);return}let n=t.indexOf($)+e;n>=0&&n<t.length&&re(t[n])}function Xt(){if(!$)return;let e=$.querySelector("a.src_link");e&&(window.location.hash=e.getAttribute("href").substring(1))}var q,Q,Ve,de=null,Se="";function Ye(){return q.open}function Qe(){return Q}function Vt(){if(!de)return;Se&&(de.insertAdjacentHTML("afterbegin",Se),Se="");let e=document.querySelector(".source_files");e&&e.appendChild(de),de=null}function Ns(e,t){Vt();let n=Ft(e);if(!n)return;let s=n.querySelector(".header");if(s&&(Se=s.outerHTML,Ve.innerHTML=s.innerHTML,s.remove()),de=n,Q.appendChild(n),q.open||q.showModal(),document.documentElement.style.overflow="hidden",Q.focus(),t){let i=Q.querySelector('li[data-linenumber="'+t+'"]');i&&(Q.scrollTop=i.offsetTop)}}function Zt(e){if(re(null),we(),q.open&&(Vt(),q.close(),Q.innerHTML="",Ve.innerHTML="",document.documentElement.style.overflow=""),e){let n=document.querySelector(".group_tabs a."+e);if(n){_(".group_tabs li").forEach(i=>i.classList.remove("active")),n.parentElement.classList.add("active"),_(".file_list_container").forEach(i=>i.style.display="none");let s=document.getElementById(e);s&&(s.style.display="")}}let t=document.getElementById("wrapper");t&&!t.classList.contains("hide")&&ie()}function xe(){let e=window.location.hash.substring(1);if(!e){let t=document.querySelector(".group_tabs a");t&&Zt(t.getAttribute("href").replace("#",""));return}if(e.charAt(0)==="_")Zt(e.substring(1));else{let t=e.split("-L");if(!document.querySelector(".group_tabs li.active")){let n=document.querySelector(".group_tabs li");n&&n.classList.add("active")}Ns(t[0],t[1])}}function Le(){let e=document.querySelector(".group_tabs li.active a");e&&(window.location.hash=e.getAttribute("href").replace("#","#_"))}function Yt(){q=document.getElementById("source-dialog"),Q=document.getElementById("source-dialog-body"),Ve=document.getElementById("source-dialog-title"),q.querySelector(".source-dialog__close").addEventListener("click",Le),q.addEventListener("click",e=>{e.target===q&&Le()})}function Os(){return _(".source-dialog .source_table li.missed, .source-dialog .source_table li.missed-branch, .source-dialog .source_table li.missed-method")}function Je(e){let t=Os();if(!t.length)return;let n=Qe(),s=n.scrollTop+n.clientHeight/2,i=e===1?t.find(c=>c.offsetTop>s)||t[0]:t.findLast(c=>c.offsetTop<s-10)||t[t.length-1];n.scrollTop=i.offsetTop-n.clientHeight/3}function Qt(){P(document,"click",".t-missed-method-toggle",function(e){e.preventDefault();let t=this.closest(".header")||this.closest(".source-dialog__title")||this.closest(".source-dialog__header"),n=t?t.querySelector(".t-missed-method-list"):null;n&&(n.style.display=n.style.display==="none"?"":"none")}),P(document,"click","a.src_link",function(e){e.preventDefault(),window.location.hash=this.getAttribute("href").substring(1)}),P(document,"click","table.file_list tbody tr",function(e){if(e.target.closest("a"))return;let t=this.querySelector("a.src_link");t&&(window.location.hash=t.getAttribute("href").substring(1))}),P(document,"click",".source-dialog .source_table li[data-linenumber]",function(e){e.preventDefault(),Qe().scrollTop=this.offsetTop;let t=this.dataset.linenumber,n=window.location.hash.substring(1).replace(/-L.*/,"");window.location.replace(window.location.href.replace(/#.*/,"#"+n+"-L"+t))}),window.addEventListener("hashchange",xe)}var Jt="simplecov-dark-mode";function Is(){try{return localStorage.getItem(Jt)}catch(e){return null}}function $s(e){try{localStorage.setItem(Jt,e)}catch(t){}}function en(){let e=document.getElementById("dark-mode-toggle");if(!e)return;let t=document.documentElement;function n(){return t.classList.contains("dark-mode")||!t.classList.contains("light-mode")&&window.matchMedia("(prefers-color-scheme: dark)").matches}function s(){e.textContent=n()?"\u2600\uFE0F Light":"\u{1F319} Dark"}s(),e.addEventListener("click",()=>{let i=n();t.classList.toggle("light-mode",i),t.classList.toggle("dark-mode",!i),$s(i?"light":"dark"),s()}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Is()||s()})}function Hs(){let e=_(".file_list_container").filter(n=>n.style.display!=="none"),t=e.length?R(".col-filter--name",e[0]):null;t&&t.focus()}function ks(e,t){Ye()?(e.preventDefault(),Le()):t?e.target.blur():Xe()&&re(null)}function Ds(e){e.key==="n"&&!e.shiftKey&&(e.preventDefault(),Je(1)),(e.key==="N"||e.key==="n"&&e.shiftKey||e.key==="p")&&(e.preventDefault(),Je(-1))}function Bs(e){e.key==="j"&&(e.preventDefault(),Ze(1)),e.key==="k"&&(e.preventDefault(),Ze(-1)),e.key==="Enter"&&Xe()&&(e.preventDefault(),Xt())}function tn(e){let t=e.target.matches("input, select, textarea");e.key==="/"&&!t?(e.preventDefault(),Hs()):e.key==="Escape"?ks(e,t):t||(Ye()?Ds(e):Bs(e))}function nn(){let e=1/0;_("abbr.timeago").forEach(t=>{let n=new Date(t.getAttribute("title")||"");Number.isNaN(n.getTime())||(t.textContent=dt(n),e=Math.min(e,ft(n)))}),e<1/0&&setTimeout(nn,e)}function Ps(){_(".file_list_container").forEach(e=>e.style.display="none"),_(".file_list_container").forEach(e=>{let t=e.id,n=e.querySelector(".group_name"),s=e.querySelector(".covered_percent"),i=document.createElement("li");i.setAttribute("role","tab");let c=document.createElement("a");c.href="#"+t,c.className=t,c.innerHTML=(n?n.innerHTML:"")+" ("+(s?s.innerHTML:"")+")",i.appendChild(c),document.querySelector(".group_tabs").appendChild(i)}),P(document.querySelector(".group_tabs"),"click","a",function(e){e.preventDefault(),window.location.hash=this.getAttribute("href").replace("#","#_")})}function Fs(e){e&&(e.style.transition="opacity 0.3s",e.style.opacity="0",setTimeout(()=>{e.style.display="none"},300));let t=document.getElementById("wrapper");t&&t.classList.remove("hide"),Ge()}function Us(){return J(this,null,function*(){let e=window.SIMPLECOV_DATA,t=document.getElementById("loading");t&&(t.style.display=""),yield pt(Object.keys(e.coverage)),Pt(e),nn(),en(),Wt(),Kt(),document.addEventListener("keydown",tn),Yt(),Qt(),Ps(),window.addEventListener("resize",ie),xe(),Fs(t)})}document.addEventListener("DOMContentLoaded",Us);})();
15
+ </div>`;let o=r-s,c=r>0?s*100/r:100,d=P(c),p=e.suffix||"covered",M=e.missedClass||"red",w=`<div class="t-${t}-summary">
16
+ ${n}: <span class="${d}"><b>${U(c)}%</b></span><span class="coverage-cell__fraction"> ${s}/${r} ${p}</span>`;if(o>0){let A=i?`<a href="#" class="t-missed-method-toggle"><b>${o}</b> missed</a>`:`<span class="${M}"><b>${o}</b> missed</span>`;w+=`<span class="coverage-cell__fraction">,</span>
17
+ ${A}`}return w+=`
18
+ </div>`,w}function qt(e){return'<div class="summary-stats">'+je({type:"line",label:"Line coverage",covered:e.coveredLines,total:e.totalLines,enabled:!0,suffix:"relevant lines covered"})+je({type:"branch",label:"Branch coverage",covered:e.coveredBranches,total:e.totalBranches,enabled:e.branchCoverage,missedClass:"missed-branch-text"})+je({type:"method",label:"Method coverage",covered:e.coveredMethods,total:e.totalMethods,enabled:e.methodCoverage,missedClass:"missed-method-text-color",toggle:e.showMethodToggle})+"</div>"}function xs(e){let{title:t,filenames:n,stats:s,branchCoverage:r,methodCoverage:l}=e,i=gt(t),o=s.lines,c=r?s.branches:void 0,d=l?s.methods:void 0,p=[`<div class="file_list_container" id="${i}" data-total-files="${n.length}">`,`<span class="group_name hide">${I(t)}</span>`,`<span class="covered_percent hide"><span class="${P(o.percent)}">${U(o.percent)}%</span></span>`,'<div class="file_list--responsive"><table class="file_list"><thead><tr>','<th class="cell--left"><div class="th-with-filter"><span class="th-label">File Name</span><input type="search" class="col-filter col-filter--name" placeholder="Filter paths\u2026"></div></th>',Se("Line Coverage","line","Covered","Lines")];r&&p.push(Se("Branch Coverage","branch","Covered","Branches")),l&&p.push(Se("Method Coverage","method","Covered","Methods")),p.push("</tr>");let M=n.length===1?"file":"files";return p.push(`<tr class="totals-row"><td class="strong t-file-count">${x(n.length)} ${M}</td>`,Y(o.percent,o.covered,o.total,"line",!0)),c&&p.push(Y(c.percent,c.covered,c.total,"branch",!0)),d&&p.push(Y(d.percent,d.covered,d.total,"method",!0)),p.push("</tr></thead><tbody>"),p.join("")}function As(e){let{filename:t,coverage:n,branchCoverage:s,methodCoverage:r}=e,l=ee(t),i=[`data-covered-lines="${n.covered_lines}"`,`data-relevant-lines="${n.total_lines}"`];s&&i.push(`data-covered-branches="${n.covered_branches||0}"`,`data-total-branches="${n.total_branches||0}"`),r&&i.push(`data-covered-methods="${n.covered_methods||0}"`,`data-total-methods="${n.total_methods||0}"`);let o=[`<tr class="t-file" ${i.join(" ")}>`,`<td class="strong t-file__name"><a href="#${l}" class="src_link" title="${I(t)}">${I(t)}</a></td>`,Y(n.lines_covered_percent,n.covered_lines,n.total_lines,"line",!1)];if(s){let c=n.branches_covered_percent===void 0?100:n.branches_covered_percent;o.push(Y(c,n.covered_branches||0,n.total_branches||0,"branch",!1))}if(r){let c=n.methods_covered_percent===void 0?100:n.methods_covered_percent;o.push(Y(c,n.covered_methods||0,n.total_methods||0,"method",!1))}return o.push("</tr>"),o.join("")}function Ge(e){let{filenames:t,allCoverage:n,branchCoverage:s,methodCoverage:r}=e,l=[xs(e)];for(let i of t){let o=n[i];o&&l.push(As({filename:i,coverage:o,branchCoverage:s,methodCoverage:r}))}return l.push("</tbody></table></div></div>"),l.join("")}function Cs(e){let{lineIndex:t,lineCov:n,branchesReport:s,missedMethodLines:r,branchCoverage:l,methodCoverage:i}=e,o=t+1;if(n==="ignored")return"skipped";if(l){let c=s[o];if(c&&c.some(([,d])=>d===0))return"missed-branch"}return i&&r.has(o)?"missed-method":n===null?"never":n===0?"missed":"covered"}function Rs(e){let t={};if(!e)return t;for(let{coverage:n,report_line:s,type:r}of e){if(n==="ignored")continue;(t[s]||(t[s]=[])).push([r,n])}return t}function Ns(e){let t=new Set;if(!e)return t;for(let n of e)if(n.coverage===0&&n.start_line&&n.end_line)for(let s=n.start_line;s<=n.end_line;s++)t.add(s);return t}function Os(e){let{index:t,source:n,lineCov:s,status:r,branchCoverage:l,lineBranches:i}=e,o=t+1,c=s!==null&&s!=="ignored"?` data-hits="${s}"`:"",d=[`<li class="${r}"${c} data-linenumber="${o}">`];if(r==="covered"||s!==null&&s!=="ignored"&&s!==0?d.push(`<span class="hits" data-content="${s}"></span>`):s==="ignored"&&d.push('<span class="hits" data-content="skipped"></span>'),l&&i)for(let[p,M]of i){let w=I(p);d.push(`<span class="hits" data-content="${w}: ${M}" title="${w} branch hit ${M} times"></span>`)}return d.push(`<code class="ruby">${I(n)}</code></li>`),d.join("")}function Wt(e,t,n,s){let r=ee(e),l=t.covered_lines,i=t.total_lines,o=n&&t.covered_branches||0,c=n&&t.total_branches||0,d=s&&t.covered_methods||0,p=s&&t.total_methods||0,M=(t.methods||[]).filter(N=>N.coverage===0),w=s&&M.length>0,A=Rs(t.branches),$=Ns(t.methods),C=[`<div class="source_table" id="${r}">`,'<div class="header">',`<h2>${I(e)}</h2>`,qt({coveredLines:l,totalLines:i,coveredBranches:o,totalBranches:c,coveredMethods:d,totalMethods:p,branchCoverage:n,methodCoverage:s,showMethodToggle:w})];w&&C.push('<div class="t-missed-method-list" style="display: none"><ul>',M.map(N=>`<li><tt>${I(N.name)}</tt></li>`).join(""),"</ul></div>"),C.push("</div>","<pre><ol>");for(let N=0;N<t.source.length;N++){let le=t.lines[N],pe=Cs({lineIndex:N,lineCov:le,branchesReport:A,missedMethodLines:$,branchCoverage:n,methodCoverage:s});C.push(Os({index:N,source:t.source[N],lineCov:le,status:pe,branchCoverage:n,lineBranches:n?A[N+1]:void 0}))}return C.push("</ol></pre></div>"),C.join("")}Ue.registerLanguage("ruby",Pt);var se=null;function Ut(e){let t=e.meta,n=t.branch_coverage,s=t.method_coverage;document.title=`Code coverage for ${t.project_name}`;let r=Object.keys(e.coverage),l=e.total.lines.total>0?e.total.lines.percent:100,i=document.createElement("link");i.rel="icon",i.type="image/png",i.href=`favicon_${P(l)}.png`,document.head.appendChild(i),n&&document.body.setAttribute("data-branch-coverage","true");let o=document.getElementById("content"),c=[Ge({title:"All Files",filenames:r,stats:e.total,allCoverage:e.coverage,branchCoverage:n,methodCoverage:s})];for(let $ of Object.keys(e.groups)){let C=e.groups[$];c.push(Ge({title:$,filenames:C.files||[],stats:C,allCoverage:e.coverage,branchCoverage:n,methodCoverage:s}))}o.innerHTML=c.join("");let d={};for(let $ of r)d[ee($)]=$;se={idToFilename:d,coverage:e.coverage,branchCoverage:n,methodCoverage:s};let p=new Date(t.timestamp),M=document.getElementById("footer");M.innerHTML=`Generated <abbr class="timeago" title="${p.toISOString()}">${p.toISOString()}</abbr> by <a href="https://github.com/simplecov-ruby/simplecov">simplecov</a> v${I(t.simplecov_version)} using ${I(t.command_name)}`;let w=document.getElementById("source-legend"),A='<span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--covered"></span>Covered</span><span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--skipped"></span>Skipped</span><span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--missed"></span>Missed line</span>';n&&(A+='<span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--missed-branch"></span>Missed branch</span>'),s&&(A+='<span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--missed-method"></span>Missed method</span>'),w.innerHTML=A}function jt(e){let t=document.getElementById(e);if(t)return t;if(!se)return null;let n=se.idToFilename[e];if(!n)return null;let s=Wt(n,se.coverage[n],se.branchCoverage,se.methodCoverage),r=document.querySelector(".source_files"),l=document.createElement("div");l.innerHTML=s;let i=l.firstElementChild;return r.appendChild(i),E("pre code",i).forEach(o=>Ue.highlightElement(o)),i}var Ke=1e3,Is="t-window-hidden",zt=new WeakSet;function Hs(e,t){let n=e.querySelector("tr.t-show-all");if(!n){n=document.createElement("tr"),n.className="t-show-all";let s=document.createElement("td");s.colSpan=t,n.appendChild(s),n.addEventListener("click",r=>{r.preventDefault(),zt.add(e),re(e.closest("table"))}),e.appendChild(n)}return n}function re(e){let t=e.querySelector("tbody");if(!t)return;let n=t.querySelectorAll("tr.t-file"),s=zt.has(t),r=0;if(n.forEach(i=>{let o=i.style.display==="none";o||(r+=1),i.classList.toggle(Is,!s&&!o&&r>Ke)}),s||r<=Ke){let i=t.querySelector("tr.t-show-all");i&&(i.style.display="none");return}let l=Hs(t,n[0].children.length);l.style.display="",l.firstElementChild.innerHTML=`Showing the first ${x(Ke)} of ${x(r)} files. <a href="#" class="t-show-all__link">Show all</a>`,t.appendChild(l)}var Xt={};function $s(e,t){let n=0,s=e.children;for(let r=0;r<s.length;r++)if(s[r].style.display!=="none"){if(n===t)return r;n+=1}return null}function ks(e){if(!e)return"";let t=e.getAttribute("data-order");if(t!==null)return Number.parseFloat(t);let n=(e.textContent||"").trim(),s=Number.parseFloat(n);return Number.isNaN(s)?n.toLowerCase():s}var Gt=new WeakMap;function Vt(e,t){var l;if(t===null)return"";let n=Gt.get(e);n||(n=new Map,Gt.set(e,n));let s=n.get(t);if(s!==void 0)return s;let r=ks((l=e.children[t])!=null?l:null);return n.set(t,r),r}var Ds=new Intl.Collator;function Zt(e,t){return typeof e=="number"&&typeof t=="number"?e-t:Ds.compare(String(e),String(t))}function Yt(e){return e.id||e.getAttribute("data-sort-id")||"default"}function Xe(e,t,n){Xt[Yt(e)]={colIndex:t,direction:n};let s=0;E("thead tr:first-child th",e).forEach(r=>{let l=Number.parseInt(r.getAttribute("colspan")||"1",10);r.classList.remove("sorting_asc","sorting_desc","sorting");let i=t>=s&&t<s+l;r.classList.add(i?n==="asc"?"sorting_asc":"sorting_desc":"sorting"),s+=l})}function Qt(e,t){let n=document.createDocumentFragment();t.forEach(s=>n.appendChild(s)),e.appendChild(n)}function Kt(e,t){let n=Xt[Yt(e)],s=n&&n.colIndex===t&&n.direction==="asc"?"desc":"asc",r=e.querySelector("tbody"),l=Array.from(r.querySelectorAll("tr.t-file"));if(l.length===0){Xe(e,t,s);return}if(n&&n.colIndex===t)l.reverse();else{let i=$s(l[0],t),o=l.map(d=>({row:d,value:Vt(d,i)})),c=s==="asc"?1:-1;o.sort((d,p)=>c*Zt(d.value,p.value)),l=o.map(({row:d})=>d)}Qt(r,l),re(e),Xe(e,t,s)}var Bs=500,de=null;function Fs(){if(de)return de;let e=document.createElement("div");return e.id="sort-overlay",e.innerHTML='<span id="sort-overlay-label">Sorting\u2026</span>',e.style.display="none",document.body.appendChild(e),de=e,e}function Ps(){let e=Fs();e.style.transition="none",e.style.opacity="1",e.style.display="flex"}function qs(){if(!de)return;let e=de;e.style.transition="opacity 0.15s",e.style.opacity="0",setTimeout(()=>{e.style.display="none"},150)}function Ws(e,t){if(e.querySelectorAll("tbody tr.t-file").length<Bs){Kt(e,t);return}Ps(),requestAnimationFrame(()=>requestAnimationFrame(()=>{Kt(e,t),qs()}))}function Us(e,t){let n=0;for(let s of E("thead tr:first-child th",e)){let r=Number.parseInt(s.getAttribute("colspan")||"1",10);if(s===t)return n+r-1;n+=r}return n}function js(e,t){let n=Array.from(e.children);if(t){let r=n.findIndex(l=>l.classList.contains(`cell--${t}-pct`));if(r!==-1)return r}let s=n.findIndex(r=>r.hasAttribute("data-order"));return s===-1?null:s}function zs(e,t){let n=e.querySelector("tbody");if(!n)return;let s=Array.from(n.querySelectorAll("tr.t-file"));if(s.length===0)return;let r=js(s[0],t);if(r===null)return;let l=s.map(i=>({row:i,value:Vt(i,r)}));l.sort((i,o)=>Zt(i.value,o.value)),Qt(n,l.map(({row:i})=>i)),Xe(e,r,"asc")}function Jt(e){E("table.file_list").forEach(t=>{E("thead tr:first-child th",t).forEach(n=>{n.classList.add("sorting"),n.style.cursor="pointer",n.addEventListener("click",()=>Ws(t,Us(t,n)))}),zs(t,e),re(t)})}var fe=null;function Te(){fe=null}function en(){if(fe)return fe;let e=E(".file_list_container").filter(t=>t.style.display!=="none");return e.length?(fe=E("tbody tr.t-file",e[0]).filter(t=>t.style.display!=="none"),fe):[]}var Gs=240,Ks=160;function tn(e,t){e.style.setProperty("--bar-sizer-width",t+"px")}function Ze(){E(".file_list_container").forEach(e=>{if(e.style.display==="none"||e.offsetWidth===0)return;let t=R("table.file_list",e);if(!t||!R(".bar-sizer",t))return;let n=t.closest(".file_list--responsive");if(!n)return;n.style.visibility="hidden";let s=Ks,r=Gs;for(;s<r;){let l=Math.ceil((s+r)/2);tn(t,l),t.offsetWidth,t.scrollWidth<=n.clientWidth?s=l:r=l-1}tn(t,s),n.style.visibility=""})}var Ve=0;function ie(){Ve||(Ve=requestAnimationFrame(()=>{Ve=0,Ze()}))}var Le={line:{covered:"coveredLines",total:"relevantLines"},branch:{covered:"coveredBranches",total:"totalBranches"},method:{covered:"coveredMethods",total:"totalMethods"}};function nn(e){let t=E("tbody tr.t-file",e).filter(l=>l.style.display!=="none");function n(l){return t.reduce((i,o)=>i+(Number.parseInt(o.dataset[l]||"0",10)||0),0)}let s=R(".t-file-count",e),r=Number.parseInt(e.getAttribute("data-total-files")||"0",10);if(s){let l=t.length===1?" file":" files";s.textContent=t.length===r?x(r)+l:x(t.length)+"/"+x(r)+l}for(let l of Object.keys(Le)){let i=Le[l],o=`.t-totals__${l}`;R(o+"-pct",e)&&Xs(e,o,n(i.covered),n(i.total))}}function Xs(e,t,n,s){let r=R(t+"-pct",e),l=R(t+"-num",e),i=R(t+"-den",e);if(s===0){r&&(r.innerHTML="",r.classList.remove("green","yellow","red")),l&&(l.textContent=""),i&&(i.textContent="");return}let o=n*100/s,c=P(o);r&&(r.innerHTML=`<div class="coverage-cell">${ze(o)}<span class="coverage-pct">${U(o)}%</span></div>`,r.classList.remove("green","yellow","red"),r.classList.add(c)),l&&(l.textContent=x(n)+"/"),i&&(i.textContent=x(s))}var Vs={gt:(e,t)=>e>t,gte:(e,t)=>e>=t,eq:(e,t)=>e===t,lte:(e,t)=>e<=t,lt:(e,t)=>e<t};function Zs(e,t,n){let s=Vs[e];return s?s(t,n):!0}function Ys(e){let t=[];for(let n of E(".col-filter__value",e)){let s=n;if(!s.value)continue;let r=Number.parseFloat(s.value);if(Number.isNaN(r))continue;let l=s.dataset.type||"",i=R(`.col-filter__op[data-type="${l}"]`,e),o=i?i.value:"",c=Le[l];o&&c&&t.push({attrs:c,op:o,threshold:r})}return t}var sn=new WeakMap;function Qs(e){let t=sn.get(e);return t===void 0&&(t=(e.children[0].textContent||"").toLowerCase(),sn.set(e,t)),t}function rn(e){let t=R("table.file_list",e);if(!t)return;let n=R(".col-filter--name",e),s=n?n.value.trim().toLowerCase():"",r=Ys(e);E("tbody tr.t-file",t).forEach(l=>{let i=l,c=(!s||Qs(l).includes(s))&&r.every(d=>{let p=Number.parseInt(i.dataset[d.attrs.covered]||"0",10)||0,M=Number.parseInt(i.dataset[d.attrs.total]||"0",10)||0,w=M>0?p*100/M:100;return Zs(d.op,w,d.threshold)})?"":"none";i.style.display!==c&&(i.style.display=c)}),re(t),Te(),nn(e),ie()}function Ye(e){let t=Number.parseFloat(e.value),n=e.closest(".col-filter__coverage"),s=n?n.querySelector(".col-filter__op"):null;if(!s)return;let r=s.querySelector('option[value="gt"]'),l=s.querySelector('option[value="lt"]');if(r&&(r.disabled=t>=100),l&&(l.disabled=t<=0),s.selectedOptions[0]&&s.selectedOptions[0].disabled){let i=s.querySelector("option:not(:disabled)");i&&(s.value=i.value)}}function on(){E(".col-filter__value").forEach(e=>Ye(e)),E(".col-filter--name, .col-filter__op, .col-filter__value, .col-filter__coverage").forEach(e=>{e.addEventListener("click",t=>t.stopPropagation())}),F(document,"input",".col-filter--name, .col-filter__op, .col-filter__value",function(){this.classList.contains("col-filter__value")&&Ye(this),rn(this.closest(".file_list_container"))}),F(document,"change",".col-filter__op, .col-filter__value",function(){this.classList.contains("col-filter__value")&&Ye(this),rn(this.closest(".file_list_container"))})}var H=null;function Qe(){return H!==null}function oe(e){H&&H.classList.remove("keyboard-focus"),H=e,H&&(H.classList.add("keyboard-focus"),H.scrollIntoView({block:"nearest"}))}function Je(e){let t=en();if(!t.length)return;if(!H||t.indexOf(H)===-1){oe(e===1?t[0]:t[t.length-1]);return}let n=t.indexOf(H)+e;n>=0&&n<t.length&&oe(t[n])}function ln(){if(!H)return;let e=H.querySelector("a.src_link");e&&(window.location.hash=e.getAttribute("href").substring(1))}var j,Q,et,ge=null,xe="";function tt(){return j.open}function nt(){return Q}function an(){if(!ge)return;xe&&(ge.insertAdjacentHTML("afterbegin",xe),xe="");let e=document.querySelector(".source_files");e&&e.appendChild(ge),ge=null}function Js(e,t){an();let n=jt(e);if(!n)return;let s=n.querySelector(".header");if(s&&(xe=s.outerHTML,et.innerHTML=s.innerHTML,s.remove()),ge=n,Q.appendChild(n),j.open||j.showModal(),document.documentElement.style.overflow="hidden",Q.focus(),t){let r=Q.querySelector('li[data-linenumber="'+t+'"]');r&&(Q.scrollTop=r.offsetTop)}}function cn(e){if(oe(null),Te(),j.open&&(an(),j.close(),Q.innerHTML="",et.innerHTML="",document.documentElement.style.overflow=""),e){let n=document.querySelector(".group_tabs a."+e);if(n){E(".group_tabs li").forEach(r=>r.classList.remove("active")),n.parentElement.classList.add("active"),E(".file_list_container").forEach(r=>r.style.display="none");let s=document.getElementById(e);s&&(s.style.display="")}}let t=document.getElementById("wrapper");t&&!t.classList.contains("hide")&&ie()}function Ce(){let e=window.location.hash.substring(1);if(!e){let t=document.querySelector(".group_tabs a");t&&cn(t.getAttribute("href").replace("#",""));return}if(e.charAt(0)==="_")cn(e.substring(1));else{let t=e.split("-L");if(!document.querySelector(".group_tabs li.active")){let n=document.querySelector(".group_tabs li");n&&n.classList.add("active")}Js(t[0],t[1])}}function Ae(){let e=document.querySelector(".group_tabs li.active a");e&&(window.location.hash=e.getAttribute("href").replace("#","#_"))}function un(){j=document.getElementById("source-dialog"),Q=document.getElementById("source-dialog-body"),et=document.getElementById("source-dialog-title"),j.querySelector(".source-dialog__close").addEventListener("click",Ae),j.addEventListener("click",e=>{e.target===j&&Ae()})}function er(){return E(".source-dialog .source_table li.missed, .source-dialog .source_table li.missed-branch, .source-dialog .source_table li.missed-method")}function st(e){let t=er();if(!t.length)return;let n=nt(),s=n.scrollTop+n.clientHeight/2,r=e===1?t.find(l=>l.offsetTop>s)||t[0]:t.findLast(l=>l.offsetTop<s-10)||t[t.length-1];n.scrollTop=r.offsetTop-n.clientHeight/3}function dn(){F(document,"click",".t-missed-method-toggle",function(e){e.preventDefault();let t=this.closest(".header")||this.closest(".source-dialog__title")||this.closest(".source-dialog__header"),n=t?t.querySelector(".t-missed-method-list"):null;n&&(n.style.display=n.style.display==="none"?"":"none")}),F(document,"click","a.src_link",function(e){e.preventDefault(),window.location.hash=this.getAttribute("href").substring(1)}),F(document,"click","table.file_list tbody tr",function(e){if(e.target.closest("a"))return;let t=this.querySelector("a.src_link");t&&(window.location.hash=t.getAttribute("href").substring(1))}),F(document,"click",".source-dialog .source_table li[data-linenumber]",function(e){e.preventDefault(),nt().scrollTop=this.offsetTop;let t=this.dataset.linenumber,n=window.location.hash.substring(1).replace(/-L.*/,"");window.location.replace(window.location.href.replace(/#.*/,"#"+n+"-L"+t))}),window.addEventListener("hashchange",Ce)}var fn="simplecov-dark-mode";function tr(){try{return localStorage.getItem(fn)}catch(e){return null}}function nr(e){try{localStorage.setItem(fn,e)}catch(t){}}function gn(){let e=document.getElementById("dark-mode-toggle");if(!e)return;let t=document.documentElement;function n(){return t.classList.contains("dark-mode")||!t.classList.contains("light-mode")&&window.matchMedia("(prefers-color-scheme: dark)").matches}function s(){e.textContent=n()?"\u2600\uFE0F Light":"\u{1F319} Dark"}s(),e.addEventListener("click",()=>{let r=n();t.classList.toggle("light-mode",r),t.classList.toggle("dark-mode",!r),nr(r?"light":"dark"),s()}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{tr()||s()})}function sr(){let e=E(".file_list_container").filter(n=>n.style.display!=="none"),t=e.length?R(".col-filter--name",e[0]):null;t&&t.focus()}function rr(e,t){tt()?(e.preventDefault(),Ae()):t?e.target.blur():Qe()&&oe(null)}function ir(e){e.key==="n"&&!e.shiftKey&&(e.preventDefault(),st(1)),(e.key==="N"||e.key==="n"&&e.shiftKey||e.key==="p")&&(e.preventDefault(),st(-1))}function or(e){e.key==="j"&&(e.preventDefault(),Je(1)),e.key==="k"&&(e.preventDefault(),Je(-1)),e.key==="Enter"&&Qe()&&(e.preventDefault(),ln())}function pn(e){let t=e.target.matches("input, select, textarea");e.key==="/"&&!t?(e.preventDefault(),sr()):e.key==="Escape"?rr(e,t):t||(tt()?ir(e):or(e))}function hn(){let e=1/0;E("abbr.timeago").forEach(t=>{let n=new Date(t.getAttribute("title")||"");Number.isNaN(n.getTime())||(t.textContent=ht(n),e=Math.min(e,mt(n)))}),e<1/0&&setTimeout(hn,e)}function lr(){E(".file_list_container").forEach(e=>e.style.display="none"),E(".file_list_container").forEach(e=>{let t=e.id,n=e.querySelector(".group_name"),s=e.querySelector(".covered_percent"),r=document.createElement("li");r.setAttribute("role","tab");let l=document.createElement("a");l.href="#"+t,l.className=t,l.innerHTML=(n?n.innerHTML:"")+" ("+(s?s.innerHTML:"")+")",r.appendChild(l),document.querySelector(".group_tabs").appendChild(r)}),F(document.querySelector(".group_tabs"),"click","a",function(e){e.preventDefault(),window.location.hash=this.getAttribute("href").replace("#","#_")})}function cr(e){e&&(e.style.transition="opacity 0.3s",e.style.opacity="0",setTimeout(()=>{e.style.display="none"},300));let t=document.getElementById("wrapper");t&&t.classList.remove("hide"),Ze()}function ar(){return J(this,null,function*(){let e=window.SIMPLECOV_DATA,t=document.getElementById("loading");t&&(t.style.display=""),yield Et(Object.keys(e.coverage)),Ut(e),hn(),gn(),Jt(e.meta.primary_coverage),on(),document.addEventListener("keydown",pn),un(),dn(),lr(),window.addEventListener("resize",ie),Ce(),cr(t)})}document.addEventListener("DOMContentLoaded",ar);})();
@@ -61,7 +61,8 @@ module SimpleCov
61
61
  project_name: SimpleCov.project_name,
62
62
  timestamp: @result.created_at.iso8601(3),
63
63
  root: SimpleCov.root,
64
- commit: git_commit
64
+ commit: git_commit,
65
+ primary_coverage: SimpleCov.primary_coverage.to_s
65
66
  }.merge!(coverage_flags)
66
67
  end
67
68
 
@@ -39,6 +39,16 @@ module SimpleCov
39
39
  # No-op default; polling fallback handles correctness.
40
40
  end
41
41
 
42
+ # Does `wait_for_siblings` block until every sibling PROCESS has
43
+ # exited (so no further resultset can appear)? When true, the
44
+ # reporting worker can accept a settled resultset count below
45
+ # `expected_worker_count` as final instead of waiting out the whole
46
+ # `parallel_wait_timeout` for workers that produced no coverage.
47
+ # Defaults to false (no native wait; the poll is the only signal).
48
+ def native_wait?
49
+ false
50
+ end
51
+
42
52
  # How many parallel workers are participating in this run. Used
43
53
  # by the polling fallback to know how many resultset entries to
44
54
  # expect. Defaults to 1 (single-process).
@@ -23,6 +23,8 @@ module SimpleCov
23
23
  class GenericAdapter < Base
24
24
  class << self
25
25
  def active?
26
+ return false if SimpleCov.parallel_tests == false
27
+
26
28
  ENV.key?("TEST_ENV_NUMBER")
27
29
  end
28
30
 
@@ -7,16 +7,20 @@ module SimpleCov
7
7
  # Adapter for [grosser/parallel_tests](https://github.com/grosser/parallel_tests).
8
8
  # This is the historical default — SimpleCov has special-cased
9
9
  # parallel_tests since 0.18 — and remains the most precise option for
10
- # projects on it. Detection is the standard pair: the `ParallelTests`
11
- # constant has been loaded AND `TEST_ENV_NUMBER` is set. The gem itself
12
- # is autoloaded lazily on first `active?` check so users who don't have
13
- # it installed see no warnings (see #1018).
10
+ # projects on it. Detection requires the full native coordination
11
+ # contract: the `ParallelTests` constant has been loaded,
12
+ # `TEST_ENV_NUMBER` is set, and `PARALLEL_PID_FILE` is set. The pid-file
13
+ # path is required because the native wait API reads it with `ENV.fetch`.
14
+ # When a runner only provides the env-var convention, GenericAdapter is
15
+ # the correct coordination path.
14
16
  class ParallelTestsAdapter < Base
15
17
  class << self
16
18
  def active?
19
+ return false if SimpleCov.parallel_tests == false
20
+
17
21
  ensure_loaded
18
22
  # !! to coerce `defined?` (returns nil or "constant") to a proper bool.
19
- !!(defined?(::ParallelTests) && ENV.key?("TEST_ENV_NUMBER"))
23
+ !!(defined?(::ParallelTests) && native_parallel_tests_environment?)
20
24
  end
21
25
 
22
26
  # Pick the *first* started process to do the final-result work,
@@ -34,9 +38,17 @@ module SimpleCov
34
38
  end
35
39
 
36
40
  def wait_for_siblings
41
+ return unless native_parallel_tests_environment?
42
+
37
43
  ::ParallelTests.wait_for_other_processes_to_finish
38
44
  end
39
45
 
46
+ # The native wait blocks until every sibling process exits, but only
47
+ # when the pid-file contract is present (see `wait_for_siblings`).
48
+ def native_wait?
49
+ native_parallel_tests_environment?
50
+ end
51
+
40
52
  def expected_worker_count
41
53
  ENV["PARALLEL_TEST_GROUPS"]&.to_i || 1
42
54
  end
@@ -71,6 +83,10 @@ module SimpleCov
71
83
  def env_suggests_parallel_tests?
72
84
  ENV.key?("TEST_ENV_NUMBER") && ENV.key?("PARALLEL_TEST_GROUPS")
73
85
  end
86
+
87
+ def native_parallel_tests_environment?
88
+ ENV.key?("TEST_ENV_NUMBER") && ENV.key?("PARALLEL_PID_FILE")
89
+ end
74
90
  end
75
91
  end
76
92
  end
@@ -39,7 +39,8 @@ module SimpleCov
39
39
  # expected workers have reported or a timeout is reached. Capture
40
40
  # the outcome so `ready_to_process_results?` can suppress min/max
41
41
  # threshold checks against a partial total.
42
- @parallel_results_complete = wait_for_parallel_results(adapter.expected_worker_count)
42
+ @parallel_results_complete =
43
+ wait_for_parallel_results(adapter.expected_worker_count, native_wait: adapter.native_wait?)
43
44
  end
44
45
 
45
46
  # @api private — true when every sibling reported its resultset
@@ -49,28 +50,63 @@ module SimpleCov
49
50
  defined?(@parallel_results_complete) ? @parallel_results_complete : true
50
51
  end
51
52
 
52
- # @api private — returns true when every expected worker reported
53
- # before the deadline, false on timeout. Single-process runs
54
- # (expected <= 1) short-circuit to true with no waiting. The deadline
55
- # is `SimpleCov.parallel_wait_timeout` seconds out; raise that setting
53
+ # @api private — seconds the resultset count must hold steady, after a
54
+ # native wait, before we accept fewer than `expected` workers as final.
55
+ PARALLEL_RESULTS_SETTLE = 0.5
56
+ private_constant :PARALLEL_RESULTS_SETTLE
57
+
58
+ # @api private — returns true when the reporting worker has every
59
+ # resultset it's going to get, false on timeout. Single-process runs
60
+ # (expected <= 1) short-circuit to true with no waiting.
61
+ #
62
+ # Normally we poll until `expected` (= PARALLEL_TEST_GROUPS) workers have
63
+ # reported or `SimpleCov.parallel_wait_timeout` elapses; raise that setting
56
64
  # when a slow worker routinely finishes well after the others.
57
- def wait_for_parallel_results(expected)
65
+ #
66
+ # When a native wait already confirmed every sibling PROCESS exited
67
+ # (`native_wait`), no further resultset will appear, so a count below
68
+ # `expected` just means some workers produced none — e.g. parallel_test
69
+ # groups that got no spec file on a machine with more cores than files.
70
+ # Once the count then holds steady for `PARALLEL_RESULTS_SETTLE` we accept
71
+ # it as final rather than blocking for the whole timeout. Without a native
72
+ # wait (GenericAdapter) we can't tell an idle worker from a slow one, so we
73
+ # keep waiting the full timeout.
74
+ def wait_for_parallel_results(expected, native_wait: false)
58
75
  return true unless expected > 1 # simplecov:disable branch — only false in real parallel runs
59
76
 
60
- deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + parallel_wait_timeout
77
+ deadline = monotonic_time + parallel_wait_timeout
78
+ tracker = {count: 0, since: monotonic_time}
61
79
  loop do
62
80
  seen = SimpleCov::ResultMerger.read_resultset.size
63
81
  return true if seen >= expected
82
+ return true if native_wait && resultset_count_settled?(tracker, seen)
64
83
  return false if parallel_wait_timed_out?(deadline, expected, seen)
65
84
 
66
85
  sleep 0.1
67
86
  end
68
87
  end
69
88
 
89
+ # Track whether the resultset count has held steady (and positive) for
90
+ # `PARALLEL_RESULTS_SETTLE` seconds. `tracker` carries the last count and
91
+ # the time it last changed across poll iterations.
92
+ def resultset_count_settled?(tracker, count)
93
+ if count > tracker[:count]
94
+ tracker[:count] = count
95
+ tracker[:since] = monotonic_time
96
+ return false
97
+ end
98
+
99
+ count.positive? && (monotonic_time - tracker[:since]) >= PARALLEL_RESULTS_SETTLE
100
+ end
101
+
102
+ def monotonic_time
103
+ Process.clock_gettime(Process::CLOCK_MONOTONIC)
104
+ end
105
+
70
106
  # @api private — true once the wait deadline has passed; warns on
71
107
  # the first timeout so the user knows the merged total is partial.
72
108
  def parallel_wait_timed_out?(deadline, expected, seen)
73
- return false unless Process.clock_gettime(Process::CLOCK_MONOTONIC) > deadline
109
+ return false unless monotonic_time > deadline
74
110
 
75
111
  warn_about_incomplete_parallel_results(expected, seen)
76
112
  true
@@ -21,7 +21,10 @@ module SimpleCov
21
21
  # Use the ResultMerger to produce a single, merged result, ready to use.
22
22
  @result = ResultMerger.merge_and_store(*result_filenames, ignore_timeout: ignore_timeout)
23
23
 
24
+ @collating_result = true
24
25
  run_exit_tasks!
26
+ ensure
27
+ @collating_result = false
25
28
  end
26
29
 
27
30
  #
@@ -41,8 +44,10 @@ module SimpleCov
41
44
  # If we're using merging of results, store the current result
42
45
  # first (if there is one), then merge the results and return those
43
46
  if use_merging
44
- wait_for_other_processes
45
47
  SimpleCov::ResultMerger.store_result(@result) if result?
48
+ return @result unless finalize_merge?
49
+
50
+ wait_for_other_processes
46
51
  @result = SimpleCov::ResultMerger.merged_result
47
52
  end
48
53
 
@@ -54,6 +59,11 @@ module SimpleCov
54
59
  defined?(@result) && @result
55
60
  end
56
61
 
62
+ # @api private — true while `SimpleCov.collate` is running its finalizer.
63
+ def collating_result?
64
+ defined?(@collating_result) && @collating_result
65
+ end
66
+
57
67
  # Applies the configured filters to the given array of SimpleCov::SourceFile items
58
68
  def filtered(files)
59
69
  result = files.clone
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SimpleCov
4
+ module StaticCoverageExtractor
5
+ # Visitor mixin that collects method tuples and tracks the lexical
6
+ # class / module nesting that names them, in the shape Ruby's
7
+ # `Coverage` reports methods. Mixed into `Visitor`, it shares that
8
+ # visitor's `@methods` / `@class_stack` state and keeps the
9
+ # method-collection concern separate from branch extraction.
10
+ module MethodCollector
11
+ # Track class/module nesting so method tuples carry the lexical
12
+ # class name. Module + Class are both treated as namespaces here
13
+ # since `Coverage` reports both as the constant.
14
+ def visit_class_node(node)
15
+ with_class(constant_name(node.constant_path)) { super }
16
+ end
17
+
18
+ def visit_module_node(node)
19
+ with_class(constant_name(node.constant_path)) { super }
20
+ end
21
+
22
+ # `def name(...)` and `def self.name(...)` both produce DefNode.
23
+ # The class context is the surrounding lexical class/module (or
24
+ # `Object` at the top level, matching `Coverage`'s convention).
25
+ def visit_def_node(node)
26
+ loc = node.location
27
+ class_name = @class_stack.last || "Object"
28
+ key = [class_name, node.name, loc.start_line, loc.start_column, loc.end_line, loc.end_column]
29
+ @methods[key] = 0
30
+ super
31
+ end
32
+
33
+ private
34
+
35
+ # Render a constant path (e.g., `Foo::Bar`) as its source-form
36
+ # string. Defensive nil / to_s fallbacks: ClassNode and ModuleNode
37
+ # always carry a constant_path in practice.
38
+ # simplecov:disable
39
+ def constant_name(node)
40
+ return "<anonymous>" if node.nil?
41
+ return node.slice if node.respond_to?(:slice)
42
+
43
+ node.to_s
44
+ end
45
+ # simplecov:enable
46
+
47
+ def with_class(name)
48
+ @class_stack.push(name)
49
+ yield
50
+ ensure
51
+ @class_stack.pop
52
+ end
53
+ end
54
+ end
55
+ end