diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e2ac661 --- /dev/null +++ b/docs/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css new file mode 100644 index 0000000..b11ac9b --- /dev/null +++ b/docs/assets/highlight.css @@ -0,0 +1,85 @@ +:root { + --light-hl-0: #001080; + --dark-hl-0: #9CDCFE; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #0000FF; + --dark-hl-2: #569CD6; + --light-hl-3: #267F99; + --dark-hl-3: #4EC9B0; + --light-hl-4: #008000; + --dark-hl-4: #6A9955; + --light-hl-5: #0070C1; + --dark-hl-5: #4FC1FF; + --light-hl-6: #795E26; + --dark-hl-6: #DCDCAA; + --light-hl-7: #A31515; + --dark-hl-7: #CE9178; + --light-hl-8: #098658; + --dark-hl-8: #B5CEA8; + --light-code-background: #FFFFFF; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --code-background: var(--dark-code-background); +} } + +:root[data-theme='light'] { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --code-background: var(--light-code-background); +} + +:root[data-theme='dark'] { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +pre, code { background: var(--code-background); } diff --git a/docs/assets/main.js b/docs/assets/main.js new file mode 100644 index 0000000..7270cff --- /dev/null +++ b/docs/assets/main.js @@ -0,0 +1,59 @@ +"use strict"; +"use strict";(()=>{var Pe=Object.create;var ne=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` + ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(B,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } +`,this.handleValueChange()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(e=>{e.style.display="block";let n=Array.from(e.querySelectorAll(".tsd-index-link")).every(r=>r.offsetParent==null);e.style.display=n?"none":"block"})}};var Z=class extends C{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); +/*! Bundled license information: + +lunr/lunr.js: + (** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + *) + (*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + *) + (*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + *) + (*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + *) +*/ diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js new file mode 100644 index 0000000..c8aebab --- /dev/null +++ b/docs/assets/navigation.js @@ -0,0 +1 @@ +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAACo2Ru47CMBBF/2XqiEAkHpsu4iFRgWA7tMUQBmJhO5Y9QSC0/04RBIlJgPrce3TH3lyB6cwQw4qTYidyCMAgZxBDKtE5cuEddDJWEgI4Cr2DuBeN/gO/mxjxrJMu1KOcGFHvN7RnuVXILYISfnSs2RKqmcSDaxFVEh9tU2tz+3sx1OJ68C93rRm5eD+sjLT7ytTCsMh1xcQXQy6swboj6v4Me/2oYprQSaQ01/vKlwvNZPeYkguf2BP1By9zlmhREZN1jSo/9E54f4wxSrnF9Ohf6OHmG/9uwSm0aNUCAAA=" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js new file mode 100644 index 0000000..4abcca6 --- /dev/null +++ b/docs/assets/search.js @@ -0,0 +1 @@ +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACq2ca3PiOhKG/4vzlcrEsmyTfOMEMsNuAikumTNLpVweEBPvMTZlm2SyqfnvW7INdJuWb+TTqRP61dvSI7Xk23xoUfgWazeLD+0fL1hpNzrrdrTA3QjtRpskvd3KC7WOtot87UZb+m4ci/hL/vfLl2Tja539n7UbTfvT2bfDrvixoV8ieRJR7IVBaVsXKA4029G2biSCBOSkdroNN1vPF6ve1qt0w7FtHXtbr+/FW999H8m/VZmehJ/hW9ewoZOps4PRMgziJNotkzAqd8KBrToVi2QQRWF06/r+T3f5T7khEd3O9SV8++5GgRf8iisccWQrt3ArgmkSCXdT7oXiWjkt/TAWdaxwYLsxTNwoqeOFA1t6hdt6ViCulZP7M6zXKxzYdkH3xau3FBVzEMW1d1q7Oz8ZBttd3loNU0Jypv94lzROoKBplYEXZ6zGW1GxJRUiz3Kb7AJZOeoZHoNbb4S7SMbW2gdhaFu/LO97NxHB8r3Sshh9nuvU3Wx9MXGT6mlECM7znnk19mAU2nZvrOtXDG3bv3R3nYnfSWX3YGRdt5ODJpypIthtDja9rVd62NStQ1Pz0fRxcDu8Gw765W1d4MjSpGVipNtD73Y8/du5HU8GFW44sp3b/XA0/9vp3U97FWYo8Byvx/n9tKpnOLKd2/fhqD/+PnW+96a9x2GF4UnweZ79aU2/NLCB18n8vgujjZvQbtlvdWf5ZNab94djZzoczbqVDV4Uw0s7kWdZ6atbzYzT+E9xNlgz5zT+bOe7+3GvkfVR8DneFm/onQqaeZ/M2WwfufNdcGmE3EFA09k7Go+Go9lgcj/oPanKdbH5C6W4tKOwG6U5PQxHw4fhfwbOfW82GN3+aJgVIf+cvL6Nvzr9wdPwVlGOlRkh4efkMr39NujP7wfOZNC7nw0fmqZE6T8nM7nlOfPpwOkP7nrz+1nDxAj55+T1r97tv53+eDRzbsej0eC2aWKUvkVmJ6s7O7a9bwWdz+Hnuiv7e28yGo6+1mnt4hhb2pNjiqRjf/DX/KvTxLeoOMe98rRZ8G5w5qxwHo3zVT117sbzUT17QnRODsPRU+9+2C+tS4UMTiTn+D8MHsaTH85gMhlParkXBJ/R98fepPcwmA3qJUCpPiOLueqUrvCfV5/Vq9bdZPg0mDQY+4LgHO/pj+ls8NDAuyA4x3v2bTLo9Rt4FwSNvRUnsmniJrvSI1kW0fRMNhw9zmfO+Gkwubsff6/Z/oVSXWOTyntSmtV4PpMNz0f9dnkR+jaZsatrWzePj0b2twYTLwyOLJL3rYi/oN9KKVimaRy77DgJ3I9VjV0c4uiO4NTA4F4xfvBao2N9hdXlPrqG4WWencI32G1+imi8/mu3XouofganuvNzidNY9BytKg0kOT+DbeSFkZe81/YHglbuzAR1PL2PPgzWx8e8XpCIaO0uRfzl+Gt5HYHd8VY1WrpIo+jsQUqq+QNplZgEZYiqbcL0ScPtixsEwo/rGJ4o2lp7QUPnoqCt8Wq39cXvJs4nitZ9jtETnlq9PpGcbZ4+32rkvVe0tY4PjyJqjTcOb2u6jcRaRJFYEU9OSsxpWft1nHivIrsJVavvRUEDY1j0svr46EbuRiRwAwLWxZj6BXCV2ZNlkGz1AijKCjpIWDWgZQuX9g4qV25d87UXxfsSVN+/oGqcQvFMlp/gTt4gyTbVwq/nnsuo5qpOZsUE/zx3NC9Yid/azYf2mr/+dKOxS+PyWutoa0/4K/mG1n7XW4abjWzpOf/tScg3bmREFvLlSussrjr86lI3+PNzZ7FXpD+kf0jDdK2z0KkwHYUxrbNgVBhDYYbWWRhUmIHCuNZZcCqMozBT6yxMKsxEYZbWWVhUmIXCbK2zsKkwG4V1tc6iS4V1Udi11llcU2HXeHjlaOskB70AIiVBo8AsdDnmOklDxzh0Oew6CUTHRHQ58jrJRMdQdDn4OolFx1zko56FTpLRMRpdItBJODqmo0sKOslHx4B0CUInEemYEZMgGMmIYUZMgmAkI1ZYL+mCoVcMZsQkCEYyYpgRkyAYyYhhRkyCYGbHMC+vmIkjMSMmQTCSEcOMmATBSEYMM2ISBCMZMcyISRCMZMQwI0OCMEhGBmZkSBAGycjAjORDuYVBMjIKZS2ta3Rhw4wMCcIgGRmYkSFBGOQ6MjAjQ4IwSEYGZmRIEAbJyMCMDAnCIBkZmJEhQRgkIwMz4hIEJxlxzIhLEJxkxDEjLkFwkhHHjLgEwUlGvLD7pNsPvf9gRlyC4CQjjhlxCYKTjDhmxG3l2uSYEZcgOEmTY0ZcguAkTY4ZmSkjkqaJGZkShEnSNDEjU4IwSZomZmRKECZJ08SMTAnCJGmahUNCekogaZqYkSlBmPSBAjMyJQiTpGliRqYEYZKMTMzIlCBMkpGJGVkShHlNzRALM7IkCItkZGFGlgRhkYwszMiSICySkYUZyRcLFhbJyMKMLAnCIhlZhbNcepgjGVmYkSVBWPS5DzOyJAiLZGRhRpYEYZGMLMzIliAsch3ZmJEtQdgkIxszsiUIm2RkY0a2BGGTjGzMyJYgbJKRjRnZEoRNMrIxI1uCsElGduHInZ65SUY2ZmRLEDZ9PMeMbAnCJhnZmFFXgrBJRl3MqKsrV1w3Y5Renb2KKBGrYXaVtlgcLgY/NCe/dDOv91eKH5p1pd18/OloXV3+98/xkk3+n7RI3xaP87fFj20cP7r40HSm0Kbv6p9qgf21Sgm/zwCZH5WmQrkSP3e/nLfswweo5dZRzC2lWt7dkDd8j0IbCG27XJjemz5KLQ5GWplx5L2KyBHygRrqLBhi01CJ0zuay8N9EeANhtm+UsjTOxrL/R0N0OcuEKsg5Q9ZgOUV6K5qQv0Sibv1VtlXRdl9gmMLxrEBVY8zfVEIBpqrhcv8GypXvr17FIOBVk1lKc5ePC9odTBSeletXmU3YNN736v8gwDQCshfL+lA3kp2755oBiwQXTXf0mbyjzKAFAy9XjL26TRN0renwQACMSsRZ7XA379ID9zBZNVV8+3QQHZbOUpv6IIkwOxjqgl/aCPx8ARiOlCXzN39XS+YPMhdIcQVxQKYLFUpSmcKubDBjLNUY+UFr67vrZzTOcKBnFfJt/vbmKgwgYE2lT3OW9jFeO8Bg2WqFpsXw9WC6hKQ25XyMH/SAvQgdVuZepxNkTD9jgZwBhuBrsSWi6P9NzFAbwO9aiPxvWD323H92EWzE0hZuXS78/GQMwCcqSrUxl2G8W9nGUZYC7rMVF3eiE0YvZ9uYBwsalO1IIuF3AKOlqqn2bOV9f7ZCuAL6qitKoABtapsMMK2apSCMF9QsbMOdwFa1Bw0wJUNpG8FhOuf+7cCQMfB1LZUU1tOydMDFQCsMs6WAllOQN6WSn54lkaXXhvUf1u1fR1fBQDmQGiphFHiZt92H3VgGasmVq5Kl5KsQk5eFBAzsPNz1ZjvG1r7oZvIe27guAIKuaGabkgvrzmBHkx2Q7W89vqX8BdVzsFQ8KqxSOupE76KaO2Hb6gug0xM1bLbN/Nfd/mPswqDxFmGQSCWeEwBUq46C+xb2niBt/H+JxziTGCA8mGoNqp9Q0EYpI/vfOG+CrQuDbA6DNX83jeTLRNnF6yIIQILxaxqKF6+iNXOF04kXL941uBgqXPVLnRoyQsS+SQC9AiekqtGWMoLkxbUSKNizaXyLlKDJWNULJniMRsYswrj5eGZKKgyYEJ0K6Z6dkwtXPhyeJVQkcA6/wAK9BxQMyqoZTX65ALJAFPIqFhl+VE3f3cSTEN4EayqGccyjTc5AM9WzZw4P+RTCODmrJYrTtjwMks1c+S/WvB2+FcLQOYgcZVUfq1P3KkABVJXzRr5+T0hhSd7FfFMdnKMAZ21lCOdHzPzdzIBY1CzTFXpy9Rb8GYIGC4wSWwlqfc4ERvixgOoL6ZqmSQvkXBXhBisMVO1Je6CeCuW3trDpZqBrFmq7WhchZu6xQP0XOX95gWr8C12VnhlglliqGbJXvrmxsXSBkoTI4E9d7SttxW+FwjtZvH858//Aaf27L3PRgAA"; \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css new file mode 100644 index 0000000..98a4377 --- /dev/null +++ b/docs/assets/style.css @@ -0,0 +1,1414 @@ +:root { + /* Light */ + --light-color-background: #f2f4f8; + --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; + --light-color-icon-background: var(--light-color-background); + --light-color-accent: #c5c7c9; + --light-color-active-menu-item: var(--light-color-accent); + --light-color-text: #222; + --light-color-text-aside: #6e6e6e; + --light-color-link: #1f70c2; + + --light-color-ts-keyword: #056bd6; + --light-color-ts-project: #b111c9; + --light-color-ts-module: var(--light-color-ts-project); + --light-color-ts-namespace: var(--light-color-ts-project); + --light-color-ts-enum: #7e6f15; + --light-color-ts-enum-member: var(--light-color-ts-enum); + --light-color-ts-variable: #4760ec; + --light-color-ts-function: #572be7; + --light-color-ts-class: #1f70c2; + --light-color-ts-interface: #108024; + --light-color-ts-constructor: var(--light-color-ts-class); + --light-color-ts-property: var(--light-color-ts-variable); + --light-color-ts-method: var(--light-color-ts-function); + --light-color-ts-call-signature: var(--light-color-ts-method); + --light-color-ts-index-signature: var(--light-color-ts-property); + --light-color-ts-constructor-signature: var(--light-color-ts-constructor); + --light-color-ts-parameter: var(--light-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --light-color-ts-type-parameter: #a55c0e; + --light-color-ts-accessor: var(--light-color-ts-property); + --light-color-ts-get-signature: var(--light-color-ts-accessor); + --light-color-ts-set-signature: var(--light-color-ts-accessor); + --light-color-ts-type-alias: #d51270; + /* reference not included as links will be colored with the kind that it points to */ + + --light-external-icon: url("data:image/svg+xml;utf8,"); + --light-color-scheme: light; + + /* Dark */ + --dark-color-background: #2b2e33; + --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; + --dark-color-icon-background: var(--dark-color-background-secondary); + --dark-color-accent: #9096a2; + --dark-color-active-menu-item: #5d5d6a; + --dark-color-text: #f5f5f5; + --dark-color-text-aside: #dddddd; + --dark-color-link: #00aff4; + + --dark-color-ts-keyword: #3399ff; + --dark-color-ts-project: #e358ff; + --dark-color-ts-module: var(--dark-color-ts-project); + --dark-color-ts-namespace: var(--dark-color-ts-project); + --dark-color-ts-enum: #f4d93e; + --dark-color-ts-enum-member: var(--dark-color-ts-enum); + --dark-color-ts-variable: #798dff; + --dark-color-ts-function: #a280ff; + --dark-color-ts-class: #8ac4ff; + --dark-color-ts-interface: #6cff87; + --dark-color-ts-constructor: var(--dark-color-ts-class); + --dark-color-ts-property: var(--dark-color-ts-variable); + --dark-color-ts-method: var(--dark-color-ts-function); + --dark-color-ts-call-signature: var(--dark-color-ts-method); + --dark-color-ts-index-signature: var(--dark-color-ts-property); + --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); + --dark-color-ts-parameter: var(--dark-color-ts-variable); + /* type literal not included as links will never be generated to it */ + --dark-color-ts-type-parameter: #e07d13; + --dark-color-ts-accessor: var(--dark-color-ts-property); + --dark-color-ts-get-signature: var(--dark-color-ts-accessor); + --dark-color-ts-set-signature: var(--dark-color-ts-accessor); + --dark-color-ts-type-alias: #ff6492; + /* reference not included as links will be colored with the kind that it points to */ + + --dark-external-icon: url("data:image/svg+xml;utf8,"); + --dark-color-scheme: dark; +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); + } +} + +html { + color-scheme: var(--color-scheme); +} + +body { + margin: 0; +} + +:root[data-theme="light"] { + --color-background: var(--light-color-background); + --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); + --color-icon-background: var(--light-color-icon-background); + --color-accent: var(--light-color-accent); + --color-active-menu-item: var(--light-color-active-menu-item); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + + --color-ts-keyword: var(--light-color-ts-keyword); + --color-ts-module: var(--light-color-ts-module); + --color-ts-namespace: var(--light-color-ts-namespace); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-enum-member: var(--light-color-ts-enum-member); + --color-ts-variable: var(--light-color-ts-variable); + --color-ts-function: var(--light-color-ts-function); + --color-ts-class: var(--light-color-ts-class); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-constructor: var(--light-color-ts-constructor); + --color-ts-property: var(--light-color-ts-property); + --color-ts-method: var(--light-color-ts-method); + --color-ts-call-signature: var(--light-color-ts-call-signature); + --color-ts-index-signature: var(--light-color-ts-index-signature); + --color-ts-constructor-signature: var( + --light-color-ts-constructor-signature + ); + --color-ts-parameter: var(--light-color-ts-parameter); + --color-ts-type-parameter: var(--light-color-ts-type-parameter); + --color-ts-accessor: var(--light-color-ts-accessor); + --color-ts-get-signature: var(--light-color-ts-get-signature); + --color-ts-set-signature: var(--light-color-ts-set-signature); + --color-ts-type-alias: var(--light-color-ts-type-alias); + + --external-icon: var(--light-external-icon); + --color-scheme: var(--light-color-scheme); +} + +:root[data-theme="dark"] { + --color-background: var(--dark-color-background); + --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); + --color-icon-background: var(--dark-color-icon-background); + --color-accent: var(--dark-color-accent); + --color-active-menu-item: var(--dark-color-active-menu-item); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + + --color-ts-keyword: var(--dark-color-ts-keyword); + --color-ts-module: var(--dark-color-ts-module); + --color-ts-namespace: var(--dark-color-ts-namespace); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-enum-member: var(--dark-color-ts-enum-member); + --color-ts-variable: var(--dark-color-ts-variable); + --color-ts-function: var(--dark-color-ts-function); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-constructor: var(--dark-color-ts-constructor); + --color-ts-property: var(--dark-color-ts-property); + --color-ts-method: var(--dark-color-ts-method); + --color-ts-call-signature: var(--dark-color-ts-call-signature); + --color-ts-index-signature: var(--dark-color-ts-index-signature); + --color-ts-constructor-signature: var( + --dark-color-ts-constructor-signature + ); + --color-ts-parameter: var(--dark-color-ts-parameter); + --color-ts-type-parameter: var(--dark-color-ts-type-parameter); + --color-ts-accessor: var(--dark-color-ts-accessor); + --color-ts-get-signature: var(--dark-color-ts-get-signature); + --color-ts-set-signature: var(--dark-color-ts-set-signature); + --color-ts-type-alias: var(--dark-color-ts-type-alias); + + --external-icon: var(--dark-external-icon); + --color-scheme: var(--dark-color-scheme); +} + +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 > a:not(.link), +h2 > a:not(.link), +h3 > a:not(.link), +h4 > a:not(.link), +h5 > a:not(.link), +h6 > a:not(.link) { + text-decoration: none; + color: var(--color-text); +} + +h1 { + font-size: 1.875rem; + margin: 0.67rem 0; +} + +h2 { + font-size: 1.5rem; + margin: 0.83rem 0; +} + +h3 { + font-size: 1.25rem; + margin: 1rem 0; +} + +h4 { + font-size: 1.05rem; + margin: 1.33rem 0; +} + +h5 { + font-size: 1rem; + margin: 1.5rem 0; +} + +h6 { + font-size: 0.875rem; + margin: 2.33rem 0; +} + +.uppercase { + text-transform: uppercase; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1700px; + padding: 0 2rem; +} + +/* Footer */ +.tsd-generator { + border-top: 1px solid var(--color-accent); + padding-top: 1rem; + padding-bottom: 1rem; + max-height: 3.5rem; +} + +.tsd-generator > p { + margin-top: 0; + margin-bottom: 0; + padding: 0 1rem; +} + +.container-main { + margin: 0 auto; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: "Segoe UI", sans-serif; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 0.875rem; + border-radius: 0.8em; +} + +pre { + position: relative; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; + padding: 10px; + border: 1px solid var(--color-accent); +} +pre code { + padding: 0; + font-size: 100%; +} +pre > button { + position: absolute; + top: 10px; + right: 10px; + opacity: 0; + transition: opacity 0.1s; + box-sizing: border-box; +} +pre:hover > button, +pre > button.visible { + opacity: 1; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h4, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} +.tsd-typography table { + border-collapse: collapse; + border: none; +} +.tsd-typography td, +.tsd-typography th { + padding: 6px 13px; + border: 1px solid var(--color-accent); +} +.tsd-typography thead, +.tsd-typography tr:nth-child(even) { + background-color: var(--color-background-secondary); +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +.tsd-comment-tags { + display: flex; + flex-direction: column; +} +dl.tsd-comment-tag-group { + display: flex; + align-items: center; + overflow: hidden; + margin: 0.5em 0; +} +dl.tsd-comment-tag-group dt { + display: flex; + margin-right: 0.5em; + font-size: 0.875em; + font-weight: normal; +} +dl.tsd-comment-tag-group dd { + margin: 0; +} +code.tsd-tag { + padding: 0.25em 0.4em; + border: 0.1em solid var(--color-accent); + margin-right: 0.25em; + font-size: 70%; +} +h1 code.tsd-tag:first-of-type { + margin-left: 0.25em; +} + +dl.tsd-comment-tag-group dd:before, +dl.tsd-comment-tag-group dd:after { + content: " "; +} +dl.tsd-comment-tag-group dd pre, +dl.tsd-comment-tag-group dd:after { + clear: both; +} +dl.tsd-comment-tag-group p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.tsd-filter-visibility h4 { + font-size: 1rem; + padding-top: 0.75rem; + padding-bottom: 0.5rem; + margin: 0; +} +.tsd-filter-item:not(:last-child) { + margin-bottom: 0.5rem; +} +.tsd-filter-input { + display: flex; + width: fit-content; + width: -moz-fit-content; + align-items: center; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + cursor: pointer; +} +.tsd-filter-input input[type="checkbox"] { + cursor: pointer; + position: absolute; + width: 1.5em; + height: 1.5em; + opacity: 0; +} +.tsd-filter-input input[type="checkbox"]:disabled { + pointer-events: none; +} +.tsd-filter-input svg { + cursor: pointer; + width: 1.5em; + height: 1.5em; + margin-right: 0.5em; + border-radius: 0.33em; + /* Leaving this at full opacity breaks event listeners on Firefox. + Don't remove unless you know what you're doing. */ + opacity: 0.99; +} +.tsd-filter-input input[type="checkbox"]:focus + svg { + transform: scale(0.95); +} +.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { + transform: scale(1); +} +.tsd-checkbox-background { + fill: var(--color-accent); +} +input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { + stroke: var(--color-text); +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { + fill: var(--color-background); + stroke: var(--color-accent); + stroke-width: 0.25rem; +} +.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { + stroke: var(--color-accent); +} + +.tsd-theme-toggle { + padding-top: 0.75rem; +} +.tsd-theme-toggle > h4 { + display: inline; + vertical-align: middle; + margin-right: 0.75rem; +} + +.tsd-hierarchy { + list-style: square; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-full-hierarchy:not(:last-child) { + margin-bottom: 1em; + padding-bottom: 1em; + border-bottom: 1px solid var(--color-accent); +} +.tsd-full-hierarchy, +.tsd-full-hierarchy ul { + list-style: none; + margin: 0; + padding: 0; +} +.tsd-full-hierarchy ul { + padding-left: 1.5rem; +} +.tsd-full-hierarchy a { + padding: 0.25rem 0 !important; + font-size: 1rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} + +.tsd-panel-group.tsd-index-group { + margin-bottom: 0; +} +.tsd-index-panel .tsd-index-list { + list-style: none; + line-height: 1.333em; + margin: 0; + padding: 0.25rem 0 0 0; + overflow: hidden; + display: grid; + grid-template-columns: repeat(3, 1fr); + column-gap: 1rem; + grid-template-rows: auto; +} +@media (max-width: 1024px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(2, 1fr); + } +} +@media (max-width: 768px) { + .tsd-index-panel .tsd-index-list { + grid-template-columns: repeat(1, 1fr); + } +} +.tsd-index-panel .tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: relative; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + display: flex; + align-items: center; + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} + +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation > a, +.tsd-navigation .tsd-accordion-summary { + width: calc(100% - 0.25rem); + display: flex; + align-items: center; +} +.tsd-navigation a, +.tsd-navigation summary > span, +.tsd-page-navigation a { + display: flex; + width: calc(100% - 0.25rem); + align-items: center; + padding: 0.25rem; + color: var(--color-text); + text-decoration: none; + box-sizing: border-box; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-active-menu-item); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul, +.tsd-page-navigation ul { + margin-top: 0; + margin-bottom: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li, +.tsd-page-navigation li { + padding: 0; + max-width: 100%; +} +.tsd-nested-navigation { + margin-left: 3rem; +} +.tsd-nested-navigation > li > details { + margin-left: -1.5rem; +} +.tsd-small-nested-navigation { + margin-left: 1.5rem; +} +.tsd-small-nested-navigation > li > details { + margin-left: -1.5rem; +} + +.tsd-page-navigation ul { + padding-left: 1.75rem; +} + +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; +} +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; +} + +a.tsd-index-link { + padding: 0.25rem 0 !important; + font-size: 1rem; + line-height: 1.25rem; + display: inline-flex; + align-items: center; + color: var(--color-text); +} +.tsd-accordion-summary { + list-style-type: none; /* hide marker on non-safari */ + outline: none; /* broken on safari, so just hide it */ +} +.tsd-accordion-summary::-webkit-details-marker { + display: none; /* hide marker on safari */ +} +.tsd-accordion-summary, +.tsd-accordion-summary a { + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + + cursor: pointer; +} +.tsd-accordion-summary a { + width: calc(100% - 1.5rem); +} +.tsd-accordion-summary > * { + margin-top: 0; + margin-bottom: 0; + padding-top: 0; + padding-bottom: 0; +} +.tsd-index-accordion .tsd-accordion-summary > svg { + margin-left: 0.25rem; +} +.tsd-index-content > :not(:first-child) { + margin-top: 0.75rem; +} +.tsd-index-heading { + margin-top: 1.5rem; + margin-bottom: 0.75rem; +} + +.tsd-kind-icon { + margin-right: 0.5rem; + width: 1.25rem; + height: 1.25rem; + min-width: 1.25rem; + min-height: 1.25rem; +} +.tsd-kind-icon path { + transform-origin: center; + transform: scale(1.1); +} +.tsd-signature > .tsd-kind-icon { + margin-right: 0.8rem; +} + +.tsd-panel { + margin-bottom: 2.5rem; +} +.tsd-panel.tsd-member { + margin-bottom: 4rem; +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5rem -1.5rem 0.75rem -1.5rem; + padding: 0 1.5rem 0.75rem 1.5rem; +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: none; +} + +.tsd-panel-group { + margin: 4rem 0; +} +.tsd-panel-group.tsd-index-group { + margin: 2rem 0; +} +.tsd-panel-group.tsd-index-group details { + margin: 2rem 0; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 2.5rem; + height: 100%; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title, +#tsd-toolbar-links a { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + background-color: var(--color-background); + line-height: initial; + padding: 4px; +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-background-secondary); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current:not(.no-results), +#tsd-search .results li:hover:not(.no-results) { + background-color: var(--color-accent); +} +#tsd-search .results a { + display: flex; + align-items: center; + padding: 0.25rem; + box-sizing: border-box; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-accent); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + +.tsd-signature { + margin: 0 0 1rem 0; + padding: 1rem 0.5rem; + border: 1px solid var(--color-accent); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} + +.tsd-signature-keyword { + color: var(--color-ts-keyword); + font-weight: normal; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + list-style-type: none; +} +.tsd-signatures .tsd-signature { + margin: 0; + border-color: var(--color-accent); + border-width: 1px 0; + transition: background-color 0.1s; +} +.tsd-description .tsd-signatures .tsd-signature { + border-width: 1px; +} + +ul.tsd-parameter-list, +ul.tsd-type-parameter-list { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameter-list > li.tsd-parameter-signature, +ul.tsd-type-parameter-list > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameter-list h5, +ul.tsd-type-parameter-list h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +.tsd-sources { + margin-top: 1rem; + font-size: 0.875em; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: sticky; + z-index: 1; + top: 0; + left: 0; + width: 100%; + color: var(--color-text); + background: var(--color-background-secondary); + border-bottom: 1px var(--color-accent) solid; + transition: transform 0.3s ease-in-out; +} +.tsd-page-toolbar a { + color: var(--color-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .tsd-toolbar-contents { + display: flex; + justify-content: space-between; + height: 2.5rem; + margin: 0 auto; +} +.tsd-page-toolbar .table-cell { + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: + opacity 0.1s, + background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-accent); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} + +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + display: inline-flex; + align-items: center; + margin-left: 0.5rem; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} + +.deprecated { + text-decoration: line-through !important; +} + +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + +.tsd-kind-project { + color: var(--color-ts-project); +} +.tsd-kind-module { + color: var(--color-ts-module); +} +.tsd-kind-namespace { + color: var(--color-ts-namespace); +} +.tsd-kind-enum { + color: var(--color-ts-enum); +} +.tsd-kind-enum-member { + color: var(--color-ts-enum-member); +} +.tsd-kind-variable { + color: var(--color-ts-variable); +} +.tsd-kind-function { + color: var(--color-ts-function); +} +.tsd-kind-class { + color: var(--color-ts-class); +} +.tsd-kind-interface { + color: var(--color-ts-interface); +} +.tsd-kind-constructor { + color: var(--color-ts-constructor); +} +.tsd-kind-property { + color: var(--color-ts-property); +} +.tsd-kind-method { + color: var(--color-ts-method); +} +.tsd-kind-call-signature { + color: var(--color-ts-call-signature); +} +.tsd-kind-index-signature { + color: var(--color-ts-index-signature); +} +.tsd-kind-constructor-signature { + color: var(--color-ts-constructor-signature); +} +.tsd-kind-parameter { + color: var(--color-ts-parameter); +} +.tsd-kind-type-literal { + color: var(--color-ts-type-literal); +} +.tsd-kind-type-parameter { + color: var(--color-ts-type-parameter); +} +.tsd-kind-accessor { + color: var(--color-ts-accessor); +} +.tsd-kind-get-signature { + color: var(--color-ts-get-signature); +} +.tsd-kind-set-signature { + color: var(--color-ts-set-signature); +} +.tsd-kind-type-alias { + color: var(--color-ts-type-alias); +} + +/* if we have a kind icon, don't color the text by kind */ +.tsd-kind-icon ~ span { + color: var(--color-text); +} + +* { + scrollbar-width: thin; + scrollbar-color: var(--color-accent) var(--color-icon-background); +} + +*::-webkit-scrollbar { + width: 0.75rem; +} + +*::-webkit-scrollbar-track { + background: var(--color-icon-background); +} + +*::-webkit-scrollbar-thumb { + background-color: var(--color-accent); + border-radius: 999rem; + border: 0.25rem solid var(--color-icon-background); +} + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } + .site-menu { + margin-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +} diff --git a/docs/classes/RtAudio.html b/docs/classes/RtAudio.html new file mode 100644 index 0000000..74d4bf5 --- /dev/null +++ b/docs/classes/RtAudio.html @@ -0,0 +1,139 @@ +RtAudio | @hamitzor/rtaudio.js - v1.0.5

The RtAudio class.

+

If an API argument is specified but that API isn't supported, +a warning is issued and an instance of an available API +is created. If available API is found, the routine will abort +If no API argument is specified and multiple API +support has been compiled, the default order of use is ALSA, +(Linux systems) and WASAPI, DS (Windows systems).

+

Constructors

Methods

  • Set a client-defined function that will be invoked when an error or warning occurs

    +

    Parameters

    • errorCallback: ((errType, message) => void)

      the callback

      +
        • (errType, message): void
        • Parameters

          Returns void

    Returns void

  • Specify whether warning messages should be output or not.

    +

    The default behaviour is for warning messages to be output, +either to a client-defined error callback function (if specified) +or to stderr.

    +

    Parameters

    • value: boolean

      boolean value to use

      +

    Returns void

  • A function for opening a stream with the specified parameters.

    +

    Parameters

    • outputParameters: StreamParameters

      Specifies output stream parameters to use +when opening a stream, including a device ID, number of channels, +and starting channel number. For input-only streams, this +argument should be null.

      +
    • inputParameters: StreamParameters

      Specifies input stream parameters to use +when opening a stream, including a device ID, number of channels, +and starting channel number. For output-only streams, this +argument should be null.

      +
    • format: RtAudioFormat

      An RtAudioFormat specifying the desired sample data format.

      +
    • sampleRate: number

      The desired sample rate (sample frames per second).

      +
    • bufferFrames: number

      A value indicating the desired +internal buffer size in sample frames. The actual value +used by the device is returned from openStream call. +A value of zero can be specified, in which case the lowest +allowable value is determined.

      +
    • options: StreamOptions

      An optional object containing various +global stream options, including a list of OR'ed RtAudioStreamFlags +and a suggested number of stream buffers that can be used to +control stream latency. More buffers typically result in more +robust performance, though at a cost of greater latency. If a +value of zero is specified, a system-specific median value is +chosen. If the RTAUDIO_MINIMIZE_LATENCY flag bit is set, the +lowest allowable value is used. The actual value used is +returned from openStream call. The parameter is API dependent.

      +
    • callback: RtAudioCallback

      A function that will be invoked +when input data is available and/or output data is needed.

      +

    Returns number

    The actual bufferFrames value used by the device.

    +
  • A function that closes a stream and frees any associated stream memory.

    +

    If a stream is not open, an RTAUDIO_WARNING will be passed to the +user-provided errorCallback function (or otherwise printed to stderr).

    +

    Returns void

  • A function that starts a stream.

    +

    An RTAUDIO_SYSTEM_ERROR is returned if an error occurs during +processing. An RTAUDIO_WARNING is returned if a stream is not open +or is already running.

    +

    Returns void

  • Stop a stream, allowing any samples remaining in the output queue to be played.

    +

    An RTAUDIO_SYSTEM_ERROR is returned if an error occurs during +processing. An RTAUDIO_WARNING is returned if a stream is not +open or is already stopped.

    +

    Returns void

  • Stop a stream, discarding any samples remaining in the input/output queue.

    +

    An RTAUDIO_SYSTEM_ERROR is returned if an error occurs during +processing. An RTAUDIO_WARNING is returned if a stream is not +open or is already stopped.

    +

    Returns void

  • A public function that returns a vector of audio devices.

    +

    The ID values returned by this function are used internally by +RtAudio to identify a given device. The values themselves are +arbitrary and do not correspond to device IDs used by the +underlying API (nor are they index values). This function performs +a system query of available devices each time it is called, thus +supporting devices (dis)connected after instantiation. If no +devices are available, the vector size will be zero. If a system +error occurs during processing, a warning will be issued.

    +

    Returns DeviceInfo[]

  • A function that returns the ID of the default input device.

    +

    If the underlying audio API does not provide a "default device", +the first probed input device ID will be returned. If no devices +are available, the return value will be 0 (which is an invalid +device identifier).

    +

    Returns number

  • A function that returns the ID of the default output device.

    +

    If the underlying audio API does not provide a "default device", +the first probed output device ID will be returned. If no devices +are available, the return value will be 0 (which is an invalid +device identifier).

    +

    Returns number

  • Returns true if a stream is open and false if not.

    +

    Returns boolean

  • Returns true if the stream is running and false if it is stopped or not open.

    +

    Returns boolean

  • Returns the audio API specifier for the current instance of RtAudio.

    +

    Returns number

  • Returns the internal stream latency in sample frames.

    +

    The stream latency refers to delay in audio input and/or output +caused by internal buffering by the audio system and/or hardware. +For duplex streams, the returned value will represent the sum of +the input and output latencies. If a stream is not open, the +returned value will be invalid. If the API does not report +latency, the return value will be zero.

    +

    Returns number

  • Returns actual sample rate in use by the (open) stream.

    +

    On some systems, the sample rate used may be slightly different +than that specified in the stream parameters. If a stream is not +open, a value of zero is returned.

    +

    Returns number

  • Returns the number of seconds of processed data since the stream was started.

    +

    The stream time is calculated from the number of sample frames +processed by the underlying audio system, which will increment by +units of the audio buffer size. It is not an absolute running +time. If a stream is not open, the returned value may not be +valid.

    +

    Returns number

  • Set the stream time to a time in seconds greater than or equal to 0.0.

    +

    Returns number

  • Retrieve the error message corresponding to the last error or warning condition.

    +

    This function can be used to get a detailed error message when a +non-zero RtAudioErrorType is returned by a function. This is the +same message sent to the user-provided errorCallback function.

    +

    Returns string

  • A static function to determine the current RtAudio version.

    +

    Returns string

  • Return the display name of a specified compiled audio API.

    +

    This obtains a long name used for display purposes. +If the API is unknown, this function will return the empty string.

    +

    Parameters

    Returns string

  • Return the name of a specified compiled audio API.

    +

    This obtains a short lower-case name used for identification purposes. +This value is guaranteed to remain identical across library versions. +If the API is unknown, this function will return the empty string.

    +

    Parameters

    Returns string

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/enums/RtAudioApi.html b/docs/enums/RtAudioApi.html new file mode 100644 index 0000000..444e198 --- /dev/null +++ b/docs/enums/RtAudioApi.html @@ -0,0 +1,14 @@ +RtAudioApi | @hamitzor/rtaudio.js - v1.0.5

Enumeration RtAudioApi

Audio API specifier arguments

+

Enumeration Members

UNSPECIFIED: 0

Search for a working compiled API.

+
MACOSX_CORE: 1

Macintosh OS-X Core Audio API.

+
LINUX_ALSA: 2

The Advanced Linux Sound Architecture API.

+
LINUX_PULSE: 4

The Linux PulseAudio API.

+
WINDOWS_WASAPI: 7

The Microsoft WASAPI API.

+
WINDOWS_DS: 8

The Microsoft DirectSound API.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/enums/RtAudioErrorType.html b/docs/enums/RtAudioErrorType.html new file mode 100644 index 0000000..df29a65 --- /dev/null +++ b/docs/enums/RtAudioErrorType.html @@ -0,0 +1,24 @@ +RtAudioErrorType | @hamitzor/rtaudio.js - v1.0.5

Enumeration RtAudioErrorType

RtAudio error types

+

Enumeration Members

WARNING: number

A non-critical error.

+
DEBUG_WARNING: number

A non-critical error which might be useful for debugging.

+
UNSPECIFIED: number

The default, unspecified error type.

+
NO_DEVICES_FOUND: number

No devices found on system.

+
INVALID_DEVICE: number

An invalid device ID was specified.

+
MEMORY_ERROR: number

An error occurred during memory allocation.

+
INVALID_PARAMETER: number

An invalid parameter was specified to a function.

+
INVALID_USE: number

The function was called incorrectly.

+
DRIVER_ERROR: number

A system driver error occurred.

+
SYSTEM_ERROR: number

A system error occurred.

+
THREAD_ERROR: number

A thread error occurred.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/enums/RtAudioFormat.html b/docs/enums/RtAudioFormat.html new file mode 100644 index 0000000..50ce531 --- /dev/null +++ b/docs/enums/RtAudioFormat.html @@ -0,0 +1,19 @@ +RtAudioFormat | @hamitzor/rtaudio.js - v1.0.5

Enumeration RtAudioFormat

RtAudio data format type.

+

Support for signed integers and floats. Audio data fed to/from an +RtAudio stream is assumed to ALWAYS be in host byte order. The +internal routines will automatically take care of any necessary +byte-swapping between the host format and the soundcard. Thus, +endian-ness is not a concern in the following format definitions. +Note that there are no range checks for floating-point values that +extend beyond plus/minus 1.0.

+

Enumeration Members

RTAUDIO_SINT8: 1

8-bit signed integer.

+
RTAUDIO_SINT16: 2

16-bit signed integer.

+
RTAUDIO_SINT32: 8

32-bit signed integer.

+
RTAUDIO_FLOAT32: 16

Normalized between plus/minus 1.0.

+
RTAUDIO_FLOAT64: 32

Normalized between plus/minus 1.0.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/enums/RtAudioStreamFlags.html b/docs/enums/RtAudioStreamFlags.html new file mode 100644 index 0000000..11c0245 --- /dev/null +++ b/docs/enums/RtAudioStreamFlags.html @@ -0,0 +1,38 @@ +RtAudioStreamFlags | @hamitzor/rtaudio.js - v1.0.5

Enumeration RtAudioStreamFlags

The following flags can be OR'ed together to allow a client to +make changes to the default stream behavior.

+

By default, RtAudio streams pass and receive audio data from the +client in an interleaved format. By passing the +RTAUDIO_NONINTERLEAVED flag to the openStream() function, audio +data will instead be presented in non-interleaved buffers. In +this case, each buffer argument in the RtAudioCallback function +will point to a single array of data, with \c nFrames samples for +each channel concatenated back-to-back. For example, the first +sample of data for the second channel would be located at index \c +nFrames (assuming the \c buffer pointer was recast to the correct +data type for the stream).

+

Certain audio APIs offer a number of parameters that influence the +I/O latency of a stream. By default, RtAudio will attempt to set +these parameters internally for robust (glitch-free) performance +(though some APIs, like Windows DirectSound, make this difficult). +By passing the RTAUDIO_MINIMIZE_LATENCY flag to the openStream() +function, internal stream settings will be influenced in an attempt +to minimize stream latency, though possibly at the expense of stream +performance.

+

If the RTAUDIO_HOG_DEVICE flag is set, RtAudio will attempt to +open the input and/or output stream device(s) for exclusive use. +Note that this is not possible with all supported audio APIs.

+

If the RTAUDIO_SCHEDULE_REALTIME flag is set, RtAudio will attempt +to select realtime scheduling (round-robin) for the callback thread.

+

Enumeration Members

RTAUDIO_NONINTERLEAVED: 1

Use non-interleaved buffers (default = interleaved).

+
RTAUDIO_MINIMIZE_LATENCY: 2

Attempt to set stream parameters for lowest possible latency.

+
RTAUDIO_HOG_DEVICE: 4

Attempt grab device and prevent use by others.

+
RTAUDIO_SCHEDULE_REALTIME: 8

Try to select realtime scheduling for callback thread.

+
RTAUDIO_ALSA_USE_DEFAULT: 16

Use the "default" PCM device (ALSA only).

+
RTAUDIO_JACK_DONT_CONNECT: 32

Do not automatically connect ports (JACK only).

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/enums/RtAudioStreamStatus.html b/docs/enums/RtAudioStreamStatus.html new file mode 100644 index 0000000..c7bfefe --- /dev/null +++ b/docs/enums/RtAudioStreamStatus.html @@ -0,0 +1,9 @@ +RtAudioStreamStatus | @hamitzor/rtaudio.js - v1.0.5

Enumeration RtAudioStreamStatus

Notification of a stream over- or underflow is indicated by a +non-zero stream \c status argument in the RtAudioCallback function. +The stream status can be one of the following two options, +depending on whether the stream is open for output and/or input:

+

Enumeration Members

RTAUDIO_INPUT_OVERFLOW: 1

Input data was discarded because of an overflow condition at the driver.

+
RTAUDIO_OUTPUT_UNDERFLOW: 2

The output buffer ran low, likely producing a break in the output sound.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..704b15b --- /dev/null +++ b/docs/index.html @@ -0,0 +1,71 @@ +@hamitzor/rtaudio.js - v1.0.5

@hamitzor/rtaudio.js - v1.0.5

+ RtAudio.js +
+

+ +

RtAudio binding for Node

+ +

+ + NPM + +

+ +

Node binding of the RtAudio C++ audio library. To see a detailed description of RtAudio visit it's GitHub page.

+

An overview of the binding:

+
    +
  • Access well-known audio I/O APIs
      +
    • Windows: WASAPI and DirectSound
    • +
    • Linux: ALSA and PulseAudio
    • +
    +
  • +
  • Probe available audio devices
  • +
  • Stream audio to output devices
  • +
  • Stream audio from input devices
  • +
  • Fully configurable audio streaming, allows configuring
      +
    • sample rate
    • +
    • bit depth
    • +
    • frame size
    • +
    • number of channels
    • +
    +
  • +
  • No additional library/software needed, besides an npm install
  • +
+

Installation

Since this is an addon written in C++ it needs to be built before used. Prebuilds are available for Node between 14.x.x - 21.x.x and Electron between 11.x.x - 28.x.x for x64 Linux and x64 Windows. This should cover quite a lot of audience but if you happen to use a different target, you will have to build the binding yourself (see below).

+
+

Note +Only Windows and Linux are supported at the moment.

+
+

Installing for Node 14.x.x - 21.x.x

Install it using npm or yarn

+
npm install @hamitzor/rtaudio.js
+
+

or

+
yarn add @hamitzor/rtaudio.js
+
+

Installing for Electron 11.x.x - 28.x.x

If you'll be using the package with Electron, you'll have to set some environment variables before the installation command.

+
export npm_config_runtime=electron
export npm_config_target=<your_electron_version> +
+

These will help the install command to pick the correct prebuilds. After setting these up, you can simply use npm or yarn

+
npm install @hamitzor/rtaudio.js
+
+

or

+
yarn add @hamitzor/rtaudio.js
+
+

As simple as that, no additional library/software required for installation. If you run into trouble during installation, don't hesitate to create an issue at Github.

+

Usage

This binding is pretty orthodox about staying loyal to the original RtAudio API, so using RtAudio's documentation and tutorials should mostly cover the usage of the binding as well. Almost all the method names and signatures are the same. There is a separate repository named RtAudio.js examples that demonstrates the usage of this binding with a couple of examples. Besides, here is a small example for a quick start:

+
// An examples that echoes audio from default input to default output.

const { RtAudio, RtAudioFormat, RtAudioErrorType, RtAudioStreamStatus, RtAudioApi } = require('@hamitzor/rtaudio.js')

const rtAudio = new RtAudio()

const defaultInputDevice = rtAudio.getDefaultInputDevice()
const defaultOutputDevice = rtAudio.getDefaultOutputDevice()

// Create a stream
rtAudio.openStream(
{ deviceId: defaultOutputDevice, nChannels: 1 }, // output stream parameters
{ deviceId: defaultInputDevice, nChannels: 1 }, // input stream parameters
RtAudioFormat.RTAUDIO_SINT16, // PCM format
48000, // sample rate
1920, // buffer size
null,
// A callback that will be invoked when input is ready and/or output is needed.
(output, input, _nFrames, _time, status) => {
// output and input are instances of Uint8Array
// Write input directly to the output buffer, for echoing.
output.set(input, 0)
}
)

// Start the stream
rtAudio.start()

// On SIGINT, close the stream and exit
process.on('SIGINT', () => {
rtAudio.closeStream()
process.exit()
})
+
+

Building from source

If you don't use Node between 14.x.x - 21.x.x or Electron between 11.x.x - 28.x.x, or your platform is not x64 Linux or x64 Windows, the npm install command will attempt to build the binding from source. In that case you'll need to satisfy some prerequisites:

+
    +
  • Your Node or Electron version should support N-API 4 and up (see this)
  • +
  • CMake
  • +
  • A proper C/C++ compiler toolchain
      +
    • For Windows, MSVC should be enough
    • +
    • For Linux, GCC or Clang and make
    • +
    +
  • +
+

Credits

This package uses the C++ library named RtAudio under the hood. To check it out, visit https://github.com/thestk/rtaudio.

+

License

MIT

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/DeviceInfo.html b/docs/interfaces/DeviceInfo.html new file mode 100644 index 0000000..652bbf1 --- /dev/null +++ b/docs/interfaces/DeviceInfo.html @@ -0,0 +1,22 @@ +DeviceInfo | @hamitzor/rtaudio.js - v1.0.5

Interface DeviceInfo

The public device information structure for returning queried values.

+
interface DeviceInfo {
    id: number;
    name: string;
    outputChannels: number;
    inputChannels: number;
    duplexChannels: number;
    isDefaultOutput: number;
    isDefaultInput: number;
    sampleRates: number[];
    preferredSampleRate: number;
    nativeFormats: number;
}

Properties

id: number

Unique numeric device identifier.

+
name: string

Character string device identifier.

+
outputChannels: number

Maximum output channels supported by device.

+
inputChannels: number

Maximum input channels supported by device.

+
duplexChannels: number

Maximum simultaneous input/output channels supported by device.

+
isDefaultOutput: number

Is the device the default output device

+
isDefaultInput: number

Is the device the default input device

+
sampleRates: number[]

Supported sample rates (queried from list of standard rates).

+
preferredSampleRate: number

Preferred sample rate, e.g. for WASAPI the system sample rate.

+
nativeFormats: number

Bit mask of supported data formats.

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/StreamParameters.html b/docs/interfaces/StreamParameters.html new file mode 100644 index 0000000..1983c19 --- /dev/null +++ b/docs/interfaces/StreamParameters.html @@ -0,0 +1,8 @@ +StreamParameters | @hamitzor/rtaudio.js - v1.0.5

Interface StreamParameters

The structure for specifying stream parameters.

+
interface StreamParameters {
    deviceId: number;
    nChannels: number;
    firstChannel?: number;
}

Properties

deviceId: number

Device id. Can be obtained using defaultInputDevice/defaultOutputDevice or using devices.

+
nChannels: number

Number of channels.

+
firstChannel?: number

First channel index on device (default = 0).

+

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html new file mode 100644 index 0000000..f11f716 --- /dev/null +++ b/docs/modules.html @@ -0,0 +1,11 @@ +@hamitzor/rtaudio.js - v1.0.5

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/RtAudioCallback.html b/docs/types/RtAudioCallback.html new file mode 100644 index 0000000..15fe8c0 --- /dev/null +++ b/docs/types/RtAudioCallback.html @@ -0,0 +1,18 @@ +RtAudioCallback | @hamitzor/rtaudio.js - v1.0.5

Type alias RtAudioCallback

RtAudioCallback: ((output, input, nFrames, streamTime, status) => void)

A function that will be invoked when input data is +available and/or output data is needed.

+

Type declaration

    • (output, input, nFrames, streamTime, status): void
    • Parameters

      • output: Uint8Array

        For output (or duplex) streams, the client +should write nFrames of audio sample frames into this +buffer. For input-only streams, this argument will be null.

        +
      • input: Uint8Array

        For input (or duplex) streams, this buffer will +hold nFrames of input audio sample frames. For output-only streams, this argument +will be null.

        +
      • nFrames: number

        The number of sample frames of input or output +data in the buffers. The actual buffer size in bytes is +dependent on the format and number of channels in use.

        +
      • streamTime: number

        The number of seconds that have elapsed since the +stream was started.

        +
      • status: RtAudioStreamStatus

        If non-zero, this argument indicates a data overflow +or underflow condition for the stream. The particular +condition can be determined by comparison with the +RtAudioStreamStatus flags.

        +

      Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/types/StreamOptions.html b/docs/types/StreamOptions.html new file mode 100644 index 0000000..3105727 --- /dev/null +++ b/docs/types/StreamOptions.html @@ -0,0 +1,6 @@ +StreamOptions | @hamitzor/rtaudio.js - v1.0.5

Type alias StreamOptions

StreamOptions: {
    flags?: number;
    numberOfBuffers?: number;
    streamName?: string;
    priority?: number;
}

Stream options

+

Type declaration

  • Optional flags?: number

    A bit-mask of stream flags (RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE, RTAUDIO_ALSA_USE_DEFAULT).

    +
  • Optional numberOfBuffers?: number

    Number of stream buffers.

    +
  • Optional streamName?: string

    A stream name (currently used only in Jack).

    +
  • Optional priority?: number

    Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME).

    +

