Home
last modified time | relevance | path

Searched defs:mp (Results 1 – 12 of 12) sorted by relevance

/plugin/dw2pdf/vendor/mpdf/mpdf/src/
H A DCssManager.php1232 expand24($mp) global() argument
/plugin/abc2/abc-libraries/abc2svg/
H A Dabc2svg-1.js102 var decos={dot:"0 stc 5 1 1",tenuto:"0 emb 5 3 3",slide:"1 sld 3 7 0",arpeggio:"2 arp 12 10 0",roll:"3 roll 7 6 6",fermata:"3 hld 10 7 7",emphasis:"3 accent 7 4 4",lowermordent:"3 lmrd 10 5 5",coda:"3 coda 24 10 10",uppermordent:"3 umrd 10 5 5",segno:"3 sgno 22 8 8",trill:"3 trl 14 5 5",upbow:"3 upb 10 5 5",downbow:"3 dnb 9 5 5",gmark:"3 grm 6 5 5",wedge:"0 wedge 7 3 3",turnx:"3 turnx 10 0 5",breath:"3 brth 0 1 20",longphrase:"3 lphr 0 1 1",mediumphrase:"3 mphr 0 1 1",shortphrase:"3 sphr 0 1 1",invertedfermata:"3 hld 10 7 7",invertedturn:"3 turn 10 0 5",invertedturnx:"3 turnx 10 0 5","0":"3 fng 8 3 3 0","1":"3 fng 8 3 3 1","2":"3 fng 8 3 3 2","3":"3 fng 8 3 3 3","4":"3 fng 8 3 3 4","5":"3 fng 8 3 3 5",plus:"3 dplus 7 3 3","+":"3 dplus 7 3 3",accent:"3 accent 7 4 4",">":"3 accent 7 4 4",marcato:"3 marcato 9 3 3","^":"3 marcato 9 3 3",mordent:"3 lmrd 10 5 5",open:"3 opend 10 3 3",snap:"3 snap 14 3 3",thumb:"3 thumb 14 3 3",dacapo:"3 dacs 16 20 20 Da Capo",dacoda:"3 dacs 16 20 20 Da Coda","D.C.":"3 dcap 16 10 10","D.S.":"3 dsgn 16 10 10","D.C.alcoda":"3 dacs 16 38 38 D.C. al Coda","D.S.alcoda":"3 dacs 16 38 38 D.S. al Coda","D.C.alfine":"3 dacs 16 38 38 D.C. al Fine","D.S.alfine":"3 dacs 16 38 38 D.S. al Fine",fine:"3 dacs 16 10 10 Fine",turn:"3 turn 10 0 5","trill(":"3 ltr 8 4 0","trill)":"3 ltr 8 4 0",f:"6 f 18 1 7",ff:"6 ff 18 2 10",fff:"6 fff 18 4 13",ffff:"6 ffff 18 6 16",mf:"6 mf 18 6 13",mp:"6 mp 18 6 16",p:"6 p 18 2 8",pp:"6 pp 18 5 14",ppp:"6 ppp 18 8 20",pppp:"6 pppp 18 10 25",pralltriller:"3 umrd 10 5 5",sfz:"6 sfz 18 4 10",ped:"4 ped 18 6 10","ped-up":"4 pedoff 12 4 4","ped(":"4 lped 20 5 5","ped)":"4 lped 20 5 5","crescendo(":"6 cresc 18 0 0","crescendo)":"6 cresc 18 0 0","<(":"6 cresc 18 0 0","<)":"6 cresc 18 0 0","diminuendo(":"6 dim 18 0 0","diminuendo)":"6 dim 18 0 0",">(":"6 dim 18 0 0",">)":"6 dim 18 0 0","-(":"8 gliss 0 0 0","-)":"8 gliss 0 0 0","~(":"8 glisq 0 0 0","~)":"8 glisq 0 0 0","8va(":"3 8va 10 0 0","8va)":"3 8va 10 0 0","8vb(":"4 8vb 10 0 0","8vb)":"4 8vb 10 0 0","15ma(":"3 15ma 10 0 0","15ma)":"3 15ma 10 0 0","15mb(":"4 15mb 10 0 0","15mb)":"4 15mb 10 0 0",invisible:"32 0 0 0 0",beamon:"33 0 0 0 0",trem1:"34 0 0 0 0",trem2:"34 0 0 0 0",trem3:"34 0 0 0 0",trem4:"34 0 0 0 0",xstem:"35 0 0 0 0",beambr1:"36 0 0 0 0",beambr2:"36 0 0 0 0",rbstop:"37 0 0 0 0","/":"38 0 0 6 6","//":"38 0 0 6 6","///":"38 0 0 6 6","beam-accel":"39 0 0 0 0","beam-rall":"39 0 0 0 0",stemless:"40 0 0 0 0",rbend:"41 0 0 0 0",editorial:"42 0 0 0 0","sacc-1":"3 sacc-1 6,4 4 4",sacc3:"3 sacc3 6,5 4 4",sacc1:"3 sacc1 6,4 4 4",courtesy:"43 0 0 0 0","cacc-1":"3 cacc-1 0 0 0",cacc3:"3 cacc3 0 0 0",cacc1:"3 cacc1 0 0 0"},f_near=[true,true,true],f_note=[false,false,false,true,true,true,false,false,true],f_staff=[false,false,false,false,false,false,true,true] property in decos
7168 var tgls={"mtr ":{x:0,y:0,c:"\u0020"},brace:{x:0,y:0,c:"\ue000"},lphr:{x:0,y:24,c:"\ue030"},mphr:{x:0,y:24,c:"\ue038"},sphr:{x:0,y:27,c:"\ue039"},rdots:{x:-1,y:0,c:"\ue043"},dsgn:{x:-4,y:-4,c:"\ue045"},dcap:{x:-4,y:-4,c:"\ue046"},sgno:{x:-6,y:0,c:"\ue047"},coda:{x:-12,y:-6,c:"\ue048"},tclef:{x:-8,y:0,c:"\ue050"},cclef:{x:-8,y:0,c:"\ue05c"},bclef:{x:-8,y:0,c:"\ue062"},pclef:{x:-6,y:0,c:"\ue069"},spclef:{x:-6,y:0,c:"\ue069"},stclef:{x:-8,y:0,c:"\ue07a"},scclef:{x:-8,y:0,c:"\ue07b"},sbclef:{x:-7,y:0,c:"\ue07c"},oct:{x:0,y:2,c:"\ue07d"},mtr0:{x:0,y:0,c:"\ue080"},mtr1:{x:0,y:0,c:"\ue081"},mtr2:{x:0,y:0,c:"\ue082"},mtr3:{x:0,y:0,c:"\ue083"},mtr4:{x:0,y:0,c:"\ue084"},mtr5:{x:0,y:0,c:"\ue085"},mtr6:{x:0,y:0,c:"\ue086"},mtr7:{x:0,y:0,c:"\ue087"},mtr8:{x:0,y:0,c:"\ue088"},mtr9:{x:0,y:0,c:"\ue089"},mtrC:{x:0,y:0,c:"\ue08a"},"mtr+":{x:0,y:0,c:"\ue08c"},"mtr(":{x:0,y:0,c:"\ue094"},"mtr)":{x:0,y:0,c:"\ue095"},HDD:{x:-7,y:0,c:"\ue0a0"},breve:{x:-7,y:0,c:"\ue0a1"},HD:{x:-5.2,y:0,c:"\ue0a2"},Hd:{x:-3.8,y:0,c:"\ue0a3"},hd:{x:-3.7,y:0,c:"\ue0a4"},ghd:{x:2,y:0,c:"\ue0a4",sc:.66},pshhd:{x:-3.7,y:0,c:"\ue0a9"},pfthd:{x:-3.7,y:0,c:"\ue0b3"},x:{x:-3.7,y:0,c:"\ue0a9"},"circle-x":{x:-3.7,y:0,c:"\ue0b3"},srep:{x:-5,y:0,c:"\ue101"},"dot+":{x:-5,y:0,sc:.7,c:"\ue101"},diamond:{x:-4,y:0,c:"\ue1b9"},triangle:{x:-4,y:0,c:"\ue1bb"},dot:{x:-1,y:0,c:"\ue1e7"},flu1:{x:-.3,y:0,c:"\ue240"},fld1:{x:-.3,y:0,c:"\ue241"},flu2:{x:-.3,y:0,c:"\ue242"},fld2:{x:-.3,y:0,c:"\ue243"},flu3:{x:-.3,y:3.5,c:"\ue244"},fld3:{x:-.3,y:-4,c:"\ue245"},flu4:{x:-.3,y:8,c:"\ue246"},fld4:{x:-.3,y:-9,c:"\ue247"},flu5:{x:-.3,y:12.5,c:"\ue248"},fld5:{x:-.3,y:-14,c:"\ue249"},"acc-1":{x:-1,y:0,c:"\ue260"},"cacc-1":{x:-18,y:0,c:"\ue26a\ue260\ue26b"},"sacc-1":{x:-1,y:0,sc:.7,c:"\ue260"},acc3:{x:-1,y:0,c:"\ue261"},"cacc3":{x:-18,y:0,c:"\ue26a\ue261\ue26b"},sacc3:{x:-1,y:0,sc:.7,c:"\ue261"},acc1:{x:-2,y:0,c:"\ue262"},"cacc1":{x:-18,y:0,c:"\ue26a\ue262\ue26b"},sacc1:{x:-2,y:0,sc:.7,c:"\ue262"},acc2:{x:-3,y:0,c:"\ue263"},"acc-2":{x:-3,y:0,c:"\ue264"},"acc-1_2":{x:-2,y:0,c:"\ue280"},"acc-3_2":{x:-3,y:0,c:"\ue281"},acc1_2:{x:-1,y:0,c:"\ue282"},acc3_2:{x:-3,y:0,c:"\ue283"},accent:{x:-3,y:0,c:"\ue4a0"},stc:{x:-1,y:-2,c:"\ue4a2"},emb:{x:-4,y:-2,c:"\ue4a4"},wedge:{x:-1,y:0,c:"\ue4a8"},marcato:{x:-3,y:0,c:"\ue4ac"},hld:{x:-7,y:0,c:"\ue4c0"},brth:{x:0,y:0,c:"\ue4ce"},r00:{x:-1.5,y:0,c:"\ue4e1"},r0:{x:-1.5,y:0,c:"\ue4e2"},r1:{x:-3.5,y:-6,c:"\ue4e3"},r2:{x:-3.2,y:0,c:"\ue4e4"},r4:{x:-3,y:0,c:"\ue4e5"},r8:{x:-3,y:0,c:"\ue4e6"},r16:{x:-4,y:0,c:"\ue4e7"},r32:{x:-4,y:0,c:"\ue4e8"},r64:{x:-4,y:0,c:"\ue4e9"},r128:{x:-4,y:0,c:"\ue4ea"},mrest:{x:-10,y:0,c:"\ue4ee"},mrep:{x:-6,y:0,c:"\ue500"},mrep2:{x:-9,y:0,c:"\ue501"},p:{x:-4,y:-6,c:"\ue520"},f:{x:-4,y:-6,c:"\ue522"},pppp:{x:-4,y:-6,c:"\ue529"},ppp:{x:-4,y:-6,c:"\ue52a"},pp:{x:-4,y:-6,c:"\ue52b"},mp:{x:-4,y:-6,c:"\ue52c"},mf:{x:-4,y:-6,c:"\ue52d"},ff:{x:-4,y:-6,c:"\ue52f"},fff:{x:-4,y:-6,c:"\ue530"},ffff:{x:-4,y:-6,c:"\ue531"},sfz:{x:-4,y:-6,c:"\ue539"},trl:{x:-4,y:-4,c:"\ue566"},turn:{x:-5,y:-4,c:"\ue567"},turnx:{x:-5,y:-4,c:"\ue569"},umrd:{x:-7,y:-2,c:"\ue56c"},lmrd:{x:-7,y:-2,c:"\ue56d"},dplus:{x:-4,y:10,c:"\ue582"},sld:{x:-8,y:12,c:"\ue5d0"},grm:{x:-2,y:0,c:"\ue5e2"},dnb:{x:-4,y:0,c:"\ue610"},upb:{x:-3,y:0,c:"\ue612"},opend:{x:-2,y:0,c:"\ue614"},roll:{x:0,y:0,c:"\ue618"},thumb:{x:0,y:0,c:"\ue624"},snap:{x:-2,y:0,c:"\ue630"},ped:{x:-10,y:0,c:"\ue650"},pedoff:{x:-5,y:0,c:"\ue655"},mtro:{x:0,y:0,c:"\ue911"},mtrc:{x:0,y:0,c:"\ue915"},"mtr.":{x:0,y:0,c:"\ue920"},"mtr|":{x:0,y:0,c:"\ue925"},longa:{x:-4.7,y:0,c:"\ue95d"},custos:{x:-4,y:3,c:"\uea02"},ltr:{x:2,y:6,c:"\ueaa4"}} class in tgls
/plugin/abc2/abc-libraries/abc-ui/
H A Dabc-ui-1.0.0.min.js8 function external_eval(param){return eval(param)}function isQuoted(e){return e.q}function quote(e){return e.q=!0,e}function unquote(e){return delete e.q,e}function Symbol(e){return this.nm=e,this}function isSymbol(e){return e&&e.constructor===Symbol}function symbolName(e){return e.nm}function isArray(e){return e&&e.constructor===Array}function inDs(e,t){for(var n=e.length-1;0<=n;--n)if("undefined"!=typeof e[n][t])return e[n];return!1}function member(e,t){return 0<=t.indexOf(e)}function PsParser(){function t(t){e.L=t,e.N=t.length,e.I=0,e.D=0}function n(){return e.I<e.N&&e.L[e.I]}function r(){return e.I<e.N&&e.L[e.I++]}function i(){while(e.I<e.N&&member(e.L[e.I]," \n"))e.I++}function s(){while("%"==n()){while(n()&&"\n"!=n())r();i()}}function o(){r();var e=[],t=1;while(0<t&&n()){var i=r();switch(i){case"(":t++;break;case")":t--,t<=0&&(i=!1);break;case"\\":i=r();switch(i){case"(":break;case")":break;case"\\":break;case"n":i="\n";break;case"r":i="\r";break;case"t":i=" ";break;default:i=!1}}i!==!1&&e.push(i)}return e.join("")}function u(){var e=r();if(member(e,"()<>/% \n"))throw new Error("Symbol expected, got "+e);var t=member(e,"+-0123456789."),i="."==e,s=[e];while(n()&&!member(n(),"()<>[]{}/% \n"))e=r(),s.push(e),t&&!member(e,"0123456789")&&(!i&&"."==e?i=!0:t=!1);return s=s.join(""),1==s.length&&member(s,"+-.")&&(t=!1),t?i?parseFloat(s):parseInt(s,10):new Symbol(s)}function a(){i();switch(n()){case!1:return undefined;case"%":return s();case"[":return new Symbol(r());case"]":return new Symbol(r());case"{":return e.D++,new Symbol(r());case"}":return e.D--,new Symbol(r());case"/":r();var t=u();return quote(t);case"(":return o();case"<":r();if("<"!=n())throw new Error("Encoded strings not implemented yet");return r(),new Symbol("<<");case">":r();if(">"!=n())throw new Error("Unexpected >");return r(),new Symbol(">>");default:return u()}}var e=this;return PsParser.prototype.init=t,PsParser.prototype.peek=n,PsParser.prototype.token=a,this}function Ps0(e,t,n){function r(i,s){if(isSymbol(i)&&!isQuoted(i)){var o=symbolName(i),u=inDs(t,o);if(!u)throw new Error("bind error '"+o+"'");n.push([!1,u[o]])}else if(s&&isArray(i)&&isQuoted(i)){if(0<i.length){var a=i[0],f=quote(i.slice(1));0<f.length&&n.push([!1,f]),r(a,!1)}}else"function"==typeof i?i():e.push(i)}function i(){var t=e.pop();r(t,!1)}function s(){var t=n.pop(),i=t.shift(),s=t.pop();for(var o=0;o<t.length;o++)e.push(t[o]);r(s,!0)}function u(t){o.init(t);while(o.peek()){var r=o.token();if(r||r===0){e.push(r);if(o.D<=0||isSymbol(r)&&(member(symbolName(r),"[]{}")||"<<"==symbolName(r)||">>"==symbolName(r))){i();while(0<n.length)s()}}}return e}var o=new PsParser;return Ps0.prototype.run=r,Ps0.prototype.exec=i,Ps0.prototype.step=s,Ps0.prototype.parse=u,this}function Wps(e){function f(e){if(isSymbol(e)&&!isQuoted(e))return e;if(isArray(e)&&isQuoted(e)){var t=e.length,n=[];for(var r=0;r<t;r++){var i=e[r],s=f(i);isArray(i)?n=n.concat(isQuoted(i)?quote([s]):[s]):n=n.concat(s)}return quote(n)}return e}function l(){var e=arguments;if(e.length)for(var t=0;t<e.length;t++)o.parse(e[t]);else o.parse(e);return n}var t=e,n=[],r={},i=[r],s=[],o=new Ps0(n,i,s);r["true"]=function(){n.push(!0)},r["false"]=function(){n.push(!1)},r["null"]=function(){n.push(null)},r.sub=function(){var e=n.pop();n.push(n.pop()-e)},r.mul=function(){n.push(n.pop()*n.pop())},r.div=function(){var e=n.pop();n.push(n.pop()/e)},r.mod=function(){var e=n.pop();n.push(n.pop()%e)};var u={};r.mark=function(){n.push(u)},r.counttomark=function(){var e=0;for(var t=n.length-1;0<=t;t--){if(u===n[t])return n.push(e);e++}throw new Error("Mark not found")},r["<<"]=r.mark,r[">>"]=function(){var e={};while(0<n.length){var t=n.pop();if(u===t)return n.push(e);e[n.pop()]=t}throw new Error("Mark not found")},r.exch=function(){var e=n.pop(),t=n.pop();n.push(e),n.push(t)},r.clear=function(){n.length=0},r.pop=function(){n.pop()},r.index=function(){n.push(n[n.length-2-n.pop()])},r.roll=function(){var e=n.pop(),t=n.pop(),r=[],i=[];e<0&&(e=t+e);for(var s=0;s<t;s++)s<e?r.unshift(n.pop()):i.unshift(n.pop());for(s=0;s<e;s++)n.push(r.shift());for(s=0;s<t-e;s++)n.push(i.shift())},r.copy=function(){var e=n.pop();if("object"==typeof e){var t=n.pop();for(var r in t)e[r]=t[r];n.push(e)}else{var t=n.length-e;for(var r=0;r<e;r++)n.push(n[t+r])}},r.length=function(){n.push(n.pop().length)},r.astore=function(){var e=n.pop(),t=e.length;for(var r=t-1;0<=r;r--)e[r]=n.pop();n.push(e)},r.array=function(){n.push(new Array(n.pop()))},r.eq=function(){var e=n.pop(),t=n.pop();n.push(t==e)},r.lt=function(){var e=n.pop(),t=n.pop();n.push(t<e)},r.ifelse=function(){var e=n.pop(),t=n.pop(),r=n.pop();s.push([!1,r===!0?t:e])},r.and=function(){var e=n.pop(),t=n.pop();if(!0===e||!1===e){n.push(e==1&&t===!0);return}n.push(e&t)},r.repeat=function c(){var e=n.pop(),t=n.pop();1<t&&s.push([!0,t-1,e,c]),0<t&&s.push([!1,e])},r["for"]=function h(){var e=n.pop(),t=n.pop(),r=n.pop(),i=n.pop();r<0?(t<=i+r&&s.push([!0,i+r,r,t,e,h]),t<=i&&s.push([!1,i,e])):(i+r<=t&&s.push([!0,i+r,r,t,e,h]),i<=t&&s.push([!1,i,e]))},r.exec=function(){s.push([!1,n.pop()])},r.cvx=function(){var e=n.pop();isSymbol(e)&&isQuoted(e)?n.push(unquote(e)):isArray(e)&&!isQuoted(e)?n.push(quote(e)):n.push(e)},r.dict=function(){n.pop(),n.push({})},r.get=function(){var e=n.pop(),t=n.pop();isSymbol(e)?n.push(t[symbolName(e)]):n.push(t[e])},r.getinterval=function(){var e=n.pop(),t=n.pop()+e,r=n.pop(),i=[];while(--e>=0)i.push(r[t++]);n.push(i)},r.put=function(){var e=n.pop(),t=n.pop(),r=n.pop();isSymbol(t)?r[symbolName(t)]=e:r[t]=e},r.begin=function(){i.push(n.pop())},r.end=function(){i.pop()},r.currentdict=function(){n.push(i[i.length-1])},r.where=function(){var e=symbolName(n.pop()),t=inDs(i,e);t?(n.push(t),n.push(!0)):n.push(!1)},r.save=function(){var e=i.slice();for(var t=0;t<e.length;t++){var r=e[t],s={};for(var o in r)s[o]=r[o];e[t]=s}n.push(e)},r.restore=function(){var e=n.pop();while(0<i.length)i.pop();while(0<e.length)i.unshift(e.pop())},r.type=function(){var e=n.pop(),t;if(null===e)t="nulltype";else if(!0===e||!1===e)t="booleantype";else if(u===e)t="marktype";else if("string"==typeof e)t="stringtype";else if(isSymbol(e))t=isQuoted(e)?"nametype":"operatortype";else if("function"==typeof e)t="operatortype";else if(isArray(e))t="arraytype";else if("object"==typeof e)t="dicttype";else{if(1*e!=e)throw new Error("Undefined type '"+e+"'");t=e%1==0?"integertype":"realtype"}n.push(t)};var a=!0;return r[".strictBind"]=function(){a=!0===n.pop()},r.bind=function(){n.push(f(n.pop()))},r["="]=function(){var e=n.pop();alert(e&&e.nm||e)},r["=="]=function(){alert(n.pop())},r.stack=function(){alert(n)},r.pstack=function(){alert(n)},r[".call"]=function(){var e=n.pop(),t=n.pop(),r=n.pop(),i=[];for(var s=0;s<e;s++)i.unshift(n.pop());if(!r[t])throw new Error(".call: "+t+" undef");n.push(r[t].apply(r,i))},r[".call0"]=function(){var e=n.pop(),t=n.pop(),r=n.pop(),i=[];for(var s=0;s<e;s++)i.unshift(n.pop());if(!r[t])throw new Error(".call0: "+t+" undef");r[t].apply(r,i)},r[".svg"]=function(){n.push(t)},r[".math"]=function(){n.push(Math)},r[".date"]=function(){n.push(new Date)},r[".window"]=function(){n.push(window)},r[".callback"]=function(){var e=n.pop();n.push(function(){o.run(e,!0);while(0<s.length)o.step()})},r[".minv"]=function(){var e=n.pop(),t=e[0],r=e[1],i=e[2],s=e[3],o=e[4],u=e[5];n.push([s,r,i,t,i*u-s*o,r*o-t*u])},r[".mmul"]=function(){var e=n.pop(),t=n.pop(),r=t[0],i=t[1],s=t[2],o=t[3],u=t[4],a=t[5],f=e[0],l=e[1],c=e[2],h=e[3],p=e[4],d=e[5];n.push([r*f+i*c,r*l+i*h,s*f+o*c,s*l+o*h,u*f+a*c+p,u*l+a*h+d])},r[".xy"]=function(){var e=n.pop(),t=n.pop(),r=n.pop();n.push(e[0]*r+e[2]*t+e[4]),n.push(e[1]*r+e[3]*t+e[5])},r[".rgb"]=function(){var e=n.pop(),t=n.pop(),r=n.pop();n.push("rgb("+r+","+t+","+e+")")},r[".rgba"]=function(){var e=n.pop(),t=n.pop(),r=n.pop(),i=n.pop();n.push("rgba("+i+","+r+","+t+","+e+")")},Wps.prototype.parse=l,this}function Psvg(e){function d(){return w(0),[o.xoffs-o.xorig,o.yoffs-o.yorig]}function v(){s=!1,w(0),t+="<g";if(o.xscale!=1||o.yscale!=1||o.rotate){t+=' transform="';if(o.xscale!=1||o.yscale!=1)o.xscale==o.yscale?t+="scale("+o.xscale.toFixed(3)+")":t+="scale("+o.xscale.toFixed(3)+","+o.yscale.toFixed(3)+")";if(o.rotate){if(o.xoffs||o.yoffs){var e,n=o.xoffs,r=o.yoffs,u=o.sin,l=o.cos;e=n*l-r*u,r=n*u+r*l,t+=" translate("+e.toFixed(2)+","+r.toFixed(2)+")",a=o.xoffs,f=o.yoffs,o.xoffs=0,o.yoffs=0}t+=" rotate("+o.rotate.toFixed(2)+")"}t+='"'}g(!1),o.rgb&&(t+=' style="color:'+o.rgb+'"'),t+=">\n",i=1}function m(e){var t,n=new e.constructor;for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function g(e){var n=o.font_n;if(!n)return;var r="",i=n.indexOf("Italic"),s=100,u=n.indexOf("Oblique"),a=n.indexOf("Bold"),f=0;a>0&&(r=' font-weight="bold"',s=a,f=2);if(i>0||u>0)i>0&&(r+=' font-style="italic"',i<s&&(s=i),f|=4),u>0&&(r+=' font-style="oblique"',u<s&&(s=u),f=8);s!=100&&(n[s-1]=="-"&&s--,n=n.slice(0,s)),e&&(!(f&2)&&c.indexOf("Bold")>=0&&(r+=' font-weight="normal"'),!(f&12)&&(c.indexOf("Italic")>=0||c.indexOf("Oblique")>=0)&&(r+=' font-style="normal"')),t+=' font-family="'+n+'"'+r+' font-size="'+o.font_s+'"'}function y(){if(p)return;w(1),o.px=o.cx,o.py=o.cy,p='<path d="m'+(o.xoffs+o.cx).toFixed(2)+" "+(o.yoffs-o.cy).toFixed(2)+"\n"}function b(){t+=p,p=""}function w(e){i==2&&(t+="</text>\n",i=1),e==0?i&&(i=0,t+="</g>\n",o.rotate&&(o.xoffs=a,o.yoffs=f,a=0,f=0)):s&&v()}function E(e){return e.length*o.font_s*.5}function S(e,t,n,r,i,s){var u,a,f,l;r>=360&&(r-=360),i>=360&&(i-=360),u=e+n*Math.cos(r*Math.PI/180),a=t+n*Math.sin(r*Math.PI/180),o.cx!=undefined?p?(u!=o.cx||a!=o.cy?p+="l":p+="m",p+=(u-o.cx).toFixed(2)+" "+(-(a-o.cy)).toFixed(2)):(o.cx=u,o.cy=a,y()):(p&&(p=""),o.cx=u,o.cy=a,y()),r==i?(i=180-r,f=e+n*Math.cos(i*Math.PI/180),l=t+n*Math.sin(i*Math.PI/180),p+="a"+n.toFixed(2)+" "+n.toFixed(2)+" 0 0 "+(s?"1 ":"0 ")+(f-u).toFixed(2)+" "+(a-l).toFixed(2)+" "+n.toFixed(2)+" "+n.toFixed(2)+" 0 0 "+(s?"1 ":"0 ")+(u-f).toFixed(2)+" "+(l-a).toFixed(2)+"\n",o.cx=u,o.cy=a):(f=e+n*Math.cos(i*Math.PI/180),l=t+n*Math.sin(i*Math.PI/180),p+="a"+n.toFixed(2)+" "+n.toFixed(2)+" 0 0 "+(s?"1 ":"0 ")+(f-u).toFixed(2)+" "+(a-l).toFixed(2)+"\n",o.cx=f,o.cy=l)}function x(e,t){y(),e==0?p+=" v"+(-t).toFixed(2)+"\n":t==0?p+=" h"+e.toFixed(2)+"\n":p+=" l"+e.toFixed(2)+" "+(-t).toFixed(2)+"\n",o.cx+=e,o.cy+=t}function T(e){e&&w(0);if(!t)return;n.out_svg(t),t=""}function N(e,t,i,s){return o.xorig=o.xoffs=n.sx(0),o.yorig=o.yoffs=n.sy(0),o.cx=0,o.cy=0,r.parse(s+(t/n.stv_g().scale).toFixed(2)+" "+i.toFixed(2)+" "+e),T(!0),!0}var t="",n=e,r=new Wps(this),i=0,s,o={cx:0,cy:0,xoffs:0,yoffs:0,xscale:1,yscale:1,rotate:0,sin:0,cos:1,linewidth:.7,dash:""},u=[],a=0,f=0,l="",c="",h=0,p;Psvg.prototype.strw=E,Psvg.prototype.arc=S,Psvg.prototype.arcn=function(e,t,n,r,i){S(e,t,n,r,i,!0)},Psvg.prototype.closepath=function(){p&&o.cx&&x(o.px-o.cx,o.py-o.cy)},Psvg.prototype.cx=function(){return o.cx},Psvg.prototype.cy=function(){return o.cy},Psvg.prototype.curveto=function(e,t,n,r,i,s){y(),p+=" C"+(o.xoffs+e).toFixed(2)+" "+(o.yoffs-t).toFixed(2)+" "+(o.xoffs+n).toFixed(2)+" "+(o.yoffs-r).toFixed(2)+" "+(o.xoffs+i).toFixed(2)+" "+(o.yoffs-s).toFixed(2)+"\n",o.cx=i,o.cy=s},Psvg.prototype.eofill=function(){b(),t+='" fill-rule="evenodd" fill="currentColor"/>\n'},Psvg.prototype.fill=function(){b(),t+='" fill="currentColor"/>\n'},Psvg.prototype.gsave=function(){u.push(m(o))},Psvg.prototype.grestore=function(){o=u.pop(),s=!0},Psvg.prototype.lineto=function(e,t){y(),e==o.cx?p+=" v"+(o.cy-t).toFixed(2)+"\n":t==o.cy?p+=" h"+(e-o.cx).toFixed(2)+"\n":p+=" l"+(e-o.cx).toFixed(2)+" "+(o.cy-t).toFixed(2)+"\n",o.cx=e,o.cy=t},Psvg.prototype.moveto=function(e,n){o.cx=e,o.cy=n,p?p+=" M"+(o.xoffs+o.cx).toFixed(2)+" "+(o.yoffs-o.cy).toFixed(2)+"\n":i==2&&(t+="</text>\n",i=1)},Psvg.prototype.newpath=function(){o.cx=o.cy=undefined},Psvg.prototype.rcurveto=function(e,t,n,r,i,s){y(),p+=" c"+e.toFixed(2)+" "+(-t).toFixed(2)+" "+n.toFixed(2)+" "+(-r).toFixed(2)+" "+i.toFixed(2)+" "+(-s).toFixed(2)+"\n",o.cx+=i,o.cy+=s},Psvg.prototype.rlineto=x,Psvg.prototype.rmoveto=function(e,n){p?p+=" m"+e.toFixed(2)+" "+(-n).toFixed(2)+"\n":i==2&&(t+="</text>\n",i=1),o.cx+=e,o.cy+=n},Psvg.prototype.rotate=function(e){w(0);var t,n=o.xoffs,r=o.yoffs,i=o.sin,u=o.cos;t=n*u-r*i,r=n*i+r*u,o.xoffs=t/o.xscale,o.yoffs=r/o.yscale,n=o.cx,r=o.cy,t=n*u-r*i,r=-n*i+r*u,o.cx=t/o.xscale,o.cy=r/o.yscale,e=360-e,o.rotate+=e,o.rotate>180?o.rotate-=360:o.rotate<=-180&&(o.rotate+=360),e=o.rotate*Math.PI/180,o.sin=i=Math.sin(e),o.cos=u=Math.cos(e),t=o.cx,o.cx=(t*u+o.cy*i)*o.xscale,o.cy=(-t*i+o.cy*u)*o.yscale,t=o.xoffs,o.xoffs=(t*u+o.yoffs*i)*o.xscale,o.yoffs=(-t*i+o.yoffs*u)*o.yscale,s=!0},Psvg.prototype.scale=function(e,t){o.xoffs/=e,o.yoffs/=t,o.cx/=e,o.cy/=t,o.xscale*=e,o.yscale*=t,s=!0},Psvg.prototype.selectfont=function(e,t){e=e.nm;if(h!=t||e!=l)o.font_n_old=o.font_n,o.font_n=e,o.font_s=t,s=!0},Psvg.prototype.setdash=function(e,t){var n=e.length,r;if(n==0){o.dash="";return}o.dash=' stroke-dashoffset="'+t+'" stroke-dasharray="',r=0;for(;;){o.dash+=e[r];if(--n==0)break;o.dash+=" "}o.dash+='"'},Psvg.prototype.setlinewidth=function(e){o.linewidth=e},Psvg.prototype.setrgbcolor=function(e,t,n){var r=16777216+(Math.floor(e*255)<<16)+(Math.floor(t*255)<<8)+Math.floor(n*255);r=r.toString(16),r=r.replace("1","#"),r!=o.rgb&&(o.rgb=r,s=!0)},Psvg.prototype.show=function(e){var n,r,u;s&&(i==2?n=!0:v()),r=o.cx,u=o.cy,n?(t+="<tspan\n ",g(!0),t+=">"):i!=2&&(t+='<text x="'+(r+o.xoffs).toFixed(2)+'" y="'+(o.yoffs-u).toFixed(2)+'">',i=2),t+=e.replace(/<|>|&| /g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";case" ":return"  "}}),n&&(t+="</tspan>"),o.cx=r+E(e)},Psvg.prototype.stroke=function(){b(),o.linewidth!=.7&&(t+='" stroke-width="'+o.linewidth.toFixed(2)),t+='" stroke="currentColor" fill="none"'+o.dash+"/>\n"},Psvg.prototype.translate=function(e,t){o.xoffs+=e,o.yoffs-=t,o.cx-=e,o.cy-=t},Psvg.prototype.arp=function(e,t,r){var i=d();T(),n.out_arp((t+i[0])*n.stv_g().scale,r-i[1],e)},Psvg.prototype.ltr=function(e,t,r){var i=d();T(),n.out_ltr((t+i[0])*n.stv_g().scale,r-i[1],e)},Psvg.prototype.xygl=function(e,t,r){var i=d();T(),n.xygl((e+i[0])*n.stv_g().scale,t-i[1],r)},Psvg.prototype.xygls=function(e,t,r,i){var s=d();T(),n.out_deco_str((t+s[0])*n.stv_g().scale,r-s[1],i,e)},Psvg.prototype.xyglv=function(e,t,r,i){var s=d();T(),n.out_deco_val((t+s[0])*n.stv_g().scale,r-s[1],i,e)},Psvg.prototype.y0=function(e){var t=n.get_staff_tb();return e+t[0].y},Psvg.prototype.y1=function(e){var t=n.get_staff_tb();return e+t[1].y},Psvg.prototype.ps_flush=T,Psvg.prototype.ps_eval=function(e){r.parse(e),T()},Psvg.prototype.psdeco=function(e,t,i,s){var o,u,a,f,l=r.parse("/"+e+" where"),c=l.pop(),h=n.get_staff_tb();return c?(f=0,s.defl.nost&&(f=1),s.defl.noen&&(f|=2),s.s.stem>=0&&(f|=4),l.pop(),a="/defl "+f+" def ",s.lden&&(a+=t.toFixed(2)+" "+i.toFixed(2)+" ",u=s.start,t=u.x,i=u.y+h[u.st].y,t>s.x-20&&(t=s.x-20)),o=s.dd,s.has_val?a+=s.val+" ":o.str&&(a+="("+o.str+") ",i+=o.h*.2),N(e,t,i,a)):!1},Psvg.prototype.psxygl=function(e,t,n){var i=r.parse("/"+n+" where"),s=i.pop();return s?(i.pop(),N(n,e,t,"dlw ")):!1},Psvg.prototype.svgcall=function(e,t,r,i,s){var o=d();T(),e((t+o[0])*n.stv_g().scale,r-o[1],i,s)},r.parse("currentdict/systemdict currentdict put\nsystemdict/{/mark cvx put\nsystemdict/[/mark cvx put\nsystemdict/]\n/counttomark cvx\n/array cvx\n/astore cvx\n/exch cvx\n/pop cvx\n5 array astore cvx put\nsystemdict/}/] cvx/cvx cvx 2 array astore cvx put\nsystemdict/def{currentdict 2 index 2 index put pop pop}put\n\n/maxlength 1000 def % TODO\n/.bdef{bind def}bind def\n/.xdef{exch def}.bdef\n/dup{0 index}.bdef\n/load{dup where pop exch get}.bdef\n/.ldef{load def}.bdef\n/if{{}ifelse}.bdef\n/cleartomark{array pop}.bdef\n/known{exch begin where{currentdict eq}{false}if end}.bdef\n/store{1 index where{3 1 roll put}{def}ifelse}.bdef\n/not{{false}{true}ifelse}.bdef\n%/.logand{{{true}{false}ifelse}{pop false}ifelse}.bdef\n%/and/.logand .ldef % TODO numeric and\n/.logor{{pop true}{{true}{false}ifelse}ifelse}.bdef\n/or/.logor .ldef % TODO numeric or\n/ne{eq not}.bdef\n/ge{lt not}.bdef\n/le{1 index 1 index eq 3 1 roll lt or}.bdef\n/gt{le not}.bdef\n/.repeat{1 1 4 2 roll for}.bdef\n\n%% math\n\n/floor{.math(floor)1 .call}.bdef\n\n/neg{0 exch sub}.bdef\n/add{neg sub}.bdef\n/idiv{div floor}.bdef\n\n/.pi{.math(PI)get}.bdef\n\n/abs{.math(abs)1 .call}.bdef\n%/.acos{.math(acos)1 .call}.bdef\n%/.asin{.math(asin)1 .call}.bdef\n/atan{.math(atan2)2 .call 180 mul .pi div}.bdef\n%/.atan2{.math(atan2)2 .call}.bdef\n%/ceiling{.math(ceil)1 .call}.bdef\n/cos{.pi mul 180 div .math(cos)1 .call}.bdef\n%/.exp{.math(exp)1 .call}.bdef\n%/log{.math(log)1 .call}.bdef\n%/.max{.math(max)2 .call}.bdef\n%/.min{.math(min)2 .call}.bdef\n%/.pow{.math(pow)2 .call}.bdef\n%/.random{.math(random)0 .call}.bdef\n%/rand{.random}.bdef % TODO follow spec\n%/round{.math(round)1 .call}.bdef\n%/sin{.math(sin)1 .call}.bdef\n%/sqrt{.math(sqrt)1 .call}.bdef\n%/.tan{.math(tan)1 .call}.bdef\n%/truncate{.math(truncate)1 .call}.bdef % TODO Math.truncate does not exist!\n\n% graphic\n/arc{.svg(arc)5 .call0}.bdef\n/arcn{.svg(arcn)5 .call0}.bdef\n/closepath{.svg(closepath)0 .call}.bdef\n/currentpoint{.svg(cx)0 .call .svg(cy)0 .call}.bdef\n/curveto{.svg(curveto)6 .call0}.bdef\n/eofill{.svg(eofill)0 .call0}.bdef\n/fill{.svg(fill)0 .call0}.bdef\n/grestore{.svg(grestore)0 .call0}.bdef\n/gsave{.svg(gsave)0 .call0}.bdef\n/lineto{.svg(lineto)2 .call0}.bdef\n/moveto{.svg(moveto)2 .call0}.bdef\n/newpath{.svg(newpath)0 .call0}.bdef\n/rcurveto{.svg(rcurveto)6 .call0}.bdef\n/rlineto{.svg(rlineto)2 .call0}.bdef\n/rmoveto{.svg(rmoveto)2 .call0}.bdef\n/rotate{.svg(rotate)1 .call0}.bdef\n/scale{.svg(scale)2 .call0}.bdef\n/selectfont{.svg(selectfont)2 .call0}.bdef\n/setdash{.svg(setdash)2 .call0}.bdef\n/setlinewidth{.svg(setlinewidth)1 .call0}.bdef\n/setrgbcolor{.svg(setrgbcolor)3 .call0}.bdef\n/show{.svg(show)1 .call0}.bdef\n/stroke{.svg(stroke)0 .call0}.bdef\n/stringwidth{.svg(strw)1 .call 1}.bdef %fixme: height KO\n/translate{.svg(translate)2 .call0}.bdef\n\n/setgray{255 mul dup dup setrgbcolor}.bdef\n% abcm2ps syms.c\n/!{bind def}bind def\n/T/translate load def\n/M/moveto load def\n/RM/rmoveto load def\n/L/lineto load def\n/RL/rlineto load def\n/C/curveto load def\n/RC/rcurveto load def\n/SLW/setlinewidth load def\n/defl 0 def\n/dlw{0.7 SLW}!\n/xymove{/x 2 index def/y 1 index def M}!\n/showc{dup stringwidth pop .5 mul neg 0 RM show}!\n%\n% abcm2ps internal glyphs\n/arp{.svg(arp)3 .call0}.bdef\n/ltr{.svg(ltr)3 .call0}.bdef\n/ft0{(acc-1).svg(xygl)3 .call0}.bdef\n/nt0{(acc3).svg(xygl)3 .call0}.bdef\n/sh0{(acc1).svg(xygl)3 .call0}.bdef\n/dsh0{(acc2).svg(xygl)3 .call0}.bdef\n/trl{(trl).svg(xygl)3 .call0}.bdef\n/lmrd{(lmrd).svg(xygl)3 .call0}.bdef\n/turn{(turn).svg(xygl)3 .call0}.bdef\n/umrd{(umrd).svg(xygl)3 .call0}.bdef\n/y0{.svg(y0)1 .call}.bdef\n/y1{.svg(y1)1 .call}.bdef\n")}var abc=null,$ABC_UI=function(){"use strict";function $(e,t,n){return e.indexOf(t)!==-1?"":t+" "+n+"\n"}function J(e,t){e=e||{};if(e.zoom===undefined||e.zoom===null)e.zoom=1;if(e.pagewidth===undefined||e.pagewidth===null)e.pagewidth=p;var r=q+" s"+n+"\n";return n++,r+=$(t,"%%pagewidth",e.pagewidth.toString()+"cm"),r+=$(t,"%%staffwidth",e.pagewidth.toString()+"cm"),r+=$(t,"%%scale",e.zoom.toString()),r+=$(t,"%%topmargin","0px"),r+=$(t,"%%botmargin","0px"),r+=$(t,"%%leftmargin","16px"),r+=$(t,"%%rightmargin","8px"),r+=$(t,"%%topspace","0px"),r+=$(t,"%%musicspace","0px"),r+=$(t,"%%vocalspace","0px"),r+=$(t,"%%staffsep","0px"),r+=$(t,"%%sysstaffsep",".7cm"),r+=$(t,"%%vocalfont Time","13"),r}function K(e,t){var n=e.nextSibling.nextSibling;n!==null&&n.nodeName==="#text"&&(n=e.nextSibling.nextSibling);if(n!==null&&n!==undefined&&n.nodeName&&n.nodeName==="DIV"&&n.classList&&n.classList.contains(t))return n;n=e.cloneNode(!0);var r=n.classList;while(r.length>0)r.remove(r.item(0));return n.classList.add(t),e&&e.nextSibling&&e.nextSibling.nodeName=="#text"&&(e=e.nextSibling),e.parentNode.insertBefore(n,e.nextSibling),n}function Q(e,t){var n="",r={read_file:null,errmsg:function(e,t,n){},img_out:function(e){n+=e},page_format:!1},i=J(t,e)+X+V;abc=new Abc(r);try{abc.tosvg("edit",i),abc.tosvg("score.abc",e)}catch(s){var o="%c "+s.message+"\nabc2svg tosvg bug - stack:\n"+s.stack;console.log(o,"color: red;")}return n}function G(e,t){const n={beam:!0,slur:!0,tuplet:!0,deco:!0};var r="",i={read_file:null,errmsg:function(e,t,n){},img_out:function(e){r+=e},anno_start:null,anno_stop:function(e,r,i,s,o,u,a){if(n[e])return;isNaN(u)||(abc.out_svg('<rect class="'+C+" "+t.idScore+" "+r+'" x="'),abc.out_sxsy(s,'" y="',o),abc.out_svg('" width="'+u.toFixed(2)+'" height="'+a.toFixed(2)+'"/>\n'))}},s=J(t,e)+X+V;abc=new Abc(i);try{abc.tosvg("edit",s),abc.tosvg("follower.abc",e)}catch(o){var u="%c "+o.message+"\nabc2svg tosvg bug - stack:\n"+o.stack;console.log(u,"color: red;")}return r}function Y(e,t){if(t===undefined)return;var n=document.getElementById(e);if(n===undefined||n===null)return null;var r=t.indexOf(B,0)===-1,i={errmsg:function(e,t,n){console.log("%c "+e,"color: red;")},get_abcmodel:function(t,i,s,f){var l=i.length;for(var c=0;c<l;c++){var h=i[c],p=h.instr||0;h.midictl&&(h.midictl[32]&&(p+=h.midictl[32]*128),h.midictl[0]&&(p+=h.midictl[0]*128*128),p=128),u.indexOf(p)===-1&&(u.push(p),o=!1)}var d=0;if(r&&l>1){var v=!0;for(c=0;c<l;c++){var m=$ABC_UTIL.remapVoiceName(i[c],a);if($ABC_UTIL.isActiveVoice(m)){d++,v||n.appendChild(document.createElement("br")),v=!1;var g=document.createElement("input");g.type="checkbox",g.id=e+"_V"+c,g.classList.add(A),g.checked=!0,n.appendChild(g);var y=document.createElement("label");y.classList.add(N),y.appendChild(document.createTextNode(" "+m)),n.appendChild(y)}}}n.hidden=d<2}},s=I+"\n"+X;try{abc=new Abc(i),abc.tosvg("player",s),abc.tosvg("audio.abc",t)}catch(f){var l="%c "+f.message+"\nabc2svg tosvg bug - stack:\n"+f.stack;console.log(l,"color: red;")}}function Z(e,n,o){function ot(e){var t=st;e!==undefined&&(t=$ABC_UTIL.updateTempo(st,e));var n={events:$ABC_EVENTS.render(t,g,X),id:v};ut&&(ut.value=JSON.stringify(n));var r={idScore:v,zoom:o.scale,pagewidth:u};rt.innerHTML=$ABC_UTIL.svgMerge(Q(t,r),G(t,r))}if(e===undefined||e===null)return null;var u=parseFloat(e.classList[1]);isNaN(u)&&(u=p);var f=parseFloat(e.classList[2]);isNaN(f)||(o.scale=f),o=o||{};var l=n.indexOf(j,0)===-1&&n.indexOf(F,0)===-1;o.bPlayer===undefined&&(o.bPlayer=l),o.width===undefined&&(o.width=h),o.scale===undefined&&(o.scale=d),o.bHideTempo===undefined&&(o.bHideTempo=!0),o.lang===undefined&&(o.lang=a);var c=O+t,v=M+t,m=_+t,g=D+t,y=P+t;t++;var N=$ABC_UTIL.buildTempoSlider(n,m),C=K(e,b),H='<table id="'+c+'">',B='<div id="'+v+'"></div>';if(o.bPlayer){var I=n.indexOf(R,0)!==-1,q=n.indexOf(U,0)!==-1,z=n.indexOf(W,0)!==-1,V=!(I||q||z),$='<button id="'+y+'" class="'+k+'" value="80"></button>',J='<button id="'+m+'" class="'+w+'"></button>',Z='<div id="'+g+'" class="'+T+'"></div>',et="<div>"+N.html+"</div>";V?C.innerHTML=H+"<tr>"+'<td valign="center">'+"<table>"+'<tr><td align="center">'+$+J+et+"</td></tr>"+"<tr><td>"+Z+"</td></tr>"+"</table>"+"</td>"+"<td>"+B+"</td>"+"</tr><table>":z?C.innerHTML=H+"<tr>"+"<td>"+B+"</td>"+'<td valign="center">'+"<table>"+'<tr><td align="center">'+$+J+et+"</td></tr>"+"<tr><td>"+Z+"</td></tr>"+"</table>"+"</td>"+"</tr><table>":I?C.innerHTML=H+"<tr>"+'<td align="center">'+"<table>"+'<tr valign="center">'+'<td align="center">'+$+J+et+"</td>"+'<td width="10px"></td>'+"<td>"+Z+"</td>"+"</tr>"+"</table>"+"</td>"+"</tr>"+"<tr><td>"+B+"</td></tr>"+"<table>":q&&(C.innerHTML=H+"<tr><td>"+B+"</td></tr>"+"<tr>"+'<td align="center">'+"<table>"+'<tr valign="center">'+'<td align="center">'+$+J+et+"</td>"+'<td width="10px"></td>'+"<td>"+Z+"</td>"+"</tr>"+"</table>"+"</td>"+"</tr>"+"<table>")}else C.innerHTML=H+"<tr><td>"+B+"</td></tr><table>";var tt=document.getElementById(c),nt=document.getElementById(m),rt=document.getElementById(v),it=document.getElementById(y),st=$ABC_UTIL.normalize(n,o);if(o.bPlayer){var ut=document.getElementById(m);Y(g,st);var at=N.selection;it.value=at,ot(at);var ft="."+L,lt=tt.querySelectorAll(ft);for(var ct=0,ht=lt.length;ct<ht;ct++)lt[ct].addEventListener("click",function(){var e="."+m+"."+L+"."+E,t=parseInt(this.classList[2]),n=it?it.value:undefined;if(t==n)return;nt.classList.contains(S)&&($EVENT_PLAYER.stop(),nt.classList.toggle(S)),tt.querySelector(e).classList.toggle(E),this.classList.toggle(E),it&&(it.value=t),ot(t)});ft="."+A;var pt=tt.querySelectorAll(ft);for(ct=0,ht=pt.length;ct<ht;ct++)pt[ct].addEventListener("change",function(){nt.classList.contains(S)&&($EVENT_PLAYER.stop(),nt.classList.toggle(S));var e=it?it.value:undefined;e==="undefined"&&(e=undefined),ot(e)});r?ut.classList.contains(x)||ut.classList.add(x):ut.hidden=!r,ut.addEventListener("click",function(){if(this.classList.contains(x)){$EVENT_PLAYER.stop(),this.classList.toggle(S);if(this.classList.contains(S)){var e=document.querySelectorAll("."+w);for(var t=0,n=e.length;t<n;t++)e[t].classList.contains(S)&&e[t]!=ut&&e[t].classList.toggle(S);if(s!==null){var r=document.getElementsByClassName(s);for(t=0,n=r.length;t<n;t++)r[t].style.setProperty("fill-opacity",0)}i=ut;var o=JSON.parse(ut.value);s=o.id,$EVENT_PLAYER.play(0,1e6,o.events)}}})}else{var dt={idScore:v,zoom:o.scale,pagewidth:u};rt.innerHTML=$ABC_UTIL.svgMerge(Q(st,dt),G(st,dt))}}function et(e,t,n){n===undefined&&(n=!1),t=t||!1,e=e||c;var r="div."+y;n||(r+="."+v);var i=e[0]=="m",s=-1,o,u,a="";if(t===!0){var f=i?m:g;s=f;var l=r+"."+f,h=document.querySelectorAll(l);h.forEach(function(e){var t=K(e,b);t.hidden=!0}),f=i?g:m;var p=r+"."+f,d=document.querySelectorAll(p);d.forEach(function(e){var t=K(e,b);t.hidden=!1})}var w=document.querySelectorAll(r);for(o=0,u=w.length;o<u;o++){a="";var E="",S=w[o];if(s===-1||s!==-1&&!S.classList.contains(s)){var x=S.childNodes.length===0?"":S.childNodes[0].nodeValue,T=1,N=e,C=S.classList.contains(v);x.trim()===""?E=external_eval(S.id):S.id!==""?(T=parseFloat(x),isNaN(T)?(T=1,x.indexOf("\n")==-1?(x.charAt(0)!=="<"&&(N=x,C=!0,x.indexOf("m")!=-1?N="m"+x.replace("m",""):x.indexOf("M")==-1&&(N="M"+x)),E=external_eval(S.id)):E=x):E=external_eval(S.id)):E=x;var k={scale:T};C&&(k.transpose=N),Z(S,a+E,k)}}}function tt(e){var t=e||{};t.lang&&(a=t.lang),t.instruments&&t.instruments.length>0&&(u=t.instruments),et(t.tonality,t.bMajorOrMinor,!0),u.length===0&&!o&&u.push(0),u.length>0&&nt(u)}function nt(e){var t=e.length;$EVENT_PLAYER.init(e,function(){$EVENT_PLAYER.stop(),i.classList.contains(S)&&i.classList.toggle(S)},function(e,t){var n=document.getElementsByClassName(s+" "+e);if(n!==undefined&&n.length>0){var r=t?.2:0;n[0].style.setProperty("fill-opacity",r)}},function(e){t--;if(t===0){r=!0;var n=document.querySelectorAll("."+w);for(var i=0,s=n.length;i<s;i++)n[i].classList.toggle(x),n[i].hidden=!1}},function(e){console.warn("Failure loading Soundfont instrument "+e)})}var e={},t=0,n=0,r=!1,i=null,s="",o=!0,u=[],a="en";const f="C",l="M",c=l+f,h=600,p=16,d=1,v="transposable",m="major",g="minor",y="abc-source",b="abc-render",w="abc-player",E="selected",S="playing",x="ready",T="abc-voices",N="abc-voice",C="abc-follow",k="abc-hidden",L="abc-dot",A="check-voice",O="abc-container",M=b,_=w,D=T,P="abc-tempo",H="%%voicecombine",B="%%player_no_voice",j="%%no_player",F="%%player_off",I="%%play",q="%%fullsvg",R="%%player_top",U="%%player_bottom",z="%%player_left",W="%%player_right",X="%%deco red 10 @ 0 0 0\n%%deco blue 10 @ 0 0 0\n%%deco green 10 @ 0 0 0\n%%deco brown 10 @ 0 0 0\n%%deco orange 10 @ 0 0 0\n%%deco yellow 10 @ 0 0 0\n%%deco gray 10 @ 0 0 0\n%%deco cyan 10 @ 0 0 0\n%%deco coral 10 @ 0 0 0\n%%deco gold 10 @ 0 0 0\n%%deco khaki 10 @ 0 0 0\n%%deco indigo 10 @ 0 0 0\n%%deco lime 10 @ 0 0 0\n%%deco navy 10 @ 0 0 0\n%%deco orchid 10 @ 0 0 0\n%%deco pink 10 @ 0 0 0\n%%deco peru 10 @ 0 0 0\n%%deco plum 10 @ 0 0 0\n%%deco purple 10 @ 0 0 0\n%%deco tan 10 @ 0 0 0\n%%deco teal 10 @ 0 0 0\n%%deco o>( 1 arrow_orange 0 0 0\n%%deco o>) 1 arrow_orange 0 0 0\n%%deco r>( 1 arrow_red 0 0 0\n%%deco r>) 1 arrow_red 0 0 0\n%%deco g>( 1 arrow_green 0 0 0\n%%deco g>) 1 arrow_green 0 0 0\n%%deco b>( 1 arrow_blue 0 0 0\n%%deco b>) 1 arrow_blue 0 0 0\n%%deco n>( 1 arrow_black 0 0 0\n%%deco n>) 1 arrow_black 0 0 0\n%%deco ->( 1 arrow_gray 0 0 0\n%%deco ->) 1 arrow_gray 0 0 0\n",V='%%beginsvg\n<defs>\n <marker id="arrow_orange" fill="orange" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_red" fill="red" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_blue" fill="blue" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_green" fill="green" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_gray" fill="gray" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <marker id="arrow_black" fill="black" markerWidth="6" markerHeight="6" refX="6" refY="3" orient="auto"><path d="M1,1 L1,5 L6,3 L1,1"/></marker>\n <path id="x_notehead" d="m-3 -3l6 6m0 -6l-6 6" class="stroke" style="stroke-width:1.2"/>\n <path id="xcircle_notehead" d="m-3 -3 l6 6 m0 -6 l-6 6 M 0, 0 m -4, 0 a 4,4 0 1,0 8,0 a 4,4 0 1,0 -8,0" class="stroke" style="stroke-width:1.2"></path>\n <path id="triangle_notehead" d="M0 -5 L-4 4 H4 Z"/>\n <path id="square_notehead" d="M0 -4 L-4 0 L0 4 L4 0Z"/>\n</defs>\n%%endsvg\n%%beginjs\nvar dsx=12,dex=14;\nuser.arrow_red = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_red");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_red); color: red"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_green = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_green");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_green); color: green"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_blue = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_blue");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_blue); color: blue"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_orange = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_orange");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_orange); color: orange"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_gray = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_gray");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_gray); color: gray"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\nuser.arrow_black = function (x, y, de) {\n var de1 = de.start;\n def_use("arrow_black");\n abc.xypath(de1.s.x + dsx, de1.y + staff_tb[de1.st].y);\n var s = \'" stroke-width="1.5" style="marker-end: url(#arrow_black); color: black"/>\';\n abc.out_svg("L" + abc.sx(de.s.x - dex).toFixed(2) + " " + abc.sy(de.y + staff_tb[de.st].y).toFixed(2) + s);\n}\n%%endjs\n';return e.init=function(e){tt(e)},e.updateTonality=function(e,t){et(e,t)},e.buildScore=function(e,t,n){return Z(e,t,n)},e}(),$ABC_UTIL=function(){"use strict";function N(e){var t=!0;e.bEditors===!1&&(t=!1);var n=document.querySelectorAll(s);for(var i=0,o=n.length;i<o;i++){var u=n[i],a=u.innerHTML;a=a.replace(/&gt;/g,">");var f=I(a),l="";if(t){var c="?abc=",h=T.encode(f),p=encodeURI(m+c+h),d=encodeURI(g+c+h),y=B(a,{bStandard:!0,bKeepSpace:!0}),b=T.encode(y),w=encodeURI(v+c+b);l+="See in editors <a href='"+w+"' target='_blank'>abc2svg</a>, "+"<a href='"+p+"' target='_blank'>abc-ui</a>, "+"<a href='"+d+"' target='_blank'>dev.music</a>."}var E=u.classList.contains(r);E&&(f=k(f,e),l+="<pre class='abc-text'>"+f+"</pre>");var S=document.createElement("div");S.innerHTML=l;var x=u.parentNode;x.insertBefore(S,u)}}function C(e,t,n,r){r=r||{};var i=e,s;return t.forEach(function(e){r.bMacro?e="%%"+e:r.bDeco&&(e="!"+e+"!"),s='<span class="'+n+'">'+e+"</span>",e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=i.replace(new RegExp(e,"g"),s)}),i}function k(e,t){t=t||{};var n=e,r;if(t.bMacro){var i={bMacro:!0};n=C(n,y,"abc-macro",i),n=C(n,b,"abc-ui-macro",i),w.forEach(function(e){e="%%"+e;var t=n.indexOf(e);if(t!==-1){var r=n.indexOf("\n",t),i=n.substring(0,t),s=n.substring(t,r),o='<span class="abc-ui-macro">'+s+"</span>",u=n.substring(r,n.length);n=i+o+u}})}if(t.bDeco){var s={bDeco:!0};n=C(n,E,"abc-deco",s),n=C(n,S,"color-deco",s),n=C(n,x,"arrow-deco",s)}return n}function L(e,t,n,r){if(r!=undefined)return r+e[0];if(t===!0)return"="+e[0];if(n===!0)return e[0];var i=e;return e.indexOf("#")!==-1?i="^"+e[0]:e.indexOf("b")!==-1&&(i="_"+e[0]),i}function A(e,t){var n=t.substring(1,t.length),r=L(n);if(r==="C")return e;if(r.indexOf("B")!==-1||r.indexOf("A")!==-1)r+=",";var i=e,s=0,o;for(;;){s=i.indexOf("K:",s+1);if(s===-1)break;o=i.indexOf("\n",s+1);var u=i.substring(s,o),a=u+" shift=C"+r+"\n";if(o===-1)break;i=i.substring(0,s)+a+i.substring(o+1,i.length)}return i}function O(e){var t="",n=e.split("\n");for(var r=0,i=n.length;r<i;r++){var s=n[r].replace(/^\s+|\s+$/gm,"");s=s.replace(/\s+/g," "),s=s.replace(/^\t+|\t+$/gm,""),s!==""&&(t+=s+"\n")}return t}function M(e,t){t=t||"en";var n="",r="",i="",s="",u="",a="",f="",h="",d="",v="",m="",g="",y="",b="";return e.indexOf("+name")!==-1?(f=' name="'+p[t].soprano+'" sname="'+p[t].sopranoShort+'"',d=' name="'+p[t].alto+'" sname="'+p[t].altoShort+'"',m=' name="'+p[t].tenor+'" sname="'+p[t].tenorShort+'"',y=' name="'+p[t].bass+'" sname="'+p[t].bassShort+'"'):e.indexOf("+shortname")!==-1&&(f=' name="'+p[t].sopranoShort+'" sname="'+p[t].sopranoShort+'"',d=' name="'+p[t].altoShort+'" sname="'+p[t].altoShort+'"',m=' name="'+p[t].tenorShort+'" sname="'+p[t].tenorShort+'"',y=' name="'+p[t].bassShort+'" sname="'+p[t].bassShort+'"'),e.indexOf("T")!==-1?(a="clef=C1",h="clef=C3",v="clef=C4",g="clef=F4"):e.indexOf("G")!==-1?(a=l,h=l,v="clef=treble_8",g=c):(a=l,h=l,v="clef=C",g=c),e.indexOf("D")!==-1&&(s="V:D "+a+"\n",r+="D "),e.indexOf("C")!==-1&&(u="V:C "+a+"\n",r+="C "),e.indexOf("N")!==-1&&(b="V:N "+g+"\n",i+=" N"),n+=s+u+"V:S "+a+f+"\n"+"V:A "+h+d+"\n"+"V:T "+v+m+"\n"+"V:B "+g+y+"\n"+b+o+"[("+r+"S) | A | T | (B"+i+")]\n",n}function _(e){var t=e.indexOf("D")!==-1,n=e.indexOf("C")!==-1,r=e.indexOf("N")!==-1,i=e.indexOf("2+2")!==-1||e.indexOf("4")!==-1,s=e.indexOf("3+1")!==-1,u=e.indexOf("4+1")!==-1,a=e.indexOf("3+2")!==-1,f=e.indexOf("2+3")!==-1,h=e.indexOf("3+3")!==-1,p=e.indexOf("4+2")!==-1,d=e.indexOf("5+1")!==-1,v="",m="",g="";return t&&(v+="V:D "+l+"\n",m+="D "),n&&(v+="V:C "+l+"\n",m+="C "),r&&(v+="V:N "+c+"\n",g+=" N"),h?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+c+"\nV:5 "+c+"\nV:6 "+c+"\n"+o+" {("+m+"1 2 3)|(4 5 6"+g+")}\n":d?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+l+"\nV:5 "+l+"\nV:6 "+c+"\n"+o+" {("+m+"1 2 3 4 5)|(6"+g+")}\n":p?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+l+"\nV:5 "+c+"\nV:6 "+c+"\n"+o+" {("+m+"1 2 3 4)|(5 6"+g+")}\n":u?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+l+"\nV:5 "+c+"\n"+o+" {("+m+"1 2 3 4)|(5"+g+")}\n":a?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+l+"\nV:4 "+c+"\nV:5 "+c+"\n"+o+" {("+m+"1 2 3)|(4 5"+g+")}\n":f?v+="V:1 "+l+"\nV:2 "+l+"\nV:3 "+c+"\nV:4 "+c+"\nV:5 "+c+"\n"+o+" {("+m+"1 2)|(3 4 5"+g+")}\n":i?v+="V:S "+l+"\nV:A "+l+"\nV:T "+c+"\nV:B "+c+"\n"+o+" {("+m+"S A)|(T B"+g+")}\n":s?v+="V:S "+l+"\nV:A "+l+"\nV:T "+l+"\nV:B "+c+"\n"+o+" {("+m+"S A T)|(B"+g+")}\n":v+="V:KG "+l+"\nV:KF "+c+"\n"+o+" {("+m+"KG)|(KF"+g+")}\n",v}function D(e,t){var n,r,i,s=e.indexOf(a,0);if(s!==-1){n=e.indexOf("\n",s+1);if(n!==-1)return r=e.substring(s,n),i=_(r,t),e.indexOf("K:")===-1&&(i+="K:C\n"),e=e.substring(0,s)+i+e.substring(n+1,e.length),e}s=e.indexOf(f,0);if(s!==-1){n=e.indexOf("\n",s+1);if(n!==-1)return r=e.substring(s,n),i=M(r,t),e.indexOf("K:")===-1&&(i+="K:C\n"),e=e.substring(0,s)+i+e.substring(n+1,e.length),e}return e}function P(e){var t=undefined,n=[],r=e.indexOf(u,0);if(r!==-1){var i=e.indexOf("\n",r+1);if(i!==-1){r=e.indexOf("{",r+1)+1,i=e.indexOf("}",r);var s=e.substring(r,i);s=s.replace(/\s/g,"");var o=!1,a;r=0;do i=s.indexOf(",",r),i!==-1?a=s.substring(r,i):(a=s.substring(r,s.length),o=!0),a.trim(),a.indexOf("*")!==-1&&(t=a.replace(/\*/g,""),a=t),n.push(a),r=i+1;while(!o)}}return t===undefined&&(t=n[0]),{tempos:n,selection:t}}function H(e,t){var n=P(e);if(n.selection===undefined)return{html:"",selection:undefined};var r=n.tempos,i=parseInt(r[0]),s=parseInt(r[r.length-1]),o=4,u=9,a=(u-o)/(s-i),f=o-a*i,l='<div class=" + class_abc_tempo + ">';for(var c=0,h=r.length;c<h;c++){var p=parseInt(r[c]),d=Math.round(a*p+f),v=" dot"+d,m=r[c]===n.selection?" selected":"";l+='<span class="'+t+" abc-dot "+r[c]+m+v+'"></span>'}return l+="</div>",{html:l,selection:n.selection}}function B(e,t){t=t||{};var n=!1;t.bKeepSpace!==undefined&&t.bKeepSpace===!0&&(n=!0);var r=n?I(e):O(e),i=-1,s=-1;r.indexOf("X:")!==-1&&(i=r.indexOf("X:",0),i!==-1&&(s=r.indexOf("\n",i+1),s!==-1&&(r=r.substring(0,i)+r.substring(s+1,r.length))));var o="";t.bHideTempo!==undefined&&(t.bHideTempo===!0?(i=r.indexOf("Q:",0),i!==-1&&(o="%%writefields Q 0\n")):t.bHideTempo===!1&&(o="%%writefields Q 1\n"));var u=o+"X:1\n";r.indexOf("L:")===-1&&(u+="L:1/1\n"),r=u+D(r,t.lang),r.indexOf("K:")===-1&&(i=r.indexOf("\n",r.indexOf("L:"))+1,r=r.substring(0,i)+"K:C\n"+r.substring(i,r.length)),t.transpose&&(r=A(r,t.transpose));if(t.bStandard===!0){r=r.replace(/%%MIDI program 128/g,"%%MIDI channel 10"),r=r.replace(/%%no_player\n/g,""),r=r.replace(/%%player_no_voice\n/g,"");var a=S.concat(x);a.forEach(function(e){e="!"+e+"!";var t=" ".repeat(e.length);e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=r.replace(new RegExp(e,"g"),t)})}return q(r)}function j(e,t){var n=e,r="Q:1/4="+t+"\n",i=e.indexOf("X:1\n");return i!==-1&&(i+=4,n=e.substring(0,i)+r+e.substring(i,e.length)),n}function F(e,t){var n=e,r=e.indexOf(t);if(r!==-1){var i=e.indexOf("\n",r+1);if(i!==-1)return n=e.substring(0,r)+e.substring(i+1,e.length),F(n,t)}return n}function I(e){var t="",n=e.split("\n");for(var r=0,i=n.length;r<i;r++){var s=n[r].trim();s!==""&&(t+=s+"\n")}return q(t)}function q(e){var t=e.lastIndexOf("\n"),n=e.length;return t===n-1?e.substring(0,t):e}function R(e){var t="",n=e.split("\n");for(var r=0,i=n.length;r<i;r++){var s=n[r].trim();s=s.replace(/\s+/g," "),s!==""&&(t+=s+"\n")}return t}function U(e){var t=document.createElement("div");t.innerHTML=e;var n=t.querySelectorAll("style, defs, path, text, use");for(var r=0,i=n.length;r<i;r++){var s=n[r];s.parentNode.removeChild(s)}return R(t.innerHTML)}function z(e,t){var n=e.split(h),r=t.split(h),i=n.length,s=r.length;if(i!==s)return e;var o="";for(var u=0,a=i;u<a;u++){var f=n[u],l=U(r[u]),c=l.indexOf('<g class="music"');o+=f+l.substring(c,l.length)+h}return o}var e={};const t="abc-tempo",n="abc-source",r="view-source",i="view-editor",s="div."+n+"."+r+", div."+n+"."+i,o="%%score",u="%%tempo",a="%%piano",f="%%chorus",l="clef=treble",c="clef=bass",h="</svg>",p={en:{soprano:"Soprano",sopranoShort:"S",alto:"Alto",altoShort:"A",tenor:"Tenor",tenorShort:"T",bass:"Bass",bassShort:"B",KG:"G key",KGShort:"GK",KF:"F key",KFShort:"FG"},fr:{soprano:"Soprano",sopranoShort:"S",alto:"Alto",altoShort:"A",tenor:"Ténor",tenorShort:"T",bass:"Basse",bassShort:"B",KG:"Clé de sol",KGShort:"Sol",KF:"Clé de fa",KFShort:"Fa"}};var d="en";const v="../../../../editors/abc2svg/index.html",m="../../../../editors/abc_ui/index.html",g="http://dev.music.free.fr/editors/abc_ui/index.html",y=["scores","score","staves","keywarn","timewarn","stemheight","bstemdown","flatbeams","slurheight","squarebreve","voicecombine","singleline","dblrepbar","graceslurs","gracespace","graceword","stafflines","cancelkey","ambitus","straightflags","MIDI","voicemap","diagram","chordnames","measurenb","measurebox ","setbarnb","contbarnb","equalbars","barsperstaff","break","stretchlast","stretchstaff","leftmargin","pagewidth","soloffs","musicspace","shiftunison","textoption","begintext","endtext","center","infoline","aligncomposer","composerfont","composerspace","hyphencont","text","clef","pos","map","sth"],b=["no_player","player_off","player_no_voice","tempo"],w=["piano","chorus"],E=["beambr1","beambr2","ped","ped-up","ped(","ped)","1","2","3","4","5","/","//","///","-(","-)","roll","snap","thumb","open","+","0","breath","shortphrase","mediumphrase","longphrase","tenuto","wedge","accent","^","upbow","downbow","emphasis","marcato","arpeggio","mordent","uppermordent","lowermordent","trill","pralltriller","trill(","trill)","diminuendo(","diminuendo)","crescendo(","crescendo)","fermata","invertedfermata","D.C.","coda","D.S.","segno","fine","turn","turnx","invertedturn","invertedturnx","mf","f","ff","fff","ffff","mp","p","pp","ppp","pppp","8va(","8va)","8vb(","8vb)"],S=["red","blue","green","brown","orange","yellow","gray","cyan","coral","gold","khaki","indigo","lime","navy","orchid","pink","peru","plum","purple","tan","teal"],x=["o>(","o>)","b>(","b>)","g>(","g>)","r>(","r>)","n>(","n>)",">(",">)"];var T={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t},encode:function(e){var t,n,r,i,s,o,u,a="",f=0;for(e=T._utf8_encode(e);f<e.length;)i=(t=e.charCodeAt(f++))>>2,s=(3&t)<<4|(n=e.charCodeAt(f++))>>4,o=(15&n)<<2|(r=e.charCodeAt(f++))>>6,u=63&r,isNaN(n)?o=u=64:isNaN(r)&&(u=64),a=a+this._keyStr.charAt(i)+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u);return a}};return e.remapVoiceName=function(e,t){t=t||"en";const n={KG:p[t].KG,KF:p[t].KF,S:p[t].soprano,A:p[t].alto,T:p[t].tenor,B:p[t].bass};var r=e.id.toUpperCase();return e.nm?n[e.nm]?n[e.nm]:e.nm:n[r]?n[r]:e.id},e.isActiveVoice=function(e){const t=["D","C","N"];return t.indexOf(e.toUpperCase())===-1},e.updateTempo=function(e,t){return j(e,t)},e.buildTempoSlider=function(e,t){return H(e,t)},e.normalize=function(e,t){return B(e,t)},e.addHtmlVievers=function(e){return N(e)},e.remove=function(e,t){return F(e,t)},e.svgMerge=function(e,t){return z(e,t)},e}(),$ABC_EVENTS=function(){"use strict";function u(e){o&&console.log("$ABC_EVENTS."+e)}function a(){u("init"),t=null,n=0,r=0,i=0,s=0}function f(e,n,o){function L(e){const t=e.v;for(var n=0;n<10;n++)m[t].set(v,n*7);g[t].set(m[t])}function A(e){v=[0,0,0,0,0,0,0];switch(e.k_sf){case 7:v[6]=1;case 6:v[2]=1;case 5:v[5]=1;case 4:v[1]=1;case 3:v[4]=1;case 2:v[0]=1;case 1:v[3]=1;break;case-7:v[3]=-1;case-6:v[0]=-1;case-5:v[4]=-1;case-4:v[1]=-1;case-3:v[5]=-1;case-2:v[2]=-1;case-1:v[6]=-1}L(e)}function O(){for(var e=0;e<a;e++){var t=n[e].clef;y[e]=!t.clef_octave||t.clef_oct_transp?0:t.clef_octave;var r=n[e],i=r.instr||0;r.midictl&&(r.midictl[32]&&(i+=r.midictl[32]*128),r.midictl[0]&&(i+=r.midictl[0]*128*128)),b[e]=i,m[e]=new Float32Array(70),g[e]=new Float32Array(70),r.key.v=e,A(r.key)}}function M(e,t){var n=e.notes[t],r=n.pit+19-7,i=n.acc;y[e.v]&&(r+=y[e.v]),i?(i==3?i=0:n.micro_n&&(console.log("micro tone not supported"),i=(i<0?-n.micro_n:n.micro_n)/n.micro_d*2),d[r]=i):i=d[r];var s=r/7|0;return r=h[r%7]+i,r>=12?(r-=12,s++):r<0&&(r+=12,s--),c[r]+l[s]}function _(t){if(t.v!=w)return null;var n;if(t.bar_type[0]===":"){u("_handle_bar with ':|' or ':]'"),t.bar_type="|"+t.bar_type.slice(1),N=t,C||(C=t);if(T){t=T;for(n=0;n<a;n++)g[n].set(S[n]),y[n]=E[n];r=x}else t=e,O();return s=t.time,t}if(!t.invis)for(n=0;n<a;n++)g[n].set(m[n]);if(t.bar_type[t.bar_type.length-1]==":"){u("_handle_bar with '|:'"),T=t,C=null;for(n=0;n<a;n++)S||(S=[]),S[n]||(S[n]=new Float32Array(70)),S[n].set(g[n]),E||(E=[]),E[n]=y[n];x=r}else t.text&&t.text[0]=="1"&&(u("_handle_bar with 1st time repeat"),C=t);return null}function D(e,t,n){u("_do_tie");var i,s,o,a=e.time+e.dur,f=e.notes[t],l=f.pit;for(o=e.next;;o=o.next){if(!o||o.time!=a)return n;if(o==C){var c=o.v;o=N.ts_next;while(o&&o.v!==c)e=e.ts_next;if(!e)return n;a=o.time}if(o.time!=a)return n;if(o.type==abc2svg.C.NOTE)break}s=o.notes.length;for(i=0;i<s;i++){f=o.notes[i];if(f.pit==l)return n+=o.dur/r,f.ti2=!0,f.ti1?D(o,i,n):n}return n}function P(e,n,r){for(var i=0;i<=e.nhd;i++){var s=e.notes[i];if(s.ti2)continue;var a=!0;o&&(a=o.indexOf(e.v)===-1);if(a){s=M(e,i);var f=e.istart,l=e.notes[i].ti1?D(e,i,r):r,c=b[e.v];t.push([f,n,c,s,l]),u("add event: index="+f+", time="+n+", instrument="+c+", note='"+s+"', duration="+l)}}}function H(e){u("_gen_grace");var t=e.next;if(e.time==0&&s===0){var n=0;if(e.sappo)n=abc2svg.C.BLEN/16;else if(!t||t.type!=abc2svg.C.NOTE)n=k/2;s-=n}var o,a,l,c;if(e.sappo)c=f/16;else if((!t||t.type!=abc2svg.C.NOTE)&&e.prev&&e.prev.type==abc2svg.C.NOTE)c=e.prev.dur/2;else{t.ts_prev.ts_next=t.ts_next,t.ts_next.ts_prev=t.ts_prev;for(var h=t.ts_next;h;h=h.ts_next)if(h.time!=t.time){t.ts_next=h,t.ts_prev=h.ts_prev,t.ts_prev.ts_next=t,h.ts_prev=t;break}t.dots?t.dots==1?c=t.dur/3:c=t.dur*2/7:c=t.dur/2,t.time+=c,t.dur-=c}a=0;for(o=e.extra;o;o=o.next)o.type==abc2svg.C.NOTE&&a++;c/=a*r,l=i;for(o=e.extra;o;o=o.next){if(o.type!=abc2svg.C.NOTE)continue;P(o,l,c),l+=c}}const a=n.length,f=1536,l="012345678",c=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],h=[0,2,4,5,7,9,11];var p=e,d,v=[],m=[],g=[],y=[],b=[],w=null,E=null,S=null,x=null,T=null,N=null,C=null,k=null;O(),t?p.time<s&&(s=p.time):(t=[],s=i=0,r=f/4*80/60);while(p){if(p.tempo){var B=0;for(var j=0,F=p.tempo_notes.length;j<F;j++)B+=p.tempo_notes[j];r=B*p.tempo/60}var I=p.time-s;I>0&&(i+=I/r,s=p.time),p==C&&(p=N,s=p.time),d=g[p.v];switch(p.type){case abc2svg.C.BAR:var q=_(p);q!==null&&(p=q);break;case abc2svg.C.CLEF:y[p.v]=!p.clef_octave||p.clef_oct_transp?0:p.clef_octave;break;case abc2svg.C.GRACE:H(p);break;case abc2svg.C.KEY:A(p);break;case abc2svg.C.REST:case abc2svg.C.NOTE:k=p.dur;var R=p.next;if(R&&R.type===abc2svg.C.GRACE){I=0;if(R.sappo)I=abc2svg.C.BLEN/16;else if(!R.next||R.next.type!==abc2svg.C.NOTE)I=k/2;R.time-=I,k-=I}k/=r,p.type==abc2svg.C.NOTE?P(p,i,k):t.push([p.istart,i,-1,0,k]);break;case abc2svg.C.STAVES:w=p.sy.top_voice}p=p.ts_next}}function l(e,n,r){if(e===undefined)return;var i="",s={errmsg:function(e,t,n){console.log("%c "+e,"color: red;")},get_abcmodel:function(e,t){const r=t.length;if(r!==1)for(var s=0;s<r;s++){var o=n+"_V"+s,a=document.getElementById(o);if(a===undefined||a!==null&&a.checked===!1)i+=s+" "}u("voice_no_play="+i),f(e,t,i)}},o=$ABC_UTIL.remove(e,"%%voicecombine");a();var l="%%play\n"+r;try{abc=new Abc(s),abc.tosvg("play",l),abc.tosvg("follower.abc",o)}catch(c){var h="%c "+c.message+"\nabc2svg tosvg bug - stack:\n"+c.stack;console.log(h,"color: red;")}return t}var e={},t=null,n=0,r=0,i=0,s=0;const o=!1;return e.render=function(e,t,n){return u("render"),l(e,t,n)},e}(),$EVENT_PLAYER=function(){"use strict";function p(e){c&&console.log("$EVENT_PLAYER."+e)}function d(e,t,r){n[e]&&(p("_playNote("+e+", '"+t+"', "+r+")"),n[e].play(t,l,{duration:r}))}function v(){var e,n,c,p;if(u===0){r&&r();return}c=s[o++];if(!c||c[0]>u){r&&r();return}n=c[1]-a;for(;;){var m=c[2],g=c[3],y=c[4];d(m,g,y);if(i){var b=c[0],w=(c[1]+f-t.currentTime)*h,E=w+y*h;setTimeout(i,w,b,!0),setTimeout(i,E,b,!1)}p=s[o];if(!p){e=n+y;break}c=p,e=c[1]-a;if(e!=n)break;o++}l+=e-n,setTimeout(v,(l-t.currentTime-1)*h)}function m(e,n,i){p("_play("+e+", "+n+")"),s=i;if(!s||!s.length){r&&r();return}o=0,u=n,a=0;while(s[o]&&o<e&&e!=0)a=s[o][1],o++;s[o]&&(l=t.currentTime+s[o][1]-a),f=t.currentTime+.05,v()}function g(){return p("_stop() at index="+o),u=0,a=0,o}function y(e,s,o,u,a){r=s,i=o;if("AudioContext"in window)console.log("%cSound being generated with window.AudioContext.","color: green;"),t=new window.AudioContext;else{if(!("webkitAudioContext"in window)){alert("Web Audio API is not available!\nCan't generate sound!");return}console.log("%cSound being generated with window.webkitAudioContext.","color: green;"),t=new window.webkitAudioContext}if(t===null&&a){a("Web Audio API is not available!");return}$SF_PLAYER.init(t,e,function(e){n[e.index]=e,u&&u(e)},function(e){a&&a(e)})}var e={},t=null,n={},r=null,i=null,s=null,o=0,u=0,a=0,f=0,l=0;const c=!1,h=1e3;return e.init=function(e,t,n,r,i){p("init"),y(e,t,n,r,i)},e.play=function(e,t,n){p("play"),m(e,t,n)},e.stop=function(){return p("stop"),g()},e.playNote=function(e,t,n){p("playNote"),d(e,t,n)},e}();if(typeof MIDI=="undefined")var MIDI={};typeof MIDI.Soundfont=="undefined"&&(MIDI.Soundfont={});var $SF_PLAYER=function(){"use strict";function i(e,n){t&&console.log("$SF_PLAYER."+e)}function s(e,t){n&&console.log("$SF_PLAYER - "+e,t)}function o(e,t,n,r){i("_load");var s=null;l(t)?s=c:w(t)?s=E:h(t)?s=p:y(t)?s=b:u(t)&&(s=a);var o=n||{};return s?s(e,t,o):r?Promise.resolve(r):Promise.reject("Source not valid ("+t+")")}function a(e,t,n){i("_loadMidiJSFile");var r=g(n.from,t);return o(e,o.fetch(r,"text").then(f),n)}function f(e){i("_midiJsToJson");var t=e.indexOf("MIDI.Soundfont.");if(t<0)throw Error("Invalid MIDI.js Soundfont format");t=e.indexOf("=",t)+2;var n=e.lastIndexOf(",");return JSON.parse(e.slice(t,n)+"}")}function l(e){return e instanceof ArrayBuffer}function c(e,t,n){return i("_loadArrayBuffer"),new Promise(function(n,r){e.decodeAudioData(t,function(e){n(e)},function(){r("Can't decode audio data ("+t.slice(0,30)+"...)")})})}function h(e){return e&&typeof e=="object"}function p(e,t,n){i("_loadObjectData");var r="",s={},u=Object.keys(t).map(function(i){if(n.only&&n.only.indexOf(i)===-1)return null;r+=i+", ";var u=t[i];return o(e,u,n,u).then(function(e){s[i]=e})});return Promise.all(u).then(function(){return i(r),s})}function d(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0}function v(e,t){var n=e.replace(/[^A-Za-z0-9\+\/]/g,""),r=n.length,i=t?Math.ceil((r*3+1>>2)/t)*t:r*3+1>>2,s=new Uint8Array(i);for(var o,u,a=0,f=0,l=0;l<r;l++){u=l&3,a|=d(n.charCodeAt(l))<<18-6*u;if(u===3||r-l===1){for(o=0;o<3&&f<i;o++,f++)s[f]=a>>>(16>>>o&24)&255;a=0}}return s}function m(e){return function(t){return typeof t=="string"&&e.test(t)}}function g(e,t){return typeof e=="string"?e+t:typeof e=="function"?e(t):t}function b(e,t,n){i("_loadBase64Audio");var r=t.indexOf(",");return o(e,v(t.slice(r+1)).buffer,n)}function w(e){return e&&typeof e.then=="function"}function E(e,t,n){return i("_loadPromise"),t.then(function(t){return o(e,t,n)})}function S(e){i("ADSR");var t=e.createGain(),n=t._voltage=N(e),r=C(n),s=C(n),o=C(n);return t._startAmount=C(s),t._endAmount=C(o),t._multiplier=C(r),t._multiplier.connect(t),t._startAmount.connect(t),t._endAmount.connect(t),t.value=r.gain,t.startValue=s.gain,t.endValue=o.gain,t.startValue.value=0,t.endValue.value=0,Object.defineProperties(t,x),t}function N(e){i("getVoltage");var t=e.createBufferSource(),n=e.createBuffer(1,2,e.sampleRate);return n.getChannelData(0).set(T),t.buffer=n,t.loop=!0,t}function C(e){i("scale");var t=e.context.createGain();return e.connect(t),t}function k(e){return Math.log(e+1)/Math.log(100)}function L(e,t,n,r,i){var s=t-e,o=r-n,u=i-n,a=u/o,f=e+a*s;return f<=e&&(f=e),f>=t&&(f=t),f}function M(e,t,n){function f(t,n){return n.id=i++,s[n.id]=n,n.source.onended=function(){var t=e.currentTime;n.source.disconnect(),n.env.disconnect(),n.disconnect(),a.emit("ended",t,n.id,n)},n.id}function l(t,n,r){var i=e.createGain();return i.gain.value=0,i.connect(o),i.env=P(e,r,u),i.env.connect(i.gain),i.source=e.createBufferSource(),i.source.buffer=n,i.source.connect(i),i.source.loop=r.loop||u.loop,i.source.playbackRate.value=H(r.cents||u.cents),i.source.loopStart=r.loopStart||u.loopStart,i.source.loopEnd=r.loopEnd||u.loopEnd,i.stop=function(n){var r=n||e.currentTime;a.emit("stop",r,t);var s=i.env.stop(r);i.source.stop(s)},i}var r=!1,i=0,s={},o=e.createGain(),u=Object.assign({},O,n),a={context:e,out:o,opts:u};return t instanceof AudioBuffer?a.buffer=t:a.buffers=t,a.start=function(t,n,i){if(a.buffer&&t!==null)return a.start(null,t,n);var s=t?a.buffers[t]:a.buffer;if(!s){console.warn("Buffer "+t+" not found.");return}if(!r){console.warn("SamplePlayer not connected to any node.");return}var o=i||A;n=Math.max(e.currentTime,n||0),a.emit("start",n,t,o);var u=l(t,s,o);return u.id=f(t,u),u.env.start(n),u.source.start(n),a.emit("started",n,u.id,u),o.duration&&u.stop(n+o.duration),u},a.play=function(e,t,n){return a.start(e,t,n)},a.stop=function(e,t){var n;return t=t||Object.keys(s),t.map(function(t){return n=s[t],n?(n.stop(e),n.id):null})},a.connect=function(e){return r=!0,o.connect(e),a},a.emit=function(e,t,n,r){a.onevent&&a.onevent(e,t,n,r);var i=a["on"+e];i&&i(t,n,r)},a}function _(e){return typeof e=="number"}function P(e,t,n){i("envelope");var r=S(e),s=t.adsr||n.adsr;return D.forEach(function(e,i){s?r[e]=s[i]:r[e]=t[e]||n[e]}),r.value.value=_(t.gain)?t.gain:_(n.gain)?n.gain:1,r}function H(e){return e?Math.pow(2,e/1200):1}function B(e){return/\.js(\?.*)?$/i.test(e)}function j(e,t,n){return n=n==="ogg"?n:"mp3",t=t==="FluidR3_GM"?t:"MusyngKite","https://gleitz.github.io/midi-js-soundfonts/"+t+"/"+e+"-"+n+".js"}function F(e){return r.indexOf(e)}function I(e,t,n){var r=n||{};s("_initInstrument",t);if(MIDI.Soundfont[t])return s("Already loaded, decode Soundfont ",t),o(e,MIDI.Soundfont[t],{only:r.only||r.notes}).then(function(n){var i=M(e,n,r).connect(e.destination);return i.name=t,i.index=F(t),i});var i=r.isSoundfontURL||B,u=r.nameToUrl||j,a=i(t)?t:u(t,r.soundfont,r.format);return o(e,a,{only:r.only||r.notes}).then(function(n){s("Load and decode ",a);var i=M(e,n,r).connect(e.destination);return i.url=a,i.name=t,i.index=F(t),i})}function q(e){function t(e){var t=[];for(var n=0,r=e.length;n<r;n++){var i=-1;typeof e[n]=="number"?i=e[n]:typeof e[n]=="string"&&(i=F(e[n])),i<=128&&i!=-1&&t.push(i)}return t}function n(e){return e.sort().filter(function(e,t,n){return!t||e!=n[t-1]})}return n(t(e))}var e={};const t=!1,n=!1,r=["acoustic_grand_piano","bright_acoustic_piano","electric_grand_piano","honky-tonk_piano","electric_piano_1","electric_piano_2","harpsichord","clavinet","celesta","glockenspiel","music_box","vibraphone","marimba","xylophone","tubular_bells","dulcimer","drawbar_organ","percussive_organ","rock_organ","church_organ","reed_organ","accordion","harmonica","tango_accordion","acoustic_guitar_nylon","acoustic_guitar_steel","electric_guitar_jazz","electric_guitar_clean","electric_guitar_muted","overdriven_guitar","distortion_guitar","guitar_harmonics","acoustic_bass","electric_bass_finger","electric_bass_pick","fretless_bass","slap_bass_1","slap_bass_2","synth_bass_1","synth_bass_2","violin","viola","cello","contrabass","tremolo_strings","pizzicato_strings","orchestral_harp","timpani","string_ensemble_1","string_ensemble_2","synth_strings_1","synth_strings_2","choir_aahs","voice_oohs","synth_choir","orchestra_hit","trumpet","trombone","tuba","muted_trumpet","french_horn","brass_section","synth_brass_1","synth_brass_2","soprano_sax","alto_sax","tenor_sax","baritone_sax","oboe","english_horn","bassoon","clarinet","piccolo","flute","recorder","pan_flute","blown_bottle","shakuhachi","whistle","ocarina","lead_1_square","lead_2_sawtooth","lead_3_calliope","lead_4_chiff","lead_5_charang","lead_6_voice","lead_7_fifths","lead_8_bass__lead","pad_1_new_age","pad_2_warm","pad_3_polysynth","pad_4_choir","pad_5_bowed","pad_6_metallic","pad_7_halo","pad_8_sweep","fx_1_rain","fx_2_soundtrack","fx_3_crystal","fx_4_atmosphere","fx_5_brightness","fx_6_goblins","fx_7_echoes","fx_8_sci-fi","sitar","banjo","shamisen","koto","kalimba","bagpipe","fiddle","shanai","tinkle_bell","agogo","steel_drums","woodblock","taiko_drum","melodic_tom","synth_drum","reverse_cymbal","guitar_fret_noise","breath_noise","seashore","bird_tweet","telephone_ring","helicopter","applause","gunshot","percussion"];o.fetch=function(e,t){return i("_load.fetch"),new Promise(function(n,r){var i=new XMLHttpRequest;t&&(i.responseType=t),i.open("GET",e),i.onload=function(){i.status===200?n(i.response):r(Error(i.statusText))},i.onerror=function(){r(Error("Network Error"))},i.send()})};var u=m(/\.js(\?.*)?$/i),y=m(/^data:audio/),x={attack:{value:0,writable:!0},decay:{value:0,writable:!0},sustain:{value:1,writable:!0},release:{value:0,writable:!0},getReleaseDuration:{value:function(){return this.release}},start:{value:function(e){i("start");var t=this._multiplier.gain,n=this._startAmount.gain,r=this._endAmount.gain;this._voltage.start(e),this._decayFrom=this._decayFrom=e+this.attack,this._startedAt=e;var s=this.sustain;t.cancelScheduledValues(e),n.cancelScheduledValues(e),r.cancelScheduledValues(e),r.setValueAtTime(0,e),this.attack?(t.setValueAtTime(0,e),t.linearRampToValueAtTime(1,e+this.attack),n.setValueAtTime(1,e),n.linearRampToValueAtTime(0,e+this.attack)):(t.setValueAtTime(1,e),n.setValueAtTime(0,e)),this.decay&&t.setTargetAtTime(s,this._decayFrom,k(this.decay))}},stop:{value:function(e,t){i("stop"),t&&(e-=this.release);var n=e+this.release;if(this.release){var r=this._multiplier.gain,s=this._startAmount.gain,o=this._endAmount.gain;r.cancelScheduledValues(e),s.cancelScheduledValues(e),o.cancelScheduledValues(e);var u=k(this.release);if(this.attack&&e<this._decayFrom){var a=L(0,1,this._startedAt,this._decayFrom,e);r.linearRampToValueAtTime(a,e),s.linearRampToValueAtTime(1-a,e),s.setTargetAtTime(0,e,u)}o.setTargetAtTime(1,e,u),r.setTargetAtTime(0,e,u)}return this._voltage.stop(n),n}},onended:{get:function(){return this._voltage.onended},set:function(e){this._voltage.onended=e}}},T=new Float32Array([1,1]),A={},O={gain:1,attack:.01,decay:.1,sustain:.9,release:.3,loop:!1,cents:0,loopStart:0,loopEnd:0},D=["attack","decay","sustain","release"];return e.init=function(e,t,n,i,o){if(typeof u=="undefined")var u={};typeof u.Soundfont=="undefined"&&(u.Soundfont={}),t=q(t);var a=t.length;s(a,"instrument(s) to initialize.");for(var f=0;f<a;f++){var l=t[f],c=r[l];s("#"+l,c),I(e,c).then(function(e){console.log('%cSoundfont instrument "'+e.name+'" loaded. (MIDI program '+e.index+")","color: green;"),n&&n(e)},function(e){i&&i(e)})}},e}();abc2svg={C:{BLEN:1536,BAR:0,CLEF:1,CUSTOS:2,GRACE:4,KEY:5,METER:6,MREST:7,NOTE:8,PART:9,REST:10,SPACE:11,STAVES:12,STBRK:13,TEMPO:14,BLOCK:16,REMARK:17,FULL:0,EMPTY:1,OVAL:2,OVALBARS:3,SQUARE:4,SL_ABOVE:1,SL_BELOW:2,SL_AUTO:3,SL_HIDDEN:4,SL_DOTTED:8},Abc:function(user){"use strict";function clone(e,t){if(!e)return e;var n=new e.constructor;for(var r in e)e.hasOwnProperty(r)&&(t&&typeof e[r]=="object"?n[r]=clone(e[r],t-1):n[r]=e[r]);return n}function errbld(e,t,n,r){var i,s,o,u,a;if(user.errbld){switch(e){case 0:e="warn";break;case 1:e="error";break;default:e="fatal"}user.errbld(e,t,n,r);return}if(r!=undefined&&r>=0){i=o=0;for(;;){s=parse.file.indexOf("\n",i);if(s<0||s>r)break;o++,i=s+1}u=r-i}a="",n&&(a=n,o&&(a+=":"+(o+1)+":"+(u+1)),a+=" ");switch(e){case 0:a+="Warning: ";break;case 1:a+="Error: ";break;default:a+="Internal bug: "}user.errmsg(a+t,o,u)}function error(e,t,n,r,i,s,o){var u,a,f,l;user.textrans&&(l=user.textrans[n],l&&(n=l)),arguments.length>3&&(n=n.replace(/\$./g,function(e){switch(e){case"$1":return r;case"$2":return i;case"$3":return s;default:return o}})),t&&t.fname?errbld(e,n,t.fname,t.istart):errbld(e,n)}function scanBuf(){this.index=0,scanBuf.prototype.char=function(){return this.buffer[this.index]},scanBuf.prototype.next_char=function(){return this.buffer[++this.index]},scanBuf.prototype.get_int=function(){var e=0,t=this.buffer[this.index];while(t>="0"&&t<="9")e=e*10+Number(t),t=this.next_char();return e}}function syntax(e,t,n,r,i,s){var o={fname:parse.fname,istart:parse.istart+parse.line.index};error(e,o,t,n,r,i,s)}function js_inject(js){/eval *\(|Function|setTimeout|setInterval/.test(js)?syntax(1,"Unsecure code"):eval('"use strict"\n'+js)}function y_get(e,t,n,r){var i,s=staff_tb[e],o=n/realwidth*YSTEP|0,u=(n+r)/realwidth*YSTEP|0;o<0&&(o=0),u>=YSTEP&&(u=YSTEP-1,o>u&&(o=u));if(t){i=s.top[o++];while(o<=u)i<s.top[o]&&(i=s.top[o]),o++}else{i=s.bot[o++];while(o<=u)i>s.bot[o]&&(i=s.bot[o]),o++}return i}function y_set(e,t,n,r,i){var s=staff_tb[e],o=n/realwidth*YSTEP|0,u=(n+r)/realwidth*YSTEP|0;o<0&&(o=0),u>=YSTEP&&(u=YSTEP-1,o>u&&(o=u));if(t)while(o<=u)s.top[o]<i&&(s.top[o]=i),o++;else while(o<=u)s.bot[o]>i&&(s.bot[o]=i),o++}function up_p(e,t){switch(t){case C.SL_ABOVE:return!0;case C.SL_BELOW:return!1}return e.multi&&e.multi!=0?e.multi>0:e.p_v.have_ly?e.pos.voc!=C.SL_ABOVE:!1}function d_arp(e){var t,n,r,i=e.s,s=e.dd,o=5;if(i.type==C.NOTE)for(t=0;t<=i.nhd;t++){if(i.notes[t].acc)r=5+i.notes[t].shac;else{r=6-i.notes[t].shhd;switch(i.head){case C.SQUARE:r+=3.5;break;case C.OVALBARS:case C.OVAL:r+=2}}r>o&&(o=r)}n=3*(i.notes[i.nhd].pit-i.notes[0].pit)+4,t=s.h,n<t&&(n=t),e.has_val=!0,e.val=n,e.x-=o,e.y=3*(i.notes[0].pit-18)-3}function d_cresc(e){if(e.ldst)return;var t,n,r,i,s,o,u,a,f=e.s,l=e.start,c,h;t=l.s,s=t.x+3,a=l.ix,a>0&&(c=a_de[a-1]),e.st=f.st,e.lden=!1,e.has_val=!0,i=up_p(f,f.pos.dyn),i&&(e.up=!0),c&&c.s==t&&(e.up&&!c.up||!e.up&&c.up)&&(r=c.dd,f_staff[r.func]&&(u=c.x+c.val+4,u>s&&(s=u))),e.defl.noen?(o=e.x-s,o<20&&(s=e.x-20-3,o=20)):(u=f.x,h=a_de[e.ix+1],h&&h.s==t&&(e.up&&!h.up||!e.up&&h.up)&&(r=h.dd,f_staff[r.func]&&(u-=5)),o=u-s-4,o<20&&(s-=(20-o)*.5,o=20)),e.val=o,e.x=s,e.y=y_get(e.st,i,s,o),i||(n=e.dd,e.y-=n.h)}function d_near(e){var t,n,r=e.s,i=e.dd;if(i.str)return;r.multi?n=r.multi>0:n=r.stem<0,n?t=r.ymx|0:t=r.ymn-i.h|0,t>-6&&t<24&&(n&&(t+=3),t=((t+6)/6|0)*6-6),n?r.ymx=t+i.h:r.ymn=t,e.y=t,r.type==C.NOTE&&(e.x+=r.notes[r.stem>=0?0:r.nhd].shhd),i.name[0]=="d"&&r.nflags>=-1&&(n?r.stem>0&&(e.x+=3.5):r.stem<0&&(e.x-=3.5))}function d_pf(e){var t,n,r,i,s=e.s,o=e.dd,u;e.val=o.wl+o.wr,i=up_p(s,s.pos.vol),i&&(e.up=!0),r=s.x-o.wl,e.ix>0&&(u=a_de[e.ix-1],u.s==s&&(e.up&&!u.up||!e.up&&u.up)&&(t=u.dd,f_staff[t.func]&&(n=u.x+u.val+4,n>r&&(r=n)))),e.x=r,e.y=y_get(s.st,i,r,e.val),i||(e.y-=o.h)}function d_slide(e){var t,n,r=e.s,i=r.notes[0].pit,s=5;for(t=0;t<=r.nhd;t++){if(r.notes[t].acc)n=4+r.notes[t].shac;else{n=5-r.notes[t].shhd;switch(r.head){case C.SQUARE:n+=3.5;break;case C.OVALBARS:case C.OVAL:n+=2}}r.notes[t].pit<=i+3&&n>s&&(s=n)}e.x-=s,e.y=3*(i-18)}function d_trill(e){if(e.ldst)return;var t,n,r,i,s,o=e.s,u=o.st,a=e.start.s,f=a.x;e.prev&&(f=e.prev.x+10,r=e.prev.y),e.st=u;if(e.dd.func!=4)switch(e.dd.glyph){case"8va":case"15ma":n=1;break;default:n=o.multi>=0}e.defl.noen?(i=e.x-f,i<20&&(f=e.x-20-3,i=20)):(i=o.x-f-6,o.type==C.NOTE&&(i-=6),i<20&&(f-=(20-i)*.5,i=20)),t=e.dd,r||(r=y_get(u,n,f,i)),n?(s=staff_tb[a.st].topbar+2,r<s&&(r=s)):(r-=t.h,s=staff_tb[a.st].botbar-2,r>s&&(r=s)),e.lden=!1,e.has_val=!0,e.val=i,e.x=f,e.y=r,n&&(r+=t.h),y_set(u,n,f,i,r),n?a.ymx=o.ymx=r:a.ymn=o.ymn=r}function d_upstaff(e){if(e.ldst)return;if(e.start){d_trill(e);return}var t,n,r,i=e.s,s=e.dd,o=i.x,u=s.wl+s.wr,a=staff_tb[i.st].topbar+2,f=staff_tb[i.st].botbar-2;i.nhd&&(o+=i.notes[i.stem>=0?0:i.nhd].shhd),n=-1;if(s.func==4)n=0;else if(i.pos)switch(i.pos.orn){case C.SL_ABOVE:n=1;break;case C.SL_BELOW:n=0}switch(s.glyph){case"accent":case"roll":!n||n<0&&(i.multi<0||!i.multi&&i.stem>0)?(t=y_get(i.st,!1,i.x-s.wl,u)-2,t>f&&(t=f),t-=s.h,y_set(i.st,!1,i.x,0,t),r=!0,i.ymn=t):(t=y_get(i.st,!0,i.x-s.wl,u)+2,t<a&&(t=a),y_set(i.st,!0,i.x-s.wl,u,t+s.h),i.ymx=t+s.h);break;case"brth":case"lphr":case"mphr":case"sphr":t=a+1,s.glyph=="brth"&&t<i.ymx&&(t=i.ymx);for(i=i.ts_next;i;i=i.ts_next)if(i.seqst)break;o+=((i?i.x:realwidth)-o)*.45;break;default:s.name.indexOf("invert")==0&&(r=!0),s.name!="invertedfermata"&&(n>0||n<0&&i.multi>=0)?(t=y_get(i.st,!0,i.x-s.wl,u)+2,t<a&&(t=a),y_set(i.st,!0,i.x-s.wl,u,t+s.h),i.ymx=t+s.h):(t=y_get(i.st,!1,i.x-s.wl,u)-2,t>f&&(t=f),t-=s.h,y_set(i.st,!1,i.x-s.wl,u,t),s.name=="fermata"&&(r=!0),i.ymn=t)}r&&(t+=s.h,e.inv=!0),e.x=o,e.y=t}function deco_add(e){var t=e.match(/(\S*)\s+(.*)/);decos[t[1]]=t[2]}function deco_def(e){var t,n,r,i,s,o,u,a,f=decos[e];if(!f){cfmt.decoerr&&error(1,null,"Unknown decoration '$1'",e);return}t=f.match(/(\d+)\s+(.+?)\s+([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)/);if(!t){error(1,null,"Invalid decoration '$1'",e);return}var l=Number(t[1]),c=parseFloat(t[3]),h=parseFloat(t[4]),p=parseFloat(t[5]);if(isNaN(l)){error(1,null,"%%deco: bad C function value '$1'",t[1]);return}if((l<0||l>10)&&(l<32||l>41)){error(1,null,"%%deco: bad C function index '$1'",l);return}if(c<0||h<0||p<0){error(1,null,"%%deco: cannot have a negative value '$1'",f);return}if(c>50||h>80||p>80){error(1,null,"%%deco: abnormal h/wl/wr value '$1'",f);return}n=dd_tb[e],n||(n={name:e},dd_tb[e]=n),n.func=n.name.indexOf("head-")==0?9:l,n.glyph=t[2],n.h=c,n.wl=h,n.wr=p,a=f.replace(t[0],"").trim(),a&&(a[0]=='"'&&(a=a.slice(1,-1)),n.str=a),n.func==6&&n.str==undefined&&(n.str=n.name),s=n.name.slice(-1);if(s=="("||s==")"&&n.name.indexOf("(")<0){i=n.name.slice(0,-1)+(s=="("?")":"("),r=dd_tb[i];if(r)s=="("?(n.dd_en=r,r.dd_st=n):(n.dd_st=r,r.dd_en=n);else{r=deco_def(i);if(!r)return}}return n}function deco_cnv(e,t,n){var r,i,s,o,u,a=e.length;for(r=0;r<a;r++){o=e[r],s=dd_tb[o];if(!s){s=deco_def(o);if(!s)continue}switch(s.func){case 0:if(t.type==C.BAR&&s.name=="dot"){t.bar_dotted=!0;break};case 1:case 2:if(!t.notes){error(1,t,errs.must_note_rest,s.name);continue}break;case 8:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}u=t.notes[t.nhd],u.a_dcn||(u.a_dcn=[]),u.a_dcn.push(s.name);continue;case 9:if(!t.notes){error(1,t,errs.must_note_rest,s.name);continue}for(i=0;i<=t.nhd;i++)u=t.notes[i],u.a_dcn||(u.a_dcn=[]),u.a_dcn.push(s.name);continue;default:break;case 10:if(t.notes)for(i=0;i<=t.nhd;i++)t.notes[i].color=s.name;else t.color=s.name;continue;case 32:t.invis=!0;continue;case 33:if(t.type!=C.BAR){error(1,t,"!beamon! must be on a bar");continue}t.beam_on=!0;continue;case 34:if(t.type!=C.NOTE||!n||n.type!=C.NOTE||t.nflags!=n.nflags){error(1,t,"!$1! must be on the last of a couple of notes",s.name);continue}t.trem2=!0,t.beam_end=!0,n.trem2=!0,n.beam_st=!0,t.ntrem=n.ntrem=Number(s.name[4]),n.nflags=--t.nflags,n.head=++t.head,t.nflags>0?t.nflags+=t.ntrem:(t.nflags<=-2&&(t.stemless=!0,n.stemless=!0),t.nflags=t.ntrem),n.nflags=t.nflags;for(i=0;i<=t.nhd;i++)t.notes[i].dur*=2;for(i=0;i<=n.nhd;i++)n.notes[i].dur*=2;continue;case 35:if(t.type!=C.NOTE){error(1,t,"!xstem! must be on a note");continue}t.xstem=!0,t.nflags=0;continue;case 36:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}s.name[6]=="1"?t.beam_br1=!0:t.beam_br2=!0;continue;case 37:t.rbstop=1;continue;case 38:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}t.trem1=!0,t.ntrem=s.name.length,t.nflags>0?t.nflags+=t.ntrem:t.nflags=t.ntrem;continue;case 39:if(t.type!=C.NOTE){error(1,t,errs.must_note,s.name);continue}t.feathered_beam=s.name[5]=="a"?1:-1;continue;case 40:t.stemless=!0;continue;case 41:t.rbstop=2;continue}t.a_dd||(t.a_dd=[]),t.a_dd.push(s)}}function deco_update(e,t){var n,r,i=a_de.length;for(n=0;n<i;n++)r=a_de[n],r.s==e&&(r.x+=t)}function deco_width(e){var t,n,r=0,i=e.a_dd,s=i.length;for(n=0;n<s;n++){t=i[n];switch(t.func){case 1:r<7&&(r=7);break;case 2:r<14&&(r=14);break;case 3:switch(t.glyph){case"brth":case"lphr":case"mphr":case"sphr":e.wr<20&&(e.wr=20)}}}return r!=0&&e.prev&&e.prev.type==C.BAR&&(r-=3),r}function draw_all_deco(){if(a_de.length==0)return;var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v=[],m=[];if(!cfmt.dynalign){o=nstaff,a=staff_tb[o].y;while(--o>=0)f=staff_tb[o].y,m[o]=(a+24+f)*.5,a=f}for(;;){e=a_de.shift();if(!e)break;n=e.dd;if(!n)continue;if(n.dd_en)continue;r=e.s,s=n.glyph,h=s.indexOf("/"),h>0&&(r.stem>=0?s=s.slice(0,h):s=s.slice(h+1)),f_staff[n.func]?set_sscale(r.st):set_scale(r),o=e.st;if(!staff_tb[o].topbar)continue;u=e.x,a=e.y+staff_tb[o].y;if(e.m!=undefined)i=r.notes[e.m],u+=i.shhd*stv_g.scale;else if(f_staff[n.func]&&!cfmt.dynalign&&(e.up&&o>0||!e.up&&o<nstaff)){e.up?l=m[--o]:l=m[o++],l-=n.h*.5;if(e.up&&a<l||!e.up&&a>l){f=y_get(o,!e.up,e.x,e.val)+staff_tb[o].y,e.up&&(f-=n.h);if(e.up&&f>l||!e.up&&f<l)a=l}}c=user[s];if(c&&typeof c=="function"){c(u,a,e);continue}if(self.psdeco(s,u,a,e))continue;anno_start(r,"deco"),e.inv&&(g_open(u,a,0,1,-1),u=a=0),e.has_val?(n.func!=2||stv_g.st<0?out_deco_val(u,a,s,e.val/stv_g.scale,e.defl):out_deco_val(u,a,s,e.val,e.defl),e.defl.noen&&v.push(e.start)):n.str!=undefined&&n.str!="sfz"?(p=n.str,p[0]=="@"&&(d=p.match(/^@([0-9.-]+),([0-9.-]+);?/),u+=Number(d[1]),a+=Number(d[2]),p=p.replace(d[0],"")),out_deco_str(u,a,s,p)):e.lden?out_deco_long(u,a,e):xygl(u,a,s),stv_g.g&&g_close(),anno_stop(r,"deco")}a_de=v}function draw_deco_near(){function n(e){var t,n,r=e.x-e.wl,i=a_de.length;for(t=0;t<i;t++)n=a_de[t],n.ix=t,n.s.x=n.x=r,n.defl.nost=!0}function r(e){var t,n,r,i,s,o,u=e.a_dd.length;for(n=0;n<u;n++){t=e.a_dd[n];switch(t.func){default:i=0;break;case 3:case 4:case 5:if(ottava[t.name]){o=t.name.slice(0,-1)+e.st.toString();if(od[o]){if(t.name[t.name.length-1]=="("){od[o]++;continue}od[o]--;if(e.v+1!=od[o]>>8||!od[o])continue;od[o]&=255}else t.name[t.name.length-1]=="("&&(od[o]=1+(e.v+1<<8))}i=e.pos.orn;break;case 6:i=e.pos.vol;break;case 7:i=e.pos.dyn}if(i==C.SL_HIDDEN)continue;s={s:e,dd:t,st:e.st,ix:a_de.length,defl:{},x:e.x,y:e.y},a_de.push(s),t.dd_en?s.ldst=!0:t.dd_st&&(s.lden=!0,s.defl.nost=!0);if(!f_near[t.func])continue;func_tb[t.func](s)}}function i(e,t){var n,r,i,s,o,u,a,f=e.notes[t],l=f.a_dcn.length;for(o=0;o<l;o++){u=f.a_dcn[o],a=dd_tb[u];if(!a){a=deco_def(u);if(!a)continue}switch(a.func){case 0:case 1:case 3:case 4:case 8:break;default:error(1,null,"Cannot have !$1! on a head",a.name);continue;case 9:f.invis=!0;break;case 10:f.color=a.name;continue;case 32:f.invis=!0;continue;case 40:e.stemless=!0;continue}i={s:e,dd:a,st:e.st,m:t,ix:0,defl:{},x:e.x,y:3*(f.pit-18)},a_de.push(i),a.dd_en?i.ldst=!0:a.dd_st&&(i.lden=!0,i.defl.nost=!0)}}function s(e){var t;e.a_dd&&r(e);if(e.notes)for(t=0;t<e.notes.length;t++)e.notes[t].a_dcn&&i(e,t)}function o(){var e,t,n,r,i,s,o,u,a,f=a_de.length;for(e=0;e<f;e++){n=a_de[e];if(!n.ldst)continue;i=n.dd,s=i.dd_en,u=n.s,o=u.v;for(t=e+1;t<f;t++){r=a_de[t];if(!r.start&&r.dd==s&&r.s.v==o)break}if(t==f){a=u.st;for(t=e+1;t<f;t++){r=a_de[t];if(!r.start&&r.dd==s&&r.s.st==a)break}}t==f&&(r={s:n.s,st:n.st,dd:s,ix:a_de.length-1,x:realwidth-6,y:n.s.y,lden:!0,defl:{noen:!0}},r.x<u.x+10&&(r.x=u.x+10),n.m!=undefined&&(r.m=n.m),a_de.push(r)),r.start=n,r.defl.nost=n.defl.nost,i.name=="trill("&&e>0&&a_de[e-1].dd.name=="trill"&&(r.prev=a_de[e-1])}for(e=0;e<f;e++){r=a_de[e];if(!r.lden||r.start)continue;u=r.s,n={s:prev_scut(u),st:r.st,dd:r.dd.dd_st,ix:a_de.length-1,y:u.y,ldst:!0},n.x=n.s.x,r.m!=undefined&&(n.m=r.m),a_de.push(n),r.start=n}}var e,t;for(e=tsfirst;e;e=e.ts_next){switch(e.type){case C.CLEF:case C.KEY:case C.METER:continue}break}a_de.length!=0&&n(e);for(;e;e=e.ts_next){switch(e.type){case C.BAR:case C.MREST:case C.NOTE:case C.REST:case C.SPACE:break;case C.GRACE:for(t=e.extra;t;t=t.next)s(t);default:continue}s(e)}o()}function draw_deco_note(){var e,t,n,r,i=a_de.length;for(e=0;e<i;e++)t=a_de[e],n=t.dd,r=n.func,f_note[r]&&t.m==undefined&&func_tb[r](t)}function draw_deco_staff(){function g(e){var t,n,i,s,o,u,a,f,l;i=staff_tb[e.st].topbar+25;for(t=e.sym;t;t=t.next){if(t.type!=C.BAR)continue;if(!t.rbstart||t.norepbra)continue;if(!t.next)break;l||(l=t,set_font("repeat")),n=t;for(;;){if(!t.next)break;t=t.next;if(t.rbstop)break}s=y_get(e.st,!0,n.x,t.x-n.x),i<s&&(i=s),n.text&&(f=strwh(n.text),s=y_get(e.st,!0,n.x+4,f[0]),s+=f[1],i<s&&(i=s)),t.rbstart&&(t=t.prev)}t=l;if(!t)return;set_dscale(e.st,!0),s=i*staff_tb[e.st].staffscale;for(;t;t=t.next){if(!t.rbstart||t.norepbra)continue;n=t;for(;;){if(!t.next)break;t=t.next;if(t.rbstop)break}if(n==t)break;r=n.x,t.type!=C.BAR?a=t.rbstop?0:t.x-realwidth+4:t.bar_type.length>1&&t.bar_type!="[]"||t.bar_type=="]"?n.st>0&&!(cur_sy.staves[n.st-1].flags&STOP_BAR)?a=t.wl:t.bar_type.slice(-1)==":"?a=12:t.bar_type[0]!=":"?a=0:a=8:a=t.rbstop?0:8,a=t.x-r-a,!t.next&&!t.rbstop&&!e.bar_start&&(e.bar_start=clone(t),e.bar_start.type=C.BAR,e.bar_start.bar_type="[",delete e.bar_start.text,e.bar_start.rbstart=1,delete e.bar_start.a_gch),n.text&&xy_str(r+4,s-gene.curfont.size-3,n.text),xypath(r,s),n.rbstart==2&&(output+="m0 20v-20"),output+="h"+a.toFixed(2),t.rbstop==2&&(output+="v20"),output+='"/>\n',y_set(n.st,!0,r,a,i+2),t.rbstart&&(t=t.prev)}}var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v=new Array(nstaff),m=a_de.length;for(o=0;o<=nstaff;o++)v[o]={ymin:0,ymax:0};for(o=0;o<m;o++){a=a_de[o],f=a.dd;if(!f)continue;if(!f_staff[f.func]||a.m!=undefined)continue;func_tb[f.func](a);if(f.dd_en)continue;cfmt.dynalign&&(a.up?a.y>v[a.st].ymax&&(v[a.st].ymax=a.y):a.y<v[a.st].ymin&&(v[a.st].ymin=a.y))}for(o=0;o<m;o++){a=a_de[o],f=a.dd;if(!f)continue;if(f.dd_en||!f_staff[f.func])continue;cfmt.dynalign?(a.up?i=v[a.st].ymax:i=v[a.st].ymin,a.y=i):i=a.y,a.up&&(i+=f.h),y_set(a.st,a.up,a.x,a.val,i)}for(o=0;o<=nstaff;o++)v[o]={ymin:0,ymax:24};for(e=tsfirst;e;e=e.ts_next){if(!e.a_gch)continue;t||(t=e),c=null;for(h=0;h<e.a_gch.length;h++){l=e.a_gch[h];if(l.type!="g")continue;c=l;if(l.y<0)break}c&&(s=c.w,c.y>=0?(i=y_get(e.st,!0,e.x,s),i>v[e.st].ymax&&(v[e.st].ymax=i)):(i=y_get(e.st,!1,e.x,s),i<v[e.st].ymin&&(v[e.st].ymin=i)))}if(t){for(o=0;o<=nstaff;o++)d=staff_tb[o].botbar,v[o].ymin>d-4&&(v[o].ymin=d-4),p=staff_tb[o].topbar,v[o].ymax<p+4&&(v[o].ymax=p+4);set_dscale(-1);for(e=t;e;e=e.ts_next){if(!e.a_gch)continue;self.draw_gchord(e,v[e.st].ymin,v[e.st].ymax)}}for(u=0;u<voice_tb.length;u++){n=voice_tb[u];if(n.second||!n.sym)continue;g(n)}}function draw_measnb(){var e,t,n,r,i,s,o,u,a=cur_sy;for(t=0;t<=nstaff;t++)if(a.st_print[t])break;if(t>nstaff)return;set_dscale(t),staff_tb[t].staffscale!=1&&(u=get_font("measure").size,param_set_font("measurefont","* "+(u/staff_tb[t].staffscale).toString())),set_font("measure"),e=tsfirst,n=gene.nbar;if(n>1)if(cfmt.measurenb==0)o=!0,i=y_get(t,!0,0,20),i<staff_tb[t].topbar+14&&(i=staff_tb[t].topbar+14),cfmt.measurebox?xy_str_b(0,i,n.toString()):xy_str(0,i,n.toString()),y_set(t,!0,0,20,i+gene.curfont.size+2);else if(n%cfmt.measurenb==0){for(;;e=e.ts_next){switch(e.type){case C.METER:case C.CLEF:case C.KEY:case C.STBRK:continue}break}while(e.st!=t)e=e.ts_next;if(e.type!=C.BAR||!e.bar_num)e.prev&&e.prev.type!=C.CLEF&&(e=e.prev),r=e.x-e.wl,o=!0,s=cwid("0")*gene.curfont.swfac,n>=10&&(s*=n>=100?3:2),cfmt.measurebox&&(s+=4),i=y_get(t,!0,r,s),i<staff_tb[t].topbar+6&&(i=staff_tb[t].topbar+6),i+=2,cfmt.measurebox?(xy_str_b(r,i,n.toString()),i+=2,s+=3):xy_str(r,i,n.toString()),i+=gene.curfont.size,y_set(t,!0,r,s,i),e.ymx=i}for(;e;e=e.ts_next){switch(e.type){case C.STAVES:a=e.sy;for(t=0;t<nstaff;t++)if(a.st_print[t])break;set_sscale(t);continue;default:continue;case C.BAR:if(!e.bar_num)continue}n=e.bar_num;if(cfmt.measurenb==0||n%cfmt.measurenb!=0||!e.next)continue;o||(o=!0),s=cwid("0")*gene.curfont.swfac,n>=10&&(s*=n>=100?3:2),cfmt.measurebox&&(s+=4),r=e.x-s*.4,i=y_get(t,!0,r,s),i<staff_tb[t].topbar+6&&(i=staff_tb[t].topbar+6),e.next.type==C.NOTE&&(e.next.stem>0?i<e.next.ys-gene.curfont.size&&(i=e.next.ys-gene.curfont.size):i<e.next.y&&(i=e.next.y)),i+=2,cfmt.measurebox?(xy_str_b(r,i,n.toString()),i+=2,s+=3):xy_str(r,i,n.toString()),i+=gene.curfont.size,y_set(t,!0,r,s,i),e.ymx=i}gene.nbar=n,u&&param_set_font("measurefont","* "+u.toString())}function draw_notempo(e,t,n,r,i){var s,o,u,a=identify_note(e,r),f=a[0],l=a[1],c=a[2];out_XYAB('<g transform="translate(X,Y) scale(F)">\n',t+4,n+5,i);switch(f){case C.OVAL:o="HD";break;case C.EMPTY:o="Hd";break;default:o="hd"}xygl(-posx,posy,o),s=4;if(l){u=9,c>0&&(u+=4);switch(f){case C.SQUARE:u+=3;break;case C.OVALBARS:case C.OVAL:u+=2;break;case C.EMPTY:u+=1}s=u*l,u-=posx;while(--l>=0)xygl(u,posy,"dot"),u+=3.5}return r<C.BLEN&&(c<=0?out_stem(-posx,posy,21):(out_stem(-posx,posy,21,!1,c),s<6&&(s=6))),output+="</g>\n",(s+15)*i}function tempo_width(e){var t=0;return set_font("tempo"),e.tempo_str1&&(t=strwh(e.tempo_str1)[0]),e.tempo_ca&&(t+=strwh(e.tempo_ca)[0]),e.tempo_notes&&(t+=10*e.tempo_notes.length+6+cwid(" ")*gene.curfont.swfac*6+10),e.tempo_str2&&(t+=strwh(e.tempo_str2)[0]),t}function write_tempo(e,t,n){var r,i,s=.6*gene.curfont.size/15;set_font("tempo"),e.tempo_str1&&(xy_str(t,n,e.tempo_str1),t+=strwh(e.tempo_str1)[0]+3);if(e.tempo_notes){for(r=0;r<e.tempo_notes.length;r++)t+=draw_notempo(e,t,n,e.tempo_notes[r],s);xy_str(t,n,"="),t+=strwh("= ")[0],e.tempo_ca&&(xy_str(t,n,e.tempo_ca),t+=strwh(e.tempo_ca)[0]),e.tempo?(xy_str(t,n,e.tempo.toString()),i=cwid("0")*gene.curfont.swfac,t+=i+5,e.tempo>=10&&(t+=i,e.tempo>=100&&(t+=i))):t+=draw_notempo(e,t,n,e.new_beat,s)}e.tempo_str2&&xy_str(t,n,e.tempo_str2),e.del=!0}function draw_partempo(e,t){var n,r,i,s,o,u,a=0,f=0,l=staff_tb[e].topbar+8,c=0,h=1,p=0;for(n=tsfirst;n;n=n.ts_next){if(n.type!=C.TEMPO||n.del)continue;i||(i=n),o=tempo_width(n),n.time==0&&n.x>40&&(n.x=40),u=y_get(e,!0,n.x-16,o),u>l&&(l=u),p>=n.x-16&&!(c&h>>1)&&(c|=h),h<<=1,p=n.x-16+o}if(i){set_sscale(-1),set_font("tempo"),f=gene.curfont.size+2+2,u=2-f,s=u-f,c!=0&&(f*=2),t<l+f&&(a=l+f-t);for(n=i;n;n=n.ts_next){if(n.type!=C.TEMPO||n.del)continue;if(user.anno_start||user.anno_stop)n.wl=16,n.wr=30,n.ymn=c&1?s:u,n.ymx=n.ymn+14,anno_start(n);write_tempo(n,n.x-16,c&1?s:u),anno_stop(n),c>>=1}}l=staff_tb[e].topbar+8;for(n=tsfirst;n;n=n.ts_next){if(n.type!=C.PART)continue;r||(r=n,set_font("parts"),s=gene.curfont.size+2+2),o=strwh(n.text)[0],u=y_get(e,!0,n.x-10,o+3),l<u&&(l=u)}if(r){set_sscale(-1),t<l+s+f&&(a=l+s+f-t);for(n=r;n;n=n.ts_next){if(n.type!=C.PART)continue;n.x-=10;if(user.anno_start||user.anno_stop)o=strwh(n.text)[0],n.wl=0,n.wr=o,n.ymn=-f-s,n.ymx=n.ymn+s,anno_start(n);cfmt.partsbox?xy_str_b(n.x,2-f-s,n.text):xy_str(n.x,2-f-s,n.text),anno_stop(n)}}return a}function b_pos(e,t,n,r){function l(e){var t=Math.round((e+12)/6)*6-12;return t-e}var i,s,o,u,a=e?3.5:BEAM_SHIFT,f=e?1.8:BEAM_DEPTH;if(t>0){s=r-(n-1)*a-f;if(s>26)return 0;i=r}else{i=r+(n-1)*a+f;if(i<-2)return 0;s=r}return o=l(i-BEAM_OFFSET),u=l(s+BEAM_OFFSET),o*o>u*u?u:o}function sym_dup(e){var t,n,r=clone(e);r.invis=!0,delete r.text,delete r.a_gch,delete r.a_ly,delete r.a_dd,r.notes=clone(e.notes);for(t=0;t<=r.nhd;t++)n=r.notes[t]=clone(e.notes[t]),delete n.a_dcn;return r}function calculate_beam(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T;t.beam_st||(n=sym_dup(t),lkvsym(n,t),lktsym(n,t),n.x-=12,n.x>t.prev.x+12&&(n.x=t.prev.x+12),n.beam_st=!0,delete n.beam_end,n.tmp=!0,delete n.slur_start,delete n.slur_end,t=n),s=o=0,f=l=!1,u=t.st,a=t.v,E=t.grace?GSTEM_XOFF:3.5;for(r=t;;r=r.next){if(r.type==C.NOTE){r.nflags>o&&(o=r.nflags),s++,r.st!=u&&(f=!0),r.stem!=t.stem&&(l=!0),!x&&!r.invis&&(!r.stemless||r.trem2)&&(x=!0);if(r.beam_end)break}if(!r.next){for(;;r=r.prev)if(r.type==C.NOTE)break;n=sym_dup(r),n.next=r.next,n.next&&(n.next.prev=n),r.next=n,n.prev=r,n.ts_next=r.ts_next,n.ts_next&&(n.ts_next.ts_prev=n),r.ts_next=n,n.ts_prev=r,delete n.beam_st,n.beam_end=!0,n.tmp=!0,delete n.slur_start,delete n.slur_end,n.x+=12,n.x<realwidth-12&&(n.x=realwidth-12),r=n,s++;break}}if(!x)return!1;e.s2=r;if(staff_tb[u].y==0){if(f)return!1}else if(!f)return e.s1=t,e.a=(t.ys-r.ys)/(t.xs-r.xs),e.b=t.ys-t.xs*e.a+staff_tb[u].y,e.nflags=o,!0;w=t,y=100,b=0;for(n=t;;n=n.next){if(n.type!=C.NOTE)continue;(S=n.p_v.scale)==1&&(S=staff_tb[n.st].staffscale),n.stem>=0?(c=E+n.notes[0].shhd,n.notes[n.nhd].pit>b&&(b=n.notes[n.nhd].pit,w=n)):(c=-E+n.notes[n.nhd].shhd,n.notes[0].pit<y&&(y=n.notes[0].pit,w=n)),n.xs=n.x+c*S;if(n==r)break}cfmt.flatbeams?d=0:!l&&s>=3&&w!=t&&w!=r&&(d=0),h=t.ys+staff_tb[u].y,d==undefined&&(d=(r.ys+staff_tb[r.st].y-h)/(r.xs-t.xs)),d!=0&&(d>0?d=BEAM_SLOPE*d/(BEAM_SLOPE+d):d=BEAM_SLOPE*d/(BEAM_SLOPE-d)),v=(h+r.ys+staff_tb[r.st].y)/2-d*(r.xs+t.xs)/2,g=0,n=t;if(l)p=((t.grace?3.5:BEAM_SHIFT)*(o-1)+BEAM_DEPTH)*.5,t.stem!=r.stem&&t.nflags<r.nflags?v+=p*r.stem:v+=p*t.stem;else if(!t.grace){var N=BEAM_DEPTH+BEAM_SHIFT*(o-1);while(n.ts_prev&&n.ts_prev.type==C.NOTE&&n.ts_prev.time==n.time&&n.ts_prev.x>t.xs)n=n.ts_prev;for(;n&&n.time<=r.time;n=n.ts_next){if(n.type!=C.NOTE||n.invis||n.st!=u&&n.v!=a)continue;c=n.v==a?n.xs:n.x,p=d*c+v-staff_tb[n.st].y;if(n.v==a)m=min_tb[n.nhd==0?0:1][n.nflags],n.stem>0?(n.notes[n.nhd].pit>26&&(m-=2,n.notes[n.nhd].pit>28&&(m-=2)),m-=p-3*(n.notes[n.nhd].pit-18)):(n.notes[0].pit<18&&(m-=2,n.notes[0].pit<16&&(m-=2)),m-=3*(n.notes[0].pit-18)-p),m+=BEAM_DEPTH+BEAM_SHIFT*(n.nflags-1);else{if(t.stem>0)if(n.stem>0){if(n.ymn>p+4||n.ymx<p-N-2)continue;n.v>a?m=n.ymx-p:m=n.ymn+8-p}else m=n.ymx-p;else if(n.stem<0){if(n.ymx<p-4||n.ymn>p-N-2)continue;n.v<a?m=p-n.ymn:m=p-n.ymx+8}else m=p-n.ymn;m+=2+N}m>g&&(g=m)}}else for(;;n=n.next){p=d*n.xs+v-staff_tb[n.st].y,m=GSTEM-2,n.stem>0?m-=p-3*(n.notes[n.nhd].pit-18):m+=p-3*(n.notes[0].pit-18),m+=3*(n.nflags-1),m>g&&(g=m);if(n==r)break}g>0&&(v+=t.stem*g);if(!f&&!l)for(n=t.next;;n=n.next){switch(n.type){case C.REST:i=n.ts_next;if(!i||i.st!=u||i.type!=C.NOTE&&i.type!=C.REST)break;case C.BAR:if(n.invis)break;case C.CLEF:h=d*n.x+v,t.stem>0?(h=n.ymx-h+BEAM_DEPTH+BEAM_SHIFT*(o-1)+2,h>0&&(v+=h)):(h=n.ymn-h-BEAM_DEPTH-BEAM_SHIFT*(o-1)-2,h<0&&(v+=h));break;case C.GRACE:for(i=n.extra;i;i=i.next)h=d*i.x+v,t.stem>0?(h=i.ymx-h+BEAM_DEPTH+BEAM_SHIFT*(o-1)+2,h>0&&(v+=h)):(h=i.ymn-h-BEAM_DEPTH-BEAM_SHIFT*(o-1)-2,h<0&&(v+=h))}if(n==r)break}d==0&&(v+=b_pos(t.grace,t.stem,o,v-staff_tb[u].y));for(n=t;;n=n.next){switch(n.type){case C.NOTE:n.ys=d*n.xs+v-staff_tb[n.st].y,n.stem>0?(n.ymx=n.ys+2.5,n.ts_prev&&n.ts_prev.stem>0&&n.ts_prev.st==n.st&&n.ts_prev.ymn<n.ymx&&n.ts_prev.x==n.x&&n.notes[0].shhd==0&&(n.ts_prev.x-=3,n.ts_prev.xs-=3)):n.ymn=n.ys-2.5;break;case C.REST:h=d*n.x+v-staff_tb[n.st].y,T=BEAM_DEPTH+BEAM_SHIFT*(o-1)+(n.head!=C.FULL?4:9);if(t.stem>0){h-=T,t.multi==0&&h>12&&(h=12);if(n.y<=h)break}else{h+=T,t.multi==0&&h<12&&(h=12);if(n.y>=h)break}n.head!=C.FULL&&(h=((h+3+12)/6|0)*6-12),n.y=h}if(n==r)break}return staff_tb[u].y==0?!1:(e.s1=t,e.a=d,e.b=v,e.nflags=o,!0)}function draw_beams(e){function v(e,t,n,r,i,s){var o,u,a=i.s1,f=a.nflags;a.ntrem&&(f-=a.ntrem),a.trem2&&s>f&&(a.dur>=C.BLEN/2?(e=a.x+6,t=i.s2.x-6):a.dur<C.BLEN/4&&(e+=5,t-=6)),o=i.a*e+i.b-n,t-=e,t/=stv_g.scale,u=i.a*t*stv_g.scale,xypath(e,o,!0),output+="l"+t.toFixed(2)+" "+(-u).toFixed(2)+"v"+r.toFixed(2)+"l"+(-t).toFixed(2)+" "+u.toFixed(2)+'z"/>\n'}var t,n,r,i,s,o,u,a,f,l,c,h,p=e.s1,d=e.s2;anno_start(p,"beam"),p.grace?(s=3.5,o=3.2,i=.29,u=1.8):(s=BEAM_SHIFT,o=BEAM_STUB,i=.34,u=BEAM_DEPTH),r=p.stem,p.stem!=d.stem&&p.nflags<d.nflags&&(r=d.stem),r<0&&(u=-u),v(p.xs-i,d.xs+i,0,u,e,1),a=0;for(t=p;;t=t.next){t.type==C.NOTE&&t.stem!=r&&(t.ys=e.a*t.xs+e.b-staff_tb[t.st].y+s*(t.nflags-1)*t.stem-u);if(t==d)break}p.feathered_beam&&(a=s/(d.xs-p.xs),p.feathered_beam>0?(a=-a,s=a*p.xs):s=a*d.xs,a*=r),i=0;for(n=2;n<=e.nflags;n++){i+=s,a!=0&&(e.a+=a);for(t=p;;t=t.next){if(t.type!=C.NOTE||t.nflags<n){if(t==d)break;continue}if(t.trem1&&n>t.nflags-t.ntrem){h=t.dur>=C.BLEN/2?t.x:t.xs,v(h-5,h+5,(i+2.5)*r,u,e,n);if(t==d)break;continue}l=t;for(;;){if(t==d)break;f=t.next;if(f.type==C.NOTE||f.type==C.REST)if(f.trem1){if(f.nflags-f.ntrem<n)break}else if(f.nflags<n)break;if(f.beam_br1||f.beam_br2&&n>2)break;t=f}c=t;while(c.type!=C.NOTE)c=c.prev;h=l.xs;if(l==c)if(l==p)h+=o;else if(l==d)h-=o;else if(l.beam_br1||l.beam_br2&&n>2)h+=o;else{f=l.next;while(f.type!=C.NOTE)f=f.next;if(f.beam_br1||f.beam_br2&&n>2)h-=o;else{l=l.prev;while(l.type!=C.NOTE)l=l.prev;l.nflags<f.nflags||l.nflags==f.nflags&&l.dots<f.dots?h+=o:h-=o}}v(h,c.xs,i*r,u,e,n);if(t==d)break}}p.tmp?unlksym(p):d.tmp&&unlksym(d),anno_stop(p,"beam")}function draw_lstaff(e){function u(e,t,n){var r,i,s,o;while(!cur_sy.st_print[t]){if(cur_sy.staves[t].flags&n)return;t++}r=i=t;for(;;){cur_sy.st_print[r]&&(i=r);if(cur_sy.staves[r].flags&n)break;r++}s=staff_tb[t].y+staff_tb[t].topbar*staff_tb[t].staffscale,o=staff_tb[i].y+staff_tb[i].botbar*staff_tb[i].staffscale,n&(CLOSE_BRACE|CLOSE_BRACE2)?out_brace(e,o,s-o):out_bracket(e,s,s-o)}var t,n,r,i,s=cur_sy.nstaff,o=0;for(t=0;;t++){cur_sy.staves[t].flags&(OPEN_BRACE|OPEN_BRACKET)&&o++;if(cur_sy.st_print[t])break;cur_sy.staves[t].flags&(CLOSE_BRACE|CLOSE_BRACKET)&&o--;if(t==s)break}for(n=s;n>t;n--)if(cur_sy.st_print[n])break;if(t==n&&o==0)return;r=staff_tb[n].y+staff_tb[n].botbar*staff_tb[n].staffscale,i=staff_tb[t].y+staff_tb[t].topbar*staff_tb[t].staffscale-r,xypath(e,r),output+="v"+(-i).toFixed(2)+'"/>\n';for(t=0;t<=s;t++)cur_sy.staves[t].flags&OPEN_BRACE&&u(e,t,CLOSE_BRACE),cur_sy.staves[t].flags&OPEN_BRACKET&&u(e,t,CLOSE_BRACKET),cur_sy.staves[t].flags&OPEN_BRACE2&&u(e-6,t,CLOSE_BRACE2),cur_sy.staves[t].flags&OPEN_BRACKET2&&u(e-6,t,CLOSE_BRACKET2)}function draw_meter(e,t){if(!t.a_meter)return;var n,r,i,s,o=t.st,u=staff_tb[o],a=u.y;u.stafflines!="|||||"&&(a+=(u.topbar+u.botbar)/2-12);for(r=0;r<t.a_meter.length;r++)s=t.a_meter[r],e=t.x+t.x_meter[r],s.bot?out_XYAB('<g transform="translate(X,Y)" text-anchor="middle">\n <text y="-12">A</text>\n <text>B</text>\n</g>\n',e,a+6,m_gl(s.top),m_gl(s.bot)):out_XYAB('<text x="X" y="Y" text-anchor="middle">A</text>\n',e,a+12,m_gl(s.top))}function draw_acc(e,t,n,r,i){if(r)if(r==i)n=n==-1?-2:2;else if(r*2!=i){xygl(e,t,"acc"+n+"_"+r+"_"+i);return}xygl(e,t,"acc"+n)}function draw_hl(e,t,n,r,i){var s,o,u=staff_tb[r],a=u.y,f=u.stafflines,l=(f.length-1)*6,c=u.botline;if(!/[\[|]/.test(f))return;t%6&&(t+=3),n%6&&(n-=3);if(f.indexOf("-")>=0&&(t>c&&t<l||n>c&&n<l||t<=c&&n>=l)){s=t,o=n;while(s>c&&f[s/6]=="-")s-=6;while(o<l&&f[o/6]=="-")o+=6;for(;s<o;s+=6)f[s/6]=="-"&&xygl(e,a+s,i)}for(;t<c;t+=6)xygl(e,a+t,i);for(;n>l;n-=6)xygl(e,a+n,i)}function draw_keysig(e,t,n){if(n.k_none)return;var r=n.k_old_sf,i=e.st,s=staff_tb[i].y,o,u,a,f=n.k_y_clef;f&1&&(f+=7),f/=2;while(f<0)f+=7;f%=7;if(!n.k_a_acc){if(cfmt.cancelkey||n.k_sf==0)if(n.k_sf==0||r*n.k_sf<0){u=sharp_cl[f],a=u>9?sharp1:sharp2;for(o=0;o<r;o++)xygl(t,s+u,"acc3"),u+=a[o],t+=5.5;u=flat_cl[f],a=u<18?flat1:flat2;for(o=0;o>r;o--)xygl(t,s+u,"acc3"),u+=a[-o],t+=5.5;n.k_sf!=0&&(t+=3)}if(n.k_sf>0){u=sharp_cl[f],a=u>9?sharp1:sharp2;for(o=0;o<n.k_sf;o++)xygl(t,s+u,"acc1"),u+=a[o],t+=5.5;if(cfmt.cancelkey&&o<r){t+=2;for(;o<r;o++)xygl(t,s+u,"acc3"),u+=a[o],t+=5.5}}if(n.k_sf<0){u=flat_cl[f],a=u<18?flat1:flat2;for(o=0;o>n.k_sf;o--)xygl(t,s+u,"acc-1"),u+=a[-o],t+=5.5;if(cfmt.cancelkey&&o>r){t+=2;for(;o>r;o--)xygl(t,s+u,"acc3"),u+=a[-o],t+=5.5}}}else if(n.k_a_acc.length){var l,c=n.k_a_acc[0].acc,h=100;for(o=0;o<n.k_a_acc.length;o++)l=n.k_a_acc[o],u=(n.k_y_clef+l.pit-18)*3,o!=0&&(u>h+18||u<h-18)?t-=5.5:l.acc!=c&&(t+=3),c=l.acc,draw_hl(t,u,u,i,"hl"),h=u,draw_acc(t,s+u,l.acc,l.micro_n,l.micro_d),t+=5.5}}function bar_cnv(e){switch(e){case"[":case"[]":return"";case"|:":case"|::":case"|:::":return"["+e;case":|":case"::|":case":::|":return e+"]";case"::":return cfmt.dblrepbar;case"||:":return"[|:"}return e}function draw_bar(e,t,n){var r,i,s,o=e.bar_type,u=e.st,a=staff_tb[u],f=e.x;if(!o)return;u!=0&&e.ts_prev&&e.ts_prev.type!=C.BAR&&(n=a.topbar*a.staffscale),e.ymx=e.ymn+n,set_sscale(-1),anno_start(e),s=a.y+12,a.stafflines!="|||||"&&(s+=(a.topbar+a.botbar)/2-12);if(e.bar_mrep){set_sscale(u);if(e.bar_mrep==1){for(i=e.prev;i.type!=C.REST;i=i.prev);xygl(i.x,s,"mrep")}else xygl(f,s,"mrep2"),e.v==cur_sy.top_voice&&(set_font("annotation"),xy_str(f,s+a.topbar-9,e.bar_mrep.toString(),"c"))}for(r=o.length;--r>=0;){switch(o[r]){case"|":set_sscale(-1),out_bar(f,t,n,e.bar_dotted?a.staffscale:0);break;default:f-=3,set_sscale(-1),out_thbar(f,t,n);break;case":":f-=2,set_sscale(u),xygl(f+1,s-12,"rdots")}f-=3}set_sscale(-1),anno_stop(e)}function draw_rest(e){var t,n,r,i,s,o,u,a,f,l=staff_tb[e.st];if(!l.topbar)return;if(e.dur==e.p_v.meter.wmeasure||e.rep_nb&&e.rep_nb>=0){t=e.ts_next;while(t&&t.time!=e.time+e.dur)t=t.ts_next;i=t?t.x:realwidth,t=e;while(!t.seqst)t=t.ts_prev;t=t.ts_prev,i=(i+t.x)/2,e.a_dd&&deco_update(e,i-e.x),e.x=i}else i=e.x,e.notes[0].shhd&&(i+=e.notes[0].shhd*stv_g.scale);if(e.invis)return;u=l.y;if(e.rep_nb){set_sscale(e.st),anno_start(e),l.stafflines=="|||||"?u+=12:u+=(l.topbar+l.botbar)/2,e.rep_nb<0?xygl(i,u,"srep"):(xygl(i,u,"mrep"),e.rep_nb>2&&e.v==cur_sy.top_voice&&(set_font("annotation"),xy_str(i,u+l.topbar-9,e.rep_nb.toString(),"c"))),anno_stop(e);return}set_scale(e),anno_start(e),s=e.y,n=5-e.nflags,n==7&&s==12&&l.stafflines.length<=2&&(s-=6),xygl(i,s+u,e.notes[0].head?e.notes[0].head:rest_tb[n]);if(n>=6){r=s/6;switch(n){default:switch(l.stafflines[r+1]){case"|":case"[":break;default:xygl(i,s+6+u,"hl1")}n==9&&(s-=6,r--);break;case 7:s+=6,r++;case 6:}switch(l.stafflines[r]){case"|":case"[":break;default:xygl(i,s+u,"hl1")}}if(e.dots){i+=8,s+=u+3;for(n=0;n<e.dots;n++)xygl(i,s,"dot"),i+=3.5}anno_stop(e)}function draw_gracenotes(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g={};for(d=e.extra;d;d=d.next){d.beam_st&&!d.beam_end&&self.calculate_beam(g,d)&&draw_beams(g),anno_start(d),draw_note(d,!g.s2),d==g.s2&&(g.s2=null),anno_stop(d);if(!d.next)break}e.sappo&&(d=e.extra,d.next?(i=(d.next.x-d.x)*.5+4,s=(d.ys+d.next.ys)*.5-d.y,d.stem>0?s-=1:s+=1):(i=9,s=d.stem>0?5:-5),m=d.notes[d.stem<0?0:d.nhd],out_acciac(x_head(d,m),y_head(d,m),i,s,d.stem>0));if(e.p_v.key.k_bagpipe||!cfmt.graceslurs||e.slur_start||!e.next||e.next.type!=C.NOTE)return;v=d;if(v.stem>=0){t=127;for(d=e.extra;d;d=d.next)d.y<t&&(t=d.y,v=d);n=v.x,r=v.y-5,e.extra!=v&&(n-=4,r+=1),e=e.next,a=e.x-1,e.stem<0&&(a-=4),f=3*(e.notes[0].pit-18)-5,h=(a-n)*.4,h>3&&(h=3),p=h,l=.2,c=.8,r>f+7?(n=v.x-1,r+=.5,f+=6.5,a=e.x-5.5,h=(r-f)*.8,p=(r-f)*.2,l=0):f>r+4&&(f=r+4,n=v.x+2,r=v.y-4)}else{t=-127;for(d=e.extra;d;d=d.next)d.y>t&&(t=d.y,v=d);n=v.x,r=v.y+5,e.extra!=v&&(n-=4,r-=1),e=e.next,a=e.x-1,e.stem>=0&&(a-=2),f=3*(e.notes[e.nhd].pit-18)+5,h=(n-a)*.4,h<-3&&(h=-3),p=h,l=.2,c=.8,r<f-7?(n=v.x-1,r-=.5,f-=6.5,a=e.x-5.5,h=(r-f)*.8,p=(r-f)*.2,l=0):f<r-4&&(f=r-4,n=v.x+2,r=v.y+4)}i=l*a+(1-l)*n-n,s=l*f+(1-l)*r-h-r,o=c*a+(1-c)*n-n,u=c*f+(1-c)*r-p-r,anno_start(e,"slur"),xypath(n,r+staff_tb[e.st].y),output+="c"+i.toFixed(2)+" "+(-s).toFixed(2)+" "+o.toFixed(2)+" "+(-u).toFixed(2)+" "+(a-n).toFixed(2)+" "+(-f+r).toFixed(2)+'"/>\n',anno_stop(e,"slur")}function setdoty(e,t){var n,r,i;for(n=0;n<=e.nhd;n++)i=3*(e.notes[n].pit-18),i%6==0&&(e.dot_low?i-=3:i+=3),t[n]=i;for(n=0;n<e.nhd;n++){if(t[n+1]>t[n])continue;r=n;while(r>0){if(t[r]>t[r-1]+6)break;r--}if(3*(e.notes[r].pit-18)-t[r]<t[n+1]-3*(e.notes[n+1].pit-18))while(r<=n)t[r++]-=6;else t[n+1]=t[n]+6}}function x_head(e,t){return e.x+t.shhd*stv_g.scale}function y_head(e,t){return staff_tb[e.st].y+3*(t.pit-18)}function draw_basic_note(e,t,n,r){var i,s,o,u,a,f,l,c=!1,h=t.notes[n],p=staff_tb[t.st].y,d=3*(h.pit-18),v=h.shhd*stv_g.scale,m=e+v,g=d+p,y=identify_note(t,h.dur),b=y[0],w=y[1],E=y[2];d%6==0&&v!=(t.stem>0?t.notes[0].shhd:t.notes[t.nhd].shhd)&&(u=0,d>=30?(u=d,u%6&&(u-=3)):d<=-6&&(u=d,u%6&&(u+=3)),u&&xygl(m,u+p,"hl"));if(!h.invis)if(t.grace)o="ghd",m-=4.5*stv_g.scale;else if(h.map&&h.map[0])i=t.head,o=h.map[0][i],o||(o=h.map[0][h.map[0].length-1]),i=o.indexOf("/"),i>=0&&(t.stem>=0?o=o.slice(0,i):o=o.slice(i+1));else if(t.type==C.CUSTOS)o="custos";else switch(b){case C.OVAL:o="HD";break;case C.OVALBARS:if(t.head!=C.SQUARE){o="HDD";break};case C.SQUARE:h.dur<C.BLEN*4?o="breve":(o="longa",l=t.stem>0),!tsnext&&t.next&&t.next.type==C.BAR&&!t.next.next&&(w=0);break;case C.EMPTY:o="Hd";break;default:o="hd"}h.color!=undefined?c=set_color(h.color):h.map&&h.map[2]&&(c=set_color(h.map[2])),o&&(l&&(g_open(m,g,0,1,-1),m=g=0),self.psxygl(m,g,o)||xygl(m,g,o),l&&g_close());if(w){a=e+(7.7+t.xmx)*stv_g.scale,r[n]==undefined&&(r[n]=3*(t.notes[n].pit-18),(t.notes[n].pit&1)==0&&(r[n]+=3)),f=r[n]+p;while(--w>=0)xygl(a,f,"dot"),a+=3.5}h.acc&&(e-=h.shac*stv_g.scale,t.grace?(g_open(e,d+p,0,.75),draw_acc(0,0,h.acc,h.micro_n,h.micro_d),g_close()):draw_acc(e,d+p,h.acc,h.micro_n,h.micro_d)),c!=0&&set_color(c)}function draw_note(e,t){var n,r,i,s,o,u,a,f,l,c,s,h,p=new Array(e.nhd+1);e.dots&&setdoty(e,p),h=e.notes[e.stem<0?e.nhd:0],c=x_head(e,h),o=staff_tb[e.st].y;if(e.grace)f="ghl";else switch(e.head){default:f="hl";break;case C.OVAL:case C.OVALBARS:f="hl1";break;case C.SQUARE:f="hl2"}draw_hl(c,3*(e.notes[0].pit-18),3*(e.notes[e.nhd].pit-18),e.st,f),s=y_head(e,h),e.stemless?e.xstem&&(n=e.ts_prev,u=(n.stem>0?n.y:n.ys)-e.y,u+=staff_tb[n.st].y-o,u/=e.p_v.scale,out_stem(c,s,u)):(u=e.ys-e.y,l=e.nflags,e.ntrem&&(l-=e.ntrem),!t||l<=0?(e.nflags>0&&(e.stem>=0?u-=1:u+=1),out_stem(c,s,u,e.grace)):out_stem(c,s,u,e.grace,l,cfmt.straightflags));if(t&&e.trem1){var d=e.ntrem||0,v=c;u=3*(e.notes[e.stem>0?e.nhd:0].pit-18),e.head==C.FULL||e.head==C.EMPTY?(v+=(e.grace?GSTEM_XOFF:3.5)*e.stem,e.stem>0?u+=6+5.4*d:u-=11.4):e.stem>0?u+=5+5.4*d:u-=10.4,u/=e.p_v.scale,out_trem(v,o+u,d)}c=e.x;for(i=0;i<=e.nhd;i++)draw_basic_note(c,e,i,p)}function next_scut(e){var t=e;for(e=e.next;e;e=e.next){if(e.rbstop)return e;t=e}return t}function prev_scut(e){while(e.prev){e=e.prev;if(e.rbstart)return e}e=e.p_v.sym;while(e.type!=C.CLEF)e=e.ts_prev;return e.next&&e.next.type==C.KEY&&(e=e.next),e.next&&e.next.type==C.METER?e.next:e}function slur_direction(e,t){var n,r,i;if(e.grace&&e.stem>0)return-1;for(n=e;;n=n.next){if(n.type==C.NOTE){if(!n.stemless){if(n.stem<0)return 1;r=!0}n.notes[0].pit<22&&(i=!0)}if(n==t)break}return!r&&!i?1:-1}function slur_out(e,t,n,r,i,s,o){var u,a,f,l=.3,c=.45;a=r-t,a<0&&(a=-a),u=n-e,u>40&&a/u<.7&&(l=.3+.002*(u-40),l>.7&&(l=.7));var h=.5*(e+n),p=.5*(t+r),d=h+l*(e-h),v=p+l*(t-p)+s;d=e+c*(d-e),v=t+c*(v-t);var m=h+l*(n-h),g=p+l*(r-p)+s;m=n+c*(m-n),g=r+c*(g-r),u=.03*(n-e),a=2*i,f=.2+.001*(n-e),f>.6&&(f=.6),f*=i;var y=stv_g.v?stv_g.scale:1;o?output+='<path class="stroke" stroke-dasharray="5,5" d="M':output+='<path class="fill" d="M',out_sxsy(e," ",t),output+="c"+((d-e)/stv_g.scale).toFixed(2)+" "+((t-v)/y).toFixed(2)+" "+((m-e)/stv_g.scale).toFixed(2)+" "+((t-g)/y).toFixed(2)+" "+((n-e)/stv_g.scale).toFixed(2)+" "+((t-r)/y).toFixed(2),o||(output+="\n v"+(-f).toFixed(2)+"c"+((m-u-n)/stv_g.scale).toFixed(2)+" "+((r+f-g-a)/y).toFixed(2)+" "+((d+u-n)/stv_g.scale).toFixed(2)+" "+((r+f-v-a)/y).toFixed(2)+" "+((e-n)/stv_g.scale).toFixed(2)+" "+((r+f-t)/y).toFixed(2)),output+='"/>\n'}function slur_multi(e,t){for(;;){if(e.multi)return e.multi;if(e==t)break;e=e.next}return 0}function draw_slur(e,t,n,r,i){var s=e,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w;while(s.v!=t.v)s=s.ts_next;switch(i&7){case C.SL_ABOVE:w=1;break;case C.SL_BELOW:w=-1;break;default:w=slur_multi(s,t),w||(w=slur_direction(s,t))}var E=1,S=s.st,x=!1;if(s!=t){o=s.next;for(;;){if(o.type==C.NOTE||o.type==C.REST)E++,o.st!=S&&(x=!0,o.st<S&&(S=o.st));if(o==t)break;o=o.next}}x&&error(2,s,"*** multi-staves slurs not treated yet"),a=e.x,e.notes&&e.notes[0].shhd&&(a+=e.notes[0].shhd);if(e!=t)l=t.x,t.notes&&(l+=t.notes[0].shhd);else{for(o=t.ts_next;o;o=o.ts_next)if(o.type==C.STAVES)break;l=o?o.x:realwidth}n>=0?f=3*(s.notes[n].pit-18)+5*w:(f=w>0?s.ymx+2:s.ymn-2,s.type==C.NOTE&&(w>0?s.stem>0&&(a+=5,s.beam_end&&s.nflags>=-1&&!s.in_tuplet&&(s.nflags>0?(a+=2,f=s.ys-3):f=s.ys-6)):s.stem<0&&(a-=1,t.grace?f=s.y-8:s.beam_end&&s.nflags>=-1&&(!s.in_tuplet||s.ys<f+3)&&(s.nflags>0?(a+=2,f=s.ys+3):f=s.ys+6)))),r>=0?c=3*(t.notes[r].pit-18)+5*w:(c=w>0?t.ymx+2:t.ymn-2,t.type==C.NOTE&&(w>0?t.stem>0&&(l+=1,t.beam_st&&t.nflags>=-1&&!t.in_tuplet&&(c=t.ys-6)):t.stem<0&&(l-=5,t.beam_st&&t.nflags>=-1&&!t.in_tuplet&&(c=t.ys+6)))),s.type!=C.NOTE&&(f=c+1.2*w,a=s.x+s.wr*.5,a>l-12&&(a=l-12)),t.type!=C.NOTE&&(s.type==C.NOTE?c=f+1.2*w:c=f,s!=t&&(l=t.x-t.wl*.3)),E>=3&&(s.next.type!=C.BAR&&s.next.x<a+48&&(w>0?(v=s.next.ymx-2,f<v&&(f=v)):(v=s.next.ymn+2,f>v&&(f=v))),t.prev&&t.prev.type!=C.BAR&&t.prev.x>l-48&&(w>0?(v=t.prev.ymx-2,c<v&&(c=v)):(v=t.prev.ymn+2,c>v&&(c=v)))),d=(c-f)/(l-a);if(d>SLUR_SLOPE||d<-SLUR_SLOPE)d=d>SLUR_SLOPE?SLUR_SLOPE:-SLUR_SLOPE,d*w>0?f=c-d*(l-a):c=f+d*(l-a);v=c-f,v>8?v=8:v<-8&&(v=-8),m=v,m<0&&(m=-m),y=.5*m,b=.3*v,v*w>0?(l-=y,c-=b):(a+=y,f+=b),s.grace&&(a=s.x-GSTEM_XOFF*.5),t.grace&&(l=t.x+GSTEM_XOFF*1.5),g=0,d=(c-f)/(l-a);if(s!=t&&s.v==t.v){p=f-d*a;for(o=s.next;o!=t;o=o.next){if(o.st!=S)continue;switch(o.type){case C.NOTE:case C.REST:w>0?(v=3*(o.notes[o.nhd].pit-18)+6,v<o.ymx&&(v=o.ymx),v-=d*o.x+p,v>g&&(g=v)):(v=3*(o.notes[0].pit-18)-6,v>o.ymn&&(v=o.ymn),v-=d*o.x+p,v<g&&(g=v));break;case C.GRACE:for(u=o.extra;u;u=u.next)w>0?(v=3*(u.notes[u.nhd].pit-18)+6,v<u.ymx&&(v=u.ymx),v-=d*u.x+p,v>g&&(g=v)):(v=3*(u.notes[0].pit-18)-6,v>u.ymn&&(v=u.ymn),v-=d*u.x+p,v<g&&(g=v))}}f+=.45*g,c+=.45*g,g*=.65}E>3?h=(.08*(l-a)+12)*w:h=(.03*(l-a)+8)*w,w>0?(h<3*g&&(h=3*g),h>40&&(h=40)):(h>3*g&&(h=3*g),h<-40&&(h=-40)),v=c-f,v<0&&(v=-v),w>0?h<.8*v&&(h=.8*v):h>-0.8*v&&(h=-0.8*v),h*=cfmt.slurheight,slur_out(a,f,l,c,w,h,i&C.SL_DOTTED),y=l-a,d=(c-f)/y,p=f-d*a+.4*h;if(s.v==t.v)for(o=s;o!=t;o=o.next){if(o.st!=S)continue;v=d*o.x+p,o.ymx<v?o.ymx=v:o.ymn>v&&(o.ymn=v),o.next==t?(y=l,t.sl1&&(y-=5)):y=o.next.x,o!=s&&(a=o.x),y-=a,y_set(S,w>0,a,y,v)}return(w>0?C.SL_ABOVE:C.SL_BELOW)|i&C.SL_DOTTED}function draw_slurs(e,t){var n,r,i,s,o,u,a,f,l,c=e;for(;;){if(!c||c==t){if(!i||!(c=i.next)||c==t)break;i=null}if(c.type==C.GRACE){i=c,c=c.extra;continue}if(c.type!=C.NOTE&&c.type!=C.REST&&c.type!=C.SPACE||!c.slur_start&&!c.sl1){c=c.next;continue}r=null,n=c.next;var h=!1;for(;;){if(!n){if(s){n=s.next,s=null;continue}if(!i||h)break;n=i.next,h=!0;continue}if(n.type==C.GRACE){s=n,n=n.extra;continue}if(n.type==C.BAR&&(n.bar_type[0]==":"||n.bar_type=="|]"||n.bar_type=="[|"||n.text&&n.text[0]!="1")){r=n;break}if(n.type!=C.NOTE&&n.type!=C.REST&&n.type!=C.SPACE){n=n.next;continue}if(n.slur_end||n.sl2){r=n;break}if(n.slur_start||n.sl1){if(s){for(r=n;r.next;r=r.next);r.next=s.next,s.next&&(s.next.prev=r),r=null}draw_slurs(n,t),s&&s.next&&(s.next.prev.next=null,s.next.prev=s)}if(n==t)break;n=n.next}if(!n)r=next_scut(c);else if(!r){c=n;if(c==t)break;continue}if(i){for(n=c;n.next;n=n.next);n.next=i.next,i.next&&(i.next.prev=n),i.slur_start=C.SL_AUTO}s&&(s.prev.next=s.extra,s.extra.prev=s.prev,s.slur_start=C.SL_AUTO);if(c.slur_start)f=c.slur_start&15,c.slur_start>>=4,u=-1;else{for(u=0;u<=c.nhd;u++)if(c.notes[u].sl1)break;f=c.notes[u].sl1&15,c.notes[u].sl1>>=4,c.sl1--}a=-1,l=0;if(r.type!=C.NOTE&&r.type!=C.REST&&r.type!=C.SPACE||!r.slur_end&&!r.sl2){if(r.type!=C.BAR||r.bar_type[0]!=":"&&r.bar_type!="|]"&&r.bar_type!="[|"&&(!r.text||r.text[0]=="1"))l=1}else if(r.slur_end)r.slur_end--;else{for(a=0;a<=r.nhd;a++)if(r.notes[a].sl2)break;r.notes[a].sl2--,r.sl2--}f=draw_slur(c,r,u,a,f),l&&(r.p_v.slur_start||(r.p_v.slur_start=0),r.p_v.slur_start<<=4,r.p_v.slur_start+=f),i&&i.next&&(i.next.prev.next=null,i.next.prev=i),s&&(s.prev.next=s,s.extra.prev=null);if(c.slur_start||c.sl1)continue;if(c==t)break;c=c.next}}function draw_tuplet(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,d,b,w,E,S,x;s=e.st;for(n=e;n;n=n.next){if(n.type!=C.NOTE&&n.type!=C.REST){if(n.type==C.GRACE)for(i=n.extra;i;i=i.next)if(i.slur_start||i.sl1)u=!0;continue}if(n.slur_start||n.slur_end||n.sl1||n.sl2)u=!0;n.st<s&&(s=n.st);if(t==0){n.tp1&&draw_tuplet(n,1);if(n.te0)break}else if(n.te1)break}if(!n){error(1,e,"No end of tuplet in this music line"),t==0?e.tp0=0:e.tp1=0;return}if(u){draw_slurs(e,n);if(e.slur_start||e.sl1)return;for(r=e.next;r!=n;r=r.next)if(r.slur_start||r.slur_end||r.sl1||r.sl2)return;if(n.slur_end||n.sl2)return}t==0?(E=e.tp0,e.tp0=0,S=e.tq0):(E=e.tp1,e.tp1=0,S=e.tq1);if(e.tf[0]==1)return;w=e.tf[3],w||(w=e.stem>0?C.SL_ABOVE:C.SL_BELOW);if(e==n)o=!0;else if(e.tf[1]==1)o=!0,draw_slur(e,n,-1,-1,w);else if(e.tf[0]==2||e.type!=C.NOTE||n.type!=C.NOTE)o=!1;else{o=!0;for(r=e;;r=r.next){if(r.type!=C.NOTE&&r.type!=C.REST){if(r.type==C.GRACE||r.type==C.SPACE)continue;o=!1;break}if(r==n)break;if(r.beam_end){o=!1;break}}if(o&&!e.beam_st&&!e.beam_br1&&!e.beam_br2)for(r=e.prev;r;r=r.prev)if(r.type==C.NOTE||r.type==C.REST){r.nflags>=e.nflags&&(o=!1);break}if(o&&!n.beam_end)for(r=n.next;r;r=r.next)if(r.type==C.NOTE||r.type==C.REST){!r.beam_br1&&!r.beam_br2&&r.nflags>=n.nflags&&(o=!1);break}}if(o){if(e.tf[2]==1)return;h=(n.x+e.x)/2,e==n?d=0:d=(n.ys-e.ys)/(n.x-e.x),b=e.ys-d*e.x,m=d*h+b,w==C.SL_ABOVE?(p=y_get(s,1,h-4,8),p>m&&(b+=p-m),b+=2):(p=y_get(s,0,h-4,8),p<m&&(b+=p-m),b-=10);for(r=e;;r=r.next)if(r.x>=h)break;e.stem*n.stem>0&&(e.stem>0?h+=1.5:h-=1.5),p=d*h+b,e.tf[2]==0?out_bnum(h,p,E):out_bnum(h,p,E+":"+S),w==C.SL_ABOVE?(p+=10,r.ymx<p&&(r.ymx=p),y_set(s,!0,h-3,6,p)):(r.ymn>p&&(r.ymn=p),y_set(s,!1,h-3,6,p));return}e.tf[1]!=0&&error(2,e,"'what' value of %%tuplets not yet coded"),w=e.tf[3],w||(w=e.multi>=0?C.SL_ABOVE:C.SL_BELOW);if(w==C.SL_ABOVE){e.st==n.st?l=c=staff_tb[s].topbar+4:(l=e.ymx,c=n.ymx),a=e.x-4;if(e.st==s){for(r=e;!r.dur;r=r.next);p=y_get(s,1,r.x-4,8),p>l&&(l=p),e.stem>0&&(a+=3)}if(n.st==s){for(r=n;!r.dur;r=r.prev);p=y_get(s,1,r.x-4,8),p>c&&(c=p)}n.dur>n.prev.dur?n.next?f=n.next.x-n.next.wl-5:f=realwidth-6:(f=n.x+4,x=n.stem>=0?0:n.nhd,n.notes[x].shhd>0&&(f+=n.notes[x].shhd),n.st==s&&n.stem>0&&(f+=3.5)),h=.5*(a+f),p=.5*(l+c),d=(c-l)/(f-a),v=3*(n.notes[n.nhd].pit-e.notes[e.nhd].pit)/(f-a),v>0?d<0?d=0:d>v&&(d=v):d>0?d=0:d<v&&(d=v),d*d<.1*.1&&(d=0),y=0;for(r=e;;r=r.next){if(!r.dur||r.st!=s){if(r==n)break;continue}m=p+(r.x-h)*d,g=y_get(s,1,r.x-4,8)+2,g-m>y&&(y=g-m);if(r==n)break}p+=y,l=p+d*(a-h),c=p+d*(f-h),p+=8;for(r=e;;r=r.next)if(r.st==s){m=p+(r.x-h)*d,r.ymx<m&&(r.ymx=m);if(r==n)break;y_set(s,!0,r.x,r.next.x-r.x,m)}else if(r==n)break}else{a=e.x-7,n.dur>n.prev.dur?n.next?f=n.next.x-n.next.wl-8:f=realwidth-6:(f=n.x+2,n.notes[n.nhd].shhd>0&&(f+=n.notes[n.nhd].shhd)),e.stem>=0&&(a+=2,f+=2);if(e.st==s){for(r=e;!r.dur;r=r.next);l=y_get(s,0,r.x-4,8)}else l=0;if(n.st==s){for(r=n;!r.dur;r=r.prev);c=y_get(s,0,r.x-4,8)}else c=0;h=.5*(a+f),p=.5*(l+c),d=(c-l)/(f-a),v=3*(n.notes[0].pit-e.notes[0].pit)/(f-a),v>0?d<0?d=0:d>v&&(d=v):d>0?d=0:d<v&&(d=v),d*d<.1*.1&&(d=0),y=0;for(r=e;;r=r.next){if(!r.dur||r.st!=s){if(r==n)break;continue}m=p+(r.x-h)*d,g=y_get(s,0,r.x-4,8),g-m<y&&(y=g-m);if(r==n)break}p+=y-10,l=p+d*(a-h),c=p+d*(f-h),p-=2;for(r=e;;r=r.next){if(r.st==s){if(r==n)break;m=p+(r.x-h)*d,r.ymn>m&&(r.ymn=m),y_set(s,!1,r.x,r.next.x-r.x,m)}if(r==n)break}}if(e.tf[2]==1){out_tubr(a,l+4,f-a,c-l,w==C.SL_ABOVE);return}out_tubrn(a,l,f-a,c-l,w==C.SL_ABOVE,e.tf[2]==0?E.toString():E+":"+S),m=.5*(l+c),w==C.SL_ABOVE?y_set(s,!0,h-3,6,m+9):y_set(s,!1,h-3,6,m)}function draw_note_ties(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m,g,y;for(s=0;s<n.length;s++){u=n[s],f=e.notes[u].pit,a=r[s],l=i!=2?t.notes[a].pit:f,o=(e.notes[u].ti1&7)==C.SL_ABOVE?1:-1,d=e.x,g=e.notes[u].shhd,o>0?u<e.nhd&&f+1==e.notes[u+1].pit&&e.notes[u+1].shhd>g&&(g=e.notes[u+1].shhd):u>0&&f==e.notes[u-1].pit+1&&e.notes[u-1].shhd>g&&(g=e.notes[u-1].shhd),d+=g*.6,v=t.x,i!=2&&(g=t.notes[a].shhd,o>0?a<t.nhd&&l+1==t.notes[a+1].pit&&t.notes[a+1].shhd<g&&(g=t.notes[a+1].shhd):a>0&&l==t.notes[a-1].pit+1&&t.notes[a-1].shhd<g&&(g=t.notes[a-1].shhd),v+=g*.6),h=e.st;switch(i){case 0:f!=l&&!(f&1)&&(f=l);break;case 3:o=-o;case 1:d=e.x,d>v-20&&(d=v-20),f=l,h=t.st;break;default:if(e!=t)v-=t.wl,t.type==C.BAR&&(v+=5);else{y=e.time+e.dur;for(p=e.ts_next;p;p=p.ts_next)if(p.time>y)break;v=p?p.x:realwidth}v<d+16&&(v=d+16)}v-d>20?(d+=3.5,v-=3.5):(d+=1.5,v-=1.5),c=3*(f-18),m=(.04*(v-d)+10)*o,slur_out(d,staff_tb[h].y+c,v,staff_tb[h].y+c,o,m,e.notes[u].ti1&C.SL_DOTTED)}}function draw_ties(e,t,n){var r,i,s,o,u,a,f,l=[],c=[],h=[],p=e.nhd,d=e.time+e.dur;if(n==2){for(i=0;i<=p;i++)e.notes[i].ti1&&h.push(i);draw_note_ties(e,t||e,h,h,n);return}for(i=0;i<=p;i++){if(!e.notes[i].ti1)continue;f=-1,u=e.notes[i].opit||e.notes[i].pit;for(o=t.nhd;o>=0;o--){a=t.notes[o].opit||t.notes[o].pit;switch(a-u){case 1:case-1:e.notes[i].acc!=t.notes[o].acc&&(f=o);default:continue;case 0:f=o}break}f>=0?(l.push(i),c.push(f)):h.push(i)}draw_note_ties(e,t,l,c,n);if(!h.length)return;r=e.ts_next;while(r&&r.time<d)r=r.ts_next;while(r&&r.time==d){if(r.type!=C.NOTE||r.st!=e.st){r=r.ts_next;continue}l.length=0,c.length=0;for(i=h.length;--i>=0;){s=h[i],u=e.notes[s].opit||e.notes[s].pit;for(o=r.nhd;o>=0;o--){a=r.notes[o].opit||r.notes[o].pit;if(a==u){l.push(s),c.push(o),h[i]=h.pop();break}}}if(l.length>0){draw_note_ties(e,r,l,c,n==1?1:0);if(h.length==0)return}r=r.ts_next}h.length!=0&&error(1,e,"Bad tie")}function tie_comb(e){var t,n,r;n=e.time+e.dur,r=e.st;for(t=e.ts_next;t;t=t.ts_next){if(t.st!=r)continue;if(t.time==n){if(t.type==C.NOTE)return t;continue}if(t.time>n)return e}return}function draw_all_ties(e){function l(e,t,n){var r;if(e.type==C.GRACE)for(r=e.extra;r;r=r.next)r.ti1&&draw_ties(r,t,n);else draw_ties(e,t,n)}var t,n,r,i,s,o,u,a,f;for(t=e.sym;t;t=t.next){switch(t.type){case C.CLEF:case C.KEY:case C.METER:continue}break}o=e.s_rtie;for(n=t;n;n=n.next){if(n.dur||n.type==C.GRACE)break;if(n.type!=C.BAR||!n.text)continue;n.text[0]=="1"?o=e.s_tie:e.s_tie=o}if(!n)return;e.s_tie&&(e.s_tie.x=t.x+t.wr,t=e.s_tie,e.s_tie=null,t.st=n.st,t.ts_next=n.ts_next,t.time=n.time-t.dur,draw_ties(t,n,1));for(;;){for(t=n;t;t=t.next){if(t.ti1)break;if(!o)continue;if(t.type!=C.BAR||!t.text)continue;if(t.text[0]=="1"){o=null;continue}if(t.bar_type=="|")continue;for(n=t.next;n;n=n.next)if(n.type==C.NOTE)break;if(!n){t=null;break}u=clone(o),u.x=t.x,u.next=n,u.st=n.st,u.time=n.time-u.dur,draw_ties(u,n,1)}if(!t)break;s=t.time+t.dur;for(n=t.next;n;n=n.next){if(n.dur)break;if(n.type==C.BAR&&n.text){if(n.text[0]!="1")break;o=t}}if(!n){for(n=t.ts_next;n;n=n.ts_next){if(n.st!=t.st)continue;if(n.time<s)continue;if(n.time>s){n=null;break}if(n.dur)break}if(!n){l(t,null,2),e.s_tie=t;break}}else{if(n.type!=C.NOTE&&n.type!=C.BAR){error(1,t,"Bad tie");continue}if(n.time!=s){r=tie_comb(t);if(r==t){error(1,t,"Bad tie");continue}n=r}}for(r=t.ts_next;r;r=r.ts_next){if(r.st!=t.st)continue;if(r.time>s)break;if(r.type==C.CLEF){i=!0;continue}}if(i||t.st!=n.st){i=!1,f=(n.x-t.x)*.4,a=n.x,n.x-=f,n.x>t.x+32&&(n.x=t.x+32),l(t,n,2),n.x=a,a=t.x,t.x+=f,t.x<n.x-24&&(t.x=n.x-24),draw_ties(t,n,3),t.x=a;continue}l(t,n,n.type==C.NOTE?0:2)}e.s_rtie=o}function draw_all_slurs(e){var t,n,r,i=e.sym,s=e.slur_start,o=0;if(!i)return;if(s){e.slur_start=0;while(s!=0)o<<=4,o|=s&15,s>>=4}draw_slurs(i,undefined);for(;i;i=i.next)while(i.slur_end||i.sl2){if(i.slur_end)i.slur_end--,r=-1;else{for(r=0;r<=i.nhd;r++)if(i.notes[r].sl2)break;i.notes[r].sl2--,i.sl2--}s=o&15,t=prev_scut(i),draw_slur(t,i,-1,r,s);if(t.type!=C.BAR||t.bar_type[0]!=":"&&t.bar_type!="|]"&&t.bar_type!="[|"&&(!t.text||t.text[0]=="1"))o>>=4}i=e.sym;while(o!=0){s=o&15,o>>=4,t=next_scut(i),draw_slur(i,t,-1,-1,s);if(t.type!=C.BAR||t.bar_type[0]!=":"&&t.bar_type!="|]"&&t.bar_type!="[|"&&(!t.text||t.text[0]=="1"))e.slur_start||(e.slur_start=0),e.slur_start<<=4,e.slur_start+=s}}function draw_sym_near(){var e,t,n,r,i,s,o,u,a,i,f,l,c,h;h=output,output="";for(r=0;r<voice_tb.length;r++){var p={},d=!0;e=voice_tb[r];for(n=e.sym;n;n=n.next)switch(n.type){case C.GRACE:for(o=n.extra;o;o=o.next)o.beam_st&&!o.beam_end&&self.calculate_beam(p,o);break;case C.NOTE:if(n.beam_st&&!n.beam_end||d&&!n.beam_st)d=!1,self.calculate_beam(p,n)}}for(i=0;i<=nstaff;i++){t=staff_tb[i],t.top||(t.top=new Float32Array(YSTEP),t.bot=new Float32Array(YSTEP));for(a=0;a<YSTEP;a++)t.top[a]=0,t.bot[a]=24}set_tie_room(),draw_deco_near();for(n=tsfirst;n;n=n.ts_next){if(n.invis)continue;switch(n.type){case C.GRACE:for(o=n.extra;o;o=o.next)y_set(n.st,!0,o.x-2,4,o.ymx+1),y_set(n.st,!1,o.x-2,4,o.ymn-1);continue;case C.MREST:y_set(n.st,!0,n.x+16,32,n.ymx+2);continue;default:y_set(n.st,!0,n.x-n.wl,n.wl+n.wr,n.ymx+2),y_set(n.st,!1,n.x-n.wl,n.wl+n.wr,n.ymn-2);continue;case C.NOTE:}n.stem>0?(n.beam_st?(f=3,u=n.beam_end?4:10):(f=-8,u=n.beam_end?11:16),y_set(n.st,!0,n.x+f,u,n.ymx),y_set(n.st,!1,n.x-n.wl,n.wl+n.wr,n.ymn)):(y_set(n.st,!0,n.x-n.wl,n.wl+n.wr,n.ymx),n.beam_st?(f=-6,u=n.beam_end?4:10):(f=-8,u=n.beam_end?5:16),f+=n.notes[0].shhd,y_set(n.st,!1,n.x+f,u,n.ymn)),n.notes[n.nhd].acc&&(s=n.y+8,n.ymx<s&&(n.ymx=s),y_set(n.st,!0,n.x,0,s)),n.notes[0].acc&&(s=n.y,n.notes[0].acc==1||n.notes[0].acc==3?s-=7:s-=5,n.ymn>s&&(n.ymn=s),y_set(n.st,!1,n.x,0,s))}for(r=0;r<voice_tb.length;r++){e=voice_tb[r],n=e.sym;if(!n)continue;set_color(n.color),i=e.st,set_dscale(i);for(;n;n=n.next)n.tp0&&draw_tuplet(n,0);draw_all_slurs(e);for(n=e.sym;n;n=n.next)n.tp0&&draw_tuplet(n,0)}for(i=0;i<=nstaff;i++){t=staff_tb[i],l=t.topbar+2,c=t.botbar-2;for(a=0;a<YSTEP;a++)l>t.top[a]&&(t.top[a]=l),c<t.bot[a]&&(t.bot[a]=c)}set_color(undefined),draw_deco_note(),draw_deco_staff(),set_dscale(-1);for(r=0;r<voice_tb.length;r++){e=voice_tb[r];if(e.have_ly){draw_all_lyrics();break}}cfmt.measurenb>=0&&draw_measnb(),set_dscale(-1),output=h}function draw_vname(e){var t,n,r,i,s,o,u,a,f=[];for(r=cur_sy.nstaff;r>=0;r--)if(cur_sy.st_print[r])break;if(r<0)return;for(i=0;i<voice_tb.length;i++){t=voice_tb[i];if(!t.sym)continue;r=cur_sy.voices[i].st;if(!cur_sy.st_print[r])continue;if(t.new_name){a=2;break}t.snm&&(a=1)}if(!a)return;for(i=0;i<voice_tb.length;i++){t=voice_tb[i];if(!t.sym)continue;r=cur_sy.voices[i].st;if(!cur_sy.st_print[r])continue;t.new_name&&delete t.new_name,o=a==2?t.nm:t.snm;if(!o)continue;if(cur_sy.staves[r].flags&CLOSE_BRACE2)while(!(cur_sy.staves[r].flags&OPEN_BRACE2))r--;else if(cur_sy.staves[r].flags&CLOSE_BRACE)while(!(cur_sy.staves[r].flags&OPEN_BRACE))r--;f[r]?f[r]+="\\n"+o:f[r]=o}if(f.length==0)return;set_font("voice"),e=-e*.5;for(r=0;r<f.length;r++){if(!f[r])continue;s=f[r].split("\\n"),u=staff_tb[r].y+staff_tb[r].topbar*.5*staff_tb[r].staffscale+9*(s.length-1)-gene.curfont.size*.3,n=r;if(cur_sy.staves[r].flags&OPEN_BRACE2)while(!(cur_sy.staves[n].flags&CLOSE_BRACE2))n++;else if(cur_sy.staves[r].flags&OPEN_BRACE)while(!(cur_sy.staves[n].flags&CLOSE_BRACE))n++;n!=r&&(u-=(staff_tb[r].y-staff_tb[n].y)*.5);for(n=0;n<s.length;n++)o=s[n],xy_str(e,u,o,"c"),u-=18}}function set_staff(){var e,t,n,r,i,s,o,u,a,f,l,c,h;for(i=0;i<voice_tb.length;i++)c=voice_tb[i],c.scale!=1&&(c.scale_str='transform="scale('+c.scale.toFixed(2)+')"');for(n=0;n<=nstaff;n++)if(gene.st_print[n])break;s=0;if(n>nstaff)n--,h=staff_tb[n];else{h=staff_tb[n];for(t=0;t<YSTEP;t++)l=h.top[t],s<l&&(s=l)}s+=draw_partempo(n,s);if(!gene.st_print[n])return s;s*=h.staffscale,o=cfmt.staffsep*.5+h.topbar*h.staffscale,s<o&&(s=o),s<h.ann_top&&(s=h.ann_top),h.y=-s,r=n;var p=cur_sy.staves[r];for(n++;n<=nstaff;n++){h=staff_tb[n];if(!gene.st_print[n])continue;o=p.sep||cfmt.sysstaffsep,a=p.maxsep||cfmt.maxsysstaffsep,u=0;if(h.staffscale==staff_tb[r].staffscale){for(t=0;t<YSTEP;t++)l=h.top[t]-staff_tb[r].bot[t],u<l&&(u=l);u*=h.staffscale}else for(t=0;t<YSTEP;t++)l=h.top[t]*h.staffscale-staff_tb[r].bot[t]*staff_tb[r].staffscale,u<l&&(u=l);o+=h.topbar*h.staffscale,u<o&&(u=o),a+=h.topbar*h.staffscale,u>a&&(u=a),s+=u,h.y=-s,r=n,p=cur_sy.staves[r]}f=0;for(t=0;t<YSTEP;t++)l=staff_tb[r].bot[t],f>l&&(f=l);f>h.ann_bot&&(f=h.ann_bot),f*=staff_tb[r].staffscale;for(n=0;n<=nstaff;n++)h=staff_tb[n],u=h.y,h.staffscale!=1&&(h.scale_str='transform="translate(0,'+(posy-u).toFixed(2)+") "+"scale("+h.staffscale.toFixed(2)+')"');if(f==0){for(n=nstaff;n>=0;n--)if(gene.st_print[n])break;if(n<0)return s}return u=-f,o=cfmt.staffsep*.5,u<o&&(u=o),a=cfmt.maxstaffsep*.5,u>a&&(u=a),s+u}function draw_systems(e){function p(){var e,t,n,r,i=0;for(e=0;e<=cur_sy.nstaff;e++){if(l[e]<0){c[e]=h[e]=0;continue}t=staff_tb[e].staffscale,n=staff_tb[e].topbar*t,r=staff_tb[e].botbar*t,i==0&&(i=staff_tb[e].y+n),c[e]=staff_tb[e].y+r,h[e]=i-c[e],i=cur_sy.staves[e].flags&STOP_BAR?0:c[e]}}function d(e,t,n){var r,i,s,o,u,a=0,f="",l=cur_sy.staves[e].stafflines,c=l.length;if(!/[\[|]/.test(l))return;r=n-t,set_sscale(e),i=r/stv_g.scale;if(cache&&cache.st_l==l&&cache.st_ws==i){xygl(t,staff_tb[e].y,"stdef"+cfmt.fullsvg);return}for(s=0;s<c;s++,a-=6){if(l[s]==".")continue;o=0;for(;s<c;s++,a-=6,o-=6){switch(l[s]){case".":case"-":continue;case u:f+="m-"+i.toFixed(2)+" "+o+"h"+i.toFixed(2),o=0;continue}u!=undefined&&(f+='"/>\n'),u=l[s],f+='<path class="stroke"',u=="["&&(f+=' stroke-width="1.5"'),f+=' d="m0 '+a+"h"+i.toFixed(2),o=0}f+='"/>\n'}a=staff_tb[e].y;if(!cache&&r==get_lwidth()){cache={st_l:l,st_ws:i},s="stdef"+cfmt.fullsvg,glyphs[s]='<g id="'+s+'">\n'+f+"</g>",xygl(t,a,s);return}out_XYAB('<g transform="translate(X, Y)">\n'+f+"</g>\n",t,a)}var t,n,r,i,s,o,u,a,f,l=[],c=[],h=[];draw_vname(e);for(r=0;r<=nstaff;r++)l[r]=cur_sy.st_print[r]?0:-1;p(),draw_lstaff(0);for(t=tsfirst;t;t=t.ts_next){if(f&&t.time!=f){f=0;for(r=0;r<=nstaff;r++)cur_sy.st_print[r]||(l[r]=-1);p()}switch(t.type){case C.STAVES:a=t.ts_prev.type==C.BAR?t.ts_prev.x:0;if(!a){for(n=t.ts_next;n;n=n.ts_next){if(n.time!=t.time)break;switch(n.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:a=n.x;continue}break}n||(a=realwidth)}u=t.sy;for(r=0;r<=nstaff;r++){i=l[r];if(i<0){u.st_print[r]&&(l[r]=a?a:t.x-t.wl-2);continue}if(u.st_print[r]&&u.staves[r].stafflines==cur_sy.staves[r].stafflines)continue;a?(s=a,f=t.time):(s=t.x-t.wl-2,l[r]=-1),d(r,i,s),u.st_print[r]&&(l[r]=s)}cur_sy=u,p();continue;case C.BAR:r=t.st;if(t.second||t.invis)break;draw_bar(t,c[r],h[r]);break;case C.STBRK:if(cur_sy.voices[t.v].range==0&&t.xmx>14){var v=0;for(var m=0;m<voice_tb.length;m++)cur_sy.voices[m].range>0&&v++;for(n=t.ts_next;n;n=n.ts_next){if(n.type!=C.STBRK)break;v--}v==0&&draw_lstaff(t.x)}n=t.prev;if(!n)break;s=n.x,n.type!=C.BAR&&(s+=n.wr),r=t.st,i=l[r];if(i>=0){if(i>=s)continue;d(r,i,s)}l[r]=t.x}}for(r=0;r<=nstaff;r++){if(f&&!cur_sy.st_print[r])continue;i=l[r];if(i<0||i>=realwidth)continue;d(r,i,realwidth)}}function draw_symbols(e){var t={},n,r,i,s,o;for(n=e.sym;n;n=n.next){if(n.invis)switch(n.type){case C.KEY:e.key=n;default:continue;case C.NOTE:}i=n.x,set_color(n.color);switch(n.type){case C.NOTE:set_scale(n),n.beam_st&&!n.beam_end&&self.calculate_beam(t,n)&&draw_beams(t),n.invis||(anno_start(n),draw_note(n,!t.s2),anno_stop(n)),n==t.s2&&(t.s2=null);break;case C.REST:draw_rest(n);break;case C.BAR:break;case C.CLEF:o=n.st,n.time>staff_tb[o].clef.time&&(staff_tb[o].clef=n);if(n.second)break;if(!staff_tb[n.st].topbar)break;set_color(undefined),set_sscale(o),anno_start(n),s=staff_tb[o].y,n.clef_name?xygl(i,s+n.y,n.clef_name):n.clef_small?xygl(i,s+n.y,"s"+n.clef_type+"clef"):xygl(i,s+n.y,n.clef_type+"clef"),n.clef_octave&&(n.clef_octave>0?(s+=n.ymx-10,n.clef_small&&(s-=1)):(s+=n.ymn+6,n.clef_small&&(s+=1)),xygl(i-2,s,"oct")),anno_stop(n);break;case C.METER:e.meter=n;if(n.second||!staff_tb[n.st].topbar)break;if(cfmt.alignbars&&n.st!=0)break;set_color(undefined),set_sscale(n.st),anno_start(n),draw_meter(i,n),anno_stop(n);break;case C.KEY:e.key=n;if(n.second||!staff_tb[n.st].topbar)break;set_color(undefined),set_sscale(n.st),anno_start(n),draw_keysig(e,i,n),anno_stop(n);break;case C.MREST:set_scale(n),i+=32,anno_start(n),xygl(i,staff_tb[n.st].y+12,"mrest"),out_XYAB('<text style="font:bold 15px serif"\n x ="X" y="Y" text-anchor="middle">A</text>\n',i,staff_tb[n.st].y+28,n.nmes),anno_stop(n);break;case C.GRACE:set_scale(n),draw_gracenotes(n);break;case C.SPACE:case C.STBRK:break;case C.CUSTOS:set_scale(n),draw_note(n,0);break;case C.BLOCK:case C.PART:case C.REMARK:case C.STAVES:case C.TEMPO:break;default:error(2,n,"draw_symbols - Cannot draw symbol "+n.type)}}set_scale(e.sym),draw_all_ties(e),set_color(undefined)}function draw_all_sym(){var e,t,n=voice_tb.length;for(t=0;t<n;t++)e=voice_tb[t],e.sym&&e.sym.x!=undefined&&self.draw_symbols(e);draw_all_deco(),set_sscale(-1)}function set_tie_dir(e){var t,n,r,i,s,o,u;for(t=e;t;t=t.next){if(!t.ti1)continue;if(t.multi!=0){i=t.multi>0?C.SL_ABOVE:C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if((u&7)!=C.SL_AUTO)continue;t.notes[n].ti1=u&C.SL_DOTTED|i}continue}s=r=0,o=128;for(n=0;n<=t.nhd;n++)t.notes[n].ti1&&(r++,o<128&&t.notes[n].pit<=o+1&&s++,o=t.notes[n].pit);if(r<=1){i=t.stem<0?C.SL_ABOVE:C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u){(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i);break}}continue}if(s==0){if(r&1){r=(r-1)/2,i=C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u==0)continue;r==0&&t.notes[n].pit>=22&&(i=C.SL_ABOVE),(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i),r--==0&&(i=C.SL_ABOVE)}continue}r/=2,i=C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u==0)continue;(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i),--r==0&&(i=C.SL_ABOVE)}continue}o=128;for(n=0;n<=t.nhd;n++)if(t.notes[n].ti1){if(o<128&&t.notes[n].pit<=o+1){r=n;break}o=t.notes[n].pit}i=C.SL_BELOW;for(n=0;n<=t.nhd;n++){u=t.notes[n].ti1;if(u==0)continue;r==n&&(i=C.SL_ABOVE),(u&7)==C.SL_AUTO&&(t.notes[n].ti1=u&C.SL_DOTTED|i)}}}function set_tie_room(){var e,t,n,r,i,s,o;for(r=0;r<voice_tb.length;r++){e=voice_tb[r],t=e.sym;if(!t)continue;t=t.next;if(!t)continue;set_tie_dir(t);for(;t;t=t.next){if(!t.ti1)continue;if(!(t.notes[0].pit<20&&(t.notes[0].ti1&7)==C.SL_BELOW||t.notes[t.nhd].pit>24&&(t.notes[t.nhd].ti1&7)==C.SL_ABOVE))continue;n=t.next;while(n&&n.type!=C.NOTE)n=n.next;if(n){if(n.st!=t.st)continue;i=n.x-t.x-10}else i=realwidth-t.x-10;i<100?o=9:i<300?o=12:o=16,t.notes[t.nhd].pit>24&&(s=3*(t.notes[t.nhd].pit-18)+o,t.ymx<s&&(t.ymx=s),n&&n.ymx<s&&(n.ymx=s),y_set(t.st,!0,t.x+5,i,s)),t.notes[0].pit<20&&(s=3*(t.notes[0].pit-18)-o,t.ymn>s&&(t.ymn=s),n&&n.ymn>s&&(n.ymn=s),y_set(t.st,!1,t.x+5,i,s))}}}function get_bool(e){return!e||!/^(0|n|f)/i.test(e)}function get_font_scale(e){var t=e.split(/\s+/);if(t.length<=1)return;var n=parseFloat(t[t.length-1]);if(isNaN(n)||t<=0){syntax(1,"Bad scale value in %%font");return}font_scale_tb[t[0]]=n;for(var r in font_tb){if(!font_tb.hasOwnProperty(r))continue;var i=font_tb[r];i.name==t[0]&&(i.swfac=i.size*n)}}function param_set_font(e,t){var n,r,i,s,o,u,a,f,l,c;if(e[e.length-2]=="-"){s=e[e.length-1];if(s<"1"||s>"9")return;e="u"+s+"font"}r=cfmt[e],r&&(n=font_tb[r],n&&(i=n.name+"."+n.size,n.class&&(i+="."+n.class))),s=t.indexOf("class="),s>=0&&(s+=6,o=t.indexOf(" ",s),o>0?c=t.slice(s,o):c=t.slice(s),t=t.replace(new RegExp("class="+c),"").trim()),o=t.split(/\s+/),u=o[0],u=="*"&&n?u=n.name:(u=u.replace("Times-Roman","serif"),u=u.replace("Times","serif"),u=u.replace("Helvetica","sans-serif"),u=u.replace("Courier","monospace")),o.length>1?(f=o[o.length-1],f=="*"&&n&&(f=n.size)):n&&(f=n.size);if(!f)return;a=u+"."+f,c&&(a+="."+c);if(a==i)return;n=font_tb[a],n||(l=font_scale_tb[u],l||(l=1.1),n={name:u,size:Number(f),swfac:f*l},font_tb[a]=n),c&&(n.class=c),cfmt[e]=a}function get_unit(e){var t=parseFloat(e);switch(e.slice(-2)){case"CM":case"cm":t*=CM;break;case"IN":case"in":t*=IN;break;case"PT":case"pt":t*=.75}return t}function set_infoname(e){var t=cfmt.infoname.split("\n"),n=e[0];for(var r=0;r<t.length;r++){var i=t[r];if(i[0]!=n)continue;e.length==1?t.splice(r,1):t[r]=e,cfmt.infoname=t.join("\n");return}cfmt.infoname+="\n"+e}function get_textopt(e){return textopt[e]}function set_pos(e,t){e=e.slice(0,3),e=="ste"&&(e="stm"),self.set_v_param("pos",e+" "+t)}function set_writefields(e){var t,n,r=e.split(/\s+/);if(get_bool(r[1]))for(n=0;n<r[0].length;n++)t=r[0][n],cfmt.writefields.indexOf(t)<0&&(cfmt.writefields+=t);else for(n=0;n<r[0].length;n++)t=r[0][n],cfmt.writefields.indexOf(t)>=0&&(cfmt.writefields=cfmt.writefields.replace(t,""))}function set_v_param(e,t){if(curvoice){self.set_vp([e+"=",t]);return}e=[e+"=",t];var n="*";info.V||(info.V={}),info.V[n]?Array.prototype.push.apply(info.V[n],e):info.V[n]=e}function set_page(){if(!img.chg)return;img.chg=!1,img.lm=cfmt.leftmargin-cfmt.printmargin,img.lm<0&&(img.lm=0),img.rm=cfmt.rightmargin-cfmt.printmargin,img.rm<0&&(img.rm=0),img.width=cfmt.pagewidth-2*cfmt.printmargin,img.width-img.lm-img.rm<100&&(error(0,undefined,"Bad staff width"),img.width=img.lm+img.rm+150),set_posx()}function set_format(e,t,n){var r,i,s,o,u;if(n)fmt_lock[e]=!0;else if(fmt_lock[e])return;if(/.+font(-[\d])?$/.test(e)){t.slice(-4)==" box"&&(o=!0,t=t.slice(0,-4)),param_set_font(e,t);switch(e){case"gchordfont":cfmt.gchordbox=o;break;case"measurefont":cfmt.measurebox=o;break;case"partsfont":cfmt.partsbox=o}return}switch(e){case"aligncomposer":case"barsperstaff":case"infoline":case"measurefirst":case"measurenb":case"rbmax":case"rbmin":case"shiftunison":s=parseInt(t);if(isNaN(s)){syntax(1,"Bad integer value");break}cfmt[e]=s;break;case"microscale":r=parseInt(t);if(isNaN(r)||r<4||r>256||r%1){syntax(1,errs.bad_val,"%%"+e);break}self.set_v_param("uscale",r);break;case"bgcolor":case"dblrepbar":case"titleformat":cfmt[e]=t;break;case"breaklimit":case"lineskipfac":case"maxshrink":case"pagescale":case"parskipfac":case"scale":case"slurheight":case"stemheight":case"stretchlast":r=parseFloat(t);if(isNaN(r)){syntax(1,errs.bad_val,"%%"+e);break}switch(e){case"scale":r/=.75;case"pagescale":e="scale",img.chg=!0}cfmt[e]=r;break;case"bstemdown":case"breakoneoln":case"cancelkey":case"contbarnb":case"custos":case"decoerr":case"dynalign":case"flatbeams":case"gchordbox":case"graceslurs":case"graceword":case"hyphencont":case"keywarn":case"linewarn":case"measurebox":case"partsbox":case"rbdbstop":case"singleline":case"squarebreve":case"straightflags":case"stretchstaff":case"timewarn":case"titlecaps":case"titleleft":cfmt[e]=get_bool(t);break;case"chordnames":s=t.split(","),cfmt.chordnames={};for(u=0;u<s.length;u++)cfmt.chordnames["CDEFGAB"[u]]=s[u];break;case"composerspace":case"indent":case"infospace":case"maxstaffsep":case"maxsysstaffsep":case"musicspace":case"partsspace":case"staffsep":case"subtitlespace":case"sysstaffsep":case"textspace":case"titlespace":case"topspace":case"vocalspace":case"wordsspace":r=get_unit(t),isNaN(r)?syntax(1,errs.bad_val,"%%"+e):cfmt[e]=r;break;case"print-leftmargin":syntax(0,"$1 is deprecated - use %%printmargin instead","%%"+e),e="printmargin";case"printmargin":case"leftmargin":case"pagewidth":case"rightmargin":r=get_unit(t);if(isNaN(r)){syntax(1,errs.bad_val,"%%"+e);break}cfmt[e]=r,img.chg=!0;break;case"concert-score":cfmt.sound!="play"&&(cfmt.sound="concert");break;case"writefields":set_writefields(t);break;case"dynamic":case"gchord":case"gstemdir":case"ornament":case"stemdir":case"vocal":case"volume":set_pos(e,t);break;case"font":get_font_scale(t);break;case"fullsvg":if(parse.state!=0){syntax(1,"Cannot have %%fullsvg inside a tune");break}cfmt[e]=t;break;case"gracespace":s=t.split(/\s+/);for(u=0;u<3;u++)if(isNaN(Number(s[u]))){syntax(1,errs.bad_val,"%%gracespace");break}for(u=0;u<3;u++)cfmt[e]=Number(s[u]);break;case"tuplets":cfmt[e]=t.split(/\s+/),s=cfmt[e][3],s&&posval[s]&&(cfmt[e][3]=posval[s]);break;case"infoname":set_infoname(t);break;case"notespacingfactor":r=parseFloat(t);if(isNaN(r)||r<1||r>2){syntax(1,errs.bad_val,"%%"+e);break}u=5,i=space_tb[u];for(;--u>=0;)i/=r,space_tb[u]=i;u=5,i=space_tb[u];for(;++u<space_tb.length;)i*=r,space_tb[u]=i;break;case"play":cfmt.sound="play";break;case"pos":e=t.split(/\s+/),set_pos(e[0],e[1]);break;case"sounding-score":cfmt.sound!="play"&&(cfmt.sound="sounding");break;case"staffwidth":s=get_unit(t);if(isNaN(s)){syntax(1,errs.bad_val,"%%"+e);break}if(s<100){syntax(1,"%%staffwidth too small");break}s=cfmt.pagewidth-s-cfmt.leftmargin;if(s<2){syntax(1,"%%staffwidth too big");break}cfmt.rightmargin=s,img.chg=!0;break;case"textoption":cfmt[e]=get_textopt(t);break;case"titletrim":s=Number(t),isNaN(s)?cfmt[e]=get_bool(t):cfmt[e]=s;break;case"combinevoices":syntax(1,"%%combinevoices is deprecated - use %%voicecombine instead");break;case"voicemap":self.set_v_param("map",t);break;case"voicescale":self.set_v_param("scale",t);break;default:parse.state==0&&(cfmt[e]=t)}}function font_init(){param_set_font("annotationfont","sans-serif 12"),param_set_font("composerfont","serifItalic 14"),param_set_font("footerfont","serif 16"),param_set_font("gchordfont","sans-serif 12"),param_set_font("headerfont","serif 16"),param_set_font("historyfont","serif 16"),param_set_font("infofont","serifItalic 14"),param_set_font("measurefont","serifItalic 14"),param_set_font("partsfont","serif 15"),param_set_font("repeatfont","serif 13"),param_set_font("subtitlefont","serif 16"),param_set_font("tempofont","serifBold 15"),param_set_font("textfont","serif 16"),param_set_font("titlefont","serif 20"),param_set_font("vocalfont","serifBold 13"),param_set_font("voicefont","serifBold 13"),param_set_font("wordsfont","serif 16")}function style_font(e){var t=e.split("."),n=t[1],r,i;return e=t[0].toLowerCase(),t="",r=e.indexOf("-"),r<0&&(r=e.length),i=e.indexOf("italic"),i>=0&&(t+="italic ",i<r&&(r=i)),i=e.indexOf("oblique"),i>=0&&(t+="oblique ",i<r&&(r=i)),i=e.indexOf("bold"),i>=0&&(t+="bold ",i<r&&(r=i)),r>0&&(e=e.slice(0,r)),"font:"+t+n+"px "+e}function font_class(e){return e.class?"f"+e.fid+cfmt.fullsvg+" "+e.class:"f"+e.fid+cfmt.fullsvg}function style_add_font(e){font_style+="\n.f"+e.fid+cfmt.fullsvg+" {"+style_font(e.name+"."+e.size)+"}"}function use_font(e){defined_font[e.fid]||(defined_font[e.fid]=!0,style_add_font(e))}function get_font(e){e+="font";var t=cfmt[e],n=font_tb[t];return n||(syntax(1,"Unknown font $1",e),n=gene.curfont),n.fid||(n.fid=fid++),use_font(n),n}function cnv_escape(e){var t,n,r="",i,s=0,o;for(;;){i=e.indexOf("\\",s);if(i<0)break;r+=e.slice(s,i),t=e[++i];if(!t)return r+"\\";switch(t){case"0":case"2":if(e[i+1]!="0")break;n=oct_acc[e[i+2]];if(n){r+=n,s=i+3;continue}break;case"u":s=Number("0x"+e.slice(i+1,i+5));if(isNaN(s)||s<32){r+=e[++i]+"̆",s=i+1;continue}o=[s];if(s>=55296&&s<=57343){s=Number("0x"+e.slice(i+7,i+11));if(isNaN(s))break;o.push(s),s=i+11}else s=i+5;r+=String.fromCharCode.apply(null,o);continue;case"t":r+=" ",s=i+1;continue;default:n=abc_utf[e.slice(i,i+2)];if(n){r+=n,s=i+2;continue}switch(t){case"`":r+=e[++i]+"̀",s=i+1;continue;case"'":r+=e[++i]+"́",s=i+1;continue;case"^":r+=e[++i]+"̂",s=i+1;continue;case"~":r+=e[++i]+"̃",s=i+1;continue;case"=":r+=e[++i]+"̄",s=i+1;continue;case"_":r+=e[++i]+"̅",s=i+1;continue;case".":r+=e[++i]+"̇",s=i+1;continue;case'"':r+=e[++i]+"̈",s=i+1;continue;case"o":r+=e[++i]+"̊",s=i+1;continue;case"H":r+=e[++i]+"̋",s=i+1;continue;case"v":r+=e[++i]+"̌",s=i+1;continue;case"c":r+=e[++i]+"̧",s=i+1;continue;case";":r+=e[++i]+"̨",s=i+1;continue}}r+="\\"+t,s=i+1}return r+e.slice(s)}function do_include(e){var t,n;if(!user.read_file){syntax(1,"No read_file support");return}if(include>2){syntax(1,"Too many include levels");return}include++,t=user.read_file(e);if(!t){syntax(1,"Cannot read file '$1'",e);return}n=clone(parse),tosvg(e,t),parse=n,include--}function tosvg(e,t,n,r){function C(){var e,i,s=t.indexOf("K:",n);return s<0?!1:(s=t.indexOf("\n",s),parse.select.test(t.slice(parse.bol,s))?!0:(e=/\n\w*\n/,e.lastIndex=s,i=e.exec(t),i?o=e.lastIndex:o=r,!1))}function k(e,t){var n;return e.indexOf("%")>=0&&(e=e.replace(/([^\\])%.*/,"$1").replace(/\\%/g,"%")),e=e.replace(/\s+$/,""),t&&e.indexOf("\\")>=0?cnv_escape(e):e}function L(){generate(),info.W&&put_words(info.W),put_history(),blk_flush(),parse.state=0,cfmt=g,info=y,char_tb=b,glovar=w,maps=E,mac=S,maci=x,init_tune(),img.chg=!0,set_page()}var i,s,n,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N="\n";abc2svg.modules&&(abc2svg.modules.hooks.length||abc2svg.modules.g_hooks.length)&&set_hooks(),parse.file=t,parse.fname=e,n==undefined&&(n=0),r||(r=t.length);for(;n<r;n=parse.eol+1){o=t.indexOf("\n",n);if(o<0||o>r)o=r;parse.eol=o;for(;;){o--;switch(t[o]){case" ":case" ":continue}break}o++;if(o==n){parse.state==1?(parse.istart=n,syntax(1,"Empty line in tune header - ignored")):parse.state>=2&&(L(),parse.select&&(o=t.indexOf("\nX:",parse.eol),o<0&&(o=r),parse.eol=o));continue}parse.istart=parse.bol=n,parse.iend=o,parse.line.index=0,f=t[n],l=t[n+1];if(f=="%"){if(parse.prefix.indexOf(l)<0)continue;t[n+2]=="a"&&t[n+3]=="b"&&t[n+4]=="c"&&t[n+5]==" "?(n+=6,f=t[n],l=t[n+1]):T=!0}else f=="I"&&l==":"&&(T=!0);if(T){T=!1,n+=2;for(;;){switch(t[n]){case" ":case" ":n++;continue}break}p=t.slice(n,o);if(!p||p[0]=="%")continue;d=p.split(/\s+/,2),d[0]||d.shift();switch(d[0]){case"abcm2ps":case"ss-pref":parse.prefix=d[1];continue;case"abc-include":do_include(d[1]);continue}if(d[0].slice(0,5)=="begin"){v=d[0].substr(5),u="\n"+f+l+"end"+v,i=t.indexOf(u,o);if(i<0){syntax(1,"No $1 after %%$2",u.slice(1),d[0]),parse.eol=r;continue}self.do_begin_end(v,d[1],t.slice(o+1,i).replace(new RegExp("^"+f+l,"gm"),"")),parse.eol=t.indexOf("\n",i+6),parse.eol<0&&(parse.eol=r);continue}switch(d[0]){case"select":if(parse.state!=0){syntax(1,"%%select ignored");continue}a=k(p.slice(7),!1),a[0]=='"'&&(a=a.slice(1,-1));if(!a){delete parse.select;continue}a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)"),parse.select=new RegExp(a,"m");continue;case"tune":syntax(1,"%%tune not treated yet");continue;case"voice":if(parse.state!=0){syntax(1,"%%voice ignored");continue}a=k(p.slice(6),!1);if(!a){parse.cur_tune_opts?parse.cur_tune_opts.voice_opts=null:parse.voice_opts=null;continue}if(a=="end")continue;parse.cur_tune_opts?(parse.cur_tune_opts.voice_opts||(parse.cur_tune_opts.voice_opts={}),h=parse.cur_tune_opts.voice_opts):(parse.voice_opts||(parse.voice_opts={}),h=parse.voice_opts),h[a]=[];for(;;){n=++o;if(t[n]!="%")break;o=t.indexOf("\n",o);if(t[n+1]!=l)continue;n+=2,o<0?p=t.slice(n):p=t.slice(n,o),d=p.match(/\S+/);switch(d[0]){default:h[a].push(k(p,!0));continue;case"score":case"staves":case"tune":case"voice":n-=2}break}parse.eol=n-1;continue}self.do_pscom(k(p,!0));continue}if(l!=":"||!/[A-Za-z+]/.test(f)){c=undefined;if(parse.state<2)continue;parse.line.buffer=k(t.slice(n,o),!0),parse_music_line();continue}n+=2;for(;;){switch(t[n]){case" ":case" ":n++;continue}break}p=k(t.slice(n,o),!0);if(f=="+"){if(!c){syntax(1,"+: without previous info field");continue}N=" ",f=c}switch(f){case"X":if(parse.state!=0){syntax(1,errs.ignored,f);continue}if(parse.select&&!C()){o=t.indexOf("\nX:",parse.eol),o<0&&(o=r),parse.eol=o;continue}g=clone(cfmt),cfmt.pos=clone(cfmt.pos),y=clone(info,1),b=clone(char_tb),w=clone(glovar),E=clone(maps,1),S=clone(mac),x=new Int8Array(maci),info.X=p,parse.state=1;continue;case"T":switch(parse.state){case 0:continue;case 1:info.T==undefined?info.T=p:info.T+="\n"+p;continue}m=new_block("title"),m.text=p;continue;case"K":switch(parse.state){case 0:continue;case 1:info.K=p}do_info(f,p);continue;case"W":if(parse.state==0||cfmt.writefields.indexOf(f)<0)break;info.W==undefined?info.W=p:info.W+=N+p;break;case"m":if(parse.state>=2){syntax(1,errs.ignored,f);continue}if((!cfmt.sound||cfmt.sound!="play")&&cfmt.writefields.indexOf(f)<0)break;d=p.match(/(.*?)[= ]+(.*)/);if(!d||!d[2]){syntax(1,errs.bad_val,"m:");continue}mac[d[1]]=d[2],maci[d[1].charCodeAt(0)]=1;break;case"s":if(parse.state!=3||cfmt.writefields.indexOf(f)<0)break;get_sym(p,N==" ");break;case"w":if(parse.state!=3||cfmt.writefields.indexOf(f)<0)break;get_lyrics(p,N==" ");if(p.slice(-1)=="\\"){N=" ",c=f;continue}break;case"|":if(parse.state<2)continue;parse.line.buffer=k(t.slice(n,o),!0),parse_music_line();continue;default:if("ABCDFGHOSZ".indexOf(f)>=0){if(parse.state>=2){syntax(1,errs.ignored,f);continue}info[f]?info[f]+=N+p:info[f]=p;break}do_info(f,p);continue}N="\n",c=f}if(include)return;parse.state>=2&&L(),parse.state=0}function set_head_shift(e){var t,n,r,i,s,o,u=dx_tb[e.head],a=e.stem,f=e.nhd;if(f==0)return;o=u*.78,e.grace&&(o*=.5),a>=0?(n=1,r=f+1,s=e.notes[0].pit):(o=-o,n=f-1,r=-1,s=e.notes[f].pit);var l=!1,c=0;for(t=n;t!=r;t+=a){i=e.notes[t].pit-s,s=e.notes[t].pit;if(i==0){if(l){var h=e.notes[t].shhd=e.notes[t-a].shhd+o;c<h&&(c=h);continue}if(t+a!=r&&s+a==e.notes[t+a].pit){e.notes[t].shhd=-o,c<-o&&(c=-o);continue}}i<0&&(i=-i),i>3||i>=2&&e.head!=C.SQUARE?l=!1:(l=!l,l&&(e.notes[t].shhd=o,c<o&&(c=o)))}e.xmx=c}function acc_shift(e,t){var n,r,i,s,o,u,a,f=e.length;for(n=f-1;--n>=0;){i=e[n].shhd;if(!i||i>0)continue;i=t-i,o=e[n].pit;for(r=f;--r>=0;){if(!e[r].acc)continue;u=e[r].pit;if(u<o-3)break;if(u>o+3)continue;e[r].shac<i&&(e[r].shac=i)}}for(n=f;--n>=0;){a=e[n].acc;if(!a)continue;i=e[n].shac,i||(i=e[n].shhd,i<0?i=t-i:i=t),o=e[n].pit;for(r=f;--r>n;){if(!e[r].acc)continue;u=e[r].pit;if(u>=o+4)if(u>o+4||a<0||e[r].acc<0)continue;i>e[r].shac-6&&(s=e[r].shac+7,s>i&&(i=s))}e[n].shac=i}}function set_acc_shft(){var e,t,n,r,i,n,s,o;e=tsfirst;while(e){if(e.type!=C.NOTE||e.invis){e=e.ts_next;continue}n=e.st,s=e.time,i=!1;for(t=e;t;t=t.ts_next){if(t.time!=s||t.type!=C.NOTE||t.st!=n)break;if(i)continue;for(r=0;r<=t.nhd;r++)if(t.notes[r].acc){i=!0;break}}if(!i){e=t;continue}o=dx_tb[e.head],n={notes:[]};for(;e!=t;e=e.ts_next)n.notes=n.notes.concat(e.notes);sort_pitch(n),acc_shift(n.notes,o)}}function lkvsym(e,t){e.next=t,e.prev=t.prev,e.prev?e.prev.next=e:e.p_v.sym=e,t.prev=e}function lktsym(e,t){t?(e.ts_next=t,e.ts_prev=t.ts_prev,e.ts_prev&&(e.ts_prev.ts_next=e),t.ts_prev=e):e.ts_next=e.ts_prev=null}function unlksym(e){e.next&&(e.next.prev=e.prev),e.prev?e.prev.next=e.next:e.p_v.sym=e.next,e.ts_next&&(e.seqst&&!e.ts_next.seqst&&(e.ts_next.seqst=!0,e.ts_next.shrink=e.shrink,e.ts_next.space=e.space),e.ts_next.ts_prev=e.ts_prev),e.ts_prev&&(e.ts_prev.ts_next=e.ts_next),tsfirst==e&&(tsfirst=e.ts_next),tsnext==e&&(tsnext=e.ts_next)}function insert_clef(e,t,n){var r=e.p_v,i,s=e.st;e.type==C.BAR&&e.prev&&e.prev.type==C.BAR&&(e=e.prev),r.last_sym=e.prev,r.last_sym||(r.sym=null),r.time=e.time,i=sym_add(r,C.CLEF),i.next=e,e.prev=i,i.clef_type=t,i.clef_line=n,i.st=s,i.clef_small=!0,delete i.second,i.notes=[],i.notes[0]={pit:e.notes[0].pit},i.nhd=0;while(!e.seqst)e=e.ts_prev;return lktsym(i,e),i.ts_prev.type!=C.CLEF&&(i.seqst=!0),i}function set_float(){var e,t,n,r,i,s,o,u;for(r=0;r<voice_tb.length;r++){e=voice_tb[r],n=!1,t=e.st;for(i=e.sym;i;i=i.next){if(!i.floating){while(i&&!i.floating)i=i.next;if(!i)break;n=!1}if(!i.dur){n&&i.st++;continue}if(i.notes[0].pit>=19){n=!1;continue}if(i.notes[i.nhd].pit<=12){n=!0,i.st++;continue}o=127;for(s=i.ts_prev;s;s=s.ts_prev){if(s.st!=t||s.v==i.v)break;s.type==C.NOTE&&s.notes[0].pit<o&&(o=s.notes[0].pit)}if(o==127){n&&i.st++;continue}if(i.notes[i.nhd].pit>o-3){n=!1;continue}u=-127;for(s=i.ts_next;s;s=s.ts_next){if(s.st!=t+1||s.v==i.v)break;s.type==C.NOTE&&s.notes[s.nhd].pit>u&&(u=s.notes[s.nhd].pit)}if(u==-127){n&&i.st++;continue}if(i.notes[0].pit<u+3){n=!0,i.st++;continue}o-=i.notes[i.nhd].pit,u=i.notes[0].pit-u;if(!n){if(o<u+3)continue;n=!0}else if(o<u-3){n=!1;continue}i.st++}}}function set_graceoffs(e){var t,n,r,i,s=cfmt.gracespace[0],o=cfmt.gracespace[1],u=cfmt.gracespace[2],a=e.extra;e.prev&&e.prev.type==C.BAR&&(s-=3),i=s,a.beam_st=!0;for(;;a=a.next){set_head_shift(a),acc_shift(a.notes,7),r=0;for(n=a.nhd;n>=0;n--)a.notes[n].shac>r&&(r=a.notes[n].shac);i+=r,a.x=i,a.nflags<=0&&(a.beam_st=!0,a.beam_end=!0),t=a.next;if(!t){a.beam_end=!0;break}t.nflags<=0&&(a.beam_end=!0),a.beam_end&&(t.beam_st=!0,i+=o/4),a.nflags<=0&&(i+=o/4),a.y>t.y+8&&(i-=1.5),i+=o}return t=e.next,t&&t.type==C.NOTE&&(a.y>=3*(t.notes[t.nhd].pit-18)?u-=1:a.beam_st&&a.y<3*(t.notes[t.nhd].pit-18)-4&&(u+=2)),i+=u,i}function gchord_width(e,t,n){var r,i,s,o,u,a=0,f=0,l=0,c=0;for(u=0;u<e.a_gch.length;u++){i=e.a_gch[u];switch(i.type){default:o=-i.x,o>a&&(a=o),s=i.w+2-o,s>f&&(f=s);break;case"<":s=i.w+t,s>l&&(l=s);break;case">":s=i.w+e.wr,s>c&&(c=s)}}r=e.prev;if(r){if(r.a_gch)for(r=e.ts_prev;;r=r.ts_prev){if(r==e.prev){n<a&&(n=a);break}r.seqst&&(a-=r.shrink)}l!=0&&n<l&&(n=l)}r=e.next;if(r){if(r.a_gch)for(r=e.ts_next;;r=r.ts_next){if(r==e.next){e.wr<f&&(e.wr=f);break}r.seqst&&(f-=8)}c!=0&&e.wr<c&&(e.wr=l)}return n}function set_width(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v;switch(e.type){case C.NOTE:case C.REST:e.wr=o=hw_tb[e.head],e.xmx>0&&(e.wr+=e.xmx+4);for(t=e.prev;t;t=t.prev)if(w_tb[t.type]!=0)break;if(t)switch(t.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:o+=3}for(r=0;r<=e.nhd;r++)i=e.notes[r].shhd,i<0&&o<-i+5&&(o=-i+5),e.notes[r].acc&&(v=e.notes[r].shac+(e.notes[r].micro?5.5:3.5),o<v&&(o=v));if(t)switch(t.type){case C.BAR:case C.CLEF:case C.KEY:case C.METER:o-=3}e.a_dd&&(o+=deco_width(e)),e.beam_st&&e.beam_end&&e.stem>0&&e.nflags>0&&e.wr<e.xmx+9&&(e.wr=e.xmx+9);if(e.dots){if(e.wl==undefined)switch(e.head){case C.SQUARE:e.xmx+=4;break;case C.OVALBARS:case C.OVAL:e.xmx+=2;break;case C.EMPTY:e.xmx+=1}e.wr<e.xmx+8&&(e.wr=e.xmx+8),e.dots>=2&&(e.wr+=3.5*(e.dots-1))}e.trem2&&e.beam_end&&o<20&&(o=20),u=o;if(t)switch(t.type){case C.NOTE:t.stem>0&&e.stem<0&&u<7&&(u=7),(e.y>27&&t.y>27||e.y<-3&&t.y<-3)&&u<6&&(u=6),t.ti1&&u<14&&(u=14);break;case C.CLEF:if(t.second||t.clef_small)break;u+=8;break;case C.KEY:u+=4}e.a_gch&&(u=gchord_width(e,o,u)),e.a_ly&&(u=ly_width(e,u)),t&&t.type==C.GRACE?e.wl=o-4.5:e.wl=u;return;case C.SPACE:i=e.width/2,e.wr=i,e.a_gch&&(i=gchord_width(e,i,i)),e.a_dd&&(i+=deco_width(e)),e.wl=i;return;case C.BAR:if(e.norepbra)break;f=e.bar_type;switch(f){case"|":s=7;break;default:s=4+3*f.length;for(n=0;n<f.length;n++)switch(f[n]){case"[":case"]":s+=3;break;case":":s+=2}}e.wl=s,e.next&&e.next.type!=C.METER?e.wr=7:e.wr=5;for(t=e.prev;t;t=t.prev)if(w_tb[t.type]!=0){t.type==C.GRACE&&(e.wl-=8);break}e.a_dd&&(e.wl+=deco_width(e)),e.text&&e.text.length<4&&e.next&&e.next.a_gch&&(set_font("repeat"),e.wr+=strwh(e.text)[0]+2);return;case C.CLEF:if(e.invis){e.wl=e.wr=1;return}e.wl=e.wr=e.clef_small?8:12;return;case C.KEY:e.wl=3,d=4;if(!e.k_a_acc)h=e.k_sf,e.k_old_sf&&(cfmt.cancelkey||h==0)?p=e.k_old_sf:p=0,h*p>=0?(h<0&&(h=-h),p<0&&(p=-p),p>h&&(h=p)):(h-=p,h<0&&(h=-h),d+=3);else{h=p=e.k_a_acc.length,p&&(c=e.k_a_acc[0].acc);for(n=1;n<p;n++)a=e.k_a_acc[n],a.pit>e.k_a_acc[n-1].pit+6||a.pit<e.k_a_acc[n-1].pit-6?h--:a.acc!=c&&(d+=3),c=a.acc}e.wr=5.5*h+d;return;case C.METER:u=0,e.x_meter=[];for(n=0;n<e.a_meter.length;n++){l=e.a_meter[n];switch(l.top[0]){case"C":case"c":case"o":e.x_meter[n]=u+6,u+=12;break;case".":case"|":e.x_meter[n]=e.x_meter[n-1];break;default:s=0,!l.bot||l.top.length>l.bot.length?l=l.top:l=l.bot;for(r=0;r<l.length;r++)switch(l[r]){case"(":u+=4;case")":case"1":s+=4;break;default:s+=12}e.x_meter[n]=u+s/2,u+=s}}e.wl=0,e.wr=u+6;return;case C.MREST:e.wl=6,e.wr=66;return;case C.GRACE:e.wl=set_graceoffs(e),e.wr=0,e.a_ly&&ly_width(e,u);return;case C.STBRK:e.wl=e.xmx,e.next&&e.next.type==C.CLEF?(e.wr=2,delete e.next.clef_small):e.wr=8;return;case C.CUSTOS:e.wl=e.wr=4;return;case C.BLOCK:case C.PART:case C.REMARK:case C.STAVES:case C.TEMPO:break;default:error(2,e,"set_width - Cannot set width for symbol $1",e.type)}e.wl=e.wr=0}function time2space(e,t){var n,r,i;return smallest_duration>=C.BLEN/2?smallest_duration>=C.BLEN?t/=4:t/=2:!e.next&&t>=C.BLEN&&(t/=2),t>=C.BLEN/4?t<C.BLEN/2?n=5:t<C.BLEN?n=6:t<C.BLEN*2?n=7:t<C.BLEN*4?n=8:n=9:t>=C.BLEN/8?n=4:t>=C.BLEN/16?n=3:t>=C.BLEN/32?n=2:t>=C.BLEN/64?n=1:n=0,r=t-(C.BLEN/16/8<<n),i=space_tb[n],r!=0&&(r<0?i=space_tb[0]*t/(C.BLEN/16/8):(n>=9&&(n=8),i+=(space_tb[n+1]-space_tb[n])*r/t)),i}function set_space(e){var t,n,r=e.ts_prev.time,i=e.time-r;if(i==0){switch(e.type){case C.MREST:return e.wl}return 0}if(e.ts_prev.type==C.MREST)return 71;n=time2space(e,i);while(!e.dur){switch(e.type){case C.BAR:return n*.9-7;case C.CLEF:return n-e.wl-e.wr;case C.BLOCK:case C.PART:case C.REMARK:case C.STAVES:case C.TEMPO:e=e.ts_next;if(!e)return n;continue}break}e.beam_st||(n*=.9);if(e.type==C.NOTE&&e.nflags>=-1&&e.stem>0){var s=!0;for(t=e.ts_prev;t&&t.time==r;t=t.ts_prev)if(t.type==C.NOTE&&(t.nflags<-1||t.stem>0)){s=!1;break}if(s){for(t=e.ts_next;t&&t.time==e.time;t=t.ts_next)if(t.type==C.NOTE&&(t.nflags<-1||t.stem<0)){s=!1;break}s&&(n*=.9)}}return n}function set_sp_tup(e,t){var n,r,i=e.time,s=t.time+t.dur,o=s-i,u=time2space(e,o/e.tq0)*e.tq0/o;do e=e.ts_next;while(!e.seqst);while(!e.dur)e=e.ts_next;while(!e.seqst)e=e.ts_prev;do t.ts_next?t=t.ts_next:(r=add_end_bar(t),t=r);while(!t.seqst);r=e;for(;;){r.dur&&r.dur*u<r.shrink&&(u=r.shrink/r.dur);if(r==t)break;r=r.ts_next}for(;;){e.seqst&&(n=(e.time-i)*u,i=e.time),e.space=n;if(e==t)break;e=e.ts_next}}function add_end_bar(e){var t={type:C.BAR,bar_type:"|",fname:e.fname,istart:e.istart,iend:e.iend,v:e.v,p_v:e.p_v,st:e.st,dur:0,seqst:!0,invis:!0,time:e.time+e.dur,nhd:0,notes:[{pit:e.notes[0].pit}],wl:0,wr:0,prev:e,ts_prev:e,shrink:e.wr+3};return e.next=e.ts_next=t,t}function set_allsymwidth(){var e,t,n,r,i,s=tsfirst,o=s,u=0,a=[],f=[],l=0;for(;;){e=u;do self.set_width(s),i=s.st,a[i]==undefined&&(a[i]=0),f[i]==undefined&&(f[i]=0),t=a[i]+f[i]+s.wl,t>e&&(e=t),s=s.ts_next;while(s&&!s.seqst);o.shrink=e-u,l||(o.space=o.ts_prev?set_space(o):0),o.shrink==0&&o.space==0&&o.type==C.CLEF&&(delete o.seqst,o.time=o.ts_prev.time);if(!s)break;for(i=0;i<f.length;i++)f[i]=0;u=e;do i=o.st,a[i]=u,o.wr>f[i]&&(f[i]=o.wr),o.tp0&&++l==1&&!n&&(n=o),o.te0&&l--,o=o.ts_next;while(!o.seqst)}s=n;if(!s)return;do{o=s,l=1;do s=s.ts_next,s.tp0&&l++,s.te0&&l--;while(l!=0);set_sp_tup(o,s);do s=s.ts_next;while(s&&!s.tp0)}while(s)}function to_rest(e){e.type=C.REST,delete e.in_tuplet,delete e.sl1,delete e.sl2,delete e.a_dd,delete e.a_gch,e.slur_start=e.slur_end=0}function set_repeat(e){var t,n,r,i,s,o=e.repeat_n,u=e.repeat_k,a=e.st,f=e.v;e.repeat_n=0;if(o<0){o=-o,r=o;for(n=e.prev;n;n=n.prev){if(!n.dur){if(n.type==C.BAR){error(1,n,"Bar in repeat sequence");return}continue}if(--r<=0)break}if(!n){error(1,e,errs.not_enough_n);return}s=e.time-n.time,r=u*o;for(t=e;t;t=t.next){if(!t.dur){if(t.type==C.BAR){error(1,t,"Bar in repeat sequence");return}continue}if(--r<=0)break}if(!t||!t.next){error(1,e,errs.not_enough_n);return}for(t=e.prev;t!=n;t=t.prev)if(t.type==C.NOTE){t.beam_end=!0;break}for(i=u;--i>=0;){r=o,e.dur&&r--,t=e.ts_next;while(r>0)t.st==a&&(unlksym(t),t.v==f&&t.dur&&r--),t=t.ts_next;to_rest(e),e.dur=e.notes[0].dur=s,e.rep_nb=-1,e.beam_st=!0,self.set_width(e),e.seqst&&(e.space=set_space(e)),e.head=C.SQUARE;for(e=t;e;e=e.ts_next)if(e.st==a&&e.v==f&&e.dur)break}return}r=o;for(t=e.prev.prev;t;t=t.prev)if(t.type==C.BAR||t.time==tsfirst.time)if(--r<=0)break;if(!t){error(1,e,errs.not_enough_m);return}s=e.time-t.time,o==1?r=u:r=o;for(t=e;t;t=t.next)if(t.type==C.BAR&&--r<=0)break;if(!t){error(1,e,errs.not_enough_m);return}r=u;if(o==2&&r>1){t=t.next;if(!t){error(1,e,errs.not_enough_m);return}t.repeat_n=o,t.repeat_k=--r}s/=o;if(o==2){n=e;for(t=e.ts_next;;t=t.ts_next){if(t.st!=a)continue;if(t.v==f&&t.type==C.BAR)break;unlksym(t)}to_rest(n),n.dur=n.notes[0].dur=s,n.invis=!0,n.seqst&&(n.space=set_space(n)),t.bar_mrep=2,t.seqst&&(t.space=set_space(t)),n=t.next;for(t=n.ts_next;;t=t.ts_next){if(t.st!=a)continue;if(t.v==f&&t.type==C.BAR)break;unlksym(t)}to_rest(n),n.dur=n.notes[0].dur=s,n.invis=!0,self.set_width(n),n.seqst&&(n.space=set_space(n)),t.seqst&&(t.space=set_space(t));return}n=e;for(i=u;--i>=0;){for(t=n.ts_next;;t=t.ts_next){if(t.st!=a)continue;if(t.v==f&&t.type==C.BAR)break;unlksym(t)}to_rest(n),n.dur=n.notes[0].dur=s,n.beam_st=!0,n.seqst&&(n.space=set_space(n)),t.seqst&&(t.space=set_space(t));if(u==1){n.rep_nb=1;break}n.rep_nb=u-i+1,n=t.next}}function custos_add(e){var t,n,r,i=e;for(;;){if(i.type==C.NOTE)break;i=i.next;if(!i)return}t=e.p_v,t.last_sym=e.prev,t.time=e.time,n=sym_add(t,C.CUSTOS),n.next=e,e.prev=n,lktsym(n,e),n.seqst=!0,n.shrink=e.shrink,n.shrink<12&&(n.shrink=12),n.space=i.space,n.wl=0,n.wr=4,n.nhd=i.nhd,n.notes=[];for(r=0;r<e.notes.length;r++)n.notes[r]={pit:i.notes[r].pit,shhd:0,dur:C.BLEN/4};n.stemless=!0}function set_nl(e){function i(e){cfmt.custos&&voice_tb.length==1&&custos_add(e);for(var t=e.ts_next;t;t=t.ts_next)if(t.seqst){e.nl=!0;break}}function s(e){if(!e.next)return i(e),e;for(e=e.ts_next;e;e=e.ts_next)if(e.seqst){i(e);break}return e}var t,n,r;if(e.eoln&&!cfmt.keywarn&&!cfmt.timewarn)return s(e);switch(e.type){case C.CLEF:case C.BAR:case C.STAVES:break;case C.KEY:if(cfmt.keywarn&&!e.k_none)break;return s(e);case C.METER:if(cfmt.timewarn)break;return s(e);case C.GRACE:e=e.next;if(!e)return e;default:return s(e)}for(;e;e=e.ts_prev){if(!e.seqst)continue;switch(e.type){case C.KEY:case C.CLEF:case C.METER:continue}break}r=0;for(;;e=e.ts_next){if(!e)return e;if(!e.seqst)continue;if(r<0)break;switch(e.type){case C.STAVES:if(e.ts_prev&&e.ts_prev.type==C.BAR)break;while(e.ts_next){if(w_tb[e.ts_next.type]!=0&&e.ts_next.type!=C.CLEF)break;e=e.ts_next}if(!e.ts_next||e.ts_next.type!=C.BAR)continue;e=e.ts_next;case C.BAR:if(r)break;r=1;continue;case C.STBRK:e.stbrk_forced?r=-1:unlksym(e);continue;case C.METER:if(!cfmt.timewarn)break;continue;case C.CLEF:if(r)break;continue;case C.KEY:if(!cfmt.keywarn||e.k_none)break;continue;default:if(!r||e.prev&&e.prev.type==C.GRACE)continue}break}return i(e),e}function get_ck_width(){var e,t,n=voice_tb[0];return self.set_width(n.clef),self.set_width(n.key),self.set_width(n.meter),[n.clef.wl+n.clef.wr+n.key.wl+n.key.wr,n.meter.wl+n.meter.wr]}function get_width(e,t){var n,r,i=0,s=1-cfmt.maxshrink;do{e.seqst&&(n=e.shrink,(r=e.space)<n?i+=n:i+=n*cfmt.maxshrink+r*s,e.x=i);if(e==t)break;e=e.ts_next}while(e);return i}function set_lines(e,t,n,r){var i,s,o,u,a,f,l,c,h,p,d,v;for(;t;t=t.ts_next)if(t.eoln)break;c=get_width(e,t)+r;for(;;){d=Math.ceil(c/n);if(d<=1)return t&&(t=set_nl(t)),t;s=i=e,a=e.x-e.shrink-r,l=a+n,f=a+c/d,a+=c/d*cfmt.breaklimit;for(e=e.ts_next;e!=t;e=e.ts_next){if(!e.x)continue;e.type==C.BAR&&(s=e);if(e.x>=a)break}if(e==t)return t&&(t=set_nl(t)),t;v=!1,o=null;for(;e!=t;e=e.ts_next){u=e.x;if(!u)continue;if(u>l)break;if(e.type!=C.BAR)continue;if(u<f){o=e;continue}if(!o||e.x<f){o=e;continue}if(o>f)break;if(f-o.x<e.x-f)break;o=e;break}o&&(e=o,v=!0);if(!v){var m=0,g=s.time;l-=8,e=s,o=null;for(;e!=t;e=e.ts_next){e.beam_st&&m++,e.beam_end&&m>0&&m--,u=e.x;if(!u)continue;if(u+e.wr>=l)break;if(m||e.in_tuplet)continue;if((e.time-g)%(C.BLEN/4)==0){o=e;continue}if(!o||e.x<f){o=e;continue}if(o>f)break;if(f-o.x<e.x-f)break;o=e;break}o&&(e=o,v=!0)}if(!v){o=e=s;for(;e!=t;e=e.ts_next){u=e.x;if(!u)continue;if(e.x<f){o=e;continue}if(o>f)break;if(f-o.x<e.x-f)break;o=e;break}e=o}if(e.nl){error(0,e,"Line split problem - adjust maxshrink and/or breaklimit"),d=2;for(e=e.ts_next;e!=t;e=e.ts_next){if(!e.x)continue;if(--d<=0)break}}e=set_nl(e);if(!e||t&&e.time>=t.time)break;c-=e.x-i.x,r=0}return e}function cut_tune(e,t){var n,r,i,s,o,n=tsfirst;t!=0&&(s=set_indent(),e-=s,t-=s),s=get_ck_width(),e-=s[0],t+=s[1],cfmt.custos&&voice_tb.length==1&&(e-=12);if(cfmt.barsperstaff){s=cfmt.barsperstaff;for(r=n;r;r=r.ts_next){if(r.type!=C.BAR||!r.bar_num||--s>0)continue;r.eoln=!0,s=cfmt.barsperstaff}}o=t,r=n;for(;n;n=n.ts_next){if(!n.seqst&&!n.eoln)continue;o+=n.shrink;if(o>e)r=set_lines(r,n,e,t);else{if(!n.eoln)continue;delete n.eoln;if(n.dur){for(i=n.ts_next;i;i=i.ts_next)if(i.seqst||i.dur<n.dur)break;i&&!i.seqst?r=set_lines(r,n,e,t):r=set_nl(n)}else r=set_nl(n)}if(!r)break;if(!r.ts_prev){delete r.nl;continue}o=r.shrink,n=r.ts_prev,t=0}}function set_yval(e){switch(e.type){case C.CLEF:if(e.second||e.invis){e.ymx=e.ymn=12;break}e.y=(e.clef_line-1)*6;switch(e.clef_type){default:e.ymx=e.y+28,e.ymn=e.y-14;break;case"c":e.ymx=e.y+13,e.ymn=e.y-11;break;case"b":e.ymx=e.y+7,e.ymn=e.y-12}e.clef_small&&(e.ymx-=2,e.ymn+=2),e.ymx<26&&(e.ymx=26),e.ymn>-1&&(e.ymn=-1),e.clef_octave&&(e.clef_octave>0?e.ymx+=12:e.ymn-=12);break;case C.KEY:e.k_sf>2?e.ymx=34:e.k_sf>0?e.ymx=30:e.ymx=26,e.ymn=-2;break;default:e.ymx=24,e.ymn=0}}function set_auto_clef(e,t,n){var r,i,s,o,u,a;s=12,i=20;for(r=t;r;r=r.ts_next){if(r.type==C.STAVES&&r!=t)break;if(r.st!=e)continue;if(r.type!=C.NOTE){if(r.type==C.CLEF){if(r.clef_type!="a")break;unlksym(r)}continue}r.notes[0].pit<i?i=r.notes[0].pit:r.notes[r.nhd].pit>s&&(s=r.notes[r.nhd].pit)}if(i>=19||i>=13&&n!="b")return"t";if(s<=13||s<=19&&n!="t")return"b";n=="a"&&((s+i)/2>=16?n="t":n="b");var f=n,l=r,c=null;for(r=t;r!=l;r=r.ts_next){if(r.type==C.STAVES&&r!=t)break;if(r.st!=e||r.type!=C.NOTE)continue;o=r.time;if(f=="t"){if(r.notes[0].pit>12||r.notes[r.nhd].pit>20){r.notes[0].pit>20&&(c=r);continue}u=r.ts_prev;if(u&&u.time==o&&u.st==e&&u.type==C.NOTE&&u.notes[0].pit>=19)continue;u=r.ts_next;if(u&&u.st==e&&u.time==o&&u.type==C.NOTE&&u.notes[0].pit>=19)continue}else{if(r.notes[0].pit<12||r.notes[r.nhd].pit<20){r.notes[r.nhd].pit<12&&(c=r);continue}u=r.ts_prev;if(u&&u.time==o&&u.st==e&&u.type==C.NOTE&&u.notes[0].pit<=13)continue;u=r.ts_next;if(u&&u.st==e&&u.time==o&&u.type==C.NOTE&&u.notes[0].pit<=13)continue}if(!c){f=n=f=="t"?"b":"t",c=r;continue}a=r;for(u=r.ts_prev;u!=c;u=u.ts_prev){if(u.st!=e)continue;if(u.type==C.BAR&&u.v==r.v){a=u;break}if(u.type!=C.NOTE)continue;u.beam_st&&!u.p_v.second&&(a=u)}if(a.time==c.time){c=r;continue}c=r,f=f=="t"?"b":"t",u=insert_clef(a,f,f=="t"?2:4),u.clef_auto=!0}return n}function set_clefs(){var e,t,n,r,i,s,o,u,a,f,l=new Array(nstaff),c=cur_sy,h=[];staff_tb=new Array(nstaff);for(n=0;n<=nstaff;n++)l[n]={autoclef:!0},staff_tb[n]={output:"",sc_out:""};for(r=0;r<voice_tb.length;r++){i=voice_tb[r];if(c.voices[r].range<0)continue;n=c.voices[r].st,c.voices[r].second||(i.staffnonote!=undefined&&(c.staves[n].staffnonote=i.staffnonote),i.staffscale&&(c.staves[n].staffscale=i.staffscale),c.voices[r].sep&&(c.staves[n].sep=c.voices[r].sep),c.voices[r].maxsep&&(c.staves[n].maxsep=c.voices[r].maxsep)),!c.voices[r].second&&!i.clef.clef_auto&&(l[n].autoclef=!1)}for(r=0;r<voice_tb.length;r++){i=voice_tb[r];if(c.voices[r].range<0||c.voices[r].second)continue;n=c.voices[r].st,e=i.clef,l[n].autoclef&&(e.clef_type=set_auto_clef(n,tsfirst,e.clef_type),e.clef_line=e.clef_type=="t"?2:4),l[n].clef=staff_tb[n].clef=e}for(n=0;n<=c.nstaff;n++)h[n]=(c.staves[n].stafflines.length-1)*3;for(e=tsfirst;e;e=e.ts_next){e.repeat_n&&set_repeat(e);switch(e.type){case C.STAVES:c=e.sy;for(n=0;n<=nstaff;n++)l[n].autoclef=!0;for(r=0;r<voice_tb.length;r++){if(c.voices[r].range<0)continue;i=voice_tb[r],n=c.voices[r].st,c.voices[r].second||(i.staffnonote!=undefined&&(c.staves[n].staffnonote=i.staffnonote),i.staffscale&&(c.staves[n].staffscale=i.staffscale),c.voices[r].sep&&(c.staves[n].sep=c.voices[r].sep),c.voices[r].maxsep&&(c.staves[n].maxsep=c.voices[r].maxsep)),t=i.clef,t.clef_auto||(l[n].autoclef=!1)}for(n=0;n<=c.nstaff;n++)h[n]=(c.staves[n].stafflines.length-1)*3;for(r=0;r<voice_tb.length;r++){if(c.voices[r].range<0||c.voices[r].second)continue;i=voice_tb[r],n=c.voices[r].st,t=i.clef,t.clef_auto?(o=set_auto_clef(n,e,l[n].clef?l[n].clef.clef_type:"a"),u=o=="t"?2:4):(o=t.clef_type,u=t.clef_line);if(!l[n].clef){t.clef_auto&&(t.type!="a"&&(i.clef=clone(i.clef)),i.clef.clef_type=o,i.clef.clef_line=u),staff_tb[n].clef=l[n].clef=i.clef;continue}if(o==l[n].clef.clef_type&&u==l[n].clef.clef_line)continue;s=e.ts_next;while(s&&(s.v!=r||s.st!=n))s=s.ts_next;if(!s)continue;s.type!=C.CLEF&&(s=insert_clef(s,o,u),t.clef_auto&&(s.clef_auto=!0)),l[n].clef=i.clef=s}continue;default:e.mid=h[e.st];continue;case C.CLEF:}e.clef_type=="a"&&(e.clef_type=set_auto_clef(e.st,e.ts_next,l[e.st].clef.clef_type),e.clef_line=e.clef_type=="t"?2:4),i=e.p_v,i.clef=e;if(e.second){unlksym(e);continue}n=e.st;if(l[n].clef){if(e.clef_type==l[n].clef.clef_type&&e.clef_line==l[n].clef.clef_line)continue}else staff_tb[n].clef=e;l[n].clef=e}c=cur_sy;for(r=0;r<voice_tb.length;r++){if(c.voices[r].range<0)continue;t=voice_tb[r].sym;if(!t||t.notes[0].pit!=127)continue;n=c.voices[r].st;switch(staff_tb[n].clef.clef_type){default:f=22;break;case"c":f=16;break;case"b":f=10}for(e=t;e;e=e.next)e.notes[0].pit=f}}function set_pitch(e){var t,n,r,i,s,o,u,a,f=C.BLEN,l=new Array(nstaff),c=cur_sy;for(i=0;i<=nstaff;i++)t=staff_tb[i].clef,l[i]=delta_tb[t.clef_type]+t.clef_line*2,t.clefpit&&(l[i]+=t.clefpit),cfmt.sound?t.clef_octave&&!t.clef_oct_transp&&(l[i]+=t.clef_octave):t.clef_oct_transp&&(l[i]-=t.clef_octave);for(t=tsfirst;t!=e;t=t.ts_next){i=t.st;switch(t.type){case C.CLEF:l[i]=delta_tb[t.clef_type]+t.clef_line*2,t.clefpit&&(l[i]+=t.clefpit),cfmt.sound?t.clef_octave&&!t.clef_oct_transp&&(l[i]+=t.clef_octave):t.clef_oct_transp&&(l[i]-=t.clef_octave),set_yval(t);break;case C.GRACE:for(r=t.extra;r;r=r.next){s=l[r.st];if(s!=0&&!t.p_v.key.k_drum)for(o=0;o<=r.nhd;o++)a=r.notes[o],a.pit+=s;r.ymn=3*(r.notes[0].pit-18)-2,r.ymx=3*(r.notes[r.nhd].pit-18)+2}set_yval(t);break;case C.KEY:t.k_y_clef=l[i];default:set_yval(t);break;case C.MREST:if(t.invis)break;t.y=12,t.ymx=39,t.ymn=-2;break;case C.REST:if(voice_tb.length==1){t.y=12,t.ymx=24,t.ymn=0;break};case C.NOTE:s=l[i];if(s!=0&&!t.p_v.key.k_drum)for(o=t.nhd;o>=0;o--)t.notes[o].opit=t.notes[o].pit,t.notes[o].pit+=s;t.type==C.NOTE?(t.ymx=3*(t.notes[t.nhd].pit-18)+4,t.ymn=3*(t.notes[0].pit-18)-4):(t.y=((t.notes[0].pit-18)/2|0)*6,t.ymx=t.y+rest_sp[5-t.nflags][0],t.ymn=t.y-rest_sp[5-t.nflags][1]),t.dur<f&&(f=t.dur)}}e||(smallest_duration=f)}function set_stem_dir(){var e,t,n,r,i,s,o,u,a,f,l=[],c=tsfirst,h=cur_sy,p=h.nstaff;while(c){for(r=0;r<=p;r++)l[r]=[];f=[];for(t=c;t;t=t.ts_next){if(t.type==C.BAR)break;if(t.type==C.STAVES){if(t!=c)break;h=c.sy;for(r=p;r<=h.nstaff;r++)l[r]=[];p=h.nstaff;continue}if(t.type!=C.NOTE&&t.type!=C.REST||t.invis)continue;r=t.st;if(r>p){var d="*** fatal set_stem_dir(): bad staff number "+r+" max "+p;throw error(2,null,d),new Error(d)}s=t.v,o=f[s],o||(o={st1:-1,st2:-1},f[s]=o),o.st1<0?o.st1=r:o.st1!=r&&(r>o.st1?r>o.st2&&(o.st2=r):(o.st1>o.st2&&(o.st2=o.st1),o.st1=r)),u=l[r],i=h.voices[s].range;for(n=u.length;--n>=0;){a=u[n];if(a.v==i)break}if(n<0){a={v:i,ymx:0,ymn:24};for(n=0;n<u.length;n++)if(i<u[n].v){u.splice(n,0,a);break}n==u.length&&u.push(a)}if(t.type!=C.NOTE)continue;t.ymx>a.ymx&&(a.ymx=t.ymx),t.ymn<a.ymn&&(a.ymn=t.ymn),t.xstem&&(t.ts_prev.st!=r-1||t.ts_prev.type!=C.NOTE?(error(1,c,"Bad !xstem!"),t.xstem=!1):(t.ts_prev.multi=1,t.multi=1,t.stemless=!0))}for(;c!=t;c=c.ts_next){if(c.multi)continue;switch(c.type){default:continue;case C.REST:if(c.combine!=undefined&&c.combine<0||!c.ts_next||c.ts_next.type!=C.REST||c.ts_next.st!=c.st||c.time!=c.ts_next.time||c.dur!=c.ts_next.dur||c.invis)break;unlksym(c.ts_next);break;case C.NOTE:case C.GRACE:}r=c.st,s=c.v,o=f[s],u=l[r];if(o&&o.st2>=0){r==o.st1?c.multi=-1:r==o.st2&&(c.multi=1);continue}if(u.length<=1){c.floating&&(c.multi=r==voice_tb[s].st?-1:1);continue}i=h.voices[s].range;for(n=u.length;--n>=0;)if(u[n].v==i)break;if(n<0)continue;n==u.length-1?c.multi=-1:(c.multi=1,n!=0&&n+2==u.length&&(u[n].ymn-cfmt.stemheight>u[n+1].ymx&&(c.multi=-1),e=c.ts_next,c.ts_prev&&c.ts_prev.time==c.time&&c.ts_prev.st==c.st&&c.notes[c.nhd].pit==c.ts_prev.notes[0].pit&&c.beam_st&&c.beam_end&&(!e||e.st!=c.st||e.time!=c.time)&&(c.multi=-1)))}while(c&&c.type==C.BAR)c=c.ts_next}}function set_rest_offset(){var e,t,n,r,i,s,o,u,a,f,l,c,h=[],p=cur_sy;for(e=tsfirst;e;e=e.ts_next){if(e.invis)continue;e.type==C.STAVES&&(p=e.sy);if(!e.dur)continue;s=h[e.v],s||(s={},h[e.v]=s),s.s=e,s.st=e.st,s.end_time=e.time+e.dur;if(e.type!=C.REST)continue;a=-127,u=127,i=l=!1;for(n=0;n<=h.length;n++){s=h[n];if(!s||!s.s||s.st!=e.st||n==e.v)continue;if(s.end_time<=e.time)continue;i=!0,t=s.s,p.voices[n].range<p.voices[e.v].range?t.time==e.time?t.ymn<u&&(u=t.ymn,t.dots&&(l=!0)):t.y<u&&(u=t.y):t.time==e.time?t.ymx>a&&(a=t.ymx,t.dots&&(l=!0)):t.y>a&&(a=t.y)}r=e.time+e.dur;for(t=e.ts_next;t;t=t.ts_next){if(t.time>=r)break;if(t.st!=e.st||!t.dur||t.invis)continue;i=!0,p.voices[t.v].range<p.voices[e.v].range?t.time==e.time?t.ymn<u&&(u=t.ymn,t.dots&&(l=!0)):t.y<u&&(u=t.y):t.time==e.time?t.ymx>a&&(a=t.ymx,t.dots&&(l=!0)):t.y>a&&(a=t.y)}if(!i){e.y=12,e.ymx=24,e.ymn=0;continue}u==127&&e.y<12&&(f=12-e.y,e.y+=f,e.ymx+=f,e.ymn+=f),a==-127&&e.y>12&&(f=e.y-12,e.y-=f,e.ymx-=f,e.ymn-=f),f=u-e.ymx;if(f<0){f=Math.ceil(-f/6)*6;if(e.ymn-f>=a){e.y-=f,e.ymx-=f,e.ymn-=f;continue}c=l?15:10,e.notes[0].shhd=c,e.xmx=c;continue}f=a-e.ymn;if(f>0){f=Math.ceil(f/6)*6;if(e.ymx+f<=u){e.y+=f,e.ymx+=f,e.ymn+=f;continue}c=l?15:10,e.notes[0].shhd=c,e.xmx=c;continue}}}function new_sym(e,t,n){var r={type:e,fname:n.fname,v:t.v,p_v:t,st:t.st,time:n.time,next:t.last_sym.next};return r.next&&(r.next.prev=r),t.last_sym.next=r,r.prev=t.last_sym,t.last_sym=r,lktsym(r,n),r.ts_prev.type!=e&&(r.seqst=!0),n.type==e&&r.v!=n.v&&(delete n.seqst,n.shrink=0),r}function init_music_line(){var e,t,n,r,i,s,o,u,a,f=voice_tb.length;for(s=0;s<f;s++){if(cur_sy.voices[s].range<0)continue;e=voice_tb[s],e.second=cur_sy.voices[s].second,e.last_sym=e.sym,o=cur_sy.voices[s].st;while(o<nstaff&&!cur_sy.st_print[o])o++;e.st=o}i=tsfirst;while(i.type==C.CLEF)s=i.v,cur_sy.voices[s].range>=0&&!cur_sy.voices[s].second&&(delete i.clef_small,e=i.p_v,e.last_sym=e.sym=i),i=i.ts_next;for(s=0;s<f;s++){e=voice_tb[s];if(e.sym&&e.sym.type==C.CLEF)continue;if(cur_sy.voices[s].range<0||cur_sy.voices[s].second&&!e.bar_start)continue;o=cur_sy.voices[s].st;if(!staff_tb[o]||!staff_tb[o].clef)continue;t=clone(staff_tb[o].clef),t.v=s,t.p_v=e,t.st=o,t.time=tsfirst.time,t.prev=null,t.next=e.sym,t.next&&(t.next.prev=t),e.sym=t,e.last_sym=t,t.ts_next=i,i?t.ts_prev=i.ts_prev:t.ts_prev=null,t.ts_prev?(t.ts_prev.ts_next=t,delete t.seqst):(tsfirst=t,t.seqst=!0),i&&(i.ts_prev=t,i.type==C.CLEF&&delete i.seqst),delete t.clef_small,t.second=cur_sy.voices[s].second,cur_sy.st_print[o]||(t.invis=!0)}for(s=0;s<f;s++){if(cur_sy.voices[s].range<0||cur_sy.voices[s].second||!cur_sy.st_print[cur_sy.voices[s].st])continue;e=voice_tb[s];if(i&&i.v==s&&i.type==C.KEY){e.last_sym=i,i.k_old_sf=i.k_sf,i=i.ts_next;continue}n=e.key;if(n.k_sf||n.k_a_acc)t=new_sym(C.KEY,e,i),t.k_sf=n.k_sf,t.k_old_sf=n.k_sf,t.k_none=n.k_none,t.k_a_acc=n.k_a_acc,t.istart=n.istart,t.iend=n.iend,n.k_bagpipe&&(t.k_bagpipe=n.k_bagpipe,t.k_bagpipe=="p"&&(t.k_old_sf=3))}if(insert_meter&1){for(s=0;s<f;s++){e=voice_tb[s],n=e.meter;if(cur_sy.voices[s].range<0||cur_sy.voices[s].second||!cur_sy.st_print[cur_sy.voices[s].st]||n.a_meter.length==0)continue;if(i&&i.v==s&&i.type==C.METER){e.last_sym=i,i=i.ts_next;continue}t=new_sym(C.METER,e,i),t.istart=n.istart,t.iend=n.iend,t.wmeasure=n.wmeasure,t.a_meter=n.a_meter}insert_meter&=-2}for(s=0;s<f;s++){e=voice_tb[s],n=e.bar_start,e.bar_start=null;if(i&&i.v==s&&i.type==C.BAR){e.last_sym=i,i=i.ts_next;continue}if(!n)continue;if(cur_sy.voices[s].range<0||!cur_sy.st_print[cur_sy.voices[s].st])continue;n.next=e.last_sym.next,n.next&&(n.next.prev=n),e.last_sym.next=n,n.prev=e.last_sym,e.last_sym=n,lktsym(n,i),n.time=tsfirst.time,n.ts_prev.type!=n.type&&(n.seqst=!0),i&&i.type==n.type&&n.v!=i.v&&delete i.seqst}self.set_pitch(i);for(t=i;t;t=t.ts_next)if(t.seqst){for(t=t.ts_next;t;t=t.ts_next)if(t.seqst)break;break}while(i){if(i.seqst){do i=i.ts_next;while(i&&!i.seqst);break}i=i.ts_next}t=tsfirst;for(;;){n=t,a=0;do{self.set_width(t),u=t.wl;for(r=t.prev;r;r=r.prev)if(w_tb[r.type]!=0){u+=r.wr;break}u>a&&(a=u),t=t.ts_next}while(t!=i&&!t.seqst);n.shrink=a,n.space=0;if(t==i)break}}function set_words(e){var t,n,r,i,s=!0,o=127;for(t=e.sym;t;t=t.next)if(t.type==C.NOTE){o=t.notes[0].pit;break}for(t=e.sym;t;t=t.next){switch(t.type){case C.MREST:s=!0;break;case C.BAR:t.bar_type=bar_cnv(t.bar_type),t.beam_on||(s=!0),!t.next&&t.prev&&t.prev.head==C.OVALBARS&&(t.prev.head=C.SQUARE);break;case C.NOTE:case C.REST:if(t.trem2)break;r=t.nflags,t.ntrem&&(r+=t.ntrem),t.type==C.REST&&t.beam_end&&(t.beam_end=!1,s=!0);if(s||r<=0)i&&(i.beam_end=!0,i=null),r<=0?(t.beam_st=!0,t.beam_end=!0):t.type==C.NOTE&&(t.beam_st=!0,s=!1);t.beam_end&&(s=!0),t.type==C.NOTE&&(i=t)}if(t.type==C.NOTE){t.nhd!=0&&sort_pitch(t),o=t.notes[0].pit;for(n=t.prev;n;n=n.prev){if(n.type!=C.REST)break;n.notes[0].pit=o}}else t.notes||(t.notes=[],t.notes[0]={},t.nhd=0),t.notes[0].pit=o}i&&(i.beam_end=!0)}function set_rb(e){var t,n,r,i=e.sym;while(i){if(i.type!=C.BAR||!i.rbstart||i.norepbra){i=i.next;continue}n=cfmt.rbmax;if(i.text&&i.text[0]=="1"){r=0,t=null;for(i=i.next;i;i=i.next){if(i.type!=C.BAR)continue;r++;if(i.rbstop){r<=cfmt.rbmax&&(n=r,t=null);break}r==cfmt.rbmin&&(t=i)}t&&(t.rbstop=1,n=cfmt.rbmin)}while(i){if(i.rbstart!=2){i=i.next;if(!i)break;if(i.rbstart!=2){i=i.next;if(!i)break;if(i.rbstart!=2)break}}r=0,t=null;for(i=i.next;i;i=i.next){if(i.type!=C.BAR)continue;r++;if(i.rbstop)break;i.next?r==n&&(i.rbstop=1):i.rbstop=2}}}}function set_global(){var e,t,n,r,i;i=cur_sy,t=i.nstaff;for(;;){i=i.next;if(!i)break;i.nstaff>t&&(t=i.nstaff)}nstaff=t,r=voice_tb.length;for(n=0;n<r;n++)e=voice_tb[n],set_words(e),set_rb(e);set_float(),set_clefs(),self.set_pitch(null)}function set_indent(e){var t,n,r,i,s,o,u,a,f=voice_tb.length,l=0;for(n=0;n<f;n++){i=voice_tb[n];if(cur_sy.voices[n].range<0)continue;t=cur_sy.voices[n].st,s=(e||i.new_name)&&i.nm?i.nm:i.snm;if(!s)continue;a||(a=get_font("voice"),set_font(a)),o=0;for(;;){u=s.indexOf("\\n",o),u<0?r=strwh(s.slice(o)):r=strwh(s.slice(o,u)),r=r[0],r>l&&(l=r);if(u<0)break;o=u+1}}a&&(l+=4*cwid(" ")*a.swfac),r=.5;for(t=0;t<=cur_sy.nstaff;t++){if(cur_sy.staves[t].flags&(OPEN_BRACE2|OPEN_BRACKET2)){r=12;break}cur_sy.staves[t].flags&(OPEN_BRACE|OPEN_BRACKET)&&(r=6)}return l+=r,e&&(l+=cfmt.indent),l}function set_beams(e){var t,n,r,i,s,o,u,a,f,l,c,h,p=-1;for(t=e;t;t=t.next){if(t.type!=C.NOTE){if(t.type!=C.GRACE)continue;r=t.extra;if(r.stem==2){s=t;continue}!t.stem&&(t.stem=t.multi)==0&&(t.stem=1);for(;r;r=r.next)r.stem=t.stem,r.multi=t.multi;continue}if(!t.stem&&(t.stem=t.multi)==0){l=t.mid/3+18;if(i)t.stem=p;else if(t.beam_st&&!t.beam_end){i=!0,c=t.notes[t.nhd].pit,h=t.notes[0].pit;for(r=t.next;r;r=r.next){if(r.type!=C.NOTE)continue;if(r.stem||r.multi){t.stem=r.stem||r.multi;break}r.notes[r.nhd].pit>c&&(c=r.notes[r.nhd].pit),r.notes[0].pit<h&&(h=r.notes[0].pit);if(r.beam_end)break}r.beam_end&&((c+h)/2<l?t.stem=1:(c+h)/2>l?t.stem=-1:cfmt.bstemdown&&(t.stem=-1)),t.stem||(t.stem=p)}else{a=(t.notes[t.nhd].pit+t.notes[0].pit)/2;if(a==l){a=0;for(f=0;f<=t.nhd;f++)a+=t.notes[f].pit;a/=t.nhd+1}a<l?t.stem=1:a>l?t.stem=-1:cfmt.bstemdown?t.stem=-1:t.stem=p}}else t.beam_st&&!t.beam_end&&(i=!0);t.beam_end&&(i=!1),p=t.stem;if(s){for(r=s.extra;r;r=r.next)r.stem=-p;s.stem=-p,s=null}}}function same_head(e,t){var n,r,i,s,o,u,a,f,l,c,h;if(e.shiftunison&&e.shiftunison>=3)return!1;if((i=e.dur)>=C.BLEN)return!1;if((s=t.dur)>=C.BLEN)return!1;if(e.stemless&&t.stemless)return!1;if(e.dots!=t.dots)if(e.shiftunison&&e.shiftunison&1||e.dots*t.dots!=0)return!1;if(e.stem*t.stem>0)return!1;n=r=0;if(e.notes[0].pit>t.notes[0].pit){if(e.stem<0)return!1;while(t.notes[r].pit!=e.notes[0].pit)if(++r>t.nhd)return!1}else if(e.notes[0].pit<t.notes[0].pit){if(t.stem<0)return!1;while(t.notes[0].pit!=e.notes[n].pit)if(++n>e.nhd)return!1}if(t.notes[r].acc!=e.notes[n].acc)return!1;u=n,f=r,c=e.notes[n].shhd,h=t.notes[r].shhd;do{n++,r++;if(n>e.nhd)break;if(r>t.nhd)break;if(t.notes[r].acc!=e.notes[n].acc)return!1;c<e.notes[n].shhd&&(c=e.notes[n].shhd),h<t.notes[r].shhd&&(h=t.notes[r].shhd)}while(t.notes[r].pit==e.notes[n].pit);if(n<=e.nhd){if(r<=t.nhd)return!1;if(t.stem>0)return!1}else if(r<=t.nhd&&e.stem>0)return!1;a=n,l=r,o=0;if(i!=s){i<s&&(i=s,s=e.dur);if(i<C.BLEN/2)t.dots?o=2:e.dots&&(o=1);else{if(!(s<C.BLEN/4))return!1;if(e.shiftunison&&e.shiftunison&2)return!1;o=t.dur>=C.BLEN/2?2:1}}o==0&&(o=e.p_v.scale<t.p_v.scale?2:1);if(o==1){for(r=f;r<l;r++)t.notes[r].invis=!0,delete t.notes[r].acc;for(r=0;r<=t.nhd;r++)t.notes[r].shhd+=c}else{for(n=u;n<a;n++)e.notes[n].invis=!0,delete e.notes[n].acc;for(n=0;n<=e.nhd;n++)e.notes[n].shhd+=h}return!0}function unison_acc(e,t,n,r){var i,s;if(!t.notes[r].acc){s=w_note[t.head]*2+t.xmx+e.notes[n].shac+2,e.notes[n].micro&&(s+=2),t.dots&&(s+=6);for(i=0;i<=e.nhd;i++)e.notes[i].shhd+=s,e.notes[i].shac-=s;e.xmx+=s}else{s=w_note[e.head]*2+e.xmx+t.notes[r].shac+2,t.notes[r].micro&&(s+=2),e.dots&&(s+=6);for(i=0;i<=t.nhd;i++)t.notes[i].shhd+=s,t.notes[i].shac-=s;t.xmx+=s}}function set_left(e){var t,n,r,i,s=w_note[e.head],o=s,u=[];for(n=0;n<MAXPIT;n++)u.push(-100);if(e.nflags>-2){e.stem>0?(o=-o,n=e.notes[0].pit*2,r=(Math.ceil((e.ymx-2)/3)+18)*2):(n=(Math.ceil((e.ymn+2)/3)+18)*2,r=e.notes[e.nhd].pit*2),n<0&&(n=0),r>=MAXPIT&&(r=MAXPIT-1);while(n<=r)u[n++]=o}i=e.notes[e.stem>0?0:e.nhd].shhd;for(t=0;t<=e.nhd;t++)o=-e.notes[t].shhd+s+i,n=e.notes[t].pit*2,n<0?n=0:n>=MAXPIT-1&&(n=MAXPIT-2),o>u[n]&&(u[n]=o),e.head!=C.SQUARE&&(o-=1),o>u[n-1]&&(u[n-1]=o),o>u[n+1]&&(u[n+1]=o);return u}function set_right(e){var t,n,r,i,s,o=w_note[e.head],u=o,a=e.nflags>0&&e.beam_st&&e.beam_end,f=[];for(n=0;n<MAXPIT;n++)f.push(-100);if(e.nflags>-2){e.stem<0?(u=-u,n=(Math.ceil((e.ymn+2)/3)+18)*2,r=e.notes[e.nhd].pit*2,i=n+4):(n=e.notes[0].pit*2,r=(Math.ceil((e.ymx-2)/3)+18)*2),n<0&&(n=0),r>MAXPIT&&(r=MAXPIT);while(n<r)f[n++]=u}if(a)if(e.stem>0){e.xmx==0?n=e.notes[e.nhd].pit*2:n=e.notes[0].pit*2,n+=4,n<0&&(n=0);for(;n<MAXPIT&&n<=r-4;n++)f[n]=11}else{n=i,n<0&&(n=0);for(;n<MAXPIT&&n<=e.notes[0].pit*2-4;n++)f[n]=3.5}s=e.notes[e.stem>0?0:e.nhd].shhd;for(t=0;t<=e.nhd;t++)u=e.notes[t].shhd+o-s,n=e.notes[t].pit*2,n<0?n=0:n>=MAXPIT-1&&(n=MAXPIT-2),u>f[n]&&(f[n]=u),e.head!=C.SQUARE&&(u-=1),u>f[n-1]&&(f[n-1]=u),u>f[n+1]&&(f[n+1]=u);return f}function set_overlap(){function x(){t=n,n=e,c=h,E=m,S=g,d=p}var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S;for(e=tsfirst;e;e=e.ts_next){if(e.type!=C.NOTE||e.invis)continue;if(e.xstem&&e.ts_prev.stem<0)for(u=0;u<=e.nhd;u++)e.notes[u].shhd-=7,e.notes[u].shac+=16;n=e;for(;;){n=n.ts_next;if(!n)break;if(n.time!=e.time){n=null;break}if(n.type==C.NOTE&&!n.invis&&n.st==e.st)break}if(!n)continue;t=e,cur_sy.voices[t.v].range<cur_sy.voices[n.v].range?n.dot_low=!0:t.dot_low=!0;if(t.ymn>n.ymx||t.ymx<n.ymn)continue;if(same_head(t,n))continue;g=set_right(t),y=set_left(n),r=t.ts_prev;if(r&&r.time==t.time&&r.st==t.st&&r.type==C.NOTE&&!r.invis){w=set_right(r);for(i=0;i<MAXPIT;i++)w[i]>g[i]&&(g[i]=w[i])}else r=null;c=-10;for(i=0;i<MAXPIT;i++)y[i]+g[i]>c&&(c=y[i]+g[i]);if(c<-3)if(!t.dots||!n.dots||!n.dot_low||t.stem>0||n.stem<0||t.notes[t.nhd].pit+2!=n.notes[0].pit||n.notes[0].pit&1)continue;b=set_right(n),m=set_left(t);if(r){w=set_left(r);for(i=0;i<MAXPIT;i++)w[i]>m[i]&&(m[i]=w[i])}h=p=d=-100;for(i=0;i<MAXPIT;i++)m[i]+b[i]>h&&(h=m[i]+b[i]),b[i]>d&&(d=b[i]),g[i]>p&&(p=g[i]);f=0,s=t.nhd,o=n.nhd;for(;;){l=t.notes[s].pit-n.notes[o].pit;switch(l){case 0:if(t.notes[s].acc!=n.notes[o].acc){f=-1;break}n.notes[o].acc&&(n.notes[o].acc=0),t.dots&&n.dots&&t.notes[s].pit&1&&(f=1);break;case-1:t.dots&&n.dots&&(t.notes[s].pit&1?(t.dot_low=!1,n.dot_low=!1):(t.dot_low=!0,n.dot_low=!0));break;case-2:if(t.dots&&n.dots&&!(t.notes[s].pit&1)){t.dot_low=!1,n.dot_low=!1;break}}if(f<0)break;if(l>=0&&--s<0)break;if(l<=0&&--o<0)break}if(f<0){unison_acc(t,n,s,o);continue}a=0,t.dots?n.dots&&(f||(a=1)):n.dots&&h+p<c+d&&(a=1),E=y,S=b,!r&&h+p<c+d&&x(),c+=3,c<0&&(c=0),u=t.stem>=0?0:t.nhd,c+=t.notes[u].shhd,u=n.stem>=0?0:n.nhd,c-=n.notes[u].shhd;if(t.dots){v=7.7+t.xmx+3.5*t.dots-3.5+3;if(!a){h=-100;for(s=0;s<=t.nhd;s++)i=t.notes[s].pit,i&1||(t.dot_low?i--:i++),i*=2,i<1?i=1:i>=MAXPIT-1&&(i=MAXPIT-2),E[i]>h&&(h=E[i]),E[i-1]+1>h&&(h=E[i-1]+1),E[i+1]+1>h&&(h=E[i+1]+1);v+h+2>c&&(c=v+h+2)}else if(v<c+d+n.xmx){h=0;for(s=0;s<=t.nhd;s++)i=t.notes[s].pit,i&1||(t.dot_low?i--:i++),i*=2,i<1?i=1:i>=MAXPIT-1&&(i=MAXPIT-2),S[i]>h&&(h=S[i]),S[i-1]+1>h&&(h=S[i-1]=1),S[i+1]+1>h&&(h=S[i+1]+1);h>4.5&&7.7+t.xmx+2<c+h+n.xmx&&(n.xmx=h+3-7.7)}}for(u=n.nhd;u>=0;u--)n.notes[u].shhd+=c;n.xmx+=c,a&&(t.xmx=n.xmx)}}function set_stems(){var e,t,n,r,i,s,o,u,a,f;for(e=tsfirst;e;e=e.ts_next){if(e.type!=C.NOTE){if(e.type!=C.GRACE)continue;a=f=e.mid;for(n=e.extra;n;n=n.next)r=GSTEM,n.nflags>1&&(r+=1.2*(n.nflags-1)),s=3*(n.notes[0].pit-18),o=3*(n.notes[n.nhd].pit-18),e.stem>=0?(n.y=s,n.ys=o+r,o=Math.round(n.ys)):(n.y=o,n.ys=s-r,s=Math.round(n.ys)),o+=2,s-=2,s<a?a=s:o>f&&(f=o),n.ymx=o,n.ymn=s;e.ymx=f,e.ymn=a;continue}set_head_shift(e),u=e.nflags;if(e.beam_st&&!e.beam_end){e.feathered_beam&&(u=++e.nflags);for(t=e.next;;t=t.next)if(t.type==C.NOTE){e.feathered_beam&&t.nflags++;if(t.beam_end)break}t.nflags>u&&(u=t.nflags)}else if(!e.beam_st&&e.beam_end){for(t=e.prev;;t=t.prev)if(t.beam_st)break;t.nflags>u&&(u=t.nflags)}r=cfmt.stemheight;switch(u){case 2:r+=2;break;case 3:r+=5;break;case 4:r+=10;break;case 5:r+=16}(i=e.p_v.scale)!=1&&(r*=(i+1)*.5),s=3*(e.notes[0].pit-18),e.nhd>0?(r-=2,o=3*(e.notes[e.nhd].pit-18)):o=s,e.ntrem&&(r+=2*e.ntrem),e.stemless?(e.stem>=0?(e.y=s,e.ys=o):(e.ys=s,e.y=o),u==-4&&(s-=6),e.ymx=o+4,e.ymn=s-4):e.stem>=0?(u>=2&&(r-=1),e.notes[e.nhd].pit>26&&(u<=0||!e.beam_st||!e.beam_end)&&(r-=2,e.notes[e.nhd].pit>28&&(r-=2)),e.y=s,e.notes[0].ti1&&(s-=3),e.ymn=s-4,e.ys=o+r,e.ys<e.mid&&(e.ys=e.mid),e.ymx=e.ys+2.5|0):(e.notes[0].pit<18&&(u<=0||!e.beam_st||!e.beam_end)&&(r-=2,e.notes[0].pit<16&&(r-=2)),e.ys=s-r,e.ys>e.mid&&(e.ys=e.mid),e.ymn=e.ys-2.5|0,e.y=o,e.notes[e.nhd].ti1&&(o+=3),e.ymx=o+4)}}function check_bar(e){var t,n,r,i,s=e.p_v;while(e.type==C.CLEF||e.type==C.KEY||e.type==C.METER){e.type==C.METER&&e.time>s.sym.time&&(insert_meter|=1),e=e.prev;if(!e)return}if(e.type!=C.BAR)return;e.text!=undefined&&(s.bar_start=clone(e),s.bar_start.bar_type="",delete e.text,delete e.a_gch),t=e.bar_type;if(t==":")return;if(t.slice(-1)!=":")return;s.bar_start||(s.bar_start=clone(e));if(t[0]!=":"){if(t=="||:")return s.bar_start.bar_type="[|:",e.bar_type="||",!0;s.bar_start.bar_type=t,e.prev&&e.prev.type==C.BAR?unlksym(e):e.bar_type="|";return}if(t=="||:")return s.bar_start.bar_type="[|:",e.bar_type="||",!0;n=0;while(t[n]==":")n++;if(n<t.length){e.bar_type=t.slice(0,n)+"|]",n=t.length-1;while(t[n]==":")n--;s.bar_start.bar_type="[|"+t.slice(n+1)}else n=t.length/2|0,e.bar_type=t.slice(0,n)+"|]",s.bar_start.bar_type="[|"+t.slice(n);return!0}function sym_staff_move(e){for(var t=tsfirst;t;t=t.ts_next){if(t.nl)break;t.st==e&&t.type!=C.CLEF&&(t.st++,t.invis=!0)}}function block_gen(e){switch(e.subtype){case"leftmargin":case"rightmargin":case"pagescale":case"pagewidth":case"scale":case"staffwidth":svg_flush(),self.set_format(e.subtype,e.param);break;case"ml":svg_flush(),user.img_out(e.text);break;case"newpage":blk_flush(),block.newpage=!0,blk_out();break;case"sep":set_page(),vskip(e.sk1),output+='<path class="stroke"\n d="M',out_sxsy(e.x," ",0),output+="h"+e.l.toFixed(2)+'"/>\n',vskip(e.sk2);break;case"text":write_text(e.text,e.opt);break;case"title":write_title(e.text,!0);break;case"vskip":vskip(e.sk);break;default:error(2,e,"Block $1 not treated",e.subtype)}}function set_piece(){function c(e){var t=staff_tb[e],n=l.staves[e];t||(t=staff_tb[e]={}),t.y=0,t.stafflines=n.stafflines,t.staffscale=n.staffscale,t.ann_top=t.ann_bot=0}function h(){var e,t,n,r=l.staves.length;for(e=0;e<r;e++){if(!(l.staves[e].flags&(OPEN_BRACE|OPEN_BRACE2)))continue;n=0,t=e;while(e<r){n|=a[e]?1:2;if(l.staves[e].flags&(CLOSE_BRACE|CLOSE_BRACE2))break;e++}if(n==3)while(t<=e)a[t]=!0,f[t++]=!0}}function p(){var e,t,n,r,i;for(e=0;e<=nstaff;e++){t=staff_tb[e];if(!f[e]){t.botbar=t.topbar=0;continue}r=t.stafflines.length,t.topbar=6*(r-1);for(n=0;n<r-1;n++)if(t.stafflines[n]!=".")break;t.botline=t.botbar=n*6,n>=r-2&&(t.stafflines[n]!="."?(t.botbar-=6,t.topbar+=6):(t.botbar-=12,t.topbar+=12))}}var e,t,n,r,i,s,o,u,a=[],f=[],l=cur_sy;nstaff=s=l.nstaff;for(r=0;r<=s;r++)c(r);for(e=tsfirst;e;e=e.ts_next){if(e.nl)break;e.ts_next||(t=e);switch(e.type){case C.STAVES:h(),l.st_print=new Uint8Array(a),l=e.sy,s=l.nstaff;if(nstaff<s){for(r=nstaff+1;r<=s;r++)c(r);nstaff=s}a=[];continue;case C.BLOCK:blocks.push(e),unlksym(e),t&&(t=e.ts_prev);continue}r=e.st;if(a[r])continue;switch(e.type){case C.CLEF:r>nstaff&&(staff_tb[r].clef=e,unlksym(e));break;case C.BAR:if(!l.staves[r].staffnonote||l.staves[r].staffnonote<=1)break;case C.GRACE:f[r]=a[r]=!0;break;case C.NOTE:case C.REST:case C.SPACE:case C.MREST:l.staves[r].staffnonote>1?f[r]=a[r]=!0:!e.invis&&(l.staves[r].staffnonote!=0||e.type==C.NOTE)&&(f[r]=a[r]=!0)}}tsnext=e,h(),l.st_print=new Uint8Array(a),p();for(r=0;r<nstaff;r++)f[r]||sym_staff_move(r);f[nstaff]||(staff_tb[nstaff].topbar=0),init_music_line(),gene.st_print=new Uint8Array(f);if(tsnext){e=tsnext,delete e.nl,t=e.ts_prev,t.ts_next=null,o=voice_tb.length;for(i=0;i<o;i++){n=voice_tb[i];if(n.sym&&n.sym.time<=tsnext.time){for(e=tsnext.ts_prev;e;e=e.ts_prev)if(e.v==i){n.s_next=e.next,e.next=null,check_bar(e)&&(u=e.wl,self.set_width(e),e.shrink+=e.wl-u);break}if(e)continue}n.s_next=n.sym,n.sym=null}}t.type!=C.BAR&&(e=add_end_bar(t),e.space=set_space(e),e.space<e.shrink&&t.type!=C.KEY&&(e.space=e.shrink))}function set_sym_glue(e){var t,n,r,i,s,o=0,u=0,a=0,f=0,l=0;for(t=tsfirst;t;t=t.ts_next)t.type==C.GRACE&&!i&&(i=t),t.seqst&&(o+=t.shrink,t.space?t.space<t.shrink?(l+=t.shrink,u+=t.shrink):u+=t.space:f+=t.shrink);if(u==0){realwidth=0;return}r=!tsnext||tsnext.type==C.BLOCK||blocks.length;if(o>=e||u==l){o>e&&error(1,t,"Line too much shrunk $1 $2 $3",o.toFixed(2),u.toFixed(2),e.toFixed(2)),a=0;for(t=tsfirst;t;t=t.ts_next)t.seqst&&(a+=t.shrink),t.x=a;spf_last=0}else if(r&&u+f>e*(1-cfmt.stretchlast)||!r&&(u+f>e||cfmt.stretchstaff)){for(var c=4;--c>=0;){s=(e-f-l)/(u-l),u=0,l=0,a=0;for(t=tsfirst;t;t=t.ts_next)t.seqst&&(t.space?t.space*s<=t.shrink?(l+=t.shrink,u+=t.shrink,a+=t.shrink):(u+=t.space,a+=t.space*s):a+=t.shrink),t.x=a;if(Math.abs(a-e)<.1)break}spf_last=s}else{s=(e-f-l)/u,spf_last<s&&(s=spf_last);for(t=tsfirst;t;t=t.ts_next)t.seqst&&(a+=t.space*s<=t.shrink?t.shrink:t.space*s),t.x=a}realwidth=a;for(t=i;t;t=t.ts_next){if(t.type!=C.GRACE)continue;t.gr_shift?a=t.prev.x+t.prev.wr:a=t.x-t.wl;for(n=t.extra;n;n=n.next)n.x+=a}}function set_sym_line(){var e,t,n,r=voice_tb.length;for(n=0;n<r;n++)e=voice_tb[n],t=e.s_next,e.sym=t,t&&(t.prev=null)}function set_posx(){posx=img.lm/cfmt.scale}function gen_init(){var e=tsfirst,t=e.time;for(;e;e=e.ts_next){if(e.time!=t){set_page();return}switch(e.type){case C.NOTE:case C.REST:case C.MREST:set_page();return;default:continue;case C.STAVES:cur_sy=e.sy;break;case C.BLOCK:block_gen(e)}unlksym(e),e.p_v.s_next==e&&(e.p_v.s_next=e.next)}tsfirst=null}function output_music(){var e,t,n,r;gen_init();if(!tsfirst)return;set_global(),voice_tb.length>1&&self.set_stem_dir();for(e=0;e<voice_tb.length;e++)set_beams(voice_tb[e].sym);self.set_stems(),voice_tb.length>1&&(set_rest_offset(),set_overlap()),set_acc_shft(),set_allsymwidth(),n=set_indent(!0),cfmt.singleline?(e=get_ck_width(),t=n+e[0]+e[1]+get_width(tsfirst,null),img.width=t*cfmt.scale+img.lm+img.rm+2):(t=get_lwidth(),cut_tune(t,n)),spf_last=1.2;for(;;){set_piece(),self.set_sym_glue(t-n);if(realwidth!=0){n!=0&&(posx+=n),draw_sym_near(),r=set_staff(),delayed_update(),draw_systems(n),draw_all_sym(),vskip(r),n!=0&&(posx-=n,insert_meter&=-3);while(blocks.length!=0)block_gen(blocks.shift())}tsfirst=tsnext,svg_flush();if(!tsnext)break;gen_init();if(!tsfirst)break;tsfirst.ts_prev=null,set_sym_line(),t=get_lwidth(),n=set_indent()}}function reset_gen(){insert_meter=cfmt.writefields.indexOf("M")>=0?3:2}function set_ref(e){e.fname=parse.fname,e.istart=parse.istart,e.iend=parse.iend}function new_clef(e){var t={type:C.CLEF,clef_line:2,clef_type:"t",v:curvoice.v,p_v:curvoice,time:curvoice.time,dur:0},n=1;set_ref(t);switch(e[0]){case'"':n=e.indexOf('"',1),t.clef_name=e.slice(1,n),n++;break;case"a":if(e[1]=="u"){t.clef_type="a",t.clef_auto=!0,n=4;break}n=4;case"C":t.clef_type="c",t.clef_line=3;break;case"b":n=4;case"F":t.clef_type="b",t.clef_line=4;break;case"n":n=4,t.invis=!0;break;case"t":if(e[1]=="e"){t.clef_type="c",t.clef_line=4;break}n=6;case"G":break;case"p":n=4;case"P":t.clef_type="p",t.clef_line=3,curvoice.key.k_sf=0,curvoice.ckey.k_drum=!0;break;default:syntax(1,"Unknown clef '$1'",e);return}e[n]>="1"&&e[n]<="9"&&(t.clef_line=Number(e[n]),n++);if(e[n+1]!="8")return t;switch(e[n]){case"^":t.clef_oct_transp=!0;case"+":t.clef_octave=7;break;case"_":t.clef_oct_transp=!0;case"-":t.clef_octave=-7}return t}function get_transp(e,t){var n,r,i,s,o=[];if(e[0]=="0")return 0;if("123456789-+".indexOf(e[0])>=0){r=parseInt(e)*3;if(isNaN(r)||r<-108||r>108){syntax(1,"Bad transpose value");return}switch(e.slice(-1)){default:return r;case"#":r++;break;case"b":r+=2}return r>0?r:r-3}if(t=="instr"){i=e.indexOf("/");if(!cfmt.sound){if(i<0)return 0;e=e.replace("/","")}else i<0?e="c"+e:e=e.replace(/.*\//,"c")}i=new scanBuf,i.buffer=e;for(n=0;n<2;n++){s=i.buffer[i.index]?parse_acc_pit(i):null;if(!s){syntax(1,"Bad transpose value");return}s.pit+=124,r=(s.pit/7|0)*12+note_pit[s.pit%7],s.acc&&s.acc!=3&&(r+=s.acc),o[n]=r}r=(o[1]-o[0])*3;if(s)switch(s.acc){default:return r;case 2:case 1:r++;break;case-1:case-2:r+=2}return r>0?r:r-3}function set_linebreak(e){var t,n;for(t=0;t<128;t++)char_tb[t]=="\n"&&(char_tb[t]=nil);e=e.split(/\s+/);for(t=0;t<e.length;t++){n=e[t];switch(n){case"!":case"$":case"*":case";":case"?":case"@":break;case"<none>":continue;case"<EOL>":n="\n";break;default:syntax(1,"Bad value '$1' in %%linebreak - ignored",n);continue}char_tb[n.charCodeAt(0)]="\n"}}function set_user(e){var t,n,r,i=e.match(/(.*?)[= ]*([!"].*[!"])/);if(!i){syntax(1,'Lack of starting ! or " in U: / %%user');return}n=i[1],r=i[2];if(r.slice(-1)!=r[0]){syntax(1,"Lack of ending $1 in U:/%%user",r[0]);return}n[0]=="\\"&&(n[1]=="t"?n=" ":n[1]||(n=" ")),t=n.charCodeAt(0);if(t>=128){syntax(1,errs.not_ascii);return}switch(char_tb[t][0]){case"0":case"d":case"i":case" ":break;case'"':case"!":if(char_tb[t].length>1)break;default:syntax(1,"Bad user character '$1'",n);return}switch(r){case"!beambreak!":r=" ";break;case"!ignore!":r="i";break;case"!nil!":case"!none!":r="d"}char_tb[t]=r}function get_st_lines(e){var t,n;if(!e)return;if(/^[\]\[|.-]+$/.test(e))return e.replace(/\]/g,"[");t=parseInt(e);switch(t){case 0:return"...";case 1:return"..|";case 2:return".||";case 3:return".|||"}if(isNaN(t)||t<0||t>16)return;n="|";while(--t>0)n+="|";return n}function new_block(e){var t={type:C.BLOCK,subtype:e,dur:0};parse.state==2&&goto_tune();var n=curvoice;return curvoice=voice_tb[par_sy.top_voice],sym_link(t),curvoice=n,t}function set_vp(e){var t,n,r,i,s;for(;;){n=e.shift();if(!n)break;if(n[n.length-1]=="="&&e.length==0){syntax(1,errs.bad_val,n);break}switch(n){case"clef=":t=e.shift();break;case"clefpitch=":n=e.shift();if(n){i=ntb.indexOf(n[0]);if(i>=0){switch(n[1]){case"'":i+=7;break;case",":i-=7,n[2]==","&&(i-=7)}s=4-i;break}}syntax(1,errs.bad_val,n);break;case"octave=":case"uscale=":i=parseInt(e.shift()),isNaN(i)?syntax(1,errs.bad_val,n):curvoice[n.slice(0,-1)]=i;break;case"cue=":curvoice.scale=e.shift()=="on"?.7:1;break;case"instrument=":curvoice.transp=get_transp(e.shift(),"instr");break;case"map=":curvoice.map=e.shift();break;case"name=":case"nm=":curvoice.nm=e.shift(),curvoice.nm[0]=='"'&&(curvoice.nm=curvoice.nm.slice(1,-1)),curvoice.new_name=!0;break;case"stem=":case"pos=":n=="pos="?n=e.shift().split(" "):n=["stm",e.shift()],i=posval[n[1]];if(i==undefined){syntax(1,errs.bad_val,n[0]);break}r||(r={}),r[n[0]]=i;break;case"scale=":i=parseFloat(e.shift()),isNaN(i)||i<.6||i>1.5?syntax(1,errs.bad_val,"%%voicescale"):curvoice.scale=i;break;case"score=":if(cfmt.sound)break;n=e.shift(),n.indexOf("/")<0&&(n+="/c"),curvoice.transp=get_transp(n);break;case"shift=":curvoice.shift=get_transp(e.shift());break;case"sound=":case"transpose=":if(!cfmt.sound)break;curvoice.transp=get_transp(e.shift());break;case"subname=":case"sname=":case"snm=":curvoice.snm=e.shift(),curvoice.snm[0]=='"'&&(curvoice.snm=curvoice.snm.slice(1,-1));break;case"stafflines=":i=get_st_lines(e.shift()),i==undefined?syntax(1,"Bad %%stafflines value"):curvoice.st!=undefined?par_sy.staves[curvoice.st].stafflines=i:curvoice.stafflines=i;break;case"staffnonote=":i=parseInt(e.shift()),isNaN(i)?syntax(1,"Bad %%staffnonote value"):curvoice.staffnonote=i;break;case"staffscale=":i=parseFloat(e.shift()),isNaN(i)||i<.3||i>2?syntax(1,"Bad %%staffscale value"):curvoice.staffscale=i;break;default:switch(n.slice(0,4)){case"treb":case"bass":case"alto":case"teno":case"perc":t=n;break;default:"GFC".indexOf(n[0])>=0?t=n:n.slice(-1)=="="&&e.shift()}}}if(r){curvoice.pos=clone(curvoice.pos);for(n in r)r.hasOwnProperty(n)&&(curvoice.pos[n]=r[n])}t&&(t=new_clef(t),t&&(s&&(t.clefpit=s),get_clef(t)))}function set_kv_parm(e){curvoice.init||(curvoice.init=!0,info.V&&(info.V["*"]&&(e=info.V["*"].concat(e)),info.V[curvoice.id]&&(e=info.V[curvoice.id].concat(e)))),e.length!=0&&self.set_vp(e)}function memo_kv_parm(e,t){if(t.length==0)return;info.V||(info.V={}),info.V[e]?Array.prototype.push.apply(info.V[e],t):info.V[e]=t}function new_key(e){var t,n,r,i,s,o=0,u={type:C.KEY,k_delta:0,dur:0};set_ref(u),t=1;switch(e[0]){case"A":u.k_sf=3;break;case"B":u.k_sf=5;break;case"C":u.k_sf=0;break;case"D":u.k_sf=2;break;case"E":u.k_sf=4;break;case"F":u.k_sf=-1;break;case"G":u.k_sf=1;break;case"H":switch(e[1]){case"P":case"p":u.k_bagpipe=e[1],u.k_sf=e[1]=="P"?0:2,t++;break;default:syntax(1,"Unknown bagpipe-like key")}break;case"P":syntax(1,"K:P is deprecated"),u.k_drum=!0,r=!0;break;case"n":e.indexOf("none")==0&&(u.k_sf=0,u.k_none=!0,t=4);default:r=!0}if(!r){switch(e[t]){case"#":u.k_sf+=7,t++;break;case"b":u.k_sf-=7,t++}e=e.slice(t).trim();switch(e.slice(0,3).toLowerCase()){default:if(e[0]!="m"||e[1]!=" "&&e[1]!=" "&&e[1]!="\n"){r=!0;break};case"aeo":case"m":case"min":u.k_sf-=3,o=5;break;case"dor":u.k_sf-=2,o=1;break;case"ion":case"maj":break;case"loc":u.k_sf-=5,o=6;break;case"lyd":u.k_sf+=1,o=3;break;case"mix":u.k_sf-=1,o=4;break;case"phr":u.k_sf-=4,o=2}r||(e=e.replace(/\w+\s*/,"")),e.indexOf("exp ")==0&&(e=e.replace(/\w+\s*/,""),e||syntax(1,"No accidental after 'exp'"),u.k_exp=!0),i=e[0];if(i=="^"||i=="_"||i=="="){u.k_a_acc=[],s=new scanBuf,s.buffer=e;do{var a=parse_acc_pit(s);if(!a)return[u,null];u.k_a_acc.push(a),i=e[s.index];while(i==" ")i=e[++s.index]}while(i=="^"||i=="_"||i=="=");e=e.slice(s.index)}else u.k_exp&&e.indexOf("none")==0&&(u.k_sf=0,e=e.replace(/\w+\s*/,""))}return u.k_delta=cgd2cde[(u.k_sf+7)%7],u.k_mode=o,[u,info_split(e,0)]}function new_meter(e){var t={type:C.METER,dur:0,a_meter:[]},n={},r,i,s=0,o,u=0,a,f,l=e,c;set_ref(t);if(l.indexOf("none")==0)u=4,f=1;else{f=0;while(u<e.length){if(l[u]=="=")break;switch(l[u]){case"C":n.top=l[u++],s||(s=4,o=4);break;case"c":case"o":n.top=l[u++];if(!s){l[-1]=="c"?(s=2,o=4):(s=3,o=4);switch(l[u]){case"|":o/=2;break;case".":s*=3,o*=2}}break;case".":case"|":n.top=l[u++];break;case"(":l[u+1]=="("&&(c=!0,n.top=l[u++],t.a_meter.push(n),n={}),a=u+1;while(a<e.length){if(l[a]==")"||l[a]=="/")break;a++}if(l[a]==")"&&l[a+1]=="/"){u++;continue};case")":c=l[u]=="(",n.top=l[u++],t.a_meter.push(n),n={};continue;default:if(l[u]<="0"||l[u]>"9"){syntax(1,"Bad char '$1' in M:",l[u]);return}o=2,n.top=l[u++];for(;;){while(l[u]>="0"&&l[u]<="9")n.top+=l[u++];if(l[u]==")"){if(l[u+1]!="/")break;u++}if(l[u]=="/"){u++;if(l[u]<="0"||l[u]>"9"){syntax(1,"Bad char '$1' in M:",l[u]);return}n.bot=l[u++];while(l[u]>="0"&&l[u]<="9")n.bot+=l[u++];break}if(l[u]!=" "&&l[u]!="+")break;if(u>=e.length||l[u+1]=="(")break;n.top+=l[u++]}s=parseInt(n.top)}c||(n.bot&&(o=parseInt(n.bot)),f+=s*C.BLEN/o),t.a_meter.push(n),n={};while(l[u]==" ")u++;l[u]=="+"&&(n.top=l[u++],t.a_meter.push(n),n={})}}if(l[u]=="="){r=l.substring(++u).match(/^(\d+)\/(\d+)$/);if(!r){syntax(1,"Bad duration '$1' in M:",l.substring(u));return}f=C.BLEN*r[1]/r[2]}t.wmeasure=f;if(parse.state!=3){info.M=e,glovar.meter=t;if(parse.state>=1){glovar.ulen||(f<=1||f>=C.BLEN*3/4?glovar.ulen=C.BLEN/8:glovar.ulen=C.BLEN/16);for(i=0;i<voice_tb.length;i++)voice_tb[i].meter=t,voice_tb[i].wmeasure=f}}else curvoice.wmeasure=f,is_voice_sig()?(curvoice.meter=t,reset_gen()):sym_link(t)}function new_tempo(e){var t=0,n,r,i,s,o={type:C.TEMPO,dur:0};set_ref(o),cfmt.writefields.indexOf("Q")<0&&(o.del=!0);if(e[0]=='"'){t=e.indexOf('"',1);if(t<0){syntax(1,"Unterminated string in Q:");return}o.tempo_str1=e.slice(1,t),t++;while(e[t]==" ")t++}s=new scanBuf,s.buffer=e,s.index=t;for(;;){r=e[s.index];if(r==undefined||r<="0"||r>"9")break;i=parse_dur(s),o.tempo_notes||(o.tempo_notes=[]),o.tempo_notes.push(C.BLEN*i[0]/i[1]);for(;;){r=e[s.index];if(r!=" ")break;s.index++}}if(r=="="){r=e[++s.index];while(r==" ")r=e[++s.index];t=s.index,r=="c"&&e[t+1]=="a"&&e[t+2]=="."&&e[t+3]==" "&&(o.tempo_ca="ca. ",s.index+=4),e[s.index+1]!="/"?o.tempo=s.get_int():(i=parse_dur(s),o.new_beat=C.BLEN*i[0]/i[1]),r=e[s.index];while(r==" ")r=e[++s.index]}if(r=='"'){s.index++,t=e.indexOf('"',s.index+1);if(t<0){syntax(1,"Unterminated string in Q:");return}o.tempo_str2=e.slice(s.index,t)}if(parse.state!=3){if(parse.state==1){info.Q=e,glovar.tempo=o;return}goto_tune()}curvoice.v==par_sy.top_voice&&(sym_link(o),glovar.tempo&&curvoice.time==0&&(glovar.tempo.del=!0))}function do_info(e,t){var n,r,i,s,o;switch(e){case"I":self.do_pscom(t);break;case"L":parse.state==2&&goto_tune(),s=t.match(/^1\/(\d+)(=(\d+)\/(\d+))?$/);if(s){r=Number(s[1]);if(!r||(r&r-1)!=0)break;r=C.BLEN/r;if(s[2]){i=Number(s[4]);if(!i||(i&i-1)!=0){i=0;break}i=Number(s[3])/i*C.BLEN}else i=r}else t=="auto"&&(r=i=-1);if(!i){syntax(1,"Bad L: value");break}parse.state<2?glovar.ulen=r:(curvoice.ulen=r,curvoice.dur_fact=i/r);break;case"M":new_meter(t);break;case"U":set_user(t);break;case"P":if(parse.state==0)break;if(parse.state==1){info.P=t;break}parse.state==2&&goto_tune();if(cfmt.writefields.indexOf(e)<0)break;n={type:C.PART,text:t,dur:0};var u=voice_tb[par_sy.top_voice];if(curvoice.v!=u.v){if(curvoice.time!=u.time)break;if(u.last_sym&&u.last_sym.type==C.PART)break;var a=curvoice;curvoice=u,sym_link(n),curvoice=a}else sym_link(n);break;case"Q":if(parse.state==0)break;new_tempo(t);break;case"V":get_voice(t);break;case"K":if(parse.state==0)break;get_key(t);break;case"N":case"R":info[e]?info[e]+="\n"+t:info[e]=t;break;case"r":if(!user.keep_remark||parse.state!=3)break;n={type:C.REMARK,text:t,dur:0},sym_link(n);break;default:syntax(0,"'$1:' line ignored",e)}}function adjust_dur(e){var t,n,r,i,s;t=curvoice.last_sym;if(!t)return;if(t.type==C.MREST||t.type==C.BAR)return;while(t.type!=C.BAR&&t.prev)t=t.prev;n=t.time,r=curvoice.time-n;if(n==0){while(t&&!t.dur)t=t.next;t&&t.type==C.REST&&t.invis&&(n+=t.dur*curvoice.wmeasure/r,t.prev?t.prev.next=t.next:curvoice.sym=t.next,t.next&&(t.next.prev=t.prev),t=t.next)}if(curvoice.wmeasure==r)return;for(;t;t=t.next){t.time=n;if(!t.dur||t.grace)continue;t.dur=t.dur*curvoice.wmeasure/r,t.dur_orig=t.dur_orig*curvoice.wmeasure/r,n+=t.dur;if(t.type!=C.NOTE&&t.type!=C.REST)continue;for(i=0;i<=t.nhd;i++)t.notes[i].dur=t.notes[i].dur*curvoice.wmeasure/r;s=identify_note(t,t.dur_orig),t.head=s[0],t.dots=s[1],t.nflags=s[2],t.nflags<=-2?t.stemless=!0:delete t.stemless}curvoice.time=e.time=n}function new_bar(){var e,t,n,r=parse.line,i={type:C.BAR,fname:parse.fname,istart:parse.bol+r.index,dur:0,multi:0};vover&&vover.bar&&get_vover("|"),glovar.new_nbar&&(i.bar_num=glovar.new_nbar,glovar.new_nbar=0),n=r.char();for(;;){t=r.next_char();switch(t){case"|":case"[":case"]":case":":n+=t;continue}break}n[0]==":"&&(n.length==1?(n="|",i.bar_dotted=!0):i.rbstop=2),a_gch&&self.gch_build(i),a_dcn&&(deco_cnv(a_dcn,i),a_dcn=null);switch(n.slice(-1)){case"[":if(/[0-9" ]/.test(t))break;n=n.slice(0,-1),r.index--,t="[";break;case":":i.rbstop=2}if(t>"0"&&t<="9"){n.slice(-1)=="["&&(n=n.slice(0,-1)),i.text=t;for(;;){t=r.next_char();if("0123456789,.-".indexOf(t)<0)break;i.text+=t}i.rbstop=2,i.rbstart=2}else if(t=='"'&&n.slice(-1)=="["){n=n.slice(0,-1),i.text="";for(;;){t=r.next_char();if(!t){syntax(1,"No end of repeat string");return}if(t=='"'){r.index++;break}t=="\\"&&(i.text+=t,t=r.next_char()),i.text+=t}i.text=cnv_escape(i.text),i.rbstop=2,i.rbstart=2}n[0]=="]"&&(i.rbstop=2,n.length!=1?n=n.slice(1):i.invis=!0),i.iend=parse.bol+r.index,i.rbstart&&curvoice.norepbra&&!curvoice.second&&(i.norepbra=!0),curvoice.ulen<0&&adjust_dur(i),e=curvoice.last_sym;if(e&&e.type==C.SPACE)e.time--;else if(e&&e.type==C.BAR){if(n=="["&&!e.text&&(curvoice.st==0||par_sy.staves[curvoice.st-1].flags&STOP_BAR||i.norepbra)){i.text&&(e.text=i.text),i.a_gch&&(e.a_gch=i.a_gch),i.norepbra&&(e.norepbra=i.norepbra),i.rbstart&&(e.rbstart=i.rbstart),i.rbstop&&(e.rbstop=i.rbstop);return}if(n=="|:"){if(e.bar_type==":|"){e.bar_type="::",e.rbstop=2;return}if(e.bar_type=="||"){e.bar_type="||:",e.rbstop=2;return}}}switch(n){case"[":i.rbstop=2;case"[]":case"[|]":i.invis=!0,n="[]";break;case":|:":case":||:":n="::";break;case"||":if(!cfmt.rbdbstop)break;case"[|":case"|]":i.rbstop=2}i.bar_type=n,curvoice.lyric_restart||(curvoice.lyric_restart=i),curvoice.sym_restart||(curvoice.sym_restart=i),e&&e.type==C.KEY&&(!e.prev||e.prev.type!=C.BAR)?(curvoice.last_sym=e.prev,e.prev||(curvoice.sym=e.prev),sym_link(i),i.next=e,e.prev=i,curvoice.last_sym=e):sym_link(i),i.st=curvoice.st,i.rbstart&&!curvoice.norepbra&&curvoice.st>0&&!(par_sy.staves[curvoice.st-1].flags&STOP_BAR)&&(e={type:C.BAR,fname:i.fname,istart:i.istart,iend:i.iend,bar_type:"[",multi:0,invis:!0,text:i.text,rbstart:2},sym_link(e),e.st=curvoice.st,delete i.text,i.rbstart=0)}function parse_staves(e){var t,n,r=[],i=!1,s=0,o=0,u=0,a=0,f=0,l=0;while(l<e.length){switch(e[l]){case" ":case" ":break;case"[":if(a||o+u>=2){syntax(1,errs.misplaced,"["),i=!0;break}s|=o+u==0?OPEN_BRACKET:OPEN_BRACKET2,u++,f<<=8,f|=OPEN_BRACKET;break;case"{":if(a||o||u>=2){syntax(1,errs.misplaced,"{"),i=!0;break}s|=u?OPEN_BRACE2:OPEN_BRACE,o++,f<<=8,f|=OPEN_BRACE;break;case"(":if(a){syntax(1,errs.misplaced,"("),i=!0;break}s|=OPEN_PARENTH,a++,f<<=8,f|=OPEN_PARENTH;break;case"*":o&&!a&&!(s&(OPEN_BRACE|OPEN_BRACE2))&&(s|=FL_VOICE);break;case"+":s|=MASTER_VOICE;break;default:if(!/\w/.test(e[l])){syntax(1,"Bad voice ID in %%staves"),i=!0;break}n="";while(l<e.length){if(" ()[]{}|*".indexOf(e[l])>=0)break;n+=e[l++]}for(;l<e.length;l++){switch(e[l]){case" ":case" ":continue;case"]":if(!(f&OPEN_BRACKET)){syntax(1,errs.misplaced,"]"),i=!0;break}u--,s|=o+u==0?CLOSE_BRACKET:CLOSE_BRACKET2,f>>=8;continue;case"}":if(!(f&OPEN_BRACE)){syntax(1,errs.misplaced,"}"),i=!0;break}o--,s|=u?CLOSE_BRACE2:CLOSE_BRACE,s&=~FL_VOICE,f>>=8;continue;case")":if(!(f&OPEN_PARENTH)){syntax(1,errs.misplaced,")"),i=!0;break}a--,s|=CLOSE_PARENTH,f>>=8;continue;case"|":s|=STOP_BAR;continue}break}r.push([n,s]),s=0;continue}l++}f!=0&&(syntax(1,"'}', ')' or ']' missing in %%staves"),i=!0);if(i||r.length==0)return;return r}function info_split(e){if(!e)return[];var t=e.match(/(".+?"|.+?)(\s+|=|$)/g);if(!t)return syntax(1,"Unterminated string"),[];for(var n=0;n<t.length;n++)t[n]=t[n].trim();return t}function identify_note(e,t){var n,r,i,r=0,s=t;s%12!=0&&syntax(1,"Invalid note duration $1",s),s/=12,s==0&&syntax(1,"Note too short");for(i=5;s!=0;s>>=1,i--)if(s&1)break;s>>=1;switch(s){case 0:break;case 1:r=1;break;case 3:r=2;break;case 7:r=3;break;default:syntax(1,"Invalid note duration $1",t),i+=(11-s)/4|0,r=4}i-=r;if(i>=0)n=C.FULL;else switch(i){default:syntax(1,"Note too long"),i=-4;case-4:n=C.SQUARE;break;case-3:n=cfmt.squarebreve?C.SQUARE:C.OVALBARS;break;case-2:n=C.OVAL;break;case-1:n=C.EMPTY}return[n,r,i]}function parse_dur(e){var t,n,r;return reg_dur.lastIndex=e.index,t=reg_dur.exec(e.buffer),t[0]?(n=t[1]||1,r=t[3]||1,t[3]||(r*=1<<t[2].length),e.index=reg_dur.lastIndex,[n,r]):[1,1]}function parse_acc_pit(e){var t,n,r,i,s,o,u=e.char();switch(u){case"^":u=e.next_char(),u=="^"?(n=2,u=e.next_char()):n=1;break;case"=":n=3,u=e.next_char();break;case"_":u=e.next_char(),u=="_"?(n=-2,u=e.next_char()):n=-1}if(n&&n!=3&&u>="1"&&u<="9"||u=="/")o=parse_dur(e),r=o[0],i=o[1],i==1?i=curvoice?curvoice.uscale:1:i*=2,u=e.char();s=ntb.indexOf(u)+16,u=e.next_char();if(s<16){syntax(1,"'$1' is not a note",e.buffer[e.index-1]);return}while(u=="'")s+=7,u=e.next_char();while(u==",")s-=7,u=e.next_char();return t={pit:s,shhd:0,shac:0,ti1:0},n&&(t.acc=n,r&&(t.micro_n=r,t.micro_d=i)),t}function note2abc(e){var t,n="abcdefg"[(e.pit+77)%7];e.acc&&(n=["__","_","","^","^^","="][e.acc+2]+n);for(t=e.pit;t>=30;t-=7)n+="'";for(t=e.pit;t<23;t+=7)n+=",";return n}function set_map(e){var t=maps[curvoice.map],n=note2abc(e);if(!t[n]){n="octave,"+n.replace(/[',]/g,"");if(!t[n]){n="key,"+"abcdefg"[(e.pit+77-curvoice.ckey.k_delta)%7];if(!t[n]){n="all";if(!t[n])return}}}e.map=t[n],e.map[1]&&(e.pit=e.map[1].pit,e.acc=e.map[1].acc)}function parse_basic_note(e,t){var n,r=parse_acc_pit(e);if(!r)return;return e.char()=="0"&&(parse.stemless=!0,e.index++),n=parse_dur(e),r.dur=t*n[0]/n[1],r}function parse_vpos(){var e,t=parse.line,n=0;t.buffer[t.index-1]=="."&&!a_dcn&&(n=C.SL_DOTTED);switch(t.next_char()){case"'":return t.index++,n+C.SL_ABOVE;case",":return t.index++,n+C.SL_BELOW}return n+C.SL_AUTO}function note_transp(e){var t,n,r,i,s,o,u,a,f,l,c=e.nhd,h=curvoice.okey.k_sf,p=curvoice.ckey.k_sf-h,d=cgd2cde[(p+28)%7],v=curvoice.vtransp;v<0&&d!=0&&(d-=7),d+=(v/3/12|0)*7;for(t=0;t<=c;t++){l=e.notes[t],r=l.pit,l.pit+=d,u=cde2fcg[(r+5+112)%7],s=l.acc;if(!s)if(!curvoice.okey.a_acc)h>0?u<h-1&&(s=1):h<0&&u>=h+6&&(s=-1);else for(n=0;n<curvoice.okey.a_acc.length;n++){o=curvoice.okey.a_acc[n];if((r+16*7-o.pit)%7==0){s=o.acc;break}}a=u+p,s&&s!=3&&(a+=s*7),u=(((a+1+21)/7|0)+2-3+160)%5,s=acc2[u];if(!l.acc)if(curvoice.ckey.k_none){if(s==3||acc_same_pitch(l.pit))continue}else{if(!curvoice.ckey.a_acc)continue;f=cgd2cde[(a+112)%7];for(n=0;n<curvoice.ckey.a_acc.length;n++)if((f+16*7-curvoice.ckey.a_acc[n].pits)%7==0)break;if(n<curvoice.ckey.a_acc.length)continue}u=l.acc,i=l.micro_d;if(i&&u!=s){r=l.micro_n;switch(s){case 3:r>i/2?(r-=i/2,l.micro_n=r,s=u):s=-u;break;case 2:r>i/2?(l.pit+=1,r-=i/2):r+=i/2,s=u,l.micro_n=r;break;case-2:r>=i/2?(l.pit-=1,r-=i/2):r+=i/2,s=u,l.micro_n=r}}l.acc=s}}function sort_pitch(e){e.notes=e.notes.sort(function(e,t){return e.pit-t.pit})}function new_note(e,t){var n,r,i,s,o,u,a,f,l,c,h,p,d,v=0,m=parse.line,g=a_dcn;a_dcn=null,parse.stemless=!1,r={type:C.NOTE,fname:parse.fname,stem:0,multi:0,nhd:0,xmx:0},r.istart=parse.bol+m.index,curvoice.color&&(r.color=curvoice.color),e?r.grace=!0:(a_gch&&self.gch_build(r),parse.repeat_n&&(r.repeat_n=parse.repeat_n,r.repeat_k=parse.repeat_k,parse.repeat_n=0)),s=m.char();switch(s){case"X":r.invis=!0;case"Z":r.type=C.MREST,s=m.next_char(),r.nmes=s>"0"&&s<="9"?m.get_int():1,r.dur=curvoice.wmeasure*r.nmes;if(curvoice.second){curvoice.time+=r.dur;return}r.nmes==1&&(r.type=C.REST,r.dur_orig=r.dur,r.notes=[{pit:18,dur:r.dur}]);break;case"y":r.type=C.SPACE,r.invis=!0,r.dur=0,s=m.next_char(),s>="0"&&s<="9"?r.width=m.get_int():r.width=10;break;case"x":r.invis=!0;case"z":r.type=C.REST,m.index++,c=parse_dur(m),r.dur_orig=(curvoice.ulen<0?15120:curvoice.ulen)*c[0]/c[1],r.dur=r.dur_orig*curvoice.dur_fact,r.notes=[{pit:18,dur:r.dur_orig}];break;case"[":i=!0,s=m.next_char();default:curvoice.uscale&&(r.uscale=curvoice.uscale),r.notes=[];for(;;){if(i)for(;;){if(!s)break;a=s.charCodeAt(0);if(a>=128){syntax(1,errs.not_ascii);return}u=char_tb[a];switch(u[0]){case"(":v<<=4,v+=parse_vpos(),s=m.char();continue;case"!":a_dcn||(a_dcn=[]);if(u.length>1)a_dcn.push(u.slice(1,-1));else{o="";for(;;){s=m.next_char();if(!s){syntax(1,"No end of decoration");return}if(s=="!")break;o+=s}a_dcn.push(o)}s=m.next_char();continue}break}n=parse_basic_note(m,r.grace?C.BLEN/4:curvoice.ulen<0?15120:curvoice.ulen);if(!n)return;curvoice.octave&&(n.pit+=curvoice.octave*7),curvoice.ottava&&(n.pit+=curvoice.ottava),v&&(n.sl1=v,r.sl1?r.sl1++:r.sl1=1,v=0),a_dcn&&(n.a_dcn=a_dcn,a_dcn=null),r.notes.push(n);if(!i)break;s=m.char();for(;;){switch(s){case")":n.sl2?n.sl2++:n.sl2=1,r.sl2?r.sl2++:r.sl2=1,s=m.next_char();continue;case"-":n.ti1=parse_vpos(),r.ti1=!0,s=m.char();continue;case".":s=m.next_char();if(s!="-"){syntax(1,"Misplaced dot");break}continue}break}if(s=="]"){m.index++,c=parse_dur(m),r.nhd=r.notes.length-1;for(a=0;a<=r.nhd;a++)n=r.notes[a],n.dur=n.dur*c[0]/c[1];break}}r.dur_orig=r.notes[0].dur,r.dur=r.notes[0].dur*curvoice.dur_fact}if(r.grace&&r.type!=C.NOTE){syntax(1,"Not a note in grace note sequence");return}if(r.notes){if(!r.grace){switch(curvoice.pos.stm){case C.SL_ABOVE:r.stem=1;break;case C.SL_BELOW:r.stem=-1;break;case C.SL_HIDDEN:r.stemless=!0}r.dur*=t,p=curvoice.brk_rhythm;if(p){curvoice.brk_rhythm=0,l=curvoice.last_note;if(p>0){f=p*2-1,r.dur=r.dur*f/p,r.dur_orig=r.dur_orig*f/p;for(a=0;a<=r.nhd;a++)r.notes[a].dur=r.notes[a].dur*f/p;l.dur/=p,l.dur_orig/=p;for(a=0;a<=l.nhd;a++)l.notes[a].dur/=p}else{p=-p,f=p*2-1,r.dur/=p,r.dur_orig/=p;for(a=0;a<=r.nhd;a++)r.notes[a].dur/=p;l.dur=l.dur*f/p,l.dur_orig=l.dur_orig*f/p;for(a=0;a<=l.nhd;a++)l.notes[a].dur=l.notes[a].dur*f/p}curvoice.time=l.time+l.dur,h=identify_note(l,l.dur_orig),l.head=h[0],l.dots=h[1],l.nflags=h[2],l.nflags<=-2?l.stemless=!0:delete l.stemless;for(l=l.next;l;l=l.next)l.time=curvoice.time}}else{var y=curvoice.ckey.k_bagpipe?8:4;for(a=0;a<=r.nhd;a++)r.notes[a].dur/=y;r.dur/=y,r.dur_orig/=y,e.stem&&(r.stem=e.stem)}r.type==C.NOTE?(h=identify_note(r,r.dur_orig),r.head=h[0],r.dots=h[1],r.nflags=h[2],r.nflags<=-2&&(r.stemless=!0)):(d=r.dur_orig,d==curvoice.wmeasure&&(d<C.BLEN*2?d=C.BLEN:d<C.BLEN*4?d=C.BLEN*2:d=C.BLEN*4),h=identify_note(r,d),r.head=h[0],r.dots=h[1],r.nflags=h[2]),curvoice.last_note=r}sym_link(r);if(r.type==C.NOTE){curvoice.vtransp&&note_transp(r);if(curvoice.map&&maps[curvoice.map])for(a=0;a<=r.nhd;a++)set_map(r.notes[a])}return cfmt.shiftunison&&(r.shiftunison=cfmt.shiftunison),e||(curvoice.lyric_restart||(curvoice.lyric_restart=r),curvoice.sym_restart||(curvoice.sym_restart=r)),g&&deco_cnv(g,r,r.prev),parse.stemless&&(r.stemless=!0),r.iend=parse.bol+m.index,r}function parse_music_line(){function h(e){var t,n,r;for(t=1,n=c.index+1;t<e.length;t++,n++){if(e[t]==c.buffer[n])continue;if(e[t]!="n")return;r=ntb.indexOf(c.buffer[n]);if(r<0)return;while(c.buffer[n+1]=="'")r+=7,n++;while(c.buffer[n+1]==",")r-=7,n++}return c.index=n,r}function p(e,t){var n,r,s="",o=e.length;for(i=0;i<o;i++){n=e[i];if(n>="h"&&n<="z"){r=t+n.charCodeAt(0)-"n".charCodeAt(0),n="";while(r<0)r+=7,n+=",";while(r>14)r-=7,n+="'";s+=ntb[r]+n}else s+=n}return s}function d(e,t){var n,r=c,i=parse.istart;parse.line=c=new scanBuf,parse.istart+=r.index,c.buffer=t?p(e,t):e,v(!0),parse.line=c=r,parse.istart=i}function v(i){var s,p,v,m,g,y,b,w,E;for(;;){s=c.char();if(!s)break;if(s==".")switch(c.buffer[c.index+1]){case"(":case"-":case"|":s=c.next_char()}p=s.charCodeAt(0);if(p>=128){syntax(1,errs.not_ascii),c.index++;break}if(!i&&maci[p]){w=0;for(m in mac){if(!mac.hasOwnProperty(m)||m[0]!=s)continue;if(m.indexOf("n")<0){if(c.buffer.indexOf(m,c.index)!=c.index)continue;c.index+=m.length}else{w=h(m);if(!w)continue}d(mac[m],w),w=1;break}if(w)continue}v=char_tb[p];switch(v[0]){case" ":g=curvoice.last_note,g&&(g.beam_end=!0,e&&(e.gr_shift=!0));break;case"\n":if(cfmt.barsperstaff)break;par_sy.voices[curvoice.v].range==0&&curvoice.last_sym&&(curvoice.last_sym.eoln=!0);break;case"&":if(e){syntax(1,errs.bad_char,s);break}s=c.next_char();if(s==")"){get_vover(")");break}get_vover("&");continue;case"(":s=c.next_char();if(s>"0"&&s<="9"){var S=c.get_int(),x=qplet_tb[S],T=S,s=c.char();if(s==":"){s=c.next_char(),s>"0"&&s<="9"&&(x=c.get_int(),s=c.char());if(s==":"){s=c.next_char();if(!(s>"0"&&s<="9")){syntax(1,"Invalid 'r' in tuplet");continue}T=c.get_int(),s=c.char()}}if(x==0||x==undefined)x=curvoice.wmeasure%9==0?3:2;u=o[++a],u||(o[a]=u={}),u.p=S,u.q=x,u.r=T,u.f=cfmt.tuplets,u.fact=f*x/S,f=u.fact;continue}if(s=="&"){if(e){syntax(1,errs.bad_char,s);break}get_vover("(");break}l<<=4,c.index--,l+=parse_vpos();continue;case")":if(curvoice.ignore)break;g=curvoice.last_sym;if(g)switch(g.type){case C.NOTE:case C.REST:case C.SPACE:break;default:g=null}if(!g){syntax(1,errs.bad_char,s);break}g.slur_end?g.slur_end++:g.slur_end=1;break;case"!":a_dcn||(a_dcn=[]);if(v.length>1)y=v.slice(1,-1);else{y="",b=c.index;for(;;){s=c.next_char();if(!s)break;if(s=="!")break;y+=s}if(!s){c.index=b,syntax(1,"No end of decoration");break}}ottava[y]&&set_ottava(y),a_dcn.push(y);break;case'"':parse_gchord(v);break;case"-":var N=0;if(!curvoice.last_note||curvoice.last_note.type!=C.NOTE){syntax(1,"No note before '-'");break}N=parse_vpos(),g=curvoice.last_note;for(b=0;b<=g.nhd;b++)g.notes[b].ti1?g.nhd==0&&syntax(1,"Too many ties"):g.notes[b].ti1=N;g.ti1=!0,e&&(e.ti1=!0);continue;case"[":var k=c.buffer[c.index+1];if('|[]: "'.indexOf(k)>=0||k>="1"&&k<="9"){if(e){syntax(1,errs.bar_grace);break}new_bar();continue}if(c.buffer[c.index+2]==":"){b=c.buffer.indexOf("]",c.index+1);if(b<0){syntax(1,"Lack of ']'");break}E=c.buffer.slice(c.index+3,b).trim(),parse.istart=parse.bol+c.index,parse.iend=parse.bol+ ++b,c.index=0,do_info(k,E),c.index=b;continue};case"n":g=self.new_note(e,f);if(!g)continue;g.type==C.NOTE&&l&&(g.slur_start=l,l=0);if(e){a>=0&&(g.in_tuplet=!0);continue}a>=0&&g.notes&&(g.in_tuplet=!0,a>0?(o[0].p&&(g.tp0=o[0].p,g.tq0=o[0].q,g.tf=o[0].f,o[0].p=0),o[0].r--,u.p&&(g.tp1=u.p,g.tq1=u.q,g.tf=u.f,u.p=0)):u.p&&(g.tp0=u.p,g.tq0=u.q,g.tf=u.f,u.p=0),u.r--,u.r==0&&(a--==0?(g.tp0?g.tp0=!1:g.te0=!0,f=1,curvoice.time=Math.round(curvoice.time),g.dur=curvoice.time-g.time):(g.tp1?g.tp1=!1:g.te1=!0,u=o[0],u.r==0?(a--,g.te0=!0,f=1,curvoice.time=Math.round(curvoice.time),g.dur=curvoice.time-g.time):f=u.fact)));continue;case"<":if(!curvoice.last_note){syntax(1,"No note before '<'");break}if(e){syntax(1,"Cannot have a broken rhythm in grace notes");break}w=s=="<"?1:-1;while(s=="<"||s==">")w*=2,s=c.next_char();curvoice.brk_rhythm=w;continue;case"i":break;case"{":if(e){syntax(1,"'{' in grace note");break}t=curvoice.last_note,curvoice.last_note=null,n=a_dcn,a_dcn=undefined,e={type:C.GRACE,fname:parse.fname,istart:parse.bol+c.index,dur:0,multi:0};switch(curvoice.pos.gst){case C.SL_ABOVE:e.stem=1;break;case C.SL_BELOW:e.stem=-1;break;case C.SL_HIDDEN:e.stem=2}sym_link(e),s=c.next_char();if(s=="/"){e.sappo=!0;break}continue;case"|":if(e){syntax(1,errs.bar_grace);break}s=c.buffer[c.index-1],new_bar(),s=="."&&(curvoice.last_sym.bar_dotted=!0);continue;case"}":g=curvoice.last_note;if(!e||!g){syntax(1,errs.bad_char,s);break}a_dcn&&syntax(1,"Decoration ignored"),g.gr_end=!0,e.extra=e.next,e.extra.prev=null,e.next=null,curvoice.last_sym=e,e=null;if(!g.prev&&!curvoice.ckey.k_bagpipe){for(b=0;b<=g.nhd;b++)g.notes[b].dur*=2;g.dur*=2,g.dur_orig*=2;var L=identify_note(g,g.dur_orig);g.head=L[0],g.dots=L[1],g.nflags=L[2]}curvoice.last_note=t,a_dcn=n;break;case"\\":s=c.buffer[c.index+1];if(!s){r=!0;break};default:syntax(1,errs.bad_char,s)}c.index++}}var e,t,n,r,s,o=[],u,a=-1,f=1,l=0,c=parse.line;if(parse.state!=3){if(parse.state!=2)return;goto_tune()}v();if(a>=0){syntax(1,"No end of tuplet");for(s=curvoice.last_note;s;s=s.prev){s.tp1&&(s.tp1=0);if(s.tp0){s.tp0=0;break}}}e&&(syntax(1,"No end of grace note sequence"),curvoice.last_sym=e.prev,curvoice.last_note=t,e.prev&&(e.prev.next=null)),cfmt.breakoneoln&&curvoice.last_note&&(curvoice.last_note.beam_end=!0);if(r||cfmt.barsperstaff)return;char_tb["\n".charCodeAt(0)]=="\n"&&par_sy.voices[curvoice.v].range==0&&curvoice.last_sym&&(curvoice.last_sym.eoln=!0)}function cwid(e){var t=e.charCodeAt(0);if(t>=128){if(t>=768&&t<880)return 0;t=97}return cw_tb[t]}function strwh(e){var t=gene.curfont,n=t.swfac,r=t.size,i=0,s,o,u,a=e.length;for(s=0;s<a;s++){u=e[s];switch(u){case"$":u=e[s+1];if(u=="0")t=gene.deffont;else{if(!(u>="1"&&u<="9")){u="$";break}t=get_font("u"+u)}s++,n=t.swfac,t.size>r&&(r=t.size);continue;case"&":o=e.indexOf(";",s),o>0&&o-s<10&&(s=o,u="a")}i+=cwid(u)*n}return gene.curfont=t,[i,r]}function set_font(e){typeof e=="string"&&(e=get_font(e)),gene.curfont=gene.deffont=e}function out_str(e){var t,n=gene.curfont,r=n;output+=e.replace(/<|>|&.*?;|&| |\$./g,function(e){switch(e[0]){case"<":return"&lt;";case">":return"&gt;";case"&":if(e=="&")return"&amp;";return e;case" ":return"  ";case"$":if(e[1]=="0")t=gene.deffont,use_font(t);else{if(!(e[1]>="1"&&e[1]<="9"))return e;t=get_font("u"+e[1])}e="";if(t==r)return e;r!=n&&(e="</tspan>"),r=t;if(r==n)return e;return e+'<tspan\n class="'+font_class(t)+'">'}}),r!=n&&(output+="</tspan>",gene.curfont=r)}function xy_str(e,t,n,r,i){var s=strwh(n)[1];t+=s*.2,output+='<text class="'+font_class(gene.curfont)+'" x="',out_sxsy(e,'" y="',t);switch(r){case"c":output+='" text-anchor="middle">';break;case"j":output+='" textLength="'+i.toFixed(2)+'">';break;case"r":output+='" text-anchor="end">';break;default:output+='">'}out_str(n),output+="</text>\n"}function xy_str_b(e,t,n){var r=strwh(n);output+='<rect class="stroke" x="',out_sxsy(e-2,'" y="',t+r[1]+1),output+='" width="'+(r[0]+4).toFixed(2)+'" height="'+(r[1]+3).toFixed(2)+'"/>\n',xy_str(e,t,n)}function trim_title(e,t){var n;if(cfmt.titletrim){n=e.lastIndexOf(", ");if(n<0||e[n+2]<"A"||e[n+2]>"Z")n=0;else if(cfmt.titletrim==1){if(n<e.length-7||e.indexOf(" ",n+3)>=0)n=0}else n<e.length-cfmt.titletrim-2&&(n=0)}return!t&&cfmt.writefields.indexOf("X")>=0&&(e=info.X+". "+e),n&&(e=e.slice(n+2).trim()+" "+e.slice(0,n)),cfmt.titlecaps?e.toUpperCase():e}function get_lwidth(){return(img.width-img.lm-img.rm-2)/cfmt.scale}function write_title(e,t){var n,r;if(!e)return;set_page(),e=trim_title(e,t),t?(set_font("subtitle"),r=cfmt.subtitlespace):(set_font("title"),r=cfmt.titlespace),vskip(strwh(e)[1]+r),cfmt.titleleft?xy_str(0,0,e):xy_str(get_lwidth()/2,0,e,"c")}function put_inf2r(e,t,n,r,i){if(!n){if(!r)return;n=r,r=null}r?xy_str(e,t,n+" ("+r+")",i):xy_str(e,t,n,i)}function str_skip(e){vskip(strwh(e)[1]*cfmt.lineskipfac)}function write_text(e,t){if(t=="s")return;set_font("text"),set_page();var n=get_lwidth(),r=gene.curfont.size,i=r*cfmt.lineskipfac,s=r*cfmt.parskipfac,o=block.started?function(){}:blk_out,u=block.started?svg_flush:blk_flush,a,f,l,c,h,p,d,v;o();switch(t){default:switch(t){case"c":l=n/2;break;case"r":l=n;break;default:l=0}f=0;for(;;){a=e.indexOf("\n",f);if(a<0){v=e.slice(f),str_skip(v),xy_str(l,0,v,t);break}if(a==f){vskip(s),u(),use_font(gene.curfont);while(e[a+1]=="\n")vskip(i),a++;if(a==e.length)break;o()}else v=e.slice(f,a),str_skip(v),xy_str(l,0,v,t);f=a+1}vskip(s),u();break;case"f":case"j":f=0;for(;;){a=e.indexOf("\n\n",f),a<0?c=e.slice(f):c=e.slice(f,a),c=c.split(/\s+/),h=p=0;for(f=0;f<c.length;f++)d=strwh(c[f]+" ")[0],h+=d,h>=n&&(v=c.slice(p,f).join(" "),str_skip(v),xy_str(0,0,v,t,n),p=f,h=d);h!=0&&(v=c.slice(p).join(" "),str_skip(v),xy_str(0,0,v)),vskip(s),u();if(a<0)break;while(e[a+2]=="\n")vskip(i),a++;if(a==e.length)break;o(),use_font(gene.curfont),f=a+2}}}function put_words(e){function f(e,t,n){var r=0,i,s;e[r]=="$"&&e[r+1]>="0"&&e[r+1]<="9"&&(r+=2),s=0,i=r;if(e[r]>="0"&&e[r]<="9"||e[r+1]=="."){while(r<e.length){r++;if(e[r]==" "||e[r-1]==":"||e[r-1]==".")break}s=r;while(e[r]==" ")r++}return s!=0&&xy_str(t,0,e.slice(i,s),"r"),r<e.length&&xy_str(t+5,0,e.slice(r),"l"),r>=e.length&&s==0}var t,n,r,i,s,o,u,a;blk_out(),set_font("words");var l=get_lwidth()/2,c=(l-45)/(cwid("a")*gene.curfont.swfac);i=0,e=e.split("\n"),s=e.length;for(n=0;n<s;n++){t=e[n];if(t.length>c){i=0;break}t?a=!0:a&&(i++,a=!1)}if(i>0){n=i=(i+1)/2|0,a=!1;for(u=0;u<s;u++){t=e[u],r=0;while(t[r]==" ")r++;if(r==t.length){if(a&&--n<=0)break;a=!1}else a=!0}o=u+1}else o=u=s;vskip(cfmt.wordsspace);for(n=0;n<u||o<s;n++)n<u&&e[n].length==0&&(blk_out(),use_font(gene.curfont)),vskip(cfmt.lineskipfac*gene.curfont.size),n<u&&f(e[n],45,0),o<s&&(f(e[o],20+l,1)&&--i==0&&(n<u?i++:o<e.length-1&&(l*=.6)),o++)}function put_history(){var e,t,n,r,i,s,o,u,a=cfmt.infoname.split("\n"),f=a.length;for(e=0;e<f;e++){n=a[e][0];if(cfmt.writefields.indexOf(n)<0)continue;r=info[n];if(!r)continue;i||(i=!0,set_font("history"),vskip(cfmt.textspace),s=gene.curfont.size*cfmt.lineskipfac),u=a[e].slice(2),u[0]=='"'&&(u=u.slice(1,-1)),vskip(s),xy_str(0,0,u),o=strwh(u)[0],r=r.split("\n"),xy_str(o,0,r[0]);for(t=1;t<r.length;t++)vskip(s),xy_str(o,0,r[t]);vskip(s*.3),blk_out(),use_font(gene.curfont)}}function write_headform(e){var t,n,r,i,s,o,u,a={},f=clone(info_font_init),l={A:cfmt.infospace,C:cfmt.composerspace,O:cfmt.composerspace,R:cfmt.infospace},c={},h="",p=cfmt.titleformat,d=0,v=0;for(;;){while(p[v]==" ")v++;if(v>=p.length)break;t=p[v++];if(t<"A"||t>"Z"){if(t=="+"){if(h.length==0||h.slice(-1)=="+")continue;h=h.slice(0,-1)+"+"}else t==","&&(h.slice(-1)=="+"&&(h=h.slice(0,-1)+"l"),h+="\n");continue}if(!a[t]){if(!info[t])continue;a[t]=info[t].split("\n"),c[t]=1}else c[t]++;h+=t;switch(p[v]){case"-":h+="l",v++;break;case"0":h+="c",v++;break;case"1":h+="r",v++;break;default:h+="c"}}h.slice(-1)=="+"&&(h=h.slice(0,-1)+"l"),h+="\n";var m={l:cfmt.titlespace,c:cfmt.titlespace,r:cfmt.titlespace},g={l:0,c:e*.5,r:e},y={},b;p=h,v=0;for(;;){y.l=y.c=y.r=o=0,d=v;for(;;){t=p[d++];if(t=="\n")break;i=p[d++];if(i=="+")i=p[d+1];else if(y[i]!=0)continue;b=a[t];if(!b)continue;r=f[t],r||(r="history"),n=get_font(r),u=n.size*1.1,l[t]&&(u+=l[t]),o<u&&(o=u),y[i]=u}m.l+=o-y.l,m.c+=o-y.c,m.r+=o-y.r;for(;;){t=p[v++];if(t=="\n")break;i=p[v++];if(a[t].length==0)continue;b=a[t].shift(),i=="+"&&(c[t]--,t=p[v++],i=p[v++],a[t].length>0&&(b?b+=" "+a[t].shift():b=" "+a[t].shift())),r=f[t],r||(r="history"),n=get_font(r),u=n.size*1.1,l[t]&&(u+=l[t]),set_font(n),s=g[i],o=m[i]+u;if(t=="Q"){if(!glovar.tempo.del){if(i!="l"){var w=tempo_width(glovar.tempo);i=="c"&&(w*=.5),s-=w}write_tempo(glovar.tempo,s,-o)}}else b&&xy_str(s,-o,b,i);t=="T"&&(r=f.T="subtitle",l.T=cfmt.subtitlespace);if(c[t]<=1){t=="T"&&(n=get_font(r),u=n.size*1.1,l[t]&&(u+=l[t]),set_font(n));while(a[t].length>0)o+=u,b=a[t].shift(),xy_str(s,-o,b,i)}c[t]--,m[i]=o}m.c>m.l&&(m.l=m.c),m.r>m.l&&(m.l=m.r);if(v>=h.length)break;m.c=m.r=m.l}vskip(m.l)}function write_heading(){var e,t,n,r,i,s,o,u,a=get_lwidth();blk_out(),vskip(cfmt.topspace);if(cfmt.titleformat){write_headform(a),vskip(cfmt.musicspace);return}if(info.T&&cfmt.writefields.indexOf("T")>=0){e=0;for(;;){t=info.T.indexOf("\n",e);if(t<0){write_title(info.T.substring(e),e!=0);break}write_title(info.T.slice(e,t),e!=0),e=t+1}}set_font("composer"),o=u=0,parse.ckey.k_bagpipe&&!cfmt.infoline&&cfmt.writefields.indexOf("R")>=0&&(s=info.R),s&&(xy_str(0,-cfmt.composerspace,s),o=cfmt.composerspace),n=info.A,cfmt.writefields.indexOf("C")>=0&&(r=info.C),cfmt.writefields.indexOf("O")>=0&&(i=info.O);if(r||i||cfmt.infoline){var f,l;vskip(cfmt.composerspace),cfmt.aligncomposer<0?(f=0,l=" "):cfmt.aligncomposer==0?(f=a*.5,l="c"):(f=a,l="r"),u=o;if(r||i){cfmt.aligncomposer>=0&&o!=u&&vskip(o-u),e=0;for(;;){vskip(gene.curfont.size),r?t=r.indexOf("\n",e):t=-1;if(t<0){put_inf2r(f,0,r?r.substring(e):null,i,l);break}xy_str(f,0,r.slice(e,t),l),o+=gene.curfont.size,e=t+1}u>o&&vskip(u-o)}s=s?null:info.R,(s||n)&&cfmt.infoline&&(set_font("info"),vskip(gene.curfont.size+cfmt.infospace),put_inf2r(a,0,s,n,"r"),o+=gene.curfont.size+cfmt.infospace)}else u=cfmt.composerspace;info.P&&cfmt.writefields.indexOf("P")>=0&&(set_font("parts"),o=cfmt.partsspace+gene.curfont.size-o,o>0&&(u+=o),u>.01&&vskip(u),xy_str(0,0,info.P),u=0),vskip(u+cfmt.musicspace)}function m_gl(e){return e.replace(/[Cco]\||[co]\.|./g,function(e){return mgls[e]})}function def_use(e){var t,n,r;if(defined_glyph[e])return;defined_glyph[e]=!0,r=glyphs[e];if(!r){error(1,null,"Unknown glyph: '$1'",e);return}n=0;for(;;){t=r.indexOf('xlink:href="#',n);if(t<0)break;t+=13,n=r.indexOf('"',t),def_use(r.slice(t,n))}defs+="\n"+r}function defs_add(e){var t,n,r,i,s,o=0;e=e.replace(/<!--.*?-->/g,"");for(;;){s=e.indexOf("<",o);if(s<0)break;t=e.indexOf('id="',s);if(t<0)break;t+=4,n=e.indexOf('"',t);if(n<0)break;r=e.slice(t,n),o=e.indexOf(">",n);if(o<0)break;if(e[o-1]=="/")o++;else{t=e.indexOf(" ",s);if(t<0)break;i=e.slice(s+1,t),o=e.indexOf("</"+i+">",o);if(o<0)break;o+=3+i.length}e.substr(s,7)=="<filter"?fulldefs+="\n"+e.slice(s,o):glyphs[r]=e.slice(s,o)}}function set_g(){stv_g.started&&(stv_g.started=!1,output+="</g>\n");if(stv_g.scale==1&&!stv_g.color)return;output+="<g ",stv_g.scale!=1&&(stv_g.st>=0?output+=staff_tb[stv_g.st].scale_str:output+=voice_tb[stv_g.v].scale_str),stv_g.color&&(stv_g.scale!=1&&(output+=" "),output+='style="color:'+stv_g.color+'"'),output+=">\n",stv_g.started=!0}function set_color(e){if(e==stv_g.color)return undefined;var t=stv_g.color;return stv_g.color=e,set_g(),t}function set_sscale(e){var t,n;e!=stv_g.st&&stv_g.scale!=1&&(stv_g.scale=0),t=e>=0?staff_tb[e].staffscale:1,e>=0&&t!=1?n=staff_tb[e].y:n=posy;if(t==stv_g.scale&&n==stv_g.dy)return;stv_g.scale=t,stv_g.dy=n,stv_g.st=e,set_g()}function set_scale(e){var t=e.p_v.scale;if(t==1){set_sscale(e.st);return}if(t==stv_g.scale&&stv_g.dy==posy)return;stv_g.scale=t,stv_g.dy=posy,stv_g.st=-1,stv_g.v=e.v,set_g()}function set_dscale(e,t){output&&(stv_g.st<0?staff_tb[0].output+=output:stv_g.scale==1?staff_tb[stv_g.st].output+=output:staff_tb[stv_g.st].sc_out+=output,output=""),e<0?stv_g.scale=1:stv_g.scale=t?1:staff_tb[e].staffscale,stv_g.st=e,stv_g.dy=0}function delayed_update(){var e,t,n;for(e=0;e<=nstaff;e++){staff_tb[e].sc_out&&(output+='<g transform="translate(0,'+(posy-staff_tb[e].y).toFixed(2)+") scale("+staff_tb[e].staffscale.toFixed(2)+')">\n'+staff_tb[e].sc_out+"</g>\n",staff_tb[e].sc_out="");if(!staff_tb[e].output)continue;output+='<g transform="translate(0,'+(-staff_tb[e].y).toFixed(2)+')">\n'+staff_tb[e].output+"</g>\n",staff_tb[e].output=""}}function anno_out(e,t,n){if(e.istart==undefined)return;var r=e.type,i=e.ymx-e.ymn+4,s=e.wl||2,o=e.wr||2;e.grace&&(r=C.GRACE),n(t||anno_type[r],e.istart,e.iend,e.x-s-2,staff_tb[e.st].y+e.ymn+i-2,s+o+4,i,e)}function a_start(e,t){anno_out(e,t,user.anno_start)}function a_stop(e,t){anno_out(e,t,user.anno_stop)}function empty_function(){}function out_XYAB(e,t,n,r,i){t=sx(t),n=sy(n),output+=e.replace(/X|Y|A|B|F|G/g,function(e){switch(e){case"X":return t.toFixed(2);case"Y":return n.toFixed(2);case"A":return r;case"B":return i;case"F":return r.toFixed(2);default:return i.toFixed(2)}})}function g_open(e,t,n,r,i){out_XYAB('<g transform="translate(X,Y',e,t),n&&(output+=") rotate("+n.toFixed(2)),r&&(i?output+=") scale("+r.toFixed(2)+", "+i.toFixed(2):output+=") scale("+r.toFixed(2)),output+=')">\n',stv_g.g++}function g_close(){stv_g.g--,output+="</g>\n"}function sx(e){return stv_g.g?e:(e+posx)/stv_g.scale}function sy(e){return stv_g.g?-e:stv_g.scale==1?posy-e:stv_g.st<0?(posy-e)/stv_g.scale:stv_g.dy-e}function out_sxsy(e,t,n){e=sx(e),n=sy(n),output+=e.toFixed(2)+t+n.toFixed(2)}function xypath(e,t,n){out_XYAB('<path class="A" d="mX Y\n',e,t,n?"fill":"stroke")}function xygl(e,t,n){var r=tgls[n];if(r&&!glyphs[n]){e+=r.x*stv_g.scale,t-=r.y,r.sc?out_XYAB('<text transform="translate(X,Y) scale(F)">B</text>\n',e,t,r.sc,r.c):out_XYAB('<text x="X" y="Y">A</text>\n',e,t,r.c);return}if(!glyphs[n]){error(1,null,"no definition of $1",n);return}def_use(n),out_XYAB('<use x="X" y="Y" xlink:href="#A"/>\n',e,t,n)}function out_acciac(e,t,n,r,i){i?(e-=1,t+=4):(e-=5,t-=4),out_XYAB('<path class="stroke" d="mX YlF G"/>\n',e,t,n,-r)}function out_bar(e,t,n,r){if(r){var i=(5*r).toFixed(2);r='stroke-dasharray="'+i+","+i+'" '}else r="";output+='<path class="stroke" stroke-width="1" '+r+'d="m'+(e+posx).toFixed(2)+" "+(posy-t).toFixed(2)+"v"+(-n).toFixed(2)+'"/>\n'}function out_bnum(e,t,n){out_XYAB('<text style="font:italic 12px serif"\n x="X" y="Y" text-anchor="middle">A</text>\n',e,t,n.toString())}function out_brace(e,t,n){e+=posx-6,t=posy-t,n/=24,output+='<text transform="translate('+e.toFixed(2)+","+t.toFixed(2)+") scale(2.5,"+n.toFixed(2)+')">'+tgls.brace.c+"</text>\n"}function out_bracket(e,t,n){e+=posx-5,t=posy-t-3,n+=2,output+='<path class="fill"\n d="m'+e.toFixed(2)+" "+t.toFixed(2)+"\n c10.5 1 12 -4.5 12 -3.5c0 1 -3.5 5.5 -8.5 5.5\n v"+n.toFixed(2)+'\n c5 0 8.5 4.5 8.5 5.5c0 1 -1.5 -4.5 -12 -3.5"/>\n'}function out_hyph(e,t,n){var r,i,s=25+(n/20|0)*3;n>15?r=(n-15)/s|0:r=0,e+=(n-s*r-5)/2,out_XYAB('<path class="stroke" stroke-width="1.2"\n stroke-dasharray="5,A"\n d="mX YhB"/>\n',e,t+6,Math.round((s-5)/stv_g.scale),s*r+5)}function out_stem(e,t,n,r,i,s){var o=r?GSTEM_XOFF:3.5,u=-n;n<0&&(o=-o),e+=o*stv_g.scale,stv_g.st<0&&(u/=stv_g.scale),out_XYAB('<path class="stroke" d="mX YvF"/>\n',e,t,u);if(!i)return;output+='<path class="fill"\n d="',t+=n;if(n>0)if(!s)if(!r)if(i==1)out_XYAB("MX Yc0.6 5.6 9.6 9 5.6 18.4\n 1.6 -6 -1.3 -11.6 -5.6 -12.8\n",e,t);else while(--i>=0)out_XYAB("MX Yc0.9 3.7 9.1 6.4 6 12.4\n 1 -5.4 -4.2 -8.4 -6 -8.4\n",e,t),t-=5.4;else if(i==1)out_XYAB("MX Yc0.6 3.4 5.6 3.8 3 10\n 1.2 -4.4 -1.4 -7 -3 -7\n",e,t);else while(--i>=0)out_XYAB("MX Yc1 3.2 5.6 2.8 3.2 8\n 1.4 -4.8 -2.4 -5.4 -3.2 -5.2\n",e,t),t-=3.5;else if(!r){t+=1;while(--i>=0)out_XYAB("MX Yl7 3.2 0 3.2 -7 -3.2z\n",e,t),t-=5.4}else while(--i>=0)out_XYAB("MX Yl3 1.5 0 2 -3 -1.5z\n",e,t),t-=3;else if(!s)if(!r)if(i==1)out_XYAB("MX Yc0.6 -5.6 9.6 -9 5.6 -18.4\n 1.6 6 -1.3 11.6 -5.6 12.8\n",e,t);else while(--i>=0)out_XYAB("MX Yc0.9 -3.7 9.1 -6.4 6 -12.4\n 1 5.4 -4.2 8.4 -6 8.4\n",e,t),t+=5.4;else if(i==1)out_XYAB("MX Yc0.6 -3.4 5.6 -3.8 3 -10\n 1.2 4.4 -1.4 7 -3 7\n",e,t);else while(--i>=0)out_XYAB("MX Yc1 -3.2 5.6 -2.8 3.2 -8\n 1.4 4.8 -2.4 5.4 -3.2 5.2\n",e,t),t+=3.5;else if(!r){t+=1;while(--i>=0)out_XYAB("MX Yl7 -3.2 0 -3.2 -7 3.2z\n",e,t),t+=5.4}output+='"/>\n'}function out_thbar(e,t,n){e+=posx+1.5,t=posy-t,output+='<path class="stroke" stroke-width="3" d="m'+e.toFixed(2)+" "+t.toFixed(2)+"v"+(-n).toFixed(2)+'"/>\n'}function out_trem(e,t,n){out_XYAB('<path class="fill" d="mX Y\n ',e-4.5,t);for(;;){output+="l9 -3v3l-9 3z";if(--n<=0)break;output+="m0 5.4"}output+='"/>\n'}function out_tubr(e,t,n,r,i){var s=i?-3:3;t+=s,n/=stv_g.scale,output+='<path class="stroke" d="m',out_sxsy(e," ",t),output+="v"+s.toFixed(2)+"l"+n.toFixed(2)+" "+(-r).toFixed(2)+"v"+(-s).toFixed(2)+'"/>\n'}function out_tubrn(e,t,n,r,i,s){var o=s.length*10,u=i?-3:3;out_XYAB('<text style="font:italic 12px serif"\n x="X" y="Y" text-anchor="middle">A</text>\n',e+n/2,t+r/2,s),n/=stv_g.scale,i||(t+=6),output+='<path class="stroke" d="m',out_sxsy(e," ",t),output+="v"+u.toFixed(2)+"m"+n.toFixed(2)+" "+(-r).toFixed(2)+"v"+(-u).toFixed(2)+'"/>\n'+'<path class="stroke" stroke-dasharray="'+((n-o)/2).toFixed(2)+" "+o.toFixed(2)+'" d="m',out_sxsy(e," ",t-u),output+="l"+n.toFixed(2)+" "+(-r).toFixed(2)+'"/>\n'}function out_wln(e,t,n){out_XYAB('<path class="stroke" stroke-width="0.8" d="mX YhF"/>\n',e,t+3,n)}function out_deco_str(e,t,n,r){var i,s,o=deco_str_style[n];if(!o){xygl(e,t,n);return}e+=o.dx,t+=o.dy,o.def||(style+="\n."+n+" {"+o.style+"}",o.def=!0),out_XYAB('<text x="X" y="Y" class="A"B>',e,t,n,o.anchor||""),set_font("annotation"),out_str(r),output+="</text>\n"}function out_arp(e,t,n){g_open(e,t,270),e=0,n=Math.ceil(n/6);while(--n>=0)xygl(e,6,"ltr"),e+=6;g_close()}function out_cresc(e,t,n,r){e+=n,n=-n,out_XYAB('<path class="stroke"\n d="mX YlA ',e,t+5,n),r.nost?output+="-2.2m0 -3.6l"+(-n).toFixed(2)+' -2.2"/>\n':output+="-4l"+(-n).toFixed(2)+' -4"/>\n'}function out_dim(e,t,n,r){out_XYAB('<path class="stroke"\n d="mX YlA ',e,t+5,n),r.noen?output+="-2.2m0 -3.6l"+(-n).toFixed(2)+' -2.2"/>\n':output+="-4l"+(-n).toFixed(2)+' -4"/>\n'}function out_ltr(e,t,n){t+=4,n=Math.ceil(n/6);while(--n>=0)xygl(e,t,"ltr"),e+=6}function out_8va(e,t,n,r){r.nost?n-=5:(out_XYAB('<text x="X" y="Y" style="font:italic bold 12px serif">8<tspan dy="-4" style="font-size:10px">va</tspan></text>\n',e-8,t),e+=12,n-=12),t+=6,out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhA"/>\n',e,t,n),r.noen||out_XYAB('<path class="stroke" d="mX Yv6"/>\n',e+n,t)}function out_8vb(e,t,n,r){r.nost?n-=5:(out_XYAB('<text x="X" y="Y" style="font:italic bold 12px serif">8<tspan dy="-4" style="font-size:10px">vb</tspan></text>\n',e-8,t),e+=4,n-=4),out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhA"/>\n',e,t,n),r.noen||out_XYAB('<path class="stroke" d="mX Yv-6"/>\n',e+n,t)}function out_15ma(e,t,n,r){r.nost?n-=5:(out_XYAB('<text x="X" y="Y" style="font:italic bold 12px serif">15<tspan dy="-4" style="font-size:10px">ma</tspan></text>\n',e-10,t),e+=20,n-=20),t+=6,out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhA"/>\n',e,t,n),r.noen||out_XYAB('<path class="stroke" d="mX Yv6"/>\n',e+n,t)}function out_15mb(e,t,n,r){r.nost?n-=5:(out_XYAB('<text x="X" y="Y" style="font:italic bold 12px serif">15<tspan dy="-4" style="font-size:10px">mb</tspan></text>\n',e-10,t),e+=7,n-=7),out_XYAB('<path class="stroke" stroke-dasharray="6,6" d="mX YhA"/>\n',e,t,n),r.noen||out_XYAB('<path class="stroke" d="mX Yv-6"/>\n',e+n,t)}function out_deco_val(e,t,n,r,i){deco_val_tb[n]?deco_val_tb[n](e,t,r,i):error(1,null,"No function for decoration '$1'",n)}function out_glisq(e,t,n){var r=n.start,i=r.x,s=r.y+staff_tb[r.st].y,o=Math.atan2(s-t,e-i),u=o/Math.PI*180,a=(e-i)/Math.cos(o);g_open(i,s,u),i=r.s.dots?13+r.s.xmx:8,a=(a-i-6)/6|0,a<1&&(a=1);while(--a>=0)xygl(i,0,"ltr"),i+=6;g_close()}function out_gliss(e,t,n){var r=n.start,i=r.x,s=r.y+staff_tb[r.st].y,o=-Math.atan2(t-s,e-i),u=o/Math.PI*180,a=(e-i)/Math.cos(o);g_open(i,s,u),i=r.s.dots?13+r.s.xmx:8,a-=i+8,xypath(i,0),output+="l"+a.toFixed(2)+' 0" stroke-width="1"/>\n',g_close()}function out_deco_long(e,t,n){var r=n.dd.glyph;deco_l_tb[r]?deco_l_tb[r](e,t,n):error(1,null,"No function for decoration '$1'",r)}function vskip(e){posy+=e}function svg_flush(){if(multicol||!output||!user.img_out||posy==0)return;var e='<svg xmlns="http://www.w3.org/2000/svg" version="1.1"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n color="black" class="music" stroke-width=".7"',t="";cfmt.bgcolor&&(e+=' style="background-color: '+cfmt.bgcolor+'"'),posy*=cfmt.scale,user.imagesize?e+="\n"+user.imagesize+' viewBox="0 0 '+img.width.toFixed(0)+" "+posy.toFixed(0)+'">\n':e+='\n width="'+img.width.toFixed(0)+'px" height="'+posy.toFixed(0)+'px">\n';if(style||font_style||musicfont)e+='<style type="text/css">'+style+font_style,musicfont&&(musicfont.indexOf("(")>0?e+='\n.music {font:24px music; fill:currentColor}\n@font-face {\n font-family:"music";\n src:'+musicfont+"}":e+="\n.music {font:24px "+musicfont+"; fill:currentColor}"),e+="\n</style>\n";defs+=fulldefs,defs&&(e+="<defs>"+defs+"\n</defs>\n"),cfmt.scale!=1&&(e+='<g class="g" transform="scale('+cfmt.scale.toFixed(2)+')">\n',t="</g>\n"),psvg&&psvg.ps_flush(!0),user.img_out(e+output+t+"</svg>"),output="",font_style="",cfmt.fullsvg?(defined_glyph={},defined_font={}):(musicfont="",style="",fulldefs=""),defs="",posy=0}function blk_out(){if(multicol||!user.img_out)return;blk_flush(),user.page_format&&!block.started&&(block.started=!0,block.newpage?(block.newpage=!1,user.img_out('<div class="nobrk newpage">')):user.img_out('<div class="nobrk">'))}function blk_flush(){svg_flush(),block.started&&(block.started=!1,user.img_out("</div>"))}function voice_filter(){var e,t,n;for(e in parse.voice_opts){if(!parse.voice_opts.hasOwnProperty(e))continue;t=new RegExp(e);if(t.test(curvoice.id)||t.test(curvoice.nm))for(n in parse.voice_opts[e])parse.voice_opts[e].hasOwnProperty(n)&&self.do_pscom(parse.voice_opts[e][n])}}function sym_link(e){e.fname||set_ref(e),curvoice.ignore||(parse.last_sym=e,e.prev=curvoice.last_sym,curvoice.last_sym?curvoice.last_sym.next=e:curvoice.sym=e,curvoice.last_sym=e),e.v=curvoice.v,e.p_v=curvoice,e.st=curvoice.cst,e.time=curvoice.time,e.dur&&!e.grace&&(curvoice.time+=e.dur),e.pos=curvoice.pos,curvoice.second&&(e.second=!0),curvoice.floating&&(e.floating=!0)}function sym_add(e,t){var n={type:t,dur:0},r,i=curvoice;return curvoice=e,sym_link(n),curvoice=i,r=n.prev,r||(r=n.next),r&&(n.fname=r.fname,n.istart=r.istart,n.iend=r.iend),n}function mrest_expand(e){var t,n,r,i=e.nmes,s=e.dur/i,o=e.a_dd;e.type=C.REST,e.dur=s,e.head=C.FULL,e.nflags=-2,r=e.next,t=e.p_v,t.last_sym=e,t.time=e.time+s,t.cst=e.st,n=e;while(--i>0)n=sym_add(t,C.BAR),n.bar_type="|",n=sym_add(t,C.REST),e.invis&&(n.invis=!0),n.dur=s,n.head=C.FULL,n.nflags=-2,t.time+=s;n.next=r,r&&(r.prev=n),n.a_dd=o}function sort_all(){var e,t,n,r,i,s,o,u,a,f,l,c,h,p,d=voice_tb.length,v=[],m=[],g=-1;for(r=0;r<d;r++)v.push(voice_tb[r].sym);var y=1,b=cur_sy;for(;;){if(b&&y){p=b,b=null,a=-1,m=[];for(r=0;r<d;r++){if(!p.voices[r]){p.voices[r]={range:-1};continue}u=p.voices[r].range;if(u<0)continue;m[u]=r,a++}}o=i=1e6;for(u=0;u<d;u++){r=m[u];if(r==undefined)break;e=v[r];if(!e||e.time>i)continue;s=w_tb[e.type],e.time<i?(i=e.time,o=s):s<o&&(o=s),e.type==C.MREST&&(e.nmes==1?mrest_expand(e):a>0&&(g=i))}if(o>127)break;if(i==g){l=0;for(u=0;u<d;u++){r=m[u];if(r==undefined)break;e=v[r];if(!e||e.time!=i||w_tb[e.type]!=o)continue;if(e.type!=C.MREST){g=-1;break}if(l==0)l=e.nmes;else if(l!=e.nmes){g=-1;break}}if(g<0)for(u=0;u<d;u++){r=m[u];if(r==undefined)break;e=v[r],e&&e.type==C.MREST&&mrest_expand(e)}}for(u=0;u<d;u++){r=m[u];if(r==undefined)break;e=v[r];if(!e||e.time!=i||w_tb[e.type]!=o)continue;if(e.type==C.STAVES){b=e.sy;for(c=0;c<d;c++)if(m[c]==undefined)break;for(h=0;h<d;h++){if(!b.voices[h])continue;u=b.voices[h].range;if(u<0||p.voices[h].range>=0)continue;m[c++]=h}}y&&(y=0,e.seqst=!0),e.ts_prev=f,f?f.ts_next=e:tsfirst=e,f=e,v[r]=e.next}y=o}}function voice_adj(){function i(e){var t,n,r,i,s,o,u,i=e.dur,a=1;for(t=e;t;t=t.next){if(t.beam_end||!t.next)break;a++}if(a<=1){delete e.feathered_beam;return}n=t,s=i/2,u=i/(a-1),r=e.time;if(e.feathered_beam>0)for(t=e,o=a-1;t!=n;t=t.next,o--)i=(u*o|0)+s,t.dur=i,t.time=r,r+=i;else for(t=e,o=0;t!=n;t=t.next,o++)i=(u*o|0)+s,t.dur=i,t.time=r,r+=i;t.dur=t.time+t.dur-r,t.time=r}var e,t,n,r;t=glovar.tempo,t&&staves_found<=0&&(r=par_sy.top_voice,e=voice_tb[r],e.sym&&e.sym.type!=C.TEMPO&&(t=clone(t),t.v=r,t.p_v=e,t.st=e.st,t.time=0,t.next=e.sym,t.next&&(t.next.prev=t),e.sym=t));for(r=0;r<voice_tb.length;r++){e=voice_tb[r],e.ignore&&(e.ignore=!1);for(t=e.sym;t;t=t.next)if(t.time>=staves_found)break;for(;t;t=t.next){switch(t.type){case C.GRACE:t.next&&t.next.type==C.BAR&&t.time--;if(!cfmt.graceword)continue;for(n=t.next;n;n=n.next){switch(n.type){case C.SPACE:continue;case C.NOTE:if(!n.a_ly)break;t.a_ly=n.a_ly,n.a_ly=null}break}continue}t.feathered_beam&&i(t)}}}function dupl_voice(){var e,t,n,r,i,s,o,u,a=voice_tb.length;for(o=0;o<a;o++){e=voice_tb[o],t=e.clone;if(!t)continue;e.clone=null;for(n=e.sym;n;n=n.next)if(n.time>=staves_found)break;t.clef=clone(e.clef),curvoice=t;for(;n;n=n.next){if(n.type==C.STAVES)continue;r=clone(n);if(n.notes){r.notes=[];for(u=0;u<=n.nhd;u++)r.notes.push(clone(n.notes[u]))}sym_link(r),t.second?r.second=!0:delete r.second,t.floating?r.floating=!0:delete r.floating,delete r.a_ly,i=r.extra;if(!i)continue;s=clone(i),r.extra=s,r=s,r.v=t.v,r.p_v=t,r.st=t.st;for(i=i.next;i;i=i.next){s=clone(i);if(i.notes){s.notes=[];for(u=0;u<=i.nhd;u++)s.notes.push(clone(i.notes[u]))}r.next=s,s.prev=r,r=s,r.v=t.v,r.p_v=t,r.st=t.st}}}}function new_syst(e){var t,n,r={voices:[],staves:[],top_voice:0};if(e){cur_sy=par_sy=r;return}for(n=0;n<voice_tb.length;n++){t=par_sy.voices[n].st;var i=par_sy.staves[t],s=voice_tb[n];s.staffnonote!=undefined&&(i.staffnonote=s.staffnonote),s.staffscale&&(i.staffscale=s.staffscale),r.voices[n]=clone(par_sy.voices[n]),r.voices[n].range=-1,delete r.voices[n].second}for(t=0;t<par_sy.staves.length;t++)r.staves[t]=clone(par_sy.staves[t]),r.staves[t].flags=0;par_sy.next=r,par_sy=r}function set_bar_num(){var e,t,n,r,i,s,o=cur_sy.top_voice,u=voice_tb[o].meter.wmeasure,a=gene.nbar;for(e=tsfirst;;e=e.ts_next){if(!e)return;switch(e.type){case C.METER:u=e.wmeasure;case C.CLEF:case C.KEY:case C.STBRK:continue;case C.BAR:if(e.bar_num){gene.nbar=e.bar_num;break}e.text&&!cfmt.contbarnb&&(e.text[0]=="1"?a=gene.nbar:(gene.nbar=a,e.bar_num=gene.nbar))}break}r=e.time+u;if(e.time==0)for(t=e.ts_next;t;t=t.ts_next)if(t.type==C.BAR&&t.time){t.time<r&&(e=t,r=e.time+u);break}i=gene.nbar;for(;e;e=e.ts_next)switch(e.type){case C.METER:u=e.wmeasure,e.time<r&&(r=e.time+u);break;case C.MREST:i+=e.nmes-1;while(e.ts_next&&e.ts_next.type!=C.BAR)e=e.ts_next;break;case C.BAR:e.bar_num&&(i=e.bar_num);if(e.time<r){e.text&&e.text[0]=="1"&&(a=i,s=r-e.time);break}n=e.time,t=e;do{if(t.dur)break;if(t.type==C.BAR&&t.text)break;t=t.next}while(t&&t.time==n);i++;if(t&&t.type==C.BAR&&t.text)if(t.text[0]=="1")s=0,a=i;else{cfmt.contbarnb||(i=a);if(s){cfmt.contbarnb&&i--,r=n+s;break}}e.bar_num=i,r=n+u;while(e.ts_next&&!e.ts_next.seqst)e=e.ts_next}cfmt.measurenb<0&&(gene.nbar=i)}function get_map(e){if(!e)return;var t,n,r,i,s,o,u=info_split(e,2);if(u.length<3){syntax(1,"Not enough parameters in %%map");return}o=u[1];if(o.indexOf("octave,")==0||o.indexOf("key,")==0)o=o.replace(/[,']+$/m,"").toLowerCase(),o[0]=="k"&&(o=o.replace(/[_=^]+/,""));else if(o[0]=="*"||o.indexOf("all")==0)o="all";else{s=new scanBuf,s.buffer=u[1],n=parse_acc_pit(s);if(!n){syntax(1,"Bad note in %%map");return}o=note2abc(n)}r=maps[u[0]],r||(maps[u[0]]=r={}),i=r[o],i||(r[o]=i=[]);if(!u[2])return;t=2;if(u[2].indexOf("=")<0){u[2][0]!="*"&&(s=new scanBuf,s.buffer=u[2],i[1]=parse_acc_pit(s));if(!u[3])return;t++,u[3].indexOf("=")<0&&(i[0]=u[3].split(","),t++)}for(;t<u.length;t++)switch(u[t]){case"heads=":i[0]=u[++t].split(",");break;case"print=":if(cfmt.sound=="play")break;s=new scanBuf,s.buffer=u[++t],i[1]=parse_acc_pit(s);break;case"color=":i[2]=u[++t]}}function set_transp(){var e,t,n;if(curvoice.ckey.k_bagpipe||curvoice.ckey.k_drum)return;cfmt.transp&&curvoice.transp&&syntax(0,"Mix of old and new transposition syntaxes"),t=(cfmt.transp||0)+(curvoice.transp||0)+(curvoice.shift||0),n=curvoice.vtransp||0;if(t==n)return;curvoice.vtransp=t,e=curvoice.last_sym;if(!e){curvoice.key=clone(curvoice.okey),key_transp(curvoice.key),curvoice.ckey=clone(curvoice.key),curvoice.key.k_none&&(curvoice.key.k_sf=0);return}for(;;){if(e.type==C.KEY)break;if(!e.prev){e=curvoice.key;break}e=e.prev}key_transp(e),curvoice.ckey=clone(e),curvoice.key.k_none&&(e.k_sf=0)}function set_ottava(e){if(cfmt.sound)return;switch(e){case"15ma(":curvoice.ottava=-14;break;case"8va(":curvoice.ottava=-7;break;case"8vb(":curvoice.ottava=7;break;case"15mb(":curvoice.ottava=14;break;case"15ma)":case"8va)":case"8vb)":case"15mb)":curvoice.ottava=0}}function do_pscom(e){var t,n,r,i,s,o,u,a,f=!1;e.slice(-5)==" lock"&&(f=!0,e=e.slice(0,-5).trim()),i=e.match(/(\w|-)+/);if(!i)return;i=i[0],s=e.replace(i,"").trim();switch(i){case"center":if(parse.state>=2){r=new_block("text"),r.text=cnv_escape(s),r.opt="c";return}write_text(cnv_escape(s),"c");return;case"clef":parse.state>=2&&(parse.state==2&&goto_tune(),r=new_clef(s),r&&get_clef(r));return;case"deco":deco_add(s);return;case"linebreak":set_linebreak(s);return;case"map":get_map(s);return;case"maxsysstaffsep":if(parse.state==3){par_sy.voices[curvoice.v].maxsep=get_unit(s);return}break;case"multicol":generate();switch(s){case"start":blk_out(),multicol={posy:posy,maxy:posy,lmarg:cfmt.leftmargin,rmarg:cfmt.rightmargin,state:parse.state};break;case"new":if(!multicol){syntax(1,"%%multicol new without start");break}posy>multicol.maxy&&(multicol.maxy=posy),cfmt.leftmargin=multicol.lmarg,cfmt.rightmargin=multicol.rmarg,img.chg=!0,set_page(),posy=multicol.posy;break;case"end":if(!multicol){syntax(1,"%%multicol end without start");break}posy<multicol.maxy&&(posy=multicol.maxy),cfmt.leftmargin=multicol.lmarg,cfmt.rightmargin=multicol.rmarg,multicol=undefined,blk_flush(),img.chg=!0,set_page();break;default:syntax(1,"Unknown keyword '$1' in %%multicol",s)}return;case"musicfont":musicfont=s;return;case"ottava":if(parse.state!=3){if(parse.state!=2)return;goto_tune()}o=parseInt(s);if(isNaN(o)||o<-2||o>2){syntax(1,errs.bad_val,"%%ottava");return}switch(curvoice.ottava){case 14:a="15mb)";break;case 7:a="8vb)";break;case-7:a="8va)";break;case-14:a="15ma)"}a&&(a_dcn||(a_dcn=[]),a_dcn.push(a),set_ottava(a));switch(o){case-2:a="15mb(";break;case-1:a="8vb(";break;case 0:return;case 1:a="8va(";break;case 2:a="15ma("}a_dcn||(a_dcn=[]),a_dcn.push(a),set_ottava(a);return;case"repbra":parse.state>=2&&(parse.state==2&&goto_tune(),curvoice.norepbra=!get_bool(s));return;case"repeat":if(parse.state!=3)return;if(!curvoice.last_sym){syntax(1,"%%repeat cannot start a tune");return}if(!s.length)o=1,u=1;else{a=s.split(/\s+/),o=parseInt(a[0]),u=parseInt(a[1]);if(isNaN(o)||o<1||curvoice.last_sym.type==C.BAR&&o>2){syntax(1,"Incorrect 1st value in %%repeat");return}if(isNaN(u))u=1;else if(u<1){syntax(1,"Incorrect 2nd value in %%repeat");return}}parse.repeat_n=curvoice.last_sym.type==C.BAR?o:-o,parse.repeat_k=u;return;case"sep":var l,c,h,p;set_page(),p=img.width-img.lm-img.rm,t=l=c=0,s&&(h=s.split(/\s+/),t=get_unit(h[0]),h[1]&&(l=get_unit(h[1]),h[2]&&(c=get_unit(h[2])))),t<1&&(t=14),l<1&&(l=t),c<1&&(c=90);if(parse.state>=2){r=new_block(i),r.x=(p-c)/2/cfmt.scale,r.l=c/cfmt.scale,r.sk1=t,r.sk2=l;return}blk_out(),vskip(t),output+='<path class="stroke"\n d="M',out_sxsy((p-c)/2/cfmt.scale," ",0),output+="h"+(c/cfmt.scale).toFixed(2)+'"/>\n',vskip(l),blk_flush();return;case"setbarnb":n=parseInt(s),isNaN(n)?syntax(1,"Bad %%setbarnb value"):parse.state>=2?glovar.new_nbar=n:cfmt.measurefirst=n;return;case"staff":if(parse.state!=3){if(parse.state!=2)return;goto_tune()}n=parseInt(s);if(isNaN(n)){syntax(1,"Bad %%staff value '$1'",s);return}var d;s[0]=="+"||s[0]=="-"?d=curvoice.cst+n:d=n-1;if(d<0||d>nstaff){syntax(1,"Bad %%staff number $1 (cur $2, max $3)",d,curvoice.cst,nstaff);return}delete curvoice.floating,curvoice.cst=d;return;case"staffbreak":if(parse.state!=3){if(parse.state!=2)return;goto_tune()}r={type:C.STBRK,dur:0},s[0]>="0"&&s[0]<="9"?(r.xmx=get_unit(s),s.slice(-1)=="f"&&(r.stbrk_forced=!0)):(r.xmx=14,s[0]=="f"&&(r.stbrk_forced=!0)),sym_link(r);return;case"stafflines":case"staffscale":case"staffnonote":self.set_v_param(i,s);return;case"staves":case"score":if(parse.state==0)return;get_staves(i,s);return;case"sysstaffsep":if(parse.state==3){par_sy.voices[curvoice.v].sep=get_unit(s);return}break;case"text":if(parse.state>=2){r=new_block(i),r.text=cnv_escape(s),r.opt=cfmt.textoption;return}write_text(cnv_escape(s),cfmt.textoption);return;case"transpose":if(cfmt.sound)return;switch(parse.state){case 0:cfmt.transp=0;case 1:case 2:cfmt.transp=(cfmt.transp||0)+get_transp(s);return}for(r=curvoice.last_sym;r;r=r.prev){switch(r.type){case C.NOTE:r=clone(curvoice.okey),r.k_old_sf=curvoice.ckey.k_sf,sym_link(r);break;case C.KEY:break;default:continue}break}do_info("V",curvoice.id+" shift="+s);return;case"tune":return;case"user":set_user(s);return;case"voicecolor":if(parse.state!=3){if(parse.state!=2)return;goto_tune()}curvoice.color=s;return;case"vskip":n=get_unit(s);if(n<0){syntax(1,"%%vskip cannot be negative");return}if(parse.state>=2){r=new_block(i),r.sk=n;return}vskip(n);return;case"newpage":case"leftmargin":case"rightmargin":case"pagescale":case"pagewidth":case"printmargin":case"scale":case"staffwidth":if(parse.state==3){r=new_block(i),r.param=s;return}if(i=="newpage"){blk_flush(),block.newpage=!0;return}}self.set_format(i,s,f)}function do_begin_end(e,t,n){var r,i,s,o;switch(e){case"js":js_inject(n);break;case"ml":parse.state>=2?(o=new_block(e),o.text=n):(svg_flush(),user.img_out(n));break;case"svg":i=0;for(;;){r=n.indexOf('<style type="text/css">\n',i);if(r<0)break;i=n.indexOf("</style>",r);if(i<0){syntax(1,"No </style> in %%beginsvg sequence");break}style+=n.slice(r+23,i).replace(/\s+$/,"")}i=0;for(;;){r=n.indexOf("<defs>\n",i);if(r<0)break;i=n.indexOf("</defs>",r);if(i<0){syntax(1,"No </defs> in %%beginsvg sequence");break}defs_add(n.slice(r+6,i))}break;case"text":s=get_textopt(t),s||(s=cfmt.textoption);if(parse.state>=2){o=new_block(e),o.text=cnv_escape(n),o.opt=s;break}write_text(cnv_escape(n),s)}}function generate(){var e,t;vover&&(syntax(1,"No end of voice overlay"),get_vover(vover.bar?"|":")"));if(voice_tb.length==0)return;voice_adj(),dupl_voice(),sort_all();if(!tsfirst)return;self.set_bar_num();if(!tsfirst)return;user.get_abcmodel&&user.get_abcmodel(tsfirst,voice_tb,anno_type,info),user.img_out&&self.output_music();for(e=0;e<voice_tb.length;e++)t=voice_tb[e],t.time=0,t.sym=t.last_sym=null,t.st=cur_sy.voices[e].st,t.second=cur_sy.voices[e].second,delete t.have_ly,t.hy_st=0,delete t.bar_start,delete t.slur_st,delete t.s_tie,delete t.s_rtie;staves_found=0}function key_transp(e){var t=curvoice.vtransp/3|0,n=(t&-2)+(t&1)*7+e.k_sf;switch((curvoice.vtransp+210)%3){case 1:n=(n+4+48)%12-4;break;case 2:n=(n+7+48)%12-7;break;default:n=(n+5+48)%12-5}e.k_sf=n,e.k_delta=cgd2cde[(n+7)%7]}function set_k_acc(e){var t,n,r,i,s,o=[],u=[],a=[],f=[];if(e.k_sf>0)for(i=0;i<e.k_sf;i++)o[i]=1,u[i]=[26,23,27,24,21,25,22][i];else for(i=0;i<-e.k_sf;i++)o[i]=-1,u[i]=[22,25,21,24,20,23,26][i];r=e.k_a_acc.length;for(t=0;t<r;t++){s=e.k_a_acc[t];for(n=0;n<i;n++)if(u[n]==s.pit){o[n]=s.acc,s.micro_n&&(a[n]=s.micro_n,f[n]=s.micro_d);break}n==i&&(o[n]=s.acc,u[n]=s.pit,s.micro_n&&(a[n]=s.micro_n,f[n]=s.micro_d),i++)}for(t=0;t<i;t++)s=e.k_a_acc[t],s||(s=e.k_a_acc[t]={}),s.acc=o[t],s.pit=u[t],a[t]?(s.micro_n=a[t],s.micro_d=f[t]):(delete s.micro_n,delete s.micro_d)}function acc_same_pitch(e){var t,n,r=curvoice.last_sym.prev;if(!r)return;n=r.time;for(;r;r=r.prev)switch(r.type){case C.BAR:if(r.time<n)return;for(;;){r=r.prev;if(!r)return;if(r.type==C.NOTE){if(r.time+r.dur==n)break;return}if(r.time<n)return}for(t=0;t<=r.nhd;t++)if(r.notes[t].pit==e&&r.notes[t].ti1)return r.notes[t].acc;return;case C.NOTE:for(t=0;t<=r.nhd;t++)if(r.notes[t].pit==e)return r.notes[t].acc}return}function get_staves(e,t){var n,r,i,s,o,u,a,f,l,c=parse_staves(t);if(!c)return;voice_tb.length!=0&&(voice_adj(),dupl_voice());var h=0,p=!0;for(u=0;u<voice_tb.length;u++)r=voice_tb[u],r.time>h&&(h=r.time),r.sym&&(p=!1);if(p||h==0&&staves_found<0)for(u=0;u<par_sy.voices.length;u++)par_sy.voices[u].range=-1;else{for(u=0;u<par_sy.voices.length;u++)if(par_sy.voices[u].range>=0){curvoice=voice_tb[u];break}curvoice.time=h,n={type:C.STAVES,dur:0},sym_link(n),par_sy.nstaff=nstaff,new_syst(),n.sy=par_sy}staves_found=h;for(u=0;u<voice_tb.length;u++)r=voice_tb[u],delete r.second,delete r.ignore,delete r.floating;l=0;for(s=0;s<c.length;s++){a=c[s][0],r=new_voice(a),r.time=h,u=r.v,s==0&&(par_sy.top_voice=r.v);if(par_sy.voices[u].range>=0){i=clone(r),par_sy.voices[voice_tb.length]=clone(par_sy.voices[u]),u=voice_tb.length,i.v=u,i.sym=i.last_sym=null,i.time=h,voice_tb.push(i),delete i.clone;while(r.clone)r=r.clone;r.clone=i,r=i}c[s][0]=r,par_sy.voices[u].range=l++}if(e[1]=="t")for(s=0;s<c.length;s++){o=c[s][1];if(!(o&(OPEN_BRACE|OPEN_BRACE2)))continue;if((o&(OPEN_BRACE|CLOSE_BRACE))==(OPEN_BRACE|CLOSE_BRACE)||(o&(OPEN_BRACE2|CLOSE_BRACE2))==(OPEN_BRACE2|CLOSE_BRACE2))continue;if(c[s+1][1]!=0)continue;if(o&OPEN_PARENTH||c[s+2][1]&OPEN_PARENTH)continue;c[s+2][1]&(CLOSE_BRACE|CLOSE_BRACE2)?c[s+1][1]|=FL_VOICE:c[s+2][1]==0&&c[s+3][1]&(CLOSE_BRACE|CLOSE_BRACE2)&&(c[s][1]|=OPEN_PARENTH,c[s+1][1]|=CLOSE_PARENTH,c[s+2][1]|=OPEN_PARENTH,c[s+3][1]|=CLOSE_PARENTH)}f=-1;for(s=0;s<c.length;s++){o=c[s][1],(o&(OPEN_PARENTH|CLOSE_PARENTH))==(OPEN_PARENTH|CLOSE_PARENTH)&&(o&=~(OPEN_PARENTH|CLOSE_PARENTH),c[s][1]=o),r=c[s][0],o&FL_VOICE?(r.floating=!0,r.second=!0):(f++,par_sy.staves[f]||(par_sy.staves[f]={stafflines:"|||||",staffscale:1}),par_sy.staves[f].flags=0),u=r.v,r.st=r.cst=par_sy.voices[u].st=f,par_sy.staves[f].flags|=o;if(o&OPEN_PARENTH){i=r;while(s<c.length-1){r=c[++s][0],u=r.v,c[s][1]&MASTER_VOICE?(i.second=!0,i=r):r.second=!0,r.st=r.cst=par_sy.voices[u].st=f;if(c[s][1]&CLOSE_PARENTH)break}par_sy.staves[f].flags|=c[s][1]}}f<0&&(f=0),par_sy.nstaff=nstaff=f;if(e[1]=="c")for(f=0;f<nstaff;f++)par_sy.staves[f].flags^=STOP_BAR;for(u=0;u<voice_tb.length;u++){r=voice_tb[u];if(par_sy.voices[u].range<0){r.ignore=!0;continue}par_sy.voices[u].second=r.second,f=r.st,f>0&&!r.norepbra&&!(par_sy.staves[f-1].flags&STOP_BAR)&&(r.norepbra=!0)}curvoice=parse.state>=2?voice_tb[par_sy.top_voice]:null}function get_vover(e){function l(e){var t,n;for(t=0;t<voice_tb.length;t++){n=voice_tb[t];if(n.id==e)return n}return n=clone(curvoice),n.v=voice_tb.length,n.id=e,n.sym=n.last_sym=null,delete n.nm,delete n.snm,delete n.new_name,delete n.lyric_restart,delete n.lyric_cont,delete n.ly_a_h,delete n.sym_restart,delete n.sym_cont,delete n.have_ly,voice_tb.push(n),n}var t,n,r,i,s,o,u,a,f=parse.line;if(curvoice.ignore)return;if(e=="|"||e==")"){if(!curvoice.last_note){syntax(1,errs.nonote_vo);return}curvoice.last_note.beam_end=!0;if(!vover){syntax(1,"Erroneous end of voice overlay");return}curvoice.time!=vover.p_voice.time&&(syntax(1,"Wrong duration in voice overlay"),curvoice.time>vover.p_voice.time&&(vover.p_voice.time=curvoice.time)),curvoice=vover.p_voice,vover=null;return}if(e=="("){if(vover){syntax(1,"Voice overlay already started");return}vover={p_voice:curvoice,time:curvoice.time};return}if(!curvoice.last_note){syntax(1,errs.nonote_vo);return}curvoice.last_note.beam_end=!0,t=curvoice.voice_down;if(!t){t=l(curvoice.id+"o"),curvoice.voice_down=t,t.time=0,t.second=!0,u=t.v,par_sy.voices[u]={st:curvoice.st,second:!0};var c=curvoice.clone!=undefined?1:0;r=par_sy.voices[curvoice.v].range;for(o=0;o<par_sy.voices.length;o++)par_sy.voices[o].range>r&&(par_sy.voices[o].range+=c+1);par_sy.voices[u].range=r+1,c&&(n=l(t.id+"c"),n.second=!0,a=n.v,par_sy.voices[a]={second:!0,range:r+2},t.clone=n)}t.ulen=curvoice.ulen,t.dur_fact=curvoice.dur_fact,curvoice.uscale&&(t.uscale=curvoice.uscale);if(!vover){vover={bar:!0,p_voice:curvoice},s=t.time;for(i=curvoice.last_sym;;i=i.prev)if(i.type==C.BAR||i.time<=s)break;vover.time=i.time}else curvoice!=vover.p_voice&&curvoice.time!=vover.p_voice.time&&(syntax(1,"Wrong duration in voice overlay"),curvoice.time>vover.p_voice.time&&(vover.p_voice.time=curvoice.time));t.time=vover.time,curvoice=t}function is_voice_sig(){var e;if(!curvoice.sym)return!0;if(curvoice.time!=0)return!1;for(e=curvoice.last_sym;e;e=e.prev)if(w_tb[e.type]!=0)return!1;return!0}function get_clef(e){var t,n;if(is_voice_sig()){curvoice.clef=e;return}for(t=curvoice.last_sym;t&&t.prev&&t.time==curvoice.time;t=t.prev)if(w_tb[t.type]!=0)break;if(t&&t.prev&&t.time==curvoice.time&&(t.type==C.KEY&&!t.k_none||t.type==C.BAR)){for(n=t;n.prev;n=n.prev){switch(n.prev.type){case C.KEY:case C.BAR:continue}break}t=curvoice.last_sym,curvoice.last_sym=n.prev,sym_link(e),e.next=n,n.prev=e,curvoice.last_sym=t}else sym_link(e);e.clef_small=!0}function get_key(e){var t,n,r,i,s=new_key(e),o=s[0];s=s[1],o.k_sf&&!o.k_exp&&o.k_a_acc&&set_k_acc(o);switch(parse.state){case 1:o.k_sf==undefined&&!o.k_a_acc&&(o.k_sf=0,o.k_none=!0);for(t=0;t<voice_tb.length;t++)n=voice_tb[t],n.key=clone(o),n.okey=clone(o),n.ckey=clone(o);parse.ckey=o,s.length!=0&&memo_kv_parm("*",s),glovar.ulen||(glovar.ulen=C.BLEN/8),parse.state=2,set_page(),write_heading(),reset_gen(),gene.nbar=cfmt.measurefirst;return;case 2:goto_tune(!0)}s.length!=0&&set_kv_parm(s),!curvoice.ckey.k_bagpipe&&!curvoice.ckey.k_drum&&(i=(cfmt.transp||0)+(curvoice.transp||0)+(curvoice.shift||0));if(o.k_sf==undefined){if(!o.k_a_acc&&!i)return;o.k_sf=curvoice.okey.k_sf}curvoice.okey=clone(o),i&&(curvoice.vtransp=i,key_transp(o)),o.k_old_sf=curvoice.ckey.k_sf,curvoice.ckey=o;if(is_voice_sig()){curvoice.key=clone(o),o.k_none&&(curvoice.key.k_sf=0);return}r=curvoice.last_sym,r&&r.type==C.METER?(curvoice.last_sym=r.prev,curvoice.last_sym||(curvoice.sym=null),sym_link(o),o.next=r,r.prev=o,curvoice.last_sym=r):sym_link(o)}function new_voice(e){var t,n,r,i=voice_tb.length;if(i==1&&voice_tb[0].default){delete voice_tb[0].default;if(voice_tb[0].time==0)return t=voice_tb[0],t.id=e,cfmt.transp&&parse.state>=2&&(r=curvoice,curvoice=t,set_transp(),curvoice=r),t}for(n=0;n<i;n++){t=voice_tb[n];if(t.id==e)return t}return t={v:n,id:e,time:0,"new":!0,pos:{dyn:0,gch:0,gst:0,orn:0,stm:0,voc:0,vol:0},scale:1,ulen:glovar.ulen,dur_fact:1,key:clone(parse.ckey),ckey:clone(parse.ckey),okey:clone(parse.ckey),meter:clone(glovar.meter),wmeasure:glovar.meter.wmeasure,clef:{type:C.CLEF,clef_auto:!0,clef_type:"a",time:0},hy_st:0},voice_tb.push(t),par_sy.voices[n]={range:-1},t}function init_tune(){nstaff=-1,voice_tb=[],curvoice=null,new_syst(!0),staves_found=-1,gene={},a_de=[],od={}}function do_cloning(e){var t,n,r=parse.file,i=parse.eol+1,s=i;for(;;){n=r.indexOf("\n",s);if(n<0){n=0;break}if(/%.*|\n.*|.:.|\[.:/.test(r.slice(n+1,n+4)))break;s=n+1}include++,tosvg(parse.fname,r,i,n);for(t=0;t<e.length;t++)get_voice(e[t]),tosvg(parse.fname,r,i,n);include--}function get_voice(e){var t,n,r,i,s=info_split(e,1),o=s.shift();if(!o)return;o.indexOf(",")>0&&(i=o.split(","),o=i.shift());if(parse.state<2){s.length!=0&&memo_kv_parm(o,s),o!="*"&&parse.state==1&&new_voice(o);return}if(o=="*"){syntax(1,"Cannot have V:* in tune body");return}curvoice=new_voice(o),set_kv_parm(s),parse.state==2&&goto_tune(),set_transp(),t=curvoice.v,curvoice.new&&(delete curvoice.new,staves_found<0&&(curvoice.st=curvoice.cst=++nstaff,par_sy.nstaff=nstaff,par_sy.voices[t].st=nstaff,par_sy.voices[t].range=t,par_sy.staves[nstaff]={stafflines:curvoice.stafflines||"|||||",staffscale:1}),par_sy.voices[t].range<0&&staves_found>=0&&(curvoice.ignore=!0)),!curvoice.filtered&&!curvoice.ignore&&parse.voice_opts&&(curvoice.filtered=!0,voice_filter()),i&&do_cloning(i)}function goto_tune(e){var t,n,r={type:C.STAVES,dur:0,sy:par_sy};parse.state=3,voice_tb.length==0?(get_voice("1"),curvoice.clef.istart=curvoice.key.istart,curvoice.clef.iend=curvoice.key.iend,curvoice.default=!0):curvoice||(curvoice=voice_tb[staves_found<0?0:par_sy.top_voice]),!curvoice.init&&!e&&(set_kv_parm([]),set_transp());for(t=0;t<voice_tb.length;t++)n=voice_tb[t],n.ulen=glovar.ulen,n.ckey.k_bagpipe&&!n.pos.stm&&(n.pos=clone(n.pos),n.pos.stm=C.SL_BELOW);if(staves_found<0){nstaff=voice_tb.length-1;for(t=0;t<=nstaff;t++)n=voice_tb[t],delete n.new,n.st=n.cst=par_sy.voices[t].st=par_sy.voices[t].range=t,par_sy.staves[t]={stafflines:n.stafflines||"|||||",staffscale:1};par_sy.nstaff=nstaff}n=curvoice,curvoice=voice_tb[par_sy.top_voice],sym_link(r),curvoice=n}function get_sym(e,t){var n,r,i,s,o;if(curvoice.ignore)return;if(t){n=curvoice.sym_cont;if(!n){syntax(1,"+: symbol line without music");return}}else{curvoice.sym_restart?(curvoice.sym_start=n=curvoice.sym_restart,curvoice.sym_restart=null):n=curvoice.sym_start,n||(n=curvoice.sym);if(!n){syntax(1,"s: without music");return}}i=0;for(;;){while(e[i]==" "||e[i]==" ")i++;r=e[i];if(!r)break;switch(r){case"|":while(n&&n.type!=C.BAR)n=n.next;if(!n){syntax(1,"Not enough measure bars for symbol line");return}n=n.next,i++;continue;case"!":case'"':s=++i,i=e.indexOf(r,s);if(i<0){syntax(1,r=="!"?"No end of decoration":"No end of guitar chord"),i=e.length;continue}o=e.slice(s-1,i+1);break;case"*":break;default:o=r.charCodeAt(0);if(o<128){o=char_tb[o];if(o.length>1&&(o[0]=="!"||o[0]=='"')){r=o[0];break}}syntax(1,errs.bad_char,r)}while(n&&(n.type!=C.NOTE||n.grace))n=n.next;if(!n){syntax(1,"Too many elements in symbol line");return}switch(r){default:break;case"!":deco_cnv([o.slice(1,-1)],n,n.prev);break;case'"':a_gch=n.a_gch,parse_gchord(o),a_gch&&self.gch_build(n)}n=n.next,i++}curvoice.lyric_cont=n}function get_lyrics(e,t){var n,r,i,s,o,u;if(curvoice.ignore)return;curvoice.pos.voc!=C.SL_HIDDEN&&(curvoice.have_ly=!0);if(t){n=curvoice.lyric_cont;if(!n){syntax(1,"+: lyric without music");return}}else{set_font("vocal"),curvoice.lyric_restart?(curvoice.lyric_start=n=curvoice.lyric_restart,curvoice.lyric_restart=null,curvoice.lyric_line=0):(curvoice.lyric_line++,n=curvoice.lyric_start),n||(n=curvoice.sym);if(!n){syntax(1,"w: without music");return}}i=e,s=0;for(;;){while(i[s]==" "||i[s]==" ")s++;if(!i[s])break;o=parse.istart+s+2;switch(i[s]){case"|":while(n&&n.type!=C.BAR)n=n.next;if(!n){syntax(1,"Not enough measure bars for lyric line");return}n=n.next,s++;continue;case"-":r="-\n";break;case"_":r="_\n";break;case"*":r="";break;default:if(i[s]=="\\"&&s==i.length-1){curvoice.lyric_cont=n;return}r="";for(;;){if(!i[s])break;switch(i[s]){case"_":case"*":case"|":s--;case" ":case" ":break;case"~":r+=" ",s++;continue;case"-":r+="\n";break;case"\\":r+=i[++s],s++;continue;default:r+=i[s++];continue}break}}while(n&&(n.type!=C.NOTE||n.grace))n=n.next;if(!n){syntax(1,"Too many words in lyric line");return}r&&n.pos.voc!=C.SL_HIDDEN&&(r.match(/^\$\d/)&&(r[1]=="0"?set_font("vocal"):set_font("u"+r[1]),r=r.slice(2)),u={t:r,font:gene.curfont,w:strwh(r)[0],istart:o,iend:o+r.length},n.a_ly||(n.a_ly=[]),n.a_ly[curvoice.lyric_line]=u),n=n.next,s++}curvoice.lyric_cont=n}function ly_width(e,t){var n,r,i,s,o,u,a,f,l,c,h,p=e.a_ly;s=0;for(a=0;a<p.length;a++){n=p[a];if(!n)continue;h=n.t;if(h=="-\n"||h=="_\n"){n.shift=0;continue}u=n.w,i=n.font.swfac,o=u+2*cwid(" ")*i,e.type==C.GRACE?c=e.wl:h[0]>="0"&&h[0]<="9"&&h.length>2||h[1]==":"||h[0]=="("||h[0]==")"?(h[0]=="("?r=cwid("(")*i:(f=h.indexOf(" "),set_font(n.font),f>0?r=strwh(h.slice(0,f))[0]:r=u),c=(u-r+2*cwid(" ")*i)*.4,c>20&&(c=20),c+=r,n.t[0]>="0"&&n.t[0]<="9"&&c>s&&(s=c)):(c=o*.4,c>20&&(c=20)),n.shift=c,t<c&&(t=c),o-=c,c=2*cwid(" ")*i;for(l=e.next;l;l=l.next){switch(l.type){case C.NOTE:case C.REST:if(!l.a_ly||!l.a_ly[a]||l.a_ly[a].w==0)o-=9;else{if(l.a_ly[a].t!="-\n"&&l.a_ly[a].t!="_\n")break;o-=c}if(o<=0)break;continue;case C.CLEF:case C.METER:case C.KEY:o-=10;continue;default:o-=5}break}o>e.wr&&(e.wr=o)}if(s>0)for(a=0;a<p.length;a++)n=p[a],n&&n.t[0]>="0"&&n.t[0]<="9"&&(n.shift=s);return t}function draw_lyric_line(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d;e.hy_st&1<<t&&(l=!0,e.hy_st&=~(1<<t));for(o=e.sym;;o=o.next)if(o.type!=C.CLEF&&o.type!=C.KEY&&o.type!=C.METER)break;i=o.prev?o.prev.x:tsfirst.x,h=0;for(;o;o=o.next){o.a_ly?a=o.a_ly[t]:a=null;if(!a){switch(o.type){case C.REST:case C.MREST:c&&(out_wln(i+3,n,h-i),c=!1,i=o.x+o.wr)}continue}a.font!=gene.curfont&&(gene.curfont=p=a.font),r=a.t,s=a.w,d=a.shift,l&&(r=="_\n"?r="-\n":r!="-\n"&&(out_hyph(i,n,o.x-d-i),l=!1,i=o.x+o.wr)),c&&r!="_\n"&&(out_wln(i+3,n,h-i+3),c=!1,i=o.x+o.wr);if(r=="-\n"||r=="_\n"){h==0&&i>o.x-18&&(i=o.x-18),r[0]=="-"?l=!0:c=!0,h=o.x-d;continue}h=o.x-d,r.slice(-1)=="\n"&&(r=r.slice(0,-1),l=!0);if(user.anno_start||user.anno_stop)u={st:o.st,istart:a.istart,iend:a.iend,x:h,y:n,ymn:n,ymx:n+gene.curfont.size,wl:0,wr:s},anno_start(u,"lyrics");xy_str(h,n,r),anno_stop(u,"lyrics"),i=h+s}l&&(l=!1,h=realwidth-10,h<i+10&&(h=i+10),out_hyph(i,n,h-i),cfmt.hyphencont&&(e.hy_st|=1<<t));for(e.s_next;o;o=o.next)if(o.type==C.NOTE){if(!o.a_ly)break;a=o.a_ly[t],a&&a.t=="_\n"&&(c=!0,h=realwidth-15,h<i+12&&(h=i+12));break}c&&(out_wln(i+3,n,h-i+3),c=!1)}function draw_lyrics(e,t,n,r,i){var s,o,u=staff_tb[e.st].staffscale;set_font("vocal");if(i>0){r>-cfmt.vocalspace&&(r=-cfmt.vocalspace),r*=u;for(s=0;s<t;s++)r-=n[s]*1.1,draw_lyric_line(e,s,r);return(r-n[s-1]/6)/u}o=staff_tb[e.st].topbar+cfmt.vocalspace,r<o&&(r=o),r*=u;for(s=t;--s>=0;)draw_lyric_line(e,s,r),r+=n[s]*1.1;return r/u}function draw_all_lyrics(){var e,t,n,r,i,s,o,u,a,f,l=new Array(nstaff),c=voice_tb.length,h=new Array(c),p=new Array(c),d=new Array(c),v=new Array(c),m=0,g=0,y=-1;for(n=0;n<c;n++){e=voice_tb[n];if(!e.sym)continue;e.st!=y&&(m=0,g=0,y=e.st),r=0;if(e.have_ly){h[n]||(h[n]=[]);for(t=e.sym;t;t=t.next){a=t.a_ly;if(!a)continue;s=t.x,u=10;for(i=0;i<a.length;i++){f=a[i];if(f&&f.w!=0){s-=f.shift,u=f.w;break}}o=y_get(e.st,1,s,u),m<o&&(m=o),o=y_get(e.st,0,s,u),g>o&&(g=o);while(r<a.length)h[n][r++]=0;for(i=0;i<a.length;i++){f=a[i];if(!f)continue;if(!h[n][i]||f.font.size>h[n][i])h[n][i]=f.font.size}}}else o=y_get(e.st,1,0,realwidth),m<o&&(m=o),o=y_get(e.st,0,0,realwidth),g>o&&(g=o);l[y]||(l[y]={}),l[y].top=m,l[y].bot=g,p[n]=r;if(r==0)continue;e.pos.voc?d[n]=e.pos.voc==C.SL_ABOVE:voice_tb[n+1]&&voice_tb[n+1].st==y&&voice_tb[n+1].have_ly?d[n]=!0:d[n]=!1,d[n]?l[y].a=!0:l[y].b=!0}i=0;for(n=0;n<c;n++){e=voice_tb[n];if(!e.sym)continue;if(!e.have_ly)continue;if(d[n]){v[i++]=n;continue}y=e.st,set_dscale(y,!0),p[n]>0&&(l[y].bot=draw_lyrics(e,p[n],h[n],l[y].bot,1))}while(--i>=0)n=v[i],e=voice_tb[n],y=e.st,set_dscale(y,!0),l[y].top=draw_lyrics(e,p[n],h[n],l[y].top,-1);for(n=0;n<c;n++){e=voice_tb[n];if(!e.sym)continue;y=e.st;if(l[y].a){m=l[y].top+2;for(t=e.sym.next;t;t=t.next)t.a_ly&&y_set(y,1,t.x-2,10,m)}if(l[y].b){g=l[y].bot-2;if(p[e.v]>0)for(t=e.sym.next;t;t=t.next)t.a_ly&&y_set(y,0,t.x-2,10,g);else y_set(y,0,0,realwidth,g)}}}function parse_gchord(e){function h(){var e="";for(;;){t=n[o++];if("1234567890.-".indexOf(t)<0)return parseFloat(e);e+=t}}var t,n,r,i,s,e,o,u,a,f=get_font("annotation"),l=f.size,c=parse.line;u=parse.bol+c.index;if(e.length>1)n=e.slice(1,-1),a=u+1;else{n="";for(;;){t=c.next_char();if(!t){syntax(1,"No end of guitar chord");return}if(t=='"')break;t=="\\"&&(n+=t,t=c.next_char()),n+=t}a=parse.bol+c.index+1}if(curvoice.pos.gch==C.SL_HIDDEN)return;o=0,e="g";for(;;){t=n[o];if(!t)break;r={text:"",istart:u,iend:a,font:f};switch(t){case"@":e=t,o++,i=h(),t!=","?(syntax(1,"',' lacking in annotation '@x,y'"),s=0):(s=h(),t!=" "&&o--),r.x=i,r.y=s-l/2;break;case"^":case"_":case"<":case">":o++,e=t;break;default:switch(e){case"g":r.font=get_font("gchord");break;case"@":r.x=i,s-=l,r.y=s-l/2}}r.type=e;for(;;){t=n[o];if(!t)break;switch(t){case"\\":t=n[++o];if(!t||t=="n")break;r.text+="\\";default:r.text+=t,o++;continue;case"&":for(;;){r.text+=t,t=n[++o];switch(t){default:continue;case";":case undefined:case"\\":}break}if(t==";"){o++,r.text+=t;continue}break;case";":}o++;break}a_gch||(a_gch=[]),a_gch.push(r)}}function gch_tr1(e,t){var n,r,i,s,o,u,a,f,l,c,h=0;switch(e[0]){case"A":i=5;break;case"B":i=6;break;case"C":i=0;break;case"D":if(e[1]=="o"){h++,i=0;break}i=1;break;case"E":i=2;break;case"F":e[1]=="a"&&h++,i=3;break;case"G":i=4;break;case"L":h++,i=5;break;case"M":h++,i=2;break;case"R":h++,i=1;break;case"S":h++,e[1]=="o"?(h++,i=4):i=6;break;case"/":h--;break;default:return e}f=0,l=h+1;if(h>=0){while(e[l]=="#")f++,l++;while(e[l]=="b")f--,l++;o=cde2fcg[i]+t+f*7,u=cgd2cde[(o+112)%7],s=(((o+22)/7|0)+159)%5,n=(h?latin_names[u]:note_names[u])+acc_name[s]}else n="";return c=e.indexOf("/",l),c<0?n+e.slice(l):(i=note_names.indexOf(e[++c]),i<0?n+e.slice(l):(n+=e.slice(l,c),f=0,e[++c]=="#"?(f++,e[++c]=="#"&&(f++,c++)):e[c]=="b"&&(f--,e[++c]=="b"&&(f--,c++)),o=cde2fcg[i]+t+f*7,u=cgd2cde[(o+112)%7],s=(((o+22)/7|0)+159)%5,n+note_names[u]+acc_name[s]+e.slice(c)))}function gch_transp(e){var t,n,r,i=0,s=curvoice.ckey.k_sf-curvoice.okey.k_sf;for(;;){t=e.a_gch[i++];if(!t)return;if(t.type!="g")continue;n=t.text,r=n.indexOf(" "),r>=0&&(r++,n=n.slice(0,r)+gch_tr1(n.slice(r),s)),t.text=gch_tr1(n,s)}}function gch_build(e){var t,n,r,i,s=curvoice.pos.gch==C.SL_BELOW?-1:1,o=0,u=0,a=0,f=0,l=cfmt.gchordbox,c=.4;e.a_gch=a_gch,a_gch=null,curvoice.vtransp&&gch_transp(e);for(i=0;i<e.a_gch.length;i++){t=e.a_gch[i];if(t.type=="g")cfmt.chordnames&&(t.otext=t.text,t.text=t.text.replace(/A|B|C|D|E|F|G/g,function(e){return cfmt.chordnames[e]}),cfmt.chordnames.B=="H"&&(t.text=t.text.replace(/Hb/g,"Bb"))),t.text=t.text.replace(/##|#|=|bb|b/g,function(e){switch(e){case"##":return"x";case"#":return"♯";case"=":return"♮";case"b":return"♭"}return"bb"});else{t.text=cnv_escape(t.text);if(t.type=="@"&&!user.anno_start&&!user.anno_stop)continue}gene.curfont=t.font,n=strwh(t.text),t.w=n[0];switch(t.type){case"@":break;case"^":r=n[0]*c,r>8&&(r=8),t.x=-r,o-=n[1],t.y=o;break;case"_":r=n[0]*c,r>8&&(r=8),t.x=-r,u-=n[1],t.y=u;break;case"<":t.x=-(n[0]+6),a-=n[1],t.y=a+n[1]/2;break;case">":t.x=6,f-=n[1],t.y=f+n[1]/2;break;default:t.box=l,r=n[0]*c,r>8&&(r=8),t.x=-r,s<0?(u-=n[1],t.y=u,l&&(u-=2,t.y-=1)):(o-=n[1],t.y=o,l&&(o-=2,t.y-=1))}}a/=2,f/=2;for(i=0;i<e.a_gch.length;i++){t=e.a_gch[i];switch(t.type){case"^":t.y-=o;break;case"<":t.y-=a;break;case">":t.y-=f;break;case"g":s>0&&(t.y-=o)}}}function draw_gchord(e,t,n){var r,i,s,o,u,a,f,l,c,h,p,d=e.a_gch[0].w,v=y_get(e.st,1,e.x-2,d),m=y_get(e.st,0,e.x-2,d),g=e.dur?((e.notes[e.nhd].pit+e.notes[0].pit>>1)-18)*3:12;for(o=0;o<e.a_gch.length;o++){r=e.a_gch[o];if(r.type!="g")continue;i=r;if(r.y<0)break}i&&(i.y>=0?v<n&&(v=n):m>t&&(m=t)),set_dscale(e.st);for(o=0;o<e.a_gch.length;o++){r=e.a_gch[o],use_font(r.font),set_font(r.font),p=r.font.size,d=r.w,u=e.x+r.x,s=r.text;switch(r.type){case"_":a=r.y+m,y_set(e.st,0,u,d,a-p*.2-2);break;case"^":a=r.y+v,y_set(e.st,1,u,d,a+p*.8+2);break;case"<":e.notes[0].acc&&(u-=e.notes[0].shac),a=r.y+g-p/2;break;case">":e.xmx&&(u+=e.xmx),e.dots&&(u+=1.5+3.5*e.dots),a=r.y+g-p/2;break;default:h=r.box?3:2,r.y>=0?(a=r.y+v,y_set(e.st,!0,u,d,a+p+h)):(a=r.y+m,y_set(e.st,!1,u,d,a-h)),l=s.indexOf(" ");if(l>=0){u=realwidth;for(var y=e.next;y;y=y.next){switch(y.type){default:continue;case C.NOTE:case C.REST:case C.BAR:u=y.x}break}c=2;for(;;){l=s.indexOf(" ",l+1);if(l<0)break;c++}var b=(u-e.x)/c;u=e.x,a*=staff_tb[e.st].staffscale,user.anno_start&&user.anno_start("gchord",r.istart,r.iend,u-2,a+p+2,d+4,p+4,e),l=0,c=l;for(;;){l=s.indexOf(" ",c);if(l<0)break;xy_str(u,a,s.slice(c,l),"c"),u+=b,c=l+1}xy_str(u,a,s.slice(c),"c"),user.anno_stop&&user.anno_stop("gchord",r.istart,r.iend,e.x-2,a+p+2,d+4,p+4,e);continue}break;case"@":a=r.y+g,a>0?(f=a+p,f>staff_tb[e.st].ann_top&&(staff_tb[e.st].ann_top=f)):a<staff_tb[e.st].ann_bot&&(staff_tb[e.st].ann_bot=a)}user.anno_start&&user.anno_start("annot",r.istart,r.iend,u-2,a+p+2,d+4,p+4,e),r.box?xy_str_b(u,a,s):xy_str(u,a,s),user.anno_stop&&user.anno_stop("annot",r.istart,r.iend,u-2,a+p+2,d+4,p+4,e)}}function psdeco(){return!1}function psxygl(){return!1}function set_hooks(){function n(e){for(var t=0;t<e.length;t++)e[t](self)}var e=abc2svg.modules.hooks,t=abc2svg.modules.g_hooks;hook_init?e.length&&(n(e),t.push.apply(t,e),abc2svg.modules.hooks=[]):(e.length&&(t.push.apply(t,e),abc2svg.modules.hooks=[]),n(t),hook_init=!0)}var C=abc2svg.C,require=empty_function,system=empty_function,write=empty_function,XMLHttpRequest=empty_function,OPEN_BRACE=1,CLOSE_BRACE=2,OPEN_BRACKET=4,CLOSE_BRACKET=8,OPEN_PARENTH=16,CLOSE_PARENTH=32,STOP_BAR=64,FL_VOICE=128,OPEN_BRACE2=256,CLOSE_BRACE2=512,OPEN_BRACKET2=1024,CLOSE_BRACKET2=2048,MASTER_VOICE=4096,IN=96,CM=37.8,YSTEP=256,errs={bad_char:"Bad character '$1'",bad_val:"Bad value in $1",bar_grace:"Cannot have a bar in grace notes",ignored:"$1: inside tune - ignored",misplaced:"Misplaced '$1' in %%staves",must_note:"!$1! must be on a note",must_note_rest:"!$1! must be on a note or a rest",nonote_vo:"No note in voice overlay",not_enough_n:"Not enough notes/rests for %%repeat",not_enough_m:"Not enough measures for %%repeat",not_ascii:"Not an ASCII character"},self=this,glovar={meter:{type:C.METER,wmeasure:1,a_meter:[]}},info={},mac={},maci=new Int8Array(128),parse={ctx:{},prefix:"%",state:0,line:new scanBuf},psvg,dd_tb={},a_de,od,decos={dot:"0 stc 5 1 1",tenuto:"0 emb 5 3 3",slide:"1 sld 3 7 0",arpeggio:"2 arp 12 10 0",roll:"3 roll 7 6 6",fermata:"3 hld 12 7 7",emphasis:"3 accent 7 4 4",lowermordent:"3 lmrd 10 5 5",coda:"3 coda 24 10 10",uppermordent:"3 umrd 10 5 5",segno:"3 sgno 22 8 8",trill:"3 trl 14 5 5",upbow:"3 upb 10 5 5",downbow:"3 dnb 9 5 5",gmark:"3 grm 6 5 5",wedge:"3 wedge 8 3 3",turnx:"3 turnx 10 0 5",breath:"3 brth 0 1 20",longphrase:"3 lphr 0 1 1",mediumphrase:"3 mphr 0 1 1",shortphrase:"3 sphr 0 1 1",invertedfermata:"3 hld 12 7 7",invertedturn:"3 turn 10 0 5",invertedturnx:"3 turnx 10 0 5",0:"3 fng 8 3 3 0",1:"3 fng 8 3 3 1",2:"3 fng 8 3 3 2",3:"3 fng 8 3 3 3",4:"3 fng 8 3 3 4",5:"3 fng 8 3 3 5",plus:"3 dplus 7 3 3","+":"3 dplus 7 3 3",accent:"3 accent 7 4 4",">":"3 accent 7 4 4",marcato:"3 marcato 9 3 3","^":"3 marcato 9 3 3",mordent:"3 lmrd 10 5 5",open:"3 opend 10 3 3",snap:"3 snap 14 3 3",thumb:"3 thumb 14 3 3",dacapo:"3 dacs 16 20 20 Da Capo",dacoda:"3 dacs 16 20 20 Da Coda","D.C.":"3 dcap 16 10 10","D.S.":"3 dsgn 16 10 10","D.C.alcoda":"3 dacs 16 38 38 D.C. al Coda","D.S.alcoda":"3 dacs 16 38 38 D.S. al Coda","D.C.alfine":"3 dacs 16 38 38 D.C. al Fine","D.S.alfine":"3 dacs 16 38 38 D.S. al Fine",fine:"3 dacs 16 10 10 Fine",turn:"3 turn 10 0 5","trill(":"3 ltr 8 0 0","trill)":"3 ltr 8 0 0",f:"6 f 18 1 7",ff:"6 ff 18 2 10",fff:"6 fff 18 4 13",ffff:"6 ffff 18 6 16",mf:"6 mf 18 6 13",mp:"6 mp 18 6 16",p:"6 p 18 2 8",pp:"6 pp 18 5 14",ppp:"6 ppp 18 8 20",pppp:"6 pppp 18 10 25",pralltriller:"3 umrd 10 5 5",sfz:"6 sfz 18 4 10",ped:"4 ped 20 0 0","ped-up":"4 pedoff 20 0 0","crescendo(":"7 cresc 18 0 0","crescendo)":"7 cresc 18 0 0","<(":"7 cresc 18 0 0","<)":"7 cresc 18 0 0","diminuendo(":"7 dim 18 0 0","diminuendo)":"7 dim 18 0 0",">(":"7 dim 18 0 0",">)":"7 dim 18 0 0","-(":"8 gliss 0 0 0","-)":"8 gliss 0 0 0","~(":"8 glisq 0 0 0","~)":"8 glisq 0 0 0","8va(":"3 8va 10 0 0","8va)":"3 8va 10 0 0","8vb(":"4 8vb 10 0 0","8vb)":"4 8vb 10 0 0","15ma(":"3 15ma 10 0 0","15ma)":"3 15ma 10 0 0","15mb(":"4 15mb 10 0 0","15mb)":"4 15mb 10 0 0",invisible:"32 0 0 0 0",beamon:"33 0 0 0 0",trem1:"34 0 0 0 0",trem2:"34 0 0 0 0",trem3:"34 0 0 0 0",trem4:"34 0 0 0 0",xstem:"35 0 0 0 0",beambr1:"36 0 0 0 0",beambr2:"36 0 0 0 0",rbstop:"37 0 0 0 0","/":"38 0 0 6 6","//":"38 0 0 6 6","///":"38 0 0 6 6","beam-accel":"39 0 0 0 0","beam-rall":"39 0 0 0 0",stemless:"40 0 0 0 0",rbend:"41 0 0 0 0"},f_near=[!0,!0,!0],f_note=[!1,!1,!1,!0,!0,!0,!1,!1,!0],f_staff=[!1,!1,!1,!1,!1,!1,!0,!0],func_tb=[d_near,d_slide,d_arp,d_upstaff,d_upstaff,d_trill,d_pf,d_cresc],ottava={"8va(":1,"8va)":1,"15ma(":1,"15ma)":1,"8vb(":1,"8vb)":1,"15mb(":1,"15mb)":1},STEM_MIN=16,STEM_MIN2=14,STEM_MIN3=12,STEM_MIN4=10,STEM_CH_MIN=14,STEM_CH_MIN2=10,STEM_CH_MIN3=9,STEM_CH_MIN4=9,BEAM_DEPTH=3.2,BEAM_OFFSET=.25,BEAM_SHIFT=5,BEAM_SLOPE=.4,BEAM_STUB=8,SLUR_SLOPE=.5,GSTEM=15,GSTEM_XOFF=2.3,cache,min_tb=[[STEM_MIN,STEM_MIN,STEM_MIN2,STEM_MIN3,STEM_MIN4,STEM_MIN4],[STEM_CH_MIN,STEM_CH_MIN,STEM_CH_MIN2,STEM_CH_MIN3,STEM_CH_MIN4,STEM_CH_MIN4]],sharp_cl=new Int8Array([24,9,15,21,6,12,18]),flat_cl=new Int8Array([12,18,24,9,15,21,6]),sharp1=new Int8Array([-9,12,-9,-9,12,-9]),sharp2=new Int8Array([12,-9,12,-9,12,-9]),flat1=new Int8Array([9,-12,9,-12,9,-12]),flat2=new Int8Array([-12,9,-12,9,-12,9]),rest_tb=["r128","r64","r32","r16","r8","r4","r2","r1","r0","r00"],musicfont='url("data:application/x-font-ttf;base64,AAEAAAAOAIAAAwBgRkZUTYGVv6sAAEzkAAAAHEdERUYAFQAUAABMyAAAABxPUy8yWJ9bEgAAAWgAAABWY21hcONO1KwAAAOkAAADImN2dCAAIgKIAAAGyAAAAARnYXNw//8AAwAATMAAAAAIZ2x5Zp7WR84AAAfAAAA9LGhlYWQNUCQgAAAA7AAAADZoaGVhCWv/HgAAASQAAAAkaG10eMEH+uAAAAHAAAAB4mxvY2E9g0waAAAGzAAAAPRtYXhwAMABPQAAAUgAAAAgbmFtZcjHN28AAETsAAADGHBvc3Q8S3q2AABIBAAABLsAAQAAAAEAAF3bnglfDzz1AAsEAAAAAADRlyIXAAAAANgWv3b/OP0MBUsEigAAAAgAAgAAAAAAAAABAAAEiv0MAFwEJf84/XQFSwABAAAAAAAAAAAAAAAAAAAAeAABAAAAeQEMAAUAAAAAAAIAAAABAAEAAABAAC4AAAAAAAEBngGQAAUACAKZAswAAACPApkCzAAAAesAMwEJAAACAAUDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAQAAA6qQDM/8zAFwEigL0AAAAAQAAAAAAAAF2ACIAAAAAAVUAAAGQAAACWAAAAFcAAAFK/7ACE/+wANL/sAAjAAAAIwAAACMAAABkAAAEIwAABCUAAAHg/9wDXgB6AwsAAALSAAACv/+6AdYAAAMLAAADDgAAAyf/yADIAAABrgAAASIAAAGQAAABfAAAAZAAAAGQAAABgQAAAZAAAAGQAAABgQAAAZkACQGYAAkB9AAAAQQAFAEEAAoCEQAAAhwAAAHAAAABSQAAAUAAAAFK//4BLAAAAjAAAAFKAAABSgAAAGQAAAENAAAAyAAAAP8AAAELABQBbgAAAQ0AMgFu//UAqQAAAToAAAFA//0AUAAAAUAAAAFAAAABGAAAAlgAAAC2AAAAggAAAIIAAAEsAAABLAAAAO4AAAD/AAABSQAAAY8AAAHYAAAB2AAAA1MAAAIz//ADIP/hAjP/tAG4/9sBX/9+AjMAAAIz/+QCv/+0AjP/tAK//7QDK//bAV//2wJp/34BX/9+Amn/fgFfAAAB/QAFAbUAAAG1AAACRAANAkQADQEYAAABNgAAASz//wEsAAAA+gAAAMgAAAEY/zgA+gAAAMgAAAQNAAACHAAMAfQAAAH0AAAB9AAAAfQAAAH0AAAB9AAAAHgAAAAtAAACHAAAAPoAAP/qAAAAAAADAAAAAwAAABwAAQAAAAACHAADAAEAAAAcAAQCAAAAAHwAQAAFADwAAAAg4ADgJOAw4DngQ+BI4FDgXOBi4GngfeCM4JXgpOCp4LPhAeG54bvh5+Jk4oPkoOSi5KTkqOSs5MDkzuTq5O7lAeUi5SXlLeUx5TnlZ+Vp5W3lguXQ5eLmEOYS5hTmGOYk5jDmUOZV6RLpFekY6SDpJeld6gLqpP//AAAAAAAg4ADgIuAw4DjgQ+BF4FDgXOBi4GngeuCA4JTgoOCp4LPhAeG54bvh5+Jg4oDkoOSi5KTkqOSs5MDkzuTh5O7lAOUg5STlKeUv5TnlZuVp5WzlguXQ5eLmEOYS5hTmGOYk5jDmUOZV6RDpFOkY6SDpJeld6gLqpP//AAP/5CAFH+Qf2R/SH8kfyB/BH7YfsR+rH5sfmR+SH4gfhB97Hy4edx52Hksd0x24G5wbmxuaG5cblBuBG3QbYhtfG04bMBsvGywbKxskGvga9xr1GuEalBqDGlYaVRpUGlEaRho7GhwaGBdeF10XWxdUF1AXGRZ1FdQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEGAAADAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIgKIAAAAKgAqACoANgA+AG4AfACKAJgApACwAL4A3AFQAawCHAJeAvwDjgPwBAQEoAUyBYoFyAXqBf4GUAagBsAHBgdGB4AHzAgMCFIIrAjACOYJDAlICWQJkgm+CdQJ7gokCjIKPgpKClwKggqcCswK9gtOC3QLzgvuDCwMVAxoDHQMggySDLoM4AzsDPgNBA0QDTINWA2ODdwOPA6wDsYO7A8aD34P9hBUEJwQ+BJSE14UGBTYFagWRBciGD4ZQBmCGcYaEBoqGk4aYhp2GqYathrIGuQa+hseG04cMBzsHRQdMh1kHaId1B4WHigeNh5UHm4elgACACIAAAEyAqoAAwAHAC6xAQAvPLIHBADtMrEGBdw8sgMCAO0yALEDAC88sgUEAO0ysgcGAfw8sgECAO0yMxEhESczESMiARDuzMwCqv1WIgJmAAABAAAAAAGRAZAAAwAAMREhEQGRAZD+cAABAAAAAAAAAAAAAAAAMQAAAQAAAAAAVwQDACAAABE1NjU0JyY1NDcGFRQXFhUUBxYVFAcGFRQXJjU0NzY1NDUjElc/FSVNTSUVP1cSIwIDAhhDNmA5NGY6MksiOWFNYRgYZkxgOSVKMjpmNDlgNkgAAf+w/+wBmgAUAAMAACchFSFQAer+FhQoAAAAAAH/sP/sAmIAFAADAAAnIRUhUAKy/U4UKAAAAAAB/7D/7AEiABQAAwAAJyEVIVABcv6OFCgAAAAAAQAAAAAAIwPoAAMAABEzESMjIwPo/BgAAQAAAfQAIwPoAAMAABEzESMjIwPo/gwAAQAAAvgAIwRWAAMAABE3ESMjIwRMCv6iAAAAAAIAAAFAAGQCngAHAA8AABIiJjQ2MhYUAiImNDYyFhRHKh0dKh0dKh0dKh0COh0qHR0q/ukdKh0dKgAAAAUAAAAABCQBrgAvADcAPwBHAFMAACE1Mx4BMzI2NTQnLgQ1NDYzMhYXNzMXIy4BIyIGFRQeAxceARUUBiMiJwcgIiY0NjIWFAQiJjQ2MhYUAREzMjY0JiMDNTMRIzUzMhYVFCMCTh4VTzIpO5QZGioWEVk9JCcZHh4HHg9KMB85ECIZMghOTVtPRS4jAZsqHR0qHf3qKh0dKh3+iSg8RkY83EZG3HGJ+qA8SyAhLSgHCBQUIxVDTQsOGZs6SCgbDxcPCQsCFTczOk4gIB0qHR0qHR0qHR0qAWn+mGGmYf56HgFoHmdr0gAFAAAAAAQkAa4AGgAiACoAMgA+AAAhIiY1NDYzMhYXNzMXByYjIgYUFjMyNjcXDgEyIiY0NjIWFAQiJjQ2MhYUAREzMjY0JiMDNTMRIzUzMhYVFCMDAmd1glolKRseHgghJF44NjY4Nk0RIxRZsSodHSod/eoqHR0qHf6JKDxGRjzcRkbccYn6a2dldwwSHqYEjG2YbUk+CkpRHSodHSodHSodHSoBaf6YYaZh/noeAWgeZ2vSAAAAA//cAAIB3gKzAAcADwBNAAAAIiY0NjIWFAQiJjQ2MhYUFzQ2MzIWFRQHFjMyNjU0LwEDJxMuATU0PgE3NjMyFhUUBiMiJjU0NyYjIgYVFB8BExcDHgEVFA4BBwYjIiYBniAYGCAY/n4gGBggGFsbFBMeLBcpJjYme88r0VpIHBMUJjMwOBsUEx4sFykmNiZ61CvVWkgcExQmMzA4AVIYIBgYIFQYIBgYINMSHBoRHQ4XLSYtJmX+3iABJUdxOBYtERETOCESHBoRHQ4XLSYtJmUBJh/+10dyOBYtERETOAAFAHr/NANeAlQAFwAbAB8AIwAnAAABMxUeARczFSMOAQcVIzUuAScjNTM+ATcRIxYXNxU2NyczJicHNQYHAdgoVXgHiooHeFUoVXgHiooHeFVwBWsoawVwcAVrKGsFAlSJCItgKGCLCImJCItgKGKJCP7lug7IyA66KLoOyMkOuwAAAAAEAAD9bwKnBIoADABTAF0AcgAAAQYVFBc+ATU0JicOARMXFBUUBiMiJjU0NjMyFhQGBxYzMj4HNTQ1JwYjIi4CNTQ3PgY/ASY1NDY3HgEVFAYHFzYzMh4BFRQGNzQmIyoBIxM+AScOARUUFy4BNTQ2NycOAQceATMyNwFsBwVKcxwaOUJLFU1NUl9AMi9BPy8tGAkREhAPDAsHBBUUFUmGZz06DSQgLh0xEhcWDXRKNCVceRIQD0p2O2UjalQDBQMhYUfuOEkvMjNgSRGPbAECoHoQEANTNi4XZjKPRyhPCgdb+23sAgFNW1NBLUg7WDcBGQIFCAwOFBceEAIB6QIzW4dPhWYXMCUtGicOERCWZoyjBx+QcoipX80CUnxDZX7IS2L+mhJY9ws/MC06DFo6RmIUvXKXZ42jAgAAAgAA/fwC0gIAAGQAaAAAATI2NTQnJiMiBw4CByYnJicRIxEzETY3NjceAxcWMzI2NTQnJiMiBxYXFBYVFAYrASY1NDc2NzYzMhcWFxUUBgcGIyInBxc2MzIWFxYdAQYHBiMiJjU0NzMyFhUUBhUGBxYBMxEjAd4+Sg0aSUY8AgYKBCIaHi4cHC4eGiIGFAwZDyclMT0SJFIvMTINAjMhBUQFGlUnI15VNwhaSB8tND8iIj80QmYeKAg3Vl1MckQFITMCDzA1/k17e/4geEotLWxJBQ4bCmInKx/+BAQA/hEfKydiCyoXHQkbe0IxNmIaECgDDQQeKxkyFAtEGQ1PNFMSTm8cDRdLShc+LDlDElM0UE48MhkrHgQOBCYQHAPe/AAAAAP/uv2lAsMA/wArADcAQwAANzQ2MzIWFxYVFAYHDgEHPgE3PgE3NjU0JicuASMiBgc+ATMyFhUUBwYjIiYFIiY1NDYzMhYVFAYnIiY1NDYzMhYVFAYTi2dVaysvQlVo1ZF3r0gxLBMOER0fNDA/YhEXIxwuPSchMTNFAoIWHRoUFR4aGhcbHBUUHBsdYoA0OT5yf7BPYlUIIFVIMVRQO2pHUCMkHUxNHRRBLzIgHlGKHBcWHB0VFh3yHhkVGhsUGR4AAAACAAD/BgFyAPoAAwAHAAA3MxMjAzMTI9yUApbclAKW+v4MAfT+DAAABAAA/goCHwOqAAkAIABiAG0AACUWFz4BNTQmIyIDAicOARUUFy4BNTQ2NyYnDgEHHgEzMhceAR8BHQEUIyImNTQ2MzIWFRQGBxYzMjY1NC8BBiMiJjU0Nz4BNz4CNyY1NDY3HgEVFAYHHgEXNjMyFxYVFAcGAwYVFBc+ATU0JwYBSRMGTUdWQg4NGAEsOR8gKkw7BQlxVQEFbYIDIgMGAgJ6NlMzKCU1MScVIiMsAQ0JFY2ZLg5MHgUjJxIOWUAvGUlhAggEEghcOTJjNmQDBjdeKV91xFsSTzM2Vv7gAQsQCTQnKSYSQSk4ThA+Wlp5U3F+GiBAFxcbB39IMSQzNyQiKAEMMzUPCY0BkopqURxQGAQgIQ3CB25/EzNiW22HTBFuJAJDNmJ3MBsDVh4iOSQlezNGJiYAAgAA/mMCQgGaAGMAZwAAATI2NTQnJiMiBw4BByYnJicRIxEzETY3NjceAxcWMzI2NTQnJiMiBxYXFBYVFAYrASY1NDc2NzYzMhcWFxUUBgcGIyInBxc2MzIWFxYdAQYHBiMiJjU0NzMyFhUUBhUGBxYBMxEjAX4yOwoVOjgwAgwEHRMYJRYWJRgTHQQRChMMIB0nMQ4cQyUnKAoCKhoENgQVRCMYSUYtBkg6GCUrMRsbNCg1UhggBi1GST1bNgQaKgIMJiv+o2Ji/oBgOyQkVzsFHQtSHCIZ/moDM/50GSIcUggiEhcIFmI1KyhOFQ0gAgsDGCIUKBAJNRULQCtBDj5aFgoSPDsTMiMuNQ9BK0A/MCgUIxgDCwMfDRYDGPzNAAAAAAP/yP4eAjYAzAAmAC8AOwAANzQ2MzIXFhUUBw4BBzY3Njc2NTQnLgEjIgYHPgEzMhYVFAcGIyImBSImNDYyFhQGJyImNTQ2MzIWFRQGD3BSgjwjeEPGacBeRx4JLRgtIDBSChIWFiU5IBklLDkCAhIXFCIYFRUSFhUSERYVIU1eVzNaxmw7VwYzZEqMLylmMxoUQjYXDTwmKBoYU3UXJBYXIhjCGBQRFBUQExkAAAAAAwAAAAAAyADwAAkAEwApAAA3BhUUFjMyNjU0JyIGFRQXNjU0JgciJjU0NjcuATU0NjMyFhUUBxYVFAZQIxsQERQCDhMgIxMwJTUjIhEMKB4kNjwoNHcUHRQeGxEWhhEOFxkLIQ8U3CgeFxoLDxMQGiIgHCMQIBsgJgAAAAIAAP8GAa4A+gALABQAADMUFjMyNjU0JiMiBgc0NjIWFAYiJooqIyIrJyYlKIp9tH19tH1ieHlhZXV2YWeQkdKRkgAAAQAA/wYBIgD6AAkAADE3MxEXFSM1NxFkfUHwQfr+Ph4UFB4BLAAAAAEAAP8GAY8A+gA8AAA3MhUUBw4DBzYzMhYzMjc+AjMOAgcGBwYjIiYjIgYjIjU0Jz4FNTQnIgcyFhUUBiMiNTQ+AcfIBQ02QG82EyAbZBwYHgUQDAEBBQUBBxAaKRp0FR9WAgcBAiw+RzwoU04aHCk3Hkw8WPp+Gg4hLh1ELQwjDgMNCwUWFgMpDhgnJhABAiFFODwyOBhiATUlHh8pZyg5GQAAAQAA/wYBdQD6ADkAADcyFhUUBiMiJjU0NzYzMhcWFRQGBx4BFRQHBiMiJicmNDYzMhYVFAYjFjMyNjU0JicmNDc+ATQmIyJmGyInIRsyHzNZRiZERj0+UUskTSdXGCMyICIqJRsMPyQrSC4WFi9LKSQ8qhwXGyMrIy8aKhMiSC5ECwtFLUMnExYUHUwuIRsZHikxJyY6CAQiBAk3UDAAAAEAAP8GAZAA+gARAAAFFyM3NSM1NjUzATM/AREzFSMBRTLIMuGTo/77sAFjS0vRKSkxKPKA/o6Wkf7ZKAAAAAABAAD/BwF+APoALwAAFzYzMhYVFAYjFjMyNz4BNTQnJiMiBxMhDgErAQc2MzIXHgEVFAcOAiMiJy4BNTQSHCEbKiAcGiQxHBMJHhwoTkgKAWILNSXVBjlCUzEhK0MWQCslPCsQHl8gIBccICEeFB8gORwaNQEiJDp5Hh8VQSVPLxAQAhQJMhIjAAAAAAIAAP8GAYEA+gAJACwAABcyNjU0JiMiBxYTFhUUBiMiJjU0NjMmIyIGFT4CMzIWFRQGIyImJz4BMzIWyCktKigsMAfdGyMYHiIbEBY3NS8VGC0eTE9xSGFmAQFsWzA/0kUsIjAlngGfGiYZKB4bDB4jeF8LCglANkRZgnhpkRIAAQAA/wYBkAD7ACgAADciDgMHNz4IMzIWMzI2Nw4EFSM2NzY3NjcGIyImYRQaFAkRBQoBDAILBQsJDRAJL3UjGjsRG0UaHgiCAQgRaB4tER4lYKEFDgkbBnQBCwIJAQYBAwEmFw5Dp0FcQitFGzaHJzkKKAADAAD/BgGEAPoADgAcADQAABcOARUUFjMyNjU0LgM3PgE1NCYiBhUUHgMHLgE1NDY3MhYVFAYHHgEVFAYjIiY1NDaaNixYLCo/DyAdMT4zI0RSMwocEjFwMSlmSktlKjA6MnVNTHY5KhkkGx0wKR8OFxINE1oaIhwdMCggDxcTChU/GDw1M00BRjInNBcaOjU3SkgwJDUAAAIAAP8GAYEA+gAJACwAADciBhUUFjMyNyYDJjU0NjMyFhUUBiMWMzI2NQ4CIyImNTQ2MzIWFw4BIyImuSktKigsMAfdGyMYHiIbEBY3NS8VGC0eTE9xSGFmAQFsWzA/0kUsIjAlnv5hGiYZKB4bDB4jeF8LCglANkRZgnhpkRIAAQAJ/woBmQD5ADAAACUwFzY1NCYjDgEVFBcWMzI3NjcUHgEVDgEHIicmJzQmNTQ3MhYXFhUUBiMiJjU+ATMBLxIEPB8yQSchMCsoHCoJCBtVVk87OwQB2yRAESIkHCApAiAapAMFCBQiAmVrjjMqIhhYAQQDAVVQATk5ZgIrAuYCHhQnJCU5LhwWJgACAAn+ogGZAV4AOAA/AAAlMBc2NTQmIyIHERYzMjc2NxQeARUOAQcjFSM1JicmJzQmNTQ3NTMVMjYzMhYXFhUUBiMiJjU+ATMDEQYVFBcWAS8SBDwfAxAMDCsoHCoJCBtRVQEjPS47BAGrIwMHAyRAESIkHCApAiAaej0nCqQDBQgUIgT+SwQiGFgBBAMBVFEBaGsJLTlmAisCyxlpZgEeFCckJTkuHBYm/pcBli6RjjMNAAABAAD/BgH0APoACwAANTM1MxUzFSMVIzUj10bX10bXI9fXRtfXAAAAAQAU/gYA4wIAABMAABMWBwYnJgI1NBI3NhcWBwYCFRQS3AcNCQVJa2tJCQsGBjxGR/4WCAUDBlcBIH18ASJWCwcGCEn+54iG/uUAAAEACv4CANwB/QATAAATNhI1NAInJjc2FxYSFRQCBwYnJhQ7R0Y8CQwKB0lra0kICwb+FkkBG4aIARlJCwQECVb+3nx9/uBXCQkEAAAEAAD/TAIRAKoAAwAHABsAJQAAJTMRIwEzESM3BhUUFx4BFzMyNzY0Jy4BJzAjIgQUBiMiJjU0NjIB6Sgo/hcnJ5cFAwpVLg0zEwUDCVYuDTYBQXlnZnp5zqr+ogFe/qLzDA4LCyJHBCMJHAsiRwQmeEVEOD9HAAACAAD/JAIcANwAAwAPAAA3FSE1JTMVITUzESM1IRUjHgHg/gIeAeAeHv4gHkaMjJYyMv5IMjIAAAIAAP9/AcAAgQATAB0AADcGFRQXHgEXMzI3NjQnLgEnMCMiBBQGIyImNTQ2Mm8FAwpVLg0zEwUDCVYuDTYBQXlnZnp5zj8MDgsLIkcEIwkcCyJHBCZ4RUQ4P0cAAgAA/2wBSACUAA0AGwAAJSYjIgYVFBcWMzI2NTQ3FhUUBiMiJyY1NDYzMgEkDSU8lwYLJjyXEA9+SE8kD35IT0QXYSsKCRdhKwkXHh1DZ0MeHUNnAAAAAAEAAP95AUAAhwALAAAlFAYjIiY1NDYzMhYBQHlZMjx6WDI8KEZpOCdFajgAAf/+/28BTACRAAsAACc3FzcXBxcHJwcnNwIbjIwbhoYci4schnEgdnUgcHAhdXUhcAAAAAUAAP9qASwAlgAFAAsAEQAXAB8AABcHFjMyNy8BBhUUFz8BJiMiBx8BNjU0JwY0NjIWFAYilkcdKikfXUcdHVxIHykqHVxHHR3yWHxYWHwSSB0dWkkfKSodWEgdHVpIHykqHYV8WFh8WAAAAAEAAP8GAjAA+gADAAAVATMBAbh4/kf6AfT+DAABAAD/dAFKAIwAAwAAMTcXB6WlpYyMjAABAAD/dAFKAIwAAgAAFRsBpaWMARj+6AABAAD/zgBkADIABwAAFiImNDYyFhRHKh0dKh0yHSodHSoAAAACAAD/ZADhAbAACgAWAAA3IgYdATY3NjU0JjcyFhUUBwYjETMRNmcUKyImKx0HIzlLUkQoI3omE7kPODsvGyYmMiNJTFICTP68NAAAAgAA/oYAxQF6AAMADAAAFzc1BxEVNxEjNQcRNxyQkKkZrAFlLZYtAUnoNP3A4jMCQwEAAAIAAP6YAP8BaAADAB8AADcVNzUDIzUHNTc1BzU3NTMVNzUzFTcVBxU3FQcVIzUHU1paHjU1NTUeWh01NTU1HVpGpxun/jejD1wPpw9aD6ifHKujD1wPpw9aD6ifHAAAAAEAFP+EAQsAegAeAAAXNSYnBzAVIzUzNycwIzUzFRYXNzA1MxUjBgcXMDMVwygMM0g5MzM5SCESNEg5IRM0OXw7Jg0zO0oyMkg5IhEzOUciETRIAAQAAP9qAWwBsAAOABwAKwA6AAA3DgEdATI3Njc2NTQnJiM3MhYVFAcGBwYjETMRNhcOAR0BMjc2NzY1NCcmIzcyFhUUBwYHDgEjETMRNk4RHg4eHwwEChARGR0rCRgrNS8fGdERHRAeHQsGCxAPFh8qCxkoFjcWHht9AR4QxikrNA0ZHhQVJjkhEiA5NEACRv7BMiYBHRHGKS8wExMcFhUmNiQWHD4vGyUCRv7BMgAAAgAy/2QBDQGwAAoAFgAANyIGFRQXFhc1NCYnMhcRMxEiJyY1NDarFyAuLhoqMzojIzpSTzl6JhswRUIDyxIeJjQBRP20UlBFIzIAAAT/9f9qAWwBsAAOAB0ALAA7AAA3IyIHBhUUFxYXFjM1NCYnMhcRMxEiJicmJyY1NDYXDgEdATI3Njc2NTQnJiM3MhYVFAcGBw4BIxEzETZXAREQCgQMHx4OHiswGR8WNxcrGAkr6REdEB4dCwYLEA8WHyoLGSgWNxYeG30VFB4ZDTQrKcYQHicyAT/9uiUbNDkgEiE5JgEdEcYpLzATExwWFSY2JBYcPi8bJQJG/sEyAAAAAAEAAP7AAKkBQAATAAATMxU3FQcVNxUHFSM1BzU3NQc1N0QeR0dHRx5EREREAUCiDlwOfw5aD6iiDlwOfw5aDwADAAD+mAE6AWgAIwAnACsAADc1MxU3FQcVNxUHFSM1BxUjNQ8BIzUHNTc1BzU3NTMVNzUzFQM1BxU3FTc16R4zMzMzHj0ePAEeMzMzMx49Hh49Wz3AqJ4PXA+fD1oPtaoSrKQQqJ4PXA+fD1oPtaoSrKT+/Z4Rn7ieEZ8AAf/9AAABPwD0ABgAADcGIyImNTQ/ATYvASY1NDYzMjEXBRYVFAcSAgMHCQbPDg7NCAsHAQIBHw4OAQEQCAoDSQcGTwMLChIBawYODQUAAAABAAAAAABQAFAACQAANTQ2MhYUBiMiJhciFxcREBgoERcXIhcYAAAAAQAAAAABQAAoAAMAADE1IRUBQCgoAAAAAQAAAAAAZAEYAAMAADMDMwMoKGQoARj+6AAAAAEAAAAAARgBNQAFAAAxGwEjJweMjEFYWgE1/svGxgAAAgAAAAACWAFKAA4AGQAAMTQ2MzIeAhUjLgEiBgchIiY0NjMyFhUUBrN5OWtVMw8LouCiCwEcFyUlFxkjI5iyLFGATW6Ghm4kMCQkGBkjAAABAAAAAAC2AS0AFwAAEzIWFxYVFAcOASMnJjU0NjU0Iy4BNTQ2VhsbEBoyGUQQBgFHFBsoLQEtDBEdMD08HS0DAQIIaxMPASYcHjEAAQAA/wYAggD6AAMAADUzESOCgvr+DAAAAQAAAAAAggD6AAMAADUzFSOCgvr6AAAAAQAA/4MBLAAAAAMAADEhFSEBLP7UfQAAAQAAAAABLAB9AAMAADUhFSEBLP7UfX0AAQAA/n4A6wGHABMAABMXBxcmIyIGFRQXJjU0NjMyFyc3Kb1nbDI0HyY4eDQlIiKHZAGH5dnPLiQdNTRLTSMtFby0AAABAAD/DQEAAMAAFgAANw4CIyImNTQ2MhYVFAcyNjc2MhcDJ6sDGRoTKzcmOCkXIjMhAhUDljA8AQcEKSgfIB4ZHRshLAIC/m8QAAAAAQAA/gwBSADAACQAABcGIyImNTQ2MzIWFRQHMj8BBiMiJjU0NjMyFhUUBzI3NjIXAyerKCErNycbHCkXQQs8NhgrNycbHCkXSC4CFQPFLcQMKCggIB8ZHRsiygwpKB8gHhkdG00CAv1uDAAAAQAA/gwBjwHAADYAADcGIyImNTQ2MzIWFRQHMj8BIg4BIyImNTQ2MzIWFRQHMjc2MhcBJxMGIyImNTQ2MzIWFRQHMjf2KB8rNycbHCkXPws6ASAcEys3JxscKRdILgEWA/70LVUoISs3JxscKRdBCzwMKCggIB8ZHRsiywkEKSgfIB4ZHRtNAgL8bgwBJAwoKCAgHxkdGyIAAAAAAQAA/QwB2gHAAEUAABMGIyImNTQ2MzIWFRQHMj8BBiMiJjU0NjMyFhUUBzI/AQYjIiY1NDYzMhYVFAcyPwEiDgEjIiY1NDYyFhUUBzI3NjIXASerKCErNycbHCkXQQs6KCErNycbHCkXQQs6KB8rNycbHCkXPws6ASAcEys3JjgpF0guAhUD/qkt/jwMKCggIB8ZHRsiygwoKCAgHxkdGyLKDCgoICAfGR0bIssJBCkoHyAeGR0bTQIC+24MAAAAAQAA/QwCGQKuAFYAACUGIyImNTQ2MzIWFRQHMj8BBiMiJjU0NjMyFhUUBzI/ASIOASMiJjU0NjMyFhUUBzI3NjIXAScTBiMiJjU0NjMyFhUUBzI/AQYjIiY1NDYzMhYVFAcyNwE/KCErNycbHCkXQQs2KB8rNycbHCkXPws0ASAcEys3JxscKRdILgEWA/5qLVUoISs3JxscKRdBCzooISs3JxscKRdBCzQMKCggIB8ZHRsixAwoKCAgHxkdGyLHCQQpKB8gHhkdG00CAvqADAEkDCgoICAfGR0bIsgMKCggIB8ZHRsiAAEAAP8aA1IA5gALAAA1MxUhNTMRIzUhFSMZAyAZGfzgGeZ9ff40fX0AAAAAA//w/wYCJgD6AAcADwATAAA2IiY0NjIWFAAiJjQ2MhYUBQEzAVAyIyMyIwGIMiMjMiP90gG4fv5HSyMyIyMy/s8jMiMjMloB9P4MAAT/4f8GAwcA+gAHAA8AEwAXAAA2IiY0NjIWFAAiJjQ2MhYUBQEzATMBMwFBMiMjMiMCdzIjIzIj/OMBuHv+R3kBuHv+R0sjMiMjMv7PIzIjIzJaAfT+DAH0/gwAAv+0/4gBfAEYABkASAAANxYzMjY3PgU1NCYnJiMiBgcGFRQeARciJwczMhQrASI0OwETPgI1NC4CIyIOAwcGJjc2NzYzMhYXPgEzMhYVFAbFAwQSMg4CAwMDAQEHCAMDEzQLDwQHCBYZLTQLC+ELC0toAQMCAQIFAwgMDwsZCgUbBTEPGCQjJAcdJiMeLWsoATUkBQsMDAwMBhAXAwEzHCYlDBQNKiB6Hh4BHQIIDgYDBQUCBxQSLBAIDwlYEBkTGh4PNDBHbQAB/9v/9gG+ARgAVwAANwYHBisBIj8BNiYjIgYHBiY3PgMzMhc2MzIXPgEzMh4DFRQPAQYVFDMyNz4FNzYWBw4CIyImNTQ2PwI0IyIPAQYHJwYmPwE2NTQmIyIHUAcIBAQ1DQ1CBAYIDRYkBRUEFBAiHxI3CyQkLQkLKRMKEg8LBwUvBAgCAwULBwwDDQEGFQYSFy0fFRkCAzQBFRsIQQgPJg0IBEMBDAkbCBURAwEapw0PGjkIDAklGjASKCgoEBgGCw8TCg0NfQsJDgIDCQYPBRIBCQ0LHx8aFRQGDQeIBg4UqxYBAQEPCKsDAwYIFAAB/37/YAFeAbgASAAAByImNTQ2MzIWFRQHBhUUMzI+BzcjIiY1ND4DOwE+ATMyFhUUBiMiJjU0NzY0IyIOBwczMhYUBisBDgEyIDAXExIXEgoZCxAPCw0KDg0UCjUJCgEDBAYDQRRpNCAwFxMSFxIKGQcMCgcIBQYDBgE2CQoKCT8hdqAmIBoiFA8OCwcNDgYREyUkPDdVJwwJAwUFBAJLXyYgGiIUDw4LBhwFCwoUDRoNHgYMEAzFwQAAAAEAAAAAANoBGAA0AAAzIiY1NDYzMhYVFAcWMzI2NTQuAicmNTQ2MzIWFRQGIyIuATU0NyYjIgYVFB4CFx4BFRRQHjISDA4XDAYYFiEJCxgGPDctIjYWEAgQCwUQDg8ZERIeBRsXKxsQFg0LGAwSFhILDwcNBCYqIy0kGBAYCQ8KCAgUEQ0JEwwRAxIfFVoAAAH/5P//AOcBEAA/AAAnBi4BPwEuASMqASMiDgEHBicmNz4BNxYzMj4BMzIXFhQPAQ4BFRQeARcWNicuATU0NjMyFRQHBgciJiMuASMiCgYLAQWwCBcRBQwHBREUBQ8EAwgMCwEwIhkgEQcFCAsHngEBECwXCAwDAyQUDCYkERIDBQIXNAkSAwQIDQbBBAMbIQQNCwkSHjACAwMEAQERB6cDAwIFAQkLBA8JCAgUCxM3KhUJAQEDDQAF/7T/iAVLARgAGwA1ANkA8AELAAAlFjMyPgE3PgY1NCYnJiMiBgcOAhUUBRYzMjY3PgU1NCYnJiMiBgcGFRQeARciJwczMhQrASI0OwETPgI1NC4CIyIOAwcGJjc2NzYzMhYXPgEzMhc+ATMyFhc+ATMyFz4BMzIWFz4BMzIXPgEzMhYXPgEzMhYVFAYjIicHMzIUKwEiNDsBEz4CNTQmIyIGBxUUBiMiJwczMhQrASI0OwETPgI1NCYjIgYHFRQGIyInBzMyFCsBIjQ7ARM0PgM0NTQmIyIGBxUUBiUWMzI2Nz4ENTQmJyYjIgYHBhUUBRYzMjY3PgY1NCYnJiMiDgEHBhUUFgIKAwQMHx4JAgMCAgIBAQcIAwMTNAsFBwP+ywMEEjIOAgMDAwEBBwgDAxM0Cw8EBwgWGS00CwvhCwtLaAEDAgECBQMIDA8LGQoFGwUxDxgkIyQHHSYjLxMSIhsjJAcdJiMvExIiGyMkBx0mIy8TEiIbIyQHHSYjHi1rSRYZLTQLC+ELC0toAQMCBQYOFBRrSRYZLTQLC+ELC0toAQMCBQYOFBRrSRYZLTQLC+ELC0toAQIBAgUGDhQUawODAwQSMg4CBAMDAQcIAwMTNAsP/ssDBBIyDgIDAgICAQEHCAMDDCEeBw8JKAEYKhcECgkLCgoLBRAXAwEzHA0bGAsoBwE1JAULDAwMDAYQFwMBMxwmJQwUDSogeh4eAR0CCA4GAwUFAgcUEiwQCA8JWBAZExoeDzIcFhMaHg8yHBYTGh4PMhwWExoeDzQwR20geh4eAR0CCA4GBwgYIwFHbSB6Hh4BHQIIDgYHCBgjAUdtIHoeHgEdAQMFBQYHAwcIGCMBR20oATUkBg0PDg8HEBcDATMcJiUoBwE1JAQKCQsKCgsFEBcDARglEiYlEhoAAAT/tP+IBAYBGAB9AJgAtADOAAAhIicHMzIUKwEiNDsBEz4CNTQmIyIGBxUUBiMiJwczMhQrASI0OwETND4DNDU0JiMiBgcVFAYjIicHMzIUKwEiNDsBEz4CNTQuAiMiDgMHBiY3Njc2MzIWFz4BMzIXPgEzMhYXPgEzMhc+ATMyFhc+ATMyFhUUBicWMzI2Nz4GNTQmJyYjIg4BBwYVFBYFFjMyPgE3PgY1NCYnJiMiBgcOAhUUBRYzMjY3PgU1NCYnJiMiBgcGFRQeAQNSFhktNAsL4QsLS2gBAwIFBg4UFGtJFhktNAsL4QsLS2gBAgECBQYOFBRrSRYZLTQLC+ELC0toAQMCAQIFAwgMDwsZCgUbBTEPGCQjJAcdJiMvExIiGyMkBx0mIy8TEiIbIyQHHSYjHi1rTAMEEjIOAgMCAgIBAQcIAwMMIR4HDwn+wgMEDB8eCQIDAgICAQEHCAMDEzQLBQcD/ssDBBIyDgIDAwMBAQcIAwMTNAsPBAcgeh4eAR0CCA4GBwgYIwFHbSB6Hh4BHQEDBQUGBwMHCBgjAUdtIHoeHgEdAggOBgMFBQIHFBIsEAgPCVgQGRMaHg8yHBYTGh4PMhwWExoeDzQwR20oATUkBAoJCwoKCwUQFwMBGCUSJiUSGgMBGCoXBAoJCwoKCwUQFwMBMxwNGxgLKAcBNSQFCwwMDAwGEBcDATMcJiUMFA0AA/+0/4gCwQEYAFcAcQCNAAAzIicHMzIUKwEiNDsBEz4CNTQuAiMiDgMHBiY3Njc2MzIWFz4BMzIXPgEzMhYXPgEzMhYVFAYjIicHMzIUKwEiNDsBEzQ+AzQ1NCYjIgYHFRQGJxYzMjY3PgU1NCYnJiMiBgcGFRQeAQUWMzI+ATc+BjU0JicmIyIGBw4CFRTIFhktNAsL4QsLS2gBAwIBAgUDCAwPCxkKBRsFMQ8YJCMkBx0mIy8TEiIbIyQHHSYjHi1rSRYZLTQLC+ELC0toAQIBAgUGDhQUa0wDBBIyDgIDAwMBAQcIAwMTNAsPBAcBSgMEDB8eCQIDAgICAQEHCAMDEzQLBQcDIHoeHgEdAggOBgMFBQIHFBIsEAgPCVgQGRMaHg8yHBYTGh4PNDBHbSB6Hh4BHQEDBQUGBwMHCBgjAUdtKAE1JAULDAwMDAYQFwMBMxwmJQwUDQIBGCoXBAoJCwoKCwUQFwMBMxwNGxgLKAAAAv/b/4gDKwEYAHoAjwAAJTY3NjMyFhc+ATMyFhUUBiMiJwczMhQrASI0OwETPgM1NCYjIg4DBw4BIyImNTQ2PwI0IyIPAQYHJwYmPwE2NTQmIyIPAQYHBisBIj8BNiYjIgYHBiY3PgMzMhc2MzIXPgEzMh4DFRQPAQYVFDMyNz4BFxYzMjY3PgE1NCYnJiMiBgcGFRQWAa0xFBgiIyQHHSYjHi1rSRYZLTQLC+ELC0toAQEDAQUGBw8SDhgIGjwtFRkCAzQBFRsIQQgPJg0IBEMBDAkbCEQHCAQENQ0NQgQGCA0WJAUVBBQQIh8SNwskJC0JCykTChIPCwcFLwQIAgMPJdEDBBIyDgYHBwgDAxM0Cw8Jd2wYHRMaHg80MEdtIHoeHgEdAgUJCQUHCA0fGzUQNjgVFAYNB4gGDhSrFgEBAQ8IqwMDBggUrBEDARqnDQ8aOQgMCSUaMBIoKCgQGAYLDxMKDQ19CwkOAgg1OQE1JA8mERAXAwEzHCYlEhoAAv/b/2ADGQG4AFcAnwAANwYHBisBIj8BNiYjIgYHBiY3PgMzMhc2MzIXPgEzMh4DFRQPAQYVFDMyNz4FNzYWBw4CIyImNTQ2PwI0IyIPAQYHJwYmPwE2NTQmIyIHEyImNTQ2MzIWFRQHBhUUMzI+BzcjIiY1NDY7AT4BMzIWFRQGIyImNTQ3NjQjIg4HBzMyFhUUDgErAQ4BUAcIBAQ1DQ1CBAYIDRYkBRUEFBAiHxI3CyQkLQkLKRMKEg8LBwUvBAgCAwULBwwDDQEGFQYSFy0fFRkCAzQBFRsIQQgPJg0IBEMBDAkbCPUgMBcTEhcSChkLEA8LDQoODRQKNQkKCQhBFGk0IDAXExIXEgoZBwwKBwgFBgMGATYJCwUJBj8hdhURAwEapw0PGjkIDAklGjASKCgoEBgGCw8TCg0NfQsJDgIDCQYPBRIBCQ0LHx8aFRQGDQeIBg4UqxYBAQEPCKsDAwYIFP6fJiAaIhQPDgsHDQ4GERMlJDw3VScMCQgLS18mIBoiFA8OCwYcBQsKFA0aDR4GDAgFCQbFwQAAAAAB/37/YAJpAbgAewAAJSMOASMiJjU0NjMyFhUUBwYVFDMyPgc3IyImNTQ+AzsBPgEzMhYVFAYjIiY1NDc2NCMiBwYHFz4BMzIWFRQGIyImNTQ3NjQjIg4HBzMyFhQGKwEOASMiJjU0NjMyFhUUBwYVFDMyPgcBX5shdl8gMBcTEhcSChkLEA8LDQoODRQKNQkKAQMEBgNBFGk0IDAXExIXEgoZJhcDAZsUaTQgMBcTEhcSChkHDAoHCAUGAwYBNgkLCwk/IXZfIDAXExIXEgoZCxAPCw0KDw0U5sXBJiAaIhQPDgsHDQ4GERMlJDw3VScMCQMFBQQCS18mIBoiFA8OCwYccwwGAUtfJiAaIhQPDgsGHAULChQNGg0eBgwQDMXBJiAaIhQPDgsHDQ4GERMlJDw3VQAAAAAB/37/YAN0AbgAswAAEzM+ATMyFhUUBiMiJjU0NzY0IyIHBgcXPgEzMhYVFAYjIiY1NDc2NCMiDgcHMzIWFRQOASsBDgEjIiY1NDYzMhYVFAcGFRQzMj4HNyMOASMiJjU0NjMyFhUUBwYVFDMyPgc3Iw4BIyImNTQ2MzIWFRQHBhUUMzI+BzcjIiY1ND4DOwE+ATMyFhUUBiMiJjU0NzY0IyIOAgcGzJwUaTQgMBcTEhcSChkmFwMBmxRpNCAwFxMSFxIKGQcMCgcIBQYDBgE2CQoECQY/IXZfIDAXExIXEgoZCxAPCw0KDw0UCpshdl8gMBcTEhcSChkLEA8LDQoODRUKmyF2XyAwFxMSFxIKGQsQDwsNCg4NFAo1CQoBAwQGA0EUaTQgMBcTEhcSChkOFQ4IBgIBDktfJiAaIhQPDgsGHHMMBgFLXyYgGiIUDw4LBhwFCwoUDRoNHgYMCAUJBsXBJiAaIhQPDgsHDQ4GERMlJDw3VSfFwSYgGiIUDw4LBw0OBhETJSQ7OFUnxcEmIBoiFA8OCwcNDgYREyUkPDdVJwwJAwUFBAJLXyYgGiIUDw4LBhwTJyIbCgAB/37/YASAAbgA5wAAARc+ATMyFhUUBiMiJjU0NzY0IyIHBgcXPgEzMhYVFAYjIiY1NDc2NCMiDgcHMzIWFAYrAQ4BIyImNTQ2MzIWFRQHBhUUMzI+BzcjDgEjIiY1NDYzMhYVFAcGFRQzMj4HNyMOASMiJjU0NjMyFhUUBwYVFDMyPgc3Iw4BIyImNTQ2MzIWFRQHBhUUMzI+BzcjIiY1ND4DOwE+ATMyFhUUBiMiJjU0NzY0IyIHBgcXPgEzMhYVFAYjIiY1NDc2NCMiDgcB2JwUaTQgMBcTEhcSChkmFwMBmxRpNCAwFxMSFxIKGQcMCgcIBQYDBgE2CQoKCT8hdl8gMBcTEhcSChkLEA8LDQoPDRQKmyF2XyAwFxMSFxIKGQsQDwsNCg4NFAqbIXZfIDAXExIXEgoZCxAPCw0KDw0UCpshdl8gMBcTEhcSChkLEA8LDQoODRQKNQkKAQMEBgNBFGk0IDAXExIXEgoZJhcDAZsUaTQgMBcTEhcSChkHDAoHCAUGAwYBDwFLXyYgGiIUDw4LBhxzDAYBS18mIBoiFA8OCwYcBQsKFA0aDR4GDBAMxcEmIBoiFA8OCwcNDgYREyUkPDdVJ8XBJiAaIhQPDgsHDQ4GERMlIzw3VifFwSYgGiIUDw4LBw0OBhETJSQ8N1UnxcEmIBoiFA8OCwcNDgYREyUkPDdVJwwJAwUFBAJLXyYgGiIUDw4LBhxzDAYBS18mIBoiFA8OCwYcBQoLEw4ZDh0AAwAA/2AC3wG4ADcAewDFAAAzIiY1NDYzMhYVFAcWMzI2NTQuAycuAjU0NjMyFhUUBiMiLgE1NDcmIyIGFRQeAhceARUUJQYuAT8BLgIjIgYjIg4BBwYnJjc+ATceATMyNjMyFhcWFA8BDgEVFB4BFxY+AScuATU0NjMyFRQHBiMiIy4CIyIGBSImNTQ2MzIWFRQHDgEeARUUFjI+BzcjIi4BNTQ2OwE+ATMyFhUUBiMiJjU0NzY0IyIOBwczMhYUBisBDgFQHjISDA4XDAYYFiEDDAUXAxQYFDctIjYWEAgQCwUQDg8ZERIeBRsXASYGCwEFrgQJCgcGHAYFEBIFEAUDBwsMARglDiAoBwQLBwsHmgICGioNBQkFAgMkFAwmJhITAwMSIxgIChL+vSAwFxMSFxIEAQECBhYQDwsNCg4NFAo1BgkECQhBFGk0IDAXExIXEgoZBwwKBwgFBgMGATYJCgoJPyF2KxsQFg0LGAwSFhIJDA0EDgINEh4PIy0kGBAYCQ8KCAgUEQ0JEwwRAxIfFVoDBAgNBr8CAgEBGB8EDQsIEx4uBAIBCAEBAREHowMFAgcDBwsDBA0GCAgUCxM3KxQJAQgGB6smIBoiFA8OCwIFBAYDCAYGERMlJDw3VScGCQYIC0tfJiAaIhQPDgsGHAULChQNGg0eBgwQDMXBAAAAAgAF//sB/AGaAAkALAAAAQ8BBhUUMzI2NwcOASMiJjU0PwEjNTM/AQc3MhU2MzIWFRQGIiY1NDcGDwEjATZ/OQIUGEQSDCkyHyIiAzdpcxZZJpgZIDUYHRggFgk3EEJIAQkHuAgDFRcPKBkUJBoLC7MgSi54Ci0pHBUSGxEOEhMPJ9gAAQAA//0BtQDUAC8AACUyNTQnBiImNT4BMzIWFRQHBiMiLwEmIyIVFBc2MzIWFRQGByInJjU0NzYzFh8BFgFwLRoQHBQBFwkkLSkXHiYeohoRLhkQDw0VFA0dGBwoFiIqF6IcMTkgExAWDQ4WMzUzJBUVehI6IBIQFw4PEgIaIi0zJBMCEHoTAAEAAP/NAbUBAwA2AAAXIiY1NDc2MxYfATUzFRcWMzI2NTQnBiMiNT4BMzIWFRQHBiMiLwEVIzUnJiMiBhUUFzYzMhUUTSAtKBYgKBcuHlwiDxUcFhQSHAEPCSAtKRccJB4uHlwgDxYcFRQTHANDJjMkEwIQJGmARxcpHCcQDBsPFUImMyQVFSRsg0cWKB4nDwwdIAABAA0AAAJFAOAACwAANyc3FzcXNxcHJwcnIhWOZXhqTRaSaXRpLhmZfHx8VBehfHx8AAAAAQAN/8sCRQERABMAACUHJwcnNxc3NTMXNxc3FwcnBxUjARZAaUsVjmUWGwFGak8UkmkZG0ZGfE4ZmXwXlntKfFUYoXwblgAAAQAAAAABGAEYAAsAADM1IzUzNTMVMxUjFXt7eyJ7e3sie3siewAAAAEAAAAAATYBcgAKAAAxNT4ENzMUBiQxTDQ0Dx7APAcPKz1vSY7aAAAB//8AAAEtAKAAHQAANz4CMzIeARcWMzI3NhYHDgIjIi4BJyYjIgcGJgEJECkcGCYmDwkKHhgEDgIIESkcGCQlEgcIHR0FDUYZISAhMQoGJAYHBxkiHyExCgQjBggAAAABAAAAAAEsASwABwAAMREhESM1IxUBLCPmASz+1LS0AAEAAAAAAPoBwgAGAAAzAzMbATMDaWkoVVUoaQHC/pgBaP4+AAIAAAAAAMgAyAAHAA8AADYyNjQmIgYUFiImNDYyFhRFPiwsPix0Ujs7UjsZLD4sLD5FO1I7O1IAAf84AAAAyADIAAsAACM0NjIWFSM0JiIGFch2pHYeYJRgUnZ2UkpgYEoAAAACAAAAAAC0ASwABwAVAAA2MjY0JiIGFBc1LgE1NDYyFhUUBgcVSx4bGx4bGB0rN0Y3Kx14NTY1NTatZAg1Jyg8PCgnNQhkAAACAAAAAADIASwADwAfAAA3LgE1NDYyFhUUBgcdASM1Nz4BNTQmIgYVFBYXPQEzFVQkMDtSOzAkICAZIiw+LCIZIGYFOCUpOzspJTgFAWVlGQYqGh8sLB8aKgYBSUkAAAAEAAD//AP0An8AhwCRAJ0ApwAANz4BNTQuAScuATU0PgI/Ag4BFRQzMjcXDgEjIiY1ND4CMzIWFRQGIyImJzceATMyNTQuAicHBhUUHgIVFAYPAR4CMzoBMzI3JjU0NzYzMhYVFAcGBx4BMzI2NTQ2Ny4CPQEeARUUBiMiJwYjIi4BJw4BIiYnJiMiDgEHBiMiNTQ2BSImNDYzMhYUBiU+ATU0JyYjIgYVFAU2NTQmJw4BFRSYNkUBAgIDUgMEBQECPWJqIB4dGhUpJR4tHz5wSH1yMi4cNhIYERQUMwwcQC0bCR0iHR8QEA4pHwwDCAIQIyEcIkwbIwodPBMgGxYxQ10ggV66tFFCQSMkPCEzFg4sKCAbHBoSChQZBlohCjADXAsTEwsMEhH+DzMkBAUVHC4BPFoXEj8wWhg/IAQHBwQIdCIFDg4MBASlBGMsIzwNQi8mGiFHRCxRNzA1MCsOHhEyChoiGgJCJBseNiEsFSZPFBQKKRoeNSg1JS4rICETOTAXEioZUl8ZLFk0BgE8sWtGXzk6FRQSJhkWIC0LFQQ6Bw04TxIYEhIYEoAvLxsHDhI5Kx50BYEiSRUdWEQ/AAAAAAIADAAKAdMBzwAKAI8AACU0JiMiBhQWMzI2Jw4BIyImNDYzMhYXNjU0JyYjIiY0NjMyFx4BFxYzMjU0Jy4BNTQ2MzIWFRQGBxQzMjc+ATc2MzIWFRQGIyIGBwYVFDMyNjMyFhQGIyImIyIGFRQXHgEXFhUUBiMiJy4BJyYjIhUUFhUUBiMiJjQ2NTQjIgcOAQcGIyImNTQ3NjMyNzY1NAEWGA8QFRYPEBeJGSYOGRsaGQ0qGCUMFBgdHBkXEhALAxQLEhQBAiceFBIbIwEWEA0RAQ0MGhMeGxIbFQ0QIRsrDhwbHRkPJxQXEgsUOA0OGRcTFAwBExEKEiogExIdJhcNDhIDERIMFBoNDBYjEg3uEBQTIhYVCgElGSobJQIDFg4KExwoHQwLPhYNGA0IFycPFxobFhEjGSoQEzgPDhsUESMGCw4PFicdKBomCAoWChIDCw0ZExsOCzkVDx8eMBMUGBokMRckDhI9DAcWFBgODRINDBoAAAADAAD/BgH0APoABwAPABcAADYUFjI2NCYiAjQ2MhYUBiI2IiY0NjIWFC14qnh4qqWS0JKS0IEyIyMyI1WqeHiqeP7L0JKS0JK+IzIjIzIAAAIAAP8GAfQA+gAHAA8AADYUFjI2NCYiAjQ2MhYUBiIteKp4eKqlktCSktBVqnh4qnj+y9CSktCSAAAAAAMAAP6iAfQBXgARABcAHQAAEzMVHgEVFAYHFSM1LgE1NDY3GQEOARQWFz4BNCYn5C1gg4NgLWCEg2FNamp6TWlpTQFeZAqOYmGPCmRlCI9iY44I/jsBmAh1nnUICXSedAkAAAACAAD/BgHSAPoAIQApAAAlFhUUBwYjIicmIyIGFBYzMjc2MzIXFhUUBwYjIiY0NjMyAiImNDYyFhQBzwILBQYNCjN3VXh4VXgyBhIHAwwDQJVokpJolHsyIyMyI4IGBA8GAw5feKp4Xw0CBwwGBniS0JL+yiMyIyMyAAAAAQAA/wYB0gD6ACEAACUWFRQHBiMiJyYjIgYUFjMyNzYzMhcWFRQHBiMiJjQ2MzIBzwILBQYNCjN3VXh4VXgyBhIHAwwDQJVokpJolIIGBA8GAw5feKp4Xw0CBwwGBniS0JIAAAIAAP6iAdIBXgAkACoAACUWFxYVFAcGIyInJicRNjc2MzIXFhUUBwYHFSM1LgE1NDY3NTMDEQ4BFBYBEYQ6AgsFBg0KLWZlLgYSBwMMAzyCLWCEg2EtLU5pafkKbQYEDwYDDlQK/mgHVw0CBwwGBnAHZWUIj2Jjjghl/dYBmAh1nnUAAAEAAP/EAHgAPAAHAAAWIiY0NjIWFFUyIyMyIzwjMiMjMgAAAAEAAP6iAC0BXgADAAATESMRLS0BXv1EArwAAAACAAD95AIdANwAAwAPAAA3FSE1JTMVITUzEyMDIRUjHgHg/gIeAeAeAR4B/iAeRoyMljIy/QgBcjIAAAABAAAAAAJWAXIACwAANTcXNxc3FwEnBycHiVRWUq8i/vxUVlM1Qblzc3HpFv6kdHRwRwAAAf/qAL0BEAE3ABkAABE+ATMyFjI3NjMyFRQHDgEjIiYiBwYjIjU0GCEcFFUoFAMHDBYYIRwUVSgUBAcLAQ4YET0UAwkMFhgRPRQECgwAAAAAAA4ArgABAAAAAAAAAH4A/gABAAAAAAABAAcBjQABAAAAAAACAAcBpQABAAAAAAADACQB9wABAAAAAAAEAAcCLAABAAAAAAAFAAkCSAABAAAAAAAGAAcCYgADAAEECQAAAPwAAAADAAEECQABAA4BfQADAAEECQACAA4BlQADAAEECQADAEgBrQADAAEECQAEAA4CHAADAAEECQAFABICNAADAAEECQAGAA4CUgBDAG8AcAB5AHIAaQBnAGgAdAAgAFwAMgA1ADEAIAAyADAAMQA4ACAASgBlAGEAbgAtAEYAcgBhAG4AYwBvAGkAcwAgAE0AbwBpAG4AZQAuACAAVABoAGkAcwAgAGYAbwBuAHQAIABpAHMAIABsAGkAYwBlAG4AcwBlAGQAIAB1AG4AZABlAHIAIAB0AGgAZQAgAFMASQBMACAATwBwAGUAbgAgAEYAbwBuAHQAIABMAGkAYwBlAG4AcwBlACAAXAAoAGgAdAB0AHAAOgAvAC8AcwBjAHIAaQBwAHQAcwAuAHMAaQBsAC4AbwByAGcALwBPAEYATABcACkALgAAQ29weXJpZ2h0IFwyNTEgMjAxOCBKZWFuLUZyYW5jb2lzIE1vaW5lLiBUaGlzIGZvbnQgaXMgbGljZW5zZWQgdW5kZXIgdGhlIFNJTCBPcGVuIEZvbnQgTGljZW5zZSBcKGh0dHA6Ly9zY3JpcHRzLnNpbC5vcmcvT0ZMXCkuAABhAGIAYwAyAHMAdgBnAABhYmMyc3ZnAABSAGUAZwB1AGwAYQByAABSZWd1bGFyAABGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGEAYgBjADIAcwB2AGcAIAA6ACAAMQA4AC0AMQAxAC0AMgAwADEAOAAARm9udEZvcmdlIDIuMCA6IGFiYzJzdmcgOiAxOC0xMS0yMDE4AABhAGIAYwAyAHMAdgBnAABhYmMyc3ZnAABWAGUAcgBzAGkAbwBuACAAIAAAVmVyc2lvbiAgAABhAGIAYwAyAHMAdgBnAABhYmMyc3ZnAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHkAAAABAAIBAgADAQMBBAEFAQYBBwEIAQkBCgELAQwBDQEOAQ8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4BHwEgASEBIgEjASQBJQEmAScBKAEpASoBKwEsAS0BLgEvATABMQEyATMBNAE1ATYBNwE4ATkBOgE7ATwBPQE+AT8BQAFBAUIBQwFEAUUBRgFHAUgBSQFKAUsBTAFNAU4BTwFQAVEBUgFTAVQBVQFWAVcBWAFZAVoBWwFcAV0BXgFfAWABYQFiAWMBZAFlAWYBZwFoAWkBagFrAWwBbQFuAW8BcAFxAXIBcwF0AXUBdgYubm9kZWYHdW5pRTAwMAd1bmlFMDIyB3VuaUUwMjMHdW5pRTAyNAd1bmlFMDMwB3VuaUUwMzgHdW5pRTAzOQd1bmlFMDQzB3VuaUUwNDUHdW5pRTA0Ngd1bmlFMDQ3B3VuaUUwNDgHdW5pRTA1MAd1bmlFMDVDB3VuaUUwNjIHdW5pRTA2OQd1bmlFMDdBB3VuaUUwN0IHdW5pRTA3Qwd1bmlFMDdEB3VuaUUwODAHdW5pRTA4MQd1bmlFMDgyB3VuaUUwODMHdW5pRTA4NAd1bmlFMDg1B3VuaUUwODYHdW5pRTA4Nwd1bmlFMDg4B3VuaUUwODkHdW5pRTA4QQd1bmlFMDhCB3VuaUUwOEMHdW5pRTA5NAd1bmlFMDk1B3VuaUUwQTAHdW5pRTBBMQd1bmlFMEEyB3VuaUUwQTMHdW5pRTBBNAd1bmlFMEE5B3VuaUUwQjMHdW5pRTEwMQd1bmlFMUI5B3VuaUUxQkIHdW5pRTFFNwd1bmlFMjYwB3VuaUUyNjEHdW5pRTI2Mgd1bmlFMjYzB3VuaUUyNjQHdW5pRTI4MAd1bmlFMjgxB3VuaUUyODIHdW5pRTI4Mwd1bmlFNEEwB3VuaUU0QTIHdW5pRTRBNAd1bmlFNEE4B3VuaUU0QUMHdW5pRTRDMAd1bmlFNENFB3VuaUU0RTEHdW5pRTRFMgd1bmlFNEUzB3VuaUU0RTQHdW5pRTRFNQd1bmlFNEU2B3VuaUU0RTcHdW5pRTRFOAd1bmlFNEU5B3VuaUU0RUEHdW5pRTRFRQd1bmlFNTAwB3VuaUU1MDEHdW5pRTUyMAd1bmlFNTIxB3VuaUU1MjIHdW5pRTUyNAd1bmlFNTI1B3VuaUU1MjkHdW5pRTUyQQd1bmlFNTJCB3VuaUU1MkMHdW5pRTUyRAd1bmlFNTJGB3VuaUU1MzAHdW5pRTUzMQd1bmlFNTM5B3VuaUU1NjYHdW5pRTU2Nwd1bmlFNTY5B3VuaUU1NkMHdW5pRTU2RAd1bmlFNTgyB3VuaUU1RDAHdW5pRTVFMgd1bmlFNjEwB3VuaUU2MTIHdW5pRTYxNAd1bmlFNjE4B3VuaUU2MjQHdW5pRTYzMAd1bmlFNjUwB3VuaUU2NTUHdW5pRTkxMAd1bmlFOTExB3VuaUU5MTIHdW5pRTkxNAd1bmlFOTE1B3VuaUU5MTgHdW5pRTkyMAd1bmlFOTI1B3VuaUU5NUQHdW5pRUEwMgd1bmlFQUE0AAAAAAH//wACAAEAAAAAAAAADAAUAAQAAAACAAAAAQAAAAEAAAAAAAEAAAAA1+feHQAAAADRlyIXAAAAANgWv3Y=")',defined_font={},font_tb={},fid=1,font_scale_tb={serif:1.05,serifBold:1.05,"sans-serif":1.1,"sans-serifBold":1.1,Palatino:1.1,Mono:1.35},fmt_lock={},cfmt={aligncomposer:1,breaklimit:.7,breakoneoln:!0,cancelkey:!0,composerspace:6,dblrepbar:":][:",decoerr:!0,dynalign:!0,fullsvg:"",gracespace:new Float32Array([4,8,11]),graceslurs:!0,hyphencont:!0,indent:0,infoname:'R "Rhythm: "\nB "Book: "\nS "Source: "\nD "Discography: "\nN "Notes: "\nZ "Transcription: "\nH "History: "',infospace:0,keywarn:!0,leftmargin:1.4*CM,lineskipfac:1.1,linewarn:!0,maxshrink:.65,maxstaffsep:2e3,maxsysstaffsep:2e3,measurefirst:1,measurenb:-1,musicspace:6,parskipfac:.4,partsspace:8,pagewidth:21*CM,printmargin:0,rightmargin:1.4*CM,rbdbstop:!0,rbmax:4,rbmin:2,scale:1,slurheight:1,staffsep:46,stemheight:21,stretchlast:.25,stretchstaff:!0,subtitlespace:3,sysstaffsep:34,textspace:14,titlespace:6,titletrim:!0,topspace:22,tuplets:[0,0,0,0],vocalspace:10,writefields:"CMOPQsTWw",wordsspace:5},textopt={align:"j",center:"c",fill:"f",justify:"j",ragged:"f",right:"r",skip:"s"},posval={above:C.SL_ABOVE,auto:0,below:C.SL_BELOW,down:C.SL_BELOW,hidden:C.SL_HIDDEN,opposite:C.SL_HIDDEN,under:C.SL_BELOW,up:C.SL_ABOVE};Abc.prototype.style_font=style_font;var abc_utf={"=D":"Đ","=H":"Ħ","=T":"Ŧ","=d":"đ","=h":"ħ","=t":"ŧ","/O":"Ø","/o":"ø","/L":"Ł","/l":"ł",vL:"Ľ",vl:"ľ",vd:"ď",".i":"ı",AA:"Å",aa:"å",AE:"Æ",ae:"æ",DH:"Ð",dh:"ð",OE:"Œ",oe:"œ",ss:"ß",TH:"Þ",th:"þ"},oct_acc={1:"♯",2:"♭",3:"♮",4:"x",5:"bb"},include=0;Abc.prototype.tosvg=tosvg;var gene,staff_tb,nstaff,tsnext,realwidth,insert_meter,spf_last,space_tb=new Float32Array([7,10,14.15,20,28.3,40,56.6,80,100,120]),smallest_duration,dx_tb=new Float32Array([10,10,11,13,13]),hw_tb=new Float32Array([4.5,5,6,7,8]),w_note=new Float32Array([3.5,3.7,5,6,7]),delta_tb={t:-4,c:0,b:4,p:-6},rest_sp=[[18,18],[12,18],[12,12],[0,12],[6,8],[10,10],[6,4],[10,0],[10,4],[10,10]],delpit=[0,-7,-14,0],MAXPIT=96,blocks=[],a_gch,a_dcn,multicol,maps={},qplet_tb=new Int8Array([0,1,3,2,3,0,2,0,3,0]),ntb="CDEFGABcdefgab",note_pit=new Int8Array([0,2,4,5,7,9,11]),reg_dur=/(\d*)(\/*)(\d*)/g,cde2fcg=new Int8Array([0,2,4,-1,1,3,5]),cgd2cde=new Int8Array([0,4,1,5,2,6,3]),acc2=new Int8Array([-2,-1,3,1,2]),nil=["0"],char_tb=[nil,nil,nil,nil,nil,nil,nil,nil,nil," ","\n",nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil," ","!",'"',"i","\n",nil,"&",nil,"(",")","i",nil,nil,"-","!dot!",nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,"|","i","<","n","<","i","i","n","n","n","n","n","n","n","!fermata!","d","d","d","!emphasis!","!lowermordent!","d","!coda!","!uppermordent!","d","d","!segno!","!trill!","d","d","d","n","d","n","[","\\","|","n","n","i","n","n","n","n","n","n","n","d","d","d","d","d","d","d","d","d","d","d","d","d","!upbow!","!downbow!","d","n","n","n","{","|","}","!gmark!",nil],cw_tb=new Float32Array([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,.25,.333,.408,.5,.5,.833,.778,.333,.333,.333,.5,.564,.25,.564,.25,.278,.5,.5,.5,.5,.5,.5,.5,.5,.5,.5,.278,.278,.564,.564,.564,.444,.921,.722,.667,.667,.722,.611,.556,.722,.722,.333,.389,.722,.611,.889,.722,.722,.556,.722,.667,.556,.611,.722,.722,.944,.722,.722,.611,.333,.278,.333,.469,.5,.333,.444,.5,.444,.5,.444,.333,.5,.5,.278,.278,.5,.278,.778,.5,.5,.5,.5,.333,.389,.278,.5,.5,.722,.5,.5,.444,.48,.2,.48,.541,.5]),info_font_init={A:"info",C:"composer",O:"composer",P:"parts",Q:"tempo",R:"info",T:"title",X:"title"},output="",style="\n.fill {fill: currentColor}\n.stroke {stroke: currentColor; fill: none}\n.music text, .music tspan {fill:currentColor}",font_style="",posx=cfmt.leftmargin/cfmt.scale,posy=0,img={width:cfmt.pagewidth,lm:cfmt.leftmargin,rm:cfmt.rightmargin},defined_glyph={},defs="",fulldefs="",stv_g={scale:1,dy:0,st:-1,v:0,g:0},block={},tgls={brace:{x:0,y:0,c:""},hl:{x:-4,y:0,c:""},hl1:{x:-6,y:0,c:""},hl2:{x:-6,y:0,c:""},ghl:{x:-4,y:0,c:""},lphr:{x:0,y:24,c:""},mphr:{x:0,y:24,c:""},sphr:{x:0,y:27,c:""},rdots:{x:-1,y:0,c:""},dsgn:{x:-4,y:-4,c:""},dcap:{x:-4,y:-4,c:""},sgno:{x:-6,y:0,c:""},coda:{x:-12,y:-6,c:""},tclef:{x:-8,y:0,c:""},cclef:{x:-8,y:0,c:""},bclef:{x:-8,y:0,c:""},pclef:{x:-6,y:0,c:""},spclef:{x:-6,y:0,c:""},stclef:{x:-8,y:0,c:""},scclef:{x:-8,y:0,c:""},sbclef:{x:-7,y:0,c:""},oct:{x:0,y:2,c:""},HDD:{x:-7,y:0,c:""},breve:{x:-6,y:0,c:""},HD:{x:-5.2,y:0,c:""},Hd:{x:-3.8,y:0,c:""},hd:{x:-3.7,y:0,c:""},ghd:{x:2,y:0,c:"",sc:.66},pshhd:{x:-3.7,y:0,c:""},pfthd:{x:-3.7,y:0,c:""},x:{x:-3.7,y:0,c:""},"circle-x":{x:-3.7,y:0,c:""},srep:{x:-5,y:0,c:""},diamond:{x:-4,y:0,c:""},triangle:{x:-4,y:0,c:""},dot:{x:-2,y:0,c:""},"acc-1":{x:-3,y:0,c:""},acc3:{x:-2,y:0,c:""},acc1:{x:-3,y:0,c:""},acc2:{x:-3,y:0,c:""},"acc-2":{x:-3,y:0,c:""},"acc-1_1_4":{x:-3,y:0,c:""},"acc-1_3_4":{x:-4,y:0,c:""},acc1_1_4:{x:-2,y:0,c:""},acc1_3_4:{x:-4,y:0,c:""},accent:{x:-3,y:0,c:""},stc:{x:-1,y:-2,c:""},emb:{x:-4,y:-2,c:""},wedge:{x:-1,y:0,c:""},marcato:{x:-3,y:0,c:""},hld:{x:-7,y:0,c:""},brth:{x:0,y:0,c:""},r00:{x:-1.5,y:0,c:""},r0:{x:-1.5,y:0,c:""},r1:{x:-3.5,y:-6,c:""},r2:{x:-3.2,y:0,c:""},r4:{x:-3,y:0,c:""},r8:{x:-3,y:0,c:""},r16:{x:-4,y:0,c:""},r32:{x:-4,y:0,c:""},r64:{x:-4,y:0,c:""},r128:{x:-4,y:0,c:""},mrest:{x:-10,y:0,c:""},mrep:{x:-6,y:0,c:""},mrep2:{x:-9,y:0,c:""},p:{x:-4,y:-6,c:""},f:{x:-4,y:-6,c:""},pppp:{x:-4,y:-6,c:""},ppp:{x:-4,y:-6,c:""},pp:{x:-4,y:-6,c:""},mp:{x:-4,y:-6,c:""},mf:{x:-4,y:-6,c:""},ff:{x:-4,y:-6,c:""},fff:{x:-4,y:-6,c:""},ffff:{x:-4,y:-6,c:""},sfz:{x:-4,y:-6,c:""},trl:{x:-4,y:-4,c:""},turn:{x:-5,y:-4,c:""},turnx:{x:-5,y:-4,c:""},umrd:{x:-7,y:-2,c:""},lmrd:{x:-7,y:-2,c:""},dplus:{x:-4,y:10,c:""},sld:{x:-8,y:12,c:""},grm:{x:-2,y:0,c:""},dnb:{x:-4,y:0,c:""},upb:{x:-3,y:0,c:""},opend:{x:-2,y:0,c:""},roll:{x:0,y:0,c:""},thumb:{x:0,y:0,c:""},snap:{x:-2,y:0,c:""},ped:{x:-10,y:0,c:""},pedoff:{x:-5,y:0,c:""},longa:{x:-6,y:0,c:""},custos:{x:-4,y:3,c:""},ltr:{x:2,y:6,c:""}},glyphs={},mgls={" ":" ",0:"",1:"",2:"",3:"",4:"",5:"",6:"",7:"",8:"",9:"",C:"","+":"","(":"",")":"",o:"",c:"",".":"","|":""},anno_type=["bar","clef","custos","","grace","key","meter","Zrest","note","part","rest","yspace","staves","Break","tempo","","block","remark"],anno_start=user.anno_start?a_start:empty_function,anno_stop=user.anno_stop?a_stop:empty_function;Abc.prototype.out_svg=function(e){output+=e},Abc.prototype.sx=sx,Abc.prototype.sy=sy,Abc.prototype.sh=function(e){return stv_g.st<0?e/stv_g.scale:e},Abc.prototype.ax=function(e){return e+posx},Abc.prototype.ay=function(e){return stv_g.st<0?posy-e:posy+(stv_g.dy-e)*stv_g.scale-stv_g.dy},Abc.prototype.ah=function(e){return stv_g.st<0?e:e*stv_g.scale},Abc.prototype.out_sxsy=out_sxsy,Abc.prototype.xypath=xypath;var deco_str_style={crdc:{dx:0,dy:5,style:"font:italic 14px serif"},dacs:{dx:0,dy:3,style:"font:16px serif",anchor:' text-anchor="middle"'},fng:{dx:0,dy:1,style:"font-family:Bookman; font-size:8px",anchor:' text-anchor="middle"'},pf:{dx:0,dy:5,style:"font:italic bold 16px serif"},"@":{dx:0,dy:5,style:"font: 12px sans-serif"}},deco_val_tb={arp:out_arp,cresc:out_cresc,dim:out_dim,ltr:out_ltr,"8va":out_8va,"8vb":out_8vb,"15ma":out_15ma,"15mb":out_15mb},deco_l_tb={glisq:out_glisq,gliss:out_gliss};Abc.prototype.blk_out=blk_out,Abc.prototype.blk_flush=blk_flush;var par_sy,cur_sy,voice_tb,curvoice,staves_found,vover,tsfirst,w_tb=new Uint8Array([2,1,8,0,3,5,6,9,9,0,9,3,0,7,0,0,0,0]),note_names="CDEFGAB",latin_names=["Do","Re","Mi","Fa","Sol","La","Si"],acc_name=["bb","b","","#","##"];font_init(),init_tune(),Abc.prototype.add_style=function(e){style+=e},Abc.prototype.calculate_beam=calculate_beam,Abc.prototype.cfmt=function(){return cfmt},Abc.prototype.clone=clone,Abc.prototype.deco_cnv=deco_cnv,Abc.prototype.do_pscom=do_pscom,Abc.prototype.do_begin_end=do_begin_end,Abc.prototype.draw_gchord=draw_gchord,Abc.prototype.draw_note=draw_note,Abc.prototype.draw_symbols=draw_symbols,Abc.prototype.errs=errs,Abc.prototype.font_class=font_class,Abc.prototype.gch_build=gch_build,Abc.prototype.gch_tr1=gch_tr1,Abc.prototype.get_a_gch=function(){return a_gch},Abc.prototype.get_bool=get_bool,Abc.prototype.get_cur_sy=function(){return cur_sy},Abc.prototype.get_curvoice=function(){return curvoice},Abc.prototype.get_delta_tb=function(){return delta_tb},Abc.prototype.get_decos=function(){return decos},Abc.prototype.get_fname=function(){return parse.fname},Abc.prototype.get_font=get_font,Abc.prototype.get_font_style=function(){return font_style},Abc.prototype.get_glyphs=function(){return glyphs},Abc.prototype.get_img=function(){return img},Abc.prototype.get_maps=function(){return maps},Abc.prototype.get_multi=function(){return multicol},Abc.prototype.get_newpage=function(){if(block.newpage)return block.newpage=!1,!0},Abc.prototype.get_posy=function(){var e=posy;return posy=0,e},Abc.prototype.get_staff_tb=function(){return staff_tb},Abc.prototype.get_top_v=function(){return par_sy.top_voice},Abc.prototype.get_tsfirst=function(){return tsfirst},Abc.prototype.get_voice_tb=function(){return voice_tb},Abc.prototype.goto_tune=goto_tune,Abc.prototype.info=function(){return info},Abc.prototype.new_note=new_note,Abc.prototype.out_arp=out_arp,Abc.prototype.out_deco_str=out_deco_str,Abc.prototype.out_deco_val=out_deco_val,Abc.prototype.out_ltr=out_ltr,Abc.prototype.output_music=output_music,Abc.prototype.param_set_font=param_set_font,Abc.prototype.parse=parse,Abc.prototype.psdeco=psdeco,Abc.prototype.psxygl=psxygl,Abc.prototype.set_bar_num=set_bar_num,Abc.prototype.set_cur_sy=function(e){cur_sy=e},Abc.prototype.set_dscale=set_dscale,Abc.prototype.set_font=set_font,Abc.prototype.set_format=set_format,Abc.prototype.set_pitch=set_pitch,Abc.prototype.set_scale=set_scale,Abc.prototype.set_stem_dir=set_stem_dir,Abc.prototype.set_stems=set_stems,Abc.prototype.set_sym_glue=set_sym_glue,Abc.prototype.set_tsfirst=function(e){tsfirst=e},Abc.prototype.set_vp=set_vp,Abc.prototype.set_v_param=set_v_param,Abc.prototype.set_width=set_width,Abc.prototype.set_xhtml=function(e){var t=write_text;return write_text=e,t},Abc.prototype.sort_pitch=sort_pitch,Abc.prototype.strwh=strwh,Abc.prototype.stv_g=function(){return stv_g},Abc.prototype.svg_flush=svg_flush,Abc.prototype.syntax=syntax,Abc.prototype.unlksym=unlksym,Abc.prototype.use_font=use_font,Abc.prototype.xy_str=xy_str,Abc.prototype.xygl=xygl;var hook_init}};var Abc=abc2svg.Abc;typeof module=="object"&&typeof exports=="object"&&(exports.abc2svg=abc2svg,exports.Abc=Abc),abc2svg.loadjs=function(e,t,n){n&&n()},abc2svg.modules={ambitus:{fn:"ambitus-1.js"},beginps:{fn:"psvg-1.js"},"break":{fn:"break-1.js"},capo:{fn:"capo-1.js"},clip:{fn:"clip-1.js"},voicecombine:{fn:"combine-1.js"},diagram:{fn:"diag-1.js"},equalbars:{fn:"equalbars-1.js"},grid:{fn:"grid-1.js"},grid2:{fn:"grid2-1.js"},MIDI:{fn:"MIDI-1.js"},percmap:{fn:"perc-1.js"},soloffs:{fn:"soloffs-1.js"},sth:{fn:"sth-1.js"},temperament:{fn:"temper-1.js"},nreq:0,hooks:[],g_hooks:[],load:function(e,t,n){function r(){return typeof user=="object"&&user.errmsg?user.errmsg:typeof printErr=="function"?printErr:typeof alert=="function"?function(e){alert(e)}:typeof console=="object"?console.log:function(){}}var i,s,o=this.nreq,u=e.match(/(^|\n)(%%|I:).+?\b/g);if(!u)return!0;this.cbf=t||function(){},this.errmsg=n||r();for(var a=0;a<u.length;a++){i=abc2svg.modules[u[a].replace(/\n?(%%|I:)/,"")];if(!i||i.loaded)continue;i.loaded=!0,this.nreq++,abc2svg.loadjs(i.fn,function(){--abc2svg.modules.nreq==0&&abc2svg.modules.cbf()},function(){abc2svg.modules.errmsg("error loading "+i.fn),--abc2svg.modules.nreq==0&&abc2svg.modules.cbf()})}return this.nreq==o}},abc2svg.version="1.18.2",abc2svg.vdate="2018-11-18",abc2svg.MIDI={do_midi:function(e){function r(e){var r=Number(e);if(isNaN(r))return;return e=(r/12|0)*7-19,r%=12,e+=t[r],note={pit:e},n[r]&&(note.acc=n[r]),note}function i(e){var t=e.match(/^([_^=]*)([A-Ga-g])([,']*)$/);if(!t)return;return e.match(/[A-Z]/)&&(e=e.toLowerCase(),e.indexOf("'")>0?e=e.replace("'",""):e+=","),e}var t=new Int8Array([0,0,1,2,2,3,3,4,5,5,6,6]),n=new Int8Array([0,1,0,-1,0,0,1,0,-1,0,-1,0]),s,o,u=this.get_maps(),a=e.split(/\s+/);switch(a[1]){case"channel":if(a[2]!="10")break;this.set_v_param("midictl","0 1");break;case"drummap":if(this.cfmt().sound!="play")break;s=i(a[2]),o=r(a[3]);if(!s||!o){this.syntax(1,this.errs.bad_val,"%%MIDI drummap");break}u.MIDIdrum||(u.MIDIdrum={}),u.MIDIdrum[s]=[null,o],this.set_v_param("mididrum","MIDIdrum");break;case"program":a[3]!=undefined?o=a[3]:o=a[2],o=parseInt(o);if(isNaN(o)||o<0||o>128){this.syntax(1,"Bad program in %%MIDI");return}this.set_v_param("instr",o);break;case"control":s=parseInt(a[2]);if(isNaN(s)||s<0||s>127){this.syntax(1,"Bad controller number in %%MIDI");return}o=parseInt(a[3]);if(isNaN(o)||o<0||o>127){this.syntax(1,"Bad controller value in %%MIDI");return}this.set_v_param("midictl",a[2]+" "+a[3])}},set_midi:function(e){var t,n,r=this.get_curvoice();for(t=0;t<e.length;t++)switch(e[t]){case"instr=":r.instr=e[t+1];break;case"midictl=":r.midictl||(r.midictl={}),n=e[t+1].split(" "),r.midictl[n[0]]=Number(n[1]);break;case"mididrum=":r.map||(r.map={}),r.map=e[t+1]}},do_pscom:function(e,t){t.slice(0,5)=="MIDI "?abc2svg.MIDI.do_midi.call(this,t):e(t)},set_vp:function(e,t){abc2svg.MIDI.set_midi.call(this,t),e(t)},set_hooks:function(e){e.do_pscom=abc2svg.MIDI.do_pscom.bind(e,e.do_pscom),e.set_vp=abc2svg.MIDI.set_vp.bind(e,e.set_vp)}},abc2svg.modules.hooks.push(abc2svg.MIDI.set_hooks),abc2svg.modules.MIDI.loaded=!0,abc2svg.combine={comb_v:function(){function t(t){var n,r=t.ts_next;return!r||r.type!=e.NOTE&&r.type!=e.REST?!1:r.v==t.v||r.st!=t.st||r.time!=t.time||r.dur!=t.dur?!1:t.combine<=0&&r.type!=t.type?!1:t.a_gch&&r.a_gch?!1:t.type==e.REST?t.type==r.type&&t.invis&&!r.invis?!1:!0:r.a_ly||r.sl1||r.sl2||r.slur_start||r.slur_end?!1:r.beam_st!=t.beam_st||r.beam_end!=t.beam_end?!1:(n=r.nhd,t.combine<=1&&t.notes[0].pit<=r.notes[n].pit+1?!1:!0)}function n(t,n){var r,i,s;t.notes=t.notes.concat(n.notes),t.nhd=r=t.notes.length-1,this.sort_pitch(t);if(t.combine>=3){for(s=r;s>0;s--)t.notes[s].pit==t.notes[s-1].pit&&t.notes[s].acc==t.notes[s-1].acc&&t.notes.splice(s,1);t.nhd=r=t.notes.length-1}t.ymx=3*(t.notes[r].pit-18)+4,t.ymn=3*(t.notes[0].pit-18)-4,i=t.notes[0].ti1,(i&15)==e.SL_AUTO&&(t.notes[0].ti1=e.SL_BELOW|i&~e.SL_DOTTED),i=t.notes[r].ti1,(i&15)==e.SL_AUTO&&(t.notes[r].ti1=e.SL_ABOVE|i&~e.SL_DOTTED)}function r(r){var i,s,o,u;for(;;){s=r.nhd,i=r.ts_next,o=i.nhd,r.type!=i.type?i.type!=e.REST&&(i=r,r=i.ts_next):r.type==e.REST?r.invis&&!i.invis&&delete r.invis:n.call(this,r,i),i.a_gch&&(r.a_gch=i.a_gch),i.a_dd&&(r.a_dd?r.a_dd=r.a_dd.concat(i.a_dd):r.a_dd=i.a_dd),this.unlksym(i);if(r.in_tuplet||!t.call(this,r))break}}var e=abc2svg.C,i,s,o,u,a;for(i=this.get_tsfirst();i;i=i.ts_next){switch(i.type){case e.REST:if(i.combine==undefined||i.combine<0)continue;t.call(this,i)&&r.call(this,i);continue;default:continue;case e.NOTE:if(i.combine==undefined||i.combine<=0)continue}if(!i.beam_st)continue;if(i.beam_end){t.call(this,i)&&r.call(this,i);continue}s=i;for(;;){if(!t.call(this,s)){s=null;break}if(s.beam_end)break;do s=s.next;while(s.type!=e.NOTE&&s.type!=e.REST)}if(!s)continue;s=i;for(;;){r.call(this,s);if(s.beam_end)break;do s=s.next;while(s.type!=e.NOTE&&s.type!=e.REST)}}},do_pscom:function(e,t){t.slice(0,13)=="voicecombine "?this.set_v_param("combine",t.split(/[ \t]/)[1]):e(t)},new_note:function(e,t,n){var r=this.get_curvoice(),i=e(t,n);return i&&i.notes&&r.combine!=undefined&&(i.combine=r.combine),i},set_stem_dir:function(e){e(),abc2svg.combine.comb_v.call(this)},set_vp:function(e,t){var n,r=this.get_curvoice();for(n=0;n<t.length;n++)if(t[n]=="combine="){r.combine=t[n+1];break}e(t)},set_hooks:function(e){e.do_pscom=abc2svg.combine.do_pscom.bind(e,e.do_pscom),e.new_note=abc2svg.combine.new_note.bind(e,e.new_note),e.set_stem_dir=abc2svg.combine.set_stem_dir.bind(e,e.set_stem_dir),e.set_vp=abc2svg.combine.set_vp.bind(e,e.set_vp)}},abc2svg.modules.hooks.push(abc2svg.combine.set_hooks),abc2svg.modules.voicecombine.loaded=!0,abc2svg.diag={do_diag:function(){var e=this.get_glyphs(),t=this.get_voice_tb();if(!e.fb){var n,r,i,s=this.get_decos();ns="CDEFGAB",ms=["","m","7","m7","maj7","sus4"],this.add_style("\n.diag {font:6px sans-serif}\n.frn {font:italic 7px sans-serif}");for(n=0;n<ns.length;n++)for(r=0;r<ms.length;r++)i=ns[n]+ms[r],s[i]="3 "+i+" 40 0 0";for(r=0;r<ms.length;r++)i="F♯"+ms[r],s[i]="3 F#"+ms[r]+" 40 0 0";e.fb='<g id="fb">\n<path class="stroke" stroke-width="0.4" d="M-10 -34h20m0 6h-20m0 6h20m0 6h-20m0 6h20"/>\n<path class="stroke" stroke-width="0.5" d="M-10 -34v24m4 0v-24m4 0v24m4 0v-24m4 0v24m4 0v-24"/>\n</g>',e.nut='<path id="nut" class="stroke" stroke-width="1.6" d="M-10.2 -34.5h20.4"/>',e.barre='<path id="barre" class="stroke" stroke-width=".9" d="M-10.2 -31h20.4"/>',e.fr1='<text id="fr1" x="-20" y="-29" class="frn">fr1</text>',e.fr2='<text id="fr2" x="-20" y="-29" class="frn">fr2</text>',e.fr3='<text id="fr3" x="-20" y="-29" class="frn">fr3</text>',e.ddot='<circle id="ddot" class="fill" r="1.5"/>',e.C='<g id="C">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-3,4" y="-36" class="diag">321</text>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.Cm='<g id="Cm">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">342</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="6" y="-25" xlink:href="#ddot"/>\n</g>',e.C7='<g id="C7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0,4" y="-36" class="diag">3241</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.Cm7='<g id="Cm7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-12,-4,4" y="-36" class="diag">x32</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="6" y="-25" xlink:href="#ddot"/>\n</g>',e.Cmaj7='<g id="Cmaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,-4" y="-36" class="diag">x21</text>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Csus4='<g id="Csus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4" y="-36" class="diag">x34</text>\n<use x="6" y="-13" xlink:href="#ddot"/>\n<use x="2" y="-19" xlink:href="#ddot"/>\n</g>',e.D='<g id="D">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4,8" y="-36" class="diag">x132</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.Dm='<g id="Dm">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4,8" y="-36" class="diag">x231</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="10" y="-31" xlink:href="#ddot"/>\n</g>',e.D7='<g id="D7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4,8" y="-36" class="diag">x312</text>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.Dm7='<g id="Dm7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,0,4,8" y="-36" class="diag">xx211</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="10" y="-31" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.Dmaj7='<g id="Dmaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,0,4,8" y="-36" class="diag">xx123</text>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.Dsus4='<g id="Dsus4">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,0,4,8" y="-36" class="diag">xx123</text>\n<use x="10" y="-19" xlink:href="#ddot"/>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.E='<g id="E">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">231</text>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-31" xlink:href="#ddot"/>\n</g>',e.Em='<g id="Em">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4" y="-36" class="diag">23</text>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.E7='<g id="E7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,0" y="-36" class="diag">21</text>\n<use x="2" y="-31" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.Em7='<g id="Em7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8" y="-36" class="diag">1</text>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.Emaj7='<g id="Emaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">312</text>\n<use x="2" y="-31" xlink:href="#ddot"/>\n<use x="-2" y="-31" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.Esus4='<g id="Esus4">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,0" y="-36" class="diag">12</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.F='<g id="F">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">342</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.Fm='<g id="Fm">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4" y="-36" class="diag">34</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.F7='<g id="F7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8,0" y="-36" class="diag">32</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Fm7='<g id="Fm7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8" y="-36" class="diag">3</text>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Fmaj7='<g id="Fmaj7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">423</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Fsus4='<g id="Fsus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr1"/>\n<use xlink:href="#fb"/>\n<text x="-4,0" y="-36" class="diag">34</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e["F#"]='<g id="F#">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">342</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e["F#m"]='<g id="F#m">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4" y="-36" class="diag">34</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e["F#7"]='<g id="F#7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8,0" y="-36" class="diag">32</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e["F#m7"]='<g id="F#m7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8" y="-36" class="diag">3</text>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e["F#maj7"]='<g id="F#maj7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4,0" y="-36" class="diag">423</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e["F#sus4"]='<g id="F#sus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-4,0" y="-36" class="diag">34</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.G='<g id="G">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,8" y="-36" class="diag">234</text>\n<use x="10" y="-19" xlink:href="#ddot"/>\n<use x="-10" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n</g>',e.Gm='<g id="Gm">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-8,-4" y="-36" class="diag">34</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.G7='<g id="G7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,8" y="-36" class="diag">321</text>\n<use x="-10" y="-19" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n<use x="10" y="-31" xlink:href="#ddot"/>\n</g>',e.Gm7='<g id="Gm7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-8" y="-36" class="diag">3</text>\n<use x="-6" y="-19" xlink:href="#ddot"/>\n</g>',e.Gmaj7='<g id="Gmaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,8" y="-36" class="diag">312</text>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n<use x="-10" y="-19" xlink:href="#ddot"/>\n</g>',e.Gsus4='<g id="Gsus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr3"/>\n<use xlink:href="#fb"/>\n<text x="-4,0" y="-36" class="diag">34</text>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.A='<g id="A">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">234</text>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.Am='<g id="Am">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">231</text>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n<use x="6" y="-31" xlink:href="#ddot"/>\n</g>',e.A7='<g id="A7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,4" y="-36" class="diag">23</text>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.Am7='<g id="Am7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-4,4" y="-36" class="diag">21</text>\n<use x="6" y="-31" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.Amaj7='<g id="Amaj7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-4,0,4" y="-36" class="diag">x213</text>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-31" xlink:href="#ddot"/>\n<use x="-2" y="-25" xlink:href="#ddot"/>\n</g>',e.Asus4='<g id="Asus4">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4" y="-36" class="diag">x12</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>',e.B='<g id="B">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">234</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.Bm='<g id="Bm">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-4,0,4" y="-36" class="diag">341</text>\n<use x="6" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-19" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.B7='<g id="B7">\n<use xlink:href="#nut"/>\n<use xlink:href="#fb"/>\n<text x="-12,-8,-4,0,8" y="-36" class="diag">x2134</text>\n<use x="10" y="-25" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-6" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-31" xlink:href="#ddot"/>\n</g>',e.Bm7='<g id="Bm7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,8" y="-36" class="diag">x32</text>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n<use x="6" y="-25" xlink:href="#ddot"/>\n</g>',e.Bmaj7='<g id="Bmaj7">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-12,-4,0,4" y="-36" class="diag">x324</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n<use x="-2" y="-19" xlink:href="#ddot"/>\n</g>',e.Bsus4='<g id="Bsus4">\n<use xlink:href="#barre"/>\n<use xlink:href="#fr2"/>\n<use xlink:href="#fb"/>\n<text x="-12,0,4" y="-36" class="diag">x34</text>\n<use x="6" y="-19" xlink:href="#ddot"/>\n<use x="2" y="-25" xlink:href="#ddot"/>\n</g>'}var o,n,u,a;for(o=t[0].sym;o;o=o.next){if(!o.a_gch)continue;for(n=0;n<o.a_gch.length;n++){u=o.a_gch[n];if(!u||u.type!="g"||u.capo)continue;a=u.otext||u.text,this.deco_cnv(a.split(/[ \t/]/,1),o,null)}}},output_music:function(e){this.cfmt().diag&&abc2svg.diag.do_diag.call(this),e()},set_fmt:function(e,t,n,r){if(t=="diagram"){this.cfmt().diag=n;return}e(t,n,r)},set_hooks:function(e){e.output_music=abc2svg.diag.output_music.bind(e,e.output_music),e.set_format=abc2svg.diag.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.diag.set_hooks),abc2svg.modules.diagram.loaded=!0,abc2svg.grid={do_grid:function(){function a(t){var n=e.BLEN/4;return!t.a_meter[0]||t.a_meter[0].top[0]=="C"||!t.a_meter[0].bot?n:(n=e.BLEN/t.a_meter[0].bot[0]|0,t.a_meter[0].bot[0]==8&&t.a_meter[0].top[0]%3==0&&(n=e.BLEN/8*3),n)}function f(e,t,n,a){function C(){var t,n,r="-";for(t=0;t<e.length;t++){n=e[t],n[0]||(n[0]=r);if(n.length==0)continue;if(n.length==1){r=n[0];continue}if(n.length==2){n[2]=n[1],r=n[2];continue}if(n.length==3){r=n[2];continue}n[2]||(n[2]=n[1]||n[0]),r=n[3]}}var f,l,c,h,p,d,v,m,g,y,b,w,E,S="",x="",T=[],N=u.n;C();if(!u.ls)T=e;else{v=t,t=[];for(f=0;f<u.ls.length;f++){h=u.ls[f],h.indexOf("-")<0?h=[h,h]:h=h.split("-");for(c=h[0]-1;c<h[1];c++){if(!e[c])break;T.push(e[c]),t.push(v[c])}}}N<0&&(N=-N),N<3&&(N=T.length%6==0?6:8),N>T.length&&(N=T.length),p=(T.length+N-1)/N|0,g=n.size*2,a<g*1.4&&(a=g*1.4),m=a*N,m>r.width&&(N/=2,p*=2,m/=2),d='<svg xmlns="http://www.w3.org/2000/svg" version="1.1"\n xmlns:xlink="http://www.w3.org/1999/xlink"\n color="black" width="'+r.width.toFixed(0)+'px" height="'+(g*p+6).toFixed(0)+'px"',f=o.bgcolor,f&&(d+=' style="background-color: '+f+'"'),d+='>\n<style type="text/css">\n.mid {text-anchor:middle}\n',o.fullsvg&&(d+=".stroke {stroke: currentColor; fill: none}\n."+i+" {"+this.style_font(n.name+"."+n.size)+"}\n"),d+="</style>\n",d+='<path class="stroke" d="\n',y=(r.width-m)/2,w=1;for(l=0;l<=p;l++)d+="M"+y.toFixed(2)+" "+w.toFixed(2)+"h"+m.toFixed(2)+"\n",w+=g;b=y;for(f=0;f<=N;f++)d+="M"+b.toFixed(2)+" 1v"+(g*p).toFixed(2)+"\n",b+=a;d+='"/>\n',w=1-g/2+n.size*.3,E=1;for(f=0;f<T.length;f++)S=T[f],f%N==0&&(w+=g,E+=g,b=y+a/2),S.length>1?(d+='<path class="stroke" stroke-width="1" d="M'+(b-a/2).toFixed(2)+" "+E.toFixed(2)+"l"+a.toFixed(2)+" -"+g.toFixed(2)+'"/>\n',S[1]?(d+='<path class="stroke" stroke-width="1" d="M'+(b-a/2).toFixed(2)+" "+(E-g).toFixed(2)+"l"+(a/2).toFixed(2)+" "+(g/2).toFixed(2)+'"/>\n',d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+(b-a/3).toFixed(2)+'" y="'+w.toFixed(2)+'">'+S[0]+"</text>\n",d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+b.toFixed(2)+'" y="'+(w-g/3).toFixed(2)+'">'+S[1]+"</text>\n"):d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+(b-a*.2).toFixed(2)+'" y="'+(w-g/4).toFixed(2)+'">'+S[0]+"</text>\n",S.length>=3&&(S[3]?(d+='<path class="stroke" stroke-width="1" d="M'+b.toFixed(2)+" "+(E-g/2).toFixed(2)+"l"+(a/2).toFixed(2)+" "+(g/2).toFixed(2)+'"/>\n',d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+b.toFixed(2)+'" y="'+(w+g/3).toFixed(2)+'">'+S[2]+"</text>\n",d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+(b+a/3).toFixed(2)+'" y="'+w.toFixed(2)+'">'+S[3]+"</text>\n"):d+='<text class="'+s+'" style="font-size:'+(n.size*.72).toFixed(2)+'" x="'+(b+a*.2).toFixed(2)+'" y="'+(w+g/4).toFixed(2)+'">'+S[2]+"</text>\n")):d+='<text class="'+s+'" x="'+b.toFixed(2)+'" y="'+w.toFixed(2)+'">'+S[0]+"</text>\n",b+=a;w=1-g/2+n.size*.3,b=y;for(f=0;f<t.length;f++)v=t[f],v[0]==":"&&(d+='<text class="'+s+'" x="'+(b-5).toFixed(2)+'" y="'+w.toFixed(2)+'" style="font-weight:bold;font-size:'+(n.size+2).toFixed(2)+'">:</text>\n'),f%N==0&&(w+=g,b=y),v[v.length-1]==":"&&(d+='<text class="'+s+'" x="'+(b+5).toFixed(2)+'" y="'+w.toFixed(2)+'" style="font-weight:bold;font-size:'+(n.size+2).toFixed(2)+'">:</text>\n'),b+=a;return d+"</svg>"}var e=abc2svg.C,t=this.get_tsfirst(),n=this.get_voice_tb(),r,i,s,o=this.cfmt(),u=o.grid,l,c,h,p,d,v,m,g,y,b,w,E,S,x=[],T=[],N=[];r=this.get_img(),c=a(n[0].meter),y=n[0].meter.wmeasure,o.gridfont||this.param_set_font("gridfont","serif 16"),g=this.get_font("grid"),i=this.font_class(g),s=i+" mid",this.set_font("grid"),h=d=m=E=0,x.push("|");for(l=n[0].sym;l;l=l.next){while(l.time>h)d<3&&d++,h+=c;switch(l.type){case e.NOTE:case e.REST:if(l.a_gch)for(p=0;p<l.a_gch.length;p++)if(l.a_gch[p].type=="g"){N[d]||(N[d]=l.a_gch[p].text,w=this.strwh(N[d])[0],w>E&&(E=w),m++);break}break;case e.BAR:b=u.norep?"|":l.bar_type;if(l.time<y)N.length?(T.push(N),x.push(b)):x[0]=b;else{if(!l.bar_num)break;T.push(N),x.push(b)}N=[],h=l.time,d=0,b.indexOf(":")&&(S=!0);break;case e.METER:c=a(l),y=l.wmeasure}}if(m==0)return;N.length!=0&&(x.push(""),T.push(N)),E+=this.strwh(S?" ":" ")[0],v=n[this.get_top_v()],l={type:e.BLOCK,subtype:"ml",dur:0,time:0,p_v:v,v:v.v,text:f.call(this,T,x,g,E)};if(o.grid.n<0){for(var C=t;C.ts_next;C=C.ts_next);l.time=C.time,l.prev=v.last_sym,l.ts_prev=C,v.last_sym.next=l,C.ts_next=l}else l.time=0,l.next=v.sym,l.ts_next=t,t.ts_prev=l,t=l,this.set_tsfirst(l),v.sym.prev=l,v.sym=l},output_music:function(e){this.cfmt().grid&&abc2svg.grid.do_grid.call(this),e()},set_fmt:function(e,t,n,r){if(t=="grid"){n||(n="1"),n=n.split(/\s+/);var i=this.cfmt().grid={n:Number(n.shift())};isNaN(i.n)&&(i.n=1);while(n.length){var s=n.shift();s=="norepeat"?i.norep=!0:s.slice(0,8)=="include="&&(i.ls=s.slice(8).split(","))}return}e(t,n,r)},set_hooks:function(e){e.output_music=abc2svg.grid.output_music.bind(e,e.output_music),e.set_format=abc2svg.grid.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.grid.set_hooks),abc2svg.modules.grid.loaded=!0,abc2svg.equalbars={output_music:function(e){this.equalbars_d=0,e()},set_fmt:function(e,t,n,r){t=="equalbars"?this.cfmt().equalbars=this.get_bool(n):e(t,n,r)},set_sym_glue:function(e,t){var n=abc2svg.C,r,i,s,o,u,a,l,c,h,p=[],v=this.get_tsfirst();e(t);if(!this.cfmt().equalbars)return;for(i=v;i;i=i.ts_next){if(!i.seqst)continue;switch(i.type){default:continue;case n.BAR:case n.GRACE:case n.MREST:case n.NOTE:case n.REST:case n.SPACE:}break}if(!i)return;r=i.ts_next,h=c=r.time;for(;;){if(!r.ts_next){p.push([r,r.time-c]),c=r.time,r.dur&&(c+=r.dur);break}r.type==n.BAR&&r.seqst&&(p.push([r,r.time-c]),c=r.time),r=r.ts_next}u=p.length;if(u==0)return;a=i.type==n.GRACE?i.extra.x:i.x,d=this.equalbars_d,d||(d=this.equalbars_d=a),s=(t-d)/(c-h);for(o=0;o<u;o++){r=p[o][0],f=s*p[o][1]/(r.x-a);for(;i!=r;i=i.ts_next)if(i.type==n.GRACE)for(l=i.extra;l;l=l.next)l.x=d+(l.x-a)*f;else i.x&&(i.x=d+(i.x-a)*f);d+=s*p[o][1],a=i.x;for(;;){i.x=d,i=i.ts_next;if(!i||i.seqst)break}if(!i)break}},set_hooks:function(e){e.output_music=abc2svg.equalbars.output_music.bind(e,e.output_music),e.set_format=abc2svg.equalbars.set_fmt.bind(e,e.set_format),e.set_sym_glue=abc2svg.equalbars.set_sym_glue.bind(e,e.set_sym_glue)}},abc2svg.modules.hooks.push(abc2svg.equalbars.set_hooks),abc2svg.modules.equalbars.loaded=!0,abc2svg.perc={do_perc:function(e){function i(e){var i,s,o,u=Number(e);if(isNaN(u)){o=e.match(/^([_^=]*)([A-Ga-g])([,']*)$/);if(o){i="CDEFGABcdefgab".indexOf(o[2])+16;switch(o[3]){case"'":i+=7*o[3].length;break;case",":i-=7*o[3].length}note={pit:i};switch(o[1]){case"^":note.acc=1;break;case"_":note.acc=-1}return note}e=e.toLowerCase(e),o=e[0],i=0;for(;;){s=e.indexOf("-",i);if(s<0)break;i=s+1,o+="-"+e[i]}u=r[o];if(!u)switch(e[0]){case"c":switch(e[1]){case"a":u=r.ca;break;case"l":u=r.cl;break;case"o":u=r.co}break;case"h":case"l":i=e.indexOf("-");if(e[i+1]!="t")break;switch(e[1]){case"i":case"o":u=r[o+e[1]]}}}if(!u)return;return e=(u/12|0)*7-19,u%=12,e+=t[u],note={pit:e},n[u]&&(note.acc=n[u]),note}function s(e){var t=e.match(/^([_^]*)([A-Ga-g])([,']*)$/);if(!t)return;return e.match(/[A-Z]/)&&(e=e.toLowerCase(),e.indexOf("'")>0?e=e.replace("'",""):e+=","),e}var t=new Int8Array([0,0,1,2,2,3,3,4,5,5,6,6]),n=new Int8Array([0,1,0,-1,0,0,1,0,-1,0,-1,0]),r={"a-b-d":35,"a-s":38,"b-d-1":36,ca:69,cl:75,co:56,"c-c":52,"c-c-1":49,"c-c-2":57,"c-h-h":42,"e-s":40,"h-a":67,"h-b":60,"h-c":39,"h-f-t":43,"h-m-t":48,"h-ti":65,"h-to":50,"h-w-b":76,"l-a":68,"l-b":61,"l-c":64,"l-f-t":41,"l-g":74,"l-m-t":47,"l-ti":66,"l-to":45,"l-w":72,"l-w-b":77,m:70,"m-c":78,"m-h-c":62,"m-t":80,"o-c":79,"o-h-c":63,"o-h-h":46,"o-t":81,"p-h-h":44,"r-b":53,"r-c-1":51,"r-c-2":59,"s-c":55,"s-g":73,"s-s":37,"s-w":71,t:54,v:58},o,u,a=this.get_maps(),f=e.split(/\s+/);o=s(f[1]);if(!o){this.syntax(1,this.errs.bad_val,"%%percmap");return}if(this.cfmt().sound!="play"){if(!f[3])return;a.MIDIdrum||(a.MIDIdrum={}),u=i(o);if(!u){this.syntax(1,this.errs.bad_val,"%%percmap");return}delete u.acc,a.MIDIdrum[o]=[[f[3]],u]}else{u=i(f[2]);if(!u){this.syntax(1,this.errs.bad_val,"%%percmap");return}a.MIDIdrum||(a.MIDIdrum={}),a.MIDIdrum[o]=[null,u]}this.set_v_param("perc","MIDIdrum")},set_perc:function(e){var t,n,r=this.get_curvoice();for(t=0;t<e.length;t++)switch(e[t]){case"perc=":r.map||(r.map={}),r.map=e[t+1],r.midictl||(r.midictl={}),r.midictl[0]=1}},do_pscom:function(e,t){t.slice(0,8)=="percmap "?abc2svg.perc.do_perc.call(this,t):e(t)},set_vp:function(e,t){abc2svg.perc.set_perc.call(this,t),e(t)},set_hooks:function(e){e.do_pscom=abc2svg.perc.do_pscom.bind(e,e.do_pscom),e.set_vp=abc2svg.perc.set_vp.bind(e,e.set_vp)}},abc2svg.modules.hooks.push(abc2svg.perc.set_hooks),abc2svg.modules.percmap.loaded=!0,abc2svg.ambitus={do_ambitus:function(){var e=abc2svg.C,t,n,r,i,s,o=this.get_voice_tb();for(n=0;n<o.length;n++){r=o[n];if(r.second)continue;i=100,s=-100;for(t=r.sym;t;t=t.next){if(t.type!=e.NOTE)continue;t.notes[t.nhd].pit>s&&(s=t.notes[t.nhd].pit),t.notes[0].pit<i&&(i=t.notes[0].pit)}if(i==100)continue;t=r.clef,t.stem=1,t.head=e.FULL,t.stemless=!0,t.nhd=1,t.notes=[{dur:e.BLEN/4,pit:i,shhd:0},{dur:e.BLEN/4,pit:s,shhd:0}]}},draw_symbols:function(e,t){var n=this.get_staff_tb(),r=t.sym;r.clef_type!=undefined&&r.nhd>0&&(r.x-=26,this.set_scale(r),this.draw_note(r),r.notes[1].pit-r.notes[0].pit>4&&(this.xypath(r.x,3*(r.notes[1].pit-18)+n[r.st].y),this.out_svg("v"+((r.notes[1].pit-r.notes[0].pit)*3).toFixed(2)+'" stroke-width=".6"/>\n')),r.x+=26,t.clef.nhd=0),e(t)},set_pitch:function(e,t){e(t),!t&&this.cfmt().ambitus&&abc2svg.ambitus.do_ambitus.call(this)},set_fmt:function(e,t,n,r){if(t=="ambitus"){this.cfmt().ambitus=n;return}e(t,n,r)},set_width:function(e,t){t.clef_type!=undefined&&t.nhd>0?(t.wl=40,t.wr=12):e(t)},set_hooks:function(e){e.draw_symbols=abc2svg.ambitus.draw_symbols.bind(e,e.draw_symbols),e.set_pitch=abc2svg.ambitus.set_pitch.bind(e,e.set_pitch),e.set_format=abc2svg.ambitus.set_fmt.bind(e,e.set_format),e.set_width=abc2svg.ambitus.set_width.bind(e,e.set_width)}},abc2svg.modules.hooks.push(abc2svg.ambitus.set_hooks),abc2svg.modules.ambitus.loaded=!0,abc2svg.break={get_break:function(e){var t=abc2svg.C,r,i,s,o,u=e.split(/[ ,]/),a=this.cfmt();a.break||(a.break=[]);for(n=1;n<u.length;n++){r=u[n],i=r.match(/(\d+)([a-z]?)(:\d+\/\d+)?/);if(!i){this.syntax(1,this.errs.bad_val,"%%break");continue}i[2]&&(o=i[2].charCodeAt(0)-97);if(!i[3]){a.break.push({m:i[1],t:0,sq:o});continue}s=i[3].match(/:(\d+)\/(\d+)/);if(!s||s[2]<1){this.syntax(1,"Bad denominator in %%break");continue}a.break.push({m:i[1],t:s[1]*t.BLEN/s[2],sq:o})}},do_break:function(){var e,t,n,r,i,o=this.get_voice_tb();v=this.get_cur_sy().top_voice,s1=o[v].sym,cfmt=this.cfmt();for(e=0;e<cfmt.break.length;e++){r=cfmt.break[e],t=r.m;for(s=s1;s;s=s.next)if(s.bar_num==t)break;if(!s)continue;if(r.sq){i=r.sq;for(s=s.ts_next;s;s=s.ts_next)if(s.bar_num==t&&--i==0)break;if(!s)continue}n=r.t;if(n){n=s.time+n;for(;s;s=s.next)if(s.time>=n)break;if(!s)continue;s=s.prev}s.eoln=!0}},do_pscom:function(e,t){t.slice(0,6)=="break "?abc2svg.break.get_break.call(this,t):e(t)},set_bar_num:function(e){e(),this.cfmt().break&&abc2svg.break.do_break.call(this)},set_hooks:function(e){e.do_pscom=abc2svg.break.do_pscom.bind(e,e.do_pscom),e.set_bar_num=abc2svg.break.set_bar_num.bind(e,e.set_bar_num)}},abc2svg.modules.hooks.push(abc2svg.break.set_hooks),abc2svg.modules.break.loaded=!0,abc2svg.capo={gch_capo:function(e){var t,n,r,i=this.cfmt(),s=i.capo,o=0;for(;;){t=e[o++];if(!t)return;if(t.type=="g")break}n=Object.create(t),n.capo=!1,n.text=this.gch_tr1(n.text,[0,5,-2,3,-4,1,-6,-1,4,-3,2,-5][s%12]),this.capo_first||(this.capo_first=!0,n.text+=" (capo: "+s.toString()+")"),n.font=this.get_font(i.capofont?"capo":"annotation"),e.splice(o,0,n),t.capo=!0},gch_build:function(e,t){var n=this.get_a_gch();this.cfmt().capo&&n&&abc2svg.capo.gch_capo.call(this,n),e(t)},output_music:function(e){this.capo_first=!1,e()},set_fmt:function(e,t,n,r){if(t=="capo"){this.cfmt().capo=n;return}e(t,n,r)},set_hooks:function(e){e.gch_build=abc2svg.capo.gch_build.bind(e,e.gch_build),e.output_music=abc2svg.capo.output_music.bind(e,e.output_music),e.set_format=abc2svg.capo.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.capo.set_hooks),abc2svg.modules.capo.loaded=!0,abc2svg.clip={get_clip:function(e){function n(e){var n,r,i,s=e.match(/(\d+)([a-z]?)(:\d+\/\d+)?/);if(!s)return;s[2]&&(i=s[2].charCodeAt(0)-97);if(!s[3])return{m:s[1],t:0,sq:i};e=s[3].match(/:(\d+)\/(\d+)/);if(!e||e[2]<1)return;return{m:s[1],t:e[1]*t.BLEN/e[2],sq:i}}var t=abc2svg.C,r,i,s=e.split(/[ -]/);if(s.length!=3){this.syntax(1,this.errs.bad_val,"%%clip");return}s[1]?r=n(s[1]):r={m:0,t:0},i=n(s[2]);if(!r||!i){this.syntax(1,this.errs.bad_val,"%%clip");return}this.cfmt().clip=[r,i]},do_clip:function(){function t(t,n){var r,i,s;if(n.m<=1){if(n.m==1){for(r=t;r;r=r.ts_next)if(r.type==e.BAR&&r.time!=0)break;r.time<voice_tb[this.get_cur_sy().top_voice].meter.wmeasure&&(t=r)}}else{for(;t;t=t.ts_next)if(t.type==e.BAR&&t.bar_num>=n.m)break;if(!t)return;if(n.sq){s=n.sq;for(t=t.ts_next;t;t=t.ts_next)if(t.type==e.BAR&&t.bar_num==n.m&&--s==0)break;if(!t)return}}if(n.t==0)return t;i=t.time+n.t;while(t.time<i){t=t.ts_next;if(!t)return t}do t=t.ts_prev;while(!t.seqst);return t}var e=abc2svg.C;voice_tb=this.get_voice_tb(),cfmt=this.cfmt();var n,r,i,s,o;n=this.get_tsfirst();if(cfmt.clip[0].m>0||cfmt.clip[0].t>0){n=t(n,cfmt.clip[0]);if(!n){this.set_tsfirst(null);return}i=this.get_cur_sy();for(r=this.get_tsfirst();r!=n;r=r.ts_next)switch(r.type){case e.CLEF:r.p_v.clef=r;break;case e.KEY:r.p_v.key=this.clone(r.as.u.key);break;case e.METER:r.p_v.meter=this.clone(r.as.u.meter);break;case e.STAVES:i=r.sy,this.set_cur_sy(i)}for(o=0;o<voice_tb.length;o++){s=voice_tb[o];for(r=n;r;r=r.ts_next)if(r.v==o){delete r.prev;break}s.sym=r}this.set_tsfirst(n),delete n.ts_prev}n=t(n,cfmt.clip[1]);if(!n)return;do{n=n.ts_next;if(!n)return}while(!n.seqst);for(o=0;o<voice_tb.length;o++){s=voice_tb[o];for(r=n.ts_prev;r;r=r.ts_prev)if(r.v==o){delete r.next;break}r||(s.sym=null)}delete n.ts_prev.ts_next},do_pscom:function(e,t){t.slice(0,5)=="clip "?abc2svg.clip.get_clip.call(this,t):e(t)},set_bar_num:function(e){e(),this.cfmt().clip&&abc2svg.clip.do_clip.call(this)},set_hooks:function(e){e.do_pscom=abc2svg.clip.do_pscom.bind(e,e.do_pscom),e.set_bar_num=abc2svg.clip.set_bar_num.bind(e,e.set_bar_num)}},abc2svg.modules.hooks.push(abc2svg.clip.set_hooks),abc2svg.modules.clip.loaded=!0,abc2svg.grid2={do_grid:function(){var e,t,n,r=this.get_voice_tb();for(t=0;t<r.length;t++){n=r[t];if(!n.grid2)continue;n.clef.invis=!0,n.key.k_sf=n.key.k_a_acc=0,n.staffnonote=2;for(e=n.sym;e;e=e.next)e.dur&&(e.invis=!0,delete e.sl1,e.ti1=0)}},draw_chosym:function(e){var t,n;this.set_dscale(e.st);for(t=0;t<e.a_gch.length;t++){n=e.a_gch[t];if(n.type!="g")continue;this.use_font(n.font),this.set_font(n.font),this.xy_str(e.x+n.x,n.y+6,n.text)}},draw_gchord:function(e,t,n,r){t.p_v.grid2?abc2svg.grid2.draw_chosym.call(this,t):e(t,n,r)},output_music:function(e){abc2svg.grid2.do_grid.call(this),e()},set_fmt:function(e,t,n,r){if(t=="grid2"){var i=this.get_curvoice();i&&(this.set_v_param("stafflines","..."),i.grid2=n);return}e(t,n,r)},set_hooks:function(e){e.draw_gchord=abc2svg.grid2.draw_gchord.bind(e,e.draw_gchord),e.output_music=abc2svg.grid2.output_music.bind(e,e.output_music),e.set_format=abc2svg.grid2.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.grid2.set_hooks),abc2svg.modules.grid2.loaded=!0,abc2svg.psvg={do_begin_end:function(e,t,n,r){if(t!="ps"){e(t,n,r);return}if(n=="nosvg")return;this.psvg||(this.psvg=new Psvg(this)),this.psvg.ps_eval.call(this.psvg,r)},psdeco:function(e,t,n,r,i){return this.psvg?this.psvg.psdeco.call(this.psvg,t,n,r,i):!1},psxygl:function(e,t,n,r){return this.psvg?this.psvg.psxygl.call(this.psvg,t,n,r):!1},set_hooks:function(e){e.do_begin_end=abc2svg.psvg.do_begin_end.bind(e,e.do_begin_end),e.psdeco=abc2svg.psvg.psdeco.bind(e,e.psdeco),e.psxygl=abc2svg.psvg.psxygl.bind(e,e.psxygl)}},abc2svg.modules.hooks.push(abc2svg.psvg.set_hooks),abc2svg.modules.beginps.loaded=!0,abc2svg.soloffs={set_fmt:function(e,t,n,r){if(t=="soloffs"){var i,s,o=abc2svg.C,u=this.cfmt().soloffs={};n=n.split(/\s+/);while(n.length){i=n.shift().split("="),s=Number(i[1]);if(isNaN(s))continue;switch(i[0]){case"part":u[o.PART]=s+10;break;case"tempo":u[o.TEMPO]=s+16;break;case"space":u[o.SPACE]=s}}return}e(t,n,r)},set_sym_glue:function(e,t){var n,r=abc2svg.C,i=this.get_tsfirst(),s=this.cfmt().soloffs;e(t);if(!s)return;for(n=i;n;n=n.ts_next){if(n.dur)break;s[n.type]!=undefined&&(n.x=s[n.type])}},set_hooks:function(e){e.set_sym_glue=abc2svg.soloffs.set_sym_glue.bind(e,e.set_sym_glue),e.set_format=abc2svg.soloffs.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.soloffs.set_hooks),abc2svg.modules.soloffs.loaded=!0,abc2svg.temper={set_bar_num:function(e){e();if(this.cfmt().temper){var t=this.get_voice_tb()[0];t.temper=new Float32Array(12);for(var n=0;n<12;n++)t.temper[n]=this.cfmt().temper[n]/100}},set_fmt:function(e,t,n,r){if(t=="temperament"){var i=new Float32Array(n.split(/ +/)),s=i.length;if(s==12){while(--s>=0)if(isNaN(parseInt(i[s])))break;if(s<0){this.cfmt().temper=i;return}}this.syntax(1,this.errs.bad_val,"%%temperament");return}e(t,n,r)},set_hooks:function(e){e.set_bar_num=abc2svg.temper.set_bar_num.bind(e,e.set_bar_num),e.set_format=abc2svg.temper.set_fmt.bind(e,e.set_format)}},abc2svg.modules.hooks.push(abc2svg.temper.set_hooks),abc2svg.modules.temperament.loaded=!0,abc2svg.sth={recal_beam:function(e,t){var n=this.get_staff_tb(),r=n[t.st].y,i=e.s2,s=n[i.st].y;t.sth&&(t.ys=t.sth),i.sth&&(i.ys=i.sth),e.a=(t.ys+r-i.ys-s)/(t.xs-i.xs),e.b=t.ys-t.xs*e.a+r;for(;;){t.ys=e.a*t.xs+e.b-r,t.stem>0?t.ymx=t.ys+2.5:t.ymn=t.ys-2.5,t=t.next;if(t==i)break}},set_sth:function(){var e,t,n,r,i,s=this.get_voice_tb();for(n=0;n<s.length;n++){i=s[n];if(i.sth!=null)continue;r=[];for(e=i.sym;e;e=e.next){e.sth&&(r=e.sth,e.sth=null);if(r.length==0||e.nflags<=-2||e.stemless||!e.beam_st&&!e.beam_end)continue;t=r.shift();if(t=="*")continue;if(t=="|"){for(e=e.next;e;e=e.next)if(e.bar_type)break;continue}t=Number(t);if(isNaN(t)||!t)continue;e.stem>=0?(e.ys=e.y+t,e.ymx=e.ys+2.5|0):(e.ys=e.y-t,e.ymn=e.ys-2.5|0),e.sth=e.ys}}},calculate_beam:function(e,t,n){var r=e(t,n);return r&&t.s2&&(n.sth||t.s2.sth)&&abc2svg.sth.recal_beam.call(this,t,n),r},new_note:function(e,t,n){var r=abc2svg.C,i=e(t,n),s=this.get_curvoice();return s.sth&&i&&i.type==r.NOTE&&(i.sth=s.sth,s.sth=null),i},set_format:function(e,t,n,r){if(t=="sth"){var i=this.get_curvoice();this.parse.state==2&&this.goto_tune(),i&&(i.sth=n.split(/[ \t;-]+/));return}e(t,n,r)},set_stems:function(e){e(),abc2svg.sth.set_sth.call(this)},set_hooks:function(e){e.calculate_beam=abc2svg.sth.calculate_beam.bind(e,e.calculate_beam),e.new_note=abc2svg.sth.new_note.bind(e,e.new_note),e.set_format=abc2svg.sth.set_format.bind(e,e.set_format),e.set_stems=abc2svg.sth.set_stems.bind(e,e.set_stems)}},abc2svg.modules.hooks.push(abc2svg.sth.set_hooks),abc2svg.modules.sth.loaded=!0 class in tgls
/plugin/aichat/vendor/vanderlee/php-sentence/doc/resources/
H A Dcombined.js1064 var autocompleteFiles = {'c': 'class', 'co': 'constant', 'f': 'function', 'm': 'class', 'mm': 'class', 'p': 'class', 'mp': 'class', 'cc': 'class'}; property in AnonymousFunctionf421a9ac18400.autocompleteFiles
/plugin/xlsx2dw/packages/xmltojson/
H A Dxmltojson.js600 var Ks='object',Ls='function',Ms=2147483647,Ns='com.google.gwt.sample.validation.client.lodash',Os=… function
/plugin/abc2/abc-libraries/abcjs/
H A Dabcjs_plugin-midi_6.0.0-beta.25-min.js3 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.abcjs=t():e.ABCJS=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=27)}([function(e,t){var n={clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},cloneArray:function(e){for(var t=[],r=0;r<e.length;r++)t.push(n.clone(e[r]));return t},cloneHashOfHash:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=n.clone(e[r]));return t},cloneHashOfArrayOfHash:function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=n.cloneArray(e[r]));return t},gsub:function(e,t,n){return e.split(t).join(n)},strip:function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")},startsWith:function(e,t){return 0===e.indexOf(t)},endsWith:function(e,t){var n=e.length-t.length;return n>=0&&e.lastIndexOf(t)===n},each:function(e,t,n){for(var r=0,i=e.length;r<i;r++)t.apply(n,[e[r],r])},last:function(e){return 0===e.length?null:e[e.length-1]},compact:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},detect:function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}};try{[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}))}catch(e){}e.exports=n},function(e,t){var n={FONTEM:360,FONTSIZE:30};n.STEP=93*n.FONTSIZE/720,n.SPACE=10,n.TOPNOTE=15,n.STAVEHEIGHT=100,n.INDENT=50,e.exports=n},function(e,t){var n=function(e,t,n,r,i){switch(i=i||{},this.x=0,this.c=e,this.dx=t,this.w=n,this.pitch=r,this.scalex=i.scalex||1,this.scaley=i.scaley||1,this.type=i.type||"symbol",this.pitch2=i.pitch2,this.linewidth=i.linewidth,this.klass=i.klass,this.top=r,void 0!==this.pitch2&&this.pitch2>this.top&&(this.top=this.pitch2),this.bottom=r,void 0!==this.pitch2&&this.pitch2<this.bottom&&(this.bottom=this.pitch2),i.thickness&&(this.top+=i.thickness/2,this.bottom-=i.thickness/2),i.stemHeight&&(i.stemHeight>0?this.top+=i.stemHeight:this.bottom+=i.stemHeight),i.dim&&(this.dim=i.dim),i.position&&(this.position=i.position),this.height=i.height?i.height:4,i.top&&(this.top=i.top),i.bottom&&(this.bottom=i.bottom),i.realWidth?this.realWidth=i.realWidth:this.realWidth=this.w,this.centerVertically=!1,this.type){case"debug":this.chordHeightAbove=this.height;break;case"lyric":i.position&&"below"===i.position?this.lyricHeightBelow=this.height:this.lyricHeightAbove=this.height;break;case"chord":i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height;break;case"text":void 0===this.pitch?i.position&&"below"===i.position?this.chordHeightBelow=this.height:this.chordHeightAbove=this.height:this.centerVertically=!0;break;case"part":this.partHeightAbove=this.height}};n.prototype.getChordDim=function(){if("debug"===this.type)return null;if(!this.chordHeightAbove&&!this.chordHeightBelow)return null;var e=this.dim.font.size/4;1===this.c.length&&(e/=2);var t="chord"===this.type?this.realWidth/2:0,n=this.x-t-e;return{left:n,right:n+this.realWidth+e}},n.prototype.invertLane=function(e){void 0===this.lane&&(this.lane=0),this.lane=e-this.lane-1},n.prototype.putChordInLane=function(e){this.lane=e,this.chordHeightAbove?this.chordHeightAbove=1.25*this.height*this.lane:this.chordHeightBelow=1.25*this.height*this.lane},n.prototype.getLane=function(){return void 0===this.lane?0:this.lane},n.prototype.setX=function(e){this.x=e+this.dx},e.exports=n},function(e,t){e.exports=function(e){return parseFloat(e.toFixed(2))}},function(e,t,n){var r=n(3);e.exports=function(e,t){var n,i=t.y;if(t.lane){var a=.25*t.dim.font.size;i+=(t.dim.font.size+a)*t.lane}t.dim?(n=t.dim).attr.class=t.klass:n=e.controller.getFontAndAttr.calc(t.type,t.klass),t.anchor&&(n.attr["text-anchor"]=t.anchor),n.attr.x=t.x,n.attr.y=i,t.centerVertically||(n.attr.y+=n.font.size),"debugfont"===t.type&&(console.log("Debug msg: "+t.text),n.attr.stroke="#ff0000");var s=t.text.replace(/\n\n/g,"\n \n");s=s.replace(/^\n/," \n"),n.font.box&&(e.paper.openGroup({klass:n.attr.class,fill:"#000000"}),"end"===n.attr["text-anchor"]?n.attr.x-=n.font.padding:"start"===n.attr["text-anchor"]&&(n.attr.x+=n.font.padding),n.attr.y+=n.font.padding,delete n.attr.class),t.noClass&&delete n.attr.class,n.attr.x=r(n.attr.x),n.attr.y=r(n.attr.y);var o=e.paper.text(s,n.attr);if(n.font.box){var c=o.getBBox(),l=0;"middle"===n.attr["text-anchor"]?l=c.width/2+n.font.padding:"end"===n.attr["text-anchor"]&&(l=c.width+2*n.font.padding);var h=0;t.centerVertically&&(h=c.height-n.font.padding),e.paper.rect({x:Math.round(t.x-l),y:Math.round(i-h),width:Math.round(c.width+2*n.font.padding),height:Math.round(c.height+2*n.font.padding)}),o=e.paper.closeGroup()}return o}},function(e,t,n){var r=n(1),i={0:{d:[["M",4.83,-14.97],["c",.33,-.03,1.11,0,1.47,.06],["c",1.68,.36,2.97,1.59,3.78,3.6],["c",1.2,2.97,.81,6.96,-.9,9.27],["c",-.78,1.08,-1.71,1.71,-2.91,1.95],["c",-.45,.09,-1.32,.09,-1.77,0],["c",-.81,-.18,-1.47,-.51,-2.07,-1.02],["c",-2.34,-2.07,-3.15,-6.72,-1.74,-10.2],["c",.87,-2.16,2.28,-3.42,4.14,-3.66],["z"],["m",1.11,.87],["c",-.21,-.06,-.69,-.09,-.87,-.06],["c",-.54,.12,-.87,.42,-1.17,.99],["c",-.36,.66,-.51,1.56,-.6,3],["c",-.03,.75,-.03,4.59,0,5.31],["c",.09,1.5,.27,2.4,.6,3.06],["c",.24,.48,.57,.78,.96,.9],["c",.27,.09,.78,.09,1.05,0],["c",.39,-.12,.72,-.42,.96,-.9],["c",.33,-.66,.51,-1.56,.6,-3.06],["c",.03,-.72,.03,-4.56,0,-5.31],["c",-.09,-1.47,-.27,-2.37,-.6,-3.03],["c",-.24,-.48,-.54,-.78,-.93,-.9],["z"]],w:10.78,h:14.959},1:{d:[["M",3.3,-15.06],["c",.06,-.06,.21,-.03,.66,.15],["c",.81,.39,1.08,.39,1.83,.03],["c",.21,-.09,.39,-.15,.42,-.15],["c",.12,0,.21,.09,.27,.21],["c",.06,.12,.06,.33,.06,5.94],["c",0,3.93,0,5.85,.03,6.03],["c",.06,.36,.15,.69,.27,.96],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.12,-.27,.21,-.6,.27,-.96],["c",.03,-.18,.03,-1.59,.03,-4.29],["c",0,-3.87,0,-4.05,-.06,-4.14],["c",-.09,-.15,-.18,-.24,-.39,-.24],["c",-.12,0,-.15,.03,-.21,.06],["c",-.03,.06,-.45,.99,-.96,2.13],["c",-.48,1.14,-.9,2.1,-.93,2.16],["c",-.06,.15,-.21,.24,-.33,.24],["c",-.24,0,-.42,-.18,-.42,-.39],["c",0,-.06,3.27,-7.62,3.33,-7.74],["z"]],w:8.94,h:15.058},2:{d:[["M",4.23,-14.97],["c",.57,-.06,1.68,0,2.34,.18],["c",.69,.18,1.5,.54,2.01,.9],["c",1.35,.96,1.95,2.25,1.77,3.81],["c",-.15,1.35,-.66,2.34,-1.68,3.15],["c",-.6,.48,-1.44,.93,-3.12,1.65],["c",-1.32,.57,-1.8,.81,-2.37,1.14],["c",-.57,.33,-.57,.33,-.24,.27],["c",.39,-.09,1.26,-.09,1.68,0],["c",.72,.15,1.41,.45,2.1,.9],["c",.99,.63,1.86,.87,2.55,.75],["c",.24,-.06,.42,-.15,.57,-.3],["c",.12,-.09,.3,-.42,.3,-.51],["c",0,-.09,.12,-.21,.24,-.24],["c",.18,-.03,.39,.12,.39,.3],["c",0,.12,-.15,.57,-.3,.87],["c",-.54,1.02,-1.56,1.74,-2.79,2.01],["c",-.42,.09,-1.23,.09,-1.62,.03],["c",-.81,-.18,-1.32,-.45,-2.01,-1.11],["c",-.45,-.45,-.63,-.57,-.96,-.69],["c",-.84,-.27,-1.89,.12,-2.25,.9],["c",-.12,.21,-.21,.54,-.21,.72],["c",0,.12,-.12,.21,-.27,.24],["c",-.15,0,-.27,-.03,-.33,-.15],["c",-.09,-.21,.09,-1.08,.33,-1.71],["c",.24,-.66,.66,-1.26,1.29,-1.89],["c",.45,-.45,.9,-.81,1.92,-1.56],["c",1.29,-.93,1.89,-1.44,2.34,-1.98],["c",.87,-1.05,1.26,-2.19,1.2,-3.63],["c",-.06,-1.29,-.39,-2.31,-.96,-2.91],["c",-.36,-.33,-.72,-.51,-1.17,-.54],["c",-.84,-.03,-1.53,.42,-1.59,1.05],["c",-.03,.33,.12,.6,.57,1.14],["c",.45,.54,.54,.87,.42,1.41],["c",-.15,.63,-.54,1.11,-1.08,1.38],["c",-.63,.33,-1.2,.33,-1.83,0],["c",-.24,-.12,-.33,-.18,-.54,-.39],["c",-.18,-.18,-.27,-.3,-.36,-.51],["c",-.24,-.45,-.27,-.84,-.21,-1.38],["c",.12,-.75,.45,-1.41,1.02,-1.98],["c",.72,-.72,1.74,-1.17,2.85,-1.32],["z"]],w:10.764,h:14.97},3:{d:[["M",3.78,-14.97],["c",.3,-.03,1.41,0,1.83,.06],["c",2.22,.3,3.51,1.32,3.72,2.91],["c",.03,.33,.03,1.26,-.03,1.65],["c",-.12,.84,-.48,1.47,-1.05,1.77],["c",-.27,.15,-.36,.24,-.45,.39],["c",-.09,.21,-.09,.36,0,.57],["c",.09,.15,.18,.24,.51,.39],["c",.75,.42,1.23,1.14,1.41,2.13],["c",.06,.42,.06,1.35,0,1.71],["c",-.18,.81,-.48,1.38,-1.02,1.95],["c",-.75,.72,-1.8,1.2,-3.18,1.38],["c",-.42,.06,-1.56,.06,-1.95,0],["c",-1.89,-.33,-3.18,-1.29,-3.51,-2.64],["c",-.03,-.12,-.03,-.33,-.03,-.6],["c",0,-.36,0,-.42,.06,-.63],["c",.12,-.3,.27,-.51,.51,-.75],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.51,.36,-.63,.54,-.6,.87],["c",.06,.54,.54,.9,1.38,.99],["c",.36,.06,.72,.03,.96,-.06],["c",.81,-.27,1.29,-1.23,1.44,-2.79],["c",.03,-.45,.03,-1.95,-.03,-2.37],["c",-.09,-.75,-.33,-1.23,-.75,-1.44],["c",-.33,-.18,-.45,-.18,-1.98,-.18],["c",-1.35,0,-1.41,0,-1.5,-.06],["c",-.18,-.12,-.24,-.39,-.12,-.6],["c",.12,-.15,.15,-.15,1.68,-.15],["c",1.5,0,1.62,0,1.89,-.15],["c",.18,-.09,.42,-.36,.54,-.57],["c",.18,-.42,.27,-.9,.3,-1.95],["c",.03,-1.2,-.06,-1.8,-.36,-2.37],["c",-.24,-.48,-.63,-.81,-1.14,-.96],["c",-.3,-.06,-1.08,-.06,-1.38,.03],["c",-.6,.15,-.9,.42,-.96,.84],["c",-.03,.3,.06,.45,.63,.84],["c",.33,.24,.42,.39,.45,.63],["c",.03,.72,-.57,1.5,-1.32,1.65],["c",-1.05,.27,-2.1,-.57,-2.1,-1.65],["c",0,-.45,.15,-.96,.39,-1.38],["c",.12,-.21,.54,-.63,.81,-.81],["c",.57,-.42,1.38,-.69,2.25,-.81],["z"]],w:9.735,h:14.967},4:{d:[["M",8.64,-14.94],["c",.27,-.09,.42,-.12,.54,-.03],["c",.09,.06,.15,.21,.15,.3],["c",-.03,.06,-1.92,2.31,-4.23,5.04],["c",-2.31,2.73,-4.23,4.98,-4.26,5.01],["c",-.03,.06,.12,.06,2.55,.06],["l",2.61,0],["l",0,-2.37],["c",0,-2.19,.03,-2.37,.06,-2.46],["c",.03,-.06,.21,-.18,.57,-.42],["c",1.08,-.72,1.38,-1.08,1.86,-2.16],["c",.12,-.3,.24,-.54,.27,-.57],["c",.12,-.12,.39,-.06,.45,.12],["c",.06,.09,.06,.57,.06,3.96],["l",0,3.9],["l",1.08,0],["c",1.05,0,1.11,0,1.2,.06],["c",.24,.15,.24,.54,0,.69],["c",-.09,.06,-.15,.06,-1.2,.06],["l",-1.08,0],["l",0,.33],["c",0,.57,.09,1.11,.3,1.53],["c",.36,.75,.93,1.17,1.68,1.26],["c",.3,.03,.39,.09,.39,.3],["c",0,.15,-.03,.18,-.09,.24],["c",-.06,.06,-.09,.06,-.48,.06],["c",-.42,0,-.69,-.03,-2.1,-.24],["c",-.9,-.15,-1.77,-.15,-2.67,0],["c",-1.41,.21,-1.68,.24,-2.1,.24],["c",-.39,0,-.42,0,-.48,-.06],["c",-.06,-.06,-.06,-.09,-.06,-.24],["c",0,-.21,.06,-.27,.36,-.3],["c",.75,-.09,1.32,-.51,1.68,-1.26],["c",.21,-.42,.3,-.96,.3,-1.53],["l",0,-.33],["l",-2.7,0],["c",-2.91,0,-2.85,0,-3.09,-.15],["c",-.18,-.12,-.3,-.39,-.27,-.54],["c",.03,-.06,.18,-.24,.33,-.45],["c",.75,-.9,1.59,-2.07,2.13,-3.03],["c",.33,-.54,.84,-1.62,1.05,-2.16],["c",.57,-1.41,.84,-2.64,.9,-4.05],["c",.03,-.63,.06,-.72,.24,-.81],["l",.12,-.06],["l",.45,.12],["c",.66,.18,1.02,.24,1.47,.27],["c",.6,.03,1.23,-.09,2.01,-.33],["z"]],w:11.795,h:14.994},5:{d:[["M",1.02,-14.94],["c",.12,-.09,.03,-.09,1.08,.06],["c",2.49,.36,4.35,.36,6.96,-.06],["c",.57,-.09,.66,-.06,.81,.06],["c",.15,.18,.12,.24,-.15,.51],["c",-1.29,1.26,-3.24,2.04,-5.58,2.31],["c",-.6,.09,-1.2,.12,-1.71,.12],["c",-.39,0,-.45,0,-.57,.06],["c",-.09,.06,-.15,.12,-.21,.21],["l",-.06,.12],["l",0,1.65],["l",0,1.65],["l",.21,-.21],["c",.66,-.57,1.41,-.96,2.19,-1.14],["c",.33,-.06,1.41,-.06,1.95,0],["c",2.61,.36,4.02,1.74,4.26,4.14],["c",.03,.45,.03,1.08,-.03,1.44],["c",-.18,1.02,-.78,2.01,-1.59,2.7],["c",-.72,.57,-1.62,1.02,-2.49,1.2],["c",-1.38,.27,-3.03,.06,-4.2,-.54],["c",-1.08,-.54,-1.71,-1.32,-1.86,-2.28],["c",-.09,-.69,.09,-1.29,.57,-1.74],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.36,.33,.57,.75,.6,1.2],["c",0,.21,0,.27,-.06,.42],["c",-.09,.18,-.12,.24,-.54,.54],["c",-.18,.12,-.36,.3,-.42,.33],["c",-.36,.42,-.18,.99,.36,1.26],["c",.51,.27,1.47,.36,2.01,.27],["c",.93,-.21,1.47,-1.17,1.65,-2.91],["c",.06,-.45,.06,-1.89,0,-2.31],["c",-.15,-1.2,-.51,-2.1,-1.05,-2.55],["c",-.21,-.18,-.54,-.36,-.81,-.39],["c",-.3,-.06,-.84,-.03,-1.26,.06],["c",-.93,.18,-1.65,.6,-2.16,1.2],["c",-.15,.21,-.27,.3,-.39,.3],["c",-.15,0,-.3,-.09,-.36,-.18],["c",-.06,-.09,-.06,-.15,-.06,-3.66],["c",0,-3.39,0,-3.57,.06,-3.66],["c",.03,-.06,.09,-.15,.15,-.18],["z"]],w:10.212,h:14.997},6:{d:[["M",4.98,-14.97],["c",.36,-.03,1.2,0,1.59,.06],["c",.9,.15,1.68,.51,2.25,1.05],["c",.57,.51,.87,1.23,.84,1.98],["c",-.03,.51,-.21,.9,-.6,1.26],["c",-.24,.24,-.45,.39,-.75,.51],["c",-.21,.06,-.27,.06,-.6,.06],["c",-.33,0,-.39,0,-.6,-.06],["c",-.3,-.12,-.51,-.27,-.75,-.51],["c",-.39,-.36,-.57,-.78,-.57,-1.26],["c",0,-.27,0,-.3,.09,-.42],["c",.03,-.09,.18,-.21,.3,-.3],["c",.12,-.09,.3,-.21,.39,-.27],["c",.09,-.06,.21,-.18,.27,-.24],["c",.06,-.12,.09,-.15,.09,-.33],["c",0,-.18,-.03,-.24,-.09,-.36],["c",-.24,-.39,-.75,-.6,-1.38,-.57],["c",-.54,.03,-.9,.18,-1.23,.48],["c",-.81,.72,-1.08,2.16,-.96,5.37],["l",0,.63],["l",.3,-.12],["c",.78,-.27,1.29,-.33,2.1,-.27],["c",1.47,.12,2.49,.54,3.27,1.29],["c",.48,.51,.81,1.11,.96,1.89],["c",.06,.27,.06,.42,.06,.93],["c",0,.54,0,.69,-.06,.96],["c",-.15,.78,-.48,1.38,-.96,1.89],["c",-.54,.51,-1.17,.87,-1.98,1.08],["c",-1.14,.3,-2.4,.33,-3.24,.03],["c",-1.5,-.48,-2.64,-1.89,-3.27,-4.02],["c",-.36,-1.23,-.51,-2.82,-.42,-4.08],["c",.3,-3.66,2.28,-6.3,4.95,-6.66],["z"],["m",.66,7.41],["c",-.27,-.09,-.81,-.12,-1.08,-.06],["c",-.72,.18,-1.08,.69,-1.23,1.71],["c",-.06,.54,-.06,3,0,3.54],["c",.18,1.26,.72,1.77,1.8,1.74],["c",.39,-.03,.63,-.09,.9,-.27],["c",.66,-.42,.9,-1.32,.9,-3.24],["c",0,-2.22,-.36,-3.12,-1.29,-3.42],["z"]],w:9.956,h:14.982},7:{d:[["M",.21,-14.97],["c",.21,-.06,.45,0,.54,.15],["c",.06,.09,.06,.15,.06,.39],["c",0,.24,0,.33,.06,.42],["c",.06,.12,.21,.24,.27,.24],["c",.03,0,.12,-.12,.24,-.21],["c",.96,-1.2,2.58,-1.35,3.99,-.42],["c",.15,.12,.42,.3,.54,.45],["c",.48,.39,.81,.57,1.29,.6],["c",.69,.03,1.5,-.3,2.13,-.87],["c",.09,-.09,.27,-.3,.39,-.45],["c",.12,-.15,.24,-.27,.3,-.3],["c",.18,-.06,.39,.03,.51,.21],["c",.06,.18,.06,.24,-.27,.72],["c",-.18,.24,-.54,.78,-.78,1.17],["c",-2.37,3.54,-3.54,6.27,-3.87,9],["c",-.03,.33,-.03,.66,-.03,1.26],["c",0,.9,0,1.08,.15,1.89],["c",.06,.45,.06,.48,.03,.6],["c",-.06,.09,-.21,.21,-.3,.21],["c",-.03,0,-.27,-.06,-.54,-.15],["c",-.84,-.27,-1.11,-.3,-1.65,-.3],["c",-.57,0,-.84,.03,-1.56,.27],["c",-.6,.18,-.69,.21,-.81,.15],["c",-.12,-.06,-.21,-.18,-.21,-.3],["c",0,-.15,.6,-1.44,1.2,-2.61],["c",1.14,-2.22,2.73,-4.68,5.1,-8.01],["c",.21,-.27,.36,-.48,.33,-.48],["c",0,0,-.12,.06,-.27,.12],["c",-.54,.3,-.99,.39,-1.56,.39],["c",-.75,.03,-1.2,-.18,-1.83,-.75],["c",-.99,-.9,-1.83,-1.17,-2.31,-.72],["c",-.18,.15,-.36,.51,-.45,.84],["c",-.06,.24,-.06,.33,-.09,1.98],["c",0,1.62,-.03,1.74,-.06,1.8],["c",-.15,.24,-.54,.24,-.69,0],["c",-.06,-.09,-.06,-.15,-.06,-3.57],["c",0,-3.42,0,-3.48,.06,-3.57],["c",.03,-.06,.09,-.12,.15,-.15],["z"]],w:10.561,h:15.093},8:{d:[["M",4.98,-14.97],["c",.33,-.03,1.02,-.03,1.32,0],["c",1.32,.12,2.49,.6,3.21,1.32],["c",.39,.39,.66,.81,.78,1.29],["c",.09,.36,.09,1.08,0,1.44],["c",-.21,.84,-.66,1.59,-1.59,2.55],["l",-.3,.3],["l",.27,.18],["c",1.47,.93,2.31,2.31,2.25,3.75],["c",-.03,.75,-.24,1.35,-.63,1.95],["c",-.45,.66,-1.02,1.14,-1.83,1.53],["c",-1.8,.87,-4.2,.87,-6,.03],["c",-1.62,-.78,-2.52,-2.16,-2.46,-3.66],["c",.06,-.99,.54,-1.77,1.8,-2.97],["c",.54,-.51,.54,-.54,.48,-.57],["c",-.39,-.27,-.96,-.78,-1.2,-1.14],["c",-.75,-1.11,-.87,-2.4,-.3,-3.6],["c",.69,-1.35,2.25,-2.25,4.2,-2.4],["z"],["m",1.53,.69],["c",-.42,-.09,-1.11,-.12,-1.38,-.06],["c",-.3,.06,-.6,.18,-.81,.3],["c",-.21,.12,-.6,.51,-.72,.72],["c",-.51,.87,-.42,1.89,.21,2.52],["c",.21,.21,.36,.3,1.95,1.23],["c",.96,.54,1.74,.99,1.77,1.02],["c",.09,0,.63,-.6,.99,-1.11],["c",.21,-.36,.48,-.87,.57,-1.23],["c",.06,-.24,.06,-.36,.06,-.72],["c",0,-.45,-.03,-.66,-.15,-.99],["c",-.39,-.81,-1.29,-1.44,-2.49,-1.68],["z"],["m",-1.44,8.07],["l",-1.89,-1.08],["c",-.03,0,-.18,.15,-.39,.33],["c",-1.2,1.08,-1.65,1.95,-1.59,3],["c",.09,1.59,1.35,2.85,3.21,3.24],["c",.33,.06,.45,.06,.93,.06],["c",.63,0,.81,-.03,1.29,-.27],["c",.9,-.42,1.47,-1.41,1.41,-2.4],["c",-.06,-.66,-.39,-1.29,-.9,-1.65],["c",-.12,-.09,-1.05,-.63,-2.07,-1.23],["z"]],w:10.926,h:14.989},9:{d:[["M",4.23,-14.97],["c",.42,-.03,1.29,0,1.62,.06],["c",.51,.12,.93,.3,1.38,.57],["c",1.53,1.02,2.52,3.24,2.73,5.94],["c",.18,2.55,-.48,4.98,-1.83,6.57],["c",-1.05,1.26,-2.4,1.89,-3.93,1.83],["c",-1.23,-.06,-2.31,-.45,-3.03,-1.14],["c",-.57,-.51,-.87,-1.23,-.84,-1.98],["c",.03,-.51,.21,-.9,.6,-1.26],["c",.24,-.24,.45,-.39,.75,-.51],["c",.21,-.06,.27,-.06,.6,-.06],["c",.33,0,.39,0,.6,.06],["c",.3,.12,.51,.27,.75,.51],["c",.39,.36,.57,.78,.57,1.26],["c",0,.27,0,.3,-.09,.42],["c",-.03,.09,-.18,.21,-.3,.3],["c",-.12,.09,-.3,.21,-.39,.27],["c",-.09,.06,-.21,.18,-.27,.24],["c",-.06,.12,-.06,.15,-.06,.33],["c",0,.18,0,.24,.06,.36],["c",.24,.39,.75,.6,1.38,.57],["c",.54,-.03,.9,-.18,1.23,-.48],["c",.81,-.72,1.08,-2.16,.96,-5.37],["l",0,-.63],["l",-.3,.12],["c",-.78,.27,-1.29,.33,-2.1,.27],["c",-1.47,-.12,-2.49,-.54,-3.27,-1.29],["c",-.48,-.51,-.81,-1.11,-.96,-1.89],["c",-.06,-.27,-.06,-.42,-.06,-.96],["c",0,-.51,0,-.66,.06,-.93],["c",.15,-.78,.48,-1.38,.96,-1.89],["c",.15,-.12,.33,-.27,.42,-.36],["c",.69,-.51,1.62,-.81,2.76,-.93],["z"],["m",1.17,.66],["c",-.21,-.06,-.57,-.06,-.81,-.03],["c",-.78,.12,-1.26,.69,-1.41,1.74],["c",-.12,.63,-.15,1.95,-.09,2.79],["c",.12,1.71,.63,2.4,1.77,2.46],["c",1.08,.03,1.62,-.48,1.8,-1.74],["c",.06,-.54,.06,-3,0,-3.54],["c",-.15,-1.05,-.51,-1.53,-1.26,-1.68],["z"]],w:9.959,h:14.986},"rests.multimeasure":{d:[["M",0,-4],["l",0,16],["l",1,0],["l",0,-5],["l",40,0],["l",0,5],["l",1,0],["l",0,-16],["l",-1,0],["l",0,5],["l",-40,0],["l",0,-5],["z"]],w:42,h:18},"rests.whole":{d:[["M",.06,.03],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.half":{d:[["M",.06,-4.62],["l",.09,-.06],["l",5.46,0],["l",5.49,0],["l",.09,.06],["l",.06,.09],["l",0,2.19],["l",0,2.19],["l",-.06,.09],["l",-.09,.06],["l",-5.49,0],["l",-5.46,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-2.19],["l",0,-2.19],["z"]],w:11.25,h:4.68},"rests.quarter":{d:[["M",1.89,-11.82],["c",.12,-.06,.24,-.06,.36,-.03],["c",.09,.06,4.74,5.58,4.86,5.82],["c",.21,.39,.15,.78,-.15,1.26],["c",-.24,.33,-.72,.81,-1.62,1.56],["c",-.45,.36,-.87,.75,-.96,.84],["c",-.93,.99,-1.14,2.49,-.6,3.63],["c",.18,.39,.27,.48,1.32,1.68],["c",1.92,2.25,1.83,2.16,1.83,2.34],["c",0,.18,-.18,.36,-.36,.39],["c",-.15,0,-.27,-.06,-.48,-.27],["c",-.75,-.75,-2.46,-1.29,-3.39,-1.08],["c",-.45,.09,-.69,.27,-.9,.69],["c",-.12,.3,-.21,.66,-.24,1.14],["c",-.03,.66,.09,1.35,.3,2.01],["c",.15,.42,.24,.66,.45,.96],["c",.18,.24,.18,.33,.03,.42],["c",-.12,.06,-.18,.03,-.45,-.3],["c",-1.08,-1.38,-2.07,-3.36,-2.4,-4.83],["c",-.27,-1.05,-.15,-1.77,.27,-2.07],["c",.21,-.12,.42,-.15,.87,-.15],["c",.87,.06,2.1,.39,3.3,.9],["l",.39,.18],["l",-1.65,-1.95],["c",-2.52,-2.97,-2.61,-3.09,-2.7,-3.27],["c",-.09,-.24,-.12,-.48,-.03,-.75],["c",.15,-.48,.57,-.96,1.83,-2.01],["c",.45,-.36,.84,-.72,.93,-.78],["c",.69,-.75,1.02,-1.8,.9,-2.79],["c",-.06,-.33,-.21,-.84,-.39,-1.11],["c",-.09,-.15,-.45,-.6,-.81,-1.05],["c",-.36,-.42,-.69,-.81,-.72,-.87],["c",-.09,-.18,0,-.42,.21,-.51],["z"]],w:7.888,h:21.435},"rests.8th":{d:[["M",1.68,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.33,-.09],["c",.39,-.18,1.32,-1.29,1.68,-1.98],["c",.09,-.21,.24,-.3,.39,-.3],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.27,1.11,-1.86,6.42],["c",-1.02,3.48,-1.89,6.39,-1.92,6.42],["c",0,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.15,-.57,1.68,-4.92],["c",.96,-2.67,1.74,-4.89,1.71,-4.89],["l",-.51,.15],["c",-1.08,.36,-1.74,.48,-2.55,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:7.534,h:13.883},"rests.16th":{d:[["M",3.33,-6.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.87,.42],["c",.39,-.18,1.2,-1.23,1.62,-2.07],["c",.06,-.15,.24,-.24,.36,-.24],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.45,1.86,-2.67,10.17],["c",-1.5,5.55,-2.73,10.14,-2.76,10.17],["c",-.03,.03,-.12,.12,-.24,.15],["c",-.18,.09,-.21,.09,-.45,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.12,-.57,1.44,-4.92],["c",.81,-2.67,1.47,-4.86,1.47,-4.89],["c",-.03,0,-.27,.06,-.54,.15],["c",-1.08,.36,-1.77,.48,-2.58,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.12,0,.18,0,.33,-.09],["c",.33,-.15,1.02,-.93,1.41,-1.59],["c",.12,-.21,.18,-.39,.39,-1.08],["c",.66,-2.1,1.17,-3.84,1.17,-3.87],["c",0,0,-.21,.06,-.42,.15],["c",-.51,.15,-1.2,.33,-1.68,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:9.724,h:21.383},"rests.32nd":{d:[["M",4.23,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.12,0,.18,0,.27,-.06],["c",.33,-.21,.99,-1.11,1.44,-1.98],["c",.09,-.24,.21,-.33,.39,-.33],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.57,2.67,-3.21,13.89],["c",-1.8,7.62,-3.3,13.89,-3.3,13.92],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.09,-.57,1.23,-4.92],["c",.69,-2.67,1.26,-4.86,1.29,-4.89],["c",0,-.03,-.12,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.12,.09,.3,.18,.48,.21],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.29,-1.29,1.56,-1.89],["c",.03,-.12,1.23,-4.59,1.23,-4.65],["c",0,-.03,-.18,.03,-.39,.12],["c",-.63,.18,-1.2,.36,-1.74,.45],["c",-.39,.06,-.54,.06,-1.02,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.18,.18,.51,.27,.72,.15],["c",.3,-.12,.69,-.57,1.08,-1.17],["c",.42,-.6,.39,-.51,1.05,-3.03],["c",.33,-1.26,.6,-2.31,.6,-2.34],["c",0,0,-.21,.03,-.45,.12],["c",-.57,.18,-1.14,.33,-1.62,.42],["c",-.33,.06,-.51,.06,-.96,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:11.373,h:28.883},"rests.64th":{d:[["M",5.13,-13.62],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.54,.3,.75,.18],["c",.24,-.12,.63,-.66,1.08,-1.56],["c",.33,-.66,.39,-.72,.6,-.72],["c",.12,0,.27,.09,.33,.18],["c",.03,.06,-.69,3.66,-3.54,17.64],["c",-1.95,9.66,-3.57,17.61,-3.57,17.64],["c",-.03,.06,-.12,.12,-.24,.18],["c",-.21,.09,-.24,.09,-.48,.09],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.06,-.57,1.05,-4.95],["c",.6,-2.7,1.08,-4.89,1.08,-4.92],["c",0,0,-.24,.06,-.51,.15],["c",-.66,.24,-1.2,.36,-1.77,.48],["c",-.42,.06,-.57,.06,-1.05,.06],["c",-.69,0,-.87,-.03,-1.35,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.72,-1.05,2.22,-1.23,3.06,-.42],["c",.3,.33,.42,.6,.6,1.38],["c",.09,.45,.21,.78,.33,.9],["c",.09,.09,.27,.18,.45,.21],["c",.21,.03,.39,-.09,.72,-.42],["c",.45,-.45,1.02,-1.26,1.17,-1.65],["c",.03,-.09,.27,-1.14,.54,-2.34],["c",.27,-1.2,.48,-2.19,.51,-2.22],["c",0,-.03,-.09,-.03,-.48,.12],["c",-1.17,.39,-2.22,.57,-3,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.15,.39,.57,.57,.9,.42],["c",.36,-.18,1.2,-1.26,1.47,-1.89],["c",.03,-.09,.3,-1.2,.57,-2.43],["l",.51,-2.28],["l",-.54,.18],["c",-1.11,.36,-1.8,.48,-2.61,.48],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.21,.21,.54,.3,.75,.18],["c",.36,-.18,.93,-.93,1.29,-1.68],["c",.12,-.24,.18,-.48,.63,-2.55],["l",.51,-2.31],["c",0,-.03,-.18,.03,-.39,.12],["c",-1.14,.36,-2.1,.54,-2.82,.51],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.453,h:36.383},"rests.128th":{d:[["M",6.03,-21.12],["c",.66,-.09,1.23,.09,1.68,.51],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.21,0,.33,-.06,.54,-.36],["c",.15,-.21,.54,-.93,.78,-1.47],["c",.15,-.33,.18,-.39,.3,-.48],["c",.18,-.09,.45,0,.51,.15],["c",.03,.09,-7.11,42.75,-7.17,42.84],["c",-.03,.03,-.15,.09,-.24,.15],["c",-.18,.06,-.24,.06,-.45,.06],["c",-.24,0,-.3,0,-.48,-.06],["c",-.09,-.06,-.21,-.12,-.21,-.15],["c",-.06,-.03,.03,-.57,.84,-4.98],["c",.51,-2.7,.93,-4.92,.9,-4.92],["c",0,0,-.15,.06,-.36,.12],["c",-.78,.27,-1.62,.48,-2.31,.57],["c",-.15,.03,-.54,.03,-.81,.03],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.63,.48],["c",.12,0,.18,0,.3,-.09],["c",.42,-.21,1.14,-1.11,1.5,-1.83],["c",.12,-.27,.12,-.27,.54,-2.52],["c",.24,-1.23,.42,-2.25,.39,-2.25],["c",0,0,-.24,.06,-.51,.18],["c",-1.26,.39,-2.25,.57,-3.06,.54],["c",-.42,-.03,-.75,-.12,-1.11,-.3],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.21,.51,.3,.75,.18],["c",.36,-.15,1.05,-.99,1.41,-1.77],["l",.15,-.3],["l",.42,-2.25],["c",.21,-1.26,.42,-2.28,.39,-2.28],["l",-.51,.15],["c",-1.11,.39,-1.89,.51,-2.7,.51],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.15,.63,.21,.81,.33,.96],["c",.18,.18,.48,.27,.72,.21],["c",.33,-.12,1.14,-1.26,1.41,-1.95],["c",0,-.09,.21,-1.11,.45,-2.34],["c",.21,-1.2,.39,-2.22,.39,-2.28],["c",.03,-.03,0,-.03,-.45,.12],["c",-.57,.18,-1.2,.33,-1.71,.42],["c",-.3,.06,-.51,.06,-.93,.06],["c",-.66,0,-.84,-.03,-1.32,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.36,-.54,.96,-.87,1.65,-.93],["c",.54,-.03,1.02,.15,1.41,.54],["c",.27,.3,.39,.54,.57,1.26],["c",.09,.33,.18,.66,.21,.72],["c",.12,.27,.33,.45,.6,.48],["c",.18,0,.36,-.09,.57,-.33],["c",.33,-.36,.78,-1.14,.93,-1.56],["c",.03,-.12,.24,-1.2,.45,-2.4],["c",.24,-1.2,.42,-2.22,.42,-2.28],["c",.03,-.03,0,-.03,-.39,.09],["c",-1.05,.36,-1.8,.48,-2.58,.48],["c",-.63,0,-.84,-.03,-1.29,-.27],["c",-1.32,-.63,-1.77,-2.16,-1.02,-3.3],["c",.33,-.45,.84,-.81,1.38,-.9],["z"]],w:12.992,h:43.883},"accidentals.sharp":{d:[["M",5.73,-11.19],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.31],["c",0,1.23,0,2.22,.03,2.22],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.43],["c",0,1.32,0,2.43,.03,2.43],["c",0,0,.27,-.12,.6,-.24],["c",.69,-.27,.78,-.3,.96,-.15],["c",.21,.15,.21,.18,.21,1.38],["c",0,1.02,0,1.11,-.06,1.2],["c",-.03,.06,-.09,.12,-.12,.15],["c",-.06,.03,-.42,.21,-.84,.36],["l",-.75,.33],["l",-.03,2.52],["c",0,2.28,-.03,2.55,-.06,2.64],["c",-.21,.36,-.72,.36,-.93,0],["c",-.03,-.09,-.06,-.33,-.06,-2.43],["l",0,-2.31],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.43],["c",0,2.58,0,2.52,-.15,2.67],["c",-.06,.09,-.27,.18,-.36,.18],["c",-.12,0,-.33,-.09,-.39,-.18],["c",-.15,-.15,-.15,-.09,-.15,-2.43],["c",0,-1.23,0,-2.22,-.03,-2.22],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.43],["c",0,-1.32,0,-2.43,-.03,-2.43],["c",0,0,-.27,.12,-.6,.24],["c",-.69,.27,-.78,.3,-.96,.15],["c",-.21,-.15,-.21,-.18,-.21,-1.38],["c",0,-1.02,0,-1.11,.06,-1.2],["c",.03,-.06,.09,-.12,.12,-.15],["c",.06,-.03,.42,-.21,.84,-.36],["l",.78,-.33],["l",0,-2.52],["c",0,-2.28,.03,-2.55,.06,-2.64],["c",.21,-.36,.72,-.36,.93,0],["c",.03,.09,.06,.33,.06,2.43],["l",.03,2.31],["l",1.26,-.51],["l",1.26,-.51],["l",0,-2.43],["c",0,-2.28,0,-2.43,.06,-2.55],["c",.06,-.12,.12,-.18,.27,-.24],["z"],["m",-.33,10.65],["l",0,-2.43],["l",-1.29,.51],["l",-1.26,.51],["l",0,2.46],["l",0,2.43],["l",.09,-.03],["c",.06,-.03,.63,-.27,1.29,-.51],["l",1.17,-.48],["l",0,-2.46],["z"]],w:8.25,h:22.462},"accidentals.halfsharp":{d:[["M",2.43,-10.05],["c",.21,-.12,.54,-.03,.66,.24],["c",.06,.12,.06,.21,.06,2.01],["c",0,1.05,0,1.89,.03,1.89],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.37],["c",0,1.32,0,2.37,.03,2.37],["l",.72,-.48],["c",.69,-.48,.69,-.51,.87,-.51],["c",.15,0,.18,.03,.27,.09],["c",.21,.15,.21,.18,.21,1.41],["c",0,1.11,-.03,1.14,-.09,1.23],["c",-.03,.03,-.48,.39,-1.02,.75],["l",-.99,.66],["l",0,2.25],["c",0,1.95,0,2.28,-.06,2.37],["c",-.06,.12,-.12,.21,-.24,.27],["c",-.27,.12,-.54,.03,-.69,-.24],["c",-.06,-.12,-.06,-.21,-.06,-2.01],["c",0,-1.05,0,-1.89,-.03,-1.89],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.37],["c",0,-1.32,0,-2.37,-.03,-2.37],["l",-.72,.48],["c",-.69,.48,-.69,.48,-.87,.48],["c",-.15,0,-.18,0,-.27,-.06],["c",-.21,-.15,-.21,-.18,-.21,-1.41],["c",0,-1.11,.03,-1.14,.09,-1.23],["c",.03,-.03,.48,-.39,1.02,-.75],["l",.99,-.66],["l",0,-2.25],["c",0,-2.13,0,-2.28,.06,-2.4],["c",.06,-.12,.12,-.18,.27,-.24],["z"]],w:5.25,h:20.174},"accidentals.nat":{d:[["M",.21,-11.4],["c",.24,-.06,.78,0,.99,.15],["c",.03,.03,.03,.48,0,2.61],["c",-.03,1.44,-.03,2.61,-.03,2.61],["c",0,.03,.75,-.09,1.68,-.24],["c",.96,-.18,1.71,-.27,1.74,-.27],["c",.15,.03,.27,.15,.36,.3],["l",.06,.12],["l",.09,8.67],["c",.09,6.96,.12,8.67,.09,8.67],["c",-.03,.03,-.12,.06,-.21,.09],["c",-.24,.09,-.72,.09,-.96,0],["c",-.09,-.03,-.18,-.06,-.21,-.09],["c",-.03,-.03,-.03,-.48,0,-2.61],["c",.03,-1.44,.03,-2.61,.03,-2.61],["c",0,-.03,-.75,.09,-1.68,.24],["c",-.96,.18,-1.71,.27,-1.74,.27],["c",-.15,-.03,-.27,-.15,-.36,-.3],["l",-.06,-.15],["l",-.09,-7.53],["c",-.06,-4.14,-.09,-8.04,-.12,-8.67],["l",0,-1.11],["l",.15,-.06],["c",.09,-.03,.21,-.06,.27,-.09],["z"],["m",3.75,8.4],["c",0,-.33,0,-.42,-.03,-.42],["c",-.12,0,-2.79,.45,-2.79,.48],["c",-.03,0,-.09,6.3,-.09,6.33],["c",.03,0,2.79,-.45,2.82,-.48],["c",0,0,.09,-4.53,.09,-5.91],["z"]],w:5.4,h:22.8},"accidentals.flat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:6.75,h:18.801},"accidentals.halfflat":{d:[["M",4.83,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.6,-.12,9.06],["c",-.09,5.55,-.15,9.06,-.18,9.12],["c",-.03,.09,-.09,.18,-.15,.27],["c",-.24,.21,-.54,.24,-.81,.06],["c",-.06,-.03,-.27,-.24,-.45,-.42],["c",-.36,-.42,-.66,-.66,-1.8,-1.44],["c",-1.23,-.84,-1.83,-1.32,-2.25,-1.77],["c",-.66,-.78,-.96,-1.56,-.93,-2.46],["c",.09,-1.41,1.11,-2.58,2.4,-2.79],["c",.3,-.06,.84,-.03,1.23,.06],["c",.54,.12,1.08,.33,1.53,.63],["c",.12,.09,.24,.15,.24,.12],["c",0,0,-.12,-8.37,-.18,-9.75],["l",0,-.66],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",-1.65,10.95],["c",-.6,-.18,-1.08,.09,-1.38,.69],["c",-.27,.6,-.36,1.38,-.18,2.07],["c",.12,.42,.42,.99,.72,1.41],["c",.3,.42,.93,1.05,1.56,1.59],["l",.48,.39],["l",0,-.12],["c",.03,-.09,.03,-.48,.06,-.9],["c",.03,-.57,.03,-1.08,0,-2.22],["c",-.03,-1.62,-.03,-1.62,-.24,-2.07],["c",-.21,-.42,-.6,-.75,-1.02,-.84],["z"]],w:6.728,h:18.801},"accidentals.dblflat":{d:[["M",-.36,-14.07],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"],["m",3,-11],["c",.33,-.06,.87,0,1.08,.15],["c",.06,.03,.06,.36,-.03,5.25],["c",-.06,2.85,-.09,5.19,-.09,5.19],["c",0,.03,.12,-.03,.24,-.12],["c",.63,-.42,1.41,-.66,2.19,-.72],["c",.81,-.03,1.47,.21,2.04,.78],["c",.57,.54,.87,1.26,.93,2.04],["c",.03,.57,-.09,1.08,-.36,1.62],["c",-.42,.81,-1.02,1.38,-2.82,2.61],["c",-1.14,.78,-1.44,1.02,-1.8,1.44],["c",-.18,.18,-.39,.39,-.45,.42],["c",-.27,.18,-.57,.15,-.81,-.06],["c",-.06,-.09,-.12,-.18,-.15,-.27],["c",-.03,-.06,-.09,-3.27,-.18,-8.34],["c",-.09,-4.53,-.15,-8.58,-.18,-9.03],["l",0,-.78],["l",.12,-.06],["c",.06,-.03,.18,-.09,.27,-.12],["z"],["m",3.18,11.01],["c",-.21,-.12,-.54,-.15,-.81,-.06],["c",-.54,.15,-.99,.63,-1.17,1.26],["c",-.06,.3,-.12,2.88,-.06,3.87],["c",.03,.42,.03,.81,.06,.9],["l",.03,.12],["l",.45,-.39],["c",.63,-.54,1.26,-1.17,1.56,-1.59],["c",.3,-.42,.6,-.99,.72,-1.41],["c",.18,-.69,.09,-1.47,-.18,-2.07],["c",-.15,-.3,-.33,-.51,-.6,-.63],["z"]],w:12.1,h:18.804},"accidentals.dblsharp":{d:[["M",-.18,-3.96],["c",.06,-.03,.12,-.06,.15,-.06],["c",.09,0,2.76,.27,2.79,.3],["c",.12,.03,.15,.12,.15,.51],["c",.06,.96,.24,1.59,.57,2.1],["c",.06,.09,.15,.21,.18,.24],["l",.09,.06],["l",.09,-.06],["c",.03,-.03,.12,-.15,.18,-.24],["c",.33,-.51,.51,-1.14,.57,-2.1],["c",0,-.39,.03,-.45,.12,-.51],["c",.03,0,.66,-.09,1.44,-.15],["c",1.47,-.15,1.5,-.15,1.56,-.03],["c",.03,.06,0,.42,-.09,1.44],["c",-.09,.72,-.15,1.35,-.15,1.38],["c",0,.03,-.03,.09,-.06,.12],["c",-.06,.06,-.12,.09,-.51,.09],["c",-1.08,.06,-1.8,.3,-2.28,.75],["l",-.12,.09],["l",.09,.09],["c",.12,.15,.39,.33,.63,.45],["c",.42,.18,.96,.27,1.68,.33],["c",.39,0,.45,.03,.51,.09],["c",.03,.03,.06,.09,.06,.12],["c",0,.03,.06,.66,.15,1.38],["c",.09,1.02,.12,1.38,.09,1.44],["c",-.06,.12,-.09,.12,-1.56,-.03],["c",-.78,-.06,-1.41,-.15,-1.44,-.15],["c",-.09,-.06,-.12,-.12,-.12,-.54],["c",-.06,-.93,-.24,-1.56,-.57,-2.07],["c",-.06,-.09,-.15,-.21,-.18,-.24],["l",-.09,-.06],["l",-.09,.06],["c",-.03,.03,-.12,.15,-.18,.24],["c",-.33,.51,-.51,1.14,-.57,2.07],["c",0,.42,-.03,.48,-.12,.54],["c",-.03,0,-.66,.09,-1.44,.15],["c",-1.47,.15,-1.5,.15,-1.56,.03],["c",-.03,-.06,0,-.42,.09,-1.44],["c",.09,-.72,.15,-1.35,.15,-1.38],["c",0,-.03,.03,-.09,.06,-.12],["c",.06,-.06,.12,-.09,.51,-.09],["c",.72,-.06,1.26,-.15,1.68,-.33],["c",.24,-.12,.51,-.3,.63,-.45],["l",.09,-.09],["l",-.12,-.09],["c",-.48,-.45,-1.2,-.69,-2.28,-.75],["c",-.39,0,-.45,-.03,-.51,-.09],["c",-.03,-.03,-.06,-.09,-.06,-.12],["c",0,-.03,-.06,-.63,-.12,-1.38],["c",-.09,-.72,-.15,-1.35,-.15,-1.38],["z"]],w:7.95,h:7.977},"dots.dot":{d:[["M",1.32,-1.68],["c",.09,-.03,.27,-.06,.39,-.06],["c",.96,0,1.74,.78,1.74,1.71],["c",0,.96,-.78,1.74,-1.71,1.74],["c",-.96,0,-1.74,-.78,-1.74,-1.71],["c",0,-.78,.54,-1.5,1.32,-1.68],["z"]],w:3.45,h:3.45},"noteheads.dbl":{d:[["M",-.69,-4.02],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["c",.06,.15,.06,.18,.06,1.41],["l",0,1.23],["l",.12,-.18],["c",.72,-1.26,2.64,-2.31,4.86,-2.64],["c",.81,-.15,1.11,-.15,2.13,-.15],["c",.99,0,1.29,0,2.1,.15],["c",.75,.12,1.38,.27,2.04,.54],["c",1.35,.51,2.34,1.26,2.82,2.1],["l",.12,.18],["l",0,-1.23],["c",0,-1.2,0,-1.26,.06,-1.38],["c",.09,-.18,.15,-.24,.33,-.33],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,3.54],["l",0,3.54],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.38],["l",0,-1.23],["l",-.12,.18],["c",-.48,.84,-1.47,1.59,-2.82,2.1],["c",-.84,.33,-1.71,.54,-2.85,.66],["c",-.45,.06,-2.16,.06,-2.61,0],["c",-1.14,-.12,-2.01,-.33,-2.85,-.66],["c",-1.35,-.51,-2.34,-1.26,-2.82,-2.1],["l",-.12,-.18],["l",0,1.23],["c",0,1.23,0,1.26,-.06,1.38],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-3.54],["c",0,-3.48,0,-3.54,.06,-3.66],["c",.09,-.18,.15,-.24,.33,-.33],["z"],["m",7.71,.63],["c",-.36,-.06,-.9,-.06,-1.14,0],["c",-.3,.03,-.66,.24,-.87,.42],["c",-.6,.54,-.9,1.62,-.75,2.82],["c",.12,.93,.51,1.68,1.11,2.31],["c",.75,.72,1.83,1.2,2.85,1.26],["c",1.05,.06,1.83,-.54,2.1,-1.65],["c",.21,-.9,.12,-1.95,-.24,-2.82],["c",-.36,-.81,-1.08,-1.53,-1.95,-1.95],["c",-.3,-.15,-.78,-.3,-1.11,-.39],["z"]],w:16.83,h:8.145},"noteheads.whole":{d:[["M",6.51,-4.05],["c",.51,-.03,2.01,0,2.52,.03],["c",1.41,.18,2.64,.51,3.72,1.08],["c",1.2,.63,1.95,1.41,2.19,2.31],["c",.09,.33,.09,.9,0,1.23],["c",-.24,.9,-.99,1.68,-2.19,2.31],["c",-1.08,.57,-2.28,.9,-3.75,1.08],["c",-.66,.06,-2.31,.06,-2.97,0],["c",-1.47,-.18,-2.67,-.51,-3.75,-1.08],["c",-1.2,-.63,-1.95,-1.41,-2.19,-2.31],["c",-.09,-.33,-.09,-.9,0,-1.23],["c",.24,-.9,.99,-1.68,2.19,-2.31],["c",1.2,-.63,2.61,-.99,4.23,-1.11],["z"],["m",.57,.66],["c",-.87,-.15,-1.53,0,-2.04,.51],["c",-.15,.15,-.24,.27,-.33,.48],["c",-.24,.51,-.36,1.08,-.33,1.77],["c",.03,.69,.18,1.26,.42,1.77],["c",.6,1.17,1.74,1.98,3.18,2.22],["c",1.11,.21,1.95,-.15,2.34,-.99],["c",.24,-.51,.36,-1.08,.33,-1.8],["c",-.06,-1.11,-.45,-2.04,-1.17,-2.76],["c",-.63,-.63,-1.47,-1.05,-2.4,-1.2],["z"]],w:14.985,h:8.097},"noteheads.half":{d:[["M",7.44,-4.05],["c",.06,-.03,.27,-.03,.48,-.03],["c",1.05,0,1.71,.24,2.1,.81],["c",.42,.6,.45,1.35,.18,2.4],["c",-.42,1.59,-1.14,2.73,-2.16,3.39],["c",-1.41,.93,-3.18,1.44,-5.4,1.53],["c",-1.17,.03,-1.89,-.21,-2.28,-.81],["c",-.42,-.6,-.45,-1.35,-.18,-2.4],["c",.42,-1.59,1.14,-2.73,2.16,-3.39],["c",.63,-.42,1.23,-.72,1.98,-.96],["c",.9,-.3,1.65,-.42,3.12,-.54],["z"],["m",1.29,.87],["c",-.27,-.09,-.63,-.12,-.9,-.03],["c",-.72,.24,-1.53,.69,-3.27,1.8],["c",-2.34,1.5,-3.3,2.25,-3.57,2.79],["c",-.36,.72,-.06,1.5,.66,1.77],["c",.24,.12,.69,.09,.99,0],["c",.84,-.3,1.92,-.93,4.14,-2.37],["c",1.62,-1.08,2.37,-1.71,2.61,-2.19],["c",.36,-.72,.06,-1.5,-.66,-1.77],["z"]],w:10.37,h:8.132},"noteheads.quarter":{d:[["M",6.09,-4.05],["c",.36,-.03,1.2,0,1.53,.06],["c",1.17,.24,1.89,.84,2.16,1.83],["c",.06,.18,.06,.3,.06,.66],["c",0,.45,0,.63,-.15,1.08],["c",-.66,2.04,-3.06,3.93,-5.52,4.38],["c",-.54,.09,-1.44,.09,-1.83,.03],["c",-1.23,-.27,-1.98,-.87,-2.25,-1.86],["c",-.06,-.18,-.06,-.3,-.06,-.66],["c",0,-.45,0,-.63,.15,-1.08],["c",.24,-.78,.75,-1.53,1.44,-2.22],["c",1.2,-1.2,2.85,-2.01,4.47,-2.22],["z"]],w:9.81,h:8.094},"noteheads.slash.nostem":{d:[["M",9.3,-7.77],["c",.06,-.06,.18,-.06,1.71,-.06],["l",1.65,0],["l",.09,.09],["c",.06,.06,.06,.09,.06,.15],["c",-.03,.12,-9.21,15.24,-9.3,15.33],["c",-.06,.06,-.18,.06,-1.71,.06],["l",-1.65,0],["l",-.09,-.09],["c",-.06,-.06,-.06,-.09,-.06,-.15],["c",.03,-.12,9.21,-15.24,9.3,-15.33],["z"]],w:12.81,h:15.63},"noteheads.indeterminate":{d:[["M",.78,-4.05],["c",.12,-.03,.24,-.03,.36,.03],["c",.03,.03,.93,.72,1.95,1.56],["l",1.86,1.5],["l",1.86,-1.5],["c",1.02,-.84,1.92,-1.53,1.95,-1.56],["c",.21,-.12,.33,-.09,.75,.24],["c",.3,.27,.36,.36,.36,.54],["c",0,.03,-.03,.12,-.06,.18],["c",-.03,.06,-.9,.75,-1.89,1.56],["l",-1.8,1.47],["c",0,.03,.81,.69,1.8,1.5],["c",.99,.81,1.86,1.5,1.89,1.56],["c",.03,.06,.06,.15,.06,.18],["c",0,.18,-.06,.27,-.36,.54],["c",-.42,.33,-.54,.36,-.75,.24],["c",-.03,-.03,-.93,-.72,-1.95,-1.56],["l",-1.86,-1.5],["l",-1.86,1.5],["c",-1.02,.84,-1.92,1.53,-1.95,1.56],["c",-.21,.12,-.33,.09,-.75,-.24],["c",-.3,-.27,-.36,-.36,-.36,-.54],["c",0,-.03,.03,-.12,.06,-.18],["c",.03,-.06,.9,-.75,1.89,-1.56],["l",1.8,-1.47],["c",0,-.03,-.81,-.69,-1.8,-1.5],["c",-.99,-.81,-1.86,-1.5,-1.89,-1.56],["c",-.06,-.12,-.09,-.21,-.03,-.36],["c",.03,-.09,.57,-.57,.72,-.63],["z"]],w:9.843,h:8.139},"scripts.ufermata":{d:[["M",-.75,-10.77],["c",.12,0,.45,-.03,.69,-.03],["c",2.91,-.03,5.55,1.53,7.41,4.35],["c",1.17,1.71,1.95,3.72,2.43,6.03],["c",.12,.51,.12,.57,.03,.69],["c",-.12,.21,-.48,.27,-.69,.12],["c",-.12,-.09,-.18,-.24,-.27,-.69],["c",-.78,-3.63,-3.42,-6.54,-6.78,-7.38],["c",-.78,-.21,-1.2,-.24,-2.07,-.24],["c",-.63,0,-.84,0,-1.2,.06],["c",-1.83,.27,-3.42,1.08,-4.8,2.37],["c",-1.41,1.35,-2.4,3.21,-2.85,5.19],["c",-.09,.45,-.15,.6,-.27,.69],["c",-.21,.15,-.57,.09,-.69,-.12],["c",-.09,-.12,-.09,-.18,.03,-.69],["c",.33,-1.62,.78,-3,1.47,-4.38],["c",1.77,-3.54,4.44,-5.67,7.56,-5.97],["z"],["m",.33,7.47],["c",1.38,-.3,2.58,.9,2.31,2.25],["c",-.15,.72,-.78,1.35,-1.47,1.5],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.748,h:11.289},"scripts.dfermata":{d:[["M",-9.63,-.42],["c",.15,-.09,.36,-.06,.51,.03],["c",.12,.09,.18,.24,.27,.66],["c",.78,3.66,3.42,6.57,6.78,7.41],["c",.78,.21,1.2,.24,2.07,.24],["c",.63,0,.84,0,1.2,-.06],["c",1.83,-.27,3.42,-1.08,4.8,-2.37],["c",1.41,-1.35,2.4,-3.21,2.85,-5.22],["c",.09,-.42,.15,-.57,.27,-.66],["c",.21,-.15,.57,-.09,.69,.12],["c",.09,.12,.09,.18,-.03,.69],["c",-.33,1.62,-.78,3,-1.47,4.38],["c",-1.92,3.84,-4.89,6,-8.31,6],["c",-3.42,0,-6.39,-2.16,-8.31,-6],["c",-.48,-.96,-.84,-1.92,-1.14,-2.97],["c",-.18,-.69,-.42,-1.74,-.42,-1.92],["c",0,-.12,.09,-.27,.24,-.33],["z"],["m",9.21,0],["c",1.2,-.27,2.34,.63,2.34,1.86],["c",0,.9,-.66,1.68,-1.5,1.89],["c",-1.38,.27,-2.58,-.93,-2.31,-2.31],["c",.15,-.69,.78,-1.29,1.47,-1.44],["z"]],w:19.744,h:11.274},"scripts.sforzato":{d:[["M",-6.45,-3.69],["c",.06,-.03,.15,-.06,.18,-.06],["c",.06,0,2.85,.72,6.24,1.59],["l",6.33,1.65],["c",.33,.06,.45,.21,.45,.51],["c",0,.3,-.12,.45,-.45,.51],["l",-6.33,1.65],["c",-3.39,.87,-6.18,1.59,-6.21,1.59],["c",-.21,0,-.48,-.24,-.51,-.45],["c",0,-.15,.06,-.36,.18,-.45],["c",.09,-.06,.87,-.27,3.84,-1.05],["c",2.04,-.54,3.84,-.99,4.02,-1.02],["c",.15,-.06,1.14,-.24,2.22,-.42],["c",1.05,-.18,1.92,-.36,1.92,-.36],["c",0,0,-.87,-.18,-1.92,-.36],["c",-1.08,-.18,-2.07,-.36,-2.22,-.42],["c",-.18,-.03,-1.98,-.48,-4.02,-1.02],["c",-2.97,-.78,-3.75,-.99,-3.84,-1.05],["c",-.12,-.09,-.18,-.3,-.18,-.45],["c",.03,-.15,.15,-.3,.3,-.39],["z"]],w:13.5,h:7.5},"scripts.staccato":{d:[["M",-.36,-1.47],["c",.93,-.21,1.86,.51,1.86,1.47],["c",0,.93,-.87,1.65,-1.8,1.47],["c",-.54,-.12,-1.02,-.57,-1.14,-1.08],["c",-.21,-.81,.27,-1.65,1.08,-1.86],["z"]],w:2.989,h:3.004},"scripts.tenuto":{d:[["M",-4.2,-.48],["l",.12,-.06],["l",4.08,0],["l",4.08,0],["l",.12,.06],["c",.39,.21,.39,.75,0,.96],["l",-.12,.06],["l",-4.08,0],["l",-4.08,0],["l",-.12,-.06],["c",-.39,-.21,-.39,-.75,0,-.96],["z"]],w:8.985,h:1.08},"scripts.umarcato":{d:[["M",-.15,-8.19],["c",.15,-.12,.36,-.03,.45,.15],["c",.21,.42,3.45,7.65,3.45,7.71],["c",0,.12,-.12,.27,-.21,.3],["c",-.03,.03,-.51,.03,-1.14,.03],["c",-1.05,0,-1.08,0,-1.17,-.06],["c",-.09,-.06,-.24,-.36,-1.17,-2.4],["c",-.57,-1.29,-1.05,-2.34,-1.08,-2.34],["c",0,-.03,-.51,1.02,-1.08,2.34],["c",-.93,2.07,-1.08,2.34,-1.14,2.4],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.06,3.24,-7.32,3.45,-7.71],["c",.03,-.06,.09,-.15,.15,-.15],["z"]],w:7.5,h:8.245},"scripts.dmarcato":{d:[["M",-3.57,.03],["c",.03,0,.57,-.03,1.17,-.03],["c",1.05,0,1.08,0,1.17,.06],["c",.09,.06,.24,.36,1.17,2.4],["c",.57,1.29,1.05,2.34,1.08,2.34],["c",0,.03,.51,-1.02,1.08,-2.34],["c",.93,-2.07,1.08,-2.34,1.14,-2.4],["c",.06,-.03,.15,-.06,.18,-.06],["c",.15,0,.33,.18,.33,.33],["c",0,.09,-3.45,7.74,-3.54,7.83],["c",-.12,.12,-.3,.12,-.42,0],["c",-.09,-.09,-3.54,-7.74,-3.54,-7.83],["c",0,-.09,.12,-.27,.18,-.3],["z"]],w:7.5,h:8.25},"scripts.stopped":{d:[["M",-.27,-4.08],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.5],["l",0,1.47],["l",1.47,0],["l",1.5,0],["l",.15,.06],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.09,.36,0,.54],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.12,.06,-.18,.06,-1.62,.06],["l",-1.47,0],["l",0,1.47],["l",0,1.47],["l",-.06,.15],["c",-.09,.18,-.15,.24,-.33,.33],["c",-.18,.09,-.36,.09,-.54,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["l",-.06,-.15],["l",0,-1.47],["l",0,-1.47],["l",-1.47,0],["c",-1.44,0,-1.5,0,-1.62,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.47,0],["l",1.47,0],["l",0,-1.47],["c",0,-1.44,0,-1.5,.06,-1.62],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:8.295,h:8.295},"scripts.upbow":{d:[["M",-4.65,-15.54],["c",.12,-.09,.36,-.06,.48,.03],["c",.03,.03,.09,.09,.12,.15],["c",.03,.06,.66,2.13,1.41,4.62],["c",1.35,4.41,1.38,4.56,2.01,6.96],["l",.63,2.46],["l",.63,-2.46],["c",.63,-2.4,.66,-2.55,2.01,-6.96],["c",.75,-2.49,1.38,-4.56,1.41,-4.62],["c",.06,-.15,.18,-.21,.36,-.24],["c",.15,0,.3,.06,.39,.18],["c",.15,.21,.24,-.18,-2.1,7.56],["c",-1.2,3.96,-2.22,7.32,-2.25,7.41],["c",0,.12,-.06,.27,-.09,.3],["c",-.12,.21,-.6,.21,-.72,0],["c",-.03,-.03,-.09,-.18,-.09,-.3],["c",-.03,-.09,-1.05,-3.45,-2.25,-7.41],["c",-2.34,-7.74,-2.25,-7.35,-2.1,-7.56],["c",.03,-.03,.09,-.09,.15,-.12],["z"]],w:9.73,h:15.608},"scripts.downbow":{d:[["M",-5.55,-9.93],["l",.09,-.06],["l",5.46,0],["l",5.46,0],["l",.09,.06],["l",.06,.09],["l",0,4.77],["c",0,5.28,0,4.89,-.18,5.01],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.06,-.09,-.06,-.18,-.06,-2.97],["l",0,-2.85],["l",-4.83,0],["l",-4.83,0],["l",0,2.85],["c",0,2.79,0,2.88,-.06,2.97],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.21,-.06,-4.89],["l",0,-4.77],["z"]],w:11.22,h:9.992},"scripts.turn":{d:[["M",-4.77,-3.9],["c",.36,-.06,1.05,-.06,1.44,.03],["c",.78,.15,1.5,.51,2.34,1.14],["c",.6,.45,1.05,.87,2.22,2.01],["c",1.11,1.08,1.62,1.5,2.22,1.86],["c",.6,.36,1.32,.57,1.92,.57],["c",.9,0,1.71,-.57,1.89,-1.35],["c",.24,-.93,-.39,-1.89,-1.35,-2.1],["l",-.15,-.06],["l",-.09,.15],["c",-.03,.09,-.15,.24,-.24,.33],["c",-.72,.72,-2.04,.54,-2.49,-.36],["c",-.48,-.93,.03,-1.86,1.17,-2.19],["c",.3,-.09,1.02,-.09,1.35,0],["c",.99,.27,1.74,.87,2.25,1.83],["c",.69,1.41,.63,3,-.21,4.26],["c",-.21,.3,-.69,.81,-.99,1.02],["c",-.3,.21,-.84,.45,-1.17,.54],["c",-1.23,.36,-2.49,.15,-3.72,-.6],["c",-.75,-.48,-1.41,-1.02,-2.85,-2.46],["c",-1.11,-1.08,-1.62,-1.5,-2.22,-1.86],["c",-.6,-.36,-1.32,-.57,-1.92,-.57],["c",-.9,0,-1.71,.57,-1.89,1.35],["c",-.24,.93,.39,1.89,1.35,2.1],["l",.15,.06],["l",.09,-.15],["c",.03,-.09,.15,-.24,.24,-.33],["c",.72,-.72,2.04,-.54,2.49,.36],["c",.48,.93,-.03,1.86,-1.17,2.19],["c",-.3,.09,-1.02,.09,-1.35,0],["c",-.99,-.27,-1.74,-.87,-2.25,-1.83],["c",-.69,-1.41,-.63,-3,.21,-4.26],["c",.21,-.3,.69,-.81,.99,-1.02],["c",.48,-.33,1.11,-.57,1.74,-.66],["z"]],w:16.366,h:7.893},"scripts.trill":{d:[["M",-.51,-16.02],["c",.12,-.09,.21,-.18,.21,-.18],["l",-.81,4.02],["l",-.81,4.02],["c",.03,0,.51,-.27,1.08,-.6],["c",.6,-.3,1.14,-.63,1.26,-.66],["c",1.14,-.54,2.31,-.6,3.09,-.18],["c",.27,.15,.54,.36,.6,.51],["l",.06,.12],["l",.21,-.21],["c",.9,-.81,2.22,-.99,3.12,-.42],["c",.6,.42,.9,1.14,.78,2.07],["c",-.15,1.29,-1.05,2.31,-1.95,2.25],["c",-.48,-.03,-.78,-.3,-.96,-.81],["c",-.09,-.27,-.09,-.9,-.03,-1.2],["c",.21,-.75,.81,-1.23,1.59,-1.32],["l",.24,-.03],["l",-.09,-.12],["c",-.51,-.66,-1.62,-.63,-2.31,.03],["c",-.39,.42,-.3,.09,-1.23,4.77],["l",-.81,4.14],["c",-.03,0,-.12,-.03,-.21,-.09],["c",-.33,-.15,-.54,-.18,-.99,-.18],["c",-.42,0,-.66,.03,-1.05,.18],["c",-.12,.06,-.21,.09,-.21,.09],["c",0,-.03,.36,-1.86,.81,-4.11],["c",.9,-4.47,.87,-4.26,.69,-4.53],["c",-.21,-.36,-.66,-.51,-1.17,-.36],["c",-.15,.06,-2.22,1.14,-2.58,1.38],["c",-.12,.09,-.12,.09,-.21,.6],["l",-.09,.51],["l",.21,.24],["c",.63,.75,1.02,1.47,1.2,2.19],["c",.06,.27,.06,.36,.06,.81],["c",0,.42,0,.54,-.06,.78],["c",-.15,.54,-.33,.93,-.63,1.35],["c",-.18,.24,-.57,.63,-.81,.78],["c",-.24,.15,-.63,.36,-.84,.42],["c",-.27,.06,-.66,.06,-.87,.03],["c",-.81,-.18,-1.32,-1.05,-1.38,-2.46],["c",-.03,-.6,.03,-.99,.33,-2.46],["c",.21,-1.08,.24,-1.32,.21,-1.29],["c",-1.2,.48,-2.4,.75,-3.21,.72],["c",-.69,-.06,-1.17,-.3,-1.41,-.72],["c",-.39,-.75,-.12,-1.8,.66,-2.46],["c",.24,-.18,.69,-.42,1.02,-.51],["c",.69,-.18,1.53,-.15,2.31,.09],["c",.3,.09,.75,.3,.99,.45],["c",.12,.09,.15,.09,.15,.03],["c",.03,-.03,.33,-1.59,.72,-3.45],["c",.36,-1.86,.66,-3.42,.69,-3.45],["c",0,-.03,.03,-.03,.21,.03],["c",.21,.06,.27,.06,.48,.06],["c",.42,-.03,.78,-.18,1.26,-.48],["c",.15,-.12,.36,-.27,.48,-.39],["z"],["m",-5.73,7.68],["c",-.27,-.03,-.96,-.06,-1.2,-.03],["c",-.81,.12,-1.35,.57,-1.5,1.2],["c",-.18,.66,.12,1.14,.75,1.29],["c",.66,.12,1.92,-.12,3.18,-.66],["l",.33,-.15],["l",.09,-.39],["c",.06,-.21,.09,-.42,.09,-.45],["c",0,-.03,-.45,-.3,-.75,-.45],["c",-.27,-.15,-.66,-.27,-.99,-.36],["z"],["m",4.29,3.63],["c",-.24,-.39,-.51,-.75,-.51,-.69],["c",-.06,.12,-.39,1.92,-.45,2.28],["c",-.09,.54,-.12,1.14,-.06,1.38],["c",.06,.42,.21,.6,.51,.57],["c",.39,-.06,.75,-.48,.93,-1.14],["c",.09,-.33,.09,-1.05,0,-1.38],["c",-.09,-.39,-.24,-.69,-.42,-1.02],["z"]],w:17.963,h:16.49},"scripts.segno":{d:[["M",-3.72,-11.22],["c",.78,-.09,1.59,.03,2.31,.42],["c",1.2,.6,2.01,1.71,2.31,3.09],["c",.09,.42,.09,1.2,.03,1.5],["c",-.15,.45,-.39,.81,-.66,.93],["c",-.33,.18,-.84,.21,-1.23,.15],["c",-.81,-.18,-1.32,-.93,-1.26,-1.89],["c",.03,-.36,.09,-.57,.24,-.9],["c",.15,-.33,.45,-.6,.72,-.75],["c",.12,-.06,.18,-.09,.18,-.12],["c",0,-.03,-.03,-.15,-.09,-.24],["c",-.18,-.45,-.54,-.87,-.96,-1.08],["c",-1.11,-.57,-2.34,-.18,-2.88,.9],["c",-.24,.51,-.33,1.11,-.24,1.83],["c",.27,1.92,1.5,3.54,3.93,5.13],["c",.48,.33,1.26,.78,1.29,.78],["c",.03,0,1.35,-2.19,2.94,-4.89],["l",2.88,-4.89],["l",.84,0],["l",.87,0],["l",-.03,.06],["c",-.15,.21,-6.15,10.41,-6.15,10.44],["c",0,0,.21,.15,.48,.27],["c",2.61,1.47,4.35,3.03,5.13,4.65],["c",1.14,2.34,.51,5.07,-1.44,6.39],["c",-.66,.42,-1.32,.63,-2.13,.69],["c",-2.01,.09,-3.81,-1.41,-4.26,-3.54],["c",-.09,-.42,-.09,-1.2,-.03,-1.5],["c",.15,-.45,.39,-.81,.66,-.93],["c",.33,-.18,.84,-.21,1.23,-.15],["c",.81,.18,1.32,.93,1.26,1.89],["c",-.03,.36,-.09,.57,-.24,.9],["c",-.15,.33,-.45,.6,-.72,.75],["c",-.12,.06,-.18,.09,-.18,.12],["c",0,.03,.03,.15,.09,.24],["c",.18,.45,.54,.87,.96,1.08],["c",1.11,.57,2.34,.18,2.88,-.9],["c",.24,-.51,.33,-1.11,.24,-1.83],["c",-.27,-1.92,-1.5,-3.54,-3.93,-5.13],["c",-.48,-.33,-1.26,-.78,-1.29,-.78],["c",-.03,0,-1.35,2.19,-2.91,4.89],["l",-2.88,4.89],["l",-.87,0],["l",-.87,0],["l",.03,-.06],["c",.15,-.21,6.15,-10.41,6.15,-10.44],["c",0,0,-.21,-.15,-.48,-.3],["c",-2.61,-1.44,-4.35,-3,-5.13,-4.62],["c",-.9,-1.89,-.72,-4.02,.48,-5.52],["c",.69,-.84,1.68,-1.41,2.73,-1.53],["z"],["m",8.76,9.09],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"],["m",-10.53,2.61],["c",.03,-.03,.15,-.03,.27,-.03],["c",.33,.03,.57,.18,.72,.48],["c",.09,.18,.09,.57,0,.75],["c",-.09,.18,-.21,.3,-.36,.39],["c",-.15,.06,-.21,.06,-.39,.06],["c",-.21,0,-.27,0,-.39,-.06],["c",-.3,-.15,-.48,-.45,-.48,-.75],["c",0,-.39,.24,-.72,.63,-.84],["z"]],w:15,h:22.504},"scripts.coda":{d:[["M",-.21,-10.47],["c",.18,-.12,.42,-.06,.54,.12],["c",.06,.09,.06,.18,.06,1.5],["l",0,1.38],["l",.18,0],["c",.39,.06,.96,.24,1.38,.48],["c",1.68,.93,2.82,3.24,3.03,6.12],["c",.03,.24,.03,.45,.03,.45],["c",0,.03,.6,.03,1.35,.03],["c",1.5,0,1.47,0,1.59,.18],["c",.09,.12,.09,.3,0,.42],["c",-.12,.18,-.09,.18,-1.59,.18],["c",-.75,0,-1.35,0,-1.35,.03],["c",0,0,0,.21,-.03,.42],["c",-.24,3.15,-1.53,5.58,-3.45,6.36],["c",-.27,.12,-.72,.24,-.96,.27],["l",-.18,0],["l",0,1.38],["c",0,1.32,0,1.41,-.06,1.5],["c",-.15,.24,-.51,.24,-.66,0],["c",-.06,-.09,-.06,-.18,-.06,-1.5],["l",0,-1.38],["l",-.18,0],["c",-.39,-.06,-.96,-.24,-1.38,-.48],["c",-1.68,-.93,-2.82,-3.24,-3.03,-6.15],["c",-.03,-.21,-.03,-.42,-.03,-.42],["c",0,-.03,-.6,-.03,-1.35,-.03],["c",-1.5,0,-1.47,0,-1.59,-.18],["c",-.09,-.12,-.09,-.3,0,-.42],["c",.12,-.18,.09,-.18,1.59,-.18],["c",.75,0,1.35,0,1.35,-.03],["c",0,0,0,-.21,.03,-.45],["c",.24,-3.12,1.53,-5.55,3.45,-6.33],["c",.27,-.12,.72,-.24,.96,-.27],["l",.18,0],["l",0,-1.38],["c",0,-1.53,0,-1.5,.18,-1.62],["z"],["m",-.18,6.93],["c",0,-2.97,0,-3.15,-.06,-3.15],["c",-.09,0,-.51,.15,-.66,.21],["c",-.87,.51,-1.38,1.62,-1.56,3.51],["c",-.06,.54,-.12,1.59,-.12,2.16],["l",0,.42],["l",1.2,0],["l",1.2,0],["l",0,-3.15],["z"],["m",1.17,-3.06],["c",-.09,-.03,-.21,-.06,-.27,-.09],["l",-.12,0],["l",0,3.15],["l",0,3.15],["l",1.2,0],["l",1.2,0],["l",0,-.81],["c",-.06,-2.4,-.33,-3.69,-.93,-4.59],["c",-.27,-.39,-.66,-.69,-1.08,-.81],["z"],["m",-1.17,10.14],["l",0,-3.15],["l",-1.2,0],["l",-1.2,0],["l",0,.81],["c",.03,.96,.06,1.47,.15,2.13],["c",.24,2.04,.96,3.12,2.13,3.36],["l",.12,0],["l",0,-3.15],["z"],["m",3.18,-2.34],["l",0,-.81],["l",-1.2,0],["l",-1.2,0],["l",0,3.15],["l",0,3.15],["l",.12,0],["c",1.17,-.24,1.89,-1.32,2.13,-3.36],["c",.09,-.66,.12,-1.17,.15,-2.13],["z"]],w:16.035,h:21.062},"scripts.comma":{d:[["M",1.14,-4.62],["c",.3,-.12,.69,-.03,.93,.15],["c",.12,.12,.36,.45,.51,.78],["c",.9,1.77,.54,4.05,-1.08,6.75],["c",-.36,.63,-.87,1.38,-.96,1.44],["c",-.18,.12,-.42,.06,-.54,-.12],["c",-.09,-.18,-.09,-.3,.12,-.6],["c",.96,-1.44,1.44,-2.97,1.38,-4.35],["c",-.06,-.93,-.3,-1.68,-.78,-2.46],["c",-.27,-.39,-.33,-.63,-.24,-.96],["c",.09,-.27,.36,-.54,.66,-.63],["z"]],w:3.042,h:9.237},"scripts.roll":{d:[["M",1.95,-6],["c",.21,-.09,.36,-.09,.57,0],["c",.39,.15,.63,.39,1.47,1.35],["c",.66,.75,.78,.87,1.08,1.05],["c",.75,.45,1.65,.42,2.4,-.06],["c",.12,-.09,.27,-.27,.54,-.6],["c",.42,-.54,.51,-.63,.69,-.63],["c",.09,0,.3,.12,.36,.21],["c",.09,.12,.12,.3,.03,.42],["c",-.06,.12,-3.15,3.9,-3.3,4.08],["c",-.06,.06,-.18,.12,-.27,.18],["c",-.27,.12,-.6,.06,-.99,-.27],["c",-.27,-.21,-.42,-.39,-1.08,-1.14],["c",-.63,-.72,-.81,-.9,-1.17,-1.08],["c",-.36,-.18,-.57,-.21,-.99,-.21],["c",-.39,0,-.63,.03,-.93,.18],["c",-.36,.15,-.51,.27,-.9,.81],["c",-.24,.27,-.45,.51,-.48,.54],["c",-.12,.09,-.27,.06,-.39,0],["c",-.24,-.15,-.33,-.39,-.21,-.6],["c",.09,-.12,3.18,-3.87,3.33,-4.02],["c",.06,-.06,.18,-.15,.24,-.21],["z"]],w:10.817,h:6.125},"scripts.prall":{d:[["M",-4.38,-3.69],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.57,-.84,1.23,-1.83],["c",1.14,-1.68,1.23,-1.83,1.35,-1.89],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["c",-.03,0,-.57,.84,-1.23,1.83],["c",-1.14,1.68,-1.23,1.83,-1.35,1.89],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["z"]],w:15.011,h:7.5},"scripts.arpeggio":{d:[["M",1.5,0],["c",1.5,2,1.5,3,1.5,3],["s",0,1,-2,1.5],["s",-.5,3,1,5.5],["l",1.5,0],["s",-1.75,-2,-1.9,-3.25],["s",2.15,-.6,2.95,-1.6],["s",.45,-1,.5,-1.25],["s",0,-1,-2,-3.9],["l",-1.5,0],["z"]],w:5,h:10},"scripts.mordent":{d:[["M",-.21,-4.95],["c",.27,-.15,.63,0,.75,.27],["c",.06,.12,.06,.24,.06,1.44],["l",0,1.29],["l",.57,-.84],["c",.51,-.75,.57,-.84,.69,-.9],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["l",.48,-.69],["c",.51,-.78,.54,-.84,.69,-.9],["c",.42,-.18,.87,.15,.81,.6],["c",-.03,.12,-.3,.51,-1.5,2.37],["c",-1.38,2.07,-1.5,2.22,-1.62,2.28],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.83,-1.89],["c",-.81,-.99,-1.5,-1.8,-1.53,-1.86],["c",-.06,-.03,-.06,-.03,-.12,.03],["c",-.06,.06,-.06,.15,-.06,2.28],["c",0,1.95,0,2.25,-.06,2.34],["c",-.18,.45,-.81,.48,-1.05,.03],["c",-.03,-.06,-.06,-.24,-.06,-1.41],["l",0,-1.35],["l",-.57,.84],["c",-.54,.78,-.6,.87,-.72,.93],["c",-.06,.03,-.18,.06,-.24,.06],["c",-.3,0,-.27,.03,-1.89,-1.95],["l",-1.53,-1.83],["l",-.48,.69],["c",-.51,.78,-.54,.84,-.69,.9],["c",-.42,.18,-.87,-.15,-.81,-.6],["c",.03,-.12,.3,-.51,1.5,-2.37],["c",1.38,-2.07,1.5,-2.22,1.62,-2.28],["c",.06,-.03,.18,-.06,.24,-.06],["c",.3,0,.27,-.03,1.89,1.95],["l",1.53,1.83],["c",.03,0,.06,-.06,.09,-.09],["c",.06,-.12,.06,-.15,.06,-2.28],["c",0,-1.92,0,-2.22,.06,-2.31],["c",.06,-.15,.15,-.24,.3,-.3],["z"]],w:15.011,h:10.012},"flags.u8th":{d:[["M",-.42,3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",0,.18],["c",0,.3,.06,.84,.12,1.23],["c",.24,1.53,.9,3.12,2.13,5.16],["l",.99,1.59],["c",.87,1.44,1.38,2.34,1.77,3.09],["c",.81,1.68,1.2,3.06,1.26,4.53],["c",.03,1.53,-.21,3.27,-.75,5.01],["c",-.21,.69,-.51,1.5,-.6,1.59],["c",-.09,.12,-.27,.21,-.42,.21],["c",-.15,0,-.42,-.12,-.51,-.21],["c",-.15,-.18,-.18,-.42,-.09,-.66],["c",.15,-.33,.45,-1.2,.57,-1.62],["c",.42,-1.38,.6,-2.58,.6,-3.9],["c",0,-.66,0,-.81,-.06,-1.11],["c",-.39,-2.07,-1.8,-4.26,-4.59,-7.14],["l",-.42,-.45],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["z"]],w:6.692,h:22.59},"flags.u16th":{d:[["M",-.42,7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,.39],["c",.06,1.08,.39,2.19,.99,3.39],["c",.45,.9,.87,1.59,1.95,3.12],["c",1.29,1.86,1.77,2.64,2.22,3.57],["c",.45,.93,.72,1.8,.87,2.64],["c",.06,.51,.06,1.5,0,1.92],["c",-.12,.6,-.3,1.2,-.54,1.71],["l",-.09,.24],["l",.18,.45],["c",.51,1.2,.72,2.22,.69,3.42],["c",-.06,1.53,-.39,3.03,-.99,4.53],["c",-.3,.75,-.36,.81,-.57,.9],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.12,-.75],["c",.66,-1.41,1.02,-2.88,1.08,-4.32],["c",0,-.6,-.03,-1.05,-.18,-1.59],["c",-.3,-1.2,-.99,-2.4,-2.25,-3.87],["c",-.42,-.48,-1.53,-1.62,-2.19,-2.22],["l",-.45,-.42],["l",-.03,1.11],["l",0,1.11],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["z"],["m",1.65,.09],["c",-.3,-.3,-.69,-.72,-.9,-.87],["l",-.33,-.33],["l",0,.15],["c",0,.3,.06,.81,.15,1.26],["c",.27,1.29,.87,2.61,2.04,4.29],["c",.15,.24,.6,.87,.96,1.38],["l",1.08,1.53],["l",.42,.63],["c",.03,0,.12,-.36,.21,-.72],["c",.06,-.33,.06,-1.2,0,-1.62],["c",-.33,-1.71,-1.44,-3.48,-3.63,-5.7],["z"]],w:6.693,h:26.337},"flags.u32nd":{d:[["M",-.42,11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,.36],["c",.09,1.68,.69,3.27,2.07,5.46],["l",.87,1.35],["c",1.02,1.62,1.47,2.37,1.86,3.18],["c",.48,1.02,.78,1.92,.93,2.88],["c",.06,.48,.06,1.5,0,1.89],["c",-.09,.42,-.21,.87,-.36,1.26],["l",-.12,.3],["l",.15,.39],["c",.69,1.56,.84,2.88,.54,4.38],["c",-.09,.45,-.27,1.08,-.45,1.47],["l",-.12,.24],["l",.18,.36],["c",.33,.72,.57,1.56,.69,2.34],["c",.12,1.02,-.06,2.52,-.42,3.84],["c",-.27,.93,-.75,2.13,-.93,2.31],["c",-.18,.15,-.45,.18,-.66,.09],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.06,-.6],["c",.21,-.36,.42,-.9,.57,-1.38],["c",.51,-1.41,.69,-3.06,.48,-4.08],["c",-.15,-.81,-.57,-1.68,-1.2,-2.55],["c",-.72,-.99,-1.83,-2.13,-3.3,-3.33],["l",-.48,-.42],["l",-.03,1.53],["l",0,1.56],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["z"],["m",1.26,-3.96],["c",-.27,-.3,-.54,-.6,-.66,-.72],["l",-.18,-.21],["l",0,.42],["c",.06,.87,.24,1.74,.66,2.67],["c",.36,.87,.96,1.86,1.92,3.18],["c",.21,.33,.63,.87,.87,1.23],["c",.27,.39,.6,.84,.75,1.08],["l",.27,.39],["l",.03,-.12],["c",.12,-.45,.15,-1.05,.09,-1.59],["c",-.27,-1.86,-1.38,-3.78,-3.75,-6.33],["z"],["m",-.27,6.09],["c",-.27,-.21,-.48,-.42,-.51,-.45],["c",-.06,-.03,-.06,-.03,-.06,.21],["c",0,.9,.3,2.04,.81,3.09],["c",.48,1.02,.96,1.77,2.37,3.63],["c",.6,.78,1.05,1.44,1.29,1.77],["c",.06,.12,.15,.21,.15,.18],["c",.03,-.03,.18,-.57,.24,-.87],["c",.06,-.45,.06,-1.32,-.03,-1.74],["c",-.09,-.48,-.24,-.9,-.51,-1.44],["c",-.66,-1.35,-1.83,-2.7,-3.75,-4.38],["z"]],w:6.697,h:32.145},"flags.u64th":{d:[["M",-.42,15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,.36],["c",.06,1.2,.39,2.37,1.02,3.66],["c",.39,.81,.84,1.56,1.8,3.09],["c",.81,1.26,1.05,1.68,1.35,2.22],["c",.87,1.5,1.35,2.79,1.56,4.08],["c",.06,.54,.06,1.56,-.03,2.04],["c",-.09,.48,-.21,.99,-.36,1.35],["l",-.12,.27],["l",.12,.27],["c",.09,.15,.21,.45,.27,.66],["c",.69,1.89,.63,3.66,-.18,5.46],["l",-.18,.39],["l",.15,.33],["c",.3,.66,.51,1.44,.63,2.1],["c",.06,.48,.06,1.35,0,1.71],["c",-.15,.57,-.42,1.2,-.78,1.68],["l",-.21,.27],["l",.18,.33],["c",.57,1.05,.93,2.13,1.02,3.18],["c",.06,.72,0,1.83,-.21,2.79],["c",-.18,1.02,-.63,2.34,-1.02,3.09],["c",-.15,.33,-.48,.45,-.78,.3],["c",-.18,-.09,-.27,-.18,-.33,-.33],["c",-.09,-.18,-.06,-.3,.03,-.54],["c",.75,-1.5,1.23,-3.45,1.17,-4.89],["c",-.06,-1.02,-.42,-2.01,-1.17,-3.15],["c",-.48,-.72,-1.02,-1.35,-1.89,-2.22],["c",-.57,-.57,-1.56,-1.5,-1.92,-1.77],["l",-.12,-.09],["l",0,1.68],["l",0,1.68],["l",-.21,0],["l",-.21,0],["l",0,-15],["z"],["m",.93,-8.07],["c",-.27,-.3,-.48,-.54,-.51,-.54],["c",0,0,0,.69,.03,1.02],["c",.15,1.47,.75,2.94,2.04,4.83],["l",1.08,1.53],["c",.39,.57,.84,1.2,.99,1.44],["c",.15,.24,.3,.45,.3,.45],["c",0,0,.03,-.09,.06,-.21],["c",.36,-1.59,-.15,-3.33,-1.47,-5.4],["c",-.63,-.93,-1.35,-1.83,-2.52,-3.12],["z"],["m",.06,6.72],["c",-.24,-.21,-.48,-.42,-.51,-.45],["l",-.06,-.06],["l",0,.33],["c",0,1.2,.3,2.34,.93,3.6],["c",.45,.9,.96,1.68,2.25,3.51],["c",.39,.54,.84,1.17,1.02,1.44],["c",.21,.33,.33,.51,.33,.48],["c",.06,-.09,.21,-.63,.3,-.99],["c",.06,-.33,.06,-.45,.06,-.96],["c",0,-.6,-.03,-.84,-.18,-1.35],["c",-.3,-1.08,-1.02,-2.28,-2.13,-3.57],["c",-.39,-.45,-1.44,-1.47,-2.01,-1.98],["z"],["m",0,6.72],["c",-.24,-.21,-.48,-.39,-.51,-.42],["l",-.06,-.06],["l",0,.33],["c",0,1.41,.45,2.82,1.38,4.35],["c",.42,.72,.72,1.14,1.86,2.73],["c",.36,.45,.75,.99,.87,1.2],["c",.15,.21,.3,.36,.3,.36],["c",.06,0,.3,-.48,.39,-.75],["c",.09,-.36,.12,-.63,.12,-1.05],["c",-.06,-1.05,-.45,-2.04,-1.2,-3.18],["c",-.57,-.87,-1.11,-1.53,-2.07,-2.49],["c",-.36,-.33,-.84,-.78,-1.08,-1.02],["z"]],w:6.682,h:39.694},"flags.d8th":{d:[["M",5.67,-21.63],["c",.24,-.12,.54,-.06,.69,.15],["c",.06,.06,.21,.36,.39,.66],["c",.84,1.77,1.26,3.36,1.32,5.1],["c",.03,1.29,-.21,2.37,-.81,3.63],["c",-.6,1.23,-1.26,2.13,-3.21,4.38],["c",-1.35,1.53,-1.86,2.19,-2.4,2.97],["c",-.63,.93,-1.11,1.92,-1.38,2.79],["c",-.15,.54,-.27,1.35,-.27,1.8],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-3.75],["l",0,-3.75],["l",.21,0],["l",.21,0],["l",.48,-.3],["c",1.83,-1.11,3.12,-2.1,4.17,-3.12],["c",.78,-.81,1.32,-1.53,1.71,-2.31],["c",.45,-.93,.6,-1.74,.51,-2.88],["c",-.12,-1.56,-.63,-3.18,-1.47,-4.68],["c",-.12,-.21,-.15,-.33,-.06,-.51],["c",.06,-.15,.15,-.24,.33,-.33],["z"]],w:8.492,h:21.691},"flags.ugrace":{d:[["M",6.03,6.93],["c",.15,-.09,.33,-.06,.51,0],["c",.15,.09,.21,.15,.3,.33],["c",.09,.18,.06,.39,-.03,.54],["c",-.06,.15,-10.89,8.88,-11.07,8.97],["c",-.15,.09,-.33,.06,-.48,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.06,-.39,.03,-.54],["c",.06,-.15,10.89,-8.88,11.07,-8.97],["z"]],w:12.019,h:9.954},"flags.dgrace":{d:[["M",-6.06,-15.93],["c",.18,-.09,.33,-.12,.48,-.06],["c",.18,.09,14.01,8.04,14.1,8.1],["c",.12,.12,.18,.33,.18,.51],["c",-.03,.21,-.15,.39,-.36,.48],["c",-.18,.09,-.33,.12,-.48,.06],["c",-.18,-.09,-14.01,-8.04,-14.1,-8.1],["c",-.12,-.12,-.18,-.33,-.18,-.51],["c",.03,-.21,.15,-.39,.36,-.48],["z"]],w:15.12,h:9.212},"flags.d16th":{d:[["M",6.84,-22.53],["c",.27,-.12,.57,-.06,.72,.15],["c",.15,.15,.33,.87,.45,1.56],["c",.06,.33,.06,1.35,0,1.65],["c",-.06,.33,-.15,.78,-.27,1.11],["c",-.12,.33,-.45,.96,-.66,1.32],["l",-.18,.27],["l",.09,.18],["c",.48,1.02,.72,2.25,.69,3.3],["c",-.06,1.23,-.42,2.28,-1.26,3.45],["c",-.57,.87,-.99,1.32,-3,3.39],["c",-1.56,1.56,-2.22,2.4,-2.76,3.45],["c",-.42,.84,-.66,1.8,-.66,2.55],["l",0,.15],["l",-.21,0],["l",-.21,0],["l",0,-7.5],["l",0,-7.5],["l",.21,0],["l",.21,0],["l",0,1.14],["l",0,1.11],["l",.27,-.15],["c",1.11,-.57,1.77,-.99,2.52,-1.47],["c",2.37,-1.56,3.69,-3.15,4.05,-4.83],["c",.03,-.18,.03,-.39,.03,-.78],["c",0,-.6,-.03,-.93,-.24,-1.5],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.5],["c",-.06,-.18,-.15,-.36,-.15,-.36],["c",-.03,0,-.03,.03,-.06,.06],["c",-.06,.12,-.96,1.02,-1.95,1.98],["c",-.63,.57,-1.26,1.17,-1.44,1.35],["c",-1.53,1.62,-2.28,2.85,-2.55,4.32],["c",-.03,.18,-.03,.54,-.06,.99],["l",0,.69],["l",.18,-.09],["c",.93,-.54,2.1,-1.29,2.82,-1.83],["c",.69,-.51,1.02,-.81,1.53,-1.29],["c",1.86,-1.89,2.37,-3.66,1.68,-5.82],["z"]],w:8.475,h:22.591},"flags.d32nd":{d:[["M",6.84,-29.13],["c",.27,-.12,.57,-.06,.72,.15],["c",.12,.12,.27,.63,.36,1.11],["c",.33,1.59,.06,3.06,-.81,4.47],["l",-.18,.27],["l",.09,.15],["c",.12,.24,.33,.69,.45,1.05],["c",.63,1.83,.45,3.57,-.57,5.22],["l",-.18,.3],["l",.15,.27],["c",.42,.87,.6,1.71,.57,2.61],["c",-.06,1.29,-.48,2.46,-1.35,3.78],["c",-.54,.81,-.93,1.29,-2.46,3],["c",-.51,.54,-1.05,1.17,-1.26,1.41],["c",-1.56,1.86,-2.25,3.36,-2.37,5.01],["l",0,.33],["l",-.21,0],["l",-.21,0],["l",0,-11.25],["l",0,-11.25],["l",.21,0],["l",.21,0],["l",0,1.35],["l",.03,1.35],["l",.78,-.39],["c",1.38,-.69,2.34,-1.26,3.24,-1.92],["c",1.38,-1.02,2.28,-2.13,2.64,-3.21],["c",.15,-.48,.18,-.72,.18,-1.29],["c",0,-.57,-.06,-.9,-.24,-1.47],["c",-.06,-.18,-.12,-.39,-.15,-.45],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.63,7.2],["c",-.09,-.18,-.12,-.21,-.12,-.15],["c",-.03,.09,-1.02,1.08,-2.04,2.04],["c",-1.17,1.08,-1.65,1.56,-2.07,2.04],["c",-.84,.96,-1.38,1.86,-1.68,2.76],["c",-.21,.57,-.27,.99,-.3,1.65],["l",0,.54],["l",.66,-.33],["c",3.57,-1.86,5.49,-3.69,5.94,-5.7],["c",.06,-.39,.06,-1.2,-.03,-1.65],["c",-.06,-.39,-.24,-.9,-.36,-1.2],["z"],["m",-.06,7.2],["c",-.06,-.15,-.12,-.33,-.15,-.45],["l",-.06,-.18],["l",-.18,.21],["l",-1.83,1.83],["c",-.87,.9,-1.77,1.8,-1.95,2.01],["c",-1.08,1.29,-1.62,2.31,-1.89,3.51],["c",-.06,.3,-.06,.51,-.09,.93],["l",0,.57],["l",.09,-.06],["c",.75,-.45,1.89,-1.26,2.52,-1.74],["c",.81,-.66,1.74,-1.53,2.22,-2.16],["c",1.26,-1.53,1.68,-3.06,1.32,-4.47],["z"]],w:8.385,h:29.191},"flags.d64th":{d:[["M",7.08,-32.88],["c",.3,-.12,.66,-.03,.78,.24],["c",.18,.33,.27,2.1,.15,2.64],["c",-.09,.39,-.21,.78,-.39,1.08],["l",-.15,.3],["l",.09,.27],["c",.03,.12,.09,.45,.12,.69],["c",.27,1.44,.18,2.55,-.3,3.6],["l",-.12,.33],["l",.06,.42],["c",.27,1.35,.33,2.82,.21,3.63],["c",-.12,.6,-.3,1.23,-.57,1.8],["l",-.15,.27],["l",.03,.42],["c",.06,1.02,.06,2.7,.03,3.06],["c",-.15,1.47,-.66,2.76,-1.74,4.41],["c",-.45,.69,-.75,1.11,-1.74,2.37],["c",-1.05,1.38,-1.5,1.98,-1.95,2.73],["c",-.93,1.5,-1.38,2.82,-1.44,4.2],["l",0,.42],["l",-.21,0],["l",-.21,0],["l",0,-15],["l",0,-15],["l",.21,0],["l",.21,0],["l",0,1.86],["l",0,1.89],["c",0,0,.21,-.03,.45,-.09],["c",2.22,-.39,4.08,-1.11,5.19,-2.01],["c",.63,-.54,1.02,-1.14,1.2,-1.8],["c",.06,-.3,.06,-1.14,-.03,-1.65],["c",-.03,-.18,-.06,-.39,-.09,-.48],["c",-.03,-.24,.12,-.48,.36,-.6],["z"],["m",-.45,6.15],["c",-.03,-.18,-.06,-.42,-.06,-.54],["l",-.03,-.18],["l",-.33,.3],["c",-.42,.36,-.87,.72,-1.68,1.29],["c",-1.98,1.38,-2.25,1.59,-2.85,2.16],["c",-.75,.69,-1.23,1.44,-1.47,2.19],["c",-.15,.45,-.18,.63,-.21,1.35],["l",0,.66],["l",.39,-.18],["c",1.83,-.9,3.45,-1.95,4.47,-2.91],["c",.93,-.9,1.53,-1.83,1.74,-2.82],["c",.06,-.33,.06,-.87,.03,-1.32],["z"],["m",-.27,4.86],["c",-.03,-.21,-.06,-.36,-.06,-.36],["c",0,-.03,-.12,.09,-.24,.24],["c",-.39,.48,-.99,1.08,-2.16,2.19],["c",-1.47,1.38,-1.92,1.83,-2.46,2.49],["c",-.66,.87,-1.08,1.74,-1.29,2.58],["c",-.09,.42,-.15,.87,-.15,1.44],["l",0,.54],["l",.48,-.33],["c",1.5,-1.02,2.58,-1.89,3.51,-2.82],["c",1.47,-1.47,2.25,-2.85,2.4,-4.26],["c",.03,-.39,.03,-1.17,-.03,-1.71],["z"],["m",-.66,7.68],["c",.03,-.15,.03,-.6,.03,-.99],["l",0,-.72],["l",-.27,.33],["l",-1.74,1.98],["c",-1.77,1.92,-2.43,2.76,-2.97,3.9],["c",-.51,1.02,-.72,1.77,-.75,2.91],["c",0,.63,0,.63,.06,.6],["c",.03,-.03,.3,-.27,.63,-.54],["c",.66,-.6,1.86,-1.8,2.31,-2.31],["c",1.65,-1.89,2.52,-3.54,2.7,-5.16],["z"]],w:8.485,h:32.932},"clefs.C":{d:[["M",.06,-14.94],["l",.09,-.06],["l",1.92,0],["l",1.92,0],["l",.09,.06],["l",.06,.09],["l",0,14.85],["l",0,14.82],["l",-.06,.09],["l",-.09,.06],["l",-1.92,0],["l",-1.92,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"],["m",5.37,0],["c",.09,-.06,.09,-.06,.57,-.06],["c",.45,0,.45,0,.54,.06],["l",.06,.09],["l",0,7.14],["l",0,7.11],["l",.09,-.06],["c",.18,-.18,.72,-.84,.96,-1.2],["c",.3,-.45,.66,-1.17,.84,-1.65],["c",.36,-.9,.57,-1.83,.6,-2.79],["c",.03,-.48,.03,-.54,.09,-.63],["c",.12,-.18,.36,-.21,.54,-.12],["c",.18,.09,.21,.15,.24,.66],["c",.06,.87,.21,1.56,.57,2.22],["c",.51,1.02,1.26,1.68,2.22,1.92],["c",.21,.06,.33,.06,.78,.06],["c",.45,0,.57,0,.84,-.06],["c",.45,-.12,.81,-.33,1.08,-.6],["c",.57,-.57,.87,-1.41,.99,-2.88],["c",.06,-.54,.06,-3,0,-3.57],["c",-.21,-2.58,-.84,-3.87,-2.16,-4.5],["c",-.48,-.21,-1.17,-.36,-1.77,-.36],["c",-.69,0,-1.29,.27,-1.5,.72],["c",-.06,.15,-.06,.21,-.06,.42],["c",0,.24,0,.3,.06,.45],["c",.12,.24,.24,.39,.63,.66],["c",.42,.3,.57,.48,.69,.72],["c",.06,.15,.06,.21,.06,.48],["c",0,.39,-.03,.63,-.21,.96],["c",-.3,.6,-.87,1.08,-1.5,1.26],["c",-.27,.06,-.87,.06,-1.14,0],["c",-.78,-.24,-1.44,-.87,-1.65,-1.68],["c",-.12,-.42,-.09,-1.17,.09,-1.71],["c",.51,-1.65,1.98,-2.82,3.81,-3.09],["c",.84,-.09,2.46,.03,3.51,.27],["c",2.22,.57,3.69,1.8,4.44,3.75],["c",.36,.93,.57,2.13,.57,3.36],["c",0,1.44,-.48,2.73,-1.38,3.81],["c",-1.26,1.5,-3.27,2.43,-5.28,2.43],["c",-.48,0,-.51,0,-.75,-.09],["c",-.15,-.03,-.48,-.21,-.78,-.36],["c",-.69,-.36,-.87,-.42,-1.26,-.42],["c",-.27,0,-.3,0,-.51,.09],["c",-.57,.3,-.81,.9,-.81,2.1],["c",0,1.23,.24,1.83,.81,2.13],["c",.21,.09,.24,.09,.51,.09],["c",.39,0,.57,-.06,1.26,-.42],["c",.3,-.15,.63,-.33,.78,-.36],["c",.24,-.09,.27,-.09,.75,-.09],["c",2.01,0,4.02,.93,5.28,2.4],["c",.9,1.11,1.38,2.4,1.38,3.84],["c",0,1.5,-.3,2.88,-.84,3.96],["c",-.78,1.59,-2.19,2.64,-4.17,3.15],["c",-1.05,.24,-2.67,.36,-3.51,.27],["c",-1.83,-.27,-3.3,-1.44,-3.81,-3.09],["c",-.18,-.54,-.21,-1.29,-.09,-1.74],["c",.15,-.6,.63,-1.2,1.23,-1.47],["c",.36,-.18,.57,-.21,.99,-.21],["c",.42,0,.63,.03,1.02,.21],["c",.42,.21,.84,.63,1.05,1.05],["c",.18,.36,.21,.6,.21,.96],["c",0,.3,0,.36,-.06,.51],["c",-.12,.24,-.27,.42,-.69,.72],["c",-.57,.42,-.69,.63,-.69,1.08],["c",0,.24,0,.3,.06,.45],["c",.12,.21,.3,.39,.57,.54],["c",.42,.18,.87,.21,1.53,.15],["c",1.08,-.15,1.8,-.57,2.34,-1.32],["c",.54,-.75,.84,-1.83,.99,-3.51],["c",.06,-.57,.06,-3.03,0,-3.57],["c",-.12,-1.47,-.42,-2.31,-.99,-2.88],["c",-.27,-.27,-.63,-.48,-1.08,-.6],["c",-.27,-.06,-.39,-.06,-.84,-.06],["c",-.45,0,-.57,0,-.78,.06],["c",-1.14,.27,-2.01,1.17,-2.46,2.49],["c",-.21,.57,-.3,.99,-.33,1.65],["c",-.03,.51,-.06,.57,-.24,.66],["c",-.12,.06,-.27,.06,-.39,0],["c",-.21,-.09,-.21,-.15,-.24,-.75],["c",-.09,-1.92,-.78,-3.72,-2.01,-5.19],["c",-.18,-.21,-.36,-.42,-.39,-.45],["l",-.09,-.06],["l",0,7.11],["l",0,7.14],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.54,.06],["c",-.48,0,-.48,0,-.57,-.06],["l",-.06,-.09],["l",0,-14.82],["l",0,-14.85],["z"]],w:20.31,h:29.97},"clefs.F":{d:[["M",6.3,-7.8],["c",.36,-.03,1.65,0,2.13,.03],["c",3.6,.42,6.03,2.1,6.93,4.86],["c",.27,.84,.36,1.5,.36,2.58],["c",0,.9,-.03,1.35,-.18,2.16],["c",-.78,3.78,-3.54,7.08,-8.37,9.96],["c",-1.74,1.05,-3.87,2.13,-6.18,3.12],["c",-.39,.18,-.75,.33,-.81,.36],["c",-.06,.03,-.15,.06,-.18,.06],["c",-.15,0,-.33,-.18,-.33,-.33],["c",0,-.15,.06,-.21,.51,-.48],["c",3,-1.77,5.13,-3.21,6.84,-4.74],["c",.51,-.45,1.59,-1.5,1.95,-1.95],["c",1.89,-2.19,2.88,-4.32,3.15,-6.78],["c",.06,-.42,.06,-1.77,0,-2.19],["c",-.24,-2.01,-.93,-3.63,-2.04,-4.71],["c",-.63,-.63,-1.29,-1.02,-2.07,-1.2],["c",-1.62,-.39,-3.36,.15,-4.56,1.44],["c",-.54,.6,-1.05,1.47,-1.32,2.22],["l",-.09,.21],["l",.24,-.12],["c",.39,-.21,.63,-.24,1.11,-.24],["c",.3,0,.45,0,.66,.06],["c",1.92,.48,2.85,2.55,1.95,4.38],["c",-.45,.99,-1.41,1.62,-2.46,1.71],["c",-1.47,.09,-2.91,-.87,-3.39,-2.25],["c",-.18,-.57,-.21,-1.32,-.03,-2.28],["c",.39,-2.25,1.83,-4.2,3.81,-5.19],["c",.69,-.36,1.59,-.6,2.37,-.69],["z"],["m",11.58,2.52],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.3,1.17,-.72,2.19,-1.89,1.89],["c",-.99,-.21,-1.5,-1.32,-1.02,-2.25],["c",.18,-.39,.6,-.69,1.02,-.78],["z"],["m",0,7.5],["c",.84,-.21,1.71,.3,1.89,1.14],["c",.21,.87,-.3,1.71,-1.14,1.89],["c",-.87,.21,-1.71,-.3,-1.89,-1.14],["c",-.21,-.84,.3,-1.71,1.14,-1.89],["z"]],w:20.153,h:23.142},"clefs.G":{d:[["M",9.69,-37.41],["c",.09,-.09,.24,-.06,.36,0],["c",.12,.09,.57,.6,.96,1.11],["c",1.77,2.34,3.21,5.85,3.57,8.73],["c",.21,1.56,.03,3.27,-.45,4.86],["c",-.69,2.31,-1.92,4.47,-4.23,7.44],["c",-.3,.39,-.57,.72,-.6,.75],["c",-.03,.06,0,.15,.18,.78],["c",.54,1.68,1.38,4.44,1.68,5.49],["l",.09,.42],["l",.39,0],["c",1.47,.09,2.76,.51,3.96,1.29],["c",1.83,1.23,3.06,3.21,3.39,5.52],["c",.09,.45,.12,1.29,.06,1.74],["c",-.09,1.02,-.33,1.83,-.75,2.73],["c",-.84,1.71,-2.28,3.06,-4.02,3.72],["l",-.33,.12],["l",.03,1.26],["c",0,1.74,-.06,3.63,-.21,4.62],["c",-.45,3.06,-2.19,5.49,-4.47,6.21],["c",-.57,.18,-.9,.21,-1.59,.21],["c",-.69,0,-1.02,-.03,-1.65,-.21],["c",-1.14,-.27,-2.13,-.84,-2.94,-1.65],["c",-.99,-.99,-1.56,-2.16,-1.71,-3.54],["c",-.09,-.81,.06,-1.53,.45,-2.13],["c",.63,-.99,1.83,-1.56,3,-1.53],["c",1.5,.09,2.64,1.32,2.73,2.94],["c",.06,1.47,-.93,2.7,-2.37,2.97],["c",-.45,.06,-.84,.03,-1.29,-.09],["l",-.21,-.09],["l",.09,.12],["c",.39,.54,.78,.93,1.32,1.26],["c",1.35,.87,3.06,1.02,4.35,.36],["c",1.44,-.72,2.52,-2.28,2.97,-4.35],["c",.15,-.66,.24,-1.5,.3,-3.03],["c",.03,-.84,.03,-2.94,0,-3],["c",-.03,0,-.18,0,-.36,.03],["c",-.66,.12,-.99,.12,-1.83,.12],["c",-1.05,0,-1.71,-.06,-2.61,-.3],["c",-4.02,-.99,-7.11,-4.35,-7.8,-8.46],["c",-.12,-.66,-.12,-.99,-.12,-1.83],["c",0,-.84,0,-1.14,.15,-1.92],["c",.36,-2.28,1.41,-4.62,3.3,-7.29],["l",2.79,-3.6],["c",.54,-.66,.96,-1.2,.96,-1.23],["c",0,-.03,-.09,-.33,-.18,-.69],["c",-.96,-3.21,-1.41,-5.28,-1.59,-7.68],["c",-.12,-1.38,-.15,-3.09,-.06,-3.96],["c",.33,-2.67,1.38,-5.07,3.12,-7.08],["c",.36,-.42,.99,-1.05,1.17,-1.14],["z"],["m",2.01,4.71],["c",-.15,-.3,-.3,-.54,-.3,-.54],["c",-.03,0,-.18,.09,-.3,.21],["c",-2.4,1.74,-3.87,4.2,-4.26,7.11],["c",-.06,.54,-.06,1.41,-.03,1.89],["c",.09,1.29,.48,3.12,1.08,5.22],["c",.15,.42,.24,.78,.24,.81],["c",0,.03,.84,-1.11,1.23,-1.68],["c",1.89,-2.73,2.88,-5.07,3.15,-7.53],["c",.09,-.57,.12,-1.74,.06,-2.37],["c",-.09,-1.23,-.27,-1.92,-.87,-3.12],["z"],["m",-2.94,20.7],["c",-.21,-.72,-.39,-1.32,-.42,-1.32],["c",0,0,-1.2,1.47,-1.86,2.37],["c",-2.79,3.63,-4.02,6.3,-4.35,9.3],["c",-.03,.21,-.03,.69,-.03,1.08],["c",0,.69,0,.75,.06,1.11],["c",.12,.54,.27,.99,.51,1.47],["c",.69,1.38,1.83,2.55,3.42,3.42],["c",.96,.54,2.07,.9,3.21,1.08],["c",.78,.12,2.04,.12,2.94,-.03],["c",.51,-.06,.45,-.03,.42,-.3],["c",-.24,-3.33,-.72,-6.33,-1.62,-10.08],["c",-.09,-.39,-.18,-.75,-.18,-.78],["c",-.03,-.03,-.42,0,-.81,.09],["c",-.9,.18,-1.65,.57,-2.22,1.14],["c",-.72,.72,-1.08,1.65,-1.05,2.64],["c",.06,.96,.48,1.83,1.23,2.58],["c",.36,.36,.72,.63,1.17,.9],["c",.33,.18,.36,.21,.42,.33],["c",.18,.42,-.18,.9,-.6,.87],["c",-.18,-.03,-.84,-.36,-1.26,-.63],["c",-.78,-.51,-1.38,-1.11,-1.86,-1.83],["c",-1.77,-2.7,-.99,-6.42,1.71,-8.19],["c",.3,-.21,.81,-.48,1.17,-.63],["c",.3,-.09,1.02,-.3,1.14,-.3],["c",.06,0,.09,0,.09,-.03],["c",.03,-.03,-.51,-1.92,-1.23,-4.26],["z"],["m",3.78,7.41],["c",-.18,-.03,-.36,-.06,-.39,-.06],["c",-.03,0,0,.21,.18,1.02],["c",.75,3.18,1.26,6.3,1.5,9.09],["c",.06,.72,0,.69,.51,.42],["c",.78,-.36,1.44,-.96,1.98,-1.77],["c",1.08,-1.62,1.2,-3.69,.3,-5.55],["c",-.81,-1.62,-2.31,-2.79,-4.08,-3.15],["z"]],w:19.051,h:57.057},"clefs.perc":{d:[["M",5.07,-7.44],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"],["m",6.63,0],["l",.09,-.06],["l",1.53,0],["l",1.53,0],["l",.09,.06],["l",.06,.09],["l",0,7.35],["l",0,7.32],["l",-.06,.09],["l",-.09,.06],["l",-1.53,0],["l",-1.53,0],["l",-.09,-.06],["l",-.06,-.09],["l",0,-7.32],["l",0,-7.35],["z"]],w:21,h:14.97},"timesig.common":{d:[["M",6.66,-7.83],["c",.72,-.06,1.41,-.03,1.98,.09],["c",1.2,.27,2.34,.96,3.09,1.92],["c",.63,.81,1.08,1.86,1.14,2.73],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,0,-.09,-.12,-.24,-.27],["c",-1.02,-1.11,-2.55,-1.68,-4.08,-1.5],["c",-1.29,.15,-2.04,.69,-2.4,1.74],["c",-.36,.93,-.42,1.89,-.42,5.37],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.63,1.68,1.41,2.07],["c",.81,.39,2.16,.45,3.18,.09],["c",1.29,-.45,2.37,-1.53,3.03,-2.97],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.06,.39,-.42,1.38,-.69,1.89],["c",-.96,1.8,-2.49,2.94,-4.23,3.18],["c",-.99,.12,-2.58,-.06,-3.63,-.45],["c",-.96,-.36,-1.71,-.84,-2.4,-1.5],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.9,-3.45,2.01,-4.56],["c",.69,-.66,1.44,-1.11,2.37,-1.47],["c",.63,-.24,1.47,-.42,2.22,-.48],["z"]],w:13.038,h:15.689},"timesig.cut":{d:[["M",6.24,-10.44],["c",.09,-.06,.09,-.06,.48,-.06],["c",.36,0,.36,0,.45,.06],["l",.06,.09],["l",0,1.23],["l",0,1.26],["l",.27,0],["c",1.26,0,2.49,.45,3.48,1.29],["c",1.05,.87,1.8,2.28,1.89,3.48],["c",.06,1.02,-.51,1.92,-1.44,2.22],["c",-.24,.09,-.3,.09,-.63,.09],["c",-.33,0,-.42,0,-.63,-.06],["c",-.66,-.24,-1.14,-.63,-1.41,-1.2],["c",-.15,-.3,-.21,-.51,-.24,-.9],["c",-.06,-1.08,.57,-2.04,1.56,-2.37],["c",.18,-.06,.27,-.06,.63,-.06],["l",.45,0],["c",.06,.03,.09,.03,.09,0],["c",0,-.03,-.45,-.51,-.66,-.69],["c",-.87,-.69,-1.83,-1.05,-2.94,-1.11],["l",-.42,0],["l",0,7.17],["l",0,7.14],["l",.42,0],["c",.69,-.03,1.23,-.18,1.86,-.51],["c",1.05,-.51,1.89,-1.47,2.46,-2.7],["c",.15,-.33,.33,-.87,.39,-1.17],["c",.09,-.24,.15,-.36,.3,-.39],["c",.21,-.03,.42,.15,.39,.36],["c",-.03,.24,-.21,.78,-.39,1.2],["c",-.96,2.37,-2.94,3.9,-5.13,3.9],["l",-.3,0],["l",0,1.26],["l",0,1.23],["l",-.06,.09],["c",-.09,.06,-.09,.06,-.45,.06],["c",-.39,0,-.39,0,-.48,-.06],["l",-.06,-.09],["l",0,-1.29],["l",0,-1.29],["l",-.21,-.03],["c",-1.23,-.21,-2.31,-.63,-3.21,-1.29],["c",-.15,-.09,-.45,-.36,-.66,-.57],["c",-1.11,-1.11,-1.8,-2.61,-2.04,-4.56],["c",-.06,-.6,-.06,-2.01,0,-2.61],["c",.24,-1.95,.93,-3.45,2.04,-4.59],["c",.42,-.39,.78,-.66,1.26,-.93],["c",.75,-.45,1.65,-.75,2.61,-.9],["l",.21,-.03],["l",0,-1.29],["l",0,-1.29],["z"],["m",-.06,10.44],["c",0,-5.58,0,-6.99,-.03,-6.99],["c",-.15,0,-.63,.27,-.87,.45],["c",-.45,.36,-.75,.93,-.93,1.77],["c",-.18,.81,-.24,1.8,-.24,4.74],["c",0,2.97,.06,3.96,.24,4.77],["c",.24,1.08,.66,1.68,1.41,2.07],["c",.12,.06,.3,.12,.33,.15],["l",.09,0],["l",0,-6.96],["z"]],w:13.038,h:20.97},"timesig.imperfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.imperfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},"timesig.perfectum2":{d:[["M",13,-5],["a",8,8,0,1,0,0,10]],w:13.038,h:20.97},f:{d:[["M",9.93,-14.28],["c",1.53,-.18,2.88,.45,3.12,1.5],["c",.12,.51,0,1.32,-.27,1.86],["c",-.15,.3,-.42,.57,-.63,.69],["c",-.69,.36,-1.56,.03,-1.83,-.69],["c",-.09,-.24,-.09,-.69,0,-.87],["c",.06,-.12,.21,-.24,.45,-.42],["c",.42,-.24,.57,-.45,.6,-.72],["c",.03,-.33,-.09,-.39,-.63,-.42],["c",-.3,0,-.45,0,-.6,.03],["c",-.81,.21,-1.35,.93,-1.74,2.46],["c",-.06,.27,-.48,2.25,-.48,2.31],["c",0,.03,.39,.03,.9,.03],["c",.72,0,.9,0,.99,.06],["c",.42,.15,.45,.72,.03,.9],["c",-.12,.06,-.24,.06,-1.17,.06],["l",-1.05,0],["l",-.78,2.55],["c",-.45,1.41,-.87,2.79,-.96,3.06],["c",-.87,2.37,-2.37,4.74,-3.78,5.91],["c",-1.05,.9,-2.04,1.23,-3.09,1.08],["c",-1.11,-.18,-1.89,-.78,-2.04,-1.59],["c",-.12,-.66,.15,-1.71,.54,-2.19],["c",.69,-.75,1.86,-.54,2.22,.39],["c",.06,.15,.09,.27,.09,.48],["c",0,.24,-.03,.27,-.12,.42],["c",-.03,.09,-.15,.18,-.27,.27],["c",-.09,.06,-.27,.21,-.36,.27],["c",-.24,.18,-.36,.36,-.39,.6],["c",-.03,.33,.09,.39,.63,.42],["c",.42,0,.63,-.03,.9,-.15],["c",.6,-.3,.96,-.96,1.38,-2.64],["c",.09,-.42,.63,-2.55,1.17,-4.77],["l",1.02,-4.08],["c",0,-.03,-.36,-.03,-.81,-.03],["c",-.72,0,-.81,0,-.93,-.06],["c",-.42,-.18,-.39,-.75,.03,-.9],["c",.09,-.06,.27,-.06,1.05,-.06],["l",.96,0],["l",0,-.09],["c",.06,-.18,.3,-.72,.51,-1.17],["c",1.2,-2.46,3.3,-4.23,5.34,-4.5],["z"]],w:16.155,h:19.445},m:{d:[["M",2.79,-8.91],["c",.09,0,.3,-.03,.45,-.03],["c",.24,.03,.3,.03,.45,.12],["c",.36,.15,.63,.54,.75,1.02],["l",.03,.21],["l",.33,-.3],["c",.69,-.69,1.38,-1.02,2.07,-1.02],["c",.27,0,.33,0,.48,.06],["c",.21,.09,.48,.36,.63,.6],["c",.03,.09,.12,.27,.18,.42],["c",.03,.15,.09,.27,.12,.27],["c",0,0,.09,-.09,.18,-.21],["c",.33,-.39,.87,-.81,1.29,-.99],["c",.78,-.33,1.47,-.21,2.01,.33],["c",.3,.33,.48,.69,.6,1.14],["c",.09,.42,.06,.54,-.54,3.06],["c",-.33,1.29,-.57,2.4,-.57,2.43],["c",0,.12,.09,.21,.21,.21],["c",.24,0,.75,-.3,1.2,-.72],["c",.45,-.39,.6,-.45,.78,-.27],["c",.18,.18,.09,.36,-.45,.87],["c",-1.05,.96,-1.83,1.47,-2.58,1.71],["c",-.93,.33,-1.53,.21,-1.8,-.33],["c",-.06,-.15,-.06,-.21,-.06,-.45],["c",0,-.24,.03,-.48,.6,-2.82],["c",.42,-1.71,.6,-2.64,.63,-2.79],["c",.03,-.57,-.3,-.75,-.84,-.48],["c",-.24,.12,-.54,.39,-.66,.63],["c",-.03,.09,-.42,1.38,-.9,3],["c",-.9,3.15,-.84,3,-1.14,3.15],["l",-.15,.09],["l",-.78,0],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.36,-1.38,.84,-2.97],["c",.57,-2.04,.81,-2.97,.84,-3.12],["c",.03,-.54,-.3,-.72,-.84,-.45],["c",-.24,.12,-.57,.42,-.66,.63],["c",-.06,.09,-.51,1.44,-1.05,2.97],["c",-.51,1.56,-.99,2.85,-.99,2.91],["c",-.06,.12,-.21,.24,-.36,.3],["c",-.12,.06,-.21,.06,-.9,.06],["c",-.6,0,-.78,0,-.84,-.06],["c",-.09,-.03,-.18,-.18,-.18,-.27],["c",0,-.03,.45,-1.38,.99,-2.97],["c",1.05,-3.18,1.05,-3.18,.93,-3.45],["c",-.12,-.27,-.39,-.3,-.72,-.15],["c",-.54,.27,-1.14,1.17,-1.56,2.4],["c",-.06,.15,-.15,.3,-.18,.36],["c",-.21,.21,-.57,.27,-.72,.09],["c",-.09,-.09,-.06,-.21,.06,-.63],["c",.48,-1.26,1.26,-2.46,2.01,-3.21],["c",.57,-.54,1.2,-.87,1.83,-1.02],["z"]],w:14.687,h:9.126},p:{d:[["M",1.92,-8.7],["c",.27,-.09,.81,-.06,1.11,.03],["c",.54,.18,.93,.51,1.17,.99],["c",.09,.15,.15,.33,.18,.36],["l",0,.12],["l",.3,-.27],["c",.66,-.6,1.35,-1.02,2.13,-1.2],["c",.21,-.06,.33,-.06,.78,-.06],["c",.45,0,.51,0,.84,.09],["c",1.29,.33,2.07,1.32,2.25,2.79],["c",.09,.81,-.09,2.01,-.45,2.79],["c",-.54,1.26,-1.86,2.55,-3.18,3.03],["c",-.45,.18,-.81,.24,-1.29,.24],["c",-.69,-.03,-1.35,-.18,-1.86,-.45],["c",-.3,-.15,-.51,-.18,-.69,-.09],["c",-.09,.03,-.18,.09,-.18,.12],["c",-.09,.12,-1.05,2.94,-1.05,3.06],["c",0,.24,.18,.48,.51,.63],["c",.18,.06,.54,.15,.75,.15],["c",.21,0,.36,.06,.42,.18],["c",.12,.18,.06,.42,-.12,.54],["c",-.09,.03,-.15,.03,-.78,0],["c",-1.98,-.15,-3.81,-.15,-5.79,0],["c",-.63,.03,-.69,.03,-.78,0],["c",-.24,-.15,-.24,-.57,.03,-.66],["c",.06,-.03,.48,-.09,.99,-.12],["c",.87,-.06,1.11,-.09,1.35,-.21],["c",.18,-.06,.33,-.18,.39,-.3],["c",.06,-.12,3.24,-9.42,3.27,-9.6],["c",.06,-.33,.03,-.57,-.15,-.69],["c",-.09,-.06,-.12,-.06,-.3,-.06],["c",-.69,.06,-1.53,1.02,-2.28,2.61],["c",-.09,.21,-.21,.45,-.27,.51],["c",-.09,.12,-.33,.24,-.48,.24],["c",-.18,0,-.36,-.15,-.36,-.3],["c",0,-.24,.78,-1.83,1.26,-2.55],["c",.72,-1.11,1.47,-1.74,2.28,-1.92],["z"],["m",5.37,1.47],["c",-.27,-.12,-.75,-.03,-1.14,.21],["c",-.75,.48,-1.47,1.68,-1.89,3.15],["c",-.45,1.47,-.42,2.34,0,2.7],["c",.45,.39,1.26,.21,1.83,-.36],["c",.51,-.51,.99,-1.68,1.38,-3.27],["c",.3,-1.17,.33,-1.74,.15,-2.13],["c",-.09,-.15,-.15,-.21,-.33,-.3],["z"]],w:14.689,h:13.127},r:{d:[["M",6.33,-9.12],["c",.27,-.03,.93,0,1.2,.06],["c",.84,.21,1.23,.81,1.02,1.53],["c",-.24,.75,-.9,1.17,-1.56,.96],["c",-.33,-.09,-.51,-.3,-.66,-.75],["c",-.03,-.12,-.09,-.24,-.12,-.3],["c",-.09,-.15,-.3,-.24,-.48,-.24],["c",-.57,0,-1.38,.54,-1.65,1.08],["c",-.06,.15,-.33,1.17,-.9,3.27],["c",-.57,2.31,-.81,3.12,-.87,3.21],["c",-.03,.06,-.12,.15,-.18,.21],["l",-.12,.06],["l",-.81,.03],["c",-.69,0,-.81,0,-.9,-.03],["c",-.09,-.06,-.18,-.21,-.18,-.3],["c",0,-.06,.39,-1.62,.9,-3.51],["c",.84,-3.24,.87,-3.45,.87,-3.72],["c",0,-.21,0,-.27,-.03,-.36],["c",-.12,-.15,-.21,-.24,-.42,-.24],["c",-.24,0,-.45,.15,-.78,.42],["c",-.33,.36,-.45,.54,-.72,1.14],["c",-.03,.12,-.21,.24,-.36,.27],["c",-.12,0,-.15,0,-.24,-.06],["c",-.18,-.12,-.18,-.21,-.06,-.54],["c",.21,-.57,.42,-.93,.78,-1.32],["c",.54,-.51,1.2,-.81,1.95,-.87],["c",.81,-.03,1.53,.3,1.92,.87],["l",.12,.18],["l",.09,-.09],["c",.57,-.45,1.41,-.84,2.19,-.96],["z"]],w:9.41,h:9.132},s:{d:[["M",4.47,-8.73],["c",.09,0,.36,-.03,.57,-.03],["c",.75,.03,1.29,.24,1.71,.63],["c",.51,.54,.66,1.26,.36,1.83],["c",-.24,.42,-.63,.57,-1.11,.42],["c",-.33,-.09,-.6,-.36,-.6,-.57],["c",0,-.03,.06,-.21,.15,-.39],["c",.12,-.21,.15,-.33,.18,-.48],["c",0,-.24,-.06,-.48,-.15,-.6],["c",-.15,-.21,-.42,-.24,-.75,-.15],["c",-.27,.06,-.48,.18,-.69,.36],["c",-.39,.39,-.51,.96,-.33,1.38],["c",.09,.21,.42,.51,.78,.72],["c",1.11,.69,1.59,1.11,1.89,1.68],["c",.21,.39,.24,.78,.15,1.29],["c",-.18,1.2,-1.17,2.16,-2.52,2.52],["c",-1.02,.24,-1.95,.12,-2.7,-.42],["c",-.72,-.51,-.99,-1.47,-.6,-2.19],["c",.24,-.48,.72,-.63,1.17,-.42],["c",.33,.18,.54,.45,.57,.81],["c",0,.21,-.03,.3,-.33,.51],["c",-.33,.24,-.39,.42,-.27,.69],["c",.06,.15,.21,.27,.45,.33],["c",.3,.09,.87,.09,1.2,0],["c",.75,-.21,1.23,-.72,1.29,-1.35],["c",.03,-.42,-.15,-.81,-.54,-1.2],["c",-.24,-.24,-.48,-.42,-1.41,-1.02],["c",-.69,-.42,-1.05,-.93,-1.05,-1.47],["c",0,-.39,.12,-.87,.3,-1.23],["c",.27,-.57,.78,-1.05,1.38,-1.35],["c",.24,-.12,.63,-.27,.9,-.3],["z"]],w:6.632,h:8.758},z:{d:[["M",2.64,-7.95],["c",.36,-.09,.81,-.03,1.71,.27],["c",.78,.21,.96,.27,1.74,.3],["c",.87,.06,1.02,.03,1.38,-.21],["c",.21,-.15,.33,-.15,.48,-.06],["c",.15,.09,.21,.3,.15,.45],["c",-.03,.06,-1.26,1.26,-2.76,2.67],["l",-2.73,2.55],["l",.54,.03],["c",.54,.03,.72,.03,2.01,.15],["c",.36,.03,.9,.06,1.2,.09],["c",.66,0,.81,-.03,1.02,-.24],["c",.3,-.3,.39,-.72,.27,-1.23],["c",-.06,-.27,-.06,-.27,-.03,-.39],["c",.15,-.3,.54,-.27,.69,.03],["c",.15,.33,.27,1.02,.27,1.5],["c",0,1.47,-1.11,2.7,-2.52,2.79],["c",-.57,.03,-1.02,-.09,-2.01,-.51],["c",-1.02,-.42,-1.23,-.48,-2.13,-.54],["c",-.81,-.06,-.96,-.03,-1.26,.18],["c",-.12,.06,-.24,.12,-.27,.12],["c",-.27,0,-.45,-.3,-.36,-.51],["c",.03,-.06,1.32,-1.32,2.91,-2.79],["l",2.88,-2.73],["c",-.03,0,-.21,.03,-.42,.06],["c",-.21,.03,-.78,.09,-1.23,.12],["c",-1.11,.12,-1.23,.15,-1.95,.27],["c",-.72,.15,-1.17,.18,-1.29,.09],["c",-.27,-.18,-.21,-.75,.12,-1.26],["c",.39,-.6,.93,-1.02,1.59,-1.2],["z"]],w:8.573,h:8.743},"+":{d:[["M",3.48,-9.3],["c",.18,-.09,.36,-.09,.54,0],["c",.18,.09,.24,.15,.33,.3],["l",.06,.15],["l",0,1.29],["l",0,1.29],["l",1.29,0],["c",1.23,0,1.29,0,1.41,.06],["c",.06,.03,.15,.09,.18,.12],["c",.12,.09,.21,.33,.21,.48],["c",0,.15,-.09,.39,-.21,.48],["c",-.03,.03,-.12,.09,-.18,.12],["c",-.12,.06,-.18,.06,-1.41,.06],["l",-1.29,0],["l",0,1.29],["c",0,1.23,0,1.29,-.06,1.41],["c",-.09,.18,-.15,.24,-.3,.33],["c",-.21,.09,-.39,.09,-.57,0],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.06,-.12,-.06,-.18,-.06,-1.41],["l",0,-1.29],["l",-1.29,0],["c",-1.23,0,-1.29,0,-1.41,-.06],["c",-.18,-.09,-.24,-.15,-.33,-.33],["c",-.09,-.18,-.09,-.36,0,-.54],["c",.09,-.18,.15,-.24,.33,-.33],["l",.15,-.06],["l",1.26,0],["l",1.29,0],["l",0,-1.29],["c",0,-1.23,0,-1.29,.06,-1.41],["c",.09,-.18,.15,-.24,.33,-.33],["z"]],w:7.507,h:7.515},",":{d:[["M",1.32,-3.36],["c",.57,-.15,1.17,.03,1.59,.45],["c",.45,.45,.6,.96,.51,1.89],["c",-.09,1.23,-.42,2.46,-.99,3.93],["c",-.3,.72,-.72,1.62,-.78,1.68],["c",-.18,.21,-.51,.18,-.66,-.06],["c",-.03,-.06,-.06,-.15,-.06,-.18],["c",0,-.06,.12,-.33,.24,-.63],["c",.84,-1.8,1.02,-2.61,.69,-3.24],["c",-.12,-.24,-.27,-.36,-.75,-.6],["c",-.36,-.15,-.42,-.21,-.6,-.39],["c",-.69,-.69,-.69,-1.71,0,-2.4],["c",.21,-.21,.51,-.39,.81,-.45],["z"]],w:3.452,h:8.143},"-":{d:[["M",.18,-5.34],["c",.09,-.06,.15,-.06,2.31,-.06],["c",2.46,0,2.37,0,2.46,.21],["c",.12,.21,.03,.42,-.15,.54],["c",-.09,.06,-.15,.06,-2.28,.06],["c",-2.16,0,-2.22,0,-2.31,-.06],["c",-.27,-.15,-.27,-.54,-.03,-.69],["z"]],w:5.001,h:.81},".":{d:[["M",1.32,-3.36],["c",1.05,-.27,2.1,.57,2.1,1.65],["c",0,1.08,-1.05,1.92,-2.1,1.65],["c",-.9,-.21,-1.5,-1.14,-1.26,-2.04],["c",.12,-.63,.63,-1.11,1.26,-1.26],["z"]],w:3.413,h:3.402},"scripts.wedge":{d:[["M",-3.66,-7.44],["c",.06,-.09,0,-.09,.81,.03],["c",1.86,.3,3.84,.3,5.73,0],["c",.78,-.12,.72,-.12,.78,-.03],["c",.15,.15,.12,.24,-.24,.6],["c",-.93,.93,-1.98,2.76,-2.67,4.62],["c",-.3,.78,-.51,1.71,-.51,2.13],["c",0,.15,0,.18,-.06,.27],["c",-.12,.09,-.24,.09,-.36,0],["c",-.06,-.09,-.06,-.12,-.06,-.27],["c",0,-.42,-.21,-1.35,-.51,-2.13],["c",-.69,-1.86,-1.74,-3.69,-2.67,-4.62],["c",-.36,-.36,-.39,-.45,-.24,-.6],["z"]],w:7.49,h:7.752},"scripts.thumb":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.27,1.41,-1.08,2.43,-2.16,2.73],["l",-.18,.06],["l",0,.12],["c",.03,.06,.06,.45,.09,.87],["c",.03,.57,.03,.78,0,.84],["c",-.09,.27,-.39,.48,-.66,.48],["c",-.27,0,-.57,-.21,-.66,-.48],["c",-.03,-.06,-.03,-.27,0,-.84],["c",.03,-.42,.06,-.81,.09,-.87],["l",0,-.12],["l",-.18,-.06],["c",-1.08,-.3,-1.89,-1.32,-2.16,-2.73],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.05,.9],["c",-.15,-.09,-.21,-.09,-.45,-.12],["c",-.15,0,-.3,.03,-.39,.03],["c",-.57,.18,-.9,.72,-1.08,1.74],["c",-.06,.48,-.06,1.8,0,2.28],["c",.15,.9,.42,1.44,.9,1.65],["c",.18,.09,.21,.09,.51,.09],["c",.3,0,.33,0,.51,-.09],["c",.48,-.21,.75,-.75,.9,-1.65],["c",.03,-.27,.03,-.54,.03,-1.14],["c",0,-.6,0,-.87,-.03,-1.14],["c",-.15,-.9,-.45,-1.44,-.9,-1.65],["z"]],w:5.955,h:9.75},"scripts.open":{d:[["M",-.54,-3.69],["c",.15,-.03,.36,-.06,.51,-.06],["c",1.44,0,2.58,1.11,2.94,2.85],["c",.09,.48,.09,1.32,0,1.8],["c",-.33,1.74,-1.47,2.85,-2.91,2.85],["c",-1.44,0,-2.58,-1.11,-2.91,-2.85],["c",-.09,-.48,-.09,-1.32,0,-1.8],["c",.15,-.84,.51,-1.53,1.02,-2.04],["c",.39,-.39,.84,-.63,1.35,-.75],["z"],["m",1.11,.9],["c",-.21,-.09,-.27,-.09,-.51,-.12],["c",-.3,0,-.42,.03,-.66,.15],["c",-.24,.12,-.51,.39,-.66,.63],["c",-.54,.93,-.63,2.64,-.21,3.81],["c",.21,.54,.51,.9,.93,1.11],["c",.21,.09,.24,.09,.54,.09],["c",.3,0,.33,0,.54,-.09],["c",.42,-.21,.72,-.57,.93,-1.11],["c",.36,-.99,.36,-2.37,0,-3.36],["c",-.21,-.54,-.51,-.9,-.9,-1.11],["z"]],w:5.955,h:7.5},"scripts.longphrase":{d:[["M",1.47,-15.09],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.54,.06,11.25],["l",0,11.25],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-3.39,-.03,-11.25],["l",0,-11.25],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:23.04},"scripts.mediumphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.39,.06,7.5],["l",0,7.5],["l",-.63,.15],["c",-.66,.18,-1.44,.39,-1.5,.39],["c",-.03,0,-.03,-2.28,-.03,-7.5],["l",0,-7.5],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:15.54},"scripts.shortphrase":{d:[["M",1.47,-7.59],["c",.36,-.09,.66,-.18,.69,-.18],["c",.06,0,.06,.21,.06,3.75],["l",0,3.75],["l",-.42,.09],["c",-.57,.18,-1.65,.45,-1.71,.45],["c",-.03,0,-.03,-.72,-.03,-3.75],["l",0,-3.75],["l",.36,-.09],["c",.21,-.06,.66,-.18,1.05,-.27],["z"]],w:2.16,h:8.04},"scripts.snap":{d:[["M",4.5,-3.39],["c",.36,-.03,.96,-.03,1.35,0],["c",1.56,.15,3.15,.9,4.2,2.01],["c",.24,.27,.33,.42,.33,.6],["c",0,.27,.03,.24,-2.46,2.22],["c",-1.29,1.02,-2.4,1.86,-2.49,1.92],["c",-.18,.09,-.3,.09,-.48,0],["c",-.09,-.06,-1.2,-.9,-2.49,-1.92],["c",-2.49,-1.98,-2.46,-1.95,-2.46,-2.22],["c",0,-.18,.09,-.33,.33,-.6],["c",1.05,-1.08,2.64,-1.86,4.17,-2.01],["z"],["m",1.29,1.17],["c",-1.47,-.15,-2.97,.3,-4.14,1.2],["l",-.18,.15],["l",.06,.09],["c",.15,.12,3.63,2.85,3.66,2.85],["c",.03,0,3.51,-2.73,3.66,-2.85],["l",.06,-.09],["l",-.18,-.15],["c",-.84,-.66,-1.89,-1.08,-2.94,-1.2],["z"]],w:10.38,h:6.84},"noteheads.slash.whole":{d:[["M",5,-5],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"],["m",0,-2],["l",1,1],["l",-5,5],["l",-1,-1],["z"],["m",-4,6],["l",-5,-5],["l",2,-2],["l",5,5],["z"]],w:10.81,h:15.63},"noteheads.slash.quarter":{d:[["M",9,-6],["l",0,4],["l",-9,9],["l",0,-4],["z"]],w:9,h:9},"noteheads.harmonic.quarter":{d:[["M",3.63,-4.02],["c",.09,-.06,.18,-.09,.24,-.03],["c",.03,.03,.87,.93,1.83,2.01],["c",1.5,1.65,1.8,1.98,1.8,2.04],["c",0,.06,-.3,.39,-1.8,2.04],["c",-.96,1.08,-1.8,1.98,-1.83,2.01],["c",-.06,.06,-.15,.03,-.24,-.03],["c",-.12,-.09,-3.54,-3.84,-3.6,-3.93],["c",-.03,-.03,-.03,-.09,-.03,-.15],["c",.03,-.06,3.45,-3.84,3.63,-3.96],["z"]],w:7.5,h:8.165}},a=function(e){for(var t=[],n=0,r=e.length;n<r;n++){t[n]=[];for(var i=0,a=e[n].length;i<a;i++)t[n][i]=e[n][i]}return t},s={printSymbol:function(e,t,n,r,s,o,c){if(!i[n])return null;var l=a(i[n].d);l[0][1]+=e,l[0][2]+=t;for(var h="",u=0;u<l.length;u++)h+=l[u].join(" ");return r.path({path:h,stroke:o,fill:c,class:s})},getPathForSymbol:function(e,t,n,r,s){if(r=r||1,s=s||1,!i[n])return null;var o=a(i[n].d);return 1===r&&1===s||function(e,t,n){for(var r=0,i=e.length;r<i;r++){var a,s,o=e[r];for(a=1,s=o.length;a<s;a++)o[a]*=a%2?t:n}}(o,r,s),o[0][1]+=e,o[0][2]+=t,o},getSymbolWidth:function(e){return i[e]?i[e].w:0},symbolHeightInPitches:function(e){return(i[e]?i[e].h:0)/r.STEP},getSymbolAlign:function(e){return"scripts"===e.substring(0,7)&&"scripts.roll"!==e?"center":"left"},getYCorr:function(e){switch(e){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":return-2;case"timesig.common":case"timesig.cut":return 0;case"flags.d32nd":return-1;case"flags.d64th":return-2;case"flags.u32nd":return 1;case"flags.u64th":return 3;case"rests.whole":return 1;case"rests.half":case"rests.8th":case"rests.quarter":case"rests.16th":case"rests.32nd":case"rests.64th":return-1;case"f":case"m":case"p":case"s":case"z":return-4;case"scripts.trill":case"scripts.upbow":case"scripts.downbow":return-2;case"scripts.ufermata":case"scripts.wedge":case"scripts.roll":case"scripts.shortphrase":case"scripts.longphrase":return-1;case"scripts.dfermata":return 1;default:return 0}},setSymbol:function(e,t){i[e]=t}};e.exports=s},function(e,t,n){var r=n(8),i=function(e,t,n,r,i,a){a||(a={}),this.tuneNumber=i,this.abcelem=e,this.duration=t,this.durationClass=a.durationClassOveride?a.durationClassOveride:this.duration,this.minspacing=n||0,this.x=0,this.children=[],this.heads=[],this.extra=[],this.extraw=0,this.w=0,this.right=[],this.invisible=!1,this.bottom=void 0,this.top=void 0,this.type=r,this.fixed={w:0,t:void 0,b:void 0},this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};i.prototype.getFixedCoords=function(){return{x:this.x,w:this.fixed.w,t:this.fixed.t,b:this.fixed.b}},i.prototype.addExtra=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top),void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom),e.dx<this.extraw&&(this.extraw=e.dx),this.extra[this.extra.length]=e,this._addChild(e)},i.prototype.addHead=function(e){e.dx<this.extraw&&(this.extraw=e.dx),this.heads[this.heads.length]=e,this.addRight(e)},i.prototype.addRight=function(e){this.fixed.w=Math.max(this.fixed.w,e.dx+e.w),void 0!==e.top&&(void 0===this.fixed.t?this.fixed.t=e.top:this.fixed.t=Math.max(this.fixed.t,e.top)),void 0!==e.bottom&&(void 0===this.fixed.b?this.fixed.b=e.bottom:this.fixed.b=Math.min(this.fixed.b,e.bottom)),isNaN(this.fixed.t)||isNaN(this.fixed.b),e.dx+e.w>this.w&&(this.w=e.dx+e.w),this.right[this.right.length]=e,this._addChild(e)},i.prototype.addFixed=function(e){this._addChild(e)},i.prototype.addFixedX=function(e){this._addChild(e)},i.prototype.addCentered=function(e){var t=e.w/2;-t<this.extraw&&(this.extraw=-t),this.extra[this.extra.length]=e,e.dx+t>this.w&&(this.w=e.dx+t),this.right[this.right.length]=e,this._addChild(e)},i.prototype.setLimit=function(e,t){t[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],t[e]):this.specialY[e]=t[e])},i.prototype._addChild=function(e){e.parent=this,this.children[this.children.length]=e,this.pushTop(e.top),this.pushBottom(e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},i.prototype.pushTop=function(e){void 0!==e&&(void 0===this.top?this.top=e:this.top=Math.max(e,this.top))},i.prototype.pushBottom=function(e){void 0!==e&&(void 0===this.bottom?this.bottom=e:this.bottom=Math.min(e,this.bottom))},i.prototype.setX=function(e){this.x=e;for(var t=0;t<this.children.length;t++)this.children[t].setX(e)},i.prototype.center=function(e,t){var n=(t.x-e.x)/2+e.x;this.x=n-this.w/2;for(var r=0;r<this.children.length;r++)this.children[r].setX(this.x)},i.prototype.setHint=function(){this.hint=!0},i.prototype.isIE=!1,i.prototype.highlight=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#ff0000"),r(this.elemset,e,"",t)},i.prototype.unhighlight=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#000000"),r(this.elemset,"",e,t)},e.exports=i},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){for(var e,t,r,i,a,s=0,o=arguments[s++],c=[];o;){if(t=/^[^\x25]+/.exec(o))c.push(t[0]);else if(t=/^\x25{2}/.exec(o))c.push("%");else{if(!(t=/^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(o)))throw"Huh ?!";if(null==(e=arguments[t[1]||s++])||null==e)throw"Too few arguments.";if(/[^s]/.test(t[7])&&"number"!=typeof e)throw"Expecting number but found "+n(e);switch(t[7]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e);break;case"e":e=t[6]?e.toExponential(t[6]):e.toExponential();break;case"f":e=t[6]?parseFloat(e).toFixed(t[6]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&t[6]?e.substring(0,t[6]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(t[7])&&t[2]&&e>0?"+"+e:e,i=t[3]?"0"==t[3]?"0":t[3].charAt(1):" ",a=t[5]-String(e).length,r=t[5]?str_repeat(i,a):"",c.push(t[4]?e+r:r+e)}o=o.substring(t[0].length)}return c.join("")}},function(e,t){e.exports=function(e,t,n,r){if(e)for(var i=0;i<e.length;i++){var a=e[i],s=a.getAttribute("highlight");s||(s="fill"),a.setAttribute(s,r);var o=a.getAttribute("class");o||(o=""),o=(o=o.replace(n,"")).replace(t,""),t.length>0&&(o.length>0&&" "!==o.charAt(o.length-1)&&(o+=" "),o+=t),a.setAttribute("class",o)}}},function(e,t){e.exports=function(e,t,n){return e.paper.path(t)}},function(e,t,n){var r=n(0),i={};!function(){"use strict";var e,t,n,a,s;i.initialize=function(r,i,o,c,l){e=r,t=i,a=c,s=l,(n=o).annotationfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},n.gchordfont={face:"Helvetica",size:12,weight:"normal",style:"normal",decoration:"none"},n.historyfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.infofont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.measurefont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},n.partsfont={face:'"Times New Roman"',size:15,weight:"normal",style:"normal",decoration:"none"},n.repeatfont={face:'"Times New Roman"',size:13,weight:"normal",style:"normal",decoration:"none"},n.textfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},n.tripletfont={face:"Times",size:11,weight:"normal",style:"italic",decoration:"none"},n.vocalfont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},n.wordsfont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.composerfont={face:'"Times New Roman"',size:14,weight:"normal",style:"italic",decoration:"none"},a.formatting.subtitlefont={face:'"Times New Roman"',size:16,weight:"normal",style:"normal",decoration:"none"},a.formatting.tempofont={face:'"Times New Roman"',size:15,weight:"bold",style:"normal",decoration:"none"},a.formatting.titlefont={face:'"Times New Roman"',size:20,weight:"normal",style:"normal",decoration:"none"},a.formatting.footerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.headerfont={face:'"Times New Roman"',size:12,weight:"normal",style:"normal",decoration:"none"},a.formatting.voicefont={face:'"Times New Roman"',size:13,weight:"bold",style:"normal",decoration:"none"},a.formatting.annotationfont=n.annotationfont,a.formatting.gchordfont=n.gchordfont,a.formatting.historyfont=n.historyfont,a.formatting.infofont=n.infofont,a.formatting.measurefont=n.measurefont,a.formatting.partsfont=n.partsfont,a.formatting.repeatfont=n.repeatfont,a.formatting.textfont=n.textfont,a.formatting.tripletfont=n.tripletfont,a.formatting.vocalfont=n.vocalfont,a.formatting.wordsfont=n.wordsfont};var o={gchordfont:!0,measurefont:!0,partsfont:!0,annotationfont:!0,composerfont:!0,historyfont:!0,infofont:!0,subtitlefont:!0,textfont:!0,titlefont:!0,voicefont:!0},c=function(e,n,r,i,a){function s(){var s=parseInt(e[0].token);return e.shift(),n?0===e.length?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s}:1===e.length&&"box"===e[0].token&&o[a]?{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s,box:!0}:(t("Extra parameters in font definition.",r,i),{face:n.face,weight:n.weight,style:n.style,decoration:n.decoration,size:s}):(t("Can't set just the size of the font since there is no default value.",r,i),{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none",size:s})}if("*"===e[0].token){if(e.shift(),"number"===e[0].type)return s();t("Expected font size number after *.",r,i)}if("number"===e[0].type)return s();for(var c,l=[],h="normal",u="normal",d="none",f=!1,p="face",m=!1;e.length;){var g=e.shift(),v=g.token.toLowerCase();switch(p){case"face":m||"utf"!==v&&"number"!==g.type&&"bold"!==v&&"italic"!==v&&"underline"!==v&&"box"!==v?l.length>0&&"-"===g.token?(m=!0,l[l.length-1]=l[l.length-1]+g.token):m?(m=!1,l[l.length-1]=l[l.length-1]+g.token):l.push(g.token):"number"===g.type?(c?t("Font size specified twice in font definition.",r,i):c=g.token,p="modifier"):"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[a]?f=!0:t('This font style doesn\'t support "box"',r,i),p="finished"):"utf"===v?(g=e.shift(),p="size"):t("Unknown parameter "+g.token+" in font definition.",r,i);break;case"size":"number"===g.type?c?t("Font size specified twice in font definition.",r,i):c=g.token:t("Expected font size in font definition.",r,i),p="modifier";break;case"modifier":"bold"===v?h="bold":"italic"===v?u="italic":"underline"===v?d="underline":"box"===v?(o[a]?f=!0:t('This font style doesn\'t support "box"',r,i),p="finished"):t("Unknown parameter "+g.token+" in font definition.",r,i);break;case"finished":t('Extra characters found after "box" in font definition.',r,i)}}void 0===c?n?c=n.size:(t("Must specify the size of the font since there is no default value.",r,i),c=12):c=parseFloat(c),""===(l=l.join(" "))&&(n?l=n.face:(t("Must specify the name of the font since there is no default value.",r,i),l="sans-serif"));var b=function(e){switch(e){case"Arial-Italic":return{face:"Arial",weight:"normal",style:"italic",decoration:"none"};case"Arial-Bold":return{face:"Arial",weight:"bold",style:"normal",decoration:"none"};case"Bookman-Demi":return{face:"Bookman,serif",weight:"bold",style:"normal",decoration:"none"};case"Bookman-DemiItalic":return{face:"Bookman,serif",weight:"bold",style:"italic",decoration:"none"};case"Bookman-Light":return{face:"Bookman,serif",weight:"normal",style:"normal",decoration:"none"};case"Bookman-LightItalic":return{face:"Bookman,serif",weight:"normal",style:"italic",decoration:"none"};case"Courier":return{face:'"Courier New"',weight:"normal",style:"normal",decoration:"none"};case"Courier-Oblique":return{face:'"Courier New"',weight:"normal",style:"italic",decoration:"none"};case"Courier-Bold":return{face:'"Courier New"',weight:"bold",style:"normal",decoration:"none"};case"Courier-BoldOblique":return{face:'"Courier New"',weight:"bold",style:"italic",decoration:"none"};case"AvantGarde-Book":return{face:"AvantGarde,Arial",weight:"normal",style:"normal",decoration:"none"};case"AvantGarde-BookOblique":return{face:"AvantGarde,Arial",weight:"normal",style:"italic",decoration:"none"};case"AvantGarde-Demi":case"Avant-Garde-Demi":return{face:"AvantGarde,Arial",weight:"bold",style:"normal",decoration:"none"};case"AvantGarde-DemiOblique":return{face:"AvantGarde,Arial",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Oblique":return{face:"Helvetica",weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Bold":return{face:"Helvetica",weight:"bold",style:"normal",decoration:"none"};case"Helvetica-BoldOblique":return{face:"Helvetica",weight:"bold",style:"italic",decoration:"none"};case"Helvetica-Narrow":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"normal",decoration:"none"};case"Helvetica-Narrow-Oblique":return{face:'"Helvetica Narrow",Helvetica',weight:"normal",style:"italic",decoration:"none"};case"Helvetica-Narrow-Bold":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"normal",decoration:"none"};case"Helvetica-Narrow-BoldOblique":return{face:'"Helvetica Narrow",Helvetica',weight:"bold",style:"italic",decoration:"none"};case"Palatino-Roman":return{face:"Palatino",weight:"normal",style:"normal",decoration:"none"};case"Palatino-Italic":return{face:"Palatino",weight:"normal",style:"italic",decoration:"none"};case"Palatino-Bold":return{face:"Palatino",weight:"bold",style:"normal",decoration:"none"};case"Palatino-BoldItalic":return{face:"Palatino",weight:"bold",style:"italic",decoration:"none"};case"NewCenturySchlbk-Roman":return{face:'"New Century",serif',weight:"normal",style:"normal",decoration:"none"};case"NewCenturySchlbk-Italic":return{face:'"New Century",serif',weight:"normal",style:"italic",decoration:"none"};case"NewCenturySchlbk-Bold":return{face:'"New Century",serif',weight:"bold",style:"normal",decoration:"none"};case"NewCenturySchlbk-BoldItalic":return{face:'"New Century",serif',weight:"bold",style:"italic",decoration:"none"};case"Times":case"Times-Roman":case"Times-Narrow":case"Times-Courier":case"Times-New-Roman":return{face:'"Times New Roman"',weight:"normal",style:"normal",decoration:"none"};case"Times-Italic":case"Times-Italics":return{face:'"Times New Roman"',weight:"normal",style:"italic",decoration:"none"};case"Times-Bold":return{face:'"Times New Roman"',weight:"bold",style:"normal",decoration:"none"};case"Times-BoldItalic":return{face:'"Times New Roman"',weight:"bold",style:"italic",decoration:"none"};case"ZapfChancery-MediumItalic":return{face:'"Zapf Chancery",cursive,serif',weight:"normal",style:"normal",decoration:"none"};default:return null}}(l),y={};return b?(y.face=b.face,y.weight=b.weight,y.style=b.style,y.decoration=b.decoration,y.size=c,f&&(y.box=!0),y):(y.face=l,y.weight=h,y.style=u,y.decoration=d,y.size=c,f&&(y.box=!0),y)},l=function(e,t,r){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(n[e]=c(t,n[e],r,0,e),n.is_in_header&&(a.formatting[e]=n[e]),null)},h=function(e,t){var n="";r.each(t,(function(e){n+=e.token}));var i=parseFloat(n);if(isNaN(i)||0===i)return'Directive "'+e+'" requires a number as a parameter.';a.formatting.scale=i},u=function(e,t,r,i,a){if(1!==r.length||"number"!==r[0].type)return'Directive "'+t+'" requires a number as a parameter.';var s=r[0].intt;return void 0!==i&&s<i?'Directive "'+t+'" requires a number greater than or equal to '+i+" as a parameter.":void 0!==a&&s>a?'Directive "'+t+'" requires a number less than or equal to '+a+" as a parameter.":(n[e]=s,null)},d=function(e,t,r){if(1===r.length&&("true"===r[0].token||"false"===r[0].token))return n[e]="true"===r[0].token,null;var i=u(e,t,r,0,1);return null!==i?i:(n[e]=1===n[e],null)},f=function(e,t,r,i){if(1!==r.length)return'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter.";for(var a=r[0].token,s=!1,o=0;!s&&o<i.length;o++)i[o]===a&&(s=!0);return s?(n[e]=a,null):'Directive "'+t+'" requires one of [ '+i.join(", ")+" ] as a parameter."},p=["nobarlines","barlines","beataccents","nobeataccents","droneon","droneoff","drumon","drumoff","fermatafixed","fermataproportional","gchordon","gchordoff","controlcombo","temperamentnormal","noportamento"],m=["gchord","ptstress","beatstring"],g=["bassvol","chordvol","c","channel","beatmod","deltaloudness","drumbars","gracedivider","makechordchannels","randomchordattack","chordattack","stressmodel","transpose","rtranspose","vol","volinc"],v=["program"],b=["ratio","snt","bendvelocity","pitchbend","control","temperamentlinear"],y=["beat"],w=["drone"],x=["portamento"],k=["expand","grace","trim"],A=["drum","chordname"];i.parseFontChangeLine=function(e){var t=e.split("$");if(t.length>1&&n.setfont){for(var r=[{text:t[0]}],i=1;i<t.length;i++)"0"===t[i].charAt(0)?r.push({text:t[i].substring(1)}):"1"===t[i].charAt(0)&&n.setfont[1]?r.push({font:n.setfont[1],text:t[i].substring(1)}):"2"===t[i].charAt(0)&&n.setfont[2]?r.push({font:n.setfont[2],text:t[i].substring(1)}):"3"===t[i].charAt(0)&&n.setfont[3]?r.push({font:n.setfont[3],text:t[i].substring(1)}):"4"===t[i].charAt(0)&&n.setfont[4]?r.push({font:n.setfont[4],text:t[i].substring(1)}):r[r.length-1].text+="$"+t[i];if(r.length>1)return r}return e};var T=["auto","above","below","hidden"];i.addDirective=function(o){var S=e.tokenize(o,0,o.length);if(0===S.length||"alpha"!==S[0].type)return null;var M=o.substring(o.indexOf(S[0].token)+S[0].token.length);M=e.stripComment(M);var N=S.shift().token.toLowerCase(),C="";switch(N){case"bagpipes":a.formatting.bagpipes=!0;break;case"flatbeams":a.formatting.flatbeams=!0;break;case"landscape":n.landscape=!0;break;case"papersize":n.papersize=M;break;case"graceslurs":if(1!==S.length)return"Directive graceslurs requires one parameter: 0 or 1";if("0"===S[0].token||"false"===S[0].token)a.formatting.graceSlurs=!1;else{if("1"!==S[0].token&&"true"!==S[0].token)return"Directive graceslurs requires one parameter: 0 or 1 (received "+S[0].token+")";a.formatting.graceSlurs=!0}break;case"stretchlast":a.formatting.stretchlast=!0;break;case"titlecaps":n.titlecaps=!0;break;case"titleleft":a.formatting.titleleft=!0;break;case"measurebox":a.formatting.measurebox=!0;break;case"vocal":return f("vocalPosition",N,S,T);case"dynamic":return f("dynamicPosition",N,S,T);case"gchord":return f("chordPosition",N,S,T);case"ornament":return f("ornamentPosition",N,S,T);case"volume":return f("volumePosition",N,S,T);case"botmargin":case"botspace":case"composerspace":case"indent":case"leftmargin":case"linesep":case"musicspace":case"partsspace":case"pageheight":case"pagewidth":case"rightmargin":case"staffsep":case"staffwidth":case"subtitlespace":case"sysstaffsep":case"systemsep":case"textspace":case"titlespace":case"topmargin":case"topspace":case"vocalspace":case"wordsspace":return function(t,n){var r=e.getMeasurement(n);return 0===r.used||0!==n.length?'Directive "'+t+'" requires a measurement as a parameter.':(a.formatting[t]=r.value,null)}(N,S);case"voicescale":if(1!==S.length||"number"!==S[0].type)return"voicescale requires one float as a parameter";var E=S.shift();return n.currentVoice&&(n.currentVoice.scale=E.floatt,s.changeVoiceScale(n.currentVoice.scale)),null;case"vskip":var I=Math.round(function(t,n){var r=e.getMeasurement(n);return 0===r.used||0!==n.length?{error:'Directive "'+t+'" requires a measurement as a parameter.'}:r.value}(N,S));return I.error?I.error:(s.addSpacing(I),null);case"scale":h(N,S);break;case"sep":if(0===S.length)s.addSeparator(14,14,85);else{var _=e.getMeasurement(S);if(0===_.used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var B=_.value;if(0===(_=e.getMeasurement(S)).used)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var P=_.value;if(0===(_=e.getMeasurement(S)).used||0!==S.length)return'Directive "'+N+'" requires 3 numbers: space above, space below, length of line';var D=_.value;s.addSeparator(B,P,D)}break;case"barsperstaff":if(null!==(C=u("barsperstaff",N,S)))return C;break;case"staffnonote":if(1!==S.length)return"Directive staffnonote requires one parameter: 0 or 1";if("0"===S[0].token)n.staffnonote=!0;else{if("1"!==S[0].token)return"Directive staffnonote requires one parameter: 0 or 1 (received "+S[0].token+")";n.staffnonote=!1}break;case"printtempo":if(null!==(C=d("printTempo",N,S)))return C;break;case"partsbox":if(null!==(C=d("partsBox",N,S)))return C;n.partsfont.box=n.partsBox;break;case"freegchord":if(null!==(C=d("freegchord",N,S)))return C;break;case"measurenb":case"barnumbers":if(null!==(C=u("barNumbers",N,S)))return C;break;case"setbarnb":if(1!==S.length||"number"!==S[0].type)return"Directive setbarnb requires a number as a parameter.";n.currBarNumber=s.setBarNumberImmediate(S[0].intt);break;case"begintext":n.inTextBlock=!0;break;case"continueall":n.continueall=!0;break;case"beginps":n.inPsBlock=!0,t("Postscript ignored",o,0);break;case"deco":M.length>0&&n.ignoredDecorations.push(M.substring(0,M.indexOf(" "))),t("Decoration redefinition ignored",o,0);break;case"text":var L=e.translateString(M);s.addText(i.parseFontChangeLine(L));break;case"center":var O=e.translateString(M);s.addCentered(i.parseFontChangeLine(O));break;case"font":break;case"setfont":var H=e.tokenize(M,0,M.length);if(H.length>=4&&"-"===H[0].token&&"number"===H[1].type){var V=parseInt(H[1].token);V>=1&&V<=4&&(n.setfont||(n.setfont=[]),H.shift(),H.shift(),n.setfont[V]=c(H,n.setfont[V],o,0,"setfont"))}break;case"gchordfont":case"partsfont":case"tripletfont":case"vocalfont":case"textfont":case"annotationfont":case"historyfont":case"infofont":case"measurefont":case"repeatfont":case"wordsfont":return l(N,S,o);case"composerfont":case"subtitlefont":case"tempofont":case"titlefont":case"voicefont":case"footerfont":case"headerfont":return function(e,t,n){return 0===t.length?'Directive "'+e+'" requires a font as a parameter.':(a.formatting[e]=c(t,a.formatting[e],n,0,e),null)}(N,S,o);case"barlabelfont":case"barnumberfont":case"barnumfont":return l("measurefont",S,o);case"staves":case"score":n.score_is_present=!0;for(var F,z=function(e,t,i,a,s){(t||0===n.staves.length)&&n.staves.push({index:n.staves.length,numVoices:0});var o=r.last(n.staves);void 0!==i&&void 0===o.bracket&&(o.bracket=i),void 0!==a&&void 0===o.brace&&(o.brace=a),s&&(o.connectBarLines="end"),void 0===n.voices[e]&&(n.voices[e]={staffNum:o.index,index:o.numVoices},o.numVoices++)},j=!1,q=!1,Y=!1,W=!1,R=!1,G=!1,U=!1,X=function(){if(U=!0,F){var e="start";F.staffNum>0&&("start"!==n.staves[F.staffNum-1].connectBarLines&&"continue"!==n.staves[F.staffNum-1].connectBarLines||(e="continue")),n.staves[F.staffNum].connectBarLines=e}};S.length;){var K=S.shift();switch(K.token){case"(":j?t("Can't nest parenthesis in %%score",o,K.start):(j=!0,W=!0);break;case")":!j||W?t("Unexpected close parenthesis in %%score",o,K.start):j=!1;break;case"[":q?t("Can't nest brackets in %%score",o,K.start):(q=!0,R=!0);break;case"]":!q||R?t("Unexpected close bracket in %%score",o,K.start):(q=!1,n.staves[F.staffNum].bracket="end");break;case"{":Y?t("Can't nest braces in %%score",o,K.start):(Y=!0,G=!0);break;case"}":!Y||G?t("Unexpected close brace in %%score",o,K.start):(Y=!1,n.staves[F.staffNum].brace="end");break;case"|":X();break;default:for(var Z="";("alpha"===K.type||"number"===K.type)&&(Z+=K.token,K.continueId);)K=S.shift();z(Z,!j||W,R?"start":q?"continue":void 0,G?"start":Y?"continue":void 0,U),W=!1,R=!1,G=!1,U=!1,F=n.voices[Z],"staves"===N&&X()}}break;case"newpage":var Q=e.getInt(M);s.addNewPage(0===Q.digits?-1:Q.value);break;case"abc":var J=M.split(" ");switch(J[0]){case"-copyright":case"-creator":case"-edited-by":case"-version":case"-charset":var $=J.shift();s.addMetaText(N+$,J.join(" "));break;default:return"Unknown directive: "+N+J[0]}break;case"header":case"footer":var ee=e.getMeat(M,0,M.length);'"'===(ee=M.substring(ee.start,ee.end)).charAt(0)&&'"'===ee.charAt(ee.length-1)&&(ee=ee.substring(1,ee.length-1));var te=ee.split("\t"),ne={};ne=1===te.length?{left:"",center:te[0],right:""}:2===te.length?{left:te[0],center:te[1],right:""}:{left:te[0],center:te[1],right:te[2]},te.length>3&&t("Too many tabs in "+N+": "+te.length+" found.",M,0),s.addMetaTextObj(N,ne);break;case"midi":var re=e.tokenize(M,0,M.length,!0);re.length>0&&"="===re[0].token&&re.shift(),0===re.length?t("Expected midi command",M,0):function(e,n,r){var i=e.shift().token,a=[];if(p.indexOf(i)>=0)0!==e.length&&t("Unexpected parameter in MIDI "+i,r,0);else if(m.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,r,0):a.push(e[0].token);else if(g.indexOf(i)>=0)1!==e.length?t("Expected one parameter in MIDI "+i,r,0):"number"!==e[0].type?t("Expected one integer parameter in MIDI "+i,r,0):a.push(e[0].intt);else if(v.indexOf(i)>=0)1!==e.length&&2!==e.length?t("Expected one or two parameters in MIDI "+i,r,0):"number"!==e[0].type||2===e.length&&"number"!==e[1].type?t("Expected integer parameter in MIDI "+i,r,0):(a.push(e[0].intt),2===e.length&&a.push(e[1].intt));else if(b.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type?t("Expected two integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt));else if(x.indexOf(i)>=0)2!==e.length?t("Expected two parameters in MIDI "+i,r,0):"alpha"!==e[0].type||"number"!==e[1].type?t("Expected one string and one integer parameters in MIDI "+i,r,0):(a.push(e[0].token),a.push(e[1].intt));else if("drummap"===i)2===e.length&&"alpha"===e[0].type&&"number"===e[1].type?(n.formatting||(n.formatting={}),n.formatting.midi||(n.formatting.midi={}),n.formatting.midi.drummap||(n.formatting.midi.drummap={}),n.formatting.midi.drummap[e[0].token]=e[1].intt,a=n.formatting.midi.drummap):3===e.length&&"punct"===e[0].type&&"alpha"===e[1].type&&"number"===e[2].type?(n.formatting||(n.formatting={}),n.formatting.midi||(n.formatting.midi={}),n.formatting.midi.drummap||(n.formatting.midi.drummap={}),n.formatting.midi.drummap[e[0].token+e[1].token]=e[2].intt,a=n.formatting.midi.drummap):t("Expected one note name and one integer parameter in MIDI "+i,r,0);else if(k.indexOf(i)>=0)3!==e.length||"number"!==e[0].type||"/"!==e[1].token||"number"!==e[2].type?t("Expected fraction parameter in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[2].intt));else if(y.indexOf(i)>=0)4!==e.length?t("Expected four parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type?t("Expected four integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt));else if(w.indexOf(i)>=0)5!==e.length?t("Expected five parameters in MIDI "+i,r,0):"number"!==e[0].type||"number"!==e[1].type||"number"!==e[2].type||"number"!==e[3].type||"number"!==e[4].type?t("Expected five integer parameters in MIDI "+i,r,0):(a.push(e[0].intt),a.push(e[1].intt),a.push(e[2].intt),a.push(e[3].intt),a.push(e[4].intt));else if(v.indexOf(i)>=0)1!==e.length||4!==e.length?t("Expected one or two parameters in MIDI "+i,r,0):"number"!==e[0].type?t("Expected integer parameter in MIDI "+i,r,0):4===e.length?("octave"!==e[1].token&&t("Expected octave parameter in MIDI "+i,r,0),"="!==e[2].token&&t("Expected octave parameter in MIDI "+i,r,0),"number"!==e[3].type&&t("Expected integer parameter for octave in MIDI "+i,r,0)):(a.push(e[0].intt),4===e.length&&a.push(e[3].intt));else if(A.indexOf(i)>=0)if(e.length<2)t("Expected string parameter and at least one integer parameter in MIDI "+i,r,0);else if("alpha"!==e[0].type)t("Expected string parameter and at least one integer parameter in MIDI "+i,r,0);else{var o=e.shift();for(a.push(o.token);e.length>0;)"number"!==(o=e.shift()).type&&t("Expected integer parameter in MIDI "+i,r,0),a.push(o.intt)}s.hasBeginMusic()?s.appendElement("midi",-1,-1,{cmd:i,params:a}):(void 0===n.formatting.midi&&(n.formatting.midi={}),n.formatting.midi[i]=a)}(re,a,M);break;case"map":case"percmap":case"playtempo":case"auquality":case"continuous":case"nobarcheck":a.formatting[N]=M;break;default:return"Unknown directive: "+N}return null},i.globalFormatting=function(r){for(var i in r)if(r.hasOwnProperty(i)){var s,o=""+r[i],c=e.tokenize(o,0,o.length);switch(i){case"titlefont":case"gchordfont":case"composerfont":case"footerfont":case"headerfont":case"historyfont":case"infofont":case"measurefont":case"partsfont":case"repeatfont":case"subtitlefont":case"tempofont":case"textfont":case"voicefont":case"tripletfont":case"vocalfont":case"wordsfont":case"annotationfont":l(i,c,o);break;case"scale":h(i,c);break;case"partsbox":null!==(s=d("partsBox",i,c))&&t(s),n.partsfont.box=n.partsBox;break;case"freegchord":null!==(s=d("freegchord",i,c))&&t(s);break;case"fontboxpadding":1===c.length&&"number"===c[0].type||t('Directive "'+i+'" requires a number as a parameter.'),a.formatting.fontboxpadding=c[0].floatt;break;case"stretchlast":a.formatting.stretchlast="true"===o||!0===o;break;default:t("Formatting directive unrecognized: ",i,0)}}}}(),e.exports=i},function(e,t,n){var r=n(0),i=n(10),a=n(16),s={};!function(){var e,t,n,o;s.initialize=function(r,i,a,s,c){e=r,t=i,n=a,s,o=c},s.standardKey=function(e,t,r,i){var s={acc:"sharp",note:"f"},o={acc:"sharp",note:"c"},c={acc:"sharp",note:"g"},l={acc:"sharp",note:"d"},h={acc:"sharp",note:"A"},u={acc:"sharp",note:"e"},d={acc:"sharp",note:"B"},f={acc:"flat",note:"B"},p={acc:"flat",note:"e"},m={acc:"flat",note:"A"},g={acc:"flat",note:"d"},v={acc:"flat",note:"G"},b={acc:"flat",note:"c"},y={acc:"flat",note:"F"},w={"C#":[s,o,c,l,h,u,d],"A#m":[s,o,c,l,h,u,d],"G#Mix":[s,o,c,l,h,u,d],"D#Dor":[s,o,c,l,h,u,d],"E#Phr":[s,o,c,l,h,u,d],"F#Lyd":[s,o,c,l,h,u,d],"B#Loc":[s,o,c,l,h,u,d],"F#":[s,o,c,l,h,u],"D#m":[s,o,c,l,h,u],"C#Mix":[s,o,c,l,h,u],"G#Dor":[s,o,c,l,h,u],"A#Phr":[s,o,c,l,h,u],BLyd:[s,o,c,l,h,u],"E#Loc":[s,o,c,l,h,u],B:[s,o,c,l,h],"G#m":[s,o,c,l,h],"F#Mix":[s,o,c,l,h],"C#Dor":[s,o,c,l,h],"D#Phr":[s,o,c,l,h],ELyd:[s,o,c,l,h],"A#Loc":[s,o,c,l,h],E:[s,o,c,l],"C#m":[s,o,c,l],BMix:[s,o,c,l],"F#Dor":[s,o,c,l],"G#Phr":[s,o,c,l],ALyd:[s,o,c,l],"D#Loc":[s,o,c,l],A:[s,o,c],"F#m":[s,o,c],EMix:[s,o,c],BDor:[s,o,c],"C#Phr":[s,o,c],DLyd:[s,o,c],"G#Loc":[s,o,c],D:[s,o],Bm:[s,o],AMix:[s,o],EDor:[s,o],"F#Phr":[s,o],GLyd:[s,o],"C#Loc":[s,o],G:[s],Em:[s],DMix:[s],ADor:[s],BPhr:[s],CLyd:[s],"F#Loc":[s],C:[],Am:[],GMix:[],DDor:[],EPhr:[],FLyd:[],BLoc:[],F:[f],Dm:[f],CMix:[f],GDor:[f],APhr:[f],BbLyd:[f],ELoc:[f],Bb:[f,p],Gm:[f,p],FMix:[f,p],CDor:[f,p],DPhr:[f,p],EbLyd:[f,p],ALoc:[f,p],Eb:[f,p,m],Cm:[f,p,m],BbMix:[f,p,m],FDor:[f,p,m],GPhr:[f,p,m],AbLyd:[f,p,m],DLoc:[f,p,m],Ab:[f,p,m,g],Fm:[f,p,m,g],EbMix:[f,p,m,g],BbDor:[f,p,m,g],CPhr:[f,p,m,g],DbLyd:[f,p,m,g],GLoc:[f,p,m,g],Db:[f,p,m,g,v],Bbm:[f,p,m,g,v],AbMix:[f,p,m,g,v],EbDor:[f,p,m,g,v],FPhr:[f,p,m,g,v],GbLyd:[f,p,m,g,v],CLoc:[f,p,m,g,v],Gb:[f,p,m,g,v,b],Ebm:[f,p,m,g,v,b],DbMix:[f,p,m,g,v,b],AbDor:[f,p,m,g,v,b],BbPhr:[f,p,m,g,v,b],CbLyd:[f,p,m,g,v,b],FLoc:[f,p,m,g,v,b],Cb:[f,p,m,g,v,b,y],Abm:[f,p,m,g,v,b,y],GbMix:[f,p,m,g,v,b,y],DbDor:[f,p,m,g,v,b,y],EbPhr:[f,p,m,g,v,b,y],FbLyd:[f,p,m,g,v,b,y],BbLoc:[f,p,m,g,v,b,y],"A#":[f,p],"B#":[],"D#":[f,p,m],"E#":[f],"G#":[f,p,m,g],Gbm:[s,o,c,l,h,u,d],none:[]};return a.keySignature(n,w,e,t,r,i)};var c={treble:{clef:"treble",pitch:4,mid:0},"treble+8":{clef:"treble+8",pitch:4,mid:0},"treble-8":{clef:"treble-8",pitch:4,mid:0},"treble^8":{clef:"treble+8",pitch:4,mid:0},treble_8:{clef:"treble-8",pitch:4,mid:0},treble1:{clef:"treble",pitch:2,mid:2},treble2:{clef:"treble",pitch:4,mid:0},treble3:{clef:"treble",pitch:6,mid:-2},treble4:{clef:"treble",pitch:8,mid:-4},treble5:{clef:"treble",pitch:10,mid:-6},perc:{clef:"perc",pitch:6,mid:0},none:{clef:"none",mid:0},bass:{clef:"bass",pitch:8,mid:-12},"bass+8":{clef:"bass+8",pitch:8,mid:-12},"bass-8":{clef:"bass-8",pitch:8,mid:-12},"bass^8":{clef:"bass+8",pitch:8,mid:-12},bass_8:{clef:"bass-8",pitch:8,mid:-12},"bass+16":{clef:"bass",pitch:8,mid:-12},"bass-16":{clef:"bass",pitch:8,mid:-12},"bass^16":{clef:"bass",pitch:8,mid:-12},bass_16:{clef:"bass",pitch:8,mid:-12},bass1:{clef:"bass",pitch:2,mid:-6},bass2:{clef:"bass",pitch:4,mid:-8},bass3:{clef:"bass",pitch:6,mid:-10},bass4:{clef:"bass",pitch:8,mid:-12},bass5:{clef:"bass",pitch:10,mid:-14},tenor:{clef:"alto",pitch:8,mid:-8},tenor1:{clef:"alto",pitch:2,mid:-2},tenor2:{clef:"alto",pitch:4,mid:-4},tenor3:{clef:"alto",pitch:6,mid:-6},tenor4:{clef:"alto",pitch:8,mid:-8},tenor5:{clef:"alto",pitch:10,mid:-10},alto:{clef:"alto",pitch:6,mid:-6},alto1:{clef:"alto",pitch:2,mid:-2},alto2:{clef:"alto",pitch:4,mid:-4},alto3:{clef:"alto",pitch:6,mid:-6},alto4:{clef:"alto",pitch:8,mid:-8},alto5:{clef:"alto",pitch:10,mid:-10},"alto+8":{clef:"alto+8",pitch:6,mid:-6},"alto-8":{clef:"alto-8",pitch:6,mid:-6},"alto^8":{clef:"alto+8",pitch:6,mid:-6},alto_8:{clef:"alto-8",pitch:6,mid:-6}},l=function(e,t){var n=c[e];return(n?n.mid:0)+t};s.fixClef=function(e){var t=c[e.type];t&&(e.clefPos=t.pitch,e.type=t.clef)},s.deepCopyKey=function(e){var t={accidentals:[],root:e.root,acc:e.acc,mode:e.mode};return r.each(e.accidentals,(function(e){t.accidentals.push(r.clone(e))})),t};var h={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11};s.addPosToKey=function(e,t){var n=e.verticalPos;r.each(t.accidentals,(function(e){var t=h[e.note];t-=n,e.verticalPos=t})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){var t=h[e.note];t-=n,e.verticalPos=t})),n<-10?(r.each(t.accidentals,(function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos-=7,(e.verticalPos>=11||10===e.verticalPos&&"flat"===e.acc)&&(e.verticalPos-=7),"A"===e.note&&"sharp"===e.acc&&(e.verticalPos-=7),"G"!==e.note&&"F"!==e.note||"flat"!==e.acc||(e.verticalPos-=7)}))):n<-4?(r.each(t.accidentals,(function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos-=7,-8!==n||"f"!==e.note&&"g"!==e.note||"sharp"!==e.acc||(e.verticalPos-=7)}))):n>=7&&(r.each(t.accidentals,(function(e){e.verticalPos+=7})),t.impliedNaturals&&r.each(t.impliedNaturals,(function(e){e.verticalPos+=7})))},s.fixKey=function(e,t){var n=r.clone(t);return s.addPosToKey(e,n),n};var u=function(e){var t=0,n=e.charAt(t++);"^"!==n&&"_"!==n||(n=e.charAt(t++));var r=h[n];for(void 0===r&&(r=6);t<e.length;t++)if(","===e.charAt(t))r-=7;else{if("'"!==e.charAt(t))break;r+=7}return{mid:r-6,str:e.substring(t)}};s.parseKey=function(r){0===r.length&&(r="none");var a=e.tokenize(r,0,r.length),o={};switch(a[0].token){case"HP":i.addDirective("bagpipes"),n.key={root:"HP",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"Hp":i.addDirective("bagpipes"),n.key={root:"Hp",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}],acc:"",mode:""},o.foundKey=!0,a.shift();break;case"none":n.key={root:"none",accidentals:[],acc:"",mode:""},o.foundKey=!0,a.shift();break;default:var c=e.getKeyPitch(a[0].token);if(c.len>0){o.foundKey=!0;var h="",u="";a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift();var d=c.token;if(a.length>0){var f=e.getSharpFlat(a[0].token);if(f.len>0&&(a[0].token.length>1?a[0].token=a[0].token.substring(1):a.shift(),d+=f.token,h=f.token),a.length>0){var p=e.getMode(a[0].token);p.len>0&&(a.shift(),d+=p.token,u=p.token)}if(void 0===s.standardKey(d,c.token,h,0))return t("Unsupported key signature: "+d,r,0),o}var m=s.deepCopyKey(n.key),g=n.globalTranspose?-n.globalTranspose:0;if(n.key=s.deepCopyKey(s.standardKey(d,c.token,h,g)),n.key.mode=u,m){for(var v,b=0;b<n.key.accidentals.length;b++)for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&n.key.accidentals[b].note.toLowerCase()===m.accidentals[v].note.toLowerCase()&&(m.accidentals[v].note=null);for(v=0;v<m.accidentals.length;v++)m.accidentals[v].note&&(n.key.impliedNaturals||(n.key.impliedNaturals=[]),n.key.impliedNaturals.push({acc:"natural",note:m.accidentals[v].note}))}}}if(0===a.length)return o;if("exp"===a[0].token&&a.shift(),0===a.length)return o;if("oct"===a[0].token&&a.shift(),0===a.length)return o;var y,w=e.getKeyAccidentals2(a);if(w.warn&&t(w.warn,r,0),w.accs){o.foundKey||(o.foundKey=!0,n.key={root:"none",acc:"",mode:"",accidentals:[]}),function(e){for(var t=0;t<e.length;t++)"b"===e[t].note?e[t].note="B":"a"===e[t].note?e[t].note="A":"F"===e[t].note?e[t].note="f":"E"===e[t].note?e[t].note="e":"D"===e[t].note?e[t].note="d":"C"===e[t].note?e[t].note="c":"G"===e[t].note&&"sharp"===e[t].acc?e[t].note="g":"g"===e[t].note&&"flat"===e[t].acc&&(e[t].note="G")}(w.accs);for(var x=0;x<w.accs.length;x++){for(var k=!1,A=0;A<n.key.accidentals.length&&!k;A++)n.key.accidentals[A].note===w.accs[x].note&&(k=!0,n.key.accidentals[A].acc!==w.accs[x].acc&&(n.key.accidentals[A].acc=w.accs[x].acc,n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[x])));if(!k&&(n.key.explicitAccidentals||(n.key.explicitAccidentals=[]),n.key.explicitAccidentals.push(w.accs[x]),n.key.accidentals.push(w.accs[x]),n.key.impliedNaturals))for(var T=0;T<n.key.impliedNaturals.length;T++)n.key.impliedNaturals[T].note===w.accs[x].note&&n.key.impliedNaturals.splice(T,1)}}for(;a.length>0;)switch(a[0].token){case"m":case"middle":if(a.shift(),0===a.length)return t("Expected = after middle",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after middle",r,y.start);break}if(0===a.length)return t("Expected parameter after middle=",r,0),o;var S=e.getPitchFromTokens(a);S.warn&&t(S.warn,r,0),S.position&&(n.clef.verticalPos=S.position-6);break;case"transpose":if(a.shift(),0===a.length)return t("Expected = after transpose",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after transpose",r,y.start);break}if(0===a.length)return t("Expected parameter after transpose=",r,0),o;if("number"!==a[0].type){t("Expected number after transpose",r,a[0].start);break}n.clef.transpose=a[0].intt,a.shift();break;case"stafflines":if(a.shift(),0===a.length)return t("Expected = after stafflines",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after stafflines",r,y.start);break}if(0===a.length)return t("Expected parameter after stafflines=",r,0),o;if("number"!==a[0].type){t("Expected number after stafflines",r,a[0].start);break}n.clef.stafflines=a[0].intt,a.shift();break;case"staffscale":if(a.shift(),0===a.length)return t("Expected = after staffscale",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after staffscale",r,y.start);break}if(0===a.length)return t("Expected parameter after staffscale=",r,0),o;if("number"!==a[0].type){t("Expected number after staffscale",r,a[0].start);break}n.clef.staffscale=a[0].floatt,a.shift();break;case"style":if(a.shift(),0===a.length)return t("Expected = after style",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after style",r,y.start);break}if(0===a.length)return t("Expected parameter after style=",r,0),o;switch(a[0].token){case"normal":case"harmonic":case"rhythm":case"x":n.style=a[0].token,a.shift();break;default:t("error parsing style element: "+a[0].token,r,a[0].start)}break;case"clef":if(a.shift(),0===a.length)return t("Expected = after clef",r,0),o;if("="!==(y=a.shift()).token){t("Expected = after clef",r,y.start);break}if(0===a.length)return t("Expected parameter after clef=",r,0),o;case"treble":case"bass":case"alto":case"tenor":case"perc":case"none":var M=a.shift();switch(M.token){case"treble":case"tenor":case"alto":case"bass":case"perc":case"none":break;case"C":M.token="alto";break;case"F":M.token="bass";break;case"G":M.token="treble";break;case"c":M.token="alto";break;case"f":M.token="bass";break;case"g":M.token="treble";break;default:t("Expected clef name. Found "+M.token,r,M.start)}a.length>0&&"number"===a[0].type&&(M.token+=a[0].token,a.shift()),a.length>1&&("-"===a[0].token||"+"===a[0].token||"^"===a[0].token||"_"===a[0].token)&&"8"===a[1].token&&(M.token+=a[0].token+a[1].token,a.shift(),a.shift()),n.clef={type:M.token,verticalPos:l(M.token,0)},n.currentVoice&&void 0!==n.currentVoice.transpose&&(n.clef.transpose=n.currentVoice.transpose),o.foundClef=!0;break;default:t("Unknown parameter: "+a[0].token,r,a[0].start),a.shift()}return o};s.parseVoice=function(r,i,a){var s=e.getMeat(r,i,a),c=s.start,h=s.end,d=e.getToken(r,c,h);if(0!==d.length){var f=!1;void 0===n.voices[d]&&(n.voices[d]={},f=!0,n.score_is_present&&t("Can't have an unknown V: id when the %score directive is present",r,c)),c+=d.length,c+=e.eatWhiteSpace(r,c);for(var p={startStaff:f},m=function(n){var i=e.getVoiceToken(r,c,h);void 0!==i.warn?t("Expected value for "+n+" in voice: "+i.warn,r,c):void 0!==i.err?t("Expected value for "+n+" in voice: "+i.err,r,c):0===i.token.length&&'"'!==r.charAt(c)?t("Expected value for "+n+" in voice",r,c):p[n]=i.token,c+=i.len},g=function(i,a,s){var o=e.getVoiceToken(r,c,h);void 0!==o.warn?t("Expected value for "+a+" in voice: "+o.warn,r,c):void 0!==o.err?t("Expected value for "+a+" in voice: "+o.err,r,c):0===o.token.length&&'"'!==r.charAt(c)?t("Expected value for "+a+" in voice",r,c):("number"===s&&(o.token=parseFloat(o.token)),n.voices[i][a]=o.token),c+=o.len},v=function(n,i){var a=e.getVoiceToken(r,c,h);if(void 0!==a.warn)t("Expected value for "+n+" in voice: "+a.warn,r,c);else if(void 0!==a.err)t("Expected value for "+n+" in voice: "+a.err,r,c);else{if(0!==a.token.length||'"'===r.charAt(c))return"number"===i&&(a.token=parseFloat(a.token)),a.token;t("Expected value for "+n+" in voice",r,c)}c+=a.len},b=function(i,a){var s=e.getVoiceToken(r,c,h);if(void 0!==s.warn)t("Expected one of (_B, _E, _b, _e) for "+a+" in voice: "+s.warn,r,c);else if(0===s.token.length&&'"'!==r.charAt(c))t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",r,c);else{var o={_B:2,_E:9,_b:-10,_e:-3}[s.token];o?n.voices[i][a]=o:t("Expected one of (_B, _E, _b, _e) for "+a+" in voice",r,c)}c+=s.len};c<h;){var y=e.getVoiceToken(r,c,h);if(c+=y.len,y.warn)t("Error parsing voice: "+y.warn,r,c);else{var w=null;switch(y.token){case"clef":case"cl":m("clef");var x=0;void 0!==p.clef&&(p.clef=p.clef.replace(/[',]/g,""),-1!==p.clef.indexOf("+16")&&(x+=14,p.clef=p.clef.replace("+16","")),p.verticalPos=l(p.clef,x));break;case"treble":case"bass":case"tenor":case"alto":case"perc":case"none":case"treble'":case"bass'":case"tenor'":case"alto'":case"none'":case"treble''":case"bass''":case"tenor''":case"alto''":case"none''":case"treble,":case"bass,":case"tenor,":case"alto,":case"none,":case"treble,,":case"bass,,":case"tenor,,":case"alto,,":case"none,,":p.clef=y.token.replace(/[',]/g,""),p.verticalPos=l(p.clef,0),n.voices[d].clef=y.token;break;case"staves":case"stave":case"stv":m("staves");break;case"brace":case"brc":m("brace");break;case"bracket":case"brk":m("bracket");break;case"name":case"nm":m("name");break;case"subname":case"sname":case"snm":m("subname");break;case"merge":p.startStaff=!1;break;case"stem":case"stems":void 0!==(w=e.getVoiceToken(r,c,h)).warn?t("Expected value for stems in voice: "+w.warn,r,c):void 0!==w.err?t("Expected value for stems in voice: "+w.err,r,c):"up"===w.token||"down"===w.token?n.voices[d].stem=w.token:t("Expected up or down for voice stem",r,c),c+=w.len;break;case"up":case"down":n.voices[d].stem=y.token;break;case"middle":case"m":m("verticalPos"),p.verticalPos=u(p.verticalPos).mid;break;case"gchords":case"gch":n.voices[d].suppressChords=!0,"0"===(w=e.getVoiceToken(r,c,h)).token&&(c+=w.len);break;case"space":case"spc":m("spacing");break;case"scale":g(d,"scale","number");break;case"score":b(d,"scoreTranspose");break;case"transpose":g(d,"transpose","number");break;case"stafflines":g(d,"stafflines","number");break;case"staffscale":g(d,"staffscale","number");break;case"octave":g(d,"octave","number");break;case"volume":g(d,"volume","number");break;case"cue":var k=v("cue","string");n.voices[d].scale="on"===k?.6:1;break;case"style":void 0!==(w=e.getVoiceToken(r,c,h)).warn?t("Expected value for style in voice: "+w.warn,r,c):void 0!==w.err?t("Expected value for style in voice: "+w.err,r,c):"normal"===w.token||"harmonic"===w.token||"rhythm"===w.token||"x"===w.token?n.voices[d].style=w.token:t("Expected one of [normal, harmonic, rhythm, x] for voice style",r,c),c+=w.len}}c+=e.eatWhiteSpace(r,c)}if((p.startStaff||0===n.staves.length)&&(n.staves.push({index:n.staves.length,meter:n.origMeter}),n.score_is_present||(n.staves[n.staves.length-1].numVoices=0)),void 0===n.voices[d].staffNum){n.voices[d].staffNum=n.staves.length-1;var A=0;for(var T in n.voices)n.voices.hasOwnProperty(T)&&n.voices[T].staffNum===n.voices[d].staffNum&&A++;n.voices[d].index=A-1}var S=n.staves[n.voices[d].staffNum];n.score_is_present||S.numVoices++,p.clef&&(S.clef={type:p.clef,verticalPos:p.verticalPos}),p.spacing&&(S.spacing_below_offset=p.spacing),p.verticalPos&&(S.verticalPos=p.verticalPos),p.name&&(S.name?S.name.push(p.name):S.name=[p.name]),p.subname&&(S.subname?S.subname.push(p.subname):S.subname=[p.subname]),function(e){n.currentVoice=n.voices[e],o.setCurrentVoice(n.currentVoice.staffNum,n.currentVoice.index)}(d)}else t("Expected a voice id",r,c)}}(),e.exports=s},function(e,t){e.exports=function(e,t,n,r,i){return t+(r-t)/(n-e)*(i-e)}},function(e,t,n){var r,i=n(3);!function(){"use strict";function e(){this.ingroup=!1}e.prototype.beginGroup=function(e,t){this.paper=e,this.controller=t,this.path=[],this.lastM=[0,0],this.ingroup=!0},e.prototype.isInGroup=function(){return this.ingroup},e.prototype.addPath=function(e){if(0!==(e=e||[]).length){e[0][0]="m",e[0][1]=i(e[0][1]-this.lastM[0]),e[0][2]=i(e[0][2]-this.lastM[1]),this.lastM[0]+=e[0][1],this.lastM[1]+=e[0][2],this.path.push(e[0]);for(var t=1,n=e.length;t<n;t++)"m"===e[t][0]&&(this.lastM[0]+=e[t][1],this.lastM[1]+=e[t][2]),this.path.push(e[t])}},e.prototype.endGroup=function(e){if(this.ingroup=!1,0===this.path.length)return null;for(var t="",n=0;n<this.path.length;n++)t+=this.path[n].join(" ");var r=this.paper.path({path:t,stroke:"none",fill:"#000000",class:this.controller.classes.generate(e)});return this.path=[],r},r=new e}(),e.exports=r},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=n(15),a=n(36),s={};!function(){"use strict";s.numberOfTunes=function(e){var t=e.split("\nX:").length;return 0===t&&(t=1),t};var e=s.TuneBook=function(e){var t=a(e);this.header=t.header,this.tunes=t.tunes};e.prototype.getTuneById=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].id===""+e)return this.tunes[t];return null},e.prototype.getTuneByTitle=function(e){for(var t=0;t<this.tunes.length;t++)if(this.tunes[t].title===e)return this.tunes[t];return null},s.parseOnly=function(e,t){for(var n=s.numberOfTunes(e),r=[],i=0;i<n;i++)r.push(1);return s.renderEngine((function(){}),r,e,t)},s.renderEngine=function(t,n,a,s){var o=[];if(void 0!==n&&void 0!==a){var c;(!(c=n)||c.propertyIsEnumerable("length")||"object"!==r(c)||"number"!=typeof c.length)&&(n=[n]),void 0===s&&(s={});for(var l=s.startingTune?parseInt(s.startingTune,10):0,h=new e(a),u=new i,d=0;d<n.length;d++){var f=n[d];if("*"===f||"string"==typeof f&&(f=document.getElementById(f)),f)if(l>=0&&l<h.tunes.length){u.parse(h.tunes[l].abc,s,h.tunes[l].startPos-h.header.length);var p=u.getTune(),m=u.getWarnings();m&&(p.warnings=m);var g=t(f,p,d,h.tunes[l].abc);o.push(g||p)}else f.innerHTML&&(f.innerHTML="");l++}return o}},s.extractMeasures=function(t){for(var n=[],r=new e(t),i=0;i<r.tunes.length;i++){for(var a=r.tunes[i],o=a.abc.split("K:"),c=o[1].split("\n"),l=o[0]+"K:"+c[0]+"\n",h=null,u=null,d=null,f=[],p=!1,m=s.parseOnly(a.abc)[0],g=m.getPickupLength()>0,v=0;v<m.lines.length;v++){var b=m.lines[v];if(b.staff)for(var y=0;y<1;y++)for(var w=b.staff[y],x=0;x<1;x++)for(var k=w.voices[x],A=0;A<k.length;A++){var T=k[A];if(null===d&&T.startChar>=0&&(d=T.startChar,u=void 0===T.chord?h:null),T.chord&&(h=T),"bar"===T.el_type){if(p){var S={abc:a.abc.substring(d,T.endChar)};(h=u&&u.chord&&u.chord.length>0?u.chord[0].name:null)&&(S.lastChord=h),T.startEnding&&(S.startEnding=T.startEnding),T.endEnding&&(S.endEnding=T.endEnding),f.push(S),d=null,p=!1}}else"note"===T.el_type&&(p=!0)}}n.push({header:l,measures:f,hasPickup:g})}return n}}(),e.exports=s},function(e,t,n){var r=n(0),i=n(10),a=n(31),s=n(11),o=n(32),c=n(16),l=n(17),h=n(18),u=n(35);e.exports=function(){"use strict";var e=new h,t=new u(e),n=new o;function d(e,t,n){e.positioning||(e.positioning={}),e.positioning[t]=n}function f(e,t,n){e.fonts||(e.fonts={}),e.fonts[t]=n}this.getTune=function(){var t={formatting:e.formatting,lines:e.lines,media:e.media,metaText:e.metaText,version:e.version,addElementToEvents:e.addElementToEvents,addUsefulCallbackInfo:e.addUsefulCallbackInfo,getBarLength:e.getBarLength,getBeatLength:e.getBeatLength,getBeatsPerMeasure:e.getBeatsPerMeasure,getBpm:e.getBpm,getMeter:e.getMeter,getMeterFraction:e.getMeterFraction,getPickupLength:e.getPickupLength,getKeySignature:e.getKeySignature,getElementFromChar:e.getElementFromChar,makeVoicesArray:e.makeVoicesArray,millisecondsPerMeasure:e.millisecondsPerMeasure,setupEvents:e.setupEvents,setTiming:e.setTiming,setUpAudio:e.setUpAudio};return e.visualTranspose&&(t.visualTranspose=e.visualTranspose),t};var p={reset:function(){for(var e in this)this.hasOwnProperty(e)&&"function"!=typeof this[e]&&delete this[e];this.iChar=0,this.key={accidentals:[],root:"none",acc:"",mode:""},this.meter=null,this.origMeter=null,this.hasMainTitle=!1,this.default_length=.125,this.clef={type:"treble",verticalPos:0},this.next_note_duration=0,this.start_new_line=!0,this.is_in_header=!0,this.is_in_history=!1,this.partForNextLine={},this.tempoForNextLine=[],this.havent_set_length=!0,this.voices={},this.staves=[],this.macros={},this.currBarNumber=1,this.barCounter={},this.inTextBlock=!1,this.inPsBlock=!1,this.ignoredDecorations=[],this.textBlock="",this.score_is_present=!1,this.inEnding=!1,this.inTie=[],this.inTieChord={},this.vocalPosition="auto",this.dynamicPosition="auto",this.chordPosition="auto",this.ornamentPosition="auto",this.volumePosition="auto",this.openSlurs=[],this.freegchord=!1,this.endingHoldOver={}},differentFont:function(e,t){return this[e].decoration!==t[e].decoration||(this[e].face!==t[e].face||(this[e].size!==t[e].size||(this[e].style!==t[e].style||this[e].weight!==t[e].weight)))},addFormattingOptions:function(e,t,n){"note"===n?("auto"!==this.vocalPosition&&d(e,"vocalPosition",this.vocalPosition),"auto"!==this.dynamicPosition&&d(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&d(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&d(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&d(e,"volumePosition",this.volumePosition),this.differentFont("annotationfont",t)&&f(e,"annotationfont",this.annotationfont),this.differentFont("gchordfont",t)&&f(e,"gchordfont",this.gchordfont),this.differentFont("vocalfont",t)&&f(e,"vocalfont",this.vocalfont),this.differentFont("tripletfont",t)&&f(e,"tripletfont",this.tripletfont)):"bar"===n&&("auto"!==this.dynamicPosition&&d(e,"dynamicPosition",this.dynamicPosition),"auto"!==this.chordPosition&&d(e,"chordPosition",this.chordPosition),"auto"!==this.ornamentPosition&&d(e,"ornamentPosition",this.ornamentPosition),"auto"!==this.volumePosition&&d(e,"volumePosition",this.volumePosition),this.differentFont("measurefont",t)&&f(e,"measurefont",this.measurefont),this.differentFont("repeatfont",t)&&f(e,"repeatfont",this.repeatfont))},duplicateStartEndingHoldOvers:function(){this.endingHoldOver={inTie:[],inTieChord:{}};for(var e=0;e<this.inTie.length;e++){this.endingHoldOver.inTie.push([]);for(var t=0;t<this.inTie[e].length;t++)this.endingHoldOver.inTie[e].push(this.inTie[e][t])}for(var n in this.inTieChord)this.inTieChord.hasOwnProperty(n)&&(this.endingHoldOver.inTieChord[n]=this.inTieChord[n])},restoreStartEndingHoldOvers:function(){if(this.endingHoldOver.inTie){this.inTie=[],this.inTieChord={};for(var e=0;e<this.endingHoldOver.inTie.length;e++){this.inTie.push([]);for(var t=0;t<this.endingHoldOver.inTie[e].length;t++)this.inTie[e].push(this.endingHoldOver.inTie[e][t])}for(var n in this.endingHoldOver.inTieChord)this.endingHoldOver.inTieChord.hasOwnProperty(n)&&(this.inTieChord[n]=this.endingHoldOver.inTieChord[n])}}},m=function(e){var t=r.gsub(e,""," ");return t=r.gsub(t,"&","&amp;"),t=r.gsub(t,"<","&lt;"),r.gsub(t,">","&gt;")},g=function(e,n,r){n||(n=" ");var i=n.charAt(r);" "===i&&(i="SPACE");var a,s=m(n.substring(0,r))+'<span style="text-decoration:underline;font-size:1.3em;font-weight:bold;">'+i+"</span>"+m(n.substring(r+1));!function(e){p.warnings||(p.warnings=[]),p.warnings.push(e)}("Music Line:"+t.getNumLines()+":"+(r+1)+": "+e+": "+s),a={message:e,line:n,startChar:p.iChar+r,column:r},p.warningObjects||(p.warningObjects=[]),p.warningObjects.push(a)},v=new a(n,g,p,e,t);this.getWarnings=function(){return p.warnings},this.getWarningObjects=function(){return p.warningObjects};var b=function(e,t){if('"'===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,5);if(r[2]||g("Missing the closing quote while parsing the chord symbol",e,t),r[0]>0&&r[1].length>0&&"^"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="above";else if(r[0]>0&&r[1].length>0&&"_"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="below";else if(r[0]>0&&r[1].length>0&&"<"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="left";else if(r[0]>0&&r[1].length>0&&">"===r[1].charAt(0))r[1]=r[1].substring(1),r[2]="right";else if(r[0]>0&&r[1].length>0&&"@"===r[1].charAt(0)){r[1]=r[1].substring(1);var i=n.getFloat(r[1]);0===i.digits&&g("Missing first position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(i.digits),","!==r[1][0]&&g("Missing comma absolutely positioned annotation.",e,t),r[1]=r[1].substring(1);var a=n.getFloat(r[1]);0===a.digits&&g("Missing second position in absolutely positioned annotation.",e,t),r[1]=r[1].substring(a.digits);var s=n.skipWhiteSpace(r[1]);r[1]=r[1].substring(s),r[2]=null,r[3]={x:i.value,y:a.value}}else!0!==p.freegchord&&(r[1]=r[1].replace(/([ABCDEFG0-9])b/g,"$1♭"),r[1]=r[1].replace(/([ABCDEFG0-9])#/g,"$1♯"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o([^A-Za-z])/g,"$1$2°$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)o$/g,"$1$2°"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)0([^A-Za-z])/g,"$1$2ø$3"),r[1]=r[1].replace(/^([ABCDEFG])([♯♭]?)\^([^A-Za-z])/g,"$1$2∆$3")),r[2]="default",r[1]=c.chordName(p,r[1]);return r}return[0,""]},y=["trill","lowermordent","uppermordent","mordent","pralltriller","accent","fermata","invertedfermata","tenuto","0","1","2","3","4","5","+","wedge","open","thumb","snap","turn","roll","breath","shortphrase","mediumphrase","longphrase","segno","coda","D.S.","D.C.","fine","beambr1","beambr2","slide","marcato","upbow","downbow","/","//","///","////","trem1","trem2","trem3","trem4","turnx","invertedturn","invertedturnx","trill(","trill)","arpeggio","xstem","mark","umarcato","style=normal","style=harmonic","style=rhythm","style=x"],w=["p","pp","f","ff","mf","mp","ppp","pppp","fff","ffff","sfz"],x=["crescendo(","crescendo)","diminuendo(","diminuendo)"],k=[["<","accent"],[">","accent"],["tr","trill"],["plus","+"],["emphasis","accent"],["^","umarcato"],["marcato","umarcato"]],A=[["<(","crescendo("],["<)","crescendo)"],[">(","diminuendo("],[">)","diminuendo)"]],T=function(e,t){var i=p.macros[e.charAt(t)];if(void 0!==i)return"!"!==i.charAt(0)&&"+"!==i.charAt(0)||(i=i.substring(1)),"!"!==i.charAt(i.length-1)&&"+"!==i.charAt(i.length-1)||(i=i.substring(0,i.length-1)),r.detect(y,(function(e){return i===e}))?[1,i]:r.detect(w,(function(e){return i===e}))?("hidden"===p.volumePosition&&(i=""),[1,i]):r.detect(x,(function(e){return"hidden"===p.dynamicPosition&&(i=""),i===e}))?[1,i]:(r.detect(p.ignoredDecorations,(function(e){return i===e}))||g("Unknown macro: "+i,e,t),[1,""]);switch(e.charAt(t)){case".":if("("===e[t+1]||"-"===e[t+1])break;return[1,"staccato"];case"u":return[1,"upbow"];case"v":return[1,"downbow"];case"~":return[1,"irishroll"];case"!":case"+":var a=n.getBrackettedSubstring(e,t,5);return a[1].length>1&&("^"===a[1].charAt(0)||"_"===a[1].charAt(0))&&(a[1]=a[1].substring(1)),r.detect(y,(function(e){return a[1]===e}))?a:r.detect(w,(function(e){return a[1]===e}))?("hidden"===p.volumePosition&&(a[1]=""),a):r.detect(x,(function(e){return a[1]===e}))?("hidden"===p.dynamicPosition&&(a[1]=""),a):r.detect(k,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?a:r.detect(A,(function(e){return a[1]===e[0]&&(a[1]=e[1],!0)}))?("hidden"===p.dynamicPosition&&(a[1]=""),a):"!"!==e.charAt(t)||1!==a[0]&&"!"===e.charAt(t+a[0]-1)?(g("Unknown decoration: "+a[1],e,t),a[1]="",a):[1,null];case"H":return[1,"fermata"];case"J":return[1,"slide"];case"L":return[1,"accent"];case"M":return[1,"mordent"];case"O":return[1,"coda"];case"P":return[1,"pralltriller"];case"R":return[1,"roll"];case"S":return[1,"segno"];case"T":return[1,"trill"]}return[0,0]},S=function(e,t){for(var r=t;n.isWhiteSpace(e.charAt(t));)t++;return[t-r]},M=function(e,t){var r=n.getBarLine(e,t);if(0===r.len)return[0,""];if(r.warn)return g(r.warn,e,t),[r.len,""];for(var i=0;i<e.length&&" "===e.charAt(t+r.len+i);i++);var a=r.len;if("["===e.charAt(t+r.len+i)&&(r.len+=i+1),'"'===e.charAt(t+r.len)&&"["===e.charAt(t+r.len-1)){var s=n.getBrackettedSubstring(e,t+r.len,5);return[r.len+s[0],r.token,s[1]]}var o=n.getTokenOf(e.substring(t+r.len),"1234567890-,");return 0===o.len||"-"===o.token[0]?[a,r.token]:[r.len+o.len,r.token,o.token]},N={2:3,3:2,4:3,5:2,6:2,7:2,8:3,9:2},C=function(e,t){var r={},i=t;for("."===e[t]&&"("===e[t+1]&&(r.dottedSlur=!0,t++);"("===e.charAt(t)||n.isWhiteSpace(e.charAt(t));)"("===e.charAt(t)&&(t+1<e.length&&e.charAt(t+1)>="2"&&e.charAt(t+1)<="9"?(void 0!==r.triplet?g("Can't nest triplets",e,t):(r.triplet=e.charAt(t+1)-"0",r.tripletQ=N[r.triplet],r.num_notes=r.triplet,t+2<e.length&&":"===e.charAt(t+2)&&(t+3<e.length&&":"===e.charAt(t+3)?t+4<e.length&&e.charAt(t+4)>="1"&&e.charAt(t+4)<="9"?(r.num_notes=e.charAt(t+4)-"0",t+=3):g("expected number after the two colons after the triplet to mark the duration",e,t):t+3<e.length&&e.charAt(t+3)>="1"&&e.charAt(t+3)<="9"?(r.tripletQ=e.charAt(t+3)-"0",t+4<e.length&&":"===e.charAt(t+4)?t+5<e.length&&e.charAt(t+5)>="1"&&e.charAt(t+5)<="9"&&(r.num_notes=e.charAt(t+5)-"0",t+=4):t+=2):g("expected number after the triplet to mark the duration",e,t))),t++):void 0===r.startSlur?r.startSlur=1:r.startSlur++),t++;return r.consumed=t-i,r},E=function(e,t){switch(e.charAt(t)){case">":return t<e.length-1&&">"===e.charAt(t+1)?[2,1.75,.25]:[1,1.5,.5];case"<":return t<e.length-1&&"<"===e.charAt(t+1)?[2,.25,1.75]:[1,.5,1.5]}return null},I=function(e){return void 0!==e.duration&&e.duration<.25&&(e.end_beam=!0),e},_={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11},B={x:"invisible",y:"spacer",z:"rest",Z:"multimeasure"},P=function(r,i,a,s){var o,l=function(e){return"octave"===e||"duration"===e||"Zduration"===e||"broken_rhythm"===e||"end_slur"===e};"."===r[i]&&"-"===r[i+1]&&(o=!0,i++);for(var h="startSlur",u=!1;;){switch(r.charAt(i)){case"(":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;void 0===a.startSlur?a.startSlur=1:a.startSlur++;break;case")":if(!l(h))return null;void 0===a.endSlur?a.endSlur=1:a.endSlur++;break;case"^":if("startSlur"===h)a.accidental="sharp",h="sharp2";else{if("sharp2"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="dblsharp",h="pitch"}break;case"_":if("startSlur"===h)a.accidental="flat",h="flat2";else{if("flat2"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="dblflat",h="pitch"}break;case"=":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;a.accidental="natural",h="pitch";break;case"A":case"B":case"C":case"D":case"E":case"F":case"G":case"a":case"b":case"c":case"d":case"e":case"f":case"g":if("startSlur"!==h&&"sharp2"!==h&&"flat2"!==h&&"pitch"!==h)return l(h)?(a.endChar=i,a):null;if(a.pitch=_[r.charAt(i)],c.note(p,a),h="octave",s&&0!==p.next_note_duration?(a.duration=p.default_length*p.next_note_duration,p.next_note_duration=0,u=!0):a.duration=p.default_length,p.clef&&"perc"===p.clef.type||p.currentVoice&&"perc"===p.currentVoice.clef){var d=r.charAt(i);if(a.accidental){d={dblflat:"__",flat:"_",natural:"=",sharp:"^",dblsharp:"^^"}[a.accidental]+d}e.formatting&&e.formatting.midi&&e.formatting.midi.drummap&&(a.midipitch=e.formatting.midi.drummap[d])}else p.clef&&p.clef.type.indexOf("-")>=0?a.soundPitch=a.pitch-7:p.clef&&p.clef.type.indexOf("+")>=0&&(a.soundPitch=a.pitch+7);break;case",":if("octave"!==h)return l(h)?(a.endChar=i,a):null;a.pitch-=7,void 0!==a.soundPitch&&(a.soundPitch-=7);break;case"'":if("octave"!==h)return l(h)?(a.endChar=i,a):null;a.pitch+=7,void 0!==a.soundPitch&&(a.soundPitch+=7);break;case"x":case"y":case"z":case"Z":if("startSlur"!==h)return l(h)?(a.endChar=i,a):null;a.rest={type:B[r.charAt(i)]},delete a.accidental,delete a.startSlur,delete a.startTie,delete a.endSlur,delete a.endTie,delete a.end_beam,delete a.grace_notes,"multimeasure"===a.rest.type?(a.duration=e.getBarLength(),a.rest.text=1,h="Zduration"):(s&&0!==p.next_note_duration?(a.duration=p.default_length*p.next_note_duration,p.next_note_duration=0,u=!0):a.duration=p.default_length,h="duration");break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"0":case"/":if("octave"===h||"duration"===h){var f=n.getFraction(r,i);for(a.duration=a.duration*f.value,a.endChar=f.index;f.index<r.length&&(n.isWhiteSpace(r.charAt(f.index))||"-"===r.charAt(f.index));)"-"===r.charAt(f.index)?a.startTie={}:a=I(a),f.index++;i=f.index-1,h="broken_rhythm"}else if("sharp2"===h)a.accidental="quartersharp",h="pitch";else{if("flat2"!==h){if("Zduration"===h){var m=n.getNumber(r,i);return a.duration=m.num*e.getBarLength(),a.rest.text=m.num,a.endChar=m.index,a}return null}a.accidental="quarterflat",h="pitch"}break;case"-":if("startSlur"===h)t.addTieToLastNote(o),a.endTie=!0;else{if("octave"!==h&&"duration"!==h&&"end_slur"!==h)return"broken_rhythm"===h?(a.endChar=i,a):null;if(a.startTie={},u||!s)return n.isWhiteSpace(r.charAt(i+1))&&I(a),a.endChar=i+1,a;h="broken_rhythm"}break;case" ":case"\t":if(!l(h))return null;a.end_beam=!0,o=!1;do{"."===r.charAt(i)&&"-"===r.charAt(i+1)&&(o=!0,i++),"-"===r.charAt(i)&&(a.startTie={},o&&(a.startTie.style="dotted")),i++}while(i<r.length&&(n.isWhiteSpace(r.charAt(i))||"-"===r.charAt(i))||"."===r.charAt(i)&&"-"===r.charAt(i+1));if(a.endChar=i,u||!s||"<"!==r.charAt(i)&&">"!==r.charAt(i))return a;i--,h="broken_rhythm";break;case">":case"<":if(!l(h))return null;if(!s)return a.endChar=i,a;var g=E(r,i);i+=g[0]-1,p.next_note_duration=g[2],a.duration=g[1]*a.duration,h="end_slur";break;default:return l(h)?(a.endChar=i,a):null}if(++i===r.length)return l(h)?(a.endChar=i,a):null}return null};function D(){var e={startChar:-1,endChar:-1};p.partForNextLine.title&&(e.part=p.partForNextLine),e.clef=p.currentVoice&&void 0!==p.staves[p.currentVoice.staffNum].clef?r.clone(p.staves[p.currentVoice.staffNum].clef):r.clone(p.clef);var n=p.currentVoice?p.currentVoice.scoreTranspose:0;if(e.key=s.standardKey(p.key.root+p.key.acc+p.key.mode,p.key.root,p.key.acc,n),e.key.mode=p.key.mode,p.key.impliedNaturals&&(e.key.impliedNaturals=p.key.impliedNaturals),p.key.explicitAccidentals)for(var i=0;i<p.key.explicitAccidentals.length;i++){for(var a=!1,o=0;o<e.key.accidentals.length;o++)e.key.accidentals[o].note===p.key.explicitAccidentals[i].note&&(e.key.accidentals[o].acc=p.key.explicitAccidentals[i].acc,a=!0);a||e.key.accidentals.push(p.key.explicitAccidentals[i])}if(p.targetKey=e.key,e.key.explicitAccidentals&&delete e.key.explicitAccidentals,s.addPosToKey(e.clef,e.key),null!==p.meter?(p.currentVoice?(r.each(p.staves,(function(e){e.meter=p.meter})),e.meter=p.staves[p.currentVoice.staffNum].meter,p.staves[p.currentVoice.staffNum].meter=null):e.meter=p.meter,p.meter=null):p.currentVoice&&p.staves[p.currentVoice.staffNum].meter&&(e.meter=p.staves[p.currentVoice.staffNum].meter,p.staves[p.currentVoice.staffNum].meter=null),p.currentVoice&&p.currentVoice.name&&(e.name=p.currentVoice.name),p.vocalfont&&(e.vocalfont=p.vocalfont),p.tripletfont&&(e.tripletfont=p.tripletfont),p.gchordfont&&(e.gchordfont=p.gchordfont),p.style&&(e.style=p.style),p.currentVoice){var c=p.staves[p.currentVoice.staffNum];c.brace&&(e.brace=c.brace),c.bracket&&(e.bracket=c.bracket),c.connectBarLines&&(e.connectBarLines=c.connectBarLines),c.name&&(e.name=c.name[p.currentVoice.index]),c.subname&&(e.subname=c.subname[p.currentVoice.index]),p.currentVoice.stem&&(e.stem=p.currentVoice.stem),p.currentVoice.stafflines&&(e.stafflines=p.currentVoice.stafflines),p.currentVoice.staffscale&&(e.staffscale=p.currentVoice.staffscale),p.currentVoice.scale&&(e.scale=p.currentVoice.scale),p.currentVoice.style&&(e.style=p.currentVoice.style),p.currentVoice.transpose&&(e.clef.transpose=p.currentVoice.transpose)}var l=void 0===p.currentVoice||0===p.currentVoice.staffNum&&0===p.currentVoice.index;0===p.barNumbers&&l&&1!==p.currBarNumber&&(e.barNumber=p.currBarNumber),t.startNewLine(e),p.key.impliedNaturals&&delete p.key.impliedNaturals,p.partForNextLine={},4===p.tempoForNextLine.length&&t.appendElement(p.tempoForNextLine[0],p.tempoForNextLine[1],p.tempoForNextLine[2],p.tempoForNextLine[3]),p.tempoForNextLine=[]}var L=function(e,t){if("{"===e.charAt(t)){var r=n.getBrackettedSubstring(e,t,1,"}");r[2]||g("Missing the closing '}' while parsing grace note",e,t),")"===e[t+r[0]]&&(r[0]++,r[1]+=")");for(var i=[],a=0,s=!1;a<r[1].length;){var o=!1;"/"===r[1].charAt(a)&&(o=!0,a++);var c=P(r[1],a,{},!1);null!==c?(c.duration=c.duration/(8*p.default_length),o&&(c.acciaccatura=!0),i.push(c),s&&(c.endTie=!0,s=!1),c.startTie&&(s=!0),a=c.endChar,delete c.endChar):(" "===r[1].charAt(a)?i.length>0&&(i[i.length-1].end_beam=!0):g("Unknown character '"+r[1].charAt(a)+"' while parsing grace note",e,t),a++)}if(i.length)return[r[0],i]}return[0]};function O(e,t){if("&"===e.charAt(t)){for(var n=t;e.charAt(t)&&":"!==e.charAt(t)&&"|"!==e.charAt(t);)t++;return[t-n,e.substring(n+1,t)]}return[0]}function H(e){var t=e.origMeter;return t&&"specified"===t.type&&t.value&&0!==t.value.length?parseInt(t.value[0].num,10)/parseInt(t.value[0].den,10):1}var V=function(e,t,n){if(void 0===e.inTie[t])return!1;var r=e.currentVoice?e.currentVoice.index:0;return!(!e.inTie[t][r]||void 0===n.pitches&&"spacer"===n.rest.type)},F=function(e,t,n){var r=e.currentVoice?e.currentVoice.index:0;void 0===e.inTie[t]&&(e.inTie[t]=[]),e.inTie[t][r]=n},z=function i(a){var s=v.parseHeader(a);s.regular&&function(i){v.resolveTempo(),p.is_in_header=!1;for(var a=0,s=p.iChar;n.isWhiteSpace(i.charAt(a))&&a<i.length;)a++;if(a!==i.length&&"%"!==i.charAt(a)){var o=p.start_new_line;void 0===p.continueall?p.start_new_line=!0:p.start_new_line=!1;var c=0,l=v.letter_to_body_header(i,a);l[0]>0&&(a+=l[0],"V"===l[1]&&(o=!0));for(var h={},u=0;a<i.length;){var d=a;if("%"===i.charAt(a))break;var f=v.letter_to_inline_header(i,a);if(f[0]>0)a+=f[0],"V"===f[1]&&(o=!0);else{var m;for(o&&(D(),o=!1);;)if((m=n.eatWhiteSpace(i,a))>0&&(a+=m),a>0&&""===i.charAt(a-1)&&(m=v.letter_to_body_header(i,a))[0]>0&&("V"===m[1]&&D(),a=m[0],p.start_new_line=!1),(m=S(i,a))[0]>0&&(a+=m[0]),(m=b(i,a))[0]>0){h.chord||(h.chord=[]);var y=n.translateString(m[1]);y=y.replace(/;/g,"\n");for(var w=!1,x=0;x<h.chord.length;x++)h.chord[x].position===m[2]&&(w=!0,h.chord[x].name+="\n"+y);!1===w&&(null===m[2]&&m[3]?h.chord.push({name:y,rel_position:m[3]}):h.chord.push({name:y,position:m[2]})),a+=m[0];var k=n.skipWhiteSpace(i.substring(a));k>0&&(h.force_end_beam_last=!0),a+=k}else if((m=-1==="ABCDEFGabcdefgxyzZ[]|^_{".indexOf(i.charAt(a))?T(i,a):[0])[0]>0)null===m[1]?a+1<i.length&&D():m[1].length>0&&(0===m[1].indexOf("style=")?h.style=m[1].substr(6):(void 0===h.decoration&&(h.decoration=[]),"beambr1"===m[1]?h.beambr=1:"beambr2"===m[1]?h.beambr=2:h.decoration.push(m[1]))),a+=m[0];else{if(!((m=L(i,a))[0]>0))break;h.gracenotes=m[1],a+=m[0]}if((m=M(i,a))[0]>0){u=0,void 0!==h.gracenotes&&(h.rest={type:"spacer"},h.duration=.125,p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+a,s+a+m[0],h),p.measureNotEmpty=!0,h={});var A={type:m[1]};if(0===A.type.length)g("Unknown bar type",i,a);else{if(p.inEnding&&"bar_thin"!==A.type&&(A.endEnding=!0,p.inEnding=!1),m[2]&&(A.startEnding=m[2],p.inEnding&&(A.endEnding=!0),p.inEnding=!0,"bar_right_repeat"===m[1]?p.restoreStartEndingHoldOvers():p.duplicateStartEndingHoldOvers()),void 0!==h.decoration&&(A.decoration=h.decoration),void 0!==h.chord&&(A.chord=h.chord),A.startEnding&&void 0===p.barFirstEndingNum?p.barFirstEndingNum=p.currBarNumber:A.startEnding&&A.endEnding&&p.barFirstEndingNum?p.currBarNumber=p.barFirstEndingNum:A.endEnding&&(p.barFirstEndingNum=void 0),"bar_invisible"!==A.type&&p.measureNotEmpty)(void 0===p.currentVoice||0===p.currentVoice.staffNum&&0===p.currentVoice.index)&&(p.currBarNumber++,p.barNumbers&&p.currBarNumber%p.barNumbers==0&&(A.barNumber=p.currBarNumber));p.addFormattingOptions(h,e.formatting,"bar"),t.appendElement("bar",s+a,s+a+m[0],A),p.measureNotEmpty=!1,h={}}a+=m[0]}else if("&"===i[a])(m=O(i,a))[0]>0&&(t.appendElement("overlay",s,s+1,{}),a+=1,u++);else{if((m=C(i,a)).consumed>0&&(void 0!==m.startSlur&&(h.startSlur=m.startSlur),m.dottedSlur&&(h.dottedSlur=!0),void 0!==m.triplet&&(c>0?g("Can't nest triplets",i,a):(h.startTriplet=m.triplet,h.tripletMultiplier=m.tripletQ/m.triplet,c=void 0===m.num_notes?m.triplet:m.num_notes)),a+=m.consumed),"["===i.charAt(a)){var N=a;a++;for(var _=null,B=!1,z=!1;!z;){var j=T(i,a);j[0]>0&&(a+=j[0]);var q=P(i,a,{},!1);if(null!==q&&void 0!==q.pitch)j[0]>0&&0!==j[1].indexOf("style=")&&(void 0===h.decoration&&(h.decoration=[]),h.decoration.push(j[1])),q.end_beam&&(h.end_beam=!0,delete q.end_beam),void 0===h.pitches?(h.duration=q.duration,h.pitches=[q]):h.pitches.push(q),delete q.duration,j[0]>0&&0===j[1].indexOf("style=")&&(h.pitches[h.pitches.length-1].style=j[1].substr(6)),p.inTieChord[h.pitches.length]&&(q.endTie=!0,p.inTieChord[h.pitches.length]=void 0),q.startTie&&(p.inTieChord[h.pitches.length]=!0),a=q.endChar,delete q.endChar;else if(" "===i.charAt(a))g("Spaces are not allowed in chords",i,a),a++;else{if(a<i.length&&"]"===i.charAt(a)){a++,0!==p.next_note_duration&&(h.duration=h.duration*p.next_note_duration,p.next_note_duration=0),V(p,u,h)&&(r.each(h.pitches,(function(e){e.endTie=!0})),F(p,u,!1)),c>0&&(!h.rest||"spacer"!==h.rest.type)&&0===--c&&(h.endTriplet=!0);for(var Y=!1;a<i.length&&!Y;){switch(i.charAt(a)){case" ":case"\t":I(h);break;case")":void 0===h.endSlur?h.endSlur=1:h.endSlur++;break;case"-":r.each(h.pitches,(function(e){e.startTie={}})),F(p,u,!0);break;case">":case"<":var W=E(i,a);a+=W[0]-1,p.next_note_duration=W[2],_?_*=W[1]:_=W[1];break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"/":var R=n.getFraction(i,a);_=R.value,a=R.index," "===i.charAt(a)&&(B=!0),"-"===i.charAt(a)||")"===i.charAt(a)||" "===i.charAt(a)||"<"===i.charAt(a)||">"===i.charAt(a)?a--:Y=!0;break;default:Y=!0}Y||a++}}else g("Expected ']' to end the chords",i,a);void 0!==h.pitches&&(null!==_&&(h.duration=h.duration*_,B&&I(h)),p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+N,s+a,h),p.measureNotEmpty=!0,h={}),z=!0}}}else{var G={},U=P(i,a,G,!0);void 0!==G.endTie&&F(p,u,!0),null!==U&&(void 0!==U.pitch?(h.pitches=[{}],void 0!==U.accidental&&(h.pitches[0].accidental=U.accidental),h.pitches[0].pitch=U.pitch,(U.soundPitch||0===U.soundPitch)&&(h.pitches[0].soundPitch=U.soundPitch),(U.midipitch||0===U.midipitch)&&(h.pitches[0].midipitch=U.midipitch),void 0!==U.endSlur&&(h.pitches[0].endSlur=U.endSlur),void 0!==U.endTie&&(h.pitches[0].endTie=U.endTie),void 0!==U.startSlur&&(h.pitches[0].startSlur=U.startSlur),void 0!==h.startSlur&&(h.pitches[0].startSlur=h.startSlur),void 0!==h.dottedSlur&&(h.pitches[0].dottedSlur=!0),void 0!==U.startTie&&(h.pitches[0].startTie=U.startTie),void 0!==h.startTie&&(h.pitches[0].startTie=h.startTie)):(h.rest=U.rest,void 0!==U.endSlur&&(h.endSlur=U.endSlur),void 0!==U.endTie&&(h.rest.endTie=U.endTie),void 0!==U.startSlur&&(h.startSlur=U.startSlur),void 0!==U.startTie&&(h.rest.startTie=U.startTie),void 0!==h.startTie&&(h.rest.startTie=h.startTie)),void 0!==U.chord&&(h.chord=U.chord),void 0!==U.duration&&(h.duration=U.duration),void 0!==U.decoration&&(h.decoration=U.decoration),void 0!==U.graceNotes&&(h.graceNotes=U.graceNotes),delete h.startSlur,delete h.dottedSlur,V(p,u,h)&&(void 0!==h.pitches?h.pitches[0].endTie=!0:"spacer"!==h.rest.type&&(h.rest.endTie=!0),F(p,u,!1)),(U.startTie||h.startTie)&&F(p,u,!0),a=U.endChar,c>0&&(!U.rest||"spacer"!==U.rest.type)&&0===--c&&(h.endTriplet=!0),U.end_beam&&I(h),h.rest&&"rest"===h.rest.type&&1===h.duration&&H(p)<=1&&(h.rest.type="whole",h.duration=H(p)),p.addFormattingOptions(h,e.formatting,"note"),t.appendElement("note",s+d,s+a,h),p.measureNotEmpty=!0,h={})}a===d&&(" "!==i.charAt(a)&&"`"!==i.charAt(a)&&g("Unknown character ignored",i,a),a++)}}}}}(s.str),s.newline&&D(),s.words&&function(e,t){if(e){"-"!==(t=r.strip(t)).charAt(t.length-1)&&(t+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(t.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=t.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:n.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<t.length;c++)switch(t.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(r.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}r.each(e,(function(e){if(0!==i.length)if(i[0].skip){switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}"bar"!==e.el_type&&(void 0===e.lyric?e.lyric=[{syllable:"",divider:" "}]:e.lyric.push({syllable:"",divider:" "}))}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();t.syllable&&(t.syllable=t.syllable.replace(/ +/g," ")),void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else g("Can't add words before the first line of music",e,0)}(t.getCurrentVoice(),a.substring(2)),s.symbols&&function(e,t){if(e){"-"!==(t=r.strip(t)).charAt(t.length-1)&&(t+=" ");for(var i=[],a=0,s=!1,o=function(e){var o=r.strip(t.substring(a,e));if(a=e+1,o.length>0){s&&(o=r.gsub(o,"~"," "));var c=t.charAt(e);return"_"!==c&&"-"!==c&&(c=" "),i.push({syllable:n.translateString(o),divider:c}),s=!1,!0}return!1},c=0;c<t.length;c++)switch(t.charAt(c)){case" ":case"":o(c);break;case"-":!o(c)&&i.length>0&&(r.last(i).divider="-",i.push({skip:!0,to:"next"}));break;case"_":o(c),i.push({skip:!0,to:"slur"});break;case"*":o(c),i.push({skip:!0,to:"next"});break;case"|":o(c),i.push({skip:!0,to:"bar"});break;case"~":s=!0}r.each(e,(function(e){if(0!==i.length)if(i[0].skip)switch(i[0].to){case"next":case"slur":"note"===e.el_type&&null!==e.pitches&&i.shift();break;case"bar":"bar"===e.el_type&&i.shift()}else if("note"===e.el_type&&void 0===e.rest){var t=i.shift();void 0===e.lyric?e.lyric=[t]:e.lyric.push(t)}}))}else g("Can't add symbols before the first line of music",e,0)}(t.getCurrentVoice(),a.substring(2)),s.recurse&&i(s.str)};function j(e,t){e.push({el_type:"hint"});for(var n=0;n<t.length;n++){var i=t[n],a=r.clone(i);if(e.push(a),"bar"===i.el_type)return}}function q(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(i)for(var a=0;a<i.voices.length;a++){var s=i.voices[a],o=r.voices[a];o&&j(o,s)}}}this.parse=function(a,s,o){if(s||(s={}),o||(o=0),t.reset(),s.print&&(e.media="print"),p.reset(),p.iChar=o,s.visualTranspose?(p.globalTranspose=parseInt(s.visualTranspose),0===p.globalTranspose?p.globalTranspose=void 0:t.setVisualTranspose(s.visualTranspose)):p.globalTranspose=void 0,s.lineBreaks){p.lineBreaks={};for(var c=0;c<s.lineBreaks.length;c++)p.lineBreaks[""+(s.lineBreaks[c]+1)]=!0}v.reset(n,g,p,e),a=r.gsub(a,"\r\n","\n"),a=r.gsub(a,"\r","\n");var h=(a+="\n").split("\n\\");if(h.length>1){for(var u=1;u<h.length;u++)for(;h[u].length>0&&"\n"!==h[u][0];)h[u]=h[u].substr(1),h[u-1]+=" ";a=h.join(" ")}var d=(a=a.replace(/\\([ \t]*)(%.*)*\n/g,(function(e,t,n){return t+" "+(n?" ".substring(0,n.length):"")}))).split("\n");0===r.last(d).length&&d.pop();try{s.format&&i.globalFormatting(s.format),r.each(d,(function(e){if(s.header_only&&!1===p.is_in_header)throw"normal_abort";if(s.stop_on_warning&&p.warnings)throw"normal_abort";if(p.is_in_history)":"===e.charAt(1)?(p.is_in_history=!1,z(e)):t.addMetaText("history",n.translateString(n.stripComment(e)));else if(p.inTextBlock)r.startsWith(e,"%%endtext")?(t.addText(p.textBlock),p.inTextBlock=!1):r.startsWith(e,"%%")?p.textBlock+=e.substring(2)+"\n":p.textBlock+=e+"\n";else if(p.inPsBlock)r.startsWith(e,"%%endps")?p.inPsBlock=!1:p.textBlock+=" "+e;else{var i=p.is_in_header;z(e),i&&!p.is_in_header&&(t.setRunningFont("annotationfont",p.annotationfont),t.setRunningFont("gchordfont",p.gchordfont),t.setRunningFont("tripletfont",p.tripletfont),t.setRunningFont("vocalfont",p.vocalfont))}p.iChar+=e.length+1}));var f=792,m=612;switch(p.papersize){case"legal":f=1008,m=612;break;case"A4":f=842.4,m=597.6}if(p.landscape){var b=f;f=m,m=b}p.openSlurs=t.cleanUp(m,f,p.barsperstaff,p.staffnonote,p.openSlurs)}catch(e){if("normal_abort"!==e)throw e}s.hint_measures&&function(){for(var t=0;t<e.lines.length;t++){var n=e.lines[t].staff;if(n){for(var r=t+1;r<e.lines.length&&void 0===e.lines[r].staff;)r++;if(r<e.lines.length)q(n,e.lines[r].staff)}}}(),l.wrapLines(e,p.lineBreaks)}}},function(e,t){var n={},r={C:0,"C#":1,Db:1,D:2,"D#":3,Eb:3,E:4,F:5,"F#":6,Gb:6,G:7,"G#":8,Ab:8,A:9,"A#":10,Bb:10,B:11},i=["C","Db","D","Eb","E","F","F#","G","Ab","A","Bb","B"],a=["C","C#","D","D#","E","F","F#","G","G#","A","Bb","B"];n.keySignature=function(e,t,n,s,o,c){if("perc"===e.clef.type)return{accidentals:t[n],root:s,acc:o};c||(c=0),e.localTransposeVerticalMovement=0,e.localTransposePreferFlats=!1;var l=t[n];if(!l)return e.key;if(e.localTranspose=(e.globalTranspose?e.globalTranspose:0)+c,!e.localTranspose)return{accidentals:l,root:s,acc:o};if(e.globalTransposeOrigKeySig=l,e.localTranspose%12==0)return e.localTransposeVerticalMovement=e.localTranspose/12*7,{accidentals:l,root:s,acc:o};var h=n[0];"b"===n[1]||"#"===n[1]?(h+=n[1],n=n.substr(2)):n=n.substr(1);for(var u=r[h]+e.localTranspose;u<0;)u+=12;u>11&&(u%=12);var d="m"===n[0]?a[u]:i[u],f=d+n,p=t[f];p.length>0&&"flat"===p[0].acc&&(e.localTransposePreferFlats=!0);var m=f.charCodeAt(0)-h.charCodeAt(0);return e.localTranspose>0?m<0?m+=7:0===m&&("#"!==h[1]&&"b"!==f[1]||(m+=7)):e.localTranspose<0&&(m>0?m-=7:0===m&&("b"!==h[1]&&"#"!==f[1]||(m-=7))),e.localTranspose>0?e.localTransposeVerticalMovement=m+7*Math.floor(e.localTranspose/12):e.localTransposeVerticalMovement=m+7*Math.ceil(e.localTranspose/12),{accidentals:p,root:d[0],acc:d.length>1?d[1]:""}};var s=["C","C♯","D","D♯","E","F","F♯","G","G♯","A","A♯","B"],o=["C","D♭","D","E♭","E","F","G♭","G","A♭","A","B♭","B"],c=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],l=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"];n.chordName=function(e,t){if(e.localTranspose&&e.localTranspose%12!=0){for(var n=e.localTranspose;n<0;)n+=12;n>11&&(n%=12);for(var r=(t=(t=(t=(t=(t=(t=(t=(t=e.freegchord?(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/Cb/g,"`~11`")).replace(/Db/g,"`~1`")).replace(/Eb/g,"`~3`")).replace(/Fb/g,"`~4`")).replace(/Gb/g,"`~6`")).replace(/Ab/g,"`~8`")).replace(/Bb/g,"`~10`")).replace(/C#/g,"`~1`")).replace(/D#/g,"`~3`")).replace(/E#/g,"`~5`")).replace(/F#/g,"`~6`")).replace(/G#/g,"`~8`")).replace(/A#/g,"`~10`")).replace(/B#/g,"`~0`"):(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/C♭/g,"`~11`")).replace(/D♭/g,"`~1`")).replace(/E♭/g,"`~3`")).replace(/F♭/g,"`~4`")).replace(/G♭/g,"`~6`")).replace(/A♭/g,"`~8`")).replace(/B♭/g,"`~10`")).replace(/C♯/g,"`~1`")).replace(/D♯/g,"`~3`")).replace(/E♯/g,"`~5`")).replace(/F♯/g,"`~6`")).replace(/G♯/g,"`~8`")).replace(/A♯/g,"`~10`")).replace(/B♯/g,"`~0`")).replace(/C/g,"`~0`")).replace(/D/g,"`~2`")).replace(/E/g,"`~4`")).replace(/F/g,"`~5`")).replace(/G/g,"`~7`")).replace(/A/g,"`~9`")).replace(/B/g,"`~11`")).split("`"),i=0;i<r.length;i++)if("~"===r[i][0]){var a=parseInt(r[i].substr(1),10);(a+=n)>11&&(a-=12),e.freegchord?r[i]=e.localTransposePreferFlats?l[a]:c[a]:r[i]=e.localTransposePreferFlats?o[a]:s[a]}t=r.join("")}return t};var h=["c","d","e","f","g","a","b"];var u={dblflat:-2,flat:-1,natural:0,sharp:1,dblsharp:2},d={"-2":"dblflat","-1":"flat",0:"natural",1:"sharp",2:"dblsharp"};n.note=function(e,t){if(e.localTranspose&&"perc"!==e.clef.type){var n=t.pitch;if(t.pitch=t.pitch+e.localTransposeVerticalMovement,t.accidental){var r=function(e,t,n,r,i){for(var a=h[(e+49)%7],s=0,o=0;o<r.length;o++)r[o].note.toLowerCase()===a&&(s=u[r[o].acc]);for(var c=u[n]-s,l=h[(t+49)%7],d=0,f=0;f<i.accidentals.length;f++)i.accidentals[f].note.toLowerCase()===l&&(d=u[i.accidentals[f].acc]);var p=c+d;return p<-2&&(t--,p+="c"===l||"f"===l?1:2),p>2&&(t++,p-="b"===l||"e"===l?1:2),[t,p]}(n,t.pitch,t.accidental,e.globalTransposeOrigKeySig,e.targetKey);t.pitch=r[0],t.accidental=d[r[1]]}}},e.exports=n},function(e,t){function n(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function r(e,t,r,i,a,s,o,c,l,h,u){for(var d=h;d<e.length;d++){var f=e[d];r+=f,i+=f;var p=Math.abs(r-t[c]);if(Math.abs(p-s)<t[0]/10)if(p<s){var m=n(a),g=n(l);g.push(d-1),m.push(i-f),u.push({accumulator:r,lineAccumulator:f,lineWidths:m,lastVariance:Math.abs(r-t[c+1]),highestVariance:Math.max(o,s),currLine:c+1,lineBreaks:g,startIndex:d+1})}else p>s&&d<e.length-1&&(m=n(a),g=n(l),u.push({accumulator:r,lineAccumulator:i,lineWidths:m,lastVariance:p,highestVariance:Math.max(o,p),currLine:c,lineBreaks:g,startIndex:d+1}));p>s?(l.push(d-1),c++,o=Math.max(o,s),s=Math.abs(r-t[c]),a.push(i-f),i=f):s=p}a.push(i)}function i(e,t,n,r,i){var a=new i,s={lineBreaks:e,staffwidth:t};for(var o in r)r.hasOwnProperty(o)&&"wrap"!==o&&"staffwidth"!==o&&(s[o]=r[o]);return a.parse(n,s),{tune:a.getTune(),revisedParams:s}}e.exports={wrapLines:function(e,t){if(t&&0!==e.lines.length){for(var n=[],r=[],i=[],a=[],s=[],o="",c={},l=0,h=0;h<e.lines.length;h++){var u=e.lines[h];if(u.staff){for(var d=u.staff,f=0;f<d.length;f++){void 0===r[f]&&(r[f]=[],i[f]=[],a[f]=[],s[f]=[]);for(var p=d[f],m=p.voices,g=0;g<m.length;g++){void 0===r[f][g]&&(r[f][g]=!0,i[f][g]=0,a[f][g]=0,s[f][g]=0),l>0&&(i[f][g]+=l);for(var v=m[g],b=0;b<v.length;b++){if(r[f][g]){if(n[i[f][g]]||(n[i[f][g]]={staff:[]}),!n[i[f][g]].staff[f])for(var y in n[i[f][g]].staff[f]={voices:[]},p)p.hasOwnProperty(y)&&("meter"===y?0!==i[f][g]&&o===JSON.stringify(p[y])||(o=JSON.stringify(p[y]),n[i[f][g]].staff[f][y]=p[y]):"voices"!==y&&(n[i[f][g]].staff[f][y]=p[y]));s[f][g]&&(n[i[f][g]].staff[f].barNumber=s[f][g]),r[f][g]=!1}var w=v[b];if(!n[i[f][g]].staff[f].voices[g])for(var x in n[i[f][g]].staff[f].voices[g]=[],c)c.hasOwnProperty(x)&&n[i[f][g]].staff[f].voices[g].push(c[x]);n[i[f][g]].staff[f].voices[g].push(w),"stem"===w.el_type&&(c[w.el_type]=w),"bar"===w.el_type&&(a[f][g]++,t[a[f][g]]&&(r[f][g]=!0,i[f][g]++,s[f][g]=w.barNumber,delete w.barNumber))}}}l=0}else n.push(u),l++}e.lines=n}},calcLineWraps:function(e,t,n,a,s,o){if(a.staffwidth<t.left)return{explanation:"Staffwidth is narrower than the margin",tune:e,revisedParams:a};var c=a.scale?Math.max(a.scale,.1):1,l=a.wrap.minSpacing?Math.max(parseFloat(a.wrap.minSpacing),1):1,h=a.wrap.minSpacingLimit?Math.max(parseFloat(a.wrap.minSpacingLimit),1):l-.1,u=a.wrap.maxSpacing?Math.max(parseFloat(a.wrap.maxSpacing),1):void 0;a.wrap.lastLineLimit&&!u&&(u=Math.max(parseFloat(a.wrap.lastLineLimit),1));var d=a.wrap.preferredMeasuresPerLine?Math.max(parseInt(a.wrap.preferredMeasuresPerLine,10),1):void 0,f=(a.staffwidth-t.left)/l/c,p=(a.staffwidth-t.left)/u/c,m=(a.staffwidth-t.left)/h/c,g={widths:t,lineBreakPoint:f,minLineSize:p,attempts:[],staffWidth:a.staffwidth,minWidth:Math.round(m)},v=null;if(d){var b=function(e,t,n){for(var r=[],i=[],a=0,s=!1,o=0;o<e.length;o++)(a+=e[o])>t&&(s=!0),o%n==n-1&&(o!==e.length-1&&r.push(o),i.push(Math.round(a)),a=0);return{failed:s,totals:i,lineBreaks:r}}(t.measureWidths,f,d);g.attempts.push({type:"Fixed Measures Per Line",preferredMeasuresPerLine:d,lineBreaks:b.lineBreaks,failed:b.failed,totals:b.totals}),b.failed||(v=b.lineBreaks)}if(!v){var y=function(e,t){for(var n=[],r=[],i=0,a=0;a<e.length;a++){var s=e[a],o=i+s;if(o<t)i=o;else t-i<o-t&&i>0?(n.push(a-1),r.push(Math.round(i-s)),i=s):a<e.length-1&&(n.push(a),r.push(Math.round(i)),i=0)}return r.push(Math.round(i)),{lineBreaks:n,totals:r}}(t.measureWidths,f);g.attempts.push({type:"Free Form",lineBreaks:y.lineBreaks,totals:y.totals}),v=y.lineBreaks,y=function(e,t,n,i){for(var a=Math.ceil(e.total/t)+1,s=Math.floor(e.total/a),o=[],c=0;c<a;c++)o.push(s*(c+1));var l=[];l.push({accumulator:0,lineAccumulator:0,lineWidths:[],lastVariance:999999,highestVariance:0,currLine:0,lineBreaks:[],startIndex:0});for(var h=0;h<l.length;)r(e.measureWidths,o,l[h].accumulator,l[h].lineAccumulator,l[h].lineWidths,l[h].lastVariance,l[h].highestVariance,l[h].currLine,l[h].lineBreaks,l[h].startIndex,l),h++;for(c=0;c<l.length;c++){var u=l[c];u.variances=[],u.aveVariance=0;for(var d=0;d<u.lineWidths.length;d++){var f=u.lineWidths[d];u.variances.push(f-o[0]),u.aveVariance+=Math.abs(f-o[0])}u.aveVariance=u.aveVariance/u.lineWidths.length,i.attempts.push({type:"optimizeLineWidths",lineBreaks:u.lineBreaks,variances:u.variances,aveVariance:u.aveVariance,widths:e.measureWidths})}var p=9999999,m=-1;for(c=0;c<l.length;c++)(u=l[c]).aveVariance<p&&(p=u.aveVariance,m=c);return{failed:!1,lineBreaks:l[m].lineBreaks,variance:l[m].highestVariance}}(t,f,0,g),g.attempts.push({type:"Optimize",failed:y.failed,reason:y.reason,lineBreaks:y.lineBreaks,totals:y.totals}),y.failed||(v=y.lineBreaks)}var w=a.staffwidth,x=i(v,w,n,a,s),k=o.getMeasureWidths(x.tune),A=!0;return g.attempts.push({type:"heightCheck",height:k.height}),0===v.length&&p>t.total&&(w=t.total*u*c+t.left,g.attempts.push({type:"too sparse",newWidth:Math.round(w)}),A=!1),A||(x=i(v,w,n,a,s)),x.explanation=g,x}}},function(e,t,n){var r=n(0),i=n(1),a=n(33),s=n(34);e.exports=function(){function e(e,t){for(;t<e.length&&null===e[t].left;)t++;return e[t]}this.getBeatLength=function(){var e=this.getMeterFraction(),t=1;return(6===e.num||9===e.num||12===e.num||3===e.num&&8===e.den)&&(t=3),t/e.den},this.getPickupLength=function(){var e=this.getBarLength(),t=function(e,t){for(var n=0,r=0;r<e.length;r++)if(e[r].staff)for(var i=0;i<e[r].staff.length;i++)for(var a=0;a<e[r].staff[i].voices.length;a++)for(var s=e[r].staff[i].voices[a],o=1,c=0;c<s.length;c++){var l=s[c].rest&&"spacer"===s[c].rest.type;if(s[c].startTriplet&&(o=s[c].tripletMultiplier),s[c].duration&&!l&&"tempo"!==s[c].el_type&&(n+=s[c].duration*o),s[c].endTriplet&&(o=1),n>=t&&(n-=t),"bar"===s[c].el_type)return n}return n}(this.lines,e);return t<1e-8||e-t<1e-8?0:t},this.getBarLength=function(){var e=this.getMeterFraction();return e.num/e.den},this.millisecondsPerMeasure=function(e){var t;if(e)t=e;else{var n=this.metaText?this.metaText.tempo:null;t=this.getBpm(n)}return t<=0&&(t=1),6e4*(this.getBeatsPerMeasure()/t)},this.getBeatsPerMeasure=function(){var e=this.getBeatLength();return this.getBarLength()/e},this.getMeter=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++){var r=t.staff[n].meter;if(r)return r}}return{type:"common_time"}},this.getMeterFraction=function(){var e=this.getMeter(),t=4,n=4;return e&&("specified"===e.type?(t=parseInt(e.value[0].num,10),n=parseInt(e.value[0].den,10)):"cut_time"===e.type?(t=2,n=2):"common_time"===e.type&&(t=4,n=4)),this.meter={num:t,den:n},this.meter},this.getKeySignature=function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e];if(t.staff)for(var n=0;n<t.staff.length;n++)if(t.staff[n].key)return t.staff[n].key}return{}},this.getElementFromChar=function(e){for(var t=0;t<this.lines.length;t++){var n=this.lines[t];if(n.staff)for(var r=0;r<n.staff.length;r++)for(var i=n.staff[r],a=0;a<i.voices.length;a++)for(var s=i.voices[a],o=0;o<s.length;o++){var c=s[o];if(c.startChar&&c.endChar&&c.startChar<=e&&c.endChar>e)return c}}return null},this.addElementToEvents=function(e,t,n,i,a,s,o,c,l,h){if(t.hint)return{isTiedState:void 0,duration:0};var u=t.durationClass?t.durationClass:t.duration;if(t.abcelem.rest&&"spacer"===t.abcelem.rest.type&&(u=0),u>0){for(var d=[],f=0;f<t.elemset.length;f++)null!==t.elemset[f]&&d.push(t.elemset[f]);var p=t.startTie;if(void 0!==l)e["event"+l].elements.push(d),h&&(e["event"+n]||(e["event"+n]={type:"event",milliseconds:n,line:s,measureNumber:o,top:i,height:a,left:null,width:0,elements:[],startChar:null,endChar:null,startCharArray:[],endCharArray:[]}),e["event"+n].measureStart=!0,h=!1),p||(l=void 0);else{if(e["event"+n]){if(e["event"+n].left?e["event"+n].left=Math.min(e["event"+n].left,t.x):e["event"+n].left=t.x,e["event"+n].elements.push(d),e["event"+n].startCharArray.push(t.abcelem.startChar),e["event"+n].endCharArray.push(t.abcelem.endChar),null===e["event"+n].startChar&&(e["event"+n].startChar=t.abcelem.startChar),null===e["event"+n].endChar&&(e["event"+n].endChar=t.abcelem.endChar),t.abcelem.midiPitches&&t.abcelem.midiPitches.length){e["event"+n].midiPitches||(e["event"+n].midiPitches=[]);for(f=0;f<t.abcelem.midiPitches.length;f++)e["event"+n].midiPitches.push(t.abcelem.midiPitches[f])}if(t.abcelem.midiGraceNotePitches&&t.abcelem.midiGraceNotePitches.length){e["event"+n].midiGraceNotePitches||(e["event"+n].midiGraceNotePitches=[]);for(var m=0;m<t.abcelem.midiGraceNotePitches.length;m++)e["event"+n].midiGraceNotePitches.push(t.abcelem.midiGraceNotePitches[m])}}else e["event"+n]={type:"event",milliseconds:n,line:s,measureNumber:o,top:i,height:a,left:t.x,width:t.w,elements:[d],startChar:t.abcelem.startChar,endChar:t.abcelem.endChar,startCharArray:[t.abcelem.startChar],endCharArray:[t.abcelem.endChar],midiPitches:t.abcelem.midiPitches?r.cloneArray(t.abcelem.midiPitches):[]},t.abcelem.midiGraceNotePitches&&(e["event"+n].midiGraceNotePitches=r.cloneArray(t.abcelem.midiGraceNotePitches));h&&(e["event"+n].measureStart=!0,h=!1),p&&(l=n)}}return{isTiedState:l,duration:u/c,nextIsBar:h||"bar"===t.type}},this.makeVoicesArray=function(){for(var e=[],t=[],n={},r=0;r<this.engraver.staffgroups.length;r++)for(var a=this.engraver.staffgroups[r],s=a.staffs[0],o=s.absoluteY,c=o-s.top*i.STEP,l=a.staffs[a.staffs.length-1],h=(o=l.absoluteY)-l.bottom*i.STEP-c,u=a.voices,d=0;d<u.length;d++){var f=!1;e[d]||(e[d]=[]),void 0===t[d]&&(t[d]=0);for(var p=u[d].children,m=0;m<p.length;m++)"tempo"===p[m].type&&(n[t[d]]=this.getBpm(p[m].abcelem)),e[d].push({top:c,height:h,line:a.line,measureNumber:t[d],elem:p[m]}),"bar"===p[m].type&&f&&t[d]++,"note"!==p[m].type&&"rest"!==p[m].type||(f=!0)}return this.tempoLocations=n,e},this.setupEvents=function(t,n,r){for(var i,a=[],s={},o=t,c=!0,l=this.makeVoicesArray(),h=0;h<l.length;h++){var u=o,d=Math.round(1e3*u),f=0,p=-1,m=l[h],g=r;n=this.getBeatLength()*g/60;for(var v=-1,b=0;b<m.length;b++){var y=m[b].measureNumber;v!==y&&this.tempoLocations[y]&&(g=this.tempoLocations[y],n=this.getBeatLength()*g/60,v=y);var w,x=m[b].elem,k=this.addElementToEvents(s,x,d,m[b].top,m[b].height,m[b].line,m[b].measureNumber,n,i,c);if(i=k.isTiedState,c=k.nextIsBar,u+=k.duration,x.duration>0&&(w="event"+d),d=Math.round(1e3*u),"bar"===x.type){var A=x.abcelem.type,T="bar_right_repeat"===A||"bar_dbl_repeat"===A,S="1"===x.abcelem.startEnding,M="bar_left_repeat"===A||"bar_dbl_repeat"===A||"bar_right_repeat"===A;if(T){b>0&&(s[w].endX=x.x),-1===p&&(p=b);var N=0;v=-1;for(var C=f;C<p;C++){v!==(y=m[C].measureNumber)&&this.tempoLocations[y]&&(g=this.tempoLocations[y],n=this.getBeatLength()*g/60,v=y);var E=m[C].elem;i=(k=this.addElementToEvents(s,E,d,m[C].top,m[C].height,m[C].line,m[C].measureNumber,n,i,c)).isTiedState,c=k.nextIsBar,u+=k.duration,N=d,d=Math.round(1e3*u)}s["event"+N]&&(s["event"+N].endX=m[p].elem.x),c=!0,p=-1}S&&(p=b),M&&(f=b)}}}return function(e){for(var t,n,r,i,a=e.length-1;a>=0;a--){var s=e[a];"bar"===s.type?(s.top=r,s.nextTop=t,t=r,s.bottom=i,s.nextBottom=n,n=i):"event"===s.type&&(r=s.top,i=s.top+s.height)}}(a=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t=t.sort((function(e,t){var n=e.milliseconds-t.milliseconds;return 0!==n?n:"bar"===e.type?-1:1}))}(s)),function(t,n){if(n.length<1)return;for(var r=0;r<n.length-1;r++){var i=n[r],a=e(n,r+1);if(null!==i.left){var s=a&&i.top===a.top?a.left:t[i.line].staffGroup.w;void 0!==i.endX?s>i.left&&(i.endX=Math.min(i.endX,s)):i.endX=s}}var o=n[n.length-1];o.endX=t[o.line].staffGroup.w}(this.lines,a),a.push({type:"end",milliseconds:d}),this.addUsefulCallbackInfo(a,g),a},this.addUsefulCallbackInfo=function(e,t){for(var n=this.millisecondsPerMeasure(t),r=0;r<e.length;r++){e[r].millisecondsPerMeasure=n}},this.getBpm=function(e){var t;if(e){t=e.bpm;var n=this.getBeatLength();t=t*(e.duration&&e.duration.length>0?e.duration[0]:n)/n}if(!t){t=180;var r=this.getMeterFraction();r&&3!==r.num&&r.num%3==0&&(t=120)}return t},this.setTiming=function(e,t){if(t=t||0,!this.engraver||!this.engraver.staffgroups)return console.log("setTiming cannot be called before the tune is drawn."),void(this.noteTimings=[]);if(!e){var n=this.metaText?this.metaText.tempo:null;e=this.getBpm(n)}var r=this.getBeatLength(),i=e/60,a=this.getBarLength()/r*t/i;a&&(a-=this.getPickupLength()/r/i);var s=r*i;return this.noteTimings=this.setupEvents(a,s,e),this.noteTimings},this.setUpAudio=function(e){e||(e={});var t=a(this,e);return s(t,e)}}},function(e,t){var n=function(e){this.type="TieElem",this.anchor1=e.anchor1,this.anchor2=e.anchor2,e.isGrace&&(this.isGrace=!0),e.fixedY&&(this.fixedY=!0),e.stemDir&&(this.stemDir=e.stemDir),void 0!==e.voiceNumber&&(this.voiceNumber=e.voiceNumber),void 0!==e.style&&(this.dotted=!0),this.internalNotes=[]};n.prototype.addInternalNote=function(e){this.internalNotes.push(e)},n.prototype.setEndAnchor=function(e){this.anchor2=e},n.prototype.setStartX=function(e){this.startLimitX=e},n.prototype.setEndX=function(e){this.endLimitX=e},n.prototype.setHint=function(){this.hint=!0},n.prototype.calcTieDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e;e=this.anchor1?this.anchor1.pitch:this.anchor2?this.anchor2.pitch:14,this.anchor1&&"down"===this.anchor1.stemDir&&this.anchor2&&"down"===this.anchor2.stemDir?this.above=!0:this.anchor1&&"up"===this.anchor1.stemDir&&this.anchor2&&"up"===this.anchor2.stemDir?this.above=!1:this.anchor1&&this.anchor2?this.above=e>=6:this.anchor1?this.above="down"===this.anchor1.stemDir:this.anchor2?this.above="down"===this.anchor2.stemDir:this.above=e>=6}},n.prototype.calcSlurDirection=function(){if(this.isGrace)this.above=!1;else if(0===this.voiceNumber)this.above=!0;else if(this.voiceNumber>0)this.above=!1;else{var e=!1;this.anchor1&&"down"===this.anchor1.stemDir&&(e=!0),this.anchor2&&"down"===this.anchor2.stemDir&&(e=!0);for(var t=0;t<this.internalNotes.length;t++){"down"===this.internalNotes[t].stemDir&&(e=!0)}this.above=e}},n.prototype.calcX=function(e,t){this.anchor1?(this.startX=this.anchor1.x,this.anchor1.scalex<1&&(this.startX-=3)):this.startLimitX?this.startX=this.startLimitX.x+this.startLimitX.w:this.startX=e,!this.anchor1&&this.dotted&&(this.startX-=3),this.anchor2?this.endX=this.anchor2.x:this.endLimitX?this.endX=this.endLimitX.x:this.endX=t},n.prototype.calcTieY=function(){this.anchor1?this.startY=this.anchor1.pitch:this.anchor2?this.startY=this.anchor2.pitch:this.startY=this.above?14:0,this.anchor2?this.endY=this.anchor2.pitch:this.anchor1?this.endY=this.anchor1.pitch:this.endY=this.above?14:0},n.prototype.calcSlurY=function(){if(this.anchor1&&this.anchor2){this.above&&"up"===this.anchor1.stemDir&&!this.fixedY?(this.startY=(this.anchor1.highestVert+this.anchor1.pitch)/2,this.startX+=this.anchor1.w/2):this.startY=this.anchor1.pitch;var e=this.anchor2.parent.beam&&this.anchor2.parent.beam.stemsUp&&this.anchor2.parent.beam.elems[0]!==this.anchor2.parent,t=(this.anchor2.highestVert+this.anchor2.pitch)/2;this.above&&"up"===this.anchor2.stemDir&&!this.fixedY&&!e&&t<this.startY?(this.endY=t,this.endX+=Math.round(this.anchor2.w/2)):this.endY=this.above&&e?this.anchor2.highestVert:this.anchor2.pitch}else this.anchor1?this.startY=this.endY=this.anchor1.pitch:this.anchor2?this.startY=this.endY=this.anchor2.pitch:(this.startY=this.above?14:0,this.endY=this.above?14:0)},n.prototype.avoidCollisionAbove=function(){if(this.above){for(var e=-50,t=0;t<this.internalNotes.length;t++)this.internalNotes[t].highestVert>e&&(e=this.internalNotes[t].highestVert);e>this.startY&&e>this.endY&&(this.startY=this.endY=e-1)}},e.exports=n},function(e,t){e.exports=function(e){for(var t=0,n=0;n<e.voices.length;n++){var r=e.voices[n].staff;e.voices[n].duplicate||(t+=r.top,r.bottom<0&&(t+=-r.bottom))}return t}},function(e,t,n){var r=n(8);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#ff0000"),r(this.elemset,e,"",t)}},function(e,t,n){var r=n(8);e.exports=function(e,t){void 0===e&&(e="abcjs-note_selected"),void 0===t&&(t="#000000"),r(this.elemset,"",e,t)}},function(e,t,n){var r=n(4),i=n(5),a=n(13);function s(e,t,n){var r=n;return"f"===e&&"f"===t&&(r=2*r/3),"p"===e&&"p"===t&&(r=5*r/6),"f"===e&&"z"===t&&(r=5*r/8),r}e.exports=function(e,t,n,o,c,l,h){var u,d;if(!o)return null;if(o.length>1&&o.indexOf(".")<0){e.paper.openGroup({klass:h});for(var f=0,p=0;p<o.length;p++){var m=o.charAt(p);d=i.getYCorr(m),(u=i.printSymbol(t+f,e.calcY(n+d),m,e.paper,"","",""))?p<o.length-1&&(f+=s(m,o.charAt(p+1),i.getSymbolWidth(m))):r(e,{x:t,y:e.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"})}return e.paper.closeGroup()}if(d=i.getYCorr(o),a.isInGroup())a.addPath(i.getPathForSymbol(t,e.calcY(n+d),o,c,l));else{if(u=i.printSymbol(t,e.calcY(n+d),o,e.paper,h,"none","#000000"))return u;r(e,{x:t,y:e.y,text:"no symbol:"+o,type:"debugfont",klass:"debug-msg",anchor:"start"})}return null}},function(e,t,n){var r=n(4),i=n(25),a=n(26),s=n(23);e.exports=function(e,t,n,o){void 0===t.pitch&&window.console.error(t.type+" Relative Element y-coordinate not set.");var c=e.calcY(t.pitch);switch(t.type){case"symbol":if(null===t.c)return null;var l="symbol";t.klass&&(l+=" "+t.klass),t.graphelem=s(e,t.x,t.pitch,t.c,t.scalex,t.scaley,e.controller.classes.generate(l),"none","#000000");break;case"debug":t.graphelem=r(e,{x:t.x,y:e.calcY(15),text:""+t.c,type:"debugfont",klass:e.controller.classes.generate("debug-msg"),anchor:"start",centerVertically:!1,dim:t.dim});break;case"barNumber":t.graphelem=r(e,{x:t.x,y:c,text:""+t.c,type:"measurefont",klass:e.controller.classes.generate("bar-number"),anchor:"middle",dim:t.dim});break;case"lyric":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"vocalfont",klass:e.controller.classes.generate("lyric"),anchor:"middle",dim:t.dim});break;case"chord":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"gchordfont",klass:e.controller.classes.generate("chord"),anchor:"middle",dim:t.dim,lane:t.getLane()});break;case"decoration":t.graphelem=r(e,{x:t.x,y:c+6,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"middle",centerVertically:!0,dim:t.dim});break;case"text":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"annotationfont",klass:e.controller.classes.generate("annotation"),anchor:"start",centerVertically:t.centerVertically,dim:t.dim,lane:t.getLane()});break;case"multimeasure-text":t.graphelem=r(e,{x:t.x+t.w/2,y:c,text:t.c,type:"tempofont",klass:e.controller.classes.generate("rest"),anchor:"middle",centerVertically:!1,dim:t.dim});break;case"part":t.graphelem=r(e,{x:t.x,y:c,text:t.c,type:"partsfont",klass:e.controller.classes.generate("part"),anchor:"start",dim:t.dim});break;case"bar":t.graphelem=i(e,t.x,t.linewidth,c,n||e.calcY(t.pitch2));break;case"stem":t.graphelem=i(e,t.x,t.linewidth,c,e.calcY(t.pitch2));break;case"ledger":t.graphelem=a(e,t.x,t.x+t.w,t.pitch,e.controller.classes.generate("ledger"))}return 1!==t.scalex&&t.graphelem&&function(e,t,n,r,i,a){e.setAttributeOnElement(t,{style:"transform:scale("+n+","+r+");transform-origin:"+i+"px "+a+"px;"})}(e.paper,t.graphelem,t.scalex,t.scaley,t.x,c),t.graphelem}},function(e,t,n){var r=n(13),i=n(3);e.exports=function(e,t,n,a,s){if(n<0||a<s){var o=i(s);s=i(a),a=o}else a=i(a),s=i(s);t=i(t);var c=i(t+n),l=[["M",t,a],["L",t,s],["L",c,s],["L",c,a],["z"]];if(!r.isInGroup()){for(var h="",u=0;u<l.length;u++)h+=l[u].join(" ");return e.paper.pathToBack({path:h,stroke:"none",fill:"#000000",class:e.controller.classes.generate("stem")})}r.addPath(l)}},function(e,t,n){var r=n(7),i=n(3);e.exports=function(e,t,n,a,s){var o=.35,c="#000000",l=e.calcY(a);t=i(t),n=i(n);var h=i(l-o),u=i(l+o),d={path:r("M %f %f L %f %f L %f %f L %f %f z",t,h,n,h,n,u,t,u),stroke:"none",fill:c};return s&&(d.class=s),e.paper.pathToBack(d)}},function(e,t,n){n(28);var r={plugin:n(29)};e.exports=r},function(e,t){},function(e,t,n){var r=n(30),i=n(91),a=new function(){"use strict";try{abcjs_is_user_script}catch(e){}this.show_midi=!0,this.hide_abc=!1,this.render_before=!1,this.midi_options={},this.render_options={},this.render_classname="abcrendered",this.text_classname="abctext",this.auto_render_threshold=20,this.show_text="show score",this.debug=!1};a.start=function(){var e=window.document.body;this.errors="";var t=this.getABCContainingElements(e);if(0!==t.length){if(this.debug)for(var n=0;n<t.length;n++){var r="Possible ABC found ("+(n+1)+" of "+t.length+"):\n\n"+t[n].innerText;alert(r)}var i=t.map(this.convertToDivs,this).reduce((function(e,t){return e.concat(t)}));this.auto_render=i.length<=this.auto_render_threshold,i.forEach((function(e){this.render(e,e.abctext_)}),this)}},a.getABCContainingElements=function(e){for(var t,n=[],r=!1,i=0,a=e.childNodes.length;i<a;++i)3!==(t=e.childNodes[i]).nodeType||r?1===t.nodeType&&"TEXTAREA"!==t.tagName&&(n=n.concat(this.getABCContainingElements(t))):t.nodeValue.match(/^\s*X:/m)&&"TEXTAREA"!==t.parentNode.tagName&&(n.push(e),r=!0);return n},a.convertToDivs=function(e){for(var t,n="",r=null,i=!1,a=[],s=Array.prototype.slice.call(e.childNodes),o=0,c=s.length;o<c;++o)if(3!==(t=s[o]).nodeType||t.nodeValue.match(/^\s*$/))i&&"BR"===t.tagName?(n+="\n",r.appendChild(t)):i&&1===t.nodeType?(n+="\n",r.appendChild(t)):i&&(i=!1,0,n=n.replace(/\n+/,"\n"),r.abctext_=n,a.push(r));else{0;var l=t.nodeValue;l.match(/^\s*X:/m)&&(i=!0,n="",(r=document.createElement("DIV")).className=this.text_classname,t.parentElement.insertBefore(r,t),this.hide_abc&&(r.style.display="none")),i&&(n+=l.replace(/^\n+/,""),r.appendChild(t))}return i&&(n=n.replace(/\n+$/,"\n").replace(/^\n+/,"\n"),r.abctext_=n,a.push(r)),a},a.render=function(e,t){var n=document.createElement("DIV");this.render_before?e.parentElement.insertBefore(n,e):e.nextSibling?e.parentElement.insertBefore(n,e.nextSibling):e.parentElement.appendChild(n);var a=this;try{this.debug&&alert("About to render:\n\n"+t);var s=function(){var e=document.createElement("DIV");if(e.className=a.render_classname,n.appendChild(e),r(e,t,a.render_options),a.show_midi){var s=document.createElement("DIV");n.appendChild(s),i(s,t,a.render_options)}};if(this.auto_render)s();else{var o=document.createElement("A");o.className="abcshow",o.href="#",o.innerHTML=this.show_text,o.onclick=function(){return s(),o.remove(),!1},abcdiv.parentElement.insertBefore(o,abcdiv)}}catch(e){this.errors+=e}};var s=!0;"undefined"!=typeof abcjs_plugin_autostart&&(s=abcjs_plugin_autostart),s&&"undefined"!=typeof window&&void 0!==window.document&&("loading"!==window.document.readyState?a.start():document.addEventListener("DOMContentLoaded",(function(){a.start()}))),e.exports=a},function(e,t,n){var r=n(14),i=n(18),a=n(37),s=n(15),o=n(17),c=n(0),l={};function h(){var e=window.innerWidth;for(var t in l)if(l.hasOwnProperty(t)){var n=l[t];e-=2*n.offsetLeft,n.style.width=e+"px"}}try{window.addEventListener("resize",h),window.addEventListener("orientationChange",h)}catch(e){}function u(e,t,n,r){n.viewportHorizontal?(e.innerHTML='<div class="abcjs-inner"></div>',n.scrollHorizontal?(e.style.overflowX="auto",e.style.overflowY="hidden"):e.style.overflow="hidden",l[e.id]=e,e=e.children[0]):n.viewportVertical?(e.innerHTML='<div class="abcjs-inner scroll-amount"></div>',e.style.overflowX="hidden",e.style.overflowY="auto",e=e.children[0]):e.innerHTML="";var i=new a(e,n);(i.engraveABC(t,r),t.engraver=i,n.viewportVertical||n.viewportHorizontal)&&(e.parentNode.style.width=e.style.width)}function d(e,t,n,r){function a(e){var t=new i;return t.formatting=e.formatting,t.media=e.media,t.version=e.version,t.metaText={},t.lines=[],t}for(var s,o=[],l=0;l<t.lines.length;l++){var h=t.lines[l];s||(s=a(t)),0===l&&(s.metaText.tempo=t.metaText.tempo,s.metaText.title=t.metaText.title,s.metaText.header=t.metaText.header,s.metaText.rhythm=t.metaText.rhythm,s.metaText.origin=t.metaText.origin,s.metaText.composer=t.metaText.composer,s.metaText.author=t.metaText.author,s.metaText.partOrder=t.metaText.partOrder),s.lines.push(h),h.staff&&(o.push(s),s=void 0)}if(s)for(var d=o[o.length-1],f=0;f<s.lines.length;f++)d.lines.push(s.lines[f]);(s=o[o.length-1]).metaText.unalignedWords=t.metaText.unalignedWords,s.metaText.book=t.metaText.book,s.metaText.source=t.metaText.source,s.metaText.discography=t.metaText.discography,s.metaText.notes=t.metaText.notes,s.metaText.transcription=t.metaText.transcription,s.metaText.history=t.metaText.history,s.metaText["abc-copyright"]=t.metaText["abc-copyright"],s.metaText["abc-creator"]=t.metaText["abc-creator"],s.metaText["abc-edited-by"]=t.metaText["abc-edited-by"],s.metaText.footer=t.metaText.footer;var p={};for(var m in n)n.hasOwnProperty(m)&&(p[m]=n[m]);var g=p.paddingtop,v=p.paddingbottom;e.innerHTML="";for(var b=0;b<o.length;b++){var y=document.createElement("div");e.appendChild(y),0===b?(p.paddingtop=g,p.paddingbottom=-20):b===o.length-1?(p.paddingtop=10,p.paddingbottom=v):(p.paddingtop=10,p.paddingbottom=-20),b<o.length-1&&(o[b].formatting=c.clone(o[b].formatting),o[b].formatting.stretchlast=!0),u(y,o[b],p,r),0===b?t.engraver=o[b].engraver:t.engraver.staffgroups?o[b].engraver.staffgroups.length>0&&t.engraver.staffgroups.push(o[b].engraver.staffgroups[0]):t.engraver.staffgroups=o[b].engraver.staffgroups}}e.exports=function(e,t,n,i,c){var l,h={};if(n)for(l in n)n.hasOwnProperty(l)&&(h[l]=n[l]);if(i)for(l in i)i.hasOwnProperty(l)&&("listener"===l?i[l].highlight&&(h.clickListener=i[l].highlight):h[l]=i[l]);if(c)for(l in c)c.hasOwnProperty(l)&&(h[l]=c[l]);return r.renderEngine((function(e,t,n,r){var i=!1;return"*"===e&&(i=!0,(e=document.createElement("div")).setAttribute("style","visibility: hidden;"),document.body.appendChild(e)),h.afterParsing&&h.afterParsing(t,n,r),!i&&h.wrap&&h.staffwidth?t=function(e,t,n,r,i){var c=new a(e,i),l=c.getMeasureWidths(t),h=o.calcLineWraps(t,l,r,i,s,c);!i.oneSvgPerLine||h.tune.lines.length<2?u(e,h.tune,h.revisedParams,n):d(e,h.tune,h.revisedParams,n);return h.tune.explanation=h.explanation,h.tune}(e,t,n,r,h):(i||!h.oneSvgPerLine||t.lines.length<2?u(e,t,h,n):d(e,t,h,n),i&&e.parentNode.removeChild(e),null)}),e,t,h)}},function(e,t,n){var r=n(0),i=n(10),a=n(11);e.exports=function(e,t,n,s,o){this.reset=function(e,t,n,r){a.initialize(e,t,n,r,o),i.initialize(e,t,n,r,o)},this.reset(e,t,n,s),this.setTitle=function(t){if(n.hasMainTitle)o.addSubtitle(e.translateString(e.stripComment(t)));else{var r=e.translateString(e.theReverser(e.stripComment(t)));n.titlecaps&&(r=r.toUpperCase()),o.addMetaText("title",r),n.hasMainTitle=!0}},this.setMeter=function(r){if("C"===(r=e.stripComment(r)))return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"common_time"};if("C|"===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"cut_time"};if("o"===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_perfectum"};if("c"===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_imperfectum"};if("o."===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_perfectum_prolatio"};if("c."===r)return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),{type:"tempus_imperfectum_prolatio"};if(0===r.length||"none"===r.toLowerCase())return!0===n.havent_set_length&&(n.default_length=.125,n.havent_set_length=!1),null;var i=e.tokenize(r,0,r.length);try{var a=function(){var e=function(){var e={value:0,num:""},t=i.shift();for("("===t.token&&(t=i.shift());;){if("number"!==t.type)throw"Expected top number of meter";if(e.value+=parseInt(t.token),e.num+=t.token,0===i.length||"/"===i[0].token)return e;if(")"===(t=i.shift()).token){if(0===i.length||"/"===i[0].token)return e;throw"Unexpected paren in meter"}if("."!==t.token&&"+"!==t.token)throw"Expected top number of meter";if(e.num+=t.token,0===i.length)throw"Expected top number of meter";t=i.shift()}return e}();if(0===i.length)return e;var t=i.shift();if("/"!==t.token)throw"Expected slash in meter";if("number"!==(t=i.shift()).type)throw"Expected bottom number of meter";return e.den=t.token,e.value=e.value/parseInt(e.den),e};if(0===i.length)throw"Expected meter definition in M: line";for(var s={type:"specified",value:[]},o=0;;){var c=a();o+=c.value;var l={num:c.num};if(void 0!==c.den&&(l.den=c.den),s.value.push(l),0===i.length)break}return!0===n.havent_set_length&&(n.default_length=o<.75?.0625:.125,n.havent_set_length=!1),s}catch(e){t(e,r,0)}return null},this.calcTempo=function(e){var t=1/4;n.meter&&"specified"===n.meter.type?t=1/parseInt(n.meter.value[0].den):n.origMeter&&"specified"===n.origMeter.type&&(t=1/parseInt(n.origMeter.value[0].den));for(var r=0;r<e.duration;r++)e.duration[r]=t*e.duration[r];return e},this.resolveTempo=function(){n.tempo&&(this.calcTempo(n.tempo),s.metaText.tempo=n.tempo,delete n.tempo)},this.addUserDefinition=function(e,i,a){var s=e.indexOf("=",i);if(-1!==s){var o=r.strip(e.substring(i,s)),c=r.strip(e.substring(s+1));if(1===o.length){-1!=="HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~".indexOf(o)?0!==c.length?(void 0===n.macros&&(n.macros={}),n.macros[o]=c):t("Missing macro definition",e,i):t("Macro definitions must be H-Y, h-w, or tilde",e,i)}else t("Macro definitions can only be one character",e,i)}else t("Need an = in a macro definition",e,i)},this.setDefaultLength=function(e,t,i){var a=r.gsub(e.substring(t,i)," ","").split("/");if(2===a.length){var s=parseInt(a[0]),o=parseInt(a[1]);o>0&&(n.default_length=s/o,n.havent_set_length=!1)}else 1===a.length&&"1"===a[0]&&(n.default_length=1,n.havent_set_length=!1)};var c={larghissimo:20,adagissimo:24,sostenuto:28,grave:32,largo:40,lento:50,larghetto:60,adagio:68,adagietto:74,andante:80,andantino:88,"marcia moderato":84,"andante moderato":100,moderato:112,allegretto:116,"allegro moderato":120,allegro:126,animato:132,agitato:140,veloce:148,"mosso vivo":156,vivace:164,vivacissimo:172,allegrissimo:176,presto:184,prestissimo:210};this.setTempo=function(r,i,a){try{var s=e.tokenize(r,i,a);if(0===s.length)throw"Missing parameter in Q: field";var o={},l=!0,h=s.shift();if("quote"===h.type&&(o.preString=h.token,h=s.shift(),0===s.length))return c[o.preString.toLowerCase()]&&(o.bpm=c[o.preString.toLowerCase()],o.suppressBpm=!0),{type:"immediate",tempo:o};if("alpha"===h.type&&"C"===h.token){if(0===s.length)throw"Missing tempo after C in Q: field";if("punct"===(h=s.shift()).type&&"="===h.token){if(0===s.length)throw"Missing tempo after = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected number after = in Q: field";o.duration=[1],o.bpm=parseInt(h.token)}else{if("number"!==h.type)throw"Expected number or equal after C in Q: field";if(o.duration=[parseInt(h.token)],0===s.length)throw"Missing = after duration in Q: field";if("punct"!==(h=s.shift()).type||"="!==h.token)throw"Expected = after duration in Q: field";if(0===s.length)throw"Missing tempo after = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected number after = in Q: field";o.bpm=parseInt(h.token)}}else{if("number"!==h.type)throw"Unknown value in Q: field";var u=parseInt(h.token);if(0===s.length||"quote"===s[0].type)o.duration=[1],o.bpm=u;else{if(l=!1,"punct"!==(h=s.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";var d=parseInt(h.token);for(o.duration=[u/d];s.length>0&&"="!==s[0].token&&"quote"!==s[0].type;){if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";if(u=parseInt(h.token),"punct"!==(h=s.shift()).type&&"/"!==h.token)throw"Expected fraction in Q: field";if("number"!==(h=s.shift()).type)throw"Expected fraction in Q: field";d=parseInt(h.token),o.duration.push(u/d)}if("punct"!==(h=s.shift()).type&&"="!==h.token)throw"Expected = in Q: field";if("number"!==(h=s.shift()).type)throw"Expected tempo in Q: field";o.bpm=parseInt(h.token)}}if(0!==s.length&&("quote"===(h=s.shift()).type&&(o.postString=h.token,h=s.shift()),0!==s.length))throw"Unexpected string at end of Q: field";return!1===n.printTempo&&(o.suppress=!0),{type:l?"delaySet":"immediate",tempo:o}}catch(e){return t(e,r,i),{type:"none"}}},this.letter_to_inline_header=function(r,c){var l=e.eatWhiteSpace(r,c);if(c+=l,r.length>=c+5&&"["===r.charAt(c)&&":"===r.charAt(c+2)){var h=r.indexOf("]",c),u=n.iChar+c,d=n.iChar+h+1;switch(r.substring(c,c+3)){case"[I:":var f=i.addDirective(r.substring(c+3,h));return f&&t(f,r,c),[h-c+1+l];case"[M:":var p=this.setMeter(r.substring(c+3,h));return o.hasBeginMusic()&&p?o.appendStartingElement("meter",u,d,p):n.meter=p,[h-c+1+l];case"[K:":var m=a.parseKey(r.substring(c+3,h));return m.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",u,d,n.clef),m.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",u,d,a.fixKey(n.clef,n.key)),[h-c+1+l];case"[P:":return s.lines.length<=s.lineNum?n.partForNextLine={title:r.substring(c+3,h),startChar:u,endChar:d}:o.appendElement("part",u,d,{title:r.substring(c+3,h)}),[h-c+1+l];case"[L:":return this.setDefaultLength(r,c+3,h),[h-c+1+l];case"[Q:":if(h>0){var g=this.setTempo(r,c+3,h);return"delaySet"===g.type?o.hasBeginMusic()?o.appendElement("tempo",u,d,this.calcTempo(g.tempo)):n.tempoForNextLine=["tempo",u,d,this.calcTempo(g.tempo)]:"immediate"===g.type&&(o.hasBeginMusic()?o.appendElement("tempo",u,d,g.tempo):n.tempoForNextLine=["tempo",u,d,g.tempo]),[h-c+1+l,r.charAt(c+1),r.substring(c+3,h)]}break;case"[V:":if(h>0)return a.parseVoice(r,c+3,h),[h-c+1+l,r.charAt(c+1),r.substring(c+3,h)]}}return[0]},this.letter_to_body_header=function(e,s){if(e.length>=s+3)switch(e.substring(s,s+2)){case"I:":var c=i.addDirective(e.substring(s+2));return c&&t(c,e,s),[e.length];case"M:":var l=this.setMeter(e.substring(s+2));return o.hasBeginMusic()&&l&&o.appendStartingElement("meter",n.iChar+s,n.iChar+e.length,l),[e.length];case"K:":var h=a.parseKey(e.substring(s+2));return h.foundClef&&o.hasBeginMusic()&&o.appendStartingElement("clef",n.iChar+s,n.iChar+e.length,n.clef),h.foundKey&&o.hasBeginMusic()&&o.appendStartingElement("key",n.iChar+s,n.iChar+e.length,a.fixKey(n.clef,n.key)),[e.length];case"P:":return o.hasBeginMusic()&&o.appendElement("part",n.iChar+s,n.iChar+e.length,{title:e.substring(s+2)}),[e.length];case"L:":return this.setDefaultLength(e,s+2,e.length),[e.length];case"Q:":var u=e.indexOf("",s+2);-1===u&&(u=e.length);var d=this.setTempo(e,s+2,u);return"delaySet"===d.type?o.appendElement("tempo",n.iChar+s,n.iChar+e.length,this.calcTempo(d.tempo)):"immediate"===d.type&&o.appendElement("tempo",n.iChar+s,n.iChar+e.length,d.tempo),[u,e.charAt(s),r.strip(e.substring(s+2))];case"V:":return a.parseVoice(e,s+2,e.length),[e.length,e.charAt(s),r.strip(e.substring(s+2))]}return[0]};var l={A:"author",B:"book",C:"composer",D:"discography",F:"url",G:"group",I:"instruction",N:"notes",O:"origin",R:"rhythm",S:"source",W:"unalignedWords",Z:"transcription"};this.parseHeader=function(c){if(r.startsWith(c,"%%")){var h=i.addDirective(c.substring(2));return h&&t(h,c,2),{}}var u=c.indexOf("%");if(u>=0&&(c=c.substring(0,u)),0===(c=c.replace(/\s+$/,"")).length)return{};if(c.length>=2&&":"===c.charAt(1)){var d="";c.indexOf("")>=0&&"w"!==c.charAt(0)&&(d=c.substring(c.indexOf("")+1),c=c.substring(0,c.indexOf("")));var f=l[c.charAt(0)];if(void 0!==f)return"unalignedWords"===f?o.addMetaTextArray(f,i.parseFontChangeLine(e.translateString(e.stripComment(c.substring(2))))):o.addMetaText(f,e.translateString(e.stripComment(c.substring(2)))),{};var p=n.iChar,m=p+c.length;switch(c.charAt(0)){case"H":o.addMetaText("history",e.translateString(e.stripComment(c.substring(2)))),n.is_in_history=!0;break;case"K":this.resolveTempo();var g=a.parseKey(c.substring(2));!n.is_in_header&&o.hasBeginMusic()&&(g.foundClef&&o.appendStartingElement("clef",p,m,n.clef),g.foundKey&&o.appendStartingElement("key",p,m,a.fixKey(n.clef,n.key))),n.is_in_header=!1;break;case"L":this.setDefaultLength(c,2,c.length);break;case"M":n.origMeter=n.meter=this.setMeter(c.substring(2));break;case"P":n.is_in_header?o.addMetaText("partOrder",e.translateString(e.stripComment(c.substring(2)))):n.partForNextLine={title:e.translateString(e.stripComment(c.substring(2))),startChar:p,endChar:m};break;case"Q":var v=this.setTempo(c,2,c.length);"delaySet"===v.type?n.tempo=v.tempo:"immediate"===v.type&&(s.metaText.tempo=v.tempo);break;case"T":this.setTitle(c.substring(2));break;case"U":this.addUserDefinition(c,2,c.length);break;case"V":if(a.parseVoice(c,2,c.length),!n.is_in_header)return{newline:!0};break;case"s":return{symbols:!0};case"w":return{words:!0};case"X":break;case"E":case"m":t("Ignored header",c,0);break;default:return d.length&&(d=""+d),{regular:!0,str:c+d}}return d.length>0?{recurse:!0,str:d}:{}}return{regular:!0,str:c}}}},function(e,t,n){var r=n(0);e.exports=function(){this.skipWhiteSpace=function(e){for(var t=0;t<e.length;t++)if(!this.isWhiteSpace(e.charAt(t)))return t;return e.length};var e=function(e,t){return t>=e.length};this.eatWhiteSpace=function(e,t){for(var n=t;n<e.length;n++)if(!this.isWhiteSpace(e.charAt(n)))return n-t;return n-t},this.getKeyPitch=function(t){var n=this.skipWhiteSpace(t);if(e(t,n))return{len:0};switch(t.charAt(n)){case"A":return{len:n+1,token:"A"};case"B":return{len:n+1,token:"B"};case"C":return{len:n+1,token:"C"};case"D":return{len:n+1,token:"D"};case"E":return{len:n+1,token:"E"};case"F":return{len:n+1,token:"F"};case"G":return{len:n+1,token:"G"}}return{len:0}},this.getSharpFlat=function(e){if("bass"===e)return{len:0};switch(e.charAt(0)){case"#":return{len:1,token:"#"};case"b":return{len:1,token:"b"}}return{len:0}},this.getMode=function(t){var n=function(e,t){for(;t<e.length&&(e.charAt(t)>="a"&&e.charAt(t)<="z"||e.charAt(t)>="A"&&e.charAt(t)<="Z");)t++;return t},r=this.skipWhiteSpace(t);if(e(t,r))return{len:0};var i=t.substring(r,r+3).toLowerCase();switch((i.length>1&&" "===i.charAt(1)||"^"===i.charAt(1)||"_"===i.charAt(1)||"="===i.charAt(1))&&(i=i.charAt(0)),i){case"mix":return{len:n(t,r),token:"Mix"};case"dor":return{len:n(t,r),token:"Dor"};case"phr":return{len:n(t,r),token:"Phr"};case"lyd":return{len:n(t,r),token:"Lyd"};case"loc":return{len:n(t,r),token:"Loc"};case"aeo":return{len:n(t,r),token:"m"};case"maj":case"ion":return{len:n(t,r),token:""};case"min":case"m":return{len:n(t,r),token:"m"}}return{len:0}},this.getClef=function(t,n){var i=t,a=this.skipWhiteSpace(t);if(e(t,a))return{len:0};var s=!1,o=t.substring(a);if(r.startsWith(o,"clef=")&&(s=!0,o=o.substring(5),a+=5),0===o.length&&s)return{len:a+5,warn:"No clef specified: "+i};var c=this.skipWhiteSpace(o);if(e(o,c))return{len:0};c>0&&(a+=c,o=o.substring(c));var l=null;if(r.startsWith(o,"treble"))l="treble";else if(r.startsWith(o,"bass3"))l="bass3";else if(r.startsWith(o,"bass"))l="bass";else if(r.startsWith(o,"tenor"))l="tenor";else if(r.startsWith(o,"alto2"))l="alto2";else if(r.startsWith(o,"alto1"))l="alto1";else if(r.startsWith(o,"alto"))l="alto";else if(!n&&s&&r.startsWith(o,"none"))l="none";else if(r.startsWith(o,"perc"))l="perc";else if(!n&&s&&r.startsWith(o,"C"))l="tenor";else if(!n&&s&&r.startsWith(o,"F"))l="bass";else{if(n||!s||!r.startsWith(o,"G"))return{len:a+5,warn:"Unknown clef specified: "+i};l="treble"}return o=o.substring(l.length),(c=this.isMatch(o,"+8"))>0?l+="+8":(c=this.isMatch(o,"-8"))>0&&(l+="-8"),{len:a+l.length,token:l,explicit:s}},this.getBarLine=function(e,t){switch(e.charAt(t)){case"]":switch(++t,e.charAt(t)){case"|":return{len:2,token:"bar_thick_thin"};case"[":return++t,e.charAt(t)>="1"&&e.charAt(t)<="9"||'"'===e.charAt(t)?{len:2,token:"bar_invisible"}:{len:1,warn:"Unknown bar symbol"};default:return{len:1,token:"bar_invisible"}}break;case":":switch(++t,e.charAt(t)){case":":return{len:2,token:"bar_dbl_repeat"};case"|":switch(++t,e.charAt(t)){case"]":switch(++t,e.charAt(t)){case"|":return++t,":"===e.charAt(t)?{len:5,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:3,token:"bar_right_repeat"}}break;case"|":return++t,":"===e.charAt(t)?{len:4,token:"bar_dbl_repeat"}:{len:3,token:"bar_right_repeat"};default:return{len:2,token:"bar_right_repeat"}}break;default:return{len:1,warn:"Unknown bar symbol"}}break;case"[":if(++t,"|"!==e.charAt(t))return e.charAt(t)>="1"&&e.charAt(t)<="9"||'"'===e.charAt(t)?{len:1,token:"bar_invisible"}:{len:0};switch(++t,e.charAt(t)){case":":return{len:3,token:"bar_left_repeat"};case"]":return{len:3,token:"bar_invisible"};default:return{len:2,token:"bar_thick_thin"}}break;case"|":switch(++t,e.charAt(t)){case"]":return{len:2,token:"bar_thin_thick"};case"|":return++t,":"===e.charAt(t)?{len:3,token:"bar_left_repeat"}:{len:2,token:"bar_thin_thin"};case":":for(var n=0;":"===e.charAt(t+n);)n++;return{len:1+n,token:"bar_left_repeat"};default:return{len:1,token:"bar_thin"}}}return{len:0}},this.getTokenOf=function(e,t){for(var n=0;n<e.length;n++)if(t.indexOf(e.charAt(n))<0)return{len:n,token:e.substring(0,n)};return{len:n,token:e}},this.getToken=function(e,t,n){for(var r=t;r<n&&!this.isWhiteSpace(e.charAt(r));)r++;return e.substring(t,r)},this.isMatch=function(t,n){var i=this.skipWhiteSpace(t);return e(t,i)?0:r.startsWith(t.substring(i),n)?i+n.length:0},this.getPitchFromTokens=function(e){var t={};if(t.position={A:5,B:6,C:0,D:1,E:2,F:3,G:4,a:12,b:13,c:7,d:8,e:9,f:10,g:11}[e[0].token],void 0===t.position)return{warn:"Pitch expected. Found: "+e[0].token};for(e.shift();e.length;)switch(e[0].token){case",":t.position-=7,e.shift();break;case"'":t.position+=7,e.shift();break;default:return t}return t},this.getKeyAccidentals2=function(e){for(var t;e.length>0;){var n;if("^"===e[0].token){if(n="sharp",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token){case"^":n="dblsharp",e.shift();break;case"/":n="quartersharp",e.shift()}}else if("="===e[0].token)n="natural",e.shift();else{if("_"!==e[0].token)return{accs:t};if(n="flat",e.shift(),0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token){case"_":n="dblflat",e.shift();break;case"/":n="quarterflat",e.shift()}}if(0===e.length)return{accs:t,warn:"Expected note name after "+n};switch(e[0].token.charAt(0)){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":void 0===t&&(t=[]),t.push({acc:n,note:e[0].token.charAt(0)}),1===e[0].token.length?e.shift():e[0].token=e[0].token.substring(1);break;default:return{accs:t,warn:"Expected note name after "+n+" Found: "+e[0].token}}}return{accs:t}},this.getKeyAccidental=function(t){var n={"^":"sharp","^^":"dblsharp","=":"natural",_:"flat",__:"dblflat","_/":"quarterflat","^/":"quartersharp"},r=this.skipWhiteSpace(t);if(e(t,r))return{len:0};var i=null;switch(t.charAt(r)){case"^":case"_":case"=":i=t.charAt(r);break;default:return{len:0}}if(r++,e(t,r))return{len:1,warn:"Expected note name after accidental"};switch(t.charAt(r)){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:r+1,token:{acc:n[i],note:t.charAt(r)}};case"^":case"_":case"/":if(i+=t.charAt(r),r++,e(t,r))return{len:2,warn:"Expected note name after accidental"};switch(t.charAt(r)){case"a":case"b":case"c":case"d":case"e":case"f":case"g":case"A":case"B":case"C":case"D":case"E":case"F":case"G":return{len:r+1,token:{acc:n[i],note:t.charAt(r)}};default:return{len:2,warn:"Expected note name after accidental"}}break;default:return{len:1,warn:"Expected note name after accidental"}}},this.isWhiteSpace=function(e){return" "===e||"\t"===e||""===e},this.getMeat=function(e,t,n){var r=e.indexOf("%",t);for(r>=0&&r<n&&(n=r);t<n&&(" "===e.charAt(t)||"\t"===e.charAt(t)||""===e.charAt(t));)t++;for(;t<n&&(" "===e.charAt(n-1)||"\t"===e.charAt(n-1)||""===e.charAt(n-1));)n--;return{start:t,end:n}};var t=function(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"},n=function(e){return e>="0"&&e<="9"};this.tokenize=function(e,r,i,a){var s=this.getMeat(e,r,i);r=s.start,i=s.end;for(var o,c=[];r<i;){if('"'===e.charAt(r)){for(o=r+1;o<i&&'"'!==e.charAt(o);)o++;c.push({type:"quote",token:e.substring(r+1,o),start:r+1,end:o}),o++}else if(t(e.charAt(r))){if(o=r+1,a)for(;o<i&&!this.isWhiteSpace(e.charAt(o));)o++;else for(;o<i&&t(e.charAt(o));)o++;c.push({type:"alpha",token:e.substring(r,o),continueId:n(e.charAt(o)),start:r,end:o}),r=o+1}else if("."===e.charAt(r)&&n(e.charAt(o+1))){o=r+1;for(var l;o<i&&n(e.charAt(o));)o++;l=parseFloat(e.substring(r,o)),c.push({type:"number",token:e.substring(r,o),intt:null,floatt:l,continueId:t(e.charAt(o)),start:r,end:o}),r=o+1}else if(n(e.charAt(r))||"-"===e.charAt(r)&&n(e.charAt(o+1))){o=r+1;for(var h,u=null;o<i&&n(e.charAt(o));)o++;if("."===e.charAt(o)&&n(e.charAt(o+1)))for(o++;o<i&&n(e.charAt(o));)o++;else u=parseInt(e.substring(r,o));h=parseFloat(e.substring(r,o)),c.push({type:"number",token:e.substring(r,o),intt:u,floatt:h,continueId:t(e.charAt(o)),start:r,end:o}),r=o+1}else" "===e.charAt(r)||"\t"===e.charAt(r)||c.push({type:"punct",token:e.charAt(r),start:r,end:r+1}),o=r+1;r=o}return c},this.getVoiceToken=function(e,t,n){for(var r=t;r<n&&this.isWhiteSpace(e.charAt(r))||"="===e.charAt(r);)r++;if('"'===e.charAt(r)){var i=e.indexOf('"',r+1);return-1===i||i>=n?{len:1,err:"Missing close quote"}:{len:i-t+1,token:this.translateString(e.substring(r+1,i))}}for(var a=r;a<n&&!this.isWhiteSpace(e.charAt(a))&&"="!==e.charAt(a);)a++;return{len:a-t+1,token:e.substring(r,a)}};var i={"`a":"à","'a":"á","^a":"â","~a":"ã",'"a':"ä",oa:"å",aa:"å","=a":"ā",ua:"ă",";a":"ą","`e":"è","'e":"é","^e":"ê",'"e':"ë","=e":"ē",ue:"ĕ",";e":"ę",".e":"ė","`i":"ì","'i":"í","^i":"î",'"i':"ï","=i":"ī",ui:"ĭ",";i":"į","`o":"ò","'o":"ó","^o":"ô","~o":"õ",'"o':"ö","=o":"ō",uo:"ŏ","/o":"ø","`u":"ù","'u":"ú","^u":"û","~u":"ũ",'"u':"ü",ou:"ů","=u":"ū",uu:"ŭ",";u":"ų","`A":"À","'A":"Á","^A":"Â","~A":"Ã",'"A':"Ä",oA:"Å",AA:"Å","=A":"Ā",uA:"Ă",";A":"Ą","`E":"È","'E":"É","^E":"Ê",'"E':"Ë","=E":"Ē",uE:"Ĕ",";E":"Ę",".E":"Ė","`I":"Ì","'I":"Í","^I":"Î","~I":"Ĩ",'"I':"Ï","=I":"Ī",uI:"Ĭ",";I":"Į",".I":"İ","`O":"Ò","'O":"Ó","^O":"Ô","~O":"Õ",'"O':"Ö","=O":"Ō",uO:"Ŏ","/O":"Ø","`U":"Ù","'U":"Ú","^U":"Û","~U":"Ũ",'"U':"Ü",oU:"Ů","=U":"Ū",uU:"Ŭ",";U":"Ų",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",ss:"ß","'c":"ć","^c":"ĉ",uc:"č",cc:"ç",".c":"ċ",cC:"Ç","'C":"Ć","^C":"Ĉ",uC:"Č",".C":"Ċ","~N":"Ñ","~n":"ñ","=s":"š",vs:"š",DH:"Ð",dh:"ð",HO:"Ő",Ho:"ő",HU:"Ű",Hu:"ű","'Y":"Ý","'y":"ý","^Y":"Ŷ","^y":"ŷ",'"Y':"Ÿ",'"y':"ÿ",vS:"Š",vZ:"Ž",vz:"ž"},a={"#":"♯",b:"♭","=":"♮"},s={201:"♯",202:"♭",203:"♮",241:"¡",242:"¢",252:"a",262:"2",272:"o",302:"Â",312:"Ê",322:"Ò",332:"Ú",342:"â",352:"ê",362:"ò",372:"ú",243:"£",253:"«",263:"3",273:"»",303:"Ã",313:"Ë",323:"Ó",333:"Û",343:"ã",353:"ë",363:"ó",373:"û",244:"¤",254:"¬",264:" ́",274:"1⁄4",304:"Ä",314:"Ì",324:"Ô",334:"Ü",344:"ä",354:"ì",364:"ô",374:"ü",245:"¥",255:"-",265:"μ",275:"1⁄2",305:"Å",315:"Í",325:"Õ",335:"Ý",345:"å",355:"í",365:"õ",375:"ý",246:"¦",256:"®",266:"¶",276:"3⁄4",306:"Æ",316:"Î",326:"Ö",336:"Þ",346:"æ",356:"î",366:"ö",376:"þ",247:"§",257:" ̄",267:"·",277:"¿",307:"Ç",317:"Ï",327:"×",337:"ß",347:"ç",357:"ï",367:"÷",377:"ÿ",250:" ̈",260:"°",270:" ̧",300:"À",310:"È",320:"Ð",330:"Ø",340:"à",350:"è",360:"ð",370:"ø",251:"©",261:"±",271:"1",301:"Á",311:"É",321:"Ñ",331:"Ù",341:"á",351:"é",361:"ñ",371:"ù"};this.translateString=function(e){var t=e.split("\\");if(1===t.length)return e;var n=null;return r.each(t,(function(e){if(null===n)n=e;else{var t=i[e.substring(0,2)];void 0!==t?n+=t+e.substring(2):void 0!==(t=s[e.substring(0,3)])?n+=t+e.substring(3):(t=a[e.substring(0,1)],n+=void 0!==t?t+e.substring(1):"\\"+e)}})),n},this.getNumber=function(e,t){for(var n=0;t<e.length;)switch(e.charAt(t)){case"0":n*=10,t++;break;case"1":n=10*n+1,t++;break;case"2":n=10*n+2,t++;break;case"3":n=10*n+3,t++;break;case"4":n=10*n+4,t++;break;case"5":n=10*n+5,t++;break;case"6":n=10*n+6,t++;break;case"7":n=10*n+7,t++;break;case"8":n=10*n+8,t++;break;case"9":n=10*n+9,t++;break;default:return{num:n,index:t}}return{num:n,index:t}},this.getFraction=function(e,t){var n=1,r=1;if("/"!==e.charAt(t)){var i=this.getNumber(e,t);n=i.num,t=i.index}if("/"===e.charAt(t)){if(t++,"/"===e.charAt(t)){for(var a=.5;"/"===e.charAt(t++);)a/=2;return{value:n*a,index:t-1}}var s=t,o=this.getNumber(e,t);0===o.num&&s===t&&(o.num=2),0!==o.num&&(r=o.num),t=o.index}return{value:n/r,index:t}},this.theReverser=function(e){return r.endsWith(e,", The")?"The "+e.substring(0,e.length-5):r.endsWith(e,", A")?"A "+e.substring(0,e.length-3):e},this.stripComment=function(e){var t=e.indexOf("%");return t>=0?r.strip(e.substring(0,t)):r.strip(e)},this.getInt=function(e){var t=parseInt(e);if(isNaN(t))return{digits:0};var n=""+t;return{value:t,digits:e.indexOf(n)+n.length}},this.getFloat=function(e){var t=parseFloat(e);if(isNaN(t))return{digits:0};var n=""+t;return{value:t,digits:e.indexOf(n)+n.length}},this.getMeasurement=function(e){if(0===e.length)return{used:0};var t=1,n="";if("-"===e[0].token)e.shift(),n="-",t++;else if("number"!==e[0].type)return{used:0};if(n+=e.shift().token,0===e.length)return{used:1,value:parseInt(n)};var r=e.shift();if("."===r.token){if(t++,0===e.length)return{used:t,value:parseInt(n)};if("number"===e[0].type&&(n=n+"."+(r=e.shift()).token,t++,0===e.length))return{used:t,value:parseFloat(n)};r=e.shift()}switch(r.token){case"pt":return{used:t+1,value:parseFloat(n)};case"cm":return{used:t+1,value:parseFloat(n)/2.54*72};case"in":return{used:t+1,value:72*parseFloat(n)};default:return e.unshift(r),{used:t,value:parseFloat(n)}}return{used:0}};var o=function(e){for(;-1!==e.indexOf("\\n");)e=e.replace("\\n","\n");return e};this.getBrackettedSubstring=function(e,t,n,r){for(var i=r||e.charAt(t),a=t+1;a<e.length&&e.charAt(a)!==i;)++a;return e.charAt(a)===i?[a-t+1,o(e.substring(t+1,a)),!0]:((a=t+n)>e.length-1&&(a=e.length-1),[a-t+1,o(e.substring(t+1,a)),!1])}}},function(e,t,n){var r,i=n(0);!function(){"use strict";var e;function t(e,t,n){for(var r=0,i=t+1;i<e.length;i++)if("note"===e[i].el_type&&r++,e[i].decoration&&e[i].decoration.indexOf(n)>=0)return r;return r}function n(e,t,n){for(var r=Math.min(e.length,t+3),i=t;i<r;i++)if("note"===e[i].el_type&&e[i].decoration)for(var a=0;a<e[i].decoration.length;a++)if(n.indexOf(e[i].decoration[a])>=0)return e[i].decoration[a];return null}function a(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=n.length-1;r>=0&&"bar"!==n[r].el_type;)n[r].noChordVoice=!0,r--}function s(e,t){if(e&&!(e.length<=t)&&e[t].title)return e[t].title.join(" ")}function o(e,t){var n=1/4;e.duration&&(n=e.duration[0]);var r=60;return e.bpm&&(r=e.bpm),n*r/t}function c(t){var n;switch(t.type){case"common_time":n={el_type:"meter",num:4,den:4};break;case"cut_time":n={el_type:"meter",num:2,den:2};break;case"specified":n={el_type:"meter",num:t.value[0].num,den:t.value[0].den};break;default:n={el_type:"meter"}}return e=n.num/n.den,n}r=function(r,l){var h,u=(l=l||{}).program||0,d=l.midiTranspose||0;r.visualTranspose&&(d-=r.visualTranspose);var f=l.channel||0,p=!1,m=l.drum||"",g=l.drumBars||1,v=l.drumIntro||0,b=""!==m,y=[];u=parseInt(u,10),d=parseInt(d,10),10===(f=parseInt(f,10))&&(u=128),m=m.split(" "),g=parseInt(g,10),v=parseInt(v,10);var w=r.formatting.bagpipes;w&&(u=71);var x=[];if(r.formatting.midi){var k=r.formatting.midi;k.program&&k.program.length>0&&(u=k.program[0],k.program.length>1&&(u=k.program[1],f=k.program[0]),p=!0),k.transpose&&(d=k.transpose[0]),k.channel&&(f=k.channel[0],p=!0),k.drum&&(m=k.drum),k.drumbars&&(g=k.drumbars[0]),k.drumon&&(b=!0),10===f&&(u=128),k.beat&&x.push({el_type:"beat",beats:k.beat}),k.nobeataccents&&x.push({el_type:"beataccents",value:!1})}h=l.qpm?parseInt(l.qpm,10):r.metaText.tempo?o(r.metaText.tempo,r.getBeatLength()):l.defaultQpm?l.defaultQpm:180;var A=[];w&&A.push({el_type:"bagpipes"}),A.push({el_type:"instrument",program:u}),f&&A.push({el_type:"channel",channel:f}),d&&A.push({el_type:"transpose",transpose:d}),A.push({el_type:"tempo",qpm:h});for(var T=0;T<x.length;T++)A.push(x[T]);for(var S,M=[],N=[],C=[],E=[0],I={},_=[],B=[],P=!1,D=0;D<r.lines.length;D++){var L=r.lines[D];if(L.staff)for(var O=function(e){var r,i={pppp:[15,10,5,1],ppp:[30,20,10,1],pp:[45,35,20,1],p:[60,50,35,1],mp:[75,65,50,1],mf:[90,80,65,1],f:[105,95,80,1],ff:[120,110,95,1],fff:[127,125,110,1],ffff:[127,125,110,1]};if(e.decoration)if(e.decoration.indexOf("pppp")>=0?r="pppp":e.decoration.indexOf("ppp")>=0?r="ppp":e.decoration.indexOf("pp")>=0?r="pp":e.decoration.indexOf("p")>=0?r="p":e.decoration.indexOf("mp")>=0?r="mp":e.decoration.indexOf("mf")>=0?r="mf":e.decoration.indexOf("f")>=0?r="f":e.decoration.indexOf("ff")>=0?r="ff":e.decoration.indexOf("fff")>=0?r="fff":e.decoration.indexOf("ffff")>=0&&(r="ffff"),r&&(S=i[r].slice(0),M[V].push({el_type:"beat",beats:S.slice(0)}),N[j]=!1,C[j]=!1),e.decoration.indexOf("crescendo(")>=0){var a=t(q,K,"crescendo)"),s=Math.min(127,S[0]+50),o=n(q,K+a+1,Object.keys(i));o&&(s=i[o][0]),N[j]=a>0&&Math.floor((s-S[0])/a),C[j]=!1}else if(e.decoration.indexOf("crescendo)")>=0)N[j]=!1;else if(e.decoration.indexOf("diminuendo(")>=0){var c=t(q,K,"diminuendo)"),l=Math.max(15,S[0]-50),h=n(q,K+c+1,Object.keys(i));h&&(l=i[h][0]),N[j]=!1,C[j]=c>0&&Math.floor((l-S[0])/c)}else e.decoration.indexOf("diminuendo)")>=0&&(C[j]=!1)},H=L.staff,V=0,F=0;F<H.length;F++)for(var z=H[F],j=0;j<z.voices.length;j++){var q=z.voices[j];if(!M[V]){M[V]=[].concat(JSON.parse(JSON.stringify(A)));var Y=s(L.staff,V);Y&&M[V].unshift({el_type:"name",trackName:Y})}if(d&&"perc"===z.clef.type&&M[V].push({el_type:"transpose",transpose:0}),z.clef&&"perc"===z.clef.type&&!p)for(var W=0;W<M[V].length;W++)"instrument"===M[V][W].el_type&&(M[V][W].program=128);else z.key&&("HP"===z.key.root?M[V].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):M[V].push({el_type:"key",accidentals:z.key.accidentals}));z.meter&&M[V].push(c(z.meter)),!P&&b&&(M[V].push({el_type:"drum",params:{pattern:m,bars:g,on:b,intro:v}}),P=!0),z.clef&&"perc"!==z.clef.type&&z.clef.transpose&&(z.clef.el_type="clef",M[V].push({el_type:"transpose",transpose:z.clef.transpose})),z.clef&&z.clef.type&&(z.clef.type.indexOf("-8")>=0?M[V].push({el_type:"transpose",transpose:-12}):z.clef.type.indexOf("+8")>=0&&M[V].push({el_type:"transpose",transpose:12})),r.formatting.midi&&r.formatting.midi.drumoff&&(M[V].push({el_type:"bar"}),M[V].push({el_type:"drum",params:{pattern:"",on:!1}}));var R=0,G=0,U=0,X=0;S=[105,95,85,1];for(var K=0;K<q.length;K++){var Z=q[K];switch(Z.el_type){case"note":if(N[j]&&(S[0]+=N[j],S[1]+=N[j],S[2]+=N[j],M[V].push({el_type:"beat",beats:S.slice(0)})),C[j]&&(S[0]+=C[j],S[1]+=C[j],S[2]+=C[j],M[V].push({el_type:"beat",beats:S.slice(0)})),O(Z),!Z.rest||"spacer"!==Z.rest.type){var Q={elem:Z,el_type:"note",timing:E[V]};Z.style?Q.style=Z.style:y[V]&&(Q.style=y[V]),Q.duration=0===Z.duration?.25:Z.duration,Z.startTriplet?(G=Z.tripletMultiplier,U=Z.startTriplet*G*Z.duration,Q.duration=Q.duration*G,Q.duration=Math.round(1e6*Q.duration)/1e6,X=Q.duration):G&&(Z.endTriplet?(G=0,Q.duration=Math.round(1e6*(U-X))/1e6):(Q.duration=Q.duration*G,Q.duration=Math.round(1e6*Q.duration)/1e6,X+=Q.duration)),Z.rest&&(Q.rest=Z.rest),Z.decoration&&(Q.decoration=Z.decoration.slice(0)),Z.pitches&&(Q.pitches=i.cloneArray(Z.pitches)),Z.gracenotes&&(Q.gracenotes=i.cloneArray(Z.gracenotes)),Z.chord&&(Q.chord=i.cloneArray(Z.chord)),M[V].push(Q),"rhythm"===Z.style&&(!0,a(M)),R++,E[V]+=Q.duration}break;case"key":"HP"===Z.root?M[V].push({el_type:"key",accidentals:[{acc:"natural",note:"g"},{acc:"sharp",note:"f"},{acc:"sharp",note:"c"}]}):M[V].push({el_type:"key",accidentals:Z.accidentals});break;case"meter":M[V].push(c(Z));break;case"clef":Z.transpose&&M[V].push({el_type:"transpose",transpose:Z.transpose}),Z.type&&(Z.type.indexOf("-8")>=0?M[V].push({el_type:"transpose",transpose:-12}):Z.type.indexOf("+8")>=0&&M[V].push({el_type:"transpose",transpose:12}));break;case"tempo":h=o(Z,r.getBeatLength()),M[V].push({el_type:"tempo",qpm:h,timing:E[V]}),I[""+E[V]]={el_type:"tempo",qpm:h,timing:E[V]};break;case"bar":R>0&&M[V].push({el_type:"bar"}),O(Z),R=0;var J="bar_right_repeat"===Z.type||"bar_dbl_repeat"===Z.type,$="1"===Z.startEnding,ee="bar_left_repeat"===Z.type||"bar_dbl_repeat"===Z.type||"bar_right_repeat"===Z.type;if(J){var te=_[V];te||(te=0);var ne=B[V];ne||(ne=M[V].length);for(var re=te;re<ne;re++){var ie=i.clone(M[V][re]);ie.pitches&&(ie.pitches=i.cloneArray(ie.pitches)),M[V].push(ie)}B[V]=void 0,_[V]=void 0}$&&(B[V]=M[V].length),ee&&(_[V]=M[V].length),!1;break;case"style":y[V]=Z.head;break;case"timeSignature":M[V].push(c(Z));break;case"part":break;case"stem":case"scale":break;case"midi":var ae=!1;switch(Z.cmd){case"drumon":b=!0,ae=!0;break;case"drumoff":b=!1,ae=!0;break;case"drum":m=Z.params,ae=!0;break;case"drumbars":g=Z.params[0],ae=!0;break;case"drummap":break;case"channel":10===Z.params[0]&&M[V].push({el_type:"instrument",program:128});break;case"program":M[V].push({el_type:"instrument",program:Z.params[0]}),p=!0;break;case"transpose":M[V].push({el_type:"transpose",transpose:Z.params[0]});break;case"gchordoff":M[V].push({el_type:"gchord",tacet:!0});break;case"gchordon":M[V].push({el_type:"gchord",tacet:!1});break;case"beat":M[V].push({el_type:"beat",beats:Z.params});break;case"nobeataccents":M[V].push({el_type:"beataccents",value:!1});break;case"beataccents":M[V].push({el_type:"beataccents",value:!0});break;case"vol":M[V].push({el_type:"vol",volume:Z.params[0]});break;case"volinc":M[V].push({el_type:"volinc",volume:Z.params[0]});break;default:console.log("MIDI seq: midi cmd not handled: ",Z.cmd,Z)}ae&&(M[0].push({el_type:"drum",params:{pattern:m,bars:g,intro:v,on:b}}),P=!0);break;default:console.log("MIDI: element type "+Z.el_type+" not handled.")}}E[++V]||(E[V]=0)}}if(function(e,t){for(var n=Object.keys(t),r=0;r<e.length;r++)for(var i=e[r],a=0;a<i.length;a++){var s=i[a];n.indexOf(""+s.timing)>=0&&("tempo"===s.el_type?(s.qpm=t[""+s.timing].qpm,a++):(e[r].splice(a,0,{el_type:"tempo",qpm:t[""+s.timing].qpm,timing:s.timing}),a+=2))}}(M,I),v)for(var se=r.getPickupLength(),oe=0;oe<M.length;oe++){for(var ce=0;"note"!==M[oe][ce].el_type&&M[oe].length>ce;)ce++;if(M[oe].length>ce)for(var le=0;le<v;le++)0===se||le<v-1?M[oe].splice(ce,0,{el_type:"note",rest:{type:"rest"},duration:e},{el_type:"bar"}):M[oe].splice(ce,0,{el_type:"note",rest:{type:"rest"},duration:e-se})}return M.length>0&&M[0].length>0&&(M[0][0].pickupLength=r.getPickupLength()),M}}(),e.exports=r},function(e,t,n){var r,i=n(0);!function(){"use strict";var e,t,n,a,s,o,c,l,h,u,d,f,p,m,g,v,b,y,w,x,k,A,T=1,S={num:4,den:4},M=64,N=48,C=!1,E=!1,I=!0,_=105,B=95,P=85,D=.25,L=0,O={},H=0;function V(e){for(var t=h.length-1;t>=0;t--)if("program"===h[t].cmd)return void(h[t].channel=e)}function F(e){return e/1e6}function z(e){return Math.round(e*T*1e6)/1e6}function j(e){switch(parseInt(e.den,10)){case 2:return.5;case 4:return.25;case 8:return.375;case 16:return.125}return.25}r=function(r,i){i||(i={}),e=[],t=[0,0,0,0,0,0,0],!1,a=[],s=void 0,o=void 0,T=1,c=void 0,l=void 0,h=void 0,u=void 0,d=0,S={num:4,den:4},f=[],p=!1,g=r.length,m=!1,v=[],M=64,N=48,b=void 0,y=void 0,C=!!i.chordsOff,E=!1,I=!0,_=105,B=95,P=85,D=.25,x=void 0,k=void 0,L=0,A=[],!1,O={},r.length>0&&r[0].length>0&&(H=r[0][0].pickupLength),function(e){for(var t=0;t<e.length;t++){for(var n=e[t],r={},i=0,a=0,s=1,o=0;o<n.length;o++){var c=n[o];if("tempo"!==c.el_type){c.time=a;var l=c.duration?c.duration:0;if(a+=Math.round(l*s*1e6),c.pitches){for(var h=0;h<c.pitches.length;h++){var u=c.pitches[h];if(u)if(u.duration=c.duration,u.startTie)void 0===r[u.pitch]?r[u.pitch]={el:o,pitch:h}:(n[r[u.pitch].el].pitches[r[u.pitch].pitch].duration+=u.duration,c.pitches[h]=null);else if(u.endTie){var d=r[u.pitch];if(d){var f=u.duration;delete n[d.el].pitches[d.pitch].startTie,n[d.el].pitches[d.pitch].duration+=f,c.pitches[h]=null,delete r[u.pitch]}else delete u.endTie}}delete c.duration}}else i?s=c.qpm?i/c.qpm:1:i=c.qpm}for(var p in r)if(r.hasOwnProperty(p)){var m=r[p];delete n[m.el].pitches[m.pitch].startTie}}}(r);for(var z=0;z<r.length;z++){n=0,-1;var q=r[z];h=[{cmd:"program",channel:z,instrument:c}],u=void 0,w=0;var Y=!1;(!0===i.voicesOff||i.voicesOff&&i.voicesOff.length&&i.voicesOff.indexOf(z)>=0)&&(Y=!0);for(var W=0;W<q.length;W++){var R=q[W];switch(R.el_type){case"name":u={cmd:"text",type:"name",text:R.trackName};break;case"note":G(R,Y)&&(p=z);break;case"key":t=K(R);break;case"meter":o||(o=R),D=j(S=R);break;case"tempo":s?T=R.qpm?s/R.qpm:1:s=R.qpm;break;case"transpose":n=R.transpose;break;case"bar":f.length>0&&(!1===p||z===p)&&(re(w,F(R.time)),v=[]),e=[],0===z&&ae(r.length+1),E=!1,y=b,w=F(R.time);break;case"bagpipes":!0;break;case"instrument":if(void 0===c&&(c=R.program),l=R.program,h.length>0&&"program"===h[h.length-1].cmd)h[h.length-1].instrument=R.program;else{var U;for(U=h.length-1;U>=0&&"program"!==h[U].cmd;U--);(U<0||h[U].instrument!==R.program)&&h.push({cmd:"program",channel:0,instrument:R.program})}break;case"channel":V(R.channel);break;case"drum":O=ie(R.params);break;case"gchord":i.chordsOff||(C=R.tacet);break;case"beat":_=R.beats[0],B=R.beats[1],P=R.beats[2];break;case"vol":x=R.volume;break;case"volinc":k=R.volume;break;case"beataccents":I=R.value;break;default:console.log("MIDI creation. Unknown el_type: "+R.el_type+"\n")}}void 0===h[0].instrument&&(h[0].instrument=c||0),u&&h.unshift(u),a.push(h),f.length>0&&(m=!0),A.length>0&&!0}return f.length>0&&a.push(f),A.length>0&&a.push(A),{tempo:s,instrument:c,tracks:a,totalDuration:d}};var q=["break","(break)","no chord","n.c.","tacet"];function Y(e,t,n){return(n-e)/t}function W(e){var t=!1,r=function(e){if(C)return"break";if(m||!e.chord||0===e.chord.length)return null;for(var t=0;t<e.chord.length;t++){var n=e.chord[t];if("default"===n.position)return n.name;if(q.indexOf(n.name.toLowerCase())>=0)return"break"}return null}(e);if(r){var i=function(e){if(0===e.length)return;if("break"===e)return{chick:[]};var t=e.substring(0,1);if("("===t){if(0===(e=e.substring(1,e.length-2)).length)return;t=e.substring(0,1)}var r=Q[t];if(!r)return;var i=n;for(;i<-8;)i+=12;for(;i>8;)i-=12;var a,s=(r+=i)-5;1===e.length&&(a=$(r,""));var o=e.substring(1),c=o.substring(0,1);"b"===c||"♭"===c?(r--,s--,o=o.substring(1)):"#"!==c&&"♯"!==c||(r++,s++,o=o.substring(1));var l=o.split("/");if((a=$(r,l[0])).length>=3){var h=a[2]-a[0];s=s+h-7}if(2===l.length){if(Q[l[1].substring(0,1)]){var u={"#":1,"♯":1,b:-1,"♭":-1}[l[1].substring(1)]||0;r=Q[l[1].substring(0,1)]+u+i,s=r}}return{boom:r,boom2:s,chick:a}}(r);if(i){0===f.length&&(t=!0,f.push({cmd:"program",channel:g,instrument:0})),b=i;var a=Y(w,j(S),F(e.time));v.push({chord:b,beat:a,start:F(e.time)})}}return t}function R(e,t){var n=t.start,r=t.duration,i=z(1/32);switch(e){case"trill":for(var a=1;r>0;)h.push({cmd:"note",pitch:t.pitch+a,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),a=1===a?0:1,r-=i,n+=i;break;case"mordent":h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,h.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:r,gap:0,instrument:l});break;case"lowermordent":h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,h.push({cmd:"note",pitch:t.pitch-1,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=i,n+=i,h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:r,gap:0,instrument:l});break;case"turn":i=t.duration/5,h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),h.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:n+i,duration:i,gap:0,instrument:l,style:"decoration"}),h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n+2*i,duration:i,gap:0,instrument:l,style:"decoration"}),h.push({cmd:"note",pitch:t.pitch+1,volume:t.volume,start:n+3*i,duration:i,gap:0,instrument:l,style:"decoration"}),h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n+4*i,duration:i,gap:0,instrument:l});break;case"roll":for(;r>0;)h.push({cmd:"note",pitch:t.pitch,volume:t.volume,start:n,duration:i,gap:0,instrument:l,style:"decoration"}),r-=2*i,n+=2*i}}function G(e,t){h.length;var n,r=function(e,t){if(t)return 0;var n;if(x)n=x,x=void 0;else if(I)if(H>e)n=P;else{S.num,S.den;var r=Y(w,j(S),e);n=0===r?_:parseInt(r,10)===r?B:P}else n=B;return k&&(n+=k,k=void 0),n<0&&(n=0),n>127&&(n=127),t?0:n}(F(e.time),t),a=W(e);if(e.gracenotes&&e.pitches&&e.pitches.length>0&&e.pitches[0]&&(n=function(e,t){for(var n,r=0,i=[],a=0;a<e.length;a++)n=e[a],r+=n.duration;var s=t/2/r;for(a=0;a<e.length;a++){var o=X(n=e[a]);i.push({pitch:o,duration:n.duration*s})}return i}(e.gracenotes,e.pitches[0].duration),e.elem&&(e.elem.midiGraceNotePitches=function(e,t,n,r){var i=[];n=Math.round(n);for(var a=0;a<e.length;a++){var s=e[a];h.push({cmd:"note",pitch:s.pitch,volume:n,start:t,duration:s.duration,gap:0,instrument:r,style:"grace"}),i.push({pitch:s.pitch,durationInMeasures:s.duration,volume:n,instrument:r}),t+=s.duration}return i}(n,F(e.time),2*r/3,l))),e.elem){var o=F(e.time)/D/s*60*1e3;void 0===e.elem.currentTrackMilliseconds?e.elem.currentTrackMilliseconds=o:void 0===e.elem.currentTrackMilliseconds.length?e.elem.currentTrackMilliseconds=[e.elem.currentTrackMilliseconds,o]:e.elem.currentTrackMilliseconds.push(o)}if(e.pitches){var c="",u=function(e,t){var n={};if(e.decoration)for(var r=0;r<e.decoration.length;r++)"staccato"===e.decoration[r]?n.thisBreakBetweenNotes="staccato":"tenuto"===e.decoration[r]?n.thisBreakBetweenNotes="tenuto":"accent"===e.decoration[r]?n.velocity=Math.min(127,1.5*t):"trill"===e.decoration[r]?n.noteModification="trill":"lowermordent"===e.decoration[r]?n.noteModification="lowermordent":"uppermordent"===e.decoration[r]||"mordent"===e.decoration[r]?n.noteModification="mordent":"turn"===e.decoration[r]?n.noteModification="turn":"roll"===e.decoration[r]&&(n.noteModification="roll");return n}(e,r);u.thisBreakBetweenNotes&&(c=u.thisBreakBetweenNotes),u.velocity&&(r=u.velocity);var f=e.pitches;if("rhythm"===e.style&&(E=!0,b&&b.chick)){f=[];for(var p=0;p<b.chick.length;p++){var m=i.clone(e.pitches[0]);m.actualPitch=b.chick[p],f.push(m)}}e.elem&&(e.elem.midiPitches=[]);for(var g=0;g<f.length;g++){var v=f[g];if(v){v.startSlur&&(L+=v.startSlur.length),v.endSlur&&(L-=v.endSlur.length);var y={cmd:"note",pitch:v.actualPitch?v.actualPitch:X(v),volume:r,start:F(e.time),duration:z(v.duration),instrument:l};if(e.gracenotes&&(y.duration=y.duration/2,y.start=y.start+y.duration),e.elem&&e.elem.midiPitches.push(y),u.noteModification)R(u.noteModification,y);else{switch(L>0?y.endType="tenuto":c&&(y.endType=c),y.endType){case"tenuto":y.gap=-.001;break;case"staccato":var A=.4*y.duration;y.gap=s/60*A;break;default:y.gap=0}h.push(y)}}}h.length-1}var T=function(e){return e.pitches&&e.pitches.length>0&&e.pitches[0]?e.pitches[0].duration:e.elem?e.elem.duration:e.duration}(e);return d=Math.max(d,F(e.time)+z(T)),a}var U=[0,2,4,5,7,9,11];function X(r){if(void 0!==r.midipitch)return r.midipitch;var i=r.soundPitch||0===r.soundPitch?r.soundPitch:r.pitch;if(r.accidental)switch(r.accidental){case"sharp":e[i]=1;break;case"flat":e[i]=-1;break;case"natural":e[i]=0;break;case"dblsharp":e[i]=2;break;case"dblflat":e[i]=-2}var a=12*function(e){return Math.floor(e/7)}(i)+U[Z(i)]+60;if(void 0!==e[i]){var s=t[Z(i)],o=e[i],c=0;-1===s?c=o+1:0===s?c=o:1===s&&(c=o-1),a+=s+c}else a+=t[Z(i)];return a+=n}function K(e){var t=[0,0,0,0,0,0,0];if(!e.accidentals)return t;for(var n=0;n<e.accidentals.length;n++){var r=e.accidentals[n],i="sharp"===r.acc?1:"natural"===r.acc?0:-1;t[Z(r.note.toLowerCase().charCodeAt(0)-"c".charCodeAt(0))]+=i}return t}function Z(e){return(e%=7)<0&&(e+=7),e}var Q={A:33,B:35,C:36,D:38,E:40,F:41,G:43};var J={dim:[0,3,6],"°":[0,3,6],"˚":[0,3,6],dim7:[0,3,6,9],"°7":[0,3,6,9],"˚7":[0,3,6,9],"ø7":[0,3,6,10],"m7(b5)":[0,3,6,10],m7b5:[0,3,6,10],"m7♭5":[0,3,6,10],"-7(b5)":[0,3,6,10],"-7b5":[0,3,6,10],"7b5":[0,4,6,10],"7(b5)":[0,4,6,10],"7♭5":[0,4,6,10],"7(b9,b5)":[0,4,6,10,13],"7b9,b5":[0,4,6,10,13],"7(#9,b5)":[0,4,6,10,15],"7#9b5":[0,4,6,10,15],"maj7(b5)":[0,4,6,11],maj7b5:[0,4,6,11],"13(b5)":[0,4,6,10,14,21],"13b5":[0,4,6,10,14,21],m:[0,3,7],"-":[0,3,7],m6:[0,3,7,9],"-6":[0,3,7,9],m7:[0,3,7,10],"-7":[0,3,7,10],"-(b6)":[0,3,7,8],"-b6":[0,3,7,8],"-6/9":[0,3,7,9,14],"-7(b9)":[0,3,7,10,13],"-7b9":[0,3,7,10,13],"-maj7":[0,3,7,11],"-9+7":[0,3,7,11,13],"-11":[0,3,7,11,14,17],m11:[0,3,7,11,14,17],"-maj9":[0,3,7,11,14],"-∆9":[0,3,7,11,14],mM9:[0,3,7,11,14],M:[0,4,7],6:[0,4,7,9],"6/9":[0,4,7,9,14],"6add9":[0,4,7,9,14],69:[0,4,7,9,14],7:[0,4,7,10],9:[0,4,7,10,14],11:[0,7,10,14,17],13:[0,4,7,10,14,21],"7b9":[0,4,7,10,13],"7♭9":[0,4,7,10,13],"7(b9)":[0,4,7,10,13],"7(#9)":[0,4,7,10,15],"7#9":[0,4,7,10,15],"(13)":[0,4,7,10,14,21],"7(9,13)":[0,4,7,10,14,21],"7(#9,b13)":[0,4,7,10,15,20],"7(#11)":[0,4,7,10,14,18],"7#11":[0,4,7,10,14,18],"7(b13)":[0,4,7,10,20],"7b13":[0,4,7,10,20],"9(#11)":[0,4,7,10,14,18],"9#11":[0,4,7,10,14,18],"13(#11)":[0,4,7,10,18,21],"13#11":[0,4,7,10,18,21],maj7:[0,4,7,11],"∆7":[0,4,7,11],"Δ7":[0,4,7,11],maj9:[0,4,7,11,14],"maj7(9)":[0,4,7,11,14],"maj7(11)":[0,4,7,11,17],"maj7(#11)":[0,4,7,11,18],"maj7(13)":[0,4,7,14,21],"maj7(9,13)":[0,4,7,11,14,21],"7sus4":[0,5,7,10],m7sus4:[0,3,7,10,17],sus4:[0,5,7],sus2:[0,2,7],"7sus2":[0,2,7,10],"9sus4":[0,5,7,10,14],"13sus4":[0,5,7,10,14,21],aug7:[0,4,8,10],"+7":[0,4,8,10],"+":[0,4,8],"7#5":[0,4,8,10],"7♯5":[0,4,8,10],"7+5":[0,4,8,10],"9#5":[0,4,8,10,14],"9♯5":[0,4,8,10,14],"9+5":[0,4,8,10,14],"-7(#5)":[0,3,8,10],"-7#5":[0,3,8,10],"7(#5)":[0,4,8,10],"7(b9,#5)":[0,4,8,10,13],"7b9#5":[0,4,8,10,13],"maj7(#5)":[0,4,8,11],"maj7#5":[0,4,8,11],"maj7(#5,#11)":[0,4,8,11,18],"maj7#5#11":[0,4,8,11,18],"9(#5)":[0,4,8,10,14],"13(#5)":[0,4,8,10,14,21],"13#5":[0,4,8,10,14,21]};function $(e,t){var n=J[t];n||(n="ma"===t.slice(0,2).toLowerCase()||"M"===t.charAt(0)?J.M:"m"===t.charAt(0)||"-"===t.charAt(0)?J.m:J.M),e+=12;for(var r=[],i=0;i<n.length;i++)r.push(e+n[i]);return r}function ee(e,t,n,r,i){void 0!==e&&f.push({cmd:"note",pitch:e,volume:n,start:w+r*z(t),duration:z(i),gap:0,instrument:0})}function te(e,t,n,r,i){for(var a=0;a<e.length;a++)f.push({cmd:"note",pitch:e[a],volume:n,start:w+r*z(t),duration:z(i),gap:0,instrument:0})}var ne={"2/2":["boom","chick"],"2/4":["boom","chick"],"3/4":["boom","chick","chick"],"4/4":["boom","chick","boom2","chick"],"5/4":["boom","chick","chick","boom2","chick"],"6/8":["boom","","chick","boom2","","chick"],"9/8":["boom","","chick","boom2","","chick","boom2","","chick"],"12/8":["boom","","chick","boom2","","chick","boom","","chick","boom2","","chick"]};function re(e,t){var n=S.num,r=S.den,i=1/r,a=i/2,s=ne[n+"/"+r],o=parseInt(n,10)/parseInt(r,10)-(t-e)/T;if(Math.abs(o)<1e-5&&(o=!1),!s||o){s=[];for(var c=(t-e)/T/i,l=0;l<c;l++)s.push("chick")}if(0===v.length&&v.push({beat:0,chord:b}),0!==v[0].beat&&b&&y&&v.unshift({beat:0,chord:y}),1!==v.length){for(var h=.125===i?3:1,u={},d=0;d<v.length;d++){var f=v[d];u[""+Math.round(f.beat*h)]=f}for(var p=0;p<s.length;p++){var m,g;if(u[""+p]&&(m=u[""+p]),!E&&m)switch(s[p]){case"boom":u[""+(p+1)]?te(m.chord.chick,i,N,p,a):(ee(m.chord.boom,i,M,p,a),g=m.chord.boom);break;case"boom2":u[""+(p+1)]?te(m.chord.chick,i,N,p,a):g===m.chord.boom?(ee(m.chord.boom2,i,M,p,a),g=void 0):(ee(m.chord.boom,i,M,p,a),g=m.chord.boom);break;case"chick":te(m.chord.chick,i,N,p,a);break;case"":u[""+p]&&te(m.chord.chick,i,N,p,a)}}}else for(var w=v[0].beat;w<s.length;w++)if(!E)switch(s[w]){case"boom":ee(v[0].chord.boom,i,M,w,a);break;case"boom2":ee(v[0].chord.boom2,i,M,w,a);break;case"chick":te(v[0].chord.chick,i,N,w,a)}}function ie(e){if(0===e.pattern.length||!1===e.on)return{on:!1};for(var t=e.pattern[0],n=[],r="",i=0,a=0;a<t.length;a++)if("d"===t[a]&&i++,"d"===t[a]||"z"===t[a])0!==r.length?(n.push(r),r=t[a]):r+=t[a];else{if(0===r.length)return{on:!1};r+=t[a]}if(0!==r.length&&n.push(r),e.pattern.length!==2*i+1)return{on:!1};for(var s={on:!0,bars:e.bars,pattern:[]},o=j(S),c=0,l=0;l<n.length;l++){r=n[l];for(var h=1,u=!1,d=0,f=1;f<r.length;f++)switch(r[f]){case"/":0!==d&&(h*=d),d=0,u=!0;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":d=10*d+r[f];break;default:return{on:!1}}u?(0===d&&(d=2),h/=d):d&&(h*=d),"d"===r[0]?(s.pattern.push({len:h*o,pitch:e.pattern[1+c],velocity:e.pattern[1+c+i]}),c++):s.pattern.push({len:h*o,pitch:null})}for(var p=0,m=S.num/S.den,g=0;g<s.pattern.length;g++)p+=s.pattern[g].len;var v=p/(e.bars?e.bars:1)/m;for(g=0;g<s.pattern.length;g++)s.pattern[g].len=s.pattern[g].len/v;return s}function ae(e){if(0!==A.length||O.on){var t=S.num/S.den;if(0===A.length){if(d<t)return;A.push({cmd:"program",channel:e,instrument:128})}if(O.on)for(var n=w,r=0;r<O.pattern.length;r++){var i=z(O.pattern[r].len);O.pattern[r].pitch&&A.push({cmd:"note",pitch:O.pattern[r].pitch,volume:O.pattern[r].velocity,start:n,duration:i,gap:0,instrument:128}),n+=i}}}}(),e.exports=r},function(e,t,n){var r=n(11),i=n(0);e.exports=function(e){var t=this;this.reset=function(){e.version="1.1.0",e.media="screen",e.metaText={},e.formatting={},e.lines=[],e.staffNum=0,e.voiceNum=0,e.lineNum=0,e.runningFonts={},delete e.visualTranspose},this.setVisualTranspose=function(t){t&&(e.visualTranspose=t)},this.resolveOverlays=function(){for(var t=!1,n=[],r=0;r<e.lines.length;r++){var a=e.lines[r];if(a.staff)for(var s=0;s<a.staff.length;s++){for(var o=a.staff[s],c=[],l=0;l<o.voices.length;l++){var h=o.voices[l];c.push({hasOverlay:!1,voice:[],snip:[]}),n[r]=0;for(var u=0,d=!1,f=0,p=-1,m=0;m<h.length;m++){var g=h[m];if("overlay"!==g.el_type||d)"bar"===g.el_type?(d?(d=!1,c[l].snip.push({start:p,len:m-p}),c[l].voice.push(g)):(u>0&&c[l].voice.push({el_type:"note",duration:u,rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}),c[l].voice.push(g)),u=0):"note"===g.el_type?d?c[l].voice.push(g):(u+=g.duration,n[r]+=g.duration):"scale"!==g.el_type&&"stem"!==g.el_type&&"overlay"!==g.el_type&&"style"!==g.el_type&&"transpose"!==g.el_type||c[l].voice.push(g);else{t=!0,d=!0,p=m,c[l].hasOverlay=!0,0===f&&(f=n[r]);for(var v=0;v<r;v++)n[v]&&e.lines[v].staff&&o.voices.length>=e.lines[v].staff[0].voices.length&&e.lines[v].staff[0].voices.push([{el_type:"note",duration:n[v],rest:{type:"invisible"},startChar:g.startChar,endChar:g.endChar}])}}c[l].hasOverlay&&0===c[l].snip.length&&c[l].snip.push({start:p,len:h.length-p})}for(l=0;l<c.length;l++){var b=c[l];if(b.hasOverlay){o.voices.push(b.voice);for(var y=b.snip.length-1;y>=0;y--){var w=b.snip[y];o.voices[l].splice(w.start,w.len)}for(y=0;y<o.voices[o.voices.length-1].length;y++){o.voices[o.voices.length-1][y]=i.clone(o.voices[o.voices.length-1][y]);var x=o.voices[o.voices.length-1][y];"bar"===x.el_type&&x.startEnding&&delete x.startEnding,"bar"===x.el_type&&x.endEnding&&delete x.endEnding}}}}}return t},this.cleanUp=function(t,n,a,s,o){this.closeLine(),delete e.runningFonts,e.metaText.tempo&&e.metaText.tempo.bpm&&!e.metaText.tempo.duration&&(e.metaText.tempo.duration=[e.getBeatLength()]);var c,l,h,u=!1;for(c=0;c<e.lines.length;c++)if(void 0!==e.lines[c].staff){var d=!1;for(l=0;l<e.lines[c].staff.length;l++)if(void 0===e.lines[c].staff[l])u=!0,e.lines[c].staff[l]=null;else for(h=0;h<e.lines[c].staff[l].voices.length;h++)void 0===e.lines[c].staff[l].voices[h]?e.lines[c].staff[l].voices[h]=[]:this.containsNotes(e.lines[c].staff[l].voices[h])&&(d=!0);d||(e.lines[c]=null,u=!0)}if(u&&(e.lines=i.compact(e.lines),i.each(e.lines,(function(e){e.staff&&(e.staff=i.compact(e.staff))}))),a)for(;g(e.lines,a););if(s){for(u=!1,c=0;c<e.lines.length;c++)if(void 0!==e.lines[c].staff)for(l=0;l<e.lines[c].staff.length;l++){var f=!1;for(h=0;h<e.lines[c].staff[l].voices.length;h++)this.containsNotesStrict(e.lines[c].staff[l].voices[h])&&(f=!0);f||(u=!0,e.lines[c].staff[l]=null)}u&&i.each(e.lines,(function(e){e.staff&&(e.staff=i.compact(e.staff))}))}for(function(e){for(var t=!0,n=0;n<e.length;n++){var r=e[n];if(r.staff){for(var i=0;i<r.staff.length;i++){var a=r.staff[i];if(a.title){for(var s=!1,o=0;o<a.title.length;o++)a.title[o]?(a.title[o]=t?a.title[o].name:a.title[o].subname,a.title[o]?s=!0:a.title[o]=""):a.title[o]="";s||delete a.title}}t=!1}}}(e.lines),c=0;c<e.lines.length;c++)if(e.lines[c].staff)for(l=0;l<e.lines[c].staff.length;l++)delete e.lines[c].staff[l].workingClef;for(;this.resolveOverlays(););function p(e){for(var t,n=function(e,n,r){if(void 0===o[r]){for(t=0;t<o.length;t++)if(void 0!==o[t]){r=t;break}if(void 0===o[r]){var a=100*r+1;i.each(e.endSlur,(function(e){a===e&&--a})),o[r]=[a]}}for(var s,c=0;c<n;c++)s=o[r].pop(),e.endSlur.push(s);return 0===o[r].length&&delete o[r],s},r=function(e,t,n,r){e.startSlur=[],void 0===o[n]&&(o[n]=[]);for(var a=100*n+1,s=0;s<t;s++)r&&(i.each(r,(function(e){a===e&&++a})),i.each(r,(function(e){a===e&&++a})),i.each(r,(function(e){a===e&&++a}))),i.each(o[n],(function(e){a===e&&++a})),i.each(o[n],(function(e){a===e&&++a})),o[n].push(a),e.startSlur.push({label:a}),e.dottedSlur&&(e.startSlur[e.startSlur.length-1].style="dotted",delete e.dottedSlur),a++},a=0;a<e.length;a++){var s=e[a];if("note"===s.el_type){if(s.gracenotes)for(var c=0;c<s.gracenotes.length;c++){if(s.gracenotes[c].endSlur){var l=s.gracenotes[c].endSlur;s.gracenotes[c].endSlur=[];for(var h=0;h<l;h++)n(s.gracenotes[c],1,20)}s.gracenotes[c].startSlur&&(t=s.gracenotes[c].startSlur,r(s.gracenotes[c],t,20))}if(s.endSlur&&(t=s.endSlur,s.endSlur=[],n(s,t,0)),s.startSlur&&r(s,t=s.startSlur,0),s.pitches){for(var u=[],d=0;d<s.pitches.length;d++)if(s.pitches[d].endSlur){var f=s.pitches[d].endSlur;s.pitches[d].endSlur=[];for(var p=0;p<f;p++){var m=n(s.pitches[d],1,d+1);u.push(m)}}for(d=0;d<s.pitches.length;d++)s.pitches[d].startSlur&&(t=s.pitches[d].startSlur,r(s.pitches[d],t,d+1,u));s.gracenotes&&s.pitches[0].endSlur&&100===s.pitches[0].endSlur[0]&&s.pitches[0].startSlur&&(s.gracenotes[0].endSlur?s.gracenotes[0].endSlur.push(s.pitches[0].startSlur[0].label):s.gracenotes[0].endSlur=[s.pitches[0].startSlur[0].label],1===s.pitches[0].endSlur.length?delete s.pitches[0].endSlur:100===s.pitches[0].endSlur[0]?s.pitches[0].endSlur.shift():100===s.pitches[0].endSlur[s.pitches[0].endSlur.length-1]&&s.pitches[0].endSlur.pop(),1===o[1].length?delete o[1]:o[1].pop())}}}}function m(e){r.fixClef(e)}function g(e,t){for(c=0;c<e.length;c++)if(void 0!==e[c].staff)for(l=0;l<e[c].staff.length;l++){var n=[];for(h=0;h<e[c].staff[l].voices.length;h++)for(var r=e[c].staff[l].voices[h],a=0,s=0;s<r.length;s++)if("bar"===r[s].el_type){if(++a>=t&&s<r.length-1){var o=v(e,c);if(!o){var u=JSON.parse(JSON.stringify(e[c]));e.push(i.clone(u)),o=e[e.length-1];for(var d=0;d<o.staff.length;d++)for(var f=0;f<o.staff[d].voices.length;f++)o.staff[d].voices[f]=[]}var p=s+1,m=e[c].staff[l].voices[h].slice(p);return e[c].staff[l].voices[h]=e[c].staff[l].voices[h].slice(0,p),o.staff[l].voices[h]=n.concat(m.concat(o.staff[l].voices[h])),!0}}else r[s].duration||n.push(r[s])}return!1}function v(e,t){for(t++;e.length>t;){if(e[t].staff)return e[t];t++}return null}for(e.lineNum=0;e.lineNum<e.lines.length;e.lineNum++){var b=e.lines[e.lineNum].staff;if(b)for(e.staffNum=0;e.staffNum<b.length;e.staffNum++)for(b[e.staffNum].clef&&m(b[e.staffNum].clef),e.voiceNum=0;e.voiceNum<b[e.staffNum].voices.length;e.voiceNum++){var y=b[e.staffNum].voices[e.voiceNum];p(y);for(var w=0;w<y.length;w++)"clef"===y[w].el_type&&m(y[w]);if(y.length>0&&y[y.length-1].barNumber){var x=v(e.lines,e.lineNum);x&&(x.staff[0].barNumber=y[y.length-1].barNumber),delete y[y.length-1].barNumber}}}return e.formatting.pagewidth||(e.formatting.pagewidth=t),e.formatting.pageheight||(e.formatting.pageheight=n),delete e.staffNum,delete e.voiceNum,delete e.lineNum,delete e.potentialStartBeam,delete e.potentialEndBeam,delete e.vskipPending,o},this.reset(),this.getLastNote=function(){if(e.lines[e.lineNum]&&e.lines[e.lineNum].staff&&e.lines[e.lineNum].staff[e.staffNum]&&e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum])for(var t=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum].length-1;t>=0;t--){var n=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum][t];if("note"===n.el_type)return n}return null},this.addTieToLastNote=function(e){var t=this.getLastNote();return!!(t&&t.pitches&&t.pitches.length>0)&&(t.pitches[0].startTie={},e&&(t.pitches[0].startTie.style="dotted"),!0)},this.getDuration=function(e){return e.duration?e.duration:0},this.closeLine=function(){e.potentialStartBeam&&e.potentialEndBeam&&(e.potentialStartBeam.startBeam=!0,e.potentialEndBeam.endBeam=!0),delete e.potentialStartBeam,delete e.potentialEndBeam},this.appendElement=function(n,r,a,s){var o=e;s.el_type=n,null!==r&&(s.startChar=r),null!==a&&(s.endChar=a);var c=function(){void 0!==o.potentialStartBeam&&void 0!==o.potentialEndBeam&&(o.potentialStartBeam.startBeam=!0,o.potentialEndBeam.endBeam=!0),delete o.potentialStartBeam,delete o.potentialEndBeam};"note"===n?t.getDuration(s)>=.25||s.force_end_beam_last&&void 0!==o.potentialStartBeam?c():s.end_beam&&void 0!==o.potentialStartBeam?void 0===s.rest?(o.potentialStartBeam.startBeam=!0,s.endBeam=!0,delete o.potentialStartBeam,delete o.potentialEndBeam):c():void 0===s.rest&&(void 0===o.potentialStartBeam?s.end_beam||(o.potentialStartBeam=s,delete o.potentialEndBeam):o.potentialEndBeam=s):c();delete s.end_beam,delete s.force_end_beam_last,function(e){var t=o.lines[o.lineNum].staff[o.staffNum];if(t){if(void 0!==e.pitches){var n=t.workingClef.verticalPos;i.each(e.pitches,(function(e){e.verticalPos=e.pitch-n}))}if(void 0!==e.gracenotes){var r=t.workingClef.verticalPos;i.each(e.gracenotes,(function(e){e.verticalPos=e.pitch-r}))}t.voices[o.voiceNum].push(e)}}(s)},this.appendStartingElement=function(t,n,r,a){var s;this.closeLine(),"key"===t&&(s=a.impliedNaturals,delete a.impliedNaturals,delete a.explicitAccidentals);var o=i.clone(a);if(e.lines[e.lineNum].staff){e.lines[e.lineNum].staff.length<=e.staffNum&&(e.lines[e.lineNum].staff[e.staffNum]={},e.lines[e.lineNum].staff[e.staffNum].clef=i.clone(e.lines[e.lineNum].staff[0].clef),e.lines[e.lineNum].staff[e.staffNum].key=i.clone(e.lines[e.lineNum].staff[0].key),e.lines[e.lineNum].staff[0].meter&&(e.lines[e.lineNum].staff[e.staffNum].meter=i.clone(e.lines[e.lineNum].staff[0].meter)),e.lines[e.lineNum].staff[e.staffNum].workingClef=i.clone(e.lines[e.lineNum].staff[0].workingClef),e.lines[e.lineNum].staff[e.staffNum].voices=[[]]),"clef"===t&&(e.lines[e.lineNum].staff[e.staffNum].workingClef=o);for(var c=e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum],l=0;l<c.length;l++){if("note"===c[l].el_type||"bar"===c[l].el_type)return o.el_type=t,o.startChar=n,o.endChar=r,s&&(o.accidentals=s.concat(o.accidentals)),void c.push(o);if(c[l].el_type===t)return o.el_type=t,o.startChar=n,o.endChar=r,s&&(o.accidentals=s.concat(o.accidentals)),void(c[l]=o)}e.lines[e.lineNum].staff[e.staffNum][t]=a}},this.getNumLines=function(){return e.lines.length},this.pushLine=function(t){e.vskipPending&&(t.vskip=e.vskipPending,delete e.vskipPending),e.lines.push(t)},this.addSubtitle=function(e){this.pushLine({subtitle:e})},this.addSpacing=function(t){e.vskipPending=t},this.addNewPage=function(e){this.pushLine({newpage:e})},this.addSeparator=function(e,t,n){this.pushLine({separator:{spaceAbove:Math.round(e),spaceBelow:Math.round(t),lineLength:Math.round(n)}})},this.addText=function(e){this.pushLine({text:e})},this.addCentered=function(e){this.pushLine({text:[{text:e,center:!0}]})},this.containsNotes=function(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type||"bar"===e[t].el_type)return!0;return!1},this.containsNotesStrict=function(e){for(var t=0;t<e.length;t++)if("note"===e[t].el_type&&void 0===e[t].rest)return!0;return!1},this.changeVoiceScale=function(e){t.appendElement("scale",null,null,{size:e})},this.startNewLine=function(n){var r=e;this.closeLine();var i=function(e){var n=r.lines[r.lineNum].staff[r.staffNum];if(n.voices[r.voiceNum]=[],n.title||(n.title=[]),n.title[r.voiceNum]={name:e.name,subname:e.subname},e.style&&t.appendElement("style",null,null,{head:e.style}),e.stem)t.appendElement("stem",null,null,{direction:e.stem});else if(r.voiceNum>0){if(void 0!==n.voices[0]){for(var i=!1,a=0;a<n.voices[0].length;a++)"stem"===n.voices[0].el_type&&(i=!0);if(!i){n.voices[0].splice(0,0,{el_type:"stem",direction:"up"})}}t.appendElement("stem",null,null,{direction:"down"})}e.scale&&t.appendElement("scale",null,null,{size:e.scale})},a=function(e){e.key&&e.key.impliedNaturals&&(e.key.accidentals=e.key.accidentals.concat(e.key.impliedNaturals),delete e.key.impliedNaturals),r.lines[r.lineNum].staff[r.staffNum]={voices:[],clef:e.clef,key:e.key,workingClef:e.clef},void 0!==e.stafflines&&(r.lines[r.lineNum].staff[r.staffNum].clef.stafflines=e.stafflines,r.lines[r.lineNum].staff[r.staffNum].workingClef.stafflines=e.stafflines),e.staffscale&&(r.lines[r.lineNum].staff[r.staffNum].staffscale=e.staffscale),e.annotationfont&&t.setLineFont("annotationfont",e.annotationfont),e.gchordfont&&t.setLineFont("gchordfont",e.gchordfont),e.tripletfont&&t.setLineFont("tripletfont",e.tripletfont),e.vocalfont&&t.setLineFont("vocalfont",e.vocalfont),e.bracket&&(r.lines[r.lineNum].staff[r.staffNum].bracket=e.bracket),e.brace&&(r.lines[r.lineNum].staff[r.staffNum].brace=e.brace),e.connectBarLines&&(r.lines[r.lineNum].staff[r.staffNum].connectBarLines=e.connectBarLines),e.barNumber&&(r.lines[r.lineNum].staff[r.staffNum].barNumber=e.barNumber),i(e),e.part&&t.appendElement("part",e.part.startChar,e.part.endChar,{title:e.part.title}),void 0!==e.meter&&(r.lines[r.lineNum].staff[r.staffNum].meter=e.meter),r.vskipPending&&(r.lines[r.lineNum].vskip=r.vskipPending,delete r.vskipPending)};if(void 0===e.lines[e.lineNum])!function(e){r.lines[r.lineNum]={staff:[]},a(e)}(n);else if(void 0===e.lines[e.lineNum].staff)e.lineNum++,this.startNewLine(n);else if(void 0===e.lines[e.lineNum].staff[e.staffNum])a(n);else if(void 0===e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum])i(n);else{if(!this.containsNotes(e.lines[e.lineNum].staff[e.staffNum].voices[e.voiceNum]))return;e.lineNum++,this.startNewLine(n)}},this.setRunningFont=function(t,n){e.runningFonts[t]=n},this.setLineFont=function(t,n){if(e.runningFonts[t]){for(var r=!1,i=Object.keys(n),a=0;a<i.length;a++)e.runningFonts[t][i[a]]!==n[i[a]]&&(r=!0);r&&(e.lines[e.lineNum].staff[e.staffNum][t]=n)}e.runningFonts[t]=n},this.setBarNumberImmediate=function(e){var t=this.getCurrentVoice();if(t&&t.length>0){var n=t[t.length-1];if("bar"!==n.el_type)return e-1;void 0!==n.barNumber&&(n.barNumber=e)}return e},this.hasBeginMusic=function(){for(var t=0;t<e.lines.length;t++)if(e.lines[t].staff)return!0;return!1},this.isFirstLine=function(t){for(var n=t-1;n>=0;n--)if(void 0!==e.lines[n].staff)return!1;return!0},this.getCurrentVoice=function(){var t=e.lines[e.lineNum];if(!t)return null;var n=t.staff[e.staffNum];return n&&void 0!==n.voices[e.voiceNum]?n.voices[e.voiceNum]:null},this.setCurrentVoice=function(t,n){e.staffNum=t,e.voiceNum=n;for(var r=0;r<e.lines.length;r++)if(e.lines[r].staff&&(void 0===e.lines[r].staff[t]||void 0===e.lines[r].staff[t].voices[n]||!this.containsNotes(e.lines[r].staff[t].voices[n])))return void(e.lineNum=r);e.lineNum=r},this.addMetaText=function(t,n){void 0===e.metaText[t]?e.metaText[t]=n:e.metaText[t]+="\n"+n},this.addMetaTextArray=function(t,n){void 0===e.metaText[t]?e.metaText[t]=[n]:e.metaText[t].push(n)},this.addMetaTextObj=function(t,n){e.metaText[t]=n}}},function(e,t,n){var r=n(0);e.exports=function(e){"use strict";for(var t="",n=(e=r.strip(e)).split("\nX:"),i=1;i<n.length;i++)n[i]="X:"+n[i];var a=0,s=[];if(r.each(n,(function(e){s.push({abc:e,startPos:a}),a+=e.length+1})),s.length>1&&!r.startsWith(s[0].abc,"X:")){var o=s.shift().abc.split("\n");r.each(o,(function(e){r.startsWith(e,"%%")&&(t+=e+"\n")}))}var c=t;return r.each(s,(function(e){var n=e.abc.indexOf("\n\n");n>0&&(e.abc=e.abc.substring(0,n)),e.pure=e.abc,e.abc=t+e.abc,e.title="";var i=e.pure.split("T:");i.length>1&&(i=i[1].split("\n"),e.title=r.strip(i[0]));var a=e.pure.substring(2,e.pure.indexOf("\n"));e.id=r.strip(a)})),{header:c,tunes:s}}},function(e,t,n){var r=n(1),i=n(38),a=n(54),s=n(56),o=n(57),c=n(58),l=n(59),h=n(60),u=n(61),d=n(62),f=n(70),p=n(71),m=n(72),g=n(73),v=n(20),b=function(e,t){t=t||{},this.selectionColor=t.selectionColor,this.dragColor=t.dragColor?t.dragColor:t.selectionColor,this.dragging=!!t.dragging,this.selectTypes=t.selectTypes,this.responsive=t.responsive,this.space=3*r.SPACE,this.scale=t.scale?parseFloat(t.scale):0,this.classes=new f({shouldAddClasses:t.add_classes}),this.scale>.1||(this.scale=void 0),t.staffwidth?(this.staffwidthScreen=t.staffwidth,this.staffwidthPrint=t.staffwidth):(this.staffwidthScreen=740,this.staffwidthPrint=680),this.listeners=[],t.clickListener&&this.addSelectListener(t.clickListener),this.renderer=new a(e,t.regression),this.renderer.setPaddingOverride(t),t.showDebug&&(this.renderer.showDebug=t.showDebug),this.renderer.controller=this,this.reset()};b.prototype.reset=function(){this.selected=[],this.staffgroups=[],this.engraver&&this.engraver.reset(),this.engraver=null,this.renderer.reset(),this.dragTarget=null,this.dragIndex=-1,this.dragMouseStart={x:-1,y:-1},this.dragYStep=0},b.prototype.engraveABC=function(e,t){void 0===e[0]&&(e=[e]),this.reset();for(var n=0;n<e.length;n++)void 0===t&&(t=n),this.getFontAndAttr=new p(e[n].formatting,this.classes),this.getTextSize=new m(this.getFontAndAttr,this.renderer.paper),this.engraveTune(e[n],t)},b.prototype.adjustNonScaledItems=function(e){this.width/=e,this.renderer.adjustNonScaledItems(e)},b.prototype.getMeasureWidths=function(e){this.reset(),this.getFontAndAttr=new p(e.formatting,this.classes),this.getTextSize=new m(this.getFontAndAttr,this.renderer.paper),this.setupTune(e,0),this.constructTuneElements(e);d(this.renderer,e,0,this.space);var t={left:0,measureWidths:[],height:0,total:0};t.height=this.renderer.padding.top+this.renderer.spacing.music+this.renderer.padding.bottom+24;for(var n=0;n<e.lines.length;n++){var i=e.lines[n];if(i.staff){if(i.staffGroup.voices.length>0)for(var a=i.staffGroup.voices[0],s=!1,o=0,c=0;c<a.children.length;c++){var l=a.children[c];s||l.isClef||l.isKeySig||(s=!0,t.left=l.x,o=l.x),"bar"===l.type&&(t.measureWidths.push(l.x-o),t.total+=l.x-o,o=l.x)}t.height+=v(i.staffGroup)*r.STEP}}return t},b.prototype.setupTune=function(e,t){this.classes.reset(),this.renderer.newTune(e),this.engraver=new i(this.getTextSize,t,{bagpipes:e.formatting.bagpipes,flatbeams:e.formatting.flatbeams,graceSlurs:!1!==e.formatting.graceSlurs}),this.engraver.setStemHeight(this.renderer.spacing.stemHeight),this.engraver.measureLength=e.getMeterFraction().num/e.getMeterFraction().den,e.formatting.staffwidth?this.width=1.33*e.formatting.staffwidth:this.width=this.renderer.isPrint?this.staffwidthPrint:this.staffwidthScreen;var n=e.formatting.scale?e.formatting.scale:this.scale;return"resize"===this.responsive&&(n=void 0),void 0===n&&(n=this.renderer.isPrint?.75:1),this.adjustNonScaledItems(n),n},b.prototype.constructTuneElements=function(e){var t,n;e.topText=new l(e.metaText,e.formatting,e.lines,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.getTextSize);var r=!1,i=!1;for(t=0;t<e.lines.length;t++)if((n=e.lines[t]).staff)i=!0,n.staffGroup=this.engraver.createABCLine(n.staff,r?null:e.metaText.tempo,this.getTextSize),r=!0;else if(n.subtitle){if(i){var a=this.width/2+this.renderer.padding.left;n.nonMusic=new c(this.renderer.spacing.subtitle,e.formatting,n.subtitle,a,this.renderer.padding.left,this.getTextSize)}}else void 0!==n.text?(i=!0,n.nonMusic=new s(n.text,n.vskip,this.getFontAndAttr,this.renderer.padding.left,this.width,this.getTextSize)):void 0!==n.separator&&n.separator.lineLength&&(i=!0,n.nonMusic=new o(n.separator.spaceAbove,n.separator.lineLength,n.separator.spaceBelow));e.bottomText=new h(e.metaText,this.width,this.renderer.isPrint,this.renderer.padding.left,this.renderer.spacing,this.getTextSize)},b.prototype.engraveTune=function(e,t){var n=this.setupTune(e,t);this.constructTuneElements(e);var r=d(this.renderer,e,this.width,this.space),i=g(this.renderer,this.classes,e,this.width,r,this.responsive,n,this.selectTypes,t);this.staffgroups=i.staffgroups,this.selectables=i.selectables,u(this)},b.prototype.getDim=function(e){if(!e.dim){var t=e.svgEl.getBBox();e.dim={left:Math.round(t.x),top:Math.round(t.y),right:Math.round(t.x+t.width),bottom:Math.round(t.y+t.height)}}return e.dim},b.prototype.addSelectListener=function(e){this.listeners[this.listeners.length]=e},e.exports=b},function(e,t,n){var r,i=n(6),a=n(39),s=n(40),o=n(41),c=n(42),l=n(43),h=n(44),u=n(45),d=n(48),f=n(5),p=n(2),m=n(1),g=n(49),v=n(50),b=n(19),y=n(51),w=n(52),x=n(53),k=n(0);!function(){"use strict";var e=function(e){var t=0;return e.duration&&(t=e.duration),t},t=!1,n={rest:{0:"rests.whole",1:"rests.half",2:"rests.quarter",3:"rests.8th",4:"rests.16th",5:"rests.32nd",6:"rests.64th",7:"rests.128th",multi:"rests.multimeasure"},note:{"-1":"noteheads.dbl",0:"noteheads.whole",1:"noteheads.half",2:"noteheads.quarter",3:"noteheads.quarter",4:"noteheads.quarter",5:"noteheads.quarter",6:"noteheads.quarter",7:"noteheads.quarter",nostem:"noteheads.quarter"},rhythm:{"-1":"noteheads.slash.whole",0:"noteheads.slash.whole",1:"noteheads.slash.whole",2:"noteheads.slash.quarter",3:"noteheads.slash.quarter",4:"noteheads.slash.quarter",5:"noteheads.slash.quarter",6:"noteheads.slash.quarter",7:"noteheads.slash.quarter",nostem:"noteheads.slash.nostem"},x:{"-1":"noteheads.indeterminate",0:"noteheads.indeterminate",1:"noteheads.indeterminate",2:"noteheads.indeterminate",3:"noteheads.indeterminate",4:"noteheads.indeterminate",5:"noteheads.indeterminate",6:"noteheads.indeterminate",7:"noteheads.indeterminate",nostem:"noteheads.indeterminate"},harmonic:{"-1":"noteheads.harmonic.quarter",0:"noteheads.harmonic.quarter",1:"noteheads.harmonic.quarter",2:"noteheads.harmonic.quarter",3:"noteheads.harmonic.quarter",4:"noteheads.harmonic.quarter",5:"noteheads.harmonic.quarter",6:"noteheads.harmonic.quarter",7:"noteheads.harmonic.quarter",nostem:"noteheads.harmonic.quarter"},uflags:{3:"flags.u8th",4:"flags.u16th",5:"flags.u32nd",6:"flags.u64th"},dflags:{3:"flags.d8th",4:"flags.d16th",5:"flags.d32nd",6:"flags.d64th"}};function A(e,t){var n=e[t];if("note"!==n.el_type||!n.startBeam||n.endBeam)return{count:1,elem:n};for(var r=[];t<e.length&&"note"===e[t].el_type&&(r.push(e[t]),!e[t].endBeam);)t++;return{count:r.length,elem:r}}function T(e){if(e.pitches){S(e);for(var t=0,n=0;n<e.pitches.length;n++)t+=e.pitches[n].verticalPos;e.averagepitch=t/e.pitches.length,e.minpitch=e.pitches[0].verticalPos,e.maxpitch=e.pitches[e.pitches.length-1].verticalPos}}(r=function(e,t,n){this.decoration=new u,this.getTextSize=e,this.tuneNumber=t,this.isBagpipes=n.bagpipes,this.flatBeams=n.flatbeams,this.graceSlurs=n.graceSlurs,this.reset()}).prototype.reset=function(){this.slurs={},this.ties=[],this.voiceScale=1,this.slursbyvoice={},this.tiesbyvoice={},this.endingsbyvoice={},this.scaleByVoice={},this.tripletmultiplier=1,this.abcline=void 0,this.accidentalSlot=void 0,this.accidentalshiftx=void 0,this.dotshiftx=void 0,this.hasVocals=!1,this.minY=void 0,this.partstartelem=void 0,this.startlimitelem=void 0,this.stemdir=void 0},r.prototype.setStemHeight=function(e){this.stemHeight=Math.round(10*e/m.STEP)/10},r.prototype.getCurrentVoiceId=function(e,t){return"s"+e+"v"+t},r.prototype.pushCrossLineElems=function(e,t){this.slursbyvoice[this.getCurrentVoiceId(e,t)]=this.slurs,this.tiesbyvoice[this.getCurrentVoiceId(e,t)]=this.ties,this.endingsbyvoice[this.getCurrentVoiceId(e,t)]=this.partstartelem,this.scaleByVoice[this.getCurrentVoiceId(e,t)]=this.voiceScale},r.prototype.popCrossLineElems=function(e,t){this.slurs=this.slursbyvoice[this.getCurrentVoiceId(e,t)]||{},this.ties=this.tiesbyvoice[this.getCurrentVoiceId(e,t)]||[],this.partstartelem=this.endingsbyvoice[this.getCurrentVoiceId(e,t)],this.voiceScale=this.scaleByVoice[this.getCurrentVoiceId(e,t)],void 0===this.voiceScale&&(this.voiceScale=1)},r.prototype.containsLyrics=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e[t].voices.length;n++)for(var r=0;r<e[t].voices[n].length;r++){var i=e[t].voices[n][r];if(i.lyric)return void(i.positioning&&"below"!==i.positioning.vocalPosition||(this.hasVocals=!0))}},r.prototype.createABCLine=function(e,n,r){this.minY=2,this.containsLyrics(e);var i=new g(this.getTextSize);this.tempoSet=!1;for(var a=0;a<e.length;a++)t&&this.restoreState(),t=!1,this.createABCStaff(i,e[a],n,a);return i},r.prototype.createABCStaff=function(e,t,n,r){e.getTextSize.updateFonts(t);for(var i=0;i<t.voices.length;i++){var a=new w(i,t.voices.length);0===i?(a.barfrom="start"===t.connectBarLines||"continue"===t.connectBarLines,a.barto="continue"===t.connectBarLines||"end"===t.connectBarLines):a.duplicate=!0,t.title&&t.title[i]&&(a.header=t.title[i].replace(/\\n/g,"\n"),a.headerPosition=6+e.getTextSize.baselineToCenter(a.header,"voicefont","staff-extra voice-name",i,t.voices.length)/m.STEP);var l=o(t.clef,this.tuneNumber);l&&(0===i&&t.barNumber&&this.addMeasureNumber(t.barNumber,l),a.addChild(l),this.startlimitelem=l);var u=c(t.key,this.tuneNumber);if(u&&(a.addChild(u),this.startlimitelem=u),t.meter){"specified"===t.meter.type?this.measureLength=t.meter.value[0].num/t.meter.value[0].den:this.measureLength=1;var d=h(t.meter,this.tuneNumber);a.addChild(d),this.startlimitelem=d}a.duplicate&&(a.children=[]);var f=t.clef.stafflines||0===t.clef.stafflines?t.clef.stafflines:5;e.addVoice(a,r,f);var p=1===f;this.createABCVoice(t.voices[i],n,r,i,p,a),e.setStaffLimits(a),0===i&&("start"===t.brace||!e.brace&&t.brace?(e.brace||(e.brace=[]),e.brace.push(new s(a,"brace"))):"end"===t.brace&&e.brace?e.brace[e.brace.length-1].setBottomStaff(a):"continue"===t.brace&&e.brace&&e.brace[e.brace.length-1].continuing(a),"start"===t.bracket||!e.bracket&&t.bracket?(e.bracket||(e.bracket=[]),e.bracket.push(new s(a,"bracket"))):"end"===t.bracket&&e.bracket?e.bracket[e.bracket.length-1].setBottomStaff(a):"continue"===t.bracket&&e.bracket&&e.bracket[e.bracket.length-1].continuing(a))}},r.prototype.createABCVoice=function(e,n,r,a,s,o){this.popCrossLineElems(r,a),this.stemdir=this.isBagpipes?"down":null,this.abcline=e,this.partstartelem&&(this.partstartelem=new d("",null,null),o.addOther(this.partstartelem));var c=o.voicetotal<2?-1:o.voicenumber;for(var h in this.slurs)this.slurs.hasOwnProperty(h)&&(this.slurs[h]=new b({force:this.slurs[h].force,voiceNumber:c,stemDir:this.slurs[h].stemDir,style:this.slurs[h].dotted}),t&&this.slurs[h].setHint(),o.addOther(this.slurs[h]));for(var u=0;u<this.ties.length;u++)this.ties[u]=new b({force:this.ties[u].force,stemDir:this.ties[u].stemDir,voiceNumber:c,style:this.ties[u].dotted}),t&&this.ties[u].setHint(),o.addOther(this.ties[u]);for(var f=0;f<this.abcline.length;f++)T(this.abcline[f]),this.minY=Math.min(this.abcline[f].minpitch,this.minY);for(var p=0===r,m=0;m<this.abcline.length;){var g=A(this.abcline,m),y=this.createABCElement(p,s,o,g.elem);if(y)for(u=0;u<y.length;u++){if(!this.tempoSet&&n&&!n.suppress){this.tempoSet=!0;var w=new i(n,0,0,"tempo",this.tuneNumber,{});w.addFixedX(new v(n,this.tuneNumber,l)),o.addChild(w)}o.addChild(y[u])}m+=g.count}this.pushCrossLineElems(r,a)},r.prototype.saveState=function(){this.tiesSave=k.cloneArray(this.ties),this.slursSave=k.cloneHashOfHash(this.slurs),this.slursbyvoiceSave=k.cloneHashOfHash(this.slursbyvoice),this.tiesbyvoiceSave=k.cloneHashOfArrayOfHash(this.tiesbyvoice)},r.prototype.restoreState=function(){this.ties=k.cloneArray(this.tiesSave),this.slurs=k.cloneHashOfHash(this.slursSave),this.slursbyvoice=k.cloneHashOfHash(this.slursbyvoiceSave),this.tiesbyvoice=k.cloneHashOfArrayOfHash(this.tiesbyvoiceSave)},r.prototype.createABCElement=function(e,n,r,a){var s=[];switch(a.el_type){case void 0:s=this.createBeam(n,r,a);break;case"note":s[0]=this.createNote(a,!1,n,r),this.triplet&&this.triplet.isClosed()&&(r.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1);break;case"bar":s[0]=this.createBarLine(r,a,e),r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"meter":s[0]=h(a,this.tuneNumber),this.startlimitelem=s[0],r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"clef":if(s[0]=o(a,this.tuneNumber),!s[0])return null;r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"key":var u=c(a,this.tuneNumber);u&&(s[0]=u,this.startlimitelem=s[0]),r.duplicate&&s.length>0&&(s[0].invisible=!0);break;case"stem":this.stemdir=a.direction;break;case"part":var d=new i(a,0,0,"part",this.tuneNumber),f=this.getTextSize.calc(a.title,"partsfont","part");d.addFixedX(new p(a.title,0,0,void 0,{type:"part",height:f.height/m.STEP})),s[0]=d;break;case"tempo":var g=new i(a,0,0,"tempo",this.tuneNumber);g.addFixedX(new v(a,this.tuneNumber,l)),s[0]=g;break;case"style":"normal"===a.head?delete this.style:this.style=a.head;break;case"hint":t=!0,this.saveState();break;case"midi":break;case"scale":this.voiceScale=a.size;break;default:var b=new i(a,0,0,"unsupported",this.tuneNumber);b.addFixed(new p("element type "+a.el_type,0,0,void 0,{type:"debug"})),s[0]=b}return s},r.prototype.createBeam=function(e,n,r){var i=[],s=new a(this.stemHeight*this.voiceScale,this.stemdir,this.flatBeams,r[0]);t&&s.setHint();for(var o=0;o<r.length;o++){var c=r[o],l=this.createNote(c,!0,e,n);i.push(l),s.add(l),this.triplet&&this.triplet.isClosed()&&(n.addOther(this.triplet),this.triplet=null,this.tripletmultiplier=1)}return s.calcDir(),n.addBeam(s),i};var S=function(e){var t;do{t=!0;for(var n=0;n<e.pitches.length-1;n++)if(e.pitches[n].pitch>e.pitches[n+1].pitch){t=!1;var r=e.pitches[n];e.pitches[n]=e.pitches[n+1],e.pitches[n+1]=r}}while(!t)},M=function(e,t,n,r,i,a,s,o,c){for(var l=n;l>11;l--)l%2!=0||r||e.addFixed(new p(null,o,(i+4)*c,l,{type:"ledger"}));for(l=t;l<1;l++)l%2!=0||r||e.addFixed(new p(null,o,(i+4)*c,l,{type:"ledger"}));for(l=0;l<a.length;l++){var h=i;"down"===s&&(h=-h),e.addFixed(new p(null,h+o,(i+4)*c,a[l],{type:"ledger"}))}};function N(e,t){for(var n=0;n<e.length;n++)if(JSON.stringify(e[n])===JSON.stringify(t))return;e.push(t)}r.prototype.addGraceNotes=function(e,r,i,s,o,c,h){o=Math.round(.7*o);var u,d,m=null;e.gracenotes.length>1&&(m=new a(o,"grace",c),t&&m.setHint(),m.mainNote=i);var g=[];for(d=e.gracenotes.length-1;d>=0;d--)h+=10,g[d]=h,e.gracenotes[d].accidental&&(h+=7);for(d=0;d<e.gracenotes.length;d++){var v=e.gracenotes[d].verticalPos;u=m?null:n.uflags[c?5:3];var y=l(i,"noteheads.quarter",e.gracenotes[d],"up",-g[d],-g[d],u,0,0,.6*this.voiceScale,[],!1);y.notehead.highestVert=y.notehead.pitch+o;var w=y.notehead;if(this.addSlursAndTies(i,e.gracenotes[d],w,r,"up",!0),i.addExtra(w),e.gracenotes[d].acciaccatura){var x=e.gracenotes[d].verticalPos+4.2,k=m?5:6;i.addRight(new p("flags.ugrace",-g[d]+k,0,x,{scalex:.6,scaley:.6}))}if(m){var A=e.gracenotes[d].duration/2;c&&(A/=2);var T={heads:[w],abcelem:{averagepitch:v,minpitch:v,maxpitch:v,duration:A}};m.add(T)}else{var S=v+1/3*.6,N=v+4.2,C=w.dx+w.w;i.addExtra(new p(null,C,0,S,{type:"stem",pitch2:N,linewidth:-.6}))}M(i,v,v,!1,f.getSymbolWidth("noteheads.quarter"),[],!0,w.dx-1,.6);var E=e.rest&&("spacer"===e.rest.type||"invisible"===e.rest.type);0!==d||c||!this.graceSlurs||E||r.addOther(new b({anchor1:w,anchor2:s,isGrace:!0}))}return m&&(m.calcDir(),r.addBeam(m)),h},r.prototype.addNoteToAbcElement=function(t,r,i,a,s,o,c,h,u){var d,m,g,v,b,y=0,w=0,x=0,k=[],A=[],T=0,S=r.averagepitch>=6?"down":"up";for(a&&(S=a),(s=r.style?r.style:s)&&"normal"!==s||(s="note"),(v=o?n[s].nostem:n[s][-c])||console.log("noteSymbol:",s,c,o),b="down"===S?r.pitches.length-2:1;"down"===S?b>=0:b<r.pitches.length;b="down"===S?b-1:b+1){var M=r.pitches["down"===S?b+1:b-1],C=r.pitches[b],E="down"===S?M.pitch-C.pitch:C.pitch-M.pitch;E<=1&&!M.printer_shift&&(C.printer_shift=E?"different":"same",(C.verticalPos>11||C.verticalPos<1)&&k.push(C.verticalPos-C.verticalPos%2),"down"===S?w=f.getSymbolWidth(v)+2:y=f.getSymbolWidth(v)+2)}var I=r.pitches.length;for(b=0;b<r.pitches.length;b++){var _,B;if(!h)_="down"===S&&0!==b||"up"===S&&b!==I-1?null:n["down"===S?"dflags":"uflags"][-c];if(B=r.pitches[b].style?n[r.pitches[b].style][-c]:v,r.pitches[b].highestVert=r.pitches[b].verticalPos,("up"===a||"up"===S)&&0===b||("down"===a||"down"===S)&&b===I-1){if((r.startSlur||1===I)&&(r.pitches[b].highestVert=r.pitches[I-1].verticalPos,e(r)<1&&("up"===a||"up"===S)&&(r.pitches[b].highestVert+=6)),r.startSlur)for(r.pitches[b].startSlur||(r.pitches[b].startSlur=[]),g=0;g<r.startSlur.length;g++)N(r.pitches[b].startSlur,r.startSlur[g]);if(r.endSlur)for(r.pitches[b].highestVert=r.pitches[I-1].verticalPos,e(r)<1&&("up"===a||"up"===S)&&(r.pitches[b].highestVert+=6),r.pitches[b].endSlur||(r.pitches[b].endSlur=[]),g=0;g<r.endSlur.length;g++)N(r.pitches[b].endSlur,r.endSlur[g])}var P=!h&&c<=-1,D=l(t,B,r.pitches[b],S,0,-w,_,i,y,this.voiceScale,A,!a);T=Math.max(f.getSymbolWidth(B),T),t.extraw-=D.extraLeft,(d=D.notehead)&&(this.addSlursAndTies(t,r.pitches[b],d,u,P?S:null,!1),r.gracenotes&&r.gracenotes.length>0&&(d.bottom=d.bottom-1),t.addHead(d)),w+=D.accidentalshiftx,x=Math.max(x,D.dotshiftx)}if(P){var L=Math.round(70*this.voiceScale)/10,O="down"===S?r.minpitch-L:r.minpitch+1/3;O>6&&!a&&(O=6);var H="down"===S?r.maxpitch-1/3:r.maxpitch+L;H<6&&!a&&(H=6);var V="down"===S||0===t.heads.length?0:t.heads[0].w,F="down"===S?1:-1;"noteheads.slash.quarter"===d.c&&("down"===S?H-=1:O+=1),t.addRight(new p(null,V,0,O,{type:"stem",pitch2:H,linewidth:F})),m=Math.min(O,H)}return{noteHead:d,roomTaken:w,roomTakenRight:x,min:m,additionalLedgers:k,dir:S,symbolWidth:T}},r.prototype.addLyric=function(e,t){var n="";k.each(t.lyric,(function(e){var t=" "===e.divider?"":e.divider;n+=e.syllable+t+"\n"}));var r=this.getTextSize.calc(n,"vocalfont","lyric"),i=t.positioning?t.positioning.vocalPosition:"below";e.addCentered(new p(n,0,r.width,void 0,{type:"lyric",position:i,height:r.height/m.STEP,dim:this.getTextSize.attr("vocalfont","lyric")}))},r.prototype.createNote=function(r,a,s,o){var c,h=null,u=0,d=0,m=0,g=[],v=e(r),b=!1;0===v&&(b=!0,v=.25,a=!0);for(var w=Math.floor(Math.log(v)/Math.log(2)),k=0,A=Math.pow(2,w),T=A/2;A<v;k++,A+=T,T/=2);r.startTriplet&&(this.tripletmultiplier=r.tripletMultiplier);var S=v*this.tripletmultiplier;r.rest&&"multimeasure"===r.rest.type&&(S=v);var N=r.rest?"rest":"note",C=new i(r,S,1,N,this.tuneNumber,{durationClassOveride:r.duration*this.tripletmultiplier});if(t&&C.setHint(),r.rest){this.measureLength===v&&"invisible"!==r.rest.type&&"spacer"!==r.rest.type&&"multimeasure"!==r.rest.type&&(r.rest.type="whole");var E=function(e,t,r,i,a,s,o,c,h){var u,d,m,g,v=7;switch(a&&("down"===s&&(v=3),"up"===s&&(v=11)),o&&(v=r<.5||r<1?7:5),t.rest.type){case"whole":u=n.rest[0],t.averagepitch=v,t.minpitch=v,t.maxpitch=v,i=0;break;case"rest":u="rhythm"===t.style?n.rhythm[-c]:n.rest[-c],t.averagepitch=v,t.minpitch=v,t.maxpitch=v;break;case"invisible":case"spacer":u="",t.averagepitch=v,t.minpitch=v,t.maxpitch=v;break;case"multimeasure":u=n.rest.multi,t.averagepitch=v,t.minpitch=v,t.maxpitch=v,i=0;var b=f.getSymbolWidth(u);e.addHead(new p(u,-b,2*b,7));var y=new p(""+t.rest.text,0,b,16,{type:"multimeasure-text"});e.addExtra(y)}if("multimeasure"!==t.rest.type){var w=l(e,u,{verticalPos:v},null,0,0,null,i,0,h,[],!1);(d=w.notehead)&&(e.addHead(d),m=w.accidentalshiftx,g=w.dotshiftx)}return{noteHead:d,roomTaken:m,roomTakenRight:g}}(C,r,v,k,o.voicetotal>1,this.stemdir,s,w,this.voiceScale);h=E.noteHead,u=E.roomTaken,d=E.roomTakenRight}else{var I=this.addNoteToAbcElement(C,r,k,this.stemdir,this.style,b,w,a,o);void 0!==I.min&&(this.minY=Math.min(I.min,this.minY)),h=I.noteHead,u=I.roomTaken,d=I.roomTakenRight,g=I.additionalLedgers,c=I.dir,m=I.symbolWidth}if(void 0!==r.lyric&&this.addLyric(C,r),void 0!==r.gracenotes&&(u+=this.addGraceNotes(r,o,C,h,this.stemHeight*this.voiceScale,this.isBagpipes,u)),r.decoration&&this.decoration.createDecoration(o,r.decoration,C.top,h?h.w:0,C,u,c,C.bottom,r.positioning,this.hasVocals),r.barNumber&&C.addFixed(new p(r.barNumber,-10,0,0,{type:"barNumber"})),M(C,r.minpitch,r.maxpitch,r.rest,m,g,c,-2,1),void 0!==r.chord){var _=x(this.getTextSize,C,r,u,d,m);u=_.roomTaken,d=_.roomTakenRight}return r.startTriplet&&(this.triplet=new y(r.startTriplet,h,{flatBeams:this.flatBeams})),r.endTriplet&&this.triplet&&this.triplet.setCloseAnchor(h),!this.triplet||r.startTriplet||r.endTriplet||r.rest&&"spacer"===r.rest.type||this.triplet.middleNote(h),C},r.prototype.addSlursAndTies=function(e,n,r,i,a,s){if(n.endTie&&this.ties.length>0){for(var o=!1,c=0;c<this.ties.length;c++)if(this.ties[c].anchor1&&this.ties[c].anchor1.pitch===r.pitch){this.ties[c].setEndAnchor(r),this.ties.splice(c,1),o=!0;break}o||(this.ties[0].setEndAnchor(r),this.ties.splice(0,1))}var l,h,u=i.voicetotal<2?-1:i.voicenumber;if(n.startTie){var d=new b({anchor1:r,force:"down"===this.stemdir||"up"===this.stemdir,stemDir:this.stemdir,isGrace:s,voiceNumber:u,style:n.startTie.style});t&&d.setHint(),this.ties[this.ties.length]=d,i.addOther(d),e.startTie=!0}if(n.endSlur)for(var f=0;f<n.endSlur.length;f++)h=n.endSlur[f],this.slurs[h]?((l=this.slurs[h]).setEndAnchor(r),delete this.slurs[h]):(l=new b({anchor2:r,stemDir:this.stemdir,voiceNumber:u}),t&&l.setHint(),i.addOther(l)),this.startlimitelem&&l.setStartX(this.startlimitelem);else if(!s)for(var p in this.slurs)this.slurs.hasOwnProperty(p)&&this.slurs[p].addInternalNote(r);if(n.startSlur)for(f=0;f<n.startSlur.length;f++)h=n.startSlur[f].label,l=new b({anchor1:r,stemDir:this.stemdir,voiceNumber:u,style:n.startSlur[f].style}),t&&l.setHint(),this.slurs[h]=l,i.addOther(l)},r.prototype.addMeasureNumber=function(e,t){var n=this.getTextSize.calc(e,"measurefont","bar-number"),r=n.width>18&&"treble"===t.abcelem.type?-7:0;t.addFixed(new p(e,r,n.width,11+n.height/m.STEP,{type:"barNumber",dim:this.getTextSize.attr("measurefont","bar-number")}))},r.prototype.createBarLine=function(e,t,n){var r=new i(t,0,10,"bar",this.tuneNumber),a=null,s=0;t.barNumber&&this.addMeasureNumber(t.barNumber,r);var o="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type,c="bar_left_repeat"!==t.type&&"bar_thick_thin"!==t.type&&"bar_invisible"!==t.type,l="bar_right_repeat"===t.type||"bar_dbl_repeat"===t.type||"bar_left_repeat"===t.type||"bar_thin_thick"===t.type||"bar_thick_thin"===t.type,h="bar_left_repeat"===t.type||"bar_thick_thin"===t.type||"bar_thin_thin"===t.type||"bar_dbl_repeat"===t.type,u="bar_left_repeat"===t.type||"bar_dbl_repeat"===t.type;if(o||u){for(var f in this.slurs)this.slurs.hasOwnProperty(f)&&this.slurs[f].setEndX(r);this.startlimitelem=r}if(o&&(r.addRight(new p("dots.dot",s,1,7)),r.addRight(new p("dots.dot",s,1,5)),s+=6),c&&(a=new p(null,s,1,2,{type:"bar",pitch2:10,linewidth:.6}),r.addRight(a)),"bar_invisible"===t.type&&(a=new p(null,s,1,2,{type:"none",pitch2:10,linewidth:.6}),r.addRight(a)),t.decoration&&this.decoration.createDecoration(e,t.decoration,12,l?3:1,r,0,"down",2,t.positioning,this.hasVocals),l&&(a=new p(null,s+=4,4,2,{type:"bar",pitch2:10,linewidth:4}),r.addRight(a),s+=5),this.partstartelem&&t.endEnding&&(this.partstartelem.anchor2=a,this.partstartelem=null),h&&(a=new p(null,s+=3,1,2,{type:"bar",pitch2:10,linewidth:.6}),r.addRight(a)),u&&(s+=3,r.addRight(new p("dots.dot",s,1,7)),r.addRight(new p("dots.dot",s,1,5))),t.startEnding&&n){var m=this.getTextSize.calc(t.startEnding,"repeatfont","").width;r.minspacing+=m+10,this.partstartelem=new d(t.startEnding,a,null),e.addOther(this.partstartelem)}return r.extraw-=5,r}}(),e.exports=r},function(e,t){var n;!function(){"use strict";(n=function(e,t,n,r){this.type="BeamElem",this.isflat=!!n,this.isgrace=!(!t||"grace"!==t),this.forceup=!!(this.isgrace||t&&"up"===t),this.forcedown=!(!t||"down"!==t),this.elems=[],this.total=0,this.average=6,this.allrests=!0,this.stemHeight=e,this.beams=[],r&&r.duration?(this.duration=r.duration,r.startTriplet&&(this.duration*=r.tripletMultiplier),this.duration=Math.round(1e3*this.duration)/1e3):this.duration=0}).prototype.setHint=function(){this.hint=!0},n.prototype.add=function(e){var t=e.abcelem.averagepitch;void 0!==t&&(e.abcelem.rest||(this.allrests=!1),e.beam=this,this.elems.push(e),this.total=Math.round(this.total+t),(void 0===this.min||e.abcelem.minpitch<this.min)&&(this.min=e.abcelem.minpitch),(void 0===this.max||e.abcelem.maxpitch>this.max)&&(this.max=e.abcelem.maxpitch))},n.prototype.addBeam=function(e){this.beams.push(e)},n.prototype.calcDir=function(){var e,t;if(this.average=(e=this.total,(t=this.elems.length)?e/t:0),this.forceup)this.stemsUp=!0;else if(this.forcedown)this.stemsUp=!1;else{this.stemsUp=this.average<6}for(var n=this.stemsUp?"up":"down",r=0;r<this.elems.length;r++)for(var i=0;i<this.elems[r].heads.length;i++)this.elems[r].heads[i].stemDir=n}}(),e.exports=n},function(e,t){var n=function(e,t){this.startVoice=e,this.type=t};n.prototype.setBottomStaff=function(e){this.endVoice=e,this.startVoice.header&&!this.endVoice.header&&(this.header=this.startVoice.header,delete this.startVoice.header)},n.prototype.continuing=function(e){this.lastContinuedVoice=e},n.prototype.getWidth=function(){return 10},n.prototype.isStartVoice=function(e){return!!(this.startVoice&&this.startVoice.staff&&this.startVoice.staff.voices.length>0&&this.startVoice.staff.voices[0]===e)},e.exports=n},function(e,t,n){var r,i=n(6),a=n(5),s=n(2);!function(){"use strict";r=function(e,t){var n,r=0;e.el_type="clef";var o=new i(e,0,10,"staff-extra clef",t);switch(o.isClef=!0,e.type){case"treble":n="clefs.G";break;case"tenor":case"alto":n="clefs.C";break;case"bass":n="clefs.F";break;case"treble+8":n="clefs.G",r=1;break;case"tenor+8":n="clefs.C",r=1;break;case"bass+8":n="clefs.F",r=1;break;case"alto+8":n="clefs.C",r=1;break;case"treble-8":n="clefs.G",r=-1;break;case"tenor-8":n="clefs.C",r=-1;break;case"bass-8":n="clefs.F",r=-1;break;case"alto-8":n="clefs.C",r=-1;break;case"none":return null;case"perc":n="clefs.perc";break;default:o.addFixed(new s("clef="+e.type,0,0,void 0,{type:"debug"}))}if(n){var c=a.symbolHeightInPitches(n),l=function(e){switch(e){case"clefs.G":return-5;case"clefs.C":case"clefs.F":return-4;case"clefs.perc":return-2;default:return 0}}(n);if(o.addRight(new s(n,5,a.getSymbolWidth(n),e.clefPos,{top:c+e.clefPos+l,bottom:e.clefPos+l})),0!==r){var h=(a.getSymbolWidth(n)-a.getSymbolWidth("8")*(2/3))/2,u=r>0?o.top+3:o.bottom-1,d=r>0?o.top+3:o.bottom-3,f=d-2;"bass-8"===e.type&&(u=3,h=0),o.addRight(new s("8",5+h,a.getSymbolWidth("8")*(2/3),u,{scalex:2/3,scaley:2/3,top:d,bottom:f}))}}return o}}(),e.exports=r},function(e,t,n){var r,i=n(6),a=n(5),s=n(2),o=n(0);!function(){"use strict";r=function(e,t){if(!e.accidentals||0===e.accidentals.length)return null;e.el_type="keySignature";var n=new i(e,0,10,"staff-extra key-signature",t);n.isKeySig=!0;var r=0;return o.each(e.accidentals,(function(e){var t,i=0;switch(e.acc){case"sharp":t="accidentals.sharp",i=-3;break;case"natural":t="accidentals.nat";break;case"flat":t="accidentals.flat",i=-1.2;break;case"quartersharp":t="accidentals.halfsharp",i=-2.5;break;case"quarterflat":t="accidentals.halfflat",i=-1.2;break;default:t="accidentals.flat"}n.addRight(new s(t,r,a.getSymbolWidth(t),e.verticalPos,{thickness:a.symbolHeightInPitches(t),top:e.verticalPos+a.symbolHeightInPitches(t)+i,bottom:e.verticalPos+i})),r+=a.getSymbolWidth(t)+2}),this),n}}(),e.exports=r},function(e,t,n){var r,i=n(5),a=n(2);r=function(e,t,n,r,s,o,c,l,h,u,d,f){var p,m=n.verticalPos,g=0,v=0,b=0;if(void 0===t)e.addFixed(new a("pitch is undefined",0,0,0,{type:"debug"}));else if(""===t)p=new a(null,0,0,m);else{var y=s;if(n.printer_shift){var w="same"===n.printer_shift?1:0;y="down"===r?-i.getSymbolWidth(t)*u+w:i.getSymbolWidth(t)*u-w}var x={scalex:u,scaley:u,thickness:i.symbolHeightInPitches(t)*u};if((p=new a(t,y,i.getSymbolWidth(t)*u,m,x)).stemDir=r,c){var k=m+("down"===r?-7:7)*u;f&&("down"===r&&k>6&&(k=6),"up"===r&&k<6&&(k=6));var A="down"===r?s:s+p.w-.6;e.addRight(new a(c,A,i.getSymbolWidth(c)*u,k,{scalex:u,scaley:u}))}for(v=p.w+h-2+5*l;l>0;l--){var T=1-Math.abs(m)%2;e.addRight(new a("dots.dot",p.w+h-2+5*l,i.getSymbolWidth("dots.dot"),m+T))}}if(p&&(p.highestVert=n.highestVert),n.accidental){var S;switch(n.accidental){case"quartersharp":S="accidentals.halfsharp";break;case"dblsharp":S="accidentals.dblsharp";break;case"sharp":S="accidentals.sharp";break;case"quarterflat":S="accidentals.halfflat";break;case"flat":S="accidentals.flat";break;case"dblflat":S="accidentals.dblflat";break;case"natural":S="accidentals.nat"}for(var M=!1,N=o,C=0;C<d.length;C++)if(m-d[C][0]>=6){d[C][0]=m,N=d[C][1],M=!0;break}!1===M&&(N-=i.getSymbolWidth(S)*u+2,d.push([m,N]),g=i.getSymbolWidth(S)*u+2);var E=i.symbolHeightInPitches(S);e.addExtra(new a(S,N,i.getSymbolWidth(S),m,{scalex:u,scaley:u,top:m+E/2,bottom:m-E/2})),b=i.getSymbolWidth(S)/2}return{notehead:p,accidentalshiftx:g,dotshiftx:v,extraLeft:b}},e.exports=r},function(e,t,n){var r,i=n(6),a=n(5),s=n(2);!function(){"use strict";r=function(e,t){e.el_type="timeSignature";var n=new i(e,0,10,"staff-extra time-signature",t);if("specified"===e.type)for(var r=0,o=0;o<e.value.length;o++)if(0!==o&&(n.addRight(new s("+",r+1,a.getSymbolWidth("+"),6,{thickness:a.symbolHeightInPitches("+")})),r+=a.getSymbolWidth("+")+2),e.value[o].den){for(var c=0,l=0;l<e.value[o].num.length;l++)c+=a.getSymbolWidth(e.value[o].num.charAt(l));var h=0;for(l=0;l<e.value[o].num.length;l++)h+=a.getSymbolWidth(e.value[o].den.charAt(l));var u=Math.max(c,h);n.addRight(new s(e.value[o].num,r+(u-c)/2,c,8,{thickness:a.symbolHeightInPitches(e.value[o].num.charAt(0))})),n.addRight(new s(e.value[o].den,r+(u-h)/2,h,4,{thickness:a.symbolHeightInPitches(e.value[o].den.charAt(0))})),r+=u}else{for(var d=0,f=0;f<e.value[o].num.length;f++)d+=a.getSymbolWidth(e.value[o].num.charAt(f));n.addRight(new s(e.value[o].num,r,d,6,{thickness:a.symbolHeightInPitches(e.value[o].num.charAt(0))})),r+=d}else"common_time"===e.type?n.addRight(new s("timesig.common",0,a.getSymbolWidth("timesig.common"),6,{thickness:a.symbolHeightInPitches("timesig.common")})):"cut_time"===e.type?n.addRight(new s("timesig.cut",0,a.getSymbolWidth("timesig.cut"),6,{thickness:a.symbolHeightInPitches("timesig.cut")})):"tempus_imperfectum"===e.type?n.addRight(new s("timesig.imperfectum",0,a.getSymbolWidth("timesig.imperfectum"),6,{thickness:a.symbolHeightInPitches("timesig.imperfectum")})):"tempus_imperfectum_prolatio"===e.type?n.addRight(new s("timesig.imperfectum2",0,a.getSymbolWidth("timesig.imperfectum2"),6,{thickness:a.symbolHeightInPitches("timesig.imperfectum2")})):"tempus_perfectum"===e.type?n.addRight(new s("timesig.perfectum",0,a.getSymbolWidth("timesig.perfectum"),6,{thickness:a.symbolHeightInPitches("timesig.perfectum")})):"tempus_perfectum_prolatio"===e.type?n.addRight(new s("timesig.perfectum2",0,a.getSymbolWidth("timesig.perfectum2"),6,{thickness:a.symbolHeightInPitches("timesig.perfectum2")})):console.log("time signature:",e);return n}}(),e.exports=r},function(e,t,n){var r,i=n(46),a=n(47),s=n(5),o=n(2),c=n(19);!function(){"use strict";var e=function(e,t,n,r,i){function a(e,t){var a="down"===i?function(){if(0===r.heads.length)return 2;for(var e=r.heads[0].pitch,t=1;t<r.heads.length;t++)e=Math.min(e,r.heads[t].pitch);return e}()+1:function(){if(0===r.heads.length)return 10;for(var e=r.heads[0].pitch,t=1;t<r.heads.length;t++)e=Math.max(e,r.heads[t].pitch);return e}()+9;"down"!==i&&1===t&&a--;var c=n/2;c+="down"===i?-5:3;for(var l=0;l<t;l++)a-=1,r.addFixedX(new o(e,c,s.getSymbolWidth(e),a))}for(var c=0;c<e.length;c++)switch(e[c]){case"/":a("flags.ugrace",1);break;case"//":a("flags.ugrace",2);break;case"///":a("flags.ugrace",3);break;case"////":a("flags.ugrace",4)}};(r=function(){this.startDiminuendoX=void 0,this.startCrescendoX=void 0,this.minTop=12,this.minBottom=0}).prototype.dynamicDecoration=function(e,t,n,r){for(var i,s,o=0;o<t.length;o++)switch(t[o]){case"diminuendo(":this.startDiminuendoX=n,i=void 0;break;case"diminuendo)":i={start:this.startDiminuendoX,stop:n},this.startDiminuendoX=void 0;break;case"crescendo(":this.startCrescendoX=n,s=void 0;break;case"crescendo)":s={start:this.startCrescendoX,stop:n},this.startCrescendoX=void 0}i&&e.addOther(new a(i.start,i.stop,">",r)),s&&e.addOther(new a(s.start,s.stop,"<",r))},r.prototype.createDecoration=function(t,n,r,a,l,h,u,d,f,p){f||(f={ornamentPosition:"above",volumePosition:p?"above":"below",dynamicPosition:p?"above":"below"}),function(e,t,n,r){for(var a=0;a<t.length;a++)switch(t[a]){case"p":case"mp":case"pp":case"ppp":case"pppp":case"f":case"ff":case"fff":case"ffff":case"sfz":case"mf":var s=new i(n,t[a],r);e.addOther(s)}}(t,n,l,f.volumePosition),this.dynamicDecoration(t,n,l,f.dynamicPosition),e(n,0,a,l,u);var m=function(e,t,n,r,i,a,l,h){for(var u,d=0;d<t.length;d++){if("staccato"===t[d]||"tenuto"===t[d]||"accent"===t[d]){var f="scripts."+t[d];if("accent"===t[d]&&(f="scripts.sforzato"),u=void 0===u?"down"===l?n+2:h-2:"down"===l?u+2:u-2,"accent"===t[d])"up"===l?u--:u++;else switch(u){case 2:case 4:case 6:case 8:case 10:"up"===l?u--:u++}n>9&&u++;var p=r/2;"center"!==s.getSymbolAlign(f)&&(p-=s.getSymbolWidth(f)/2),i.addFixedX(new o(f,p,s.getSymbolWidth(f),u))}if("slide"===t[d]&&i.heads[0]){var m=i.heads[0].pitch,g=new o("",-a-15,0,(m-=2)-1),v=new o("",-a-5,0,m+1);i.addFixedX(g),i.addFixedX(v),e.addOther(new c({anchor1:g,anchor2:v,fixedY:!0}))}}return void 0===u&&(u=n),{above:u,below:i.bottom}}(t,n,r,a,l,h,u,d);m.above=Math.max(m.above,this.minTop);!function(e,t,n,r,i,a,c){function l(e,t){"above"===e?r.above+=t:r.below-=t}function h(e){var t;return"above"===e?(t=r.above)<a&&(t=a):(t=r.below)>c&&(t=c),t}function u(e,r){var i=h(r);n.addFixedX(new o(e,t/2,0,i+2,{type:"decoration",klass:"ornament",thickness:3})),l(r,5)}function d(e,r){var i=t/2;"center"!==s.getSymbolAlign(e)&&(i-=s.getSymbolWidth(e)/2);var a=s.symbolHeightInPitches(e)+1,c=h(r);c="above"===r?c+a/2:c-a/2,n.addFixedX(new o(e,i,s.getSymbolWidth(e),c,{klass:"ornament",thickness:s.symbolHeightInPitches(e)})),l(r,a)}for(var f={"+":"scripts.stopped",open:"scripts.open",snap:"scripts.snap",wedge:"scripts.wedge",thumb:"scripts.thumb",shortphrase:"scripts.shortphrase",mediumphrase:"scripts.mediumphrase",longphrase:"scripts.longphrase",trill:"scripts.trill",roll:"scripts.roll",irishroll:"scripts.roll",marcato:"scripts.umarcato",dmarcato:"scripts.dmarcato",umarcato:"scripts.umarcato",turn:"scripts.turn",uppermordent:"scripts.prall",pralltriller:"scripts.prall",mordent:"scripts.mordent",lowermordent:"scripts.mordent",downbow:"scripts.downbow",upbow:"scripts.upbow",fermata:"scripts.ufermata",invertedfermata:"scripts.dfermata",breath:",",coda:"scripts.coda",segno:"scripts.segno"},p=!1,m=0;m<e.length;m++)switch(e[m]){case"0":case"1":case"2":case"3":case"4":case"5":case"D.C.":case"D.S.":u(e[m],i),p=!0;break;case"fine":u("FINE",i),p=!0;break;case"+":case"open":case"snap":case"wedge":case"thumb":case"shortphrase":case"mediumphrase":case"longphrase":case"trill":case"roll":case"irishroll":case"marcato":case"dmarcato":case"turn":case"uppermordent":case"pralltriller":case"mordent":case"lowermordent":case"downbow":case"upbow":case"fermata":case"breath":case"umarcato":case"coda":case"segno":d(f[e[m]],i),p=!0;break;case"invertedfermata":d(f[e[m]],"below"),p=!0;break;case"mark":n.klass="mark"}}(n,a,l,m,f.ornamentPosition,this.minTop,this.minBottom);!function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r]){case"arpeggio":for(var i=t.abcelem.minpitch-1;i<=t.abcelem.maxpitch;i+=2)t.addExtra(new o("scripts.arpeggio",2*-s.getSymbolWidth("scripts.arpeggio")-n,0,i+2,{klass:"ornament",thickness:s.symbolHeightInPitches("scripts.arpeggio")}))}}(n,l,h)}}(),e.exports=r},function(e,t){e.exports=function(e,t,n){this.type="DynamicDecoration",this.anchor=e,this.dec=t,"below"===n?this.volumeHeightBelow=6:this.volumeHeightAbove=6,this.pitch=void 0}},function(e,t){e.exports=function(e,t,n,r){this.type="CrescendoElem",this.anchor1=e,this.anchor2=t,this.dir=n,"above"===r?this.dynamicHeightAbove=6:this.dynamicHeightBelow=6,this.pitch=void 0}},function(e,t){e.exports=function(e,t,n){this.type="EndingElem",this.text=e,this.anchor1=t,this.anchor2=n,this.endingHeightAbove=5,this.pitch=void 0}},function(e,t,n){var r=n(20),i=function(e){this.getTextSize=e,this.voices=[],this.staffs=[],this.brace=void 0,this.bracket=void 0};i.prototype.setLimit=function(e,t){t.specialY[e]&&(t.staff.specialY[e]?t.staff.specialY[e]=Math.max(t.staff.specialY[e],t.specialY[e]):t.staff.specialY[e]=t.specialY[e])},i.prototype.addVoice=function(e,t,n){var r=this.voices.length;this.voices[r]=e,this.staffs[t]?this.staffs[t].voices.push(r):this.staffs[this.staffs.length]={top:10,bottom:2,lines:n,voices:[r],specialY:{tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}},e.staff=this.staffs[t]},i.prototype.setHeight=function(){this.height=r(this)},i.prototype.setWidth=function(e){this.w=e;for(var t=0;t<this.voices.length;t++)this.voices[t].setWidth(e)},i.prototype.setStaffLimits=function(e){e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},e.exports=i},function(e,t,n){var r,i=n(6),a=n(2);!function(){"use strict";(r=function(e,t,n){this.type="TempoElement",this.tempo=e,this.tempo.type="tempo",this.tuneNumber=t,this.totalHeightInPitches=6,this.tempoHeightAbove=this.totalHeightInPitches,this.pitch=void 0,this.tempo.duration&&!this.tempo.suppressBpm&&(this.note=this.createNote(n,e,t))}).prototype.setX=function(e){this.x=e},r.prototype.createNote=function(e,t,n){var r,s,o,c=t.duration[0],l=new i(t,c,1,"tempo",n);c<=1/32?(o="noteheads.quarter",s="flags.u32nd",r=0):c<=1/16?(o="noteheads.quarter",s="flags.u16th",r=0):c<=3/32?(o="noteheads.quarter",s="flags.u16nd",r=1):c<=1/8?(o="noteheads.quarter",s="flags.u8th",r=0):c<=3/16?(o="noteheads.quarter",s="flags.u8th",r=1):c<=1/4?(o="noteheads.quarter",r=0):c<=3/8?(o="noteheads.quarter",r=1):c<=.5?(o="noteheads.half",r=0):c<=3/4?(o="noteheads.half",r=1):c<=1?(o="noteheads.whole",r=0):c<=1.5?(o="noteheads.whole",r=1):c<=2?(o="noteheads.dbl",r=0):(o="noteheads.dbl",r=1);var h,u=e(l,o,{verticalPos:0},"up",0,0,s,r,0,.75,[],!1).notehead;if(l.addHead(u),"noteheads.whole"!==o&&"noteheads.dbl"!==o){var d=u.dx+u.w;h=new a(null,d,0,.25,{type:"stem",pitch2:3.75,linewidth:-.6}),l.addRight(h)}return l}}(),e.exports=r},function(e,t){var n;!function(){"use strict";(n=function(e,t,n){this.type="TripletElem",this.anchor1=t,this.number=e,this.durationClass=("d"+Math.round(1e3*t.parent.durationClass)/1e3).replace(/\./,"-"),this.middleElems=[],this.flatBeams=n.flatBeams}).prototype.isClosed=function(){return!!this.anchor2},n.prototype.middleNote=function(e){this.middleElems.push(e)},n.prototype.setCloseAnchor=function(e){this.anchor2=e,this.anchor1.parent.beam&&(this.endingHeightAbove=4)}}(),e.exports=n},function(e,t){var n=function(e,t){this.children=[],this.beams=[],this.otherchildren=[],this.w=0,this.duplicate=!1,this.voicenumber=e,this.voicetotal=t,this.bottom=7,this.top=7,this.specialY={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0}};n.prototype.addChild=function(e){if("bar"===e.type){for(var t=!0,n=0;t&&n<this.children.length;n++)this.children[n].type.indexOf("staff-extra")<0&&"tempo"!==this.children[n].type&&(t=!1);t||(this.beams.push("bar"),this.otherchildren.push("bar"))}this.children[this.children.length]=e,this.setRange(e)},n.prototype.setLimit=function(e,t){var n=t.specialY;n||(n=t),n[e]&&(this.specialY[e]?this.specialY[e]=Math.max(this.specialY[e],n[e]):this.specialY[e]=n[e])},n.prototype.adjustRange=function(e){void 0!==e.bottom&&(this.bottom=Math.min(this.bottom,e.bottom)),void 0!==e.top&&(this.top=Math.max(this.top,e.top))},n.prototype.setRange=function(e){this.adjustRange(e),this.setLimit("tempoHeightAbove",e),this.setLimit("partHeightAbove",e),this.setLimit("volumeHeightAbove",e),this.setLimit("dynamicHeightAbove",e),this.setLimit("endingHeightAbove",e),this.setLimit("chordHeightAbove",e),this.setLimit("lyricHeightAbove",e),this.setLimit("lyricHeightBelow",e),this.setLimit("chordHeightBelow",e),this.setLimit("volumeHeightBelow",e),this.setLimit("dynamicHeightBelow",e)},n.prototype.addOther=function(e){this.otherchildren.push(e),this.setRange(e)},n.prototype.addBeam=function(e){this.beams.push(e)},n.prototype.setWidth=function(e){this.w=e},e.exports=n},function(e,t,n){var r,i=n(2),a=n(1);!function(){"use strict";r=function(e,t,n,r,s,o){for(var c=0;c<n.chord.length;c++)for(var l=n.chord[c].position,h=n.chord[c].rel_position,u=n.chord[c].name.split("\n"),d=u.length-1;d>=0;d--){var f,p,m,g=u[d],v=0;"left"===l||"right"===l||"below"===l||"above"===l?(p="annotationfont",m="annotation"):(p="gchordfont",m="chord");var b=e.attr(p,m),y=e.calc(g,p,m),w=y.width,x=y.height/a.STEP;switch(l){case"left":v=-(r+=w+7),f=n.averagepitch,t.addExtra(new i(g,v,w+4,f,{type:"text",height:x,dim:b,position:"left"}));break;case"right":v=s+=4,f=n.averagepitch,t.addRight(new i(g,v,w+4,f,{type:"text",height:x,dim:b,position:"right"}));break;case"below":t.addRight(new i(g,0,0,void 0,{type:"text",position:"below",height:x,dim:b,realWidth:w}));break;case"above":t.addRight(new i(g,0,0,void 0,{type:"text",position:"above",height:x,dim:b,realWidth:w}));break;default:if(h){var k=h.y+3*a.STEP;t.addRight(new i(g,v+h.x,0,n.minpitch+k/a.STEP,{position:"relative",type:"text",height:x,dim:b}))}else{var A="above";n.positioning&&n.positioning.chordPosition&&(A=n.positioning.chordPosition),"hidden"!==A&&t.addCentered(new i(g,o/2,w,void 0,{type:"chord",position:A,height:x,dim:b,realWidth:w}))}}}return{roomTaken:r,roomTakenRight:s}}}(),e.exports=r},function(e,t,n){var r=n(1),i=n(55),a=(n(6),function(e){this.paper=new i(e),this.controller=null,this.space=3*r.SPACE,this.padding={},this.reset()});a.prototype.reset=function(){this.paper.clear(),this.y=0,this.abctune=null,this.path=null,this.isPrint=!1,this.initVerticalSpace()},a.prototype.newTune=function(e){this.abctune=e,this.setVerticalSpace(e.formatting),this.isPrint="print"===e.media,this.setPadding(e)},a.prototype.setPaddingOverride=function(e){this.paddingOverride={top:e.paddingtop,bottom:e.paddingbottom,right:e.paddingright,left:e.paddingleft}},a.prototype.setPadding=function(e){function t(t,n,r,i,a){void 0!==e.formatting[r]?t.padding[n]=e.formatting[r]:void 0!==t.paddingOverride[n]?t.padding[n]=t.paddingOverride[n]:t.isPrint?t.padding[n]=i:t.padding[n]=a}t(this,"top","topmargin",38,15),t(this,"bottom","botmargin",38,15),t(this,"left","leftmargin",68,15),t(this,"right","rightmargin",68,15)},a.prototype.adjustNonScaledItems=function(e){this.padding.top/=e,this.padding.bottom/=e,this.padding.left/=e,this.padding.right/=e,this.abctune.formatting.headerfont.size/=e,this.abctune.formatting.footerfont.size/=e},a.prototype.initVerticalSpace=function(){this.spacing={composer:7.56,graceBefore:8.67,graceInside:10.67,graceAfter:16,info:0,lineSkipFactor:1.1,music:7.56,paragraphSkipFactor:.4,parts:11.33,slurHeight:1,staffSeparation:61.33,stemHeight:36.67,subtitle:3.78,systemStaffSeparation:48,text:18.9,title:7.56,top:30.24,vocal:0,words:0}},a.prototype.setVerticalSpace=function(e){void 0!==e.staffsep&&(this.spacing.staffSeparation=4*e.staffsep/3),void 0!==e.composerspace&&(this.spacing.composer=4*e.composerspace/3),void 0!==e.partsspace&&(this.spacing.parts=4*e.partsspace/3),void 0!==e.textspace&&(this.spacing.text=4*e.textspace/3),void 0!==e.musicspace&&(this.spacing.music=4*e.musicspace/3),void 0!==e.titlespace&&(this.spacing.title=4*e.titlespace/3),void 0!==e.sysstaffsep&&(this.spacing.systemStaffSeparation=4*e.sysstaffsep/3),void 0!==e.subtitlespace&&(this.spacing.subtitle=4*e.subtitlespace/3),void 0!==e.topspace&&(this.spacing.top=4*e.topspace/3),void 0!==e.vocalspace&&(this.spacing.vocal=4*e.vocalspace/3),void 0!==e.wordsspace&&(this.spacing.words=4*e.wordsspace/3)},a.prototype.calcY=function(e){return this.y-e*r.STEP},a.prototype.moveY=function(e,t){void 0===t&&(t=1),this.y+=e*t},e.exports=a},function(e,t){var n="http://www.w3.org/2000/svg";function r(e){this.svg=o(),e.appendChild(this.svg)}function i(e,t,n){var r=n-e;return"M "+e+" "+t+" l "+r+" 0 l 0 1 l "+-r+" 0 z "}function a(e,t,n){var r=n-t;return"M "+e+" "+t+" l 0 "+r+" l 1 0 l 0 "+-r+" z "}r.prototype.clear=function(){if(this.svg){var e=this.svg.parentNode;this.svg=o(),e&&(e.innerHTML="",e.appendChild(this.svg))}},r.prototype.setTitle=function(e){var t=document.createElement("title"),n=document.createTextNode(e);t.appendChild(n),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setResponsiveWidth=function(e,t){if(this.svg.setAttribute("viewBox","0 0 "+e+" "+t),this.svg.setAttribute("preserveAspectRatio","xMinYMin meet"),this.svg.removeAttribute("height"),this.svg.removeAttribute("width"),this.svg.style.display="inline-block",this.svg.style.position="absolute",this.svg.style.top="0",this.svg.style.left="0",this.svg.parentNode){var n=this.svg.parentNode.getAttribute("class");n?n.indexOf("abcjs-container")<0&&this.svg.parentNode.setAttribute("class",n+" abcjs-container"):this.svg.parentNode.setAttribute("class","abcjs-container"),this.svg.parentNode.style.display="inline-block",this.svg.parentNode.style.position="relative",this.svg.parentNode.style.width="100%";var r=t/e*100;this.svg.parentNode.style["padding-bottom"]=r+"%",this.svg.parentNode.style["vertical-align"]="middle",this.svg.parentNode.style.overflow="hidden"}},r.prototype.setSize=function(e,t){this.svg.setAttribute("width",e),this.svg.setAttribute("height",t)},r.prototype.setScale=function(e){1!==e?(this.svg.style.transform="scale("+e+","+e+")",this.svg.style["-ms-transform"]="scale("+e+","+e+")",this.svg.style["-webkit-transform"]="scale("+e+","+e+")",this.svg.style["transform-origin"]="0 0",this.svg.style["-ms-transform-origin-x"]="0",this.svg.style["-ms-transform-origin-y"]="0",this.svg.style["-webkit-transform-origin-x"]="0",this.svg.style["-webkit-transform-origin-y"]="0"):(this.svg.style.transform="",this.svg.style["-ms-transform"]="",this.svg.style["-webkit-transform"]="")},r.prototype.insertStyles=function(e){var t=document.createElementNS(n,"style");t.textContent=e,this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.setParentStyles=function(e){for(var t in e)e.hasOwnProperty(t)&&this.svg.parentNode&&(this.svg.parentNode.style[t]=e[t]);this.dummySvg&&(document.querySelector("body").removeChild(this.dummySvg),this.dummySvg=null)},r.prototype.rect=function(e){var t=[],n=e.x,r=e.y,s=e.x+e.width,o=e.y+e.height;return t.push(i(n,r,s)),t.push(i(n,o,s)),t.push(a(s,r,o)),t.push(a(n,o,r)),this.path({path:t.join(" "),stroke:"none"})},r.prototype.dottedLine=function(e){var t=document.createElementNS(n,"line");t.setAttribute("x1",e.x1),t.setAttribute("x2",e.x2),t.setAttribute("y1",e.y1),t.setAttribute("y2",e.y2),t.setAttribute("stroke",e.stroke),t.setAttribute("stroke-dasharray","5,5"),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.rectBeneath=function(e){var t=document.createElementNS(n,"rect");t.setAttribute("x",e.x),t.setAttribute("width",e.width),t.setAttribute("y",e.y),t.setAttribute("height",e.height),e.stroke&&t.setAttribute("stroke",e.stroke),e["stroke-opacity"]&&t.setAttribute("stroke-opacity",e["stroke-opacity"]),e.fill&&t.setAttribute("fill",e.fill),e["fill-opacity"]&&t.setAttribute("fill-opacity",e["fill-opacity"]),this.svg.insertBefore(t,this.svg.firstChild)},r.prototype.text=function(e,t,r){var i=document.createElementNS(n,"text");for(var a in t)t.hasOwnProperty(a)&&i.setAttribute(a,t[a]);for(var s=(""+e).split("\n"),o=0;o<s.length;o++){var c=document.createElementNS(n,"tspan");c.textContent=s[o],c.setAttribute("x",t.x?t.x:0),0!==o&&c.setAttribute("dy","1.2em"),i.appendChild(c)}return r?r.appendChild(i):this.append(i),i},r.prototype.guessWidth=function(e,t){var n,r=this.createDummySvg(),i=this.text(e,t,r);try{n=i.getBBox(),n=isNaN(n.height)||!n.height?{width:t["font-size"]/2,height:t["font-size"]+2}:{width:n.width,height:n.height}}catch(e){n={width:t["font-size"]/2,height:t["font-size"]+2}}return r.removeChild(i),n},r.prototype.createDummySvg=function(){if(!this.dummySvg){this.dummySvg=o();this.dummySvg.setAttribute("style",["display: block !important;","height: 1px;","width: 1px;","position: absolute;"].join("")),document.querySelector("body").appendChild(this.dummySvg)}return this.dummySvg};var s={};function o(){var e=document.createElementNS(n,"svg");return e.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("role","img"),e}r.prototype.getTextSize=function(e,t,n){if("number"==typeof e&&(e=""+e),!e||e.match(/^\s+$/))return{width:0,height:0};var r;if(e.length<20&&(r=e+JSON.stringify(t),s[r]))return s[r];var i,a=!n;n||(n=this.text(e,t));try{i=n.getBBox(),i=isNaN(i.height)||!i.height?this.guessWidth(e,t):{width:i.width,height:i.height}}catch(n){i=this.guessWidth(e,t)}return a&&(this.currentGroup?this.currentGroup.removeChild(n):this.svg.removeChild(n)),r&&(s[r]=i),i},r.prototype.openGroup=function(e){e=e||{};var t=document.createElementNS(n,"g");return e.klass&&t.setAttribute("class",e.klass),e.fill&&t.setAttribute("fill",e.fill),e.stroke&&t.setAttribute("stroke",e.stroke),e.prepend?this.svg.insertBefore(t,this.svg.firstChild):this.svg.appendChild(t),this.currentGroup=t,t},r.prototype.closeGroup=function(){var e=this.currentGroup;return this.currentGroup=null,e},r.prototype.path=function(e){var t=document.createElementNS(n,"path");for(var r in e)e.hasOwnProperty(r)&&("path"===r?t.setAttributeNS(null,"d",e.path):t.setAttributeNS(null,r,e[r]));return this.append(t),t},r.prototype.pathToBack=function(e){var t=document.createElementNS(n,"path");for(var r in e)e.hasOwnProperty(r)&&("path"===r?t.setAttributeNS(null,"d",e.path):t.setAttributeNS(null,r,e[r]));return this.prepend(t),t},r.prototype.append=function(e){this.currentGroup?this.currentGroup.appendChild(e):this.svg.appendChild(e)},r.prototype.prepend=function(e){this.currentGroup?this.currentGroup.appendChild(e):this.svg.insertBefore(e,this.svg.firstChild)},r.prototype.setAttributeOnElement=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttributeNS(null,n,t[n])},r.prototype.moveElementToChild=function(e,t){e.appendChild(t)},e.exports=r},function(e,t){e.exports=function(e,t,n,r,i,a){var s;this.rows=[],t&&this.rows.push({move:t});var o=n.calc("textfont","defined-text");if(""===e)this.rows.push({move:2*o.attr["font-size"]});else if("string"==typeof e)this.rows.push({move:o.attr["font-size"]/2}),this.rows.push({left:r,text:e,font:"textfont",klass:"defined-text",anchor:"start",absElemType:"freeText"}),s=a.calc(e,"textfont","defined-text"),this.rows.push({move:s.height});else for(var c="textfont",l=!1,h=0;h<e.length;h++){c=e[h].font?e[h].font:"textfont",e[h].center&&(l=!0);var u=l?"middle":"start",d=l?i/2:r;this.rows.push({left:d,text:e[h].text,font:c,klass:"defined-text",anchor:u,absElemType:"freeText"}),s=a.calc(e[h].text,c,"defined-text"),this.rows.push({move:s.height})}}},function(e,t){e.exports=function(e,t,n){this.rows=[],e&&this.rows.push({move:e}),this.rows.push({separator:t}),n&&this.rows.push({move:n})}},function(e,t){e.exports=function(e,t,n,r,i,a){this.rows=[],e&&this.rows.push({move:e});var s=t.titleleft?"start":"middle";t.titleleft,this.rows.push({left:r,text:n,font:"subtitlefont",klass:"text subtitle",anchor:s});var o=a.calc(n,"subtitlefont","text subtitle");this.rows.push({move:o.height})}},function(e,t){function n(e,t,n,r,i,a,s,o){if(this.rows=[],e.header&&i){var c=o.calc("XXXX","headerfont","abcjs-header abcjs-meta-top").height;this.addTextIf(a,e.header.left,"headerfont","header meta-top",-c,0,"start",o),this.addTextIf(a+r/2,e.header.center,"headerfont","header meta-top",-c,null,"middle",o),this.addTextIf(a+r,e.header.right,"headerfont","header meta-top",-c,null,"end",o)}i&&this.rows.push({move:s.top});var l=t.titleleft?"start":"middle",h=t.titleleft?a:a+r/2;if(e.title&&this.addTextIf(h,e.title,"titlefont","title meta-top",s.title,0,l,o,"title"),n[0]&&n[0].subtitle&&this.addTextIf(h,n[0].subtitle,"subtitlefont","text meta-top subtitle",s.subtitle,0,l,o,"subtitle"),e.rhythm||e.origin||e.composer){if(this.rows.push({move:s.composer}),e.rhythm&&e.rhythm.length>0){var u=!(!e.composer&&!e.origin);this.addTextIf(a,e.rhythm,"infofont","meta-top rhythm",0,null,"start",o,"rhythm",u)}var d="";e.composer&&(d+=e.composer),e.origin&&(d+=" ("+e.origin+")"),d.length>0&&this.addTextIf(a+r,d,"composerfont","meta-top composer",0,null,"end",o,"composer")}e.author&&e.author.length>0&&this.addTextIf(a+r,e.author,"composerfont","meta-top author",0,0,"end",o,"author"),e.partOrder&&e.partOrder.length>0&&this.addTextIf(a,e.partOrder,"partsfont","meta-top part-order",0,0,"start",o,"partOrder")}n.prototype.addTextIf=function(e,t,n,r,i,a,s,o,c,l){if(t&&(i&&this.rows.push({move:i}),this.rows.push({left:e,text:t,font:n,klass:r,anchor:s,absElemType:c}),!l)){var h=o.calc(t,n,r);this.rows.push({move:h.height}),a&&this.rows.push({move:a})}},e.exports=n},function(e,t){function n(e,t,n,r,i,a){this.rows=[],e.unalignedWords&&e.unalignedWords.length>0&&this.unalignedWords(e.unalignedWords,r,i,a),this.extraText(e,r,i,a),e.footer&&n&&this.footer(e.footer,r,a)}n.prototype.unalignedWords=function(e,t,n,r){var i="meta-bottom unaligned-words";this.rows.push({startGroup:"unalignedWords",klass:"abcjs-meta-bottom abcjs-unaligned-words"});var a=r.calc("i","wordsfont",i);this.rows.push({move:n.words});for(var s=0;s<e.length;s++)if(""===e[s])this.rows.push({move:a.height});else if("string"==typeof e[s])this.addTextIf(t+50,e[s],"wordsfont",i,0,0,"start",r,null,!0);else{for(var o=0,c=0,l=0;l<e[s].length;l++){var h=e[s][l],u=h.font?h.font:"wordsfont";this.rows.push({left:t+50+c,text:h.text,font:u,anchor:"start"});var d=r.calc(h.text,"wordsfont",i);o=Math.max(o,d.height),c+=d.width," "===h.text[h.text.length-1]&&(c+=a.width)}this.rows.push({move:o})}this.rows.push({move:2*a.height}),this.rows.push({endGroup:"unalignedWords",absElemType:"unalignedWords"})},n.prototype.extraText=function(e,t,n,r){var i="";e.book&&(i+="Book: "+e.book+"\n"),e.source&&(i+="Source: "+e.source+"\n"),e.discography&&(i+="Discography: "+e.discography+"\n"),e.notes&&(i+="Notes: "+e.notes+"\n"),e.transcription&&(i+="Transcription: "+e.transcription+"\n"),e.history&&(i+="History: "+e.history+"\n"),e["abc-copyright"]&&(i+="Copyright: "+e["abc-copyright"]+"\n"),e["abc-creator"]&&(i+="Creator: "+e["abc-creator"]+"\n"),e["abc-edited-by"]&&(i+="Edited By: "+e["abc-edited-by"]+"\n"),i.length>0&&this.addTextIf(t,i,"historyfont","meta-bottom extra-text",n.info,0,"start",r,"extraText")},n.prototype.footer=function(e,t,n){var r="header meta-bottom",i="footerfont";this.rows.push({startGroup:"footer",klass:r}),this.addTextIf(paddingLeft,e.left,i,r,0,0,"start",n),this.addTextIf(paddingLeft+width/2,e.center,i,r,0,0,"middle",n),this.addTextIf(paddingLeft+width,e.right,i,r,0,0,"end",n)},n.prototype.addTextIf=function(e,t,n,r,i,a,s,o,c,l){if(t){i&&this.rows.push({move:i});var h={left:e,text:t,font:n,anchor:s};c&&(h.absElemType=c),l||(h.klass=r),this.rows.push(h);var u=o.calc("A",n,r),d=t.split("\n").length;"\n"===t[t.length-1]&&d--;var f=1.1*u.height*d;this.rows.push({move:Math.round(f)}),a&&this.rows.push({move:a})}},e.exports=n},function(e,t,n){var r=n(1);function i(e){"keyboard"===this.dragMechanism&&0!==this.dragYStep&&this.dragTarget&&d.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragYStep=0}function a(e){switch(e.keyCode){case 38:case 40:e.preventDefault()}}function s(e){var t=!1,n=e.target.dataset.index;switch(e.keyCode){case 13:case 32:t=!0,this.dragTarget=this.selectables[n],this.dragIndex=n,this.dragMechanism="keyboard",h.bind(this)();break;case 38:t=!0,this.dragTarget=this.selectables[n],this.dragIndex=n,this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep--,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*r.STEP+")"));break;case 40:t=!0,this.dragTarget=this.selectables[n],this.dragIndex=n,this.dragMechanism="keyboard",this.dragTarget.isDraggable&&(this.dragging&&this.dragTarget.isDraggable&&this.dragTarget.absEl.highlight(void 0,this.dragColor),this.dragYStep++,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+this.dragYStep*r.STEP+")"));break;case 9:0!==this.dragYStep&&h.bind(this)()}t&&e.preventDefault()}function o(e,t){var n,r,i,a=function(e,t){for(var n=0;n<e.length;n++)if(t===e[n].svgEl)return n;return-1}(e.selectables,function(e){if("svg"===e.tagName)return e;for(var t=e.getAttribute("selectable");!t;)t="svg"===(e=e.parentElement).tagName||e.getAttribute("selectable");return e}(t.target));return a>=0?(n=(i=function(e,t){return e.x<=t.offsetX&&e.x+e.width>=t.offsetX&&e.y<=t.offsetY&&e.y+e.height>=t.offsetY?[t.offsetX,t.offsetY]:[t.layerX,t.layerY]}(e.selectables[a].svgEl.getBBox(),t))[0],r=i[1]):(i=function(e,t){var n,r,i=1,a=1;return t.viewBox.baseVal&&(0!==t.viewBox.baseVal.width&&(i=t.viewBox.baseVal.width/t.clientWidth),0!==t.viewBox.baseVal.height&&(a=t.viewBox.baseVal.height/t.clientHeight)),"svg"===e.target.tagName?(n=e.offsetX,r=e.offsetY):(n=e.layerX,r=e.layerY),[n*=i,r*=a]}(t,e.renderer.paper.svg),a=function(e,t,n){for(var r=9999999,i=-1,a=0;a<e.selectables.length&&r>0;a++){var s=e.selectables[a];if(e.getDim(s),s.dim.left<t&&s.dim.right>t&&s.dim.top<n&&s.dim.bottom>n)i=a,r=0;else if(s.dim.top<n&&s.dim.bottom>n){var o=Math.min(Math.abs(s.dim.left-t),Math.abs(s.dim.right-t));o<r&&(r=o,i=a)}else if(s.dim.left<t&&s.dim.right>t){var c=Math.min(Math.abs(s.dim.top-n),Math.abs(s.dim.bottom-n));c<r&&(r=c,i=a)}else{var l=Math.abs(t-s.dim.left)>Math.abs(t-s.dim.right)?Math.abs(t-s.dim.right):Math.abs(t-s.dim.left),h=Math.abs(n-s.dim.top)>Math.abs(n-s.dim.bottom)?Math.abs(n-s.dim.bottom):Math.abs(n-s.dim.top),u=Math.sqrt(l*l+h*h);u<r&&(r=u,i=a)}}return i>=0&&r<=12?i:-1}(e,n=i[0],r=i[1])),{x:n,y:r,clickedOn:a}}function c(e){var t=o(this,e);t.clickedOn>=0&&0===e.button&&(this.dragTarget=this.selectables[t.clickedOn],this.dragIndex=t.clickedOn,this.dragMechanism="mouse",this.dragMouseStart={x:t.x,y:t.y},this.dragging&&this.dragTarget.isDraggable&&(!function(e,t){if(e){var n=g(e.svg);n[t]=!0,v(e.svg,n)}}(this.renderer.paper,"abcjs-dragging-in-progress"),this.dragTarget.absEl.highlight(void 0,this.dragColor)))}function l(e){if(this.dragTarget&&this.dragging&&this.dragTarget.isDraggable&&"mouse"===this.dragMechanism){var t=o(this,e),n=Math.round((t.y-this.dragMouseStart.y)/r.STEP);n!==this.dragYStep&&(this.dragYStep=n,this.dragTarget.svgEl.setAttribute("transform","translate(0,"+n*r.STEP+")"))}}function h(e){this.dragTarget&&(p.bind(this)(),this.dragTarget.absEl&&this.dragTarget.absEl.highlight&&(this.selected=[this.dragTarget.absEl],this.dragTarget.absEl.highlight(void 0,this.selectionColor)),d.bind(this)(this.dragTarget,this.dragYStep,this.selectables.length,this.dragIndex,e),this.dragTarget.svgEl&&this.dragTarget.svgEl.focus&&(this.dragTarget.svgEl.focus(),this.dragTarget=null,this.dragIndex=-1),function(e,t){if(e){var n=g(e.svg);delete n[t],v(e.svg,n)}}(this.renderer.svg,"abcjs-dragging-in-progress"))}function u(e){e>=0&&e<this.selectables.length&&(this.dragTarget=this.selectables[e],this.dragIndex=e,this.dragMechanism="keyboard",h.bind(this)())}function d(e,t,n,r,i){var a=[];if(e.absEl.elemset){for(var s={},o=0;o<e.absEl.elemset.length;o++){var c=e.absEl.elemset[o];if(c)for(var l=c.getAttribute("class").split(" "),h=0;h<l.length;h++)s[l[h]]=!0}for(var d=0;d<Object.keys(s).length;d++)a.push(Object.keys(s)[d])}for(var p={},m=0;m<a.length;m++)f(a[m],"abcjs-v",p,"voice"),f(a[m],"abcjs-l",p,"line"),f(a[m],"abcjs-m",p,"measure");e.staffPos&&(p.staffPos=e.staffPos);for(var g=0;g<this.listeners.length;g++)this.listeners[g](e.absEl.abcelem,e.absEl.tuneNumber,a.join(" "),p,{step:t,max:n,index:r,setSelection:u.bind(this)},i)}function f(e,t,n,r){if(0===e.indexOf(t)){var i=e.replace(t,""),a=parseInt(i,10);""+a===i&&(n[r]=a)}}function p(){for(var e=0;e<this.selected.length;e++)this.selected[e].unhighlight();this.selected=[]}function m(e,t){p.bind(this)();for(var n=0;n<this.staffgroups.length;n++)for(var r=this.staffgroups[n].voices,i=0;i<r.length;i++)for(var a=r[i].children,s=0;s<a.length;s++){var o=a[s].abcelem.startChar,c=a[s].abcelem.endChar;(t>o&&e<c||t===e&&t===c)&&(this.selected[this.selected.length]=a[s],a[s].highlight(void 0,this.selectionColor))}}function g(e){var t=e.getAttribute("class");t||(t="");for(var n=t.split(" "),r={},i=0;i<n.length;i++)r[n[i]]=!0;return r}function v(e,t){var n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(r);e.setAttribute("class",n.join(" "))}e.exports=function(e){if(e.rangeHighlight=m,e.dragging)for(var t=0;t<e.selectables.length;t++){var n=e.selectables[t];n.selectable&&(n.svgEl.setAttribute("tabindex",0),n.svgEl.setAttribute("data-index",t),n.svgEl.addEventListener("keydown",a.bind(e)),n.svgEl.addEventListener("keyup",s.bind(e)),n.svgEl.addEventListener("focus",i.bind(e)))}e.renderer.paper.svg.addEventListener("mousedown",c.bind(e)),e.renderer.paper.svg.addEventListener("mousemove",l.bind(e)),e.renderer.paper.svg.addEventListener("mouseup",h.bind(e))}},function(e,t,n){var r,i=n(63),a=n(66),s=n(67),o=n(69);!function(){"use strict";r=function(t,n,r,s){var o,c,l=r;for(o=0;o<n.lines.length;o++)(c=n.lines[o]).staff&&(e(t,r,s,c.staffGroup,n.formatting,o===n.lines.length-1,!1),c.staffGroup.w>l&&(l=c.staffGroup.w));for(o=0;o<n.lines.length;o++)if((c=n.lines[o]).staffGroup&&c.staffGroup.voices){for(var h=0;h<c.staffGroup.voices.length;h++)i(c.staffGroup.voices[h]);a(t,c.staffGroup)}for(o=0;o<n.lines.length;o++)(c=n.lines[o]).staffGroup&&c.staffGroup.setHeight();return l};var e=function(e,n,r,i,a,c,l){for(var h=o(e,i.getTextSize,i.voices,i.brace,i.bracket),u=r,d=0;d<8;d++){var f=s(u,e,l,i,h);if(u=t(c,!!a.stretchlast&&a.stretchlast,n+e.padding.left,i.w,u,f.spacingUnits,f.minSpace),l&&console.log("setXSpace",d,i.w,u,i.minspace),null===u)break}!function(e){for(var t=0;t<e.length;t++)for(var n=e[t],r=1;r<n.children.length-1;r++){var i=n.children[r];if(i.abcelem.rest&&("whole"===i.abcelem.rest.type||"multimeasure"===i.abcelem.rest.type)){var a=n.children[r-1],s=n.children[r+1];i.center(a,s)}}}(i.voices)};function t(e,t,n,r,i,a,s){return e&&r/n<.66&&!t||Math.abs(n-r)<2?null:a>0?((i=(n-(r-a*i))/a)*s>50&&(i=50/s),i):null}}(),e.exports=r},function(e,t,n){var r=n(64),i=n(12),a=n(65);function s(e){for(var t=0;t<e.elems.length;t++){var n=e.elems[t];if(n.top)for(var r=l(n,e),i=0;i<n.children.length;i++){var a=n.children[i];if("ornament"===a.klass&&a.bottom-1.5<r){var s=r-a.bottom+1.5;a.bottom+=s,a.top+=s,a.pitch+=s,r=n.top=a.top}}}}function o(e,t){var n=t.getChordDim();if(n){for(var r=0;r<e.length;r++){if(e[r]<n.left)return r>0&&t.putChordInLane(r),void(e[r]=n.right)}e.push(n.right),t.putChordInLane(e.length-1)}}function c(e){for(var t=0,n=0;n<e.children.length;n++){e.children[n].chordHeightBelow&&t++}return t}function l(e,t){return t=t.beams[0],i(t.startX,t.startY,t.endX,t.endY,e.x)}e.exports=function(e){for(var t=0;t<e.beams.length;t++)if("BeamElem"===e.beams[t].type){r(e.beams[t]),s(e.beams[t]);for(var n=0;n<e.beams[t].elems.length;n++)e.adjustRange(e.beams[t].elems[n])}for(e.staff.specialY.chordLines=function(e){var t,n,r,i=[0],a=[0];for(t=0;t<e.length;t++){for(n=0;n<e[t].children.length;n++)(r=e[t].children[n]).chordHeightAbove&&o(i,r);for(n=e[t].children.length-1;n>=0;n--)(r=e[t].children[n]).chordHeightBelow&&o(a,r)}(i.length>1||a.length>1)&&function(e,t,n){for(var r=0;r<e.length;r++){c(e[r]);for(var i=0;i<e[r].children.length;i++){var a=e[r].children[i];a.chordHeightAbove&&a.invertLane(t)}}}(e,i.length);return{above:i.length,below:a.length}}(e.children),t=0;t<e.otherchildren.length;t++){var i=e.otherchildren[t];"TripletElem"===i.type&&(a(i),e.adjustRange(i))}e.staff.top=Math.max(e.staff.top,e.top),e.staff.bottom=Math.min(e.staff.bottom,e.bottom)}},function(e,t,n){var r=n(2),i=n(1),a=n(12),s=function(e){return void 0===e?0:Math.floor(Math.log(e)/Math.log(2))};function o(e,t,n,r){if(!e.children)return r;for(var i=0;i<e.children.length;i++){var a=e.children[i];t&&void 0!==a.top&&"flags.ugrace"===a.c?r=Math.max(r,a.top-n):t||void 0===a.bottom||"flags.ugrace"!==a.c||(r=Math.max(r,n-a.bottom+7))}return r}function c(e,t,n){var r=t.heads[e?0:t.heads.length-1],i=n.heads[e?0:n.heads.length-1],a=r.x;e&&(a+=r.w-.6);var s=i.x;return[a,s+=e?i.w:.6]}e.exports=function(e){if(0!==e.elems.length&&!e.allrests){var t=function(e,t){var n=e?i.STEP:-i.STEP;t&&(n*=.4);return n}(e.stemsUp,e.isgrace),n=e.elems[0],l=e.elems[e.elems.length-1],h=0,u=e.stemsUp?n.abcelem.maxpitch:n.abcelem.minpitch;h=o(n,e.stemsUp,u,h),h=o(l,e.stemsUp,u,h),h=Math.max(e.stemHeight,h+3);var d=function(e,t,n,r,i,a,s,o,c,l){var h=n-2,u=n-2,d=Math.round(r?Math.max(e+h,c+u):Math.min(e-h,o-u)),f=function(e,t,n,r){if(r)return 0;var i=e-t,a=n/2;i>a&&(i=a);i<-a&&(i=-a);return i}(i,a,t,s),p=d+Math.floor(f/2),m=d+Math.floor(-f/2);l||(r&&d<6||!r&&d>6)&&(p=6,m=6);return[p,m]}(e.average,e.elems.length,h,e.stemsUp,n.abcelem.averagepitch,l.abcelem.averagepitch,e.isflat,e.min,e.max,e.isgrace),f=c(e.stemsUp,n,l);e.addBeam({startX:f[0],endX:f[1],startY:d[0],endY:d[1],dy:t});for(var p=function(e,t,n,r,i){for(var o=[],l=[],h=0;h<e.length;h++){var u=e[h];if(!u.abcelem.rest){var d=u.heads[t?0:u.heads.length-1],f=d.x+(t?d.w:0),p=a(n.startX,n.startY,n.endX,n.endY,f),m=t?-1.5:1.5;r&&(m=2*m/3);var g=u.abcelem.duration;0===g&&(g=.25);for(var v=s(g);v<-3;v++){var b=-4-v;if(l[b]?l[b].single=!1:l[b]={x:f+(t?-.6:0),y:p+m*(b+1),durlog:v,single:!0},h>0&&u.abcelem.beambr&&u.abcelem.beambr<=b+1){l[b].split||(l[b].split=[l[b].x]);var y=c(t,e[h-1],u);l[b].split[l[b].split.length-1]>=y[0]&&(y[0]+=u.w),l[b].split.push(y[0]),l[b].split.push(y[1])}}for(var w=l.length-1;w>=0;w--)if(h===e.length-1||s(e[h+1].abcelem.duration)>-w-4){var x=f,k=p+m*(w+1);l[w].single&&(x=0===h?f+5:f-5,k=a(n.startX,n.startY,n.endX,n.endY,x)+m*(w+1));var A={startX:l[w].x,endX:x,startY:l[w].y,endY:k,dy:i};if(void 0!==l[w].split){var T=l[w].split;A.endX<=T[T.length-1]&&(T[T.length-1]-=u.w),T.push(A.endX),A.split=l[w].split}o.push(A),l=l.slice(0,w)}}}return o}(e.elems,e.stemsUp,e.beams[0],e.isgrace,t),m=0;m<p.length;m++)e.addBeam(p[m]);!function(e,t,n,s,o){for(var c=0;c<e.length;c++){var l=e[c];if(!l.abcelem.rest){var h=!l.addExtra,u=h?o:l,d=l.heads[t?0:l.heads.length-1],f=d.pitch+(t?.2:-.2),p=t?d.w:0,m=d.x+p,g=a(n.startX,n.startY,n.endX,n.endY,m),v=t?-.6:.6;t||(g-=s/2/i.STEP),h&&(p+=l.heads[0].dx),"noteheads.slash.quarter"===d.c&&(t?f+=1:f-=1);var b=new r(null,p,0,f,{type:"stem",pitch2:g,linewidth:v});b.setX(u.x),u.addRight(b)}}}(e.elems,e.stemsUp,e.beams[0],t,e.mainNote)}}},function(e,t,n){var r=n(12);function i(e){return e.stemsUp}e.exports=function(e){if(e.anchor1&&e.anchor2){e.hasBeam=!!e.anchor1.parent.beam&&e.anchor1.parent.beam===e.anchor2.parent.beam;var t=e.anchor1.parent.beam;if(!e.hasBeam||t.elems[0]===e.anchor1.parent&&t.elems[t.elems.length-1]===e.anchor2.parent||(e.hasBeam=!1),e.hasBeam){var n=i(t)?e.anchor1.x+e.anchor1.w:e.anchor1.x;e.yTextPos=function(e,t,n){if(0===n.beams.length)return 0;n=n.beams[0];var i=e+(t-e)/2;return r(n.startX,n.startY,n.endX,n.endY,i)}(n,e.anchor2.x,t),e.yTextPos+=i(t)?3:-2,e.xTextPos=(o=n,c=e.anchor2.x,o+(c-o)/2),e.top=e.yTextPos+1,e.bottom=e.yTextPos-2,i(t)&&(e.endingHeightAbove=4)}else{e.startNote=Math.max(e.anchor1.parent.top,9)+4,e.endNote=Math.max(e.anchor2.parent.top,9)+4,"rest"===e.anchor1.parent.type&&"rest"!==e.anchor2.parent.type?e.startNote=e.endNote:"rest"===e.anchor2.parent.type&&"rest"!==e.anchor1.parent.type&&(e.endNote=e.startNote);for(var a=0,s=0;s<e.middleElems.length;s++)a=Math.max(a,e.middleElems[s].top);((a+=4)>e.startNote||a>e.endNote)&&(e.startNote=a,e.endNote=a),e.flatBeams&&(e.startNote=Math.max(e.startNote,e.endNote),e.endNote=Math.max(e.startNote,e.endNote)),e.yTextPos=e.startNote+(e.endNote-e.startNote)/2,e.xTextPos=e.anchor1.x+(e.anchor2.x+e.anchor2.w-e.anchor1.x)/2,e.top=e.yTextPos+1}}var o,c;delete e.middleElems,delete e.flatBeams}},function(e,t,n){var r=n(1),i=1;function a(e,t,n,r){if(e.specialY[n]){var a=e.specialY[n];r&&(a*=r),e.top+=a+i,t[n]=e.top}}function s(e,t,n){var r,i;for(r=0;r<t.children.length;r++)o(e,i=t.children[r],n);for(r=0;r<t.otherchildren.length;r++)switch((i=t.otherchildren[r]).type){case"CrescendoElem":c(e,i);break;case"DynamicDecoration":l(e,i);break;case"EndingElem":h(e,i)}}function o(e,t,n){for(var r=0;r<t.children.length;r++){var i=t.children[r];for(var a in t.specialY)t.specialY.hasOwnProperty(a)&&i[a]&&(i.pitch=e[a],void 0===i.top&&("TempoElement"===i.type?u(e,i):d(e,i,n),t.pushTop(i.top),t.pushBottom(i.bottom)))}}function c(e,t){t.dynamicHeightAbove?t.pitch=e.dynamicHeightAbove:t.pitch=e.dynamicHeightBelow}function l(e,t){t.volumeHeightAbove?t.pitch=e.volumeHeightAbove:t.pitch=e.volumeHeightBelow}function h(e,t){t.pitch=e.endingHeightAbove-2}function u(e,t){if(t.pitch=e.tempoHeightAbove,t.top=e.tempoHeightAbove,t.bottom=e.tempoHeightAbove,t.note){var n=t.pitch-t.totalHeightInPitches+1;t.note.top=n,t.note.bottom=n;for(var r=0;r<t.note.children.length;r++){var i=t.note.children[r];i.top+=n,i.bottom+=n,i.pitch+=n,void 0!==i.pitch2&&(i.pitch2+=n)}}}function d(e,t,n){switch(t.type){case"part":t.top=e.partHeightAbove+t.height,t.bottom=e.partHeightAbove;break;case"text":case"chord":t.chordHeightAbove?(t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove):(t.top=e.chordHeightBelow,t.bottom=e.chordHeightBelow);break;case"lyric":t.lyricHeightAbove?(t.top=e.lyricHeightAbove,t.bottom=e.lyricHeightAbove):(t.top=e.lyricHeightBelow+n.vocal/r.STEP,t.bottom=e.lyricHeightBelow+n.vocal/r.STEP,t.pitch-=n.vocal/r.STEP);break;case"debug":t.top=e.chordHeightAbove,t.bottom=e.chordHeightAbove}void 0!==t.pitch&&void 0!==t.top||console.error("RelativeElement position not set.",t.type,t.pitch,t.top,e)}e.exports=function(e,t){for(var n,o=0;o<t.staffs.length;o++){var c=t.staffs[o],l={tempoHeightAbove:0,partHeightAbove:0,volumeHeightAbove:0,dynamicHeightAbove:0,endingHeightAbove:0,chordHeightAbove:0,lyricHeightAbove:0,lyricHeightBelow:0,chordHeightBelow:0,volumeHeightBelow:0,dynamicHeightBelow:0};if(e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.originalTop=c.top,c.originalBottom=c.bottom),a(c,l,"lyricHeightAbove"),a(c,l,"chordHeightAbove",c.specialY.chordLines.above),c.specialY.endingHeightAbove&&(c.specialY.chordHeightAbove?c.top+=2:c.top+=c.specialY.endingHeightAbove+i,l.endingHeightAbove=c.top),c.specialY.dynamicHeightAbove&&c.specialY.volumeHeightAbove?(c.top+=Math.max(c.specialY.dynamicHeightAbove,c.specialY.volumeHeightAbove)+i,l.dynamicHeightAbove=c.top,l.volumeHeightAbove=c.top):(a(c,l,"dynamicHeightAbove"),a(c,l,"volumeHeightAbove")),a(c,l,"partHeightAbove"),a(c,l,"tempoHeightAbove"),c.specialY.lyricHeightBelow&&(c.specialY.lyricHeightBelow+=e.spacing.vocal/r.STEP,l.lyricHeightBelow=c.bottom,c.bottom-=c.specialY.lyricHeightBelow+i),c.specialY.chordHeightBelow){l.chordHeightBelow=c.bottom;var h=c.specialY.chordHeightBelow;c.specialY.chordLines.below&&(h*=c.specialY.chordLines.below),c.bottom-=h+i}c.specialY.volumeHeightBelow&&c.specialY.dynamicHeightBelow?(l.volumeHeightBelow=c.bottom,l.dynamicHeightBelow=c.bottom,c.bottom-=Math.max(c.specialY.volumeHeightBelow,c.specialY.dynamicHeightBelow)+i):c.specialY.volumeHeightBelow?(l.volumeHeightBelow=c.bottom,c.bottom-=c.specialY.volumeHeightBelow+i):c.specialY.dynamicHeightBelow&&(l.dynamicHeightBelow=c.bottom,c.bottom-=c.specialY.dynamicHeightBelow+i),e.showDebug&&e.showDebug.indexOf("box")>=0&&(c.positionY=l);for(var u=0;u<c.voices.length;u++){s(l,t.voices[c.voices[u]],e.spacing)}if(void 0!==n){var d=n+(c.top-10),f=e.spacing.systemStaffSeparation/r.STEP-d;f>0&&(c.top+=f)}n=2-c.bottom}}},function(e,t,n){var r=n(68);function i(e){for(var t=0;t<e.length;t++)if(!r.layoutEnded(e[t]))return!1;return!0}function a(e){return e.durationindex-(e.children[e.i]&&e.children[e.i].duration>0?0:5e-7)}e.exports=function(e,t,n,s,o){var c,l=0,h=1e3,u=o;s.startx=u;var d=0;for(n&&console.log("init layout",e),c=0;c<s.voices.length;c++)r.beginLayout(u,s.voices[c]);for(var f=0;!i(s.voices);){for(d=null,c=0;c<s.voices.length;c++)r.layoutEnded(s.voices[c])||d&&!(a(s.voices[c])<d)||(d=a(s.voices[c]));var p=[],m=[];for(c=0;c<s.voices.length;c++){a(s.voices[c])-d>1e-7?m.push(s.voices[c]):p.push(s.voices[c])}f=0;var g=0;for(c=0;c<p.length;c++)r.getNextX(p[c])>u&&(u=r.getNextX(p[c]),f=r.getSpacingUnits(p[c]),g=p[c].spacingduration);for(l+=f,h=Math.min(h,f),n&&console.log("currentduration: ",d,l,h),c=0;c<p.length;c++){var v=r.layoutOneItem(u,e,p[c]),b=v-u;if(b>0){u=v;for(var y=0;y<c;y++)r.shiftRight(b,p[y])}}for(c=0;c<m.length;c++)m[c].spacingduration-=g,r.updateNextX(u,e,m[c]);for(c=0;c<p.length;c++){var w=p[c];r.updateIndices(w)}}for(c=0;c<s.voices.length;c++)r.getNextX(s.voices[c])>u&&(u=r.getNextX(s.voices[c]),f=r.getSpacingUnits(s.voices[c]));return l+=f,s.setWidth(u),{spacingUnits:l,minSpace:h}}},function(e,t){var n=function(){};n.beginLayout=function(e,t){t.i=0,t.durationindex=0,t.startx=e,t.minx=e,t.nextx=e,t.spacingduration=0},n.layoutEnded=function(e){return e.i>=e.children.length},n.getNextX=function(e){return Math.max(e.minx,e.nextx)},n.getSpacingUnits=function(e){return Math.sqrt(8*e.spacingduration)},n.layoutOneItem=function(e,t,n){var r=n.children[n.i];if(!r)return 0;var i=e-n.minx,a=function(e){return-e.extraw}(r);return i<a&&(0===n.i||"bar"!==r.type||"part"!==n.children[n.i-1].type&&"tempo"!==n.children[n.i-1].type)&&(e+=a-i),r.setX(e),n.spacingduration=r.duration,n.minx=e+function(e){return e.w}(r),n.i!==n.children.length-1&&(n.minx+=r.minspacing),this.updateNextX(e,t,n),e},n.shiftRight=function(e,t){var n=t.children[t.i];n&&(n.setX(n.x+e),t.minx+=e,t.nextx+=e)},n.updateNextX=function(e,t,n){n.nextx=e+t*Math.sqrt(8*n.spacingduration)},n.updateIndices=function(e){this.layoutEnded(e)||(e.durationindex+=e.children[e.i].duration,"bar"===e.children[e.i].type&&(e.durationindex=Math.round(64*e.durationindex)/64),e.i++)},e.exports=n},function(e,t){function n(e,t,n){if(e)for(var i=0;i<e.length;i++)r(t,e[i]),n=Math.max(n,e[i].getWidth());return n}function r(e,t){t.x=e}e.exports=function(e,t,r,i,a){var s,o,c=e.padding.left,l=0;for(s=0;s<r.length;s++)r[s].header&&(o=t.calc(r[s].header,"voicefont",""),l=Math.max(l,o.width));if(i)for(s=0;s<i.length;s++)i[s].header&&(o=t.calc(i[s].header,"voicefont",""),l=Math.max(l,o.width));if(a)for(s=0;s<a.length;s++)a[s].header&&(o=t.calc(a[s].header,"voicefont",""),l=Math.max(l,o.width));l&&(l+=t.calc("A","voicefont","").width);var h=0;return h=n(i,c+=l,h),c+(h=n(a,c,h))}},function(e,t){var n=function(e){this.shouldAddClasses=e.shouldAddClasses,this.reset()};n.prototype.reset=function(){this.lineNumber=null,this.voiceNumber=null,this.measureNumber=null,this.measureTotalPerLine=[],this.noteNumber=null},n.prototype.incrLine=function(){null===this.lineNumber?this.lineNumber=0:this.lineNumber++,this.voiceNumber=null,this.measureNumber=null,this.noteNumber=null},n.prototype.incrVoice=function(){null===this.voiceNumber?this.voiceNumber=0:this.voiceNumber++,this.measureNumber=null,this.noteNumber=null},n.prototype.isInMeasure=function(){return null!==this.measureNumber},n.prototype.newMeasure=function(){this.measureNumber&&(this.measureTotalPerLine[this.lineNumber]=this.measureNumber),this.measureNumber=null,this.noteNumber=null},n.prototype.startMeasure=function(){this.measureNumber=0,this.noteNumber=0},n.prototype.incrMeasure=function(){this.measureNumber++,this.noteNumber=0},n.prototype.incrNote=function(){this.noteNumber++},n.prototype.measureTotal=function(){for(var e=0,t=0;t<this.lineNumber;t++)e+=this.measureTotalPerLine[t]?this.measureTotalPerLine[t]:0;return this.measureNumber&&(e+=this.measureNumber),e},n.prototype.getCurrent=function(e){return{line:this.lineNumber,measure:this.measureNumber,measureTotal:this.measureTotal(),voice:this.voiceNumber,note:this.noteNumber}},n.prototype.generate=function(e){if(!this.shouldAddClasses)return"";var t=[];if(e&&e.length>0&&t.push(e),null!==this.lineNumber&&t.push("l"+this.lineNumber),null!==this.measureNumber&&t.push("m"+this.measureNumber),null!==this.measureNumber&&t.push("mm"+this.measureTotal()),null!==this.voiceNumber&&t.push("v"+this.voiceNumber),e&&(e.indexOf("note")>=0||e.indexOf("rest")>=0||e.indexOf("lyric")>=0)&&null!==this.noteNumber&&t.push("n"+this.noteNumber),t.length>0){t=(t=t.join(" ")).split(" ");for(var n=0;n<t.length;n++)0!==t[n].indexOf("abcjs-")&&t[n].length>0&&(t[n]="abcjs-"+t[n])}return t.join(" ")},e.exports=n},function(e,t){var n=function(e,t){this.formatting=e,this.classes=t};n.prototype.updateFonts=function(e){e.gchordfont&&(this.formatting.gchordfont=e.gchordfont),e.tripletfont&&(this.formatting.tripletfont=e.tripletfont),e.annotationfont&&(this.formatting.annotationfont=e.annotationfont),e.vocalfont&&(this.formatting.vocalfont=e.vocalfont)},n.prototype.calc=function(e,t){var n;n="string"==typeof e?(n=this.formatting[e])?{face:n.face,size:Math.round(4*n.size/3),decoration:n.decoration,style:n.style,weight:n.weight,box:n.box}:{face:"Arial",size:Math.round(16),decoration:"underline",style:"normal",weight:"normal"}:{face:e.face,size:Math.round(4*e.size/3),decoration:e.decoration,style:e.style,weight:e.weight,box:e.box};var r=this.formatting.fontboxpadding?this.formatting.fontboxpadding:.1;return n.padding=n.size*r,{font:n,attr:{"font-size":n.size,"font-style":n.style,"font-family":n.face,"font-weight":n.weight,"text-decoration":n.decoration,class:this.classes.generate(t)}}},e.exports=n},function(e,t){var n=function(e,t){this.getFontAndAttr=e,this.svg=t};n.prototype.updateFonts=function(e){this.getFontAndAttr.updateFonts(e)},n.prototype.attr=function(e,t){return this.getFontAndAttr.calc(e,t)},n.prototype.calc=function(e,t,n,r){var i;i="string"==typeof t?this.attr(t,n):{font:{face:t.face,size:t.size,decoration:t.decoration,style:t.style,weight:t.weight},attr:{"font-size":t.size,"font-style":t.style,"font-family":t.face,"font-weight":t.weight,"text-decoration":t.decoration,class:this.getFontAndAttr.classes.generate(n)}};var a=this.svg.getTextSize(e,i.attr,r);return i.font.box?{height:a.height+4*i.font.padding,width:a.width+4*i.font.padding}:a},n.prototype.baselineToCenter=function(e,t,n,r,i){return.5*this.calc(e,t,n).height+(i-r-2)*this.attr(t,n).font.size},e.exports=n},function(e,t,n){var r=n(74),i=n(87),a=n(88),s=n(1),o=n(90);function c(e,t,n){r(e,t,n);var i=t.height*s.STEP;return e.y+=i,t}function l(e,t,n,r){var i=-(n.staffs[n.staffs.length-1].bottom-2),a=(r.staffs[0].top-10+i)*s.STEP;a<t&&e.moveY(t-a)}e.exports=function(e,t,n,r,s,h,u,d,f){var p=new o(e.paper,d,f);e.moveY(e.padding.top),a(e,n.topText,p),e.moveY(e.spacing.music);for(var m=[],g=0;g<n.lines.length;g++){t.incrLine();var v=n.lines[g];if(v.staff){v.vskip&&e.moveY(v.vskip),m.length>=1&&l(e,e.spacing.staffSeparation,m[m.length-1],v.staffGroup);var b=c(e,v.staffGroup,p);b.line=g,m.push(b)}else v.nonMusic&&a(e,v.nonMusic,p)}return t.reset(),e.moveY(24),a(e,n.bottomText,p),i(e,s,u,h),{staffgroups:m,selectables:p.getElements()}}},function(e,t,n){var r=n(1),i=n(75),a=n(76),s=n(85),o=n(86),c=n(25);function l(e,t,n,a,s){if(n)for(var o=0;o<n.length;o++)n[o].isStartVoice(a)&&(n[o].startY=t-10*r.STEP,n[o].elemset=i(e,n[o],s))}function h(e,t,n){for(var i=0;i<n.length;i++)for(var a=t[n[i]].children,s=0;s<a.length;s++){var c=a[s],l=c.getFixedCoords();if(!c.invisible&&void 0!==l.t&&void 0!==l.b){var h=(l.t-l.b)*r.STEP;o(e,{x:l.x,y:e.calcY(l.t),width:l.w,height:h,fill:"#88e888","fill-opacity":.4,stroke:"#4aa93d","stroke-opacity":.8});for(var u=0;u<c.children.length;u++){var d=c.children[u],f=d.getChordDim();if(f){var p=e.calcY(d.pitch);p+=d.dim.font.size*d.getLane(),o(e,{x:f.left,y:p,width:f.right-f.left,height:d.dim.font.size,fill:"none",stroke:"#4aa93d","stroke-opacity":.8})}}}}}e.exports=function(e,t,n){var i;!function(e,t){var n=Math.round(e.y);e.paper.pathToBack({path:"M 0 "+n+" L 0 0",stroke:"none",fill:"none","stroke-opacity":0,"fill-opacity":0,class:e.controller.classes.generate(t),"data-vertical":n})}(e,"abcjs-top-of-system");for(var u,d,f=e.y,p=0;p<t.staffs.length;p++){var m=t.staffs[p];e.moveY(r.STEP,m.top),m.absoluteY=e.y,e.showDebug&&(e.showDebug.indexOf("box")>=0&&h(e,t.voices,m.voices),e.showDebug.indexOf("grid")>=0&&(e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:f,y2:f,stroke:"#0000ff"}),o(e,{x:e.padding.left,y:e.calcY(m.originalTop),width:e.controller.width,height:e.calcY(m.originalBottom)-e.calcY(m.originalTop),fill:"#000000",stroke:"#000000","fill-opacity":.1,"stroke-opacity":.1}),i=0,y(m,"chordHeightAbove"),y(m,"chordHeightBelow"),y(m,"dynamicHeightAbove"),y(m,"dynamicHeightBelow"),y(m,"endingHeightAbove"),y(m,"lyricHeightAbove"),y(m,"lyricHeightBelow"),y(m,"partHeightAbove"),y(m,"tempoHeightAbove"),y(m,"volumeHeightAbove"),y(m,"volumeHeightBelow"))),e.moveY(r.STEP,-m.bottom),e.showDebug&&e.showDebug.indexOf("grid")>=0&&e.paper.dottedLine({x1:e.padding.left,x2:e.padding.left+e.controller.width,y1:e.y,y2:e.y,stroke:"#0000aa"})}for(var g=0,v=0;v<t.voices.length;v++){var b=t.voices[v].staff;e.y=b.absoluteY,e.controller.classes.incrVoice(),t.voices[v].duplicate||(u||(u=e.calcY(10)),d=e.calcY(2),0!==b.lines&&(e.controller.classes.newMeasure(),s(e,t.startx,t.w,b.lines)),l(e,b.absoluteY,t.brace,v,n),l(e,b.absoluteY,t.bracket,v,n)),a(e,t.voices[v],g,n,{top:f,height:t.height*r.STEP}),e.controller.classes.newMeasure(),t.voices[v].duplicate||(g=e.calcY(2))}function y(t,n){var a=["rgb(207,27,36)","rgb(168,214,80)","rgb(110,161,224)","rgb(191,119,218)","rgb(195,30,151)","rgb(31,170,177)","rgb(220,166,142)"];if(t.positionY[n]){var s=t.specialY[n]*r.STEP;"chordHeightAbove"===n&&t.specialY.chordLines&&t.specialY.chordLines.above&&(s*=t.specialY.chordLines.above),"chordHeightBelow"===n&&t.specialY.chordLines&&t.specialY.chordLines.below&&(s*=t.specialY.chordLines.below),o(e,{x:e.padding.left,y:e.calcY(t.positionY[n]),width:e.controller.width,height:s,fill:a[i],stroke:a[i],"fill-opacity":.4,"stroke-opacity":.4},n.substr(0,4)),(i+=1)>6&&(i=0)}}e.controller.classes.newMeasure(),t.staffs.length>1&&c(e,t.startx,.6,u,d),e.y=f}},function(e,t,n){var r=n(7),i=n(1),a=n(4);var s=function(e,t,n,s,o,c,l){var h;if(c){e.paper.openGroup({klass:e.controller.classes.generate("staff-extra voice-name")});var u=n+(s-n)/2;u-=e.controller.getTextSize.baselineToCenter(c,"voicefont","staff-extra voice-name",0,1),a(e,{x:e.padding.left,y:u,text:c,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0})}return"brace"===o?h=function(e,t,n,i,a){var s=i-n,o=[7.5,-8,21,0,18.5,-10.5,7.5],c=[0,s/5.5,s/3.14,s/2,s/2.93,s/4.88,0],l=r("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+o[0],n+c[0],t+o[1],n+c[1],t+o[2],n+c[2],t+o[3],n+c[3],t+o[4],n+c[4],t+o[5],n+c[5],t+o[6],n+c[6]);return l+=r("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t+(o=[0,17.5,-7.5,6.6,-5,20,0])[0],n+(c=[s/2,s/1.46,s/1.22,s,s/1.19,s/1.42,s/2])[0],t+o[1],n+c[1],t+o[2],n+c[2],t+o[3],n+c[3],t+o[4],n+c[4],t+o[5],n+c[5],t+o[6],n+c[6]),e.paper.path({path:l,stroke:"#000000",fill:"#000000",class:e.controller.classes.generate(a)})}(e,t,n,s,o):"bracket"===o&&(h=function(e,t,n,a,s){t+=i.STEP;var o=.75*i.STEP,c=.75*i.STEP,l=a-n,h=r("M %f %f l %f %f l %f %f l %f %f z",t,n-c,0,l+2*c,o,0,0,-(l+2*c)),u=2*i.STEP,d=i.STEP;return h+=r("M %f %f q %f %f %f %f q %f %f %f %f z",t+o,n-c,.6*u,.2*d,u,-d,.1*-u,.3*d,-u,d+i.STEP),h+=r("M %f %f q %f %f %f %f q %f %f %f %f z",t+o,n+c+l,.6*u,.2*-d,u,d,.1*-u,.3*-d,-u,-d-i.STEP),e.paper.path({path:h,stroke:"#000000",fill:"#000000",class:e.controller.classes.generate(s)})}(e,t,n,s,o)),c&&(h=e.paper.closeGroup()),l.wrapSvgEl({el_type:o,startChar:-1,endChar:-1},h),h};e.exports=function(e,t,n){var r=t.startVoice.staff.absoluteY-10*i.STEP;return t.endVoice&&t.endVoice.staff?t.endY=t.endVoice.staff.absoluteY-2*i.STEP:t.lastContinuedVoice&&t.lastContinuedVoice.staff?t.endY=t.lastContinuedVoice.staff.absoluteY-2*i.STEP:t.endY=t.startVoice.staff.absoluteY-2*i.STEP,s(e,t.x,r,t.endY,t.type,t.header,n)}},function(e,t,n){var r=n(77),i=n(78),a=n(79),s=n(80),o=n(81),c=n(82),l=n(4),h=n(83);function u(e){return"rest"===e.type&&!(!e.abcelem||!e.abcelem.rest||"spacer"===e.abcelem.rest.type)}e.exports=function(e,t,n,d,f){var p,m,g=t.w-1;if(e.staffbottom=t.staff.bottom,t.header){var v=l(e,{x:e.padding.left,y:e.calcY(t.headerPosition),text:t.header,type:"voicefont",klass:"staff-extra voice-name",anchor:"start",centerVertically:!0});d.wrapSvgEl({el_type:"voiceName",startChar:-1,endChar:-1,text:t.header},v)}for(p=0;p<t.children.length;p++){var b=!1;"staff-extra"===(m=t.children[p]).type||e.controller.classes.isInMeasure()||(e.controller.classes.startMeasure(),b=!0),m.type,h(e,m,t.barto||p===t.children.length-1?n:0,d,f),("note"===m.type||u(m))&&e.controller.classes.incrNote(),"bar"!==m.type||b||e.controller.classes.incrMeasure()}for(e.controller.classes.startMeasure(),p=0;p<t.beams.length;p++){var y=t.beams[p];"bar"===y?e.controller.classes.incrMeasure():c(e,y,d)}for(e.controller.classes.startMeasure(),p=0;p<t.otherchildren.length;p++)if("bar"===(m=t.otherchildren[p]))e.controller.classes.incrMeasure();else switch(m.type){case"CrescendoElem":m.elemset=r(e,m,d);break;case"DynamicDecoration":m.elemset=i(e,m,d);break;case"TripletElem":a(e,m,d);break;case"EndingElem":m.elemset=s(e,m,t.startx+10,g,d);break;case"TieElem":m.elemset=o(e,m,t.startx+10,g,d);break;default:console.log(m),h(e,m,t.startx+10,g,d,f)}}},function(e,t,n){n(21),n(22);var r=n(7),i=n(9),a=n(3);var s=function(e,t,n,s,o,c,l){t=a(t),n=a(n),s=a(s),o=a(o),c=a(c),l=a(l);var h=r("M %f %f L %f %f M %f %f L %f %f",c,t,l,n,c,s,l,o);return i(e,{path:h,highlight:"stroke",stroke:"#000000",class:e.controller.classes.generate("dynamics decoration")})};e.exports=function(e,t,n){void 0===t.pitch&&window.console.error("Crescendo Element y-coordinate not set.");var r,i=e.calcY(t.pitch)+4,a=t.anchor1?t.anchor1.x:0,o=t.anchor2?t.anchor2.x:800;return r="<"===t.dir?s(e,i+4,i,i+4,i+8,a,o):s(e,i,i+4,i+8,i+4,a,o),n.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1},r),[r]}},function(e,t,n){var r=n(23);e.exports=function(e,t,n){void 0===t.pitch&&window.console.error("Dynamic Element y-coordinate not set.");var i=r(e,t.anchor.x,t.pitch,t.dec,1,1,e.controller.classes.generate("decoration dynamics"));return n.wrapSvgEl({el_type:"dynamicDecoration",startChar:-1,endChar:-1,decoration:t.dec},i),[i]}},function(e,t,n){var r=n(7),i=n(4),a=n(9),s=n(3);function o(e,t,n,i){return r("M %f %f L %f %f",s(e),s(t),s(n),s(i))}e.exports=function(e,t,n){e.paper.openGroup({klass:e.controller.classes.generate("triplet "+t.durationClass)}),t.hasBeam||function(e,t,n,r,i){n=e.calcY(n),i=e.calcY(i);var s="";s+=o(t,n,t,n+5),s+=o(r,i,r,i+5);var c=t+(r-t)/2,l=(i-n)/(r-t),h=c-8;s+=o(t,n,h,n+(h-t)*l);var u=c+8;s+=o(u,n+(u-t)*l,r,i),a(e,{path:s,stroke:"#000000"})}(e,t.anchor1.x,t.startNote,t.anchor2.x+t.anchor2.w,t.endNote),i(e,{x:t.xTextPos,y:e.calcY(t.yTextPos-1),text:""+t.number,type:"tripletfont",anchor:"middle",centerVertically:!0,noClass:!0});var r=e.paper.closeGroup();return n.wrapSvgEl({el_type:"triplet",startChar:-1,endChar:-1},r),r}},function(e,t,n){var r=n(7),i=n(4),a=n(9),s=n(3);e.exports=function(e,t,n,o,c){void 0===t.pitch&&window.console.error("Ending Element y-coordinate not set.");var l=s(e.calcY(t.pitch)),h="";t.anchor1&&(n=s(t.anchor1.x+t.anchor1.w),h+=r("M %f %f L %f %f ",n,l,n,s(l+20))),t.anchor2&&(o=s(t.anchor2.x),h+=r("M %f %f L %f %f ",o,l,o,s(l+20))),h+=r("M %f %f L %f %f ",n,l,o,l),e.paper.openGroup({klass:e.controller.classes.generate("ending")}),a(e,{path:h,stroke:"#000000",fill:"#000000"}),t.anchor1&&i(e,{x:s(n+5),y:s(e.calcY(t.pitch-.5)),text:t.text,type:"repeatfont",klass:"ending",anchor:"start",noClass:!0});var u=e.paper.closeGroup();return c.wrapSvgEl({el_type:"ending",startChar:-1,endChar:-1},u),[u]}},function(e,t,n){var r=n(7),i=n(3);var a=function(e,t,n){e.anchor1&&e.anchor2?e.anchor1.pitch===e.anchor2.pitch&&0===e.internalNotes.length?e.isTie=!0:e.isTie=!1:e.isTie=!0,e.isTie?(e.calcTieDirection(),e.calcX(t,n),e.calcTieY()):(e.calcSlurDirection(),e.calcX(t,n),e.calcSlurY()),e.avoidCollisionAbove()},s=function(e,t,n,a,s,o,c,l,h){var u=l?1.2:1.5;t=i(t+6),n=i(n+4),a+=o?u:-u,s+=o?u:-u;var d,f=i(e.calcY(a)),p=i(e.calcY(s)),m=n-t,g=p-f,v=Math.sqrt(m*m+g*g),b=m/v,y=g/v,w=v/3.5,x=l?10:25,k=(o?-1:1)*Math.min(x,Math.max(4,w)),A=i(t+w*b-k*y),T=i(f+w*y+k*b),S=i(n-w*b-k*y),M=i(p-w*y+k*b);if(c?c+=" slur":c="slur",c+=l?" tie":" legato",h){c+=" dotted";var N=r("M %f %f C %f %f %f %f %f %f",t,f,A,T,S,M,n,p);d=e.paper.path({path:N,stroke:"#000000",fill:"none","stroke-dasharray":"5 5",class:e.controller.classes.generate(c)})}else{var C=r("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z",t,f,A,T,S,M,n,p,i(S-2*y),i(M+2*b),i(A-2*y),i(T+2*b),t,f);d=e.paper.path({path:C,stroke:"none",fill:"#000000",class:e.controller.classes.generate(c)})}return d};e.exports=function(e,t,n,r,i){a(t,n,r);var o="";t.anchor1?o+="abcjs-start-m"+t.anchor1.parent.counters.measure+"-n"+t.anchor1.parent.counters.note:o+="abcjs-start-edge",t.anchor2?o+=" abcjs-end-m"+t.anchor2.parent.counters.measure+"-n"+t.anchor2.parent.counters.note:o+=" abcjs-end-edge",t.hint&&(o="abcjs-hint");var c=t.fixedY?1.5:0,l=s(e,t.startX,t.endX,t.startY+c,t.endY+c,t.above,o,t.isTie,t.dotted);return i.wrapSvgEl({el_type:"slur",startChar:-1,endChar:-1},l),[l]}},function(e,t,n){var r=n(9),i=n(3);function a(e,t,n,r,a,s){n=i(e.calcY(n)),a=i(e.calcY(a)),t=i(t),r=i(r);var o=i(n+s);return"M"+t+" "+n+" L"+r+" "+a+"L"+r+" "+i(a+s)+" L"+t+" "+o+"z"}function s(e,t,n,r,i){return(i-n)/(r-t)}function o(e,t,n,r){return t+(r-e)*n}e.exports=function(e,t){if(0!==t.beams.length){t.hint&&" abcjs-hint";for(var n="",i=0;i<t.beams.length;i++){var c=t.beams[i];if(c.split){for(var l=s(e,c.startX,c.startY,c.endX,c.endY),h=[],u=0;u<c.split.length;u+=2)h.push([c.split[u],c.split[u+1]]);for(u=0;u<h.length;u++){var d=o(c.startX,c.startY,l,h[u][0]),f=o(c.startX,c.startY,l,h[u][1]);n+=a(e,h[u][0],d,h[u][1],f,c.dy)}}else n+=a(e,c.startX,c.startY,c.endX,c.endY,c.dy)}var p=("abcjs-d"+t.duration).replace(/\./g,"-"),m=e.controller.classes.generate("beam-elem "+p);return[r(e,{path:n,stroke:"none",fill:"#000000",class:m})]}}},function(e,t,n){var r=n(84),i=n(24),a=n(1),s=n(8),o=n(13);e.exports=function(e,t,n,c,l){if(!t.invisible){var h=t.children.length>0&&"TempoElement"===t.children[0].type;t.elemset=[],o.beginGroup(e.paper,e.controller);for(var u=0;u<t.children.length;u++){var d,f=t.children[u];switch(f.type){case"TempoElement":(d=r(e,f,c))&&(t.elemset=t.elemset.concat(d));break;default:(d=i(e,f,n,c))&&t.elemset.push(d)}}var p=t.type;if(("note"===t.type||"rest"===t.type)&&(t.counters=e.controller.classes.getCurrent(),p=(p+=" d"+Math.round(1e3*t.durationClass)/1e3).replace(/\./g,"-"),t.abcelem.pitches))for(var m=0;m<t.abcelem.pitches.length;m++)p+=" p"+t.abcelem.pitches[m].pitch;var g=o.endGroup(p);g?h&&t.elemset.length>0?(e.paper.moveElementToChild(t.elemset[0],g),c.add(t,t.elemset[0],!1,l)):(t.elemset.push(g),c.add(t,g,"note"===t.type,l)):t.elemset.length>0&&c.add(t,t.elemset[0],"note"===t.type,l),t.klass&&s(t.elemset,"mark","","#00ff00"),t.hint&&s(t.elemset,"abcjs-hint","",null),t.abcelem.abselem=t;a.STEP}}},function(e,t,n){var r=n(24),i=n(4);e.exports=function(e,t,n){var a=t.x;void 0===t.pitch&&window.console.error("Tempo Element y-coordinate not set."),t.tempo.el_type="tempo",e.paper.openGroup({klass:e.controller.classes.generate("tempo")});var s,o=e.calcY(t.pitch)+2;if(t.tempo.preString){s=i(e,{x:a,y:o,text:t.tempo.preString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0,"dominant-baseline":"ideographic"});var c=e.controller.getTextSize.calc(t.tempo.preString,"tempofont","tempo",s).width;a+=c+c/t.tempo.preString.length}if(t.note){t.note.setX(a);for(var l=0;l<t.note.children.length;l++)r(e,t.note.children[l],a,n);a+=t.note.w+5;var h="= "+t.tempo.bpm;s=i(e,{x:a,y:o,text:h,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0});var u=e.controller.getTextSize.calc(h,"tempofont","tempo",s).width;a+=u+u/h.length}return t.tempo.postString&&i(e,{x:a,y:o,text:t.tempo.postString,type:"tempofont",klass:"abcjs-tempo",anchor:"start",noClass:!0}),[e.paper.closeGroup()]}},function(e,t,n){var r=n(26);e.exports=function(e,t,n,i){var a="abcjs-top-line";if(e.paper.openGroup({prepend:!0,klass:e.controller.classes.generate("abcjs-staff")}),1===i)r(e,t,n,6,a);else for(var s=i-1;s>=0;s--)r(e,t,n,2*(s+1),a),a=void 0;e.paper.closeGroup()}},function(e,t){e.exports=function(e,t,n){var r=e.paper.rectBeneath(t);return n&&e.paper.text(n,{x:0,y:t.y+7,"text-anchor":"start","font-size":"14px",fill:"rgba(0,0,255,.4)",stroke:"rgba(0,0,255,.4)"}),r}},function(e,t){e.exports=function(e,t,n,r){var i=(t+e.padding.right)*n,a=(e.y+e.padding.bottom)*n;e.isPrint&&(a=Math.max(a,1056));var s="Sheet Music";e.abctune&&e.abctune.metaText&&e.abctune.metaText.title&&(s+=' for "'+e.abctune.metaText.title+'"'),e.paper.setTitle(s),e.paper.insertStyles(".abcjs-dragging-in-progress text, .abcjs-dragging-in-progress tspan {"+["-webkit-touch-callout: none;","-webkit-user-select: none;","-khtml-user-select: none;","-moz-user-select: none;","-ms-user-select: none;","user-select: none;"].join(" ")+"}");var o={overflow:"hidden"};"resize"===r?e.paper.setResponsiveWidth(i,a):(o.width="",o.height=a+"px",n<1?(o.width=i+"px",e.paper.setSize(i/n,a/n)):e.paper.setSize(i,a)),e.paper.setScale(n),e.paper.setParentStyles(o)}},function(e,t,n){var r=n(89),i=n(4);e.exports=function(e,t,n){for(var a=0;a<t.rows.length;a++){var s=t.rows[a];if(s.move)e.moveY(s.move);else if(s.text){var o=s.left?s.left:0,c=i(e,{x:o,y:e.y,text:s.text,type:s.font,klass:s.klass,anchor:s.anchor});s.absElemType&&n.wrapSvgEl({el_type:s.absElemType,startChar:-1,endChar:-1,text:s.text},c)}else if(s.separator)r(e,s.separator);else if(s.startGroup)e.paper.openGroup({klass:s.klass});else if(s.endGroup){var l=e.paper.closeGroup();s.absElemType&&n.wrapSvgEl({el_type:s.absElemType,startChar:-1,endChar:-1,text:""},l)}}}},function(e,t){e.exports=function(e,t){var n=Math.round(e.y),r=(e.controller.width-t)/2,i=r+t,a="M "+r+" "+n+" L "+i+" "+n+" L "+i+" "+(n+1)+" L "+r+" "+(n+1)+" L "+r+" "+n+" z";e.paper.pathToBack({path:a,stroke:"rgba(0,0,0,0)",fill:"rgba(0,0,0,255)",class:e.controller.classes.generate("defined-text")})}},function(e,t,n){var r=n(21),i=n(22);function a(e,t,n){this.elements=[],this.paper=e,this.tuneNumber=n,this.selectTypes=t}a.prototype.getElements=function(){return this.elements},a.prototype.add=function(e,t,n,r){if(this.canSelect(e)){var i;i=void 0===this.selectTypes?{selectable:!1,"data-index":this.elements.length}:{selectable:!0,tabindex:0,"data-index":this.elements.length},this.paper.setAttributeOnElement(t,i);var a={absEl:e,svgEl:t,isDraggable:n};void 0!==r&&(a.staffPos=r),this.elements.push(a)}},a.prototype.canSelect=function(e){return!1!==this.selectTypes&&(!(!e||!e.abcelem)&&(!0===this.selectTypes||(void 0===this.selectTypes?"note"===e.abcelem.el_type:this.selectTypes.indexOf(e.abcelem.el_type)>=0)))},a.prototype.wrapSvgEl=function(e,t){var n={tuneNumber:this.tuneNumber,abcelem:e,elemset:[t],highlight:r,unhighlight:i};this.add(n,t,!1)},e.exports=a},function(e,t,n){var r=n(14),i=n(92),a=n(105);e.exports=function(e,t,n,s,o){var c,l={};if(n)for(c in n)n.hasOwnProperty(c)&&(l[c]=n[c]);if(s)for(c in s)s.hasOwnProperty(c)&&("listener"===c?l.midiListener=s[c]:"transpose"===c?l.midiTranspose=s[c]:l[c]=s[c]);if(o)for(c in o)o.hasOwnProperty(c)&&(l[c]=o[c]);return void 0===l.generateInline&&(l.generateInline=!0),l.inlineControls&&(l.inlineControls.selectionToggle=!1),r.renderEngine((function(e,t,n,r){var s="",o=a(t,l);if(l.generateInline){var c=o.inline?o.inline:o,h=e.innerHTML.indexOf("abcjs-midi-current")>=0;s+=i.generateMidiControls(t,l,c,n,h)}if(l.generateDownload){var u=o.download?o.download:o;s+=i.generateMidiDownloadLink(t,l,u,n)}e.innerHTML=s,l.generateInline&&i.attachListeners(e);var d=function(e,t){var n=e.getElementsByClassName(t);return 0===n.length?null:n[0]};if(l.generateInline&&(l.animate||l.midiListener)){var f=d(e,"abcjs-inline-midi");if(f.abcjsTune=t,f.abcjsListener=l.midiListener,f.abcjsQpm=l.qpm,f.abcjsContext=l.context,l.animate){var p=l.drumIntro?l.drumIntro:0;f.abcjsAnimate=l.animate.listener,f.abcjsTune=l.animate.target,f.abcjsTune.setTiming(l.qpm,p)}}if(l.generateInline&&l.inlineControls&&l.inlineControls.startPlaying){var m=d(e,"abcjs-midi-start");i.startPlaying(m)}}),e,t,l)}},function(e,t,n){function r(){return"performance"in window&&"now"in window.performance}r()&&("galactic"in window||(window.galactic={}),window.galactic.loc={isLocalUrl:function(){return!1}},n(93),n(94)(window.galactic),n(95),n(96),n(97),n(98),n(99),n(100),n(101),n(102),n(103),n(104));var i={};!function(){"use strict";function e(e,t){return e.replace(/%T/g,t)}i.generateMidiDownloadLink=function(e,t,n,r){var i=["abcjs-download-midi","abcjs-midi-"+r];t.downloadClass&&i.push(t.downloadClass);var a='<div class="'+i.join(" ")+'">';t.preTextDownload&&(a+=t.preTextDownload);var s,o,c=e.metaText&&e.metaText.title?e.metaText.title:"Untitled";return s=t.downloadLabel&&((o=t.downloadLabel)&&"[object Function]"==={}.toString.call(o))?t.downloadLabel(e,r):t.downloadLabel?t.downloadLabel.replace(/%T/,c):'Download MIDI for "'+c+'"',a+='<a download="'+(c=c.toLowerCase().replace(/'/g,"").replace(/\W/g,"_").replace(/__/g,"_"))+'.midi" href="'+n+'">'+s+"</a>",t.postTextDownload&&(a+=t.postTextDownload),a+"</div>"},i.deviceSupportsMidi=function(){return!!r()&&"not loaded"!==i.midiInlineInitialized},i.generateMidiControls=function(t,n,i,a,s){if(!r())return'<div class="abcjs-inline-midi abcjs-midi-'+a+"\">ERROR: this browser doesn't support window.performance</div>";if("not loaded"===i.midiInlineInitialized)return'<div class="abcjs-inline-midi abcjs-midi-'+a+'">MIDI NOT PRESENT</div>';s&&g();var o=t.metaText&&t.metaText.title?t.metaText.title:"Untitled",c=n.inlineControls||{};void 0===c.standard&&(c.standard=!0),void 0===c.tooltipSelection&&(c.tooltipSelection="Click to toggle play selection/play all."),void 0===c.tooltipLoop&&(c.tooltipLoop="Click to toggle play once/repeat."),void 0===c.tooltipReset&&(c.tooltipReset="Click to go to beginning."),void 0===c.tooltipPlay&&(c.tooltipPlay="Click to play/pause."),void 0===c.tooltipProgress&&(c.tooltipProgress="Click to change the playback position."),void 0===c.tooltipTempo&&(c.tooltipTempo="Change the playback speed.");var l="";c.hide&&(l='style="display:none;"');var h='<div class="abcjs-inline-midi abcjs-midi-'+a+'" '+l+">";if(h+='<span class="abcjs-data" style="display:none;">'+JSON.stringify(i)+"</span>",n.preTextInline&&(h+='<span class="abcjs-midi-pre">'+e(n.preTextInline,o)+"</span>"),c.selectionToggle&&(h+='<button type="button" class="abcjs-midi-selection abcjs-btn" title="'+c.tooltipSelection+'"></button>'),c.loopToggle&&(h+='<button type="button" class="abcjs-midi-loop abcjs-btn" title="'+c.tooltipLoop+'"></button>'),c.standard&&(h+='<button type="button" class="abcjs-midi-reset abcjs-btn" title="'+c.tooltipReset+'"></button><button type="button" class="abcjs-midi-start abcjs-btn" title="'+c.tooltipPlay+'"></button><button type="button" class="abcjs-midi-progress-background" title="'+c.tooltipProgress+'"><span class="abcjs-midi-progress-indicator"></span></button><span class="abcjs-midi-clock"> 0:00</span>'),c.tempo){var u=t&&t.metaText&&t.metaText.tempo&&t.metaText.tempo.bpm?t.metaText.tempo.bpm:180;h+='<span class="abcjs-tempo-wrapper"><input class="abcjs-midi-tempo" value="100" type="number" min="1" max="300" data-start-tempo="'+u+'" title="'+c.tooltipTempo+'" />% (<span class="abcjs-midi-current-tempo">'+u+"</span> BPM)</span>"}return n.postTextInline&&(h+='<span class="abcjs-midi-post">'+e(n.postTextInline,o)+"</span>"),h+"</div>"};var t="https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/";i.setSoundFont=function(e){t=e};var n=!0;function a(e,t){return!!e&&(" "+e.className+" ").indexOf(" "+t+" ")>-1}function s(e,t){e&&(a(e,t)||(e.className=e.className+" "+t))}function o(e,t){e&&(e.className=e.className.replace(t,"").trim().replace(" "," "))}function c(e,t){e&&(a(e,t)?o(e,t):s(e,t))}function l(e,t){if(!e)return null;for(;e!==document.body;){if(a(e,t))return e;e=e.parentNode}return null}function h(e,t){if(!e)return null;var n=e.getElementsByClassName(t);return 0===n.length?null:n[0]}i.setInteractiveProgressBar=function(e){n=e};var u,d=!1;function f(e,t,n){MIDI.player.currentTime=0,MIDI.player.warp=e,MIDI.player.load({events:t}),n()}function p(e){for(var t=[],n=0;n<e.length;n++)e[n][0]&&e[n][0].event&&e[n][0].event.programNumber&&t.push(e[n][0].event.programNumber);return t}function m(){MIDI.player.start(MIDI.player.currentTime)}function g(){MIDI.player.stop()}function v(){MIDI.player.pause()}function b(e,t,n){var r=t/n,i=MIDI.player.duration;if(e&&v(),MIDI.player.currentTime=i*r,e)m();else if(x){var a=MIDI.player,s=a.currentTime/a.duration;x({currentTime:a.currentTime/1e3,duration:a.duration/1e3,progress:s})}}function y(e,n){var r=h(e,"abcjs-data"),i=JSON.parse(r.innerHTML),a=1,s=h(e,"abcjs-midi-tempo");if(s){var o=parseInt(s.value,10);o>0&&(a=100/o)}!function(e,n,r){d?f(e,n,r):MIDI.setup({debug:!1,soundfontUrl:t,instruments:p(n)}).then((function(){d=!0,f(e,n,r)})).catch((function(e){console.log("MIDI.setup failed:",e.message)}))}(a,i,n)}function w(){var e=h(document,"abcjs-midi-current");e&&(g(),o(e,"abcjs-midi-current"),o(h(e,"abcjs-midi-start"),"abcjs-pushed"))}function x(e){var t;if(e.duration>0&&u!==e.progress&&(u=e.progress,(t=h(document,"abcjs-midi-current"))&&a(h(t,"abcjs-midi-start"),"abcjs-loaded"))){if(!O){var n=h(t,"abcjs-midi-progress-background").offsetWidth,r=h(t,"abcjs-midi-progress-indicator"),i=n*u;r.style.left=i+"px"}var s=h(t,"abcjs-midi-clock");if(s){var o=Math.floor(e.currentTime),c=Math.floor(o/60);(o%=60)<10&&(o="0"+o),c<10&&(c=" "+c),s.innerHTML=c+":"+o}var l=t.abcjsQpm;!l&&t.abcjsTune&&t.abcjsTune.metaText&&t.abcjsTune.metaText.tempo&&(l=t.abcjsTune.metaText.tempo.bpm),l||(l=180);var d=parseInt(l,10)/60,f=e.currentTime;if(t.abcjsListener){var p=Math.floor(f*d);e.newBeat=p!==t.abcjsLastBeat,e.thisBeat=p,t.abcjsLastBeat=p,t.abcjsListener(t,e,t.abcjsContext)}if(t.abcjsAnimate){var m=d/64,g=function(e,t,n){for(var r,i,a=0,s=e.length-1;a<=s;)if((i=e[r=Math.floor((a+s)/2)]).milliseconds/1e3-n<t)a=r+1;else{if(!(i.milliseconds/1e3-n>t))return r;s=r-1}for(;e[r].milliseconds/1e3-n>=t&&r>0;)r--;return 0===r&&e[r].milliseconds/1e3-n>=t?-1:r}(t.abcjsTune.noteTimings,f,m);if(g!==t.abcjsLastIndex){var v=t.abcjsLastIndex>=0?t.abcjsTune.noteTimings[t.abcjsLastIndex]:null;t.abcjsAnimate(v,t.abcjsTune.noteTimings[g],t.abcjsContext),t.abcjsLastIndex=g}}}if(1===e.progress){t=h(document,"abcjs-midi-current");var b=h(t,"abcjs-midi-loop"),y=function(){b&&a(b,"abcjs-pushed")&&k(h(t,"abcjs-midi-start"))};setTimeout((function(){C(t,y),t&&t.abcjsAnimate&&t.abcjsAnimate(t.abcjsTune.noteTimings[t.abcjsLastIndex],null,t.abcjsContext)}),1)}}function k(e){var t=l(e,"abcjs-inline-midi");if(a(e,"abcjs-pushed"))return v(),void o(e,"abcjs-pushed");a(t,"abcjs-midi-current")?m():(w(),T(e,t,(function(){m()}))),s(e,"abcjs-pushed")}function A(e){for(var t=document.querySelectorAll(".abcjs-midi-current"),n=0;n<t.length;n++)o(t[n],"abcjs-midi-current");s(e,"abcjs-midi-current")}function T(e,t,n){s(e,"abcjs-loading"),y(t,(function(){o(e,"abcjs-loading"),A(t),s(e,"abcjs-loaded"),n&&n()})),t.abcjsLastBeat=-1,t.abcjsLastIndex=-1,function(e){e?MIDI.player.setAnimation(e):MIDI.player.clearAnimation()}(x)}function S(e){h(e,"abcjs-midi-progress-indicator").style.left="0px",h(e,"abcjs-midi-clock").innerHTML=" 0:00"}function M(e){c(e,"abcjs-pushed")}function N(e){c(e,"abcjs-pushed")}function C(e,t){var n=l(e,"abcjs-inline-midi");w(),n&&y(n,(function(){A(n),S(n),t&&t()}))}function E(e){var t=l(e,"abcjs-inline-midi"),n=h(t,"abcjs-midi-start"),r=a(n,"abcjs-pushed");a(t,"abcjs-midi-current")&&C(e,(function(){r&&(m(),s(n,"abcjs-pushed"))}))}function I(e,t){var n=0,r=e.offsetWidth;do{n+=e.offsetLeft-e.scrollLeft,e=e.offsetParent}while(e);var i=t.pageX-n;return i<0&&(i=0),i>r&&(i=r-1),i}function _(e){var t=l(e,"abcjs-inline-midi"),n=h(t,"abcjs-midi-start");return!!a(t,"abcjs-midi-current")&&a(n,"abcjs-pushed")}function B(e,t){var n=l(e,"abcjs-inline-midi"),r=h(n,"abcjs-midi-start"),i=e.offsetWidth,s=I(e,t);a(n,"abcjs-midi-current")?b(_(e),s,i):T(r,n,(function(){b(!1,s,i)}))}function P(e){for(var t=parseInt(e.value,10),n=parseInt(e.getAttribute("data-start-tempo"),10);e&&!a(e,"abcjs-midi-current-tempo");)e=e.nextSibling;e.innerHTML=Math.floor(t*n/100),function(e){MIDI.player.warp=e>0?100/e:1}(t)}i.startPlaying=function(e){var t=e;a(e,"abcjs-inline-midi")&&(t=e.querySelector(".abcjs-midi-start")),k(t)},i.stopPlaying=function(){g();var e=document.querySelector(".abcjs-midi-current");if(e){S(e);var t=h(e,"abcjs-midi-start");t&&o(t,"abcjs-pushed")}},i.restartPlaying=function(){E(document.querySelector(".abcjs-midi-current"))},i.setLoop=function(e,t){var n=e.querySelector(".abcjs-midi-loop");n&&(t?s(n,"abcjs-pushed"):o(n,"abcjs-pushed"))},i.setRandomProgress=function(e){var t=a(h(document.querySelector(".abcjs-midi-current"),"abcjs-midi-start"),"abcjs-pushed"),n=MIDI.player.duration;t&&v(),MIDI.player.currentTime=n*e,t&&m()};var D,L,O=!1,H=!1;i.attachListeners=function(e){for(var t=e.querySelectorAll(".abcjs-inline-midi"),r=0;r<t.length;r++){var s=t[r];s.addEventListener("click",(function(e){for(var t=(e=e||window.event).target||e.srcElement;t&&t!==document.body;){if(a(t,"abcjs-midi-start"))return void k(t);if(a(t,"abcjs-midi-selection"))return void M(t);if(a(t,"abcjs-midi-loop"))return void N(t);if(a(t,"abcjs-midi-reset"))return void E(t);if(a(t,"abcjs-midi-progress-background"))return void(n&&B(t,e));t=t.parentNode}})),s.addEventListener("change",(function(e){for(var t=(e=e||window.event).target||e.srcElement;t!==document.body;)a(t,"abcjs-midi-tempo")&&P(t),t=t.parentNode})),s.addEventListener("mousedown",(function(e){if(n){var t=(e=e||window.event).target||e.srcElement;a(t,"abcjs-midi-progress-indicator")&&(D=t,O=!0,L=l(t,"abcjs-midi-progress-background"))}}))}if(H||(H=!0,document.body.addEventListener("mousemove",(function(e){if(O){(e=e||window.event).preventDefault();var t=I(L,e);D.style.left=t+"px"}}),!0),document.body.addEventListener("mouseup",(function(e){if(O){(e=e||window.event).preventDefault();var t=I(L,e),n=L.offsetWidth;b(_(L),t,n),B(L,e),O=!1,D=null,L=null}}))),void 0===window.MIDI){i.midiInlineInitialized="not loaded";for(var o=document.getElementsByClassName("abcjs-inline-midi"),c=0;c<o.length;c++)o[c].innerHTML="MIDI NOT PRESENT"}}}(),e.exports=i},function(e,t,n){"undefined"==typeof galactic&&(galactic={}),function(t){"use strict";t.request=function(e,n,r,i){"string"==typeof e&&(e={url:e});var a=e.data,s=e.url,o=e.method||(e.data?"POST":"GET"),c=e.format,l=e.headers,h=e.mimeType,u=e.responseType,d=e.withCredentials||!1;i=i||e.onprogress,n=n||e.onsuccess,r=r||e.onerror;if("undefined"==typeof NodeFS||!t.loc.isLocalUrl(s)){var f=new XMLHttpRequest;if(f.open(o,s,!0),l)for(var p in l)f.setRequestHeader(p,l[p]);else a&&f.setRequestHeader("Content-type","application/x-www-form-urlencoded");return h&&f.overrideMimeType(h),u&&(f.responseType=u),d&&(f.withCredentials=!0),r&&"onerror"in f&&(f.onerror=r),i&&f.upload&&"onprogress"in f.upload&&(a?f.upload.onprogress=function(e){i.call(f,e,event.loaded/event.total)}:f.addEventListener("progress",(function(e){var t=0;if(e.lengthComputable)t=e.total;else if(f.totalBytes)t=f.totalBytes;else{var n=parseInt(f.getResponseHeader("Content-Length-Raw"));if(!isFinite(n))return;f.totalBytes=t=n}i.call(f,e,e.loaded/t)}),!1)),f.onreadystatechange=function(e){if(4===f.readyState)if(200===f.status||304===f.status||308===f.status||0===f.status&&window.top.cordova){if(n){var t;if("json"===c)try{t=JSON.parse(e.target.response)}catch(t){r&&r.call(f,e)}else t="xml"===c?e.target.responseXML:"text"===c?e.target.responseText:e.target.response;n.call(f,e,t)}}else r&&r.call(f,e)},f.send(a),f}NodeFS.readFile(s,"utf8",(function(e,t){e?r&&r(e):n&&n({responseText:t},t)}))},e.exports&&(e.exports=t.request)}(galactic)},function(e,t,n){"undefined"==typeof galactic&&(galactic={}),function(t){"use strict";t.module=t.module||{},t.module.DOMMisc=function(e){var t,n,r,i=e.util||(e.util={});i.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e},i.errorHandler=function(e){return function(){console.warn(e,arguments)}},i.requestKioskMode=function(){e.client.nodewebkit&&win.enterKioskMode()},i.diff=function(e,t,n){if(e!==t){var r=new e.constructor,a=new t.constructor,s=!0;for(var o in e)if(n&&-1!==n.indexOf(o))r[o]=e[o],a[o]=t[o];else if(o in t){if(e[o]!==t[o])if("object"==typeof e[o]&&"object"==typeof t[o]){var c=i.diff(e[o],t[o],n);void 0!==c&&(s=!1,r[o]=c.from,a[o]=c.to)}else s=!1,r[o]=e[o],a[o]=t[o]}else s=!1,r[o]=e[o],a[o]=t[o];for(var o in t)o in e||(s=!1,r[o]=e[o],a[o]=t[o]);return s?void 0:{from:r,to:a}}},i.sort=function(e){var t,n=i.sort[e.fn]||e.fn,r=e.data||e,a=e.param;return Array.isArray(r)?t=a?r.sort((function(e,t){return n(e[a],t[a])})):r.sort(n):(t={},Object.keys(r).sort(n).forEach((function(e){t[e]=r[e]}))),t},i.sort.numeric=function(e,t){return e-t},i.sort.natural=function(e,t){var n=/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,r=/(^[ ]*|[ ]*$)/g,i=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,a=/^0x[0-9a-f]+$/i,s=/^0/,o=e.toString().replace(r,"")||"",c=t.toString().replace(r,"")||"",l=o.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),u=parseInt(o.match(a))||1!=l.length&&o.match(i)&&Date.parse(o),d=parseInt(c.match(a))||u&&c.match(i)&&Date.parse(c)||null;if(d){if(u<d)return-1;if(u>d)return 1}for(var f=0,p=Math.max(l.length,h.length);f<p;f++){var m=!(l[f]||"").match(s)&&parseFloat(l[f])||l[f]||0,g=!(h[f]||"").match(s)&&parseFloat(h[f])||h[f]||0;if(isNaN(m)!==isNaN(g))return isNaN(m)?1:-1;if(typeof m!=typeof g&&(m+="",g+=""),m<g)return-1;if(m>g)return 1}return 0},i.getItems=function(e,t){var n=e.length,r={};i.each(e,(function(e){i.getItem(e,(function(i){r[e]=i,--n||t(r)}))}))},i.getItem=function(t,n){n=n||function(e){console.log(e)};var r=function(e){if(e)try{e=JSON.parse(e)}catch(e){}n(e)};if(i.exists("chrome.storage.local"))chrome.storage.local.get(t,(function(e){r(e[t])}));else{var a=(e.feature&&e.feature.prefix||"")+"/"+t,s=localStorage.getItem(a)||"";r(s)}},i.setItem=function(t,n){if(i.exists("chrome.storage.local")){var r={};r[t]=n,chrome.storage.local.set(r)}else{var a=(e.feature&&e.feature.prefix||"")+"/"+t;localStorage.setItem(a,n)}},i.Canvas=function(t,n,r){if("undefined"==typeof document){if(void 0===Canvas)return{ctx:{}};var i=new Canvas}else{i=document.createElement("canvas");"function"==typeof FlashCanvas&&(i.onload=e.client.fn.detect)}return i.ctx=i.getContext(r||"2d"),isFinite(t)&&(i.width=t||1),isFinite(n)&&(i.height=n||1),i},i.Canvas.resize=function(e,t,n){t&&n?(e.width=t,e.height=n):e.width=e.width},i.Canvas.clear=function(e){e.ctx.clearRect(0,0,e.width,e.height)},i.Context3d=function(e,t){return i.Canvas(e,t,"webgl").ctx},i.Context2d=function(e,t){return i.Canvas(e,t,"2d").ctx},i.json={},i.json.pretty=function(e){return JSON.stringify(e,null,"\t")},i.json.stringify=function(e){return JSON.stringify(e,(function(e,t){if("object"==typeof t){if(null===t)return;if(t.nodeName)return;if(t.tagName)return}return t}))},i.timestamp=function(){if("object"==typeof window){var e=window.performance;if(e&&e.now)return e.now.bind(e)}return Date.now}(),i.perf=function(e,t,n){if(!t||!e){var r=i.timestamp();return function(e,t){var n=i.timestamp(),a=Math.round(n-r);return e&&console.log(a+"ms",e),t&&(r=n),a}}for(var a=i.perf(),s=0;s<t;s++)e();console.log(a()+"ms",n||"")},i.exists=function(e,t){try{for(var n=e.split("."),r=t||window,i=0,a=n.length;i<a;i++){var s=n[i];if(null==r[s])return!1;r=r[s]}return!0}catch(e){return!1}},i.copy=(t="function"==typeof CanvasPattern,n=function(e){if(!e||"object"!=typeof e)return e;if(!(e.nodeType||t&&e instanceof CanvasPattern)){if(e.clone&&"function"==typeof e.clone)return e.clone();if(e.constructor){var r=new e.constructor;for(var i in e){var a=e[i];r[i]=a&&"object"==typeof a?n(a):a}return r}}}),i.copyInto=r=function(e,t,n){if(n=n||{},e&&"object"==typeof e)for(var i in e){var a=t[i],s=e[i],o=n.filter;if(!o||!o(s,a)){var c=typeof s;if(s&&"object"===c)if(s.nodeType){if(!n.referenceNodes)continue;t[i]=s}else t[i]=r(s,typeof a===c?a:new s.constructor,n);else t[i]=s}}return t},i.count=function(e,t,n){if(!e)return 0;if(isFinite(e.length))return e.length;if("object"==typeof e){var r=0,i=void 0!==t;if(i&&void 0!==n)for(var a in e)e[a]&&e[a][t]===n&&++r;else if(i)for(var a in e)void 0!==e[a]&&++r;else for(var a in e)++r;return r}},i.isEmpty=function(e){if(null==e)return!0;if(e.length>=0)return!e.length;for(var t in e)return!1;return!0},i.isNotEmpty=function(e){return!i.isEmpty(e)},i.clamp=function(e,t,n){return n<e?e:n>t?t:n},i.clampFinite=function(e){var t=i.INFINITY;return e>+t&&(e=+t),e<-t&&(e=-t),e},i.arrayEmpty=function(e){e.splice(0,e.length)},i.arrayIntersects=function(e,t){return t.some((function(t){return-1!==e.indexOf(t)}))},i.inArray=function(e,t){return-1!==e.indexOf(t)},i.isArray=function(e){return Array.isArray(e)||e instanceof NodeList},i.each=function(e,t){if(i.isArray(e))for(var n=0;n<e.length;n++)t(e[n],n);else for(var r in e)t(e[r],r)},i.equals=function(e,t){return"object"==typeof e?"object"==typeof t&&i.json.stringify(e)===i.json.stringify(t):e===t},i.objectToArray=function(e){var t=[];for(var n in e)t.push(e[n]);return t},i.arrayToObject=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t},i.addFileInput=function(t,n){e.uploader.addFileInput({target:t,onchange:function(t){t.fileInput.value="",t.addMedia({openAsNew:n,self:e.uploader})}})},i.bytesToSize=function(e,t){if(e){t=t||1;var n=Math.floor(Math.log(Math.abs(e))/Math.log(1024));return(e/Math.pow(1024,n)).toFixed(t)+["Bytes","kb","mb","gb","tb"][n]}return"0Bytes"},i.getTimeFormat=function(e,t){var n=(e/=1e3)/3600>>0,r=(e-3600*n)/60>>0,i=e-3600*n-60*r>>0;return t?(n<10&&(n="0"+n),r<10&&(r="0"+r),i<10&&(i="0"+i),n+":"+r+":"+i):{hours:n,minutes:r,seconds:i}},i.require=function(e){"string"==typeof e&&(e={url:e});var t=e.url,n=e.type||(-1!==t.indexOf(".css")?"css":"js"),r=e.async||!1,i=e.onsuccess;if("css"===n)r?setTimeout(o,0):o();else{var a=document.createElement("script");if(a.src=t,a.async=r,i){var s=!1;a.onload=a.onreadystatechange=function(){if(!1===s){var e=a.readyState;e&&!/loaded|complete/.test(e)||(s=!0,i(),a.onload=a.onreadystatechange=null)}}}document.head.appendChild(a)}function o(){var e=document.createElement("link");e.href=t,e.setAttribute("type","text/css"),e.setAttribute("rel","stylesheet"),document.head.appendChild(e)}},i.isEditingText=function(){var e=document.activeElement;if(!e)return!1;var t=e.nodeName;return("INPUT"===t||"TEXTAREA"===t||"true"===e.contentEditable)&&!e.classList.contains("sk-canvas-dummy")},i.pending=function(e,t){var n=e;return{add:function(e){n+=e||1},next:function(){--n||t()}}}},e.exports?e.exports=t.module.DOMMisc:t.module.DOMMisc(galactic)}(galactic)},function(e,t){!function(){"use strict";var e,t={},n={};function r(n){return new Promise((function(r,c){var l=n.format,h=n.codec,u=n.base64,d="audio/"+l+'; codecs="'+h+'"',f="data:"+d+";base64,"+u,p=new Audio;function m(n){function a(e,n,r,i){!t[n]&&(t[n]=i),!t[r]&&(t[r]=i),!e[n]&&(e[n]=i),e[r]=i}a(t.audio,l,h,n),t.audioapi?function(t){return new Promise((function(n,r){(e=e||new i).decodeAudioData(o(t),n,r).then((function(e){})).catch((function(e){})),setTimeout(r,250)}))}(f).then((function(){a(t.audioapi,l,h,!0),r()}),(function(e){a(t.audioapi,l,h,!1),r()})):r()}p.canPlayType(d).replace(/no/i,"")?(p.id="audio",p.controls=!1,p.setAttribute("autobuffer",!0),p.setAttribute("preload","auto"),p.addEventListener("error",(function e(t){var n;a&&!p.testedBlobURL?(p.testedBlobURL=!0,p.src=a((n=f,new Blob([o(n)],{type:s(n)})))):(p.removeEventListener("error",e),m(!1))})),p.addEventListener("canplaythrough",(function e(){p.removeEventListener("canplaythrough",e),m(!0)})),p.src=f,p.load()):m(!1)}))}var i=self.AudioContext||self.mozAudioContext||self.webkitAudioContext,a=(self.URL||self.webkitURL||{}).createObjectURL;function s(e){return(e=e.split(","))[0].split(":")[1].split(";")[0]}function o(e){e=e.split(",");for(var t=atob(e[1]),n=new ArrayBuffer(t.length),r=new Uint8Array(n),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return n}function c(e,t,r){n[e+"_"+t]={format:e,codec:t,base64:r}}c("mpeg","mp3","//MUxAAB6AXgAAAAAPP+c6nf//yi/6f3//MUxAMAAAIAAAjEcH//0fTX6C9Lf//0//MUxA4BeAIAAAAAAKX2/6zv//+IlR4f//MUxBMCMAH8AAAAABYWalVMQU1FMy45//MUxBUB0AH0AAAAADkuM1VVVVVVVVVV//MUxBgBUATowAAAAFVVVVVVVVVVVVVV"),c("ogg","opus","T2dnUwACAAAAAAAAAAAAAAAAAAAAAEVP7KoBE09wdXNIZWFkAQEAD0SsAAAAAABPZ2dTAAAAAAAAAAAAAAAAAAABAAAAVewFUgEYT3B1c1RhZ3MIAAAAUmVjb3JkZXIAAAAAT2dnUwAEwAMAAAAAAAAAAAAAAgAAAHSiY8oBA/j//g=="),c("ogg","vorbis","T2dnUwACAAAAAAAAAAD/QwAAAAAAAM2LVKsBHgF2b3JiaXMAAAAAAUSsAAAAAAAAgLsAAAAAAAC4AU9nZ1MAAAAAAAAAAAAA/0MAAAEAAADmvOe6Dy3/////////////////MgN2b3JiaXMdAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAwNzA2MjIAAAAAAQV2b3JiaXMfQkNWAQAAAQAYY1QpRplS0kqJGXOUMUaZYpJKiaWEFkJInXMUU6k515xrrLm1IIQQGlNQKQWZUo5SaRljkCkFmVIQS0kldBI6J51jEFtJwdaYa4tBthyEDZpSTCnElFKKQggZU4wpxZRSSkIHJXQOOuYcU45KKEG4nHOrtZaWY4updJJK5yRkTEJIKYWSSgelU05CSDWW1lIpHXNSUmpB6CCEEEK2IIQNgtCQVQAAAQDAQBAasgoAUAAAEIqhGIoChIasAgAyAAAEoCiO4iiOIzmSY0kWEBqyCgAAAgAQAADAcBRJkRTJsSRL0ixL00RRVX3VNlVV9nVd13Vd13UgNGQVAAABAEBIp5mlGiDCDGQYCA1ZBQAgAAAARijCEANCQ1YBAAABAABiKDmIJrTmfHOOg2Y5aCrF5nRwItXmSW4q5uacc845J5tzxjjnnHOKcmYxaCa05pxzEoNmKWgmtOacc57E5kFrqrTmnHPGOaeDcUYY55xzmrTmQWo21uaccxa0pjlqLsXmnHMi5eZJbS7V5pxzzjnnnHPOOeecc6oXp3NwTjjnnHOi9uZabkIX55xzPhmne3NCOOecc84555xzzjnnnHOC0JBVAAAQAABBGDaGcacgSJ+jgRhFiGnIpAfdo8MkaAxyCqlHo6ORUuoglFTGSSmdIDRkFQAACAAAIYQUUkghhRRSSCGFFFKIIYYYYsgpp5yCCiqppKKKMsoss8wyyyyzzDLrsLPOOuwwxBBDDK20EktNtdVYY62555xrDtJaaa211koppZRSSikIDVkFAIAAABAIGWSQQUYhhRRSiCGmnHLKKaigAkJDVgEAgAAAAgAAADzJc0RHdERHdERHdERHdETHczxHlERJlERJtEzL1ExPFVXVlV1b1mXd9m1hF3bd93Xf93Xj14VhWZZlWZZlWZZlWZZlWZZlWYLQkFUAAAgAAIAQQgghhRRSSCGlGGPMMeegk1BCIDRkFQAACAAgAAAAwFEcxXEkR3IkyZIsSZM0S7M8zdM8TfREURRN01RFV3RF3bRF2ZRN13RN2XRVWbVdWbZt2dZtX5Zt3/d93/d93/d93/d93/d1HQgNWQUASAAA6EiOpEiKpEiO4ziSJAGhIasAABkAAAEAKIqjOI7jSJIkSZakSZ7lWaJmaqZneqqoAqEhqwAAQAAAAQAAAAAAKJriKabiKaLiOaIjSqJlWqKmaq4om7Lruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7rui4QGrIKAJAAANCRHMmRHEmRFEmRHMkBQkNWAQAyAAACAHAMx5AUybEsS9M8zdM8TfRET/RMTxVd0QVCQ1YBAIAAAAIAAAAAADAkw1IsR3M0SZRUS7VUTbVUSxVVT1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVTVN0zRNIDRkJQAABADAYo3B5SAhJSXl3hDCEJOeMSYhtV4hBJGS3jEGFYOeMqIMct5C4xCDHggNWREARAEAAMYgxxBzyDlHqZMSOeeodJQa5xyljlJnKcWYYs0oldhSrI1zjlJHraOUYiwtdpRSjanGAgAAAhwAAAIshEJDVgQAUQAAhDFIKaQUYow5p5xDjCnnmHOGMeYcc44556B0UirnnHROSsQYc445p5xzUjonlXNOSiehAACAAAcAgAALodCQFQFAnACAQZI8T/I0UZQ0TxRFU3RdUTRd1/I81fRMU1U90VRVU1Vt2VRVWZY8zzQ901RVzzRV1VRVWTZVVZZFVdVt03V123RV3ZZt2/ddWxZ2UVVt3VRd2zdV1/Zd2fZ9WdZ1Y/I8VfVM03U903Rl1XVtW3VdXfdMU5ZN15Vl03Vt25VlXXdl2fc103Rd01Vl2XRd2XZlV7ddWfZ903WF35VlX1dlWRh2XfeFW9eV5XRd3VdlVzdWWfZ9W9eF4dZ1YZk8T1U903RdzzRdV3VdX1dd19Y105Rl03Vt2VRdWXZl2fddV9Z1zzRl2XRd2zZdV5ZdWfZ9V5Z13XRdX1dlWfhVV/Z1WdeV4dZt4Tdd1/dVWfaFV5Z14dZ1Ybl1XRg+VfV9U3aF4XRl39eF31luXTiW0XV9YZVt4VhlWTl+4ViW3feVZXRdX1ht2RhWWRaGX/id5fZ943h1XRlu3efMuu8Mx++k+8rT1W1jmX3dWWZfd47hGDq/8OOpqq+brisMpywLv+3rxrP7vrKMruv7qiwLvyrbwrHrvvP8vrAso+z6wmrLwrDatjHcvm4sv3Acy2vryjHrvlG2dXxfeArD83R1XXlmXcf2dXTjRzh+ygAAgAEHAIAAE8pAoSErAoA4AQCPJImiZFmiKFmWKIqm6LqiaLqupGmmqWmeaVqaZ5qmaaqyKZquLGmaaVqeZpqap5mmaJqua5qmrIqmKcumasqyaZqy7LqybbuubNuiacqyaZqybJqmLLuyq9uu7Oq6pFmmqXmeaWqeZ5qmasqyaZquq3meanqeaKqeKKqqaqqqraqqLFueZ5qa6KmmJ4qqaqqmrZqqKsumqtqyaaq2bKqqbbuq7Pqybeu6aaqybaqmLZuqatuu7OqyLNu6L2maaWqeZ5qa55mmaZqybJqqK1uep5qeKKqq5ommaqqqLJumqsqW55mqJ4qq6omea5qqKsumatqqaZq2bKqqLZumKsuubfu+68qybqqqbJuqauumasqybMu+78qq7oqmKcumqtqyaaqyLduy78uyrPuiacqyaaqybaqqLsuybRuzbPu6aJqybaqmLZuqKtuyLfu6LNu678qub6uqrOuyLfu67vqucOu6MLyybPuqrPq6K9u6b+sy2/Z9RNOUZVM1bdtUVVl2Zdn2Zdv2fdE0bVtVVVs2TdW2ZVn2fVm2bWE0Tdk2VVXWTdW0bVmWbWG2ZeF2Zdm3ZVv2ddeVdV/XfePXZd3murLty7Kt+6qr+rbu+8Jw667wCgAAGHAAAAgwoQwUGrISAIgCAACMYYwxCI1SzjkHoVHKOecgZM5BCCGVzDkIIZSSOQehlJQy5yCUklIIoZSUWgshlJRSawUAABQ4AAAE2KApsThAoSErAYBUAACD41iW55miatqyY0meJ4qqqaq27UiW54miaaqqbVueJ4qmqaqu6+ua54miaaqq6+q6aJqmqaqu67q6Lpqiqaqq67qyrpumqqquK7uy7Oumqqqq68quLPvCqrquK8uybevCsKqu68qybNu2b9y6ruu+7/vCka3rui78wjEMRwEA4AkOAEAFNqyOcFI0FlhoyEoAIAMAgDAGIYMQQgYhhJBSSiGllBIAADDgAAAQYEIZKDRkRQAQJwAAGEMppJRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkgppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkqppJRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoplVJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSSimllFJKKaWUUkoppZRSCgCQinAAkHowoQwUGrISAEgFAACMUUopxpyDEDHmGGPQSSgpYsw5xhyUklLlHIQQUmktt8o5CCGk1FJtmXNSWosx5hgz56SkFFvNOYdSUoux5ppr7qS0VmuuNedaWqs115xzzbm0FmuuOdecc8sx15xzzjnnGHPOOeecc84FAOA0OACAHtiwOsJJ0VhgoSErAYBUAAACGaUYc8456BBSjDnnHIQQIoUYc845CCFUjDnnHHQQQqgYc8w5CCGEkDnnHIQQQgghcw466CCEEEIHHYQQQgihlM5BCCGEEEooIYQQQgghhBA6CCGEEEIIIYQQQgghhFJKCCGEEEIJoZRQAABggQMAQIANqyOcFI0FFhqyEgAAAgCAHJagUs6EQY5Bjw1BylEzDUJMOdGZYk5qMxVTkDkQnXQSGWpB2V4yCwAAgCAAIMAEEBggKPhCCIgxAABBiMwQCYVVsMCgDBoc5gHAA0SERACQmKBIu7iALgNc0MVdB0IIQhCCWBxAAQk4OOGGJ97whBucoFNU6iAAAAAAAAwA4AEA4KAAIiKaq7C4wMjQ2ODo8AgAAAAAABYA+AAAOD6AiIjmKiwuMDI0Njg6PAIAAAAAAAAAAICAgAAAAAAAQAAAAICAT2dnUwAE7AwAAAAAAAD/QwAAAgAAADuydfsFAQEBAQEACg4ODg=="),self.AudioSupports=function(){return t.audio=!!self.Audio&&{},function(){if(navigator.requestMIDIAccess){if(-1!==Function.prototype.toString.call(navigator.requestMIDIAccess).indexOf("[native code]"))return t.midiapi={};for(var e=0;navigator.plugins.length>e;e++){if(navigator.plugins[e].name.indexOf("Jazz-Plugin")>=0)return t.midiapi={}}}t.midiapi=!1}(),t.audioapi=!!i&&{},new Promise((function(e,i){if(!t.audio)return e();setTimeout(e,5e3),Promise.all([r(n.mpeg_mp3),r(n.ogg_opus),r(n.ogg_vorbis)]).then(e)})).then((function(){return t}))},self.AudioSupports.register=c}()},function(e,t){"undefined"==typeof galactic&&(galactic={}),function(e){"use strict";galactic.EventEmitter=function(e){var t=1;function n(e,n){if("function"==typeof n)return e+"."+(n.uniqueId||(n.uniqueId=t++));console.warn(e,"listener does not exist")}function r(t){return e.on[t]?e.on[t]:e.on[t]=function(t){var r={};function i(){var t=!1;for(var n in r)r[n].apply(e,arguments)&&(t=!0);return t}return i.add=function(e){var i=n(t,e);if(void 0===r[i]&&e)return r[i]=e,{add:function(){r[i]=e},remove:function(){delete r[i]}}},i.remove=function(e){var i=n(t,e);void 0!==r[i]&&e&&delete r[i]},i.stack=r,i}(t)}e.on=function(e,t){return r(e).add(t)},e.off=function(t,n){n?r(t).remove(n):delete e.on[t]},e.emit=function(t){var n=e.on[t];if(n){var r=Array.prototype.slice.call(arguments).slice(1);return n.apply(e,r)}}}}()},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";e.DEBUG=!1,e.USE_XHR=!0,e.PATH="./soundfont/",e.DEBUG&&console&&console.log&&console.log("%c♥ MIDI.js 0.4.2 ♥","color: red;");var t={midiapi:0,audioapi:1,audio:2},n={ogg:0,mp3:1};e.setup=function(r){return new Promise((function(i,a){"function"==typeof(r=r||{})&&(r={onsuccess:r}),isFinite(r.debug)&&(e.DEBUG=!!r.debug),r.soundfontUrl&&(e.PATH=r.soundfontUrl),AudioSupports().then((function(s){function o(n){n=n.toLowerCase();var c=e.adaptor.format;function l(e){var r=parseInt(t[n])+1,i=Object.keys(t)[r];i?o(i):a&&a({message:"All plugins failed."})}s[n][c]?(r.tech=n,e.loadProgram(r).then((function(){i()})).catch((function(t){e.DEBUG&&console.error(n,t),l(t)}))):l()}!function(){for(var t in e.adaptor)delete e.adaptor[t];for(var r in n)if(s[r])return e.adaptor.format=r,!0}()?a({message:"MIDIJS: Browser does not have necessary audio support."}):s[location.hash.substr(1)]?o(location.hash.substr(1)):s.midi_api?o("midiapi"):window.AudioContext?o("audioapi"):window.Audio&&o("Audio")}),a)}))},e.loadProgram=function(t){return t||(t={}),"object"==typeof t||(t={instrument:t}),t.instruments=function(){var n=t.instruments||t.instrument||e.channels[0].program;"object"==typeof n?Array.isArray(n)||(n=Object.keys(n)):n=void 0===n?[]:[n];for(var r=0;r<n.length;r++){var i=n[r];if(i>=0){var a=e.getProgram(i);a&&(n[r]=a.nameId)}}0===n.length&&(n=["acoustic_grand_piano"]);return n}(),t.tech=t.tech||e.adaptor.id,e.adaptors._load(t)}}(MIDI)},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";var t=e.adaptor={},n=e.adaptors={},r=n._requests={};n._load=function(a){return i(),"midiapi"===a.tech?n.midiapi.connect(a):function(i){return new Promise((function(e,s){for(var o=t.format.split("_").shift(),c=i.instruments,l=i.onprogress,h=i.tech,u=c.length,d=0;d<u;d++){var f=c[d],p=r[f]||(r[f]={});p.loaded?m([f]):p.loading?p.queue.push(e):(p.queue=[e],p.loading=!0,a(f,o).then((function(e){m(e)})).catch(s))}function m(e){r[e].loading=!1;var t=!1;for(var a in r)r.hasOwnProperty(a)&&r[a].loading&&(t=!0);t||(!function e(t,n){e.progress!==t&&(e.progress=t,l&&l("load",t,n))}(1),n[h].connect(i).then((function(){c.forEach((function(e){for(var t,n=r[e];t=n.queue.pop();)t()}))})).catch(s))}}));function a(t,n,r){return new Promise((function(i,a){var s=e.PATH+t+"-"+n+".js";e.USE_XHR?galactic.request({url:s,format:"text",onerror:a,onprogress:r,onsuccess:function(e,n){var r=document.createElement("script");r.language="javascript",r.type="text/javascript",r.text=n,document.body.appendChild(r),i(t)}}):dom.loadScript.add({url:s,verify:'MIDI.Soundfont["'+t+'"]',onerror:a,onsuccess:i})}))}}(a)};function i(){var n;function r(t,n,r){e.adaptor.id&&(e.player.playing?e.loadProgram(n).then(e.player.start):e.loadProgram(n))}function i(e,t){return{configurable:!0,get:function(){return t},set:function(n){t=n,a(e)}}}function a(n){e.DEBUG&&console.warn("The "+t.id+' adaptor does not support "'+n+'".')}function s(e){return function(){a(e)}}n=performance.now(),Object.defineProperties(e,{currentTime:{configurable:!0,get:function(){return performance.now()-n}}}),e.set=function(t,n,r){if(r)return setTimeout((function(){e[t]=n}),1e3*r);e[t]=n},e.messageHandler={},e.programChange=function(t,n,i){var a=e.getProgram(n);if(a&&Number.isFinite(n=a.id)){var s=e.channels[t];if(s&&s.program!==n){i?setTimeout((function(){s.program=n}),i):s.program=n;var o=e.messageHandler.program||r;o&&o(t,n,i)}}},Object.defineProperties(e,{context:i(null),detune:i("detune",0),fx:i("fx",null),mute:i("mute",!1),volume:i("volume",1)}),e.send=s("send"),e.noteOn=s("noteOn"),e.noteOff=s("noteOff"),e.cancelNotes=s("cancelNotes"),e.setController=s("setController"),e.setEffects=s("setEffects"),e.setPitchBend=s("setPitchBend"),e.setProperty=s("setProperty"),e.setVolume=s("setVolume"),e.iOSUnlock=s("iOSUnlock")}i()}(MIDI)},function(e,t){window.Audio&&function(){"use strict";var e=MIDI.adaptors.audio={},t=[],n=-1,r=[],i={};function a(e,t,n,r){var i,a=MIDI.getNoteName(t);return r?i=setTimeout((function(){l(e,a,n)}),1e3*r):l(e,a,n),{cancel:function(){clearTimeout(i)}}}function s(e,t,n){return{cancel:function(){clearTimeout(void 0)}}}function o(e,t,n,r){for(var i=0;i<t.length;i++){var a=t[i],s=MIDI.getNoteName(a);if(s){if(r)return setTimeout((function(){l(e,s,n)}),1e3*r);l(e,s,n)}}}function c(e,t,n){for(var r=0;r<t.length;r++){var i=t[r],a=MIDI.getNoteName(i);if(a){if(n)return setTimeout((function(){h(e,a)}),1e3*n);h(e,a)}}}function l(e,a,s){var o=MIDI.channels[e];if(o){var c=o.program,l=MIDI.getProgram(c).nameId,h=l+""+a,u=(n+1)%t.length,d=MIDI.Soundfont[l];if(d){var f=t[u];f.src=d[a],f._channel=o,f._volume=s,f._id=h,i.volume(f),f.play(),n=u,r[u]=f}else MIDI.DEBUG&&console.log("404",l)}}function h(e,i){var a=MIDI.channels[e];if(a)for(var s=a.program,o=MIDI.getProgram(s).nameId+""+i,c=0,l=t.length;c<l;c++){var h=(c+n+1)%l,u=r[h];if(u&&u._id===o)return t[h].pause(),void(r[h]=null)}}e.connect=function(e){MIDI.adaptor.id="audio";for(var n=0;n<12;n++)t[n]||(t[n]=new Audio);return function(){function e(e,t,n){return{configurable:!0,get:function(){return t},set:function(r){typeof r===e&&(t=r,n&&n())}}}function t(e){return function(){for(var t in r)i[e](r[t])}}Object.defineProperties(MIDI,{mute:e("boolean",!1,t("volume")),volume:e("number",1,t("volume"))})}(),i.volume=function(e){var t=e._channel;if(MIDI.mute||t.mute)e.volume=0;else{var n=MIDI.volume*t.volume*e._volume;e.volume=Math.min(1,Math.max(-1,2*n))}},MIDI.noteOn=function(e,t,n,r){switch(typeof t){case"number":return a.apply(null,arguments);case"string":break;case"object":return o.apply(null,arguments)}},MIDI.noteOff=function(e,t,n){switch(typeof t){case"number":return s.apply(null,arguments);case"string":break;case"object":return c.apply(null,arguments)}},MIDI.stopAllNotes=function(e){if(isFinite(e));else for(var n=0,r=t.length;n<r;n++)t[n].pause()},new Promise((function(e,t){var n=MIDI.adaptors._requests,r=MIDI.Soundfont;for(var i in r){var a=n[i]||(n[i]={});a.loaded=!0,a.loading=!1}e()}))}}()},function(e,t){window.AudioContext&&function(){"use strict";var e=MIDI.adaptors,t=e.audioapi={},n=((n=new(window.AudioContext||window.webkitAudioContext)).hasDetune=function(){n.createBuffer(1,1,44100);var e=n.createBufferSource();try{return e.detune.value=1200,!0}catch(e){return!1}}(),n),r={},i=e._requests,a={},s={};function o(e,t){var n=s[e];for(var r in n)for(var i=n[r],a=0;a<i.length;a++)t(i,i[a])}t.connect=function(e){return MIDI.adaptor.id="audioapi",function(){function e(e,t,n){return{configurable:!0,get:function(){return t},set:function(r){typeof r===e&&(t=r,n&&n())}}}function t(e){return function(){MIDI.setProperty(e)}}Object.defineProperties(MIDI,{context:{configurable:!0,get:function(){return n},set:function(e){n=e}},detune:e("number",0,t("detune")),fx:e("object",null,t("fx")),mute:e("boolean",!1,t("volume")),volume:e("number",1,t("volume"))}),MIDI.setProperty=function(e,t){if(a[e])if(isFinite(t))"fx"===e&&i(MIDI.channels[t]),r();else for(var t in"fx"===e&&i(MIDI),s)r();function r(){o(t,(function(t,n){a[e](n)}))}function i(e){var t=e.fxNodes||(e.fxNodes={});for(var r in t)t[r].disconnect(n.destination),delete t[r];if(n.tunajs)for(var i=e.fx,a=0;a<i.length;a++){var s=i[a],o=s.type,c=new n.tunajs[o](s);c.connect(n.destination),t[o]=c}else MIDI.DEBUG&&console.error("fx not installed.",arguments)}}}(),a.volume=function(e){var t=e.gainNode.gain,r=e._channel;if(MIDI.mute||r.mute)t.value=0;else{var i=MIDI.volume*r.volume*e._volume;t.value=Math.min(2,Math.max(0,i))}t._fadeout&&(t.cancelScheduledValues(n.currentTime),t.linearRampToValueAtTime(t.value,t._startAt),t.linearRampToValueAtTime(0,t._startAt+.3))},a.detune=function(e){if(n.hasDetune){var t=e._channel,r=MIDI.detune+t.detune;r&&(e.detune.value=r)}},a.fx=function(e){var t=e._channel,n=e.gainNode;function r(e){if(e)for(var t in e){var r=e[t];n.connect(r.input),n=r}}e.disconnect(0),e.connect(n),r(MIDI.fxNodes),r(t.fxNodes)},MIDI.noteOn=function(e,n,r,i){switch(typeof n){case"number":return t.apply(null,arguments);case"string":break;case"object":return l.apply(null,arguments)}},MIDI.noteOff=function(e,t,n){switch(typeof t){case"number":return c.apply(null,arguments);case"string":break;case"object":return h.apply(null,arguments)}},MIDI.cancelNotes=function(e){if(isFinite(e))t(e);else for(var e in s)t(e);function t(e){o(e,(function(e,t){u(e,t)}))}},MIDI.iOSUnlock=function(){if(!0!==n.unlocked){n.unlocked=!0;var e=n.createBuffer(1,1,44100),t=n.createBufferSource();t.buffer=e,t.connect(n.destination),t.start(0)}},"suspended"===n.state&&n.resume(),new Promise((function(e,t){window.Tuna&&(n.tunajs instanceof Tuna||(n.tunajs=new Tuna(n)));var a=MIDI.Soundfont,s=Object.keys(a);for(var o in a){var c=MIDI.getProgram(o);if(c){var l=i[o]||(i[o]={});if(l.loaded)continue;if(l.decoding)l.queue.push(e);else{l.decoding=!0,l.queue.push(e),l.pending=0;var h=a[o];for(var u in h)f(o,c.id,u)}}}function d(){for(var e=0;e<s.length;e++){var t=s[e];if((r=i[t]).pending)return}for(e=0;e<s.length;e++){t=s[e];for(var n,r=i[t];n=r.queue.pop();)n()}}function f(e,t,s){var o=i[e],c=a[e][s];c&&(o.pending++,function(e){return new Promise((function(t,r){if(0===e.indexOf("data:audio"))a(function(e){e=e.split(",");for(var t=atob(e[1]),n=(e[0].split(":")[1].split(";")[0],new ArrayBuffer(t.length)),r=new Uint8Array(n),i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return n}(e));else{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){a(i.response)},i.send()}function a(e){n.decodeAudioData(e,t,r)}}))}(c).then((function(n){n.id=s;var i=MIDI.getNoteNumber(s);r[t+"x"+i]=n,--o.pending||(o.decoding=!1,o.loading=!1,o.loaded=!0,MIDI.DEBUG&&console.log("loaded: ",e),d())})).catch((function(e){MIDI.DEBUG&&console.error("audio could not load",arguments)})))}setTimeout(d,0)}));function t(e,t,i,o){var c;o=o||0;var l=MIDI.volume;if(l){var h=MIDI.channels[e],u=h.program,d=u+"x"+t,f=r[d];f?((c=n.createBufferSource()).buffer=f,c.gainNode=n.createGain(),c.gainNode.connect(n.destination),c._channel=h,c._volume=i,a.volume(c),a.detune(c),a.fx(c),c.start(o+n.currentTime),s[e]=s[e]||{},s[e][t]=s[e][t]||[],s[e][t].push(c),s[e][t].active=c):MIDI.DEBUG&&console.error(["no buffer",arguments])}return{cancel:function(){c&&c.disconnect(0)}}}function c(e,t,n){n=n||0;var r=s[e];if(r){var i=r[t];if(i){var a=i.active;a&&u(i,a,n)}}return{cancel:function(){a&&a.disconnect(0)}}}function l(e,t,n,r){for(var i,a={},s=0,o=t.length;s<o;s++)a[i=t[s]]=MIDI.noteOn(e,i,n,r);return a}function h(e,t,n){for(var r,i={},a=0,s=t.length;a<s;a++)i[r=t[a]]=MIDI.noteOff(e,r,n);return i}function u(e,t,r){var i=(r||0)+n.currentTime,a=t.gainNode.gain;a._fadeout=!0,a._startAt=i,a.linearRampToValueAtTime(a.value,i),a.linearRampToValueAtTime(0,i+.3),t.stop(i+.5),setTimeout((function(){e.shift()}),1e3*r)}}}()},function(e,t){!function(){"use strict";var e,t=MIDI.adaptors.midiapi={},n={},r={};function i(t,r,i,a){return e.send([144+t,r,127*i>>0],1e3*(a||0)),n[t+"x"+r]={_channel:MIDI.channels[t],_volume:i},{cancel:function(){}}}function a(t,r,i){return e.send([128+t,r,0],1e3*(i||0)),delete n[t+"x"+r],{cancel:function(){}}}function s(t,n,r,i){for(var a=0;a<n.length;a++)e.send([144+t,n[a],r],1e3*(i||0))}function o(t,n,r){for(var i=0;i<n.length;i++)e.send([128+t,n[i],0],1e3*(r||0))}function c(t,n,r,i){e.send([t,n,r],1e3*(i||0))}function l(t,n,r){e.send([224+t,n],1e3*(r||0))}function h(t,n,r){e.send([176+t,7,n],1e3*(r||0))}t.connect=function(t){return MIDI.adaptor.id="midiapi",function(){function t(e,t,n){return{configurable:!0,get:function(){return t},set:function(r){typeof r===e&&(t=r,n&&n())}}}function i(e){return function(){for(var t in n)r[e](n[t])}}Object.defineProperties(MIDI,{context:{configurable:!0,set:function(t){e=t},get:function(){return e}},detune:t("number",0,i("detune")),mute:t("boolean",!1,i("volume")),volume:t("number",1,i("volume"))})}(),r.volume=function(e){var t=e._channel;if(MIDI.mute||t.mute)h(t.id,0);else{var n=MIDI.volume*t.volume*e._volume;h(t.id,Math.min(1,Math.max(-1,2*n)))}},r.detune=function(e){var t=e._channel,n=MIDI.detune+t.detune;n&&l(t.id,n)},MIDI.setController=c,MIDI.setPitchBend=l,MIDI.setVolume=h,MIDI.messageHandler.program=function(t,n,r){e.send([192+t,n],1e3*(r||0))},MIDI.send=function(t,n){e.send(t,1e3*(n||0))},MIDI.noteOn=function(e,t,n,r){switch(typeof t){case"number":return i.apply(null,arguments);case"string":break;case"object":return s.apply(null,arguments)}},MIDI.noteOff=function(e,t,n){switch(typeof t){case"number":return a.apply(null,arguments);case"string":break;case"object":return o.apply(null,arguments)}},MIDI.cancelNotes=function(t){if(isFinite(t))e.send([176+t,123,0]);else{e.cancel();for(t=0;t<16;t++)e.send([176+t,123,0])}},new Promise((function(t,n){function r(e){n&&n(e)}navigator.requestMIDIAccess().then((function(n){var i=n.outputs;i.size&&i.forEach((function(t){"connected"===t.state&&"input"===t.type&&(e=t)})),null==e?r({message:"No available outputs."}):t()}),r)}))}}()},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";e.channels=function(t){for(var n=0;n<=15;n++)r(n);return t;function r(r){var i=t[r]={};function a(t,n,i){return{configurable:!0,enumerable:!0,get:function(){return i},set:function(a){typeof a===t&&(i=a,e.setProperty(n,r))}}}i.noteOn=function(t,n,i){return e.noteOn(r,t,n,i)},i.noteOff=function(t,n){return e.noteOff(r,t,n)},i.cancelNotes=function(){return e.cancelNotes(r)},i.set=function(){},Object.defineProperties(i,{id:{value:n,enumerable:!0,writable:!0},program:{value:n,enumerable:!0,writable:!0},volume:a("number","volume",1),mute:a("boolean","volume",!1),mono:a("boolean","*",!1),omni:a("boolean","*",!1),solo:a("boolean","*",!1),detune:a("number","detune",0),fx:a("object","fx",null)})}}({})}(MIDI)},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),function(e){"use strict";function t(e){return e.replace(/[^a-z0-9_ ]/gi,"").replace(/[ ]/g,"_").toLowerCase()}e.getProgram=function(n){return"string"==typeof n?e.getProgram.byName[t(n)]:e.getProgram.byId[n]},function(n){var r=e.GM={},i=e.getProgram.byId={},a=e.getProgram.byName={};for(var s in n)for(var o=n[s],c=0,l=o.length;c<l;c++){var h=o[c];if(h){var u=parseInt(h.substr(0,h.indexOf(" ")),10),d=h.replace(u+" ",""),f=t(d),p=t(s),m={id:--u,name:d,nameId:f,category:s};i[u]=m,a[f]=m,r[p]=r[p]||[],r[p].push(m)}}}({Piano:["1 Acoustic Grand Piano","2 Bright Acoustic Piano","3 Electric Grand Piano","4 Honky-tonk Piano","5 Electric Piano 1","6 Electric Piano 2","7 Harpsichord","8 Clavinet"],"Chromatic Percussion":["9 Celesta","10 Glockenspiel","11 Music Box","12 Vibraphone","13 Marimba","14 Xylophone","15 Tubular Bells","16 Dulcimer"],Organ:["17 Drawbar Organ","18 Percussive Organ","19 Rock Organ","20 Church Organ","21 Reed Organ","22 Accordion","23 Harmonica","24 Tango Accordion"],Guitar:["25 Acoustic Guitar (nylon)","26 Acoustic Guitar (steel)","27 Electric Guitar (jazz)","28 Electric Guitar (clean)","29 Electric Guitar (muted)","30 Overdriven Guitar","31 Distortion Guitar","32 Guitar Harmonics"],Bass:["33 Acoustic Bass","34 Electric Bass (finger)","35 Electric Bass (pick)","36 Fretless Bass","37 Slap Bass 1","38 Slap Bass 2","39 Synth Bass 1","40 Synth Bass 2"],Strings:["41 Violin","42 Viola","43 Cello","44 Contrabass","45 Tremolo Strings","46 Pizzicato Strings","47 Orchestral Harp","48 Timpani"],Ensemble:["49 String Ensemble 1","50 String Ensemble 2","51 Synth Strings 1","52 Synth Strings 2","53 Choir Aahs","54 Voice Oohs","55 Synth Choir","56 Orchestra Hit"],Brass:["57 Trumpet","58 Trombone","59 Tuba","60 Muted Trumpet","61 French Horn","62 Brass Section","63 Synth Brass 1","64 Synth Brass 2"],Reed:["65 Soprano Sax","66 Alto Sax","67 Tenor Sax","68 Baritone Sax","69 Oboe","70 English Horn","71 Bassoon","72 Clarinet"],Pipe:["73 Piccolo","74 Flute","75 Recorder","76 Pan Flute","77 Blown Bottle","78 Shakuhachi","79 Whistle","80 Ocarina"],"Synth Lead":["81 Lead 1 (square)","82 Lead 2 (sawtooth)","83 Lead 3 (calliope)","84 Lead 4 (chiff)","85 Lead 5 (charang)","86 Lead 6 (voice)","87 Lead 7 (fifths)","88 Lead 8 (bass + lead)"],"Synth Pad":["89 Pad 1 (new age)","90 Pad 2 (warm)","91 Pad 3 (polysynth)","92 Pad 4 (choir)","93 Pad 5 (bowed)","94 Pad 6 (metallic)","95 Pad 7 (halo)","96 Pad 8 (sweep)"],"Synth Effects":["97 FX 1 (rain)","98 FX 2 (soundtrack)","99 FX 3 (crystal)","100 FX 4 (atmosphere)","101 FX 5 (brightness)","102 FX 6 (goblins)","103 FX 7 (echoes)","104 FX 8 (sci-fi)"],Ethnic:["105 Sitar","106 Banjo","107 Shamisen","108 Koto","109 Kalimba","110 Bagpipe","111 Fiddle","112 Shanai"],Percussive:["113 Tinkle Bell","114 Agogo","115 Steel Drums","116 Woodblock","117 Taiko Drum","118 Melodic Tom","119 Synth Drum","129 Percussion"],"Sound effects":["120 Reverse Cymbal","121 Guitar Fret Noise","122 Breath Noise","123 Seashore","124 Bird Tweet","125 Telephone Ring","126 Helicopter","127 Applause","128 Gunshot"]}),function(){for(var t=["C","Db","D","Eb","E","F","Gb","G","Ab","A","Bb","B"],n={},r={},i=21;i<=108;i++){var a=t[i%12]+((i-12)/12>>0);n[a]=i,r[i]=a}e.getNoteName=function(e){return e in n?e:e in r?r[e]:void 0},e.getNoteNumber=function(e){return e in r?e:e in n?n[e]:void 0}}()}(MIDI)},function(e,t){"undefined"==typeof MIDI&&(MIDI={}),MIDI.player=new function(){"use strict";var e=this;galactic.EventEmitter(e);var t,n,r,i={},a=[],s={};function o(r,h){if(!(r>e.duration)){if(h){e.playing?c():e.playing=!0;var d=(v=function(e){for(var t=0,n=s.length,r=0;r<n;r++){var i=s[r][1];if(!(t+i<e))break;t+=i}return{idx:r,time:t}}(r)).idx,f=n=v.time}else d=t,f=n;for(var p=r-e.currentTime,m=0,g=s.length;d<g&&m<=20;){var v=s[d];t=++d,n+=v[1],r=n-f;var b=v[0].event,y=b.type,w=b.subtype;if(u[w])switch(y){case"channel":k();break;case"meta":x()}}}function x(){w}function k(){var t=b.channel,i=MIDI.channels[t],s=Math.max(0,(r+p)/1e3);switch(w){case"controller":MIDI.setController(t,b.controllerType,b.value,s);break;case"programChange":var o=b.programNumber;(function(t){var n=MIDI.getProgram(t);return n&&e.instruments[n.nameId]})(o)&&MIDI.programChange(t,o,s);break;case"pitchBend":var c=b.value;MIDI.setPitchBend(t,c,s);break;case"noteOn":var l=T(b.noteNumber);a.push({promise:i.noteOn(l,b.velocity/127,s),timeout:A(b,l,n,s)}),m++;break;case"noteOff":l=T(b.noteNumber);a.push({promise:i.noteOff(l,s),timeout:A(b,l,n,s)}),m++}}function A(t,r,s,c){return setTimeout((function(){var s=galactic.util.copy(t);s.noteNumber=r,e.emit("event",s),a.shift();var c=s.channel+"x"+s.noteNumber;switch(s.subtype){case"noteOn":i[c]=s;break;case"noteOff":delete i[c]}a.length<=100&&o(n)}),1e3*c)}function T(t){return l(0,127,t+e.transpose)}}function c(){if(e.playing){for(e.playing=!1;a.length;){var t=a.pop();t&&(t.promise&&t.promise.cancel(),clearTimeout(t.timeout))}for(var n in i){var r=i[n];e.emit("event",{channel:r.channel,noteNumber:r.noteNumber,status:r.status-16,subtype:"noteOff",type:"channel"})}}}function l(e,t,n){return n<e?e:n>t?t:n}function h(){r&&(s=Replayer(MidiFile(r),e.bpm)),e.duration=function(){for(var e=s.length,t=0,n=0;n<e;n++)t+=s[n][1];return t}()}!function(){var t=0,n=!1,i=0;function a(t,n){return{get:function(){return t},set:function(i){Number.isFinite(i)&&(t=i,n&&r&&(e.stop(),h(),o(0,!0)))}}}function s(n){i=performance.now(),t=l(0,e.duration,n)}Object.defineProperties(e,{bpm:a(null,!0),warp:a(1,!0),transpose:a(0,!0),currentTime:{get:function(){return e.playing?t+(performance.now()-i):t},set:function(e){Number.isFinite(e)&&s(e)}},duration:a(0,!1),playing:{get:function(){return n},set:function(t){s(e.currentTime),n=t}}})}(),e.start=function(t){c(),e.currentTime=t,o(e.currentTime,!0)},e.stop=function(){c(),e.currentTime=0},e.pause=function(){c()},e.setAnimation=function(t){var n=0,r=0,i=0;e.clearAnimation(),requestAnimationFrame((function a(){if(e.frameId=requestAnimationFrame(a),e.duration){e.playing?(n=i===e.currentTime?r-Date.now():0,n=0===e.currentTime?0:e.currentTime-n,i!==e.currentTime&&(r=Date.now(),i=e.currentTime)):n=e.currentTime;var s=e.duration,o=n/1e3,c=o/60,l=60*c+(o-60*c),h=s/1e3;if(h-l<-1)return;var u=Math.min(1,l/h);u!==t.progress&&(t.progress=u,t({progress:u,currentTime:l,duration:h}))}}))},e.clearAnimation=function(){e.frameId&&cancelAnimationFrame(e.frameId)};var u={controller:!0,noteOff:!0,noteOn:!0,pitchBend:!0,setTempo:!0,programChange:!0};e.handleEvent=function(e,t){u[e]=t},e.load=function(t){return new Promise((function(n,i){"string"==typeof t&&(t={src:t});var a=t.src,o=t.onprogress;function c(){try{h(),e.instruments=function(){for(var e={},t={},n=0;n<s.length;n++){var r=s[n][0].event;if("channel"===r.type){var i=r.channel;switch(r.subtype){case"programChange":t[i]=r.programNumber;break;case"noteOn":var a=t[i];if(Number.isFinite(a)){if(u.programChange)var o=MIDI.getProgram(a);else i=MIDI.channels[i],o=MIDI.getProgram(i.program);e[o.nameId]=!0}}}}return e}(),MIDI.setup({instruments:e.instruments,onprogress:o}).then((function(e){n(e)})).catch((function(e){i(e)}))}catch(e){i&&i(e)}}e.stop(),t.events?(s=t.events,r=void 0,c()):-1!==a.indexOf("base64,")?(r=atob(a.split(",")[1]),c()):galactic.request({url:a,mimeType:"text/plain; charset=x-user-defined",onerror:function(){i&&i("Unable to load MIDI file: "+a)},onsuccess:function(e,t){r=function(e){for(var t=[],n=String.fromCharCode,r=0,i=e.length;r<i;r++)t[r]=n(255&e.charCodeAt(r));return t.join("")}(t),c()}})}))}}},function(e,t,n){var r,i=n(106),a=n(107);!function(){"use strict";function e(e,t,n,r){for(var i=Object.keys(n),a=0;a<i.length;a++)i[a]=parseFloat(i[a]);i.sort((function(e,t){return e-t}));for(var s=0,o=0;o<i.length;o++){var c=n[i[o]];if(i[o]>s){var l=(i[o]-s)*r;e.addRest(l),t.addRest(l),s=i[o]}for(var h=0;h<c.length;h++){var u=c[h];u.volume?(e.startNote(u.pitch,u.volume),t.startNote(u.pitch,u.volume)):(e.endNote(u.pitch),t.endNote(u.pitch))}}}r=function(t,n){void 0===n&&(n={});var r=t.setUpAudio(n),s=a(),o=new i,c=t.metaText?t.metaText.title:void 0;c&&c.length>128&&(c=c.substring(0,124)+"...");var l=t.getKeySignature(),h=t.getMeterFraction();s.setGlobalInfo(r.tempo,c,l,h),o.setGlobalInfo(r.tempo,c);for(var u=0;u<r.tracks.length;u++){s.startTrack(),o.startTrack();for(var d={},f=0;f<r.tracks[u].length;f++){var p=r.tracks[u][f];switch(p.cmd){case"text":s.setText(p.type,p.text);break;case"program":var m=0;n.pan&&n.pan.length>u&&(m=n.pan[u]),s.setChannel(p.channel,m),s.setInstrument(p.instrument),o.setChannel(p.channel),o.setInstrument(p.instrument);break;case"note":var g=p.start,v=g+p.duration;d[g]||(d[g]=[]),d[g].push({pitch:p.pitch,volume:p.volume}),d[v]||(d[v]=[]),d[v].push({pitch:p.pitch,volume:0});break;default:console.log("MIDI create Unknown: "+p.cmd)}}e(s,o,d,1920),s.endTrack(),o.endTrack()}var b=s.getData(),y=o.getData();return void 0===n.generateInline&&(n.generateInline=!0),n.generateInline&&n.generateDownload?{download:b,inline:y}:n.generateInline?y:b}}(),e.exports=r},function(e,t){var n;!function(){"use strict";(n=function(){this.tempo=0,this.timeFactor=0,this.output=[],this.currentChannel=0,this.currentInstrument=0,this.track=0,this.nextDuration=0,this.tracks=[[]]}).prototype.setInstrument=function(e){this.currentInstrument=e;var t=[{ticksToEvent:0,track:this.track,event:{channel:this.currentChannel,deltaTime:0,programNumber:this.currentInstrument,subtype:"programChange",type:"channel"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(t)},n.prototype.setChannel=function(e){this.currentChannel=e},n.prototype.startTrack=function(){this.track++,this.tracks[this.track]=[],this.nextDuration=0},n.prototype.setGlobalInfo=function(e,t){this.tempo=e;var n=Math.round(1/e*6e7);this.timeFactor=n/48e4;this.track,this.nextDuration,this.timeFactor;this.track,this.nextDuration,this.timeFactor,this.track,this.nextDuration,this.timeFactor},n.prototype.startNote=function(e,t){var n=5*Math.floor(this.nextDuration/5),r=[{ticksToEvent:n,track:this.track,event:{deltaTime:n,channel:this.currentChannel,type:"channel",noteNumber:e,velocity:t,subtype:"noteOn"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(r),this.nextDuration=0},n.prototype.endNote=function(e){var t=5*Math.floor(this.nextDuration/5),n=[{ticksToEvent:t,track:this.track,event:{deltaTime:t,channel:this.currentChannel,type:"channel",noteNumber:e,velocity:0,subtype:"noteOff"}},this.nextDuration*this.timeFactor];this.tracks[this.track].push(n),this.nextDuration=0},n.prototype.addRest=function(e){this.nextDuration+=e},n.prototype.endTrack=function(){this.track},n.prototype.getData=function(){return function(e){!function(e){for(var t=0;t<e.length;t++)for(var n=0,r=0;r<e[t].length;r++)n+=e[t][r][1],e[t][r].absTime=n}(e);var t=function(e){for(var t=[],n=0;n<e.length;n++)for(var r=0;r<e[n].length;r++)t.push(e[n][r]);return t}(e);return function(e){for(var t=0,n=0;n<e.length;n++){var r=e[n].absTime;e[n][1]=r-t,t=r}}(t=function(e){return e.sort((function(e,t){if(e.absTime>t.absTime)return 1;if(e.absTime===t.absTime&&e.length>0&&t.length>0&&e[0].event&&t[0].event){var n=e[0].event.channel,r=t[0].event.channel;if(n>r)return 1;if(n<r)return-1;if("programChange"===t[0].event.subtype)return 1}return-1}))}(t)),t}(this.tracks)}}(),e.exports=n},function(e,t){var n;!function(){"use strict";function e(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setAttribute(n,t[n]);return e}function t(){this.trackstrings="",this.trackcount=0,this.noteOnAndChannel="%90",this.noteOffAndChannel="%80"}function r(e,t){for(var n="",r=0;r<e.length;r++)n+=i(e.charCodeAt(r),2);return"%00%FF"+t+i(n.length/3,2)+n}function i(e,t){for(var n=e.toString(16);n.length<t;)n="0"+n;return function(e){for(var t="",n=0;n<e.length;n+=2)t+="%",t+=e.substr(n,2);return t}(n)}function a(e){var t=0,n=[];for(e=Math.round(e);0!==e;)n.push(127&e),e>>=7;for(var r=n.length-1;r>=0;r--){t<<=8;var a=n[r];0!==r&&(a|=128),t|=a}var s=t.toString(16).length;return i(t,s+=s%2)}t.prototype.setTempo=function(e){0===this.trackcount&&(this.startTrack(),this.track+="%00%FF%51%03"+i(Math.round(6e7/e),6),this.endTrack())},t.prototype.setGlobalInfo=function(e,t,n,a){if(0===this.trackcount){this.startTrack();var s=Math.round(6e7/e);this.track+="%00%FF%51%03"+i(s,6),n&&(this.track+=function(e){if(!e||!e.accidentals)return"";for(var t=0,n=256,r=0;r<e.accidentals.length;r++)"sharp"===e.accidentals[r].acc?t++:"flat"===e.accidentals[r].acc&&n--;var a=i(256!==n?n:t,2),s="m"===e.mode?"%01":"%00";return"%00%FF%59%02"+a+s}(n)),a&&(this.track+=function(e){var t,n="%00%FF%58%04"+i(e.num,2),r={1:0,2:1,4:2,8:3,16:4,32:5}[e.den];if(!r)return"";switch(n+=i(r,2),e.num+"/"+e.den){case"2/4":case"3/4":case"4/4":case"5/4":t=24;break;case"6/4":t=72;break;case"2/2":case"3/2":case"4/2":t=48;break;case"3/8":case"6/8":case"9/8":case"12/8":t=36}return t?(n+=i(t,2))+"%08":""}(a)),t&&(this.track+=r(t,"%01")),this.endTrack()}},t.prototype.startTrack=function(){this.track="",this.trackName="",this.trackInstrument="",this.silencelength=0,this.trackcount++,this.instrument&&this.setInstrument(this.instrument)},t.prototype.endTrack=function(){this.track=this.trackName+this.trackInstrument+this.track;var e=i(this.track.length/3+4,8);this.track="MTrk"+e+this.track+"%00%FF%2F%00",this.trackstrings+=this.track},t.prototype.setText=function(e,t){switch(e){case"name":this.trackName=r(t,"%03")}},t.prototype.setInstrument=function(e){this.trackInstrument="%00%C0"+i(e,2),this.instrument=e},t.prototype.setChannel=function(e,t){this.channel=e;var n="%00%B"+this.channel.toString(16);this.track+=n+"%79%00",this.track+=n+"%40%00",this.track+=n+"%5B%30",t||(t=0),t=Math.round(64*(t+1)),this.track+=n+"%0A"+i(t,2),this.track+=n+"%07%64",this.noteOnAndChannel="%9"+this.channel.toString(16),this.noteOffAndChannel="%8"+this.channel.toString(16)},t.prototype.startNote=function(e,t){this.track+=a(this.silencelength),this.silencelength=0,this.track+=this.noteOnAndChannel,this.track+="%"+e.toString(16)+i(t,2)},t.prototype.endNote=function(e){this.track+=a(this.silencelength),this.silencelength=0,this.track+=this.noteOffAndChannel,this.track+="%"+e.toString(16)+"%00"},t.prototype.addRest=function(e){this.silencelength+=e,this.silencelength<0&&(this.silencelength=0)},t.prototype.getData=function(){return"data:audio/midi,MThd%00%00%00%06%00%01"+i(this.trackcount,4)+"%01%e0"+this.trackstrings},t.prototype.embed=function(t,n){var r=this.getData(),i=e(document.createElement("a"),{href:r});if(i.innerHTML="download midi",t.insertBefore(i,t.firstChild),!n){var a=e(document.createElement("embed"),{src:r,type:"video/quicktime",controller:"true",autoplay:"false",loop:"false",enablejavascript:"true",style:"display:block; height: 20px;"});t.insertBefore(a,t.firstChild)}},n=function(){return new t}}(),e.exports=n}])})); property in AnonymousFunctionc4f1d8419200.r.AnonymousFunctionc4f1d8419300.i
/plugin/c3chart/assets/
H A Dd3.min.js2 …e&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})})(this,function(t){"use strict";function n(t,…
/plugin/flowcharts/
H A Dmermaid.min.js1 …define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undef…
/plugin/bpmnio/vendor/dmn-js/dist/
H A Ddmn-modeler.production.min.js21 …et="_blank" class="bjs-powered-by" title="Powered by bpmn.io" style="position: absolute; bottom: 1… argument
/plugin/ol3/
H A Dscript.js8 …){if(a()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new … function
/plugin/mermaid/
H A Dmermaid.min.js1323 `);const m=Oe().securityLevel;let b;m==="sandbox"&amp;&amp;(b=Mr("#i"+a));const E=Mr(m==="sandbox"?b.nodes()[0].contentDocument.body:"body");nv.init();const C=E.select("#"+a);RP.initGraphi global() function
[all...]
/plugin/aichat/vendor/mehrab-wj/tiktoken-php/data/
H A Dencoder.json1 {"!": 0, "\"": 1, "#": 2, "$": 3, "%": 4, "&": 5, "'": 6, "(": 7, ")": 8, "*": 9, "+": 10, ",": 11, "-": 12, ".": 13, "/": 14, "0": 15, "1": 16, "2": 17, "3": 18, "4": 19, "5": 20, "6": 21, "7": 22, "8": 23, "9": 24, ":": 25, ";": 26, "<": 27, "=": 28, ">": 29, "?": 30, "@": 31, "A": 32, "B": 33, "C": 34, "D": 35, "E": 36, "F": 37, "G": 38, "H": 39, "I": 40, "J": 41, "K": 42, "L": 43, "M": 44, "N": 45, "O": 46, "P": 47, "Q": 48, "R": 49, "S": 50, "T": 51, "U": 52, "V": 53, "W": 54, "X": 55, "Y": 56, "Z": 57, "[": 58, "\\": 59, "]": 60, "^": 61, "_": 62, "`": 63, "a": 64, "b": 65, "c": 66, "d": 67, "e": 68, "f": 69, "g": 70, "h": 71, "i": 72, "j": 73, "k": 74, "l": 75, "m": 76, "n": 77, "o": 78, "p": 79, "q": 80, "r": 81, "s": 82, "t": 83, "u": 84, "v": 85, "w": 86, "x": 87, "y": 88, "z": 89, "{": 90, "|": 91, "}": 92, "~": 93, "\u00a1": 94, "\u00a2": 95, "\u00a3": 96, "\u00a4": 97, "\u00a5": 98, "\u00a6": 99, "\u00a7": 100, "\u00a8": 101, "\u00a9": 102, "\u00aa": 103, "\u00ab": 104, "\u00ac": 105, "\u00ae": 106, "\u00af": 107, "\u00b0": 108, "\u00b1": 109, "\u00b2": 110, "\u00b3": 111, "\u00b4": 112, "\u00b5": 113, "\u00b6": 114, "\u00b7": 115, "\u00b8": 116, "\u00b9": 117, "\u00ba": 118, "\u00bb": 119, "\u00bc": 120, "\u00bd": 121, "\u00be": 122, "\u00bf": 123, "\u00c0": 124, "\u00c1": 125, "\u00c2": 126, "\u00c3": 127, "\u00c4": 128, "\u00c5": 129, "\u00c6": 130, "\u00c7": 131, "\u00c8": 132, "\u00c9": 133, "\u00ca": 134, "\u00cb": 135, "\u00cc": 136, "\u00cd": 137, "\u00ce": 138, "\u00cf": 139, "\u00d0": 140, "\u00d1": 141, "\u00d2": 142, "\u00d3": 143, "\u00d4": 144, "\u00d5": 145, "\u00d6": 146, "\u00d7": 147, "\u00d8": 148, "\u00d9": 149, "\u00da": 150, "\u00db": 151, "\u00dc": 152, "\u00dd": 153, "\u00de": 154, "\u00df": 155, "\u00e0": 156, "\u00e1": 157, "\u00e2": 158, "\u00e3": 159, "\u00e4": 160, "\u00e5": 161, "\u00e6": 162, "\u00e7": 163, "\u00e8": 164, "\u00e9": 165, "\u00ea": 166, "\u00eb": 167, "\u00ec": 168, "\u00ed": 169, "\u00ee": 170, "\u00ef": 171, "\u00f0": 172, "\u00f1": 173, "\u00f2": 174, "\u00f3": 175, "\u00f4": 176, "\u00f5": 177, "\u00f6": 178, "\u00f7": 179, "\u00f8": 180, "\u00f9": 181, "\u00fa": 182, "\u00fb": 183, "\u00fc": 184, "\u00fd": 185, "\u00fe": 186, "\u00ff": 187, "\u0100": 188, "\u0101": 189, "\u0102": 190, "\u0103": 191, "\u0104": 192, "\u0105": 193, "\u0106": 194, "\u0107": 195, "\u0108": 196, "\u0109": 197, "\u010a": 198, "\u010b": 199, "\u010c": 200, "\u010d": 201, "\u010e": 202, "\u010f": 203, "\u0110": 204, "\u0111": 205, "\u0112": 206, "\u0113": 207, "\u0114": 208, "\u0115": 209, "\u0116": 210, "\u0117": 211, "\u0118": 212, "\u0119": 213, "\u011a": 214, "\u011b": 215, "\u011c": 216, "\u011d": 217, "\u011e": 218, "\u011f": 219, "\u0120": 220, "\u0121": 221, "\u0122": 222, "\u0123": 223, "\u0124": 224, "\u0125": 225, "\u0126": 226, "\u0127": 227, "\u0128": 228, "\u0129": 229, "\u012a": 230, "\u012b": 231, "\u012c": 232, "\u012d": 233, "\u012e": 234, "\u012f": 235, "\u0130": 236, "\u0131": 237, "\u0132": 238, "\u0133": 239, "\u0134": 240, "\u0135": 241, "\u0136": 242, "\u0137": 243, "\u0138": 244, "\u0139": 245, "\u013a": 246, "\u013b": 247, "\u013c": 248, "\u013d": 249, "\u013e": 250, "\u013f": 251, "\u0140": 252, "\u0141": 253, "\u0142": 254, "\u0143": 255, "\u0120t": 256, "\u0120a": 257, "he": 258, "in": 259, "re": 260, "on": 261, "\u0120the": 262, "er": 263, "\u0120s": 264, "at": 265, "\u0120w": 266, "\u0120o": 267, "en": 268, "\u0120c": 269, "it": 270, "is": 271, "an": 272, "or": 273, "es": 274, "\u0120b": 275, "ed": 276, "\u0120f": 277, "ing": 278, "\u0120p": 279, "ou": 280, "\u0120an": 281, "al": 282, "ar": 283, "\u0120to": 284, "\u0120m": 285, "\u0120of": 286, "\u0120in": 287, "\u0120d": 288, "\u0120h": 289, "\u0120and": 290, "ic": 291, "as": 292, "le": 293, "\u0120th": 294, "ion": 295, "om": 296, "ll": 297, "ent": 298, "\u0120n": 299, "\u0120l": 300, "st": 301, "\u0120re": 302, "ve": 303, "\u0120e": 304, "ro": 305, "ly": 306, "\u0120be": 307, "\u0120g": 308, "\u0120T": 309, "ct": 310, "\u0120S": 311, "id": 312, "ot": 313, "\u0120I": 314, "ut": 315, "et": 316, "\u0120A": 317, "\u0120is": 318, "\u0120on": 319, "im": 320, "am": 321, "ow": 322, "ay": 323, "ad": 324, "se": 325, "\u0120that": 326, "\u0120C": 327, "ig": 328, "\u0120for": 329, "ac": 330, "\u0120y": 331, "ver": 332, "ur": 333, "\u0120u": 334, "ld": 335, "\u0120st": 336, "\u0120M": 337, "'s": 338, "\u0120he": 339, "\u0120it": 340, "ation": 341, "ith": 342, "ir": 343, "ce": 344, "\u0120you": 345, "il": 346, "\u0120B": 347, "\u0120wh": 348, "ol": 349, "\u0120P": 350, "\u0120with": 351, "\u01201": 352, "ter": 353, "ch": 354, "\u0120as": 355, "\u0120we": 356, "\u0120(": 357, "nd": 358, "ill": 359, "\u0120D": 360, "if": 361, "\u01202": 362, "ag": 363, "ers": 364, "ke": 365, "\u0120\"": 366, "\u0120H": 367, "em": 368, "\u0120con": 369, "\u0120W": 370, "\u0120R": 371, "her": 372, "\u0120was": 373, "\u0120r": 374, "od": 375, "\u0120F": 376, "ul": 377, "ate": 378, "\u0120at": 379, "ri": 380, "pp": 381, "ore": 382, "\u0120The": 383, "\u0120se": 384, "us": 385, "\u0120pro": 386, "\u0120ha": 387, "um": 388, "\u0120are": 389, "\u0120de": 390, "ain": 391, "and": 392, "\u0120or": 393, "igh": 394, "est": 395, "ist": 396, "ab": 397, "rom": 398, "\u0120N": 399, "th": 400, "\u0120com": 401, "\u0120G": 402, "un": 403, "op": 404, "00": 405, "\u0120L": 406, "\u0120not": 407, "ess": 408, "\u0120ex": 409, "\u0120v": 410, "res": 411, "\u0120E": 412, "ew": 413, "ity": 414, "ant": 415, "\u0120by": 416, "el": 417, "os": 418, "ort": 419, "oc": 420, "qu": 421, "\u0120from": 422, "\u0120have": 423, "\u0120su": 424, "ive": 425, "ould": 426, "\u0120sh": 427, "\u0120this": 428, "nt": 429, "ra": 430, "pe": 431, "ight": 432, "art": 433, "ment": 434, "\u0120al": 435, "ust": 436, "end": 437, "--": 438, "all": 439, "\u0120O": 440, "ack": 441, "\u0120ch": 442, "\u0120le": 443, "ies": 444, "red": 445, "ard": 446, "\u00e2\u0122": 447, "out": 448, "\u0120J": 449, "\u0120ab": 450, "ear": 451, "iv": 452, "ally": 453, "our": 454, "ost": 455, "gh": 456, "pt": 457, "\u0120pl": 458, "ast": 459, "\u0120can": 460, "ak": 461, "ome": 462, "ud": 463, "The": 464, "\u0120his": 465, "\u0120do": 466, "\u0120go": 467, "\u0120has": 468, "ge": 469, "'t": 470, "\u0120U": 471, "rou": 472, "\u0120sa": 473, "\u0120j": 474, "\u0120but": 475, "\u0120wor": 476, "\u0120all": 477, "ect": 478, "\u0120k": 479, "ame": 480, "\u0120will": 481, "ok": 482, "\u0120whe": 483, "\u0120they": 484, "ide": 485, "01": 486, "ff": 487, "ich": 488, "pl": 489, "ther": 490, "\u0120tr": 491, "..": 492, "\u0120int": 493, "ie": 494, "ure": 495, "age": 496, "\u0120ne": 497, "ial": 498, "ap": 499, "ine": 500, "ice": 501, "\u0120me": 502, "\u0120out": 503, "ans": 504, "one": 505, "ong": 506, "ions": 507, "\u0120who": 508, "\u0120K": 509, "\u0120up": 510, "\u0120their": 511, "\u0120ad": 512, "\u01203": 513, "\u0120us": 514, "ated": 515, "ous": 516, "\u0120more": 517, "ue": 518, "og": 519, "\u0120St": 520, "ind": 521, "ike": 522, "\u0120so": 523, "ime": 524, "per": 525, ".\"": 526, "ber": 527, "iz": 528, "act": 529, "\u0120one": 530, "\u0120said": 531, "\u0120-": 532, "are": 533, "\u0120your": 534, "cc": 535, "\u0120Th": 536, "\u0120cl": 537, "ep": 538, "ake": 539, "able": 540, "ip": 541, "\u0120cont": 542, "\u0120which": 543, "ia": 544, "\u0120im": 545, "\u0120about": 546, "\u0120were": 547, "very": 548, "ub": 549, "\u0120had": 550, "\u0120en": 551, "\u0120comp": 552, ",\"": 553, "\u0120In": 554, "\u0120un": 555, "\u0120ag": 556, "ire": 557, "ace": 558, "au": 559, "ary": 560, "\u0120would": 561, "ass": 562, "ry": 563, "\u0120\u00e2\u0122": 564, "cl": 565, "ook": 566, "ere": 567, "so": 568, "\u0120V": 569, "ign": 570, "ib": 571, "\u0120off": 572, "\u0120te": 573, "ven": 574, "\u0120Y": 575, "ile": 576, "ose": 577, "ite": 578, "orm": 579, "\u0120201": 580, "\u0120res": 581, "\u0120man": 582, "\u0120per": 583, "\u0120other": 584, "ord": 585, "ult": 586, "\u0120been": 587, "\u0120like": 588, "ase": 589, "ance": 590, "ks": 591, "ays": 592, "own": 593, "ence": 594, "\u0120dis": 595, "ction": 596, "\u0120any": 597, "\u0120app": 598, "\u0120sp": 599, "int": 600, "ress": 601, "ations": 602, "ail": 603, "\u01204": 604, "ical": 605, "\u0120them": 606, "\u0120her": 607, "ount": 608, "\u0120Ch": 609, "\u0120ar": 610, "\u0120if": 611, "\u0120there": 612, "\u0120pe": 613, "\u0120year": 614, "av": 615, "\u0120my": 616, "\u0120some": 617, "\u0120when": 618, "ough": 619, "ach": 620, "\u0120than": 621, "ru": 622, "ond": 623, "ick": 624, "\u0120over": 625, "vel": 626, "\u0120qu": 627, "\u010a\u010a": 628, "\u0120sc": 629, "reat": 630, "ree": 631, "\u0120It": 632, "ound": 633, "port": 634, "\u0120also": 635, "\u0120part": 636, "fter": 637, "\u0120kn": 638, "\u0120bec": 639, "\u0120time": 640, "ens": 641, "\u01205": 642, "ople": 643, "\u0120what": 644, "\u0120no": 645, "du": 646, "mer": 647, "ang": 648, "\u0120new": 649, "----": 650, "\u0120get": 651, "ory": 652, "ition": 653, "ings": 654, "\u0120just": 655, "\u0120into": 656, "\u01200": 657, "ents": 658, "ove": 659, "te": 660, "\u0120people": 661, "\u0120pre": 662, "\u0120its": 663, "\u0120rec": 664, "\u0120tw": 665, "ian": 666, "irst": 667, "ark": 668, "ors": 669, "\u0120work": 670, "ade": 671, "ob": 672, "\u0120she": 673, "\u0120our": 674, "wn": 675, "ink": 676, "lic": 677, "\u012019": 678, "\u0120He": 679, "ish": 680, "nder": 681, "ause": 682, "\u0120him": 683, "ons": 684, "\u0120[": 685, "\u0120ro": 686, "form": 687, "ild": 688, "ates": 689, "vers": 690, "\u0120only": 691, "oll": 692, "\u0120spe": 693, "ck": 694, "ell": 695, "amp": 696, "\u0120acc": 697, "\u0120bl": 698, "ious": 699, "urn": 700, "ft": 701, "ood": 702, "\u0120how": 703, "hed": 704, "\u0120'": 705, "\u0120after": 706, "aw": 707, "\u0120att": 708, "ov": 709, "ne": 710, "\u0120play": 711, "erv": 712, "ict": 713, "\u0120could": 714, "itt": 715, "\u0120am": 716, "\u0120first": 717, "\u01206": 718, "\u0120act": 719, "\u0120$": 720, "ec": 721, "hing": 722, "ual": 723, "ull": 724, "\u0120comm": 725, "oy": 726, "old": 727, "ces": 728, "ater": 729, "\u0120fe": 730, "\u0120bet": 731, "we": 732, "iff": 733, "\u0120two": 734, "ock": 735, "\u0120back": 736, ").": 737, "ident": 738, "\u0120under": 739, "rough": 740, "sel": 741, "xt": 742, "\u0120may": 743, "round": 744, "\u0120po": 745, "ph": 746, "iss": 747, "\u0120des": 748, "\u0120most": 749, "\u0120did": 750, "\u0120add": 751, "ject": 752, "\u0120inc": 753, "fore": 754, "\u0120pol": 755, "ont": 756, "\u0120again": 757, "clud": 758, "tern": 759, "\u0120know": 760, "\u0120need": 761, "\u0120cons": 762, "\u0120co": 763, "\u0120.": 764, "\u0120want": 765, "\u0120see": 766, "\u01207": 767, "ning": 768, "iew": 769, "\u0120This": 770, "ced": 771, "\u0120even": 772, "\u0120ind": 773, "ty": 774, "\u0120We": 775, "ath": 776, "\u0120these": 777, "\u0120pr": 778, "\u0120use": 779, "\u0120because": 780, "\u0120fl": 781, "ng": 782, "\u0120now": 783, "\u0120\u00e2\u0122\u0135": 784, "com": 785, "ise": 786, "\u0120make": 787, "\u0120then": 788, "ower": 789, "\u0120every": 790, "\u0120Un": 791, "\u0120sec": 792, "oss": 793, "uch": 794, "\u0120em": 795, "\u0120=": 796, "\u0120Re": 797, "ied": 798, "rit": 799, "\u0120inv": 800, "lect": 801, "\u0120supp": 802, "ating": 803, "\u0120look": 804, "man": 805, "pect": 806, "\u01208": 807, "row": 808, "\u0120bu": 809, "\u0120where": 810, "ific": 811, "\u0120years": 812, "ily": 813, "\u0120diff": 814, "\u0120should": 815, "\u0120rem": 816, "Th": 817, "In": 818, "\u0120ev": 819, "day": 820, "'re": 821, "rib": 822, "\u0120rel": 823, "ss": 824, "\u0120def": 825, "\u0120right": 826, "\u0120sy": 827, "),": 828, "les": 829, "000": 830, "hen": 831, "\u0120through": 832, "\u0120Tr": 833, "__": 834, "\u0120way": 835, "\u0120don": 836, "\u0120,": 837, "\u012010": 838, "ased": 839, "\u0120ass": 840, "ublic": 841, "\u0120reg": 842, "\u0120And": 843, "ix": 844, "\u0120very": 845, "\u0120includ": 846, "other": 847, "\u0120imp": 848, "oth": 849, "\u0120sub": 850, "\u0120\u00e2\u0122\u0136": 851, "\u0120being": 852, "arg": 853, "\u0120Wh": 854, "==": 855, "ible": 856, "\u0120does": 857, "ange": 858, "ram": 859, "\u01209": 860, "ert": 861, "ps": 862, "ited": 863, "ational": 864, "\u0120br": 865, "\u0120down": 866, "\u0120many": 867, "aking": 868, "\u0120call": 869, "uring": 870, "ities": 871, "\u0120ph": 872, "ics": 873, "als": 874, "\u0120dec": 875, "ative": 876, "ener": 877, "\u0120before": 878, "ility": 879, "\u0120well": 880, "\u0120much": 881, "erson": 882, "\u0120those": 883, "\u0120such": 884, "\u0120ke": 885, "\u0120end": 886, "\u0120But": 887, "ason": 888, "ting": 889, "\u0120long": 890, "ef": 891, "\u0120think": 892, "ys": 893, "\u0120bel": 894, "\u0120sm": 895, "its": 896, "ax": 897, "\u0120own": 898, "\u0120prov": 899, "\u0120set": 900, "ife": 901, "ments": 902, "ble": 903, "ward": 904, "\u0120show": 905, "\u0120pres": 906, "ms": 907, "omet": 908, "\u0120ob": 909, "\u0120say": 910, "\u0120Sh": 911, "ts": 912, "ful": 913, "\u0120eff": 914, "\u0120gu": 915, "\u0120inst": 916, "und": 917, "ren": 918, "cess": 919, "\u0120ent": 920, "\u0120You": 921, "\u0120good": 922, "\u0120start": 923, "ince": 924, "\u0120made": 925, "tt": 926, "stem": 927, "olog": 928, "up": 929, "\u0120|": 930, "ump": 931, "\u0120hel": 932, "vern": 933, "ular": 934, "ually": 935, "\u0120ac": 936, "\u0120mon": 937, "\u0120last": 938, "\u0120200": 939, "10": 940, "\u0120stud": 941, "ures": 942, "\u0120Ar": 943, "self": 944, "ars": 945, "meric": 946, "ues": 947, "cy": 948, "\u0120min": 949, "ollow": 950, "\u0120col": 951, "io": 952, "\u0120mod": 953, "\u0120count": 954, "\u0120Com": 955, "hes": 956, "\u0120fin": 957, "air": 958, "ier": 959, "\u00e2\u0122\u0136": 960, "read": 961, "ank": 962, "atch": 963, "ever": 964, "\u0120str": 965, "\u0120point": 966, "ork": 967, "\u0120New": 968, "\u0120sur": 969, "ool": 970, "alk": 971, "ement": 972, "\u0120used": 973, "ract": 974, "ween": 975, "\u0120same": 976, "oun": 977, "\u0120Al": 978, "ci": 979, "\u0120differe": 980, "\u0120while": 981, "--------": 982, "\u0120game": 983, "cept": 984, "\u0120sim": 985, "...": 986, "\u0120inter": 987, "ek": 988, "\u0120report": 989, "\u0120produ": 990, "\u0120still": 991, "led": 992, "ah": 993, "\u0120here": 994, "\u0120world": 995, "\u0120though": 996, "\u0120num": 997, "arch": 998, "imes": 999, "ale": 1000, "\u0120Se": 1001, "\u0120If": 1002, "//": 1003, "\u0120Le": 1004, "\u0120ret": 1005, "\u0120ref": 1006, "\u0120trans": 1007, "ner": 1008, "ution": 1009, "ters": 1010, "\u0120take": 1011, "\u0120Cl": 1012, "\u0120conf": 1013, "way": 1014, "ave": 1015, "\u0120going": 1016, "\u0120sl": 1017, "ug": 1018, "\u0120Americ": 1019, "\u0120spec": 1020, "\u0120hand": 1021, "\u0120between": 1022, "ists": 1023, "\u0120De": 1024, "oot": 1025, "It": 1026, "\u0120ear": 1027, "\u0120against": 1028, "\u0120high": 1029, "gan": 1030, "az": 1031, "ather": 1032, "\u0120exp": 1033, "\u0120op": 1034, "\u0120ins": 1035, "\u0120gr": 1036, "\u0120help": 1037, "\u0120requ": 1038, "ets": 1039, "ins": 1040, "\u0120Pro": 1041, "ism": 1042, "\u0120found": 1043, "land": 1044, "ata": 1045, "uss": 1046, "ames": 1047, "\u0120person": 1048, "\u0120great": 1049, "pr": 1050, "\u0120sign": 1051, "\u0120An": 1052, "'ve": 1053, "\u0120somet": 1054, "\u0120ser": 1055, "hip": 1056, "\u0120run": 1057, "\u0120:": 1058, "\u0120ter": 1059, "irect": 1060, "\u0120follow": 1061, "\u0120det": 1062, "ices": 1063, "\u0120find": 1064, "12": 1065, "\u0120mem": 1066, "\u0120cr": 1067, "ered": 1068, "ex": 1069, "\u0120ext": 1070, "uth": 1071, "ense": 1072, "co": 1073, "\u0120team": 1074, "ving": 1075, "ouse": 1076, "ash": 1077, "att": 1078, "ved": 1079, "\u0120system": 1080, "\u0120As": 1081, "der": 1082, "ives": 1083, "min": 1084, "\u0120lead": 1085, "\u0120Bl": 1086, "cent": 1087, "\u0120around": 1088, "\u0120govern": 1089, "\u0120cur": 1090, "velop": 1091, "any": 1092, "\u0120cour": 1093, "alth": 1094, "ages": 1095, "ize": 1096, "\u0120car": 1097, "ode": 1098, "\u0120law": 1099, "\u0120read": 1100, "'m": 1101, "con": 1102, "\u0120real": 1103, "\u0120support": 1104, "\u012012": 1105, "....": 1106, "\u0120really": 1107, "ness": 1108, "\u0120fact": 1109, "\u0120day": 1110, "\u0120both": 1111, "ying": 1112, "\u0120serv": 1113, "\u0120For": 1114, "\u0120three": 1115, "\u0120wom": 1116, "\u0120med": 1117, "ody": 1118, "\u0120They": 1119, "50": 1120, "\u0120exper": 1121, "ton": 1122, "\u0120each": 1123, "akes": 1124, "\u0120che": 1125, "\u0120cre": 1126, "ines": 1127, "\u0120rep": 1128, "19": 1129, "gg": 1130, "illion": 1131, "\u0120grou": 1132, "ute": 1133, "ik": 1134, "We": 1135, "get": 1136, "ER": 1137, "\u0120met": 1138, "\u0120says": 1139, "ox": 1140, "\u0120during": 1141, "ern": 1142, "ized": 1143, "ared": 1144, "\u0120fam": 1145, "ically": 1146, "\u0120happ": 1147, "\u0120Is": 1148, "\u0120char": 1149, "med": 1150, "vent": 1151, "\u0120gener": 1152, "ient": 1153, "ple": 1154, "iet": 1155, "rent": 1156, "11": 1157, "ves": 1158, "ption": 1159, "\u012020": 1160, "formation": 1161, "\u0120cor": 1162, "\u0120offic": 1163, "ield": 1164, "\u0120too": 1165, "ision": 1166, "\u0120inf": 1167, "\u0120Z": 1168, "the": 1169, "oad": 1170, "\u0120public": 1171, "\u0120prog": 1172, "ric": 1173, "**": 1174, "\u0120war": 1175, "\u0120power": 1176, "view": 1177, "\u0120few": 1178, "\u0120loc": 1179, "\u0120different": 1180, "\u0120state": 1181, "\u0120head": 1182, "'ll": 1183, "\u0120poss": 1184, "\u0120stat": 1185, "ret": 1186, "ants": 1187, "\u0120val": 1188, "\u0120iss": 1189, "\u0120cle": 1190, "ivers": 1191, "anc": 1192, "\u0120expl": 1193, "\u0120another": 1194, "\u0120Q": 1195, "\u0120av": 1196, "thing": 1197, "nce": 1198, "Wh": 1199, "\u0120child": 1200, "\u0120since": 1201, "ired": 1202, "less": 1203, "\u0120life": 1204, "\u0120develop": 1205, "ittle": 1206, "\u0120dep": 1207, "\u0120pass": 1208, "\u00e3\u0125": 1209, "\u0120turn": 1210, "orn": 1211, "This": 1212, "bers": 1213, "ross": 1214, "\u0120Ad": 1215, "\u0120fr": 1216, "\u0120resp": 1217, "\u0120second": 1218, "oh": 1219, "\u0120/": 1220, "\u0120disc": 1221, "\u0120&": 1222, "\u0120something": 1223, "\u0120comple": 1224, "\u0120ed": 1225, "\u0120fil": 1226, "\u0120month": 1227, "aj": 1228, "uc": 1229, "\u0120government": 1230, "\u0120without": 1231, "\u0120leg": 1232, "\u0120dist": 1233, "\u0120put": 1234, "\u0120quest": 1235, "ann": 1236, "\u0120prot": 1237, "20": 1238, "\u0120never": 1239, "ience": 1240, "\u0120level": 1241, "\u0120art": 1242, "\u0120things": 1243, "\u0120might": 1244, "\u0120effect": 1245, "\u0120contro": 1246, "\u0120cent": 1247, "\u012018": 1248, "\u0120allow": 1249, "\u0120belie": 1250, "chool": 1251, "ott": 1252, "\u0120incre": 1253, "\u0120feel": 1254, "\u0120result": 1255, "\u0120lot": 1256, "\u0120fun": 1257, "ote": 1258, "\u0120ty": 1259, "erest": 1260, "\u0120contin": 1261, "\u0120using": 1262, "\u0120big": 1263, "201": 1264, "\u0120ask": 1265, "\u0120best": 1266, "\u0120)": 1267, "IN": 1268, "\u0120opp": 1269, "30": 1270, "\u0120number": 1271, "iness": 1272, "St": 1273, "lease": 1274, "\u0120ca": 1275, "\u0120must": 1276, "\u0120direct": 1277, "\u0120gl": 1278, "\u0120<": 1279, "\u0120open": 1280, "\u0120post": 1281, "\u0120come": 1282, "\u0120seem": 1283, "ording": 1284, "\u0120week": 1285, "ately": 1286, "ital": 1287, "\u0120el": 1288, "riend": 1289, "\u0120far": 1290, "\u0120tra": 1291, "inal": 1292, "\u0120pri": 1293, "\u0120US": 1294, "\u0120place": 1295, "\u0120form": 1296, "\u0120told": 1297, "\":": 1298, "ains": 1299, "ature": 1300, "\u0120Trump": 1301, "\u0120stand": 1302, "\u0120#": 1303, "ider": 1304, "\u0120Fr": 1305, "\u0120next": 1306, "\u0120soc": 1307, "\u0120pur": 1308, "\u0120let": 1309, "\u0120little": 1310, "\u0120hum": 1311, "\u0120i": 1312, "ron": 1313, "15": 1314, "\u012015": 1315, "\u0120commun": 1316, "\u0120mark": 1317, "\u0120There": 1318, "\u0120wr": 1319, "\u0120That": 1320, "\u0120information": 1321, "ways": 1322, "\u0120bus": 1323, "app": 1324, "\u0120invest": 1325, "me": 1326, "\u0120hard": 1327, "ained": 1328, "ead": 1329, "\u0120import": 1330, "\u0120appro": 1331, "\u0120test": 1332, "\u0120tri": 1333, "\u0120rest": 1334, "osed": 1335, "\u0120full": 1336, "\u0120care": 1337, "\u0120Sp": 1338, "\u0120case": 1339, "ON": 1340, "\u0120sk": 1341, "\u0120less": 1342, "\u0120+": 1343, "\u0120partic": 1344, "\u0120Pl": 1345, "ably": 1346, "uck": 1347, "ished": 1348, "chn": 1349, "be": 1350, "\u0120list": 1351, "ator": 1352, "\u0120top": 1353, "\u0120adv": 1354, "\u0120Be": 1355, "ruct": 1356, "\u0120dem": 1357, "ration": 1358, "ling": 1359, "gy": 1360, "reen": 1361, "ger": 1362, "\u0120home": 1363, "\u0120left": 1364, "\u0120better": 1365, "\u0120data": 1366, "\u012011": 1367, "\u0120attack": 1368, "\u0120proble": 1369, "line": 1370, "ards": 1371, "\u0120beh": 1372, "ral": 1373, "\u0120How": 1374, "\u0120She": 1375, "arge": 1376, "\u0120--": 1377, "://": 1378, "\u0120bro": 1379, "\u0120Ph": 1380, "ats": 1381, "\u0120build": 1382, "ww": 1383, "ided": 1384, "aim": 1385, "ases": 1386, "ency": 1387, "\u0120main": 1388, "ined": 1389, "\u0120including": 1390, "\u0120{": 1391, "\u0120got": 1392, "\u0120interest": 1393, "\u0120keep": 1394, "\u0120X": 1395, "\u0120eas": 1396, "aining": 1397, "\u0120class": 1398, "\u00e2\u0122\u00a6": 1399, "\u0120No": 1400, "\u0120var": 1401, "\u0120small": 1402, "ample": 1403, "AT": 1404, "\u0120ide": 1405, "\u0120So": 1406, "\u0120rece": 1407, "\u0120polit": 1408, "\u0120mov": 1409, "\u0120plan": 1410, "\u0120percent": 1411, "iving": 1412, "\u0120camp": 1413, "\u0120pay": 1414, "14": 1415, "sc": 1416, "ised": 1417, "\u0120unt": 1418, "oney": 1419, "ploy": 1420, "====": 1421, "\u0120didn": 1422, "\u0120Ind": 1423, "els": 1424, "ertain": 1425, "\u0120pos": 1426, "____": 1427, "iver": 1428, "\u0120process": 1429, "\u0120program": 1430, "ified": 1431, "\u0120Rep": 1432, "16": 1433, "uro": 1434, "ology": 1435, "atter": 1436, "ina": 1437, "\u0120name": 1438, "\u0120All": 1439, "\u0120four": 1440, "\u0120return": 1441, "vious": 1442, "bs": 1443, "\u0120called": 1444, "\u0120move": 1445, "\u0120Sc": 1446, "ird": 1447, "\u0120group": 1448, "\u0120bre": 1449, "\u0120men": 1450, "\u0120cap": 1451, "ten": 1452, "ee": 1453, "\u0120dri": 1454, "leg": 1455, "here": 1456, "uthor": 1457, "\u0120pat": 1458, "\u0120current": 1459, "ides": 1460, "\u0120pop": 1461, "to": 1462, "ention": 1463, "\u0120always": 1464, "\u0120mil": 1465, "\u0120women": 1466, "\u012016": 1467, "\u0120old": 1468, "iven": 1469, "raph": 1470, "\u0120Or": 1471, "ror": 1472, "ently": 1473, "\u0120near": 1474, "\u0120Ex": 1475, "ream": 1476, "sh": 1477, "\u012014": 1478, "\u0120free": 1479, "ission": 1480, "stand": 1481, "\u0120Con": 1482, "ality": 1483, "used": 1484, "13": 1485, "\u0120design": 1486, "\u0120change": 1487, "\u0120chang": 1488, "\u0120bo": 1489, "\u0120vis": 1490, "ember": 1491, "\u0120book": 1492, "ready": 1493, "\u0120kill": 1494, "25": 1495, "pped": 1496, "\u0120away": 1497, "\u0120able": 1498, "\u0120country": 1499, "\u0120const": 1500, "arn": 1501, "\u0120order": 1502, "AR": 1503, "ior": 1504, "ium": 1505, "orth": 1506, "18": 1507, "ailable": 1508, "\u0120sw": 1509, "\u0120million": 1510, "\u012013": 1511, "atic": 1512, "ted": 1513, "\u0120Go": 1514, "\u0120oper": 1515, "eng": 1516, "\u0120thing": 1517, "ajor": 1518, "conom": 1519, "\u0120Comm": 1520, "\u0120why": 1521, "ured": 1522, "ural": 1523, "\u0120school": 1524, "by": 1525, "\u0120Mar": 1526, "\u0120aff": 1527, "\u0120days": 1528, "\u0120ann": 1529, "ush": 1530, "ane": 1531, "If": 1532, "eg": 1533, "\u0120prof": 1534, "\u0120health": 1535, "outh": 1536, "But": 1537, "ional": 1538, ".,": 1539, "\u0120sol": 1540, "\u0120already": 1541, "\u012030": 1542, "\u0120charact": 1543, "He": 1544, "\u0120friend": 1545, "ES": 1546, "ians": 1547, "icle": 1548, "'d": 1549, "\u0120On": 1550, "\u0120least": 1551, "\u0120prom": 1552, "\u0120dr": 1553, "\u0120hist": 1554, "ither": 1555, "\u0120est": 1556, "iqu": 1557, "17": 1558, "son": 1559, "\u0120tell": 1560, "\u0120talk": 1561, "ohn": 1562, "oint": 1563, "lection": 1564, "AN": 1565, "\u0120until": 1566, "augh": 1567, "\u0120later": 1568, "\u0120ve": 1569, "\u0120view": 1570, "ending": 1571, "ived": 1572, "\u0120word": 1573, "ware": 1574, "\u0120cost": 1575, "\u0120enough": 1576, "\u0120give": 1577, "\u0120United": 1578, "\u0120techn": 1579, "arent": 1580, "OR": 1581, "\u0120par": 1582, "\u0120Dr": 1583, "\u01202016": 1584, "rist": 1585, "ering": 1586, "\u0120\u00c2": 1587, "\u0120large": 1588, "side": 1589, "acy": 1590, "ccess": 1591, "\u0120win": 1592, "\u0120important": 1593, "\u0120199": 1594, "\u0120doesn": 1595, "\u012017": 1596, "\u0120business": 1597, "\u0120clear": 1598, "\u0120rese": 1599, "\",": 1600, "ury": 1601, "\u0120equ": 1602, "aster": 1603, "alf": 1604, "\u0120American": 1605, "nect": 1606, "\u0120expect": 1607, "iversity": 1608, "\u0120occ": 1609, "\u0120Fl": 1610, "\u0120kind": 1611, "\u0120mean": 1612, "\u0120past": 1613, "\u0120dev": 1614, "\u0120bas": 1615, "let": 1616, "raft": 1617, "\u0120organ": 1618, "\u0120del": 1619, "\u0120perform": 1620, "\u0120story": 1621, "\u0120season": 1622, "\u0120Col": 1623, "\u0120claim": 1624, "\u0120came": 1625, "\u0120within": 1626, "\u0120line": 1627, "\u0120project": 1628, "\u0120At": 1629, "\u0120control": 1630, "ended": 1631, "\u0120Sy": 1632, "\u0120air": 1633, "ization": 1634, "\u0120*": 1635, "ley": 1636, "\u0120money": 1637, "idd": 1638, "You": 1639, "for": 1640, "\u0120family": 1641, "\u0120making": 1642, "\u0120bit": 1643, "\u0120police": 1644, "\u0120happen": 1645, "\u0120vers": 1646, "ony": 1647, "uff": 1648, "\u0120When": 1649, "\u0120sit": 1650, "ideo": 1651, "lf": 1652, "ison": 1653, "\u0120sure": 1654, "gin": 1655, "\u0120appear": 1656, "\u0120light": 1657, "\u0120es": 1658, "of": 1659, "\u0120water": 1660, "\u0120times": 1661, "not": 1662, "\u0120grow": 1663, "\u0120company": 1664, "\u0120Te": 1665, "ows": 1666, "\u0120mar": 1667, "ource": 1668, "iol": 1669, "arm": 1670, "br": 1671, "\u0120example": 1672, "\u0120conc": 1673, "\u0120fore": 1674, "\u0120To": 1675, "pro": 1676, "EN": 1677, "ries": 1678, "\u012025": 1679, "\u0120Can": 1680, "ney": 1681, "\u0120actually": 1682, "\u0120ever": 1683, "urity": 1684, "aken": 1685, "aps": 1686, "\u0120tax": 1687, "\u0120major": 1688, "ama": 1689, "\u0120often": 1690, "eral": 1691, "\u0120human": 1692, "\u0120job": 1693, "ister": 1694, "\u0120available": 1695, "ocr": 1696, "enn": 1697, "aid": 1698, "ivid": 1699, "\u0120record": 1700, "?\"": 1701, "\u0120sing": 1702, "\u0120Am": 1703, "idence": 1704, "\u0120news": 1705, "ster": 1706, "\u0120econom": 1707, "\u0120following": 1708, "\u0120Br": 1709, "ising": 1710, "\u0120hour": 1711, "most": 1712, "ument": 1713, "\u0120sex": 1714, "\u0120desc": 1715, "\u0120become": 1716, "\u0120Ed": 1717, "\u0120took": 1718, "\u0120having": 1719, "\u0120product": 1720, "ault": 1721, "As": 1722, "aring": 1723, "\u0120means": 1724, "\u0120hop": 1725, "une": 1726, "\u0120cho": 1727, "\u0120certain": 1728, "\u0120non": 1729, "\u0120deal": 1730, "24": 1731, "lement": 1732, "oci": 1733, "ene": 1734, "\u0120side": 1735, "\u0120Pr": 1736, "\u0120May": 1737, "\u0120reason": 1738, "ued": 1739, "ched": 1740, "ulation": 1741, "\u0120elect": 1742, "\u0120official": 1743, "\u0120possible": 1744, "\u0120hold": 1745, "ands": 1746, "ots": 1747, "\u0120city": 1748, "ories": 1749, "\u0120sever": 1750, "\u0120children": 1751, "\u0120once": 1752, "\u0120activ": 1753, "ler": 1754, "\u0120night": 1755, "itions": 1756, "\u0120John": 1757, "ape": 1758, "play": 1759, "\u0120done": 1760, "\u0120lim": 1761, "\u0120working": 1762, "\u0120Pres": 1763, "orld": 1764, "eb": 1765, "\u0120Co": 1766, "\u0120body": 1767, "ails": 1768, "utes": 1769, "\u0120Mr": 1770, "\u0120whether": 1771, "\u0120author": 1772, "rop": 1773, "\u0120proper": 1774, "\u0120seen": 1775, ");": 1776, "\u0120fac": 1777, "\u0120Su": 1778, "\u0120cond": 1779, "iting": 1780, "\u0120course": 1781, "\u0120}": 1782, "----------------": 1783, "aign": 1784, "\u0120event": 1785, "\u0120eng": 1786, "\u0120pot": 1787, "\u0120intern": 1788, "iam": 1789, "\u0120short": 1790, "empt": 1791, "\u00e3\u0124": 1792, "\u0120God": 1793, "ilar": 1794, "80": 1795, "\u0120orig": 1796, "IS": 1797, "ourn": 1798, "ability": 1799, "itive": 1800, "\u0120dam": 1801, "\u0120100": 1802, "\u0120press": 1803, "\u0120doing": 1804, "\u0120protect": 1805, "ring": 1806, "\u0120thought": 1807, "\u0120question": 1808, "rew": 1809, "\u0120War": 1810, "\u0120several": 1811, "\u0120State": 1812, "\u0120given": 1813, "\u0120fund": 1814, "\u0120Tw": 1815, "\u0120went": 1816, "ances": 1817, "work": 1818, "por": 1819, "my": 1820, "40": 1821, "\u0120arg": 1822, "artment": 1823, "ustom": 1824, "\u0120polic": 1825, "\u0120meet": 1826, "\u0120creat": 1827, "22": 1828, "\u0120States": 1829, "\u0120games": 1830, "raw": 1831, "uture": 1832, "\u0120understand": 1833, "urs": 1834, "\u0120Ob": 1835, "lish": 1836, "sy": 1837, "\u0120makes": 1838, "\u0120won": 1839, "agon": 1840, "\u0120htt": 1841, "\u0120love": 1842, "ential": 1843, "\u0120complete": 1844, "par": 1845, "\u0120Im": 1846, "AL": 1847, "\u0120account": 1848, "\u00c2\u0142": 1849, "ored": 1850, "vert": 1851, "\u0120ident": 1852, "\u01202015": 1853, "\u0120others": 1854, "\u0120Min": 1855, "iber": 1856, "verage": 1857, "There": 1858, "itional": 1859, "dd": 1860, "\u0120prob": 1861, "\u0120young": 1862, "\u0120along": 1863, "\u0120according": 1864, "\u0120yet": 1865, "\u0120members": 1866, "\u0120What": 1867, "oid": 1868, "\u0120Man": 1869, "And": 1870, "\u0120among": 1871, "ai": 1872, "\u0120employ": 1873, "\u0120Res": 1874, "\u0120>": 1875, "\u0120invol": 1876, "\u0120low": 1877, "af": 1878, "\u0120Car": 1879, "\u0120hig": 1880, "\u0120One": 1881, "\u0120Sec": 1882, "ination": 1883, "\u0120likely": 1884, "\u0120ant": 1885, "aged": 1886, "\u0120Russ": 1887, "\u0120ben": 1888, "\u0120rele": 1889, "For": 1890, "back": 1891, "\u0120Not": 1892, "\u0120president": 1893, "ball": 1894, "\u0120access": 1895, "ividual": 1896, "\u0120Dem": 1897, "\u0120Euro": 1898, "60": 1899, "\u0120known": 1900, "irl": 1901, "\u0120Gr": 1902, "\u0120early": 1903, "use": 1904, "iety": 1905, "\u00e2\u0122\u0135": 1906, "\u0120fight": 1907, "\u0120sent": 1908, "\u0120today": 1909, "\u0120market": 1910, "\".": 1911, "\u0120based": 1912, "\u0120strong": 1913, "urther": 1914, "\u0120deb": 1915, "mber": 1916, "\u0120problem": 1917, "\u0120death": 1918, "\u0120social": 1919, "imate": 1920, "AS": 1921, "ortun": 1922, "\u0120campaign": 1923, "ery": 1924, "Ch": 1925, "\u0120ey": 1926, "ially": 1927, "\u0120mus": 1928, "wh": 1929, "pos": 1930, "\u0120er": 1931, "\u0120saf": 1932, "\u0120months": 1933, "iron": 1934, "\u0120viol": 1935, "\u0120five": 1936, "\u0120stre": 1937, "\u0120players": 1938, "inc": 1939, "ald": 1940, "year": 1941, "aun": 1942, "\u0120success": 1943, "\u0120present": 1944, "erence": 1945, "\u01202014": 1946, "\u0120sugg": 1947, "\u0120particular": 1948, "\u0120try": 1949, "\u0120suggest": 1950, "\u0120Christ": 1951, "ones": 1952, "\u0120priv": 1953, "23": 1954, "\u0120crit": 1955, "\u0120land": 1956, "\u0120local": 1957, "ify": 1958, "29": 1959, "\u0120aut": 1960, "ED": 1961, "\u0120Gu": 1962, "\u0120mult": 1963, "\u0120political": 1964, "\u0120asked": 1965, "\u0120former": 1966, "itter": 1967, "ript": 1968, "\u0120close": 1969, "\u0120pract": 1970, "\u0120York": 1971, "\u0120getting": 1972, "\u0120across": 1973, "\u0120comb": 1974, "\u0120believe": 1975, "\u0120z": 1976, "\u0120toget": 1977, "\u0120together": 1978, "\u0120Cent": 1979, "irc": 1980, "\u0120individual": 1981, "\u0120Mc": 1982, "27": 1983, "isk": 1984, "\u0120Eng": 1985, "\u0120face": 1986, "\u012024": 1987, "\u0120value": 1988, "\u0120area": 1989, "ev": 1990, "\u0120writ": 1991, "\u0120President": 1992, "\u0120vot": 1993, "\u0120key": 1994, "\u0120mom": 1995, "put": 1996, "\u0120anything": 1997, "\u0120experience": 1998, "attle": 1999, "\u0120mind": 2000, "aff": 2001, "omm": 2002, "\u0120future": 2003, "ged": 2004, "\u0120cut": 2005, "\u0120tot": 2006, "itch": 2007, "\u0120video": 2008, "\u0120investig": 2009, "\u0120net": 2010, "\u0120My": 2011, "rict": 2012, "ien": 2013, ".)": 2014, "\u0120impro": 2015, "though": 2016, "wards": 2017, "\u0120connect": 2018, "\u0120Med": 2019, "selves": 2020, "ensive": 2021, "mb": 2022, "ober": 2023, "ators": 2024, "An": 2025, "\u012050": 2026, "\u0120redu": 2027, "resent": 2028, "\u0120above": 2029, "\u0120fre": 2030, "\u0120Europe": 2031, "sw": 2032, "\u0120amount": 2033, "\u0120App": 2034, "\u0120either": 2035, "\u0120milit": 2036, "\u0120anal": 2037, "\u0120fail": 2038, "\u0120En": 2039, "ales": 2040, "\u0120special": 2041, "\u0120black": 2042, "IT": 2043, "cher": 2044, "\u0120looking": 2045, "\u0120fire": 2046, "yn": 2047, "\u0120almost": 2048, "oon": 2049, "\u0120study": 2050, "\u0120miss": 2051, "ches": 2052, "rown": 2053, "\u0120tre": 2054, "\u0120community": 2055, "\u0120media": 2056, "\u0120food": 2057, "\u0120comes": 2058, "\u0120University": 2059, "\u0120single": 2060, "What": 2061, "uly": 2062, "\u0120half": 2063, "ague": 2064, "hod": 2065, "\u0120Republic": 2066, "\u0120started": 2067, "\u0120quick": 2068, "oto": 2069, "book": 2070, "\u0120issue": 2071, "itor": 2072, "\u0120else": 2073, "\u0120consider": 2074, "26": 2075, "rodu": 2076, "\u0120taken": 2077, "28": 2078, "99": 2079, "\u0120With": 2080, "\u0120true": 2081, "\u0120wa": 2082, "\u0120trad": 2083, "\u0120ago": 2084, "\u0120mess": 2085, "ief": 2086, "\u0120added": 2087, "oke": 2088, "\u0120bad": 2089, "\u0120fav": 2090, "33": 2091, "\u0120similar": 2092, "ask": 2093, "\u0120Don": 2094, "\u0120character": 2095, "orts": 2096, "\u0120House": 2097, "\u0120reported": 2098, "\u0120type": 2099, "val": 2100, "iod": 2101, "\u0120However": 2102, "\u0120targ": 2103, "\u0120entire": 2104, "pping": 2105, "\u0120history": 2106, "\u0120live": 2107, "ffic": 2108, "........": 2109, "ederal": 2110, "\u0120trying": 2111, "\u0120discuss": 2112, "\u0120Har": 2113, "aces": 2114, "lished": 2115, "\u0120self": 2116, "osp": 2117, "rest": 2118, "\u0120room": 2119, "elt": 2120, "\u0120fall": 2121, "olution": 2122, "\u0120et": 2123, "\u0120x": 2124, "\u0120isn": 2125, "\u0120idea": 2126, "bo": 2127, "\u0120sound": 2128, "\u0120Dep": 2129, "\u0120someone": 2130, "cially": 2131, "ully": 2132, "\u0120foc": 2133, "\u0120object": 2134, "ift": 2135, "aper": 2136, "\u0120player": 2137, "\u0120rather": 2138, "\u0120service": 2139, "ashing": 2140, "\u0120Do": 2141, "\u0120Part": 2142, "rug": 2143, "mon": 2144, "ply": 2145, "\u0120mor": 2146, "\u0120nothing": 2147, "\u0120provide": 2148, "IC": 2149, "ung": 2150, "\u0120party": 2151, "\u0120exist": 2152, "\u0120mag": 2153, "70": 2154, "\u0120rul": 2155, "\u0120house": 2156, "\u0120behind": 2157, "\u0120however": 2158, "\u0120World": 2159, "\u0120sum": 2160, "\u0120applic": 2161, "\u0120;": 2162, "\u0120function": 2163, "gr": 2164, "\u0120Pol": 2165, "\u0120front": 2166, "200": 2167, "\u0120series": 2168, "\u0120tem": 2169, "\u0120typ": 2170, "ills": 2171, "\u0120opt": 2172, "\u0120points": 2173, "\u0120below": 2174, "itted": 2175, "\u0120specific": 2176, "\u01202017": 2177, "umb": 2178, "\u0120ra": 2179, "\u0120previous": 2180, "\u0120pret": 2181, "reme": 2182, "\u0120custom": 2183, "\u0120court": 2184, "\u0120Me": 2185, "\u0120repl": 2186, "\u0120whole": 2187, "go": 2188, "cer": 2189, "\u0120treat": 2190, "\u0120Act": 2191, "\u0120probably": 2192, "\u0120learn": 2193, "ender": 2194, "\u0120Ass": 2195, "\u0120version": 2196, "now": 2197, "\u0120check": 2198, "\u0120Cal": 2199, "RE": 2200, "minist": 2201, "On": 2202, "ources": 2203, "\u0120benef": 2204, "\u0120doc": 2205, "\u0120deter": 2206, "\u0120enc": 2207, "\u0120super": 2208, "\u0120address": 2209, "\u0120vict": 2210, "\u01202013": 2211, "\u0120meas": 2212, "tr": 2213, "\u0120field": 2214, "When": 2215, "\u0120signific": 2216, "uge": 2217, "\u0120feat": 2218, "\u0120common": 2219, "load": 2220, "\u0120begin": 2221, "\u0120bring": 2222, "\u0120action": 2223, "erman": 2224, "\u0120describ": 2225, "\u0120indust": 2226, "\u0120wanted": 2227, "ried": 2228, "ming": 2229, "\u0120attempt": 2230, "45": 2231, "fer": 2232, "\u0120due": 2233, "ression": 2234, "##": 2235, "\u0120shall": 2236, "\u0120six": 2237, "oo": 2238, "\u0120step": 2239, "\u0120pub": 2240, "\u0120himself": 2241, "\u012023": 2242, "\u0120cop": 2243, "\u0120dest": 2244, "\u0120stop": 2245, "AC": 2246, "ibility": 2247, "\u0120lab": 2248, "icult": 2249, "\u0120hours": 2250, "\u0120create": 2251, "\u0120further": 2252, "\u0120America": 2253, "\u0120City": 2254, "\u0120dou": 2255, "head": 2256, "ST": 2257, "\u0120North": 2258, "cing": 2259, "\u0120national": 2260, "ule": 2261, "\u0120Inst": 2262, "\u0120taking": 2263, "\u0120Qu": 2264, "irt": 2265, "\u0120red": 2266, "\u0120research": 2267, "viron": 2268, "\u0120Ge": 2269, "\u0120break": 2270, "ana": 2271, "\u0120space": 2272, "aterial": 2273, "\u0120recent": 2274, "\u0120Ab": 2275, "\u0120general": 2276, "\u0120hit": 2277, "\u0120period": 2278, "\u0120everything": 2279, "ively": 2280, "\u0120phys": 2281, "\u0120saying": 2282, "anks": 2283, "\u0120cou": 2284, "\u0120cult": 2285, "aced": 2286, "eal": 2287, "uation": 2288, "\u0120coun": 2289, "lu": 2290, "\u0120include": 2291, "\u0120position": 2292, "\u0120After": 2293, "\u0120Canad": 2294, "\u0120Em": 2295, "\u0120imm": 2296, "\u0120Red": 2297, "\u0120pick": 2298, "\u0120compl": 2299, "\u0120matter": 2300, "reg": 2301, "ext": 2302, "angu": 2303, "isc": 2304, "ole": 2305, "aut": 2306, "\u0120compet": 2307, "eed": 2308, "fect": 2309, "\u012021": 2310, "\u0120Sen": 2311, "\u0120These": 2312, "asing": 2313, "\u0120cannot": 2314, "\u0120init": 2315, "\u0120relations": 2316, "ached": 2317, "\u0120bar": 2318, "\u012040": 2319, "\u0120TH": 2320, "\u01202012": 2321, "\u0120vol": 2322, "\u0120ground": 2323, "\u0120security": 2324, "\u0120upd": 2325, "ilt": 2326, "35": 2327, "\u0120concern": 2328, "\u0120Just": 2329, "\u0120white": 2330, "\u0120seems": 2331, "\u0120Her": 2332, "pecially": 2333, "ients": 2334, "\u0120announ": 2335, "\u0120fig": 2336, "ights": 2337, "\u0120stri": 2338, "like": 2339, "ids": 2340, "\u0120sus": 2341, "\u0120watch": 2342, "\u0120\u00e2": 2343, "\u0120wind": 2344, "\u0120Cont": 2345, "\u0120itself": 2346, "\u0120mass": 2347, "Al": 2348, "yle": 2349, "ique": 2350, "\u0120National": 2351, "\u0120abs": 2352, "\u0120pack": 2353, "\u0120outside": 2354, "\u0120anim": 2355, "\u0120pain": 2356, "eter": 2357, "\u0120manag": 2358, "duct": 2359, "ogn": 2360, "\u0120]": 2361, "\u0120Sept": 2362, "sec": 2363, "off": 2364, "\u0120Jan": 2365, "\u0120foot": 2366, "ades": 2367, "\u0120third": 2368, "\u0120mot": 2369, "\u0120evidence": 2370, "inton": 2371, "\u0120threat": 2372, "apt": 2373, "ples": 2374, "cle": 2375, "\u0120lo": 2376, "\u0120decl": 2377, "\u0120item": 2378, "medi": 2379, "\u0120represent": 2380, "omb": 2381, "amer": 2382, "\u0120significant": 2383, "ograph": 2384, "su": 2385, "\u0120cal": 2386, "ires": 2387, "0000": 2388, "ID": 2389, "AM": 2390, "\u0120simply": 2391, "\u0120longer": 2392, "\u0120file": 2393, "OT": 2394, "che": 2395, "So": 2396, "ateg": 2397, "org": 2398, "\u0120His": 2399, "\u0120ener": 2400, "\u0120dom": 2401, "\u0120upon": 2402, "ili": 2403, "\":\"": 2404, "\u0120themselves": 2405, "\u0120coming": 2406, "\u0120quite": 2407, "\u0120difficult": 2408, "\u0120Bar": 2409, "ilities": 2410, "rel": 2411, "ends": 2412, "cial": 2413, "64": 2414, "\u0120woman": 2415, "rap": 2416, "yr": 2417, "\u0120necess": 2418, "ips": 2419, "\u0120text": 2420, "\u0120require": 2421, "\u0120military": 2422, "\u0120review": 2423, "\u0120respons": 2424, "75": 2425, "\u0120subject": 2426, "\u0120instead": 2427, "\u0120issues": 2428, "\u0120gen": 2429, "\",\"": 2430, "\u0120minutes": 2431, "\u0120weap": 2432, "ray": 2433, "amed": 2434, "time": 2435, "bl": 2436, "How": 2437, "\u0120code": 2438, "\u0120Sm": 2439, "\u0120higher": 2440, "\u0120Ste": 2441, "ris": 2442, "\u0120page": 2443, "\u0120students": 2444, "\u0120Intern": 2445, "\u0120method": 2446, "\u0120Aug": 2447, "\u0120Per": 2448, "\u0120Ag": 2449, "\u0120policy": 2450, "\u0120Sw": 2451, "\u0120exec": 2452, "\u0120accept": 2453, "ume": 2454, "ribut": 2455, "\u0120words": 2456, "\u0120final": 2457, "\u0120changes": 2458, "\u0120Democr": 2459, "\u0120friends": 2460, "\u0120respect": 2461, "\u0120ep": 2462, "\u0120compan": 2463, "ivil": 2464, "\u0120damage": 2465, "****": 2466, "ogle": 2467, "vironment": 2468, "\u0120neg": 2469, "ental": 2470, "\u0120ap": 2471, "\u0120total": 2472, "ival": 2473, "!\"": 2474, "lim": 2475, "\u0120needs": 2476, "\u0120agre": 2477, "\u0120development": 2478, "\u0120age": 2479, "iple": 2480, "21": 2481, "\u0120results": 2482, "\u0120Af": 2483, "Sh": 2484, "\u0120gun": 2485, "\u0120Obama": 2486, "roll": 2487, "\u0120@": 2488, "\u0120rights": 2489, "\u0120Brit": 2490, "\u0120running": 2491, "\u0120wasn": 2492, "\u0120port": 2493, "\u0120rate": 2494, "\u0120pretty": 2495, "\u0120target": 2496, "\u0120saw": 2497, "\u0120circ": 2498, "\u0120works": 2499, "icro": 2500, "alt": 2501, "over": 2502, "www": 2503, "That": 2504, "lier": 2505, "\u0120everyone": 2506, "ude": 2507, "\u0120pie": 2508, "iddle": 2509, "rael": 2510, "\u0120rad": 2511, "\u0120block": 2512, "\u0120walk": 2513, "To": 2514, "\u00e3\u0123": 2515, "nes": 2516, "\u0120Aust": 2517, "aul": 2518, "rote": 2519, "\u0120South": 2520, "ession": 2521, "oph": 2522, "\u0120shows": 2523, "\u0120site": 2524, "\u0120jo": 2525, "\u0120risk": 2526, "clus": 2527, "lt": 2528, "\u0120inj": 2529, "iding": 2530, "\u0120Spe": 2531, "\u0120chall": 2532, "irm": 2533, "\u012022": 2534, "itting": 2535, "str": 2536, "\u0120hy": 2537, "LE": 2538, "key": 2539, "\u0120began": 2540, "atur": 2541, "ashington": 2542, "lam": 2543, "\u0120Dav": 2544, "bit": 2545, "\u0120size": 2546, "\u0120Par": 2547, "38": 2548, "ournal": 2549, "face": 2550, "\u0120decision": 2551, "\u0120larg": 2552, "\u0120jud": 2553, "rect": 2554, "\u0120continue": 2555, "\u0120Oct": 2556, "overed": 2557, "\u0120Int": 2558, "========": 2559, "\u0120parent": 2560, "\u0120Will": 2561, "\u0120easy": 2562, "\u0120drug": 2563, "anger": 2564, "\u0120sense": 2565, "\u0120di": 2566, "iday": 2567, "\u0120energy": 2568, "istic": 2569, "\u0120associ": 2570, "arter": 2571, "obal": 2572, "eks": 2573, "\u0120El": 2574, "urch": 2575, "\u0120girl": 2576, "oe": 2577, "itle": 2578, "\u012028": 2579, "\u0120Che": 2580, "\u0120request": 2581, "\u0120soon": 2582, "\u0120host": 2583, "ky": 2584, "\u0120states": 2585, "omes": 2586, "\u0120material": 2587, "lex": 2588, "\u0120moment": 2589, "\u0120answ": 2590, "onse": 2591, "\u0120especially": 2592, "\u0120norm": 2593, "\u0120services": 2594, "pite": 2595, "ran": 2596, "\u0120role": 2597, "44": 2598, "):": 2599, "\u0120cred": 2600, "Cl": 2601, "________": 2602, "\u0120mat": 2603, "\u0120log": 2604, "\u0120Clinton": 2605, "OU": 2606, "\u0120office": 2607, "\u012026": 2608, "\u0120charg": 2609, "\u0120track": 2610, "ma": 2611, "\u0120heart": 2612, "\u0120ball": 2613, "\u0120personal": 2614, "\u0120building": 2615, "na": 2616, "set": 2617, "body": 2618, "\u0120Black": 2619, "\u0120increase": 2620, "itten": 2621, "\u0120needed": 2622, "36": 2623, "32": 2624, "=\"": 2625, "\u0120lost": 2626, "\u0120became": 2627, "\u0120groups": 2628, "\u0120Mus": 2629, "\u0120wrote": 2630, "\u0120Pe": 2631, "\u0120prop": 2632, "joy": 2633, "\u00c3\u00a9": 2634, "\u0120White": 2635, "\u0120dead": 2636, ".'": 2637, "\u0120http": 2638, "\u0120webs": 2639, "OS": 2640, "\u0120inside": 2641, "\u0120wrong": 2642, "\u0120statement": 2643, "\u0120...": 2644, "yl": 2645, "\u0120film": 2646, "\u0120music": 2647, "\u0120share": 2648, "ification": 2649, "\u0120release": 2650, "\u0120forward": 2651, "\u0120stay": 2652, "\u0120comput": 2653, "itte": 2654, "ser": 2655, "\u0120original": 2656, "\u0120card": 2657, "\u0120cand": 2658, "\u0120div": 2659, "atural": 2660, "\u0120favor": 2661, "OM": 2662, "\u0120cases": 2663, "uses": 2664, "\u0120section": 2665, "\u0120leave": 2666, "ging": 2667, "oved": 2668, "\u0120Washington": 2669, "39": 2670, "\u0120Gl": 2671, "\u0120required": 2672, "action": 2673, "apan": 2674, "oor": 2675, "iter": 2676, "\u0120King": 2677, "\u0120countries": 2678, "\u0120German": 2679, "lling": 2680, "\u012027": 2681, "34": 2682, "\u0120questions": 2683, "\u0120prim": 2684, "\u0120cell": 2685, "\u0120shoot": 2686, "\u0120anyone": 2687, "\u0120West": 2688, "\u0120affect": 2689, "epend": 2690, "\u0120online": 2691, "\u0120Israel": 2692, "\u0120September": 2693, "\u0120ability": 2694, "\u0120content": 2695, "ises": 2696, "\u0120reve": 2697, "\u0120laun": 2698, "\u0120indic": 2699, "\u0120force": 2700, "cast": 2701, "\u0120sold": 2702, "aving": 2703, "fl": 2704, "\u0120soft": 2705, "\u0120companies": 2706, "ceed": 2707, "\u0120article": 2708, "\u0120aud": 2709, "\u0120rev": 2710, "\u0120educ": 2711, "\u0120playing": 2712, "05": 2713, "\u0120held": 2714, "ctor": 2715, "\u0120released": 2716, "\u0120federal": 2717, "37": 2718, "\u0120administ": 2719, "\u0120interview": 2720, "\u0120install": 2721, "\u0120received": 2722, "\u0120source": 2723, "uk": 2724, "Ph": 2725, "\u0120serious": 2726, "\u0120created": 2727, "\u0120cause": 2728, "\u0120immedi": 2729, "\u0120defin": 2730, "uel": 2731, "\u0120Department": 2732, "ctions": 2733, "\u0120Cour": 2734, "\u0120Now": 2735, "ze": 2736, "ites": 2737, "itution": 2738, "\u0120late": 2739, "\u0120speak": 2740, "ners": 2741, "\u0120legal": 2742, "ari": 2743, "\u0120Cor": 2744, "\u0120weeks": 2745, "\u0120model": 2746, "\u0120pred": 2747, "\u0120exact": 2748, "BC": 2749, "\u0120By": 2750, "ING": 2751, "osing": 2752, "\u0120takes": 2753, "\u0120regard": 2754, "\u0120opportun": 2755, "\u0120price": 2756, "\u0120198": 2757, "\u0120Apr": 2758, "fully": 2759, "\u0120ord": 2760, "\u0120problems": 2761, "ruction": 2762, "ham": 2763, "\u0120Count": 2764, "lege": 2765, "\u0120leaders": 2766, "ET": 2767, "lev": 2768, "\u0120deep": 2769, "ological": 2770, "ese": 2771, "haps": 2772, "\u0120Some": 2773, "\u0120pers": 2774, "\u0120contract": 2775, "\u0120relationship": 2776, "sp": 2777, "oud": 2778, "\u0120base": 2779, "48": 2780, "mit": 2781, "Ad": 2782, "ancial": 2783, "\u0120consum": 2784, "\u0120potential": 2785, "\u0120langu": 2786, "rem": 2787, "eth": 2788, "\u0120relig": 2789, "ressed": 2790, "66": 2791, "\u0120link": 2792, "\u0120lower": 2793, "ayer": 2794, "\u0120June": 2795, "\u0120fem": 2796, "unt": 2797, "erc": 2798, "urd": 2799, "\u0120contact": 2800, "\u0120ill": 2801, "\u0120mother": 2802, "\u0120estab": 2803, "htt": 2804, "\u0120March": 2805, "\u0120Bro": 2806, "\u0120China": 2807, "\u012029": 2808, "\u0120squ": 2809, "\u0120provided": 2810, "\u0120average": 2811, "asons": 2812, "\u01202011": 2813, "\u0120exam": 2814, "lin": 2815, "55": 2816, "ned": 2817, "\u0120perfect": 2818, "\u0120tou": 2819, "alse": 2820, "ux": 2821, "\u0120buy": 2822, "\u0120shot": 2823, "\u0120collect": 2824, "\u0120phot": 2825, "\u0120played": 2826, "\u0120surpr": 2827, "\u0120officials": 2828, "\u0120simple": 2829, "avy": 2830, "\u0120industry": 2831, "\u0120hands": 2832, "ground": 2833, "\u0120pull": 2834, "\u0120round": 2835, "\u0120user": 2836, "\u0120range": 2837, "uary": 2838, "\u0120private": 2839, "ops": 2840, "ees": 2841, "\u0120ways": 2842, "\u0120Mich": 2843, "\u0120veh": 2844, "\u0120except": 2845, "\u0120terms": 2846, "imum": 2847, "pper": 2848, "ION": 2849, "ores": 2850, "\u0120Dragon": 2851, "oul": 2852, "\u0120den": 2853, "\u0120performance": 2854, "\u0120bill": 2855, "cil": 2856, "47": 2857, "\u0120environment": 2858, "\u0120exc": 2859, "add": 2860, "\u0120worth": 2861, "\u0120pict": 2862, "\u0120chance": 2863, "\u01202018": 2864, "bor": 2865, "\u0120speed": 2866, "iction": 2867, "\u0120alleg": 2868, "\u0120Japan": 2869, "atory": 2870, "reet": 2871, "\u0120match": 2872, "\u0120II": 2873, "\u0120stru": 2874, "order": 2875, "\u0120ste": 2876, "\u0120living": 2877, "\u0120struct": 2878, "ino": 2879, "\u0120separ": 2880, "hern": 2881, "\u0120response": 2882, "\u0120enjoy": 2883, "\u0120via": 2884, "AD": 2885, "uments": 2886, "acebook": 2887, "\u0120member": 2888, "ibr": 2889, "izing": 2890, "\u0120tool": 2891, "\u0120Mon": 2892, "\u0120While": 2893, "hood": 2894, "\u0120Ang": 2895, "\u0120Def": 2896, "\u0120offer": 2897, "Tr": 2898, "aur": 2899, "\u0120turned": 2900, "\u0120July": 2901, "down": 2902, "anced": 2903, "\u0120recently": 2904, "\u0120Ear": 2905, "\u0120ce": 2906, "\u0120Star": 2907, "\u0120Cong": 2908, "rought": 2909, "\u0120blood": 2910, "\u0120hope": 2911, "\u0120comment": 2912, "aint": 2913, "\u0120arri": 2914, "iles": 2915, "\u0120particip": 2916, "ought": 2917, "ription": 2918, "08": 2919, "49": 2920, "\u0120gave": 2921, "\u0120select": 2922, "\u0120killed": 2923, "sych": 2924, "\u0120goes": 2925, "ij": 2926, "\u0120coll": 2927, "\u0120impact": 2928, "atives": 2929, "\u0120Ser": 2930, "09": 2931, "\u0120August": 2932, "\u0120boy": 2933, "de": 2934, "\u0120Des": 2935, "\u0120felt": 2936, "US": 2937, "\u0120expected": 2938, "\u0120image": 2939, "\u0120Mark": 2940, "ccording": 2941, "oice": 2942, "EC": 2943, "\u0120Mag": 2944, "ened": 2945, "hold": 2946, "\u0120Post": 2947, "\u0120prevent": 2948, "No": 2949, "\u0120involved": 2950, "\u0120eyes": 2951, "\u0120quickly": 2952, "At": 2953, "unk": 2954, "\u0120behav": 2955, "\u0120ur": 2956, "\u0120led": 2957, "come": 2958, "ey": 2959, "\u0120candid": 2960, "\u0120earlier": 2961, "\u0120focus": 2962, "ety": 2963, "Pro": 2964, "ledge": 2965, "ixed": 2966, "illed": 2967, "\u0120popular": 2968, "AP": 2969, "\u0120sett": 2970, "light": 2971, "\u0120various": 2972, "inks": 2973, "\u0120levels": 2974, "\u0120road": 2975, "ellig": 2976, "ables": 2977, "hel": 2978, "ittee": 2979, "\u0120Gener": 2980, "ype": 2981, "\u0120heard": 2982, "icles": 2983, "\u0120mis": 2984, "\u0120users": 2985, "\u0120San": 2986, "\u0120improve": 2987, "\u0120father": 2988, "\u0120search": 2989, "They": 2990, "vil": 2991, "\u0120profess": 2992, "\u0120knew": 2993, "\u0120loss": 2994, "\u0120events": 2995, "65": 2996, "\u0120billion": 2997, "07": 2998, "02": 2999, "\u0120News": 3000, "\u0120AM": 3001, "\u0120cover": 3002, "where": 3003, "ension": 3004, "\u0120bott": 3005, "\u0120areas": 3006, "ences": 3007, "ope": 3008, "\u0120Twitter": 3009, "ael": 3010, "\u0120gets": 3011, "\u0120Google": 3012, "\u0120sn": 3013, "iant": 3014, "\u0120vote": 3015, "\u0120nearly": 3016, "\u0120included": 3017, "\u0120recogn": 3018, "zz": 3019, "mm": 3020, "aled": 3021, "\u0120happened": 3022, "04": 3023, "\u0120hot": 3024, "\u0120whose": 3025, "\u0120civil": 3026, "\u0120suff": 3027, "oes": 3028, "itiz": 3029, "\u0120Syri": 3030, "\u0120respond": 3031, "\u0120hon": 3032, "\u0120features": 3033, "\u0120economic": 3034, "\u0120April": 3035, "rim": 3036, "\u0120technology": 3037, "\u0120option": 3038, "aging": 3039, "\u0120purch": 3040, "Re": 3041, "\u0120lat": 3042, "chie": 3043, "isl": 3044, "\u0120recomm": 3045, "uf": 3046, "\u0120training": 3047, "\u0120effects": 3048, "\u0120fast": 3049, "\u01202010": 3050, "\u0120occur": 3051, "\u0120website": 3052, "\u0120email": 3053, "\u0120sens": 3054, "ech": 3055, "\u0120oil": 3056, "\u0120influ": 3057, "\u0120currently": 3058, "\u0120Sch": 3059, "\u0120Add": 3060, "\u0120goal": 3061, "\u0120scient": 3062, "\u0120conv": 3063, "100": 3064, "emy": 3065, "\u0120decided": 3066, "\u0120travel": 3067, "\u0120mention": 3068, "LL": 3069, "03": 3070, "\u0120election": 3071, "\u0120phone": 3072, "\u0120looks": 3073, "\u0120situation": 3074, "\u0120cy": 3075, "\u0120hor": 3076, "bed": 3077, "\u0120Court": 3078, "aily": 3079, "aves": 3080, "\u0120quality": 3081, "\u0120Comp": 3082, "wise": 3083, "\u0120table": 3084, "\u0120staff": 3085, "\u0120Wind": 3086, "ett": 3087, "\u0120tried": 3088, "idered": 3089, "\u0120addition": 3090, "\u0120box": 3091, "\u0120lack": 3092, "arily": 3093, "\u0120wide": 3094, "\u0120mid": 3095, "\u0120board": 3096, "ysis": 3097, "\u0120anti": 3098, "ha": 3099, "\u0120dig": 3100, "ening": 3101, "\u0120dro": 3102, "Con": 3103, "68": 3104, "\u0120slow": 3105, "based": 3106, "sequ": 3107, "\u0120path": 3108, "Ex": 3109, "aker": 3110, "\u0120worked": 3111, "\u0120pen": 3112, "\u0120engine": 3113, "\u0120looked": 3114, "\u0120Super": 3115, "\u0120Serv": 3116, "\u0120victim": 3117, "Un": 3118, "\u0120property": 3119, "\u0120introdu": 3120, "\u0120execut": 3121, "\u0120PM": 3122, "Le": 3123, "\u0120color": 3124, "\u0120More": 3125, "\u012060": 3126, "\u0120network": 3127, "\u0120date": 3128, "cul": 3129, "idge": 3130, "\u0120extra": 3131, "31": 3132, "\u0120sle": 3133, "67": 3134, "\u0120wond": 3135, "\u0120reports": 3136, "just": 3137, "\u0120Austral": 3138, "\u0120capital": 3139, "\u0120ens": 3140, "\u0120command": 3141, "\u0120allowed": 3142, "\u0120prep": 3143, "\u0120capt": 3144, "hib": 3145, "\u0120numbers": 3146, "chan": 3147, "\u0120fair": 3148, "mp": 3149, "oms": 3150, "\u0120reach": 3151, "With": 3152, "tain": 3153, "\u0120broad": 3154, "\u0120 (…) number