From 85b897a1a31f05b46a6820fcbffb53e2fcffe32d Mon Sep 17 00:00:00 2001 From: Bubobubobubobubo Date: Sat, 19 Aug 2023 21:39:29 +0000 Subject: [PATCH] deploy: c8090b4137b2fd0bb9c76099a9d944efccd3597f --- assets/{index-0a7135ac.js => index-a20e8ab2.js} | 4 ++-- index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename assets/{index-0a7135ac.js => index-a20e8ab2.js} (95%) diff --git a/assets/index-0a7135ac.js b/assets/index-a20e8ab2.js similarity index 95% rename from assets/index-0a7135ac.js rename to assets/index-a20e8ab2.js index 48cd348..74b5d22 100644 --- a/assets/index-0a7135ac.js +++ b/assets/index-a20e8ab2.js @@ -383,7 +383,7 @@ Topos is made to be controlled entirely with a keyboard. It is recommanded to st ## Special - Switch the editor to Vim Mode: ${key_shortcut("Ctrl + V")}. -`,documentation={introduction,interface:software_interface,code,time,sound,midi,functions,reference,shortcuts,about},delay=a=>new Promise((e,r)=>setTimeout(()=>r(new Error("Operation took too long")),a)),tryCatchWrapper=(a,e)=>new Promise((r,n)=>{try{Function(`"use strict";try{${e}} catch (e) {console.log(e)};`).call(a.api),r(!0)}catch(s){console.log(s),r(!1)}}),cache=new Map,MAX_CACHE_SIZE=20,addFunctionToCache=(a,e)=>{cache.size>=MAX_CACHE_SIZE&&cache.delete(cache.keys().next().value),cache.set(a,e)},tryEvaluate=async(a,e,r=5e3)=>{try{e.evaluations++;const n=e.candidate;if(cache.has(n))cache.get(n).call(a.api);else{const s=`let i = ${e.evaluations};`+n;if(await Promise.race([tryCatchWrapper(a,s),delay(r)])){e.committed=e.candidate;const l=new Function(`"use strict";try{${s}} catch (e) {console.log(e)};`);addFunctionToCache(n,l)}else await evaluate(a,e,r)}}catch(n){console.log(n)}},evaluate=async(a,e,r=1e3)=>{try{await Promise.race([tryCatchWrapper(a,e.committed),delay(r)]),e.evaluations&&e.evaluations++}catch(n){console.log(n)}};class TransportNode extends AudioWorkletNode{constructor(r,n,s){super(r,"transport",n);_e(this,"handleMessage",r=>{if(r.data&&r.data.type==="bang"){this.startTime===null&&(this.startTime=r.data.currentTime),this.elapsedTime=r.data.currentTime-this.startTime,this.prevCurrentTime=r.data.currentTime;let{futureTimeStamp:n,timeToNextPulse:s,nextPulsePosition:o}=this.convertTimeToNextBarsBeats(this.elapsedTime);this.nextPulsePosition!==o&&(this.nextPulsePosition=o,setTimeout(()=>{const l=this.app.audioContext.currentTime;this.app.clock.time_position=n,tryEvaluate(this.app,this.app.global_buffer),this.hasBeenEvaluated=!0,this.currentPulsePosition=o;const c=this.app.audioContext.currentTime;this.lastLatencies[this.indexOfLastLatencies]=c-l,this.indexOfLastLatencies=(this.indexOfLastLatencies+1)%this.lastLatencies.length;const u=this.lastLatencies.reduce((p,h)=>p+h)/this.lastLatencies.length;this.executionLatency=u/1e3},(s+this.executionLatency)*1e3))}});this.app=s,this.port.addEventListener("message",this.handleMessage),this.port.start(),this.$clock=document.getElementById("clockviewer"),this.hasBeenEvaluated=!1,this.currentPulsePosition=0,this.nextPulsePosition=-1,this.executionLatency=0,this.lastLatencies=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.indexOfLastLatencies=0,this.startTime=null,this.elapsedTime=0}start(){this.port.postMessage("start")}pause(){this.port.postMessage("pause")}stop(){this.startTime=null,this.elapsedTime=null,this.app.clock.tick=0,this.port.postMessage("stop")}convertTimeToBarsBeats(r){const n=60/this.app.clock.bpm,s=r/n,o=this.app.clock.time_signature[0],l=Math.floor(s/o)+1,c=Math.floor(s%o)+1,u=Math.floor(s%1*this.app.clock.ppqn);return this.app.clock.tick++,{bar:l,beat:c,ppqn:u}}convertTimeToNextBarsBeats(r){const n=60/this.app.clock.bpm,s=r/n,o=this.app.clock.time_signature[0];this.currentPulsePosition=s*this.app.clock.ppqn;const l=Math.ceil(this.currentPulsePosition),c=this.app.clock.convertPulseToSecond(this.nextPulsePosition-this.currentPulsePosition),u=this.nextPulsePosition/this.app.clock.ppqn,p=u/o,h={bar:Math.floor(p)+1,beat:Math.floor(u)%o+1,pulse:Math.floor(this.nextPulsePosition)%this.app.clock.ppqn};return this.app.clock.tick++,{futureTimeStamp:h,timeToNextPulse:c,nextPulsePosition:l}}}const TransportProcessor="/assets/TransportProcessor-9e6f56da.js";class Clock{constructor(e,r){_e(this,"ctx");_e(this,"transportNode");_e(this,"bpm");_e(this,"time_signature");_e(this,"time_position");_e(this,"ppqn");_e(this,"tick");this.app=e,this.time_position={bar:0,beat:0,pulse:0},this.time_signature=[4,4],this.tick=0,this.bpm=120,this.ppqn=48,this.transportNode=null,this.ctx=r,r.audioWorklet.addModule(TransportProcessor).then(n=>(this.transportNode=new TransportNode(r,{},this.app),this.transportNode.connect(r.destination),n)).catch(n=>{console.log("Error loading TransportProcessor.js:",n)})}get ticks_before_new_bar(){const e=(this.app.clock.beats_since_origin-1)*48+this.time_position.pulse+1;return this.beats_per_bar*this.ppqn*this.time_position.bar+1-e}get beats_per_bar(){return this.time_signature[0]}get beats_since_origin(){return(this.time_position.bar-1)*this.beats_per_bar+this.time_position.beat}get pulses_since_origin(){return this.beats_since_origin*this.ppqn+this.time_position.pulse}get pulse_duration(){return 60/this.bpm/this.ppqn}convertPulseToSecond(e){return e*this.pulse_duration}start(){var e,r;((e=this.transportNode)==null?void 0:e.state)==="running"?console.log("Already started"):(this.app.audioContext.resume(),(r=this.transportNode)==null||r.start())}pause(){var e;(e=this.transportNode)==null||e.pause()}stop(){var e;(e=this.transportNode)==null||e.stop()}}const OPERATORS={"+":(a,e)=>a+e,"-":(a,e)=>a-e,"*":(a,e)=>a*e,"/":(a,e)=>a/e,"%":(a,e)=>a%e,"^":(a,e)=>a**e,"<<":(a,e)=>a<>":(a,e)=>a>>e,"&":(a,e)=>a&e,"|":(a,e)=>a|e},DEFAULT_OPTIONS={octave:0,duration:.25,key:"C4",scale:"IONIAN",measure:0,degrees:!1},DEFAULT_DURS={m:8,k:10240/1920,l:4,"d.":3,p:5120/1920,d:2,"w.":1.5,c:2560/1920,w:1,"h..":.875,"h.":.75,y:1280/1920,h:.5,"q..":840/1920,"q.":.375,n:640/1920,q:.25,"e..":420/1920,"e.":.1875,a:320/1920,e:.125,"s..":210/1920,"s.":180/1920,f:160/1920,s:.0625,"t..":105/1920,"t.":90/1920,x:80/1920,t:60/1920,"u.":45/1920,g:40/1920,u:30/1920,j:15/1920,o:8/1920,z:0},NOTES_TO_INTERVALS={C:0,Cs:1,D:2,Eb:3,E:4,F:5,Fs:6,G:7,Ab:8,A:9,Bb:10,B:11},MODIFIERS={"#":1,b:-1,s:1},scales=()=>{const a=[2,1,2,2,1,2,2],e=[2,2,1,2,2,2,1],r=[2,1,2,2,1,3,1],n=[2,2,1,2,1,3,1],s=[3,2,2,3,2],o=[2,3,2,3,2],l=[2,2,2,2,2,2],c=[2,1,1,3,2,3],u=[3,2,1,1,3,2],p=[2,1,2,2,2,2,1],h=[2,2,1,2,1,2,2];return{MAJOR:e,MINOR:a,"HARMONIC MINOR":r,"HARMONIC MAJOR":n,"MINOR PENTATONIC":s,"SUSPENDED PENTATONIC":o,"BLUES MAJOR":c,"BLUES MINOR":u,WHOLE:l,"MELODIC MINOR":p,"MELODIC MAJOR":h,MINORIC:[4,4,4],THAPTIC:[4,3,4,1],LOTHIC:[3,4,1,4],PHRATIC:[4,1,4,3],AERATHIC:[1,4,3,4],EPATHIC:[4,3,2,3],MYNIC:[3,2,3,4],ROTHIC:[2,3,4,3],EPORIC:[3,4,3,2],ZYPHIC:[4,4,3,1],EPOGIC:[4,3,1,4],LANIC:[3,1,4,4],PYRRIC:[1,4,4,3],AEOLORIC:[4,4,1,3],GONIC:[4,1,3,4],DALIC:[1,3,4,4],DYGIC:[3,4,4,1],DARIC:[4,3,3,2],LONIC:[3,3,2,4],PHRADIC:[3,2,4,3],BOLIC:[2,4,3,3],SARIC:[4,2,3,3],ZOPTIC:[2,3,3,4],AERAPHIC:[3,3,4,2],BYPTIC:[3,4,2,3],AEOLIC:[4,4,2,2],KOPTIC:[4,2,2,4],MIXOLYRIC:[2,2,4,4],LYDIC:[2,4,4,2],STATHIC:[4,2,4,2],DADIC:[2,4,2,4],PHRYNIC:[3,3,3,3],EPATHITONIC:[3,2,3,2,2],MYNITONIC:[2,3,2,2,3],ROCRITONIC:s,PENTATONIC:[2,2,3,2,3],THAPTITONIC:o,MAGITONIC:[4,3,2,2,1],DADITONIC:[3,2,2,1,4],AEOLYPHRITONIC:[2,2,1,4,3],GYCRITONIC:[2,1,4,3,2],PYRITONIC:[1,4,3,2,2],GATHITONIC:[4,2,3,2,1],IONITONIC:[2,3,2,1,4],PHRYNITONIC:[3,2,1,4,2],STATHITONIC:[2,1,4,2,3],THALITONIC:[1,4,2,3,2],ZOLITONIC:[4,2,1,4,1],EPOGITONIC:[2,1,4,1,4],LANITONIC:[1,4,1,4,2],PAPTITONIC:[4,1,4,2,1],IONACRITONIC:[1,4,2,1,4],PHRADITONIC:[4,1,4,1,2],AEOLORITONIC:[1,4,1,2,4],GONITONIC:[4,1,2,4,1],DALITONIC:[1,2,4,1,4],DYGITONIC:[2,4,1,4,1],AERACRITONIC:[4,1,2,3,2],BYPTITONIC:[1,2,3,2,4],DARITONIC:[2,3,2,4,1],LONITONIC:[3,2,4,1,2],IONYCRITONIC:[2,4,1,2,3],LOTHITONIC:[4,1,2,2,3],PHRATONIC:[1,2,2,3,4],AERATHITONIC:[2,2,3,4,1],SARITONIC:[2,3,4,1,2],ZOPTITONIC:[3,4,1,2,2],DOLITONIC:[4,4,1,2,1],PORITONIC:[4,1,2,1,4],AERYLITONIC:[1,2,1,4,4],ZAGITONIC:[2,1,4,4,1],LAGITONIC:[1,4,4,1,2],MOLITONIC:[4,3,3,1,1],STAPTITONIC:[3,3,1,1,4],MOTHITONIC:[3,1,1,4,3],AERITONIC:[1,1,4,3,3],RAGITONIC:[1,4,3,3,1],IONADITONIC:[4,3,2,1,2],BOCRITONIC:[3,2,1,2,4],GYTHITONIC:[2,1,2,4,3],PAGITONIC:[1,2,4,3,2],AEOLYTHITONIC:[2,4,3,2,1],ZACRITONIC:[4,3,1,3,1],LARITONIC:[3,1,3,1,4],THACRITONIC:[1,3,1,4,3],STYDITONIC:[3,1,4,3,1],LORITONIC:[1,4,3,1,3],AEOLYRITONIC:[4,3,1,1,3],GORITONIC:[3,1,1,3,4],AEOLODITONIC:[1,1,3,4,3],DOPTITONIC:[1,3,4,3,1],AERAPHITONIC:[3,4,3,1,1],ZATHITONIC:[4,2,4,1,1],RADITONIC:[2,4,1,1,4],STONITONIC:[4,1,1,4,2],SYPTITONIC:[1,1,4,2,4],IONYTHITONIC:[1,4,2,4,1],AEOLANITONIC:[4,2,2,3,1],DANITONIC:[2,2,3,1,4],IONARITONIC:[2,3,1,4,2],DYNITONIC:[3,1,4,2,2],ZYDITONIC:[1,4,2,2,3],AEOLACRITONIC:[4,2,1,2,3],ZYTHITONIC:[2,1,2,3,4],DYRITONIC:[1,2,3,4,2],KOPTITONIC:[2,3,4,2,1],THOCRITONIC:[3,4,2,1,2],LYCRITONIC:[4,1,3,3,1],DAPTITONIC:[1,3,3,1,4],KYGITONIC:[3,3,1,4,1],MOCRITONIC:[3,1,4,1,3],ZYNITONIC:[1,4,1,3,3],EPYGITONIC:[4,1,3,2,2],ZAPTITONIC:[1,3,2,2,4],KAGITONIC:[3,2,2,4,1],ZOGITONIC:[2,2,4,1,3],EPYRITONIC:[2,4,1,3,2],ZOTHITONIC:[4,1,3,1,3],PHROLITONIC:[1,3,1,3,4],IONAGITONIC:[3,1,3,4,1],AEOLAPRITONIC:[1,3,4,1,3],KYRITONIC:[3,4,1,3,1],IONYPTITONIC:[4,1,1,3,3],GYRITONIC:[1,1,3,3,4],ZALITONIC:[1,3,3,4,1],STOLITONIC:[3,3,4,1,1],BYLITONIC:[3,4,1,1,3],THODITONIC:[3,3,2,3,1],DOGITONIC:[3,2,3,1,3],PHRALITONIC:[2,3,1,3,3],GARITONIC:[3,1,3,3,2],SOPTITONIC:[1,3,3,2,3],KATARITONIC:[3,3,2,2,2],SYLITONIC:[3,2,2,2,3],THONITONIC:[2,2,2,3,3],PHROPITONIC:[2,2,3,3,2],STADITONIC:[2,3,3,2,2],LYDITONIC:[3,3,1,3,2],MYTHITONIC:[3,1,3,2,3],SOGITONIC:[1,3,2,3,3],GOTHITONIC:[3,2,3,3,1],ROTHITONIC:[2,3,3,1,3],ZYLITONIC:[4,4,2,1,1],ZODITONIC:[4,2,1,1,4],ZARITONIC:[2,1,1,4,4],PHRYTHITONIC:[1,1,4,4,2],ROLITONIC:[1,4,4,2,1],RANITONIC:[4,4,1,1,2],LADITONIC:[4,1,1,2,4],PODITONIC:[1,1,2,4,4],IONOTHITONIC:[1,2,4,4,1],KANITONIC:[2,4,4,1,1],RYPHITONIC:[4,3,1,2,2],GYLITONIC:[3,1,2,2,4],AEOLYCRITONIC:[1,2,2,4,3],PYNITONIC:[2,2,4,3,1],ZANITONIC:[2,4,3,1,2],PHRONITONIC:[4,2,3,1,2],BANITONIC:[2,3,1,2,4],AERONITONIC:[3,1,2,4,2],GOLITONIC:[1,2,4,2,3],DYPTITONIC:[2,4,2,3,1],AERYNITONIC:[4,2,2,1,3],PALITONIC:[2,2,1,3,4],STOTHITONIC:[2,1,3,4,2],AEROPHITONIC:[1,3,4,2,2],KATAGITONIC:[3,4,2,2,1],IONODITONIC:[4,2,1,3,2],BOGITONIC:[2,1,3,2,4],MOGITONIC:[1,3,2,4,2],DOCRITONIC:[3,2,4,2,1],EPADITONIC:[2,4,2,1,3],MIXITONIC:[3,3,3,2,1],PHROTHITONIC:[3,3,2,1,3],KATYCRITONIC:[3,2,1,3,3],IONALITONIC:[2,1,3,3,3],LOPTITONIC:[1,3,3,3,2],THYRITONIC:[3,3,3,1,2],THOPTITONIC:[3,3,1,2,3],BYCRITONIC:[3,1,2,3,3],PATHITONIC:[1,2,3,3,3],M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ALES$1=scales(),getRandomScale=()=>{const a=Object.keys(SCALES$1),e=a[Math.floor(Math.random()*a.length)];return SCALES$1[e]},getScale=a=>SCALES$1[a.toUpperCase()],isScale=a=>a.toUpperCase()in SCALES$1;function noteFromPc(a,e,r,n=0,s=0,o=!1){e=o&&e>0?e-1:e,a=typeof a=="string"?noteNameToMidi(a):a;const l=typeof r=="string"?getScale(r):r,c=l.length;(e>=c||e<0)&&(n+=Math.floor(e/c),e=e<0?c-Math.abs(e)%c:e%c,e===c&&(e=0));let u=a+l.slice(0,e).reduce((p,h)=>p+h,0);return u=u+n*l.reduce((p,h)=>p+h,0)+s,Number.isInteger(u)?[u,void 0]:resolvePitchBend(u)}function noteNameToMidi(a){const e=a.match(/^([a-gA-G])([#bs])?([1-9])?$/);if(e===null)return 60;const[,r,n,s]=e,o=s?parseInt(s,10):4,l=MODIFIERS[n]||0,c=NOTES_TO_INTERVALS[r.toUpperCase()];return 12+o*12+c+l}function resolvePitchBend(a,e=1){let r=8192;if(a%1!==0){const n=a>Math.round(a)?a:Math.round(a),s=a>Math.round(a)?Math.round(a):a,o=midiToFreq(n)/midiToFreq(s),l=1200*Math.log2(o);r=r+Math.floor(8191*(l/(100*e)))}return[a,r]}function midiToFreq(a){return 440/32*2**((a-9)/12)}function ratioToCents(a){return 1200*Math.log2(a)}function*primeSieve(){var r;const a={};let e=2;for(;;){if(!(e in a))yield e,a[e*e]=[e];else{for(const n of a[e])(a[r=n+e]||(a[r]=[])).push(n);delete a[e]}e++}}function getPrimes(a){const e=primeSieve();return Array.from({length:a},()=>e.next().value)}function monzoToCents(a){const e=a.length,r=getPrimes(e+1);let n=1;for(let s=0;s>>0;return e=r,r=n,n=s,s^=(s>>>19^l^l>>>8)>>>0,(s>>>0)/4294967296}for(let l=0;ldeepClone(e)):a&&typeof a=="object"?Object.getOwnPropertyNames(a).reduce((e,r)=>(Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r)),e[r]=deepClone(a[r]),e),Object.create(Object.getPrototypeOf(a))):a}class Base{constructor(e){_e(this,"text");_e(this,"location");Object.assign(this,e)}clone(){return deepClone(this)}collect(e){return this[e]}refresh(){}evaluate(e={}){}}class Event extends Base{constructor(r){super(r);_e(this,"duration");_e(this,"_next");_e(this,"_prev");_e(this,"modifiedEvent");Object.assign(this,r)}next(){return this._next}previous(){return this._prev}collect(r){return this[r]}sometimesBy(r,n){return Math.random()n.duration))}evaluate(r={}){return this.pitches.map(n=>n.evaluate(r))}collect(r){return this.pitches.map(s=>s.collect(r))}scale(r){return this.pitches.forEach(n=>n.scale(r)),this}}class RandomPitch extends Pitch{constructor(r){super(r);_e(this,"min");_e(this,"max");_e(this,"randomSeed");_e(this,"seededRandom");_e(this,"random");Object.assign(this,r),r.min||(this.min=0),r.max||(this.max=scaleLength(this.parsedScale)),this.seededRandom?this.random=this.seededRandom:this.random=Math.random}evaluate(r={}){const n=this.random();return this.pitch=Math.floor(n*(this.max-this.min+1))+this.min,new Pitch(this).evaluate(r)}seed(r){this.randomSeed=r,this.seededRandom=seededRandom(r)}}class OctaveChange extends Base{constructor(r){super(r);_e(this,"octave");Object.assign(this,r)}evaluate(r={}){r.octave=this.octave}}class DurationChange extends Base{constructor(r){super(r);_e(this,"duration");Object.assign(this,r)}evaluate(r={}){r.duration=this.duration}}class Repeat extends Base{constructor(r){super(r);_e(this,"times");_e(this,"item");Object.assign(this,r)}evaluate(r={}){return[...Array(this.times)].map(()=>this.item).flat(1/0).map(s=>s.evaluate(r))}}class List extends Base{constructor(r){super(r);_e(this,"items");Object.assign(this,r)}evaluate(r={}){return this.items.map(n=>n.evaluate(r))}}class ListOperation extends Base{constructor(r){super(r);_e(this,"left");_e(this,"right");_e(this,"operation");Object.assign(this,r)}evaluate(r={}){this.left.evaluate(),this.right.evaluate();const n=OPERATORS[this.operation];return this.right.items.flatMap(l=>this.left.items.map(c=>[l.clone(),c.clone()])).map(l=>(l[0].pitch=n(l[0].pitch,l[1].pitch),l[0].evaluate(r)))}}class Cycle extends Event{constructor(r){super(r);_e(this,"items");_e(this,"index");Object.assign(this,r),this.index=0}nextItem(r={}){let n=this.items[this.index%this.items.length];for(;n instanceof Cycle;)n=n.nextItem(r);return this.index=this.index+1,n instanceof Base?n.evaluate(r):n}evaluate(r={}){return this.nextItem(r)}}const peggyParser$1=function(){function a(s,o){function l(){this.constructor=s}l.prototype=o.prototype,s.prototype=new l}function e(s,o,l,c){var u=Error.call(this,s);return Object.setPrototypeOf&&Object.setPrototypeOf(u,e.prototype),u.expected=o,u.found=l,u.location=c,u.name="SyntaxError",u}a(e,Error);function r(s,o,l){return l=l||" ",s.length>o?s:(o-=s.length,l+=l.repeat(o),s+l.slice(0,o))}e.prototype.format=function(s){var o="Error: "+this.message;if(this.location){var l=null,c;for(c=0;cnew Promise((e,r)=>setTimeout(()=>r(new Error("Operation took too long")),a)),codeReplace=a=>a.replace(/->/g,"&&").replace(/::/g,"&&"),tryCatchWrapper=(a,e)=>new Promise((r,n)=>{try{Function(`"use strict";try{${codeReplace(e)}} catch (e) {console.log(e)};`).call(a.api),r(!0)}catch(s){console.log(s),r(!1)}}),cache=new Map,MAX_CACHE_SIZE=20,addFunctionToCache=(a,e)=>{cache.size>=MAX_CACHE_SIZE&&cache.delete(cache.keys().next().value),cache.set(a,e)},tryEvaluate=async(a,e,r=5e3)=>{try{e.evaluations++;const n=e.candidate;if(cache.has(n))cache.get(n).call(a.api);else{const s=`let i = ${e.evaluations};`+n;if(await Promise.race([tryCatchWrapper(a,s),delay(r)])){e.committed=e.candidate;const l=new Function(`"use strict";try{${codeReplace(s)}} catch (e) {console.log(e)};`);addFunctionToCache(n,l)}else await evaluate(a,e,r)}}catch(n){console.log(n)}},evaluate=async(a,e,r=1e3)=>{try{await Promise.race([tryCatchWrapper(a,e.committed),delay(r)]),e.evaluations&&e.evaluations++}catch(n){console.log(n)}};class TransportNode extends AudioWorkletNode{constructor(r,n,s){super(r,"transport",n);_e(this,"handleMessage",r=>{if(r.data&&r.data.type==="bang"){this.startTime===null&&(this.startTime=r.data.currentTime),this.elapsedTime=r.data.currentTime-this.startTime,this.prevCurrentTime=r.data.currentTime;let{futureTimeStamp:n,timeToNextPulse:s,nextPulsePosition:o}=this.convertTimeToNextBarsBeats(this.elapsedTime);this.nextPulsePosition!==o&&(this.nextPulsePosition=o,setTimeout(()=>{const l=this.app.audioContext.currentTime;this.app.clock.time_position=n,tryEvaluate(this.app,this.app.global_buffer),this.hasBeenEvaluated=!0,this.currentPulsePosition=o;const c=this.app.audioContext.currentTime;this.lastLatencies[this.indexOfLastLatencies]=c-l,this.indexOfLastLatencies=(this.indexOfLastLatencies+1)%this.lastLatencies.length;const u=this.lastLatencies.reduce((p,h)=>p+h)/this.lastLatencies.length;this.executionLatency=u/1e3},(s+this.executionLatency)*1e3))}});this.app=s,this.port.addEventListener("message",this.handleMessage),this.port.start(),this.$clock=document.getElementById("clockviewer"),this.hasBeenEvaluated=!1,this.currentPulsePosition=0,this.nextPulsePosition=-1,this.executionLatency=0,this.lastLatencies=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.indexOfLastLatencies=0,this.startTime=null,this.elapsedTime=0}start(){this.port.postMessage("start")}pause(){this.port.postMessage("pause")}stop(){this.startTime=null,this.elapsedTime=null,this.app.clock.tick=0,this.port.postMessage("stop")}convertTimeToBarsBeats(r){const n=60/this.app.clock.bpm,s=r/n,o=this.app.clock.time_signature[0],l=Math.floor(s/o)+1,c=Math.floor(s%o)+1,u=Math.floor(s%1*this.app.clock.ppqn);return this.app.clock.tick++,{bar:l,beat:c,ppqn:u}}convertTimeToNextBarsBeats(r){const n=60/this.app.clock.bpm,s=r/n,o=this.app.clock.time_signature[0];this.currentPulsePosition=s*this.app.clock.ppqn;const l=Math.ceil(this.currentPulsePosition),c=this.app.clock.convertPulseToSecond(this.nextPulsePosition-this.currentPulsePosition),u=this.nextPulsePosition/this.app.clock.ppqn,p=u/o,h={bar:Math.floor(p)+1,beat:Math.floor(u)%o+1,pulse:Math.floor(this.nextPulsePosition)%this.app.clock.ppqn};return this.app.clock.tick++,{futureTimeStamp:h,timeToNextPulse:c,nextPulsePosition:l}}}const TransportProcessor="/assets/TransportProcessor-9e6f56da.js";class Clock{constructor(e,r){_e(this,"ctx");_e(this,"transportNode");_e(this,"bpm");_e(this,"time_signature");_e(this,"time_position");_e(this,"ppqn");_e(this,"tick");this.app=e,this.time_position={bar:0,beat:0,pulse:0},this.time_signature=[4,4],this.tick=0,this.bpm=120,this.ppqn=48,this.transportNode=null,this.ctx=r,r.audioWorklet.addModule(TransportProcessor).then(n=>(this.transportNode=new TransportNode(r,{},this.app),this.transportNode.connect(r.destination),n)).catch(n=>{console.log("Error loading TransportProcessor.js:",n)})}get ticks_before_new_bar(){const e=(this.app.clock.beats_since_origin-1)*48+this.time_position.pulse+1;return this.beats_per_bar*this.ppqn*this.time_position.bar+1-e}get beats_per_bar(){return this.time_signature[0]}get beats_since_origin(){return(this.time_position.bar-1)*this.beats_per_bar+this.time_position.beat}get pulses_since_origin(){return this.beats_since_origin*this.ppqn+this.time_position.pulse}get pulse_duration(){return 60/this.bpm/this.ppqn}convertPulseToSecond(e){return e*this.pulse_duration}start(){var e,r;((e=this.transportNode)==null?void 0:e.state)==="running"?console.log("Already started"):(this.app.audioContext.resume(),(r=this.transportNode)==null||r.start())}pause(){var e;(e=this.transportNode)==null||e.pause()}stop(){var e;(e=this.transportNode)==null||e.stop()}}const OPERATORS={"+":(a,e)=>a+e,"-":(a,e)=>a-e,"*":(a,e)=>a*e,"/":(a,e)=>a/e,"%":(a,e)=>a%e,"^":(a,e)=>a**e,"<<":(a,e)=>a<>":(a,e)=>a>>e,"&":(a,e)=>a&e,"|":(a,e)=>a|e},DEFAULT_OPTIONS={octave:0,duration:.25,key:"C4",scale:"IONIAN",measure:0,degrees:!1},DEFAULT_DURS={m:8,k:10240/1920,l:4,"d.":3,p:5120/1920,d:2,"w.":1.5,c:2560/1920,w:1,"h..":.875,"h.":.75,y:1280/1920,h:.5,"q..":840/1920,"q.":.375,n:640/1920,q:.25,"e..":420/1920,"e.":.1875,a:320/1920,e:.125,"s..":210/1920,"s.":180/1920,f:160/1920,s:.0625,"t..":105/1920,"t.":90/1920,x:80/1920,t:60/1920,"u.":45/1920,g:40/1920,u:30/1920,j:15/1920,o:8/1920,z:0},NOTES_TO_INTERVALS={C:0,Cs:1,D:2,Eb:3,E:4,F:5,Fs:6,G:7,Ab:8,A:9,Bb:10,B:11},MODIFIERS={"#":1,b:-1,s:1},scales=()=>{const a=[2,1,2,2,1,2,2],e=[2,2,1,2,2,2,1],r=[2,1,2,2,1,3,1],n=[2,2,1,2,1,3,1],s=[3,2,2,3,2],o=[2,3,2,3,2],l=[2,2,2,2,2,2],c=[2,1,1,3,2,3],u=[3,2,1,1,3,2],p=[2,1,2,2,2,2,1],h=[2,2,1,2,1,2,2];return{MAJOR:e,MINOR:a,"HARMONIC MINOR":r,"HARMONIC MAJOR":n,"MINOR PENTATONIC":s,"SUSPENDED PENTATONIC":o,"BLUES MAJOR":c,"BLUES MINOR":u,WHOLE:l,"MELODIC MINOR":p,"MELODIC MAJOR":h,MINORIC:[4,4,4],THAPTIC:[4,3,4,1],LOTHIC:[3,4,1,4],PHRATIC:[4,1,4,3],AERATHIC:[1,4,3,4],EPATHIC:[4,3,2,3],MYNIC:[3,2,3,4],ROTHIC:[2,3,4,3],EPORIC:[3,4,3,2],ZYPHIC:[4,4,3,1],EPOGIC:[4,3,1,4],LANIC:[3,1,4,4],PYRRIC:[1,4,4,3],AEOLORIC:[4,4,1,3],GONIC:[4,1,3,4],DALIC:[1,3,4,4],DYGIC:[3,4,4,1],DARIC:[4,3,3,2],LONIC:[3,3,2,4],PHRADIC:[3,2,4,3],BOLIC:[2,4,3,3],SARIC:[4,2,3,3],ZOPTIC:[2,3,3,4],AERAPHIC:[3,3,4,2],BYPTIC:[3,4,2,3],AEOLIC:[4,4,2,2],KOPTIC:[4,2,2,4],MIXOLYRIC:[2,2,4,4],LYDIC:[2,4,4,2],STATHIC:[4,2,4,2],DADIC:[2,4,2,4],PHRYNIC:[3,3,3,3],EPATHITONIC:[3,2,3,2,2],MYNITONIC:[2,3,2,2,3],ROCRITONIC:s,PENTATONIC:[2,2,3,2,3],THAPTITONIC:o,MAGITONIC:[4,3,2,2,1],DADITONIC:[3,2,2,1,4],AEOLYPHRITONIC:[2,2,1,4,3],GYCRITONIC:[2,1,4,3,2],PYRITONIC:[1,4,3,2,2],GATHITONIC:[4,2,3,2,1],IONITONIC:[2,3,2,1,4],PHRYNITONIC:[3,2,1,4,2],STATHITONIC:[2,1,4,2,3],THALITONIC:[1,4,2,3,2],ZOLITONIC:[4,2,1,4,1],EPOGITONIC:[2,1,4,1,4],LANITONIC:[1,4,1,4,2],PAPTITONIC:[4,1,4,2,1],IONACRITONIC:[1,4,2,1,4],PHRADITONIC:[4,1,4,1,2],AEOLORITONIC:[1,4,1,2,4],GONITONIC:[4,1,2,4,1],DALITONIC:[1,2,4,1,4],DYGITONIC:[2,4,1,4,1],AERACRITONIC:[4,1,2,3,2],BYPTITONIC:[1,2,3,2,4],DARITONIC:[2,3,2,4,1],LONITONIC:[3,2,4,1,2],IONYCRITONIC:[2,4,1,2,3],LOTHITONIC:[4,1,2,2,3],PHRATONIC:[1,2,2,3,4],AERATHITONIC:[2,2,3,4,1],SARITONIC:[2,3,4,1,2],ZOPTITONIC:[3,4,1,2,2],DOLITONIC:[4,4,1,2,1],PORITONIC:[4,1,2,1,4],AERYLITONIC:[1,2,1,4,4],ZAGITONIC:[2,1,4,4,1],LAGITONIC:[1,4,4,1,2],MOLITONIC:[4,3,3,1,1],STAPTITONIC:[3,3,1,1,4],MOTHITONIC:[3,1,1,4,3],AERITONIC:[1,1,4,3,3],RAGITONIC:[1,4,3,3,1],IONADITONIC:[4,3,2,1,2],BOCRITONIC:[3,2,1,2,4],GYTHITONIC:[2,1,2,4,3],PAGITONIC:[1,2,4,3,2],AEOLYTHITONIC:[2,4,3,2,1],ZACRITONIC:[4,3,1,3,1],LARITONIC:[3,1,3,1,4],THACRITONIC:[1,3,1,4,3],STYDITONIC:[3,1,4,3,1],LORITONIC:[1,4,3,1,3],AEOLYRITONIC:[4,3,1,1,3],GORITONIC:[3,1,1,3,4],AEOLODITONIC:[1,1,3,4,3],DOPTITONIC:[1,3,4,3,1],AERAPHITONIC:[3,4,3,1,1],ZATHITONIC:[4,2,4,1,1],RADITONIC:[2,4,1,1,4],STONITONIC:[4,1,1,4,2],SYPTITONIC:[1,1,4,2,4],IONYTHITONIC:[1,4,2,4,1],AEOLANITONIC:[4,2,2,3,1],DANITONIC:[2,2,3,1,4],IONARITONIC:[2,3,1,4,2],DYNITONIC:[3,1,4,2,2],ZYDITONIC:[1,4,2,2,3],AEOLACRITONIC:[4,2,1,2,3],ZYTHITONIC:[2,1,2,3,4],DYRITONIC:[1,2,3,4,2],KOPTITONIC:[2,3,4,2,1],THOCRITONIC:[3,4,2,1,2],LYCRITONIC:[4,1,3,3,1],DAPTITONIC:[1,3,3,1,4],KYGITONIC:[3,3,1,4,1],MOCRITONIC:[3,1,4,1,3],ZYNITONIC:[1,4,1,3,3],EPYGITONIC:[4,1,3,2,2],ZAPTITONIC:[1,3,2,2,4],KAGITONIC:[3,2,2,4,1],ZOGITONIC:[2,2,4,1,3],EPYRITONIC:[2,4,1,3,2],ZOTHITONIC:[4,1,3,1,3],PHROLITONIC:[1,3,1,3,4],IONAGITONIC:[3,1,3,4,1],AEOLAPRITONIC:[1,3,4,1,3],KYRITONIC:[3,4,1,3,1],IONYPTITONIC:[4,1,1,3,3],GYRITONIC:[1,1,3,3,4],ZALITONIC:[1,3,3,4,1],STOLITONIC:[3,3,4,1,1],BYLITONIC:[3,4,1,1,3],THODITONIC:[3,3,2,3,1],DOGITONIC:[3,2,3,1,3],PHRALITONIC:[2,3,1,3,3],GARITONIC:[3,1,3,3,2],SOPTITONIC:[1,3,3,2,3],KATARITONIC:[3,3,2,2,2],SYLITONIC:[3,2,2,2,3],THONITONIC:[2,2,2,3,3],PHROPITONIC:[2,2,3,3,2],STADITONIC:[2,3,3,2,2],LYDITONIC:[3,3,1,3,2],MYTHITONIC:[3,1,3,2,3],SOGITONIC:[1,3,2,3,3],GOTHITONIC:[3,2,3,3,1],ROTHITONIC:[2,3,3,1,3],ZYLITONIC:[4,4,2,1,1],ZODITONIC:[4,2,1,1,4],ZARITONIC:[2,1,1,4,4],PHRYTHITONIC:[1,1,4,4,2],ROLITONIC:[1,4,4,2,1],RANITONIC:[4,4,1,1,2],LADITONIC:[4,1,1,2,4],PODITONIC:[1,1,2,4,4],IONOTHITONIC:[1,2,4,4,1],KANITONIC:[2,4,4,1,1],RYPHITONIC:[4,3,1,2,2],GYLITONIC:[3,1,2,2,4],AEOLYCRITONIC:[1,2,2,4,3],PYNITONIC:[2,2,4,3,1],ZANITONIC:[2,4,3,1,2],PHRONITONIC:[4,2,3,1,2],BANITONIC:[2,3,1,2,4],AERONITONIC:[3,1,2,4,2],GOLITONIC:[1,2,4,2,3],DYPTITONIC:[2,4,2,3,1],AERYNITONIC:[4,2,2,1,3],PALITONIC:[2,2,1,3,4],STOTHITONIC:[2,1,3,4,2],AEROPHITONIC:[1,3,4,2,2],KATAGITONIC:[3,4,2,2,1],IONODITONIC:[4,2,1,3,2],BOGITONIC:[2,1,3,2,4],MOGITONIC:[1,3,2,4,2],DOCRITONIC:[3,2,4,2,1],EPADITONIC:[2,4,2,1,3],MIXITONIC:[3,3,3,2,1],PHROTHITONIC:[3,3,2,1,3],KATYCRITONIC:[3,2,1,3,3],IONALITONIC:[2,1,3,3,3],LOPTITONIC:[1,3,3,3,2],THYRITONIC:[3,3,3,1,2],THOPTITONIC:[3,3,1,2,3],BYCRITONIC:[3,1,2,3,3],PATHITONIC:[1,2,3,3,3],MYDITONIC:[2,3,3,3,1],BOLITONIC:[4,2,2,2,2],BOTHITONIC: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Math.random()*a.length)];return SCALES$1[e]},getScale=a=>SCALES$1[a.toUpperCase()],isScale=a=>a.toUpperCase()in SCALES$1;function noteFromPc(a,e,r,n=0,s=0,o=!1){e=o&&e>0?e-1:e,a=typeof a=="string"?noteNameToMidi(a):a;const l=typeof r=="string"?getScale(r):r,c=l.length;(e>=c||e<0)&&(n+=Math.floor(e/c),e=e<0?c-Math.abs(e)%c:e%c,e===c&&(e=0));let u=a+l.slice(0,e).reduce((p,h)=>p+h,0);return u=u+n*l.reduce((p,h)=>p+h,0)+s,Number.isInteger(u)?[u,void 0]:resolvePitchBend(u)}function noteNameToMidi(a){const e=a.match(/^([a-gA-G])([#bs])?([1-9])?$/);if(e===null)return 60;const[,r,n,s]=e,o=s?parseInt(s,10):4,l=MODIFIERS[n]||0,c=NOTES_TO_INTERVALS[r.toUpperCase()];return 12+o*12+c+l}function resolvePitchBend(a,e=1){let r=8192;if(a%1!==0){const n=a>Math.round(a)?a:Math.round(a),s=a>Math.round(a)?Math.round(a):a,o=midiToFreq(n)/midiToFreq(s),l=1200*Math.log2(o);r=r+Math.floor(8191*(l/(100*e)))}return[a,r]}function midiToFreq(a){return 440/32*2**((a-9)/12)}function ratioToCents(a){return 1200*Math.log2(a)}function*primeSieve(){var r;const a={};let e=2;for(;;){if(!(e in a))yield e,a[e*e]=[e];else{for(const n of a[e])(a[r=n+e]||(a[r]=[])).push(n);delete a[e]}e++}}function getPrimes(a){const e=primeSieve();return Array.from({length:a},()=>e.next().value)}function monzoToCents(a){const e=a.length,r=getPrimes(e+1);let n=1;for(let s=0;s>>0;return e=r,r=n,n=s,s^=(s>>>19^l^l>>>8)>>>0,(s>>>0)/4294967296}for(let l=0;ldeepClone(e)):a&&typeof a=="object"?Object.getOwnPropertyNames(a).reduce((e,r)=>(Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r)),e[r]=deepClone(a[r]),e),Object.create(Object.getPrototypeOf(a))):a}class Base{constructor(e){_e(this,"text");_e(this,"location");Object.assign(this,e)}clone(){return deepClone(this)}collect(e){return this[e]}refresh(){}evaluate(e={}){}}class Event extends Base{constructor(r){super(r);_e(this,"duration");_e(this,"_next");_e(this,"_prev");_e(this,"modifiedEvent");Object.assign(this,r)}next(){return this._next}previous(){return this._prev}collect(r){return this[r]}sometimesBy(r,n){return Math.random()n.duration))}evaluate(r={}){return this.pitches.map(n=>n.evaluate(r))}collect(r){return this.pitches.map(s=>s.collect(r))}scale(r){return this.pitches.forEach(n=>n.scale(r)),this}}class RandomPitch extends Pitch{constructor(r){super(r);_e(this,"min");_e(this,"max");_e(this,"randomSeed");_e(this,"seededRandom");_e(this,"random");Object.assign(this,r),r.min||(this.min=0),r.max||(this.max=scaleLength(this.parsedScale)),this.seededRandom?this.random=this.seededRandom:this.random=Math.random}evaluate(r={}){const n=this.random();return this.pitch=Math.floor(n*(this.max-this.min+1))+this.min,new Pitch(this).evaluate(r)}seed(r){this.randomSeed=r,this.seededRandom=seededRandom(r)}}class OctaveChange extends Base{constructor(r){super(r);_e(this,"octave");Object.assign(this,r)}evaluate(r={}){r.octave=this.octave}}class DurationChange extends Base{constructor(r){super(r);_e(this,"duration");Object.assign(this,r)}evaluate(r={}){r.duration=this.duration}}class Repeat extends Base{constructor(r){super(r);_e(this,"times");_e(this,"item");Object.assign(this,r)}evaluate(r={}){return[...Array(this.times)].map(()=>this.item).flat(1/0).map(s=>s.evaluate(r))}}class List extends Base{constructor(r){super(r);_e(this,"items");Object.assign(this,r)}evaluate(r={}){return this.items.map(n=>n.evaluate(r))}}class ListOperation extends Base{constructor(r){super(r);_e(this,"left");_e(this,"right");_e(this,"operation");Object.assign(this,r)}evaluate(r={}){this.left.evaluate(),this.right.evaluate();const n=OPERATORS[this.operation];return this.right.items.flatMap(l=>this.left.items.map(c=>[l.clone(),c.clone()])).map(l=>(l[0].pitch=n(l[0].pitch,l[1].pitch),l[0].evaluate(r)))}}class Cycle extends Event{constructor(r){super(r);_e(this,"items");_e(this,"index");Object.assign(this,r),this.index=0}nextItem(r={}){let n=this.items[this.index%this.items.length];for(;n instanceof Cycle;)n=n.nextItem(r);return this.index=this.index+1,n instanceof Base?n.evaluate(r):n}evaluate(r={}){return this.nextItem(r)}}const peggyParser$1=function(){function a(s,o){function l(){this.constructor=s}l.prototype=o.prototype,s.prototype=new l}function e(s,o,l,c){var u=Error.call(this,s);return Object.setPrototypeOf&&Object.setPrototypeOf(u,e.prototype),u.expected=o,u.found=l,u.location=c,u.name="SyntaxError",u}a(e,Error);function r(s,o,l){return l=l||" ",s.length>o?s:(o-=s.length,l+=l.repeat(o),s+l.slice(0,o))}e.prototype.format=function(s){var o="Error: "+this.message;if(this.location){var l=null,c;for(c=0;c `+h+` `+b+` | `+p.line+" | "+A+` @@ -395,7 +395,7 @@ Topos is made to be controlled entirely with a keyboard. It is recommanded to st `+o.line+" | "+p+` `+u+" | "+peg$padEnd("",s.column-1," ")+peg$padEnd("",f,"^")}else e+=` at `+l}return e},peg$SyntaxError.buildMessage=function(a,e){var r={literal:function(p){return'"'+s(p.text)+'"'},class:function(p){var h=p.parts.map(function(f){return Array.isArray(f)?o(f[0])+"-"+o(f[1]):o(f)});return"["+(p.inverted?"^":"")+h.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(p){return p.description}};function n(p){return p.charCodeAt(0).toString(16).toUpperCase()}function s(p){return p.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(h){return"\\x0"+n(h)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(h){return"\\x"+n(h)})}function o(p){return p.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(h){return"\\x0"+n(h)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(h){return"\\x"+n(h)})}function l(p){return r[p.type](p)}function c(p){var h=p.map(l),f,b;if(h.sort(),h.length>0){for(f=1,b=1;f",peg$c9="[",peg$c10="+",peg$c11="*",peg$c12="%",peg$c13="&",peg$c14="|",peg$c15="<<",peg$c16=">>",peg$r0=/^[' '\t\r\n]/,peg$r1=/^[0-9]/,peg$e0=peg$classExpectation(["'"," ","'"," ","\r",` -`],!1,!1),peg$e1=peg$literalExpectation("(",!1),peg$e2=peg$literalExpectation(",",!1),peg$e3=peg$literalExpectation(")",!1),peg$e4=peg$classExpectation([["0","9"]],!1,!1),peg$e5=peg$literalExpectation(".",!1),peg$e6=peg$literalExpectation("-",!1),peg$e7=peg$literalExpectation("/",!1),peg$e8=peg$literalExpectation("\\",!1),peg$e9=peg$literalExpectation("<",!1),peg$e10=peg$literalExpectation(">",!1),peg$e11=peg$literalExpectation("[",!1),peg$e12=peg$literalExpectation("+",!1),peg$e13=peg$literalExpectation("*",!1),peg$e14=peg$literalExpectation("%",!1),peg$e15=peg$literalExpectation("&",!1),peg$e16=peg$literalExpectation("|",!1),peg$e17=peg$literalExpectation("<<",!1),peg$e18=peg$literalExpectation(">>",!1),peg$f0=function(a){return centsToSemitones(a.filter(e=>e))},peg$f1=function(){},peg$f2=function(a,e){return Math.floor(Math.random()*(e-a+1)+a)},peg$f3=function(a,e){return Math.random()*(e-a)+a},peg$f4=function(){return parseFloat(text())},peg$f5=function(){return parseInt(text())},peg$f6=function(a){return ratioToCents(a)},peg$f7=function(a,e){return a/e},peg$f8=function(a,e){return Math.pow(2,a/e)},peg$f9=function(a,e,r,n){var s=n?r/n:r;return Math.pow(s,a/e)},peg$f10=function(a,e){return parseFloat(a.toString()+"."+e.toString())},peg$f11=function(a){return a.filter(e=>e)},peg$f12=function(a){return monzoToCents(a)},peg$f13=function(){return eval(text())},peg$currPos=0,peg$savedPos=0,peg$posDetailsCache=[{line:1,column:1}],peg$maxFailPos=0,peg$maxFailExpected=[],peg$resultsCache={},peg$result;if("startRule"in options){if(!(options.startRule in peg$startRuleFunctions))throw new Error(`Can't start parsing from rule "`+options.startRule+'".');peg$startRuleFunction=peg$startRuleFunctions[options.startRule]}function text(){return input.substring(peg$savedPos,peg$currPos)}function peg$literalExpectation(a,e){return{type:"literal",text:a,ignoreCase:e}}function peg$classExpectation(a,e,r){return{type:"class",parts:a,inverted:e,ignoreCase:r}}function peg$endExpectation(){return{type:"end"}}function peg$computePosDetails(a){var e=peg$posDetailsCache[a],r;if(e)return e;for(r=a-1;!peg$posDetailsCache[r];)r--;for(e=peg$posDetailsCache[r],e={line:e.line,column:e.column};rpeg$maxFailPos&&(peg$maxFailPos=peg$currPos,peg$maxFailExpected=[]),peg$maxFailExpected.push(a))}function peg$buildStructuredError(a,e,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(a,e),a,e,r)}function peg$parselines(){var a,e,r,n=peg$currPos*17+0,s=peg$resultsCache[n];if(s)return peg$currPos=s.nextPos,s.result;if(a=peg$currPos,e=[],r=peg$parseratio(),r===peg$FAILED&&(r=peg$parsevalue(),r===peg$FAILED&&(r=peg$parsemonzo(),r===peg$FAILED&&(r=peg$parseoperation(),r===peg$FAILED&&(r=peg$parsesep())))),r!==peg$FAILED)for(;r!==peg$FAILED;)e.push(r),r=peg$parseratio(),r===peg$FAILED&&(r=peg$parsevalue(),r===peg$FAILED&&(r=peg$parsemonzo(),r===peg$FAILED&&(r=peg$parseoperation(),r===peg$FAILED&&(r=peg$parsesep()))));else e=peg$FAILED;return e!==peg$FAILED&&(peg$savedPos=a,e=peg$f0(e)),a=e,peg$resultsCache[n]={nextPos:peg$currPos,result:a},a}function peg$parsesep(){var a,e,r=peg$currPos*17+1,n=peg$resultsCache[r];return n?(peg$currPos=n.nextPos,n.result):(a=peg$currPos,peg$r0.test(input.charAt(peg$currPos))?(e=input.charAt(peg$currPos),peg$currPos++):(e=peg$FAILED,peg$fail(peg$e0)),e!==peg$FAILED&&(peg$savedPos=a,e=peg$f1()),a=e,peg$resultsCache[r]={nextPos:peg$currPos,result:a},a)}function peg$parsevalue(){var a,e=peg$currPos*17+2,r=peg$resultsCache[e];return r?(peg$currPos=r.nextPos,r.result):(a=peg$parsefloat(),a===peg$FAILED&&(a=peg$parseint(),a===peg$FAILED&&(a=peg$parserandom_int(),a===peg$FAILED&&(a=peg$parserandom_float()))),peg$resultsCache[e]={nextPos:peg$currPos,result:a},a)}function peg$parserandom_int(){var a,e,r,n,s,o,l=peg$currPos*17+3,c=peg$resultsCache[l];return c?(peg$currPos=c.nextPos,c.result):(a=peg$currPos,input.charCodeAt(peg$currPos)===40?(e=peg$c0,peg$currPos++):(e=peg$FAILED,peg$fail(peg$e1)),e!==peg$FAILED?(r=peg$parseint(),r!==peg$FAILED?(input.charCodeAt(peg$currPos)===44?(n=peg$c1,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e2)),n!==peg$FAILED?(s=peg$parseint(),s!==peg$FAILED?(input.charCodeAt(peg$currPos)===41?(o=peg$c2,peg$currPos++):(o=peg$FAILED,peg$fail(peg$e3)),o!==peg$FAILED?(peg$savedPos=a,a=peg$f2(r,s)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[l]={nextPos:peg$currPos,result:a},a)}function peg$parserandom_float(){var a,e,r,n,s,o,l=peg$currPos*17+4,c=peg$resultsCache[l];return c?(peg$currPos=c.nextPos,c.result):(a=peg$currPos,input.charCodeAt(peg$currPos)===40?(e=peg$c0,peg$currPos++):(e=peg$FAILED,peg$fail(peg$e1)),e!==peg$FAILED?(r=peg$parsefloat(),r!==peg$FAILED?(input.charCodeAt(peg$currPos)===44?(n=peg$c1,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e2)),n!==peg$FAILED?(s=peg$parsefloat(),s!==peg$FAILED?(input.charCodeAt(peg$currPos)===41?(o=peg$c2,peg$currPos++):(o=peg$FAILED,peg$fail(peg$e3)),o!==peg$FAILED?(peg$savedPos=a,a=peg$f3(r,s)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[l]={nextPos:peg$currPos,result:a},a)}function peg$parsefloat(){var a,e,r,n,s,o,l,c=peg$currPos*17+5,u=peg$resultsCache[c];if(u)return peg$currPos=u.nextPos,u.result;if(a=peg$currPos,e=peg$currPos,r=[],peg$r1.test(input.charAt(peg$currPos))?(n=input.charAt(peg$currPos),peg$currPos++):(n=peg$FAILED,peg$fail(peg$e4)),n!==peg$FAILED)for(;n!==peg$FAILED;)r.push(n),peg$r1.test(input.charAt(peg$currPos))?(n=input.charAt(peg$currPos),peg$currPos++):(n=peg$FAILED,peg$fail(peg$e4));else r=peg$FAILED;if(r!==peg$FAILED?(input.charCodeAt(peg$currPos)===46?(n=peg$c3,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e5)),n!==peg$FAILED?(r=[r,n],e=r):(peg$currPos=e,e=peg$FAILED)):(peg$currPos=e,e=peg$FAILED),e===peg$FAILED){for(e=peg$currPos,input.charCodeAt(peg$currPos)===45?(r=peg$c4,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e6)),r===peg$FAILED&&(r=null),n=[],peg$r1.test(input.charAt(peg$currPos))?(s=input.charAt(peg$currPos),peg$currPos++):(s=peg$FAILED,peg$fail(peg$e4));s!==peg$FAILED;)n.push(s),peg$r1.test(input.charAt(peg$currPos))?(s=input.charAt(peg$currPos),peg$currPos++):(s=peg$FAILED,peg$fail(peg$e4));if(input.charCodeAt(peg$currPos)===46?(s=peg$c3,peg$currPos++):(s=peg$FAILED,peg$fail(peg$e5)),s!==peg$FAILED){if(o=[],peg$r1.test(input.charAt(peg$currPos))?(l=input.charAt(peg$currPos),peg$currPos++):(l=peg$FAILED,peg$fail(peg$e4)),l!==peg$FAILED)for(;l!==peg$FAILED;)o.push(l),peg$r1.test(input.charAt(peg$currPos))?(l=input.charAt(peg$currPos),peg$currPos++):(l=peg$FAILED,peg$fail(peg$e4));else o=peg$FAILED;o!==peg$FAILED?(r=[r,n,s,o],e=r):(peg$currPos=e,e=peg$FAILED)}else peg$currPos=e,e=peg$FAILED;if(e===peg$FAILED)if(e=peg$currPos,input.charCodeAt(peg$currPos)===46?(r=peg$c3,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e5)),r!==peg$FAILED){if(n=[],peg$r1.test(input.charAt(peg$currPos))?(s=input.charAt(peg$currPos),peg$currPos++):(s=peg$FAILED,peg$fail(peg$e4)),s!==peg$FAILED)for(;s!==peg$FAILED;)n.push(s),peg$r1.test(input.charAt(peg$currPos))?(s=input.charAt(peg$currPos),peg$currPos++):(s=peg$FAILED,peg$fail(peg$e4));else n=peg$FAILED;n!==peg$FAILED?(r=[r,n],e=r):(peg$currPos=e,e=peg$FAILED)}else peg$currPos=e,e=peg$FAILED}return e!==peg$FAILED&&(peg$savedPos=a,e=peg$f4()),a=e,peg$resultsCache[c]={nextPos:peg$currPos,result:a},a}function peg$parseint(){var a,e,r,n=peg$currPos*17+6,s=peg$resultsCache[n];if(s)return peg$currPos=s.nextPos,s.result;if(a=peg$currPos,input.charCodeAt(peg$currPos)===45?peg$currPos++:peg$fail(peg$e6),e=[],peg$r1.test(input.charAt(peg$currPos))?(r=input.charAt(peg$currPos),peg$currPos++):(r=peg$FAILED,peg$fail(peg$e4)),r!==peg$FAILED)for(;r!==peg$FAILED;)e.push(r),peg$r1.test(input.charAt(peg$currPos))?(r=input.charAt(peg$currPos),peg$currPos++):(r=peg$FAILED,peg$fail(peg$e4));else e=peg$FAILED;return e!==peg$FAILED?(peg$savedPos=a,a=peg$f5()):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[n]={nextPos:peg$currPos,result:a},a}function peg$parseratio(){var a,e,r=peg$currPos*17+7,n=peg$resultsCache[r];return n?(peg$currPos=n.nextPos,n.result):(a=peg$currPos,e=peg$parseedji_ratio(),e===peg$FAILED&&(e=peg$parseedo_ratio(),e===peg$FAILED&&(e=peg$parsefrac_ratio(),e===peg$FAILED&&(e=peg$parsedecimal_ratio()))),e!==peg$FAILED&&(peg$savedPos=a,e=peg$f6(e)),a=e,peg$resultsCache[r]={nextPos:peg$currPos,result:a},a)}function peg$parsefrac_ratio(){var a,e,r,n,s=peg$currPos*17+8,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,e=peg$parseint(),e===peg$FAILED&&(e=peg$parserandom_int()),e!==peg$FAILED?(input.charCodeAt(peg$currPos)===47?(r=peg$c5,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e7)),r!==peg$FAILED?(n=peg$parseint(),n===peg$FAILED&&(n=peg$parserandom_int()),n!==peg$FAILED?(peg$savedPos=a,a=peg$f7(e,n)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}function peg$parseedo_ratio(){var a,e,r,n,s=peg$currPos*17+9,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,e=peg$parseint(),e===peg$FAILED&&(e=peg$parserandom_int()),e!==peg$FAILED?(input.charCodeAt(peg$currPos)===92?(r=peg$c6,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e8)),r!==peg$FAILED?(n=peg$parseint(),n===peg$FAILED&&(n=peg$parserandom_int()),n!==peg$FAILED?(peg$savedPos=a,a=peg$f8(e,n)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}function peg$parseedji_ratio(){var a,e,r,n,s,o,l,c,u=peg$currPos*17+10,p=peg$resultsCache[u];return p?(peg$currPos=p.nextPos,p.result):(a=peg$currPos,e=peg$parseint(),e===peg$FAILED&&(e=peg$parserandom_int()),e!==peg$FAILED?(input.charCodeAt(peg$currPos)===92?(r=peg$c6,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e8)),r!==peg$FAILED?(n=peg$parseint(),n===peg$FAILED&&(n=peg$parserandom_int()),n!==peg$FAILED?(input.charCodeAt(peg$currPos)===60?(s=peg$c7,peg$currPos++):(s=peg$FAILED,peg$fail(peg$e9)),s!==peg$FAILED?(o=peg$parseint(),o===peg$FAILED&&(o=peg$parserandom_int()),o!==peg$FAILED?(input.charCodeAt(peg$currPos)===47?peg$currPos++:peg$fail(peg$e7),l=peg$parseint(),l===peg$FAILED&&(l=peg$parserandom_int()),l===peg$FAILED&&(l=null),input.charCodeAt(peg$currPos)===62?(c=peg$c8,peg$currPos++):(c=peg$FAILED,peg$fail(peg$e10)),c!==peg$FAILED?(peg$savedPos=a,a=peg$f9(e,n,o,l)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[u]={nextPos:peg$currPos,result:a},a)}function peg$parsedecimal_ratio(){var a,e,r,n,s=peg$currPos*17+11,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,e=peg$parseint(),e!==peg$FAILED?(input.charCodeAt(peg$currPos)===44?(r=peg$c1,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e2)),r!==peg$FAILED?(n=peg$parseint(),n!==peg$FAILED?(peg$savedPos=a,a=peg$f10(e,n)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}function peg$parseints(){var a,e,r,n=peg$currPos*17+12,s=peg$resultsCache[n];if(s)return peg$currPos=s.nextPos,s.result;if(a=peg$currPos,e=[],r=peg$parseint(),r===peg$FAILED&&(r=peg$parsesep()),r!==peg$FAILED)for(;r!==peg$FAILED;)e.push(r),r=peg$parseint(),r===peg$FAILED&&(r=peg$parsesep());else e=peg$FAILED;return e!==peg$FAILED&&(peg$savedPos=a,e=peg$f11(e)),a=e,peg$resultsCache[n]={nextPos:peg$currPos,result:a},a}function peg$parsemonzo(){var a,e,r,n,s=peg$currPos*17+13,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,input.charCodeAt(peg$currPos)===91?(e=peg$c9,peg$currPos++):(e=peg$FAILED,peg$fail(peg$e11)),e!==peg$FAILED?(r=peg$parseints(),r!==peg$FAILED?(input.charCodeAt(peg$currPos)===62?(n=peg$c8,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e10)),n!==peg$FAILED?(peg$savedPos=a,a=peg$f12(r)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}function peg$parseoperation(){var a,e,r,n,s,o,l,c=peg$currPos*17+14,u=peg$resultsCache[c];if(u)return peg$currPos=u.nextPos,u.result;if(a=peg$currPos,e=peg$parsevalue(),e===peg$FAILED&&(e=peg$parseratio(),e===peg$FAILED&&(e=peg$parsemonzo(),e===peg$FAILED)))for(e=[],r=peg$parsesep();r!==peg$FAILED;)e.push(r),r=peg$parsesep();if(e!==peg$FAILED){if(r=[],n=peg$currPos,s=peg$parseoperator(),s!==peg$FAILED){if(o=peg$parsevalue(),o===peg$FAILED&&(o=peg$parseratio(),o===peg$FAILED&&(o=peg$parsemonzo(),o===peg$FAILED&&(o=peg$parsesub_operations(),o===peg$FAILED&&(o=peg$parseoperation(),o===peg$FAILED)))))for(o=[],l=peg$parsesep();l!==peg$FAILED;)o.push(l),l=peg$parsesep();o!==peg$FAILED?(s=[s,o],n=s):(peg$currPos=n,n=peg$FAILED)}else peg$currPos=n,n=peg$FAILED;if(n!==peg$FAILED)for(;n!==peg$FAILED;)if(r.push(n),n=peg$currPos,s=peg$parseoperator(),s!==peg$FAILED){if(o=peg$parsevalue(),o===peg$FAILED&&(o=peg$parseratio(),o===peg$FAILED&&(o=peg$parsemonzo(),o===peg$FAILED&&(o=peg$parsesub_operations(),o===peg$FAILED&&(o=peg$parseoperation(),o===peg$FAILED)))))for(o=[],l=peg$parsesep();l!==peg$FAILED;)o.push(l),l=peg$parsesep();o!==peg$FAILED?(s=[s,o],n=s):(peg$currPos=n,n=peg$FAILED)}else peg$currPos=n,n=peg$FAILED;else r=peg$FAILED;r!==peg$FAILED?(peg$savedPos=a,a=peg$f13()):(peg$currPos=a,a=peg$FAILED)}else peg$currPos=a,a=peg$FAILED;return peg$resultsCache[c]={nextPos:peg$currPos,result:a},a}function peg$parseoperator(){var a,e=peg$currPos*17+15,r=peg$resultsCache[e];return r?(peg$currPos=r.nextPos,r.result):(input.charCodeAt(peg$currPos)===43?(a=peg$c10,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e12)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===45?(a=peg$c4,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e6)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===42?(a=peg$c11,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e13)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===37?(a=peg$c12,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e14)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===38?(a=peg$c13,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e15)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===124?(a=peg$c14,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e16)),a===peg$FAILED&&(input.substr(peg$currPos,2)===peg$c15?(a=peg$c15,peg$currPos+=2):(a=peg$FAILED,peg$fail(peg$e17)),a===peg$FAILED&&(input.substr(peg$currPos,2)===peg$c16?(a=peg$c16,peg$currPos+=2):(a=peg$FAILED,peg$fail(peg$e18))))))))),peg$resultsCache[e]={nextPos:peg$currPos,result:a},a)}function peg$parsesub_operations(){var a,e,r,n,s=peg$currPos*17+16,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,input.charCodeAt(peg$currPos)===40?(e=peg$c0,peg$currPos++):(e=peg$FAILED,peg$fail(peg$e1)),e!==peg$FAILED?(r=peg$parseoperation(),r!==peg$FAILED?(input.charCodeAt(peg$currPos)===41?(n=peg$c2,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e3)),n!==peg$FAILED?(e=[e,r,n],a=e):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}if(peg$result=peg$startRuleFunction(),peg$result!==peg$FAILED&&peg$currPos===input.length)return peg$result;throw peg$result!==peg$FAILED&&peg$currPos{typeof PROCESS.emitWarning=="function"?PROCESS.emitWarning(a,e,r,n):console.error(`[${r}] ${e}: ${a}`)};let AC=globalThis.AbortController,AS=globalThis.AbortSignal;var Di;if(typeof AC>"u"){AS=class{constructor(){_e(this,"onabort");_e(this,"_onabort",[]);_e(this,"reason");_e(this,"aborted",!1)}addEventListener(n,s){this._onabort.push(s)}},AC=class{constructor(){_e(this,"signal",new AS);e()}abort(n){var s,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(const l of this.signal._onabort)l(n);(o=(s=this.signal).onabort)==null||o.call(s,n)}}};let a=((Di=PROCESS.env)==null?void 0:Di.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{a&&(a=!1,emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const shouldWarn=a=>!warned.has(a),isPosInt=a=>a&&a===Math.floor(a)&&a>0&&isFinite(a),getUintArray=a=>isPosInt(a)?a<=Math.pow(2,8)?Uint8Array:a<=Math.pow(2,16)?Uint16Array:a<=Math.pow(2,32)?Uint32Array:a<=Number.MAX_SAFE_INTEGER?ZeroArray:null:null;class ZeroArray extends Array{constructor(e){super(e),this.fill(0)}}var Dn;const pn=class pn{constructor(e,r){_e(this,"heap");_e(this,"length");if(!Oe(pn,Dn))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=getUintArray(e);if(!r)return[];St(pn,Dn,!0);const n=new pn(e,r);return St(pn,Dn,!1),n}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Dn=new WeakMap,Dt(pn,Dn,!1);let Stack=pn;var Nr,Or,Dr,wr,wn,tr,Lr,rr,qt,Rt,gr,br,cr,ir,xr,ar,Vr,Hr,Pr,kr,nn,mr,qn,_i,hn,zr,Vn,Tr,ii,Li,fn,Ln,Hn,Ur,tn,Yr,rn,zn,Si,xn,ri,Pn,ni,Yt,zt,Wn,Ei,gn,Qn;const Oi=class Oi{constructor(e){Dt(this,qn);Dt(this,ii);Dt(this,Ur);Dt(this,Yr);Dt(this,zn);Dt(this,xn);Dt(this,Pn);Dt(this,Yt);Dt(this,Wn);Dt(this,gn);Dt(this,Nr,void 0);Dt(this,Or,void 0);Dt(this,Dr,void 0);Dt(this,wr,void 0);Dt(this,wn,void 0);_e(this,"ttl");_e(this,"ttlResolution");_e(this,"ttlAutopurge");_e(this,"updateAgeOnGet");_e(this,"updateAgeOnHas");_e(this,"allowStale");_e(this,"noDisposeOnSet");_e(this,"noUpdateTTL");_e(this,"maxEntrySize");_e(this,"sizeCalculation");_e(this,"noDeleteOnFetchRejection");_e(this,"noDeleteOnStaleGet");_e(this,"allowStaleOnFetchAbort");_e(this,"allowStaleOnFetchRejection");_e(this,"ignoreFetchAbort");Dt(this,tr,void 0);Dt(this,Lr,void 0);Dt(this,rr,void 0);Dt(this,qt,void 0);Dt(this,Rt,void 0);Dt(this,gr,void 0);Dt(this,br,void 0);Dt(this,cr,void 0);Dt(this,ir,void 0);Dt(this,xr,void 0);Dt(this,ar,void 0);Dt(this,Vr,void 0);Dt(this,Hr,void 0);Dt(this,Pr,void 0);Dt(this,kr,void 0);Dt(this,nn,void 0);Dt(this,mr,void 0);Dt(this,hn,()=>{});Dt(this,zr,()=>{});Dt(this,Vn,()=>{});Dt(this,Tr,()=>!1);Dt(this,fn,e=>{});Dt(this,Ln,(e,r,n)=>{});Dt(this,Hn,(e,r,n,s)=>{if(n||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:r=0,ttl:n,ttlResolution:s=1,ttlAutopurge:o,updateAgeOnGet:l,updateAgeOnHas:c,allowStale:u,dispose:p,disposeAfter:h,noDisposeOnSet:f,noUpdateTTL:b,maxSize:A=0,maxEntrySize:N=0,sizeCalculation:F,fetchMethod:B,noDeleteOnFetchRejection:H,noDeleteOnStaleGet:Ee,allowStaleOnFetchRejection:Pe,allowStaleOnFetchAbort:g,ignoreFetchAbort:R}=e;if(r!==0&&!isPosInt(r))throw new TypeError("max option must be a nonnegative integer");const y=r?getUintArray(r):Array;if(!y)throw new Error("invalid max value: "+r);if(St(this,Nr,r),St(this,Or,A),this.maxEntrySize=N||Oe(this,Or),this.sizeCalculation=F,this.sizeCalculation){if(!Oe(this,Or)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(B!==void 0&&typeof B!="function")throw new TypeError("fetchMethod must be a function if specified");if(St(this,wn,B),St(this,nn,!!B),St(this,rr,new Map),St(this,qt,new Array(r).fill(void 0)),St(this,Rt,new Array(r).fill(void 0)),St(this,gr,new y(r)),St(this,br,new y(r)),St(this,cr,0),St(this,ir,0),St(this,xr,Stack.create(r)),St(this,tr,0),St(this,Lr,0),typeof p=="function"&&St(this,Dr,p),typeof h=="function"?(St(this,wr,h),St(this,ar,[])):(St(this,wr,void 0),St(this,ar,void 0)),St(this,kr,!!Oe(this,Dr)),St(this,mr,!!Oe(this,wr)),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!b,this.noDeleteOnFetchRejection=!!H,this.allowStaleOnFetchRejection=!!Pe,this.allowStaleOnFetchAbort=!!g,this.ignoreFetchAbort=!!R,this.maxEntrySize!==0){if(Oe(this,Or)!==0&&!isPosInt(Oe(this,Or)))throw new TypeError("maxSize must be a positive integer if specified");if(!isPosInt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ht(this,ii,Li).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!Ee,this.updateAgeOnGet=!!l,this.updateAgeOnHas=!!c,this.ttlResolution=isPosInt(s)||s===0?s:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!isPosInt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ht(this,qn,_i).call(this)}if(Oe(this,Nr)===0&&this.ttl===0&&Oe(this,Or)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!Oe(this,Nr)&&!Oe(this,Or)){const M="LRU_CACHE_UNBOUNDED";shouldWarn(M)&&(warned.add(M),emitWarning("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",M,Oi))}}static unsafeExposeInternals(e){return{starts:Oe(e,Hr),ttls:Oe(e,Pr),sizes:Oe(e,Vr),keyMap:Oe(e,rr),keyList:Oe(e,qt),valList:Oe(e,Rt),next:Oe(e,gr),prev:Oe(e,br),get head(){return Oe(e,cr)},get tail(){return Oe(e,ir)},free:Oe(e,xr),isBackgroundFetch:r=>{var n;return ht(n=e,Yt,zt).call(n,r)},backgroundFetch:(r,n,s,o)=>{var l;return ht(l=e,Pn,ni).call(l,r,n,s,o)},moveToTail:r=>{var n;return ht(n=e,gn,Qn).call(n,r)},indexes:r=>{var n;return ht(n=e,Ur,tn).call(n,r)},rindexes:r=>{var n;return ht(n=e,Yr,rn).call(n,r)},isStale:r=>{var n;return Oe(n=e,Tr).call(n,r)}}}get max(){return Oe(this,Nr)}get maxSize(){return Oe(this,Or)}get calculatedSize(){return Oe(this,Lr)}get size(){return Oe(this,tr)}get fetchMethod(){return Oe(this,wn)}get dispose(){return Oe(this,Dr)}get disposeAfter(){return Oe(this,wr)}getRemainingTTL(e){return Oe(this,rr).has(e)?1/0:0}*entries(){for(const e of ht(this,Ur,tn).call(this))Oe(this,Rt)[e]!==void 0&&Oe(this,qt)[e]!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield[Oe(this,qt)[e],Oe(this,Rt)[e]])}*rentries(){for(const e of ht(this,Yr,rn).call(this))Oe(this,Rt)[e]!==void 0&&Oe(this,qt)[e]!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield[Oe(this,qt)[e],Oe(this,Rt)[e]])}*keys(){for(const e of ht(this,Ur,tn).call(this)){const r=Oe(this,qt)[e];r!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield r)}}*rkeys(){for(const e of ht(this,Yr,rn).call(this)){const r=Oe(this,qt)[e];r!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield r)}}*values(){for(const e of ht(this,Ur,tn).call(this))Oe(this,Rt)[e]!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield Oe(this,Rt)[e])}*rvalues(){for(const e of ht(this,Yr,rn).call(this))Oe(this,Rt)[e]!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield Oe(this,Rt)[e])}[Symbol.iterator](){return this.entries()}find(e,r={}){for(const n of ht(this,Ur,tn).call(this)){const s=Oe(this,Rt)[n],o=ht(this,Yt,zt).call(this,s)?s.__staleWhileFetching:s;if(o!==void 0&&e(o,Oe(this,qt)[n],this))return this.get(Oe(this,qt)[n],r)}}forEach(e,r=this){for(const n of ht(this,Ur,tn).call(this)){const s=Oe(this,Rt)[n],o=ht(this,Yt,zt).call(this,s)?s.__staleWhileFetching:s;o!==void 0&&e.call(r,o,Oe(this,qt)[n],this)}}rforEach(e,r=this){for(const n of ht(this,Yr,rn).call(this)){const s=Oe(this,Rt)[n],o=ht(this,Yt,zt).call(this,s)?s.__staleWhileFetching:s;o!==void 0&&e.call(r,o,Oe(this,qt)[n],this)}}purgeStale(){let e=!1;for(const r of ht(this,Yr,rn).call(this,{allowStale:!0}))Oe(this,Tr).call(this,r)&&(this.delete(Oe(this,qt)[r]),e=!0);return e}dump(){const e=[];for(const r of ht(this,Ur,tn).call(this,{allowStale:!0})){const n=Oe(this,qt)[r],s=Oe(this,Rt)[r],o=ht(this,Yt,zt).call(this,s)?s.__staleWhileFetching:s;if(o===void 0||n===void 0)continue;const l={value:o};if(Oe(this,Pr)&&Oe(this,Hr)){l.ttl=Oe(this,Pr)[r];const c=perf.now()-Oe(this,Hr)[r];l.start=Math.floor(Date.now()-c)}Oe(this,Vr)&&(l.size=Oe(this,Vr)[r]),e.unshift([n,l])}return e}load(e){this.clear();for(const[r,n]of e){if(n.start){const s=Date.now()-n.start;n.start=perf.now()-s}this.set(r,n.value,n)}}set(e,r,n={}){var b,A,N,F,B;if(r===void 0)return this.delete(e),this;const{ttl:s=this.ttl,start:o,noDisposeOnSet:l=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:u}=n;let{noUpdateTTL:p=this.noUpdateTTL}=n;const h=Oe(this,Hn).call(this,e,r,n.size||0,c);if(this.maxEntrySize&&h>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.delete(e),this;let f=Oe(this,tr)===0?void 0:Oe(this,rr).get(e);if(f===void 0)f=Oe(this,tr)===0?Oe(this,ir):Oe(this,xr).length!==0?Oe(this,xr).pop():Oe(this,tr)===Oe(this,Nr)?ht(this,xn,ri).call(this,!1):Oe(this,tr),Oe(this,qt)[f]=e,Oe(this,Rt)[f]=r,Oe(this,rr).set(e,f),Oe(this,gr)[Oe(this,ir)]=f,Oe(this,br)[f]=Oe(this,ir),St(this,ir,f),ti(this,tr)._++,Oe(this,Ln).call(this,f,h,u),u&&(u.set="add"),p=!1;else{ht(this,gn,Qn).call(this,f);const H=Oe(this,Rt)[f];if(r!==H){if(Oe(this,nn)&&ht(this,Yt,zt).call(this,H)){H.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:Ee}=H;Ee!==void 0&&!l&&(Oe(this,kr)&&((b=Oe(this,Dr))==null||b.call(this,Ee,e,"set")),Oe(this,mr)&&((A=Oe(this,ar))==null||A.push([Ee,e,"set"])))}else l||(Oe(this,kr)&&((N=Oe(this,Dr))==null||N.call(this,H,e,"set")),Oe(this,mr)&&((F=Oe(this,ar))==null||F.push([H,e,"set"])));if(Oe(this,fn).call(this,f),Oe(this,Ln).call(this,f,h,u),Oe(this,Rt)[f]=r,u){u.set="replace";const Ee=H&&ht(this,Yt,zt).call(this,H)?H.__staleWhileFetching:H;Ee!==void 0&&(u.oldValue=Ee)}}else u&&(u.set="update")}if(s!==0&&!Oe(this,Pr)&&ht(this,qn,_i).call(this),Oe(this,Pr)&&(p||Oe(this,Vn).call(this,f,s,o),u&&Oe(this,zr).call(this,u,f)),!l&&Oe(this,mr)&&Oe(this,ar)){const H=Oe(this,ar);let Ee;for(;Ee=H==null?void 0:H.shift();)(B=Oe(this,wr))==null||B.call(this,...Ee)}return this}pop(){var e;try{for(;Oe(this,tr);){const r=Oe(this,Rt)[Oe(this,cr)];if(ht(this,xn,ri).call(this,!0),ht(this,Yt,zt).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(Oe(this,mr)&&Oe(this,ar)){const r=Oe(this,ar);let n;for(;n=r==null?void 0:r.shift();)(e=Oe(this,wr))==null||e.call(this,...n)}}}has(e,r={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:s}=r,o=Oe(this,rr).get(e);if(o!==void 0){const l=Oe(this,Rt)[o];if(ht(this,Yt,zt).call(this,l)&&l.__staleWhileFetching===void 0)return!1;if(Oe(this,Tr).call(this,o))s&&(s.has="stale",Oe(this,zr).call(this,s,o));else return n&&Oe(this,hn).call(this,o),s&&(s.has="hit",Oe(this,zr).call(this,s,o)),!0}else s&&(s.has="miss");return!1}peek(e,r={}){const{allowStale:n=this.allowStale}=r,s=Oe(this,rr).get(e);if(s!==void 0&&(n||!Oe(this,Tr).call(this,s))){const o=Oe(this,Rt)[s];return ht(this,Yt,zt).call(this,o)?o.__staleWhileFetching:o}}async fetch(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:l=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:u=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:A=this.ignoreFetchAbort,allowStaleOnFetchAbort:N=this.allowStaleOnFetchAbort,context:F,forceRefresh:B=!1,status:H,signal:Ee}=r;if(!Oe(this,nn))return H&&(H.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:o,status:H});const Pe={allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:o,ttl:l,noDisposeOnSet:c,size:u,sizeCalculation:p,noUpdateTTL:h,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:N,ignoreFetchAbort:A,status:H,signal:Ee};let g=Oe(this,rr).get(e);if(g===void 0){H&&(H.fetch="miss");const R=ht(this,Pn,ni).call(this,e,g,Pe,F);return R.__returned=R}else{const R=Oe(this,Rt)[g];if(ht(this,Yt,zt).call(this,R)){const W=n&&R.__staleWhileFetching!==void 0;return H&&(H.fetch="inflight",W&&(H.returnedStale=!0)),W?R.__staleWhileFetching:R.__returned=R}const y=Oe(this,Tr).call(this,g);if(!B&&!y)return H&&(H.fetch="hit"),ht(this,gn,Qn).call(this,g),s&&Oe(this,hn).call(this,g),H&&Oe(this,zr).call(this,H,g),R;const M=ht(this,Pn,ni).call(this,e,g,Pe,F),se=M.__staleWhileFetching!==void 0&&n;return H&&(H.fetch=y?"stale":"refresh",se&&y&&(H.returnedStale=!0)),se?M.__staleWhileFetching:M.__returned=M}}get(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:l}=r,c=Oe(this,rr).get(e);if(c!==void 0){const u=Oe(this,Rt)[c],p=ht(this,Yt,zt).call(this,u);return l&&Oe(this,zr).call(this,l,c),Oe(this,Tr).call(this,c)?(l&&(l.get="stale"),p?(l&&n&&u.__staleWhileFetching!==void 0&&(l.returnedStale=!0),n?u.__staleWhileFetching:void 0):(o||this.delete(e),l&&n&&(l.returnedStale=!0),n?u:void 0)):(l&&(l.get="hit"),p?u.__staleWhileFetching:(ht(this,gn,Qn).call(this,c),s&&Oe(this,hn).call(this,c),u))}else l&&(l.get="miss")}delete(e){var n,s,o,l;let r=!1;if(Oe(this,tr)!==0){const c=Oe(this,rr).get(e);if(c!==void 0)if(r=!0,Oe(this,tr)===1)this.clear();else{Oe(this,fn).call(this,c);const u=Oe(this,Rt)[c];ht(this,Yt,zt).call(this,u)?u.__abortController.abort(new Error("deleted")):(Oe(this,kr)||Oe(this,mr))&&(Oe(this,kr)&&((n=Oe(this,Dr))==null||n.call(this,u,e,"delete")),Oe(this,mr)&&((s=Oe(this,ar))==null||s.push([u,e,"delete"]))),Oe(this,rr).delete(e),Oe(this,qt)[c]=void 0,Oe(this,Rt)[c]=void 0,c===Oe(this,ir)?St(this,ir,Oe(this,br)[c]):c===Oe(this,cr)?St(this,cr,Oe(this,gr)[c]):(Oe(this,gr)[Oe(this,br)[c]]=Oe(this,gr)[c],Oe(this,br)[Oe(this,gr)[c]]=Oe(this,br)[c]),ti(this,tr)._--,Oe(this,xr).push(c)}}if(Oe(this,mr)&&((o=Oe(this,ar))!=null&&o.length)){const c=Oe(this,ar);let u;for(;u=c==null?void 0:c.shift();)(l=Oe(this,wr))==null||l.call(this,...u)}return r}clear(){var e,r,n;for(const s of ht(this,Yr,rn).call(this,{allowStale:!0})){const o=Oe(this,Rt)[s];if(ht(this,Yt,zt).call(this,o))o.__abortController.abort(new Error("deleted"));else{const l=Oe(this,qt)[s];Oe(this,kr)&&((e=Oe(this,Dr))==null||e.call(this,o,l,"delete")),Oe(this,mr)&&((r=Oe(this,ar))==null||r.push([o,l,"delete"]))}}if(Oe(this,rr).clear(),Oe(this,Rt).fill(void 0),Oe(this,qt).fill(void 0),Oe(this,Pr)&&Oe(this,Hr)&&(Oe(this,Pr).fill(0),Oe(this,Hr).fill(0)),Oe(this,Vr)&&Oe(this,Vr).fill(0),St(this,cr,0),St(this,ir,0),Oe(this,xr).length=0,St(this,Lr,0),St(this,tr,0),Oe(this,mr)&&Oe(this,ar)){const s=Oe(this,ar);let o;for(;o=s==null?void 0:s.shift();)(n=Oe(this,wr))==null||n.call(this,...o)}}};Nr=new WeakMap,Or=new WeakMap,Dr=new WeakMap,wr=new WeakMap,wn=new WeakMap,tr=new WeakMap,Lr=new WeakMap,rr=new WeakMap,qt=new WeakMap,Rt=new WeakMap,gr=new WeakMap,br=new WeakMap,cr=new WeakMap,ir=new WeakMap,xr=new WeakMap,ar=new WeakMap,Vr=new WeakMap,Hr=new WeakMap,Pr=new WeakMap,kr=new WeakMap,nn=new WeakMap,mr=new WeakMap,qn=new WeakSet,_i=function(){const e=new ZeroArray(Oe(this,Nr)),r=new ZeroArray(Oe(this,Nr));St(this,Pr,e),St(this,Hr,r),St(this,Vn,(o,l,c=perf.now())=>{if(r[o]=l!==0?c:0,e[o]=l,l!==0&&this.ttlAutopurge){const u=setTimeout(()=>{Oe(this,Tr).call(this,o)&&this.delete(Oe(this,qt)[o])},l+1);u.unref&&u.unref()}}),St(this,hn,o=>{r[o]=e[o]!==0?perf.now():0}),St(this,zr,(o,l)=>{if(e[l]){const c=e[l],u=r[l];o.ttl=c,o.start=u,o.now=n||s();const p=o.now-u;o.remainingTTL=c-p}});let n=0;const s=()=>{const o=perf.now();if(this.ttlResolution>0){n=o;const l=setTimeout(()=>n=0,this.ttlResolution);l.unref&&l.unref()}return o};this.getRemainingTTL=o=>{const l=Oe(this,rr).get(o);if(l===void 0)return 0;const c=e[l],u=r[l];if(c===0||u===0)return 1/0;const p=(n||s())-u;return c-p},St(this,Tr,o=>e[o]!==0&&r[o]!==0&&(n||s())-r[o]>e[o])},hn=new WeakMap,zr=new WeakMap,Vn=new WeakMap,Tr=new WeakMap,ii=new WeakSet,Li=function(){const e=new ZeroArray(Oe(this,Nr));St(this,Lr,0),St(this,Vr,e),St(this,fn,r=>{St(this,Lr,Oe(this,Lr)-e[r]),e[r]=0}),St(this,Hn,(r,n,s,o)=>{if(ht(this,Yt,zt).call(this,n))return 0;if(!isPosInt(s))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(s=o(n,r),!isPosInt(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),St(this,Ln,(r,n,s)=>{if(e[r]=n,Oe(this,Or)){const o=Oe(this,Or)-e[r];for(;Oe(this,Lr)>o;)ht(this,xn,ri).call(this,!0)}St(this,Lr,Oe(this,Lr)+e[r]),s&&(s.entrySize=n,s.totalCalculatedSize=Oe(this,Lr))})},fn=new WeakMap,Ln=new WeakMap,Hn=new WeakMap,Ur=new WeakSet,tn=function*({allowStale:e=this.allowStale}={}){if(Oe(this,tr))for(let r=Oe(this,ir);!(!ht(this,zn,Si).call(this,r)||((e||!Oe(this,Tr).call(this,r))&&(yield r),r===Oe(this,cr)));)r=Oe(this,br)[r]},Yr=new WeakSet,rn=function*({allowStale:e=this.allowStale}={}){if(Oe(this,tr))for(let r=Oe(this,cr);!(!ht(this,zn,Si).call(this,r)||((e||!Oe(this,Tr).call(this,r))&&(yield r),r===Oe(this,ir)));)r=Oe(this,gr)[r]},zn=new WeakSet,Si=function(e){return e!==void 0&&Oe(this,rr).get(Oe(this,qt)[e])===e},xn=new WeakSet,ri=function(e){var o,l;const r=Oe(this,cr),n=Oe(this,qt)[r],s=Oe(this,Rt)[r];return Oe(this,nn)&&ht(this,Yt,zt).call(this,s)?s.__abortController.abort(new Error("evicted")):(Oe(this,kr)||Oe(this,mr))&&(Oe(this,kr)&&((o=Oe(this,Dr))==null||o.call(this,s,n,"evict")),Oe(this,mr)&&((l=Oe(this,ar))==null||l.push([s,n,"evict"]))),Oe(this,fn).call(this,r),e&&(Oe(this,qt)[r]=void 0,Oe(this,Rt)[r]=void 0,Oe(this,xr).push(r)),Oe(this,tr)===1?(St(this,cr,St(this,ir,0)),Oe(this,xr).length=0):St(this,cr,Oe(this,gr)[r]),Oe(this,rr).delete(n),ti(this,tr)._--,r},Pn=new WeakSet,ni=function(e,r,n,s){const o=r===void 0?void 0:Oe(this,Rt)[r];if(ht(this,Yt,zt).call(this,o))return o;const l=new AC,{signal:c}=n;c==null||c.addEventListener("abort",()=>l.abort(c.reason),{signal:l.signal});const u={signal:l.signal,options:n,context:s},p=(F,B=!1)=>{const{aborted:H}=l.signal,Ee=n.ignoreFetchAbort&&F!==void 0;if(n.status&&(H&&!B?(n.status.fetchAborted=!0,n.status.fetchError=l.signal.reason,Ee&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),H&&!Ee&&!B)return f(l.signal.reason);const Pe=A;return Oe(this,Rt)[r]===A&&(F===void 0?Pe.__staleWhileFetching?Oe(this,Rt)[r]=Pe.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,F,u.options))),F},h=F=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=F),f(F)),f=F=>{const{aborted:B}=l.signal,H=B&&n.allowStaleOnFetchAbort,Ee=H||n.allowStaleOnFetchRejection,Pe=Ee||n.noDeleteOnFetchRejection,g=A;if(Oe(this,Rt)[r]===A&&(!Pe||g.__staleWhileFetching===void 0?this.delete(e):H||(Oe(this,Rt)[r]=g.__staleWhileFetching)),Ee)return n.status&&g.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),g.__staleWhileFetching;if(g.__returned===g)throw F},b=(F,B)=>{var Ee;const H=(Ee=Oe(this,wn))==null?void 0:Ee.call(this,e,o,u);H&&H instanceof Promise&&H.then(Pe=>F(Pe===void 0?void 0:Pe),B),l.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(F(void 0),n.allowStaleOnFetchAbort&&(F=Pe=>p(Pe,!0)))})};n.status&&(n.status.fetchDispatched=!0);const A=new Promise(b).then(p,h),N=Object.assign(A,{__abortController:l,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,N,{...u.options,status:void 0}),r=Oe(this,rr).get(e)):Oe(this,Rt)[r]=N,N},Yt=new WeakSet,zt=function(e){if(!Oe(this,nn))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof AC},Wn=new WeakSet,Ei=function(e,r){Oe(this,br)[r]=e,Oe(this,gr)[e]=r},gn=new WeakSet,Qn=function(e){e!==Oe(this,ir)&&(e===Oe(this,cr)?St(this,cr,Oe(this,gr)[e]):ht(this,Wn,Ei).call(this,Oe(this,br)[e],Oe(this,gr)[e]),ht(this,Wn,Ei).call(this,Oe(this,ir),e),St(this,ir,e))};let LRUCache=Oi;const zcache=new LRUCache({max:1e3,ttl:1e3*60*5});class Ziffers{constructor(e,r={}){_e(this,"values");_e(this,"evaluated");_e(this,"options");_e(this,"index",0);_e(this,"redo");_e(this,"_current");r={...DEFAULT_OPTIONS,...r},r.scale&&(typeof r.scale=="string"&&(isScale(r.scale)?(r.scaleName=r.scale,r.scale=getScale(r.scale)):r.scale=parse(r.scale)),r.parsedScale=r.scale,delete r.scale),r.redo!==void 0?this.redo=r.redo:this.redo=1,r&&r.seed&&(r.randomSeed=r.seed,r.seededRandom=seededRandom(r.seed)),this.options={nodeOptions:r};try{this.values=parse$1(e,this.options),this.evaluated=this.evaluate()}catch(n){console.log(n),this.values=[],this.evaluated=[]}}update(){this.evaluated=this.evaluate()}pitches(){return this.evaluated.map(e=>e.collect("pitch"))}notes(){return this.evaluated.map(e=>e.collect("note"))}freqs(){return this.evaluated.map(e=>e.collect("freq"))}durations(){return this.evaluated.map(e=>e.collect("duration"))}next(){if(this.redo>0&&this.index>=this.evaluated.length*this.redo&&(this.update(),this._current=void 0,this.index=0),this._current!==void 0){const r=this.evaluated[this._current%this.evaluated.length];r.modifiedEvent&&r.modifiedEvent==null,this._current=this._current+1r.evaluate()).flat(1/0).filter(r=>r!==void 0);return e.forEach((r,n)=>{r._next=n0?n-1:e.length-1}),e}}const generateCacheKey=(...a)=>a.map(e=>JSON.stringify(e)).join(","),cachedCall=(a,e)=>{const r=generateCacheKey(a,e);if(zcache.has(r))return zcache.get(r);{const n=new Ziffers(a,e);return zcache.set(r,n),n}},cachedPattern=(a,e={})=>cachedCall(a,e);class MidiConnection{constructor(){_e(this,"midiAccess",null);_e(this,"midiOutputs",[]);_e(this,"currentOutputIndex",0);_e(this,"scheduledNotes",{});this.initializeMidiAccess()}async initializeMidiAccess(){try{this.midiAccess=await navigator.requestMIDIAccess(),this.midiOutputs=Array.from(this.midiAccess.outputs.values()),this.midiOutputs.length===0&&console.warn("No MIDI outputs available.")}catch(e){console.error("Failed to initialize MIDI:",e)}}getCurrentMidiPort(){return this.midiOutputs.length>0&&this.currentOutputIndex>=0&&this.currentOutputIndexn.name===e);return r!==-1?(this.currentOutputIndex=r,!0):(console.error(`MIDI output "${e}" not found.`),!1)}listMidiOutputs(){console.log("Available MIDI Outputs:"),this.midiOutputs.forEach((e,r)=>{console.log(`${r+1}. ${e.name}`)})}sendMidiNote(e,r,n,s){const o=this.midiOutputs[this.currentOutputIndex];if(e=Math.min(Math.max(e,0),127),o){const l=[144+r,e,n],c=[128+r,e,0];o.send(l);const u=setTimeout(()=>{o.send(c),delete this.scheduledNotes[e]},(s-.02)*1e3);this.scheduledNotes[e]=u}else console.error("MIDI output not available.")}sendSysExMessage(e){const r=this.midiOutputs[this.currentOutputIndex];r?r.send(e):console.error("MIDI output not available.")}sendPitchBend(e,r){(e<0||e>16383)&&console.error("Invalid pitch bend value. Value must be in the range 0-16383."),(r<0||r>15)&&console.error("Invalid MIDI channel. Channel must be in the range 0-15.");const n=this.midiOutputs[this.currentOutputIndex];if(n){const s=e&127,o=e>>7&127;n.send([224|r,s,o])}else console.error("MIDI output not available.")}sendProgramChange(e,r){const n=this.midiOutputs[this.currentOutputIndex];n?n.send([192+r,e]):console.error("MIDI output not available.")}sendMidiControlChange(e,r,n){const s=this.midiOutputs[this.currentOutputIndex];s?s.send([176+n,e,r]):console.error("MIDI output not available.")}panic(){const e=this.midiOutputs[this.currentOutputIndex];if(e){for(const r in this.scheduledNotes){const n=this.scheduledNotes[r];clearTimeout(n),e.send([128,parseInt(r),0])}this.scheduledNotes={}}else console.error("MIDI output not available.")}}class DrunkWalk{constructor(e,r,n){_e(this,"min");_e(this,"max");_e(this,"wrap");_e(this,"position");this.min=e,this.max=r,this.wrap=n,this.position=0}step(){const e=Math.floor(Math.random()*3)-1;this.position+=e,this.wrap?this.position>this.max?this.position=this.min:this.positionthis.max&&(this.position=this.max)}getPosition(){return this.position}toggleWrap(e){this.wrap=e}}const SCALES={major:[0,2,4,5,7,9,11],naturalMinor:[0,2,3,5,7,8,10],harmonicMinor:[0,2,3,5,7,8,11],melodicMinor:[0,2,3,5,7,9,11],dorian:[0,2,3,5,7,9,10],phrygian:[0,1,3,5,7,8,10],lydian:[0,2,4,6,7,9,11],mixolydian:[0,2,4,5,7,9,10],aeolian:[0,2,3,5,7,8,10],locrian:[0,1,3,5,6,8,10],wholeTone:[0,2,4,6,8,10],majorPentatonic:[0,2,4,7,9],minorPentatonic:[0,3,5,7,10],chromatic:[0,1,2,3,4,5,6,7,8,9,10,11],blues:[0,3,5,6,7,10],diminished:[0,2,3,5,6,8,9,11],neapolitanMinor:[0,1,3,5,7,8,11],neapolitanMajor:[0,1,3,5,7,9,11],enigmatic:[0,1,4,6,8,10,11],doubleHarmonic:[0,1,4,5,7,8,11],octatonic:[0,2,3,5,6,8,9,11],bebopDominant:[0,2,4,5,7,9,10,11],bebopMajor:[0,2,4,5,7,8,9,11],bebopMinor:[0,2,3,5,7,8,9,11],bebopDorian:[0,2,3,4,5,7,9,10],harmonicMajor:[0,2,4,5,7,8,11],hungarianMinor:[0,2,3,6,7,8,11],hungarianMajor:[0,3,4,6,7,9,10],oriental:[0,1,4,5,6,9,10],romanianMinor:[0,2,3,6,7,9,10],spanishGypsy:[0,1,4,5,7,8,10],jewish:[0,1,4,5,7,8,10],hindu:[0,2,4,5,7,8,10],japanese:[0,1,5,7,8],hirajoshi:[0,2,3,7,8],kumoi:[0,2,3,7,9],inSen:[0,1,5,7,10],iwato:[0,1,5,6,10],yo:[0,2,5,7,9],minorBlues:[0,3,5,6,7,10],algerian:[0,2,3,5,6,7,8,11],augmented:[0,3,4,7,8,11],balinese:[0,1,3,7,8],byzantine:[0,1,4,5,7,8,11],chinese:[0,4,6,7,11],egyptian:[0,2,5,7,10],eightToneSpanish:[0,1,3,4,5,6,8,10],hawaiian:[0,2,3,5,7,9,10],hindustan:[0,2,4,5,7,8,10],persian:[0,1,4,5,6,8,11],eastIndianPurvi:[0,1,4,6,7,8,11],orientalA:[0,1,4,5,6,9,10]};function scale(a,e="major",r=4){const n=SCALES[e];if(!n)throw new Error(`Unknown scale ${e}`);let s=a%n.length;s<0&&(s+=n.length);let o=Math.floor(a/n.length);return 60+(r+o)*12+n[s]}let listenerQueue=[],atom=(a,e)=>{let r,n=[],s={lc:0,l:e||0,value:a,set(o){s.value=o,s.notify()},get(){return s.lc||s.listen(()=>{})(),s.value},notify(o){r=n;let l=!listenerQueue.length;for(let c=0;c{n===r&&(n=n.slice());let c=n.indexOf(o);~c&&(n.splice(c,2),s.lc--,s.lc||s.off())}},subscribe(o,l){let c=s.listen(o,l);return o(s.value),c},off(){}};return s},map=(a={})=>{let e=atom(a);return e.setKey=function(r,n){typeof n>"u"?r in e.value&&(e.value={...e.value},delete e.value[r],e.notify(r)):e.value[r]!==n&&(e.value={...e.value,[r]:n},e.notify(r))},e};if(typeof DelayNode<"u"){class a extends DelayNode{constructor(r,n,s,o){super(r),n=Math.abs(n),this.delayTime.value=s;const l=r.createGain();l.gain.value=Math.min(Math.abs(o),.995),this.feedback=l.gain;const c=r.createGain();return c.gain.value=n,this.delayGain=c,this.connect(l),this.connect(c),l.connect(this),this.connect=u=>c.connect(u),this}start(r){this.delayGain.gain.setValueAtTime(this.delayGain.gain.value,r+this.delayTime.value)}}AudioContext.prototype.createFeedbackDelay=function(e,r,n){return new a(this,e,r,n)}}typeof AudioContext<"u"&&(AudioContext.prototype.impulseResponse=function(a,e=1){const r=this.sampleRate*a,n=this.createBuffer(e,r,this.sampleRate),s=n.getChannelData(0);for(let o=0;o(e.buffer=this.impulseResponse(r),e.duration=a,e),e.setDuration(a),e});var U={a:{freqs:[660,1120,2750,3e3,3350],gains:[1,.5012,.0708,.0631,.0126],qs:[80,90,120,130,140]},e:{freqs:[440,1800,2700,3e3,3300],gains:[1,.1995,.1259,.1,.1],qs:[70,80,100,120,120]},i:{freqs:[270,1850,2900,3350,3590],gains:[1,.0631,.0631,.0158,.0158],qs:[40,90,100,120,120]},o:{freqs:[430,820,2700,3e3,3300],gains:[1,.3162,.0501,.0794,.01995],qs:[40,80,100,120,120]},u:{freqs:[370,630,2750,3e3,3400],gains:[1,.1,.0708,.0316,.01995],qs:[40,60,100,120,120]}};if(typeof GainNode<"u"){class a extends GainNode{constructor(r,n){if(super(r),!U[n])throw new Error("vowel: unknown vowel "+n);const{gains:s,qs:o,freqs:l}=U[n],c=r.createGain();for(let u=0;u<5;u++){const p=r.createGain();p.gain.value=s[u];const h=r.createBiquadFilter();h.type="bandpass",h.Q.value=o[u],h.frequency.value=l[u],this.connect(h),h.connect(p),p.connect(c)}return c.gain.value=8,this.connect=u=>c.connect(u),this}}AudioContext.prototype.createVowelFilter=function(e){return new a(this,e)}}const re=a=>{var s;if(typeof a!="string")return[];const[e,r="",n]=((s=a.match(/^([a-gA-G])([#bsf]*)([0-9]*)$/))==null?void 0:s.slice(1))||[];return e?[e,r,n?Number(n):void 0]:[]},ie={c:0,d:2,e:4,f:5,g:7,a:9,b:11},ae={"#":1,b:-1,s:1,f:-1},E=(a,e=3)=>{const[r,n,s=e]=re(a);if(!r)throw new Error('not a note: "'+a+'"');const o=ie[r.toLowerCase()],l=(n==null?void 0:n.split("").reduce((c,u)=>c+ae[u],0))||0;return(Number(s)+1)*12+o+l},ge=a=>Math.pow(2,(a-69)/12)*440,de=(a,e,r)=>Math.min(Math.max(a,e),r),ue=a=>12*Math.log(a/440)/Math.LN2+69,le=(a,e)=>{if(typeof a!="object")throw new Error("valueToMidi: expected object value");let{freq:r,note:n}=a;if(typeof r=="number")return ue(r);if(typeof n=="string")return E(n);if(typeof n=="number")return n;if(!e)throw new Error("valueToMidi: expected freq or note to be set");return e},Ie="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2My4wIHNlZSBodHRwczovL2dpdGh1Yi5jb20vZGt0cjAvV2ViRGlydC9ibG9iL21haW4vTElDRU5TRQovLyBhbGwgdGhlIGNyZWRpdCBnb2VzIHRvIGRrdHIwJ3Mgd2ViZGlydDogaHR0cHM6Ly9naXRodWIuY29tL2RrdHIwL1dlYkRpcnQvYmxvYi81Y2UzZDY5ODM2MmM1NGQ2ZTFiNjhhY2M0N2ViMjk1NWFjNjJjNzkzL2Rpc3QvQXVkaW9Xb3JrbGV0cy5qcwovLyA8MwoKY2xhc3MgQ29hcnNlUHJvY2Vzc29yIGV4dGVuZHMgQXVkaW9Xb3JrbGV0UHJvY2V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wogICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgY29uc3QgdmFsdWUgPSAoKDEgKyBzaGFwZSkgKiBpbnB1dFswXVtuXSkgLyAoMSArIHNoYXBlICogTWF0aC5hYnMoaW5wdXRbMF1bbl0pKTsKICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK";function j(a){const e=C().createGain();return e.gain.value=a,e}const Ce=({s:a,freq:e,t:r})=>{const n=C().createOscillator();return n.type=a||"triangle",n.frequency.value=Number(e),n.start(r),{node:n,stop:s=>n.stop(s)}},ne=(a,e,r,n,s,o)=>{const l=C().createGain();return l.gain.setValueAtTime(0,o),l.gain.linearRampToValueAtTime(s,o+a),l.gain.linearRampToValueAtTime(r*s,o+a+e),{node:l,stop:c=>{l.gain.setValueAtTime(r*s,c),l.gain.linearRampToValueAtTime(0,c+n)}}},J=(a,e,r)=>{const n=C().createBiquadFilter();return n.type=a,n.frequency.value=e,n.Q.value=r,n};let te=a=>console.log(a);const V=(...a)=>te(...a),P=map();function oe(a,e,r={}){P.setKey(a,{onTrigger:e,data:r})}function $(a){return P.get()[a]}let x;const C=()=>(x||(x=new AudioContext),x);let Y;const Q=()=>{const a=C();return Y||(Y=a.createGain(),Y.connect(a.destination)),Y};let k;function fe(){return k||(k=C().audioWorklet.addModule(Ie),k)}function O(a,e,r){const n=new AudioWorkletNode(a,e);return Object.entries(r).forEach(([s,o])=>{n.parameters.get(s).value=o}),n}async function he$2(a={}){const{disableWorklets:e=!1}=a;typeof window<"u"&&(await C().resume(),e?console.log("disableWorklets: AudioWorklet effects coarse, crush and shape are skipped!"):await fe().catch(r=>{console.warn("could not load AudioWorklet effects coarse, crush and shape",r)}))}async function We(a){return new Promise(e=>{document.addEventListener("click",async function r(){await he$2(a),e(),document.removeEventListener("click",r)})})}let w={};function Ae(a,e,r,n){var s;if(r=de(r,0,.98),!w[a]){const o=C().createFeedbackDelay(1,e,r);(s=o.start)==null||s.call(o,n),o.connect(Q()),w[a]=o}return w[a].delayTime.value!==e&&w[a].delayTime.setValueAtTime(e,n),w[a].feedback.value!==r&&w[a].feedback.setValueAtTime(r,n),w[a]}let G={};function pe(a,e=2){if(!G[a]){const r=C().createReverb(e);r.connect(Q()),G[a]=r}return G[a].duration!==e&&(G[a]=G[a].setDuration(e),G[a].duration=e),G[a]}function _(a,e,r){const n=j(r);return a.connect(n),n.connect(e),n}const be=async(a,e,r)=>{const n=C();if(typeof a!="object")throw new Error(`expected hap.value to be an object, but got "${a}". Hint: append .note() or .s() to the end`,"error");let s=n.currentTime+e,{s:o="triangle",bank:l,source:c,gain:u=.8,cutoff:p,resonance:h=1,hcutoff:f,hresonance:b=1,bandf:A,bandq:N=1,coarse:F,crush:B,shape:H,pan:Ee,vowel:Pe,delay:g=0,delayfeedback:R=.5,delaytime:y=.25,orbit:M=1,room:z,size:se=2,velocity:W=1}=a;u*=W;let Se=[];const ze=()=>{Se.forEach(ke=>ke==null?void 0:ke.disconnect())};l&&o&&(o=`${l}_${o}`);let Qe;if(c)Qe=c(s,a,r);else if($(o)){const{onTrigger:ke}=$(o),xe=await ke(s,a,ze);xe&&(Qe=xe.node,xe.stop(s+r))}else throw new Error(`sound ${o} not found! Is it loaded?`);if(!Qe)return;if(n.currentTime>s){V("[webaudio] skip hap: still loading",n.currentTime-s);return}const $e=[];if($e.push(Qe),$e.push(j(u)),p!==void 0&&$e.push(J("lowpass",p,h)),f!==void 0&&$e.push(J("highpass",f,b)),A!==void 0&&$e.push(J("bandpass",A,N)),Pe!==void 0&&$e.push(n.createVowelFilter(Pe)),F!==void 0&&$e.push(O(n,"coarse-processor",{coarse:F})),B!==void 0&&$e.push(O(n,"crush-processor",{crush:B})),H!==void 0&&$e.push(O(n,"shape-processor",{shape:H})),Ee!==void 0){const ke=n.createStereoPanner();ke.pan.value=2*Ee-1,$e.push(ke)}const Ue=j(1);$e.push(Ue),Ue.connect(Q());let Z;if(g>0&&y>0&&R>0){const ke=Ae(M,y,R,s);Z=_(Ue,ke,g)}let ve;if(z>0&&se>0){const ke=pe(M,se);ve=_(Ue,ke,z)}$e.slice(1).reduce((ke,xe)=>ke.connect(xe),$e[0]),Se=$e.concat([Z,ve])},L={};function Be(a,e){var r=e?1e3:1024;if(a=r);return a.toFixed(1)+" "+n[s]}const me=async(a,e,r,n,s,o,l)=>{let c=0;s!==void 0&&r!==void 0&&V("[sampler] hap has note and freq. ignoring note","warning");let u=le({freq:s,note:r},36);c=u-36;const p=C();let h;if(Array.isArray(o))h=o[e%o.length];else{const N=B=>E(B)-u,F=Object.keys(o).filter(B=>!B.startsWith("_")).reduce((B,H,Ee)=>!B||Math.abs(N(H)){const s=r?`sound "${r}:${n}"`:"sample";if(!L[a]){V(`[sampler] load ${s}..`,"load-sample",{url:a});const o=Date.now();L[a]=fetch(a).then(l=>l.arrayBuffer()).then(async l=>{const c=Date.now()-o,u=Be(l.byteLength);return V(`[sampler] load ${s}... done! loaded ${u} in ${c}ms`,"loaded-sample",{url:a}),await e.decodeAudioData(l)})}return L[a]};function we(a){const e=C(),r=e.createBuffer(a.numberOfChannels,a.length,e.sampleRate);for(let n=0;nObject.entries(a).forEach(([n,s])=>{if(typeof s=="string"&&(s=[s]),typeof s!="object")throw new Error("wrong sample map format for "+n);r=s._base||r;const o=l=>(r+l).replace("github:","https://raw.githubusercontent.com/");Array.isArray(s)?s=s.map(o):s=Object.fromEntries(Object.entries(s).map(([l,c])=>[l,(typeof c=="string"?[c]:c).map(o)])),e(n,s)});let ce={};function Xe(a){const e=Object.entries(ce).find(([r])=>a.startsWith(r));if(e)return e[1]}const Re=async(a,e=a._base||"",r={})=>{if(typeof a=="string"){const o=Xe(a);if(o)return o(a);if(a.startsWith("github:")){let[c,u]=a.split("github:");u=u.endsWith("/")?u.slice(0,-1):u,a=`https://raw.githubusercontent.com/${u}/strudel.json`}if(typeof fetch!="function")return;const l=a.split("/").slice(0,-1).join("/");return typeof fetch>"u"?void 0:fetch(a).then(c=>c.json()).then(c=>Re(c,e||c._base||l,r)).catch(c=>{throw console.error(c),new Error(`error loading "${a}"`)})}const{prebake:n,tag:s}=r;Ge(a,(o,l)=>oe(o,(c,u,p)=>Ve(c,u,p,l),{type:"sample",samples:l,baseUrl:e,prebake:n,tag:s}),e)},ee=[];async function Ve(a,e,r,n,s){const{s:o,freq:l,unit:c,nudge:u=0,cut:p,loop:h,clip:f=void 0,n:b=0,note:A,speed:N=1,begin:F=0,end:B=1}=e;if(N===0)return;const H=C(),{attack:Ee=.001,decay:Pe=.001,sustain:g=1,release:R=.001}=e,y=a+u,M=await me(o,b,A,N,l,n,s);if(H.currentTime>a){V(`[sampler] still loading sound "${o}:${b}"`,"highlight");return}if(!M){V(`[sampler] could not load "${o}:${b}"`,"error");return}M.playbackRate.value=Math.abs(N)*M.playbackRate.value,c==="c"&&(M.playbackRate.value=M.playbackRate.value*M.buffer.duration*1);const z=F*M.buffer.duration;M.start(y,z);const se=M.buffer.duration/M.playbackRate.value,{node:W,stop:Se}=ne(Ee,Pe,g,R,1,a);M.connect(W);const ze=H.createGain();W.connect(ze),M.onended=function(){M.disconnect(),W.disconnect(),ze.disconnect(),r()};const Qe={node:ze,bufferSource:M,stop:($e,Ue=f===void 0)=>{let Z=$e;Ue&&(Z=a+(B-F)*se),M.stop(Z+R),Se(Z)}};if(p!==void 0){const $e=ee[p];$e&&($e.node.gain.setValueAtTime(1,y),$e.node.gain.linearRampToValueAtTime(0,y+.01)),ee[p]=Qe}return Qe}function Fe(){["sine","square","triangle","sawtooth"].forEach(a=>{oe(a,(e,r,n)=>{const{attack:s=.001,decay:o=.05,sustain:l=.6,release:c=.01}=r;let{n:u,note:p,freq:h}=r;u=p||u||36,typeof u=="string"&&(u=E(u)),!h&&typeof u=="number"&&(h=ge(u));const{node:f,stop:b}=Ce({t:e,s:a,freq:h}),A=j(.3),{node:N,stop:F}=ne(s,o,l,c,1,e);return f.onended=()=>{f.disconnect(),A.disconnect(),n()},{node:f.connect(A).connect(N),stop:B=>{F(B),b(B+c)}}},{type:"synth",prebake:!0})})}class Sound{constructor(e,r){_e(this,"values");_e(this,"unit",e=>(this.values.unit=e,this));_e(this,"freq",e=>(this.values.freq=e,this));_e(this,"nudge",e=>(this.values.nudge=e,this));_e(this,"cut",e=>(this.values.cut=e,this));_e(this,"loop",e=>(this.values.loop=e,this));_e(this,"clip",e=>(this.values.clip=e,this));_e(this,"n",e=>(this.values.n=e,this));_e(this,"note",e=>(this.values.note=e,this));_e(this,"speed",e=>(this.values.speed=e,this));_e(this,"begin",e=>(this.values.begin=e,this));_e(this,"end",e=>(this.values.end=e,this));_e(this,"gain",e=>(this.values.gain=e,this));_e(this,"cutoff",e=>(this.values.cutoff=e,this));_e(this,"resonance",e=>(this.values.resonance=e,this));_e(this,"hcutoff",e=>(this.values.hcutoff=e,this));_e(this,"hresonance",e=>(this.values.hresonance=e,this));_e(this,"bandf",e=>(this.values.bandf=e,this));_e(this,"bandq",e=>(this.values.bandq=e,this));_e(this,"coarse",e=>(this.values.coarse=e,this));_e(this,"crush",e=>(this.values.crush=e,this));_e(this,"shape",e=>(this.values.shape=e,this));_e(this,"pan",e=>(this.values.pan=e,this));_e(this,"vowel",e=>(this.values.vowel=e,this));_e(this,"delay",e=>(this.values.delay=e,this));_e(this,"delayfeedback",e=>(this.values.delayfeedback=e,this));_e(this,"delaytime",e=>(this.values.delaytime=e,this));_e(this,"orbit",e=>(this.values.orbit=e,this));_e(this,"room",e=>(this.values.room=e,this));_e(this,"size",e=>(this.values.size=e,this));_e(this,"velocity",e=>(this.values.velocity=e,this));_e(this,"out",()=>be(this.values,this.app.clock.pulse_duration));this.app=r,this.values={s:e}}}Array.prototype.in=function(a){return this.includes(a)};async function loadSamples(){const a="https://raw.githubusercontent.com/felixroos/dough-samples/main/";return Promise.all([We(),Re("github:Bubobubobubobubo/Topos-Samples/main"),Re(`${a}/tidal-drum-machines.json`),Re(`${a}/piano.json`),Re(`${a}/Dirt-Samples.json`),Re(`${a}/EmuSP12.json`),Re(`${a}/vcsl.json`),Fe()])}loadSamples();class UserAPI{constructor(e){_e(this,"variables",{});_e(this,"iterators",{});_e(this,"_drunk",new DrunkWalk(-100,100,!1));_e(this,"MidiConnection",new MidiConnection);_e(this,"load");_e(this,"time",()=>this.app.audioContext.currentTime);_e(this,"mouseX",()=>this.app._mouseX);_e(this,"mouseY",()=>this.app._mouseY);_e(this,"script",(...e)=>{e.forEach(r=>{tryEvaluate(this.app,this.app.universes[this.app.selected_universe].locals[r])})});_e(this,"s",this.script);_e(this,"clear_script",e=>{this.app.universes[this.app.selected_universe].locals[e]={candidate:"",committed:"",evaluations:0}});_e(this,"cs",this.clear_script);_e(this,"copy_script",(e,r)=>{this.app.universes[this.app.selected_universe].locals[r]=this.app.universes[this.app.selected_universe].locals[e]});_e(this,"cps",this.copy_script);_e(this,"midi_outputs",()=>(console.log(this.MidiConnection.listMidiOutputs()),this.MidiConnection.midiOutputs));_e(this,"midi_output",e=>{e?this.MidiConnection.switchMidiOutput(e):console.log(this.MidiConnection.getCurrentMidiPort())});_e(this,"note",(e,r={})=>{const n=r.channel?r.channel:0,s=r.velocity?r.velocity:100,o=r.duration?r.duration*Math.floor(this.app.clock.pulse_duration*this.ppqn()):this.app.clock.pulse_duration*this.ppqn();this.MidiConnection.sendMidiNote(e,n,s,o)});_e(this,"sysex",e=>{this.MidiConnection.sendSysExMessage(e)});_e(this,"pitch_bend",(e,r)=>{this.MidiConnection.sendPitchBend(e,r)});_e(this,"program_change",(e,r)=>{this.MidiConnection.sendProgramChange(e,r)});_e(this,"midi_clock",()=>{this.MidiConnection.sendMidiClock()});_e(this,"control_change",({control:e=20,value:r=0,channel:n=0})=>{this.MidiConnection.sendMidiControlChange(e,r,n)});_e(this,"midi_panic",()=>{this.MidiConnection.panic()});_e(this,"zn",(e,r={})=>{const n=cachedPattern(e,r);if(n.hasStarted()){const s=n.peek(),o=s.modifiedEvent?s.modifiedEvent:s,l=r.channel?r.channel:0,c=r.velocity?r.velocity:100,u=r.sustain?r.sustain:.5;o instanceof Pitch?(o.bend&&this.MidiConnection.sendPitchBend(o.bend,l),this.MidiConnection.sendMidiNote(o.note,l,c,u),o.bend&&this.MidiConnection.sendPitchBend(8192,l)):o instanceof Chord&&o.pitches.forEach(p=>{p.bend&&this.MidiConnection.sendPitchBend(p.bend,l),this.MidiConnection.sendMidiNote(p.note,l,c,u),p.bend&&this.MidiConnection.sendPitchBend(8192,l)}),s.modifiedEvent&&(s.modifiedEvent=void 0)}return n.next()});_e(this,"iterator",(e,r,n)=>(e in this.iterators?(this.iterators[e].limit!==r&&(this.iterators[e].value=0,this.iterators[e].limit=r),this.iterators[e].step!==n&&(this.iterators[e].step=n??this.iterators[e].step),this.iterators[e].value+=this.iterators[e].step,this.iterators[e].limit!==void 0&&this.iterators[e].value>this.iterators[e].limit&&(this.iterators[e].value=0)):this.iterators[e]={value:0,step:n??1,limit:r},this.iterators[e].value));_e(this,"$",this.iterator);_e(this,"drunk",e=>e!==void 0?(this._drunk.position=e,this._drunk.getPosition()):(this._drunk.step(),this._drunk.getPosition()));_e(this,"drunk_max",e=>{this._drunk.max=e});_e(this,"drunk_min",e=>{this._drunk.min=e});_e(this,"drunk_wrap",e=>{this._drunk.toggleWrap(e)});_e(this,"variable",(e,r)=>typeof e=="string"&&r===void 0?this.variables[e]:(this.variables[e]=r,this.variables[e]));_e(this,"v",this.variable);_e(this,"delete_variable",e=>{delete this.variables[e]});_e(this,"dv",this.delete_variable);_e(this,"clear_variables",()=>{this.variables={}});_e(this,"cv",this.clear_variables);_e(this,"slice",e=>{const r=this.epulse();return Math.floor(r/Math.floor(e*this.ppqn()))%2===0});_e(this,"barslice",e=>{const r=this.bar()-1;return Math.floor(r/e)%2===0});_e(this,"seqslice",(...e)=>{const r=e[0],n=e.slice(1),s=this.epulse(),o=Math.floor(s/Math.floor(r*this.ppqn()));return n[o%n.length]});_e(this,"pick",(...e)=>e[Math.floor(Math.random()*e.length)]);_e(this,"seqbeat",(...e)=>e[this.ebeat()%e.length]);_e(this,"mel",(e,r)=>r[e%r.length]);_e(this,"seqbar",(...e)=>e[(this.app.clock.time_position.bar+1)%e.length]);_e(this,"seqpulse",(...e)=>e[this.app.clock.time_position.pulse%e.length]);_e(this,"randI",(e,r)=>Math.floor(Math.random()*(r-e+1))+e);_e(this,"rand",(e,r)=>Math.random()*(r-e)+e);_e(this,"rI",this.randI);_e(this,"r",this.rand);_e(this,"quantize",(e,r)=>{if(r.length===0)return e;let n=r[0];return r.forEach(s=>{Math.abs(s-e)Math.min(Math.max(e,r),n));_e(this,"cmp",this.clamp);_e(this,"bpm",e=>e===void 0?this.app.clock.bpm:((e<1||e>500)&&console.log(`Setting bpm to ${e}`),this.app.clock.bpm=e,e));_e(this,"tempo",this.bpm);_e(this,"bpb",e=>e===void 0?this.app.clock.time_signature[0]:(e<1&&console.log(`Setting bpb to ${e}`),this.app.clock.time_signature[0]=e,e));_e(this,"ppqn",e=>e===void 0?this.app.clock.ppqn:(e<1&&console.log(`Setting ppqn to ${e}`),this.app.clock.ppqn=e,e));_e(this,"time_signature",(e,r)=>{this.app.clock.time_signature=[e,r]});_e(this,"almostNever",()=>Math.random()>.9);_e(this,"sometimes",()=>Math.random()>.5);_e(this,"rarely",()=>Math.random()>.75);_e(this,"often",()=>Math.random()>.25);_e(this,"almostAlways",()=>Math.random()>.1);_e(this,"dice",e=>Math.floor(Math.random()*e)+1);_e(this,"i",e=>e!==void 0?(this.app.universes[this.app.selected_universe].global.evaluations=e,this.app.universes[this.app.selected_universe]):this.app.universes[this.app.selected_universe].global.evaluations);_e(this,"bar",()=>this.app.clock.time_position.bar);_e(this,"tick",()=>this.app.clock.tick);_e(this,"pulse",()=>this.app.clock.time_position.pulse);_e(this,"beat",()=>this.app.clock.time_position.beat);_e(this,"ebeat",()=>this.app.clock.beats_since_origin);_e(this,"epulse",()=>this.app.clock.pulses_since_origin);_e(this,"onbar",(e,...r)=>{const n=[...Array(e).keys()].map(s=>s+1);return console.log(r.some(s=>n.includes(s%e))),r.some(s=>n.includes(s%e))});_e(this,"onbeat",(...e)=>{let r=[];return e.forEach(n=>{n=n%this.app.clock.time_signature[0]+1;let s=Math.floor(n),o=n-s;r.push(s===this.app.clock.time_position.beat&&this.app.clock.time_position.pulse===o*this.app.clock.ppqn)}),r.some(n=>n==!0)});_e(this,"stop",()=>{this.app.clock.pause(),this.app.setButtonHighlighting("pause",!0)});_e(this,"silence",this.stop);_e(this,"hush",this.stop);_e(this,"prob",e=>Math.random()*100Math.random()>.5);_e(this,"min",(...e)=>Math.min(...e));_e(this,"max",(...e)=>Math.max(...e));_e(this,"limit",(e,r,n)=>Math.min(Math.max(e,r),n));_e(this,"delay",(e,r)=>{setTimeout(r,e)});_e(this,"delayr",(e,r,n)=>{[...Array(r).keys()].map(o=>e*o).forEach((o,l)=>{setTimeout(n,o)})});_e(this,"mod",(...e)=>e.map(n=>this.epulse()%Math.floor(n*this.ppqn())===0).some(n=>n===!0));_e(this,"modbar",(...e)=>e.map(n=>this.bar()%Math.floor(n*this.ppqn())===0).some(n=>n===!0));_e(this,"euclid",(e,r,n,s=0)=>this._euclidean_cycle(r,n,s)[e%n]);_e(this,"bin",(e,r)=>{let s=r.toString(2).split("").map(o=>o==="1");return s[e%s.length]});_e(this,"line",(e,r,n=1)=>{const s=[];if(r>e&&n>0||rMath.sin(this.app.clock.ctx.currentTime*Math.PI*2*e)+r);_e(this,"usine",(e=1,r=0)=>(this.sine(e,r)+1)/2);_e(this,"saw",(e=1,r=0)=>this.app.clock.ctx.currentTime*e%1*2-1+r);_e(this,"usaw",(e=1,r=0)=>(this.saw(e,r)+1)/2);_e(this,"triangle",(e=1,r=0)=>Math.abs(this.saw(e,r))*2-1);_e(this,"utriangle",(e=1,r=0)=>(this.triangle(e,r)+1)/2);_e(this,"square",(e=1,r=0)=>this.saw(e,r)>0?1:-1);_e(this,"usquare",(e=1,r=0)=>(this.square(e,r)+1)/2);_e(this,"noise",()=>Math.random()*2-1);_e(this,"abs",Math.abs);_e(this,"sound",e=>new Sound(e,this.app));_e(this,"samples",Re);_e(this,"log",console.log);_e(this,"scale",scale);_e(this,"rate",e=>{});this.app=e,this.load=Re("github:tidalcycles/Dirt-Samples/master")}_euclidean_cycle(e,r,n=0){if(e==r)return Array.from({length:r},()=>!0);function s(c,u){const p=c.length,h=(u+1)%p;return c[u]>c[h]}if(e>=r)return[!0];const o=Array.from({length:r},(c,u)=>(e*(u-1)%r+r)%r);let l=o.map((c,u)=>s(o,u));return n!=0&&(l=l.slice(n).concat(l.slice(0,n))),l}}const style="";var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var showdown$2={exports:{}};(function(a){(function(){function e(g){var R={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(g===!1)return JSON.parse(JSON.stringify(R));var y={};for(var M in R)R.hasOwnProperty(M)&&(y[M]=R[M].defaultValue);return y}function r(){var g=e(!0),R={};for(var y in g)g.hasOwnProperty(y)&&(R[y]=!0);return R}var n={},s={},o={},l=e(!0),c="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:e(!0),allOn:r()};n.helper={},n.extensions={},n.setOption=function(g,R){return l[g]=R,this},n.getOption=function(g){return l[g]},n.getOptions=function(){return l},n.resetOptions=function(){l=e(!0)},n.setFlavor=function(g){if(!u.hasOwnProperty(g))throw Error(g+" flavor was not found");n.resetOptions();var R=u[g];c=g;for(var y in R)R.hasOwnProperty(y)&&(l[y]=R[y])},n.getFlavor=function(){return c},n.getFlavorOptions=function(g){if(u.hasOwnProperty(g))return u[g]},n.getDefaultOptions=function(g){return e(g)},n.subParser=function(g,R){if(n.helper.isString(g))if(typeof R<"u")s[g]=R;else{if(s.hasOwnProperty(g))return s[g];throw Error("SubParser named "+g+" not registered!")}},n.extension=function(g,R){if(!n.helper.isString(g))throw Error("Extension 'name' must be a string");if(g=n.helper.stdExtName(g),n.helper.isUndefined(R)){if(!o.hasOwnProperty(g))throw Error("Extension named "+g+" is not registered!");return o[g]}else{typeof R=="function"&&(R=R()),n.helper.isArray(R)||(R=[R]);var y=p(R,g);if(y.valid)o[g]=R;else throw Error(y.error)}},n.getAllExtensions=function(){return o},n.removeExtension=function(g){delete o[g]},n.resetExtensions=function(){o={}};function p(g,R){var y=R?"Error in "+R+" extension->":"Error in unnamed extension",M={valid:!0,error:""};n.helper.isArray(g)||(g=[g]);for(var z=0;z"u"},n.helper.forEach=function(g,R){if(n.helper.isUndefined(g))throw new Error("obj param is required");if(n.helper.isUndefined(R))throw new Error("callback param is required");if(!n.helper.isFunction(R))throw new Error("callback param must be a function/closure");if(typeof g.forEach=="function")g.forEach(R);else if(n.helper.isArray(g))for(var y=0;y").replace(/&/g,"&")};var f=function(g,R,y,M){var z=M||"",se=z.indexOf("g")>-1,W=new RegExp(R+"|"+y,"g"+z.replace(/g/g,"")),Se=new RegExp(R,z.replace(/g/g,"")),ze=[],Qe,$e,Ue,Z,ve;do for(Qe=0;Ue=W.exec(g);)if(Se.test(Ue[0]))Qe++||($e=W.lastIndex,Z=$e-Ue[0].length);else if(Qe&&!--Qe){ve=Ue.index+Ue[0].length;var ke={left:{start:Z,end:$e},match:{start:$e,end:Ue.index},right:{start:Ue.index,end:ve},wholeMatch:{start:Z,end:ve}};if(ze.push(ke),!se)return ze}while(Qe&&(W.lastIndex=$e));return ze};n.helper.matchRecursiveRegExp=function(g,R,y,M){for(var z=f(g,R,y,M),se=[],W=0;W0){var Qe=[];W[0].wholeMatch.start!==0&&Qe.push(g.slice(0,W[0].wholeMatch.start));for(var $e=0;$e=0?M+(y||0):M},n.helper.splitAtIndex=function(g,R){if(!n.helper.isString(g))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[g.substring(0,R),g.substring(R)]},n.helper.encodeEmailAddress=function(g){var R=[function(y){return"&#"+y.charCodeAt(0)+";"},function(y){return"&#x"+y.charCodeAt(0).toString(16)+";"},function(y){return y}];return g=g.replace(/./g,function(y){if(y==="@")y=R[Math.floor(Math.random()*2)](y);else{var M=Math.random();y=M>.9?R[2](y):M>.45?R[1](y):R[0](y)}return y}),g},n.helper.padEnd=function(R,y,M){return y=y>>0,M=String(M||" "),R.length>y?String(R):(y=y-R.length,y>M.length&&(M+=M.repeat(y/M.length)),String(R)+M.slice(0,y))},typeof console>"u"&&(console={warn:function(g){alert(g)},log:function(g){alert(g)},error:function(g){throw g}}),n.helper.regexes={asteriskDashAndColon:/([*_:~])/g},n.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},n.Converter=function(g){var R={},y=[],M=[],z={},se=c,W={parsed:{},raw:"",format:""};Se();function Se(){g=g||{};for(var Z in l)l.hasOwnProperty(Z)&&(R[Z]=l[Z]);if(typeof g=="object")for(var ve in g)g.hasOwnProperty(ve)&&(R[ve]=g[ve]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof g+" was passed instead.");R.extensions&&n.helper.forEach(R.extensions,ze)}function ze(Z,ve){if(ve=ve||null,n.helper.isString(Z))if(Z=n.helper.stdExtName(Z),ve=Z,n.extensions[Z]){console.warn("DEPRECATION WARNING: "+Z+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),Qe(n.extensions[Z],Z);return}else if(!n.helper.isUndefined(o[Z]))Z=o[Z];else throw Error('Extension "'+Z+'" could not be loaded. It was either not found or is not a valid extension.');typeof Z=="function"&&(Z=Z()),n.helper.isArray(Z)||(Z=[Z]);var ke=p(Z,ve);if(!ke.valid)throw Error(ke.error);for(var xe=0;xe",!1),peg$e11=peg$literalExpectation("[",!1),peg$e12=peg$literalExpectation("+",!1),peg$e13=peg$literalExpectation("*",!1),peg$e14=peg$literalExpectation("%",!1),peg$e15=peg$literalExpectation("&",!1),peg$e16=peg$literalExpectation("|",!1),peg$e17=peg$literalExpectation("<<",!1),peg$e18=peg$literalExpectation(">>",!1),peg$f0=function(a){return centsToSemitones(a.filter(e=>e))},peg$f1=function(){},peg$f2=function(a,e){return Math.floor(Math.random()*(e-a+1)+a)},peg$f3=function(a,e){return Math.random()*(e-a)+a},peg$f4=function(){return parseFloat(text())},peg$f5=function(){return parseInt(text())},peg$f6=function(a){return ratioToCents(a)},peg$f7=function(a,e){return a/e},peg$f8=function(a,e){return Math.pow(2,a/e)},peg$f9=function(a,e,r,n){var s=n?r/n:r;return Math.pow(s,a/e)},peg$f10=function(a,e){return parseFloat(a.toString()+"."+e.toString())},peg$f11=function(a){return a.filter(e=>e)},peg$f12=function(a){return monzoToCents(a)},peg$f13=function(){return eval(text())},peg$currPos=0,peg$savedPos=0,peg$posDetailsCache=[{line:1,column:1}],peg$maxFailPos=0,peg$maxFailExpected=[],peg$resultsCache={},peg$result;if("startRule"in options){if(!(options.startRule in peg$startRuleFunctions))throw new Error(`Can't start parsing from rule "`+options.startRule+'".');peg$startRuleFunction=peg$startRuleFunctions[options.startRule]}function text(){return input.substring(peg$savedPos,peg$currPos)}function peg$literalExpectation(a,e){return{type:"literal",text:a,ignoreCase:e}}function peg$classExpectation(a,e,r){return{type:"class",parts:a,inverted:e,ignoreCase:r}}function peg$endExpectation(){return{type:"end"}}function peg$computePosDetails(a){var e=peg$posDetailsCache[a],r;if(e)return e;for(r=a-1;!peg$posDetailsCache[r];)r--;for(e=peg$posDetailsCache[r],e={line:e.line,column:e.column};rpeg$maxFailPos&&(peg$maxFailPos=peg$currPos,peg$maxFailExpected=[]),peg$maxFailExpected.push(a))}function peg$buildStructuredError(a,e,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(a,e),a,e,r)}function peg$parselines(){var a,e,r,n=peg$currPos*17+0,s=peg$resultsCache[n];if(s)return peg$currPos=s.nextPos,s.result;if(a=peg$currPos,e=[],r=peg$parseratio(),r===peg$FAILED&&(r=peg$parsevalue(),r===peg$FAILED&&(r=peg$parsemonzo(),r===peg$FAILED&&(r=peg$parseoperation(),r===peg$FAILED&&(r=peg$parsesep())))),r!==peg$FAILED)for(;r!==peg$FAILED;)e.push(r),r=peg$parseratio(),r===peg$FAILED&&(r=peg$parsevalue(),r===peg$FAILED&&(r=peg$parsemonzo(),r===peg$FAILED&&(r=peg$parseoperation(),r===peg$FAILED&&(r=peg$parsesep()))));else e=peg$FAILED;return e!==peg$FAILED&&(peg$savedPos=a,e=peg$f0(e)),a=e,peg$resultsCache[n]={nextPos:peg$currPos,result:a},a}function peg$parsesep(){var a,e,r=peg$currPos*17+1,n=peg$resultsCache[r];return n?(peg$currPos=n.nextPos,n.result):(a=peg$currPos,peg$r0.test(input.charAt(peg$currPos))?(e=input.charAt(peg$currPos),peg$currPos++):(e=peg$FAILED,peg$fail(peg$e0)),e!==peg$FAILED&&(peg$savedPos=a,e=peg$f1()),a=e,peg$resultsCache[r]={nextPos:peg$currPos,result:a},a)}function peg$parsevalue(){var a,e=peg$currPos*17+2,r=peg$resultsCache[e];return r?(peg$currPos=r.nextPos,r.result):(a=peg$parsefloat(),a===peg$FAILED&&(a=peg$parseint(),a===peg$FAILED&&(a=peg$parserandom_int(),a===peg$FAILED&&(a=peg$parserandom_float()))),peg$resultsCache[e]={nextPos:peg$currPos,result:a},a)}function peg$parserandom_int(){var a,e,r,n,s,o,l=peg$currPos*17+3,c=peg$resultsCache[l];return c?(peg$currPos=c.nextPos,c.result):(a=peg$currPos,input.charCodeAt(peg$currPos)===40?(e=peg$c0,peg$currPos++):(e=peg$FAILED,peg$fail(peg$e1)),e!==peg$FAILED?(r=peg$parseint(),r!==peg$FAILED?(input.charCodeAt(peg$currPos)===44?(n=peg$c1,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e2)),n!==peg$FAILED?(s=peg$parseint(),s!==peg$FAILED?(input.charCodeAt(peg$currPos)===41?(o=peg$c2,peg$currPos++):(o=peg$FAILED,peg$fail(peg$e3)),o!==peg$FAILED?(peg$savedPos=a,a=peg$f2(r,s)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[l]={nextPos:peg$currPos,result:a},a)}function peg$parserandom_float(){var a,e,r,n,s,o,l=peg$currPos*17+4,c=peg$resultsCache[l];return c?(peg$currPos=c.nextPos,c.result):(a=peg$currPos,input.charCodeAt(peg$currPos)===40?(e=peg$c0,peg$currPos++):(e=peg$FAILED,peg$fail(peg$e1)),e!==peg$FAILED?(r=peg$parsefloat(),r!==peg$FAILED?(input.charCodeAt(peg$currPos)===44?(n=peg$c1,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e2)),n!==peg$FAILED?(s=peg$parsefloat(),s!==peg$FAILED?(input.charCodeAt(peg$currPos)===41?(o=peg$c2,peg$currPos++):(o=peg$FAILED,peg$fail(peg$e3)),o!==peg$FAILED?(peg$savedPos=a,a=peg$f3(r,s)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[l]={nextPos:peg$currPos,result:a},a)}function peg$parsefloat(){var a,e,r,n,s,o,l,c=peg$currPos*17+5,u=peg$resultsCache[c];if(u)return peg$currPos=u.nextPos,u.result;if(a=peg$currPos,e=peg$currPos,r=[],peg$r1.test(input.charAt(peg$currPos))?(n=input.charAt(peg$currPos),peg$currPos++):(n=peg$FAILED,peg$fail(peg$e4)),n!==peg$FAILED)for(;n!==peg$FAILED;)r.push(n),peg$r1.test(input.charAt(peg$currPos))?(n=input.charAt(peg$currPos),peg$currPos++):(n=peg$FAILED,peg$fail(peg$e4));else r=peg$FAILED;if(r!==peg$FAILED?(input.charCodeAt(peg$currPos)===46?(n=peg$c3,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e5)),n!==peg$FAILED?(r=[r,n],e=r):(peg$currPos=e,e=peg$FAILED)):(peg$currPos=e,e=peg$FAILED),e===peg$FAILED){for(e=peg$currPos,input.charCodeAt(peg$currPos)===45?(r=peg$c4,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e6)),r===peg$FAILED&&(r=null),n=[],peg$r1.test(input.charAt(peg$currPos))?(s=input.charAt(peg$currPos),peg$currPos++):(s=peg$FAILED,peg$fail(peg$e4));s!==peg$FAILED;)n.push(s),peg$r1.test(input.charAt(peg$currPos))?(s=input.charAt(peg$currPos),peg$currPos++):(s=peg$FAILED,peg$fail(peg$e4));if(input.charCodeAt(peg$currPos)===46?(s=peg$c3,peg$currPos++):(s=peg$FAILED,peg$fail(peg$e5)),s!==peg$FAILED){if(o=[],peg$r1.test(input.charAt(peg$currPos))?(l=input.charAt(peg$currPos),peg$currPos++):(l=peg$FAILED,peg$fail(peg$e4)),l!==peg$FAILED)for(;l!==peg$FAILED;)o.push(l),peg$r1.test(input.charAt(peg$currPos))?(l=input.charAt(peg$currPos),peg$currPos++):(l=peg$FAILED,peg$fail(peg$e4));else o=peg$FAILED;o!==peg$FAILED?(r=[r,n,s,o],e=r):(peg$currPos=e,e=peg$FAILED)}else peg$currPos=e,e=peg$FAILED;if(e===peg$FAILED)if(e=peg$currPos,input.charCodeAt(peg$currPos)===46?(r=peg$c3,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e5)),r!==peg$FAILED){if(n=[],peg$r1.test(input.charAt(peg$currPos))?(s=input.charAt(peg$currPos),peg$currPos++):(s=peg$FAILED,peg$fail(peg$e4)),s!==peg$FAILED)for(;s!==peg$FAILED;)n.push(s),peg$r1.test(input.charAt(peg$currPos))?(s=input.charAt(peg$currPos),peg$currPos++):(s=peg$FAILED,peg$fail(peg$e4));else n=peg$FAILED;n!==peg$FAILED?(r=[r,n],e=r):(peg$currPos=e,e=peg$FAILED)}else peg$currPos=e,e=peg$FAILED}return e!==peg$FAILED&&(peg$savedPos=a,e=peg$f4()),a=e,peg$resultsCache[c]={nextPos:peg$currPos,result:a},a}function peg$parseint(){var a,e,r,n=peg$currPos*17+6,s=peg$resultsCache[n];if(s)return peg$currPos=s.nextPos,s.result;if(a=peg$currPos,input.charCodeAt(peg$currPos)===45?peg$currPos++:peg$fail(peg$e6),e=[],peg$r1.test(input.charAt(peg$currPos))?(r=input.charAt(peg$currPos),peg$currPos++):(r=peg$FAILED,peg$fail(peg$e4)),r!==peg$FAILED)for(;r!==peg$FAILED;)e.push(r),peg$r1.test(input.charAt(peg$currPos))?(r=input.charAt(peg$currPos),peg$currPos++):(r=peg$FAILED,peg$fail(peg$e4));else e=peg$FAILED;return e!==peg$FAILED?(peg$savedPos=a,a=peg$f5()):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[n]={nextPos:peg$currPos,result:a},a}function peg$parseratio(){var a,e,r=peg$currPos*17+7,n=peg$resultsCache[r];return n?(peg$currPos=n.nextPos,n.result):(a=peg$currPos,e=peg$parseedji_ratio(),e===peg$FAILED&&(e=peg$parseedo_ratio(),e===peg$FAILED&&(e=peg$parsefrac_ratio(),e===peg$FAILED&&(e=peg$parsedecimal_ratio()))),e!==peg$FAILED&&(peg$savedPos=a,e=peg$f6(e)),a=e,peg$resultsCache[r]={nextPos:peg$currPos,result:a},a)}function peg$parsefrac_ratio(){var a,e,r,n,s=peg$currPos*17+8,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,e=peg$parseint(),e===peg$FAILED&&(e=peg$parserandom_int()),e!==peg$FAILED?(input.charCodeAt(peg$currPos)===47?(r=peg$c5,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e7)),r!==peg$FAILED?(n=peg$parseint(),n===peg$FAILED&&(n=peg$parserandom_int()),n!==peg$FAILED?(peg$savedPos=a,a=peg$f7(e,n)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}function peg$parseedo_ratio(){var a,e,r,n,s=peg$currPos*17+9,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,e=peg$parseint(),e===peg$FAILED&&(e=peg$parserandom_int()),e!==peg$FAILED?(input.charCodeAt(peg$currPos)===92?(r=peg$c6,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e8)),r!==peg$FAILED?(n=peg$parseint(),n===peg$FAILED&&(n=peg$parserandom_int()),n!==peg$FAILED?(peg$savedPos=a,a=peg$f8(e,n)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}function peg$parseedji_ratio(){var a,e,r,n,s,o,l,c,u=peg$currPos*17+10,p=peg$resultsCache[u];return p?(peg$currPos=p.nextPos,p.result):(a=peg$currPos,e=peg$parseint(),e===peg$FAILED&&(e=peg$parserandom_int()),e!==peg$FAILED?(input.charCodeAt(peg$currPos)===92?(r=peg$c6,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e8)),r!==peg$FAILED?(n=peg$parseint(),n===peg$FAILED&&(n=peg$parserandom_int()),n!==peg$FAILED?(input.charCodeAt(peg$currPos)===60?(s=peg$c7,peg$currPos++):(s=peg$FAILED,peg$fail(peg$e9)),s!==peg$FAILED?(o=peg$parseint(),o===peg$FAILED&&(o=peg$parserandom_int()),o!==peg$FAILED?(input.charCodeAt(peg$currPos)===47?peg$currPos++:peg$fail(peg$e7),l=peg$parseint(),l===peg$FAILED&&(l=peg$parserandom_int()),l===peg$FAILED&&(l=null),input.charCodeAt(peg$currPos)===62?(c=peg$c8,peg$currPos++):(c=peg$FAILED,peg$fail(peg$e10)),c!==peg$FAILED?(peg$savedPos=a,a=peg$f9(e,n,o,l)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[u]={nextPos:peg$currPos,result:a},a)}function peg$parsedecimal_ratio(){var a,e,r,n,s=peg$currPos*17+11,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,e=peg$parseint(),e!==peg$FAILED?(input.charCodeAt(peg$currPos)===44?(r=peg$c1,peg$currPos++):(r=peg$FAILED,peg$fail(peg$e2)),r!==peg$FAILED?(n=peg$parseint(),n!==peg$FAILED?(peg$savedPos=a,a=peg$f10(e,n)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}function peg$parseints(){var a,e,r,n=peg$currPos*17+12,s=peg$resultsCache[n];if(s)return peg$currPos=s.nextPos,s.result;if(a=peg$currPos,e=[],r=peg$parseint(),r===peg$FAILED&&(r=peg$parsesep()),r!==peg$FAILED)for(;r!==peg$FAILED;)e.push(r),r=peg$parseint(),r===peg$FAILED&&(r=peg$parsesep());else e=peg$FAILED;return e!==peg$FAILED&&(peg$savedPos=a,e=peg$f11(e)),a=e,peg$resultsCache[n]={nextPos:peg$currPos,result:a},a}function peg$parsemonzo(){var a,e,r,n,s=peg$currPos*17+13,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,input.charCodeAt(peg$currPos)===91?(e=peg$c9,peg$currPos++):(e=peg$FAILED,peg$fail(peg$e11)),e!==peg$FAILED?(r=peg$parseints(),r!==peg$FAILED?(input.charCodeAt(peg$currPos)===62?(n=peg$c8,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e10)),n!==peg$FAILED?(peg$savedPos=a,a=peg$f12(r)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}function peg$parseoperation(){var a,e,r,n,s,o,l,c=peg$currPos*17+14,u=peg$resultsCache[c];if(u)return peg$currPos=u.nextPos,u.result;if(a=peg$currPos,e=peg$parsevalue(),e===peg$FAILED&&(e=peg$parseratio(),e===peg$FAILED&&(e=peg$parsemonzo(),e===peg$FAILED)))for(e=[],r=peg$parsesep();r!==peg$FAILED;)e.push(r),r=peg$parsesep();if(e!==peg$FAILED){if(r=[],n=peg$currPos,s=peg$parseoperator(),s!==peg$FAILED){if(o=peg$parsevalue(),o===peg$FAILED&&(o=peg$parseratio(),o===peg$FAILED&&(o=peg$parsemonzo(),o===peg$FAILED&&(o=peg$parsesub_operations(),o===peg$FAILED&&(o=peg$parseoperation(),o===peg$FAILED)))))for(o=[],l=peg$parsesep();l!==peg$FAILED;)o.push(l),l=peg$parsesep();o!==peg$FAILED?(s=[s,o],n=s):(peg$currPos=n,n=peg$FAILED)}else peg$currPos=n,n=peg$FAILED;if(n!==peg$FAILED)for(;n!==peg$FAILED;)if(r.push(n),n=peg$currPos,s=peg$parseoperator(),s!==peg$FAILED){if(o=peg$parsevalue(),o===peg$FAILED&&(o=peg$parseratio(),o===peg$FAILED&&(o=peg$parsemonzo(),o===peg$FAILED&&(o=peg$parsesub_operations(),o===peg$FAILED&&(o=peg$parseoperation(),o===peg$FAILED)))))for(o=[],l=peg$parsesep();l!==peg$FAILED;)o.push(l),l=peg$parsesep();o!==peg$FAILED?(s=[s,o],n=s):(peg$currPos=n,n=peg$FAILED)}else peg$currPos=n,n=peg$FAILED;else r=peg$FAILED;r!==peg$FAILED?(peg$savedPos=a,a=peg$f13()):(peg$currPos=a,a=peg$FAILED)}else peg$currPos=a,a=peg$FAILED;return peg$resultsCache[c]={nextPos:peg$currPos,result:a},a}function peg$parseoperator(){var a,e=peg$currPos*17+15,r=peg$resultsCache[e];return r?(peg$currPos=r.nextPos,r.result):(input.charCodeAt(peg$currPos)===43?(a=peg$c10,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e12)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===45?(a=peg$c4,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e6)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===42?(a=peg$c11,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e13)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===37?(a=peg$c12,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e14)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===38?(a=peg$c13,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e15)),a===peg$FAILED&&(input.charCodeAt(peg$currPos)===124?(a=peg$c14,peg$currPos++):(a=peg$FAILED,peg$fail(peg$e16)),a===peg$FAILED&&(input.substr(peg$currPos,2)===peg$c15?(a=peg$c15,peg$currPos+=2):(a=peg$FAILED,peg$fail(peg$e17)),a===peg$FAILED&&(input.substr(peg$currPos,2)===peg$c16?(a=peg$c16,peg$currPos+=2):(a=peg$FAILED,peg$fail(peg$e18))))))))),peg$resultsCache[e]={nextPos:peg$currPos,result:a},a)}function peg$parsesub_operations(){var a,e,r,n,s=peg$currPos*17+16,o=peg$resultsCache[s];return o?(peg$currPos=o.nextPos,o.result):(a=peg$currPos,input.charCodeAt(peg$currPos)===40?(e=peg$c0,peg$currPos++):(e=peg$FAILED,peg$fail(peg$e1)),e!==peg$FAILED?(r=peg$parseoperation(),r!==peg$FAILED?(input.charCodeAt(peg$currPos)===41?(n=peg$c2,peg$currPos++):(n=peg$FAILED,peg$fail(peg$e3)),n!==peg$FAILED?(e=[e,r,n],a=e):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED)):(peg$currPos=a,a=peg$FAILED),peg$resultsCache[s]={nextPos:peg$currPos,result:a},a)}if(peg$result=peg$startRuleFunction(),peg$result!==peg$FAILED&&peg$currPos===input.length)return peg$result;throw peg$result!==peg$FAILED&&peg$currPos{typeof PROCESS.emitWarning=="function"?PROCESS.emitWarning(a,e,r,n):console.error(`[${r}] ${e}: ${a}`)};let AC=globalThis.AbortController,AS=globalThis.AbortSignal;var Di;if(typeof AC>"u"){AS=class{constructor(){_e(this,"onabort");_e(this,"_onabort",[]);_e(this,"reason");_e(this,"aborted",!1)}addEventListener(n,s){this._onabort.push(s)}},AC=class{constructor(){_e(this,"signal",new AS);e()}abort(n){var s,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(const l of this.signal._onabort)l(n);(o=(s=this.signal).onabort)==null||o.call(s,n)}}};let a=((Di=PROCESS.env)==null?void 0:Di.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{a&&(a=!1,emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const shouldWarn=a=>!warned.has(a),isPosInt=a=>a&&a===Math.floor(a)&&a>0&&isFinite(a),getUintArray=a=>isPosInt(a)?a<=Math.pow(2,8)?Uint8Array:a<=Math.pow(2,16)?Uint16Array:a<=Math.pow(2,32)?Uint32Array:a<=Number.MAX_SAFE_INTEGER?ZeroArray:null:null;class ZeroArray extends Array{constructor(e){super(e),this.fill(0)}}var Dn;const pn=class pn{constructor(e,r){_e(this,"heap");_e(this,"length");if(!Oe(pn,Dn))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=getUintArray(e);if(!r)return[];St(pn,Dn,!0);const n=new pn(e,r);return St(pn,Dn,!1),n}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Dn=new WeakMap,Dt(pn,Dn,!1);let Stack=pn;var Nr,Or,Dr,wr,wn,tr,Lr,rr,qt,Rt,gr,br,cr,ir,xr,ar,Vr,Hr,Pr,kr,nn,mr,qn,_i,hn,zr,Vn,Tr,ii,Li,fn,Ln,Hn,Ur,tn,Yr,rn,zn,Si,xn,ri,Pn,ni,Yt,zt,Wn,Ei,gn,Qn;const Oi=class Oi{constructor(e){Dt(this,qn);Dt(this,ii);Dt(this,Ur);Dt(this,Yr);Dt(this,zn);Dt(this,xn);Dt(this,Pn);Dt(this,Yt);Dt(this,Wn);Dt(this,gn);Dt(this,Nr,void 0);Dt(this,Or,void 0);Dt(this,Dr,void 0);Dt(this,wr,void 0);Dt(this,wn,void 0);_e(this,"ttl");_e(this,"ttlResolution");_e(this,"ttlAutopurge");_e(this,"updateAgeOnGet");_e(this,"updateAgeOnHas");_e(this,"allowStale");_e(this,"noDisposeOnSet");_e(this,"noUpdateTTL");_e(this,"maxEntrySize");_e(this,"sizeCalculation");_e(this,"noDeleteOnFetchRejection");_e(this,"noDeleteOnStaleGet");_e(this,"allowStaleOnFetchAbort");_e(this,"allowStaleOnFetchRejection");_e(this,"ignoreFetchAbort");Dt(this,tr,void 0);Dt(this,Lr,void 0);Dt(this,rr,void 0);Dt(this,qt,void 0);Dt(this,Rt,void 0);Dt(this,gr,void 0);Dt(this,br,void 0);Dt(this,cr,void 0);Dt(this,ir,void 0);Dt(this,xr,void 0);Dt(this,ar,void 0);Dt(this,Vr,void 0);Dt(this,Hr,void 0);Dt(this,Pr,void 0);Dt(this,kr,void 0);Dt(this,nn,void 0);Dt(this,mr,void 0);Dt(this,hn,()=>{});Dt(this,zr,()=>{});Dt(this,Vn,()=>{});Dt(this,Tr,()=>!1);Dt(this,fn,e=>{});Dt(this,Ln,(e,r,n)=>{});Dt(this,Hn,(e,r,n,s)=>{if(n||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:r=0,ttl:n,ttlResolution:s=1,ttlAutopurge:o,updateAgeOnGet:l,updateAgeOnHas:c,allowStale:u,dispose:p,disposeAfter:h,noDisposeOnSet:f,noUpdateTTL:b,maxSize:A=0,maxEntrySize:N=0,sizeCalculation:F,fetchMethod:B,noDeleteOnFetchRejection:H,noDeleteOnStaleGet:Ee,allowStaleOnFetchRejection:Pe,allowStaleOnFetchAbort:g,ignoreFetchAbort:R}=e;if(r!==0&&!isPosInt(r))throw new TypeError("max option must be a nonnegative integer");const y=r?getUintArray(r):Array;if(!y)throw new Error("invalid max value: "+r);if(St(this,Nr,r),St(this,Or,A),this.maxEntrySize=N||Oe(this,Or),this.sizeCalculation=F,this.sizeCalculation){if(!Oe(this,Or)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(B!==void 0&&typeof B!="function")throw new TypeError("fetchMethod must be a function if specified");if(St(this,wn,B),St(this,nn,!!B),St(this,rr,new Map),St(this,qt,new Array(r).fill(void 0)),St(this,Rt,new Array(r).fill(void 0)),St(this,gr,new y(r)),St(this,br,new y(r)),St(this,cr,0),St(this,ir,0),St(this,xr,Stack.create(r)),St(this,tr,0),St(this,Lr,0),typeof p=="function"&&St(this,Dr,p),typeof h=="function"?(St(this,wr,h),St(this,ar,[])):(St(this,wr,void 0),St(this,ar,void 0)),St(this,kr,!!Oe(this,Dr)),St(this,mr,!!Oe(this,wr)),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!b,this.noDeleteOnFetchRejection=!!H,this.allowStaleOnFetchRejection=!!Pe,this.allowStaleOnFetchAbort=!!g,this.ignoreFetchAbort=!!R,this.maxEntrySize!==0){if(Oe(this,Or)!==0&&!isPosInt(Oe(this,Or)))throw new TypeError("maxSize must be a positive integer if specified");if(!isPosInt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ht(this,ii,Li).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!Ee,this.updateAgeOnGet=!!l,this.updateAgeOnHas=!!c,this.ttlResolution=isPosInt(s)||s===0?s:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!isPosInt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ht(this,qn,_i).call(this)}if(Oe(this,Nr)===0&&this.ttl===0&&Oe(this,Or)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!Oe(this,Nr)&&!Oe(this,Or)){const M="LRU_CACHE_UNBOUNDED";shouldWarn(M)&&(warned.add(M),emitWarning("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",M,Oi))}}static unsafeExposeInternals(e){return{starts:Oe(e,Hr),ttls:Oe(e,Pr),sizes:Oe(e,Vr),keyMap:Oe(e,rr),keyList:Oe(e,qt),valList:Oe(e,Rt),next:Oe(e,gr),prev:Oe(e,br),get head(){return Oe(e,cr)},get tail(){return Oe(e,ir)},free:Oe(e,xr),isBackgroundFetch:r=>{var n;return ht(n=e,Yt,zt).call(n,r)},backgroundFetch:(r,n,s,o)=>{var l;return ht(l=e,Pn,ni).call(l,r,n,s,o)},moveToTail:r=>{var n;return ht(n=e,gn,Qn).call(n,r)},indexes:r=>{var n;return ht(n=e,Ur,tn).call(n,r)},rindexes:r=>{var n;return ht(n=e,Yr,rn).call(n,r)},isStale:r=>{var n;return Oe(n=e,Tr).call(n,r)}}}get max(){return Oe(this,Nr)}get maxSize(){return Oe(this,Or)}get calculatedSize(){return Oe(this,Lr)}get size(){return Oe(this,tr)}get fetchMethod(){return Oe(this,wn)}get dispose(){return Oe(this,Dr)}get disposeAfter(){return Oe(this,wr)}getRemainingTTL(e){return Oe(this,rr).has(e)?1/0:0}*entries(){for(const e of ht(this,Ur,tn).call(this))Oe(this,Rt)[e]!==void 0&&Oe(this,qt)[e]!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield[Oe(this,qt)[e],Oe(this,Rt)[e]])}*rentries(){for(const e of ht(this,Yr,rn).call(this))Oe(this,Rt)[e]!==void 0&&Oe(this,qt)[e]!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield[Oe(this,qt)[e],Oe(this,Rt)[e]])}*keys(){for(const e of ht(this,Ur,tn).call(this)){const r=Oe(this,qt)[e];r!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield r)}}*rkeys(){for(const e of ht(this,Yr,rn).call(this)){const r=Oe(this,qt)[e];r!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield r)}}*values(){for(const e of ht(this,Ur,tn).call(this))Oe(this,Rt)[e]!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield Oe(this,Rt)[e])}*rvalues(){for(const e of ht(this,Yr,rn).call(this))Oe(this,Rt)[e]!==void 0&&!ht(this,Yt,zt).call(this,Oe(this,Rt)[e])&&(yield Oe(this,Rt)[e])}[Symbol.iterator](){return this.entries()}find(e,r={}){for(const n of ht(this,Ur,tn).call(this)){const s=Oe(this,Rt)[n],o=ht(this,Yt,zt).call(this,s)?s.__staleWhileFetching:s;if(o!==void 0&&e(o,Oe(this,qt)[n],this))return this.get(Oe(this,qt)[n],r)}}forEach(e,r=this){for(const n of ht(this,Ur,tn).call(this)){const s=Oe(this,Rt)[n],o=ht(this,Yt,zt).call(this,s)?s.__staleWhileFetching:s;o!==void 0&&e.call(r,o,Oe(this,qt)[n],this)}}rforEach(e,r=this){for(const n of ht(this,Yr,rn).call(this)){const s=Oe(this,Rt)[n],o=ht(this,Yt,zt).call(this,s)?s.__staleWhileFetching:s;o!==void 0&&e.call(r,o,Oe(this,qt)[n],this)}}purgeStale(){let e=!1;for(const r of ht(this,Yr,rn).call(this,{allowStale:!0}))Oe(this,Tr).call(this,r)&&(this.delete(Oe(this,qt)[r]),e=!0);return e}dump(){const e=[];for(const r of ht(this,Ur,tn).call(this,{allowStale:!0})){const n=Oe(this,qt)[r],s=Oe(this,Rt)[r],o=ht(this,Yt,zt).call(this,s)?s.__staleWhileFetching:s;if(o===void 0||n===void 0)continue;const l={value:o};if(Oe(this,Pr)&&Oe(this,Hr)){l.ttl=Oe(this,Pr)[r];const c=perf.now()-Oe(this,Hr)[r];l.start=Math.floor(Date.now()-c)}Oe(this,Vr)&&(l.size=Oe(this,Vr)[r]),e.unshift([n,l])}return e}load(e){this.clear();for(const[r,n]of e){if(n.start){const s=Date.now()-n.start;n.start=perf.now()-s}this.set(r,n.value,n)}}set(e,r,n={}){var b,A,N,F,B;if(r===void 0)return this.delete(e),this;const{ttl:s=this.ttl,start:o,noDisposeOnSet:l=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:u}=n;let{noUpdateTTL:p=this.noUpdateTTL}=n;const h=Oe(this,Hn).call(this,e,r,n.size||0,c);if(this.maxEntrySize&&h>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.delete(e),this;let f=Oe(this,tr)===0?void 0:Oe(this,rr).get(e);if(f===void 0)f=Oe(this,tr)===0?Oe(this,ir):Oe(this,xr).length!==0?Oe(this,xr).pop():Oe(this,tr)===Oe(this,Nr)?ht(this,xn,ri).call(this,!1):Oe(this,tr),Oe(this,qt)[f]=e,Oe(this,Rt)[f]=r,Oe(this,rr).set(e,f),Oe(this,gr)[Oe(this,ir)]=f,Oe(this,br)[f]=Oe(this,ir),St(this,ir,f),ti(this,tr)._++,Oe(this,Ln).call(this,f,h,u),u&&(u.set="add"),p=!1;else{ht(this,gn,Qn).call(this,f);const H=Oe(this,Rt)[f];if(r!==H){if(Oe(this,nn)&&ht(this,Yt,zt).call(this,H)){H.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:Ee}=H;Ee!==void 0&&!l&&(Oe(this,kr)&&((b=Oe(this,Dr))==null||b.call(this,Ee,e,"set")),Oe(this,mr)&&((A=Oe(this,ar))==null||A.push([Ee,e,"set"])))}else l||(Oe(this,kr)&&((N=Oe(this,Dr))==null||N.call(this,H,e,"set")),Oe(this,mr)&&((F=Oe(this,ar))==null||F.push([H,e,"set"])));if(Oe(this,fn).call(this,f),Oe(this,Ln).call(this,f,h,u),Oe(this,Rt)[f]=r,u){u.set="replace";const Ee=H&&ht(this,Yt,zt).call(this,H)?H.__staleWhileFetching:H;Ee!==void 0&&(u.oldValue=Ee)}}else u&&(u.set="update")}if(s!==0&&!Oe(this,Pr)&&ht(this,qn,_i).call(this),Oe(this,Pr)&&(p||Oe(this,Vn).call(this,f,s,o),u&&Oe(this,zr).call(this,u,f)),!l&&Oe(this,mr)&&Oe(this,ar)){const H=Oe(this,ar);let Ee;for(;Ee=H==null?void 0:H.shift();)(B=Oe(this,wr))==null||B.call(this,...Ee)}return this}pop(){var e;try{for(;Oe(this,tr);){const r=Oe(this,Rt)[Oe(this,cr)];if(ht(this,xn,ri).call(this,!0),ht(this,Yt,zt).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(Oe(this,mr)&&Oe(this,ar)){const r=Oe(this,ar);let n;for(;n=r==null?void 0:r.shift();)(e=Oe(this,wr))==null||e.call(this,...n)}}}has(e,r={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:s}=r,o=Oe(this,rr).get(e);if(o!==void 0){const l=Oe(this,Rt)[o];if(ht(this,Yt,zt).call(this,l)&&l.__staleWhileFetching===void 0)return!1;if(Oe(this,Tr).call(this,o))s&&(s.has="stale",Oe(this,zr).call(this,s,o));else return n&&Oe(this,hn).call(this,o),s&&(s.has="hit",Oe(this,zr).call(this,s,o)),!0}else s&&(s.has="miss");return!1}peek(e,r={}){const{allowStale:n=this.allowStale}=r,s=Oe(this,rr).get(e);if(s!==void 0&&(n||!Oe(this,Tr).call(this,s))){const o=Oe(this,Rt)[s];return ht(this,Yt,zt).call(this,o)?o.__staleWhileFetching:o}}async fetch(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:l=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:u=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:A=this.ignoreFetchAbort,allowStaleOnFetchAbort:N=this.allowStaleOnFetchAbort,context:F,forceRefresh:B=!1,status:H,signal:Ee}=r;if(!Oe(this,nn))return H&&(H.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:o,status:H});const Pe={allowStale:n,updateAgeOnGet:s,noDeleteOnStaleGet:o,ttl:l,noDisposeOnSet:c,size:u,sizeCalculation:p,noUpdateTTL:h,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:N,ignoreFetchAbort:A,status:H,signal:Ee};let g=Oe(this,rr).get(e);if(g===void 0){H&&(H.fetch="miss");const R=ht(this,Pn,ni).call(this,e,g,Pe,F);return R.__returned=R}else{const R=Oe(this,Rt)[g];if(ht(this,Yt,zt).call(this,R)){const W=n&&R.__staleWhileFetching!==void 0;return H&&(H.fetch="inflight",W&&(H.returnedStale=!0)),W?R.__staleWhileFetching:R.__returned=R}const y=Oe(this,Tr).call(this,g);if(!B&&!y)return H&&(H.fetch="hit"),ht(this,gn,Qn).call(this,g),s&&Oe(this,hn).call(this,g),H&&Oe(this,zr).call(this,H,g),R;const M=ht(this,Pn,ni).call(this,e,g,Pe,F),se=M.__staleWhileFetching!==void 0&&n;return H&&(H.fetch=y?"stale":"refresh",se&&y&&(H.returnedStale=!0)),se?M.__staleWhileFetching:M.__returned=M}}get(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:l}=r,c=Oe(this,rr).get(e);if(c!==void 0){const u=Oe(this,Rt)[c],p=ht(this,Yt,zt).call(this,u);return l&&Oe(this,zr).call(this,l,c),Oe(this,Tr).call(this,c)?(l&&(l.get="stale"),p?(l&&n&&u.__staleWhileFetching!==void 0&&(l.returnedStale=!0),n?u.__staleWhileFetching:void 0):(o||this.delete(e),l&&n&&(l.returnedStale=!0),n?u:void 0)):(l&&(l.get="hit"),p?u.__staleWhileFetching:(ht(this,gn,Qn).call(this,c),s&&Oe(this,hn).call(this,c),u))}else l&&(l.get="miss")}delete(e){var n,s,o,l;let r=!1;if(Oe(this,tr)!==0){const c=Oe(this,rr).get(e);if(c!==void 0)if(r=!0,Oe(this,tr)===1)this.clear();else{Oe(this,fn).call(this,c);const u=Oe(this,Rt)[c];ht(this,Yt,zt).call(this,u)?u.__abortController.abort(new Error("deleted")):(Oe(this,kr)||Oe(this,mr))&&(Oe(this,kr)&&((n=Oe(this,Dr))==null||n.call(this,u,e,"delete")),Oe(this,mr)&&((s=Oe(this,ar))==null||s.push([u,e,"delete"]))),Oe(this,rr).delete(e),Oe(this,qt)[c]=void 0,Oe(this,Rt)[c]=void 0,c===Oe(this,ir)?St(this,ir,Oe(this,br)[c]):c===Oe(this,cr)?St(this,cr,Oe(this,gr)[c]):(Oe(this,gr)[Oe(this,br)[c]]=Oe(this,gr)[c],Oe(this,br)[Oe(this,gr)[c]]=Oe(this,br)[c]),ti(this,tr)._--,Oe(this,xr).push(c)}}if(Oe(this,mr)&&((o=Oe(this,ar))!=null&&o.length)){const c=Oe(this,ar);let u;for(;u=c==null?void 0:c.shift();)(l=Oe(this,wr))==null||l.call(this,...u)}return r}clear(){var e,r,n;for(const s of ht(this,Yr,rn).call(this,{allowStale:!0})){const o=Oe(this,Rt)[s];if(ht(this,Yt,zt).call(this,o))o.__abortController.abort(new Error("deleted"));else{const l=Oe(this,qt)[s];Oe(this,kr)&&((e=Oe(this,Dr))==null||e.call(this,o,l,"delete")),Oe(this,mr)&&((r=Oe(this,ar))==null||r.push([o,l,"delete"]))}}if(Oe(this,rr).clear(),Oe(this,Rt).fill(void 0),Oe(this,qt).fill(void 0),Oe(this,Pr)&&Oe(this,Hr)&&(Oe(this,Pr).fill(0),Oe(this,Hr).fill(0)),Oe(this,Vr)&&Oe(this,Vr).fill(0),St(this,cr,0),St(this,ir,0),Oe(this,xr).length=0,St(this,Lr,0),St(this,tr,0),Oe(this,mr)&&Oe(this,ar)){const s=Oe(this,ar);let o;for(;o=s==null?void 0:s.shift();)(n=Oe(this,wr))==null||n.call(this,...o)}}};Nr=new WeakMap,Or=new WeakMap,Dr=new WeakMap,wr=new WeakMap,wn=new WeakMap,tr=new WeakMap,Lr=new WeakMap,rr=new WeakMap,qt=new WeakMap,Rt=new WeakMap,gr=new WeakMap,br=new WeakMap,cr=new WeakMap,ir=new WeakMap,xr=new WeakMap,ar=new WeakMap,Vr=new WeakMap,Hr=new WeakMap,Pr=new WeakMap,kr=new WeakMap,nn=new WeakMap,mr=new WeakMap,qn=new WeakSet,_i=function(){const e=new ZeroArray(Oe(this,Nr)),r=new ZeroArray(Oe(this,Nr));St(this,Pr,e),St(this,Hr,r),St(this,Vn,(o,l,c=perf.now())=>{if(r[o]=l!==0?c:0,e[o]=l,l!==0&&this.ttlAutopurge){const u=setTimeout(()=>{Oe(this,Tr).call(this,o)&&this.delete(Oe(this,qt)[o])},l+1);u.unref&&u.unref()}}),St(this,hn,o=>{r[o]=e[o]!==0?perf.now():0}),St(this,zr,(o,l)=>{if(e[l]){const c=e[l],u=r[l];o.ttl=c,o.start=u,o.now=n||s();const p=o.now-u;o.remainingTTL=c-p}});let n=0;const s=()=>{const o=perf.now();if(this.ttlResolution>0){n=o;const l=setTimeout(()=>n=0,this.ttlResolution);l.unref&&l.unref()}return o};this.getRemainingTTL=o=>{const l=Oe(this,rr).get(o);if(l===void 0)return 0;const c=e[l],u=r[l];if(c===0||u===0)return 1/0;const p=(n||s())-u;return c-p},St(this,Tr,o=>e[o]!==0&&r[o]!==0&&(n||s())-r[o]>e[o])},hn=new WeakMap,zr=new WeakMap,Vn=new WeakMap,Tr=new WeakMap,ii=new WeakSet,Li=function(){const e=new ZeroArray(Oe(this,Nr));St(this,Lr,0),St(this,Vr,e),St(this,fn,r=>{St(this,Lr,Oe(this,Lr)-e[r]),e[r]=0}),St(this,Hn,(r,n,s,o)=>{if(ht(this,Yt,zt).call(this,n))return 0;if(!isPosInt(s))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(s=o(n,r),!isPosInt(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),St(this,Ln,(r,n,s)=>{if(e[r]=n,Oe(this,Or)){const o=Oe(this,Or)-e[r];for(;Oe(this,Lr)>o;)ht(this,xn,ri).call(this,!0)}St(this,Lr,Oe(this,Lr)+e[r]),s&&(s.entrySize=n,s.totalCalculatedSize=Oe(this,Lr))})},fn=new WeakMap,Ln=new WeakMap,Hn=new WeakMap,Ur=new WeakSet,tn=function*({allowStale:e=this.allowStale}={}){if(Oe(this,tr))for(let r=Oe(this,ir);!(!ht(this,zn,Si).call(this,r)||((e||!Oe(this,Tr).call(this,r))&&(yield r),r===Oe(this,cr)));)r=Oe(this,br)[r]},Yr=new WeakSet,rn=function*({allowStale:e=this.allowStale}={}){if(Oe(this,tr))for(let r=Oe(this,cr);!(!ht(this,zn,Si).call(this,r)||((e||!Oe(this,Tr).call(this,r))&&(yield r),r===Oe(this,ir)));)r=Oe(this,gr)[r]},zn=new WeakSet,Si=function(e){return e!==void 0&&Oe(this,rr).get(Oe(this,qt)[e])===e},xn=new WeakSet,ri=function(e){var o,l;const r=Oe(this,cr),n=Oe(this,qt)[r],s=Oe(this,Rt)[r];return Oe(this,nn)&&ht(this,Yt,zt).call(this,s)?s.__abortController.abort(new Error("evicted")):(Oe(this,kr)||Oe(this,mr))&&(Oe(this,kr)&&((o=Oe(this,Dr))==null||o.call(this,s,n,"evict")),Oe(this,mr)&&((l=Oe(this,ar))==null||l.push([s,n,"evict"]))),Oe(this,fn).call(this,r),e&&(Oe(this,qt)[r]=void 0,Oe(this,Rt)[r]=void 0,Oe(this,xr).push(r)),Oe(this,tr)===1?(St(this,cr,St(this,ir,0)),Oe(this,xr).length=0):St(this,cr,Oe(this,gr)[r]),Oe(this,rr).delete(n),ti(this,tr)._--,r},Pn=new WeakSet,ni=function(e,r,n,s){const o=r===void 0?void 0:Oe(this,Rt)[r];if(ht(this,Yt,zt).call(this,o))return o;const l=new AC,{signal:c}=n;c==null||c.addEventListener("abort",()=>l.abort(c.reason),{signal:l.signal});const u={signal:l.signal,options:n,context:s},p=(F,B=!1)=>{const{aborted:H}=l.signal,Ee=n.ignoreFetchAbort&&F!==void 0;if(n.status&&(H&&!B?(n.status.fetchAborted=!0,n.status.fetchError=l.signal.reason,Ee&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),H&&!Ee&&!B)return f(l.signal.reason);const Pe=A;return Oe(this,Rt)[r]===A&&(F===void 0?Pe.__staleWhileFetching?Oe(this,Rt)[r]=Pe.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,F,u.options))),F},h=F=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=F),f(F)),f=F=>{const{aborted:B}=l.signal,H=B&&n.allowStaleOnFetchAbort,Ee=H||n.allowStaleOnFetchRejection,Pe=Ee||n.noDeleteOnFetchRejection,g=A;if(Oe(this,Rt)[r]===A&&(!Pe||g.__staleWhileFetching===void 0?this.delete(e):H||(Oe(this,Rt)[r]=g.__staleWhileFetching)),Ee)return n.status&&g.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),g.__staleWhileFetching;if(g.__returned===g)throw F},b=(F,B)=>{var Ee;const H=(Ee=Oe(this,wn))==null?void 0:Ee.call(this,e,o,u);H&&H instanceof Promise&&H.then(Pe=>F(Pe===void 0?void 0:Pe),B),l.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(F(void 0),n.allowStaleOnFetchAbort&&(F=Pe=>p(Pe,!0)))})};n.status&&(n.status.fetchDispatched=!0);const A=new Promise(b).then(p,h),N=Object.assign(A,{__abortController:l,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,N,{...u.options,status:void 0}),r=Oe(this,rr).get(e)):Oe(this,Rt)[r]=N,N},Yt=new WeakSet,zt=function(e){if(!Oe(this,nn))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof AC},Wn=new WeakSet,Ei=function(e,r){Oe(this,br)[r]=e,Oe(this,gr)[e]=r},gn=new WeakSet,Qn=function(e){e!==Oe(this,ir)&&(e===Oe(this,cr)?St(this,cr,Oe(this,gr)[e]):ht(this,Wn,Ei).call(this,Oe(this,br)[e],Oe(this,gr)[e]),ht(this,Wn,Ei).call(this,Oe(this,ir),e),St(this,ir,e))};let LRUCache=Oi;const zcache=new LRUCache({max:1e3,ttl:1e3*60*5});class Ziffers{constructor(e,r={}){_e(this,"values");_e(this,"evaluated");_e(this,"options");_e(this,"index",0);_e(this,"redo");_e(this,"_current");r={...DEFAULT_OPTIONS,...r},r.scale&&(typeof r.scale=="string"&&(isScale(r.scale)?(r.scaleName=r.scale,r.scale=getScale(r.scale)):r.scale=parse(r.scale)),r.parsedScale=r.scale,delete r.scale),r.redo!==void 0?this.redo=r.redo:this.redo=1,r&&r.seed&&(r.randomSeed=r.seed,r.seededRandom=seededRandom(r.seed)),this.options={nodeOptions:r};try{this.values=parse$1(e,this.options),this.evaluated=this.evaluate()}catch(n){console.log(n),this.values=[],this.evaluated=[]}}update(){this.evaluated=this.evaluate()}pitches(){return this.evaluated.map(e=>e.collect("pitch"))}notes(){return this.evaluated.map(e=>e.collect("note"))}freqs(){return this.evaluated.map(e=>e.collect("freq"))}durations(){return this.evaluated.map(e=>e.collect("duration"))}next(){if(this.redo>0&&this.index>=this.evaluated.length*this.redo&&(this.update(),this._current=void 0,this.index=0),this._current!==void 0){const r=this.evaluated[this._current%this.evaluated.length];r.modifiedEvent&&r.modifiedEvent==null,this._current=this._current+1r.evaluate()).flat(1/0).filter(r=>r!==void 0);return e.forEach((r,n)=>{r._next=n0?n-1:e.length-1}),e}}const generateCacheKey=(...a)=>a.map(e=>JSON.stringify(e)).join(","),cachedCall=(a,e)=>{const r=generateCacheKey(a,e);if(zcache.has(r))return zcache.get(r);{const n=new Ziffers(a,e);return zcache.set(r,n),n}},cachedPattern=(a,e={})=>cachedCall(a,e);class MidiConnection{constructor(){_e(this,"midiAccess",null);_e(this,"midiOutputs",[]);_e(this,"currentOutputIndex",0);_e(this,"scheduledNotes",{});this.initializeMidiAccess()}async initializeMidiAccess(){try{this.midiAccess=await navigator.requestMIDIAccess(),this.midiOutputs=Array.from(this.midiAccess.outputs.values()),this.midiOutputs.length===0&&console.warn("No MIDI outputs available.")}catch(e){console.error("Failed to initialize MIDI:",e)}}getCurrentMidiPort(){return this.midiOutputs.length>0&&this.currentOutputIndex>=0&&this.currentOutputIndexn.name===e);return r!==-1?(this.currentOutputIndex=r,!0):(console.error(`MIDI output "${e}" not found.`),!1)}listMidiOutputs(){console.log("Available MIDI Outputs:"),this.midiOutputs.forEach((e,r)=>{console.log(`${r+1}. ${e.name}`)})}sendMidiNote(e,r,n,s){const o=this.midiOutputs[this.currentOutputIndex];if(e=Math.min(Math.max(e,0),127),o){const l=[144+r,e,n],c=[128+r,e,0];o.send(l);const u=setTimeout(()=>{o.send(c),delete this.scheduledNotes[e]},(s-.02)*1e3);this.scheduledNotes[e]=u}else console.error("MIDI output not available.")}sendSysExMessage(e){const r=this.midiOutputs[this.currentOutputIndex];r?r.send(e):console.error("MIDI output not available.")}sendPitchBend(e,r){(e<0||e>16383)&&console.error("Invalid pitch bend value. Value must be in the range 0-16383."),(r<0||r>15)&&console.error("Invalid MIDI channel. Channel must be in the range 0-15.");const n=this.midiOutputs[this.currentOutputIndex];if(n){const s=e&127,o=e>>7&127;n.send([224|r,s,o])}else console.error("MIDI output not available.")}sendProgramChange(e,r){const n=this.midiOutputs[this.currentOutputIndex];n?n.send([192+r,e]):console.error("MIDI output not available.")}sendMidiControlChange(e,r,n){const s=this.midiOutputs[this.currentOutputIndex];s?s.send([176+n,e,r]):console.error("MIDI output not available.")}panic(){const e=this.midiOutputs[this.currentOutputIndex];if(e){for(const r in this.scheduledNotes){const n=this.scheduledNotes[r];clearTimeout(n),e.send([128,parseInt(r),0])}this.scheduledNotes={}}else console.error("MIDI output not available.")}}class DrunkWalk{constructor(e,r,n){_e(this,"min");_e(this,"max");_e(this,"wrap");_e(this,"position");this.min=e,this.max=r,this.wrap=n,this.position=0}step(){const e=Math.floor(Math.random()*3)-1;this.position+=e,this.wrap?this.position>this.max?this.position=this.min:this.positionthis.max&&(this.position=this.max)}getPosition(){return this.position}toggleWrap(e){this.wrap=e}}const SCALES={major:[0,2,4,5,7,9,11],naturalMinor:[0,2,3,5,7,8,10],harmonicMinor:[0,2,3,5,7,8,11],melodicMinor:[0,2,3,5,7,9,11],dorian:[0,2,3,5,7,9,10],phrygian:[0,1,3,5,7,8,10],lydian:[0,2,4,6,7,9,11],mixolydian:[0,2,4,5,7,9,10],aeolian:[0,2,3,5,7,8,10],locrian:[0,1,3,5,6,8,10],wholeTone:[0,2,4,6,8,10],majorPentatonic:[0,2,4,7,9],minorPentatonic:[0,3,5,7,10],chromatic:[0,1,2,3,4,5,6,7,8,9,10,11],blues:[0,3,5,6,7,10],diminished:[0,2,3,5,6,8,9,11],neapolitanMinor:[0,1,3,5,7,8,11],neapolitanMajor:[0,1,3,5,7,9,11],enigmatic:[0,1,4,6,8,10,11],doubleHarmonic:[0,1,4,5,7,8,11],octatonic:[0,2,3,5,6,8,9,11],bebopDominant:[0,2,4,5,7,9,10,11],bebopMajor:[0,2,4,5,7,8,9,11],bebopMinor:[0,2,3,5,7,8,9,11],bebopDorian:[0,2,3,4,5,7,9,10],harmonicMajor:[0,2,4,5,7,8,11],hungarianMinor:[0,2,3,6,7,8,11],hungarianMajor:[0,3,4,6,7,9,10],oriental:[0,1,4,5,6,9,10],romanianMinor:[0,2,3,6,7,9,10],spanishGypsy:[0,1,4,5,7,8,10],jewish:[0,1,4,5,7,8,10],hindu:[0,2,4,5,7,8,10],japanese:[0,1,5,7,8],hirajoshi:[0,2,3,7,8],kumoi:[0,2,3,7,9],inSen:[0,1,5,7,10],iwato:[0,1,5,6,10],yo:[0,2,5,7,9],minorBlues:[0,3,5,6,7,10],algerian:[0,2,3,5,6,7,8,11],augmented:[0,3,4,7,8,11],balinese:[0,1,3,7,8],byzantine:[0,1,4,5,7,8,11],chinese:[0,4,6,7,11],egyptian:[0,2,5,7,10],eightToneSpanish:[0,1,3,4,5,6,8,10],hawaiian:[0,2,3,5,7,9,10],hindustan:[0,2,4,5,7,8,10],persian:[0,1,4,5,6,8,11],eastIndianPurvi:[0,1,4,6,7,8,11],orientalA:[0,1,4,5,6,9,10]};function scale(a,e="major",r=4){const n=SCALES[e];if(!n)throw new Error(`Unknown scale ${e}`);let s=a%n.length;s<0&&(s+=n.length);let o=Math.floor(a/n.length);return 60+(r+o)*12+n[s]}let listenerQueue=[],atom=(a,e)=>{let r,n=[],s={lc:0,l:e||0,value:a,set(o){s.value=o,s.notify()},get(){return s.lc||s.listen(()=>{})(),s.value},notify(o){r=n;let l=!listenerQueue.length;for(let c=0;c{n===r&&(n=n.slice());let c=n.indexOf(o);~c&&(n.splice(c,2),s.lc--,s.lc||s.off())}},subscribe(o,l){let c=s.listen(o,l);return o(s.value),c},off(){}};return s},map=(a={})=>{let e=atom(a);return e.setKey=function(r,n){typeof n>"u"?r in e.value&&(e.value={...e.value},delete e.value[r],e.notify(r)):e.value[r]!==n&&(e.value={...e.value,[r]:n},e.notify(r))},e};if(typeof DelayNode<"u"){class a extends DelayNode{constructor(r,n,s,o){super(r),n=Math.abs(n),this.delayTime.value=s;const l=r.createGain();l.gain.value=Math.min(Math.abs(o),.995),this.feedback=l.gain;const c=r.createGain();return c.gain.value=n,this.delayGain=c,this.connect(l),this.connect(c),l.connect(this),this.connect=u=>c.connect(u),this}start(r){this.delayGain.gain.setValueAtTime(this.delayGain.gain.value,r+this.delayTime.value)}}AudioContext.prototype.createFeedbackDelay=function(e,r,n){return new a(this,e,r,n)}}typeof AudioContext<"u"&&(AudioContext.prototype.impulseResponse=function(a,e=1){const r=this.sampleRate*a,n=this.createBuffer(e,r,this.sampleRate),s=n.getChannelData(0);for(let o=0;o(e.buffer=this.impulseResponse(r),e.duration=a,e),e.setDuration(a),e});var U={a:{freqs:[660,1120,2750,3e3,3350],gains:[1,.5012,.0708,.0631,.0126],qs:[80,90,120,130,140]},e:{freqs:[440,1800,2700,3e3,3300],gains:[1,.1995,.1259,.1,.1],qs:[70,80,100,120,120]},i:{freqs:[270,1850,2900,3350,3590],gains:[1,.0631,.0631,.0158,.0158],qs:[40,90,100,120,120]},o:{freqs:[430,820,2700,3e3,3300],gains:[1,.3162,.0501,.0794,.01995],qs:[40,80,100,120,120]},u:{freqs:[370,630,2750,3e3,3400],gains:[1,.1,.0708,.0316,.01995],qs:[40,60,100,120,120]}};if(typeof GainNode<"u"){class a extends GainNode{constructor(r,n){if(super(r),!U[n])throw new Error("vowel: unknown vowel "+n);const{gains:s,qs:o,freqs:l}=U[n],c=r.createGain();for(let u=0;u<5;u++){const p=r.createGain();p.gain.value=s[u];const h=r.createBiquadFilter();h.type="bandpass",h.Q.value=o[u],h.frequency.value=l[u],this.connect(h),h.connect(p),p.connect(c)}return c.gain.value=8,this.connect=u=>c.connect(u),this}}AudioContext.prototype.createVowelFilter=function(e){return new a(this,e)}}const re=a=>{var s;if(typeof a!="string")return[];const[e,r="",n]=((s=a.match(/^([a-gA-G])([#bsf]*)([0-9]*)$/))==null?void 0:s.slice(1))||[];return e?[e,r,n?Number(n):void 0]:[]},ie={c:0,d:2,e:4,f:5,g:7,a:9,b:11},ae={"#":1,b:-1,s:1,f:-1},E=(a,e=3)=>{const[r,n,s=e]=re(a);if(!r)throw new Error('not a note: "'+a+'"');const o=ie[r.toLowerCase()],l=(n==null?void 0:n.split("").reduce((c,u)=>c+ae[u],0))||0;return(Number(s)+1)*12+o+l},ge=a=>Math.pow(2,(a-69)/12)*440,de=(a,e,r)=>Math.min(Math.max(a,e),r),ue=a=>12*Math.log(a/440)/Math.LN2+69,le=(a,e)=>{if(typeof a!="object")throw new Error("valueToMidi: expected object value");let{freq:r,note:n}=a;if(typeof r=="number")return ue(r);if(typeof n=="string")return E(n);if(typeof n=="number")return n;if(!e)throw new Error("valueToMidi: expected freq or note to be set");return e},Ie="data:application/javascript;base64,Ly8gTElDRU5TRSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2My4wIHNlZSBodHRwczovL2dpdG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TAgPSBwYXJhbWV0ZXJzLnNoYXBlWzBdOwogICAgY29uc3Qgc2hhcGUxID0gc2hhcGUwIDwgMSA/IHNoYXBlMCA6IDEuMCAtIDRlLTEwOwogICAgY29uc3Qgc2hhcGUgPSAoMi4wICogc2hhcGUxKSAvICgxLjAgLSBzaGFwZTEpOwogICAgY29uc3QgYmxvY2tTaXplID0gMTI4OwogICAgY29uc3QgaGFzSW5wdXQgPSAhKGlucHV0WzBdID09PSB1bmRlZmluZWQpOwogICAgaWYgKGhhc0lucHV0KSB7CiAgICAgIHRoaXMubm90U3RhcnRlZCA9IGZhbHNlOwogICAgICBmb3IgKGxldCBuID0gMDsgbiA8IGJsb2NrU2l6ZTsgbisrKSB7CiAgICAgICAgY29uc3QgdmFsdWUgPSAoKDEgKyBzaGFwZSkgKiBpbnB1dFswXVtuXSkgLyAoMSArIHNoYXBlICogTWF0aC5hYnMoaW5wdXRbMF1bbl0pKTsKICAgICAgICBmb3IgKGxldCBvID0gMDsgbyA8IG91dHB1dC5sZW5ndGg7IG8rKykgewogICAgICAgICAgb3V0cHV0W29dW25dID0gdmFsdWU7CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gdGhpcy5ub3RTdGFydGVkIHx8IGhhc0lucHV0OwogIH0KfQoKcmVnaXN0ZXJQcm9jZXNzb3IoJ3NoYXBlLXByb2Nlc3NvcicsIFNoYXBlUHJvY2Vzc29yKTsK";function j(a){const e=C().createGain();return e.gain.value=a,e}const Ce=({s:a,freq:e,t:r})=>{const n=C().createOscillator();return n.type=a||"triangle",n.frequency.value=Number(e),n.start(r),{node:n,stop:s=>n.stop(s)}},ne=(a,e,r,n,s,o)=>{const l=C().createGain();return l.gain.setValueAtTime(0,o),l.gain.linearRampToValueAtTime(s,o+a),l.gain.linearRampToValueAtTime(r*s,o+a+e),{node:l,stop:c=>{l.gain.setValueAtTime(r*s,c),l.gain.linearRampToValueAtTime(0,c+n)}}},J=(a,e,r)=>{const n=C().createBiquadFilter();return n.type=a,n.frequency.value=e,n.Q.value=r,n};let te=a=>console.log(a);const V=(...a)=>te(...a),P=map();function oe(a,e,r={}){P.setKey(a,{onTrigger:e,data:r})}function $(a){return P.get()[a]}let x;const C=()=>(x||(x=new AudioContext),x);let Y;const Q=()=>{const a=C();return Y||(Y=a.createGain(),Y.connect(a.destination)),Y};let k;function fe(){return k||(k=C().audioWorklet.addModule(Ie),k)}function O(a,e,r){const n=new AudioWorkletNode(a,e);return Object.entries(r).forEach(([s,o])=>{n.parameters.get(s).value=o}),n}async function he$2(a={}){const{disableWorklets:e=!1}=a;typeof window<"u"&&(await C().resume(),e?console.log("disableWorklets: AudioWorklet effects coarse, crush and shape are skipped!"):await fe().catch(r=>{console.warn("could not load AudioWorklet effects coarse, crush and shape",r)}))}async function We(a){return new Promise(e=>{document.addEventListener("click",async function r(){await he$2(a),e(),document.removeEventListener("click",r)})})}let w={};function Ae(a,e,r,n){var s;if(r=de(r,0,.98),!w[a]){const o=C().createFeedbackDelay(1,e,r);(s=o.start)==null||s.call(o,n),o.connect(Q()),w[a]=o}return w[a].delayTime.value!==e&&w[a].delayTime.setValueAtTime(e,n),w[a].feedback.value!==r&&w[a].feedback.setValueAtTime(r,n),w[a]}let G={};function pe(a,e=2){if(!G[a]){const r=C().createReverb(e);r.connect(Q()),G[a]=r}return G[a].duration!==e&&(G[a]=G[a].setDuration(e),G[a].duration=e),G[a]}function _(a,e,r){const n=j(r);return a.connect(n),n.connect(e),n}const be=async(a,e,r)=>{const n=C();if(typeof a!="object")throw new Error(`expected hap.value to be an object, but got "${a}". Hint: append .note() or .s() to the end`,"error");let s=n.currentTime+e,{s:o="triangle",bank:l,source:c,gain:u=.8,cutoff:p,resonance:h=1,hcutoff:f,hresonance:b=1,bandf:A,bandq:N=1,coarse:F,crush:B,shape:H,pan:Ee,vowel:Pe,delay:g=0,delayfeedback:R=.5,delaytime:y=.25,orbit:M=1,room:z,size:se=2,velocity:W=1}=a;u*=W;let Se=[];const ze=()=>{Se.forEach(ke=>ke==null?void 0:ke.disconnect())};l&&o&&(o=`${l}_${o}`);let Qe;if(c)Qe=c(s,a,r);else if($(o)){const{onTrigger:ke}=$(o),xe=await ke(s,a,ze);xe&&(Qe=xe.node,xe.stop(s+r))}else throw new Error(`sound ${o} not found! Is it loaded?`);if(!Qe)return;if(n.currentTime>s){V("[webaudio] skip hap: still loading",n.currentTime-s);return}const $e=[];if($e.push(Qe),$e.push(j(u)),p!==void 0&&$e.push(J("lowpass",p,h)),f!==void 0&&$e.push(J("highpass",f,b)),A!==void 0&&$e.push(J("bandpass",A,N)),Pe!==void 0&&$e.push(n.createVowelFilter(Pe)),F!==void 0&&$e.push(O(n,"coarse-processor",{coarse:F})),B!==void 0&&$e.push(O(n,"crush-processor",{crush:B})),H!==void 0&&$e.push(O(n,"shape-processor",{shape:H})),Ee!==void 0){const ke=n.createStereoPanner();ke.pan.value=2*Ee-1,$e.push(ke)}const Ue=j(1);$e.push(Ue),Ue.connect(Q());let Z;if(g>0&&y>0&&R>0){const ke=Ae(M,y,R,s);Z=_(Ue,ke,g)}let ve;if(z>0&&se>0){const ke=pe(M,se);ve=_(Ue,ke,z)}$e.slice(1).reduce((ke,xe)=>ke.connect(xe),$e[0]),Se=$e.concat([Z,ve])},L={};function Be(a,e){var r=e?1e3:1024;if(a=r);return a.toFixed(1)+" "+n[s]}const me=async(a,e,r,n,s,o,l)=>{let c=0;s!==void 0&&r!==void 0&&V("[sampler] hap has note and freq. ignoring note","warning");let u=le({freq:s,note:r},36);c=u-36;const p=C();let h;if(Array.isArray(o))h=o[e%o.length];else{const N=B=>E(B)-u,F=Object.keys(o).filter(B=>!B.startsWith("_")).reduce((B,H,Ee)=>!B||Math.abs(N(H)){const s=r?`sound "${r}:${n}"`:"sample";if(!L[a]){V(`[sampler] load ${s}..`,"load-sample",{url:a});const o=Date.now();L[a]=fetch(a).then(l=>l.arrayBuffer()).then(async l=>{const c=Date.now()-o,u=Be(l.byteLength);return V(`[sampler] load ${s}... done! loaded ${u} in ${c}ms`,"loaded-sample",{url:a}),await e.decodeAudioData(l)})}return L[a]};function we(a){const e=C(),r=e.createBuffer(a.numberOfChannels,a.length,e.sampleRate);for(let n=0;nObject.entries(a).forEach(([n,s])=>{if(typeof s=="string"&&(s=[s]),typeof s!="object")throw new Error("wrong sample map format for "+n);r=s._base||r;const o=l=>(r+l).replace("github:","https://raw.githubusercontent.com/");Array.isArray(s)?s=s.map(o):s=Object.fromEntries(Object.entries(s).map(([l,c])=>[l,(typeof c=="string"?[c]:c).map(o)])),e(n,s)});let ce={};function Xe(a){const e=Object.entries(ce).find(([r])=>a.startsWith(r));if(e)return e[1]}const Re=async(a,e=a._base||"",r={})=>{if(typeof a=="string"){const o=Xe(a);if(o)return o(a);if(a.startsWith("github:")){let[c,u]=a.split("github:");u=u.endsWith("/")?u.slice(0,-1):u,a=`https://raw.githubusercontent.com/${u}/strudel.json`}if(typeof fetch!="function")return;const l=a.split("/").slice(0,-1).join("/");return typeof fetch>"u"?void 0:fetch(a).then(c=>c.json()).then(c=>Re(c,e||c._base||l,r)).catch(c=>{throw console.error(c),new Error(`error loading "${a}"`)})}const{prebake:n,tag:s}=r;Ge(a,(o,l)=>oe(o,(c,u,p)=>Ve(c,u,p,l),{type:"sample",samples:l,baseUrl:e,prebake:n,tag:s}),e)},ee=[];async function Ve(a,e,r,n,s){const{s:o,freq:l,unit:c,nudge:u=0,cut:p,loop:h,clip:f=void 0,n:b=0,note:A,speed:N=1,begin:F=0,end:B=1}=e;if(N===0)return;const H=C(),{attack:Ee=.001,decay:Pe=.001,sustain:g=1,release:R=.001}=e,y=a+u,M=await me(o,b,A,N,l,n,s);if(H.currentTime>a){V(`[sampler] still loading sound "${o}:${b}"`,"highlight");return}if(!M){V(`[sampler] could not load "${o}:${b}"`,"error");return}M.playbackRate.value=Math.abs(N)*M.playbackRate.value,c==="c"&&(M.playbackRate.value=M.playbackRate.value*M.buffer.duration*1);const z=F*M.buffer.duration;M.start(y,z);const se=M.buffer.duration/M.playbackRate.value,{node:W,stop:Se}=ne(Ee,Pe,g,R,1,a);M.connect(W);const ze=H.createGain();W.connect(ze),M.onended=function(){M.disconnect(),W.disconnect(),ze.disconnect(),r()};const Qe={node:ze,bufferSource:M,stop:($e,Ue=f===void 0)=>{let Z=$e;Ue&&(Z=a+(B-F)*se),M.stop(Z+R),Se(Z)}};if(p!==void 0){const $e=ee[p];$e&&($e.node.gain.setValueAtTime(1,y),$e.node.gain.linearRampToValueAtTime(0,y+.01)),ee[p]=Qe}return Qe}function Fe(){["sine","square","triangle","sawtooth"].forEach(a=>{oe(a,(e,r,n)=>{const{attack:s=.001,decay:o=.05,sustain:l=.6,release:c=.01}=r;let{n:u,note:p,freq:h}=r;u=p||u||36,typeof u=="string"&&(u=E(u)),!h&&typeof u=="number"&&(h=ge(u));const{node:f,stop:b}=Ce({t:e,s:a,freq:h}),A=j(.3),{node:N,stop:F}=ne(s,o,l,c,1,e);return f.onended=()=>{f.disconnect(),A.disconnect(),n()},{node:f.connect(A).connect(N),stop:B=>{F(B),b(B+c)}}},{type:"synth",prebake:!0})})}class Sound{constructor(e,r){_e(this,"values");_e(this,"unit",e=>(this.values.unit=e,this));_e(this,"freq",e=>(this.values.freq=e,this));_e(this,"nudge",e=>(this.values.nudge=e,this));_e(this,"cut",e=>(this.values.cut=e,this));_e(this,"loop",e=>(this.values.loop=e,this));_e(this,"clip",e=>(this.values.clip=e,this));_e(this,"n",e=>(this.values.n=e,this));_e(this,"note",e=>(this.values.note=e,this));_e(this,"speed",e=>(this.values.speed=e,this));_e(this,"begin",e=>(this.values.begin=e,this));_e(this,"end",e=>(this.values.end=e,this));_e(this,"gain",e=>(this.values.gain=e,this));_e(this,"cutoff",e=>(this.values.cutoff=e,this));_e(this,"resonance",e=>(this.values.resonance=e,this));_e(this,"hcutoff",e=>(this.values.hcutoff=e,this));_e(this,"hresonance",e=>(this.values.hresonance=e,this));_e(this,"bandf",e=>(this.values.bandf=e,this));_e(this,"bandq",e=>(this.values.bandq=e,this));_e(this,"coarse",e=>(this.values.coarse=e,this));_e(this,"crush",e=>(this.values.crush=e,this));_e(this,"shape",e=>(this.values.shape=e,this));_e(this,"pan",e=>(this.values.pan=e,this));_e(this,"vowel",e=>(this.values.vowel=e,this));_e(this,"delay",e=>(this.values.delay=e,this));_e(this,"delayfeedback",e=>(this.values.delayfeedback=e,this));_e(this,"delaytime",e=>(this.values.delaytime=e,this));_e(this,"orbit",e=>(this.values.orbit=e,this));_e(this,"room",e=>(this.values.room=e,this));_e(this,"size",e=>(this.values.size=e,this));_e(this,"velocity",e=>(this.values.velocity=e,this));_e(this,"out",()=>be(this.values,this.app.clock.pulse_duration));this.app=r,this.values={s:e}}}Array.prototype.in=function(a){return this.includes(a)};async function loadSamples(){const a="https://raw.githubusercontent.com/felixroos/dough-samples/main/";return Promise.all([We(),Re("github:Bubobubobubobubo/Topos-Samples/main"),Re(`${a}/tidal-drum-machines.json`),Re(`${a}/piano.json`),Re(`${a}/Dirt-Samples.json`),Re(`${a}/EmuSP12.json`),Re(`${a}/vcsl.json`),Fe()])}loadSamples();class UserAPI{constructor(e){_e(this,"variables",{});_e(this,"counters",{});_e(this,"_drunk",new DrunkWalk(-100,100,!1));_e(this,"MidiConnection",new MidiConnection);_e(this,"load");_e(this,"time",()=>this.app.audioContext.currentTime);_e(this,"mouseX",()=>this.app._mouseX);_e(this,"mouseY",()=>this.app._mouseY);_e(this,"script",(...e)=>{e.forEach(r=>{tryEvaluate(this.app,this.app.universes[this.app.selected_universe].locals[r])})});_e(this,"s",this.script);_e(this,"clear_script",e=>{this.app.universes[this.app.selected_universe].locals[e]={candidate:"",committed:"",evaluations:0}});_e(this,"cs",this.clear_script);_e(this,"copy_script",(e,r)=>{this.app.universes[this.app.selected_universe].locals[r]=this.app.universes[this.app.selected_universe].locals[e]});_e(this,"cps",this.copy_script);_e(this,"midi_outputs",()=>(console.log(this.MidiConnection.listMidiOutputs()),this.MidiConnection.midiOutputs));_e(this,"midi_output",e=>{e?this.MidiConnection.switchMidiOutput(e):console.log(this.MidiConnection.getCurrentMidiPort())});_e(this,"note",(e,r={})=>{const n=r.channel?r.channel:0,s=r.velocity?r.velocity:100,o=r.duration?r.duration*Math.floor(this.app.clock.pulse_duration*this.ppqn()):this.app.clock.pulse_duration*this.ppqn();this.MidiConnection.sendMidiNote(e,n,s,o)});_e(this,"sysex",e=>{this.MidiConnection.sendSysExMessage(e)});_e(this,"pitch_bend",(e,r)=>{this.MidiConnection.sendPitchBend(e,r)});_e(this,"program_change",(e,r)=>{this.MidiConnection.sendProgramChange(e,r)});_e(this,"midi_clock",()=>{this.MidiConnection.sendMidiClock()});_e(this,"control_change",({control:e=20,value:r=0,channel:n=0})=>{this.MidiConnection.sendMidiControlChange(e,r,n)});_e(this,"midi_panic",()=>{this.MidiConnection.panic()});_e(this,"zn",(e,r={})=>{const n=cachedPattern(e,r);if(n.hasStarted()){const s=n.peek(),o=s.modifiedEvent?s.modifiedEvent:s,l=r.channel?r.channel:0,c=r.velocity?r.velocity:100,u=r.sustain?r.sustain:.5;o instanceof Pitch?(o.bend&&this.MidiConnection.sendPitchBend(o.bend,l),this.MidiConnection.sendMidiNote(o.note,l,c,u),o.bend&&this.MidiConnection.sendPitchBend(8192,l)):o instanceof Chord&&o.pitches.forEach(p=>{p.bend&&this.MidiConnection.sendPitchBend(p.bend,l),this.MidiConnection.sendMidiNote(p.note,l,c,u),p.bend&&this.MidiConnection.sendPitchBend(8192,l)}),s.modifiedEvent&&(s.modifiedEvent=void 0)}return n.next()});_e(this,"counter",(e,r,n)=>(e in this.counters?(this.counters[e].limit!==r&&(this.counters[e].value=0,this.counters[e].limit=r),this.counters[e].step!==n&&(this.counters[e].step=n??this.counters[e].step),this.counters[e].value+=this.counters[e].step,this.counters[e].limit!==void 0&&this.counters[e].value>this.counters[e].limit&&(this.counters[e].value=0)):this.counters[e]={value:0,step:n??1,limit:r},this.counters[e].value));_e(this,"$",this.counter);_e(this,"drunk",e=>e!==void 0?(this._drunk.position=e,this._drunk.getPosition()):(this._drunk.step(),this._drunk.getPosition()));_e(this,"drunk_max",e=>{this._drunk.max=e});_e(this,"drunk_min",e=>{this._drunk.min=e});_e(this,"drunk_wrap",e=>{this._drunk.toggleWrap(e)});_e(this,"variable",(e,r)=>typeof e=="string"&&r===void 0?this.variables[e]:(this.variables[e]=r,this.variables[e]));_e(this,"v",this.variable);_e(this,"delete_variable",e=>{delete this.variables[e]});_e(this,"dv",this.delete_variable);_e(this,"clear_variables",()=>{this.variables={}});_e(this,"cv",this.clear_variables);_e(this,"slice",e=>{const r=this.epulse();return Math.floor(r/Math.floor(e*this.ppqn()))%2===0});_e(this,"barslice",e=>{const r=this.bar()-1;return Math.floor(r/e)%2===0});_e(this,"seqslice",(...e)=>{const r=e[0],n=e.slice(1),s=this.epulse(),o=Math.floor(s/Math.floor(r*this.ppqn()));return n[o%n.length]});_e(this,"pick",(...e)=>e[Math.floor(Math.random()*e.length)]);_e(this,"seqbeat",(...e)=>e[this.ebeat()%e.length]);_e(this,"mel",(e,r)=>r[e%r.length]);_e(this,"seqbar",(...e)=>e[(this.app.clock.time_position.bar+1)%e.length]);_e(this,"seqpulse",(...e)=>e[this.app.clock.time_position.pulse%e.length]);_e(this,"randI",(e,r)=>Math.floor(Math.random()*(r-e+1))+e);_e(this,"rand",(e,r)=>Math.random()*(r-e)+e);_e(this,"rI",this.randI);_e(this,"r",this.rand);_e(this,"quantize",(e,r)=>{if(r.length===0)return e;let n=r[0];return r.forEach(s=>{Math.abs(s-e)Math.min(Math.max(e,r),n));_e(this,"cmp",this.clamp);_e(this,"bpm",e=>e===void 0?this.app.clock.bpm:((e<1||e>500)&&console.log(`Setting bpm to ${e}`),this.app.clock.bpm=e,e));_e(this,"tempo",this.bpm);_e(this,"bpb",e=>e===void 0?this.app.clock.time_signature[0]:(e<1&&console.log(`Setting bpb to ${e}`),this.app.clock.time_signature[0]=e,e));_e(this,"ppqn",e=>e===void 0?this.app.clock.ppqn:(e<1&&console.log(`Setting ppqn to ${e}`),this.app.clock.ppqn=e,e));_e(this,"time_signature",(e,r)=>{this.app.clock.time_signature=[e,r]});_e(this,"almostNever",()=>Math.random()>.9);_e(this,"sometimes",()=>Math.random()>.5);_e(this,"rarely",()=>Math.random()>.75);_e(this,"often",()=>Math.random()>.25);_e(this,"almostAlways",()=>Math.random()>.1);_e(this,"dice",e=>Math.floor(Math.random()*e)+1);_e(this,"i",e=>e!==void 0?(this.app.universes[this.app.selected_universe].global.evaluations=e,this.app.universes[this.app.selected_universe]):this.app.universes[this.app.selected_universe].global.evaluations);_e(this,"bar",()=>this.app.clock.time_position.bar);_e(this,"tick",()=>this.app.clock.tick);_e(this,"pulse",()=>this.app.clock.time_position.pulse);_e(this,"beat",()=>this.app.clock.time_position.beat);_e(this,"ebeat",()=>this.app.clock.beats_since_origin);_e(this,"epulse",()=>this.app.clock.pulses_since_origin);_e(this,"onbar",(e,...r)=>{const n=[...Array(e).keys()].map(s=>s+1);return console.log(r.some(s=>n.includes(s%e))),r.some(s=>n.includes(s%e))});_e(this,"onbeat",(...e)=>{let r=[];return e.forEach(n=>{n=n%this.app.clock.time_signature[0]+1;let s=Math.floor(n),o=n-s;r.push(s===this.app.clock.time_position.beat&&this.app.clock.time_position.pulse===o*this.app.clock.ppqn)}),r.some(n=>n==!0)});_e(this,"stop",()=>{this.app.clock.pause(),this.app.setButtonHighlighting("pause",!0)});_e(this,"silence",this.stop);_e(this,"hush",this.stop);_e(this,"prob",e=>Math.random()*100Math.random()>.5);_e(this,"min",(...e)=>Math.min(...e));_e(this,"max",(...e)=>Math.max(...e));_e(this,"limit",(e,r,n)=>Math.min(Math.max(e,r),n));_e(this,"delay",(e,r)=>{setTimeout(r,e)});_e(this,"delayr",(e,r,n)=>{[...Array(r).keys()].map(o=>e*o).forEach((o,l)=>{setTimeout(n,o)})});_e(this,"mod",(...e)=>e.map(n=>this.epulse()%Math.floor(n*this.ppqn())===0).some(n=>n===!0));_e(this,"modbar",(...e)=>e.map(n=>this.bar()%Math.floor(n*this.ppqn())===0).some(n=>n===!0));_e(this,"euclid",(e,r,n,s=0)=>this._euclidean_cycle(r,n,s)[e%n]);_e(this,"ec",this.euclid);_e(this,"bin",(e,r)=>{let s=r.toString(2).split("").map(o=>o==="1");return s[e%s.length]});_e(this,"line",(e,r,n=1)=>{const s=[];if(r>e&&n>0||rMath.sin(this.app.clock.ctx.currentTime*Math.PI*2*e)+r);_e(this,"usine",(e=1,r=0)=>(this.sine(e,r)+1)/2);_e(this,"saw",(e=1,r=0)=>this.app.clock.ctx.currentTime*e%1*2-1+r);_e(this,"usaw",(e=1,r=0)=>(this.saw(e,r)+1)/2);_e(this,"triangle",(e=1,r=0)=>Math.abs(this.saw(e,r))*2-1);_e(this,"utriangle",(e=1,r=0)=>(this.triangle(e,r)+1)/2);_e(this,"square",(e=1,r=0)=>this.saw(e,r)>0?1:-1);_e(this,"usquare",(e=1,r=0)=>(this.square(e,r)+1)/2);_e(this,"noise",()=>Math.random()*2-1);_e(this,"abs",Math.abs);_e(this,"sound",e=>new Sound(e,this.app));_e(this,"snd",this.sound);_e(this,"samples",Re);_e(this,"log",console.log);_e(this,"scale",scale);_e(this,"rate",e=>{});this.app=e,this.load=Re("github:tidalcycles/Dirt-Samples/master")}_euclidean_cycle(e,r,n=0){if(e==r)return Array.from({length:r},()=>!0);function s(c,u){const p=c.length,h=(u+1)%p;return c[u]>c[h]}if(e>=r)return[!0];const o=Array.from({length:r},(c,u)=>(e*(u-1)%r+r)%r);let l=o.map((c,u)=>s(o,u));return n!=0&&(l=l.slice(n).concat(l.slice(0,n))),l}}const style="";var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var showdown$2={exports:{}};(function(a){(function(){function e(g){var R={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as
(GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex:
foo
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(g===!1)return JSON.parse(JSON.stringify(R));var y={};for(var M in R)R.hasOwnProperty(M)&&(y[M]=R[M].defaultValue);return y}function r(){var g=e(!0),R={};for(var y in g)g.hasOwnProperty(y)&&(R[y]=!0);return R}var n={},s={},o={},l=e(!0),c="vanilla",u={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:e(!0),allOn:r()};n.helper={},n.extensions={},n.setOption=function(g,R){return l[g]=R,this},n.getOption=function(g){return l[g]},n.getOptions=function(){return l},n.resetOptions=function(){l=e(!0)},n.setFlavor=function(g){if(!u.hasOwnProperty(g))throw Error(g+" flavor was not found");n.resetOptions();var R=u[g];c=g;for(var y in R)R.hasOwnProperty(y)&&(l[y]=R[y])},n.getFlavor=function(){return c},n.getFlavorOptions=function(g){if(u.hasOwnProperty(g))return u[g]},n.getDefaultOptions=function(g){return e(g)},n.subParser=function(g,R){if(n.helper.isString(g))if(typeof R<"u")s[g]=R;else{if(s.hasOwnProperty(g))return s[g];throw Error("SubParser named "+g+" not registered!")}},n.extension=function(g,R){if(!n.helper.isString(g))throw Error("Extension 'name' must be a string");if(g=n.helper.stdExtName(g),n.helper.isUndefined(R)){if(!o.hasOwnProperty(g))throw Error("Extension named "+g+" is not registered!");return o[g]}else{typeof R=="function"&&(R=R()),n.helper.isArray(R)||(R=[R]);var y=p(R,g);if(y.valid)o[g]=R;else throw Error(y.error)}},n.getAllExtensions=function(){return o},n.removeExtension=function(g){delete o[g]},n.resetExtensions=function(){o={}};function p(g,R){var y=R?"Error in "+R+" extension->":"Error in unnamed extension",M={valid:!0,error:""};n.helper.isArray(g)||(g=[g]);for(var z=0;z"u"},n.helper.forEach=function(g,R){if(n.helper.isUndefined(g))throw new Error("obj param is required");if(n.helper.isUndefined(R))throw new Error("callback param is required");if(!n.helper.isFunction(R))throw new Error("callback param must be a function/closure");if(typeof g.forEach=="function")g.forEach(R);else if(n.helper.isArray(g))for(var y=0;y").replace(/&/g,"&")};var f=function(g,R,y,M){var z=M||"",se=z.indexOf("g")>-1,W=new RegExp(R+"|"+y,"g"+z.replace(/g/g,"")),Se=new RegExp(R,z.replace(/g/g,"")),ze=[],Qe,$e,Ue,Z,ve;do for(Qe=0;Ue=W.exec(g);)if(Se.test(Ue[0]))Qe++||($e=W.lastIndex,Z=$e-Ue[0].length);else if(Qe&&!--Qe){ve=Ue.index+Ue[0].length;var ke={left:{start:Z,end:$e},match:{start:$e,end:Ue.index},right:{start:Ue.index,end:ve},wholeMatch:{start:Z,end:ve}};if(ze.push(ke),!se)return ze}while(Qe&&(W.lastIndex=$e));return ze};n.helper.matchRecursiveRegExp=function(g,R,y,M){for(var z=f(g,R,y,M),se=[],W=0;W0){var Qe=[];W[0].wholeMatch.start!==0&&Qe.push(g.slice(0,W[0].wholeMatch.start));for(var $e=0;$e=0?M+(y||0):M},n.helper.splitAtIndex=function(g,R){if(!n.helper.isString(g))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[g.substring(0,R),g.substring(R)]},n.helper.encodeEmailAddress=function(g){var R=[function(y){return"&#"+y.charCodeAt(0)+";"},function(y){return"&#x"+y.charCodeAt(0).toString(16)+";"},function(y){return y}];return g=g.replace(/./g,function(y){if(y==="@")y=R[Math.floor(Math.random()*2)](y);else{var M=Math.random();y=M>.9?R[2](y):M>.45?R[1](y):R[0](y)}return y}),g},n.helper.padEnd=function(R,y,M){return y=y>>0,M=String(M||" "),R.length>y?String(R):(y=y-R.length,y>M.length&&(M+=M.repeat(y/M.length)),String(R)+M.slice(0,y))},typeof console>"u"&&(console={warn:function(g){alert(g)},log:function(g){alert(g)},error:function(g){throw g}}),n.helper.regexes={asteriskDashAndColon:/([*_:~])/g},n.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️‍♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴‍♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱‍♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇‍♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷‍♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨‍❤️‍👨",couple_with_heart_woman_woman:"👩‍❤️‍👩",couplekiss_man_man:"👨‍❤️‍💋‍👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩‍❤️‍💋‍👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯‍♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁‍🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨‍👦",family_man_boy_boy:"👨‍👦‍👦",family_man_girl:"👨‍👧",family_man_girl_boy:"👨‍👧‍👦",family_man_girl_girl:"👨‍👧‍👧",family_man_man_boy:"👨‍👨‍👦",family_man_man_boy_boy:"👨‍👨‍👦‍👦",family_man_man_girl:"👨‍👨‍👧",family_man_man_girl_boy:"👨‍👨‍👧‍👦",family_man_man_girl_girl:"👨‍👨‍👧‍👧",family_man_woman_boy_boy:"👨‍👩‍👦‍👦",family_man_woman_girl:"👨‍👩‍👧",family_man_woman_girl_boy:"👨‍👩‍👧‍👦",family_man_woman_girl_girl:"👨‍👩‍👧‍👧",family_woman_boy:"👩‍👦",family_woman_boy_boy:"👩‍👦‍👦",family_woman_girl:"👩‍👧",family_woman_girl_boy:"👩‍👧‍👦",family_woman_girl_girl:"👩‍👧‍👧",family_woman_woman_boy:"👩‍👩‍👦",family_woman_woman_boy_boy:"👩‍👩‍👦‍👦",family_woman_woman_girl:"👩‍👩‍👧",family_woman_woman_girl_boy:"👩‍👩‍👧‍👦",family_woman_woman_girl_girl:"👩‍👩‍👧‍👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️‍♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍‍♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️‍♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂‍♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇‍♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨‍🎨",man_astronaut:"👨‍🚀",man_cartwheeling:"🤸‍♂️",man_cook:"👨‍🍳",man_dancing:"🕺",man_facepalming:"🤦‍♂️",man_factory_worker:"👨‍🏭",man_farmer:"👨‍🌾",man_firefighter:"👨‍🚒",man_health_worker:"👨‍⚕️",man_in_tuxedo:"🤵",man_judge:"👨‍⚖️",man_juggling:"🤹‍♂️",man_mechanic:"👨‍🔧",man_office_worker:"👨‍💼",man_pilot:"👨‍✈️",man_playing_handball:"🤾‍♂️",man_playing_water_polo:"🤽‍♂️",man_scientist:"👨‍🔬",man_shrugging:"🤷‍♂️",man_singer:"👨‍🎤",man_student:"👨‍🎓",man_teacher:"👨‍🏫",man_technologist:"👨‍💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆‍♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼‍♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵‍♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅‍♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆‍♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮‍♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎‍♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️‍🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋‍♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣‍♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃‍♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄‍♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊‍♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁‍♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶‍♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️‍♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩‍🎨",woman_astronaut:"👩‍🚀",woman_cartwheeling:"🤸‍♀️",woman_cook:"👩‍🍳",woman_facepalming:"🤦‍♀️",woman_factory_worker:"👩‍🏭",woman_farmer:"👩‍🌾",woman_firefighter:"👩‍🚒",woman_health_worker:"👩‍⚕️",woman_judge:"👩‍⚖️",woman_juggling:"🤹‍♀️",woman_mechanic:"👩‍🔧",woman_office_worker:"👩‍💼",woman_pilot:"👩‍✈️",woman_playing_handball:"🤾‍♀️",woman_playing_water_polo:"🤽‍♀️",woman_scientist:"👩‍🔬",woman_shrugging:"🤷‍♀️",woman_singer:"👩‍🎤",woman_student:"👩‍🎓",woman_teacher:"👩‍🏫",woman_technologist:"👩‍💻",woman_with_turban:"👳‍♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼‍♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:':octocat:',showdown:`S`},n.Converter=function(g){var R={},y=[],M=[],z={},se=c,W={parsed:{},raw:"",format:""};Se();function Se(){g=g||{};for(var Z in l)l.hasOwnProperty(Z)&&(R[Z]=l[Z]);if(typeof g=="object")for(var ve in g)g.hasOwnProperty(ve)&&(R[ve]=g[ve]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof g+" was passed instead.");R.extensions&&n.helper.forEach(R.extensions,ze)}function ze(Z,ve){if(ve=ve||null,n.helper.isString(Z))if(Z=n.helper.stdExtName(Z),ve=Z,n.extensions[Z]){console.warn("DEPRECATION WARNING: "+Z+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),Qe(n.extensions[Z],Z);return}else if(!n.helper.isUndefined(o[Z]))Z=o[Z];else throw Error('Extension "'+Z+'" could not be loaded. It was either not found or is not a valid extension.');typeof Z=="function"&&(Z=Z()),n.helper.isArray(Z)||(Z=[Z]);var ke=p(Z,ve);if(!ke.valid)throw Error(ke.error);for(var xe=0;xe Topos - +