Generated using TypeDoc

\ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 8a03934..2f42798 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,3 +1,238 @@ +/** + * The RtAudio class. + * + * If an API argument is specified but that API isn't supported, + * a warning is issued and an instance of an available API + * is created. If available API is found, the routine will abort + * If no API argument is specified and multiple API + * support has been compiled, the default order of use is ALSA, + * (Linux systems) and WASAPI, DS (Windows systems). + */ +export declare class RtAudio { + /** + * Create a new RtAudio instance + */ + constructor() + + /** + * Create a new RtAudio instance + * + * @param api api to utilize. If omitted, an available one will be picked. + */ + constructor(api: RtAudioApi) + + /** Set a client-defined function that will be invoked when an error or warning occurs + * + * @param errorCallback the callback + */ + setErrorCallback(errorCallback: (errType: RtAudioErrorType, message: string) => void): void + + /** + * Specify whether warning messages should be output or not. + * + * The default behaviour is for warning messages to be output, + * either to a client-defined error callback function (if specified) + * or to stderr. + * + * @param value boolean value to use + */ + showWarnings(value: boolean): void + + /** + * A function for opening a stream with the specified parameters. + * + * @param outputParameters Specifies output stream parameters to use + * when opening a stream, including a device ID, number of channels, + * and starting channel number. For input-only streams, this + * argument should be null. + * @param inputParameters Specifies input stream parameters to use + * when opening a stream, including a device ID, number of channels, + * and starting channel number. For output-only streams, this + * argument should be null. + * @param format An RtAudioFormat specifying the desired sample data format. + * @param sampleRate The desired sample rate (sample frames per second). + * @param bufferFrames A value indicating the desired + * internal buffer size in sample frames. The actual value + * used by the device is returned from `openStream` call. + * A value of zero can be specified, in which case the lowest + * allowable value is determined. + * @param options An optional object containing various + * global stream options, including a list of OR'ed RtAudioStreamFlags + * and a suggested number of stream buffers that can be used to + * control stream latency. More buffers typically result in more + * robust performance, though at a cost of greater latency. If a + * value of zero is specified, a system-specific median value is + * chosen. If the RTAUDIO_MINIMIZE_LATENCY flag bit is set, the + * lowest allowable value is used. The actual value used is + * returned from `openStream` call. The parameter is API dependent. + * + * @param callback A function that will be invoked + * when input data is available and/or output data is needed. + * + * @returns The actual bufferFrames value used by the device. + */ + openStream( + outputParameters: StreamParameters | null, + inputParameters: StreamParameters | null, + format: RtAudioFormat, + sampleRate: number, + bufferFrames: number, + options: StreamOptions | null, + callback: RtAudioCallback, + ): number + + /** + * A function that closes a stream and frees any associated stream memory. + * + * If a stream is not open, an RTAUDIO_WARNING will be passed to the + * user-provided errorCallback function (or otherwise printed to stderr). + */ + closeStream(): void + + /** + * A function that starts a stream. + * + * An RTAUDIO_SYSTEM_ERROR is returned if an error occurs during + * processing. An RTAUDIO_WARNING is returned if a stream is not open + * or is already running. + */ + startStream(): void + + /** + * Stop a stream, allowing any samples remaining in the output queue to be played. + * + * An RTAUDIO_SYSTEM_ERROR is returned if an error occurs during + * processing. An RTAUDIO_WARNING is returned if a stream is not + * open or is already stopped. + */ + stopStream(): void + + /** + * Stop a stream, discarding any samples remaining in the input/output queue. + * + * An RTAUDIO_SYSTEM_ERROR is returned if an error occurs during + * processing. An RTAUDIO_WARNING is returned if a stream is not + * open or is already stopped. + */ + abortStream(): void + + /** + * A public function that returns a vector of audio devices. + * + * The ID values returned by this function are used internally by + * RtAudio to identify a given device. The values themselves are + * arbitrary and do not correspond to device IDs used by the + * underlying API (nor are they index values). This function performs + * a system query of available devices each time it is called, thus + * supporting devices (dis)connected after instantiation. If no + * devices are available, the vector size will be zero. If a system + * error occurs during processing, a warning will be issued. + */ + getDevices(): DeviceInfo[] + + /** + * A function that returns the ID of the default input device. + * + * If the underlying audio API does not provide a "default device", + * the first probed input device ID will be returned. If no devices + * are available, the return value will be 0 (which is an invalid + * device identifier). + */ + getDefaultInputDevice(): number + + /** + * A function that returns the ID of the default output device. + * + * If the underlying audio API does not provide a "default device", + * the first probed output device ID will be returned. If no devices + * are available, the return value will be 0 (which is an invalid + * device identifier). + */ + getDefaultOutputDevice(): number + + /** Returns true if a stream is open and false if not. */ + isStreamOpen(): boolean + + /** Returns true if the stream is running and false if it is stopped or not open. */ + isStreamRunning(): boolean + + /** Returns the audio API specifier for the current instance of RtAudio. */ + getCurrentApi(): number + + /** + * Returns the internal stream latency in sample frames. + * + * The stream latency refers to delay in audio input and/or output + * caused by internal buffering by the audio system and/or hardware. + * For duplex streams, the returned value will represent the sum of + * the input and output latencies. If a stream is not open, the + * returned value will be invalid. If the API does not report + * latency, the return value will be zero. + */ + getStreamLatency(): number + + /** + * Returns actual sample rate in use by the (open) stream. + * + * On some systems, the sample rate used may be slightly different + * than that specified in the stream parameters. If a stream is not + * open, a value of zero is returned. + */ + getStreamSampleRate(): number + + /** + * Returns the number of seconds of processed data since the stream was started. + * + * The stream time is calculated from the number of sample frames + * processed by the underlying audio system, which will increment by + * units of the audio buffer size. It is not an absolute running + * time. If a stream is not open, the returned value may not be + * valid. + */ + getStreamTime(): number + + /** Set the stream time to a time in seconds greater than or equal to 0.0. */ + setStreamTime(): number + + /** + * Retrieve the error message corresponding to the last error or warning condition. + * + * This function can be used to get a detailed error message when a + * non-zero RtAudioErrorType is returned by a function. This is the + * same message sent to the user-provided errorCallback function. + */ + getErrorText(): string + + /** A static function to determine the current RtAudio version. */ + static getVersion(): string + + /** + * A static function to determine the available compiled audio APIs. + */ + static getCompiledApi(): RtAudioApi[] + + /** + * Return the display name of a specified compiled audio API. + * + * This obtains a long name used for display purposes. + * If the API is unknown, this function will return the empty string. + * + * @param api the API id + */ + static getApiDisplayName(api: RtAudioApi): string + + /** + * Return the name of a specified compiled audio API. + * + * This obtains a short lower-case name used for identification purposes. + * This value is guaranteed to remain identical across library versions. + * If the API is unknown, this function will return the empty string. + * + * @param api the API id + */ + static getApiName(api: RtAudioApi): string +} + /** Audio API specifier arguments */ export declare enum RtAudioApi { /** Search for a working compiled API. */ @@ -212,260 +447,60 @@ export declare interface StreamParameters { /** * A function that will be invoked when input data is * available and/or output data is needed. + * + * @param output For output (or duplex) streams, the client + * should write `nFrames` of audio sample frames into this + * buffer. For input-only streams, this argument will be null. + * + * @param input For input (or duplex) streams, this buffer will + * hold `nFrames` of input audio sample frames. For output-only streams, this argument + * will be null. + * + * @param nFrames The number of sample frames of input or output + * data in the buffers. The actual buffer size in bytes is + * dependent on the `format` and number of channels in use. + * + * @param streamTime The number of seconds that have elapsed since the + * stream was started. + * + * @param status If non-zero, this argument indicates a data overflow + * or underflow condition for the stream. The particular + * condition can be determined by comparison with the + * RtAudioStreamStatus flags. */ -export declare type RtAudioCallback = ( - /** - * For output (or duplex) streams, the client - * should write `nFrames` of audio sample frames into this - * buffer. For input-only streams, this argument will be null. - */ - output: Uint8Array, - /** - * For input (or duplex) streams, this buffer will - * hold `nFrames` of input audio sample frames. For output-only streams, this argument - * will be null. - */ - input: Uint8Array, - - /** - * The number of sample frames of input or output - * data in the buffers. The actual buffer size in bytes is - * dependent on the `format` and number of channels in use. - */ - nFrames: number, - - /** - * The number of seconds that have elapsed since the - * stream was started. - */ - streamTime: number, - - /** - * If non-zero, this argument indicates a data overflow - * or underflow condition for the stream. The particular - * condition can be determined by comparison with the - * RtAudioStreamStatus flags. - */ - status: RtAudioStreamStatus -) => void - -export declare class RtAudio { - /** - * Create a new RtAudio instance - * - * @param api api to utilize. If omitted, an available one will be picked. - */ - constructor() - constructor(api: RtAudioApi) - - /** Set a client-defined function that will be invoked when an error or warning occurs - * - * @param errorCallback the callback - */ - setErrorCallback: (errorCallback: (errType: RtAudioErrorType, message: string) => void) => void - - /** - * Specify whether warning messages should be output or not. - * - * The default behaviour is for warning messages to be output, - * either to a client-defined error callback function (if specified) - * or to stderr. - * - * @param value boolean value to use - */ - showWarnings: (value: boolean) => void - - /** - * A function for opening a stream with the specified parameters. - * - * @param outputParameters Specifies output stream parameters to use - * when opening a stream, including a device ID, number of channels, - * and starting channel number. For input-only streams, this - * argument should be null. - * @param inputParameters Specifies input stream parameters to use - * when opening a stream, including a device ID, number of channels, - * and starting channel number. For output-only streams, this - * argument should be null. - * @param format An RtAudioFormat specifying the desired sample data format. - * @param sampleRate The desired sample rate (sample frames per second). - * @param bufferFrames A value indicating the desired - * internal buffer size in sample frames. The actual value - * used by the device is returned from `openStream` call. - * A value of zero can be specified, in which case the lowest - * allowable value is determined. - * @param options An optional object containing various - * global stream options, including a list of OR'ed RtAudioStreamFlags - * and a suggested number of stream buffers that can be used to - * control stream latency. More buffers typically result in more - * robust performance, though at a cost of greater latency. If a - * value of zero is specified, a system-specific median value is - * chosen. If the RTAUDIO_MINIMIZE_LATENCY flag bit is set, the - * lowest allowable value is used. The actual value used is - * returned from `openStream` call. The parameter is API dependent. - * - * @param callback A function that will be invoked - * when input data is available and/or output data is needed. - * - * @returns The actual bufferFrames value used by the device. - */ - openStream: ( - outputParameters: StreamParameters | null, - inputParameters: StreamParameters | null, - format: RtAudioFormat, - sampleRate: number, - bufferFrames: number, - options: StreamOptions | null, - callback: RtAudioCallback, - ) => number - - /** - * A function that closes a stream and frees any associated stream memory. - * - * If a stream is not open, an RTAUDIO_WARNING will be passed to the - * user-provided errorCallback function (or otherwise printed to stderr). - */ - closeStream: () => void - - /** - * A function that starts a stream. - * - * An RTAUDIO_SYSTEM_ERROR is returned if an error occurs during - * processing. An RTAUDIO_WARNING is returned if a stream is not open - * or is already running. - */ - startStream: () => void - - /** - * Stop a stream, allowing any samples remaining in the output queue to be played. - * - * An RTAUDIO_SYSTEM_ERROR is returned if an error occurs during - * processing. An RTAUDIO_WARNING is returned if a stream is not - * open or is already stopped. - */ - stopStream: () => void - - /** - * Stop a stream, discarding any samples remaining in the input/output queue. - * - * An RTAUDIO_SYSTEM_ERROR is returned if an error occurs during - * processing. An RTAUDIO_WARNING is returned if a stream is not - * open or is already stopped. - */ - abortStream: () => void - - /** - * A public function that returns a vector of audio devices. - * - * The ID values returned by this function are used internally by - * RtAudio to identify a given device. The values themselves are - * arbitrary and do not correspond to device IDs used by the - * underlying API (nor are they index values). This function performs - * a system query of available devices each time it is called, thus - * supporting devices (dis)connected after instantiation. If no - * devices are available, the vector size will be zero. If a system - * error occurs during processing, a warning will be issued. - */ - getDevices: () => DeviceInfo[] - - /** - * A function that returns the ID of the default input device. - * - * If the underlying audio API does not provide a "default device", - * the first probed input device ID will be returned. If no devices - * are available, the return value will be 0 (which is an invalid - * device identifier). - */ - getDefaultInputDevice: () => number - - /** - * A function that returns the ID of the default output device. - * - * If the underlying audio API does not provide a "default device", - * the first probed output device ID will be returned. If no devices - * are available, the return value will be 0 (which is an invalid - * device identifier). - */ - getDefaultOutputDevice: () => number - - /** Returns true if a stream is open and false if not. */ - isStreamOpen: () => boolean - - /** Returns true if the stream is running and false if it is stopped or not open. */ - isStreamRunning: () => boolean - - /** Returns the audio API specifier for the current instance of RtAudio. */ - getCurrentApi: () => number - - /** - * Returns the internal stream latency in sample frames. - * - * The stream latency refers to delay in audio input and/or output - * caused by internal buffering by the audio system and/or hardware. - * For duplex streams, the returned value will represent the sum of - * the input and output latencies. If a stream is not open, the - * returned value will be invalid. If the API does not report - * latency, the return value will be zero. - */ - getStreamLatency: () => number - - /** - * Returns actual sample rate in use by the (open) stream. - * - * On some systems, the sample rate used may be slightly different - * than that specified in the stream parameters. If a stream is not - * open, a value of zero is returned. - */ - getStreamSampleRate: () => number - - /** - * Returns the number of seconds of processed data since the stream was started. - * - * The stream time is calculated from the number of sample frames - * processed by the underlying audio system, which will increment by - * units of the audio buffer size. It is not an absolute running - * time. If a stream is not open, the returned value may not be - * valid. - */ - getStreamTime: () => number - - /** Set the stream time to a time in seconds greater than or equal to 0.0. */ - setStreamTime: () => number - - /** - * Retrieve the error message corresponding to the last error or warning condition. - * - * This function can be used to get a detailed error message when a - * non-zero RtAudioErrorType is returned by a function. This is the - * same message sent to the user-provided errorCallback function. - */ - getErrorText: () => string - - /** A static function to determine the current RtAudio version. */ - static getVersion: () => string - - /** - * A static function to determine the available compiled audio APIs. - */ - static getCompiledApi: () => RtAudioApi[] - - /** - * Return the display name of a specified compiled audio API. - * - * This obtains a long name used for display purposes. - * If the API is unknown, this function will return the empty string. - * - * @param api the API id - */ - static getApiDisplayName(api: RtAudioApi): string - - /** - * Return the name of a specified compiled audio API. - * - * This obtains a short lower-case name used for identification purposes. - * This value is guaranteed to remain identical across library versions. - * If the API is unknown, this function will return the empty string. - * - * @param api the API id - */ - static getApiName(api: RtAudioApi): string -} \ No newline at end of file +export declare type RtAudioCallback = + ( + /** + * @param output For output (or duplex) streams, the client + * should write `nFrames` of audio sample frames into this + * buffer. For input-only streams, this argument will be null. + */ + output: Uint8Array, + + /** + * @param input For input (or duplex) streams, this buffer will + * hold `nFrames` of input audio sample frames. For output-only streams, this argument + * will be null. + */ + input: Uint8Array, + + /** + * @param nFrames The number of sample frames of input or output + * data in the buffers. The actual buffer size in bytes is + * dependent on the `format` and number of channels in use. + */ + nFrames: number, + + /** + * @param streamTime The number of seconds that have elapsed since the + * stream was started. + */ + streamTime: number, + + /** + * @param status If non-zero, this argument indicates a data overflow + * or underflow condition for the stream. The particular + * condition can be determined by comparison with the + * RtAudioStreamStatus flags. + */ + status: RtAudioStreamStatus) => void \ No newline at end of file diff --git a/package.json b/package.json index 1ed9bea..0bb8c1e 100644 --- a/package.json +++ b/package.json @@ -44,11 +44,13 @@ "cmake-js": "^7.2.1", "node-addon-api": "^7.0.0", "prebuild": "^12.1.0", - "prebuild-install": "^7.1.1" + "prebuild-install": "^7.1.1", + "typescript": "^5.3.3" }, "devDependencies": { "@types/bindings": "^1.5.5", "@types/node": "^18.19.0", - "node-abi": "^3.52.0" + "node-abi": "^3.52.0", + "typedoc": "^0.25.6" } } diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..2c61630 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,15 @@ +{ + "navigationLinks": { + "RtAudio.js Examples": "https://github.com/hamitzor/rtaudio.js-examples" + }, + "sidebarLinks": { + "RtAudio.js Examples": "https://github.com/hamitzor/rtaudio.js-examples" + }, + "categorizeByGroup": true, + "sort": [ + "source-order", + ], + "includeVersion": true, + "commentStyle": "all", + "cleanOutputDir": true +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 50a63c3..abb2ecf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24,6 +24,8 @@ __metadata: node-addon-api: "npm:^7.0.0" prebuild: "npm:^12.1.0" prebuild-install: "npm:^7.1.1" + typedoc: "npm:^0.25.6" + typescript: "npm:^5.3.3" languageName: unknown linkType: soft @@ -224,6 +226,13 @@ __metadata: languageName: node linkType: hard +"ansi-sequence-parser@npm:^1.1.0": + version: 1.1.1 + resolution: "ansi-sequence-parser@npm:1.1.1" + checksum: ab2259ccf69f145ecf1418d4e71524158828f44afdf37c7536677871f4cebaa8b176fcb95de8f94a68129357dddc59586597da25f9d4ebf9968f6ef022bf0b31 + languageName: node + linkType: hard + "ansi-styles@npm:^4.0.0": version: 4.3.0 resolution: "ansi-styles@npm:4.3.0" @@ -1495,6 +1504,13 @@ __metadata: languageName: node linkType: hard +"jsonc-parser@npm:^3.2.0": + version: 3.2.0 + resolution: "jsonc-parser@npm:3.2.0" + checksum: 5a12d4d04dad381852476872a29dcee03a57439574e4181d91dca71904fcdcc5e8e4706c0a68a2c61ad9810e1e1c5806b5100d52d3e727b78f5cdc595401045b + languageName: node + linkType: hard + "jsonfile@npm:^6.0.1": version: 6.1.0 resolution: "jsonfile@npm:6.1.0" @@ -1590,6 +1606,13 @@ __metadata: languageName: node linkType: hard +"lunr@npm:^2.3.9": + version: 2.3.9 + resolution: "lunr@npm:2.3.9" + checksum: 77d7dbb4fbd602aac161e2b50887d8eda28c0fa3b799159cee380fbb311f1e614219126ecbbd2c3a9c685f1720a8109b3c1ca85cc893c39b6c9cc6a62a1d8a8b + languageName: node + linkType: hard + "make-fetch-happen@npm:^10.0.3": version: 10.2.1 resolution: "make-fetch-happen@npm:10.2.1" @@ -1633,6 +1656,15 @@ __metadata: languageName: node linkType: hard +"marked@npm:^4.3.0": + version: 4.3.0 + resolution: "marked@npm:4.3.0" + bin: + marked: bin/marked.js + checksum: 0013463855e31b9c88d8bb2891a611d10ef1dc79f2e3cbff1bf71ba389e04c5971298c886af0be799d7fa9aa4593b086a136062d59f1210b0480b026a8c5dc47 + languageName: node + linkType: hard + "memory-stream@npm:^1.0.0": version: 1.0.0 resolution: "memory-stream@npm:1.0.0" @@ -1683,7 +1715,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.1": +"minimatch@npm:^9.0.1, minimatch@npm:^9.0.3": version: 9.0.3 resolution: "minimatch@npm:9.0.3" dependencies: @@ -2558,6 +2590,18 @@ __metadata: languageName: node linkType: hard +"shiki@npm:^0.14.7": + version: 0.14.7 + resolution: "shiki@npm:0.14.7" + dependencies: + ansi-sequence-parser: "npm:^1.1.0" + jsonc-parser: "npm:^3.2.0" + vscode-oniguruma: "npm:^1.7.0" + vscode-textmate: "npm:^8.0.0" + checksum: 5c7fcbb870d0facccc7ae2f3410a28121f8e0b3f298e4e956de817ad6ab60a4c7e20a9184edfe50a93447addbb88b95b69e6ef88ac16ac6ca3e94c50771a6459 + languageName: node + linkType: hard + "signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -2888,6 +2932,42 @@ __metadata: languageName: node linkType: hard +"typedoc@npm:^0.25.6": + version: 0.25.6 + resolution: "typedoc@npm:0.25.6" + dependencies: + lunr: "npm:^2.3.9" + marked: "npm:^4.3.0" + minimatch: "npm:^9.0.3" + shiki: "npm:^0.14.7" + peerDependencies: + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x + bin: + typedoc: bin/typedoc + checksum: 4819d118d7795f237ae9ddc8cb0b2fd12493ea0a3c11d47114a2fa90700a0425233ea7e75f364d35663d9076af1e022caa04f6cbf7a999d19f0dc868b575d508 + languageName: node + linkType: hard + +"typescript@npm:^5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: e33cef99d82573624fc0f854a2980322714986bc35b9cb4d1ce736ed182aeab78e2cb32b385efa493b2a976ef52c53e20d6c6918312353a91850e2b76f1ea44f + languageName: node + linkType: hard + +"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#optional!builtin::version=5.3.3&hash=e012d7" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 1d0a5f4ce496c42caa9a30e659c467c5686eae15d54b027ee7866744952547f1be1262f2d40de911618c242b510029d51d43ff605dba8fb740ec85ca2d3f9500 + languageName: node + linkType: hard + "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5" @@ -2995,6 +3075,20 @@ __metadata: languageName: node linkType: hard +"vscode-oniguruma@npm:^1.7.0": + version: 1.7.0 + resolution: "vscode-oniguruma@npm:1.7.0" + checksum: bef0073c665ddf8c86e51da94529c905856559e9aba97a9882f951acd572da560384775941ab6e7e8db94d9c578b25fefb951e4b73c37e8712e16b0231de2689 + languageName: node + linkType: hard + +"vscode-textmate@npm:^8.0.0": + version: 8.0.0 + resolution: "vscode-textmate@npm:8.0.0" + checksum: 836f7fe73fc94998a38ca193df48173a2b6eab08b4943d83c8cac9a2a0c3546cfdab4cf1b10b890ec4a4374c5bee03a885ef0e83e7fd2bd618cf00781c017c04 + languageName: node + linkType: hard + "which@npm:1, which@npm:^1.2.10": version: 1.3.1 resolution: "which@npm:1.3.1"