From 76b574eb1ba391659780a6e99d65e01f49eee888 Mon Sep 17 00:00:00 2001 From: infojunkie Date: Sun, 20 Oct 2024 12:20:31 -0700 Subject: [PATCH] Fix chord-symbol --- build/ireal-musicxml.js | 18 ++++++++++++------ build/ireal-musicxml.js.map | 8 ++++---- src/lib/converter.js | 3 ++- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/build/ireal-musicxml.js b/build/ireal-musicxml.js index d5a31d8..fc63d6f 100644 --- a/build/ireal-musicxml.js +++ b/build/ireal-musicxml.js @@ -1,8 +1,14 @@ -(()=>{var sh=Object.create;var ni=Object.defineProperty;var oh=Object.getOwnPropertyDescriptor;var uh=Object.getOwnPropertyNames;var lh=Object.getPrototypeOf,ch=Object.prototype.hasOwnProperty;var l=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ph=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uh(t))!ch.call(e,i)&&i!==r&&ni(e,i,{get:()=>t[i],enumerable:!(n=oh(t,i))||n.enumerable});return e};var $=(e,t,r)=>(r=e!=null?sh(lh(e)):{},ph(t||!e||!e.__esModule?ni(r,"default",{value:e,enumerable:!0}):r,e));var _r=l((iT,li)=>{"use strict";li.exports=yr;function yr(e){te.length||(yt(),si=!0),te[te.length]=e}var te=[],si=!1,yt,ee=0,fh=1024;function ii(){for(;eefh){for(var t=0,r=te.length-ee;t{"use strict";var mh=_r();function qt(){}var Ae=null,we={};function dh(e){try{return e.then}catch(t){return Ae=t,we}}function gh(e,t){try{return e(t)}catch(r){return Ae=r,we}}function bh(e,t,r){try{e(t,r)}catch(n){return Ae=n,we}}fi.exports=V;function V(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof e!="function")throw new TypeError("Promise constructor's argument is not a function");this._x=0,this._y=0,this._z=null,this._A=null,e!==qt&&pi(e,this)}V._B=null;V._C=null;V._D=qt;V.prototype.then=function(e,t){if(this.constructor!==V)return vh(this,e,t);var r=new V(qt);return _t(this,new ci(e,t,r)),r};function vh(e,t,r){return new e.constructor(function(n,i){var a=new V(qt);a.then(n,i),_t(e,new ci(t,r,a))})}function _t(e,t){for(;e._y===3;)e=e._z;if(V._B&&V._B(e),e._y===0){if(e._x===0){e._x=1,e._A=t;return}if(e._x===1){e._x=2,e._A=[e._A,t];return}e._A.push(t);return}yh(e,t)}function yh(e,t){mh(function(){var r=e._y===1?t.onFulfilled:t.onRejected;if(r===null){e._y===1?qr(t.promise,e._z):xe(t.promise,e._z);return}var n=gh(r,e._z);n===we?xe(t.promise,Ae):qr(t.promise,n)})}function qr(e,t){if(t===e)return xe(e,new TypeError("A promise cannot be resolved with itself."));if(t&&(typeof t=="object"||typeof t=="function")){var r=dh(t);if(r===we)return xe(e,Ae);if(r===e.then&&t instanceof V){e._y=3,e._z=t,Sr(e);return}else if(typeof r=="function"){pi(r.bind(t),e);return}}e._y=1,e._z=t,Sr(e)}function xe(e,t){e._y=2,e._z=t,V._C&&V._C(e,t),Sr(e)}function Sr(e){if(e._x===1&&(_t(e,e._A),e._A=null),e._x===2){for(var t=0;t{"use strict";var hi=pe();mi.exports=hi;hi.prototype.done=function(e,t){var r=arguments.length?this.then.apply(this,arguments):this;r.then(null,function(n){setTimeout(function(){throw n},0)})}});var bi=l((oT,gi)=>{"use strict";var St=pe();gi.exports=St;St.prototype.finally=function(e){return this.then(function(t){return St.resolve(e()).then(function(){return t})},function(t){return St.resolve(e()).then(function(){throw t})})}});var qi=l((uT,_i)=>{"use strict";var D=pe();_i.exports=D;var _h=fe(!0),qh=fe(!1),Sh=fe(null),xh=fe(void 0),Ah=fe(0),wh=fe("");function fe(e){var t=new D(D._D);return t._y=1,t._z=e,t}D.resolve=function(e){if(e instanceof D)return e;if(e===null)return Sh;if(e===void 0)return xh;if(e===!0)return _h;if(e===!1)return qh;if(e===0)return Ah;if(e==="")return wh;if(typeof e=="object"||typeof e=="function")try{var t=e.then;if(typeof t=="function")return new D(t.bind(e))}catch(r){return new D(function(n,i){i(r)})}return fe(e)};var Te=function(e){return typeof Array.from=="function"?(Te=Array.from,Array.from(e)):(Te=function(t){return Array.prototype.slice.call(t)},Array.prototype.slice.call(e))};D.all=function(e){var t=Te(e);return new D(function(r,n){if(t.length===0)return r([]);var i=t.length;function a(u,o){if(o&&(typeof o=="object"||typeof o=="function"))if(o instanceof D&&o.then===D.prototype.then){for(;o._y===3;)o=o._z;if(o._y===1)return a(u,o._z);o._y===2&&n(o._z),o.then(function(f){a(u,f)},n);return}else{var c=o.then;if(typeof c=="function"){var p=new D(c.bind(o));p.then(function(f){a(u,f)},n);return}}t[u]=o,--i===0&&r(t)}for(var s=0;s{"use strict";var Si=_r(),xt=[],Ar=[],Ih=Si.makeRequestCallFromTimer(Oh);function Oh(){if(Ar.length)throw Ar.shift()}Ai.exports=wr;function wr(e){var t;xt.length?t=xt.pop():t=new xi,t.task=e,Si(t)}function xi(){this.task=null}xi.prototype.call=function(){try{this.task.call()}catch(e){wr.onerror?wr.onerror(e):(Ar.push(e),Ih())}finally{this.task=null,xt[xt.length]=this}}});var Oi=l((cT,Ii)=>{"use strict";var he=pe(),Tr=wi();Ii.exports=he;he.denodeify=function(e,t){return typeof t=="number"&&t!==1/0?Ch(e,t):Eh(e)};var Ti="function (err, res) {if (err) { rj(err); } else { rs(res); }}";function Ch(e,t){for(var r=[],n=0;n "+t+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+Ti+";","var res;","switch (argLength) {",r.concat(["extra"]).map(function(a,s){return"case "+s+":res = fn.call("+["self"].concat(r.slice(0,s)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],i)(he,e)}he.nodeify=function(e){return function(){var t=Array.prototype.slice.call(arguments),r=typeof t[t.length-1]=="function"?t.pop():null,n=this;try{return e.apply(this,arguments).nodeify(r,n)}catch(i){if(r===null||typeof r>"u")return new he(function(a,s){s(i)});Tr(function(){r.call(n,i)})}}};he.prototype.nodeify=function(e,t){if(typeof e!="function")return this;this.then(function(r){Tr(function(){e.call(t,null,r)})},function(r){Tr(function(){e.call(t,r)})})}});var Ei=l((pT,Ci)=>{"use strict";var B=pe();Ci.exports=B;B.enableSynchronous=function(){B.prototype.isPending=function(){return this.getState()==0},B.prototype.isFulfilled=function(){return this.getState()==1},B.prototype.isRejected=function(){return this.getState()==2},B.prototype.getValue=function(){if(this._y===3)return this._z.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._z},B.prototype.getReason=function(){if(this._y===3)return this._z.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._z},B.prototype.getState=function(){return this._y===3?this._z.getState():this._y===-1||this._y===-2?0:this._y}};B.disableSynchronous=function(){B.prototype.isPending=void 0,B.prototype.isFulfilled=void 0,B.prototype.isRejected=void 0,B.prototype.getValue=void 0,B.prototype.getReason=void 0,B.prototype.getState=void 0}});var Fi=l((fT,ji)=>{"use strict";ji.exports=pe();di();bi();qi();Oi();Ei()});var Pi=l((hT,Di)=>{"use strict";Di.exports=Fi()});var Ki=l((mT,ki)=>{var W=-1,U=1,z=0;function ke(e,t,r,n,i){if(e===t)return e?[[z,e]]:[];if(r!=null){var a=Lh(e,t,r);if(a)return a}var s=Or(e,t),u=e.substring(0,s);e=e.substring(s),t=t.substring(s),s=At(e,t);var o=e.substring(e.length-s);e=e.substring(0,e.length-s),t=t.substring(0,t.length-s);var c=jh(e,t);return u&&c.unshift([z,u]),o&&c.push([z,o]),Cr(c,i),n&&Ph(c),c}function jh(e,t){var r;if(!e)return[[U,t]];if(!t)return[[W,e]];var n=e.length>t.length?e:t,i=e.length>t.length?t:e,a=n.indexOf(i);if(a!==-1)return r=[[U,n.substring(0,a)],[z,i],[U,n.substring(a+i.length)]],e.length>t.length&&(r[0][0]=r[2][0]=W),r;if(i.length===1)return[[W,e],[U,t]];var s=Dh(e,t);if(s){var u=s[0],o=s[1],c=s[2],p=s[3],f=s[4],v=ke(u,c),q=ke(o,p);return v.concat([[z,f]],q)}return Fh(e,t)}function Fh(e,t){for(var r=e.length,n=t.length,i=Math.ceil((r+n)/2),a=i,s=2*i,u=new Array(s),o=new Array(s),c=0;cr)q+=2;else if(E>n)v+=2;else if(f){var j=a+p-x;if(j>=0&&j=F)return Ni(e,t,O,E)}}}for(var L=-A+S;L<=A-w;L+=2){var j=a+L,F;L===-A||L!==A&&o[j-1]r)w+=2;else if(H>n)S+=2;else if(!f){var I=a+p-L;if(I>=0&&I=F)return Ni(e,t,O,E)}}}}return[[W,e],[U,t]]}function Ni(e,t,r,n){var i=e.substring(0,r),a=t.substring(0,n),s=e.substring(r),u=t.substring(n),o=ke(i,a),c=ke(s,u);return o.concat(c)}function Or(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;for(var r=0,n=Math.min(e.length,t.length),i=n,a=0;rn?e=e.substring(r-n):rt.length?e:t,n=e.length>t.length?t:e;if(r.length<4||n.length*2=q.length?[O,E,j,F,I]:null}var a=i(r,n,Math.ceil(r.length/4)),s=i(r,n,Math.ceil(r.length/2)),u;if(!a&&!s)return null;s?a?u=a[4].length>s[4].length?a:s:u=s:u=a;var o,c,p,f;e.length>t.length?(o=u[0],c=u[1],p=u[2],f=u[3]):(p=u[0],f=u[1],o=u[2],c=u[3]);var v=u[4];return[o,c,p,f,v]}function Ph(e){for(var t=!1,r=[],n=0,i=null,a=0,s=0,u=0,o=0,c=0;a0?r[n-1]:-1,s=0,u=0,o=0,c=0,i=null,t=!0)),a++;for(t&&Cr(e),Mh(e),a=1;a=q?(v>=p.length/2||v>=f.length/2)&&(e.splice(a,0,[z,f.substring(0,v)]),e[a-1][1]=p.substring(0,p.length-v),e[a+1][1]=f.substring(v),a++):(q>=p.length/2||q>=f.length/2)&&(e.splice(a,0,[z,p.substring(0,q)]),e[a-1][0]=U,e[a-1][1]=f.substring(0,f.length-q),e[a+1][0]=W,e[a+1][1]=p.substring(q),a++),a++}a++}}var Mi=/[^a-zA-Z0-9]/,zi=/\s/,Li=/[\r\n]/,Nh=/\n\r?\n$/,Rh=/^\r?\n\r?\n/;function Mh(e){function t(q,S){if(!q||!S)return 6;var w=q.charAt(q.length-1),A=S.charAt(0),x=w.match(Mi),I=A.match(Mi),O=x&&w.match(zi),E=I&&A.match(zi),j=O&&w.match(Li),F=E&&A.match(Li),L=j&&q.match(Nh),H=F&&S.match(Rh);return L||H?5:j||F?4:x&&!O&&E?3:O||E?2:x||I?1:0}for(var r=1;r=f&&(f=v,o=n,c=i,p=a)}e[r-1][1]!=o&&(o?e[r-1][1]=o:(e.splice(r-1,1),r--),e[r][1]=c,p?e[r+1][1]=p:(e.splice(r+1,1),r--))}r++}}function Cr(e,t){e.push([z,""]);for(var r=0,n=0,i=0,a="",s="",u;r=0&&Ui(e[o][1])){var c=e[o][1].slice(-1);if(e[o][1]=e[o][1].slice(0,-1),a=c+a,s=c+s,!e[o][1]){e.splice(o,1),r--;var p=o-1;e[p]&&e[p][0]===U&&(i++,s=e[p][1]+s,p--),e[p]&&e[p][0]===W&&(n++,a=e[p][1]+a,p--),o=p}}if(Bi(e[r][1])){var c=e[r][1].charAt(0);e[r][1]=e[r][1].slice(1),a+=c,s+=c}}if(r0||s.length>0){a.length>0&&s.length>0&&(u=Or(s,a),u!==0&&(o>=0?e[o][1]+=s.substring(0,u):(e.splice(0,0,[z,s.substring(0,u)]),r++),s=s.substring(u),a=a.substring(u)),u=At(s,a),u!==0&&(e[r][1]=s.substring(s.length-u)+e[r][1],s=s.substring(0,s.length-u),a=a.substring(0,a.length-u)));var f=i+n;a.length===0&&s.length===0?(e.splice(r-f,f),r=r-f):a.length===0?(e.splice(r-f,f,[U,s]),r=r-f+1):s.length===0?(e.splice(r-f,f,[W,a]),r=r-f+1):(e.splice(r-f,f,[W,a],[U,s]),r=r-f+2)}r!==0&&e[r-1][0]===z?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,i=0,n=0,a="",s="";break}}e[e.length-1][1]===""&&e.pop();var v=!1;for(r=1;r=55296&&e<=56319}function Gi(e){return e>=56320&&e<=57343}function Bi(e){return Gi(e.charCodeAt(0))}function Ui(e){return $i(e.charCodeAt(e.length-1))}function zh(e){for(var t=[],r=0;r0&&t.push(e[r]);return t}function Ir(e,t,r,n){return Ui(e)||Bi(n)?null:zh([[z,e],[W,t],[U,r],[z,n]])}function Lh(e,t,r){var n=typeof r=="number"?{index:r,length:0}:r.oldRange,i=typeof r=="number"?null:r.newRange,a=e.length,s=t.length;if(n.length===0&&(i===null||i.length===0)){var u=n.index,o=e.slice(0,u),c=e.slice(u),p=i?i.index:null;e:{var f=u+s-a;if(p!==null&&p!==f||f<0||f>s)break e;var v=t.slice(0,f),q=t.slice(f);if(q!==c)break e;var S=Math.min(u,f),w=o.slice(0,S),A=v.slice(0,S);if(w!==A)break e;var x=o.slice(S),I=v.slice(S);return Ir(w,x,I,c)}e:{if(p!==null&&p!==u)break e;var O=u,v=t.slice(0,O),q=t.slice(O);if(v!==o)break e;var E=Math.min(a-O,s-O),j=c.slice(c.length-E),F=q.slice(q.length-E);if(j!==F)break e;var x=c.slice(0,c.length-E),I=q.slice(0,q.length-E);return Ir(o,x,I,j)}}if(n.length>0&&i&&i.length===0)e:{var w=e.slice(0,n.index),j=e.slice(n.index+n.length),S=w.length,E=j.length;if(s{(function(e,t){if(typeof define=="function"&&define.amd)define(["exports"],t);else if(typeof Ot<"u")t(Ot);else{var r={exports:{}};t(r.exports),e.jstoxml=r.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Ot,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toXML=e.default=void 0;function t(_){return a(_)||i(_)||n(_)||r()}function r(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(_,d){if(_){if(typeof _=="string")return s(_,d);var y=Object.prototype.toString.call(_).slice(8,-1);if(y==="Object"&&_.constructor&&(y=_.constructor.name),y==="Map"||y==="Set")return Array.from(_);if(y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y))return s(_,d)}}function i(_){if(typeof Symbol<"u"&&_[Symbol.iterator]!=null||_["@@iterator"]!=null)return Array.from(_)}function a(_){if(Array.isArray(_))return s(_)}function s(_,d){(d==null||d>_.length)&&(d=_.length);for(var y=0,N=new Array(d);y0&&arguments[0]!==void 0?arguments[0]:"",y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return d.repeat(y)},F=function(d){return Array.isArray(d)&&f||p(d)===A&&d!==null&&d._name&&x||d instanceof Date&&q||d===null&&S||p(d)},L=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof d!="string")return d;var N=new RegExp("(".concat(Object.keys(y).join("|"),")(?!(\\w|#)*;)"),"g");return String(d).replace(N,function(k,G){return y[G]||""})},H=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=arguments.length>1?arguments[1]:void 0,N=[];if(Array.isArray(d))N=d.map(function(G){var ne=Object.keys(G)[0],ce=G[ne],Ge=y?L(ce,y):ce,mr=Ge===!0?"":'="'.concat(Ge,'"');return"".concat(ne).concat(mr)});else{var k=Object.keys(d);N=k.map(function(G){var ne=y?L(d[G],y):d[G],ce=d[G]===!0?"":'="'.concat(ne,'"');return"".concat(G).concat(ce)})}return N},Ff=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=arguments.length>1?arguments[1]:void 0,N=H(d,y);if(N.length===0)return"";var k=N.join(" ");return" ".concat(k)},Df=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(d).map(function(y){return{_name:y,_content:d[y]}})},kn=[I,w,v],Pf=function(d){return kn.includes(F(d))},Nf=[].concat(kn,[q,x]),rT=function(d){return Nf.includes(F(d))},Rf=function(d){return!d.match("<")},Mf='',zf=function(d){var y=d.header,N=d.indent,k=d.isOutputStart,G=y&&k;if(!G)return"";var ne=p(y)===v;return ne?Mf:y},Kn={"<":"<",">":">","&":"&"},Hn=function _(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=y.depth,k=N===void 0?0:N,G=y.indent,ne=y._isFirstItem,ce=y._isOutputStart,Ge=ce===void 0?!0:ce,mr=y.header,Vn=y.attributesFilter,dr=Vn===void 0?{}:Vn,Wn=y.filter,gr=Wn===void 0?{}:Wn,$f=typeof dr=="boolean"&&!dr,Gf=$f?{}:o(o(o({},Kn),{'"':"""}),dr),Bf=typeof gr=="boolean"&&!gr,Uf=Bf?{}:o(o({},Kn),gr),Xn=j(G,k),kf=F(d),Yn=zf({header:mr,indent:G,depth:k,isOutputStart:Ge}),bt=Ge&&!Yn&&ne&&k===0,ie="";switch(kf){case"special-object":{var qe=d._name,Se=d._content;if(Se===null){ie=qe;break}var Kf=Array.isArray(Se)&&Se.every(Pf);if(Kf){var Hf=Se.map(function(K){return _({_name:qe,_content:K},o(o({},y),{},{depth:k,_isOutputStart:!1}))});return Hf.join("")}if(qe.match(E))break;var vt=_(Se,o(o({},y),{},{depth:k+1,_isOutputStart:bt})),Vf=F(vt),Wf=Rf(vt),Xf=G&&!bt?` -`:"",Qn="".concat(Xf).concat(Xn);if(qe==="_comment"){ie+="".concat(Qn,"");break}var Zn=Vf==="undefined"||vt==="",Jn=p(d._selfCloseTag)===v?Zn&&d._selfCloseTag:Zn,Yf=Jn?"/":"",Qf=Ff(d._attrs,Gf),Zf="<".concat(qe).concat(Qf).concat(Yf,">"),Jf=G&&!Wf?` -`.concat(Xn):"",eh=Jn?"":"".concat(vt).concat(Jf,"");ie+="".concat(Qn).concat(Zf).concat(eh);break}case"object":{var ei=Object.keys(d),th=ei.map(function(K,Be){var br=o(o({},y),{},{_isFirstItem:Be===0,_isLastItem:Be+1===ei.length,_isOutputStart:bt}),Ue={_name:K};if(F(d[K])==="object"){O.forEach(function(vr){var ri=d[K][vr];typeof ri<"u"&&(Ue[vr]=ri,delete d[K][vr])});var ih=typeof d[K]._content<"u";if(ih&&Object.keys(d[K]).length>1){var ti=Object.assign({},d[K]);delete ti._content,Ue._content=[].concat(t(Df(ti)),[d[K]._content])}}typeof Ue._content>"u"&&(Ue._content=d[K]);var ah=_(Ue,br,K);return ah},y);ie=th.join("");break}case"function":{var rh=d(y);ie=_(rh,y);break}case"array":{var nh=d.map(function(K,Be){var br=o(o({},y),{},{_isFirstItem:Be===0,_isLastItem:Be+1===d.length,_isOutputStart:bt});return _(K,br)});ie=nh.join("");break}default:{ie=L(d,Uf);break}}return"".concat(Yn).concat(ie)};e.toXML=Hn;var Lf={toXML:Hn};e.default=Lf})});var Xi=l((vT,Wi)=>{function Bh(){this.__data__=[],this.size=0}Wi.exports=Bh});var Ct=l((yT,Yi)=>{function Uh(e,t){return e===t||e!==e&&t!==t}Yi.exports=Uh});var He=l((_T,Qi)=>{var kh=Ct();function Kh(e,t){for(var r=e.length;r--;)if(kh(e[r][0],t))return r;return-1}Qi.exports=Kh});var Ji=l((qT,Zi)=>{var Hh=He(),Vh=Array.prototype,Wh=Vh.splice;function Xh(e){var t=this.__data__,r=Hh(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Wh.call(t,r,1),--this.size,!0}Zi.exports=Xh});var ta=l((ST,ea)=>{var Yh=He();function Qh(e){var t=this.__data__,r=Yh(t,e);return r<0?void 0:t[r][1]}ea.exports=Qh});var na=l((xT,ra)=>{var Zh=He();function Jh(e){return Zh(this.__data__,e)>-1}ra.exports=Jh});var aa=l((AT,ia)=>{var em=He();function tm(e,t){var r=this.__data__,n=em(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}ia.exports=tm});var Ve=l((wT,sa)=>{var rm=Xi(),nm=Ji(),im=ta(),am=na(),sm=aa();function Ie(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{var om=Ve();function um(){this.__data__=new om,this.size=0}oa.exports=um});var ca=l((IT,la)=>{function lm(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}la.exports=lm});var fa=l((OT,pa)=>{function cm(e){return this.__data__.get(e)}pa.exports=cm});var ma=l((CT,ha)=>{function pm(e){return this.__data__.has(e)}ha.exports=pm});var Er=l((ET,da)=>{var fm=typeof global=="object"&&global&&global.Object===Object&&global;da.exports=fm});var Z=l((jT,ga)=>{var hm=Er(),mm=typeof self=="object"&&self&&self.Object===Object&&self,dm=hm||mm||Function("return this")();ga.exports=dm});var de=l((FT,ba)=>{var gm=Z(),bm=gm.Symbol;ba.exports=bm});var qa=l((DT,_a)=>{var va=de(),ya=Object.prototype,vm=ya.hasOwnProperty,ym=ya.toString,We=va?va.toStringTag:void 0;function _m(e){var t=vm.call(e,We),r=e[We];try{e[We]=void 0;var n=!0}catch{}var i=ym.call(e);return n&&(t?e[We]=r:delete e[We]),i}_a.exports=_m});var xa=l((PT,Sa)=>{var qm=Object.prototype,Sm=qm.toString;function xm(e){return Sm.call(e)}Sa.exports=xm});var ae=l((NT,Ta)=>{var Aa=de(),Am=qa(),wm=xa(),Tm="[object Null]",Im="[object Undefined]",wa=Aa?Aa.toStringTag:void 0;function Om(e){return e==null?e===void 0?Im:Tm:wa&&wa in Object(e)?Am(e):wm(e)}Ta.exports=Om});var se=l((RT,Ia)=>{function Cm(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}Ia.exports=Cm});var jr=l((MT,Oa)=>{var Em=ae(),jm=se(),Fm="[object AsyncFunction]",Dm="[object Function]",Pm="[object GeneratorFunction]",Nm="[object Proxy]";function Rm(e){if(!jm(e))return!1;var t=Em(e);return t==Dm||t==Pm||t==Fm||t==Nm}Oa.exports=Rm});var Ea=l((zT,Ca)=>{var Mm=Z(),zm=Mm["__core-js_shared__"];Ca.exports=zm});var Da=l((LT,Fa)=>{var Fr=Ea(),ja=function(){var e=/[^.]+$/.exec(Fr&&Fr.keys&&Fr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Lm(e){return!!ja&&ja in e}Fa.exports=Lm});var Dr=l(($T,Pa)=>{var $m=Function.prototype,Gm=$m.toString;function Bm(e){if(e!=null){try{return Gm.call(e)}catch{}try{return e+""}catch{}}return""}Pa.exports=Bm});var Ra=l((GT,Na)=>{var Um=jr(),km=Da(),Km=se(),Hm=Dr(),Vm=/[\\^$.*+?()[\]{}|]/g,Wm=/^\[object .+?Constructor\]$/,Xm=Function.prototype,Ym=Object.prototype,Qm=Xm.toString,Zm=Ym.hasOwnProperty,Jm=RegExp("^"+Qm.call(Zm).replace(Vm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ed(e){if(!Km(e)||km(e))return!1;var t=Um(e)?Jm:Wm;return t.test(Hm(e))}Na.exports=ed});var za=l((BT,Ma)=>{function td(e,t){return e?.[t]}Ma.exports=td});var oe=l((UT,La)=>{var rd=Ra(),nd=za();function id(e,t){var r=nd(e,t);return rd(r)?r:void 0}La.exports=id});var Et=l((kT,$a)=>{var ad=oe(),sd=Z(),od=ad(sd,"Map");$a.exports=od});var Xe=l((KT,Ga)=>{var ud=oe(),ld=ud(Object,"create");Ga.exports=ld});var ka=l((HT,Ua)=>{var Ba=Xe();function cd(){this.__data__=Ba?Ba(null):{},this.size=0}Ua.exports=cd});var Ha=l((VT,Ka)=>{function pd(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Ka.exports=pd});var Wa=l((WT,Va)=>{var fd=Xe(),hd="__lodash_hash_undefined__",md=Object.prototype,dd=md.hasOwnProperty;function gd(e){var t=this.__data__;if(fd){var r=t[e];return r===hd?void 0:r}return dd.call(t,e)?t[e]:void 0}Va.exports=gd});var Ya=l((XT,Xa)=>{var bd=Xe(),vd=Object.prototype,yd=vd.hasOwnProperty;function _d(e){var t=this.__data__;return bd?t[e]!==void 0:yd.call(t,e)}Xa.exports=_d});var Za=l((YT,Qa)=>{var qd=Xe(),Sd="__lodash_hash_undefined__";function xd(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qd&&t===void 0?Sd:t,this}Qa.exports=xd});var es=l((QT,Ja)=>{var Ad=ka(),wd=Ha(),Td=Wa(),Id=Ya(),Od=Za();function Oe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{var ts=es(),Cd=Ve(),Ed=Et();function jd(){this.size=0,this.__data__={hash:new ts,map:new(Ed||Cd),string:new ts}}rs.exports=jd});var as=l((JT,is)=>{function Fd(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}is.exports=Fd});var Ye=l((eI,ss)=>{var Dd=as();function Pd(e,t){var r=e.__data__;return Dd(t)?r[typeof t=="string"?"string":"hash"]:r.map}ss.exports=Pd});var us=l((tI,os)=>{var Nd=Ye();function Rd(e){var t=Nd(this,e).delete(e);return this.size-=t?1:0,t}os.exports=Rd});var cs=l((rI,ls)=>{var Md=Ye();function zd(e){return Md(this,e).get(e)}ls.exports=zd});var fs=l((nI,ps)=>{var Ld=Ye();function $d(e){return Ld(this,e).has(e)}ps.exports=$d});var ms=l((iI,hs)=>{var Gd=Ye();function Bd(e,t){var r=Gd(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}hs.exports=Bd});var jt=l((aI,ds)=>{var Ud=ns(),kd=us(),Kd=cs(),Hd=fs(),Vd=ms();function Ce(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{var Wd=Ve(),Xd=Et(),Yd=jt(),Qd=200;function Zd(e,t){var r=this.__data__;if(r instanceof Wd){var n=r.__data__;if(!Xd||n.length{var Jd=Ve(),eg=ua(),tg=ca(),rg=fa(),ng=ma(),ig=bs();function Ee(e){var t=this.__data__=new Jd(e);this.size=t.size}Ee.prototype.clear=eg;Ee.prototype.delete=tg;Ee.prototype.get=rg;Ee.prototype.has=ng;Ee.prototype.set=ig;vs.exports=Ee});var _s=l((uI,ys)=>{function ag(e,t){for(var r=-1,n=e==null?0:e.length;++r{var sg=oe(),og=function(){try{var e=sg(Object,"defineProperty");return e({},"",{}),e}catch{}}();qs.exports=og});var Nr=l((cI,xs)=>{var Ss=Pr();function ug(e,t,r){t=="__proto__"&&Ss?Ss(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}xs.exports=ug});var Rr=l((pI,As)=>{var lg=Nr(),cg=Ct(),pg=Object.prototype,fg=pg.hasOwnProperty;function hg(e,t,r){var n=e[t];(!(fg.call(e,t)&&cg(n,r))||r===void 0&&!(t in e))&&lg(e,t,r)}As.exports=hg});var je=l((fI,ws)=>{var mg=Rr(),dg=Nr();function gg(e,t,r,n){var i=!r;r||(r={});for(var a=-1,s=t.length;++a{function bg(e,t){for(var r=-1,n=Array(e);++r{function vg(e){return e!=null&&typeof e=="object"}Os.exports=vg});var Es=l((dI,Cs)=>{var yg=ae(),_g=J(),qg="[object Arguments]";function Sg(e){return _g(e)&&yg(e)==qg}Cs.exports=Sg});var Dt=l((gI,Ds)=>{var js=Es(),xg=J(),Fs=Object.prototype,Ag=Fs.hasOwnProperty,wg=Fs.propertyIsEnumerable,Tg=js(function(){return arguments}())?js:function(e){return xg(e)&&Ag.call(e,"callee")&&!wg.call(e,"callee")};Ds.exports=Tg});var X=l((bI,Ps)=>{var Ig=Array.isArray;Ps.exports=Ig});var Rs=l((vI,Ns)=>{function Og(){return!1}Ns.exports=Og});var Pt=l((Qe,Fe)=>{var Cg=Z(),Eg=Rs(),Ls=typeof Qe=="object"&&Qe&&!Qe.nodeType&&Qe,Ms=Ls&&typeof Fe=="object"&&Fe&&!Fe.nodeType&&Fe,jg=Ms&&Ms.exports===Ls,zs=jg?Cg.Buffer:void 0,Fg=zs?zs.isBuffer:void 0,Dg=Fg||Eg;Fe.exports=Dg});var Mr=l((yI,$s)=>{var Pg=9007199254740991,Ng=/^(?:0|[1-9]\d*)$/;function Rg(e,t){var r=typeof e;return t=t??Pg,!!t&&(r=="number"||r!="symbol"&&Ng.test(e))&&e>-1&&e%1==0&&e{var Mg=9007199254740991;function zg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Mg}Gs.exports=zg});var Us=l((qI,Bs)=>{var Lg=ae(),$g=Nt(),Gg=J(),Bg="[object Arguments]",Ug="[object Array]",kg="[object Boolean]",Kg="[object Date]",Hg="[object Error]",Vg="[object Function]",Wg="[object Map]",Xg="[object Number]",Yg="[object Object]",Qg="[object RegExp]",Zg="[object Set]",Jg="[object String]",eb="[object WeakMap]",tb="[object ArrayBuffer]",rb="[object DataView]",nb="[object Float32Array]",ib="[object Float64Array]",ab="[object Int8Array]",sb="[object Int16Array]",ob="[object Int32Array]",ub="[object Uint8Array]",lb="[object Uint8ClampedArray]",cb="[object Uint16Array]",pb="[object Uint32Array]",R={};R[nb]=R[ib]=R[ab]=R[sb]=R[ob]=R[ub]=R[lb]=R[cb]=R[pb]=!0;R[Bg]=R[Ug]=R[tb]=R[kg]=R[rb]=R[Kg]=R[Hg]=R[Vg]=R[Wg]=R[Xg]=R[Yg]=R[Qg]=R[Zg]=R[Jg]=R[eb]=!1;function fb(e){return Gg(e)&&$g(e.length)&&!!R[Lg(e)]}Bs.exports=fb});var Ze=l((SI,ks)=>{function hb(e){return function(t){return e(t)}}ks.exports=hb});var Rt=l((Je,De)=>{var mb=Er(),Ks=typeof Je=="object"&&Je&&!Je.nodeType&&Je,et=Ks&&typeof De=="object"&&De&&!De.nodeType&&De,db=et&&et.exports===Ks,zr=db&&mb.process,gb=function(){try{var e=et&&et.require&&et.require("util").types;return e||zr&&zr.binding&&zr.binding("util")}catch{}}();De.exports=gb});var Lr=l((xI,Ws)=>{var bb=Us(),vb=Ze(),Hs=Rt(),Vs=Hs&&Hs.isTypedArray,yb=Vs?vb(Vs):bb;Ws.exports=yb});var $r=l((AI,Xs)=>{var _b=Is(),qb=Dt(),Sb=X(),xb=Pt(),Ab=Mr(),wb=Lr(),Tb=Object.prototype,Ib=Tb.hasOwnProperty;function Ob(e,t){var r=Sb(e),n=!r&&qb(e),i=!r&&!n&&xb(e),a=!r&&!n&&!i&&wb(e),s=r||n||i||a,u=s?_b(e.length,String):[],o=u.length;for(var c in e)(t||Ib.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ab(c,o)))&&u.push(c);return u}Xs.exports=Ob});var Mt=l((wI,Ys)=>{var Cb=Object.prototype;function Eb(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Cb;return e===r}Ys.exports=Eb});var Gr=l((TI,Qs)=>{function jb(e,t){return function(r){return e(t(r))}}Qs.exports=jb});var Js=l((II,Zs)=>{var Fb=Gr(),Db=Fb(Object.keys,Object);Zs.exports=Db});var to=l((OI,eo)=>{var Pb=Mt(),Nb=Js(),Rb=Object.prototype,Mb=Rb.hasOwnProperty;function zb(e){if(!Pb(e))return Nb(e);var t=[];for(var r in Object(e))Mb.call(e,r)&&r!="constructor"&&t.push(r);return t}eo.exports=zb});var tt=l((CI,ro)=>{var Lb=jr(),$b=Nt();function Gb(e){return e!=null&&$b(e.length)&&!Lb(e)}ro.exports=Gb});var ge=l((EI,no)=>{var Bb=$r(),Ub=to(),kb=tt();function Kb(e){return kb(e)?Bb(e):Ub(e)}no.exports=Kb});var ao=l((jI,io)=>{var Hb=je(),Vb=ge();function Wb(e,t){return e&&Hb(t,Vb(t),e)}io.exports=Wb});var oo=l((FI,so)=>{function Xb(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}so.exports=Xb});var lo=l((DI,uo)=>{var Yb=se(),Qb=Mt(),Zb=oo(),Jb=Object.prototype,ev=Jb.hasOwnProperty;function tv(e){if(!Yb(e))return Zb(e);var t=Qb(e),r=[];for(var n in e)n=="constructor"&&(t||!ev.call(e,n))||r.push(n);return r}uo.exports=tv});var zt=l((PI,co)=>{var rv=$r(),nv=lo(),iv=tt();function av(e){return iv(e)?rv(e,!0):nv(e)}co.exports=av});var fo=l((NI,po)=>{var sv=je(),ov=zt();function uv(e,t){return e&&sv(t,ov(t),e)}po.exports=uv});var vo=l((rt,Pe)=>{var lv=Z(),bo=typeof rt=="object"&&rt&&!rt.nodeType&&rt,ho=bo&&typeof Pe=="object"&&Pe&&!Pe.nodeType&&Pe,cv=ho&&ho.exports===bo,mo=cv?lv.Buffer:void 0,go=mo?mo.allocUnsafe:void 0;function pv(e,t){if(t)return e.slice();var r=e.length,n=go?go(r):new e.constructor(r);return e.copy(n),n}Pe.exports=pv});var _o=l((RI,yo)=>{function fv(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{function hv(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r{function mv(){return[]}xo.exports=mv});var Lt=l((LI,wo)=>{var dv=So(),gv=Br(),bv=Object.prototype,vv=bv.propertyIsEnumerable,Ao=Object.getOwnPropertySymbols,yv=Ao?function(e){return e==null?[]:(e=Object(e),dv(Ao(e),function(t){return vv.call(e,t)}))}:gv;wo.exports=yv});var Io=l(($I,To)=>{var _v=je(),qv=Lt();function Sv(e,t){return _v(e,qv(e),t)}To.exports=Sv});var $t=l((GI,Oo)=>{function xv(e,t){for(var r=-1,n=t.length,i=e.length;++r{var Av=Gr(),wv=Av(Object.getPrototypeOf,Object);Co.exports=wv});var Ur=l((UI,Eo)=>{var Tv=$t(),Iv=Gt(),Ov=Lt(),Cv=Br(),Ev=Object.getOwnPropertySymbols,jv=Ev?function(e){for(var t=[];e;)Tv(t,Ov(e)),e=Iv(e);return t}:Cv;Eo.exports=jv});var Fo=l((kI,jo)=>{var Fv=je(),Dv=Ur();function Pv(e,t){return Fv(e,Dv(e),t)}jo.exports=Pv});var kr=l((KI,Do)=>{var Nv=$t(),Rv=X();function Mv(e,t,r){var n=t(e);return Rv(e)?n:Nv(n,r(e))}Do.exports=Mv});var Kr=l((HI,Po)=>{var zv=kr(),Lv=Lt(),$v=ge();function Gv(e){return zv(e,$v,Lv)}Po.exports=Gv});var Hr=l((VI,No)=>{var Bv=kr(),Uv=Ur(),kv=zt();function Kv(e){return Bv(e,kv,Uv)}No.exports=Kv});var Mo=l((WI,Ro)=>{var Hv=oe(),Vv=Z(),Wv=Hv(Vv,"DataView");Ro.exports=Wv});var Lo=l((XI,zo)=>{var Xv=oe(),Yv=Z(),Qv=Xv(Yv,"Promise");zo.exports=Qv});var Vr=l((YI,$o)=>{var Zv=oe(),Jv=Z(),ey=Zv(Jv,"Set");$o.exports=ey});var Bo=l((QI,Go)=>{var ty=oe(),ry=Z(),ny=ty(ry,"WeakMap");Go.exports=ny});var nt=l((ZI,Xo)=>{var Wr=Mo(),Xr=Et(),Yr=Lo(),Qr=Vr(),Zr=Bo(),Wo=ae(),Ne=Dr(),Uo="[object Map]",iy="[object Object]",ko="[object Promise]",Ko="[object Set]",Ho="[object WeakMap]",Vo="[object DataView]",ay=Ne(Wr),sy=Ne(Xr),oy=Ne(Yr),uy=Ne(Qr),ly=Ne(Zr),be=Wo;(Wr&&be(new Wr(new ArrayBuffer(1)))!=Vo||Xr&&be(new Xr)!=Uo||Yr&&be(Yr.resolve())!=ko||Qr&&be(new Qr)!=Ko||Zr&&be(new Zr)!=Ho)&&(be=function(e){var t=Wo(e),r=t==iy?e.constructor:void 0,n=r?Ne(r):"";if(n)switch(n){case ay:return Vo;case sy:return Uo;case oy:return ko;case uy:return Ko;case ly:return Ho}return t});Xo.exports=be});var Qo=l((JI,Yo)=>{var cy=Object.prototype,py=cy.hasOwnProperty;function fy(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&py.call(e,"index")&&(r.index=e.index,r.input=e.input),r}Yo.exports=fy});var Jr=l((eO,Zo)=>{var hy=Z(),my=hy.Uint8Array;Zo.exports=my});var Bt=l((tO,eu)=>{var Jo=Jr();function dy(e){var t=new e.constructor(e.byteLength);return new Jo(t).set(new Jo(e)),t}eu.exports=dy});var ru=l((rO,tu)=>{var gy=Bt();function by(e,t){var r=t?gy(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}tu.exports=by});var iu=l((nO,nu)=>{var vy=/\w*$/;function yy(e){var t=new e.constructor(e.source,vy.exec(e));return t.lastIndex=e.lastIndex,t}nu.exports=yy});var lu=l((iO,uu)=>{var au=de(),su=au?au.prototype:void 0,ou=su?su.valueOf:void 0;function _y(e){return ou?Object(ou.call(e)):{}}uu.exports=_y});var pu=l((aO,cu)=>{var qy=Bt();function Sy(e,t){var r=t?qy(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}cu.exports=Sy});var hu=l((sO,fu)=>{var xy=Bt(),Ay=ru(),wy=iu(),Ty=lu(),Iy=pu(),Oy="[object Boolean]",Cy="[object Date]",Ey="[object Map]",jy="[object Number]",Fy="[object RegExp]",Dy="[object Set]",Py="[object String]",Ny="[object Symbol]",Ry="[object ArrayBuffer]",My="[object DataView]",zy="[object Float32Array]",Ly="[object Float64Array]",$y="[object Int8Array]",Gy="[object Int16Array]",By="[object Int32Array]",Uy="[object Uint8Array]",ky="[object Uint8ClampedArray]",Ky="[object Uint16Array]",Hy="[object Uint32Array]";function Vy(e,t,r){var n=e.constructor;switch(t){case Ry:return xy(e);case Oy:case Cy:return new n(+e);case My:return Ay(e,r);case zy:case Ly:case $y:case Gy:case By:case Uy:case ky:case Ky:case Hy:return Iy(e,r);case Ey:return new n;case jy:case Py:return new n(e);case Fy:return wy(e);case Dy:return new n;case Ny:return Ty(e)}}fu.exports=Vy});var gu=l((oO,du)=>{var Wy=se(),mu=Object.create,Xy=function(){function e(){}return function(t){if(!Wy(t))return{};if(mu)return mu(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();du.exports=Xy});var vu=l((uO,bu)=>{var Yy=gu(),Qy=Gt(),Zy=Mt();function Jy(e){return typeof e.constructor=="function"&&!Zy(e)?Yy(Qy(e)):{}}bu.exports=Jy});var _u=l((lO,yu)=>{var e1=nt(),t1=J(),r1="[object Map]";function n1(e){return t1(e)&&e1(e)==r1}yu.exports=n1});var Au=l((cO,xu)=>{var i1=_u(),a1=Ze(),qu=Rt(),Su=qu&&qu.isMap,s1=Su?a1(Su):i1;xu.exports=s1});var Tu=l((pO,wu)=>{var o1=nt(),u1=J(),l1="[object Set]";function c1(e){return u1(e)&&o1(e)==l1}wu.exports=c1});var Eu=l((fO,Cu)=>{var p1=Tu(),f1=Ze(),Iu=Rt(),Ou=Iu&&Iu.isSet,h1=Ou?f1(Ou):p1;Cu.exports=h1});var kt=l((hO,Pu)=>{var m1=Ft(),d1=_s(),g1=Rr(),b1=ao(),v1=fo(),y1=vo(),_1=_o(),q1=Io(),S1=Fo(),x1=Kr(),A1=Hr(),w1=nt(),T1=Qo(),I1=hu(),O1=vu(),C1=X(),E1=Pt(),j1=Au(),F1=se(),D1=Eu(),P1=ge(),N1=zt(),R1=1,M1=2,z1=4,ju="[object Arguments]",L1="[object Array]",$1="[object Boolean]",G1="[object Date]",B1="[object Error]",Fu="[object Function]",U1="[object GeneratorFunction]",k1="[object Map]",K1="[object Number]",Du="[object Object]",H1="[object RegExp]",V1="[object Set]",W1="[object String]",X1="[object Symbol]",Y1="[object WeakMap]",Q1="[object ArrayBuffer]",Z1="[object DataView]",J1="[object Float32Array]",e_="[object Float64Array]",t_="[object Int8Array]",r_="[object Int16Array]",n_="[object Int32Array]",i_="[object Uint8Array]",a_="[object Uint8ClampedArray]",s_="[object Uint16Array]",o_="[object Uint32Array]",P={};P[ju]=P[L1]=P[Q1]=P[Z1]=P[$1]=P[G1]=P[J1]=P[e_]=P[t_]=P[r_]=P[n_]=P[k1]=P[K1]=P[Du]=P[H1]=P[V1]=P[W1]=P[X1]=P[i_]=P[a_]=P[s_]=P[o_]=!0;P[B1]=P[Fu]=P[Y1]=!1;function Ut(e,t,r,n,i,a){var s,u=t&R1,o=t&M1,c=t&z1;if(r&&(s=i?r(e,n,i,a):r(e)),s!==void 0)return s;if(!F1(e))return e;var p=C1(e);if(p){if(s=T1(e),!u)return _1(e,s)}else{var f=w1(e),v=f==Fu||f==U1;if(E1(e))return y1(e,u);if(f==Du||f==ju||v&&!i){if(s=o||v?{}:O1(e),!u)return o?S1(e,v1(s,e)):q1(e,b1(s,e))}else{if(!P[f])return i?e:{};s=I1(e,f,u)}}a||(a=new m1);var q=a.get(e);if(q)return q;a.set(e,s),D1(e)?e.forEach(function(A){s.add(Ut(A,t,r,A,e,a))}):j1(e)&&e.forEach(function(A,x){s.set(x,Ut(A,t,r,x,e,a))});var S=c?o?A1:x1:o?N1:P1,w=p?void 0:S(e);return d1(w||e,function(A,x){w&&(x=A,A=e[x]),g1(s,x,Ut(A,t,r,x,e,a))}),s}Pu.exports=Ut});var it=l((mO,Nu)=>{var u_=kt(),l_=1,c_=4;function p_(e){return u_(e,l_|c_)}Nu.exports=p_});var Mu=l((dO,Ru)=>{var f_=ae(),h_=X(),m_=J(),d_="[object String]";function g_(e){return typeof e=="string"||!h_(e)&&m_(e)&&f_(e)==d_}Ru.exports=g_});var en=l((bO,zu)=>{function v_(e){return function(){return e}}zu.exports=v_});var $u=l((vO,Lu)=>{function y_(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),u=s.length;u--;){var o=s[e?u:++i];if(r(a[o],o,a)===!1)break}return t}}Lu.exports=y_});var Bu=l((yO,Gu)=>{var __=$u(),q_=__();Gu.exports=q_});var ku=l((_O,Uu)=>{var S_=Bu(),x_=ge();function A_(e,t){return e&&S_(e,t,x_)}Uu.exports=A_});var Hu=l((qO,Ku)=>{var w_=ku();function T_(e,t,r,n){return w_(e,function(i,a,s){t(n,r(i),a,s)}),n}Ku.exports=T_});var Wu=l((SO,Vu)=>{var I_=Hu();function O_(e,t){return function(r,n){return I_(r,e,t(n),{})}}Vu.exports=O_});var at=l((xO,Xu)=>{function C_(e){return e}Xu.exports=C_});var Qu=l((AO,Yu)=>{var E_=en(),j_=Wu(),F_=at(),D_=Object.prototype,P_=D_.toString,N_=j_(function(e,t,r){t!=null&&typeof t.toString!="function"&&(t=P_.call(t)),e[t]=r},E_(F_));Yu.exports=N_});var Ht=l((wO,Zu)=>{function R_(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r{var M_=ae(),z_=J(),L_="[object Symbol]";function $_(e){return typeof e=="symbol"||z_(e)&&M_(e)==L_}Ju.exports=$_});var Vt=l((IO,el)=>{var G_=X(),B_=st(),U_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,k_=/^\w*$/;function K_(e,t){if(G_(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||B_(e)?!0:k_.test(e)||!U_.test(e)||t!=null&&e in Object(t)}el.exports=K_});var nl=l((OO,rl)=>{var tl=jt(),H_="Expected a function";function tn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(H_);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(tn.Cache||tl),r}tn.Cache=tl;rl.exports=tn});var al=l((CO,il)=>{var V_=nl(),W_=500;function X_(e){var t=V_(e,function(n){return r.size===W_&&r.clear(),n}),r=t.cache;return t}il.exports=X_});var ol=l((EO,sl)=>{var Y_=al(),Q_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z_=/\\(\\)?/g,J_=Y_(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Q_,function(r,n,i,a){t.push(i?a.replace(Z_,"$1"):n||r)}),t});sl.exports=J_});var hl=l((jO,fl)=>{var ul=de(),e0=Ht(),t0=X(),r0=st(),n0=1/0,ll=ul?ul.prototype:void 0,cl=ll?ll.toString:void 0;function pl(e){if(typeof e=="string")return e;if(t0(e))return e0(e,pl)+"";if(r0(e))return cl?cl.call(e):"";var t=e+"";return t=="0"&&1/e==-n0?"-0":t}fl.exports=pl});var dl=l((FO,ml)=>{var i0=hl();function a0(e){return e==null?"":i0(e)}ml.exports=a0});var ot=l((DO,gl)=>{var s0=X(),o0=Vt(),u0=ol(),l0=dl();function c0(e,t){return s0(e)?e:o0(e,t)?[e]:u0(l0(e))}gl.exports=c0});var vl=l((PO,bl)=>{function p0(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}bl.exports=p0});var Re=l((NO,yl)=>{var f0=st(),h0=1/0;function m0(e){if(typeof e=="string"||f0(e))return e;var t=e+"";return t=="0"&&1/e==-h0?"-0":t}yl.exports=m0});var Wt=l((RO,_l)=>{var d0=ot(),g0=Re();function b0(e,t){t=d0(t,e);for(var r=0,n=t.length;e!=null&&r{function v0(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n{var y0=Wt(),_0=Sl();function q0(e,t){return t.length<2?e:y0(e,_0(t,0,-1))}xl.exports=q0});var Tl=l((LO,wl)=>{var S0=ot(),x0=vl(),A0=Al(),w0=Re();function T0(e,t){return t=S0(t,e),e=A0(e,t),e==null||delete e[w0(x0(t))]}wl.exports=T0});var Cl=l(($O,Ol)=>{var I0=ae(),O0=Gt(),C0=J(),E0="[object Object]",j0=Function.prototype,F0=Object.prototype,Il=j0.toString,D0=F0.hasOwnProperty,P0=Il.call(Object);function N0(e){if(!C0(e)||I0(e)!=E0)return!1;var t=O0(e);if(t===null)return!0;var r=D0.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Il.call(r)==P0}Ol.exports=N0});var jl=l((GO,El)=>{var R0=Cl();function M0(e){return R0(e)?void 0:e}El.exports=M0});var Nl=l((BO,Pl)=>{var Fl=de(),z0=Dt(),L0=X(),Dl=Fl?Fl.isConcatSpreadable:void 0;function $0(e){return L0(e)||z0(e)||!!(Dl&&e&&e[Dl])}Pl.exports=$0});var rn=l((UO,Ml)=>{var G0=$t(),B0=Nl();function Rl(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=B0),i||(i=[]);++a0&&r(u)?t>1?Rl(u,t-1,r,n,i):G0(i,u):n||(i[i.length]=u)}return i}Ml.exports=Rl});var Ll=l((kO,zl)=>{var U0=rn();function k0(e){var t=e==null?0:e.length;return t?U0(e,1):[]}zl.exports=k0});var Gl=l((KO,$l)=>{function K0(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}$l.exports=K0});var nn=l((HO,Ul)=>{var H0=Gl(),Bl=Math.max;function V0(e,t,r){return t=Bl(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Bl(n.length-t,0),s=Array(a);++i{var W0=en(),kl=Pr(),X0=at(),Y0=kl?function(e,t){return kl(e,"toString",{configurable:!0,enumerable:!1,value:W0(t),writable:!0})}:X0;Kl.exports=Y0});var Wl=l((WO,Vl)=>{var Q0=800,Z0=16,J0=Date.now;function eq(e){var t=0,r=0;return function(){var n=J0(),i=Z0-(n-r);if(r=n,i>0){if(++t>=Q0)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}Vl.exports=eq});var an=l((XO,Xl)=>{var tq=Hl(),rq=Wl(),nq=rq(tq);Xl.exports=nq});var Ql=l((YO,Yl)=>{var iq=Ll(),aq=nn(),sq=an();function oq(e){return sq(aq(e,void 0,iq),e+"")}Yl.exports=oq});var Jl=l((QO,Zl)=>{var uq=Ht(),lq=kt(),cq=Tl(),pq=ot(),fq=je(),hq=jl(),mq=Ql(),dq=Hr(),gq=1,bq=2,vq=4,yq=mq(function(e,t){var r={};if(e==null)return r;var n=!1;t=uq(t,function(a){return a=pq(a,e),n||(n=a.length>1),a}),fq(e,dq(e),r),n&&(r=lq(r,gq|bq|vq,hq));for(var i=t.length;i--;)cq(r,t[i]);return r});Zl.exports=yq});var pc=l((nC,cc)=>{var xq="__lodash_hash_undefined__";function Aq(e){return this.__data__.set(e,xq),this}cc.exports=Aq});var hc=l((iC,fc)=>{function wq(e){return this.__data__.has(e)}fc.exports=wq});var tr=l((aC,mc)=>{var Tq=jt(),Iq=pc(),Oq=hc();function er(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Tq;++t{function Cq(e,t){for(var r=-1,n=e==null?0:e.length;++r{function Eq(e,t){return e.has(t)}bc.exports=Eq});var ln=l((uC,vc)=>{var jq=tr(),Fq=gc(),Dq=rr(),Pq=1,Nq=2;function Rq(e,t,r,n,i,a){var s=r&Pq,u=e.length,o=t.length;if(u!=o&&!(s&&o>u))return!1;var c=a.get(e),p=a.get(t);if(c&&p)return c==t&&p==e;var f=-1,v=!0,q=r&Nq?new jq:void 0;for(a.set(e,t),a.set(t,e);++f{function Mq(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}yc.exports=Mq});var nr=l((cC,qc)=>{function zq(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}qc.exports=zq});var Tc=l((pC,wc)=>{var Sc=de(),xc=Jr(),Lq=Ct(),$q=ln(),Gq=_c(),Bq=nr(),Uq=1,kq=2,Kq="[object Boolean]",Hq="[object Date]",Vq="[object Error]",Wq="[object Map]",Xq="[object Number]",Yq="[object RegExp]",Qq="[object Set]",Zq="[object String]",Jq="[object Symbol]",eS="[object ArrayBuffer]",tS="[object DataView]",Ac=Sc?Sc.prototype:void 0,cn=Ac?Ac.valueOf:void 0;function rS(e,t,r,n,i,a,s){switch(r){case tS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case eS:return!(e.byteLength!=t.byteLength||!a(new xc(e),new xc(t)));case Kq:case Hq:case Xq:return Lq(+e,+t);case Vq:return e.name==t.name&&e.message==t.message;case Yq:case Zq:return e==t+"";case Wq:var u=Gq;case Qq:var o=n&Uq;if(u||(u=Bq),e.size!=t.size&&!o)return!1;var c=s.get(e);if(c)return c==t;n|=kq,s.set(e,t);var p=$q(u(e),u(t),n,i,a,s);return s.delete(e),p;case Jq:if(cn)return cn.call(e)==cn.call(t)}return!1}wc.exports=rS});var Cc=l((fC,Oc)=>{var Ic=Kr(),nS=1,iS=Object.prototype,aS=iS.hasOwnProperty;function sS(e,t,r,n,i,a){var s=r&nS,u=Ic(e),o=u.length,c=Ic(t),p=c.length;if(o!=p&&!s)return!1;for(var f=o;f--;){var v=u[f];if(!(s?v in t:aS.call(t,v)))return!1}var q=a.get(e),S=a.get(t);if(q&&S)return q==t&&S==e;var w=!0;a.set(e,t),a.set(t,e);for(var A=s;++f{var pn=Ft(),oS=ln(),uS=Tc(),lS=Cc(),Ec=nt(),jc=X(),Fc=Pt(),cS=Lr(),pS=1,Dc="[object Arguments]",Pc="[object Array]",ir="[object Object]",fS=Object.prototype,Nc=fS.hasOwnProperty;function hS(e,t,r,n,i,a){var s=jc(e),u=jc(t),o=s?Pc:Ec(e),c=u?Pc:Ec(t);o=o==Dc?ir:o,c=c==Dc?ir:c;var p=o==ir,f=c==ir,v=o==c;if(v&&Fc(e)){if(!Fc(t))return!1;s=!0,p=!1}if(v&&!p)return a||(a=new pn),s||cS(e)?oS(e,t,r,n,i,a):uS(e,t,o,r,n,i,a);if(!(r&pS)){var q=p&&Nc.call(e,"__wrapped__"),S=f&&Nc.call(t,"__wrapped__");if(q||S){var w=q?e.value():e,A=S?t.value():t;return a||(a=new pn),i(w,A,r,n,a)}}return v?(a||(a=new pn),lS(e,t,r,n,i,a)):!1}Rc.exports=hS});var ar=l((mC,$c)=>{var mS=Mc(),zc=J();function Lc(e,t,r,n,i){return e===t?!0:e==null||t==null||!zc(e)&&!zc(t)?e!==e&&t!==t:mS(e,t,r,n,Lc,i)}$c.exports=Lc});var Bc=l((dC,Gc)=>{var dS=ar();function gS(e,t){return dS(e,t)}Gc.exports=gS});var Xc=l((GC,Wc)=>{var zS=kt(),LS=4;function $S(e){return zS(e,LS)}Wc.exports=$S});var Qc=l((BC,Yc)=>{var GS=Ft(),BS=ar(),US=1,kS=2;function KS(e,t,r,n){var i=r.length,a=i,s=!n;if(e==null)return!a;for(e=Object(e);i--;){var u=r[i];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i{var HS=se();function VS(e){return e===e&&!HS(e)}Zc.exports=VS});var ep=l((kC,Jc)=>{var WS=yn(),XS=ge();function YS(e){for(var t=XS(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,WS(i)]}return t}Jc.exports=YS});var _n=l((KC,tp)=>{function QS(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}tp.exports=QS});var np=l((HC,rp)=>{var ZS=Qc(),JS=ep(),ex=_n();function tx(e){var t=JS(e);return t.length==1&&t[0][2]?ex(t[0][0],t[0][1]):function(r){return r===e||ZS(r,e,t)}}rp.exports=tx});var ap=l((VC,ip)=>{var rx=Wt();function nx(e,t,r){var n=e==null?void 0:rx(e,t);return n===void 0?r:n}ip.exports=nx});var op=l((WC,sp)=>{function ix(e,t){return e!=null&&t in Object(e)}sp.exports=ix});var lp=l((XC,up)=>{var ax=ot(),sx=Dt(),ox=X(),ux=Mr(),lx=Nt(),cx=Re();function px(e,t,r){t=ax(t,e);for(var n=-1,i=t.length,a=!1;++n{var fx=op(),hx=lp();function mx(e,t){return e!=null&&hx(e,t,fx)}cp.exports=mx});var hp=l((QC,fp)=>{var dx=ar(),gx=ap(),bx=pp(),vx=Vt(),yx=yn(),_x=_n(),qx=Re(),Sx=1,xx=2;function Ax(e,t){return vx(e)&&yx(t)?_x(qx(e),t):function(r){var n=gx(r,e);return n===void 0&&n===t?bx(r,e):dx(t,n,Sx|xx)}}fp.exports=Ax});var dp=l((ZC,mp)=>{function wx(e){return function(t){return t?.[e]}}mp.exports=wx});var bp=l((JC,gp)=>{var Tx=Wt();function Ix(e){return function(t){return Tx(t,e)}}gp.exports=Ix});var yp=l((eE,vp)=>{var Ox=dp(),Cx=bp(),Ex=Vt(),jx=Re();function Fx(e){return Ex(e)?Ox(jx(e)):Cx(e)}vp.exports=Fx});var qn=l((tE,_p)=>{var Dx=np(),Px=hp(),Nx=at(),Rx=X(),Mx=yp();function zx(e){return typeof e=="function"?e:e==null?Nx:typeof e=="object"?Rx(e)?Px(e[0],e[1]):Dx(e):Mx(e)}_p.exports=zx});var Sp=l((rE,qp)=>{var Lx=qn(),$x=tt(),Gx=ge();function Bx(e){return function(t,r,n){var i=Object(t);if(!$x(t)){var a=Lx(r,3);t=Gx(t),r=function(u){return a(i[u],u,i)}}var s=e(t,r,n);return s>-1?i[a?t[s]:s]:void 0}}qp.exports=Bx});var Sn=l((nE,xp)=>{function Ux(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a{var kx=/\s/;function Kx(e){for(var t=e.length;t--&&kx.test(e.charAt(t)););return t}Ap.exports=Kx});var Ip=l((aE,Tp)=>{var Hx=wp(),Vx=/^\s+/;function Wx(e){return e&&e.slice(0,Hx(e)+1).replace(Vx,"")}Tp.exports=Wx});var jp=l((sE,Ep)=>{var Xx=Ip(),Op=se(),Yx=st(),Cp=NaN,Qx=/^[-+]0x[0-9a-f]+$/i,Zx=/^0b[01]+$/i,Jx=/^0o[0-7]+$/i,eA=parseInt;function tA(e){if(typeof e=="number")return e;if(Yx(e))return Cp;if(Op(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Op(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Xx(e);var r=Zx.test(e);return r||Jx.test(e)?eA(e.slice(2),r?2:8):Qx.test(e)?Cp:+e}Ep.exports=tA});var Pp=l((oE,Dp)=>{var rA=jp(),Fp=1/0,nA=17976931348623157e292;function iA(e){if(!e)return e===0?e:0;if(e=rA(e),e===Fp||e===-Fp){var t=e<0?-1:1;return t*nA}return e===e?e:0}Dp.exports=iA});var Rp=l((uE,Np)=>{var aA=Pp();function sA(e){var t=aA(e),r=t%1;return t===t?r?t-r:t:0}Np.exports=sA});var zp=l((lE,Mp)=>{var oA=Sn(),uA=qn(),lA=Rp(),cA=Math.max;function pA(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:lA(r);return i<0&&(i=cA(n+i,0)),oA(e,uA(t,3),i)}Mp.exports=pA});var $p=l((cE,Lp)=>{var fA=Sp(),hA=zp(),mA=fA(hA);Lp.exports=mA});var Bp=l((pE,Gp)=>{function dA(e){return e!==e}Gp.exports=dA});var kp=l((fE,Up)=>{function gA(e,t,r){for(var n=r-1,i=e.length;++n{var bA=Sn(),vA=Bp(),yA=kp();function _A(e,t,r){return t===t?yA(e,t,r):bA(e,vA,r)}Kp.exports=_A});var xn=l((mE,Vp)=>{var qA=Hp();function SA(e,t){var r=e==null?0:e.length;return!!r&&qA(e,t,0)>-1}Vp.exports=SA});var An=l((dE,Wp)=>{function xA(e,t,r){for(var n=-1,i=e==null?0:e.length;++n{function AA(){}Xp.exports=AA});var Zp=l((bE,Qp)=>{var wn=Vr(),wA=Yp(),TA=nr(),IA=1/0,OA=wn&&1/TA(new wn([,-0]))[1]==IA?function(e){return new wn(e)}:wA;Qp.exports=OA});var ef=l((vE,Jp)=>{var CA=tr(),EA=xn(),jA=An(),FA=rr(),DA=Zp(),PA=nr(),NA=200;function RA(e,t,r){var n=-1,i=EA,a=e.length,s=!0,u=[],o=u;if(r)s=!1,i=jA;else if(a>=NA){var c=t?null:DA(e);if(c)return PA(c);s=!1,i=FA,o=new CA}else o=t?[]:u;e:for(;++n{var MA=ef();function zA(e){return e&&e.length?MA(e):[]}tf.exports=zA});var In=l((_E,rf)=>{var LA=tr(),$A=xn(),GA=An(),BA=Ht(),UA=Ze(),kA=rr(),KA=200;function HA(e,t,r,n){var i=-1,a=$A,s=!0,u=e.length,o=[],c=t.length;if(!u)return o;r&&(t=BA(t,UA(r))),n?(a=GA,s=!1):t.length>=KA&&(a=kA,s=!1,t=new LA(t));e:for(;++i{var VA=at(),WA=nn(),XA=an();function YA(e,t){return XA(WA(e,t,VA),e+"")}nf.exports=YA});var Cn=l((SE,af)=>{var QA=tt(),ZA=J();function JA(e){return ZA(e)&&QA(e)}af.exports=JA});var of=l((xE,sf)=>{var ew=In(),tw=On(),rw=Cn(),nw=tw(function(e,t){return rw(e)?ew(e,t):[]});sf.exports=nw});var qf=l((nj,_f)=>{var Vw=In(),Ww=rn(),Xw=On(),yf=Cn(),Yw=Xw(function(e,t){return yf(e)?Vw(e,Ww(t,1,yf,!0)):[]});_f.exports=Yw});var jf=$(Pi(),1);var Hi=$(Ki(),1),Tt=class{constructor(t){let r=/.*?(irealb(?:ook)?):\/\/([^"]*)/.exec(t),i=decodeURIComponent(r[2]).split("===");i.length>1&&(this.name=i.pop()),this.songs=i.map(a=>{try{return new Ke(a,r[1]==="irealbook")}catch(s){let u=a.split("="),o=Ke.parseTitle(u[0].trim());return console.error(`[ireal-musicxml] [${o}] ${s}`),null}}).filter(a=>a!==null).reduce((a,s)=>{if(a.length>0){let u=(0,Hi.default)(a[a.length-1].title,s.title);if(u[0][0]===0&&u.every(o=>o[0]===0||o[1].match(/^\d+$/)))return a[a.length-1].cells=a[a.length-1].cells.concat(s.cells),a}return a.push(s),a},[])}},It=class{constructor(){this.annots=[],this.comments=[],this.bars="",this.spacer=0,this.chord=null}},me=class{constructor(t,r="",n=null,i=null){this.note=t,this.modifiers=r,this.over=n,this.alternate=i}},Ke=class e{constructor(t,r=!1){if(this.cells=[],this.musicXml="",!t){this.title="",this.composer="",this.style="",this.key="",this.transpose=0,this.groove="",this.bpm=0,this.repeats=0;return}let n=t.split("=");if(r)this.title=e.parseTitle(n[0].trim()),this.composer=e.parseComposer(n[1].trim()),this.style=n[2].trim(),this.key=n[3],this.cells=this.parse(n[5]);else{this.title=e.parseTitle(n[0].trim()),this.composer=e.parseComposer(n[1].trim()),this.style=n[3].trim(),this.key=n[4],this.transpose=+n[5]||0,this.groove=n[7],this.bpm=+n[8],this.repeats=+n[9]||3;let i=n[6].split("1r34LbKcu7");this.cells=this.parse($h(i[1]))}}static chordRegex=/^([A-G][b#]?)((?:sus|alt|add|[+\-^\dhob#])*)(\*.+?\*)*(\/[A-G][#b]?)?(\(.*?\))?/;static chordRegex2=/^([ Wp])()()(\/[A-G][#b]?)?(\(.*?\))?/;static regExps=[/^\*[a-zA-Z]/,/^T\d\d/,/^N./,/^<.*?>/,e.chordRegex,e.chordRegex2];parse(t){let r=t.trim(),n=[];for(;r;){let u=!1;for(let o=0;o51;)r=e.substring(0,50),e=e.substring(50),t=t+Gh(r);return t=t+e,t=t.replace(/Kcl/g,"| x").replace(/LZ/g," |").replace(/XyQ/g," "),t}function Gh(e){let t=e.split("");for(let r=0;r<5;r++)t[49-r]=e[r],t[r]=e[49-r];for(let r=10;r<24;r++)t[49-r]=e[r],t[r]=e[49-r];return t.join("")}var Ef=$(Vi(),1);function Q(e,t){return e.reduce((r,n)=>r?n(r):null,t)}var fr=$(it()),bf=$(Mu());var b_=e=>{if(!Array.isArray(e))throw new TypeError("customFilters should be given as an array");if(e.some(t=>typeof t!="function"))throw new TypeError("The given filter is not a function");return!0},Kt=b_;var rc=$(Qu()),nc=$(Jl()),h={AFlat:"Ab",A:"A",ASharp:"A#",BFlat:"Bb",B:"B",C:"C",CSharp:"C#",DFlat:"Db",D:"D",DSharp:"D#",EFlat:"Eb",E:"E",F:"F",FSharp:"F#",GFlat:"Gb",G:"G",GSharp:"G#"},sn={Ab:h.AFlat,A:h.A,"A#":h.ASharp,Bb:h.BFlat,B:h.B,"B#":h.C,Cb:h.B,C:h.C,"C#":h.CSharp,Db:h.DFlat,D:h.D,"D#":h.DSharp,Eb:h.EFlat,E:h.E,"E#":h.F,Fb:h.E,F:h.F,"F#":h.FSharp,Gb:h.GFlat,G:h.G,"G#":h.GSharp},ec={Lab:h.AFlat,La:h.A,"La#":h.ASharp,Sib:h.BFlat,Si:h.B,"Si#":h.C,Dob:h.B,Do:h.C,"Do#":h.CSharp,Reb:h.DFlat,R\u00E9b:h.DFlat,Re:h.D,R\u00E9:h.D,"Re#":h.DSharp,"R\xE9#":h.DSharp,Mib:h.EFlat,Mi:h.E,"Mi#":h.F,Fab:h.E,Fa:h.F,"Fa#":h.FSharp,Solb:h.GFlat,Sol:h.G,"Sol#":h.GSharp},tc={...(0,nc.default)(sn,["Bb","B","B#"]),As:h.AFlat,Ais:h.ASharp,Hb:h.BFlat,Hes:h.BFlat,H:h.B,His:h.C,"H#":h.C,Ces:h.B,Cis:h.CSharp,Des:h.DFlat,Dis:h.DSharp,Es:h.EFlat,Eis:h.F,Fes:h.E,Fis:h.FSharp,Ges:h.GFlat,Gis:h.GSharp};function on(e){let t;return Object.keys(e).reduce((r,n)=>(n.match(/.[b|#]$/)&&(t=n.replace("#","\u266F").replace("b","\u266D"),r[t]=e[n]),r),{})}var ic={...sn,...on(sn)},ac={...ec,...on(ec)},sc={...tc,...on(tc)},Xt={...ic,...ac,...sc},ZO=Object.keys(Xt).sort((e,t)=>t.length-e.length),_q=Object.keys(ic).sort((e,t)=>t.length-e.length),qq=Object.keys(ac).sort((e,t)=>t.length-e.length),Sq=Object.keys(sc).sort((e,t)=>t.length-e.length),oc=[{name:"english",notes:_q},{name:"german",notes:Sq},{name:"latin",notes:qq}],ue=[h.A,h.ASharp,h.B,h.C,h.CSharp,h.D,h.DSharp,h.E,h.F,h.FSharp,h.G,h.GSharp],uc=[h.A,h.BFlat,h.B,h.C,h.DFlat,h.D,h.EFlat,h.E,h.F,h.GFlat,h.G,h.AFlat],un={[h.CSharp]:h.DFlat,[h.DSharp]:h.EFlat,[h.FSharp]:h.GFlat,[h.GSharp]:h.AFlat,[h.ASharp]:h.BFlat},ve=(0,rc.default)(un);var lc=[...Object.values(h),...Object.values(h).map(e=>e+"m")];var Yt=class extends Error{constructor(){super("The given symbol is not a valid string"),this.name="InvalidInput"}},Qt=class extends Error{constructor(){super("An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?"),this.name="UnexpectedError"}},ut=class extends Error{constructor(t,r,n){super(t),this.name=n,this.chord=r}},Me=class extends ut{constructor(t){let r=`"${t.input.symbol}" does not seems to be a chord`;super(r,t,"NoSymbolFound")}},Zt=class extends ut{constructor(t,r){let n=`The chord descriptor "${t.input.descriptor}" contains unknown or duplicated modifiers: "${r}"`;super(n,t,"InvalidModifier")}},Jt=class extends ut{constructor(t,r){let n=`"${t.input.symbol}" describes a chord with an invalid intervals combo: `+r.join(" and ");super(n,t,"InvalidIntervals")}};var fn=$(X()),Uc=$(Bc());function ye(e,t){let r=(0,fn.default)(t)?t:[t];return(0,Uc.default)(e,r)}function C(e,t){return hn(e,t,"oneOf")}function lt(e,t){return hn(e,t,"all")}function Y(e,t){return hn(e,t,"none")}function hn(e,t,r){return((0,fn.default)(t)?t:[t])[r==="oneOf"?"some":"every"](a=>r==="none"?!e.includes(a):e.includes(a))}var bS=[["2","3"],["2","9"],["3","b3"],["4","11"],["5","b5"],["5","#5"],["b6","#5"],["b6","6"],["b6","13"],["6","13"],["b7","bb7"],["7","b7"],["9","b9"],["9","#9"],["11","#11"],["13","b13"]];function mn(e){let t=e.normalized.intervals,r=bS.find(n=>lt(t,n));if(r)throw new Jt(e,r);return e}function ct(e){let{rootNote:t,bassNote:r,descriptor:n,chordChanges:i}=e.formatted,a=t;return n&&(a+=n),i&&i.length&&(a+="("+i.join(",")+")"),r&&(a+="/"+r),e.formatted.symbol=a,e}var g={ma:"major",ma6:"major6",ma7:"major7",dom7:"dominant7",mi:"minor",mi6:"minor6",mi7:"minor7",miMa7:"minorMajor7",aug:"augmented",dim:"diminished",dim7:"diminished7",power:"power",bass:"bass"},qC=[g.ma,g.ma6,g.ma7,g.dom7,g.aug],sr=[g.mi,g.mi6,g.mi7,g.miMa7,g.dim,g.dim7];var vS={[g.ma]:()=>"",[g.ma6]:e=>e.normalized.intervals.includes("9")?"69":"6",[g.ma7]:e=>"ma"+or(e),[g.dom7]:e=>e.normalized.intents.alt?"7alt":or(e),[g.mi]:()=>"mi",[g.mi6]:e=>e.normalized.intervals.includes("9")?"mi69":"mi6",[g.mi7]:e=>"mi"+or(e),[g.miMa7]:e=>"miMa"+or(e),[g.aug]:()=>"+",[g.dim]:()=>"dim",[g.dim7]:()=>"dim7",[g.power]:()=>"5",[g.bass]:()=>" bass"},ur={add:"add",add7:"Ma7",omit:"omit",sus:"sus"};function pt(e){return e.formatted={rootNote:e.normalized.rootNote,bassNote:e.normalized.bassNote,descriptor:yS(e),chordChanges:_S(e)},e}function yS(e){let t=vS[e.normalized.quality](e);return e.normalized.isSuspended&&(t+=ur.sus),t}function or(e){let t=e.normalized.extensions,r=t[t.length-1];return r==="11"&&e.normalized.intents.major&&(r=Y(e.normalized.alterations,["b9","#9"])?"9":"7"),r||"7"}function _S(e){let t=xS(e.normalized.omits);if(qS(e))return t;let r=SS(e.normalized.quality,e.normalized.adds);return[...e.normalized.alterations,...r,...t]}function qS(e){return e.normalized.intents.alt&&e.normalized.quality===g.dom7}function SS(e,t){return t.filter(r=>!([g.ma6,g.mi6].includes(e)&&r==="9")).map((r,n)=>{let i="";return n===0&&(i+=ur.add,["b","#"].includes(r[0])&&(i+=" ")),i+=r==="7"?ur.add7:r,i})}function xS(e){return e.map((t,r)=>{let n="";return r===0&&(n+=ur.omit),n+=t==="b3"?"3":t,n})}var ze={flat:"\u266D",sharp:"\u266F"},kc={major:{0:"I",2:"II",3:`${ze.flat}III`,4:"III",5:"IV",7:"V",8:`${ze.flat}VI`,9:"VI",10:`${ze.flat}VII`,11:"VII"},minor:{0:"I",2:"II",3:"III",4:`${ze.sharp}III`,5:"IV",7:"V",8:"VI",9:`${ze.sharp}VI`,10:"VII",11:`${ze.sharp}VII`}};var T={sup2:"\xB2",sup4:"\u2074",sup5:"\u2075",sup6:"\u2076",sup7:"\u2077",sub3:"\u2083",sub4:"\u2084",sub5:"\u2085",flat:"\u266D",sharp:"\u266F"},lr={major:["I","ii","iii","IV","V","vi","vii\xB0"],dom7:["I\u0394",`ii${T.sup7}`,`iii${T.sup7}`,"IV\u0394",`V${T.sup7}`,`vi${T.sup7}`,"vii\xF8"],minor:["i","ii\xB0","III","iv","v","VI","VII"],minor7:[`i${T.sup7}`,"ii\xF8","III\u0394",`iv${T.sup7}`,`v${T.sup7}`,"VI\u0394","VII\u0394"]},cr={borrowedFromMinor:["i","ii\xB0",`${T.flat}III`,"iv","v",`${T.flat}VI`,`${T.flat}VII`],borrowedFromMinor7:[`i${T.sup7}`,"ii\xF8",`${T.flat}III\u0394`,`iv${T.sup7}`,`v${T.sup7}`,`${T.flat}VI\u0394`,`${T.flat}VII\u0394`],borrowedFromMajor:["I","ii",`${T.sharp}iii`,"IV","V",`${T.sharp}vi`,`${T.sharp}vii\xB0`],borrowedFromDom7:["I\u0394",`ii${T.sup7}`,`${T.sharp}iii${T.sup7}`,"IV\u0394",`V${T.sup7}`,`${T.sharp}vi${T.sup7}`,`${T.sharp}vii\xF8`]};function dn(e="",t){let r,n,i;e||(e=t.normalized.rootNote);let a=e.indexOf("m")>-1?"minor":"major",s=sr.includes(t.normalized.quality)?"minor":"major";r=AS(e,a,t,s);let u=CS(t),o=TS[t.normalized.quality](t,u);return n=`${r}${o}`,IS(a,n)?i="diatonic":OS(a,n)?i="borrowed":(i="unknown",r="?",n=`${r}${o}`),n+=u,t.numeral={symbol:n,degree:r,descriptor:o,inversion:u,type:i,thirdQuality:s},t}function AS(e,t,r,n){let i=e.replace("m",""),a=wS(i,r.normalized.rootNote),s=kc[t][a]||"?";return n==="minor"?s.toLowerCase():s}function wS(e,t){let r=ue.indexOf(ve[e]||e);return(ue.indexOf(ve[t]||t)-r+12)%12}var TS={[g.ma]:()=>"",[g.ma6]:()=>"",[g.ma7]:()=>"\u0394",[g.dom7]:(e,t)=>t===""?`${T.sup7}`:"",[g.mi]:()=>"",[g.mi6]:()=>"",[g.mi7]:(e,t)=>e.normalized.intervals.includes("b5")?"\xF8":t===""?`${T.sup7}`:"",[g.miMa7]:()=>"m\u0394",[g.aug]:()=>"+",[g.dim]:()=>"\xB0",[g.dim7]:(e,t)=>t===""?`\xB0${T.sup7}`:"\xB0",[g.power]:()=>"",[g.bass]:()=>""};function IS(e,t){return e==="major"?lr.major.includes(t)||lr.dom7.includes(t):lr.minor.includes(t)||lr.minor7.includes(t)}function OS(e,t){return e==="major"?cr.borrowedFromMinor.includes(t)||cr.borrowedFromMinor7.includes(t):cr.borrowedFromMajor.includes(t)||cr.borrowedFromDom7.includes(t)}function CS(e){let t="";return e.normalized.bassNote&&(ES(e)?t=Kc(e)?`${T.sup6}${T.sub5}`:`${T.sup6}`:jS(e)?t=Kc(e)?`${T.sup4}${T.sub3}`:`${T.sup6}${T.sub4}`:FS(e)&&(t="\xB2")),t}function Kc(e){return[g.ma7,g.mi7,g.miMa7,g.dom7,g.dim7].includes(e.normalized.quality)}function ES(e){return le(e,"b3")||le(e,"3")}function jS(e){return le(e,"b5")||le(e,"5")||le(e,"#5")}function FS(e){return le(e,"bb7")||le(e,"b7")||le(e,"7")}function le(e,t){let r=e.normalized.intervals.indexOf(t);if(r===-1)return!1;let n=ve[e.normalized.bassNote]||e.normalized.bassNote,i=ve[e.normalized.notes[r]]||e.normalized.notes[r];return n===i}function gn(e){let t=[DS,PS,NS,RS];return e.input.descriptor&&(e.input.parsableDescriptor=Q(t,e.input.descriptor)),e}function DS(e){return e.replace(/[A-LN-Za-z]+/g,t=>t.toLowerCase()).replace("oMit","omit").replace("diM","dim").replace("augMented","augmented")}function PS(e){return e.replace(/ /g,"")}function NS(e){return e.replace(/(7?dim)(alt|add)/g,"$1 $2").replace(/([m|M])(alt|add)/g,"$1 $2").replace(/i(no[35])/g,"i $1").replace(/([b♭#♯]9)6/g,"$1 6").replace(/(9\/?6)/g," $1").replaceAll("+5","#5").replaceAll("-5","b5")}function RS(e){let t,r,n;return e.replace(/\((.*?)\)/g,(i,a)=>(t=[],r="",a.split(",").forEach(s=>{n=!0,s.startsWith("add")?r="add":s.startsWith("omit")?r="omit":s.startsWith("no")?r="no":n=!1,n?t.push(s):t.push(r+s)})," "+t.join(" ")+" "))}var Hc=$(it());function bn(e={},t){return{input:{symbol:t},normalized:{},formatted:{},parserConfiguration:(0,Hc.default)(e)}}var MS={C:"flat",D:"sharp",E:"sharp",F:"flat",G:"sharp",A:"sharp",B:"sharp",Cm:"flat",Dm:"flat",Em:"sharp",Fm:"flat",Gm:"flat",Am:"flat",Bm:"sharp"};function Vc(e){return e.indexOf("#")>-1?"sharp":e.indexOf("b")>-1?"flat":MS[e]}function _e(e){let t=e.normalized.rootNote,r=e.normalized.semitones,n=e.normalized.quality,i=t;sr.includes(n)&&(i+="m");let a=Vc(i)==="sharp"?ue:uc,s=a.indexOf(t),u=[...a.slice(s),...a.slice(0,s),...a.slice(s),...a.slice(0,s)];return e.normalized.notes=r.map(o=>u[o]),e}function vn(e){return e.normalized.rootNote=Xt[e.input.rootNote],e.input.bassNote&&(e.normalized.bassNote=Xt[e.input.bassNote]),e}var pr=$(Xc()),lf=$($p()),cf=$(Tn()),En=$(of());function ft(e){let t=(0,pr.default)(e.normalized.intervals),r={quality:"",isSuspended:!1,extensions:[],alterations:[],adds:[],omits:[]};if(iw(t))r.quality=g.power;else if(aw(t))r.quality=g.bass;else{let n=ow(t,e.normalized.intents.major),i=sw(t,e.normalized.intents.major),{qualityIntervals:a,quality:s}=uw(t,e,i,n),u=hw(t,s),o=["1",...a,...u],{adds:c,alterations:p}=yw(t,o,s);r={...r,quality:s,isSuspended:i,extensions:u,alterations:p,adds:c,omits:n}}return{...e,normalized:{...e.normalized,...r}}}function iw(e){return ye(e,["1","5"])}function aw(e){return ye(e,["1"])}function sw(e,t){return e.includes("4")||e.includes("11")&&t&&!e.includes("3")}function ow(e,t){let r=[];return(Y(e,["b3","3","4","11"])||!t&&Y(e,["b3","4"]))&&r.push(t?"3":"b3"),Y(e,["b5","5","#5","b13"])&&r.push("5"),r}function uw(e,t,r,n){let i=lw(e,t,r,n),a=[{qualityIntervals:["b3"],quality:g.mi},{qualityIntervals:["b3","6"],quality:g.mi6},{qualityIntervals:["b3","7"],quality:g.miMa7},{qualityIntervals:["b3","b7"],quality:g.mi7},{qualityIntervals:["3"],quality:g.ma},{qualityIntervals:["3","6"],quality:g.ma6},{qualityIntervals:["3","7"],quality:g.ma7},{qualityIntervals:["3","b7"],quality:g.dom7},{qualityIntervals:["3","#5"],quality:g.aug},{qualityIntervals:["b3","b5"],quality:g.dim},{qualityIntervals:["b3","b5","bb7"],quality:g.dim7}].sort((s,u)=>u.qualityIntervals.length-s.qualityIntervals.length);return(0,lf.default)(a,s=>lt(i,s.qualityIntervals))}function lw(e,t,r,n){let i=[cw.bind(null,n),pw.bind(null,r,t.normalized.intents.major),fw.bind(null,t.normalized.intents.alt),cf.default];return Q(i,(0,pr.default)(e))}function cw(e,t){let r=(0,pr.default)(t);return e.includes("3")?r.push("3"):e.includes("b3")&&r.push("b3"),r}function pw(e,t,r){if(e){let n=(0,En.default)(r,"4");return n.push(t?"3":"b3"),n}return r}function fw(e,t){if(e){let r=(0,En.default)(t,"b5","#5");return r.push("5"),r}return t}function hw(e,t){let r=[];return mw(t)&&(dw(e,t)?r.push("9","11","13"):gw(e,t)?r.push("9","13"):bw(e)?r.push("9","11"):vw(e)&&r.push("9")),r}function mw(e){return[g.ma7,g.dom7,g.mi7,g.miMa7].includes(e)}function pf(e){return[g.mi7,g.miMa7].includes(e)}function dw(e,t){return pf(t)&&C(e,"13")&&C(e,["11","#11"])&&C(e,["b9","9","#9"])}function gw(e,t){return!pf(t)&&C(e,"13")&&C(e,["b9","9","#9"])}function bw(e){return C(e,"11")&&C(e,["b9","9","#9"])}function vw(e){return e.includes("9")}function yw(e,t,r){let n=[],i=[];return e.filter(a=>a!=="5"&&a!=="4").forEach(a=>{t.includes(a)||(_w(r,a)?i.push(a):n.push(a))}),qw(e)&&n.push("3"),{adds:uf(n),alterations:uf(i)}}function _w(e,t){return{[g.ma]:["b5","#5","#11","b13"],[g.ma6]:["b5","#5","#11","b13"],[g.ma7]:["b5","#5","#11","b13"],[g.dom7]:["b5","#5","b9","#9","#11","b13"],[g.mi]:["b5","#5","#11","b13"],[g.mi6]:["b5","#5","#11","b13"],[g.mi7]:["b5","#5","#11","b13"],[g.miMa7]:["b5","#5","#11","b13"],[g.aug]:[],[g.dim]:[],[g.dim7]:[]}[e].includes(t)}function qw(e){return lt(e,["3","4"])}function uf(e){return e.sort((t,r)=>{let n=Number.parseInt(t.replace(/[b#]/,"")),i=Number.parseInt(r.replace(/[b#]/,""));return n-i})}function jn(e,t){let{symbol:r}=t.input,n=e.join("|"),i=new RegExp("^("+n+")(.*?)(/("+n+"))?$"),a=r.match(i);if(a&&a[1])return t.input.rootNote=a[1],a[2]&&(t.input.descriptor=a[2]),a[4]&&(t.input.bassNote=a[4]),t;throw new Me(t)}var df=$(Tn());var m={ma:"ma",mi:"mi",dim:"dim",halfDim:"halfDim",aug:"aug",seventh:"seventh",sus:"sus",sus2:"sus2",ninth:"ninth",eleventh:"eleventh",thirteenth:"thirteenth",fifthFlat:"b5",fifthSharp:"#5",ninthFlat:"b9",ninthSharp:"#9",eleventhSharp:"#11",thirteenthFlat:"b13",add3:"add3",add4:"add4",addb6:"addb6",add6:"add6",add69:"add69",add7:"add7",add9:"add9",add11:"add11",add13:"add13",bass:"bass",omit3:"omit3",omit5:"omit5",power:"power",alt:"alt"},Fn={"^":[m.ma,m.add7],\u0394:[m.ma,m.add7],M:m.ma,Ma:m.ma,Maj:m.ma,Major:m.ma,ma:m.ma,maj:m.ma,major:m.ma},Sw=ff(Fn,m.add7,e=>e+"7"),xw=ff(Fn,m.add7,e=>"add"+e+"7"),Dn={...Fn,...Sw,"-":m.mi,m:m.mi,Mi:m.mi,Min:m.mi,Minor:m.mi,mi:m.mi,min:m.mi,minor:m.mi,"\xB0":m.dim,o:m.dim,0:m.dim,dim:m.dim,"dim.":m.dim,diminished:m.dim,\u00D8:m.halfDim,\u00F8:m.halfDim,h:m.halfDim,"+":m.aug,aug:m.aug,augmented:m.aug,7:m.seventh,4:m.sus,sus:m.sus,sus4:m.sus,suspended:m.sus,suspended4:m.sus,sus2:m.sus2,suspended2:m.sus2,9:m.ninth,11:m.eleventh,13:m.thirteenth,b3:m.mi,b5:m.fifthFlat,"\u266D5":m.fifthFlat,"#5":m.fifthSharp,"\u266F5":m.fifthSharp,b9:m.ninthFlat,"\u266D9":m.ninthFlat,addb9:m.ninthFlat,"add\u266D9":m.ninthFlat,"#9":m.ninthSharp,"\u266F9":m.ninthSharp,"add#9":m.ninthSharp,"add\u266F9":m.ninthSharp,"#11":m.eleventhSharp,"\u266F11":m.eleventhSharp,"add#11":m.eleventhSharp,b13:m.thirteenthFlat,"\u266D13":m.thirteenthFlat,addb13:m.thirteenthFlat,"add\u266D13":m.thirteenthFlat,...xw,2:m.add9,add2:m.add9,add3:m.add3,add4:m.add4,addb6:m.addb6,b6:m.addb6,6:m.add6,add6:m.add6,"6/9":m.add69,69:m.add69,96:m.add69,"9/6":m.add69,add9:m.add9,add11:m.add11,add13:m.add13,bass:m.bass,omit3:m.omit3,no3:m.omit3,omit5:m.omit5,no5:m.omit5,5:m.power,alt:m.alt,"alt.":m.alt,altered:m.alt};function ff(e,t,r){return Object.keys(e).map(r).reduce((n,i)=>(n[i]=t,n),{})}var hf=Object.keys(Dn).sort((e,t)=>t.length-e.length);var b=m;var Le={1:0,2:2,b3:3,3:4,4:5,b5:6,5:7,"#5":8,b6:8,6:9,bb7:9,b7:10,7:11,b9:13,9:14,"#9":15,11:17,"#11":18,b13:20,13:21};function Pn(e,t){let r=[];return t.input.parsableDescriptor&&(r=Aw(t)),t.input.modifiers=r,t.normalized.intervals=ww(r,e),t.normalized.semitones=Nw(t.normalized.intervals),t.normalized.intents=Rw(r),t}function Aw(e){let{parsableDescriptor:t}=e.input,r=[],n=new RegExp(hf.map(Pw).join("|"),"g"),i=t.match(n),a=t,s;if(i&&i.forEach(u=>{s=Dn[u],Array.isArray(s)||(s=[s]),s.forEach(o=>{r.includes(o)||(r.push(o),a=a.replace(u,""))})}),r.length===0)throw new Me(e);if(a.trim().length>0)throw new Zt(e,a);return r}function ww(e,t){return e.includes(b.power)?["1","5"]:e.includes(b.bass)?["1"]:(0,df.default)(["1",...Tw(e),...Iw(e),...Ow(e,t),...Cw(e),...Ew(e),...jw(e,t),...Fw(e,t),...Dw(e,t)]).sort((r,n)=>Le[r]-Le[n])}function Tw(e){let t=[];return e.includes(b.omit3)?[]:(C(e,[b.sus,b.sus2])||(Nn(e)?e.includes(b.eleventh)||t.push("3"):t.push("b3")),e.includes(b.add3)&&t.push("3"),t)}function Iw(e){let t=[];return C(e,[b.sus,b.add4])&&t.push("4"),t}function Ow(e,t){let r=[];return e.includes(b.omit5)?[]:((C(e,[b.dim,b.halfDim,b.fifthFlat])||$e(e,t,"b5"))&&r.push("b5"),(C(e,[b.aug,b.fifthSharp])||$e(e,t,"#5"))&&r.push("#5"),!r.length&&!e.includes(b.thirteenthFlat)&&r.push("5"),r)}function Cw(e){let t=[];return C(e,[b.addb6])&&t.push("b6"),C(e,[b.add6,b.add69])&&!gf(e)&&!C(e,[b.halfDim])&&t.push("6"),t}function Ew(e){let t=[];return C(e,[b.alt])&&t.push("b7"),C(e,[b.seventh,b.halfDim])?e.includes(b.dim)?t.push("bb7"):e.includes(b.halfDim)?t.push("b7"):t.push(mf(e)):C(e,[b.ninth,b.eleventh,b.thirteenth])&&t.push(mf(e)),e.includes(b.add7)&&t.push("7"),t}function mf(e){return e.includes(b.ma)?"7":"b7"}function jw(e,t){let r=[];return C(e,[b.add69,b.ninth,b.eleventh,b.thirteenth])&&Y(e,[b.ninthFlat,b.ninthSharp])&&r.push("9"),C(e,[b.sus2,b.add9])&&r.push("9"),(C(e,[b.ninthFlat])||$e(e,t,"b9"))&&r.push("b9"),(C(e,[b.ninthSharp])||$e(e,t,"#9"))&&r.push("#9"),r}function Fw(e,t){let r=[];return(C(e,[b.thirteenth])&&!Nn(e)||C(e,[b.eleventh,b.add11]))&&r.push("11"),(C(e,[b.eleventhSharp])||$e(e,t,"#11"))&&r.push("#11"),r}function Dw(e,t){let r=[];return(C(e,[b.add13,b.thirteenth])||C(e,[b.add6,b.add69])&&gf(e)||C(e,[b.add6,b.add69])&&C(e,[b.halfDim]))&&r.push("13"),(C(e,[b.thirteenthFlat])||$e(e,t,"b13"))&&r.push("b13"),r}function $e(e,t,r){return e.includes(b.alt)&&t.includes(r)}function Nn(e){return Y(e,[b.mi,b.dim,b.dim7,b.halfDim])}function gf(e){return C(e,[b.seventh,b.ninth,b.eleventh,b.thirteenth])}function Pw(e){return e.replace(/[.\-*+?^${}()|[\]\\]/g,"\\$&")}function Nw(e){return e.map(t=>Le[t]).sort((t,r)=>t-r)}function Rw(e){return{major:Nn(e),eleventh:e.includes(b.eleventh),alt:e.includes(b.alt)}}function Mw(e={}){let t=["b5","#5","b9","#9","#11","b13"],r=["english","german","latin"],{notationSystems:n=(0,fr.default)(r),altIntervals:i=(0,fr.default)(t),customFilters:a=[],key:s=""}=e;return zw(i,t),Lw(n,r),Kt(a),$w(s),u;function u(o){let c=[];if(!Gw(o)){let S=new Yt;c.push(Rn(S))}let p=(0,fr.default)(oc).filter(S=>n.includes(S.name)),f,v,q;if(!c.length)for(;p.length&&!f;){q=p.shift(),v=[bn.bind(null,e),jn.bind(null,q.notes),gn,Pn.bind(null,i),mn,vn,ft,pt,ct,_e,dn.bind(null,s),...a];try{f=Q(v,o),f?f.input.notationSystem=q.name:c.push(Bw(q.name))}catch(S){c.push(Rn(S,q.name))}}return f||{error:c}}}function zw(e,t){vf("altIntervals",e,t,!0)}function Lw(e,t){vf("notationSystems",e,t)}function vf(e,t,r,n){if(!Array.isArray(t))throw new TypeError(`'${e}' should be an array`);if(!n&&t.length===0)throw new TypeError(`'${e}' cannot be empty`);t.forEach(i=>{if(!r.includes(i))throw new TypeError(`'${i}' is not a valid value for ${e}`)})}function $w(e){if(e!==""&&(!(0,bf.default)(e)||!lc.includes(e)))throw new TypeError(`'${e}' is not a valid value for key`)}function Gw(e){return typeof e=="string"&&e.length>0}function Bw(e){let t=new Qt;return Rn(t,e)}function Rn(e,t){return{type:e.name,chord:e.chord,message:e.message,notationSystem:t}}var ht=Mw;var Tf=$(it());var re={sus2:"sus2",add2:"2",omit:"no",ma:"M",mi:"m",dim:"\xB0",aug7:"7+",eleventh:"11"};function Mn(e){let t,r=e.formatted.chordChanges;return Uw(e)?(t=re.sus2,r=[]):kw(e)?(t=re.add2,r=[]):Kw(e)?(t=re.aug7,r=[]):(t=e.formatted.descriptor.replace("mi",re.mi).replace(/[m|M]a/,re.ma).replace("dim",re.dim),Hw(e)&&(t=t.replace(/7sus|9sus/,re.eleventh))),r=r.map(n=>n.replace(/[m|M]a/,re.ma).replace("omit",re.omit)),{...e,formatted:{...e.formatted,descriptor:t,chordChanges:r}}}function Uw(e){return ye(e.normalized.intervals,["1","5","9"])}function kw(e){return ye(e.normalized.intervals,["1","3","5","9"])}function Kw(e){return ye(e.normalized.intervals,["1","3","#5","b7"])}function Hw(e){return e.normalized.intents.eleventh}var Sf=$(qf());function zn(e="none",t){if(e==="none")return t;let r={max:["4","b5","#5","6","bb7","b7","7","b9","9","#9","11","#11","b13","13"],core:["4","b9","9","#9","11","#11","b13","13"]},n=(0,Sf.default)(t.normalized.intervals,r[e]);return Y(n,["b3","3"])&&n.push(t.normalized.intents.major?"3":"b3"),Y(n,["b5","5","#5"])&&n.push("5"),t.normalized.intervals=n,t.normalized.semitones=n.map(a=>Le[a]),t.normalized.intents.eleventh=!1,t.normalized.intents.alt=!1,e==="max"&&delete t.normalized.bassNote,Q([ft,pt,_e],t)}function Ln(e,t,r){let{rootNote:n,bassNote:i}=r.normalized,a=Af(n);if(r.normalized.rootNote=xf(a,e,t),r.formatted.rootNote=r.normalized.rootNote,i){let s=Af(i);r.normalized.bassNote=xf(s,e,t),r.formatted.bassNote=r.normalized.bassNote}return _e(r)}function xf(e,t,r){let i=ue.indexOf(e)+t,a=Math.floor(i/12),s=i-a*12,u=ue[s];return r==="flat"&&un[u]||u}function Af(e){return ve[e]||e}var $n={german:{Ab:"As",A:"A","A#":"Ais",Bb:"Hes",B:"H",C:"C","C#":"Cis",Db:"Des",D:"D","D#":"Dis",Eb:"Es",E:"E",F:"F","F#":"Fis",Gb:"Ges",G:"G","G#":"Gis"},latin:{Ab:"Lab",A:"La","A#":"La#",Bb:"Sib",B:"Si",C:"Do","C#":"Do#",Db:"Reb",D:"Re","D#":"Re#",Eb:"Mib",E:"Mi",F:"Fa","F#":"Fa#",Gb:"Solb",G:"Sol","G#":"Sol#"}},Qw=Object.keys($n);function Gn(e="english",t){let r=e==="auto"?t.input.notationSystem:e;return r==="english"?t:Qw.includes(r)?(t.formatted.rootNote=$n[r][t.formatted.rootNote],t.formatted.bassNote&&(t.formatted.bassNote=$n[r][t.formatted.bassNote]),t):null}function mt(e){return e&&e.formatted&&e.formatted.symbol?e.formatted.symbol:null}var wf=$(it());function Bn(e){delete e.parserConfiguration.notationSystems;let t=(0,wf.default)(e),r=mt(e),i=ht(e.parserConfiguration)(r);return t.input=i.input,t}function Zw({accidental:e="original",customFilters:t=[],notationSystem:r="english",printer:n="text",simplify:i="none",transposeValue:a=0,useShortNamings:s=!1}={}){Kt(t);let u=[];return["max","core"].includes(i)&&u.push(zn.bind(null,i)),(e!=="original"||a!==0)&&u.push(Ln.bind(null,a,e)),s&&u.push(Mn),u.push(Gn.bind(null,r),ct,...t),o;function o(c){if(!Jw(c))return null;let p=Q(u,(0,Tf.default)(c));return n==="raw"?Bn(p):mt(p)}}var Jw=e=>e&&typeof e=="object"&&!e.error&&e.input,Un=Zw;var dt={name:"ireal-musicxml",version:"2.0.0",description:"iReal Pro to MusicXML converter.",author:"Karim Ratib (https://github.com/infojunkie)",license:"GPL-3.0-only",repository:{type:"git",url:"https://github.com/infojunkie/ireal-musicxml"},homepage:"https://github.com/infojunkie/ireal-musicxml",type:"module",main:"build/ireal-musicxml.js",types:"build/ireal-musicxml.d.ts",files:["LICENSE.txt","build/*"],scripts:{build:"esbuild src/lib/index.js --bundle --minify --sourcemap --outfile=build/ireal-musicxml.js && cp src/types/* build/",test:"npm run test:lint && npm run test:spec","test:spec":"node --test","test:typescript":"npm run build && ts-mocha test/**/*.spec.ts","test:lint":"eslint src --fix"},devDependencies:{"@xmldom/xmldom":"^0.8.0",esbuild:"0.24.0",eslint:"^9.13.0","sanitize-filename":"^1.6.3",typescript:"^4.3.2","validate-with-xmllint":"^1.2.0","xpath.js":"^1.1.0"},dependencies:{"chord-symbol":"^4.0.0","fast-diff":"^1.2.0",jstoxml:"^2.0.6",promise:"^8.1.0"}};var gt=class{static name=dt.name;static version=dt.version;static author=dt.author;static description=dt.description};var M=class{static Debug=0;static Info=1;static Warn=2;static Error=3;static None=4},If="4.0",Of=7,Cf=40,hr=class e{static defaultOptions={divisions:768,notation:"rhythmic",step:"B",octave:4,notehead:"slash",noteheadSize:"large",date:!0,clef:!1,keySignature:!1,pageWidth:210,pageHeight:297,pageMargin:15,logLevel:M.Warn};static sequenceAttributes=["divisions","key","time","staves","part-symbol","instruments","clef","staff-details","transpose","directive","measure-style"];static sequenceNote=["cue","pitch","rest","unpitched","duration","tie","voice","type","dot","accidental","time-modification","stem","notehead","notehead-text","staff","beam","notations","lyric","play"];static sequenceNotations=["accidental-mark","arpeggiate","articulations","dynamics","fermata","glissando","non-arpeggiate","ornaments","other-notation","slide","slur","technical","tied","tuplet"];static sequenceBarline=["bar-style","footnote","level","wavy-line","segno","coda","fermata","ending","repeat"];static mapAlter={"#":1,b:-1};static mapFifthsToAlters={sharp:["F","C","G","D","A","E","B"],flat:["B","E","A","D","G","C","F"]};static mapRepeats={"D.C. al Coda":e.prototype.convertDaCapo,"D.C. al Fine":e.prototype.convertDaCapo,"D.C. al 1st End.":e.prototype.convertDaCapo,"D.C. al 2nd End.":e.prototype.convertDaCapo,"D.C. al 3rd End.":e.prototype.convertDaCapo,"D.S. al Coda":e.prototype.convertDalSegno,"D.S. al Fine":e.prototype.convertDalSegno,"D.S. al 1st End.":e.prototype.convertDalSegno,"D.S. al 2nd End.":e.prototype.convertDalSegno,"D.S. al 3rd End.":e.prototype.convertDalSegno,Fine:e.prototype.convertFine,"3x":e.prototype.convertRepeatNx,"4x":e.prototype.convertRepeatNx,"5x":e.prototype.convertRepeatNx,"6x":e.prototype.convertRepeatNx,"7x":e.prototype.convertRepeatNx,"8x":e.prototype.convertRepeatNx};static convert(t,r={}){let n=Object.assign({},this.defaultOptions,r);return new e(t,n).convert()}constructor(t,r){this.song=t,this.options=r,this.time={beats:4,beatType:4},this.fifths=null,this.measure=null,this.barRepeat=0,this.codas=[],this.repeats=0,this.emptyCells=0,this.emptyCellNewSystem=!1,this.cellWidth=(this.options.pageWidth-2*this.options.pageMargin)/16,this.parseChord=ht({altIntervals:["b5","b9"]}),this.renderChord=Un({useShortNamings:!0,printer:"raw"})}convert(){return Ef.default.toXML(this.convertSong(),{header:` +(()=>{var bi=Object.create;var zr=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var xi=Object.getOwnPropertyNames;var Si=Object.getPrototypeOf,Ai=Object.prototype.hasOwnProperty;var vt=(s,p)=>()=>(p||s((p={exports:{}}).exports,p),p.exports);var Oi=(s,p,u,g)=>{if(p&&typeof p=="object"||typeof p=="function")for(let e of xi(p))!Ai.call(s,e)&&e!==u&&zr(s,e,{get:()=>p[e],enumerable:!(g=yi(p,e))||g.enumerable});return s};var Ie=(s,p,u)=>(u=s!=null?bi(Si(s)):{},Oi(p||!s||!s.__esModule?zr(u,"default",{value:s,enumerable:!0}):u,s));var ar=vt((is,Hr)=>{"use strict";Hr.exports=nr;function nr(s){_t.length||(De(),Br=!0),_t[_t.length]=s}var _t=[],Br=!1,De,Rt=0,Ti=1024;function Lr(){for(;Rt<_t.length;){var s=Rt;if(Rt=Rt+1,_t[s].call(),Rt>Ti){for(var p=0,u=_t.length-Rt;p{"use strict";var ji=ar();function Ne(){}var le=null,fe={};function Ci(s){try{return s.then}catch(p){return le=p,fe}}function Ei(s,p){try{return s(p)}catch(u){return le=u,fe}}function Fi(s,p,u){try{s(p,u)}catch(g){return le=g,fe}}Xr.exports=bt;function bt(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof s!="function")throw new TypeError("Promise constructor's argument is not a function");this._x=0,this._y=0,this._z=null,this._A=null,s!==Ne&&Wr(s,this)}bt._B=null;bt._C=null;bt._D=Ne;bt.prototype.then=function(s,p){if(this.constructor!==bt)return Ii(this,s,p);var u=new bt(Ne);return Pe(this,new Kr(s,p,u)),u};function Ii(s,p,u){return new s.constructor(function(g,e){var i=new bt(Ne);i.then(g,e),Pe(s,new Kr(p,u,i))})}function Pe(s,p){for(;s._y===3;)s=s._z;if(bt._B&&bt._B(s),s._y===0){if(s._x===0){s._x=1,s._A=p;return}if(s._x===1){s._x=2,s._A=[s._A,p];return}s._A.push(p);return}Di(s,p)}function Di(s,p){ji(function(){var u=s._y===1?p.onFulfilled:p.onRejected;if(u===null){s._y===1?ir(p.promise,s._z):ce(p.promise,s._z);return}var g=Ei(u,s._z);g===fe?ce(p.promise,le):ir(p.promise,g)})}function ir(s,p){if(p===s)return ce(s,new TypeError("A promise cannot be resolved with itself."));if(p&&(typeof p=="object"||typeof p=="function")){var u=Ci(p);if(u===fe)return ce(s,le);if(u===s.then&&p instanceof bt){s._y=3,s._z=p,sr(s);return}else if(typeof u=="function"){Wr(u.bind(p),s);return}}s._y=1,s._z=p,sr(s)}function ce(s,p){s._y=2,s._z=p,bt._C&&bt._C(s,p),sr(s)}function sr(s){if(s._x===1&&(Pe(s,s._A),s._A=null),s._x===2){for(var p=0;p{"use strict";var Vr=kt();Yr.exports=Vr;Vr.prototype.done=function(s,p){var u=arguments.length?this.then.apply(this,arguments):this;u.then(null,function(g){setTimeout(function(){throw g},0)})}});var Jr=vt((us,Qr)=>{"use strict";var Re=kt();Qr.exports=Re;Re.prototype.finally=function(s){return this.then(function(p){return Re.resolve(s()).then(function(){return p})},function(p){return Re.resolve(s()).then(function(){throw p})})}});var en=vt((cs,tn)=>{"use strict";var k=kt();tn.exports=k;var Pi=qt(!0),Ni=qt(!1),Ri=qt(null),_i=qt(void 0),Mi=qt(0),zi=qt("");function qt(s){var p=new k(k._D);return p._y=1,p._z=s,p}k.resolve=function(s){if(s instanceof k)return s;if(s===null)return Ri;if(s===void 0)return _i;if(s===!0)return Pi;if(s===!1)return Ni;if(s===0)return Mi;if(s==="")return zi;if(typeof s=="object"||typeof s=="function")try{var p=s.then;if(typeof p=="function")return new k(p.bind(s))}catch(u){return new k(function(g,e){e(u)})}return qt(s)};var pe=function(s){return typeof Array.from=="function"?(pe=Array.from,Array.from(s)):(pe=function(p){return Array.prototype.slice.call(p)},Array.prototype.slice.call(s))};k.all=function(s){var p=pe(s);return new k(function(u,g){if(p.length===0)return u([]);var e=p.length;function i(a,n){if(n&&(typeof n=="object"||typeof n=="function"))if(n instanceof k&&n.then===k.prototype.then){for(;n._y===3;)n=n._z;if(n._y===1)return i(a,n._z);n._y===2&&g(n._z),n.then(function(h){i(a,h)},g);return}else{var o=n.then;if(typeof o=="function"){var l=new k(o.bind(n));l.then(function(h){i(a,h)},g);return}}p[a]=n,--e===0&&u(p)}for(var t=0;t{"use strict";var rn=ar(),_e=[],ur=[],Gi=rn.makeRequestCallFromTimer(Bi);function Bi(){if(ur.length)throw ur.shift()}an.exports=cr;function cr(s){var p;_e.length?p=_e.pop():p=new nn,p.task=s,rn(p)}function nn(){this.task=null}nn.prototype.call=function(){try{this.task.call()}catch(s){cr.onerror?cr.onerror(s):(ur.push(s),Gi())}finally{this.task=null,_e[_e.length]=this}}});var cn=vt((fs,un)=>{"use strict";var te=kt(),lr=sn();un.exports=te;te.denodeify=function(s,p){return typeof p=="number"&&p!==1/0?$i(s,p):Ui(s)};var on="function (err, res) {if (err) { rj(err); } else { rs(res); }}";function $i(s,p){for(var u=[],g=0;g "+p+") {","args = new Array(arguments.length + 1);","for (var i = 0; i < arguments.length; i++) {","args[i] = arguments[i];","}","}","return new Promise(function (rs, rj) {","var cb = "+on+";","var res;","switch (argLength) {",u.concat(["extra"]).map(function(i,t){return"case "+t+":res = fn.call("+["self"].concat(u.slice(0,t)).concat("cb").join(",")+");break;"}).join(""),"default:","args[argLength] = cb;","res = fn.apply(self, args);","}","if (res &&",'(typeof res === "object" || typeof res === "function") &&','typeof res.then === "function"',") {rs(res);}","});","};"].join("");return Function(["Promise","fn"],e)(te,s)}te.nodeify=function(s){return function(){var p=Array.prototype.slice.call(arguments),u=typeof p[p.length-1]=="function"?p.pop():null,g=this;try{return s.apply(this,arguments).nodeify(u,g)}catch(e){if(u===null||typeof u>"u")return new te(function(i,t){t(e)});lr(function(){u.call(g,e)})}}};te.prototype.nodeify=function(s,p){if(typeof s!="function")return this;this.then(function(u){lr(function(){s.call(p,null,u)})},function(u){lr(function(){s.call(p,u)})})}});var fn=vt((ps,ln)=>{"use strict";var pt=kt();ln.exports=pt;pt.enableSynchronous=function(){pt.prototype.isPending=function(){return this.getState()==0},pt.prototype.isFulfilled=function(){return this.getState()==1},pt.prototype.isRejected=function(){return this.getState()==2},pt.prototype.getValue=function(){if(this._y===3)return this._z.getValue();if(!this.isFulfilled())throw new Error("Cannot get a value of an unfulfilled promise.");return this._z},pt.prototype.getReason=function(){if(this._y===3)return this._z.getReason();if(!this.isRejected())throw new Error("Cannot get a rejection reason of a non-rejected promise.");return this._z},pt.prototype.getState=function(){return this._y===3?this._z.getState():this._y===-1||this._y===-2?0:this._y}};pt.disableSynchronous=function(){pt.prototype.isPending=void 0,pt.prototype.isFulfilled=void 0,pt.prototype.isRejected=void 0,pt.prototype.getValue=void 0,pt.prototype.getReason=void 0,pt.prototype.getState=void 0}});var hn=vt((hs,pn)=>{"use strict";pn.exports=kt();Zr();Jr();en();cn();fn()});var mn=vt((ds,dn)=>{"use strict";dn.exports=hn()});var jn=vt((ms,wn)=>{var yt=-1,ht=1,it=0;function Se(s,p,u,g,e){if(s===p)return s?[[it,s]]:[];if(u!=null){var i=Ji(s,p,u);if(i)return i}var t=pr(s,p),a=s.substring(0,t);s=s.substring(t),p=p.substring(t),t=Me(s,p);var n=s.substring(s.length-t);s=s.substring(0,s.length-t),p=p.substring(0,p.length-t);var o=Hi(s,p);return a&&o.unshift([it,a]),n&&o.push([it,n]),hr(o,e),g&&Xi(o),o}function Hi(s,p){var u;if(!s)return[[ht,p]];if(!p)return[[yt,s]];var g=s.length>p.length?s:p,e=s.length>p.length?p:s,i=g.indexOf(e);if(i!==-1)return u=[[ht,g.substring(0,i)],[it,e],[ht,g.substring(i+e.length)]],s.length>p.length&&(u[0][0]=u[2][0]=yt),u;if(e.length===1)return[[yt,s],[ht,p]];var t=Wi(s,p);if(t){var a=t[0],n=t[1],o=t[2],l=t[3],h=t[4],c=Se(a,o),m=Se(n,l);return c.concat([[it,h]],m)}return Ki(s,p)}function Ki(s,p){for(var u=s.length,g=p.length,e=Math.ceil((u+g)/2),i=e,t=2*e,a=new Array(t),n=new Array(t),o=0;ou)m+=2;else if(E>g)c+=2;else if(h){var _=i+l-S;if(_>=0&&_=F)return gn(s,p,j,E)}}}for(var I=-y+v;I<=y-x;I+=2){var _=i+I,F;I===-y||I!==y&&n[_-1]u)x+=2;else if(z>g)v+=2;else if(!h){var A=i+l-I;if(A>=0&&A=F)return gn(s,p,j,E)}}}}return[[yt,s],[ht,p]]}function gn(s,p,u,g){var e=s.substring(0,u),i=p.substring(0,g),t=s.substring(u),a=p.substring(g),n=Se(e,i),o=Se(t,a);return n.concat(o)}function pr(s,p){if(!s||!p||s.charAt(0)!==p.charAt(0))return 0;for(var u=0,g=Math.min(s.length,p.length),e=g,i=0;ug?s=s.substring(u-g):up.length?s:p,g=s.length>p.length?p:s;if(u.length<4||g.length*2=m.length?[j,E,_,F,A]:null}var i=e(u,g,Math.ceil(u.length/4)),t=e(u,g,Math.ceil(u.length/2)),a;if(!i&&!t)return null;t?i?a=i[4].length>t[4].length?i:t:a=t:a=i;var n,o,l,h;s.length>p.length?(n=a[0],o=a[1],l=a[2],h=a[3]):(l=a[0],h=a[1],n=a[2],o=a[3]);var c=a[4];return[n,o,l,h,c]}function Xi(s){for(var p=!1,u=[],g=0,e=null,i=0,t=0,a=0,n=0,o=0;i0?u[g-1]:-1,t=0,a=0,n=0,o=0,e=null,p=!0)),i++;for(p&&hr(s),Zi(s),i=1;i=m?(c>=l.length/2||c>=h.length/2)&&(s.splice(i,0,[it,h.substring(0,c)]),s[i-1][1]=l.substring(0,l.length-c),s[i+1][1]=h.substring(c),i++):(m>=l.length/2||m>=h.length/2)&&(s.splice(i,0,[it,l.substring(0,m)]),s[i-1][0]=ht,s[i-1][1]=h.substring(0,h.length-m),s[i+1][0]=yt,s[i+1][1]=l.substring(m),i++),i++}i++}}var bn=/[^a-zA-Z0-9]/,yn=/\s/,xn=/[\r\n]/,Vi=/\n\r?\n$/,Yi=/^\r?\n\r?\n/;function Zi(s){function p(m,v){if(!m||!v)return 6;var x=m.charAt(m.length-1),y=v.charAt(0),S=x.match(bn),A=y.match(bn),j=S&&x.match(yn),E=A&&y.match(yn),_=j&&x.match(xn),F=E&&y.match(xn),I=_&&m.match(Vi),z=F&&v.match(Yi);return I||z?5:_||F?4:S&&!j&&E?3:j||E?2:S||A?1:0}for(var u=1;u=h&&(h=c,n=g,o=e,l=i)}s[u-1][1]!=n&&(n?s[u-1][1]=n:(s.splice(u-1,1),u--),s[u][1]=o,l?s[u+1][1]=l:(s.splice(u+1,1),u--))}u++}}function hr(s,p){s.push([it,""]);for(var u=0,g=0,e=0,i="",t="",a;u=0&&Tn(s[n][1])){var o=s[n][1].slice(-1);if(s[n][1]=s[n][1].slice(0,-1),i=o+i,t=o+t,!s[n][1]){s.splice(n,1),u--;var l=n-1;s[l]&&s[l][0]===ht&&(e++,t=s[l][1]+t,l--),s[l]&&s[l][0]===yt&&(g++,i=s[l][1]+i,l--),n=l}}if(On(s[u][1])){var o=s[u][1].charAt(0);s[u][1]=s[u][1].slice(1),i+=o,t+=o}}if(u0||t.length>0){i.length>0&&t.length>0&&(a=pr(t,i),a!==0&&(n>=0?s[n][1]+=t.substring(0,a):(s.splice(0,0,[it,t.substring(0,a)]),u++),t=t.substring(a),i=i.substring(a)),a=Me(t,i),a!==0&&(s[u][1]=t.substring(t.length-a)+s[u][1],t=t.substring(0,t.length-a),i=i.substring(0,i.length-a)));var h=e+g;i.length===0&&t.length===0?(s.splice(u-h,h),u=u-h):i.length===0?(s.splice(u-h,h,[ht,t]),u=u-h+1):t.length===0?(s.splice(u-h,h,[yt,i]),u=u-h+1):(s.splice(u-h,h,[yt,i],[ht,t]),u=u-h+2)}u!==0&&s[u-1][0]===it?(s[u-1][1]+=s[u][1],s.splice(u,1)):u++,e=0,g=0,i="",t="";break}}s[s.length-1][1]===""&&s.pop();var c=!1;for(u=1;u=55296&&s<=56319}function An(s){return s>=56320&&s<=57343}function On(s){return An(s.charCodeAt(0))}function Tn(s){return Sn(s.charCodeAt(s.length-1))}function Qi(s){for(var p=[],u=0;u0&&p.push(s[u]);return p}function fr(s,p,u,g){return Tn(s)||On(g)?null:Qi([[it,s],[yt,p],[ht,u],[it,g]])}function Ji(s,p,u){var g=typeof u=="number"?{index:u,length:0}:u.oldRange,e=typeof u=="number"?null:u.newRange,i=s.length,t=p.length;if(g.length===0&&(e===null||e.length===0)){var a=g.index,n=s.slice(0,a),o=s.slice(a),l=e?e.index:null;t:{var h=a+t-i;if(l!==null&&l!==h||h<0||h>t)break t;var c=p.slice(0,h),m=p.slice(h);if(m!==o)break t;var v=Math.min(a,h),x=n.slice(0,v),y=c.slice(0,v);if(x!==y)break t;var S=n.slice(v),A=c.slice(v);return fr(x,S,A,o)}t:{if(l!==null&&l!==a)break t;var j=a,c=p.slice(0,j),m=p.slice(j);if(c!==n)break t;var E=Math.min(i-j,t-j),_=o.slice(o.length-E),F=m.slice(m.length-E);if(_!==F)break t;var S=o.slice(0,o.length-E),A=m.slice(0,m.length-E);return fr(n,S,A,_)}}if(g.length>0&&e&&e.length===0)t:{var x=s.slice(0,g.index),_=s.slice(g.index+g.length),v=x.length,E=_.length;if(t{(function(s,p){if(typeof define=="function"&&define.amd)define(["exports"],p);else if(typeof Be<"u")p(Be);else{var u={exports:{}};p(u.exports),s.jstoxml=u.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Be,function(s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.toXML=s.default=void 0;function p(P){return i(P)||e(P)||g(P)||u()}function u(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(P,O){if(P){if(typeof P=="string")return t(P,O);var D=Object.prototype.toString.call(P).slice(8,-1);if(D==="Object"&&P.constructor&&(D=P.constructor.name),D==="Map"||D==="Set")return Array.from(P);if(D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D))return t(P,O)}}function e(P){if(typeof Symbol<"u"&&P[Symbol.iterator]!=null||P["@@iterator"]!=null)return Array.from(P)}function i(P){if(Array.isArray(P))return t(P)}function t(P,O){(O==null||O>P.length)&&(O=P.length);for(var D=0,Y=new Array(O);D0&&arguments[0]!==void 0?arguments[0]:"",D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return O.repeat(D)},F=function(O){return Array.isArray(O)&&h||l(O)===y&&O!==null&&O._name&&S||O instanceof Date&&m||O===null&&v||l(O)},I=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof O!="string")return O;var Y=new RegExp("(".concat(Object.keys(D).join("|"),")(?!(\\w|#)*;)"),"g");return String(O).replace(Y,function(at,et){return D[et]||""})},z=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=arguments.length>1?arguments[1]:void 0,Y=[];if(Array.isArray(O))Y=O.map(function(et){var mt=Object.keys(et)[0],Tt=et[mt],Mt=D?I(Tt,D):Tt,Ut=Mt===!0?"":'="'.concat(Mt,'"');return"".concat(mt).concat(Ut)});else{var at=Object.keys(O);Y=at.map(function(et){var mt=D?I(O[et],D):O[et],Tt=O[et]===!0?"":'="'.concat(mt,'"');return"".concat(et).concat(Tt)})}return Y},M=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=arguments.length>1?arguments[1]:void 0,Y=z(O,D);if(Y.length===0)return"";var at=Y.join(" ");return" ".concat(at)},H=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(O).map(function(D){return{_name:D,_content:O[D]}})},L=[A,x,c],X=function(O){return L.includes(F(O))},$=[].concat(L,[m,S]),U=function(O){return $.includes(F(O))},Q=function(O){return!O.match("<")},V='',st=function(O){var D=O.header,Y=O.indent,at=O.isOutputStart,et=D&&at;if(!et)return"";var mt=l(D)===c;return mt?V:D},G={"<":"<",">":">","&":"&"},q=function P(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=D.depth,at=Y===void 0?0:Y,et=D.indent,mt=D._isFirstItem,Tt=D._isOutputStart,Mt=Tt===void 0?!0:Tt,Ut=D.header,Ht=D.attributesFilter,Kt=Ht===void 0?{}:Ht,re=D.filter,wt=re===void 0?{}:re,W=typeof Kt=="boolean"&&!Kt,Wt=W?{}:n(n(n({},G),{'"':"""}),Kt),xt=typeof wt=="boolean"&&!wt,Xt=xt?{}:n(n({},G),wt),ne=_(et,at),he=F(O),Vt=st({header:Ut,indent:et,depth:at,isOutputStart:Mt}),T=Mt&&!Vt&&mt&&at===0,ft="";switch(he){case"special-object":{var K=O._name,Z=O._content;if(Z===null){ft=K;break}var St=Array.isArray(Z)&&Z.every(X);if(St){var de=Z.map(function(lt){return P({_name:K,_content:lt},n(n({},D),{},{depth:at,_isOutputStart:!1}))});return de.join("")}if(K.match(E))break;var jt=P(Z,n(n({},D),{},{depth:at+1,_isOutputStart:T})),At=F(jt),ut=Q(jt),It=et&&!T?` +`:"",rt="".concat(It).concat(ne);if(K==="_comment"){ft+="".concat(rt,"");break}var ae=At==="undefined"||jt==="",Dt=l(O._selfCloseTag)===c?ae&&O._selfCloseTag:ae,Ct=Dt?"/":"",ie=M(O._attrs,Wt),zt="<".concat(K).concat(ie).concat(Ct,">"),me=et&&!ut?` +`.concat(ne):"",se=Dt?"":"".concat(jt).concat(me,"");ft+="".concat(rt).concat(zt).concat(se);break}case"object":{var gt=Object.keys(O),Et=gt.map(function(lt,Yt){var ge=n(n({},D),{},{_isFirstItem:Yt===0,_isLastItem:Yt+1===gt.length,_isOutputStart:T}),Zt={_name:lt};if(F(O[lt])==="object"){j.forEach(function(ve){var je=O[lt][ve];typeof je<"u"&&(Zt[ve]=je,delete O[lt][ve])});var nt=typeof O[lt]._content<"u";if(nt&&Object.keys(O[lt]).length>1){var Qt=Object.assign({},O[lt]);delete Qt._content,Zt._content=[].concat(p(H(Qt)),[O[lt]._content])}}typeof Zt._content>"u"&&(Zt._content=O[lt]);var Ke=P(Zt,ge,lt);return Ke},D);ft=Et.join("");break}case"function":{var Ue=O(D);ft=P(Ue,D);break}case"array":{var He=O.map(function(lt,Yt){var ge=n(n({},D),{},{_isFirstItem:Yt===0,_isLastItem:Yt+1===O.length,_isOutputStart:T});return P(lt,ge)});ft=He.join("");break}default:{ft=I(O,Xt);break}}return"".concat(Vt).concat(ft)};s.toXML=q;var ot={toXML:q};s.default=ot})});var Fn=vt((Oe,dr)=>{(function(p,u){typeof Oe=="object"&&typeof dr=="object"?dr.exports=u():typeof define=="function"&&define.amd?define([],u):typeof Oe=="object"?Oe["chord-symbol"]=u():p["chord-symbol"]=u()})(typeof self<"u"?self:Oe,function(){return(()=>{var s={8552:(e,i,t)=>{var a=t(852),n=t(5639),o=a(n,"DataView");e.exports=o},1989:(e,i,t)=>{var a=t(1789),n=t(401),o=t(7667),l=t(1327),h=t(1866);function c(m){var v=-1,x=m==null?0:m.length;for(this.clear();++v{var a=t(7040),n=t(4125),o=t(2117),l=t(7518),h=t(4705);function c(m){var v=-1,x=m==null?0:m.length;for(this.clear();++v{var a=t(852),n=t(5639),o=a(n,"Map");e.exports=o},3369:(e,i,t)=>{var a=t(4785),n=t(1285),o=t(6e3),l=t(9916),h=t(5265);function c(m){var v=-1,x=m==null?0:m.length;for(this.clear();++v{var a=t(852),n=t(5639),o=a(n,"Promise");e.exports=o},8525:(e,i,t)=>{var a=t(852),n=t(5639),o=a(n,"Set");e.exports=o},8668:(e,i,t)=>{var a=t(3369),n=t(619),o=t(2385);function l(h){var c=-1,m=h==null?0:h.length;for(this.__data__=new a;++c{var a=t(8407),n=t(7465),o=t(3779),l=t(7599),h=t(4758),c=t(4309);function m(v){var x=this.__data__=new a(v);this.size=x.size}m.prototype.clear=n,m.prototype.delete=o,m.prototype.get=l,m.prototype.has=h,m.prototype.set=c,e.exports=m},2705:(e,i,t)=>{var a=t(5639),n=a.Symbol;e.exports=n},1149:(e,i,t)=>{var a=t(5639),n=a.Uint8Array;e.exports=n},577:(e,i,t)=>{var a=t(852),n=t(5639),o=a(n,"WeakMap");e.exports=o},6874:e=>{function i(t,a,n){switch(n.length){case 0:return t.call(a);case 1:return t.call(a,n[0]);case 2:return t.call(a,n[0],n[1]);case 3:return t.call(a,n[0],n[1],n[2])}return t.apply(a,n)}e.exports=i},7412:e=>{function i(t,a){for(var n=-1,o=t==null?0:t.length;++n{function i(t,a){for(var n=-1,o=t==null?0:t.length,l=0,h=[];++n{var a=t(2118);function n(o,l){var h=o==null?0:o.length;return!!h&&a(o,l,0)>-1}e.exports=n},1196:e=>{function i(t,a,n){for(var o=-1,l=t==null?0:t.length;++o{var a=t(2545),n=t(5694),o=t(1469),l=t(4144),h=t(5776),c=t(6719),m=Object.prototype,v=m.hasOwnProperty;function x(y,S){var A=o(y),j=!A&&n(y),E=!A&&!j&&l(y),_=!A&&!j&&!E&&c(y),F=A||j||E||_,I=F?a(y.length,String):[],z=I.length;for(var M in y)(S||v.call(y,M))&&!(F&&(M=="length"||E&&(M=="offset"||M=="parent")||_&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||h(M,z)))&&I.push(M);return I}e.exports=x},9932:e=>{function i(t,a){for(var n=-1,o=t==null?0:t.length,l=Array(o);++n{function i(t,a){for(var n=-1,o=a.length,l=t.length;++n{function i(t,a){for(var n=-1,o=t==null?0:t.length;++n{var a=t(9465),n=t(7813),o=Object.prototype,l=o.hasOwnProperty;function h(c,m,v){var x=c[m];(!(l.call(c,m)&&n(x,v))||v===void 0&&!(m in c))&&a(c,m,v)}e.exports=h},8470:(e,i,t)=>{var a=t(7813);function n(o,l){for(var h=o.length;h--;)if(a(o[h][0],l))return h;return-1}e.exports=n},4037:(e,i,t)=>{var a=t(8363),n=t(3674);function o(l,h){return l&&a(h,n(h),l)}e.exports=o},3886:(e,i,t)=>{var a=t(8363),n=t(1704);function o(l,h){return l&&a(h,n(h),l)}e.exports=o},9465:(e,i,t)=>{var a=t(8777);function n(o,l,h){l=="__proto__"&&a?a(o,l,{configurable:!0,enumerable:!0,value:h,writable:!0}):o[l]=h}e.exports=n},5990:(e,i,t)=>{var a=t(6384),n=t(7412),o=t(4865),l=t(4037),h=t(3886),c=t(4626),m=t(278),v=t(8805),x=t(1911),y=t(8234),S=t(6904),A=t(4160),j=t(3824),E=t(9148),_=t(8517),F=t(1469),I=t(4144),z=t(6688),M=t(3218),H=t(2928),L=t(3674),X=t(1704),$=1,U=2,Q=4,V="[object Arguments]",st="[object Array]",G="[object Boolean]",q="[object Date]",ot="[object Error]",P="[object Function]",O="[object GeneratorFunction]",D="[object Map]",Y="[object Number]",at="[object Object]",et="[object RegExp]",mt="[object Set]",Tt="[object String]",Mt="[object Symbol]",Ut="[object WeakMap]",Ht="[object ArrayBuffer]",Kt="[object DataView]",re="[object Float32Array]",wt="[object Float64Array]",W="[object Int8Array]",Wt="[object Int16Array]",xt="[object Int32Array]",Xt="[object Uint8Array]",ne="[object Uint8ClampedArray]",he="[object Uint16Array]",Vt="[object Uint32Array]",T={};T[V]=T[st]=T[Ht]=T[Kt]=T[G]=T[q]=T[re]=T[wt]=T[W]=T[Wt]=T[xt]=T[D]=T[Y]=T[at]=T[et]=T[mt]=T[Tt]=T[Mt]=T[Xt]=T[ne]=T[he]=T[Vt]=!0,T[ot]=T[P]=T[Ut]=!1;function ft(K,Z,St,de,jt,At){var ut,It=Z&$,rt=Z&U,ae=Z&Q;if(St&&(ut=jt?St(K,de,jt,At):St(K)),ut!==void 0)return ut;if(!M(K))return K;var Dt=F(K);if(Dt){if(ut=j(K),!It)return m(K,ut)}else{var Ct=A(K),ie=Ct==P||Ct==O;if(I(K))return c(K,It);if(Ct==at||Ct==V||ie&&!jt){if(ut=rt||ie?{}:_(K),!It)return rt?x(K,h(ut,K)):v(K,l(ut,K))}else{if(!T[Ct])return jt?K:{};ut=E(K,Ct,It)}}At||(At=new a);var zt=At.get(K);if(zt)return zt;At.set(K,ut),H(K)?K.forEach(function(gt){ut.add(ft(gt,Z,St,gt,K,At))}):z(K)&&K.forEach(function(gt,Et){ut.set(Et,ft(gt,Z,St,Et,K,At))});var me=ae?rt?S:y:rt?X:L,se=Dt?void 0:me(K);return n(se||K,function(gt,Et){se&&(Et=gt,gt=K[Et]),o(ut,Et,ft(gt,Z,St,Et,K,At))}),ut}e.exports=ft},3118:(e,i,t)=>{var a=t(3218),n=Object.create,o=function(){function l(){}return function(h){if(!a(h))return{};if(n)return n(h);l.prototype=h;var c=new l;return l.prototype=void 0,c}}();e.exports=o},731:(e,i,t)=>{var a=t(8668),n=t(7443),o=t(1196),l=t(9932),h=t(1717),c=t(4757),m=200;function v(x,y,S,A){var j=-1,E=n,_=!0,F=x.length,I=[],z=y.length;if(!F)return I;S&&(y=l(y,h(S))),A?(E=o,_=!1):y.length>=m&&(E=c,_=!1,y=new a(y));t:for(;++j{function i(t,a,n,o){for(var l=t.length,h=n+(o?1:-1);o?h--:++h{var a=t(2488),n=t(7285);function o(l,h,c,m,v){var x=-1,y=l.length;for(c||(c=n),v||(v=[]);++x0&&c(S)?h>1?o(S,h-1,c,m,v):a(v,S):m||(v[v.length]=S)}return v}e.exports=o},8483:(e,i,t)=>{var a=t(5063),n=a();e.exports=n},7816:(e,i,t)=>{var a=t(8483),n=t(3674);function o(l,h){return l&&a(l,h,n)}e.exports=o},7786:(e,i,t)=>{var a=t(1811),n=t(327);function o(l,h){h=a(h,l);for(var c=0,m=h.length;l!=null&&c{var a=t(2488),n=t(1469);function o(l,h,c){var m=h(l);return n(l)?m:a(m,c(l))}e.exports=o},4239:(e,i,t)=>{var a=t(2705),n=t(9607),o=t(2333),l="[object Null]",h="[object Undefined]",c=a?a.toStringTag:void 0;function m(v){return v==null?v===void 0?h:l:c&&c in Object(v)?n(v):o(v)}e.exports=m},13:e=>{function i(t,a){return t!=null&&a in Object(t)}e.exports=i},2118:(e,i,t)=>{var a=t(1848),n=t(2722),o=t(2351);function l(h,c,m){return c===c?o(h,c,m):a(h,n,m)}e.exports=l},8975:(e,i,t)=>{var a=t(7816);function n(o,l,h,c){return a(o,function(m,v,x){l(c,h(m),v,x)}),c}e.exports=n},9454:(e,i,t)=>{var a=t(4239),n=t(7005),o="[object Arguments]";function l(h){return n(h)&&a(h)==o}e.exports=l},939:(e,i,t)=>{var a=t(2492),n=t(7005);function o(l,h,c,m,v){return l===h?!0:l==null||h==null||!n(l)&&!n(h)?l!==l&&h!==h:a(l,h,c,m,o,v)}e.exports=o},2492:(e,i,t)=>{var a=t(6384),n=t(7114),o=t(8351),l=t(6096),h=t(4160),c=t(1469),m=t(4144),v=t(6719),x=1,y="[object Arguments]",S="[object Array]",A="[object Object]",j=Object.prototype,E=j.hasOwnProperty;function _(F,I,z,M,H,L){var X=c(F),$=c(I),U=X?S:h(F),Q=$?S:h(I);U=U==y?A:U,Q=Q==y?A:Q;var V=U==A,st=Q==A,G=U==Q;if(G&&m(F)){if(!m(I))return!1;X=!0,V=!1}if(G&&!V)return L||(L=new a),X||v(F)?n(F,I,z,M,H,L):o(F,I,U,z,M,H,L);if(!(z&x)){var q=V&&E.call(F,"__wrapped__"),ot=st&&E.call(I,"__wrapped__");if(q||ot){var P=q?F.value():F,O=ot?I.value():I;return L||(L=new a),H(P,O,z,M,L)}}return G?(L||(L=new a),l(F,I,z,M,H,L)):!1}e.exports=_},5588:(e,i,t)=>{var a=t(4160),n=t(7005),o="[object Map]";function l(h){return n(h)&&a(h)==o}e.exports=l},2958:(e,i,t)=>{var a=t(6384),n=t(939),o=1,l=2;function h(c,m,v,x){var y=v.length,S=y,A=!x;if(c==null)return!S;for(c=Object(c);y--;){var j=v[y];if(A&&j[2]?j[1]!==c[j[0]]:!(j[0]in c))return!1}for(;++y{function i(t){return t!==t}e.exports=i},8458:(e,i,t)=>{var a=t(3560),n=t(5346),o=t(3218),l=t(346),h=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,m=Function.prototype,v=Object.prototype,x=m.toString,y=v.hasOwnProperty,S=RegExp("^"+x.call(y).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function A(j){if(!o(j)||n(j))return!1;var E=a(j)?S:c;return E.test(l(j))}e.exports=A},9221:(e,i,t)=>{var a=t(4160),n=t(7005),o="[object Set]";function l(h){return n(h)&&a(h)==o}e.exports=l},8749:(e,i,t)=>{var a=t(4239),n=t(1780),o=t(7005),l="[object Arguments]",h="[object Array]",c="[object Boolean]",m="[object Date]",v="[object Error]",x="[object Function]",y="[object Map]",S="[object Number]",A="[object Object]",j="[object RegExp]",E="[object Set]",_="[object String]",F="[object WeakMap]",I="[object ArrayBuffer]",z="[object DataView]",M="[object Float32Array]",H="[object Float64Array]",L="[object Int8Array]",X="[object Int16Array]",$="[object Int32Array]",U="[object Uint8Array]",Q="[object Uint8ClampedArray]",V="[object Uint16Array]",st="[object Uint32Array]",G={};G[M]=G[H]=G[L]=G[X]=G[$]=G[U]=G[Q]=G[V]=G[st]=!0,G[l]=G[h]=G[I]=G[c]=G[z]=G[m]=G[v]=G[x]=G[y]=G[S]=G[A]=G[j]=G[E]=G[_]=G[F]=!1;function q(ot){return o(ot)&&n(ot.length)&&!!G[a(ot)]}e.exports=q},7206:(e,i,t)=>{var a=t(1573),n=t(6432),o=t(6557),l=t(1469),h=t(9601);function c(m){return typeof m=="function"?m:m==null?o:typeof m=="object"?l(m)?n(m[0],m[1]):a(m):h(m)}e.exports=c},280:(e,i,t)=>{var a=t(5726),n=t(6916),o=Object.prototype,l=o.hasOwnProperty;function h(c){if(!a(c))return n(c);var m=[];for(var v in Object(c))l.call(c,v)&&v!="constructor"&&m.push(v);return m}e.exports=h},313:(e,i,t)=>{var a=t(3218),n=t(5726),o=t(3498),l=Object.prototype,h=l.hasOwnProperty;function c(m){if(!a(m))return o(m);var v=n(m),x=[];for(var y in m)y=="constructor"&&(v||!h.call(m,y))||x.push(y);return x}e.exports=c},1573:(e,i,t)=>{var a=t(2958),n=t(1499),o=t(2634);function l(h){var c=n(h);return c.length==1&&c[0][2]?o(c[0][0],c[0][1]):function(m){return m===h||a(m,h,c)}}e.exports=l},6432:(e,i,t)=>{var a=t(939),n=t(7361),o=t(9095),l=t(5403),h=t(9162),c=t(2634),m=t(327),v=1,x=2;function y(S,A){return l(S)&&h(A)?c(m(S),A):function(j){var E=n(j,S);return E===void 0&&E===A?o(j,S):a(A,E,v|x)}}e.exports=y},371:e=>{function i(t){return function(a){return a?.[t]}}e.exports=i},9152:(e,i,t)=>{var a=t(7786);function n(o){return function(l){return a(l,o)}}e.exports=n},5976:(e,i,t)=>{var a=t(6557),n=t(5357),o=t(61);function l(h,c){return o(n(h,c,a),h+"")}e.exports=l},6560:(e,i,t)=>{var a=t(5703),n=t(8777),o=t(6557),l=n?function(h,c){return n(h,"toString",{configurable:!0,enumerable:!1,value:a(c),writable:!0})}:o;e.exports=l},2545:e=>{function i(t,a){for(var n=-1,o=Array(t);++n{var a=t(2705),n=t(9932),o=t(1469),l=t(3448),h=1/0,c=a?a.prototype:void 0,m=c?c.toString:void 0;function v(x){if(typeof x=="string")return x;if(o(x))return n(x,v)+"";if(l(x))return m?m.call(x):"";var y=x+"";return y=="0"&&1/x==-h?"-0":y}e.exports=v},7561:(e,i,t)=>{var a=t(7990),n=/^\s+/;function o(l){return l&&l.slice(0,a(l)+1).replace(n,"")}e.exports=o},1717:e=>{function i(t){return function(a){return t(a)}}e.exports=i},5652:(e,i,t)=>{var a=t(8668),n=t(7443),o=t(1196),l=t(4757),h=t(3593),c=t(1814),m=200;function v(x,y,S){var A=-1,j=n,E=x.length,_=!0,F=[],I=F;if(S)_=!1,j=o;else if(E>=m){var z=y?null:h(x);if(z)return c(z);_=!1,j=l,I=new a}else I=y?[]:F;t:for(;++A{function i(t,a){return t.has(a)}e.exports=i},1811:(e,i,t)=>{var a=t(1469),n=t(5403),o=t(5514),l=t(9833);function h(c,m){return a(c)?c:n(c,m)?[c]:o(l(c))}e.exports=h},4318:(e,i,t)=>{var a=t(1149);function n(o){var l=new o.constructor(o.byteLength);return new a(l).set(new a(o)),l}e.exports=n},4626:(e,i,t)=>{e=t.nmd(e);var a=t(5639),n=i&&!i.nodeType&&i,o=n&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===n,h=l?a.Buffer:void 0,c=h?h.allocUnsafe:void 0;function m(v,x){if(x)return v.slice();var y=v.length,S=c?c(y):new v.constructor(y);return v.copy(S),S}e.exports=m},7157:(e,i,t)=>{var a=t(4318);function n(o,l){var h=l?a(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.byteLength)}e.exports=n},3147:e=>{var i=/\w*$/;function t(a){var n=new a.constructor(a.source,i.exec(a));return n.lastIndex=a.lastIndex,n}e.exports=t},419:(e,i,t)=>{var a=t(2705),n=a?a.prototype:void 0,o=n?n.valueOf:void 0;function l(h){return o?Object(o.call(h)):{}}e.exports=l},7133:(e,i,t)=>{var a=t(4318);function n(o,l){var h=l?a(o.buffer):o.buffer;return new o.constructor(h,o.byteOffset,o.length)}e.exports=n},278:e=>{function i(t,a){var n=-1,o=t.length;for(a||(a=Array(o));++n{var a=t(4865),n=t(9465);function o(l,h,c,m){var v=!c;c||(c={});for(var x=-1,y=h.length;++x{var a=t(8363),n=t(9551);function o(l,h){return a(l,n(l),h)}e.exports=o},1911:(e,i,t)=>{var a=t(8363),n=t(1442);function o(l,h){return a(l,n(l),h)}e.exports=o},4429:(e,i,t)=>{var a=t(5639),n=a["__core-js_shared__"];e.exports=n},5063:e=>{function i(t){return function(a,n,o){for(var l=-1,h=Object(a),c=o(a),m=c.length;m--;){var v=c[t?m:++l];if(n(h[v],v,h)===!1)break}return a}}e.exports=i},7740:(e,i,t)=>{var a=t(7206),n=t(8612),o=t(3674);function l(h){return function(c,m,v){var x=Object(c);if(!n(c)){var y=a(m,3);c=o(c),m=function(A){return y(x[A],A,x)}}var S=h(c,m,v);return S>-1?x[y?c[S]:S]:void 0}}e.exports=l},7779:(e,i,t)=>{var a=t(8975);function n(o,l){return function(h,c){return a(h,o,l(c),{})}}e.exports=n},3593:(e,i,t)=>{var a=t(8525),n=t(308),o=t(1814),l=1/0,h=a&&1/o(new a([,-0]))[1]==l?function(c){return new a(c)}:n;e.exports=h},8777:(e,i,t)=>{var a=t(852),n=function(){try{var o=a(Object,"defineProperty");return o({},"",{}),o}catch{}}();e.exports=n},7114:(e,i,t)=>{var a=t(8668),n=t(2908),o=t(4757),l=1,h=2;function c(m,v,x,y,S,A){var j=x&l,E=m.length,_=v.length;if(E!=_&&!(j&&_>E))return!1;var F=A.get(m),I=A.get(v);if(F&&I)return F==v&&I==m;var z=-1,M=!0,H=x&h?new a:void 0;for(A.set(m,v),A.set(v,m);++z{var a=t(2705),n=t(1149),o=t(7813),l=t(7114),h=t(8776),c=t(1814),m=1,v=2,x="[object Boolean]",y="[object Date]",S="[object Error]",A="[object Map]",j="[object Number]",E="[object RegExp]",_="[object Set]",F="[object String]",I="[object Symbol]",z="[object ArrayBuffer]",M="[object DataView]",H=a?a.prototype:void 0,L=H?H.valueOf:void 0;function X($,U,Q,V,st,G,q){switch(Q){case M:if($.byteLength!=U.byteLength||$.byteOffset!=U.byteOffset)return!1;$=$.buffer,U=U.buffer;case z:return!($.byteLength!=U.byteLength||!G(new n($),new n(U)));case x:case y:case j:return o(+$,+U);case S:return $.name==U.name&&$.message==U.message;case E:case F:return $==U+"";case A:var ot=h;case _:var P=V&m;if(ot||(ot=c),$.size!=U.size&&!P)return!1;var O=q.get($);if(O)return O==U;V|=v,q.set($,U);var D=l(ot($),ot(U),V,st,G,q);return q.delete($),D;case I:if(L)return L.call($)==L.call(U)}return!1}e.exports=X},6096:(e,i,t)=>{var a=t(8234),n=1,o=Object.prototype,l=o.hasOwnProperty;function h(c,m,v,x,y,S){var A=v&n,j=a(c),E=j.length,_=a(m),F=_.length;if(E!=F&&!A)return!1;for(var I=E;I--;){var z=j[I];if(!(A?z in m:l.call(m,z)))return!1}var M=S.get(c),H=S.get(m);if(M&&H)return M==m&&H==c;var L=!0;S.set(c,m),S.set(m,c);for(var X=A;++I{var a=typeof t.g=="object"&&t.g&&t.g.Object===Object&&t.g;e.exports=a},8234:(e,i,t)=>{var a=t(8866),n=t(9551),o=t(3674);function l(h){return a(h,o,n)}e.exports=l},6904:(e,i,t)=>{var a=t(8866),n=t(1442),o=t(1704);function l(h){return a(h,o,n)}e.exports=l},5050:(e,i,t)=>{var a=t(7019);function n(o,l){var h=o.__data__;return a(l)?h[typeof l=="string"?"string":"hash"]:h.map}e.exports=n},1499:(e,i,t)=>{var a=t(9162),n=t(3674);function o(l){for(var h=n(l),c=h.length;c--;){var m=h[c],v=l[m];h[c]=[m,v,a(v)]}return h}e.exports=o},852:(e,i,t)=>{var a=t(8458),n=t(7801);function o(l,h){var c=n(l,h);return a(c)?c:void 0}e.exports=o},5924:(e,i,t)=>{var a=t(5569),n=a(Object.getPrototypeOf,Object);e.exports=n},9607:(e,i,t)=>{var a=t(2705),n=Object.prototype,o=n.hasOwnProperty,l=n.toString,h=a?a.toStringTag:void 0;function c(m){var v=o.call(m,h),x=m[h];try{m[h]=void 0;var y=!0}catch{}var S=l.call(m);return y&&(v?m[h]=x:delete m[h]),S}e.exports=c},9551:(e,i,t)=>{var a=t(4963),n=t(479),o=Object.prototype,l=o.propertyIsEnumerable,h=Object.getOwnPropertySymbols,c=h?function(m){return m==null?[]:(m=Object(m),a(h(m),function(v){return l.call(m,v)}))}:n;e.exports=c},1442:(e,i,t)=>{var a=t(2488),n=t(5924),o=t(9551),l=t(479),h=Object.getOwnPropertySymbols,c=h?function(m){for(var v=[];m;)a(v,o(m)),m=n(m);return v}:l;e.exports=c},4160:(e,i,t)=>{var a=t(8552),n=t(7071),o=t(3818),l=t(8525),h=t(577),c=t(4239),m=t(346),v="[object Map]",x="[object Object]",y="[object Promise]",S="[object Set]",A="[object WeakMap]",j="[object DataView]",E=m(a),_=m(n),F=m(o),I=m(l),z=m(h),M=c;(a&&M(new a(new ArrayBuffer(1)))!=j||n&&M(new n)!=v||o&&M(o.resolve())!=y||l&&M(new l)!=S||h&&M(new h)!=A)&&(M=function(H){var L=c(H),X=L==x?H.constructor:void 0,$=X?m(X):"";if($)switch($){case E:return j;case _:return v;case F:return y;case I:return S;case z:return A}return L}),e.exports=M},7801:e=>{function i(t,a){return t?.[a]}e.exports=i},222:(e,i,t)=>{var a=t(1811),n=t(5694),o=t(1469),l=t(5776),h=t(1780),c=t(327);function m(v,x,y){x=a(x,v);for(var S=-1,A=x.length,j=!1;++S{var a=t(4536);function n(){this.__data__=a?a(null):{},this.size=0}e.exports=n},401:e=>{function i(t){var a=this.has(t)&&delete this.__data__[t];return this.size-=a?1:0,a}e.exports=i},7667:(e,i,t)=>{var a=t(4536),n="__lodash_hash_undefined__",o=Object.prototype,l=o.hasOwnProperty;function h(c){var m=this.__data__;if(a){var v=m[c];return v===n?void 0:v}return l.call(m,c)?m[c]:void 0}e.exports=h},1327:(e,i,t)=>{var a=t(4536),n=Object.prototype,o=n.hasOwnProperty;function l(h){var c=this.__data__;return a?c[h]!==void 0:o.call(c,h)}e.exports=l},1866:(e,i,t)=>{var a=t(4536),n="__lodash_hash_undefined__";function o(l,h){var c=this.__data__;return this.size+=this.has(l)?0:1,c[l]=a&&h===void 0?n:h,this}e.exports=o},3824:e=>{var i=Object.prototype,t=i.hasOwnProperty;function a(n){var o=n.length,l=new n.constructor(o);return o&&typeof n[0]=="string"&&t.call(n,"index")&&(l.index=n.index,l.input=n.input),l}e.exports=a},9148:(e,i,t)=>{var a=t(4318),n=t(7157),o=t(3147),l=t(419),h=t(7133),c="[object Boolean]",m="[object Date]",v="[object Map]",x="[object Number]",y="[object RegExp]",S="[object Set]",A="[object String]",j="[object Symbol]",E="[object ArrayBuffer]",_="[object DataView]",F="[object Float32Array]",I="[object Float64Array]",z="[object Int8Array]",M="[object Int16Array]",H="[object Int32Array]",L="[object Uint8Array]",X="[object Uint8ClampedArray]",$="[object Uint16Array]",U="[object Uint32Array]";function Q(V,st,G){var q=V.constructor;switch(st){case E:return a(V);case c:case m:return new q(+V);case _:return n(V,G);case F:case I:case z:case M:case H:case L:case X:case $:case U:return h(V,G);case v:return new q;case x:case A:return new q(V);case y:return o(V);case S:return new q;case j:return l(V)}}e.exports=Q},8517:(e,i,t)=>{var a=t(3118),n=t(5924),o=t(5726);function l(h){return typeof h.constructor=="function"&&!o(h)?a(n(h)):{}}e.exports=l},7285:(e,i,t)=>{var a=t(2705),n=t(5694),o=t(1469),l=a?a.isConcatSpreadable:void 0;function h(c){return o(c)||n(c)||!!(l&&c&&c[l])}e.exports=h},5776:e=>{var i=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function a(n,o){var l=typeof n;return o=o??i,!!o&&(l=="number"||l!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n{var a=t(1469),n=t(3448),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;function h(c,m){if(a(c))return!1;var v=typeof c;return v=="number"||v=="symbol"||v=="boolean"||c==null||n(c)?!0:l.test(c)||!o.test(c)||m!=null&&c in Object(m)}e.exports=h},7019:e=>{function i(t){var a=typeof t;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?t!=="__proto__":t===null}e.exports=i},5346:(e,i,t)=>{var a=t(4429),n=function(){var l=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""}();function o(l){return!!n&&n in l}e.exports=o},5726:e=>{var i=Object.prototype;function t(a){var n=a&&a.constructor,o=typeof n=="function"&&n.prototype||i;return a===o}e.exports=t},9162:(e,i,t)=>{var a=t(3218);function n(o){return o===o&&!a(o)}e.exports=n},7040:e=>{function i(){this.__data__=[],this.size=0}e.exports=i},4125:(e,i,t)=>{var a=t(8470),n=Array.prototype,o=n.splice;function l(h){var c=this.__data__,m=a(c,h);if(m<0)return!1;var v=c.length-1;return m==v?c.pop():o.call(c,m,1),--this.size,!0}e.exports=l},2117:(e,i,t)=>{var a=t(8470);function n(o){var l=this.__data__,h=a(l,o);return h<0?void 0:l[h][1]}e.exports=n},7518:(e,i,t)=>{var a=t(8470);function n(o){return a(this.__data__,o)>-1}e.exports=n},4705:(e,i,t)=>{var a=t(8470);function n(o,l){var h=this.__data__,c=a(h,o);return c<0?(++this.size,h.push([o,l])):h[c][1]=l,this}e.exports=n},4785:(e,i,t)=>{var a=t(1989),n=t(8407),o=t(7071);function l(){this.size=0,this.__data__={hash:new a,map:new(o||n),string:new a}}e.exports=l},1285:(e,i,t)=>{var a=t(5050);function n(o){var l=a(this,o).delete(o);return this.size-=l?1:0,l}e.exports=n},6e3:(e,i,t)=>{var a=t(5050);function n(o){return a(this,o).get(o)}e.exports=n},9916:(e,i,t)=>{var a=t(5050);function n(o){return a(this,o).has(o)}e.exports=n},5265:(e,i,t)=>{var a=t(5050);function n(o,l){var h=a(this,o),c=h.size;return h.set(o,l),this.size+=h.size==c?0:1,this}e.exports=n},8776:e=>{function i(t){var a=-1,n=Array(t.size);return t.forEach(function(o,l){n[++a]=[l,o]}),n}e.exports=i},2634:e=>{function i(t,a){return function(n){return n==null?!1:n[t]===a&&(a!==void 0||t in Object(n))}}e.exports=i},4523:(e,i,t)=>{var a=t(8306),n=500;function o(l){var h=a(l,function(m){return c.size===n&&c.clear(),m}),c=h.cache;return h}e.exports=o},4536:(e,i,t)=>{var a=t(852),n=a(Object,"create");e.exports=n},6916:(e,i,t)=>{var a=t(5569),n=a(Object.keys,Object);e.exports=n},3498:e=>{function i(t){var a=[];if(t!=null)for(var n in Object(t))a.push(n);return a}e.exports=i},1167:(e,i,t)=>{e=t.nmd(e);var a=t(1957),n=i&&!i.nodeType&&i,o=n&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===n,h=l&&a.process,c=function(){try{var m=o&&o.require&&o.require("util").types;return m||h&&h.binding&&h.binding("util")}catch{}}();e.exports=c},2333:e=>{var i=Object.prototype,t=i.toString;function a(n){return t.call(n)}e.exports=a},5569:e=>{function i(t,a){return function(n){return t(a(n))}}e.exports=i},5357:(e,i,t)=>{var a=t(6874),n=Math.max;function o(l,h,c){return h=n(h===void 0?l.length-1:h,0),function(){for(var m=arguments,v=-1,x=n(m.length-h,0),y=Array(x);++v{var a=t(1957),n=typeof self=="object"&&self&&self.Object===Object&&self,o=a||n||Function("return this")();e.exports=o},619:e=>{var i="__lodash_hash_undefined__";function t(a){return this.__data__.set(a,i),this}e.exports=t},2385:e=>{function i(t){return this.__data__.has(t)}e.exports=i},1814:e=>{function i(t){var a=-1,n=Array(t.size);return t.forEach(function(o){n[++a]=o}),n}e.exports=i},61:(e,i,t)=>{var a=t(6560),n=t(1275),o=n(a);e.exports=o},1275:e=>{var i=800,t=16,a=Date.now;function n(o){var l=0,h=0;return function(){var c=a(),m=t-(c-h);if(h=c,m>0){if(++l>=i)return arguments[0]}else l=0;return o.apply(void 0,arguments)}}e.exports=n},7465:(e,i,t)=>{var a=t(8407);function n(){this.__data__=new a,this.size=0}e.exports=n},3779:e=>{function i(t){var a=this.__data__,n=a.delete(t);return this.size=a.size,n}e.exports=i},7599:e=>{function i(t){return this.__data__.get(t)}e.exports=i},4758:e=>{function i(t){return this.__data__.has(t)}e.exports=i},4309:(e,i,t)=>{var a=t(8407),n=t(7071),o=t(3369),l=200;function h(c,m){var v=this.__data__;if(v instanceof a){var x=v.__data__;if(!n||x.length{function i(t,a,n){for(var o=n-1,l=t.length;++o{var a=t(4523),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,l=a(function(h){var c=[];return h.charCodeAt(0)===46&&c.push(""),h.replace(n,function(m,v,x,y){c.push(x?y.replace(o,"$1"):v||m)}),c});e.exports=l},327:(e,i,t)=>{var a=t(3448),n=1/0;function o(l){if(typeof l=="string"||a(l))return l;var h=l+"";return h=="0"&&1/l==-n?"-0":h}e.exports=o},346:e=>{var i=Function.prototype,t=i.toString;function a(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}e.exports=a},7990:e=>{var i=/\s/;function t(a){for(var n=a.length;n--&&i.test(a.charAt(n)););return n}e.exports=t},6678:(e,i,t)=>{var a=t(5990),n=4;function o(l){return a(l,n)}e.exports=o},361:(e,i,t)=>{var a=t(5990),n=1,o=4;function l(h){return a(h,n|o)}e.exports=l},5703:e=>{function i(t){return function(){return t}}e.exports=i},1966:(e,i,t)=>{var a=t(731),n=t(1078),o=t(5976),l=t(9246),h=o(function(c,m){return l(c)?a(c,n(m,1,l,!0)):[]});e.exports=h},7813:e=>{function i(t,a){return t===a||t!==t&&a!==a}e.exports=i},3311:(e,i,t)=>{var a=t(7740),n=t(998),o=a(n);e.exports=o},998:(e,i,t)=>{var a=t(1848),n=t(7206),o=t(554),l=Math.max;function h(c,m,v){var x=c==null?0:c.length;if(!x)return-1;var y=v==null?0:o(v);return y<0&&(y=l(x+y,0)),a(c,n(m,3),y)}e.exports=h},7361:(e,i,t)=>{var a=t(7786);function n(o,l,h){var c=o==null?void 0:a(o,l);return c===void 0?h:c}e.exports=n},9095:(e,i,t)=>{var a=t(13),n=t(222);function o(l,h){return l!=null&&n(l,h,a)}e.exports=o},6557:e=>{function i(t){return t}e.exports=i},3137:(e,i,t)=>{var a=t(5703),n=t(7779),o=t(6557),l=Object.prototype,h=l.toString,c=n(function(m,v,x){v!=null&&typeof v.toString!="function"&&(v=h.call(v)),m[v]=x},a(o));e.exports=c},5694:(e,i,t)=>{var a=t(9454),n=t(7005),o=Object.prototype,l=o.hasOwnProperty,h=o.propertyIsEnumerable,c=a(function(){return arguments}())?a:function(m){return n(m)&&l.call(m,"callee")&&!h.call(m,"callee")};e.exports=c},1469:e=>{var i=Array.isArray;e.exports=i},8612:(e,i,t)=>{var a=t(3560),n=t(1780);function o(l){return l!=null&&n(l.length)&&!a(l)}e.exports=o},9246:(e,i,t)=>{var a=t(8612),n=t(7005);function o(l){return n(l)&&a(l)}e.exports=o},4144:(e,i,t)=>{e=t.nmd(e);var a=t(5639),n=t(5062),o=i&&!i.nodeType&&i,l=o&&!0&&e&&!e.nodeType&&e,h=l&&l.exports===o,c=h?a.Buffer:void 0,m=c?c.isBuffer:void 0,v=m||n;e.exports=v},8446:(e,i,t)=>{var a=t(939);function n(o,l){return a(o,l)}e.exports=n},3560:(e,i,t)=>{var a=t(4239),n=t(3218),o="[object AsyncFunction]",l="[object Function]",h="[object GeneratorFunction]",c="[object Proxy]";function m(v){if(!n(v))return!1;var x=a(v);return x==l||x==h||x==o||x==c}e.exports=m},1780:e=>{var i=9007199254740991;function t(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=i}e.exports=t},6688:(e,i,t)=>{var a=t(5588),n=t(1717),o=t(1167),l=o&&o.isMap,h=l?n(l):a;e.exports=h},3218:e=>{function i(t){var a=typeof t;return t!=null&&(a=="object"||a=="function")}e.exports=i},7005:e=>{function i(t){return t!=null&&typeof t=="object"}e.exports=i},2928:(e,i,t)=>{var a=t(9221),n=t(1717),o=t(1167),l=o&&o.isSet,h=l?n(l):a;e.exports=h},3448:(e,i,t)=>{var a=t(4239),n=t(7005),o="[object Symbol]";function l(h){return typeof h=="symbol"||n(h)&&a(h)==o}e.exports=l},6719:(e,i,t)=>{var a=t(8749),n=t(1717),o=t(1167),l=o&&o.isTypedArray,h=l?n(l):a;e.exports=h},3674:(e,i,t)=>{var a=t(4636),n=t(280),o=t(8612);function l(h){return o(h)?a(h):n(h)}e.exports=l},1704:(e,i,t)=>{var a=t(4636),n=t(313),o=t(8612);function l(h){return o(h)?a(h,!0):n(h)}e.exports=l},8306:(e,i,t)=>{var a=t(3369),n="Expected a function";function o(l,h){if(typeof l!="function"||h!=null&&typeof h!="function")throw new TypeError(n);var c=function(){var m=arguments,v=h?h.apply(this,m):m[0],x=c.cache;if(x.has(v))return x.get(v);var y=l.apply(this,m);return c.cache=x.set(v,y)||x,y};return c.cache=new(o.Cache||a),c}o.Cache=a,e.exports=o},308:e=>{function i(){}e.exports=i},9601:(e,i,t)=>{var a=t(371),n=t(9152),o=t(5403),l=t(327);function h(c){return o(c)?a(l(c)):n(c)}e.exports=h},479:e=>{function i(){return[]}e.exports=i},5062:e=>{function i(){return!1}e.exports=i},8601:(e,i,t)=>{var a=t(4841),n=1/0,o=17976931348623157e292;function l(h){if(!h)return h===0?h:0;if(h=a(h),h===n||h===-n){var c=h<0?-1:1;return c*o}return h===h?h:0}e.exports=l},554:(e,i,t)=>{var a=t(8601);function n(o){var l=a(o),h=l%1;return l===l?h?l-h:l:0}e.exports=n},4841:(e,i,t)=>{var a=t(7561),n=t(3218),o=t(3448),l=NaN,h=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,m=/^0o[0-7]+$/i,v=parseInt;function x(y){if(typeof y=="number")return y;if(o(y))return l;if(n(y)){var S=typeof y.valueOf=="function"?y.valueOf():y;y=n(S)?S+"":S}if(typeof y!="string")return y===0?y:+y;y=a(y);var A=c.test(y);return A||m.test(y)?v(y.slice(2),A?2:8):h.test(y)?l:+y}e.exports=x},9833:(e,i,t)=>{var a=t(531);function n(o){return o==null?"":a(o)}e.exports=n},4908:(e,i,t)=>{var a=t(5652);function n(o){return o&&o.length?a(o):[]}e.exports=n},2569:(e,i,t)=>{var a=t(731),n=t(5976),o=t(9246),l=n(function(h,c){return o(h)?a(h,c):[]});e.exports=l}},p={};function u(e){var i=p[e];if(i!==void 0)return i.exports;var t=p[e]={id:e,loaded:!1,exports:{}};return s[e](t,t.exports,u),t.loaded=!0,t.exports}u.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return u.d(i,{a:i}),i},u.d=(e,i)=>{for(var t in i)u.o(i,t)&&!u.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:i[t]})},u.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),u.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),u.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var g={};return(()=>{"use strict";u.r(g),u.d(g,{chordParserFactory:()=>Er,chordRendererFactory:()=>gi});function e(r,f){return r.reduce(function(d,b){return d?b(d):null},f)}var i=u(361),t=u.n(i),a=function(f){if(!Array.isArray(f))throw new TypeError("customFilters should be given as an array");if(f.some(function(d){return typeof d!="function"}))throw new TypeError("The given filter is not a function");return!0};let n=a;function o(r,f){var d=Object.keys(r);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(r);f&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(r,C).enumerable})),d.push.apply(d,b)}return d}function l(r){for(var f=1;f"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function P(r){return Function.toString.call(r).indexOf("[native code]")!==-1}function O(r,f){return O=Object.setPrototypeOf||function(b,C){return b.__proto__=C,b},O(r,f)}function D(r){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(d){return d.__proto__||Object.getPrototypeOf(d)},D(r)}var Y=function(r){U(d,r);var f=Q(d);function d(){var b;return $(this,d),b=f.call(this,"The given symbol is not a valid string"),b.name="InvalidInput",b}return X(d)}(G(Error)),at=function(r){U(d,r);var f=Q(d);function d(){var b;$(this,d);var C="An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?";return b=f.call(this,C),b.name="UnexpectedError",b}return X(d)}(G(Error)),et=function(r){U(d,r);var f=Q(d);function d(b,C,R){var B;return $(this,d),B=f.call(this,b),B.name=R,B.chord=C,B}return X(d)}(G(Error)),mt=function(r){U(d,r);var f=Q(d);function d(b){$(this,d);var C='"'.concat(b.input.symbol,'" does not seems to be a chord');return f.call(this,C,b,"NoSymbolFound")}return X(d)}(et),Tt=function(r){U(d,r);var f=Q(d);function d(b,C){$(this,d);var R='The chord descriptor "'.concat(b.input.descriptor,'" contains unknown or duplicated modifiers: "').concat(C,'"');return f.call(this,R,b,"InvalidModifier")}return X(d)}(et),Mt=function(r){U(d,r);var f=Q(d);function d(b,C){$(this,d);var R='"'.concat(b.input.symbol,'" describes a chord with an invalid intervals combo: ')+C.join(" and ");return f.call(this,R,b,"InvalidIntervals")}return X(d)}(et),Ut=u(1469),Ht=u.n(Ut),Kt=u(8446),re=u.n(Kt);function wt(r,f){var d=Ht()(f)?f:[f];return re()(r,d)}function W(r,f){return Xt(r,f,"oneOf")}function Wt(r,f){return Xt(r,f,"all")}function xt(r,f){return Xt(r,f,"none")}function Xt(r,f,d){var b=Ht()(f)?f:[f],C=d==="oneOf"?"some":"every";return b[C](function(R){return d==="none"?!r.includes(R):r.includes(R)})}var ne=[["2","3"],["2","9"],["3","b3"],["4","11"],["5","b5"],["5","#5"],["b6","#5"],["b6","6"],["b6","13"],["6","13"],["b7","bb7"],["7","b7"],["9","b9"],["9","#9"],["11","#11"],["13","b13"]];function he(r){var f=r.normalized.intervals,d=ne.find(function(b){return Wt(f,b)});if(d)throw new Mt(r,d);return r}function Vt(r){var f=r.formatted,d=f.rootNote,b=f.bassNote,C=f.descriptor,R=f.chordChanges,B=d;return C&&(B+=C),R&&R.length&&(B+="("+R.join(",")+")"),b&&(B+="/"+b),r.formatted.symbol=B,r}var T={ma:"major",ma6:"major6",ma7:"major7",dom7:"dominant7",mi:"minor",mi6:"minor6",mi7:"minor7",miMa7:"minorMajor7",aug:"augmented",dim:"diminished",dim7:"diminished7",power:"power",bass:"bass"},ft=[T.ma,T.ma6,T.ma7,T.dom7,T.aug],K=[T.mi,T.mi6,T.mi7,T.miMa7,T.dim,T.dim7],Z;function St(r){return ut(r)||At(r)||jt(r)||de()}function de(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jt(r,f){if(r){if(typeof r=="string")return It(r,f);var d=Object.prototype.toString.call(r).slice(8,-1);if(d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set")return Array.from(r);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return It(r,f)}}function At(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function ut(r){if(Array.isArray(r))return It(r)}function It(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,b=new Array(f);d0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1?arguments[1]:void 0;return{input:{symbol:f},normalized:{},formatted:{},parserConfiguration:t()(r)}}var nt;function Qt(r){return Mn(r)||je(r)||ve(r)||Ke()}function Ke(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ve(r,f){if(r){if(typeof r=="string")return We(r,f);var d=Object.prototype.toString.call(r).slice(8,-1);if(d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set")return Array.from(r);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return We(r,f)}}function je(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Mn(r){if(Array.isArray(r))return We(r)}function We(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,b=new Array(f);dr.length)&&(f=r.length);for(var d=0,b=new Array(f);dr.length)&&(f=r.length);for(var d=0,b=new Array(f);d0)throw new Tt(r,R);return d}function wa(r,f){return r.includes(N.power)?["1","5"]:r.includes(N.bass)?["1"]:mr()(["1"].concat(Gt(ja(r)),Gt(Ca(r)),Gt(Ea(r,f)),Gt(Fa(r)),Gt(Ia(r)),Gt(Da(r,f)),Gt(Pa(r,f)),Gt(Na(r,f)))).sort(function(d,b){return Ee[d]-Ee[b]})}function ja(r){var f=[];return r.includes(N.omit3)?[]:(W(r,[N.sus,N.sus2])||(Je(r)?r.includes(N.eleventh)||f.push("3"):f.push("b3")),r.includes(N.add3)&&f.push("3"),f)}function Ca(r){var f=[];return W(r,[N.sus,N.add4])&&f.push("4"),f}function Ea(r,f){var d=[];return r.includes(N.omit5)?[]:((W(r,[N.dim,N.halfDim,N.fifthFlat])||ue(r,f,"b5"))&&d.push("b5"),(W(r,[N.aug,N.fifthSharp])||ue(r,f,"#5"))&&d.push("#5"),!d.length&&!r.includes(N.thirteenthFlat)&&d.push("5"),d)}function Fa(r){var f=[];return W(r,[N.addb6])&&f.push("b6"),W(r,[N.add6,N.add69])&&!jr(r)&&!W(r,[N.halfDim])&&f.push("6"),f}function Ia(r){var f=[];return W(r,[N.alt])&&f.push("b7"),W(r,[N.seventh,N.halfDim])?r.includes(N.dim)?f.push("bb7"):r.includes(N.halfDim)?f.push("b7"):f.push(wr(r)):W(r,[N.ninth,N.eleventh,N.thirteenth])&&f.push(wr(r)),r.includes(N.add7)&&f.push("7"),f}function wr(r){return r.includes(N.ma)?"7":"b7"}function Da(r,f){var d=[];return W(r,[N.add69,N.ninth,N.eleventh,N.thirteenth])&&xt(r,[N.ninthFlat,N.ninthSharp])&&d.push("9"),W(r,[N.sus2,N.add9])&&d.push("9"),(W(r,[N.ninthFlat])||ue(r,f,"b9"))&&d.push("b9"),(W(r,[N.ninthSharp])||ue(r,f,"#9"))&&d.push("#9"),d}function Pa(r,f){var d=[];return(W(r,[N.thirteenth])&&!Je(r)||W(r,[N.eleventh,N.add11]))&&d.push("11"),(W(r,[N.eleventhSharp])||ue(r,f,"#11"))&&d.push("#11"),d}function Na(r,f){var d=[];return(W(r,[N.add13,N.thirteenth])||W(r,[N.add6,N.add69])&&jr(r)||W(r,[N.add6,N.add69])&&W(r,[N.halfDim]))&&d.push("13"),(W(r,[N.thirteenthFlat])||ue(r,f,"b13"))&&d.push("b13"),d}function ue(r,f,d){return r.includes(N.alt)&&f.includes(d)}function Je(r){return xt(r,[N.mi,N.dim,N.dim7,N.halfDim])}function jr(r){return W(r,[N.seventh,N.ninth,N.eleventh,N.thirteenth])}function Ra(r){return r.replace(/[.\-*+?^${}()|[\]\\]/g,"\\$&")}function _a(r){return r.map(function(f){return Ee[f]}).sort(function(f,d){return f-d})}function Ma(r){return{major:Je(r),eleventh:r.includes(N.eleventh),alt:r.includes(N.alt)}}function za(r){return $a(r)||Ba(r)||Ga(r)||La()}function La(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ga(r,f){if(r){if(typeof r=="string")return ke(r,f);var d=Object.prototype.toString.call(r).slice(8,-1);if(d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set")return Array.from(r);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return ke(r,f)}}function Ba(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function $a(r){if(Array.isArray(r))return ke(r)}function ke(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,b=new Array(f);d0&&arguments[0]!==void 0?arguments[0]:{},f=["b5","#5","b9","#9","#11","b13"],d=["english","german","latin"],b=r.notationSystems,C=b===void 0?t()(d):b,R=r.altIntervals,B=R===void 0?t()(f):R,J=r.customFilters,dt=J===void 0?[]:J;return Ha(B,f),Ka(C,d),n(dt),Ft;function Ft(Jt){var Pt=[];if(!Wa(Jt)){var be=new Y;Pt.push(qe(be))}var ye=t()(M).filter(function(Nt){return C.includes(Nt.name)}),Bt,xe,$t;if(!Pt.length)for(;ye.length&&!Bt;){$t=ye.shift(),xe=[Zt.bind(null,r),da.bind(null,$t.notes),Ue,Oa.bind(null,B),he,Bn,yr,Ct,Vt,Xe].concat(za(dt));try{Bt=e(xe,Jt),Bt?Bt.input.notationSystem=$t.name:Pt.push(Xa($t.name))}catch(Nt){Pt.push(qe(Nt,$t.name))}}return Bt||{error:Pt}}}function Ha(r,f){Cr("altIntervals",r,f,!0)}function Ka(r,f){Cr("notationSystems",r,f)}function Cr(r,f,d,b){if(!Array.isArray(f))throw new TypeError("'".concat(r,"' should be an array"));if(!b&&f.length===0)throw new TypeError("'".concat(r,"' cannot be empty"));f.forEach(function(C){if(!d.includes(C))throw new TypeError("'".concat(C,"' is not a valid value for ").concat(r))})}function Wa(r){return typeof r=="string"&&r.length>0}function Xa(r){var f=new at;return qe(f,r)}function qe(r,f){return{type:r.name,chord:r.chord,message:r.message,notationSystem:f}}let Er=Ua;function Fr(r,f){var d=Object.keys(r);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(r);f&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(r,C).enumerable})),d.push.apply(d,b)}return d}function Fe(r){for(var f=1;f0&&arguments[0]!==void 0?arguments[0]:"none",f=arguments.length>1?arguments[1]:void 0;if(r==="none")return f;var d={max:["4","b5","#5","6","bb7","b7","7","b9","9","#9","11","#11","b13","13"],core:["4","b9","9","#9","11","#11","b13","13"]},b=ti()(f.normalized.intervals,d[r]);xt(b,["b3","3"])&&b.push(f.normalized.intents.major?"3":"b3"),xt(b,["b5","5","#5"])&&b.push("5"),f.normalized.intervals=b,f.normalized.semitones=b.map(function(R){return Ee[R]}),f.normalized.intents.eleventh=!1,f.normalized.intents.alt=!1,r==="max"&&delete f.normalized.bassNote;var C=[yr,Ct,Xe];return e(C,f)}var ri=u(3137),ni=u.n(ri),Ir=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],Dr={"C#":"Db","D#":"Eb","F#":"Gb","G#":"Ab","A#":"Bb"},ai=ni()(Dr);function ii(r,f,d){var b=d.normalized,C=b.rootNote,R=b.bassNote,B=Nr(C);if(d.normalized.rootNote=Pr(B,r,f),d.formatted.rootNote=d.normalized.rootNote,R){var J=Nr(R);d.normalized.bassNote=Pr(J,r,f),d.formatted.bassNote=d.normalized.bassNote}return Xe(d)}function Pr(r,f,d){var b=Ir.indexOf(r),C=b+f,R=Math.floor(C/12),B=C-R*12,J=Ir[B];return d&&Dr[J]||J}function Nr(r){return ai[r]||r}var tr={german:{Ab:"As",A:"A","A#":"Ais",Bb:"Hes",B:"H",C:"C","C#":"Cis",Db:"Des",D:"D","D#":"Dis",Eb:"Es",E:"E",F:"F","F#":"Fis",Gb:"Ges",G:"G","G#":"Gis"},latin:{Ab:"Lab",A:"La","A#":"La#",Bb:"Sib",B:"Si",C:"Do","C#":"Do#",Db:"Reb",D:"Re","D#":"Re#",Eb:"Mib",E:"Mi",F:"Fa","F#":"Fa#",Gb:"Solb",G:"Sol","G#":"Sol#"}},si=Object.keys(tr);function oi(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"english",f=arguments.length>1?arguments[1]:void 0,d=r==="auto"?f.input.notationSystem:r;return d==="english"?f:si.includes(d)?(f.formatted.rootNote=tr[d][f.formatted.rootNote],f.formatted.bassNote&&(f.formatted.bassNote=tr[d][f.formatted.bassNote]),f):null}function Rr(r){return r&&r.formatted&&r.formatted.symbol?r.formatted.symbol:null}function ui(r){delete r.parserConfiguration.notationSystems;var f=t()(r),d=Rr(r),b=Er(r.parserConfiguration),C=b(d);return f.input=C.input,f}function er(r){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},er(r)}function ci(r){return hi(r)||pi(r)||fi(r)||li()}function li(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fi(r,f){if(r){if(typeof r=="string")return rr(r,f);var d=Object.prototype.toString.call(r).slice(8,-1);if(d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set")return Array.from(r);if(d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d))return rr(r,f)}}function pi(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function hi(r){if(Array.isArray(r))return rr(r)}function rr(r,f){(f==null||f>r.length)&&(f=r.length);for(var d=0,b=new Array(f);d0&&arguments[0]!==void 0?arguments[0]:{},f=r.useShortNamings,d=f===void 0?!1:f,b=r.simplify,C=b===void 0?"none":b,R=r.transposeValue,B=R===void 0?0:R,J=r.harmonizeAccidentals,dt=J===void 0?!1:J,Ft=r.useFlats,Jt=Ft===void 0?!1:Ft,Pt=r.printer,be=Pt===void 0?"text":Pt,ye=r.notationSystem,Bt=ye===void 0?"english":ye,xe=r.customFilters,$t=xe===void 0?[]:xe;n($t);var Nt=[];return["max","core"].includes(C)&&Nt.push(ei.bind(null,C)),(dt||B!==0)&&Nt.push(ii.bind(null,B,Jt)),d&&Nt.push(Ya),Nt.push.apply(Nt,[oi.bind(null,Bt),Vt].concat(ci($t))),vi;function vi(_r){if(!mi(_r))return null;var Mr=e(Nt,t()(_r));return be==="raw"?ui(Mr):Rr(Mr)}}var mi=function(f){return f&&er(f)==="object"&&!f.error&&f.input};let gi=di})(),g})()})});var _n=Ie(mn(),1);var Cn=Ie(jn(),1),Le=class{constructor(p){let u=/.*?(irealb(?:ook)?):\/\/([^"]*)/.exec(p),e=decodeURIComponent(u[2]).split("===");e.length>1&&(this.name=e.pop()),this.songs=e.map(i=>{try{return new Ae(i,u[1]==="irealbook")}catch(t){let a=i.split("="),n=Ae.parseTitle(a[0].trim());return console.error(`[ireal-musicxml] [${n}] ${t}`),null}}).filter(i=>i!==null).reduce((i,t)=>{if(i.length>0){let a=(0,Cn.default)(i[i.length-1].title,t.title);if(a[0][0]===0&&a.every(n=>n[0]===0||n[1].match(/^\d+$/)))return i[i.length-1].cells=i[i.length-1].cells.concat(t.cells),i}return i.push(t),i},[])}},Ge=class{constructor(){this.annots=[],this.comments=[],this.bars="",this.spacer=0,this.chord=null}},ee=class{constructor(p,u="",g=null,e=null){this.note=p,this.modifiers=u,this.over=g,this.alternate=e}},Ae=class s{constructor(p,u=!1){if(this.cells=[],this.musicXml="",!p){this.title="",this.composer="",this.style="",this.key="",this.transpose=0,this.groove="",this.bpm=0,this.repeats=0;return}let g=p.split("=");if(u)this.title=s.parseTitle(g[0].trim()),this.composer=s.parseComposer(g[1].trim()),this.style=g[2].trim(),this.key=g[3],this.cells=this.parse(g[5]);else{this.title=s.parseTitle(g[0].trim()),this.composer=s.parseComposer(g[1].trim()),this.style=g[3].trim(),this.key=g[4],this.transpose=+g[5]||0,this.groove=g[7],this.bpm=+g[8],this.repeats=+g[9]||3;let e=g[6].split("1r34LbKcu7");this.cells=this.parse(ki(e[1]))}}static chordRegex=/^([A-G][b#]?)((?:sus|alt|add|[+\-^\dhob#])*)(\*.+?\*)*(\/[A-G][#b]?)?(\(.*?\))?/;static chordRegex2=/^([ Wp])()()(\/[A-G][#b]?)?(\(.*?\))?/;static regExps=[/^\*[a-zA-Z]/,/^T\d\d/,/^N./,/^<.*?>/,s.chordRegex,s.chordRegex2];parse(p){let u=p.trim(),g=[];for(;u;){let a=!1;for(let n=0;n51;)u=s.substring(0,50),s=s.substring(50),p=p+qi(u);return p=p+s,p=p.replace(/Kcl/g,"| x").replace(/LZ/g," |").replace(/XyQ/g," "),p}function qi(s){let p=s.split("");for(let u=0;u<5;u++)p[49-u]=s[u],p[u]=s[49-u];for(let u=10;u<24;u++)p[49-u]=s[u],p[u]=s[49-u];return p.join("")}var Nn=Ie(En(),1),Rn=Ie(Fn(),1);var Te={name:"ireal-musicxml",version:"2.0.0",description:"iReal Pro to MusicXML converter.",author:"Karim Ratib (https://github.com/infojunkie)",license:"GPL-3.0-only",repository:{type:"git",url:"https://github.com/infojunkie/ireal-musicxml"},homepage:"https://github.com/infojunkie/ireal-musicxml",type:"module",main:"build/ireal-musicxml.js",types:"build/ireal-musicxml.d.ts",files:["LICENSE.txt","build/*","src/*"],bin:{"ireal-musicxml":"src/cli/cli.js"},scripts:{build:"esbuild src/lib/index.js --bundle --minify --sourcemap --outfile=build/ireal-musicxml.js && cp src/types/* build/",test:"npm run test:lint && npm run test:spec","test:spec":"node --test","test:typescript":"npm run build && ts-mocha test/**/*.spec.ts","test:lint":"eslint src --fix"},devDependencies:{"@xmldom/xmldom":"^0.8.0",esbuild:"0.24.0",eslint:"^9.13.0",resolve:"^1.22.8","sanitize-filename":"^1.6.3",typescript:"^4.3.2","validate-with-xmllint":"^1.2.0","xpath.js":"^1.1.0"},dependencies:{"chord-symbol":"^3.0.0","fast-diff":"^1.2.0",jstoxml:"^2.0.6",promise:"^8.1.0"}};var we=class{static name=Te.name;static version=Te.version;static author=Te.author;static description=Te.description};var{chordParserFactory:es,chordRendererFactory:rs}=Rn.default,tt=class{static Debug=0;static Info=1;static Warn=2;static Error=3;static None=4},In="4.0",Dn=7,Pn=40,$e=class s{static defaultOptions={divisions:768,notation:"rhythmic",step:"B",octave:4,notehead:"slash",noteheadSize:"large",date:!0,clef:!1,keySignature:!1,pageWidth:210,pageHeight:297,pageMargin:15,logLevel:tt.Warn};static sequenceAttributes=["divisions","key","time","staves","part-symbol","instruments","clef","staff-details","transpose","directive","measure-style"];static sequenceNote=["cue","pitch","rest","unpitched","duration","tie","voice","type","dot","accidental","time-modification","stem","notehead","notehead-text","staff","beam","notations","lyric","play"];static sequenceNotations=["accidental-mark","arpeggiate","articulations","dynamics","fermata","glissando","non-arpeggiate","ornaments","other-notation","slide","slur","technical","tied","tuplet"];static sequenceBarline=["bar-style","footnote","level","wavy-line","segno","coda","fermata","ending","repeat"];static mapAlter={"#":1,b:-1};static mapFifthsToAlters={sharp:["F","C","G","D","A","E","B"],flat:["B","E","A","D","G","C","F"]};static mapRepeats={"D.C. al Coda":s.prototype.convertDaCapo,"D.C. al Fine":s.prototype.convertDaCapo,"D.C. al 1st End.":s.prototype.convertDaCapo,"D.C. al 2nd End.":s.prototype.convertDaCapo,"D.C. al 3rd End.":s.prototype.convertDaCapo,"D.S. al Coda":s.prototype.convertDalSegno,"D.S. al Fine":s.prototype.convertDalSegno,"D.S. al 1st End.":s.prototype.convertDalSegno,"D.S. al 2nd End.":s.prototype.convertDalSegno,"D.S. al 3rd End.":s.prototype.convertDalSegno,Fine:s.prototype.convertFine,"3x":s.prototype.convertRepeatNx,"4x":s.prototype.convertRepeatNx,"5x":s.prototype.convertRepeatNx,"6x":s.prototype.convertRepeatNx,"7x":s.prototype.convertRepeatNx,"8x":s.prototype.convertRepeatNx};static convert(p,u={}){let g=Object.assign({},this.defaultOptions,u);return new s(p,g).convert()}constructor(p,u){this.song=p,this.options=u,this.time={beats:4,beatType:4},this.fifths=null,this.measure=null,this.barRepeat=0,this.codas=[],this.repeats=0,this.emptyCells=0,this.emptyCellNewSystem=!1,this.cellWidth=(this.options.pageWidth-2*this.options.pageMargin)/16,this.parseChord=es({altIntervals:["b5","b9"]}),this.renderChord=rs({useShortNamings:!0,printer:"raw"})}convert(){return Nn.default.toXML(this.convertSong(),{header:` - - `.trim(),indent:" "})}convertSong(){return{_name:"score-partwise",_attrs:{version:If},_content:[{work:{"work-title":this.song.title}},{identification:[{_name:"creator",_attrs:{type:"composer"},_content:this.song.composer},{encoding:[{software:`@infojunkie/ireal-musicxml ${gt.version}`},{...this.options.date&&{"encoding-date":e.convertDate(new Date)}},{_name:"supports",_attrs:{element:"accidental",type:"no"}},{_name:"supports",_attrs:{element:"transpose",type:"no"}},{_name:"supports",_attrs:{attribute:"new-page",element:"print",type:"yes",value:"yes"}},{_name:"supports",_attrs:{attribute:"new-system",element:"print",type:"yes",value:"yes"}}]}]},{defaults:{scaling:{millimeters:Of,tenths:Cf},"page-layout":{"page-height":e._mmToTenths(this.options.pageHeight),"page-width":e._mmToTenths(this.options.pageWidth),"page-margins":{"left-margin":e._mmToTenths(this.options.pageMargin,4),"right-margin":e._mmToTenths(this.options.pageMargin,4),"top-margin":e._mmToTenths(this.options.pageMargin,4),"bottom-margin":e._mmToTenths(this.options.pageMargin,4)}}}},{"part-list":{_name:"score-part",_attrs:{id:"P1"},_content:{_name:"part-name",_attrs:{"print-object":"no"},_content:"Lead Sheet"}}},{_name:"part",_attrs:{id:"P1"},_content:this.convertMeasures()}]}}static convertDate(t){return new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().split("T")[0]}static Measure=class{constructor(t){this.body={_name:"measure",_attrs:{number:t},_content:[]},this.attributes=[],this.chords=[],this.barlines=[],this.barEnding=null}number(){return this.body._attrs.number}assemble(){return this.attributes.length&&this.body._content.push({attributes:e.reorderSequence(this,this.attributes,e.sequenceAttributes)}),this.chords.forEach(t=>{this.body._content.push({harmony:t.harmony},...t.notes.map(r=>({note:r})))}),this.barlines[0]._content=e.reorderSequence(this,this.barlines[0]._content,e.sequenceBarline),this.body._content.splice(1,0,this.barlines[0]),this.barlines[1]._content=e.reorderSequence(this,this.barlines[1]._content,e.sequenceBarline),this.body._content.push(this.barlines[1]),this.body}};static Chord=class{constructor(t,r,n){this.harmony=t,this.notes=r,this.ireal=n,this.spaces=0,this.fermata=!1}};convertMeasures(){let t=i=>i>0&&i%16===0,r=this.song.cells.reduce((i,a,s)=>{if((a.bars.match(/\(|\{|\[/)||!this.measure&&(a.chord||a.annots.length||a.comments.length))&&(this.measure&&(this._log(M.Warn,"Starting a new measure over existing measure. Closing current measure first."),this.measure.barlines.push(this.convertBarline("","right")),this.adjustChordsDuration(this.measure)&&i.push(this.measure)),this.measure=new e.Measure(i.length+1,this.options),i.length||(this.measure.attributes.push({divisions:this.options.divisions},{_name:"clef",_attrs:[{"print-object":this.options.clef?"yes":"no"}],_content:[{sign:"G"},{line:2}]},{"staff-details":{"staff-lines":0}},{"measure-style":[{_name:"slash",_attrs:{type:"start","use-stems":this.options.notation==="rhythmic"?"yes":"no"}}]},this.convertKey()),this.song.bpm&&this.measure.body._content.push(this.convertTempo(this.song.bpm)),this.measure.body._content.push(this.convertStyleAndGroove(this.song.style,this.song.groove))),this.measure.barlines.push(this.convertBarline(a.bars,"left")),this.barRepeat&&(this.measure.chords=[...i[i.length-this.barRepeat-1].chords])),!this.measure)return(a.chord||a.annots.length||a.comments.length||a.bars&&a.bars!==")")&&this._log(M.Warn,`Found non-empty orphan cell ${JSON.stringify(a)}`,i[i.length-1]),this.emptyCells++,t(s)&&(this.emptyCellNewSystem=!0),i;if((t(s)||this.emptyCellNewSystem)&&this.measure.body._content.splice(0,0,{_name:"print",_attrs:{"new-system":"yes"},_content:{...this.emptyCellNewSystem&&{"system-layout":{"system-margins":[{"left-margin":e._mmToTenths(this.cellWidth*this.emptyCells)},{"right-margin":"0.00"}]}}}}),!this.emptyCellNewSystem&&this.emptyCells>0&&(this.measure.body._content[0]?._name==="print"&&this.measure.body._content[0]._attrs?.["new-system"]==="yes"?i[i.length-1].body._content.splice(0,0,{_name:"print",_content:{"system-layout":{"system-margins":[{"left-margin":"0.00"},{"right-margin":e._mmToTenths(this.cellWidth*this.emptyCells)}]}}}):this.measure.body._content.splice(0,0,{_name:"print",_content:{"measure-layout":{"measure-distance":e._mmToTenths(this.cellWidth*this.emptyCells)}}})),this.emptyCellNewSystem=!1,this.emptyCells=0,a.chord)switch(a.chord.note){case"x":{this.barRepeat=1,this.measure.chords=[...i[i.length-this.barRepeat].chords];break}case"r":{this.barRepeat=2,this.measure.chords=[...i[i.length-this.barRepeat].chords];break}case"p":if(this.measure.chords.length){this.measure.chords[this.measure.chords.length-1].spaces++;break}case"W":{let u=this.measure;if(u.chords.length||(u=i.slice().reverse().find(o=>o.chords.length),u||this._log(M.Error,`Cannot find any measure with chords prior to ${JSON.stringify(a.chord)}`)),u){let o=u.chords[u.chords.length-1].ireal;o.over=a.chord.over,o.alternate=a.chord.alternate,this.measure.chords.push(this.convertChord(o))}break}case" ":{this._log(M.Warn,`Unhandled empty/alternate chord ${JSON.stringify(a.chord)}`);break}default:this.measure.chords.push(this.convertChord(a.chord))}else this.barRepeat||this.measure.chords.length&&this.measure.chords[this.measure.chords.length-1].spaces++;return a.annots.forEach(u=>{switch(u[0]){case"*":{let o=u.slice(1);this.measure.body._content.push(this.convertSection(o));break}case"T":{let o=u.slice(1);this.measure.attributes.push(this.convertTime(o));break}case"S":{this.measure.body._content.push(this.convertSegno());break}case"N":{let o=parseInt(u.slice(1));if(o<1&&(o=i.slice().reverse().find(p=>!!p.barEnding)?.barEnding??1),this.measure.barlines[0]._content.push(this.convertEnding(o,"start")),o>1){i[i.length-1].barlines[1]._content.push(this.convertEnding(o-1,"stop"));let c=i.slice().reverse().find(p=>p.barEnding===o-1);if(!c)this._log(M.Error,`Cannot find ending ${o-1} in right barline of any measure`);else{let p=c.barlines[1]._content.findIndex(f=>!!f&&f._name==="ending");p===-1&&this._log(M.Error,`Cannot find ending ${o-1} in right barline`,c),delete c.barlines[1]._content[p]}}this.measure.barEnding=o;break}case"Q":{this.measure.body._content.push(this.convertToCoda()),this.codas.push(this.measure);break}case"l":case"s":break;case"f":{this.measure.chords[this.measure.chords.length-1].fermata=!0;break}case"U":{this.measure.body._content.push(this.convertFine("END"));break}default:this._log(M.Warn,`Unhandled annotation "${u}"`)}}),a.comments.map(u=>u.trim()).forEach(u=>{let o=this._map(e.mapRepeats,u);o?this.measure.body._content.push(o.call(this,u)):this.measure.body._content.push(this.convertComment(u))}),a.bars.match(/\)|\}|\]|Z/)&&this.measure.chords.length&&(this.measure.barlines.push(this.convertBarline(a.bars,"right")),this.measure.barEnding&&this.measure.barlines[1]._content.push(this.convertEnding(this.measure.barEnding,"discontinue")),this.adjustChordsDuration(this.measure)&&i.push(this.measure),this.measure=null,this.barRepeat&&this.barRepeat--),i},[]),n=this.song.cells.length%16-this.emptyCells;if(n>0&&r.length>0&&r[r.length-1].body._content.splice(0,0,{_name:"print",_content:{"system-layout":{"system-margins":[{"left-margin":"0.00"},{"right-margin":e._mmToTenths(this.cellWidth*n)}]}}}),this.codas.length){let i=this.codas[this.codas.length-1],a=i.body._content.findIndex(s=>s._name==="direction"&&Array.isArray(s._content)&&s._content.some(u=>u._name==="sound"&&Object.keys(u._attrs).includes("tocoda")));a===-1&&this._log(M.Warn,"Cannot find sound direction",i),i.body._content[a]=this.convertCoda()}return r.map(i=>i.assemble())}static reorderSequence(t,r,n){return r.filter(i=>Object.keys(i).length).sort((i,a)=>{let s=Object.keys(i)[0];s==="_name"&&(s=i[s]);let u=Object.keys(a)[0];u==="_name"&&(u=a[u]);let o=n.indexOf(s),c=n.indexOf(u);return o===-1&&this._log(M.Warn,`Unrecognized element "${s}"`,t),c===-1&&this._log(M.Warn,`Unrecognized element "${u}"`,t),o-c})}convertRepeatNx(t){let r=null;(r=t.match(/(\d+)x/))!==null&&(this.repeats=r[1])}convertFine(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{fine:"yes"}}]}}convertDaCapo(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{dacapo:"yes"}}]}}convertDalSegno(t){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:t}},{_name:"sound",_attrs:{dalsegno:"yes"}}]}}convertComment(t){return{_name:"direction",_attrs:{placement:t[0]==="*"?"above":"below"},_content:{"direction-type":{words:t[0]==="*"?t.slice(3):t}}}}convertEnding(t,r){return{_name:"ending",_attrs:{number:t,type:r},_content:`${t}.`}}convertBarline(t,r){let n="regular",i=null;return t.match(/\[|\]/)?n="light-light":t.match(/Z/)?n="light-heavy":t.match(/\{|\}/)&&(n=r==="left"?"heavy-light":"light-heavy",i=r==="left"?"forward":"backward"),i==="forward"&&(this.repeats=2),{_name:"barline",_attrs:{location:r},_content:[{"bar-style":n},{...i&&{_name:"repeat",_attrs:{direction:i,...i==="backward"&&{times:this.repeats}}}}]}}convertSection(t){return t==="i"&&(t="Intro"),{_name:"direction",_attrs:{placement:"above"},_content:{"direction-type":{rehearsal:t}}}}convertSegno(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{_name:"segno"}},{_name:"sound",_attrs:{segno:"segno"}}]}}convertCoda(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{_name:"coda"}},{_name:"sound",_attrs:{coda:"coda"}}]}}convertToCoda(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{words:"To Coda"}},{_name:"sound",_attrs:{tocoda:"coda"}}]}}convertTempo(t){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{_name:"metronome",_attrs:{parentheses:"no"},_content:[{"beat-unit":this.calculateChordDuration(1)[0].type},{"per-minute":t}]}]},{_name:"sound",_attrs:{tempo:t}}]}}convertTime(t){let r=parseInt(t[0]),n=parseInt(t[1]);return t==="12"&&(r=12,n=8),this.time={beats:r,beatType:n},{time:[{beats:r},{"beat-type":n}]}}adjustChordsDuration(t){if(t.chords.length>this.time.beats)return this._log(M.Error,`Too many chords (${t.chords.length} out of ${this.time.beats})`,t),!0;let r=t.chords.reduce((n,i)=>n+1+i.spaces,0);if(!r)return this._log(M.Warn,"No chord found. Skipping current measure.",t),!1;if(r>this.time.beats){let n=0;for(;r>this.time.beats;)t.chords[n].spaces>0&&(t.chords[n].spaces--,r--),n=(n+1)%t.chords.length}else{let n=0;for(;r(n.notes=this.calculateChordDuration(1+n.spaces).map((i,a,s)=>this.convertChordNote(i,a===s.length-1?n.fermata:!1,this.options.notation==="rhythmic"&&s.length>1?a>0?"stop":"start":null)),n)),!0}calculateChordDuration(t){let r={1:[{t:"eighth",d:0,b:1}],2:[{t:"quarter",d:0,b:2}],3:[{t:"quarter",d:1,b:3}],4:[{t:"half",d:0,b:4}],5:[{t:"quarter",d:1,b:3},{t:"quarter",d:0,b:2}],6:[{t:"half",d:1,b:6}],7:[{t:"half",d:2,b:7}],8:[{t:"whole",d:0,b:8}],9:[{t:"half",d:1,b:6},{t:"quarter",d:1,b:3}],10:[{t:"half",d:1,b:6},{t:"half",d:0,b:4}],11:[{t:"half",d:2,b:7},{t:"half",d:0,b:4}],12:[{t:"whole",d:1,b:12}],13:[{t:"half",d:2,b:7},{t:"half",d:1,b:6}],14:[{t:"whole",d:2,b:14}],15:[{t:"whole",d:0,b:8},{t:"half",d:2,b:7}]};if(this.options.notation==="slash"){let n=8/this.time.beatType;return Array(t).fill(this._map(r,n,[],`Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`).map(i=>({duration:i.b*this.options.divisions/2,type:i.t,dots:i.d}))[0])}else{let n=t*8/this.time.beatType;return this._map(r,n,[],`Unexpected beat count ${t} for time signature ${this.time.beats}/${this.time.beatType}`).map(i=>({duration:i.b*this.options.divisions/2,type:i.t,dots:i.d}))}}convertChordNote(t,r=!1,n=null){let i=e.mapFifthsToAlters[this.fifths>=0?"sharp":"flat"].slice(0,Math.abs(this.fifths)),a={_name:"pitch",_content:[{step:this.options.step},{alter:i.includes(this.options.step)?this.fifths>0?1:-1:0},{octave:this.options.octave}]},s=[];return r&&s.push({_name:"fermata"}),n&&s.push({_name:"tied",_attrs:{type:n}}),e.reorderSequence(this.measure,[a,{_name:"cue"},{_name:"notehead",_content:this.options.notehead,_attrs:[{"font-size":this.options.noteheadSize}]},{duration:t.duration},{voice:1},{_name:"type",_attrs:{size:"full"},_content:t.type},{...s.length&&{notations:e.reorderSequence(this.measure,s,e.sequenceNotations)}}].concat(Array(t.dots).fill({_name:"dot"})),e.sequenceNote)}convertChordDegree(t,r,n){return{_name:"degree",_attrs:{"print-object":"no"},_content:[{"degree-value":t},{"degree-alter":n},{"degree-type":r}]}}convertChordSymbol(t){let r=this.renderChord(this.parseChord(`${t.note}${t.modifiers}`));if(!r)return this._log(M.Warn,`Unrecognized chord "${t.note}${t.modifiers}"`),{rootStep:null,rootAlter:null,chordKind:null,chordDegrees:[],chordText:null};let n=r.input.rootNote[0],i=this._map(e.mapAlter,r.input.rootNote[1]||null,null,`Unrecognized accidental in chord "${r.input.rootNote}"`),a=r.formatted.descriptor+r.formatted.chordChanges.join(""),s={major:"major",major6:"major-sixth",major7:"major-seventh",dominant7:"dominant",minor:"minor",minor6:"minor-sixth",minor7:"minor-seventh",minorMajor7:"major-minor",augmented:"augmented",diminished:"diminished",diminished7:"diminished-seventh",power:"power"},u=this._map(s,r.normalized.quality,"",`Unrecognized chord quality "${r.normalized.quality}"`);if(r.normalized.extensions.length){let c=Math.max(...r.normalized.extensions.map(f=>parseInt(f))).toString(),p={9:"-ninth",11:"-11th",13:"-13th"};u=u.split("-")[0]+this._map(p,c,"",`Unhandled extension ${c}`),u==="dominant-11th"&&(r.normalized.isSuspended=!1)}[{intervals:["1","4","5"],kind:"suspended-fourth",strict:!0},{intervals:["1","5","9"],kind:"suspended-second",strict:!0},{intervals:["1","b3","b5","b7"],kind:"half-diminished",strict:!0},{intervals:["1","3","#5","b7"],kind:"augmented-seventh",strict:!1}].some(c=>{if((!c.strict||r.normalized.intervals.length===c.intervals.length)&&c.intervals.every((p,f)=>p===r.normalized.intervals[f]))return u=c.kind,c.intervals.forEach(p=>{r.normalized.alterations=r.normalized.alterations.filter(f=>f===p),r.normalized.adds=r.normalized.adds.filter(f=>f===p),r.normalized.omits=r.normalized.omits.filter(f=>f===p)}),r.normalized.intervals.forEach(p=>{c.intervals.includes(p)||r.normalized.adds.push(p)}),!0});let o=[];return r.normalized.isSuspended&&!u.includes("suspended")&&(r.normalized.adds.push("4"),r.normalized.adds.includes("3")||r.normalized.omits.push("3")),r.normalized.alterations.forEach(c=>{let p=c.slice(1);o.push(this.convertChordDegree(p,p==="5"||r.normalized.extensions.includes(p)?"alter":"add",this._map(e.mapAlter,c[0],0,`Unrecognized alter symbol in "${c}"`)))}),r.normalized.adds.forEach(c=>{let p=Object.keys(e.mapAlter).includes(c[0])?c[0]:null,f=p?c.slice(1):c;o.push(this.convertChordDegree(f,"add",this._map(e.mapAlter,p,0,`Unrecognized alter symbol in "${c}"`)))}),r.normalized.omits.forEach(c=>{let p=Object.keys(e.mapAlter).includes(c[0])?c[0]:null,f=p?c.slice(1):c;o.push(this.convertChordDegree(f,"subtract",this._map(e.mapAlter,p,0,`Unrecognized alter symbol in "${c}"`)))}),{rootStep:n,rootAlter:i,chordKind:u,chordDegrees:o,chordText:a}}convertChord(t){let r=null;if(t.note==="n")r=[{root:[{_name:"root-step",_attrs:{text:""},_content:this.options.step}]},{_name:"kind",_attrs:{text:"N.C."},_content:"none"}];else{let{rootStep:n,rootAlter:i,chordKind:a,chordDegrees:s,chordText:u}=this.convertChordSymbol(t),o=t.over?[{"bass-step":t.over.note[0]},{...t.over.note[1]&&{"bass-alter":this._map(e.mapAlter,t.over.note[1],null,`Unrecognized accidental in bass note "${t.over.note}"`)}}]:null;r=[{root:[{"root-step":n},{...i&&{"root-alter":i}}]},{_name:"kind",_attrs:{text:u,"use-symbols":"no"},_content:a},{...o&&{bass:o}}].concat(s)}return t.alternate&&this._log(M.Warn,`Unhandled alternate chord ${JSON.stringify(t.alternate)}`),new e.Chord(r,this.calculateChordDuration(1).map(n=>this.convertChordNote(n)),t)}convertKey(){let t={C:0,G:1,D:2,A:3,E:4,B:5,"F#":6,"C#":7,F:-1,Bb:-2,Eb:-3,Ab:-4,Db:-5,Gb:-6,Cb:-7,"A-":0,"E-":1,"B-":2,"F#-":3,"C#-":4,"G#-":5,"D#-":6,"A#-":7,"D-":-1,"G-":-2,"C-":-3,"F-":-4,"Bb-":-5,"Eb-":-6,"Ab-":-7};return this.fifths=this._map(t,this.song.key,0,`Unrecognized key signature "${this.song.key}"`),{_name:"key",_attrs:[{"print-object":this.options.keySignature?"yes":"no"}],_content:[{fifths:this.fifths},{mode:this.song.key.slice(-1)==="-"?"minor":"major"}]}}convertStyleAndGroove(t,r){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{words:t}]},{sound:[{play:[{_name:"other-play",_attrs:{type:"groove"},_content:r||t}]}]}]}}_log(t,r,n=this.measure){if(t{n.musicXml=hr.convert(n,t)}),r}async function Uj(e,t={}){return new jf.default(r=>r(tT(e,t)))}})(); + + `.trim(),indent:" "})}convertSong(){return{_name:"score-partwise",_attrs:{version:In},_content:[{work:{"work-title":this.song.title}},{identification:[{_name:"creator",_attrs:{type:"composer"},_content:this.song.composer},{encoding:[{software:`@infojunkie/ireal-musicxml ${we.version}`},{...this.options.date&&{"encoding-date":s.convertDate(new Date)}},{_name:"supports",_attrs:{element:"accidental",type:"no"}},{_name:"supports",_attrs:{element:"transpose",type:"no"}},{_name:"supports",_attrs:{attribute:"new-page",element:"print",type:"yes",value:"yes"}},{_name:"supports",_attrs:{attribute:"new-system",element:"print",type:"yes",value:"yes"}}]}]},{defaults:{scaling:{millimeters:Dn,tenths:Pn},"page-layout":{"page-height":s._mmToTenths(this.options.pageHeight),"page-width":s._mmToTenths(this.options.pageWidth),"page-margins":{"left-margin":s._mmToTenths(this.options.pageMargin,4),"right-margin":s._mmToTenths(this.options.pageMargin,4),"top-margin":s._mmToTenths(this.options.pageMargin,4),"bottom-margin":s._mmToTenths(this.options.pageMargin,4)}}}},{"part-list":{_name:"score-part",_attrs:{id:"P1"},_content:{_name:"part-name",_attrs:{"print-object":"no"},_content:"Lead Sheet"}}},{_name:"part",_attrs:{id:"P1"},_content:this.convertMeasures()}]}}static convertDate(p){return new Date(p.getTime()-p.getTimezoneOffset()*6e4).toISOString().split("T")[0]}static Measure=class{constructor(p){this.body={_name:"measure",_attrs:{number:p},_content:[]},this.attributes=[],this.chords=[],this.barlines=[],this.barEnding=null}number(){return this.body._attrs.number}assemble(){return this.attributes.length&&this.body._content.push({attributes:s.reorderSequence(this,this.attributes,s.sequenceAttributes)}),this.chords.forEach(p=>{this.body._content.push({harmony:p.harmony},...p.notes.map(u=>({note:u})))}),this.barlines[0]._content=s.reorderSequence(this,this.barlines[0]._content,s.sequenceBarline),this.body._content.splice(1,0,this.barlines[0]),this.barlines[1]._content=s.reorderSequence(this,this.barlines[1]._content,s.sequenceBarline),this.body._content.push(this.barlines[1]),this.body}};static Chord=class{constructor(p,u,g){this.harmony=p,this.notes=u,this.ireal=g,this.spaces=0,this.fermata=!1}};convertMeasures(){let p=e=>e>0&&e%16===0,u=this.song.cells.reduce((e,i,t)=>{if((i.bars.match(/\(|\{|\[/)||!this.measure&&(i.chord||i.annots.length||i.comments.length))&&(this.measure&&(this._log(tt.Warn,"Starting a new measure over existing measure. Closing current measure first."),this.measure.barlines.push(this.convertBarline("","right")),this.adjustChordsDuration(this.measure)&&e.push(this.measure)),this.measure=new s.Measure(e.length+1,this.options),e.length||(this.measure.attributes.push({divisions:this.options.divisions},{_name:"clef",_attrs:[{"print-object":this.options.clef?"yes":"no"}],_content:[{sign:"G"},{line:2}]},{"staff-details":{"staff-lines":0}},{"measure-style":[{_name:"slash",_attrs:{type:"start","use-stems":this.options.notation==="rhythmic"?"yes":"no"}}]},this.convertKey()),this.song.bpm&&this.measure.body._content.push(this.convertTempo(this.song.bpm)),this.measure.body._content.push(this.convertStyleAndGroove(this.song.style,this.song.groove))),this.measure.barlines.push(this.convertBarline(i.bars,"left")),this.barRepeat&&(this.measure.chords=[...e[e.length-this.barRepeat-1].chords])),!this.measure)return(i.chord||i.annots.length||i.comments.length||i.bars&&i.bars!==")")&&this._log(tt.Warn,`Found non-empty orphan cell ${JSON.stringify(i)}`,e[e.length-1]),this.emptyCells++,p(t)&&(this.emptyCellNewSystem=!0),e;if((p(t)||this.emptyCellNewSystem)&&this.measure.body._content.splice(0,0,{_name:"print",_attrs:{"new-system":"yes"},_content:{...this.emptyCellNewSystem&&{"system-layout":{"system-margins":[{"left-margin":s._mmToTenths(this.cellWidth*this.emptyCells)},{"right-margin":"0.00"}]}}}}),!this.emptyCellNewSystem&&this.emptyCells>0&&(this.measure.body._content[0]?._name==="print"&&this.measure.body._content[0]._attrs?.["new-system"]==="yes"?e[e.length-1].body._content.splice(0,0,{_name:"print",_content:{"system-layout":{"system-margins":[{"left-margin":"0.00"},{"right-margin":s._mmToTenths(this.cellWidth*this.emptyCells)}]}}}):this.measure.body._content.splice(0,0,{_name:"print",_content:{"measure-layout":{"measure-distance":s._mmToTenths(this.cellWidth*this.emptyCells)}}})),this.emptyCellNewSystem=!1,this.emptyCells=0,i.chord)switch(i.chord.note){case"x":{this.barRepeat=1,this.measure.chords=[...e[e.length-this.barRepeat].chords];break}case"r":{this.barRepeat=2,this.measure.chords=[...e[e.length-this.barRepeat].chords];break}case"p":if(this.measure.chords.length){this.measure.chords[this.measure.chords.length-1].spaces++;break}case"W":{let a=this.measure;if(a.chords.length||(a=e.slice().reverse().find(n=>n.chords.length),a||this._log(tt.Error,`Cannot find any measure with chords prior to ${JSON.stringify(i.chord)}`)),a){let n=a.chords[a.chords.length-1].ireal;n.over=i.chord.over,n.alternate=i.chord.alternate,this.measure.chords.push(this.convertChord(n))}break}case" ":{this._log(tt.Warn,`Unhandled empty/alternate chord ${JSON.stringify(i.chord)}`);break}default:this.measure.chords.push(this.convertChord(i.chord))}else this.barRepeat||this.measure.chords.length&&this.measure.chords[this.measure.chords.length-1].spaces++;return i.annots.forEach(a=>{switch(a[0]){case"*":{let n=a.slice(1);this.measure.body._content.push(this.convertSection(n));break}case"T":{let n=a.slice(1);this.measure.attributes.push(this.convertTime(n));break}case"S":{this.measure.body._content.push(this.convertSegno());break}case"N":{let n=parseInt(a.slice(1));if(n<1&&(n=e.slice().reverse().find(l=>!!l.barEnding)?.barEnding??1),this.measure.barlines[0]._content.push(this.convertEnding(n,"start")),n>1){e[e.length-1].barlines[1]._content.push(this.convertEnding(n-1,"stop"));let o=e.slice().reverse().find(l=>l.barEnding===n-1);if(!o)this._log(tt.Error,`Cannot find ending ${n-1} in right barline of any measure`);else{let l=o.barlines[1]._content.findIndex(h=>!!h&&h._name==="ending");l===-1&&this._log(tt.Error,`Cannot find ending ${n-1} in right barline`,o),delete o.barlines[1]._content[l]}}this.measure.barEnding=n;break}case"Q":{this.measure.body._content.push(this.convertToCoda()),this.codas.push(this.measure);break}case"l":case"s":break;case"f":{this.measure.chords[this.measure.chords.length-1].fermata=!0;break}case"U":{this.measure.body._content.push(this.convertFine("END"));break}default:this._log(tt.Warn,`Unhandled annotation "${a}"`)}}),i.comments.map(a=>a.trim()).forEach(a=>{let n=this._map(s.mapRepeats,a);n?this.measure.body._content.push(n.call(this,a)):this.measure.body._content.push(this.convertComment(a))}),i.bars.match(/\)|\}|\]|Z/)&&this.measure.chords.length&&(this.measure.barlines.push(this.convertBarline(i.bars,"right")),this.measure.barEnding&&this.measure.barlines[1]._content.push(this.convertEnding(this.measure.barEnding,"discontinue")),this.adjustChordsDuration(this.measure)&&e.push(this.measure),this.measure=null,this.barRepeat&&this.barRepeat--),e},[]),g=this.song.cells.length%16-this.emptyCells;if(g>0&&u.length>0&&u[u.length-1].body._content.splice(0,0,{_name:"print",_content:{"system-layout":{"system-margins":[{"left-margin":"0.00"},{"right-margin":s._mmToTenths(this.cellWidth*g)}]}}}),this.codas.length){let e=this.codas[this.codas.length-1],i=e.body._content.findIndex(t=>t._name==="direction"&&Array.isArray(t._content)&&t._content.some(a=>a._name==="sound"&&Object.keys(a._attrs).includes("tocoda")));i===-1&&this._log(tt.Warn,"Cannot find sound direction",e),e.body._content[i]=this.convertCoda()}return u.map(e=>e.assemble())}static reorderSequence(p,u,g){return u.filter(e=>Object.keys(e).length).sort((e,i)=>{let t=Object.keys(e)[0];t==="_name"&&(t=e[t]);let a=Object.keys(i)[0];a==="_name"&&(a=i[a]);let n=g.indexOf(t),o=g.indexOf(a);return n===-1&&this._log(tt.Warn,`Unrecognized element "${t}"`,p),o===-1&&this._log(tt.Warn,`Unrecognized element "${a}"`,p),n-o})}convertRepeatNx(p){let u=null;(u=p.match(/(\d+)x/))!==null&&(this.repeats=u[1])}convertFine(p){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:p}},{_name:"sound",_attrs:{fine:"yes"}}]}}convertDaCapo(p){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:p}},{_name:"sound",_attrs:{dacapo:"yes"}}]}}convertDalSegno(p){return{_name:"direction",_attrs:{placement:"below"},_content:[{"direction-type":{words:p}},{_name:"sound",_attrs:{dalsegno:"yes"}}]}}convertComment(p){return{_name:"direction",_attrs:{placement:p[0]==="*"?"above":"below"},_content:{"direction-type":{words:p[0]==="*"?p.slice(3):p}}}}convertEnding(p,u){return{_name:"ending",_attrs:{number:p,type:u},_content:`${p}.`}}convertBarline(p,u){let g="regular",e=null;return p.match(/\[|\]/)?g="light-light":p.match(/Z/)?g="light-heavy":p.match(/\{|\}/)&&(g=u==="left"?"heavy-light":"light-heavy",e=u==="left"?"forward":"backward"),e==="forward"&&(this.repeats=2),{_name:"barline",_attrs:{location:u},_content:[{"bar-style":g},{...e&&{_name:"repeat",_attrs:{direction:e,...e==="backward"&&{times:this.repeats}}}}]}}convertSection(p){return p==="i"&&(p="Intro"),{_name:"direction",_attrs:{placement:"above"},_content:{"direction-type":{rehearsal:p}}}}convertSegno(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{_name:"segno"}},{_name:"sound",_attrs:{segno:"segno"}}]}}convertCoda(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{_name:"coda"}},{_name:"sound",_attrs:{coda:"coda"}}]}}convertToCoda(){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":{words:"To Coda"}},{_name:"sound",_attrs:{tocoda:"coda"}}]}}convertTempo(p){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{_name:"metronome",_attrs:{parentheses:"no"},_content:[{"beat-unit":this.calculateChordDuration(1)[0].type},{"per-minute":p}]}]},{_name:"sound",_attrs:{tempo:p}}]}}convertTime(p){let u=parseInt(p[0]),g=parseInt(p[1]);return p==="12"&&(u=12,g=8),this.time={beats:u,beatType:g},{time:[{beats:u},{"beat-type":g}]}}adjustChordsDuration(p){if(p.chords.length>this.time.beats)return this._log(tt.Error,`Too many chords (${p.chords.length} out of ${this.time.beats})`,p),!0;let u=p.chords.reduce((g,e)=>g+1+e.spaces,0);if(!u)return this._log(tt.Warn,"No chord found. Skipping current measure.",p),!1;if(u>this.time.beats){let g=0;for(;u>this.time.beats;)p.chords[g].spaces>0&&(p.chords[g].spaces--,u--),g=(g+1)%p.chords.length}else{let g=0;for(;u(g.notes=this.calculateChordDuration(1+g.spaces).map((e,i,t)=>this.convertChordNote(e,i===t.length-1?g.fermata:!1,this.options.notation==="rhythmic"&&t.length>1?i>0?"stop":"start":null)),g)),!0}calculateChordDuration(p){let u={1:[{t:"eighth",d:0,b:1}],2:[{t:"quarter",d:0,b:2}],3:[{t:"quarter",d:1,b:3}],4:[{t:"half",d:0,b:4}],5:[{t:"quarter",d:1,b:3},{t:"quarter",d:0,b:2}],6:[{t:"half",d:1,b:6}],7:[{t:"half",d:2,b:7}],8:[{t:"whole",d:0,b:8}],9:[{t:"half",d:1,b:6},{t:"quarter",d:1,b:3}],10:[{t:"half",d:1,b:6},{t:"half",d:0,b:4}],11:[{t:"half",d:2,b:7},{t:"half",d:0,b:4}],12:[{t:"whole",d:1,b:12}],13:[{t:"half",d:2,b:7},{t:"half",d:1,b:6}],14:[{t:"whole",d:2,b:14}],15:[{t:"whole",d:0,b:8},{t:"half",d:2,b:7}]};if(this.options.notation==="slash"){let g=8/this.time.beatType;return Array(p).fill(this._map(u,g,[],`Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`).map(e=>({duration:e.b*this.options.divisions/2,type:e.t,dots:e.d}))[0])}else{let g=p*8/this.time.beatType;return this._map(u,g,[],`Unexpected beat count ${p} for time signature ${this.time.beats}/${this.time.beatType}`).map(e=>({duration:e.b*this.options.divisions/2,type:e.t,dots:e.d}))}}convertChordNote(p,u=!1,g=null){let e=s.mapFifthsToAlters[this.fifths>=0?"sharp":"flat"].slice(0,Math.abs(this.fifths)),i={_name:"pitch",_content:[{step:this.options.step},{alter:e.includes(this.options.step)?this.fifths>0?1:-1:0},{octave:this.options.octave}]},t=[];return u&&t.push({_name:"fermata"}),g&&t.push({_name:"tied",_attrs:{type:g}}),s.reorderSequence(this.measure,[i,{_name:"cue"},{_name:"notehead",_content:this.options.notehead,_attrs:[{"font-size":this.options.noteheadSize}]},{duration:p.duration},{voice:1},{_name:"type",_attrs:{size:"full"},_content:p.type},{...t.length&&{notations:s.reorderSequence(this.measure,t,s.sequenceNotations)}}].concat(Array(p.dots).fill({_name:"dot"})),s.sequenceNote)}convertChordDegree(p,u,g){return{_name:"degree",_attrs:{"print-object":"no"},_content:[{"degree-value":p},{"degree-alter":g},{"degree-type":u}]}}convertChordSymbol(p){let u=this.renderChord(this.parseChord(`${p.note}${p.modifiers}`));if(!u)return this._log(tt.Warn,`Unrecognized chord "${p.note}${p.modifiers}"`),{rootStep:null,rootAlter:null,chordKind:null,chordDegrees:[],chordText:null};let g=u.input.rootNote[0],e=this._map(s.mapAlter,u.input.rootNote[1]||null,null,`Unrecognized accidental in chord "${u.input.rootNote}"`),i=u.formatted.descriptor+u.formatted.chordChanges.join(""),t={major:"major",major6:"major-sixth",major7:"major-seventh",dominant7:"dominant",minor:"minor",minor6:"minor-sixth",minor7:"minor-seventh",minorMajor7:"major-minor",augmented:"augmented",diminished:"diminished",diminished7:"diminished-seventh",power:"power"},a=this._map(t,u.normalized.quality,"",`Unrecognized chord quality "${u.normalized.quality}"`);if(u.normalized.extensions.length){let o=Math.max(...u.normalized.extensions.map(h=>parseInt(h))).toString(),l={9:"-ninth",11:"-11th",13:"-13th"};a=a.split("-")[0]+this._map(l,o,"",`Unhandled extension ${o}`),a==="dominant-11th"&&(u.normalized.isSuspended=!1)}[{intervals:["1","4","5"],kind:"suspended-fourth",strict:!0},{intervals:["1","5","9"],kind:"suspended-second",strict:!0},{intervals:["1","b3","b5","b7"],kind:"half-diminished",strict:!0},{intervals:["1","3","#5","b7"],kind:"augmented-seventh",strict:!1}].some(o=>{if((!o.strict||u.normalized.intervals.length===o.intervals.length)&&o.intervals.every((l,h)=>l===u.normalized.intervals[h]))return a=o.kind,o.intervals.forEach(l=>{u.normalized.alterations=u.normalized.alterations.filter(h=>h===l),u.normalized.adds=u.normalized.adds.filter(h=>h===l),u.normalized.omits=u.normalized.omits.filter(h=>h===l)}),u.normalized.intervals.forEach(l=>{o.intervals.includes(l)||u.normalized.adds.push(l)}),!0});let n=[];return u.normalized.isSuspended&&!a.includes("suspended")&&(u.normalized.adds.push("4"),u.normalized.adds.includes("3")||u.normalized.omits.push("3")),u.normalized.alterations.forEach(o=>{let l=o.slice(1);n.push(this.convertChordDegree(l,l==="5"||u.normalized.extensions.includes(l)?"alter":"add",this._map(s.mapAlter,o[0],0,`Unrecognized alter symbol in "${o}"`)))}),u.normalized.adds.forEach(o=>{let l=Object.keys(s.mapAlter).includes(o[0])?o[0]:null,h=l?o.slice(1):o;n.push(this.convertChordDegree(h,"add",this._map(s.mapAlter,l,0,`Unrecognized alter symbol in "${o}"`)))}),u.normalized.omits.forEach(o=>{let l=Object.keys(s.mapAlter).includes(o[0])?o[0]:null,h=l?o.slice(1):o;n.push(this.convertChordDegree(h,"subtract",this._map(s.mapAlter,l,0,`Unrecognized alter symbol in "${o}"`)))}),{rootStep:g,rootAlter:e,chordKind:a,chordDegrees:n,chordText:i}}convertChord(p){let u=null;if(p.note==="n")u=[{root:[{_name:"root-step",_attrs:{text:""},_content:this.options.step}]},{_name:"kind",_attrs:{text:"N.C."},_content:"none"}];else{let{rootStep:g,rootAlter:e,chordKind:i,chordDegrees:t,chordText:a}=this.convertChordSymbol(p),n=p.over?[{"bass-step":p.over.note[0]},{...p.over.note[1]&&{"bass-alter":this._map(s.mapAlter,p.over.note[1],null,`Unrecognized accidental in bass note "${p.over.note}"`)}}]:null;u=[{root:[{"root-step":g},{...e&&{"root-alter":e}}]},{_name:"kind",_attrs:{text:a,"use-symbols":"no"},_content:i},{...n&&{bass:n}}].concat(t)}return p.alternate&&this._log(tt.Warn,`Unhandled alternate chord ${JSON.stringify(p.alternate)}`),new s.Chord(u,this.calculateChordDuration(1).map(g=>this.convertChordNote(g)),p)}convertKey(){let p={C:0,G:1,D:2,A:3,E:4,B:5,"F#":6,"C#":7,F:-1,Bb:-2,Eb:-3,Ab:-4,Db:-5,Gb:-6,Cb:-7,"A-":0,"E-":1,"B-":2,"F#-":3,"C#-":4,"G#-":5,"D#-":6,"A#-":7,"D-":-1,"G-":-2,"C-":-3,"F-":-4,"Bb-":-5,"Eb-":-6,"Ab-":-7};return this.fifths=this._map(p,this.song.key,0,`Unrecognized key signature "${this.song.key}"`),{_name:"key",_attrs:[{"print-object":this.options.keySignature?"yes":"no"}],_content:[{fifths:this.fifths},{mode:this.song.key.slice(-1)==="-"?"minor":"major"}]}}convertStyleAndGroove(p,u){return{_name:"direction",_attrs:{placement:"above"},_content:[{"direction-type":[{words:p}]},{sound:[{play:[{_name:"other-play",_attrs:{type:"groove"},_content:u||p}]}]}]}}_log(p,u,g=this.measure){if(p{g.musicXml=$e.convert(g,p)}),u}async function Es(s,p={}){return new _n.default(u=>u(ns(s,p)))}})(); //# sourceMappingURL=ireal-musicxml.js.map diff --git a/build/ireal-musicxml.js.map b/build/ireal-musicxml.js.map index 8f7af20..4437a59 100644 --- a/build/ireal-musicxml.js.map +++ b/build/ireal-musicxml.js.map @@ -1,7 +1,7 @@ { "version": 3, - "sources": ["../node_modules/asap/browser-raw.js", "../node_modules/promise/lib/core.js", "../node_modules/promise/lib/done.js", "../node_modules/promise/lib/finally.js", "../node_modules/promise/lib/es6-extensions.js", "../node_modules/asap/browser-asap.js", "../node_modules/promise/lib/node-extensions.js", "../node_modules/promise/lib/synchronous.js", "../node_modules/promise/lib/index.js", "../node_modules/promise/index.js", "../node_modules/fast-diff/diff.js", "../node_modules/jstoxml/dist/jstoxml.js", "../node_modules/lodash/_listCacheClear.js", "../node_modules/lodash/eq.js", "../node_modules/lodash/_assocIndexOf.js", "../node_modules/lodash/_listCacheDelete.js", "../node_modules/lodash/_listCacheGet.js", "../node_modules/lodash/_listCacheHas.js", "../node_modules/lodash/_listCacheSet.js", "../node_modules/lodash/_ListCache.js", "../node_modules/lodash/_stackClear.js", "../node_modules/lodash/_stackDelete.js", "../node_modules/lodash/_stackGet.js", "../node_modules/lodash/_stackHas.js", "../node_modules/lodash/_freeGlobal.js", "../node_modules/lodash/_root.js", "../node_modules/lodash/_Symbol.js", "../node_modules/lodash/_getRawTag.js", "../node_modules/lodash/_objectToString.js", "../node_modules/lodash/_baseGetTag.js", "../node_modules/lodash/isObject.js", "../node_modules/lodash/isFunction.js", "../node_modules/lodash/_coreJsData.js", "../node_modules/lodash/_isMasked.js", "../node_modules/lodash/_toSource.js", "../node_modules/lodash/_baseIsNative.js", "../node_modules/lodash/_getValue.js", "../node_modules/lodash/_getNative.js", "../node_modules/lodash/_Map.js", "../node_modules/lodash/_nativeCreate.js", "../node_modules/lodash/_hashClear.js", "../node_modules/lodash/_hashDelete.js", "../node_modules/lodash/_hashGet.js", "../node_modules/lodash/_hashHas.js", "../node_modules/lodash/_hashSet.js", "../node_modules/lodash/_Hash.js", "../node_modules/lodash/_mapCacheClear.js", "../node_modules/lodash/_isKeyable.js", "../node_modules/lodash/_getMapData.js", "../node_modules/lodash/_mapCacheDelete.js", "../node_modules/lodash/_mapCacheGet.js", "../node_modules/lodash/_mapCacheHas.js", "../node_modules/lodash/_mapCacheSet.js", "../node_modules/lodash/_MapCache.js", "../node_modules/lodash/_stackSet.js", "../node_modules/lodash/_Stack.js", "../node_modules/lodash/_arrayEach.js", "../node_modules/lodash/_defineProperty.js", "../node_modules/lodash/_baseAssignValue.js", "../node_modules/lodash/_assignValue.js", "../node_modules/lodash/_copyObject.js", "../node_modules/lodash/_baseTimes.js", "../node_modules/lodash/isObjectLike.js", "../node_modules/lodash/_baseIsArguments.js", "../node_modules/lodash/isArguments.js", "../node_modules/lodash/isArray.js", "../node_modules/lodash/stubFalse.js", "../node_modules/lodash/isBuffer.js", "../node_modules/lodash/_isIndex.js", "../node_modules/lodash/isLength.js", "../node_modules/lodash/_baseIsTypedArray.js", "../node_modules/lodash/_baseUnary.js", "../node_modules/lodash/_nodeUtil.js", "../node_modules/lodash/isTypedArray.js", "../node_modules/lodash/_arrayLikeKeys.js", "../node_modules/lodash/_isPrototype.js", "../node_modules/lodash/_overArg.js", "../node_modules/lodash/_nativeKeys.js", "../node_modules/lodash/_baseKeys.js", "../node_modules/lodash/isArrayLike.js", "../node_modules/lodash/keys.js", "../node_modules/lodash/_baseAssign.js", "../node_modules/lodash/_nativeKeysIn.js", "../node_modules/lodash/_baseKeysIn.js", "../node_modules/lodash/keysIn.js", "../node_modules/lodash/_baseAssignIn.js", "../node_modules/lodash/_cloneBuffer.js", "../node_modules/lodash/_copyArray.js", "../node_modules/lodash/_arrayFilter.js", "../node_modules/lodash/stubArray.js", "../node_modules/lodash/_getSymbols.js", "../node_modules/lodash/_copySymbols.js", "../node_modules/lodash/_arrayPush.js", "../node_modules/lodash/_getPrototype.js", "../node_modules/lodash/_getSymbolsIn.js", "../node_modules/lodash/_copySymbolsIn.js", "../node_modules/lodash/_baseGetAllKeys.js", "../node_modules/lodash/_getAllKeys.js", "../node_modules/lodash/_getAllKeysIn.js", "../node_modules/lodash/_DataView.js", "../node_modules/lodash/_Promise.js", "../node_modules/lodash/_Set.js", "../node_modules/lodash/_WeakMap.js", "../node_modules/lodash/_getTag.js", "../node_modules/lodash/_initCloneArray.js", "../node_modules/lodash/_Uint8Array.js", "../node_modules/lodash/_cloneArrayBuffer.js", "../node_modules/lodash/_cloneDataView.js", "../node_modules/lodash/_cloneRegExp.js", "../node_modules/lodash/_cloneSymbol.js", "../node_modules/lodash/_cloneTypedArray.js", "../node_modules/lodash/_initCloneByTag.js", "../node_modules/lodash/_baseCreate.js", "../node_modules/lodash/_initCloneObject.js", "../node_modules/lodash/_baseIsMap.js", "../node_modules/lodash/isMap.js", "../node_modules/lodash/_baseIsSet.js", "../node_modules/lodash/isSet.js", "../node_modules/lodash/_baseClone.js", "../node_modules/lodash/cloneDeep.js", "../node_modules/lodash/isString.js", "../node_modules/lodash/constant.js", "../node_modules/lodash/_createBaseFor.js", "../node_modules/lodash/_baseFor.js", "../node_modules/lodash/_baseForOwn.js", "../node_modules/lodash/_baseInverter.js", "../node_modules/lodash/_createInverter.js", "../node_modules/lodash/identity.js", "../node_modules/lodash/invert.js", "../node_modules/lodash/_arrayMap.js", "../node_modules/lodash/isSymbol.js", "../node_modules/lodash/_isKey.js", "../node_modules/lodash/memoize.js", "../node_modules/lodash/_memoizeCapped.js", "../node_modules/lodash/_stringToPath.js", "../node_modules/lodash/_baseToString.js", "../node_modules/lodash/toString.js", "../node_modules/lodash/_castPath.js", "../node_modules/lodash/last.js", "../node_modules/lodash/_toKey.js", "../node_modules/lodash/_baseGet.js", "../node_modules/lodash/_baseSlice.js", "../node_modules/lodash/_parent.js", "../node_modules/lodash/_baseUnset.js", "../node_modules/lodash/isPlainObject.js", "../node_modules/lodash/_customOmitClone.js", "../node_modules/lodash/_isFlattenable.js", "../node_modules/lodash/_baseFlatten.js", "../node_modules/lodash/flatten.js", "../node_modules/lodash/_apply.js", "../node_modules/lodash/_overRest.js", "../node_modules/lodash/_baseSetToString.js", "../node_modules/lodash/_shortOut.js", "../node_modules/lodash/_setToString.js", "../node_modules/lodash/_flatRest.js", "../node_modules/lodash/omit.js", "../node_modules/lodash/_setCacheAdd.js", "../node_modules/lodash/_setCacheHas.js", "../node_modules/lodash/_SetCache.js", "../node_modules/lodash/_arraySome.js", "../node_modules/lodash/_cacheHas.js", "../node_modules/lodash/_equalArrays.js", "../node_modules/lodash/_mapToArray.js", "../node_modules/lodash/_setToArray.js", "../node_modules/lodash/_equalByTag.js", "../node_modules/lodash/_equalObjects.js", "../node_modules/lodash/_baseIsEqualDeep.js", "../node_modules/lodash/_baseIsEqual.js", "../node_modules/lodash/isEqual.js", "../node_modules/lodash/clone.js", "../node_modules/lodash/_baseIsMatch.js", "../node_modules/lodash/_isStrictComparable.js", "../node_modules/lodash/_getMatchData.js", "../node_modules/lodash/_matchesStrictComparable.js", "../node_modules/lodash/_baseMatches.js", "../node_modules/lodash/get.js", "../node_modules/lodash/_baseHasIn.js", "../node_modules/lodash/_hasPath.js", "../node_modules/lodash/hasIn.js", "../node_modules/lodash/_baseMatchesProperty.js", "../node_modules/lodash/_baseProperty.js", "../node_modules/lodash/_basePropertyDeep.js", "../node_modules/lodash/property.js", "../node_modules/lodash/_baseIteratee.js", "../node_modules/lodash/_createFind.js", "../node_modules/lodash/_baseFindIndex.js", "../node_modules/lodash/_trimmedEndIndex.js", "../node_modules/lodash/_baseTrim.js", "../node_modules/lodash/toNumber.js", "../node_modules/lodash/toFinite.js", "../node_modules/lodash/toInteger.js", "../node_modules/lodash/findIndex.js", "../node_modules/lodash/find.js", "../node_modules/lodash/_baseIsNaN.js", "../node_modules/lodash/_strictIndexOf.js", "../node_modules/lodash/_baseIndexOf.js", "../node_modules/lodash/_arrayIncludes.js", "../node_modules/lodash/_arrayIncludesWith.js", "../node_modules/lodash/noop.js", "../node_modules/lodash/_createSet.js", "../node_modules/lodash/_baseUniq.js", "../node_modules/lodash/uniq.js", "../node_modules/lodash/_baseDifference.js", "../node_modules/lodash/_baseRest.js", "../node_modules/lodash/isArrayLikeObject.js", "../node_modules/lodash/without.js", "../node_modules/lodash/difference.js", "../src/lib/index.js", "../src/lib/parser.js", "../src/lib/converter.js", "../node_modules/chord-symbol/src/helpers/chain.js", "../node_modules/chord-symbol/src/parser/chordParserFactory.js", "../node_modules/chord-symbol/src/helpers/checkCustomFilters.js", "../node_modules/chord-symbol/src/dictionaries/notes.js", "../node_modules/chord-symbol/src/dictionaries/allKeys.js", "../node_modules/chord-symbol/src/helpers/ChordParsingError.js", "../node_modules/chord-symbol/src/helpers/hasElement.js", "../node_modules/chord-symbol/src/parser/filters/checkIntervalsConsistency.js", "../node_modules/chord-symbol/src/parser/filters/formatSymbol.js", "../node_modules/chord-symbol/src/dictionaries/qualities.js", "../node_modules/chord-symbol/src/parser/filters/formatSymbolParts.js", "../node_modules/chord-symbol/src/dictionaries/degrees.js", "../node_modules/chord-symbol/src/parser/filters/formatNumeralSymbol.js", "../node_modules/chord-symbol/src/parser/filters/getParsableDescriptor.js", "../node_modules/chord-symbol/src/parser/filters/initChord.js", "../node_modules/chord-symbol/src/dictionaries/scales.js", "../node_modules/chord-symbol/src/parser/filters/nameIndividualChordNotes.js", "../node_modules/chord-symbol/src/parser/filters/normalizeNotes.js", "../node_modules/chord-symbol/src/parser/filters/normalizeDescriptor.js", "../node_modules/chord-symbol/src/parser/filters/parseBase.js", "../node_modules/chord-symbol/src/parser/filters/parseDescriptor.js", "../node_modules/chord-symbol/src/dictionaries/modifiers.js", "../node_modules/chord-symbol/src/dictionaries/intervalsToSemitones.js", "../node_modules/chord-symbol/src/renderer/chordRendererFactory.js", "../node_modules/chord-symbol/src/renderer/filters/shortenNormalized.js", "../node_modules/chord-symbol/src/renderer/filters/simplify.js", "../node_modules/chord-symbol/src/renderer/filters/transpose.js", "../node_modules/chord-symbol/src/renderer/filters/convertNotationSystem.js", "../node_modules/chord-symbol/src/renderer/printer/text.js", "../node_modules/chord-symbol/src/renderer/printer/raw.js", "../package.json", "../src/lib/version.js"], - "sourcesContent": ["\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js\u2019s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n", "'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._x = 0;\n this._y = 0;\n this._z = null;\n this._A = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._B = null;\nPromise._C = null;\nPromise._D = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._y === 3) {\n self = self._z;\n }\n if (Promise._B) {\n Promise._B(self);\n }\n if (self._y === 0) {\n if (self._x === 0) {\n self._x = 1;\n self._A = deferred;\n return;\n }\n if (self._x === 1) {\n self._x = 2;\n self._A = [self._A, deferred];\n return;\n }\n self._A.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._y === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._y === 1) {\n resolve(deferred.promise, self._z);\n } else {\n reject(deferred.promise, self._z);\n }\n return;\n }\n var ret = tryCallOne(cb, self._z);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._y = 3;\n self._z = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._y = 1;\n self._z = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._y = 2;\n self._z = newValue;\n if (Promise._C) {\n Promise._C(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._x === 1) {\n handle(self, self._A);\n self._A = null;\n }\n if (self._x === 2) {\n for (var i = 0; i < self._A.length; i++) {\n handle(self, self._A[i]);\n }\n self._A = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n", "'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._D);\n p._y = 1;\n p._z = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._y === 3) {\n val = val._z;\n }\n if (val._y === 1) return res(i, val._z);\n if (val._y === 2) reject(val._z);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nfunction onSettledFulfill(value) {\n return { status: 'fulfilled', value: value };\n}\nfunction onSettledReject(reason) {\n return { status: 'rejected', reason: reason };\n}\nfunction mapAllSettled(item) {\n if(item && (typeof item === 'object' || typeof item === 'function')){\n if(item instanceof Promise && item.then === Promise.prototype.then){\n return item.then(onSettledFulfill, onSettledReject);\n }\n var then = item.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(item)).then(onSettledFulfill, onSettledReject)\n }\n }\n\n return onSettledFulfill(item);\n}\nPromise.allSettled = function (iterable) {\n return Promise.all(iterableToArray(iterable).map(mapAllSettled));\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\nfunction getAggregateError(errors){\n if(typeof AggregateError === 'function'){\n return new AggregateError(errors,'All promises were rejected');\n }\n\n var error = new Error('All promises were rejected');\n\n error.name = 'AggregateError';\n error.errors = errors;\n\n return error;\n}\n\nPromise.any = function promiseAny(values) {\n return new Promise(function(resolve, reject) {\n var promises = iterableToArray(values);\n var hasResolved = false;\n var rejectionReasons = [];\n\n function resolveOnce(value) {\n if (!hasResolved) {\n hasResolved = true;\n resolve(value);\n }\n }\n\n function rejectionCheck(reason) {\n rejectionReasons.push(reason);\n\n if (rejectionReasons.length === promises.length) {\n reject(getAggregateError(rejectionReasons));\n }\n }\n\n if(promises.length === 0){\n reject(getAggregateError(rejectionReasons));\n } else {\n promises.forEach(function(value){\n Promise.resolve(value).then(resolveOnce, rejectionCheck);\n });\n }\n });\n};\n", "\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n", "'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._y === 3) {\n return this._z.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getReason = function () {\n if (this._y === 3) {\n return this._z.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getState = function () {\n if (this._y === 3) {\n return this._z.getState();\n }\n if (this._y === -1 || this._y === -2) {\n return 0;\n }\n\n return this._y;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n", "'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n", "'use strict';\n\nmodule.exports = require('./lib')\n", "/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @param {boolean} [cleanup] Apply semantic cleanup before returning.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, cleanup, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n var commonlength = diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n if (cleanup) {\n diff_cleanupSemantic(diffs);\n }\n return diffs;\n}\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)],\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = delta % 2 !== 0;\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (\n x1 < text1_length &&\n y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (\n x2 < text1_length &&\n y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ===\n text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n}\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = diff_main(text1a, text2a);\n var diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\nfunction diff_commonOverlap_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: http://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (\n found == 0 ||\n text1.substring(text_length - length) == text2.substring(0, length)\n ) {\n best = length;\n length++;\n }\n }\n}\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = \"\";\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n var prefixLength = diff_commonPrefix(\n longtext.substring(i),\n shorttext.substring(j)\n );\n var suffixLength = diff_commonSuffix(\n longtext.substring(0, i),\n shorttext.substring(0, j)\n );\n if (best_common.length < suffixLength + prefixLength) {\n best_common =\n shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a,\n best_longtext_b,\n best_shorttext_a,\n best_shorttext_b,\n best_common,\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 4)\n );\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 2)\n );\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemantic(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastequality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) {\n // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = diffs[pointer][1];\n } else {\n // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (\n lastequality &&\n lastequality.length <=\n Math.max(length_insertions1, length_deletions1) &&\n lastequality.length <= Math.max(length_insertions2, length_deletions2)\n ) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0, [\n DIFF_DELETE,\n lastequality,\n ]);\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (\n diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT\n ) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (\n overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2\n ) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n insertion.substring(0, overlap_length1),\n ]);\n diffs[pointer - 1][1] = deletion.substring(\n 0,\n deletion.length - overlap_length1\n );\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (\n overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2\n ) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n deletion.substring(0, overlap_length2),\n ]);\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] = insertion.substring(\n 0,\n insertion.length - overlap_length2\n );\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] = deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n}\n\nvar nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\nvar whitespaceRegex_ = /\\s/;\nvar linebreakRegex_ = /[\\r\\n]/;\nvar blanklineEndRegex_ = /\\n\\r?\\n$/;\nvar blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemanticLossless(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_);\n var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);\n var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);\n var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);\n var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n}\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, \"\"]); // Add a dummy entry at the end.\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = \"\";\n var text_insert = \"\";\n var commonlength;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n var previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (\n previous_equality >= 0 &&\n ends_with_pair_start(diffs[previous_equality][1])\n ) {\n var stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(\n 0,\n -1\n );\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n var stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(\n 0,\n commonlength\n );\n } else {\n diffs.splice(0, 0, [\n DIFF_EQUAL,\n text_insert.substring(0, commonlength),\n ]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) +\n diffs[pointer][1];\n text_insert = text_insert.substring(\n 0,\n text_insert.length - commonlength\n );\n text_delete = text_delete.substring(\n 0,\n text_delete.length - commonlength\n );\n }\n }\n // Delete the offending records and add the merged ones.\n var n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(\n pointer - n,\n n,\n [DIFF_DELETE, text_delete],\n [DIFF_INSERT, text_insert]\n );\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = \"\";\n text_insert = \"\";\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === \"\") {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n if (\n diffs[pointer][1].substring(\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n ) === diffs[pointer - 1][1]\n ) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] =\n diffs[pointer - 1][1] +\n diffs[pointer][1].substring(\n 0,\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n );\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (\n diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]\n ) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xd800 && charCode <= 0xdbff;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xdc00 && charCode <= 0xdfff;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n var ret = [];\n for (var i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after],\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n var oldRange =\n typeof cursor_pos === \"number\"\n ? { index: cursor_pos, length: 0 }\n : cursor_pos.oldRange;\n var newRange = typeof cursor_pos === \"number\" ? null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n var oldLength = oldText.length;\n var newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n var oldCursor = oldRange.index;\n var oldBefore = oldText.slice(0, oldCursor);\n var oldAfter = oldText.slice(oldCursor);\n var maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n var newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n var newBefore = newText.slice(0, newCursor);\n var newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n var prefixLength = Math.min(oldCursor, newCursor);\n var oldPrefix = oldBefore.slice(0, prefixLength);\n var newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n var oldMiddle = oldBefore.slice(prefixLength);\n var newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n var cursor = oldCursor;\n var newBefore = newText.slice(0, cursor);\n var newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n var suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n var newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n var oldPrefix = oldText.slice(0, oldRange.index);\n var oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n var prefixLength = oldPrefix.length;\n var suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n var newPrefix = newText.slice(0, prefixLength);\n var newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n var newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos, cleanup) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, cleanup, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n", "(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.jstoxml = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.toXML = _exports.default = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n var ARRAY = \"array\";\n var BOOLEAN = \"boolean\";\n var DATE = \"date\";\n var NULL = \"null\";\n var NUMBER = \"number\";\n var OBJECT = \"object\";\n var SPECIAL_OBJECT = \"special-object\";\n var STRING = \"string\";\n var PRIVATE_VARS = [\"_selfCloseTag\", \"_attrs\"];\n var PRIVATE_VARS_REGEXP = new RegExp(PRIVATE_VARS.join(\"|\"), \"g\");\n /**\n * Determines the indent string based on current tree depth.\n */\n\n var getIndentStr = function getIndentStr() {\n var indent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return indent.repeat(depth);\n };\n /**\n * Sugar function supplementing JS's quirky typeof operator, plus some extra help to detect\n * \"special objects\" expected by jstoxml.\n * Example:\n * getType(new Date());\n * -> 'date'\n */\n\n\n var getType = function getType(val) {\n return Array.isArray(val) && ARRAY || _typeof(val) === OBJECT && val !== null && val._name && SPECIAL_OBJECT || val instanceof Date && DATE || val === null && NULL || _typeof(val);\n };\n /**\n * Replaces matching values in a string with a new value.\n * Example:\n * filterStr('foo&bar', { '&': '&' });\n * -> 'foo&bar'\n */\n\n\n var filterStr = function filterStr() {\n var inputStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Passthrough/no-op for nonstrings (e.g. number, boolean).\n if (typeof inputStr !== \"string\") {\n return inputStr;\n }\n\n var regexp = new RegExp(\"(\".concat(Object.keys(filter).join(\"|\"), \")(?!(\\\\w|#)*;)\"), \"g\");\n return String(inputStr).replace(regexp, function (str, entity) {\n return filter[entity] || \"\";\n });\n };\n /**\n * Maps an object or array of arribute keyval pairs to a string.\n * Examples:\n * { foo: 'bar', baz: 'g' } -> 'foo=\"bar\" baz=\"g\"'\n * [ { \u26A1: true }, { foo: 'bar' } ] -> '\u26A1 foo=\"bar\"'\n */\n\n\n var getAttributeKeyVals = function getAttributeKeyVals() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = [];\n\n if (Array.isArray(attributes)) {\n // Array containing complex objects and potentially duplicate attributes.\n keyVals = attributes.map(function (attr) {\n var key = Object.keys(attr)[0];\n var val = attr[key];\n var filteredVal = filter ? filterStr(val, filter) : val;\n var valStr = filteredVal === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n } else {\n var keys = Object.keys(attributes);\n keyVals = keys.map(function (key) {\n // Simple object - keyval pairs.\n // For boolean true, simply output the key.\n var filteredVal = filter ? filterStr(attributes[key], filter) : attributes[key];\n var valStr = attributes[key] === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n }\n\n return keyVals;\n };\n /**\n * Converts an attributes object/array to a string of keyval pairs.\n * Example:\n * formatAttributes({ a: 1, b: 2 })\n * -> 'a=\"1\" b=\"2\"'\n */\n\n\n var formatAttributes = function formatAttributes() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = getAttributeKeyVals(attributes, filter);\n if (keyVals.length === 0) return \"\";\n var keysValsJoined = keyVals.join(\" \");\n return \" \".concat(keysValsJoined);\n };\n /**\n * Converts an object to a jstoxml array.\n * Example:\n * objToArray({ foo: 'bar', baz: 2 });\n * ->\n * [\n * {\n * _name: 'foo',\n * _content: 'bar'\n * },\n * {\n * _name: 'baz',\n * _content: 2\n * }\n * ]\n */\n\n\n var objToArray = function objToArray() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object.keys(obj).map(function (key) {\n return {\n _name: key,\n _content: obj[key]\n };\n });\n };\n /**\n * Determines if a value is a primitive JavaScript value (not including Symbol).\n * Example:\n * isPrimitive(4);\n * -> true\n */\n\n\n var PRIMITIVE_TYPES = [STRING, NUMBER, BOOLEAN];\n\n var isPrimitive = function isPrimitive(val) {\n return PRIMITIVE_TYPES.includes(getType(val));\n };\n /**\n * Determines if a value is a simple primitive type that can fit onto one line. Needed for\n * determining any needed indenting and line breaks.\n * Example:\n * isSimpleType(new Date());\n * -> true\n */\n\n\n var SIMPLE_TYPES = [].concat(PRIMITIVE_TYPES, [DATE, SPECIAL_OBJECT]);\n\n var isSimpleType = function isSimpleType(val) {\n return SIMPLE_TYPES.includes(getType(val));\n };\n /**\n * Determines if an XML string is a simple primitive, or contains nested data.\n * Example:\n * isSimpleXML('');\n * -> false\n */\n\n\n var isSimpleXML = function isSimpleXML(xmlStr) {\n return !xmlStr.match(\"<\");\n };\n /**\n * Assembles an XML header as defined by the config.\n */\n\n\n var DEFAULT_XML_HEADER = '';\n\n var getHeaderString = function getHeaderString(_ref) {\n var header = _ref.header,\n indent = _ref.indent,\n isOutputStart = _ref.isOutputStart;\n var shouldOutputHeader = header && isOutputStart;\n if (!shouldOutputHeader) return \"\";\n var shouldUseDefaultHeader = _typeof(header) === BOOLEAN; // return `${shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header}${indent ? \"\\n\" : \"\"\n // }`;\n\n return shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header;\n };\n /**\n * Recursively traverses an object tree and converts the output to an XML string.\n * Example:\n * toXML({ foo: 'bar' });\n * -> bar\n */\n\n\n var defaultEntityFilter = {\n \"<\": \"<\",\n \">\": \">\",\n \"&\": \"&\"\n };\n\n var toXML = function toXML() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _config$depth = config.depth,\n depth = _config$depth === void 0 ? 0 : _config$depth,\n indent = config.indent,\n _isFirstItem = config._isFirstItem,\n _config$_isOutputStar = config._isOutputStart,\n _isOutputStart = _config$_isOutputStar === void 0 ? true : _config$_isOutputStar,\n header = config.header,\n _config$attributesFil = config.attributesFilter,\n rawAttributesFilter = _config$attributesFil === void 0 ? {} : _config$attributesFil,\n _config$filter = config.filter,\n rawFilter = _config$filter === void 0 ? {} : _config$filter;\n\n var shouldTurnOffAttributesFilter = typeof rawAttributesFilter === 'boolean' && !rawAttributesFilter;\n var attributesFilter = shouldTurnOffAttributesFilter ? {} : _objectSpread(_objectSpread(_objectSpread({}, defaultEntityFilter), {\n '\"': \""\"\n }), rawAttributesFilter);\n var shouldTurnOffFilter = typeof rawFilter === 'boolean' && !rawFilter;\n var filter = shouldTurnOffFilter ? {} : _objectSpread(_objectSpread({}, defaultEntityFilter), rawFilter); // Determine indent string based on depth.\n\n var indentStr = getIndentStr(indent, depth); // For branching based on value type.\n\n var valType = getType(obj);\n var headerStr = getHeaderString({\n header: header,\n indent: indent,\n depth: depth,\n isOutputStart: _isOutputStart\n });\n var isOutputStart = _isOutputStart && !headerStr && _isFirstItem && depth === 0;\n var outputStr = \"\";\n\n switch (valType) {\n case \"special-object\":\n {\n // Processes a specially-formatted object used by jstoxml.\n var _name = obj._name,\n _content = obj._content; // Output text content without a tag wrapper.\n\n if (_content === null) {\n outputStr = _name;\n break;\n } // Handles arrays of primitive values. (#33)\n\n\n var isArrayOfPrimitives = Array.isArray(_content) && _content.every(isPrimitive);\n\n if (isArrayOfPrimitives) {\n var primitives = _content.map(function (a) {\n return toXML({\n _name: _name,\n _content: a\n }, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth,\n _isOutputStart: false\n }));\n });\n\n return primitives.join('');\n } // Don't output private vars (such as _attrs).\n\n\n if (_name.match(PRIVATE_VARS_REGEXP)) break; // Process the nested new value and create new config.\n\n var newVal = toXML(_content, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth + 1,\n _isOutputStart: isOutputStart\n }));\n var newValType = getType(newVal);\n var isNewValSimple = isSimpleXML(newVal); // Pre-tag output (indent and line breaks).\n\n var preIndentStr = indent && !isOutputStart ? \"\\n\" : \"\";\n var preTag = \"\".concat(preIndentStr).concat(indentStr); // Special handling for comments, preserving preceding line breaks/indents.\n\n if (_name === '_comment') {\n outputStr += \"\".concat(preTag, \"\");\n break;\n } // Tag output.\n\n\n var valIsEmpty = newValType === \"undefined\" || newVal === \"\";\n var shouldSelfClose = _typeof(obj._selfCloseTag) === BOOLEAN ? valIsEmpty && obj._selfCloseTag : valIsEmpty;\n var selfCloseStr = shouldSelfClose ? \"/\" : \"\";\n var attributesString = formatAttributes(obj._attrs, attributesFilter);\n var tag = \"<\".concat(_name).concat(attributesString).concat(selfCloseStr, \">\"); // Post-tag output (closing tag, indent, line breaks).\n\n var preTagCloseStr = indent && !isNewValSimple ? \"\\n\".concat(indentStr) : \"\";\n var postTag = !shouldSelfClose ? \"\".concat(newVal).concat(preTagCloseStr, \"\") : \"\";\n outputStr += \"\".concat(preTag).concat(tag).concat(postTag);\n break;\n }\n\n case \"object\":\n {\n // Iterates over keyval pairs in an object, converting each item to a special-object.\n var keys = Object.keys(obj);\n var outputArr = keys.map(function (key, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === keys.length,\n _isOutputStart: isOutputStart\n });\n\n var outputObj = {\n _name: key\n };\n\n if (getType(obj[key]) === \"object\") {\n // Sub-object contains an object.\n // Move private vars up as needed. Needed to support certain types of objects\n // E.g. { foo: { _attrs: { a: 1 } } } -> \n PRIVATE_VARS.forEach(function (privateVar) {\n var val = obj[key][privateVar];\n\n if (typeof val !== \"undefined\") {\n outputObj[privateVar] = val;\n delete obj[key][privateVar];\n }\n });\n var hasContent = typeof obj[key]._content !== \"undefined\";\n\n if (hasContent) {\n // _content has sibling keys, so pass as an array (edge case).\n // E.g. { foo: 'bar', _content: { baz: 2 } } -> bar2\n if (Object.keys(obj[key]).length > 1) {\n var newContentObj = Object.assign({}, obj[key]);\n delete newContentObj._content;\n outputObj._content = [].concat(_toConsumableArray(objToArray(newContentObj)), [obj[key]._content]);\n }\n }\n } // Fallthrough: just pass the key as the content for the new special-object.\n\n\n if (typeof outputObj._content === \"undefined\") outputObj._content = obj[key];\n var xml = toXML(outputObj, newConfig, key);\n return xml;\n }, config);\n outputStr = outputArr.join('');\n break;\n }\n\n case \"function\":\n {\n // Executes a user-defined function and returns output.\n var fnResult = obj(config);\n outputStr = toXML(fnResult, config);\n break;\n }\n\n case \"array\":\n {\n // Iterates and converts each value in an array.\n var _outputArr = obj.map(function (singleVal, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === obj.length,\n _isOutputStart: isOutputStart\n });\n\n return toXML(singleVal, newConfig);\n });\n\n outputStr = _outputArr.join('');\n break;\n }\n // number, string, boolean, date, null, etc\n\n default:\n {\n outputStr = filterStr(obj, filter);\n break;\n }\n }\n\n return \"\".concat(headerStr).concat(outputStr);\n };\n\n _exports.toXML = toXML;\n var _default = {\n toXML: toXML\n };\n _exports.default = _default;\n});\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n", "var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n", "var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n", "var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n", "var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n", "var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", "var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n", "var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n", "var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n", "var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n", "var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n", "var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n", "var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n", "var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n", "var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n", "var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n", "var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n", "var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n", "var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n", "var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n", "var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n", "var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n", "var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n", "var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n", "var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n", "var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n", "var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n", "var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n", "var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n", "var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n", "var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n", "var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n", "var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n", "var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n", "var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n", "var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n", "var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n", "var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n", "var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n", "var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n", "var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n", "var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n", "var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n", "/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n", "var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n", "var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n", "var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n", "var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n", "var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n", "var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n", "var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n", "var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", "var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n", "var baseForOwn = require('./_baseForOwn');\n\n/**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n}\n\nmodule.exports = baseInverter;\n", "var baseInverter = require('./_baseInverter');\n\n/**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\nfunction createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n}\n\nmodule.exports = createInverter;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n", "var constant = require('./constant'),\n createInverter = require('./_createInverter'),\n identity = require('./identity');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\nvar invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n}, constant(identity));\n\nmodule.exports = invert;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n", "var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n", "var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n", "var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n", "var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n", "var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n", "var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n", "var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n", "/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n", "var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n", "var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n", "/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n", "var baseGet = require('./_baseGet'),\n baseSlice = require('./_baseSlice');\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nmodule.exports = parent;\n", "var castPath = require('./_castPath'),\n last = require('./last'),\n parent = require('./_parent'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n}\n\nmodule.exports = baseUnset;\n", "var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n", "var isPlainObject = require('./isPlainObject');\n\n/**\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n * objects.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} key The key of the property to inspect.\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n */\nfunction customOmitClone(value) {\n return isPlainObject(value) ? undefined : value;\n}\n\nmodule.exports = customOmitClone;\n", "var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n", "var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n", "var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n", "var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n", "var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n", "var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n", "var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n", "var arrayMap = require('./_arrayMap'),\n baseClone = require('./_baseClone'),\n baseUnset = require('./_baseUnset'),\n castPath = require('./_castPath'),\n copyObject = require('./_copyObject'),\n customOmitClone = require('./_customOmitClone'),\n flatRest = require('./_flatRest'),\n getAllKeysIn = require('./_getAllKeysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable property paths of `object` that are not omitted.\n *\n * **Note:** This method is considerably slower than `_.pick`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\nvar omit = flatRest(function(object, paths) {\n var result = {};\n if (object == null) {\n return result;\n }\n var isDeep = false;\n paths = arrayMap(paths, function(path) {\n path = castPath(path, object);\n isDeep || (isDeep = path.length > 1);\n return path;\n });\n copyObject(object, getAllKeysIn(object), result);\n if (isDeep) {\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n }\n var length = paths.length;\n while (length--) {\n baseUnset(result, paths[length]);\n }\n return result;\n});\n\nmodule.exports = omit;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n", "var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n", "var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n", "var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n", "var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n", "var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n", "var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n", "var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n", "var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n", "var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n", "var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n", "var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n", "var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n", "var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n", "var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n", "var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n", "var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n", "var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n", "var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n", "var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n", "var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n", "var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n", "var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n", "var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n", "var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n", "var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n", "var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n", "var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n", "var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n", "var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n", "var baseDifference = require('./_baseDifference'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\nvar without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n});\n\nmodule.exports = without;\n", "var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n", "import Promise from 'promise';\nimport { Playlist, Song, Cell, Chord } from './parser.js';\nimport { Converter, LogLevel } from './converter.js';\nimport { Version } from './version.js';\n\nexport function convertSync(ireal, options = {}) {\n const playlist = new Playlist(ireal);\n playlist.songs.forEach(song => {\n song.musicXml = Converter.convert(song, options);\n });\n return playlist;\n}\n\nexport async function convert(ireal, options = {}) {\n return new Promise(resolve => resolve(convertSync(ireal, options)));\n}\n\nexport { Playlist, Song, Cell, Chord, Converter, LogLevel, Version };\n", "/**\n * The iReal Pro parser is derived from\n * https://github.com/daumling/ireal-renderer\n * which is itself derived from\n * https://github.com/pianosnake/ireal-reader\n *\n * None of those modules did exactly what is needed here, namely return\n * a full structure that can be iterated downstream.\n */\n\nimport diff from 'fast-diff';\n\nexport class Playlist {\n constructor(ireal){\n const playlistEncoded = /.*?(irealb(?:ook)?):\\/\\/([^\"]*)/.exec(ireal);\n const playlist = decodeURIComponent(playlistEncoded[2]);\n const parts = playlist.split(\"===\"); //songs are separated by ===\n if (parts.length > 1) this.name = parts.pop(); //playlist name\n this.songs = parts\n .map(part => {\n try {\n return new Song(part, playlistEncoded[1] === 'irealbook');\n }\n catch (error) {\n const parts = part.split(\"=\");\n const title = Song.parseTitle(parts[0].trim());\n console.error(`[ireal-musicxml] [${title}] ${error}`);\n return null;\n }\n })\n .filter(song => song !== null)\n .reduce((songs, song) => {\n if (songs.length > 0) {\n // Detect multi-part songs via their titles.\n // The parts of the same song have the same title, except for the part number, so they follow each other in the list.\n // The `diff` module compares two titles and returns a list of similarities and differences.\n // We expect the first diff to be a similarity, followed by differences that are only numeric.\n // When we find a multi-part song, we just concatenate the cells into the first part.\n const diffs = diff(songs[songs.length-1].title, song.title);\n if (diffs[0][0] === 0 && diffs.every(d => d[0] === 0 || d[1].match(/^\\d+$/))) {\n songs[songs.length-1].cells = songs[songs.length-1].cells.concat(song.cells);\n return songs;\n }\n }\n songs.push(song);\n return songs;\n }, []);\n }\n}\n\nexport class Cell {\n constructor() {\n this.annots = [];\n this.comments = [];\n this.bars = \"\";\n this.spacer = 0;\n this.chord = null;\n }\n}\n\nexport class Chord {\n constructor(note, modifiers = \"\", over = null, alternate = null) {\n this.note = note;\n this.modifiers = modifiers;\n this.over = over;\n this.alternate = alternate;\n }\n}\n\nexport class Song {\n constructor(ireal, oldFormat = false) {\n this.cells = [];\n this.musicXml = \"\";\n if (!ireal) {\n this.title = \"\";\n this.composer = \"\";\n this.style = \"\";\n this.key = \"\";\n this.transpose = 0;\n this.groove = \"\";\n this.bpm = 0;\n this.repeats = 0;\n return;\n }\n const parts = ireal.split(\"=\"); //split on one sign, remove the blanks\n if (oldFormat) {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[2].trim();\n this.key = parts[3];\n this.cells = this.parse(parts[5]);\n }\n else {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[3].trim();\n this.key = parts[4];\n this.transpose = +parts[5] || 0; // TODO\n this.groove = parts[7];\n this.bpm = +parts[8];\n this.repeats = +parts[9] || 3;\n const music = parts[6].split(\"1r34LbKcu7\");\n this.cells = this.parse(unscramble(music[1]));\n }\n }\n\n /**\n * The RegExp for a complete chord. The match array contains:\n * 1 - the base note\n * 2 - the modifiers (+-ohd0123456789 and su for sus)\n * 3 - any comments (may be e.g. add, sub, or private stuff)\n * 4 - the \"over\" part starting with a slash\n * 5 - the top chord as (chord)\n * @type RegExp\n */\n static chordRegex = /^([A-G][b#]?)((?:sus|alt|add|[+\\-^\\dhob#])*)(\\*.+?\\*)*(\\/[A-G][#b]?)?(\\(.*?\\))?/;\n static chordRegex2 = /^([ Wp])()()(\\/[A-G][#b]?)?(\\(.*?\\))?/;\t// need the empty captures to match chordRegex\n\n static regExps = [\n /^\\*[a-zA-Z]/,\t\t\t\t\t\t\t// section\n /^T\\d\\d/,\t\t\t\t\t\t\t\t// time measurement\n /^N./,\t\t\t\t\t\t\t\t\t// repeat marker\n /^<.*?>/,\t\t\t\t\t\t\t\t// comments\n Song.chordRegex,\t\t\t\t// chords\n Song.chordRegex2,\t\t\t\t// space, W and p (with optional alt chord)\n ];\n\n /**\n * The parser cracks up the raw music string into several objects,\n * one for each cell. iReal Pro works with rows of 16 cell each. The result\n * is stored at song.cells.\n *\n * Each object has the following properties:\n *\n * chord: if non-null, a chord object with these properties:\n * note - the base note (also blank, W = invisible root, p/x/r - pause/bar repeat/double-bar repeat, n - no chord)\n * modifiers - the modifiers, like 7, + o etc (string)\n * over - if non-null, another chord object for the under-note\n * alternate - if non-null another chord object for the alternate chord\n * annots: annotations, a string of:\n * *x - section, like *v, *I, *A, *B etc\n * Nx - repeat bots (N1, N2 etc)\n * Q - coda\n * S - segno\n * Txx - measure (T44 = 4/4 etc, but T12 = 12/8)\n * U - END\n * f - fermata\n * l - (letter l) normal notes\n * s - small notes\n * comments: an array of comment strings\n * bars: bar specifiers, a string of:\n * | - single vertical bar, left\n * [ - double bar, left\n * ] - double bar, right\n * { - repeat bar, left\n * } - repeat bar, right\n * Z - end bar, right\n * spacer - a number indicating the number of vertical spacers above this cell\n *\n * @returns [Cell]\n */\n parse(ireal) {\n let text = ireal.trim();\n const arr = [];\n while (text) {\n let found = false;\n for (let i = 0; i < Song.regExps.length; i++) {\n const match = Song.regExps[i].exec(text);\n if (match) {\n found = true;\n if (match.length <= 2) {\n arr.push(match[0]);\n text = text.substr(match[0].length);\n }\n else {\n // a chord\n arr.push(match);\n text = text.substr(match[0].length);\n }\n break;\n }\n }\n if (!found) {\n // ignore the comma separator\n if (text[0] !== ',')\n arr.push(text[0]);\n text = text.substr(1);\n }\n }\n\n // pass 2: extract prefixes, suffixes, annotations and comments\n const cells = [];\n let obj = this.newCell(cells);\n let prevobj = null;\n for (let i = 0; i < arr.length; i++) {\n let cell = arr[i];\n if (cell instanceof Array) {\n obj.chord = this.parseChord(cell);\n cell = \" \";\n }\n switch (cell[0]) {\n case '{':\t// open repeat\n case '[':\t// open double bar\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = cell; cell = null; break;\n case '|':\t// single bar - close previous and open this\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = '('; cell = null; break;\n case ']':\t// close double bar\n case '}':\t// close repeat\n case 'Z':\t// ending double bar\n if (prevobj) { prevobj.bars += cell; prevobj = null; }\n cell = null; break;\n case 'n':\t// N.C.\n obj.chord = new Chord(cell[0]);\n break;\n case ',':\tcell = null; break; // separator\n case 'S':\t// segno\n case 'T':\t// time measurement\n case 'Q':\t// coda\n case 'N':\t// repeat\n case 'U':\t// END\n case 's':\t// small\n case 'l':\t// normal\n case 'f':\t// fermata\n case '*': obj.annots.push(cell); cell = null; break;\n case 'Y': obj.spacer++; cell = null; prevobj = null; break;\n case 'r':\n case 'x':\n case 'W':\n obj.chord = new Chord(cell);\n break;\n case '<':\n cell = cell.substr(1, cell.length-2);\n obj.comments.push(cell);\n cell = null; break;\n default:\n }\n if (cell && i < arr.length-1) {\n prevobj = obj;\t\t// so we can add any closing barline later\n obj = this.newCell(cells);\n }\n }\n return cells;\n }\n\n /**\n * The title had \"A\" and \"The\" at the back (e.g. \"Gentle Rain, The\")\n */\n static parseTitle(title) {\n return title.replace(/(.*)(, )(A|The)$/g, '$3 $1');\n }\n\n /**\n * The composer is reversed (last first) if it only has 2 names :shrug:\n */\n static parseComposer(composer) {\n const parts = composer.split(/(\\s+)/); // match and return spaces too\n if (parts.length == 3) { // [last, spaces, first]\n return parts[2] + parts[1] + parts[0];\n }\n return composer;\n }\n\n parseChord(chord) {\n var note = chord[1] || \" \";\n var modifiers = chord[2] || \"\";\n var comment = chord[3] || \"\";\n if (comment)\n modifiers += comment.substr(1, comment.length-2);\n var over = chord[4] || \"\";\n if (over[0] === '/')\n over = over.substr(1);\n var alternate = chord[5] || null;\n if (alternate) {\n chord = Song.chordRegex.exec(alternate.substr(1, alternate.length-2));\n if (!chord)\n alternate = null;\n else\n alternate = this.parseChord(chord);\n }\n // empty cell?\n if (note === \" \" && !alternate && !over)\n return null;\n if (over) {\n var offset = (over[1] === '#' || over[1] === 'b') ? 2 : 1;\n over = new Chord(over.substr(0, offset), over.substr(offset), null, null);\n }\n else\n over = null;\n return new Chord(note, modifiers, over, alternate);\n }\n\n newCell(cells) {\n var obj = new Cell;\n cells.push(obj);\n return obj;\n }\n}\n\n// Unscrambling hints from https://github.com/ironss/accompaniser/blob/master/irealb_parser.lua\n// Strings are broken up in 50 character segments. each segment undergoes character substitution addressed by obfusc50()\n// Note that a final part of length 50 or 51 is not scrambled.\n// Finally need to substitute for Kcl, LZ and XyQ.\nfunction unscramble(s) {\n let r = '', p;\n\n while (s.length > 51){\n p = s.substring(0, 50);\n s = s.substring(50);\n r = r + obfusc50(p);\n }\n r = r + s;\n // now undo substitution obfuscation\n r = r.replace(/Kcl/g, '| x').replace(/LZ/g, ' |').replace(/XyQ/g, ' ');\n return r;\n}\n\nfunction obfusc50(s) {\n // the first 5 characters are switched with the last 5\n const newString = s.split('');\n for (let i = 0; i < 5; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n // characters 10-24 are also switched\n for (let i = 10; i < 24; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n return newString.join('');\n}\n", "import jstoxml from 'jstoxml';\nimport { chordParserFactory, chordRendererFactory } from 'chord-symbol';\nimport { Version } from './version.js';\n\nexport class LogLevel {\n static Debug = 0;\n static Info = 1;\n static Warn = 2;\n static Error = 3;\n static None = 4;\n}\n\nconst MUSICXML_VERSION = '4.0';\nconst SCALING_MM = 7;\nconst SCALING_TENTHS = 40;\n\nexport class Converter {\n static defaultOptions = {\n 'divisions': 768, // same as used by iReal\n 'notation': 'rhythmic', // 'rhythmic' for rhythmic notation, 'slash' for slash notation\n 'step': 'B', // chord note\n 'octave': 4, // chord note octave\n 'notehead': 'slash', // chord note head\n 'noteheadSize': 'large', // size of chord note head\n 'date': true, // include encoding date\n 'clef': false, // hide clef by default\n 'keySignature': false, // hide key signature by default\n 'pageWidth': 210, // mm (A4)\n 'pageHeight': 297, // mm (A4)\n 'pageMargin': 15, // mm\n 'logLevel': LogLevel.Warn\n };\n\n static sequenceAttributes = [\n // Expected order of attribute elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/attributes/\n 'divisions',\n 'key',\n 'time',\n 'staves',\n 'part-symbol',\n 'instruments',\n 'clef',\n 'staff-details',\n 'transpose',\n 'directive',\n 'measure-style'\n ];\n\n static sequenceNote = [\n // Expected order of note elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/note/\n 'cue',\n 'pitch',\n 'rest',\n 'unpitched',\n 'duration',\n 'tie',\n 'voice',\n 'type',\n 'dot',\n 'accidental',\n 'time-modification',\n 'stem',\n 'notehead',\n 'notehead-text',\n 'staff',\n 'beam',\n 'notations',\n 'lyric',\n 'play'\n ];\n\n static sequenceNotations = [\n // Expected order of notations elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/notations/\n 'accidental-mark',\n 'arpeggiate',\n 'articulations',\n 'dynamics',\n 'fermata',\n 'glissando',\n 'non-arpeggiate',\n 'ornaments',\n 'other-notation',\n 'slide',\n 'slur',\n 'technical',\n 'tied',\n 'tuplet'\n ];\n\n static sequenceBarline = [\n // Expected order of barline elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/\n 'bar-style',\n 'footnote',\n 'level',\n 'wavy-line',\n 'segno',\n 'coda',\n 'fermata',\n 'ending',\n 'repeat'\n ];\n\n static mapAlter = {\n '#': 1,\n 'b': -1\n };\n\n static mapFifthsToAlters = {\n 'sharp': ['F', 'C', 'G', 'D', 'A', 'E', 'B'],\n 'flat': ['B', 'E', 'A', 'D', 'G', 'C', 'F']\n };\n\n static mapRepeats = {\n \"D.C. al Coda\": Converter.prototype.convertDaCapo,\n \"D.C. al Fine\": Converter.prototype.convertDaCapo,\n \"D.C. al 1st End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 2nd End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 3rd End.\": Converter.prototype.convertDaCapo,\n \"D.S. al Coda\": Converter.prototype.convertDalSegno,\n \"D.S. al Fine\": Converter.prototype.convertDalSegno,\n \"D.S. al 1st End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 2nd End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 3rd End.\": Converter.prototype.convertDalSegno,\n \"Fine\": Converter.prototype.convertFine,\n \"3x\": Converter.prototype.convertRepeatNx,\n \"4x\": Converter.prototype.convertRepeatNx,\n \"5x\": Converter.prototype.convertRepeatNx,\n \"6x\": Converter.prototype.convertRepeatNx,\n \"7x\": Converter.prototype.convertRepeatNx,\n \"8x\": Converter.prototype.convertRepeatNx\n };\n\n static convert(song, options = {}) {\n const realOptions = Object.assign({}, this.defaultOptions, options);\n return new Converter(song, realOptions).convert();\n }\n\n constructor(song, options) {\n this.song = song;\n this.options = options;\n this.time = { beats: 4, beatType: 4 };\n this.fifths = null; // key signature's degree of fifths\n this.measure = null; // current measure (of class Measure) being built\n this.barRepeat = 0; // current bar number for single- and double-bar repeats\n this.codas = []; // list of measures containing codas\n this.repeats = 0; // repeat count for closing repeat barline\n this.emptyCells = 0; // consecutive empty cells\n this.emptyCellNewSystem = false; // did a new system occur in an empty cell?\n\n // In iRP, there are 16 cells per line.\n // The width in mm of a single cell depends on the page width and the margins.\n this.cellWidth = (this.options.pageWidth - (2 * this.options.pageMargin)) / 16;\n\n // chord-symbol.\n this.parseChord = chordParserFactory({ \"altIntervals\": [\n \"b5\",\n \"b9\"\n ]});\n this.renderChord = chordRendererFactory({\n useShortNamings: true,\n printer: 'raw'\n });\n }\n\n convert() {\n return jstoxml.toXML(this.convertSong(), {\n header: `\n\n\n `.trim(),\n indent: ' '\n });\n }\n\n convertSong() {\n return {\n _name: 'score-partwise',\n _attrs: { 'version': MUSICXML_VERSION },\n _content: [{\n 'work': {\n 'work-title': this.song.title\n }\n }, {\n 'identification': [{\n _name: 'creator',\n _attrs: { 'type': 'composer' },\n _content: this.song.composer\n }, {\n 'encoding': [{\n 'software': `@infojunkie/ireal-musicxml ${Version.version}`\n }, { ...(this.options.date && {\n 'encoding-date': Converter.convertDate(new Date())\n })}, {\n _name: 'supports',\n _attrs: { 'element': 'accidental', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'element': 'transpose', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-page', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-system', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }]\n }]\n }, {\n 'defaults': {\n 'scaling': {\n 'millimeters': SCALING_MM,\n 'tenths': SCALING_TENTHS\n },\n 'page-layout': {\n 'page-height': Converter._mmToTenths(this.options.pageHeight),\n 'page-width': Converter._mmToTenths(this.options.pageWidth),\n 'page-margins': {\n 'left-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'right-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'top-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'bottom-margin': Converter._mmToTenths(this.options.pageMargin, 4)\n }\n }\n }\n }, {\n 'part-list': {\n _name: 'score-part',\n _attrs: { 'id': 'P1' },\n _content: {\n _name: 'part-name',\n _attrs: { 'print-object': 'no' },\n _content: 'Lead Sheet'\n }\n }\n }, {\n _name: 'part',\n _attrs: { 'id': 'P1' },\n _content: this.convertMeasures()\n }]\n };\n }\n\n // Date in yyyy-mm-dd\n // https://stackoverflow.com/a/50130338/209184\n static convertDate(date) {\n return new Date(date.getTime() - (date.getTimezoneOffset() * 60000))\n .toISOString()\n .split('T')[0];\n }\n\n static Measure = class {\n constructor(number) {\n this.body = {\n _name: 'measure',\n _attrs: { 'number': number },\n _content: []\n };\n this.attributes = [];\n this.chords = [];\n this.barlines = [];\n this.barEnding = null;\n }\n\n number() {\n return this.body['_attrs']['number'];\n }\n\n assemble() {\n // Attributes.\n if (this.attributes.length) {\n this.body['_content'].push({\n 'attributes': Converter.reorderSequence(this, this.attributes, Converter.sequenceAttributes)\n });\n }\n\n // Chords.\n this.chords.forEach(chord => {\n this.body['_content'].push({\n 'harmony': chord.harmony\n }, ...chord.notes.map(note => {\n return {\n 'note': note\n };\n }));\n });\n\n // Barlines.\n this.barlines[0]['_content'] = Converter.reorderSequence(this, this.barlines[0]['_content'], Converter.sequenceBarline);\n this.body['_content'].splice(1, 0, this.barlines[0]);\n this.barlines[1]['_content'] = Converter.reorderSequence(this, this.barlines[1]['_content'], Converter.sequenceBarline);\n this.body['_content'].push(this.barlines[1]);\n\n return this.body;\n }\n };\n\n static Chord = class {\n constructor(harmony, notes, ireal) {\n this.harmony = harmony;\n this.notes = notes;\n this.ireal = ireal;\n this.spaces = 0;\n this.fermata = false;\n }\n };\n\n convertMeasures() {\n // Are we starting a new system given the current cell index?\n const isNewSystem = cellIndex => cellIndex > 0 && cellIndex % 16 === 0;\n\n // Loop on cells.\n const measures = this.song.cells.reduce((measures, cell, cellIndex) => {\n // Start a new measure if needed.\n // This means either finding an opening barline or finding non-empty cells while we're not in any measure.\n if (cell.bars.match(/\\(|\\{|\\[/) || (!this.measure && (cell.chord || cell.annots.length || cell.comments.length))) {\n if (this.measure) {\n this._log(LogLevel.Warn, `Starting a new measure over existing measure. Closing current measure first.`);\n this.measure.barlines.push(this.convertBarline('', 'right'));\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n }\n this.measure = new Converter.Measure(measures.length+1, this.options);\n\n // Very first bar: add defaults.\n if (!measures.length) {\n this.measure.attributes.push({\n 'divisions': this.options.divisions\n }, {\n _name: 'clef',\n _attrs: [{ 'print-object': this.options.clef ? 'yes' : 'no' }],\n _content: [{\n 'sign': 'G'\n }, {\n 'line': 2\n }]\n }, {\n 'staff-details': {\n 'staff-lines': 0\n }\n }, {\n 'measure-style': [{\n _name: 'slash',\n _attrs: { 'type': 'start', 'use-stems': this.options.notation === 'rhythmic' ? 'yes' : 'no' }\n }]\n }, this.convertKey());\n\n // Add bpm if any.\n if (this.song.bpm) {\n this.measure.body['_content'].push(this.convertTempo(this.song.bpm));\n }\n\n // Add style and groove.\n this.measure.body['_content'].push(this.convertStyleAndGroove(this.song.style, this.song.groove));\n }\n\n // Add starting barline.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'left'));\n\n // If we're still repeating bars, copy the previous bar now.\n if (this.barRepeat) {\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat-1].chords];\n }\n }\n\n // Short-circuit loop if no measure exists.\n // It can happen that `measure` is still blank in case of empty cells in iReal layout.\n // e.g. Girl From Ipanema in tests.\n if (!this.measure) {\n if (cell.chord || cell.annots.length || cell.comments.length || (cell.bars && cell.bars !== ')')) {\n this._log(LogLevel.Warn, `Found non-empty orphan cell ${JSON.stringify(cell)}`, measures[measures.length-1]);\n }\n\n // This is an empty cell between measures.\n // Count the consecutive empty cells because they will be converted to margins.\n // Also remember that a new system has occurred.\n this.emptyCells++;\n if (isNewSystem(cellIndex)) {\n this.emptyCellNewSystem = true;\n }\n\n return measures;\n }\n\n // Start a new system every 16 cells.\n if (isNewSystem(cellIndex) || this.emptyCellNewSystem) {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _attrs: { 'new-system': 'yes' },\n _content: { ...(this.emptyCellNewSystem && {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }, {\n 'right-margin': '0.00'\n }]\n }\n })}\n });\n }\n\n // If we accumulated empty cells but not at the start of the current system, then we adjust other distances.\n // There are 2 cases to handle:\n // - We're now in a fresh system: Add a right-margin to the previous measure.\n // - We're in the middle of a system: Add a measure-distance to the current measure.\n if (!this.emptyCellNewSystem && this.emptyCells > 0) {\n if (this.measure.body['_content'][0]?.['_name'] === 'print' && this.measure.body['_content'][0]['_attrs']?.['new-system'] === 'yes') {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }]\n }\n }\n });\n }\n else {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'measure-layout': {\n 'measure-distance': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }\n }\n });\n }\n }\n\n // Reset the empty cells.\n this.emptyCellNewSystem = false;\n this.emptyCells = 0;\n\n // Chords.\n if (cell.chord) {\n switch (cell.chord.note) {\n case 'x': {\n // Handle single bar repeat.\n this.barRepeat = 1;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'r': {\n // Handle double bar repeat.\n // We do this in 2 stages, because a blank measure occurs after 'r' (to keep the measure count correct)\n // Here, we copy the next-to-last measure and set the repeat flag.\n // The next opening measure will pick up the remaining measure.\n this.barRepeat = 2;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'p':\n // If slash does not occur as first chord, count it as a space.\n // Otherwise, handle it as 'W'.\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n break;\n }\n // Fall into case 'W'.\n\n case 'W': {\n // Handle invisible root by copying previous chord.\n let target = this.measure;\n if (!target.chords.length) {\n target = measures.slice().reverse().find(m => m.chords.length);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find any measure with chords prior to ${JSON.stringify(cell.chord)}`);\n }\n }\n if (target) {\n const chord = target.chords[target.chords.length-1].ireal;\n chord.over = cell.chord.over;\n chord.alternate = cell.chord.alternate;\n this.measure.chords.push(this.convertChord(chord));\n }\n break;\n }\n case ' ': {\n // TODO Handle alternate chord only.\n this._log(LogLevel.Warn, `Unhandled empty/alternate chord ${JSON.stringify(cell.chord)}`);\n break;\n }\n default: {\n // Process new chord.\n this.measure.chords.push(this.convertChord(cell.chord));\n }\n }\n }\n else if (!this.barRepeat) {\n // There are 16 cells per row, regardless of time signature.\n // Barlines can occur anywhere and the iReal Pro player uses an unknown algorithm\n // to schedule the chords within a measure, using the empty cells as \"hints\" for scheduling.\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=chord-spacing-in-the-editor\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=how-do-i-fit-more-than-48-measures-into-one-chart\n //\n // Our approach to emulate the iReal Pro player is as follows:\n // 1. Whenever we find an empty cell, attach it to the previous chord (or discard it if there's no previous chord)\n // 2. At the end of the measure, adjust the chord durations based on existing empty cells across the measure\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n }\n }\n\n // Other attributes.\n cell.annots.forEach(annot => {\n switch(annot[0]) {\n case '*': { // section\n const section = annot.slice(1);\n this.measure.body['_content'].push(this.convertSection(section));\n break;\n }\n case 'T': { // time\n const time = annot.slice(1);\n this.measure.attributes.push(this.convertTime(time));\n break;\n }\n case 'S': { // segno\n this.measure.body['_content'].push(this.convertSegno());\n break;\n }\n case 'N': { // ending\n // TODO This assumes a single ending at a time.\n let ending = parseInt(annot.slice(1));\n if (ending < 1) {\n // It can happen that the ending number comes as 0 from iRP.\n // In this case, we do a best effort of finding the previous ending and incrementing it.\n const target = measures.slice().reverse().find(m => !!m.barEnding);\n ending = target?.barEnding ?? 0 + 1;\n }\n this.measure.barlines[0]['_content'].push(this.convertEnding(ending, 'start'));\n // End the previous ending at the previous measure's right barline.\n // Also, remove the 'discontinue' ending from its starting measure since we found an end to it.\n if (ending > 1) {\n measures[measures.length-1].barlines[1]['_content'].push(this.convertEnding(ending-1, 'stop'));\n const target = measures.slice().reverse().find(m => m.barEnding === ending-1);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline of any measure`);\n }\n else {\n // The last result is the good one: remove the 'discontinue' ending.\n const index = target.barlines[1]['_content'].findIndex(b => !!b && b['_name'] === 'ending');\n if (index === -1) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline`, target);\n }\n delete target.barlines[1]['_content'][index];\n }\n }\n // We will add a 'discontinue' ending at this measure's right barline.\n this.measure.barEnding = ending;\n break;\n }\n case 'Q': { // coda\n // We add all codas as \"tocoda\" because we expect the last one to be the actual coda.\n // After all measures have been built, adjust the last coda.\n // https://irealpro.com/how-the-coda-symbol-works-in-ireal-pro/\n this.measure.body['_content'].push(this.convertToCoda());\n this.codas.push(this.measure);\n break;\n }\n\n // Ignore small and large chord renderings.\n case 'l':\n case 's': break;\n\n case 'f': { // Fermata\n this.measure.chords[this.measure.chords.length-1].fermata = true;\n break;\n }\n\n case 'U': { // END, treated as Fine.\n this.measure.body['_content'].push(this.convertFine('END'));\n break;\n }\n\n default: this._log(LogLevel.Warn, `Unhandled annotation \"${annot}\"`);\n }\n });\n\n // Comments and repeats.\n // TODO Handle measure offset.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/offset/\n cell.comments.map(c => c.trim()).forEach(comment => {\n const repeatFn = this._map(Converter.mapRepeats, comment);\n if (repeatFn) {\n this.measure.body['_content'].push(repeatFn.call(this, comment));\n } else {\n this.measure.body['_content'].push(this.convertComment(comment));\n }\n });\n\n // Close and insert the measure if needed.\n // Ignore measures without any chords, they're probably empty spaces.\n if (cell.bars.match(/\\)|\\}|\\]|Z/) && this.measure.chords.length) {\n // Add closing barline and ending if needed.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'right'));\n if (this.measure.barEnding) {\n // In case of numbered repeats, end measure an open repeat by default \u250C\u2500\u2500\u2500\u2500\u2500\u2500\n // \u2502 2.\n // It may be replaced later by a closing repeat \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n // \u2502 2. \u2502\n this.measure.barlines[1]['_content'].push(this.convertEnding(this.measure.barEnding, 'discontinue'));\n }\n\n // Close out the measure.\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n this.measure = null;\n if (this.barRepeat) this.barRepeat--;\n }\n\n return measures;\n }, []);\n\n // Adjust final right margin if needed.\n const remainingCells = this.song.cells.length % 16 - this.emptyCells;\n if (remainingCells > 0 && measures.length > 0) {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * remainingCells)\n }]\n }\n }\n });\n }\n\n // Adjust last coda if any.\n if (this.codas.length) {\n const target = this.codas[this.codas.length-1];\n const direction = target.body['_content'].findIndex(d =>\n d['_name'] === 'direction' &&\n Array.isArray(d['_content']) &&\n d['_content'].some(s =>\n s['_name'] === 'sound' &&\n Object.keys(s['_attrs']).includes('tocoda')\n )\n );\n if (direction === -1) {\n this._log(LogLevel.Warn, `Cannot find sound direction`, target);\n }\n target.body['_content'][direction] = this.convertCoda();\n }\n\n // `Measure.assemble()` puts all the parts in `Measure.body`.\n return measures.map(measure => measure.assemble());\n }\n\n // Fix order of elements according to sequence as specified by an xs:sequence.\n // @param {array} elements - Array of elements to sort.\n // @param {array} sequence - Array of element names in order of xs:sequence.\n // @return {array} Ordered array of elements.\n static reorderSequence(measure, elements, sequence) {\n return elements.filter(a => Object.keys(a).length).sort((a1, a2) => {\n let k1 = Object.keys(a1)[0]; if (k1 === '_name') k1 = a1[k1];\n let k2 = Object.keys(a2)[0]; if (k2 === '_name') k2 = a2[k2];\n // TODO indexOf() needs to search every time. Make it faster with memoize?\n const i1 = sequence.indexOf(k1);\n const i2 = sequence.indexOf(k2);\n if (i1 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k1}\"`, measure);\n }\n if (i2 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k2}\"`, measure);\n }\n return i1 - i2;\n });\n }\n\n convertRepeatNx(comment) {\n let repeats = null;\n if (null !== (repeats = comment.match(/(\\d+)x/))) {\n this.repeats = repeats[1];\n }\n }\n\n convertFine(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'fine': 'yes' }\n }]\n };\n }\n\n convertDaCapo(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dacapo': 'yes' }\n }]\n };\n }\n\n convertDalSegno(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dalsegno': 'yes' }\n }]\n };\n }\n\n convertComment(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': comment[0] === '*' ? 'above' : 'below' },\n _content: {\n 'direction-type': {\n 'words': comment[0] === '*' ? comment.slice(3) : comment\n }\n }\n };\n }\n\n convertEnding(ending, type) {\n // TODO This assumes a single ending.\n return {\n _name: 'ending',\n _attrs: { 'number': ending, 'type': type },\n _content: `${ending}.`\n };\n }\n\n convertBarline(bars, location) {\n let style = 'regular';\n let repeat = null;\n if (bars.match(/\\[|\\]/)) {\n style = 'light-light';\n }\n else if (bars.match(/Z/)) {\n style = 'light-heavy';\n }\n else if (bars.match(/\\{|\\}/)) {\n style = location === 'left' ? 'heavy-light' : 'light-heavy';\n repeat = location === 'left' ? 'forward' : 'backward';\n }\n\n // Set the current repeat count to 2, which may be changed later if we find a repeat annotation.\n if (repeat === 'forward') {\n this.repeats = 2;\n }\n\n return {\n _name: 'barline',\n _attrs: { 'location': location },\n _content: [{\n 'bar-style': style\n }, { ...(repeat && {\n _name: 'repeat',\n _attrs: { 'direction': repeat, ...(repeat === 'backward' && { 'times': this.repeats }) }\n })}]\n };\n }\n\n convertSection(section) {\n if (section === 'i') section = 'Intro';\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: {\n 'direction-type': {\n 'rehearsal': section\n }\n }\n };\n }\n\n convertSegno() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n _name: 'segno'\n }\n }, {\n _name: 'sound',\n _attrs: { 'segno': 'segno' }\n }]\n };\n }\n\n convertCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n '_name': 'coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'coda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertToCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n 'words': 'To Coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'tocoda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertTempo(bpm) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n _name: 'metronome',\n _attrs: { 'parentheses': 'no' },\n _content: [{\n 'beat-unit': this.calculateChordDuration(1)[0].type\n }, {\n 'per-minute': bpm\n }]\n }]\n }, {\n _name: 'sound',\n _attrs: { 'tempo': bpm }\n }]\n };\n }\n\n convertTime(time) {\n let beats = parseInt(time[0]);\n let beatType = parseInt(time[1]);\n if (time === '12') {\n beats = 12;\n beatType = 8;\n }\n this.time = { beats, beatType };\n return {\n 'time': [{\n 'beats': beats\n }, {\n 'beat-type': beatType\n }]\n };\n }\n\n adjustChordsDuration(measure) {\n // Now that the measure is closed, we can adjust the chord durations, taking empty cells into consideration.\n // https://www.irealb.com/forums/showthread.php?25161-Using-empty-cells-to-control-chord-duration\n //\n // Rules:\n // - Minimum chord duration is 1 beat\n // => Each chord starts as 1 beat\n // => Count of chords <= beats per measure\n // - Starting empty cells are discarded (already discarded during the cell loop)\n // - Each remaining empty cell counts as 1 beat (already counted during cell loop)\n // - Empty cell beats are added to their preceding chords (already added during the cell loop)\n // => Total chord durations <= beats per measure\n // - Remaining beats are distributed evenly among chords from first to last\n //\n if (measure.chords.length > this.time.beats) {\n this._log(LogLevel.Error, `Too many chords (${measure.chords.length} out of ${this.time.beats})`, measure);\n return true;\n }\n let beats = measure.chords.reduce((beats, chord) => beats+1+chord.spaces, 0);\n if (!beats) {\n this._log(LogLevel.Warn, `No chord found. Skipping current measure.`, measure);\n return false;\n }\n if (beats > this.time.beats) {\n // Reduce spaces.\n // We're guaranteed to end this loop because measure.chords.length <= this.time.beats\n let chordIndex = 0;\n while (beats > this.time.beats) {\n if (measure.chords[chordIndex].spaces > 0) {\n measure.chords[chordIndex].spaces--;\n beats--;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n else {\n // Distribute free beats among the chords.\n let chordIndex = 0;\n while (beats < this.time.beats) {\n measure.chords[chordIndex].spaces++;\n beats++;\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n\n // Adjust actual chord durations.\n measure.chords = measure.chords.map(chord => {\n chord.notes = this.calculateChordDuration(1+chord.spaces).map((duration, i, ds) =>\n this.convertChordNote(\n duration,\n i === ds.length - 1 ? chord.fermata : false, // Possible fermata on last chord note only\n this.options.notation === 'rhythmic' && ds.length > 1 ? (i > 0 ? 'stop' : 'start') : null // Possible tie in case of rhythmic notation\n )\n );\n return chord;\n });\n\n return true;\n }\n\n calculateChordDuration(beats) {\n // Lowest beat resolution is eighth-note (8).\n const mapDuration = {\n '1': [{ t: 'eighth', d: 0, b: 1 }],\n '2': [{ t: 'quarter', d: 0, b: 2 }],\n '3': [{ t: 'quarter', d: 1, b: 3 }],\n '4': [{ t: 'half', d: 0, b: 4 }],\n '5': [{ t: 'quarter', d: 1, b: 3 }, { t: 'quarter', d: 0, b: 2 }],\n '6': [{ t: 'half', d: 1, b: 6 }],\n '7': [{ t: 'half', d: 2, b: 7 }],\n '8': [{ t: 'whole', d: 0, b: 8 }],\n '9': [{ t: 'half', d: 1, b: 6 }, { t: 'quarter', d: 1, b: 3 }],\n '10': [{ t: 'half', d: 1, b: 6 }, { t: 'half', d: 0, b: 4 }],\n '11': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 0, b: 4 }],\n '12': [{ t: 'whole', d: 1, b: 12 }],\n '13': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 1, b: 6 }],\n '14': [{ t: 'whole', d: 2, b: 14 }],\n '15': [{ t: 'whole', d: 0, b: 8 }, { t: 'half', d: 2, b: 7 }],\n };\n\n if (this.options.notation === 'slash') {\n // In case of slash notation, return an array of n=beats elements, each with a duration of 1 beat.\n const index = 1 * 8 / this.time.beatType;\n return Array(beats).fill(this\n ._map(mapDuration, index, [], `Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n })[0] // We're sure to get only one entry in this case.\n );\n }\n else {\n // In case of rhythmic notation, return a single note (or 2 tied notes) corresponding to the desired beat count.\n const index = beats * 8 / this.time.beatType;\n return this\n ._map(mapDuration, index, [], `Unexpected beat count ${beats} for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n });\n }\n }\n\n convertChordNote(duration, fermata = false, tie = null) {\n const altered = Converter.mapFifthsToAlters[this.fifths >= 0 ? 'sharp' : 'flat'].slice(0, Math.abs(this.fifths));\n const noteType = {\n _name: 'pitch',\n _content: [{\n 'step': this.options.step\n }, {\n 'alter': altered.includes(this.options.step) ? (this.fifths > 0 ? 1 : -1) : 0\n }, {\n 'octave': this.options.octave\n }]\n };\n\n const notations = [];\n if (fermata) {\n notations.push({ _name: 'fermata' });\n }\n if (tie) {\n notations.push({ _name: 'tied', _attrs: { 'type': tie } });\n }\n\n return Converter.reorderSequence(this.measure, [noteType, {\n _name: 'cue'\n }, {\n _name: 'notehead',\n _content: this.options.notehead,\n _attrs: [{ 'font-size': this.options.noteheadSize }]\n }, {\n 'duration': duration.duration\n }, {\n 'voice': 1,\n }, {\n _name: 'type',\n _attrs: { 'size': 'full' },\n _content: duration.type\n }, { ...(notations.length && {\n 'notations': Converter.reorderSequence(this.measure, notations, Converter.sequenceNotations)\n })}]\n .concat(Array(duration.dots).fill({ _name: 'dot' })), Converter.sequenceNote);\n }\n\n convertChordDegree(value, type, alter) {\n return {\n _name: 'degree',\n _attrs: { 'print-object': 'no' },\n _content: [{\n 'degree-value': value\n }, {\n 'degree-alter': alter\n }, {\n 'degree-type': type\n }]\n };\n }\n\n convertChordSymbol(chord) {\n const parsedChord = this.renderChord(this.parseChord(`${chord.note}${chord.modifiers}`));\n if (!parsedChord) {\n this._log(LogLevel.Warn, `Unrecognized chord \"${chord.note}${chord.modifiers}\"`);\n return { rootStep: null, rootAlter: null, chordKind: null, chordDegrees: [], chordText: null };\n }\n\n const rootStep = parsedChord.input.rootNote[0];\n const rootAlter = this._map(Converter.mapAlter, parsedChord.input.rootNote[1] || null, null, `Unrecognized accidental in chord \"${parsedChord.input.rootNote}\"`);\n const chordText = parsedChord.formatted.descriptor + parsedChord.formatted.chordChanges.join('');\n\n // Find chord quality (aka kind).\n // `chord-symbol` misses a bunch of MusicXML chord qualities so we'll have to derive them ourselves.\n const mapKind = {\n 'major': 'major',\n 'major6': 'major-sixth',\n 'major7': 'major-seventh',\n 'dominant7': 'dominant',\n 'minor': 'minor',\n 'minor6': 'minor-sixth',\n 'minor7': 'minor-seventh',\n 'minorMajor7': 'major-minor',\n 'augmented': 'augmented',\n 'diminished': 'diminished',\n 'diminished7': 'diminished-seventh',\n 'power': 'power'\n };\n let chordKind = this._map(mapKind, parsedChord.normalized.quality, '', `Unrecognized chord quality \"${parsedChord.normalized.quality}\"`);\n\n // Convert extensions to their equivalent MusicXML kind.\n // Find the highest extension, then replace the word following [major, minor, dominant] with it.\n if (parsedChord.normalized.extensions.length) {\n const extension = Math.max(...parsedChord.normalized.extensions.map(e => parseInt(e))).toString();\n const mapExtensionKind = {\n '9': '-ninth',\n '11': '-11th',\n '13': '-13th'\n };\n chordKind = chordKind.split('-')[0] + this._map(mapExtensionKind, extension, '', `Unhandled extension ${extension}`);\n\n // chord-symbol considers dominant-11th to be suspended - but that's not _necessarily_ the case.\n // https://en.wikipedia.org/wiki/Eleventh_chord\n if (chordKind === 'dominant-11th') {\n parsedChord.normalized.isSuspended = false;\n }\n }\n\n // Detect other chord kinds by explicit interval comparison.\n [\n { intervals: ['1', '4', '5'], kind: 'suspended-fourth', strict: true },\n { intervals: ['1', '5', '9'], kind: 'suspended-second', strict: true },\n { intervals: ['1', 'b3', 'b5', 'b7'], kind: 'half-diminished', strict: true },\n { intervals: ['1', '3', '#5', 'b7'], kind: 'augmented-seventh', strict: false }\n ].some(chord => {\n if (\n (!chord.strict || parsedChord.normalized.intervals.length === chord.intervals.length) &&\n chord.intervals.every((s, i) => s === parsedChord.normalized.intervals[i])\n ) {\n chordKind = chord.kind;\n\n // Remove the intervals from the parsedChord to avoid duplication below.\n chord.intervals.forEach(i => {\n parsedChord.normalized.alterations = parsedChord.normalized.alterations.filter(p => p === i);\n parsedChord.normalized.adds = parsedChord.normalized.adds.filter(p => p === i);\n parsedChord.normalized.omits = parsedChord.normalized.omits.filter(p => p === i);\n });\n\n // Add the missing intervals from the parsedChord to the adds.\n parsedChord.normalized.intervals.forEach(i => {\n if (!chord.intervals.includes(i)) {\n parsedChord.normalized.adds.push(i);\n }\n });\n\n // Stop looping.\n return true;\n }\n });\n\n // Handle suspended chords other than triads.\n const chordDegrees = [];\n if (parsedChord.normalized.isSuspended && !chordKind.includes('suspended')) {\n parsedChord.normalized.adds.push('4');\n // Handle case of sus(add3)\n if (!parsedChord.normalized.adds.includes('3')) {\n parsedChord.normalized.omits.push('3');\n }\n }\n\n // Add chord degrees.\n parsedChord.normalized.alterations.forEach(alteration => {\n const degree = alteration.slice(1);\n chordDegrees.push(\n this.convertChordDegree(\n degree,\n (degree === '5' || parsedChord.normalized.extensions.includes(degree)) ? 'alter' : 'add',\n this._map(Converter.mapAlter, alteration[0], 0, `Unrecognized alter symbol in \"${alteration}\"`)\n )\n );\n });\n parsedChord.normalized.adds.forEach(add => {\n const alteration = Object.keys(Converter.mapAlter).includes(add[0]) ? add[0] : null;\n const degree = alteration ? add.slice(1) : add;\n chordDegrees.push(\n this.convertChordDegree(degree, 'add', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${add}\"`))\n );\n });\n parsedChord.normalized.omits.forEach(omit => {\n const alteration = Object.keys(Converter.mapAlter).includes(omit[0]) ? omit[0] : null;\n const degree = alteration ? omit.slice(1) : omit;\n chordDegrees.push(\n this.convertChordDegree(degree, 'subtract', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${omit}\"`))\n );\n });\n\n return { rootStep, rootAlter, chordKind, chordDegrees, chordText };\n }\n\n convertChord(chord) {\n let harmony = null;\n\n // Special case: 'n' for no chord\n if (chord.note === 'n') {\n harmony = [{\n 'root': [{\n _name: 'root-step',\n _attrs: { 'text': '' },\n _content: this.options.step\n }],\n }, {\n _name: 'kind',\n _attrs: { 'text': 'N.C.' },\n _content: 'none',\n }];\n }\n else {\n const { rootStep, rootAlter, chordKind, chordDegrees, chordText } = this.convertChordSymbol(chord);\n\n // Handle bass note\n const bass = !chord.over ? null : [{\n 'bass-step': chord.over.note[0]\n }, { ...(chord.over.note[1] && {\n 'bass-alter': this._map(Converter.mapAlter, chord.over.note[1], null, `Unrecognized accidental in bass note \"${chord.over.note}\"`)\n })}];\n\n harmony = [{\n 'root': [{\n 'root-step': rootStep\n }, { ...(rootAlter && { // Don't generate the root-alter entry if rootAlter is blank\n 'root-alter': rootAlter\n })}],\n }, {\n _name: 'kind',\n _attrs: { 'text': chordText, 'use-symbols': 'no' },\n _content: chordKind,\n }, { ...(bass && {\n 'bass': bass\n })}].concat(chordDegrees);\n }\n\n // TODO Handle alternate chord\n if (chord.alternate) {\n this._log(LogLevel.Warn, `Unhandled alternate chord ${JSON.stringify(chord.alternate)}`);\n }\n\n return new Converter.Chord(\n harmony,\n // Initial chord duration is 1 beat\n this.calculateChordDuration(1).map(duration => this.convertChordNote(duration)),\n chord\n );\n }\n\n convertKey() {\n const mapKeys = {\n // Major keys\n 'C': 0, 'G': 1, 'D': 2, 'A': 3, 'E': 4, 'B': 5, 'F#': 6, 'C#': 7,\n 'F': -1, 'Bb': -2, 'Eb': -3, 'Ab': -4, 'Db': -5, 'Gb': -6, 'Cb': -7,\n // Minor keys\n 'A-': 0, 'E-': 1, 'B-': 2, 'F#-': 3, 'C#-': 4, 'G#-': 5, 'D#-': 6, 'A#-': 7,\n 'D-': -1, 'G-': -2, 'C-': -3, 'F-': -4, 'Bb-': -5, 'Eb-': -6, 'Ab-': -7\n };\n\n // Remember the fifth.\n this.fifths = this._map(mapKeys, this.song.key, 0, `Unrecognized key signature \"${this.song.key}\"`);\n\n return {\n _name: 'key',\n _attrs: [{ 'print-object': this.options.keySignature ? 'yes' : 'no' }],\n _content: [{\n 'fifths': this.fifths\n }, {\n 'mode': this.song.key.slice(-1) === '-' ? 'minor' : 'major'\n }]\n };\n }\n\n convertStyleAndGroove(style, groove) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n 'words': style\n }]\n }, {\n 'sound': [{\n 'play': [{\n _name: 'other-play',\n _attrs: { 'type': 'groove' },\n _content: groove || style\n }]\n }]\n }]\n };\n }\n\n _log(logLevel, message, measure = this.measure) {\n if (logLevel < this.options.logLevel) return;\n const log = `[ireal-musicxml] [${this.song.title}${measure ? '#' + measure.number() : ''}] ${message}`;\n let method = 'warn';\n switch (logLevel) {\n case LogLevel.Debug: method = 'debug'; break;\n case LogLevel.Info: method = 'info'; break;\n case LogLevel.Warn: method = 'warn'; break;\n case LogLevel.Error: method = 'error'; break;\n }\n console[method](log);\n }\n\n _map(map, key, defaultValue, message, logLevel = LogLevel.Warn, measure = this.measure) {\n if (!key) return defaultValue;\n if (!(key in map)) {\n if (message) {\n this._log(logLevel, message, measure);\n }\n return defaultValue || null;\n }\n return map[key];\n }\n\n static _mmToTenths(mm, decimals = 2) {\n const value = mm * SCALING_TENTHS / SCALING_MM;\n const power = Math.pow(10, decimals);\n return Math.round(value * power) / power;\n }\n}\n", "/**\n * Execute given functions in sequence, feeding the result of one as an input to the next.\n *\n * @param {Function[]} allFunctions\n * @param {*} input - parameter given to the first function\n * @returns {*} return value of the last function\n */\nexport default function chain(allFunctions, input) {\n\treturn allFunctions.reduce((value, fn) => {\n\t\treturn value ? fn(value) : null;\n\t}, input);\n}\n", "import chain from '../helpers/chain';\nimport _cloneDeep from 'lodash/cloneDeep';\nimport _isString from 'lodash/isString';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport { allVariantsPerGroup } from '../dictionaries/notes';\nimport { allKeys } from '../dictionaries/allKeys';\n\nimport {\n\tInvalidInputError,\n\tUnexpectedError,\n} from '../helpers/ChordParsingError';\n\nimport checkIntervalsConsistency from './filters/checkIntervalsConsistency';\nimport formatSymbol from './filters/formatSymbol';\nimport formatSymbolParts from './filters/formatSymbolParts';\nimport formatNumeralSymbol from './filters/formatNumeralSymbol';\nimport getParsableDescriptor from './filters/getParsableDescriptor';\nimport initChord from './filters/initChord';\nimport nameIndividualChordNotes from './filters/nameIndividualChordNotes';\nimport normalizeNotes from './filters/normalizeNotes';\nimport normalizeDescriptor from './filters/normalizeDescriptor';\nimport parseBase from './filters/parseBase';\nimport parseDescriptor from './filters/parseDescriptor';\n\n/**\n * Create a chord parser function\n * @param {ParserConfiguration} [parserConfiguration]\n * @returns {function(String): MaybeChord}\n */\nfunction chordParserFactory(parserConfiguration = {}) {\n\tconst allAltIntervals = ['b5', '#5', 'b9', '#9', '#11', 'b13'];\n\tconst allNotationSystems = ['english', 'german', 'latin'];\n\n\tconst {\n\t\tnotationSystems = _cloneDeep(allNotationSystems),\n\t\taltIntervals = _cloneDeep(allAltIntervals),\n\t\tcustomFilters = [],\n\t\tkey = '',\n\t} = parserConfiguration;\n\n\tcheckAltIntervals(altIntervals, allAltIntervals);\n\tcheckNotationSystems(notationSystems, allNotationSystems);\n\tcheckCustomFilters(customFilters);\n\tcheckKey(key);\n\n\treturn parseChord;\n\n\t/**\n\t * Convert an input string into an abstract chord structure\n\t * @param {String} symbol - the chord symbol candidate\n\t * @returns {MaybeChord} A chord data object if the given string is successfully parsed.\n\t * A chord parse failure object with an `error` property otherwise.\n\t */\n\tfunction parseChord(symbol) {\n\t\tconst allErrors = [];\n\n\t\tif (!isInputValid(symbol)) {\n\t\t\tconst e = new InvalidInputError();\n\t\t\tallErrors.push(formatError(e));\n\t\t}\n\n\t\tconst allVariantsPerGroupCopy = _cloneDeep(allVariantsPerGroup).filter(\n\t\t\t(variantsGroup) => notationSystems.includes(variantsGroup.name)\n\t\t);\n\n\t\tlet chord;\n\t\tlet allFilters;\n\t\tlet variants;\n\n\t\tif (!allErrors.length) {\n\t\t\twhile (allVariantsPerGroupCopy.length && !chord) {\n\t\t\t\tvariants = allVariantsPerGroupCopy.shift();\n\n\t\t\t\tallFilters = [\n\t\t\t\t\tinitChord.bind(null, parserConfiguration),\n\t\t\t\t\tparseBase.bind(null, variants.notes),\n\t\t\t\t\tgetParsableDescriptor,\n\t\t\t\t\tparseDescriptor.bind(null, altIntervals),\n\t\t\t\t\tcheckIntervalsConsistency,\n\t\t\t\t\tnormalizeNotes,\n\t\t\t\t\tnormalizeDescriptor,\n\t\t\t\t\tformatSymbolParts,\n\t\t\t\t\tformatSymbol,\n\t\t\t\t\tnameIndividualChordNotes,\n\t\t\t\t\tformatNumeralSymbol.bind(null, key),\n\t\t\t\t\t...customFilters,\n\t\t\t\t];\n\n\t\t\t\ttry {\n\t\t\t\t\tchord = chain(allFilters, symbol);\n\t\t\t\t\tif (chord) {\n\t\t\t\t\t\tchord.input.notationSystem = variants.name;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tallErrors.push(getUnexpectedError(variants.name));\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tallErrors.push(formatError(e, variants.name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn chord ? chord : { error: allErrors };\n\t}\n}\n\nfunction checkAltIntervals(altIntervals, allAltIntervals) {\n\tcheckArray('altIntervals', altIntervals, allAltIntervals, true);\n}\n\nfunction checkNotationSystems(notationSystems, allNotationSystems) {\n\tcheckArray('notationSystems', notationSystems, allNotationSystems);\n}\n\nfunction checkArray(arrayName, arrayToTest, allowedValues, allowEmpty) {\n\tif (!Array.isArray(arrayToTest)) {\n\t\tthrow new TypeError(`'${arrayName}' should be an array`);\n\t}\n\tif (!allowEmpty && arrayToTest.length === 0) {\n\t\tthrow new TypeError(`'${arrayName}' cannot be empty`);\n\t}\n\tarrayToTest.forEach((system) => {\n\t\tif (!allowedValues.includes(system)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`'${system}' is not a valid value for ${arrayName}`\n\t\t\t);\n\t\t}\n\t});\n}\n\nfunction checkKey(key) {\n\tif (key !== '' && (!_isString(key) || !allKeys.includes(key))) {\n\t\tthrow new TypeError(`'${key}' is not a valid value for key`);\n\t}\n}\n\nfunction isInputValid(input) {\n\treturn typeof input === 'string' && input.length > 0;\n}\n\nfunction getUnexpectedError(notationSystem) {\n\tconst error = new UnexpectedError();\n\treturn formatError(error, notationSystem);\n}\n\nfunction formatError(exceptionError, notationSystem) {\n\treturn {\n\t\ttype: exceptionError.name,\n\t\tchord: exceptionError.chord,\n\t\tmessage: exceptionError.message,\n\t\tnotationSystem,\n\t};\n}\n\n/**\n * @module chordParserFactory\n * Expose the chordParserFactory() function\n */\nexport default chordParserFactory;\n", "const checkCustomFilters = (customFilters) => {\n\tif (!Array.isArray(customFilters)) {\n\t\tthrow new TypeError('customFilters should be given as an array');\n\t}\n\tif (customFilters.some((filter) => typeof filter !== 'function')) {\n\t\tthrow new TypeError(`The given filter is not a function`);\n\t}\n\treturn true;\n};\n\nexport default checkCustomFilters;\n", "import _invert from 'lodash/invert';\nimport _omit from 'lodash/omit';\n\nconst notes = {\n\tAFlat: 'Ab',\n\tA: 'A',\n\tASharp: 'A#',\n\tBFlat: 'Bb',\n\tB: 'B',\n\tC: 'C',\n\tCSharp: 'C#',\n\tDFlat: 'Db',\n\tD: 'D',\n\tDSharp: 'D#',\n\tEFlat: 'Eb',\n\tE: 'E',\n\tF: 'F',\n\tFSharp: 'F#',\n\tGFlat: 'Gb',\n\tG: 'G',\n\tGSharp: 'G#',\n};\n\nconst english = {\n\tAb: notes.AFlat,\n\tA: notes.A,\n\t'A#': notes.ASharp,\n\tBb: notes.BFlat,\n\tB: notes.B,\n\t'B#': notes.C,\n\tCb: notes.B,\n\tC: notes.C,\n\t'C#': notes.CSharp,\n\tDb: notes.DFlat,\n\tD: notes.D,\n\t'D#': notes.DSharp,\n\tEb: notes.EFlat,\n\tE: notes.E,\n\t'E#': notes.F,\n\tFb: notes.E,\n\tF: notes.F,\n\t'F#': notes.FSharp,\n\tGb: notes.GFlat,\n\tG: notes.G,\n\t'G#': notes.GSharp,\n};\n\nconst latin = {\n\tLab: notes.AFlat,\n\tLa: notes.A,\n\t'La#': notes.ASharp,\n\tSib: notes.BFlat,\n\tSi: notes.B,\n\t'Si#': notes.C,\n\tDob: notes.B,\n\tDo: notes.C,\n\t'Do#': notes.CSharp,\n\tReb: notes.DFlat,\n\tR\u00E9b: notes.DFlat,\n\tRe: notes.D,\n\tR\u00E9: notes.D,\n\t'Re#': notes.DSharp,\n\t'R\u00E9#': notes.DSharp,\n\tMib: notes.EFlat,\n\tMi: notes.E,\n\t'Mi#': notes.F,\n\tFab: notes.E,\n\tFa: notes.F,\n\t'Fa#': notes.FSharp,\n\tSolb: notes.GFlat,\n\tSol: notes.G,\n\t'Sol#': notes.GSharp,\n};\n\nconst german = {\n\t..._omit(english, ['Bb', 'B', 'B#']),\n\tAs: notes.AFlat,\n\tAis: notes.ASharp,\n\tHb: notes.BFlat,\n\tHes: notes.BFlat,\n\tH: notes.B,\n\tHis: notes.C,\n\t'H#': notes.C,\n\tCes: notes.B,\n\tCis: notes.CSharp,\n\tDes: notes.DFlat,\n\tDis: notes.DSharp,\n\tEs: notes.EFlat,\n\tEis: notes.F,\n\tFes: notes.E,\n\tFis: notes.FSharp,\n\tGes: notes.GFlat,\n\tGis: notes.GSharp,\n};\n\nfunction getAccidentalsVariation(source) {\n\tlet variant;\n\treturn Object.keys(source).reduce((acc, curr) => {\n\t\tif (curr.match(/.[b|#]$/)) {\n\t\t\tvariant = curr.replace('#', '\u266F').replace('b', '\u266D');\n\t\t\tacc[variant] = source[curr];\n\t\t}\n\t\treturn acc;\n\t}, {});\n}\n\nconst englishVariantsToNotes = {\n\t...english,\n\t...getAccidentalsVariation(english),\n};\n\nconst latinVariantsToNotes = {\n\t...latin,\n\t...getAccidentalsVariation(latin),\n};\n\nconst germanVariantsToNotes = {\n\t...german,\n\t...getAccidentalsVariation(german),\n};\n\nconst allVariantsToNotes = {\n\t...englishVariantsToNotes,\n\t...latinVariantsToNotes,\n\t...germanVariantsToNotes,\n};\n\nconst allVariants = Object.keys(allVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst englishVariants = Object.keys(englishVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst latinVariants = Object.keys(latinVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst germanVariants = Object.keys(germanVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst allVariantsPerGroup = [\n\t{ name: 'english', notes: englishVariants },\n\t{ name: 'german', notes: germanVariants },\n\t{ name: 'latin', notes: latinVariants },\n];\n\nconst notesSharp = [\n\tnotes.A,\n\tnotes.ASharp,\n\tnotes.B,\n\tnotes.C,\n\tnotes.CSharp,\n\tnotes.D,\n\tnotes.DSharp,\n\tnotes.E,\n\tnotes.F,\n\tnotes.FSharp,\n\tnotes.G,\n\tnotes.GSharp,\n];\n\nconst notesFlat = [\n\tnotes.A,\n\tnotes.BFlat,\n\tnotes.B,\n\tnotes.C,\n\tnotes.DFlat,\n\tnotes.D,\n\tnotes.EFlat,\n\tnotes.E,\n\tnotes.F,\n\tnotes.GFlat,\n\tnotes.G,\n\tnotes.AFlat,\n];\n\nconst sharpsToFlats = {\n\t[notes.CSharp]: notes.DFlat,\n\t[notes.DSharp]: notes.EFlat,\n\t[notes.FSharp]: notes.GFlat,\n\t[notes.GSharp]: notes.AFlat,\n\t[notes.ASharp]: notes.BFlat,\n};\n\nconst flatsToSharps = _invert(sharpsToFlats);\n\nexport {\n\tnotes,\n\tnotesSharp,\n\tnotesFlat,\n\tsharpsToFlats,\n\tflatsToSharps,\n\tallVariants,\n\tallVariantsPerGroup,\n\tenglishVariants,\n\tlatinVariants,\n\tgermanVariants,\n\tallVariantsToNotes,\n\tenglishVariantsToNotes,\n\tlatinVariantsToNotes,\n\tgermanVariantsToNotes,\n};\n", "import { notes } from './notes';\n\nexport const allKeys = [\n\t...Object.values(notes),\n\t...Object.values(notes).map((key) => key + 'm'),\n];\n", "class InvalidInputError extends Error {\n\t/**\n\t * The parser was not given a valid string to parse\n\t * ex: `parseChord(null)`\n\t */\n\tconstructor() {\n\t\tsuper('The given symbol is not a valid string');\n\t\tthis.name = 'InvalidInput';\n\t}\n}\n\nclass UnexpectedError extends Error {\n\t/**\n\t * This error is very unlikely to happen.\n\t * If it does, it is probably in the context of a custom filter that returns `null` instead of throwing an exception.\n\t */\n\tconstructor() {\n\t\tconst message =\n\t\t\t'An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?';\n\t\tsuper(message);\n\t\tthis.name = 'UnexpectedError';\n\t}\n}\n\nclass ChordSymbolError extends Error {\n\tconstructor(message, chord, errorName) {\n\t\tsuper(message);\n\t\tthis.name = errorName;\n\t\tthis.chord = chord;\n\t}\n}\n\nclass NoSymbolFoundError extends ChordSymbolError {\n\t/**\n\t * The given string cannot be confused with a chord symbol in the current notation system\n\t * ex: `parseChord('Ape')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t */\n\tconstructor(chord) {\n\t\tconst message = `\"${chord.input.symbol}\" does not seems to be a chord`;\n\t\tsuper(message, chord, 'NoSymbolFound');\n\t}\n}\n\nclass InvalidModifierError extends ChordSymbolError {\n\t/**\n\t * The given string looks like a chord symbol, but `ChordSymbol` does not understand its descriptor.\n\t * It can be either because of a typo, or just because the given word is not a symbol.\n\t * ex: `parseChord('Amid')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String} invalidChars - the characters that proved problematic when parsing the symbol\n\t */\n\tconstructor(chord, invalidChars) {\n\t\tconst message = `The chord descriptor \"${chord.input.descriptor}\" contains unknown or duplicated modifiers: \"${invalidChars}\"`;\n\t\tsuper(message, chord, 'InvalidModifier');\n\t}\n}\n\nclass InvalidIntervalsError extends ChordSymbolError {\n\t/**\n\t * The given string is a chord symbol, but the resulting interval list is not valid\n\t * ex: `parseChord('A7M7')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String[]} forbiddenCombo - intervals that should not belong together in a chord\n\t */\n\tconstructor(chord, forbiddenCombo) {\n\t\tconst message =\n\t\t\t`\"${chord.input.symbol}\" describes a chord with an invalid intervals combo: ` +\n\t\t\tforbiddenCombo.join(' and ');\n\t\tsuper(message, chord, 'InvalidIntervals');\n\t}\n}\n\nexport {\n\tInvalidInputError,\n\tInvalidIntervalsError,\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n\tUnexpectedError,\n};\n", "import _isArray from 'lodash/isArray';\nimport _isEqual from 'lodash/isEqual';\n\nfunction hasExactly(allIntervals, search) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\treturn _isEqual(allIntervals, arraySearch);\n}\n\nfunction hasOneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'oneOf');\n}\n\nfunction hasAll(allIntervals, search) {\n\treturn has(allIntervals, search, 'all');\n}\n\nfunction hasNoneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'none');\n}\n\nfunction has(allIntervals, search, require) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\n\tconst lookupMethod = require === 'oneOf' ? 'some' : 'every';\n\n\treturn arraySearch[lookupMethod]((interval) => {\n\t\treturn require === 'none'\n\t\t\t? !allIntervals.includes(interval)\n\t\t\t: allIntervals.includes(interval);\n\t});\n}\n\nexport { hasExactly, hasOneOf, hasAll, hasNoneOf };\n", "import { hasAll } from '../../helpers/hasElement';\nimport { InvalidIntervalsError } from '../../helpers/ChordParsingError';\n\nconst allForbiddenCombos = [\n\t['2', '3'],\n\t['2', '9'],\n\t['3', 'b3'],\n\t//['3', '4'], // valid in the Real Book: F#7SUS(add 3)\n\t['4', '11'],\n\t['5', 'b5'],\n\t['5', '#5'],\n\t['b6', '#5'],\n\t['b6', '6'],\n\t['b6', '13'],\n\t['6', '13'],\n\t['b7', 'bb7'],\n\t['7', 'b7'],\n\t['9', 'b9'],\n\t['9', '#9'],\n\t['11', '#11'],\n\t['13', 'b13'],\n];\n\n/**\n * Check parsed interval list to detect potential inconsistencies\n *\n * @param {Chord} chord\n * @returns {(Chord|Null)}\n */\nexport default function checkIntervalsConsistency(chord) {\n\tconst intervals = chord.normalized.intervals;\n\n\tconst forbiddenCombo = allForbiddenCombos.find((combo) =>\n\t\thasAll(intervals, combo)\n\t);\n\n\tif (forbiddenCombo) {\n\t\tthrow new InvalidIntervalsError(chord, forbiddenCombo);\n\t}\n\n\treturn chord;\n}\n", "/**\n * Render the chord by assembling all its components\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbol(chord) {\n\tconst { rootNote, bassNote, descriptor, chordChanges } = chord.formatted;\n\n\tlet symbol = rootNote;\n\n\tif (descriptor) {\n\t\tsymbol += descriptor;\n\t}\n\tif (chordChanges && chordChanges.length) {\n\t\tsymbol += '(' + chordChanges.join(',') + ')';\n\t}\n\tif (bassNote) {\n\t\tsymbol += '/' + bassNote;\n\t}\n\n\tchord.formatted.symbol = symbol;\n\n\treturn chord;\n}\n", "const qualities = {\n\tma: 'major',\n\tma6: 'major6',\n\tma7: 'major7',\n\tdom7: 'dominant7',\n\n\tmi: 'minor',\n\tmi6: 'minor6',\n\tmi7: 'minor7',\n\tmiMa7: 'minorMajor7',\n\n\taug: 'augmented',\n\tdim: 'diminished',\n\tdim7: 'diminished7',\n\n\tpower: 'power',\n\tbass: 'bass',\n};\n\nconst majorQualities = [\n\tqualities.ma,\n\tqualities.ma6,\n\tqualities.ma7,\n\tqualities.dom7,\n\tqualities.aug,\n];\n\nconst minorQualities = [\n\tqualities.mi,\n\tqualities.mi6,\n\tqualities.mi7,\n\tqualities.miMa7,\n\tqualities.dim,\n\tqualities.dim7,\n];\n\nexport { qualities, majorQualities, minorQualities };\n", "import { qualities } from '../../dictionaries/qualities';\nimport { hasNoneOf } from '../../helpers/hasElement';\n\nconst qualityToDescriptor = {\n\t[qualities.ma]: () => '',\n\t[qualities.ma6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? '69' : '6',\n\t[qualities.ma7]: (chord) => 'ma' + getHighestExtension(chord),\n\t[qualities.dom7]: (chord) =>\n\t\tchord.normalized.intents.alt ? '7alt' : getHighestExtension(chord),\n\n\t[qualities.mi]: () => 'mi',\n\t[qualities.mi6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? 'mi69' : 'mi6',\n\t[qualities.mi7]: (chord) => 'mi' + getHighestExtension(chord),\n\t[qualities.miMa7]: (chord) => 'miMa' + getHighestExtension(chord),\n\n\t[qualities.aug]: () => '+',\n\t[qualities.dim]: () => 'dim',\n\t[qualities.dim7]: () => 'dim7',\n\n\t[qualities.power]: () => '5',\n\t[qualities.bass]: () => ' bass',\n};\n\nconst chordChangesDescriptors = {\n\tadd: 'add',\n\tadd7: 'Ma7',\n\tomit: 'omit',\n\tsus: 'sus',\n};\n\n/**\n * Pre-render the chord by formatting all his components: root and bass notes, descriptor and changes\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbolParts(chord) {\n\tchord.formatted = {\n\t\trootNote: chord.normalized.rootNote,\n\t\tbassNote: chord.normalized.bassNote,\n\t\tdescriptor: getDescriptor(chord),\n\t\tchordChanges: getChordChanges(chord),\n\t};\n\treturn chord;\n}\n\nfunction getDescriptor(chord) {\n\tlet descriptor = qualityToDescriptor[chord.normalized.quality](chord);\n\tif (chord.normalized.isSuspended) {\n\t\tdescriptor += chordChangesDescriptors.sus;\n\t}\n\treturn descriptor;\n}\n\nfunction getHighestExtension(chord) {\n\tconst extensions = chord.normalized.extensions;\n\n\tlet highestExtension = extensions[extensions.length - 1];\n\n\tif (highestExtension === '11' && chord.normalized.intents.major) {\n\t\thighestExtension = hasNoneOf(chord.normalized.alterations, ['b9', '#9'])\n\t\t\t? '9'\n\t\t\t: '7';\n\t}\n\treturn highestExtension || '7';\n}\n\nfunction getChordChanges(chord) {\n\tconst formattedOmits = formatOmits(chord.normalized.omits);\n\n\tif (isAltered(chord)) {\n\t\treturn formattedOmits;\n\t}\n\n\tconst formattedAdds = formatAdds(\n\t\tchord.normalized.quality,\n\t\tchord.normalized.adds\n\t);\n\n\treturn [\n\t\t...chord.normalized.alterations,\n\t\t...formattedAdds,\n\t\t...formattedOmits,\n\t];\n}\n\nfunction isAltered(chord) {\n\treturn (\n\t\tchord.normalized.intents.alt &&\n\t\tchord.normalized.quality === qualities.dom7\n\t);\n}\n\nfunction formatAdds(quality, adds) {\n\treturn adds\n\t\t.filter((add) => {\n\t\t\treturn !(\n\t\t\t\t[qualities.ma6, qualities.mi6].includes(quality) && add === '9'\n\t\t\t);\n\t\t})\n\t\t.map((add, index) => {\n\t\t\tlet formatted = '';\n\t\t\tif (index === 0) {\n\t\t\t\tformatted += chordChangesDescriptors.add;\n\t\t\t\tif (['b', '#'].includes(add[0])) {\n\t\t\t\t\tformatted += ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tformatted += add === '7' ? chordChangesDescriptors.add7 : add;\n\t\t\treturn formatted;\n\t\t});\n}\n\nfunction formatOmits(omits) {\n\treturn omits.map((omitted, index) => {\n\t\tlet formatted = '';\n\t\tif (index === 0) {\n\t\t\tformatted += chordChangesDescriptors.omit;\n\t\t}\n\t\tformatted += omitted === 'b3' ? '3' : omitted;\n\t\treturn formatted;\n\t});\n}\n", "const u = {\n\tflat: `\\u266D`, // \u266D\n\tsharp: `\\u266F`, // \u266F\n};\n\nexport const semitonesToDegree = {\n\tmajor: {\n\t\t0: `I`,\n\t\t//1: `${u.flat}II`,\n\t\t2: `II`,\n\t\t3: `${u.flat}III`,\n\t\t4: `III`,\n\t\t5: `IV`,\n\t\t//6: `${u.flat}V`,\n\t\t7: `V`,\n\t\t8: `${u.flat}VI`,\n\t\t9: `VI`,\n\t\t10: `${u.flat}VII`,\n\t\t11: `VII`,\n\t},\n\tminor: {\n\t\t0: `I`,\n\t\t//1: `${u.sharp}I`,\n\t\t2: `II`,\n\t\t3: `III`,\n\t\t4: `${u.sharp}III`,\n\t\t5: `IV`,\n\t\t//6: `${u.sharp}IV`,\n\t\t7: `V`,\n\t\t8: `VI`,\n\t\t9: `${u.sharp}VI`,\n\t\t10: `VII`,\n\t\t11: `${u.sharp}VII`,\n\t},\n};\n", "import { flatsToSharps, notesSharp } from '../../dictionaries/notes';\nimport { semitonesToDegree } from '../../dictionaries/degrees';\nimport { minorQualities, qualities } from '../../dictionaries/qualities';\n\nconst u = {\n\tsup2: '\\u00B2', // \u00B2\n\tsup4: '\\u2074', // \u2074\n\tsup5: '\\u2075', // \u2075\n\tsup6: '\\u2076', // \u2076\n\tsup7: '\\u2077', // \u2077\n\tsub3: '\\u2083', // \u2083\n\tsub4: '\\u2084', // \u2084\n\tsub5: '\\u2085', // \u2085\n\tflat: '\\u266D', // \u266D\n\tsharp: '\\u266F', // \u266F\n};\n\nconst diatonicChords = {\n\tmajor: [`I`, `ii`, `iii`, `IV`, `V`, `vi`, `vii\u00B0`],\n\tdom7: [\n\t\t`I\u0394`,\n\t\t`ii${u.sup7}`,\n\t\t`iii${u.sup7}`,\n\t\t`IV\u0394`,\n\t\t`V${u.sup7}`,\n\t\t`vi${u.sup7}`,\n\t\t`vii\u00F8`,\n\t],\n\tminor: [`i`, `ii\u00B0`, `III`, `iv`, `v`, `VI`, `VII`],\n\tminor7: [\n\t\t`i${u.sup7}`,\n\t\t`ii\u00F8`,\n\t\t`III\u0394`,\n\t\t`iv${u.sup7}`,\n\t\t`v${u.sup7}`,\n\t\t`VI\u0394`,\n\t\t`VII\u0394`,\n\t],\n};\n\nconst borrowedChords = {\n\tborrowedFromMinor: [\n\t\t`i`,\n\t\t`ii\u00B0`,\n\t\t`${u.flat}III`,\n\t\t`iv`,\n\t\t`v`,\n\t\t`${u.flat}VI`,\n\t\t`${u.flat}VII`,\n\t],\n\tborrowedFromMinor7: [\n\t\t`i${u.sup7}`,\n\t\t`ii\u00F8`,\n\t\t`${u.flat}III\u0394`,\n\t\t`iv${u.sup7}`,\n\t\t`v${u.sup7}`,\n\t\t`${u.flat}VI\u0394`,\n\t\t`${u.flat}VII\u0394`,\n\t],\n\tborrowedFromMajor: [\n\t\t`I`,\n\t\t`ii`,\n\t\t`${u.sharp}iii`,\n\t\t`IV`,\n\t\t`V`,\n\t\t`${u.sharp}vi`,\n\t\t`${u.sharp}vii\u00B0`,\n\t],\n\tborrowedFromDom7: [\n\t\t`I\u0394`,\n\t\t`ii${u.sup7}`,\n\t\t`${u.sharp}iii${u.sup7}`,\n\t\t`IV\u0394`,\n\t\t`V${u.sup7}`,\n\t\t`${u.sharp}vi${u.sup7}`,\n\t\t`${u.sharp}vii\u00F8`,\n\t],\n};\n\n/**\n * Construct the roman numeral symbol for a chord\n * @param {String} key\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatNumeralSymbol(key = '', chord) {\n\tlet degree;\n\tlet symbol;\n\tlet type;\n\n\tif (!key) key = chord.normalized.rootNote;\n\n\tconst keyQuality = key.indexOf('m') > -1 ? 'minor' : 'major';\n\tconst thirdQuality = minorQualities.includes(chord.normalized.quality)\n\t\t? 'minor'\n\t\t: 'major';\n\n\tdegree = getRomanDegree(key, keyQuality, chord, thirdQuality);\n\n\tconst inversion = getInversion(chord);\n\tconst descriptor = qualityToDescriptor[chord.normalized.quality](\n\t\tchord,\n\t\tinversion\n\t);\n\n\tsymbol = `${degree}${descriptor}`;\n\n\tif (isDiatonic(keyQuality, symbol)) {\n\t\ttype = 'diatonic';\n\t} else if (isBorrowed(keyQuality, symbol)) {\n\t\ttype = 'borrowed';\n\t} else {\n\t\ttype = 'unknown';\n\t\tdegree = '?';\n\t\tsymbol = `${degree}${descriptor}`;\n\t}\n\n\tsymbol += inversion;\n\n\tchord.numeral = {\n\t\tsymbol,\n\t\tdegree,\n\t\tdescriptor,\n\t\tinversion,\n\t\ttype,\n\t\tthirdQuality,\n\t};\n\treturn chord;\n}\n\nfunction getRomanDegree(key, keyQuality, chord, thirdQuality) {\n\tconst keyNote = key.replace('m', '');\n\n\tconst interval = getIntervalBetweenNotes(\n\t\tkeyNote,\n\t\tchord.normalized.rootNote\n\t);\n\tconst romanDegree = semitonesToDegree[keyQuality][interval] || '?';\n\n\treturn thirdQuality === 'minor' ? romanDegree.toLowerCase() : romanDegree;\n}\n\nfunction getIntervalBetweenNotes(note1, note2) {\n\tconst note1Index = notesSharp.indexOf(flatsToSharps[note1] || note1);\n\tconst note2Index = notesSharp.indexOf(flatsToSharps[note2] || note2);\n\treturn (note2Index - note1Index + 12) % 12;\n}\n\nconst qualityToDescriptor = {\n\t[qualities.ma]: () => '',\n\t[qualities.ma6]: () => '',\n\t[qualities.ma7]: () => '\u0394',\n\t[qualities.dom7]: (chord, inversion) =>\n\t\tinversion === '' ? `${u.sup7}` : '',\n\n\t[qualities.mi]: () => '',\n\t[qualities.mi6]: () => '',\n\t[qualities.mi7]: (chord, inversion) => {\n\t\tif (chord.normalized.intervals.includes('b5')) {\n\t\t\treturn '\u00F8';\n\t\t} else {\n\t\t\treturn inversion === '' ? `${u.sup7}` : '';\n\t\t}\n\t},\n\t[qualities.miMa7]: () => 'm\u0394',\n\n\t[qualities.aug]: () => '+',\n\t[qualities.dim]: () => '\u00B0',\n\t[qualities.dim7]: (chord, inversion) =>\n\t\tinversion === '' ? `\u00B0${u.sup7}` : '\u00B0',\n\n\t[qualities.power]: () => '',\n\t[qualities.bass]: () => '',\n};\n\nfunction isDiatonic(keyQuality, symbol) {\n\tif (keyQuality === 'major') {\n\t\treturn (\n\t\t\tdiatonicChords.major.includes(symbol) ||\n\t\t\tdiatonicChords.dom7.includes(symbol)\n\t\t);\n\t} else {\n\t\treturn (\n\t\t\tdiatonicChords.minor.includes(symbol) ||\n\t\t\tdiatonicChords.minor7.includes(symbol)\n\t\t);\n\t}\n}\n\nfunction isBorrowed(keyQuality, symbol) {\n\tif (keyQuality === 'major') {\n\t\treturn (\n\t\t\tborrowedChords.borrowedFromMinor.includes(symbol) ||\n\t\t\tborrowedChords.borrowedFromMinor7.includes(symbol)\n\t\t);\n\t} else {\n\t\treturn (\n\t\t\tborrowedChords.borrowedFromMajor.includes(symbol) ||\n\t\t\tborrowedChords.borrowedFromDom7.includes(symbol)\n\t\t);\n\t}\n}\n\nfunction getInversion(chord) {\n\tlet inversion = '';\n\tif (chord.normalized.bassNote) {\n\t\tif (bassIsThird(chord)) {\n\t\t\tinversion = isSeventh(chord) ? `${u.sup6}${u.sub5}` : `${u.sup6}`;\n\t\t} else if (bassIsFifth(chord)) {\n\t\t\tinversion = isSeventh(chord)\n\t\t\t\t? `${u.sup4}${u.sub3}`\n\t\t\t\t: `${u.sup6}${u.sub4}`;\n\t\t} else if (bassIsSeventh(chord)) {\n\t\t\tinversion = `\u00B2`;\n\t\t}\n\t}\n\treturn inversion;\n}\n\nfunction isSeventh(chord) {\n\treturn [\n\t\tqualities.ma7,\n\t\tqualities.mi7,\n\t\tqualities.miMa7,\n\t\tqualities.dom7,\n\t\tqualities.dim7,\n\t].includes(chord.normalized.quality);\n}\n\nfunction bassIsThird(chord) {\n\treturn bassIsIntervalNote(chord, 'b3') || bassIsIntervalNote(chord, '3');\n}\n\nfunction bassIsFifth(chord) {\n\treturn (\n\t\tbassIsIntervalNote(chord, 'b5') ||\n\t\tbassIsIntervalNote(chord, '5') ||\n\t\tbassIsIntervalNote(chord, '#5')\n\t);\n}\n\nfunction bassIsSeventh(chord) {\n\treturn (\n\t\tbassIsIntervalNote(chord, 'bb7') ||\n\t\tbassIsIntervalNote(chord, 'b7') ||\n\t\tbassIsIntervalNote(chord, '7')\n\t);\n}\n\nfunction bassIsIntervalNote(chord, interval) {\n\tconst intervalNoteIndex = chord.normalized.intervals.indexOf(interval);\n\tif (intervalNoteIndex === -1) return false;\n\n\tconst normalizedBassNote =\n\t\tflatsToSharps[chord.normalized.bassNote] || chord.normalized.bassNote;\n\tconst normalizedIntervalNote =\n\t\tflatsToSharps[chord.normalized.notes[intervalNoteIndex]] ||\n\t\tchord.normalized.notes[intervalNoteIndex];\n\n\treturn normalizedBassNote === normalizedIntervalNote;\n}\n", "import chain from '../../helpers/chain';\n\n/**\n * Prepare whatever string has been identified as a descriptor so it is parsable by the next filter\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function getParsableDescriptor(chord) {\n\tconst allFilters = [\n\t\ttoLowerCaseExceptMajorM,\n\t\tremoveSpaces,\n\t\taddDisambiguators,\n\t\taddMissingVerbs,\n\t];\n\n\tif (chord.input.descriptor) {\n\t\tchord.input.parsableDescriptor = chain(\n\t\t\tallFilters,\n\t\t\tchord.input.descriptor\n\t\t);\n\t}\n\treturn chord;\n}\n\nfunction toLowerCaseExceptMajorM(descriptor) {\n\treturn descriptor\n\t\t.replace(/[A-LN-Za-z]+/g, (match) => match.toLowerCase())\n\t\t.replace('oMit', 'omit')\n\t\t.replace('diM', 'dim')\n\t\t.replace('augMented', 'augmented');\n}\n\nfunction removeSpaces(descriptor) {\n\treturn descriptor.replace(/ /g, '');\n}\n\nfunction addDisambiguators(descriptor) {\n\treturn descriptor\n\t\t.replace(/(7?dim)(alt|add)/g, '$1 $2')\n\t\t.replace(/([m|M])(alt|add)/g, '$1 $2')\n\t\t.replace(/i(no[35])/g, 'i $1')\n\t\t.replace(/([b\u266D#\u266F]9)6/g, '$1 6')\n\t\t.replace(/(9\\/?6)/g, ' $1')\n\t\t.replaceAll('+5', '#5')\n\t\t.replaceAll('-5', 'b5');\n}\n\nfunction addMissingVerbs(descriptor) {\n\tlet allTokensWithVerbs;\n\tlet currentVerb;\n\tlet hasVerb;\n\n\treturn descriptor.replace(/\\((.*?)\\)/g, (match, parenthesis) => {\n\t\tallTokensWithVerbs = [];\n\t\tcurrentVerb = '';\n\n\t\tparenthesis.split(',').forEach((token) => {\n\t\t\thasVerb = true;\n\t\t\tif (token.startsWith('add')) {\n\t\t\t\tcurrentVerb = 'add';\n\t\t\t} else if (token.startsWith('omit')) {\n\t\t\t\tcurrentVerb = 'omit';\n\t\t\t} else if (token.startsWith('no')) {\n\t\t\t\tcurrentVerb = 'no';\n\t\t\t} else {\n\t\t\t\thasVerb = false;\n\t\t\t}\n\t\t\tif (hasVerb) {\n\t\t\t\tallTokensWithVerbs.push(token);\n\t\t\t} else {\n\t\t\t\tallTokensWithVerbs.push(currentVerb + token);\n\t\t\t}\n\t\t});\n\t\treturn ' ' + allTokensWithVerbs.join(' ') + ' ';\n\t});\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\n/**\n * @param {String} symbol\n * @param {Object} parserConfiguration\n * @returns {Chord}\n */\nexport default function initChord(parserConfiguration = {}, symbol) {\n\treturn {\n\t\tinput: {\n\t\t\tsymbol,\n\t\t},\n\t\tnormalized: {},\n\t\tformatted: {},\n\t\tparserConfiguration: _cloneDeep(parserConfiguration),\n\t};\n}\n", "const scaleToAccidental = {\n\tC: 'flat',\n\tD: 'sharp',\n\tE: 'sharp',\n\tF: 'flat',\n\tG: 'sharp',\n\tA: 'sharp',\n\tB: 'sharp',\n\n\tCm: 'flat',\n\tDm: 'flat',\n\tEm: 'sharp',\n\tFm: 'flat',\n\tGm: 'flat',\n\tAm: 'flat',\n\tBm: 'sharp',\n};\n\nfunction getScaleAccidental(scale) {\n\tif (scale.indexOf('#') > -1) {\n\t\treturn 'sharp';\n\t} else if (scale.indexOf('b') > -1) {\n\t\treturn 'flat';\n\t} else return scaleToAccidental[scale];\n}\n\nexport { scaleToAccidental, getScaleAccidental };\n", "import { minorQualities } from '../../dictionaries/qualities';\nimport { notesSharp, notesFlat } from '../../dictionaries/notes';\nimport { getScaleAccidental } from '../../dictionaries/scales';\n\n/**\n * Convert intervals in actual notes.\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function nameIndividualChordNotes(chord) {\n\tconst rootNote = chord.normalized.rootNote;\n\tconst semitones = chord.normalized.semitones;\n\tconst quality = chord.normalized.quality;\n\n\tlet scale = rootNote;\n\tif (minorQualities.includes(quality)) {\n\t\tscale += 'm';\n\t}\n\tconst refNotes =\n\t\tgetScaleAccidental(scale) === 'sharp' ? notesSharp : notesFlat;\n\n\tconst rootNoteIndex = refNotes.indexOf(rootNote);\n\tconst indexedNotes = [\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t\t// repeating...\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t];\n\n\tchord.normalized.notes = semitones.map((i) => indexedNotes[i]);\n\n\treturn chord;\n}\n", "import { allVariantsToNotes } from '../../dictionaries/notes';\n\n/**\n * Convert root/bass notes to English names\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeNotes(chord) {\n\tchord.normalized.rootNote = allVariantsToNotes[chord.input.rootNote];\n\n\tif (chord.input.bassNote) {\n\t\tchord.normalized.bassNote = allVariantsToNotes[chord.input.bassNote];\n\t}\n\n\treturn chord;\n}\n", "import _clone from 'lodash/clone';\nimport _find from 'lodash/find';\nimport _uniq from 'lodash/uniq';\nimport _without from 'lodash/without';\n\nimport chain from '../../helpers/chain';\n\nimport {\n\thasOneOf,\n\thasAll,\n\thasNoneOf,\n\thasExactly,\n} from '../../helpers/hasElement';\n\nimport { qualities } from '../../dictionaries/qualities';\n\n/**\n * Detect chord quality and changes (extensions, alterations, adds and omits)\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeDescriptor(chord) {\n\tlet chordIntervals = _clone(chord.normalized.intervals);\n\n\tlet normalized = {\n\t\tquality: '',\n\t\tisSuspended: false,\n\t\textensions: [],\n\t\talterations: [],\n\t\tadds: [],\n\t\tomits: [],\n\t};\n\n\tif (isPowerChord(chordIntervals)) {\n\t\tnormalized.quality = qualities.power;\n\t} else if (isBass(chordIntervals)) {\n\t\tnormalized.quality = qualities.bass;\n\t} else {\n\t\tconst omits = getOmits(chordIntervals, chord.normalized.intents.major);\n\n\t\tconst isSuspended = getIsSuspended(\n\t\t\tchordIntervals,\n\t\t\tchord.normalized.intents.major\n\t\t);\n\n\t\tconst { qualityIntervals, quality } = getChordQuality(\n\t\t\tchordIntervals,\n\t\t\tchord,\n\t\t\tisSuspended,\n\t\t\tomits\n\t\t);\n\n\t\tconst extensions = getExtensions(chordIntervals, quality);\n\n\t\t// to be able to detect adds and alterations, we build the \"straight\" version of the chord,\n\t\t// ie. the chord as if no alterations/adds/omits where present.\n\t\t// we will compare this to the actual intervals later on\n\t\tconst baseIntervals = ['1', ...qualityIntervals, ...extensions];\n\n\t\tconst { adds, alterations } = getAddsAndAlterations(\n\t\t\tchordIntervals,\n\t\t\tbaseIntervals,\n\t\t\tquality\n\t\t);\n\n\t\tnormalized = {\n\t\t\t...normalized,\n\t\t\tquality,\n\t\t\tisSuspended,\n\t\t\textensions,\n\t\t\talterations,\n\t\t\tadds,\n\t\t\tomits,\n\t\t};\n\t}\n\n\treturn {\n\t\t...chord,\n\t\tnormalized: {\n\t\t\t...chord.normalized,\n\t\t\t...normalized,\n\t\t},\n\t};\n}\n\nfunction isPowerChord(intervals) {\n\treturn hasExactly(intervals, ['1', '5']);\n}\n\nfunction isBass(intervals) {\n\treturn hasExactly(intervals, ['1']);\n}\n\nfunction getIsSuspended(intervals, hasMajorIntent) {\n\treturn (\n\t\tintervals.includes('4') ||\n\t\t(intervals.includes('11') && hasMajorIntent && !intervals.includes('3'))\n\t);\n}\n\nfunction getOmits(intervals, hasMajorIntent) {\n\tconst omits = [];\n\n\tif (\n\t\thasNoneOf(intervals, ['b3', '3', '4', '11']) ||\n\t\t(!hasMajorIntent && hasNoneOf(intervals, ['b3', '4']))\n\t) {\n\t\tomits.push(hasMajorIntent ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5', 'b13'])) {\n\t\tomits.push('5');\n\t}\n\treturn omits;\n}\n\nfunction getChordQuality(allIntervals, chord, isSuspended, omits) {\n\tconst intervalsForQualityDetection = getIntervalsForQualityDetection(\n\t\tallIntervals,\n\t\tchord,\n\t\tisSuspended,\n\t\tomits\n\t);\n\n\tconst intervalsToQualities = [\n\t\t// !!! do not change order without a good reason\n\t\t{ qualityIntervals: ['b3'], quality: qualities.mi },\n\t\t{ qualityIntervals: ['b3', '6'], quality: qualities.mi6 },\n\t\t{ qualityIntervals: ['b3', '7'], quality: qualities.miMa7 },\n\t\t{ qualityIntervals: ['b3', 'b7'], quality: qualities.mi7 },\n\n\t\t{ qualityIntervals: ['3'], quality: qualities.ma },\n\t\t{ qualityIntervals: ['3', '6'], quality: qualities.ma6 },\n\t\t{ qualityIntervals: ['3', '7'], quality: qualities.ma7 },\n\t\t{ qualityIntervals: ['3', 'b7'], quality: qualities.dom7 },\n\n\t\t{ qualityIntervals: ['3', '#5'], quality: qualities.aug },\n\t\t{ qualityIntervals: ['b3', 'b5'], quality: qualities.dim },\n\t\t{ qualityIntervals: ['b3', 'b5', 'bb7'], quality: qualities.dim7 },\n\t].sort((a, b) => b.qualityIntervals.length - a.qualityIntervals.length);\n\n\treturn _find(intervalsToQualities, (o) =>\n\t\thasAll(intervalsForQualityDetection, o.qualityIntervals)\n\t);\n}\n\n// To properly detect the chord quality, we need a \"straight\" version of the chord,\n// meaning with a third interval (= un-suspended, no omit3)\nfunction getIntervalsForQualityDetection(\n\tallIntervals,\n\tchord,\n\tisSuspended,\n\tomits\n) {\n\tconst allFilters = [\n\t\tundoOmit3.bind(null, omits),\n\t\tundoSuspension.bind(null, isSuspended, chord.normalized.intents.major),\n\t\tundoAlt5.bind(null, chord.normalized.intents.alt),\n\t\t_uniq,\n\t];\n\n\treturn chain(allFilters, _clone(allIntervals));\n}\n\nfunction undoOmit3(omits, allIntervals) {\n\tconst with3rd = _clone(allIntervals);\n\n\tif (omits.includes('3')) {\n\t\twith3rd.push('3');\n\t} else if (omits.includes('b3')) {\n\t\twith3rd.push('b3');\n\t}\n\treturn with3rd;\n}\n\nfunction undoSuspension(isSuspended, hasMajorIntent, allIntervals) {\n\tif (isSuspended) {\n\t\tconst unSuspended = _without(allIntervals, '4');\n\t\tunSuspended.push(hasMajorIntent ? '3' : 'b3');\n\t\treturn unSuspended;\n\t}\n\treturn allIntervals;\n}\n\nfunction undoAlt5(isAlt, allIntervals) {\n\tif (isAlt) {\n\t\tconst unaltered = _without(allIntervals, 'b5', '#5');\n\t\tunaltered.push('5');\n\t\treturn unaltered;\n\t}\n\treturn allIntervals;\n}\n\nfunction getExtensions(allIntervals, quality) {\n\tconst extensions = [];\n\n\tif (canBeExtended(quality)) {\n\t\tif (isMinorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '11', '13');\n\t\t} else if (isMajorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '13');\n\t\t} else if (isExtended11th(allIntervals)) {\n\t\t\textensions.push('9', '11');\n\t\t} else if (isExtended9th(allIntervals)) {\n\t\t\textensions.push('9');\n\t\t}\n\t}\n\treturn extensions;\n}\n\nfunction canBeExtended(quality) {\n\treturn [\n\t\tqualities.ma7,\n\t\tqualities.dom7,\n\t\tqualities.mi7,\n\t\tqualities.miMa7,\n\t].includes(quality);\n}\n\nfunction canHave11th(quality) {\n\treturn [qualities.mi7, qualities.miMa7].includes(quality);\n}\n\nfunction isMinorExtended13th(allIntervals, quality) {\n\treturn (\n\t\tcanHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['11', '#11']) &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isMajorExtended13th(allIntervals, quality) {\n\treturn (\n\t\t!canHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended11th(allIntervals) {\n\treturn (\n\t\thasOneOf(allIntervals, '11') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended9th(allIntervals) {\n\treturn allIntervals.includes('9');\n}\n\nfunction getAddsAndAlterations(chordIntervals, baseIntervals, quality) {\n\tconst adds = [];\n\tconst alterations = [];\n\n\tchordIntervals\n\t\t.filter((interval) => interval !== '5' && interval !== '4')\n\t\t.forEach((interval) => {\n\t\t\tif (!baseIntervals.includes(interval)) {\n\t\t\t\tif (isAlteration(quality, interval)) {\n\t\t\t\t\talterations.push(interval);\n\t\t\t\t} else {\n\t\t\t\t\tadds.push(interval);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\tif (hasAdd3(chordIntervals)) {\n\t\tadds.push('3');\n\t}\n\n\treturn {\n\t\tadds: sortIntervals(adds),\n\t\talterations: sortIntervals(alterations),\n\t};\n}\n\nfunction isAlteration(quality, interval) {\n\tconst qualityAlterations = {\n\t\t[qualities.ma]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.dom7]: ['b5', '#5', 'b9', '#9', '#11', 'b13'],\n\n\t\t[qualities.mi]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.miMa7]: ['b5', '#5', '#11', 'b13'],\n\n\t\t[qualities.aug]: [],\n\t\t[qualities.dim]: [],\n\t\t[qualities.dim7]: [],\n\t};\n\n\treturn qualityAlterations[quality].includes(interval);\n}\n\nfunction hasAdd3(allIntervals) {\n\treturn hasAll(allIntervals, ['3', '4']);\n}\n\nfunction sortIntervals(intervals) {\n\treturn intervals.sort((a, b) => {\n\t\tconst sortableA = Number.parseInt(a.replace(/[b#]/, ''));\n\t\tconst sortableB = Number.parseInt(b.replace(/[b#]/, ''));\n\t\treturn sortableA - sortableB;\n\t});\n}\n", "import { NoSymbolFoundError } from '../../helpers/ChordParsingError';\n\n/**\n * Split symbol in root/bass note and descriptor.\n * Returns null if the given string does not seems to be a chord.\n *\n * @param {String[]} noteVariants - all notes within a given notation system (English, Latin, German...)\n * @param {Chord} chord\n * @returns {(Chord|Null)}\n */\nexport default function parseBase(noteVariants, chord) {\n\tconst { symbol } = chord.input;\n\tconst notesRegex = noteVariants.join('|');\n\tconst notesAndDescriptorRegex = new RegExp(\n\t\t'^' +\n\t\t\t'(' +\n\t\t\tnotesRegex +\n\t\t\t')' +\n\t\t\t'(.*?)' +\n\t\t\t'(/(' +\n\t\t\tnotesRegex +\n\t\t\t'))?' +\n\t\t\t'$'\n\t);\n\tconst result = symbol.match(notesAndDescriptorRegex);\n\n\tif (result && result[1]) {\n\t\tchord.input.rootNote = result[1];\n\n\t\tif (result[2]) {\n\t\t\tchord.input.descriptor = result[2];\n\t\t}\n\t\tif (result[4]) {\n\t\t\tchord.input.bassNote = result[4];\n\t\t}\n\t\treturn chord;\n\t} else {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n}\n", "import _uniq from 'lodash/uniq';\nimport {\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n} from '../../helpers/ChordParsingError';\n\nimport m from '../../dictionaries/modifiers';\nimport { allSymbols, allVariants } from '../../dictionaries/modifiers';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\nimport { hasNoneOf, hasOneOf } from '../../helpers/hasElement';\n\n/**\n * Convert the descriptor into a suite of intervals, semitones and intents\n *\n * @param {Array<('b5'|'#5'|'b9'|'#9'|'#11'|'b13')>} altIntervals\n * @param {Chord} chord\n * @returns {(Chord|Null)}\n */\nexport default function parseDescriptor(altIntervals, chord) {\n\tlet allModifiers = [];\n\n\tif (chord.input.parsableDescriptor) {\n\t\tallModifiers = getModifiers(chord);\n\t}\n\n\tchord.input.modifiers = allModifiers;\n\tchord.normalized.intervals = getIntervals(allModifiers, altIntervals);\n\tchord.normalized.semitones = getSemitones(chord.normalized.intervals);\n\tchord.normalized.intents = getIntents(allModifiers);\n\n\treturn chord;\n}\n\nfunction getModifiers(chord) {\n\tconst { parsableDescriptor } = chord.input;\n\tconst modifiers = [];\n\n\tconst descriptorRegex = new RegExp(\n\t\tallVariants.map(escapeRegex).join('|'),\n\t\t'g'\n\t);\n\tconst descriptorMatches = parsableDescriptor.match(descriptorRegex);\n\n\tlet remainingChars = parsableDescriptor;\n\tlet allModifiersId;\n\n\tif (descriptorMatches) {\n\t\tdescriptorMatches.forEach((match) => {\n\t\t\tallModifiersId = allSymbols[match];\n\n\t\t\tif (!Array.isArray(allModifiersId)) {\n\t\t\t\tallModifiersId = [allModifiersId];\n\t\t\t}\n\n\t\t\tallModifiersId.forEach((modifierId) => {\n\t\t\t\tif (modifiers.includes(modifierId)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmodifiers.push(modifierId);\n\n\t\t\t\tremainingChars = remainingChars.replace(match, '');\n\t\t\t});\n\t\t});\n\t}\n\n\tif (modifiers.length === 0) {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n\tif (remainingChars.trim().length > 0) {\n\t\tthrow new InvalidModifierError(chord, remainingChars);\n\t}\n\n\treturn modifiers;\n}\n\nfunction getIntervals(allModifiers, altIntervals) {\n\tif (allModifiers.includes(m.power)) {\n\t\treturn ['1', '5'];\n\t} else if (allModifiers.includes(m.bass)) {\n\t\treturn ['1'];\n\t}\n\n\treturn _uniq([\n\t\t'1',\n\t\t...getThird(allModifiers),\n\t\t...getFourth(allModifiers),\n\t\t...getFifths(allModifiers, altIntervals),\n\t\t...getSixth(allModifiers),\n\t\t...getSevenths(allModifiers),\n\t\t...getNinths(allModifiers, altIntervals),\n\t\t...getElevenths(allModifiers, altIntervals),\n\t\t...getThirteenths(allModifiers, altIntervals),\n\t]).sort((a, b) => intervalsToSemitones[a] - intervalsToSemitones[b]);\n}\n\nfunction getThird(allModifiers) {\n\tconst third = [];\n\tif (allModifiers.includes(m.omit3)) {\n\t\treturn [];\n\t}\n\tif (!hasOneOf(allModifiers, [m.sus, m.sus2])) {\n\t\tif (!hasMajorIntent(allModifiers)) {\n\t\t\tthird.push('b3');\n\t\t} else if (!allModifiers.includes(m.eleventh)) {\n\t\t\tthird.push('3');\n\t\t}\n\t}\n\tif (allModifiers.includes(m.add3)) {\n\t\tthird.push('3');\n\t}\n\treturn third;\n}\n\nfunction getFourth(allModifiers) {\n\tconst fourth = [];\n\tif (hasOneOf(allModifiers, [m.sus, m.add4])) {\n\t\tfourth.push('4');\n\t}\n\treturn fourth;\n}\n\nfunction getFifths(allModifiers, altIntervals) {\n\tconst fifths = [];\n\tif (allModifiers.includes(m.omit5)) {\n\t\treturn [];\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.dim, m.halfDim, m.fifthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b5')\n\t) {\n\t\tfifths.push('b5');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.aug, m.fifthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#5')\n\t) {\n\t\tfifths.push('#5');\n\t}\n\tif (!fifths.length && !allModifiers.includes(m.thirteenthFlat)) {\n\t\tfifths.push('5');\n\t}\n\treturn fifths;\n}\n\nfunction getSixth(allModifiers) {\n\tconst sixth = [];\n\tif (hasOneOf(allModifiers, [m.addb6])) {\n\t\tsixth.push('b6');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t!isExtended(allModifiers) &&\n\t\t!hasOneOf(allModifiers, [m.halfDim])\n\t) {\n\t\tsixth.push('6');\n\t}\n\treturn sixth;\n}\n\nfunction getSevenths(allModifiers) {\n\tconst sevenths = [];\n\tif (hasOneOf(allModifiers, [m.alt])) {\n\t\tsevenths.push('b7');\n\t}\n\tif (hasOneOf(allModifiers, [m.seventh, m.halfDim])) {\n\t\tif (allModifiers.includes(m.dim)) {\n\t\t\tsevenths.push('bb7');\n\t\t} else if (allModifiers.includes(m.halfDim)) {\n\t\t\tsevenths.push('b7');\n\t\t} else {\n\t\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t\t}\n\t} else if (hasOneOf(allModifiers, [m.ninth, m.eleventh, m.thirteenth])) {\n\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t}\n\tif (allModifiers.includes(m.add7)) {\n\t\tsevenths.push('7');\n\t}\n\treturn sevenths;\n}\n\nfunction getMinorOrMajorSeventh(allModifiers) {\n\treturn allModifiers.includes(m.ma) ? '7' : 'b7';\n}\n\nfunction getNinths(allModifiers, altIntervals) {\n\tconst ninth = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add69, m.ninth, m.eleventh, m.thirteenth]) &&\n\t\thasNoneOf(allModifiers, [m.ninthFlat, m.ninthSharp])\n\t) {\n\t\tninth.push('9');\n\t}\n\tif (hasOneOf(allModifiers, [m.sus2, m.add9])) {\n\t\tninth.push('9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b9')\n\t) {\n\t\tninth.push('b9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#9')\n\t) {\n\t\tninth.push('#9');\n\t}\n\treturn ninth;\n}\n\nfunction getElevenths(allModifiers, altIntervals) {\n\tconst elevenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenth]) &&\n\t\t!hasMajorIntent(allModifiers)\n\t) {\n\t\televenths.push('11');\n\t} else if (hasOneOf(allModifiers, [m.eleventh, m.add11])) {\n\t\televenths.push('11');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.eleventhSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#11')\n\t) {\n\t\televenths.push('#11');\n\t}\n\treturn elevenths;\n}\n\nfunction getThirteenths(allModifiers, altIntervals) {\n\tconst thirteenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add13, m.thirteenth]) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\tisExtended(allModifiers)) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\thasOneOf(allModifiers, [m.halfDim]))\n\t) {\n\t\tthirteenths.push('13');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b13')\n\t) {\n\t\tthirteenths.push('b13');\n\t}\n\treturn thirteenths;\n}\n\nfunction shouldAlter(allModifiers, altIntervals, interval) {\n\treturn allModifiers.includes(m.alt) && altIntervals.includes(interval);\n}\n\nfunction hasMajorIntent(allModifiers) {\n\treturn hasNoneOf(allModifiers, [m.mi, m.dim, m.dim7, m.halfDim]);\n}\n\nfunction isExtended(allModifiers) {\n\treturn hasOneOf(allModifiers, [\n\t\tm.seventh,\n\t\tm.ninth,\n\t\tm.eleventh,\n\t\tm.thirteenth,\n\t]);\n}\n\n// Based on https://stackoverflow.com/a/6969486\nfunction escapeRegex(string) {\n\treturn string.replace(/[.\\-*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction getSemitones(allIntervals) {\n\treturn allIntervals\n\t\t.map((interval) => intervalsToSemitones[interval])\n\t\t.sort((a, b) => a - b);\n}\n\n// intents will be used later at formatting for disambiguation of some potentially confusing cases\nfunction getIntents(allModifiers) {\n\treturn {\n\t\tmajor: hasMajorIntent(allModifiers),\n\t\televenth: allModifiers.includes(m.eleventh),\n\t\talt: allModifiers.includes(m.alt),\n\t};\n}\n", "const allModifiers = {\n\t// base\n\tma: 'ma',\n\tmi: 'mi',\n\tdim: 'dim',\n\thalfDim: 'halfDim',\n\taug: 'aug',\n\tseventh: 'seventh',\n\n\t// suspended\n\tsus: 'sus',\n\tsus2: 'sus2',\n\n\t// extensions\n\tninth: 'ninth',\n\televenth: 'eleventh',\n\tthirteenth: 'thirteenth',\n\n\t// alterations\n\tfifthFlat: 'b5',\n\tfifthSharp: '#5',\n\tninthFlat: 'b9',\n\tninthSharp: '#9',\n\televenthSharp: '#11',\n\tthirteenthFlat: 'b13',\n\n\t// added\n\tadd3: 'add3',\n\tadd4: 'add4',\n\taddb6: 'addb6',\n\tadd6: 'add6',\n\tadd69: 'add69',\n\tadd7: 'add7',\n\tadd9: 'add9',\n\tadd11: 'add11',\n\tadd13: 'add13',\n\n\t// special\n\tbass: 'bass',\n\tomit3: 'omit3',\n\tomit5: 'omit5',\n\tpower: 'power',\n\talt: 'alt',\n};\n\n/**\n * WARNING: when adding new modifiers symbols, be careful of possible edge cases that might arise with some combinations.\n * For example, without edge case handling, \"madd9\" would be parsed as \"ma\" instead of \"m\"+\"add9\"\n */\n\nconst major = {\n\t'^': [allModifiers.ma, allModifiers.add7],\n\t\u0394: [allModifiers.ma, allModifiers.add7],\n\tM: allModifiers.ma,\n\tMa: allModifiers.ma,\n\tMaj: allModifiers.ma,\n\tMajor: allModifiers.ma,\n\tma: allModifiers.ma,\n\tmaj: allModifiers.ma,\n\tmajor: allModifiers.ma,\n};\n\nconst major7th = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => symbol + '7'\n);\nconst add7 = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => 'add' + symbol + '7'\n);\n\nconst allSymbols = {\n\t// major\n\t...major,\n\t...major7th,\n\n\t// minor\n\t'-': allModifiers.mi,\n\tm: allModifiers.mi,\n\tMi: allModifiers.mi,\n\tMin: allModifiers.mi,\n\tMinor: allModifiers.mi,\n\tmi: allModifiers.mi,\n\tmin: allModifiers.mi,\n\tminor: allModifiers.mi,\n\n\t// diminished / augmented\n\t'\u00B0': allModifiers.dim,\n\to: allModifiers.dim,\n\t0: allModifiers.dim,\n\tdim: allModifiers.dim,\n\t'dim.': allModifiers.dim,\n\tdiminished: allModifiers.dim,\n\n\t\u00D8: allModifiers.halfDim,\n\t\u00F8: allModifiers.halfDim,\n\th: allModifiers.halfDim,\n\n\t'+': allModifiers.aug,\n\taug: allModifiers.aug,\n\taugmented: allModifiers.aug,\n\n\t// seventh\n\t7: allModifiers.seventh,\n\n\t// suspended\n\t4: allModifiers.sus,\n\tsus: allModifiers.sus,\n\tsus4: allModifiers.sus,\n\tsuspended: allModifiers.sus,\n\tsuspended4: allModifiers.sus,\n\tsus2: allModifiers.sus2,\n\tsuspended2: allModifiers.sus2,\n\n\t// extensions\n\t9: allModifiers.ninth,\n\t11: allModifiers.eleventh,\n\t13: allModifiers.thirteenth,\n\n\t// alterations\n\tb3: allModifiers.mi,\n\tb5: allModifiers.fifthFlat,\n\t'\u266D5': allModifiers.fifthFlat,\n\t'#5': allModifiers.fifthSharp,\n\t'\u266F5': allModifiers.fifthSharp,\n\tb9: allModifiers.ninthFlat,\n\t'\u266D9': allModifiers.ninthFlat,\n\taddb9: allModifiers.ninthFlat,\n\t'add\u266D9': allModifiers.ninthFlat,\n\t'#9': allModifiers.ninthSharp,\n\t'\u266F9': allModifiers.ninthSharp,\n\t'add#9': allModifiers.ninthSharp,\n\t'add\u266F9': allModifiers.ninthSharp,\n\t'#11': allModifiers.eleventhSharp,\n\t'\u266F11': allModifiers.eleventhSharp,\n\t'add#11': allModifiers.eleventhSharp,\n\tb13: allModifiers.thirteenthFlat,\n\t'\u266D13': allModifiers.thirteenthFlat,\n\taddb13: allModifiers.thirteenthFlat,\n\t'add\u266D13': allModifiers.thirteenthFlat,\n\n\t// added\n\t...add7,\n\t2: allModifiers.add9,\n\tadd2: allModifiers.add9,\n\tadd3: allModifiers.add3,\n\tadd4: allModifiers.add4,\n\taddb6: allModifiers.addb6,\n\tb6: allModifiers.addb6,\n\t6: allModifiers.add6,\n\tadd6: allModifiers.add6,\n\t'6/9': allModifiers.add69,\n\t69: allModifiers.add69,\n\t96: allModifiers.add69,\n\t'9/6': allModifiers.add69,\n\tadd9: allModifiers.add9,\n\tadd11: allModifiers.add11,\n\tadd13: allModifiers.add13,\n\n\t// special\n\tbass: allModifiers.bass,\n\tomit3: allModifiers.omit3,\n\tno3: allModifiers.omit3,\n\tomit5: allModifiers.omit5,\n\tno5: allModifiers.omit5,\n\t5: allModifiers.power,\n\talt: allModifiers.alt,\n\t'alt.': allModifiers.alt,\n\taltered: allModifiers.alt,\n};\n\nfunction getDerivedModifiers(source, modifierId, derivedFn) {\n\treturn Object.keys(source)\n\t\t.map(derivedFn)\n\t\t.reduce((acc, curr) => {\n\t\t\tacc[curr] = modifierId;\n\t\t\treturn acc;\n\t\t}, {});\n}\n\nconst allVariants = Object.keys(allSymbols).sort((a, b) => b.length - a.length);\n\nexport { allSymbols, allVariants };\nexport default allModifiers;\n", "export default {\n\t1: 0,\n\t2: 2,\n\tb3: 3,\n\t3: 4,\n\t4: 5,\n\tb5: 6,\n\t5: 7,\n\t'#5': 8,\n\tb6: 8,\n\t6: 9,\n\tbb7: 9,\n\tb7: 10,\n\t7: 11,\n\tb9: 13,\n\t9: 14,\n\t'#9': 15,\n\t11: 17,\n\t'#11': 18,\n\tb13: 20,\n\t13: 21,\n};\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport chain from '../helpers/chain';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport shortenNormalized from './filters/shortenNormalized';\nimport simplifyFilter from './filters/simplify';\nimport transpose from './filters/transpose';\nimport convertNotationSystem from './filters/convertNotationSystem';\nimport formatSymbol from '../parser/filters/formatSymbol';\nimport textPrinter from './printer/text';\nimport rawPrinter from './printer/raw';\n\n/**\n * Create a pre-configured chord rendering function\n * @param {RendererConfiguration} [rendererConfiguration]\n * @returns {function(Chord): String}\n */\nfunction chordRendererFactory({\n\taccidental = 'original',\n\tcustomFilters = [],\n\tnotationSystem = 'english',\n\tprinter = 'text',\n\tsimplify = 'none',\n\ttransposeValue = 0,\n\tuseShortNamings = false,\n} = {}) {\n\tcheckCustomFilters(customFilters);\n\n\tconst allFilters = [];\n\n\tif (['max', 'core'].includes(simplify)) {\n\t\tallFilters.push(simplifyFilter.bind(null, simplify));\n\t}\n\n\tif (accidental !== 'original' || transposeValue !== 0) {\n\t\tallFilters.push(transpose.bind(null, transposeValue, accidental));\n\t}\n\n\tif (useShortNamings) {\n\t\tallFilters.push(shortenNormalized);\n\t}\n\n\tallFilters.push(\n\t\tconvertNotationSystem.bind(null, notationSystem),\n\t\tformatSymbol,\n\t\t...customFilters\n\t);\n\n\treturn renderChord;\n\n\t/**\n\t * Render a chord structure\n\t * @param {Chord} chord - the chord structure to render\n\t * @returns {(String|Chord)} output depends on the selected printer: string for text printer (default), Chord for raw printer\n\t */\n\tfunction renderChord(chord) {\n\t\tif (!isValidChord(chord)) {\n\t\t\treturn null;\n\t\t}\n\t\tconst filteredChord = chain(allFilters, _cloneDeep(chord));\n\n\t\treturn printer === 'raw'\n\t\t\t? rawPrinter(filteredChord)\n\t\t\t: textPrinter(filteredChord);\n\t}\n}\n\nconst isValidChord = (chord) => {\n\treturn chord && typeof chord === 'object' && !chord.error && chord.input;\n};\n\n/**\n * @module chordRendererFactory\n * Expose the chordRendererFactory() function\n **/\nexport default chordRendererFactory;\n", "import { hasExactly } from '../../helpers/hasElement';\n\nconst shortDescriptors = {\n\tsus2: 'sus2',\n\tadd2: '2',\n\tomit: 'no',\n\tma: 'M',\n\tmi: 'm',\n\tdim: '\u00B0',\n\taug7: '7+',\n\televenth: '11',\n};\n\n/**\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function shortenNormalized(chord) {\n\tlet descriptor;\n\tlet chordChanges = chord.formatted.chordChanges;\n\n\tif (isSus2(chord)) {\n\t\tdescriptor = shortDescriptors.sus2;\n\t\tchordChanges = [];\n\t} else if (isAdd2(chord)) {\n\t\tdescriptor = shortDescriptors.add2;\n\t\tchordChanges = [];\n\t} else if (isAug7(chord)) {\n\t\tdescriptor = shortDescriptors.aug7;\n\t\tchordChanges = [];\n\t} else {\n\t\tdescriptor = chord.formatted.descriptor\n\t\t\t.replace('mi', shortDescriptors.mi)\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('dim', shortDescriptors.dim);\n\n\t\tif (isEleventh(chord)) {\n\t\t\tdescriptor = descriptor.replace(\n\t\t\t\t/7sus|9sus/,\n\t\t\t\tshortDescriptors.eleventh\n\t\t\t);\n\t\t}\n\t}\n\n\tchordChanges = chordChanges.map((change) => {\n\t\treturn change\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('omit', shortDescriptors.omit);\n\t});\n\n\treturn {\n\t\t...chord,\n\t\tformatted: {\n\t\t\t...chord.formatted,\n\t\t\tdescriptor,\n\t\t\tchordChanges,\n\t\t},\n\t};\n}\n\nfunction isSus2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '5', '9']);\n}\n\nfunction isAdd2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '5', '9']);\n}\n\nfunction isAug7(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '#5', 'b7']);\n}\n\nfunction isEleventh(chord) {\n\treturn chord.normalized.intents.eleventh;\n}\n", "import _difference from 'lodash/difference';\n\nimport chain from '../../helpers/chain';\n\nimport normalizeDescriptor from '../../parser/filters/normalizeDescriptor';\nimport formatSymbolParts from '../../parser/filters/formatSymbolParts';\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\n\nimport { hasNoneOf } from '../../helpers/hasElement';\n\n/**\n * @param {Chord} chord\n * @param {('none'|'max'|'core')} level\n * @returns {Chord}\n */\nexport default function simplify(level = 'none', chord) {\n\tif (level === 'none') {\n\t\treturn chord;\n\t}\n\n\tconst intervalsToRemove = {\n\t\tmax: [\n\t\t\t'4',\n\t\t\t'b5',\n\t\t\t'#5',\n\t\t\t'6',\n\t\t\t'bb7',\n\t\t\t'b7',\n\t\t\t'7',\n\t\t\t'b9',\n\t\t\t'9',\n\t\t\t'#9',\n\t\t\t'11',\n\t\t\t'#11',\n\t\t\t'b13',\n\t\t\t'13',\n\t\t],\n\t\tcore: ['4', 'b9', '9', '#9', '11', '#11', 'b13', '13'],\n\t};\n\n\tconst intervals = _difference(\n\t\tchord.normalized.intervals,\n\t\tintervalsToRemove[level]\n\t);\n\n\tif (hasNoneOf(intervals, ['b3', '3'])) {\n\t\tintervals.push(chord.normalized.intents.major ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5'])) {\n\t\tintervals.push('5');\n\t}\n\n\tchord.normalized.intervals = intervals;\n\tchord.normalized.semitones = intervals.map(\n\t\t(interval) => intervalsToSemitones[interval]\n\t);\n\tchord.normalized.intents.eleventh = false;\n\tchord.normalized.intents.alt = false;\n\n\tif (level === 'max') {\n\t\tdelete chord.normalized.bassNote;\n\t}\n\n\tconst allFilters = [\n\t\tnormalizeDescriptor,\n\t\tformatSymbolParts,\n\t\tnameIndividualChordNotes,\n\t];\n\n\treturn chain(allFilters, chord);\n}\n", "import {\n\tnotesSharp,\n\tsharpsToFlats,\n\tflatsToSharps,\n} from '../../dictionaries/notes';\n\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\n\nexport default function transpose(transposeValue, accidental, chord) {\n\tconst { rootNote, bassNote } = chord.normalized;\n\n\tconst rootSharp = convertToSharp(rootNote);\n\tchord.normalized.rootNote = transposeNote(\n\t\trootSharp,\n\t\ttransposeValue,\n\t\taccidental\n\t);\n\tchord.formatted.rootNote = chord.normalized.rootNote;\n\n\tif (bassNote) {\n\t\tconst bassSharp = convertToSharp(bassNote);\n\t\tchord.normalized.bassNote = transposeNote(\n\t\t\tbassSharp,\n\t\t\ttransposeValue,\n\t\t\taccidental\n\t\t);\n\t\tchord.formatted.bassNote = chord.normalized.bassNote;\n\t}\n\n\treturn nameIndividualChordNotes(chord);\n}\n\nfunction transposeNote(note, value, accidental) {\n\tconst noteIndex = notesSharp.indexOf(note);\n\tconst transposedIndex = noteIndex + value;\n\n\tconst octaves = Math.floor(transposedIndex / 12);\n\tconst correctedTransposedIndex = transposedIndex - octaves * 12;\n\n\tconst transposed = notesSharp[correctedTransposedIndex];\n\n\treturn accidental === 'flat'\n\t\t? sharpsToFlats[transposed] || transposed\n\t\t: transposed;\n}\n\nfunction convertToSharp(note) {\n\treturn flatsToSharps[note] || note;\n}\n", "const translationTables = {\n\tgerman: {\n\t\tAb: 'As',\n\t\tA: 'A',\n\t\t'A#': 'Ais',\n\t\tBb: 'Hes',\n\t\tB: 'H',\n\t\tC: 'C',\n\t\t'C#': 'Cis',\n\t\tDb: 'Des',\n\t\tD: 'D',\n\t\t'D#': 'Dis',\n\t\tEb: 'Es',\n\t\tE: 'E',\n\t\tF: 'F',\n\t\t'F#': 'Fis',\n\t\tGb: 'Ges',\n\t\tG: 'G',\n\t\t'G#': 'Gis',\n\t},\n\tlatin: {\n\t\tAb: 'Lab',\n\t\tA: 'La',\n\t\t'A#': 'La#',\n\t\tBb: 'Sib',\n\t\tB: 'Si',\n\t\tC: 'Do',\n\t\t'C#': 'Do#',\n\t\tDb: 'Reb',\n\t\tD: 'Re',\n\t\t'D#': 'Re#',\n\t\tEb: 'Mib',\n\t\tE: 'Mi',\n\t\tF: 'Fa',\n\t\t'F#': 'Fa#',\n\t\tGb: 'Solb',\n\t\tG: 'Sol',\n\t\t'G#': 'Sol#',\n\t},\n};\nconst allNotationSystems = Object.keys(translationTables);\n\n/**\n * @param {('auto'|'english'|'german'|'latin')} notationSystem\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function convertNotationSystem(\n\tnotationSystem = 'english',\n\tchord\n) {\n\tconst finalNotationSystem =\n\t\tnotationSystem === 'auto' ? chord.input.notationSystem : notationSystem;\n\n\tif (finalNotationSystem === 'english') return chord;\n\tif (!allNotationSystems.includes(finalNotationSystem)) return null;\n\n\tchord.formatted.rootNote =\n\t\ttranslationTables[finalNotationSystem][chord.formatted.rootNote];\n\n\tif (chord.formatted.bassNote) {\n\t\tchord.formatted.bassNote =\n\t\t\ttranslationTables[finalNotationSystem][chord.formatted.bassNote];\n\t}\n\treturn chord;\n}\n", "/**\n * @param {Chord} chord\n * @returns {String}\n */\nexport default function textPrinter(chord) {\n\treturn chord && chord.formatted && chord.formatted.symbol\n\t\t? chord.formatted.symbol\n\t\t: null;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport textPrinter from './text';\nimport chordParserFactory from '../../parser/chordParserFactory';\n\n/**\n * This printer returns a `chord` object reflecting the applied rendering filters. This object is very close to what would\n * be obtained by re-parsing the rendered chord.\n * It is basically the `chord` object in its current state, with 2 differences:\n * - a re-built `input` property to include all the changes applied during rendering (transposition, simplification, etc.)\n * - a removed `notationSystems` parser configuration since it may not be relevant anymore, especially if the rendering changed the notation system\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function rawPrinter(chord) {\n\t// make sure the chord can be re-parsed, whichever notation system was used for the rendering\n\tdelete chord.parserConfiguration.notationSystems;\n\n\tconst cloned = _cloneDeep(chord);\n\n\t// Re-parse the rendered chord to get the 'input' property right\n\tconst textPrinted = textPrinter(chord);\n\tconst parseChord = chordParserFactory(chord.parserConfiguration);\n\tconst reParsed = parseChord(textPrinted);\n\tcloned.input = reParsed.input;\n\n\treturn cloned;\n}\n", "{\n \"name\": \"ireal-musicxml\",\n \"version\": \"2.0.0\",\n \"description\": \"iReal Pro to MusicXML converter.\",\n \"author\": \"Karim Ratib (https://github.com/infojunkie)\",\n \"license\": \"GPL-3.0-only\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/infojunkie/ireal-musicxml\"\n },\n \"homepage\": \"https://github.com/infojunkie/ireal-musicxml\",\n \"type\": \"module\",\n \"main\": \"build/ireal-musicxml.js\",\n \"types\": \"build/ireal-musicxml.d.ts\",\n \"files\": [\n \"LICENSE.txt\",\n \"build/*\"\n ],\n \"scripts\": {\n \"build\": \"esbuild src/lib/index.js --bundle --minify --sourcemap --outfile=build/ireal-musicxml.js && cp src/types/* build/\",\n \"test\": \"npm run test:lint && npm run test:spec\",\n \"test:spec\": \"node --test\",\n \"test:typescript\": \"npm run build && ts-mocha test/**/*.spec.ts\",\n \"test:lint\": \"eslint src --fix\"\n },\n \"devDependencies\": {\n \"@xmldom/xmldom\": \"^0.8.0\",\n \"esbuild\": \"0.24.0\",\n \"eslint\": \"^9.13.0\",\n \"sanitize-filename\": \"^1.6.3\",\n \"typescript\": \"^4.3.2\",\n \"validate-with-xmllint\": \"^1.2.0\",\n \"xpath.js\": \"^1.1.0\"\n },\n \"dependencies\": {\n \"chord-symbol\": \"^4.0.0\",\n \"fast-diff\": \"^1.2.0\",\n \"jstoxml\": \"^2.0.6\",\n \"promise\": \"^8.1.0\"\n }\n}\n", "import pkg from '../../package.json' with { type: 'json' };\n\nexport class Version {\n static name = pkg.name;\n static version = pkg.version;\n static author = pkg.author;\n static description = pkg.description;\n}"], - "mappings": "8hBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cAYAA,GAAO,QAAUC,GACjB,SAASA,GAAQC,EAAM,CACdC,GAAM,SACPC,GAAa,EACbC,GAAW,IAGfF,GAAMA,GAAM,MAAM,EAAID,CAC1B,CAEA,IAAIC,GAAQ,CAAC,EAGTE,GAAW,GAIXD,GAIAE,GAAQ,EAIRC,GAAW,KAQf,SAASC,IAAQ,CACb,KAAOF,GAAQH,GAAM,QAAQ,CACzB,IAAIM,EAAeH,GAUnB,GAPAA,GAAQA,GAAQ,EAChBH,GAAMM,CAAY,EAAE,KAAK,EAMrBH,GAAQC,GAAU,CAGlB,QAASG,EAAO,EAAGC,EAAYR,GAAM,OAASG,GAAOI,EAAOC,EAAWD,IACnEP,GAAMO,CAAI,EAAIP,GAAMO,EAAOJ,EAAK,EAEpCH,GAAM,QAAUG,GAChBA,GAAQ,CACZ,CACJ,CACAH,GAAM,OAAS,EACfG,GAAQ,EACRD,GAAW,EACf,CAYA,IAAIO,GAAQ,OAAO,OAAW,IAAc,OAAS,KACjDC,GAA0BD,GAAM,kBAAoBA,GAAM,uBAa1D,OAAOC,IAA4B,WACnCT,GAAeU,GAAoCN,EAAK,EA8BxDJ,GAAeW,GAAyBP,EAAK,EAQjDP,GAAQ,aAAeG,GAIvB,SAASU,GAAoCE,EAAU,CACn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AAKkD,CAAO,GAChGE,EAAS,OACb,OAAQH,EAAU,CAChB,KAAKxF,EAAS,MAAO2F,EAAS,QAAS,MACvC,KAAK3F,EAAS,KAAM2F,EAAS,OAAQ,MACrC,KAAK3F,EAAS,KAAM2F,EAAS,OAAQ,MACrC,KAAK3F,EAAS,MAAO2F,EAAS,QAAS,KACzC,CACA,QAAQA,CAAM,EAAED,CAAG,CACrB,CAEA,KAAKE,EAAKC,EAAKC,EAAcL,EAASD,EAAWxF,EAAS,KAAMuC,EAAU,KAAK,QAAS,CACtF,OAAKsD,EACCA,KAAOD,EAMNA,EAAIC,CAAG,GALRJ,GACF,KAAK,KAAKD,EAAUC,EAASlD,CAAO,EAE/BuD,GAAgB,MALRA,CAQnB,CAEA,OAAO,YAAYC,EAAIC,EAAW,EAAG,CACnC,IAAM5B,EAAQ2B,EAAK5F,GAAiBD,GAC9B+F,EAAQ,KAAK,IAAI,GAAID,CAAQ,EACnC,OAAO,KAAK,MAAM5B,EAAQ6B,CAAK,EAAIA,CACrC,CACF,EFvwCO,SAASC,GAAYC,EAAOC,EAAU,CAAC,EAAG,CAC/C,IAAMC,EAAW,IAAIC,GAASH,CAAK,EACnC,OAAAE,EAAS,MAAM,QAAQE,GAAQ,CAC7BA,EAAK,SAAWC,GAAU,QAAQD,EAAMH,CAAO,CACjD,CAAC,EACMC,CACT,CAEA,eAAsBI,GAAQN,EAAOC,EAAU,CAAC,EAAG,CACjD,OAAO,IAAI,GAAAM,QAAQC,GAAWA,EAAQT,GAAYC,EAAOC,CAAO,CAAC,CAAC,CACpE", - "names": ["require_browser_raw", "__commonJSMin", "exports", "module", "rawAsap", "task", "queue", "requestFlush", "flushing", "index", "capacity", "flush", "currentIndex", "scan", "newLength", "scope", "BrowserMutationObserver", "makeRequestCallFromMutationObserver", "makeRequestCallFromTimer", "callback", "toggle", "observer", "node", "timeoutHandle", "handleTimer", "intervalHandle", "require_core", "__commonJSMin", "exports", "module", "asap", "noop", "LAST_ERROR", "IS_ERROR", "getThen", "obj", "ex", "tryCallOne", "fn", "a", "tryCallTwo", "b", "Promise", "doResolve", "onFulfilled", "onRejected", "safeThen", "res", "handle", "Handler", "self", "resolve", "reject", "deferred", "handleResolved", "cb", "ret", "newValue", "then", "finale", "i", "promise", "done", "value", "reason", "require_done", "__commonJSMin", "exports", "module", "Promise", "onFulfilled", "onRejected", "self", "err", "require_finally", "__commonJSMin", "exports", "module", "Promise", "f", "value", "err", "require_es6_extensions", "__commonJSMin", "exports", "module", "Promise", "TRUE", "valuePromise", "FALSE", "NULL", "UNDEFINED", "ZERO", "EMPTYSTRING", "value", "p", "then", "ex", "resolve", "reject", "iterableToArray", "iterable", "x", "arr", "args", "remaining", "res", "i", "val", "onSettledFulfill", "onSettledReject", "reason", "mapAllSettled", "item", "values", "onRejected", "getAggregateError", "errors", "error", "promises", "hasResolved", "rejectionReasons", "resolveOnce", "rejectionCheck", "require_browser_asap", "__commonJSMin", "exports", "module", "rawAsap", "freeTasks", "pendingErrors", "requestErrorThrow", "throwFirstError", "asap", "task", "rawTask", "RawTask", "error", "require_node_extensions", "__commonJSMin", "exports", "module", "Promise", "asap", "fn", "argumentCount", "denodeifyWithCount", "denodeifyWithoutCount", "callbackFn", "args", "i", "body", "fnLength", "_", "index", "callback", "ctx", "ex", "resolve", "reject", "value", "err", "require_synchronous", "__commonJSMin", "exports", "module", "Promise", "require_lib", "__commonJSMin", "exports", "module", "require_promise", "__commonJSMin", "exports", "module", "require_diff", "__commonJSMin", "exports", "module", "DIFF_DELETE", "DIFF_INSERT", "DIFF_EQUAL", "diff_main", "text1", "text2", "cursor_pos", "cleanup", "_fix_unicode", "editdiff", "find_cursor_edit_diff", "commonlength", "diff_commonPrefix", "commonprefix", "diff_commonSuffix", "commonsuffix", "diffs", "diff_compute_", "diff_cleanupMerge", "diff_cleanupSemantic", "longtext", "shorttext", "i", "hm", "diff_halfMatch_", "text1_a", "text1_b", "text2_a", "text2_b", "mid_common", "diffs_a", "diffs_b", "diff_bisect_", "text1_length", "text2_length", "max_d", "v_offset", "v_length", "v1", "v2", "x", "delta", "front", "k1start", "k1end", "k2start", "k2end", "d", "k1", "k1_offset", "x1", "y1", "k2_offset", "x2", "diff_bisectSplit_", "k2", "y2", "y", "text1a", "text2a", "text1b", "text2b", "diffsb", "pointermin", "pointermax", "pointermid", "pointerstart", "is_surrogate_pair_start", "diff_commonOverlap_", "text_length", "best", "length", "pattern", "found", "pointerend", "is_surrogate_pair_end", "diff_halfMatchI_", "seed", "j", "best_common", "best_longtext_a", "best_longtext_b", "best_shorttext_a", "best_shorttext_b", "prefixLength", "suffixLength", "hm1", "hm2", "changes", "equalities", "equalitiesLength", "lastequality", "pointer", "length_insertions1", "length_deletions1", "length_insertions2", "length_deletions2", "diff_cleanupSemanticLossless", "deletion", "insertion", "overlap_length1", "overlap_length2", "nonAlphaNumericRegex_", "whitespaceRegex_", "linebreakRegex_", "blanklineEndRegex_", "blanklineStartRegex_", "diff_cleanupSemanticScore_", "one", "two", "char1", "char2", "nonAlphaNumeric1", "nonAlphaNumeric2", "whitespace1", "whitespace2", "lineBreak1", "lineBreak2", "blankLine1", "blankLine2", "equality1", "edit", "equality2", "commonOffset", "commonString", "bestEquality1", "bestEdit", "bestEquality2", "bestScore", "score", "fix_unicode", "count_delete", "count_insert", "text_delete", "text_insert", "previous_equality", "ends_with_pair_start", "stray", "k", "starts_with_pair_end", "n", "charCode", "str", "remove_empty_tuples", "tuples", "ret", "make_edit_splice", "before", "oldMiddle", "newMiddle", "after", "oldText", "newText", "oldRange", "newRange", "oldLength", "newLength", "oldCursor", "oldBefore", "oldAfter", "maybeNewCursor", "editBefore", "newCursor", "newBefore", "newAfter", "oldPrefix", "newPrefix", "editAfter", "cursor", "oldSuffix", "newSuffix", "replaceRange", "diff", "require_jstoxml", "__commonJSMin", "exports", "global", "factory", "mod", "_exports", "_toConsumableArray", "arr", "_arrayWithoutHoles", "_iterableToArray", "_unsupportedIterableToArray", "_nonIterableSpread", "o", "minLen", "_arrayLikeToArray", "n", "iter", "len", "i", "arr2", "ownKeys", "object", "enumerableOnly", "keys", "symbols", "sym", "_objectSpread", "target", "source", "key", "_defineProperty", "obj", "value", "_typeof", "ARRAY", "BOOLEAN", "DATE", "NULL", "NUMBER", "OBJECT", "SPECIAL_OBJECT", "STRING", "PRIVATE_VARS", "PRIVATE_VARS_REGEXP", "getIndentStr", "indent", "depth", "getType", "val", "filterStr", "inputStr", "filter", "regexp", "str", "entity", "getAttributeKeyVals", "attributes", "keyVals", "attr", "filteredVal", "valStr", "formatAttributes", "keysValsJoined", "objToArray", "PRIMITIVE_TYPES", "isPrimitive", "SIMPLE_TYPES", "isSimpleType", "isSimpleXML", "xmlStr", "DEFAULT_XML_HEADER", "getHeaderString", "_ref", "header", "isOutputStart", "shouldOutputHeader", "shouldUseDefaultHeader", "defaultEntityFilter", "toXML", "config", "_config$depth", "_isFirstItem", "_config$_isOutputStar", "_isOutputStart", "_config$attributesFil", "rawAttributesFilter", "_config$filter", "rawFilter", "shouldTurnOffAttributesFilter", "attributesFilter", "shouldTurnOffFilter", "indentStr", "valType", "headerStr", "outputStr", "_name", "_content", "isArrayOfPrimitives", "primitives", "a", "newVal", "newValType", "isNewValSimple", "preIndentStr", "preTag", "valIsEmpty", "shouldSelfClose", "selfCloseStr", "attributesString", "tag", "preTagCloseStr", "postTag", "outputArr", "index", "newConfig", "outputObj", "privateVar", "hasContent", "newContentObj", "xml", "fnResult", "_outputArr", "singleVal", "_default", "require_listCacheClear", "__commonJSMin", "exports", "module", "listCacheClear", "require_eq", "__commonJSMin", "exports", "module", "eq", "value", "other", "require_assocIndexOf", "__commonJSMin", "exports", "module", "eq", "assocIndexOf", "array", "key", "length", "require_listCacheDelete", "__commonJSMin", "exports", "module", "assocIndexOf", "arrayProto", "splice", "listCacheDelete", "key", "data", "index", "lastIndex", "require_listCacheGet", "__commonJSMin", "exports", "module", "assocIndexOf", "listCacheGet", "key", "data", "index", "require_listCacheHas", "__commonJSMin", "exports", "module", "assocIndexOf", "listCacheHas", "key", "require_listCacheSet", "__commonJSMin", "exports", "module", "assocIndexOf", "listCacheSet", "key", "value", "data", "index", "require_ListCache", "__commonJSMin", "exports", "module", "listCacheClear", "listCacheDelete", "listCacheGet", "listCacheHas", "listCacheSet", "ListCache", "entries", "index", "length", "entry", "require_stackClear", "__commonJSMin", "exports", "module", "ListCache", "stackClear", "require_stackDelete", "__commonJSMin", "exports", "module", "stackDelete", "key", "data", "result", "require_stackGet", "__commonJSMin", "exports", "module", "stackGet", "key", "require_stackHas", "__commonJSMin", "exports", "module", "stackHas", "key", "require_freeGlobal", "__commonJSMin", "exports", "module", "freeGlobal", "require_root", "__commonJSMin", "exports", "module", "freeGlobal", "freeSelf", "root", "require_Symbol", "__commonJSMin", "exports", "module", "root", "Symbol", "require_getRawTag", "__commonJSMin", "exports", "module", "Symbol", "objectProto", "hasOwnProperty", "nativeObjectToString", "symToStringTag", "getRawTag", "value", "isOwn", "tag", "unmasked", "result", "require_objectToString", "__commonJSMin", "exports", "module", "objectProto", "nativeObjectToString", "objectToString", "value", "require_baseGetTag", "__commonJSMin", "exports", "module", "Symbol", "getRawTag", "objectToString", "nullTag", "undefinedTag", "symToStringTag", "baseGetTag", "value", "require_isObject", "__commonJSMin", "exports", "module", "isObject", "value", "type", "require_isFunction", "__commonJSMin", "exports", "module", "baseGetTag", "isObject", "asyncTag", "funcTag", "genTag", "proxyTag", "isFunction", "value", "tag", "require_coreJsData", "__commonJSMin", "exports", "module", "root", "coreJsData", "require_isMasked", "__commonJSMin", "exports", "module", "coreJsData", "maskSrcKey", "uid", "isMasked", "func", "require_toSource", "__commonJSMin", "exports", "module", "funcProto", "funcToString", "toSource", "func", "require_baseIsNative", "__commonJSMin", "exports", "module", "isFunction", "isMasked", "isObject", "toSource", "reRegExpChar", "reIsHostCtor", "funcProto", "objectProto", "funcToString", "hasOwnProperty", "reIsNative", "baseIsNative", "value", "pattern", "require_getValue", "__commonJSMin", "exports", "module", "getValue", "object", "key", "require_getNative", "__commonJSMin", "exports", "module", "baseIsNative", "getValue", "getNative", "object", "key", "value", "require_Map", "__commonJSMin", "exports", "module", "getNative", "root", "Map", "require_nativeCreate", "__commonJSMin", "exports", "module", "getNative", "nativeCreate", "require_hashClear", "__commonJSMin", "exports", "module", "nativeCreate", "hashClear", "require_hashDelete", "__commonJSMin", "exports", "module", "hashDelete", "key", "result", "require_hashGet", "__commonJSMin", "exports", "module", "nativeCreate", "HASH_UNDEFINED", "objectProto", "hasOwnProperty", "hashGet", "key", "data", "result", "require_hashHas", "__commonJSMin", "exports", "module", "nativeCreate", "objectProto", "hasOwnProperty", "hashHas", "key", "data", "require_hashSet", "__commonJSMin", "exports", "module", "nativeCreate", "HASH_UNDEFINED", "hashSet", "key", "value", "data", "require_Hash", "__commonJSMin", "exports", "module", "hashClear", "hashDelete", "hashGet", "hashHas", "hashSet", "Hash", "entries", "index", "length", "entry", "require_mapCacheClear", "__commonJSMin", "exports", "module", "Hash", "ListCache", "Map", "mapCacheClear", "require_isKeyable", "__commonJSMin", "exports", "module", "isKeyable", "value", "type", "require_getMapData", "__commonJSMin", "exports", "module", "isKeyable", "getMapData", "map", "key", "data", "require_mapCacheDelete", "__commonJSMin", "exports", "module", "getMapData", "mapCacheDelete", "key", "result", "require_mapCacheGet", "__commonJSMin", "exports", "module", "getMapData", "mapCacheGet", "key", "require_mapCacheHas", "__commonJSMin", "exports", "module", "getMapData", "mapCacheHas", "key", "require_mapCacheSet", "__commonJSMin", "exports", "module", "getMapData", "mapCacheSet", "key", "value", "data", "size", "require_MapCache", "__commonJSMin", "exports", "module", "mapCacheClear", "mapCacheDelete", "mapCacheGet", "mapCacheHas", "mapCacheSet", "MapCache", "entries", "index", "length", "entry", "require_stackSet", "__commonJSMin", "exports", "module", "ListCache", "Map", "MapCache", "LARGE_ARRAY_SIZE", "stackSet", "key", "value", "data", "pairs", "require_Stack", "__commonJSMin", "exports", "module", "ListCache", "stackClear", "stackDelete", "stackGet", "stackHas", "stackSet", "Stack", "entries", "data", "require_arrayEach", "__commonJSMin", "exports", "module", "arrayEach", "array", "iteratee", "index", "length", "require_defineProperty", "__commonJSMin", "exports", "module", "getNative", "defineProperty", "func", "require_baseAssignValue", "__commonJSMin", "exports", "module", "defineProperty", "baseAssignValue", "object", "key", "value", "require_assignValue", "__commonJSMin", "exports", "module", "baseAssignValue", "eq", "objectProto", "hasOwnProperty", "assignValue", "object", "key", "value", "objValue", "require_copyObject", "__commonJSMin", "exports", "module", "assignValue", "baseAssignValue", "copyObject", "source", "props", "object", "customizer", "isNew", "index", "length", "key", "newValue", "require_baseTimes", "__commonJSMin", "exports", "module", "baseTimes", "n", "iteratee", "index", "result", "require_isObjectLike", "__commonJSMin", "exports", "module", "isObjectLike", "value", "require_baseIsArguments", "__commonJSMin", "exports", "module", "baseGetTag", "isObjectLike", "argsTag", "baseIsArguments", "value", "require_isArguments", "__commonJSMin", "exports", "module", "baseIsArguments", "isObjectLike", "objectProto", "hasOwnProperty", "propertyIsEnumerable", "isArguments", "value", "require_isArray", "__commonJSMin", "exports", "module", "isArray", "require_stubFalse", "__commonJSMin", "exports", "module", "stubFalse", "require_isBuffer", "__commonJSMin", "exports", "module", "root", "stubFalse", "freeExports", "freeModule", "moduleExports", "Buffer", "nativeIsBuffer", "isBuffer", "require_isIndex", "__commonJSMin", "exports", "module", "MAX_SAFE_INTEGER", "reIsUint", "isIndex", "value", "length", "type", "require_isLength", "__commonJSMin", "exports", "module", "MAX_SAFE_INTEGER", "isLength", "value", "require_baseIsTypedArray", "__commonJSMin", "exports", "module", "baseGetTag", "isLength", "isObjectLike", "argsTag", "arrayTag", "boolTag", "dateTag", "errorTag", "funcTag", "mapTag", "numberTag", "objectTag", "regexpTag", "setTag", "stringTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "typedArrayTags", "baseIsTypedArray", "value", "require_baseUnary", "__commonJSMin", "exports", "module", "baseUnary", "func", "value", "require_nodeUtil", "__commonJSMin", "exports", "module", "freeGlobal", "freeExports", "freeModule", "moduleExports", "freeProcess", "nodeUtil", "types", "require_isTypedArray", "__commonJSMin", "exports", "module", "baseIsTypedArray", "baseUnary", "nodeUtil", "nodeIsTypedArray", "isTypedArray", "require_arrayLikeKeys", "__commonJSMin", "exports", "module", "baseTimes", "isArguments", "isArray", "isBuffer", "isIndex", "isTypedArray", "objectProto", "hasOwnProperty", "arrayLikeKeys", "value", "inherited", "isArr", "isArg", "isBuff", "isType", "skipIndexes", "result", "length", "key", "require_isPrototype", "__commonJSMin", "exports", "module", "objectProto", "isPrototype", "value", "Ctor", "proto", "require_overArg", "__commonJSMin", "exports", "module", "overArg", "func", "transform", "arg", "require_nativeKeys", "__commonJSMin", "exports", "module", "overArg", "nativeKeys", "require_baseKeys", "__commonJSMin", "exports", "module", "isPrototype", "nativeKeys", "objectProto", "hasOwnProperty", "baseKeys", "object", "result", "key", "require_isArrayLike", "__commonJSMin", "exports", "module", "isFunction", "isLength", "isArrayLike", "value", "require_keys", "__commonJSMin", "exports", "module", "arrayLikeKeys", "baseKeys", "isArrayLike", "keys", "object", "require_baseAssign", "__commonJSMin", "exports", "module", "copyObject", "keys", "baseAssign", "object", "source", "require_nativeKeysIn", "__commonJSMin", "exports", "module", "nativeKeysIn", "object", "result", "key", "require_baseKeysIn", "__commonJSMin", "exports", "module", "isObject", "isPrototype", "nativeKeysIn", "objectProto", "hasOwnProperty", "baseKeysIn", "object", "isProto", "result", "key", "require_keysIn", "__commonJSMin", "exports", "module", "arrayLikeKeys", "baseKeysIn", "isArrayLike", "keysIn", "object", "require_baseAssignIn", "__commonJSMin", "exports", "module", "copyObject", "keysIn", "baseAssignIn", "object", "source", "require_cloneBuffer", "__commonJSMin", "exports", "module", "root", "freeExports", "freeModule", "moduleExports", "Buffer", "allocUnsafe", "cloneBuffer", "buffer", "isDeep", "length", "result", "require_copyArray", "__commonJSMin", "exports", "module", "copyArray", "source", "array", "index", "length", "require_arrayFilter", "__commonJSMin", "exports", "module", "arrayFilter", "array", "predicate", "index", "length", "resIndex", "result", "value", "require_stubArray", "__commonJSMin", "exports", "module", "stubArray", "require_getSymbols", "__commonJSMin", "exports", "module", "arrayFilter", "stubArray", "objectProto", "propertyIsEnumerable", "nativeGetSymbols", "getSymbols", "object", "symbol", "require_copySymbols", "__commonJSMin", "exports", "module", "copyObject", "getSymbols", "copySymbols", "source", "object", "require_arrayPush", "__commonJSMin", "exports", "module", "arrayPush", "array", "values", "index", "length", "offset", "require_getPrototype", "__commonJSMin", "exports", "module", "overArg", "getPrototype", "require_getSymbolsIn", "__commonJSMin", "exports", "module", "arrayPush", "getPrototype", "getSymbols", "stubArray", "nativeGetSymbols", "getSymbolsIn", "object", "result", "require_copySymbolsIn", "__commonJSMin", "exports", "module", "copyObject", "getSymbolsIn", "copySymbolsIn", "source", "object", "require_baseGetAllKeys", "__commonJSMin", "exports", "module", "arrayPush", "isArray", "baseGetAllKeys", "object", "keysFunc", "symbolsFunc", "result", "require_getAllKeys", "__commonJSMin", "exports", "module", "baseGetAllKeys", "getSymbols", "keys", "getAllKeys", "object", "require_getAllKeysIn", "__commonJSMin", "exports", "module", "baseGetAllKeys", "getSymbolsIn", "keysIn", "getAllKeysIn", "object", "require_DataView", "__commonJSMin", "exports", "module", "getNative", "root", "DataView", "require_Promise", "__commonJSMin", "exports", "module", "getNative", "root", "Promise", "require_Set", "__commonJSMin", "exports", "module", "getNative", "root", "Set", "require_WeakMap", "__commonJSMin", "exports", "module", "getNative", "root", "WeakMap", "require_getTag", "__commonJSMin", "exports", "module", "DataView", "Map", "Promise", "Set", "WeakMap", "baseGetTag", "toSource", "mapTag", "objectTag", "promiseTag", "setTag", "weakMapTag", "dataViewTag", "dataViewCtorString", "mapCtorString", "promiseCtorString", "setCtorString", "weakMapCtorString", "getTag", "value", "result", "Ctor", "ctorString", "require_initCloneArray", "__commonJSMin", "exports", "module", "objectProto", "hasOwnProperty", "initCloneArray", "array", "length", "result", "require_Uint8Array", "__commonJSMin", "exports", "module", "root", "Uint8Array", "require_cloneArrayBuffer", "__commonJSMin", "exports", "module", "Uint8Array", "cloneArrayBuffer", "arrayBuffer", "result", "require_cloneDataView", "__commonJSMin", "exports", "module", "cloneArrayBuffer", "cloneDataView", "dataView", "isDeep", "buffer", "require_cloneRegExp", "__commonJSMin", "exports", "module", "reFlags", "cloneRegExp", "regexp", "result", "require_cloneSymbol", "__commonJSMin", "exports", "module", "Symbol", "symbolProto", "symbolValueOf", "cloneSymbol", "symbol", "require_cloneTypedArray", "__commonJSMin", "exports", "module", "cloneArrayBuffer", "cloneTypedArray", "typedArray", "isDeep", "buffer", "require_initCloneByTag", "__commonJSMin", "exports", "module", "cloneArrayBuffer", "cloneDataView", "cloneRegExp", "cloneSymbol", "cloneTypedArray", "boolTag", "dateTag", "mapTag", "numberTag", "regexpTag", "setTag", "stringTag", "symbolTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "initCloneByTag", "object", "tag", "isDeep", "Ctor", "require_baseCreate", "__commonJSMin", "exports", "module", "isObject", "objectCreate", "baseCreate", "object", "proto", "result", "require_initCloneObject", "__commonJSMin", "exports", "module", "baseCreate", "getPrototype", "isPrototype", "initCloneObject", "object", "require_baseIsMap", "__commonJSMin", "exports", "module", "getTag", "isObjectLike", "mapTag", "baseIsMap", "value", "require_isMap", "__commonJSMin", "exports", "module", "baseIsMap", "baseUnary", "nodeUtil", "nodeIsMap", "isMap", "require_baseIsSet", "__commonJSMin", "exports", "module", "getTag", "isObjectLike", "setTag", "baseIsSet", "value", "require_isSet", "__commonJSMin", "exports", "module", "baseIsSet", "baseUnary", "nodeUtil", "nodeIsSet", "isSet", "require_baseClone", "__commonJSMin", "exports", "module", "Stack", "arrayEach", "assignValue", "baseAssign", "baseAssignIn", "cloneBuffer", "copyArray", "copySymbols", "copySymbolsIn", "getAllKeys", "getAllKeysIn", "getTag", "initCloneArray", "initCloneByTag", "initCloneObject", "isArray", "isBuffer", "isMap", "isObject", "isSet", "keys", "keysIn", "CLONE_DEEP_FLAG", "CLONE_FLAT_FLAG", "CLONE_SYMBOLS_FLAG", "argsTag", "arrayTag", "boolTag", "dateTag", "errorTag", "funcTag", "genTag", "mapTag", "numberTag", "objectTag", "regexpTag", "setTag", "stringTag", "symbolTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "cloneableTags", "baseClone", "value", "bitmask", "customizer", "key", "object", "stack", "result", "isDeep", "isFlat", "isFull", "isArr", "tag", "isFunc", "stacked", "subValue", "keysFunc", "props", "require_cloneDeep", "__commonJSMin", "exports", "module", "baseClone", "CLONE_DEEP_FLAG", "CLONE_SYMBOLS_FLAG", "cloneDeep", "value", "require_isString", "__commonJSMin", "exports", "module", "baseGetTag", "isArray", "isObjectLike", "stringTag", "isString", "value", "require_constant", "__commonJSMin", "exports", "module", "constant", "value", "require_createBaseFor", "__commonJSMin", "exports", "module", "createBaseFor", "fromRight", "object", "iteratee", "keysFunc", "index", "iterable", "props", "length", "key", "require_baseFor", "__commonJSMin", "exports", "module", "createBaseFor", "baseFor", "require_baseForOwn", "__commonJSMin", "exports", "module", "baseFor", "keys", "baseForOwn", "object", "iteratee", "require_baseInverter", "__commonJSMin", "exports", "module", "baseForOwn", "baseInverter", "object", "setter", "iteratee", "accumulator", "value", "key", "require_createInverter", "__commonJSMin", "exports", "module", "baseInverter", "createInverter", "setter", "toIteratee", "object", "iteratee", "require_identity", "__commonJSMin", "exports", "module", "identity", "value", "require_invert", "__commonJSMin", "exports", "module", "constant", "createInverter", "identity", "objectProto", "nativeObjectToString", "invert", "result", "value", "key", "require_arrayMap", "__commonJSMin", "exports", "module", "arrayMap", "array", "iteratee", "index", "length", "result", "require_isSymbol", "__commonJSMin", "exports", "module", "baseGetTag", "isObjectLike", "symbolTag", "isSymbol", "value", "require_isKey", "__commonJSMin", "exports", "module", "isArray", "isSymbol", "reIsDeepProp", "reIsPlainProp", "isKey", "value", "object", "type", "require_memoize", "__commonJSMin", "exports", "module", "MapCache", "FUNC_ERROR_TEXT", "memoize", "func", "resolver", "memoized", "args", "key", "cache", "result", "require_memoizeCapped", "__commonJSMin", "exports", "module", "memoize", "MAX_MEMOIZE_SIZE", "memoizeCapped", "func", "result", "key", "cache", "require_stringToPath", "__commonJSMin", "exports", "module", "memoizeCapped", "rePropName", "reEscapeChar", "stringToPath", "string", "result", "match", "number", "quote", "subString", "require_baseToString", "__commonJSMin", "exports", "module", "Symbol", "arrayMap", "isArray", "isSymbol", "INFINITY", "symbolProto", "symbolToString", "baseToString", "value", "result", "require_toString", "__commonJSMin", "exports", "module", "baseToString", "toString", "value", "require_castPath", "__commonJSMin", "exports", "module", "isArray", "isKey", "stringToPath", "toString", "castPath", "value", "object", "require_last", "__commonJSMin", "exports", "module", "last", "array", "length", "require_toKey", "__commonJSMin", "exports", "module", "isSymbol", "INFINITY", "toKey", "value", "result", "require_baseGet", "__commonJSMin", "exports", "module", "castPath", "toKey", "baseGet", "object", "path", "index", "length", "require_baseSlice", "__commonJSMin", "exports", "module", "baseSlice", "array", "start", "end", "index", "length", "result", "require_parent", "__commonJSMin", "exports", "module", "baseGet", "baseSlice", "parent", "object", "path", "require_baseUnset", "__commonJSMin", "exports", "module", "castPath", "last", "parent", "toKey", "baseUnset", "object", "path", "require_isPlainObject", "__commonJSMin", "exports", "module", "baseGetTag", "getPrototype", "isObjectLike", "objectTag", "funcProto", "objectProto", "funcToString", "hasOwnProperty", "objectCtorString", "isPlainObject", "value", "proto", "Ctor", "require_customOmitClone", "__commonJSMin", "exports", "module", "isPlainObject", "customOmitClone", "value", "require_isFlattenable", "__commonJSMin", "exports", "module", "Symbol", "isArguments", "isArray", "spreadableSymbol", "isFlattenable", "value", "require_baseFlatten", "__commonJSMin", "exports", "module", "arrayPush", "isFlattenable", "baseFlatten", "array", "depth", "predicate", "isStrict", "result", "index", "length", "value", "require_flatten", "__commonJSMin", "exports", "module", "baseFlatten", "flatten", "array", "length", "require_apply", "__commonJSMin", "exports", "module", "apply", "func", "thisArg", "args", "require_overRest", "__commonJSMin", "exports", "module", "apply", "nativeMax", "overRest", "func", "start", "transform", "args", "index", "length", "array", "otherArgs", "require_baseSetToString", "__commonJSMin", "exports", "module", "constant", "defineProperty", "identity", "baseSetToString", "func", "string", "require_shortOut", "__commonJSMin", "exports", "module", "HOT_COUNT", "HOT_SPAN", "nativeNow", "shortOut", "func", "count", "lastCalled", "stamp", "remaining", "require_setToString", "__commonJSMin", "exports", "module", "baseSetToString", "shortOut", "setToString", "require_flatRest", "__commonJSMin", "exports", "module", "flatten", "overRest", "setToString", "flatRest", "func", "require_omit", "__commonJSMin", "exports", "module", "arrayMap", "baseClone", "baseUnset", "castPath", "copyObject", "customOmitClone", "flatRest", "getAllKeysIn", "CLONE_DEEP_FLAG", "CLONE_FLAT_FLAG", "CLONE_SYMBOLS_FLAG", "omit", "object", "paths", "result", "isDeep", "path", "length", "require_setCacheAdd", "__commonJSMin", "exports", "module", "HASH_UNDEFINED", "setCacheAdd", "value", "require_setCacheHas", "__commonJSMin", "exports", "module", "setCacheHas", "value", "require_SetCache", "__commonJSMin", "exports", "module", "MapCache", "setCacheAdd", "setCacheHas", "SetCache", "values", "index", "length", "require_arraySome", "__commonJSMin", "exports", "module", "arraySome", "array", "predicate", "index", "length", "require_cacheHas", "__commonJSMin", "exports", "module", "cacheHas", "cache", "key", "require_equalArrays", "__commonJSMin", "exports", "module", "SetCache", "arraySome", "cacheHas", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "equalArrays", "array", "other", "bitmask", "customizer", "equalFunc", "stack", "isPartial", "arrLength", "othLength", "arrStacked", "othStacked", "index", "result", "seen", "arrValue", "othValue", "compared", "othIndex", "require_mapToArray", "__commonJSMin", "exports", "module", "mapToArray", "map", "index", "result", "value", "key", "require_setToArray", "__commonJSMin", "exports", "module", "setToArray", "set", "index", "result", "value", "require_equalByTag", "__commonJSMin", "exports", "module", "Symbol", "Uint8Array", "eq", "equalArrays", "mapToArray", "setToArray", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "boolTag", "dateTag", "errorTag", "mapTag", "numberTag", "regexpTag", "setTag", "stringTag", "symbolTag", "arrayBufferTag", "dataViewTag", "symbolProto", "symbolValueOf", "equalByTag", "object", "other", "tag", "bitmask", "customizer", "equalFunc", "stack", "convert", "isPartial", "stacked", "result", "require_equalObjects", "__commonJSMin", "exports", "module", "getAllKeys", "COMPARE_PARTIAL_FLAG", "objectProto", "hasOwnProperty", "equalObjects", "object", "other", "bitmask", "customizer", "equalFunc", "stack", "isPartial", "objProps", "objLength", "othProps", "othLength", "index", "key", "objStacked", "othStacked", "result", "skipCtor", "objValue", "othValue", "compared", "objCtor", "othCtor", "require_baseIsEqualDeep", "__commonJSMin", "exports", "module", "Stack", "equalArrays", "equalByTag", "equalObjects", "getTag", "isArray", "isBuffer", "isTypedArray", "COMPARE_PARTIAL_FLAG", "argsTag", "arrayTag", "objectTag", "objectProto", "hasOwnProperty", "baseIsEqualDeep", "object", "other", "bitmask", "customizer", "equalFunc", "stack", "objIsArr", "othIsArr", "objTag", "othTag", "objIsObj", "othIsObj", "isSameTag", "objIsWrapped", "othIsWrapped", "objUnwrapped", "othUnwrapped", "require_baseIsEqual", "__commonJSMin", "exports", "module", "baseIsEqualDeep", "isObjectLike", "baseIsEqual", "value", "other", "bitmask", "customizer", "stack", "require_isEqual", "__commonJSMin", "exports", "module", "baseIsEqual", "isEqual", "value", "other", "require_clone", "__commonJSMin", "exports", "module", "baseClone", "CLONE_SYMBOLS_FLAG", "clone", "value", "require_baseIsMatch", "__commonJSMin", "exports", "module", "Stack", "baseIsEqual", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "baseIsMatch", "object", "source", "matchData", "customizer", "index", "length", "noCustomizer", "data", "key", "objValue", "srcValue", "stack", "result", "require_isStrictComparable", "__commonJSMin", "exports", "module", "isObject", "isStrictComparable", "value", "require_getMatchData", "__commonJSMin", "exports", "module", "isStrictComparable", "keys", "getMatchData", "object", "result", "length", "key", "value", "require_matchesStrictComparable", "__commonJSMin", "exports", "module", "matchesStrictComparable", "key", "srcValue", "object", "require_baseMatches", "__commonJSMin", "exports", "module", "baseIsMatch", "getMatchData", "matchesStrictComparable", "baseMatches", "source", "matchData", "object", "require_get", "__commonJSMin", "exports", "module", "baseGet", "get", "object", "path", "defaultValue", "result", "require_baseHasIn", "__commonJSMin", "exports", "module", "baseHasIn", "object", "key", "require_hasPath", "__commonJSMin", "exports", "module", "castPath", "isArguments", "isArray", "isIndex", "isLength", "toKey", "hasPath", "object", "path", "hasFunc", "index", "length", "result", "key", "require_hasIn", "__commonJSMin", "exports", "module", "baseHasIn", "hasPath", "hasIn", "object", "path", "require_baseMatchesProperty", "__commonJSMin", "exports", "module", "baseIsEqual", "get", "hasIn", "isKey", "isStrictComparable", "matchesStrictComparable", "toKey", "COMPARE_PARTIAL_FLAG", "COMPARE_UNORDERED_FLAG", "baseMatchesProperty", "path", "srcValue", "object", "objValue", "require_baseProperty", "__commonJSMin", "exports", "module", "baseProperty", "key", "object", "require_basePropertyDeep", "__commonJSMin", "exports", "module", "baseGet", "basePropertyDeep", "path", "object", "require_property", "__commonJSMin", "exports", "module", "baseProperty", "basePropertyDeep", "isKey", "toKey", "property", "path", "require_baseIteratee", "__commonJSMin", "exports", "module", "baseMatches", "baseMatchesProperty", "identity", "isArray", "property", "baseIteratee", "value", "require_createFind", "__commonJSMin", "exports", "module", "baseIteratee", "isArrayLike", "keys", "createFind", "findIndexFunc", "collection", "predicate", "fromIndex", "iterable", "iteratee", "key", "index", "require_baseFindIndex", "__commonJSMin", "exports", "module", "baseFindIndex", "array", "predicate", "fromIndex", "fromRight", "length", "index", "require_trimmedEndIndex", "__commonJSMin", "exports", "module", "reWhitespace", "trimmedEndIndex", "string", "index", "require_baseTrim", "__commonJSMin", "exports", "module", "trimmedEndIndex", "reTrimStart", "baseTrim", "string", "require_toNumber", "__commonJSMin", "exports", "module", "baseTrim", "isObject", "isSymbol", "NAN", "reIsBadHex", "reIsBinary", "reIsOctal", "freeParseInt", "toNumber", "value", "other", "isBinary", "require_toFinite", "__commonJSMin", "exports", "module", "toNumber", "INFINITY", "MAX_INTEGER", "toFinite", "value", "sign", "require_toInteger", "__commonJSMin", "exports", "module", "toFinite", "toInteger", "value", "result", "remainder", "require_findIndex", "__commonJSMin", "exports", "module", "baseFindIndex", "baseIteratee", "toInteger", "nativeMax", "findIndex", "array", "predicate", "fromIndex", "length", "index", "require_find", "__commonJSMin", "exports", "module", "createFind", "findIndex", "find", "require_baseIsNaN", "__commonJSMin", "exports", "module", "baseIsNaN", "value", "require_strictIndexOf", "__commonJSMin", "exports", "module", "strictIndexOf", "array", "value", "fromIndex", "index", "length", "require_baseIndexOf", "__commonJSMin", "exports", "module", "baseFindIndex", "baseIsNaN", "strictIndexOf", "baseIndexOf", "array", "value", "fromIndex", "require_arrayIncludes", "__commonJSMin", "exports", "module", "baseIndexOf", "arrayIncludes", "array", "value", "length", "require_arrayIncludesWith", "__commonJSMin", "exports", "module", "arrayIncludesWith", "array", "value", "comparator", "index", "length", "require_noop", "__commonJSMin", "exports", "module", "noop", "require_createSet", "__commonJSMin", "exports", "module", "Set", "noop", "setToArray", "INFINITY", "createSet", "values", "require_baseUniq", "__commonJSMin", "exports", "module", "SetCache", "arrayIncludes", "arrayIncludesWith", "cacheHas", "createSet", "setToArray", "LARGE_ARRAY_SIZE", "baseUniq", "array", "iteratee", "comparator", "index", "includes", "length", "isCommon", "result", "seen", "set", "outer", "value", "computed", "seenIndex", "require_uniq", "__commonJSMin", "exports", "module", "baseUniq", "uniq", "array", "require_baseDifference", "__commonJSMin", "exports", "module", "SetCache", "arrayIncludes", "arrayIncludesWith", "arrayMap", "baseUnary", "cacheHas", "LARGE_ARRAY_SIZE", "baseDifference", "array", "values", "iteratee", "comparator", "index", "includes", "isCommon", "length", "result", "valuesLength", "outer", "value", "computed", "valuesIndex", "require_baseRest", "__commonJSMin", "exports", "module", "identity", "overRest", "setToString", "baseRest", "func", "start", "require_isArrayLikeObject", "__commonJSMin", "exports", "module", "isArrayLike", "isObjectLike", "isArrayLikeObject", "value", "require_without", "__commonJSMin", "exports", "module", "baseDifference", "baseRest", "isArrayLikeObject", "without", "array", "values", "require_difference", "__commonJSMin", "exports", "module", "baseDifference", "baseFlatten", "baseRest", "isArrayLikeObject", "difference", "array", "values", "import_promise", "import_fast_diff", "Playlist", "ireal", "playlistEncoded", "parts", "part", "Song", "error", "title", "song", "songs", "diffs", "diff", "d", "Cell", "Chord", "note", "modifiers", "over", "alternate", "_Song", "oldFormat", "music", "unscramble", "text", "arr", "found", "i", "match", "cells", "obj", "prevobj", "cell", "composer", "chord", "comment", "offset", "s", "r", "p", "obfusc50", "newString", "import_jstoxml", "chain", "allFunctions", "input", "value", "fn", "import_cloneDeep", "import_isString", "checkCustomFilters", "customFilters", "filter", "checkCustomFilters_default", "import_invert", "import_omit", "notes", "english", "latin", "german", "_omit", "getAccidentalsVariation", "source", "variant", "acc", "curr", "englishVariantsToNotes", "latinVariantsToNotes", "germanVariantsToNotes", "allVariantsToNotes", "allVariants", "a", "b", "englishVariants", "latinVariants", "germanVariants", "allVariantsPerGroup", "notesSharp", "notesFlat", "sharpsToFlats", "flatsToSharps", "_invert", "allKeys", "notes", "key", "InvalidInputError", "UnexpectedError", "ChordSymbolError", "message", "chord", "errorName", "NoSymbolFoundError", "InvalidModifierError", "invalidChars", "InvalidIntervalsError", "forbiddenCombo", "import_isArray", "import_isEqual", "hasExactly", "allIntervals", "search", "arraySearch", "_isArray", "_isEqual", "hasOneOf", "has", "hasAll", "hasNoneOf", "require", "interval", "allForbiddenCombos", "checkIntervalsConsistency", "chord", "intervals", "forbiddenCombo", "combo", "hasAll", "InvalidIntervalsError", "formatSymbol", "chord", "rootNote", "bassNote", "descriptor", "chordChanges", "symbol", "qualities", "majorQualities", "minorQualities", "qualityToDescriptor", "qualities", "chord", "getHighestExtension", "chordChangesDescriptors", "formatSymbolParts", "getDescriptor", "getChordChanges", "descriptor", "extensions", "highestExtension", "hasNoneOf", "formattedOmits", "formatOmits", "isAltered", "formattedAdds", "formatAdds", "quality", "adds", "add", "index", "formatted", "omits", "omitted", "u", "semitonesToDegree", "u", "diatonicChords", "borrowedChords", "formatNumeralSymbol", "key", "chord", "degree", "symbol", "type", "keyQuality", "thirdQuality", "minorQualities", "getRomanDegree", "inversion", "getInversion", "descriptor", "qualityToDescriptor", "isDiatonic", "isBorrowed", "keyNote", "interval", "getIntervalBetweenNotes", "romanDegree", "semitonesToDegree", "note1", "note2", "note1Index", "notesSharp", "flatsToSharps", "qualities", "bassIsThird", "isSeventh", "bassIsFifth", "bassIsSeventh", "bassIsIntervalNote", "intervalNoteIndex", "normalizedBassNote", "normalizedIntervalNote", "getParsableDescriptor", "chord", "allFilters", "toLowerCaseExceptMajorM", "removeSpaces", "addDisambiguators", "addMissingVerbs", "chain", "descriptor", "match", "allTokensWithVerbs", "currentVerb", "hasVerb", "parenthesis", "token", "import_cloneDeep", "initChord", "parserConfiguration", "symbol", "_cloneDeep", "scaleToAccidental", "getScaleAccidental", "scale", "nameIndividualChordNotes", "chord", "rootNote", "semitones", "quality", "scale", "minorQualities", "refNotes", "getScaleAccidental", "notesSharp", "notesFlat", "rootNoteIndex", "indexedNotes", "i", "normalizeNotes", "chord", "allVariantsToNotes", "import_clone", "import_find", "import_uniq", "import_without", "normalizeDescriptor", "chord", "chordIntervals", "_clone", "normalized", "isPowerChord", "qualities", "isBass", "omits", "getOmits", "isSuspended", "getIsSuspended", "qualityIntervals", "quality", "getChordQuality", "extensions", "getExtensions", "baseIntervals", "adds", "alterations", "getAddsAndAlterations", "intervals", "hasExactly", "hasMajorIntent", "hasNoneOf", "allIntervals", "intervalsForQualityDetection", "getIntervalsForQualityDetection", "intervalsToQualities", "a", "b", "_find", "o", "hasAll", "allFilters", "undoOmit3", "undoSuspension", "undoAlt5", "_uniq", "chain", "with3rd", "unSuspended", "_without", "isAlt", "unaltered", "canBeExtended", "isMinorExtended13th", "isMajorExtended13th", "isExtended11th", "isExtended9th", "canHave11th", "hasOneOf", "interval", "isAlteration", "hasAdd3", "sortIntervals", "sortableA", "sortableB", "parseBase", "noteVariants", "chord", "symbol", "notesRegex", "notesAndDescriptorRegex", "result", "NoSymbolFoundError", "import_uniq", "allModifiers", "major", "major7th", "getDerivedModifiers", "symbol", "add7", "allSymbols", "source", "modifierId", "derivedFn", "acc", "curr", "allVariants", "a", "b", "modifiers_default", "allModifiers", "intervalsToSemitones_default", "parseDescriptor", "altIntervals", "chord", "allModifiers", "getModifiers", "getIntervals", "getSemitones", "getIntents", "parsableDescriptor", "modifiers", "descriptorRegex", "allVariants", "escapeRegex", "descriptorMatches", "remainingChars", "allModifiersId", "match", "allSymbols", "modifierId", "NoSymbolFoundError", "InvalidModifierError", "modifiers_default", "_uniq", "getThird", "getFourth", "getFifths", "getSixth", "getSevenths", "getNinths", "getElevenths", "getThirteenths", "a", "b", "intervalsToSemitones_default", "third", "hasOneOf", "hasMajorIntent", "fourth", "fifths", "shouldAlter", "sixth", "isExtended", "sevenths", "getMinorOrMajorSeventh", "ninth", "hasNoneOf", "elevenths", "thirteenths", "interval", "string", "allIntervals", "chordParserFactory", "parserConfiguration", "allAltIntervals", "allNotationSystems", "notationSystems", "_cloneDeep", "altIntervals", "customFilters", "key", "checkAltIntervals", "checkNotationSystems", "checkCustomFilters_default", "checkKey", "parseChord", "symbol", "allErrors", "isInputValid", "e", "InvalidInputError", "formatError", "allVariantsPerGroupCopy", "allVariantsPerGroup", "variantsGroup", "chord", "allFilters", "variants", "initChord", "parseBase", "getParsableDescriptor", "parseDescriptor", "checkIntervalsConsistency", "normalizeNotes", "normalizeDescriptor", "formatSymbolParts", "formatSymbol", "nameIndividualChordNotes", "formatNumeralSymbol", "chain", "getUnexpectedError", "checkArray", "arrayName", "arrayToTest", "allowedValues", "allowEmpty", "system", "_isString", "allKeys", "input", "notationSystem", "error", "UnexpectedError", "exceptionError", "chordParserFactory_default", "import_cloneDeep", "shortDescriptors", "shortenNormalized", "chord", "descriptor", "chordChanges", "isSus2", "isAdd2", "isAug7", "isEleventh", "change", "hasExactly", "import_difference", "simplify", "level", "chord", "intervalsToRemove", "intervals", "_difference", "hasNoneOf", "interval", "intervalsToSemitones_default", "chain", "normalizeDescriptor", "formatSymbolParts", "nameIndividualChordNotes", "transpose", "transposeValue", "accidental", "chord", "rootNote", "bassNote", "rootSharp", "convertToSharp", "transposeNote", "bassSharp", "nameIndividualChordNotes", "note", "value", "transposedIndex", "notesSharp", "octaves", "correctedTransposedIndex", "transposed", "sharpsToFlats", "flatsToSharps", "translationTables", "allNotationSystems", "convertNotationSystem", "notationSystem", "chord", "finalNotationSystem", "textPrinter", "chord", "import_cloneDeep", "rawPrinter", "chord", "cloned", "_cloneDeep", "textPrinted", "textPrinter", "reParsed", "chordParserFactory_default", "chordRendererFactory", "accidental", "customFilters", "notationSystem", "printer", "simplify", "transposeValue", "useShortNamings", "checkCustomFilters_default", "allFilters", "transpose", "shortenNormalized", "convertNotationSystem", "formatSymbol", "renderChord", "chord", "isValidChord", "filteredChord", "chain", "_cloneDeep", "rawPrinter", "textPrinter", "chordRendererFactory_default", "package_default", "Version", "package_default", "LogLevel", "MUSICXML_VERSION", "SCALING_MM", "SCALING_TENTHS", "Converter", "_Converter", "song", "options", "realOptions", "chordParserFactory_default", "chordRendererFactory_default", "jstoxml", "Version", "date", "number", "chord", "note", "harmony", "notes", "ireal", "isNewSystem", "cellIndex", "measures", "cell", "target", "m", "annot", "section", "time", "ending", "index", "b", "c", "comment", "repeatFn", "remainingCells", "direction", "d", "s", "measure", "elements", "sequence", "a", "a1", "a2", "k1", "k2", "i1", "i2", "repeats", "type", "bars", "location", "style", "repeat", "bpm", "beats", "beatType", "chordIndex", "duration", "i", "ds", "mapDuration", "fermata", "tie", "altered", "noteType", "notations", "value", "alter", "parsedChord", "rootStep", "rootAlter", "chordText", "mapKind", "chordKind", "extension", "e", "mapExtensionKind", "p", "chordDegrees", "alteration", "degree", "add", "omit", "bass", "mapKeys", "groove", "logLevel", "message", "log", "method", "map", "key", "defaultValue", "mm", "decimals", "power", "convertSync", "ireal", "options", "playlist", "Playlist", "song", "Converter", "convert", "Promise", "resolve"] + "sources": ["../node_modules/asap/browser-raw.js", "../node_modules/promise/lib/core.js", "../node_modules/promise/lib/done.js", "../node_modules/promise/lib/finally.js", "../node_modules/promise/lib/es6-extensions.js", "../node_modules/asap/browser-asap.js", "../node_modules/promise/lib/node-extensions.js", "../node_modules/promise/lib/synchronous.js", "../node_modules/promise/lib/index.js", "../node_modules/promise/index.js", "../node_modules/fast-diff/diff.js", "../node_modules/jstoxml/dist/jstoxml.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/universalModuleDefinition", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_DataView.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Hash.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_ListCache.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Map.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_MapCache.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Promise.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Set.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_SetCache.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Stack.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Symbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_Uint8Array.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_WeakMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_apply.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayEach.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayFilter.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayIncludes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayIncludesWith.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayLikeKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arrayPush.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_arraySome.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_assignValue.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_assocIndexOf.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseAssign.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseAssignIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseAssignValue.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseClone.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseCreate.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseDifference.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseFindIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseFlatten.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseFor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseForOwn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseGetAllKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseGetTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseHasIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIndexOf.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseInverter.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsArguments.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsEqual.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsEqualDeep.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsMatch.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsNaN.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsNative.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIsTypedArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseIteratee.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseKeysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseMatches.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseMatchesProperty.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseProperty.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_basePropertyDeep.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseRest.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseSetToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseTimes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseTrim.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseUnary.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_baseUniq.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_castPath.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneArrayBuffer.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneBuffer.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneDataView.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneRegExp.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneSymbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_cloneTypedArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copyArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copyObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copySymbols.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_copySymbolsIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_coreJsData.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createBaseFor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createFind.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createInverter.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_createSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_defineProperty.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_equalArrays.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_equalByTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_equalObjects.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_freeGlobal.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getAllKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getAllKeysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getMapData.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getMatchData.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getNative.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getPrototype.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getRawTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getSymbols.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getSymbolsIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_getValue.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hasPath.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_hashSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_initCloneArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_initCloneByTag.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_initCloneObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isFlattenable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isKey.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isKeyable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isMasked.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isPrototype.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_isStrictComparable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_listCacheSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapCacheSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_mapToArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_matchesStrictComparable.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_memoizeCapped.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nativeCreate.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nativeKeys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nativeKeysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_nodeUtil.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_objectToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_overArg.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_overRest.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_root.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setCacheAdd.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setCacheHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setToArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_setToString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_shortOut.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackClear.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackDelete.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackGet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackHas.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stackSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_strictIndexOf.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_stringToPath.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_toKey.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_toSource.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/_trimmedEndIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/clone.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/cloneDeep.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/constant.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/difference.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/eq.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/find.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/findIndex.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/get.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/hasIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/identity.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/invert.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArguments.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArrayLike.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isArrayLikeObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isBuffer.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isEqual.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isFunction.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isLength.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isMap.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isObject.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isObjectLike.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isSet.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isSymbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/isTypedArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/keys.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/keysIn.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/memoize.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/noop.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/property.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/stubArray.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/stubFalse.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toFinite.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toInteger.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toNumber.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/toString.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/uniq.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/node_modules/lodash/without.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/bootstrap", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/compat get default export", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/define property getters", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/global", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/hasOwnProperty shorthand", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/make namespace object", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/webpack/runtime/node module decorator", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/chain.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/checkCustomFilters.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/notes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/ChordParsingError.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/helpers/hasElement.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/checkIntervalsConsistency.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/formatSymbol.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/qualities.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/formatSymbolParts.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/getParsableDescriptor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/initChord.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/nameIndividualChordNotes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/normalizeNotes.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/normalizeDescriptor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/parseBase.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/modifiers.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/dictionaries/intervalsToSemitones.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/filters/parseDescriptor.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/parser/chordParserFactory.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/shortenNormalized.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/simplify.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/transpose.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/filters/convertNotationSystem.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/printer/text.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/printer/raw.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/renderer/chordRendererFactory.js", "../node_modules/chord-symbol/lib/webpack:/chord-symbol/src/index.js", "../src/lib/index.js", "../src/lib/parser.js", "../src/lib/converter.js", "../package.json", "../src/lib/version.js"], + "sourcesContent": ["\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js\u2019s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n", "'use strict';\n\nvar asap = require('asap/raw');\n\nfunction noop() {}\n\n// States:\n//\n// 0 - pending\n// 1 - fulfilled with _value\n// 2 - rejected with _value\n// 3 - adopted the state of another promise, _value\n//\n// once the state is no longer pending (0) it is immutable\n\n// All `_` prefixed properties will be reduced to `_{random number}`\n// at build time to obfuscate them and discourage their use.\n// We don't use symbols or Object.defineProperty to fully hide them\n// because the performance isn't good enough.\n\n\n// to avoid using try/catch inside critical functions, we\n// extract them to here.\nvar LAST_ERROR = null;\nvar IS_ERROR = {};\nfunction getThen(obj) {\n try {\n return obj.then;\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nfunction tryCallOne(fn, a) {\n try {\n return fn(a);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\nfunction tryCallTwo(fn, a, b) {\n try {\n fn(a, b);\n } catch (ex) {\n LAST_ERROR = ex;\n return IS_ERROR;\n }\n}\n\nmodule.exports = Promise;\n\nfunction Promise(fn) {\n if (typeof this !== 'object') {\n throw new TypeError('Promises must be constructed via new');\n }\n if (typeof fn !== 'function') {\n throw new TypeError('Promise constructor\\'s argument is not a function');\n }\n this._x = 0;\n this._y = 0;\n this._z = null;\n this._A = null;\n if (fn === noop) return;\n doResolve(fn, this);\n}\nPromise._B = null;\nPromise._C = null;\nPromise._D = noop;\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n if (this.constructor !== Promise) {\n return safeThen(this, onFulfilled, onRejected);\n }\n var res = new Promise(noop);\n handle(this, new Handler(onFulfilled, onRejected, res));\n return res;\n};\n\nfunction safeThen(self, onFulfilled, onRejected) {\n return new self.constructor(function (resolve, reject) {\n var res = new Promise(noop);\n res.then(resolve, reject);\n handle(self, new Handler(onFulfilled, onRejected, res));\n });\n}\nfunction handle(self, deferred) {\n while (self._y === 3) {\n self = self._z;\n }\n if (Promise._B) {\n Promise._B(self);\n }\n if (self._y === 0) {\n if (self._x === 0) {\n self._x = 1;\n self._A = deferred;\n return;\n }\n if (self._x === 1) {\n self._x = 2;\n self._A = [self._A, deferred];\n return;\n }\n self._A.push(deferred);\n return;\n }\n handleResolved(self, deferred);\n}\n\nfunction handleResolved(self, deferred) {\n asap(function() {\n var cb = self._y === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n if (self._y === 1) {\n resolve(deferred.promise, self._z);\n } else {\n reject(deferred.promise, self._z);\n }\n return;\n }\n var ret = tryCallOne(cb, self._z);\n if (ret === IS_ERROR) {\n reject(deferred.promise, LAST_ERROR);\n } else {\n resolve(deferred.promise, ret);\n }\n });\n}\nfunction resolve(self, newValue) {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self) {\n return reject(\n self,\n new TypeError('A promise cannot be resolved with itself.')\n );\n }\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = getThen(newValue);\n if (then === IS_ERROR) {\n return reject(self, LAST_ERROR);\n }\n if (\n then === self.then &&\n newValue instanceof Promise\n ) {\n self._y = 3;\n self._z = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(then.bind(newValue), self);\n return;\n }\n }\n self._y = 1;\n self._z = newValue;\n finale(self);\n}\n\nfunction reject(self, newValue) {\n self._y = 2;\n self._z = newValue;\n if (Promise._C) {\n Promise._C(self, newValue);\n }\n finale(self);\n}\nfunction finale(self) {\n if (self._x === 1) {\n handle(self, self._A);\n self._A = null;\n }\n if (self._x === 2) {\n for (var i = 0; i < self._A.length; i++) {\n handle(self, self._A[i]);\n }\n self._A = null;\n }\n}\n\nfunction Handler(onFulfilled, onRejected, promise){\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, promise) {\n var done = false;\n var res = tryCallTwo(fn, function (value) {\n if (done) return;\n done = true;\n resolve(promise, value);\n }, function (reason) {\n if (done) return;\n done = true;\n reject(promise, reason);\n });\n if (!done && res === IS_ERROR) {\n done = true;\n reject(promise, LAST_ERROR);\n }\n}\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.done = function (onFulfilled, onRejected) {\n var self = arguments.length ? this.then.apply(this, arguments) : this;\n self.then(null, function (err) {\n setTimeout(function () {\n throw err;\n }, 0);\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.prototype.finally = function (f) {\n return this.then(function (value) {\n return Promise.resolve(f()).then(function () {\n return value;\n });\n }, function (err) {\n return Promise.resolve(f()).then(function () {\n throw err;\n });\n });\n};\n", "'use strict';\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._D);\n p._y = 1;\n p._z = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nvar iterableToArray = function (iterable) {\n if (typeof Array.from === 'function') {\n // ES2015+, iterables exist\n iterableToArray = Array.from;\n return Array.from(iterable);\n }\n\n // ES5, only arrays and array-likes exist\n iterableToArray = function (x) { return Array.prototype.slice.call(x); };\n return Array.prototype.slice.call(iterable);\n}\n\nPromise.all = function (arr) {\n var args = iterableToArray(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._y === 3) {\n val = val._z;\n }\n if (val._y === 1) return res(i, val._z);\n if (val._y === 2) reject(val._z);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nfunction onSettledFulfill(value) {\n return { status: 'fulfilled', value: value };\n}\nfunction onSettledReject(reason) {\n return { status: 'rejected', reason: reason };\n}\nfunction mapAllSettled(item) {\n if(item && (typeof item === 'object' || typeof item === 'function')){\n if(item instanceof Promise && item.then === Promise.prototype.then){\n return item.then(onSettledFulfill, onSettledReject);\n }\n var then = item.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(item)).then(onSettledFulfill, onSettledReject)\n }\n }\n\n return onSettledFulfill(item);\n}\nPromise.allSettled = function (iterable) {\n return Promise.all(iterableToArray(iterable).map(mapAllSettled));\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n iterableToArray(values).forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\nfunction getAggregateError(errors){\n if(typeof AggregateError === 'function'){\n return new AggregateError(errors,'All promises were rejected');\n }\n\n var error = new Error('All promises were rejected');\n\n error.name = 'AggregateError';\n error.errors = errors;\n\n return error;\n}\n\nPromise.any = function promiseAny(values) {\n return new Promise(function(resolve, reject) {\n var promises = iterableToArray(values);\n var hasResolved = false;\n var rejectionReasons = [];\n\n function resolveOnce(value) {\n if (!hasResolved) {\n hasResolved = true;\n resolve(value);\n }\n }\n\n function rejectionCheck(reason) {\n rejectionReasons.push(reason);\n\n if (rejectionReasons.length === promises.length) {\n reject(getAggregateError(rejectionReasons));\n }\n }\n\n if(promises.length === 0){\n reject(getAggregateError(rejectionReasons));\n } else {\n promises.forEach(function(value){\n Promise.resolve(value).then(resolveOnce, rejectionCheck);\n });\n }\n });\n};\n", "\"use strict\";\n\n// rawAsap provides everything we need except exception management.\nvar rawAsap = require(\"./raw\");\n// RawTasks are recycled to reduce GC churn.\nvar freeTasks = [];\n// We queue errors to ensure they are thrown in right order (FIFO).\n// Array-as-queue is good enough here, since we are just dealing with exceptions.\nvar pendingErrors = [];\nvar requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError);\n\nfunction throwFirstError() {\n if (pendingErrors.length) {\n throw pendingErrors.shift();\n }\n}\n\n/**\n * Calls a task as soon as possible after returning, in its own event, with priority\n * over other events like animation, reflow, and repaint. An error thrown from an\n * event will not interrupt, nor even substantially slow down the processing of\n * other events, but will be rather postponed to a lower priority event.\n * @param {{call}} task A callable object, typically a function that takes no\n * arguments.\n */\nmodule.exports = asap;\nfunction asap(task) {\n var rawTask;\n if (freeTasks.length) {\n rawTask = freeTasks.pop();\n } else {\n rawTask = new RawTask();\n }\n rawTask.task = task;\n rawAsap(rawTask);\n}\n\n// We wrap tasks with recyclable task objects. A task object implements\n// `call`, just like a function.\nfunction RawTask() {\n this.task = null;\n}\n\n// The sole purpose of wrapping the task is to catch the exception and recycle\n// the task object after its single use.\nRawTask.prototype.call = function () {\n try {\n this.task.call();\n } catch (error) {\n if (asap.onerror) {\n // This hook exists purely for testing purposes.\n // Its name will be periodically randomized to break any code that\n // depends on its existence.\n asap.onerror(error);\n } else {\n // In a web browser, exceptions are not fatal. However, to avoid\n // slowing down the queue of pending tasks, we rethrow the error in a\n // lower priority turn.\n pendingErrors.push(error);\n requestErrorThrow();\n }\n } finally {\n this.task = null;\n freeTasks[freeTasks.length] = this;\n }\n};\n", "'use strict';\n\n// This file contains then/promise specific extensions that are only useful\n// for node.js interop\n\nvar Promise = require('./core.js');\nvar asap = require('asap');\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nPromise.denodeify = function (fn, argumentCount) {\n if (\n typeof argumentCount === 'number' && argumentCount !== Infinity\n ) {\n return denodeifyWithCount(fn, argumentCount);\n } else {\n return denodeifyWithoutCount(fn);\n }\n};\n\nvar callbackFn = (\n 'function (err, res) {' +\n 'if (err) { rj(err); } else { rs(res); }' +\n '}'\n);\nfunction denodeifyWithCount(fn, argumentCount) {\n var args = [];\n for (var i = 0; i < argumentCount; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'return new Promise(function (rs, rj) {',\n 'var res = fn.call(',\n ['self'].concat(args).concat([callbackFn]).join(','),\n ');',\n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n return Function(['Promise', 'fn'], body)(Promise, fn);\n}\nfunction denodeifyWithoutCount(fn) {\n var fnLength = Math.max(fn.length - 1, 3);\n var args = [];\n for (var i = 0; i < fnLength; i++) {\n args.push('a' + i);\n }\n var body = [\n 'return function (' + args.join(',') + ') {',\n 'var self = this;',\n 'var args;',\n 'var argLength = arguments.length;',\n 'if (arguments.length > ' + fnLength + ') {',\n 'args = new Array(arguments.length + 1);',\n 'for (var i = 0; i < arguments.length; i++) {',\n 'args[i] = arguments[i];',\n '}',\n '}',\n 'return new Promise(function (rs, rj) {',\n 'var cb = ' + callbackFn + ';',\n 'var res;',\n 'switch (argLength) {',\n args.concat(['extra']).map(function (_, index) {\n return (\n 'case ' + (index) + ':' +\n 'res = fn.call(' + ['self'].concat(args.slice(0, index)).concat('cb').join(',') + ');' +\n 'break;'\n );\n }).join(''),\n 'default:',\n 'args[argLength] = cb;',\n 'res = fn.apply(self, args);',\n '}',\n \n 'if (res &&',\n '(typeof res === \"object\" || typeof res === \"function\") &&',\n 'typeof res.then === \"function\"',\n ') {rs(res);}',\n '});',\n '};'\n ].join('');\n\n return Function(\n ['Promise', 'fn'],\n body\n )(Promise, fn);\n}\n\nPromise.nodeify = function (fn) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n var callback =\n typeof args[args.length - 1] === 'function' ? args.pop() : null;\n var ctx = this;\n try {\n return fn.apply(this, arguments).nodeify(callback, ctx);\n } catch (ex) {\n if (callback === null || typeof callback == 'undefined') {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n } else {\n asap(function () {\n callback.call(ctx, ex);\n })\n }\n }\n }\n};\n\nPromise.prototype.nodeify = function (callback, ctx) {\n if (typeof callback != 'function') return this;\n\n this.then(function (value) {\n asap(function () {\n callback.call(ctx, null, value);\n });\n }, function (err) {\n asap(function () {\n callback.call(ctx, err);\n });\n });\n};\n", "'use strict';\n\nvar Promise = require('./core.js');\n\nmodule.exports = Promise;\nPromise.enableSynchronous = function () {\n Promise.prototype.isPending = function() {\n return this.getState() == 0;\n };\n\n Promise.prototype.isFulfilled = function() {\n return this.getState() == 1;\n };\n\n Promise.prototype.isRejected = function() {\n return this.getState() == 2;\n };\n\n Promise.prototype.getValue = function () {\n if (this._y === 3) {\n return this._z.getValue();\n }\n\n if (!this.isFulfilled()) {\n throw new Error('Cannot get a value of an unfulfilled promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getReason = function () {\n if (this._y === 3) {\n return this._z.getReason();\n }\n\n if (!this.isRejected()) {\n throw new Error('Cannot get a rejection reason of a non-rejected promise.');\n }\n\n return this._z;\n };\n\n Promise.prototype.getState = function () {\n if (this._y === 3) {\n return this._z.getState();\n }\n if (this._y === -1 || this._y === -2) {\n return 0;\n }\n\n return this._y;\n };\n};\n\nPromise.disableSynchronous = function() {\n Promise.prototype.isPending = undefined;\n Promise.prototype.isFulfilled = undefined;\n Promise.prototype.isRejected = undefined;\n Promise.prototype.getValue = undefined;\n Promise.prototype.getReason = undefined;\n Promise.prototype.getState = undefined;\n};\n", "'use strict';\n\nmodule.exports = require('./core.js');\nrequire('./done.js');\nrequire('./finally.js');\nrequire('./es6-extensions.js');\nrequire('./node-extensions.js');\nrequire('./synchronous.js');\n", "'use strict';\n\nmodule.exports = require('./lib')\n", "/**\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nvar DIFF_DELETE = -1;\nvar DIFF_INSERT = 1;\nvar DIFF_EQUAL = 0;\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @param {boolean} [cleanup] Apply semantic cleanup before returning.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, cleanup, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n var editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n var commonlength = diff_commonPrefix(text1, text2);\n var commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n var commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n var diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n if (cleanup) {\n diff_cleanupSemantic(diffs);\n }\n return diffs;\n}\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n var diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n var i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)],\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n var max_d = Math.ceil((text1_length + text2_length) / 2);\n var v_offset = max_d;\n var v_length = 2 * max_d;\n var v1 = new Array(v_length);\n var v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n var delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n var front = delta % 2 !== 0;\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n var k1start = 0;\n var k1end = 0;\n var k2start = 0;\n var k2end = 0;\n for (var d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (var k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n var k1_offset = v_offset + k1;\n var x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n var y1 = x1 - k1;\n while (\n x1 < text1_length &&\n y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n var k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n var x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (var k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n var k2_offset = v_offset + k2;\n var x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n var y2 = x2 - k2;\n while (\n x2 < text1_length &&\n y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) ===\n text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n var k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n var x1 = v1[k1_offset];\n var y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [\n [DIFF_DELETE, text1],\n [DIFF_INSERT, text2],\n ];\n}\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n var text1a = text1.substring(0, x);\n var text2a = text2.substring(0, y);\n var text1b = text1.substring(x);\n var text2b = text2.substring(y);\n\n // Compute both diffs serially.\n var diffs = diff_main(text1a, text2a);\n var diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Determine if the suffix of one string is the prefix of another.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of the first\n * string and the start of the second string.\n * @private\n */\nfunction diff_commonOverlap_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n var text1_length = text1.length;\n var text2_length = text2.length;\n // Eliminate the null case.\n if (text1_length == 0 || text2_length == 0) {\n return 0;\n }\n // Truncate the longer string.\n if (text1_length > text2_length) {\n text1 = text1.substring(text1_length - text2_length);\n } else if (text1_length < text2_length) {\n text2 = text2.substring(0, text1_length);\n }\n var text_length = Math.min(text1_length, text2_length);\n // Quick check for the worst case.\n if (text1 == text2) {\n return text_length;\n }\n\n // Start by looking for a single character match\n // and increase length until no match is found.\n // Performance analysis: http://neil.fraser.name/news/2010/11/04/\n var best = 0;\n var length = 1;\n while (true) {\n var pattern = text1.substring(text_length - length);\n var found = text2.indexOf(pattern);\n if (found == -1) {\n return best;\n }\n length += found;\n if (\n found == 0 ||\n text1.substring(text_length - length) == text2.substring(0, length)\n ) {\n best = length;\n length++;\n }\n }\n}\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n var pointermin = 0;\n var pointermax = Math.min(text1.length, text2.length);\n var pointermid = pointermax;\n var pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n var longtext = text1.length > text2.length ? text1 : text2;\n var shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n var seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n var j = -1;\n var best_common = \"\";\n var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n var prefixLength = diff_commonPrefix(\n longtext.substring(i),\n shorttext.substring(j)\n );\n var suffixLength = diff_commonSuffix(\n longtext.substring(0, i),\n shorttext.substring(0, j)\n );\n if (best_common.length < suffixLength + prefixLength) {\n best_common =\n shorttext.substring(j - suffixLength, j) +\n shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a,\n best_longtext_b,\n best_shorttext_a,\n best_shorttext_b,\n best_common,\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n var hm1 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 4)\n );\n // Check again based on the third quarter.\n var hm2 = diff_halfMatchI_(\n longtext,\n shorttext,\n Math.ceil(longtext.length / 2)\n );\n var hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n var text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n var mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n/**\n * Reduce the number of edits by eliminating semantically trivial equalities.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemantic(diffs) {\n var changes = false;\n var equalities = []; // Stack of indices where equalities are found.\n var equalitiesLength = 0; // Keeping our own length var is faster in JS.\n /** @type {?string} */\n var lastequality = null;\n // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n var pointer = 0; // Index of current position.\n // Number of characters that changed prior to the equality.\n var length_insertions1 = 0;\n var length_deletions1 = 0;\n // Number of characters that changed after the equality.\n var length_insertions2 = 0;\n var length_deletions2 = 0;\n while (pointer < diffs.length) {\n if (diffs[pointer][0] == DIFF_EQUAL) {\n // Equality found.\n equalities[equalitiesLength++] = pointer;\n length_insertions1 = length_insertions2;\n length_deletions1 = length_deletions2;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = diffs[pointer][1];\n } else {\n // An insertion or deletion.\n if (diffs[pointer][0] == DIFF_INSERT) {\n length_insertions2 += diffs[pointer][1].length;\n } else {\n length_deletions2 += diffs[pointer][1].length;\n }\n // Eliminate an equality that is smaller or equal to the edits on both\n // sides of it.\n if (\n lastequality &&\n lastequality.length <=\n Math.max(length_insertions1, length_deletions1) &&\n lastequality.length <= Math.max(length_insertions2, length_deletions2)\n ) {\n // Duplicate record.\n diffs.splice(equalities[equalitiesLength - 1], 0, [\n DIFF_DELETE,\n lastequality,\n ]);\n // Change second copy to insert.\n diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n // Throw away the equality we just deleted.\n equalitiesLength--;\n // Throw away the previous equality (it needs to be reevaluated).\n equalitiesLength--;\n pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n length_insertions1 = 0; // Reset the counters.\n length_deletions1 = 0;\n length_insertions2 = 0;\n length_deletions2 = 0;\n lastequality = null;\n changes = true;\n }\n }\n pointer++;\n }\n\n // Normalize the diff.\n if (changes) {\n diff_cleanupMerge(diffs);\n }\n diff_cleanupSemanticLossless(diffs);\n\n // Find any overlaps between deletions and insertions.\n // e.g: abcxxxxxxdef\n // -> abcxxxdef\n // e.g: xxxabcdefxxx\n // -> defxxxabc\n // Only extract an overlap if it is as big as the edit ahead or behind it.\n pointer = 1;\n while (pointer < diffs.length) {\n if (\n diffs[pointer - 1][0] == DIFF_DELETE &&\n diffs[pointer][0] == DIFF_INSERT\n ) {\n var deletion = diffs[pointer - 1][1];\n var insertion = diffs[pointer][1];\n var overlap_length1 = diff_commonOverlap_(deletion, insertion);\n var overlap_length2 = diff_commonOverlap_(insertion, deletion);\n if (overlap_length1 >= overlap_length2) {\n if (\n overlap_length1 >= deletion.length / 2 ||\n overlap_length1 >= insertion.length / 2\n ) {\n // Overlap found. Insert an equality and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n insertion.substring(0, overlap_length1),\n ]);\n diffs[pointer - 1][1] = deletion.substring(\n 0,\n deletion.length - overlap_length1\n );\n diffs[pointer + 1][1] = insertion.substring(overlap_length1);\n pointer++;\n }\n } else {\n if (\n overlap_length2 >= deletion.length / 2 ||\n overlap_length2 >= insertion.length / 2\n ) {\n // Reverse overlap found.\n // Insert an equality and swap and trim the surrounding edits.\n diffs.splice(pointer, 0, [\n DIFF_EQUAL,\n deletion.substring(0, overlap_length2),\n ]);\n diffs[pointer - 1][0] = DIFF_INSERT;\n diffs[pointer - 1][1] = insertion.substring(\n 0,\n insertion.length - overlap_length2\n );\n diffs[pointer + 1][0] = DIFF_DELETE;\n diffs[pointer + 1][1] = deletion.substring(overlap_length2);\n pointer++;\n }\n }\n pointer++;\n }\n pointer++;\n }\n}\n\nvar nonAlphaNumericRegex_ = /[^a-zA-Z0-9]/;\nvar whitespaceRegex_ = /\\s/;\nvar linebreakRegex_ = /[\\r\\n]/;\nvar blanklineEndRegex_ = /\\n\\r?\\n$/;\nvar blanklineStartRegex_ = /^\\r?\\n\\r?\\n/;\n\n/**\n * Look for single edits surrounded on both sides by equalities\n * which can be shifted sideways to align the edit to a word boundary.\n * e.g: The cat came. -> The cat came.\n * @param {!Array.} diffs Array of diff tuples.\n */\nfunction diff_cleanupSemanticLossless(diffs) {\n /**\n * Given two strings, compute a score representing whether the internal\n * boundary falls on logical boundaries.\n * Scores range from 6 (best) to 0 (worst).\n * Closure, but does not reference any external variables.\n * @param {string} one First string.\n * @param {string} two Second string.\n * @return {number} The score.\n * @private\n */\n function diff_cleanupSemanticScore_(one, two) {\n if (!one || !two) {\n // Edges are the best.\n return 6;\n }\n\n // Each port of this function behaves slightly differently due to\n // subtle differences in each language's definition of things like\n // 'whitespace'. Since this function's purpose is largely cosmetic,\n // the choice has been made to use each language's native features\n // rather than force total conformity.\n var char1 = one.charAt(one.length - 1);\n var char2 = two.charAt(0);\n var nonAlphaNumeric1 = char1.match(nonAlphaNumericRegex_);\n var nonAlphaNumeric2 = char2.match(nonAlphaNumericRegex_);\n var whitespace1 = nonAlphaNumeric1 && char1.match(whitespaceRegex_);\n var whitespace2 = nonAlphaNumeric2 && char2.match(whitespaceRegex_);\n var lineBreak1 = whitespace1 && char1.match(linebreakRegex_);\n var lineBreak2 = whitespace2 && char2.match(linebreakRegex_);\n var blankLine1 = lineBreak1 && one.match(blanklineEndRegex_);\n var blankLine2 = lineBreak2 && two.match(blanklineStartRegex_);\n\n if (blankLine1 || blankLine2) {\n // Five points for blank lines.\n return 5;\n } else if (lineBreak1 || lineBreak2) {\n // Four points for line breaks.\n return 4;\n } else if (nonAlphaNumeric1 && !whitespace1 && whitespace2) {\n // Three points for end of sentences.\n return 3;\n } else if (whitespace1 || whitespace2) {\n // Two points for whitespace.\n return 2;\n } else if (nonAlphaNumeric1 || nonAlphaNumeric2) {\n // One point for non-alphanumeric.\n return 1;\n }\n return 0;\n }\n\n var pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] == DIFF_EQUAL &&\n diffs[pointer + 1][0] == DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n var equality1 = diffs[pointer - 1][1];\n var edit = diffs[pointer][1];\n var equality2 = diffs[pointer + 1][1];\n\n // First, shift the edit as far left as possible.\n var commonOffset = diff_commonSuffix(equality1, edit);\n if (commonOffset) {\n var commonString = edit.substring(edit.length - commonOffset);\n equality1 = equality1.substring(0, equality1.length - commonOffset);\n edit = commonString + edit.substring(0, edit.length - commonOffset);\n equality2 = commonString + equality2;\n }\n\n // Second, step character by character right, looking for the best fit.\n var bestEquality1 = equality1;\n var bestEdit = edit;\n var bestEquality2 = equality2;\n var bestScore =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n while (edit.charAt(0) === equality2.charAt(0)) {\n equality1 += edit.charAt(0);\n edit = edit.substring(1) + equality2.charAt(0);\n equality2 = equality2.substring(1);\n var score =\n diff_cleanupSemanticScore_(equality1, edit) +\n diff_cleanupSemanticScore_(edit, equality2);\n // The >= encourages trailing rather than leading whitespace on edits.\n if (score >= bestScore) {\n bestScore = score;\n bestEquality1 = equality1;\n bestEdit = edit;\n bestEquality2 = equality2;\n }\n }\n\n if (diffs[pointer - 1][1] != bestEquality1) {\n // We have an improvement, save it back to the diff.\n if (bestEquality1) {\n diffs[pointer - 1][1] = bestEquality1;\n } else {\n diffs.splice(pointer - 1, 1);\n pointer--;\n }\n diffs[pointer][1] = bestEdit;\n if (bestEquality2) {\n diffs[pointer + 1][1] = bestEquality2;\n } else {\n diffs.splice(pointer + 1, 1);\n pointer--;\n }\n }\n }\n pointer++;\n }\n}\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, \"\"]); // Add a dummy entry at the end.\n var pointer = 0;\n var count_delete = 0;\n var count_insert = 0;\n var text_delete = \"\";\n var text_insert = \"\";\n var commonlength;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n var previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (\n previous_equality >= 0 &&\n ends_with_pair_start(diffs[previous_equality][1])\n ) {\n var stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(\n 0,\n -1\n );\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n var stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(\n 0,\n commonlength\n );\n } else {\n diffs.splice(0, 0, [\n DIFF_EQUAL,\n text_insert.substring(0, commonlength),\n ]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) +\n diffs[pointer][1];\n text_insert = text_insert.substring(\n 0,\n text_insert.length - commonlength\n );\n text_delete = text_delete.substring(\n 0,\n text_delete.length - commonlength\n );\n }\n }\n // Delete the offending records and add the merged ones.\n var n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(\n pointer - n,\n n,\n [DIFF_DELETE, text_delete],\n [DIFF_INSERT, text_insert]\n );\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = \"\";\n text_insert = \"\";\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === \"\") {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n var changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (\n diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL\n ) {\n // This is a single edit surrounded by equalities.\n if (\n diffs[pointer][1].substring(\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n ) === diffs[pointer - 1][1]\n ) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] =\n diffs[pointer - 1][1] +\n diffs[pointer][1].substring(\n 0,\n diffs[pointer][1].length - diffs[pointer - 1][1].length\n );\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (\n diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]\n ) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xd800 && charCode <= 0xdbff;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xdc00 && charCode <= 0xdfff;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n var ret = [];\n for (var i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after],\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n var oldRange =\n typeof cursor_pos === \"number\"\n ? { index: cursor_pos, length: 0 }\n : cursor_pos.oldRange;\n var newRange = typeof cursor_pos === \"number\" ? null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n var oldLength = oldText.length;\n var newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n var oldCursor = oldRange.index;\n var oldBefore = oldText.slice(0, oldCursor);\n var oldAfter = oldText.slice(oldCursor);\n var maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n var newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n var newBefore = newText.slice(0, newCursor);\n var newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n var prefixLength = Math.min(oldCursor, newCursor);\n var oldPrefix = oldBefore.slice(0, prefixLength);\n var newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n var oldMiddle = oldBefore.slice(prefixLength);\n var newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n var cursor = oldCursor;\n var newBefore = newText.slice(0, cursor);\n var newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n var suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n var oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n var newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n var oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n var newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n var oldPrefix = oldText.slice(0, oldRange.index);\n var oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n var prefixLength = oldPrefix.length;\n var suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n var newPrefix = newText.slice(0, prefixLength);\n var newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n var oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n var newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos, cleanup) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, cleanup, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nmodule.exports = diff;\n", "(function (global, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([\"exports\"], factory);\n } else if (typeof exports !== \"undefined\") {\n factory(exports);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports);\n global.jstoxml = mod.exports;\n }\n})(typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : this, function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.toXML = _exports.default = void 0;\n\n function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\n function _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\n function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\n function _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\n function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\n function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\n function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n var ARRAY = \"array\";\n var BOOLEAN = \"boolean\";\n var DATE = \"date\";\n var NULL = \"null\";\n var NUMBER = \"number\";\n var OBJECT = \"object\";\n var SPECIAL_OBJECT = \"special-object\";\n var STRING = \"string\";\n var PRIVATE_VARS = [\"_selfCloseTag\", \"_attrs\"];\n var PRIVATE_VARS_REGEXP = new RegExp(PRIVATE_VARS.join(\"|\"), \"g\");\n /**\n * Determines the indent string based on current tree depth.\n */\n\n var getIndentStr = function getIndentStr() {\n var indent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return indent.repeat(depth);\n };\n /**\n * Sugar function supplementing JS's quirky typeof operator, plus some extra help to detect\n * \"special objects\" expected by jstoxml.\n * Example:\n * getType(new Date());\n * -> 'date'\n */\n\n\n var getType = function getType(val) {\n return Array.isArray(val) && ARRAY || _typeof(val) === OBJECT && val !== null && val._name && SPECIAL_OBJECT || val instanceof Date && DATE || val === null && NULL || _typeof(val);\n };\n /**\n * Replaces matching values in a string with a new value.\n * Example:\n * filterStr('foo&bar', { '&': '&' });\n * -> 'foo&bar'\n */\n\n\n var filterStr = function filterStr() {\n var inputStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Passthrough/no-op for nonstrings (e.g. number, boolean).\n if (typeof inputStr !== \"string\") {\n return inputStr;\n }\n\n var regexp = new RegExp(\"(\".concat(Object.keys(filter).join(\"|\"), \")(?!(\\\\w|#)*;)\"), \"g\");\n return String(inputStr).replace(regexp, function (str, entity) {\n return filter[entity] || \"\";\n });\n };\n /**\n * Maps an object or array of arribute keyval pairs to a string.\n * Examples:\n * { foo: 'bar', baz: 'g' } -> 'foo=\"bar\" baz=\"g\"'\n * [ { \u26A1: true }, { foo: 'bar' } ] -> '\u26A1 foo=\"bar\"'\n */\n\n\n var getAttributeKeyVals = function getAttributeKeyVals() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = [];\n\n if (Array.isArray(attributes)) {\n // Array containing complex objects and potentially duplicate attributes.\n keyVals = attributes.map(function (attr) {\n var key = Object.keys(attr)[0];\n var val = attr[key];\n var filteredVal = filter ? filterStr(val, filter) : val;\n var valStr = filteredVal === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n } else {\n var keys = Object.keys(attributes);\n keyVals = keys.map(function (key) {\n // Simple object - keyval pairs.\n // For boolean true, simply output the key.\n var filteredVal = filter ? filterStr(attributes[key], filter) : attributes[key];\n var valStr = attributes[key] === true ? \"\" : \"=\\\"\".concat(filteredVal, \"\\\"\");\n return \"\".concat(key).concat(valStr);\n });\n }\n\n return keyVals;\n };\n /**\n * Converts an attributes object/array to a string of keyval pairs.\n * Example:\n * formatAttributes({ a: 1, b: 2 })\n * -> 'a=\"1\" b=\"2\"'\n */\n\n\n var formatAttributes = function formatAttributes() {\n var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var filter = arguments.length > 1 ? arguments[1] : undefined;\n var keyVals = getAttributeKeyVals(attributes, filter);\n if (keyVals.length === 0) return \"\";\n var keysValsJoined = keyVals.join(\" \");\n return \" \".concat(keysValsJoined);\n };\n /**\n * Converts an object to a jstoxml array.\n * Example:\n * objToArray({ foo: 'bar', baz: 2 });\n * ->\n * [\n * {\n * _name: 'foo',\n * _content: 'bar'\n * },\n * {\n * _name: 'baz',\n * _content: 2\n * }\n * ]\n */\n\n\n var objToArray = function objToArray() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return Object.keys(obj).map(function (key) {\n return {\n _name: key,\n _content: obj[key]\n };\n });\n };\n /**\n * Determines if a value is a primitive JavaScript value (not including Symbol).\n * Example:\n * isPrimitive(4);\n * -> true\n */\n\n\n var PRIMITIVE_TYPES = [STRING, NUMBER, BOOLEAN];\n\n var isPrimitive = function isPrimitive(val) {\n return PRIMITIVE_TYPES.includes(getType(val));\n };\n /**\n * Determines if a value is a simple primitive type that can fit onto one line. Needed for\n * determining any needed indenting and line breaks.\n * Example:\n * isSimpleType(new Date());\n * -> true\n */\n\n\n var SIMPLE_TYPES = [].concat(PRIMITIVE_TYPES, [DATE, SPECIAL_OBJECT]);\n\n var isSimpleType = function isSimpleType(val) {\n return SIMPLE_TYPES.includes(getType(val));\n };\n /**\n * Determines if an XML string is a simple primitive, or contains nested data.\n * Example:\n * isSimpleXML('');\n * -> false\n */\n\n\n var isSimpleXML = function isSimpleXML(xmlStr) {\n return !xmlStr.match(\"<\");\n };\n /**\n * Assembles an XML header as defined by the config.\n */\n\n\n var DEFAULT_XML_HEADER = '';\n\n var getHeaderString = function getHeaderString(_ref) {\n var header = _ref.header,\n indent = _ref.indent,\n isOutputStart = _ref.isOutputStart;\n var shouldOutputHeader = header && isOutputStart;\n if (!shouldOutputHeader) return \"\";\n var shouldUseDefaultHeader = _typeof(header) === BOOLEAN; // return `${shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header}${indent ? \"\\n\" : \"\"\n // }`;\n\n return shouldUseDefaultHeader ? DEFAULT_XML_HEADER : header;\n };\n /**\n * Recursively traverses an object tree and converts the output to an XML string.\n * Example:\n * toXML({ foo: 'bar' });\n * -> bar\n */\n\n\n var defaultEntityFilter = {\n \"<\": \"<\",\n \">\": \">\",\n \"&\": \"&\"\n };\n\n var toXML = function toXML() {\n var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _config$depth = config.depth,\n depth = _config$depth === void 0 ? 0 : _config$depth,\n indent = config.indent,\n _isFirstItem = config._isFirstItem,\n _config$_isOutputStar = config._isOutputStart,\n _isOutputStart = _config$_isOutputStar === void 0 ? true : _config$_isOutputStar,\n header = config.header,\n _config$attributesFil = config.attributesFilter,\n rawAttributesFilter = _config$attributesFil === void 0 ? {} : _config$attributesFil,\n _config$filter = config.filter,\n rawFilter = _config$filter === void 0 ? {} : _config$filter;\n\n var shouldTurnOffAttributesFilter = typeof rawAttributesFilter === 'boolean' && !rawAttributesFilter;\n var attributesFilter = shouldTurnOffAttributesFilter ? {} : _objectSpread(_objectSpread(_objectSpread({}, defaultEntityFilter), {\n '\"': \""\"\n }), rawAttributesFilter);\n var shouldTurnOffFilter = typeof rawFilter === 'boolean' && !rawFilter;\n var filter = shouldTurnOffFilter ? {} : _objectSpread(_objectSpread({}, defaultEntityFilter), rawFilter); // Determine indent string based on depth.\n\n var indentStr = getIndentStr(indent, depth); // For branching based on value type.\n\n var valType = getType(obj);\n var headerStr = getHeaderString({\n header: header,\n indent: indent,\n depth: depth,\n isOutputStart: _isOutputStart\n });\n var isOutputStart = _isOutputStart && !headerStr && _isFirstItem && depth === 0;\n var outputStr = \"\";\n\n switch (valType) {\n case \"special-object\":\n {\n // Processes a specially-formatted object used by jstoxml.\n var _name = obj._name,\n _content = obj._content; // Output text content without a tag wrapper.\n\n if (_content === null) {\n outputStr = _name;\n break;\n } // Handles arrays of primitive values. (#33)\n\n\n var isArrayOfPrimitives = Array.isArray(_content) && _content.every(isPrimitive);\n\n if (isArrayOfPrimitives) {\n var primitives = _content.map(function (a) {\n return toXML({\n _name: _name,\n _content: a\n }, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth,\n _isOutputStart: false\n }));\n });\n\n return primitives.join('');\n } // Don't output private vars (such as _attrs).\n\n\n if (_name.match(PRIVATE_VARS_REGEXP)) break; // Process the nested new value and create new config.\n\n var newVal = toXML(_content, _objectSpread(_objectSpread({}, config), {}, {\n depth: depth + 1,\n _isOutputStart: isOutputStart\n }));\n var newValType = getType(newVal);\n var isNewValSimple = isSimpleXML(newVal); // Pre-tag output (indent and line breaks).\n\n var preIndentStr = indent && !isOutputStart ? \"\\n\" : \"\";\n var preTag = \"\".concat(preIndentStr).concat(indentStr); // Special handling for comments, preserving preceding line breaks/indents.\n\n if (_name === '_comment') {\n outputStr += \"\".concat(preTag, \"\");\n break;\n } // Tag output.\n\n\n var valIsEmpty = newValType === \"undefined\" || newVal === \"\";\n var shouldSelfClose = _typeof(obj._selfCloseTag) === BOOLEAN ? valIsEmpty && obj._selfCloseTag : valIsEmpty;\n var selfCloseStr = shouldSelfClose ? \"/\" : \"\";\n var attributesString = formatAttributes(obj._attrs, attributesFilter);\n var tag = \"<\".concat(_name).concat(attributesString).concat(selfCloseStr, \">\"); // Post-tag output (closing tag, indent, line breaks).\n\n var preTagCloseStr = indent && !isNewValSimple ? \"\\n\".concat(indentStr) : \"\";\n var postTag = !shouldSelfClose ? \"\".concat(newVal).concat(preTagCloseStr, \"\") : \"\";\n outputStr += \"\".concat(preTag).concat(tag).concat(postTag);\n break;\n }\n\n case \"object\":\n {\n // Iterates over keyval pairs in an object, converting each item to a special-object.\n var keys = Object.keys(obj);\n var outputArr = keys.map(function (key, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === keys.length,\n _isOutputStart: isOutputStart\n });\n\n var outputObj = {\n _name: key\n };\n\n if (getType(obj[key]) === \"object\") {\n // Sub-object contains an object.\n // Move private vars up as needed. Needed to support certain types of objects\n // E.g. { foo: { _attrs: { a: 1 } } } -> \n PRIVATE_VARS.forEach(function (privateVar) {\n var val = obj[key][privateVar];\n\n if (typeof val !== \"undefined\") {\n outputObj[privateVar] = val;\n delete obj[key][privateVar];\n }\n });\n var hasContent = typeof obj[key]._content !== \"undefined\";\n\n if (hasContent) {\n // _content has sibling keys, so pass as an array (edge case).\n // E.g. { foo: 'bar', _content: { baz: 2 } } -> bar2\n if (Object.keys(obj[key]).length > 1) {\n var newContentObj = Object.assign({}, obj[key]);\n delete newContentObj._content;\n outputObj._content = [].concat(_toConsumableArray(objToArray(newContentObj)), [obj[key]._content]);\n }\n }\n } // Fallthrough: just pass the key as the content for the new special-object.\n\n\n if (typeof outputObj._content === \"undefined\") outputObj._content = obj[key];\n var xml = toXML(outputObj, newConfig, key);\n return xml;\n }, config);\n outputStr = outputArr.join('');\n break;\n }\n\n case \"function\":\n {\n // Executes a user-defined function and returns output.\n var fnResult = obj(config);\n outputStr = toXML(fnResult, config);\n break;\n }\n\n case \"array\":\n {\n // Iterates and converts each value in an array.\n var _outputArr = obj.map(function (singleVal, index) {\n var newConfig = _objectSpread(_objectSpread({}, config), {}, {\n _isFirstItem: index === 0,\n _isLastItem: index + 1 === obj.length,\n _isOutputStart: isOutputStart\n });\n\n return toXML(singleVal, newConfig);\n });\n\n outputStr = _outputArr.join('');\n break;\n }\n // number, string, boolean, date, null, etc\n\n default:\n {\n outputStr = filterStr(obj, filter);\n break;\n }\n }\n\n return \"\".concat(headerStr).concat(outputStr);\n };\n\n _exports.toXML = toXML;\n var _default = {\n toXML: toXML\n };\n _exports.default = _default;\n});\n", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"chord-symbol\"] = factory();\n\telse\n\t\troot[\"chord-symbol\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn ", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n", "var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n", "var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n", "var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n", "var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n", "var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n", "var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n", "/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n", "/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n", "/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n", "var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n", "var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n", "/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n", "/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n", "var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n", "var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n", "var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n", "var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n", "var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n", "var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n", "var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n", "var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n", "var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n", "var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n", "var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n", "var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n", "var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n", "/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n", "var baseForOwn = require('./_baseForOwn');\n\n/**\n * The base implementation of `_.invert` and `_.invertBy` which inverts\n * `object` with values transformed by `iteratee` and set by `setter`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform values.\n * @param {Object} accumulator The initial inverted object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseInverter(object, setter, iteratee, accumulator) {\n baseForOwn(object, function(value, key, object) {\n setter(accumulator, iteratee(value), key, object);\n });\n return accumulator;\n}\n\nmodule.exports = baseInverter;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n", "var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n", "var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n", "var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n", "var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n", "var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n", "var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n", "var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n", "var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n", "var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n", "var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n", "/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n", "var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n", "var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n", "var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n", "/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n", "var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n", "var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n", "/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n", "var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n", "var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n", "var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n", "/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n", "var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n", "/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n", "var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n", "var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n", "var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n", "var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n", "/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n", "var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n", "var baseInverter = require('./_baseInverter');\n\n/**\n * Creates a function like `_.invertBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} toIteratee The function to resolve iteratees.\n * @returns {Function} Returns the new inverter function.\n */\nfunction createInverter(setter, toIteratee) {\n return function(object, iteratee) {\n return baseInverter(object, setter, toIteratee(iteratee), {});\n };\n}\n\nmodule.exports = createInverter;\n", "var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n", "var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n", "var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n", "var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n", "var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n", "/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n", "var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n", "var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n", "var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n", "var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", "var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n", "var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n", "var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n", "var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n", "var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n", "var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n", "var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n", "var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n", "var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n", "var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n", "var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n", "var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n", "var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n", "var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n", "/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n", "/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n", "var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n", "var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n", "var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n", "/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n", "/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n", "/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n", "var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n", "var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n", "var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n", "/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n", "var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n", "/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n", "/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n", "/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n", "var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n", "var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n", "var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n", "/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = clone;\n", "var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n", "/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n", "var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n", "var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n", "var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n", "var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n", "/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n", "var constant = require('./constant'),\n createInverter = require('./_createInverter'),\n identity = require('./identity');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Creates an object composed of the inverted keys and values of `object`.\n * If `object` contains duplicate values, subsequent values overwrite\n * property assignments of previous values.\n *\n * @static\n * @memberOf _\n * @since 0.7.0\n * @category Object\n * @param {Object} object The object to invert.\n * @returns {Object} Returns the new inverted object.\n * @example\n *\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\n *\n * _.invert(object);\n * // => { '1': 'c', '2': 'b' }\n */\nvar invert = createInverter(function(result, value, key) {\n if (value != null &&\n typeof value.toString != 'function') {\n value = nativeObjectToString.call(value);\n }\n\n result[value] = key;\n}, constant(identity));\n\nmodule.exports = invert;\n", "var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n", "var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n", "var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n", "var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n", "var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n", "var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n", "/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n", "var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n", "/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n", "/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n", "var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n", "var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n", "var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n", "var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n", "var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n", "var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n", "/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n", "/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n", "var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n", "var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n", "var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n", "var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n", "var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n", "var baseDifference = require('./_baseDifference'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\nvar without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n});\n\nmodule.exports = without;\n", "// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n", "// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};", "// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};", "__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();", "__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))", "// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};", "__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};", "/**\n * Execute given functions in sequence, feeding the result of one as an input to the next.\n *\n * @param {Function[]} allFunctions\n * @param {*} input - parameter given to the first function\n * @returns {*} return value of the last function\n */\nexport default function chain(allFunctions, input) {\n\treturn allFunctions.reduce((value, fn) => {\n\t\treturn value ? fn(value) : null;\n\t}, input);\n}\n", "const checkCustomFilters = (customFilters) => {\n\tif (!Array.isArray(customFilters)) {\n\t\tthrow new TypeError('customFilters should be given as an array');\n\t}\n\tif (customFilters.some((filter) => typeof filter !== 'function')) {\n\t\tthrow new TypeError(`The given filter is not a function`);\n\t}\n\treturn true;\n};\n\nexport default checkCustomFilters;\n", "const notes = {\n\tAFlat: 'Ab',\n\tA: 'A',\n\tASharp: 'A#',\n\tBFlat: 'Bb',\n\tB: 'B',\n\tC: 'C',\n\tCSharp: 'C#',\n\tDFlat: 'Db',\n\tD: 'D',\n\tDSharp: 'D#',\n\tEFlat: 'Eb',\n\tE: 'E',\n\tF: 'F',\n\tFSharp: 'F#',\n\tGFlat: 'Gb',\n\tG: 'G',\n\tGSharp: 'G#',\n};\n\nconst english = {\n\tAb: notes.AFlat,\n\tA: notes.A,\n\t'A#': notes.ASharp,\n\tBb: notes.BFlat,\n\tB: notes.B,\n\t'B#': notes.C,\n\tCb: notes.B,\n\tC: notes.C,\n\t'C#': notes.CSharp,\n\tDb: notes.DFlat,\n\tD: notes.D,\n\t'D#': notes.DSharp,\n\tEb: notes.EFlat,\n\tE: notes.E,\n\t'E#': notes.F,\n\tFb: notes.E,\n\tF: notes.F,\n\t'F#': notes.FSharp,\n\tGb: notes.GFlat,\n\tG: notes.G,\n\t'G#': notes.GSharp,\n};\n\nconst latin = {\n\tLab: notes.AFlat,\n\tLa: notes.A,\n\t'La#': notes.ASharp,\n\tSib: notes.BFlat,\n\tSi: notes.B,\n\t'Si#': notes.C,\n\tDob: notes.B,\n\tDo: notes.C,\n\t'Do#': notes.CSharp,\n\tReb: notes.DFlat,\n\tRéb: notes.DFlat,\n\tRe: notes.D,\n\tRé: notes.D,\n\t'Re#': notes.DSharp,\n\t'Ré#': notes.DSharp,\n\tMib: notes.EFlat,\n\tMi: notes.E,\n\t'Mi#': notes.F,\n\tFab: notes.E,\n\tFa: notes.F,\n\t'Fa#': notes.FSharp,\n\tSolb: notes.GFlat,\n\tSol: notes.G,\n\t'Sol#': notes.GSharp,\n};\n\nconst german = {\n\tAs: notes.AFlat,\n\tA: notes.A,\n\tAis: notes.ASharp,\n\tHes: notes.BFlat,\n\tH: notes.B,\n\tHis: notes.C,\n\tCes: notes.B,\n\tC: notes.C,\n\tCis: notes.CSharp,\n\tDes: notes.DFlat,\n\tD: notes.D,\n\tDis: notes.DSharp,\n\tEs: notes.EFlat,\n\tE: notes.E,\n\tEis: notes.F,\n\tFes: notes.E,\n\tF: notes.F,\n\tFis: notes.FSharp,\n\tGes: notes.GFlat,\n\tG: notes.G,\n\tGis: notes.GSharp,\n};\n\nfunction getAccidentalsVariation(source) {\n\tlet variant;\n\treturn Object.keys(source).reduce((acc, curr) => {\n\t\tif (curr.match(/.[b|#]$/)) {\n\t\t\tvariant = curr.replace('#', '♯').replace('b', '♭');\n\t\t\tacc[variant] = source[curr];\n\t\t}\n\t\treturn acc;\n\t}, {});\n}\n\nconst englishVariantsToNotes = {\n\t...english,\n\t...getAccidentalsVariation(english),\n};\n\nconst latinVariantsToNotes = {\n\t...latin,\n\t...getAccidentalsVariation(latin),\n};\n\nconst germanVariantsToNotes = {\n\t...german,\n};\n\nconst allVariantsToNotes = {\n\t...englishVariantsToNotes,\n\t...latinVariantsToNotes,\n\t...germanVariantsToNotes,\n};\n\nconst allVariants = Object.keys(allVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst englishVariants = Object.keys(englishVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst latinVariants = Object.keys(latinVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst germanVariants = Object.keys(germanVariantsToNotes).sort(\n\t(a, b) => b.length - a.length\n);\n\nconst allVariantsPerGroup = [\n\t{ name: 'english', notes: englishVariants },\n\t{ name: 'german', notes: germanVariants },\n\t{ name: 'latin', notes: latinVariants },\n];\n\nexport {\n\tnotes,\n\tallVariants,\n\tallVariantsPerGroup,\n\tenglishVariants,\n\tlatinVariants,\n\tgermanVariants,\n\tallVariantsToNotes,\n\tenglishVariantsToNotes,\n\tlatinVariantsToNotes,\n\tgermanVariantsToNotes,\n};\n", "class InvalidInputError extends Error {\n\t/**\n\t * The parser was not given a valid string to parse\n\t * ex: `parseChord(null)`\n\t */\n\tconstructor() {\n\t\tsuper('The given symbol is not a valid string');\n\t\tthis.name = 'InvalidInput';\n\t}\n}\n\nclass UnexpectedError extends Error {\n\t/**\n\t * This error is very unlikely to happen.\n\t * If it does, it is probably in the context of a custom filter that returns `null` instead of throwing an exception.\n\t */\n\tconstructor() {\n\t\tconst message =\n\t\t\t'An unexpected error happened. Maybe a custom filter returned null instead of throwing an exception?';\n\t\tsuper(message);\n\t\tthis.name = 'UnexpectedError';\n\t}\n}\n\nclass ChordSymbolError extends Error {\n\tconstructor(message, chord, errorName) {\n\t\tsuper(message);\n\t\tthis.name = errorName;\n\t\tthis.chord = chord;\n\t}\n}\n\nclass NoSymbolFoundError extends ChordSymbolError {\n\t/**\n\t * The given string cannot be confused with a chord symbol in the current notation system\n\t * ex: `parseChord('Ape')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t */\n\tconstructor(chord) {\n\t\tconst message = `\"${chord.input.symbol}\" does not seems to be a chord`;\n\t\tsuper(message, chord, 'NoSymbolFound');\n\t}\n}\n\nclass InvalidModifierError extends ChordSymbolError {\n\t/**\n\t * The given string looks like a chord symbol, but `ChordSymbol` does not understand its descriptor.\n\t * It can be either because of a typo, or just because the given word is not a symbol.\n\t * ex: `parseChord('Amid')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String} invalidChars - the characters that proved problematic when parsing the symbol\n\t */\n\tconstructor(chord, invalidChars) {\n\t\tconst message = `The chord descriptor \"${chord.input.descriptor}\" contains unknown or duplicated modifiers: \"${invalidChars}\"`;\n\t\tsuper(message, chord, 'InvalidModifier');\n\t}\n}\n\nclass InvalidIntervalsError extends ChordSymbolError {\n\t/**\n\t * The given string is a chord symbol, but the resulting interval list is not valid\n\t * ex: `parseChord('A7M7')`\n\t * @param {Chord} chord - the chord object, in the state that it was when the error occurred\n\t * @param {String[]} forbiddenCombo - intervals that should not belong together in a chord\n\t */\n\tconstructor(chord, forbiddenCombo) {\n\t\tconst message =\n\t\t\t`\"${chord.input.symbol}\" describes a chord with an invalid intervals combo: ` +\n\t\t\tforbiddenCombo.join(' and ');\n\t\tsuper(message, chord, 'InvalidIntervals');\n\t}\n}\n\nexport {\n\tInvalidInputError,\n\tInvalidIntervalsError,\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n\tUnexpectedError,\n};\n", "import _isArray from 'lodash/isArray';\nimport _isEqual from 'lodash/isEqual';\n\nfunction hasExactly(allIntervals, search) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\treturn _isEqual(allIntervals, arraySearch);\n}\n\nfunction hasOneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'oneOf');\n}\n\nfunction hasAll(allIntervals, search) {\n\treturn has(allIntervals, search, 'all');\n}\n\nfunction hasNoneOf(allIntervals, search) {\n\treturn has(allIntervals, search, 'none');\n}\n\nfunction has(allIntervals, search, require) {\n\tconst arraySearch = _isArray(search) ? search : [search];\n\n\tconst lookupMethod = require === 'oneOf' ? 'some' : 'every';\n\n\treturn arraySearch[lookupMethod]((interval) => {\n\t\treturn require === 'none'\n\t\t\t? !allIntervals.includes(interval)\n\t\t\t: allIntervals.includes(interval);\n\t});\n}\n\nexport { hasExactly, hasOneOf, hasAll, hasNoneOf };\n", "import { hasAll } from '../../helpers/hasElement';\nimport { InvalidIntervalsError } from '../../helpers/ChordParsingError';\n\nconst allForbiddenCombos = [\n\t['2', '3'],\n\t['2', '9'],\n\t['3', 'b3'],\n\t//['3', '4'], // valid in the Real Book: F#7SUS(add 3)\n\t['4', '11'],\n\t['5', 'b5'],\n\t['5', '#5'],\n\t['b6', '#5'],\n\t['b6', '6'],\n\t['b6', '13'],\n\t['6', '13'],\n\t['b7', 'bb7'],\n\t['7', 'b7'],\n\t['9', 'b9'],\n\t['9', '#9'],\n\t['11', '#11'],\n\t['13', 'b13'],\n];\n\n/**\n * Check parsed interval list to detect potential inconsistencies\n *\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function checkIntervalsConsistency(chord) {\n\tconst intervals = chord.normalized.intervals;\n\n\tconst forbiddenCombo = allForbiddenCombos.find((combo) =>\n\t\thasAll(intervals, combo)\n\t);\n\n\tif (forbiddenCombo) {\n\t\tthrow new InvalidIntervalsError(chord, forbiddenCombo);\n\t}\n\n\treturn chord;\n}\n", "/**\n * Render the chord by assembling all its components\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbol(chord) {\n\tconst { rootNote, bassNote, descriptor, chordChanges } = chord.formatted;\n\n\tlet symbol = rootNote;\n\n\tif (descriptor) {\n\t\tsymbol += descriptor;\n\t}\n\tif (chordChanges && chordChanges.length) {\n\t\tsymbol += '(' + chordChanges.join(',') + ')';\n\t}\n\tif (bassNote) {\n\t\tsymbol += '/' + bassNote;\n\t}\n\n\tchord.formatted.symbol = symbol;\n\n\treturn chord;\n}\n", "const qualities = {\n\tma: 'major',\n\tma6: 'major6',\n\tma7: 'major7',\n\tdom7: 'dominant7',\n\n\tmi: 'minor',\n\tmi6: 'minor6',\n\tmi7: 'minor7',\n\tmiMa7: 'minorMajor7',\n\n\taug: 'augmented',\n\tdim: 'diminished',\n\tdim7: 'diminished7',\n\n\tpower: 'power',\n\tbass: 'bass',\n};\n\nconst majorQualities = [\n\tqualities.ma,\n\tqualities.ma6,\n\tqualities.ma7,\n\tqualities.dom7,\n\tqualities.aug,\n];\n\nconst minorQualities = [\n\tqualities.mi,\n\tqualities.mi6,\n\tqualities.mi7,\n\tqualities.miMa7,\n\tqualities.dim,\n\tqualities.dim7,\n];\n\nexport { qualities, majorQualities, minorQualities };\n", "import { qualities } from '../../dictionaries/qualities';\nimport { hasNoneOf } from '../../helpers/hasElement';\n\nconst qualityToDescriptor = {\n\t[qualities.ma]: () => '',\n\t[qualities.ma6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? '69' : '6',\n\t[qualities.ma7]: (chord) => 'ma' + getHighestExtension(chord),\n\t[qualities.dom7]: (chord) =>\n\t\tchord.normalized.intents.alt ? '7alt' : getHighestExtension(chord),\n\n\t[qualities.mi]: () => 'mi',\n\t[qualities.mi6]: (chord) =>\n\t\tchord.normalized.intervals.includes('9') ? 'mi69' : 'mi6',\n\t[qualities.mi7]: (chord) => 'mi' + getHighestExtension(chord),\n\t[qualities.miMa7]: (chord) => 'miMa' + getHighestExtension(chord),\n\n\t[qualities.aug]: () => '+',\n\t[qualities.dim]: () => 'dim',\n\t[qualities.dim7]: () => 'dim7',\n\n\t[qualities.power]: () => '5',\n\t[qualities.bass]: () => ' bass',\n};\n\nconst chordChangesDescriptors = {\n\tadd: 'add',\n\tadd7: 'Ma7',\n\tomit: 'omit',\n\tsus: 'sus',\n};\n\n/**\n * Pre-render the chord by formatting all his components: root and bass notes, descriptor and changes\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function formatSymbolParts(chord) {\n\tchord.formatted = {\n\t\trootNote: chord.normalized.rootNote,\n\t\tbassNote: chord.normalized.bassNote,\n\t\tdescriptor: getDescriptor(chord),\n\t\tchordChanges: getChordChanges(chord),\n\t};\n\treturn chord;\n}\n\nfunction getDescriptor(chord) {\n\tlet descriptor = qualityToDescriptor[chord.normalized.quality](chord);\n\tif (chord.normalized.isSuspended) {\n\t\tdescriptor += chordChangesDescriptors.sus;\n\t}\n\treturn descriptor;\n}\n\nfunction getHighestExtension(chord) {\n\tconst extensions = chord.normalized.extensions;\n\n\tlet highestExtension = extensions[extensions.length - 1];\n\n\tif (highestExtension === '11' && chord.normalized.intents.major) {\n\t\thighestExtension = hasNoneOf(chord.normalized.alterations, ['b9', '#9'])\n\t\t\t? '9'\n\t\t\t: '7';\n\t}\n\treturn highestExtension || '7';\n}\n\nfunction getChordChanges(chord) {\n\tconst formattedOmits = formatOmits(chord.normalized.omits);\n\n\tif (isAltered(chord)) {\n\t\treturn formattedOmits;\n\t}\n\n\tconst formattedAdds = formatAdds(\n\t\tchord.normalized.quality,\n\t\tchord.normalized.adds\n\t);\n\n\treturn [\n\t\t...chord.normalized.alterations,\n\t\t...formattedAdds,\n\t\t...formattedOmits,\n\t];\n}\n\nfunction isAltered(chord) {\n\treturn (\n\t\tchord.normalized.intents.alt &&\n\t\tchord.normalized.quality === qualities.dom7\n\t);\n}\n\nfunction formatAdds(quality, adds) {\n\treturn adds\n\t\t.filter((add) => {\n\t\t\treturn !(\n\t\t\t\t[qualities.ma6, qualities.mi6].includes(quality) && add === '9'\n\t\t\t);\n\t\t})\n\t\t.map((add, index) => {\n\t\t\tlet formatted = '';\n\t\t\tif (index === 0) {\n\t\t\t\tformatted += chordChangesDescriptors.add;\n\t\t\t\tif (['b', '#'].includes(add[0])) {\n\t\t\t\t\tformatted += ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tformatted += add === '7' ? chordChangesDescriptors.add7 : add;\n\t\t\treturn formatted;\n\t\t});\n}\n\nfunction formatOmits(omits) {\n\treturn omits.map((omitted, index) => {\n\t\tlet formatted = '';\n\t\tif (index === 0) {\n\t\t\tformatted += chordChangesDescriptors.omit;\n\t\t}\n\t\tformatted += omitted === 'b3' ? '3' : omitted;\n\t\treturn formatted;\n\t});\n}\n", "import chain from '../../helpers/chain';\n\n/**\n * Prepare whatever string has been identified as a descriptor so it is parsable by the next filter\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function getParsableDescriptor(chord) {\n\tconst allFilters = [\n\t\ttoLowerCaseExceptMajorM,\n\t\tremoveSpaces,\n\t\taddDisambiguators,\n\t\taddMissingVerbs,\n\t];\n\n\tif (chord.input.descriptor) {\n\t\tchord.input.parsableDescriptor = chain(\n\t\t\tallFilters,\n\t\t\tchord.input.descriptor\n\t\t);\n\t}\n\treturn chord;\n}\n\nfunction toLowerCaseExceptMajorM(descriptor) {\n\treturn descriptor\n\t\t.replace(/[A-LN-Za-z]+/g, (match) => match.toLowerCase())\n\t\t.replace('oMit', 'omit')\n\t\t.replace('diM', 'dim')\n\t\t.replace('augMented', 'augmented');\n}\n\nfunction removeSpaces(descriptor) {\n\treturn descriptor.replace(/ /g, '');\n}\n\nfunction addDisambiguators(descriptor) {\n\treturn descriptor\n\t\t.replace(/(7?dim)(alt|add)/g, '$1 $2')\n\t\t.replace(/([m|M])(alt|add)/g, '$1 $2')\n\t\t.replace(/i(no[35])/g, 'i $1')\n\t\t.replace(/([b♭#♯]9)6/g, '$1 6')\n\t\t.replace(/(9\\/?6)/g, ' $1');\n}\n\nfunction addMissingVerbs(descriptor) {\n\tlet allTokensWithVerbs;\n\tlet currentVerb;\n\tlet hasVerb;\n\n\treturn descriptor.replace(/\\((.*?)\\)/g, (match, parenthesis) => {\n\t\tallTokensWithVerbs = [];\n\t\tcurrentVerb = '';\n\n\t\tparenthesis.split(',').forEach((token) => {\n\t\t\thasVerb = true;\n\t\t\tif (token.startsWith('add')) {\n\t\t\t\tcurrentVerb = 'add';\n\t\t\t} else if (token.startsWith('omit')) {\n\t\t\t\tcurrentVerb = 'omit';\n\t\t\t} else if (token.startsWith('no')) {\n\t\t\t\tcurrentVerb = 'no';\n\t\t\t} else {\n\t\t\t\thasVerb = false;\n\t\t\t}\n\t\t\tif (hasVerb) {\n\t\t\t\tallTokensWithVerbs.push(token);\n\t\t\t} else {\n\t\t\t\tallTokensWithVerbs.push(currentVerb + token);\n\t\t\t}\n\t\t});\n\t\treturn ' ' + allTokensWithVerbs.join(' ') + ' ';\n\t});\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\n/**\n * @param {String} symbol\n * @param {Object} parserConfiguration\n * @returns {Chord}\n */\nexport default function initChord(parserConfiguration = {}, symbol) {\n\treturn {\n\t\tinput: {\n\t\t\tsymbol,\n\t\t},\n\t\tnormalized: {},\n\t\tformatted: {},\n\t\tparserConfiguration: _cloneDeep(parserConfiguration),\n\t};\n}\n", "import { notes } from '../../dictionaries/notes';\nimport { majorQualities } from '../../dictionaries/qualities';\n\nconst notesSharp = [\n\tnotes.A,\n\tnotes.ASharp,\n\tnotes.B,\n\tnotes.C,\n\tnotes.CSharp,\n\tnotes.D,\n\tnotes.DSharp,\n\tnotes.E,\n\tnotes.F,\n\tnotes.FSharp,\n\tnotes.G,\n\tnotes.GSharp,\n];\n\nconst notesFlat = [\n\tnotes.A,\n\tnotes.BFlat,\n\tnotes.B,\n\tnotes.C,\n\tnotes.DFlat,\n\tnotes.D,\n\tnotes.EFlat,\n\tnotes.E,\n\tnotes.F,\n\tnotes.GFlat,\n\tnotes.G,\n\tnotes.AFlat,\n];\n\nconst rootNoteToScaleAccidentals = {\n\t[notes.C]: { maj: 'flat', min: 'flat' },\n\t[notes.CSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.DFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.D]: { maj: 'sharp', min: 'flat' },\n\t[notes.DSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.EFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.E]: { maj: 'sharp', min: 'sharp' },\n\t[notes.F]: { maj: 'flat', min: 'flat' },\n\t[notes.FSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.GFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.G]: { maj: 'sharp', min: 'flat' },\n\t[notes.GSharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.AFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.A]: { maj: 'sharp', min: 'flat' },\n\t[notes.ASharp]: { maj: 'sharp', min: 'sharp' },\n\t[notes.BFlat]: { maj: 'flat', min: 'flat' },\n\t[notes.B]: { maj: 'sharp', min: 'sharp' },\n};\n\n/**\n * Convert intervals in actual notes.\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function nameIndividualChordNotes(chord) {\n\tconst rootNote = chord.normalized.rootNote;\n\tconst semitones = chord.normalized.semitones;\n\tconst quality = chord.normalized.quality;\n\n\tconst minMaj = majorQualities.includes(quality) ? 'maj' : 'min';\n\tconst refNotes =\n\t\trootNoteToScaleAccidentals[rootNote][minMaj] === 'sharp'\n\t\t\t? notesSharp\n\t\t\t: notesFlat;\n\n\tconst rootNoteIndex = refNotes.indexOf(rootNote);\n\tconst indexedNotes = [\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t\t// repeating...\n\t\t...refNotes.slice(rootNoteIndex),\n\t\t...refNotes.slice(0, rootNoteIndex),\n\t];\n\n\tconst chordNotes = semitones.map((i) => indexedNotes[i]);\n\n\tchord.normalized.notes = chordNotes;\n\n\treturn chord;\n}\n", "import { allVariantsToNotes } from '../../dictionaries/notes';\n\n/**\n * Convert root/bass notes to English names\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeNotes(chord) {\n\tchord.normalized.rootNote = allVariantsToNotes[chord.input.rootNote];\n\n\tif (chord.input.bassNote) {\n\t\tchord.normalized.bassNote = allVariantsToNotes[chord.input.bassNote];\n\t}\n\n\treturn chord;\n}\n", "import _clone from 'lodash/clone';\nimport _find from 'lodash/find';\nimport _uniq from 'lodash/uniq';\nimport _without from 'lodash/without';\n\nimport chain from '../../helpers/chain';\n\nimport {\n\thasOneOf,\n\thasAll,\n\thasNoneOf,\n\thasExactly,\n} from '../../helpers/hasElement';\n\nimport { qualities } from '../../dictionaries/qualities';\n\n/**\n * Detect chord quality and changes (extensions, alterations, adds and omits)\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function normalizeDescriptor(chord) {\n\tlet chordIntervals = _clone(chord.normalized.intervals);\n\n\tlet normalized = {\n\t\tquality: '',\n\t\tisSuspended: false,\n\t\textensions: [],\n\t\talterations: [],\n\t\tadds: [],\n\t\tomits: [],\n\t};\n\n\tif (isPowerChord(chordIntervals)) {\n\t\tnormalized.quality = qualities.power;\n\t} else if (isBass(chordIntervals)) {\n\t\tnormalized.quality = qualities.bass;\n\t} else {\n\t\tconst omits = getOmits(chordIntervals, chord.normalized.intents.major);\n\n\t\tconst isSuspended = getIsSuspended(\n\t\t\tchordIntervals,\n\t\t\tchord.normalized.intents.major\n\t\t);\n\n\t\tconst { qualityIntervals, quality } = getChordQuality(\n\t\t\tchordIntervals,\n\t\t\tchord,\n\t\t\tisSuspended,\n\t\t\tomits\n\t\t);\n\n\t\tconst extensions = getExtensions(chordIntervals, quality);\n\n\t\t// to be able to detect adds and alterations, we build the \"straight\" version of the chord,\n\t\t// ie. the chord as if no alterations/adds/omits where present.\n\t\t// we will compare this to the actual intervals later on\n\t\tconst baseIntervals = ['1', ...qualityIntervals, ...extensions];\n\n\t\tconst { adds, alterations } = getAddsAndAlterations(\n\t\t\tchordIntervals,\n\t\t\tbaseIntervals,\n\t\t\tquality\n\t\t);\n\n\t\tnormalized = {\n\t\t\t...normalized,\n\t\t\tquality,\n\t\t\tisSuspended,\n\t\t\textensions,\n\t\t\talterations,\n\t\t\tadds,\n\t\t\tomits,\n\t\t};\n\t}\n\n\treturn {\n\t\t...chord,\n\t\tnormalized: {\n\t\t\t...chord.normalized,\n\t\t\t...normalized,\n\t\t},\n\t};\n}\n\nfunction isPowerChord(intervals) {\n\treturn hasExactly(intervals, ['1', '5']);\n}\n\nfunction isBass(intervals) {\n\treturn hasExactly(intervals, ['1']);\n}\n\nfunction getIsSuspended(intervals, hasMajorIntent) {\n\treturn (\n\t\tintervals.includes('4') ||\n\t\t(intervals.includes('11') && hasMajorIntent && !intervals.includes('3'))\n\t);\n}\n\nfunction getOmits(intervals, hasMajorIntent) {\n\tconst omits = [];\n\n\tif (\n\t\thasNoneOf(intervals, ['b3', '3', '4', '11']) ||\n\t\t(!hasMajorIntent && hasNoneOf(intervals, ['b3', '4']))\n\t) {\n\t\tomits.push(hasMajorIntent ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5', 'b13'])) {\n\t\tomits.push('5');\n\t}\n\treturn omits;\n}\n\nfunction getChordQuality(allIntervals, chord, isSuspended, omits) {\n\tconst intervalsForQualityDetection = getIntervalsForQualityDetection(\n\t\tallIntervals,\n\t\tchord,\n\t\tisSuspended,\n\t\tomits\n\t);\n\n\tconst intervalsToQualities = [\n\t\t// !!! do not change order without a good reason\n\t\t{ qualityIntervals: ['b3'], quality: qualities.mi },\n\t\t{ qualityIntervals: ['b3', '6'], quality: qualities.mi6 },\n\t\t{ qualityIntervals: ['b3', '7'], quality: qualities.miMa7 },\n\t\t{ qualityIntervals: ['b3', 'b7'], quality: qualities.mi7 },\n\n\t\t{ qualityIntervals: ['3'], quality: qualities.ma },\n\t\t{ qualityIntervals: ['3', '6'], quality: qualities.ma6 },\n\t\t{ qualityIntervals: ['3', '7'], quality: qualities.ma7 },\n\t\t{ qualityIntervals: ['3', 'b7'], quality: qualities.dom7 },\n\n\t\t{ qualityIntervals: ['3', '#5'], quality: qualities.aug },\n\t\t{ qualityIntervals: ['b3', 'b5'], quality: qualities.dim },\n\t\t{ qualityIntervals: ['b3', 'b5', 'bb7'], quality: qualities.dim7 },\n\t].sort((a, b) => b.qualityIntervals.length - a.qualityIntervals.length);\n\n\treturn _find(intervalsToQualities, (o) =>\n\t\thasAll(intervalsForQualityDetection, o.qualityIntervals)\n\t);\n}\n\n// To properly detect the chord quality, we need a \"straight\" version of the chord,\n// meaning with a third interval (= un-suspended, no omit3)\nfunction getIntervalsForQualityDetection(\n\tallIntervals,\n\tchord,\n\tisSuspended,\n\tomits\n) {\n\tconst allFilters = [\n\t\tundoOmit3.bind(null, omits),\n\t\tundoSuspension.bind(null, isSuspended, chord.normalized.intents.major),\n\t\tundoAlt5.bind(null, chord.normalized.intents.alt),\n\t\t_uniq,\n\t];\n\n\treturn chain(allFilters, _clone(allIntervals));\n}\n\nfunction undoOmit3(omits, allIntervals) {\n\tconst with3rd = _clone(allIntervals);\n\n\tif (omits.includes('3')) {\n\t\twith3rd.push('3');\n\t} else if (omits.includes('b3')) {\n\t\twith3rd.push('b3');\n\t}\n\treturn with3rd;\n}\n\nfunction undoSuspension(isSuspended, hasMajorIntent, allIntervals) {\n\tif (isSuspended) {\n\t\tconst unSuspended = _without(allIntervals, '4');\n\t\tunSuspended.push(hasMajorIntent ? '3' : 'b3');\n\t\treturn unSuspended;\n\t}\n\treturn allIntervals;\n}\n\nfunction undoAlt5(isAlt, allIntervals) {\n\tif (isAlt) {\n\t\tconst unaltered = _without(allIntervals, 'b5', '#5');\n\t\tunaltered.push('5');\n\t\treturn unaltered;\n\t}\n\treturn allIntervals;\n}\n\nfunction getExtensions(allIntervals, quality) {\n\tconst extensions = [];\n\n\tif (canBeExtended(quality)) {\n\t\tif (isMinorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '11', '13');\n\t\t} else if (isMajorExtended13th(allIntervals, quality)) {\n\t\t\textensions.push('9', '13');\n\t\t} else if (isExtended11th(allIntervals)) {\n\t\t\textensions.push('9', '11');\n\t\t} else if (isExtended9th(allIntervals)) {\n\t\t\textensions.push('9');\n\t\t}\n\t}\n\treturn extensions;\n}\n\nfunction canBeExtended(quality) {\n\treturn [\n\t\tqualities.ma7,\n\t\tqualities.dom7,\n\t\tqualities.mi7,\n\t\tqualities.miMa7,\n\t].includes(quality);\n}\n\nfunction canHave11th(quality) {\n\treturn [qualities.mi7, qualities.miMa7].includes(quality);\n}\n\nfunction isMinorExtended13th(allIntervals, quality) {\n\treturn (\n\t\tcanHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['11', '#11']) &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isMajorExtended13th(allIntervals, quality) {\n\treturn (\n\t\t!canHave11th(quality) &&\n\t\thasOneOf(allIntervals, '13') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended11th(allIntervals) {\n\treturn (\n\t\thasOneOf(allIntervals, '11') &&\n\t\thasOneOf(allIntervals, ['b9', '9', '#9'])\n\t);\n}\n\nfunction isExtended9th(allIntervals) {\n\treturn allIntervals.includes('9');\n}\n\nfunction getAddsAndAlterations(chordIntervals, baseIntervals, quality) {\n\tconst adds = [];\n\tconst alterations = [];\n\n\tchordIntervals\n\t\t.filter((interval) => interval !== '5' && interval !== '4')\n\t\t.forEach((interval) => {\n\t\t\tif (!baseIntervals.includes(interval)) {\n\t\t\t\tif (isAlteration(quality, interval)) {\n\t\t\t\t\talterations.push(interval);\n\t\t\t\t} else {\n\t\t\t\t\tadds.push(interval);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\tif (hasAdd3(chordIntervals)) {\n\t\tadds.push('3');\n\t}\n\n\treturn {\n\t\tadds: sortIntervals(adds),\n\t\talterations: sortIntervals(alterations),\n\t};\n}\n\nfunction isAlteration(quality, interval) {\n\tconst qualityAlterations = {\n\t\t[qualities.ma]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.ma7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.dom7]: ['b5', '#5', 'b9', '#9', '#11', 'b13'],\n\n\t\t[qualities.mi]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi6]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.mi7]: ['b5', '#5', '#11', 'b13'],\n\t\t[qualities.miMa7]: ['b5', '#5', '#11', 'b13'],\n\n\t\t[qualities.aug]: [],\n\t\t[qualities.dim]: [],\n\t\t[qualities.dim7]: [],\n\t};\n\n\treturn qualityAlterations[quality].includes(interval);\n}\n\nfunction hasAdd3(allIntervals) {\n\treturn hasAll(allIntervals, ['3', '4']);\n}\n\nfunction sortIntervals(intervals) {\n\treturn intervals.sort((a, b) => {\n\t\tconst sortableA = Number.parseInt(a.replace(/[b#]/, ''));\n\t\tconst sortableB = Number.parseInt(b.replace(/[b#]/, ''));\n\t\treturn sortableA - sortableB;\n\t});\n}\n", "import { NoSymbolFoundError } from '../../helpers/ChordParsingError';\n\n/**\n * Split symbol in root/bass note and descriptor.\n * Returns null if the given string does not seems to be a chord.\n *\n * @param {String[]} noteVariants - all notes within a given notation system (English, Latin, German...)\n * @param {Chord} chord\n * @returns {Chord|null}\n */\nexport default function parseBase(noteVariants, chord) {\n\tconst { symbol } = chord.input;\n\tconst notesRegex = noteVariants.join('|');\n\tconst notesAndDescriptorRegex = new RegExp(\n\t\t'^' +\n\t\t\t'(' +\n\t\t\tnotesRegex +\n\t\t\t')' +\n\t\t\t'(.*?)' +\n\t\t\t'(/(' +\n\t\t\tnotesRegex +\n\t\t\t'))?' +\n\t\t\t'$'\n\t);\n\tconst result = symbol.match(notesAndDescriptorRegex);\n\n\tif (result && result[1]) {\n\t\tchord.input.rootNote = result[1];\n\n\t\tif (result[2]) {\n\t\t\tchord.input.descriptor = result[2];\n\t\t}\n\t\tif (result[4]) {\n\t\t\tchord.input.bassNote = result[4];\n\t\t}\n\t\treturn chord;\n\t} else {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n}\n", "const allModifiers = {\n\t// base\n\tma: 'ma',\n\tmi: 'mi',\n\tdim: 'dim',\n\thalfDim: 'halfDim',\n\taug: 'aug',\n\tseventh: 'seventh',\n\n\t// suspended\n\tsus: 'sus',\n\tsus2: 'sus2',\n\n\t// extensions\n\tninth: 'ninth',\n\televenth: 'eleventh',\n\tthirteenth: 'thirteenth',\n\n\t// alterations\n\tfifthFlat: 'b5',\n\tfifthSharp: '#5',\n\tninthFlat: 'b9',\n\tninthSharp: '#9',\n\televenthSharp: '#11',\n\tthirteenthFlat: 'b13',\n\n\t// added\n\tadd3: 'add3',\n\tadd4: 'add4',\n\taddb6: 'addb6',\n\tadd6: 'add6',\n\tadd69: 'add69',\n\tadd7: 'add7',\n\tadd9: 'add9',\n\tadd11: 'add11',\n\tadd13: 'add13',\n\n\t// special\n\tbass: 'bass',\n\tomit3: 'omit3',\n\tomit5: 'omit5',\n\tpower: 'power',\n\talt: 'alt',\n};\n\n/**\n * WARNING: when adding new modifiers symbols, be careful of possible edge cases that might arise with some combinations.\n * For example, without edge case handling, \"madd9\" would be parsed as \"ma\" instead of \"m\"+\"add9\"\n */\n\nconst major = {\n\t'^': [allModifiers.ma, allModifiers.add7],\n\tΔ: [allModifiers.ma, allModifiers.add7],\n\tM: allModifiers.ma,\n\tMa: allModifiers.ma,\n\tMaj: allModifiers.ma,\n\tMajor: allModifiers.ma,\n\tma: allModifiers.ma,\n\tmaj: allModifiers.ma,\n\tmajor: allModifiers.ma,\n};\n\nconst major7th = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => symbol + '7'\n);\nconst add7 = getDerivedModifiers(\n\tmajor,\n\tallModifiers.add7,\n\t(symbol) => 'add' + symbol + '7'\n);\n\nconst allSymbols = {\n\t// major\n\t...major,\n\t...major7th,\n\n\t// minor\n\t'-': allModifiers.mi,\n\tm: allModifiers.mi,\n\tMi: allModifiers.mi,\n\tMin: allModifiers.mi,\n\tMinor: allModifiers.mi,\n\tmi: allModifiers.mi,\n\tmin: allModifiers.mi,\n\tminor: allModifiers.mi,\n\n\t// diminished / augmented\n\t'°': allModifiers.dim,\n\to: allModifiers.dim,\n\t0: allModifiers.dim,\n\tdim: allModifiers.dim,\n\t'dim.': allModifiers.dim,\n\tdiminished: allModifiers.dim,\n\n\tØ: allModifiers.halfDim,\n\tø: allModifiers.halfDim,\n\th: allModifiers.halfDim,\n\n\t'+': allModifiers.aug,\n\taug: allModifiers.aug,\n\taugmented: allModifiers.aug,\n\n\t// seventh\n\t7: allModifiers.seventh,\n\n\t// suspended\n\t4: allModifiers.sus,\n\tsus: allModifiers.sus,\n\tsus4: allModifiers.sus,\n\tsuspended: allModifiers.sus,\n\tsuspended4: allModifiers.sus,\n\tsus2: allModifiers.sus2,\n\tsuspended2: allModifiers.sus2,\n\n\t// extensions\n\t9: allModifiers.ninth,\n\t11: allModifiers.eleventh,\n\t13: allModifiers.thirteenth,\n\n\t// alterations\n\tb3: allModifiers.mi,\n\tb5: allModifiers.fifthFlat,\n\t'♭5': allModifiers.fifthFlat,\n\t'#5': allModifiers.fifthSharp,\n\t'♯5': allModifiers.fifthSharp,\n\tb9: allModifiers.ninthFlat,\n\t'♭9': allModifiers.ninthFlat,\n\taddb9: allModifiers.ninthFlat,\n\t'add♭9': allModifiers.ninthFlat,\n\t'#9': allModifiers.ninthSharp,\n\t'♯9': allModifiers.ninthSharp,\n\t'add#9': allModifiers.ninthSharp,\n\t'add♯9': allModifiers.ninthSharp,\n\t'#11': allModifiers.eleventhSharp,\n\t'♯11': allModifiers.eleventhSharp,\n\t'add#11': allModifiers.eleventhSharp,\n\tb13: allModifiers.thirteenthFlat,\n\t'♭13': allModifiers.thirteenthFlat,\n\taddb13: allModifiers.thirteenthFlat,\n\t'add♭13': allModifiers.thirteenthFlat,\n\n\t// added\n\t...add7,\n\t2: allModifiers.add9,\n\tadd2: allModifiers.add9,\n\tadd3: allModifiers.add3,\n\tadd4: allModifiers.add4,\n\taddb6: allModifiers.addb6,\n\tb6: allModifiers.addb6,\n\t6: allModifiers.add6,\n\tadd6: allModifiers.add6,\n\t'6/9': allModifiers.add69,\n\t69: allModifiers.add69,\n\t96: allModifiers.add69,\n\t'9/6': allModifiers.add69,\n\tadd9: allModifiers.add9,\n\tadd11: allModifiers.add11,\n\tadd13: allModifiers.add13,\n\n\t// special\n\tbass: allModifiers.bass,\n\tomit3: allModifiers.omit3,\n\tno3: allModifiers.omit3,\n\tomit5: allModifiers.omit5,\n\tno5: allModifiers.omit5,\n\t5: allModifiers.power,\n\talt: allModifiers.alt,\n\t'alt.': allModifiers.alt,\n\taltered: allModifiers.alt,\n};\n\nfunction getDerivedModifiers(source, modifierId, derivedFn) {\n\treturn Object.keys(source)\n\t\t.map(derivedFn)\n\t\t.reduce((acc, curr) => {\n\t\t\tacc[curr] = modifierId;\n\t\t\treturn acc;\n\t\t}, {});\n}\n\nconst allVariants = Object.keys(allSymbols).sort((a, b) => b.length - a.length);\n\nexport { allSymbols, allVariants };\nexport default allModifiers;\n", "export default {\n\t1: 0,\n\t2: 2,\n\tb3: 3,\n\t3: 4,\n\t4: 5,\n\tb5: 6,\n\t5: 7,\n\t'#5': 8,\n\tb6: 8,\n\t6: 9,\n\tbb7: 9,\n\tb7: 10,\n\t7: 11,\n\tb9: 13,\n\t9: 14,\n\t'#9': 15,\n\t11: 17,\n\t'#11': 18,\n\tb13: 20,\n\t13: 21,\n};\n", "import _uniq from 'lodash/uniq';\nimport {\n\tInvalidModifierError,\n\tNoSymbolFoundError,\n} from '../../helpers/ChordParsingError';\n\nimport m from '../../dictionaries/modifiers';\nimport { allSymbols, allVariants } from '../../dictionaries/modifiers';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\nimport { hasNoneOf, hasOneOf } from '../../helpers/hasElement';\n\n/**\n * Convert the descriptor into a suite of intervals, semitones and intents\n *\n * @param {Array<('b5'|'#5'|'b9'|'#9'|'#11'|'b13')>} altIntervals\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function parseDescriptor(altIntervals, chord) {\n\tlet allModifiers = [];\n\n\tif (chord.input.parsableDescriptor) {\n\t\tallModifiers = getModifiers(chord);\n\t}\n\n\tchord.input.modifiers = allModifiers;\n\tchord.normalized.intervals = getIntervals(allModifiers, altIntervals);\n\tchord.normalized.semitones = getSemitones(chord.normalized.intervals);\n\tchord.normalized.intents = getIntents(allModifiers);\n\n\treturn chord;\n}\n\nfunction getModifiers(chord) {\n\tconst { parsableDescriptor } = chord.input;\n\tconst modifiers = [];\n\n\tconst descriptorRegex = new RegExp(\n\t\tallVariants.map(escapeRegex).join('|'),\n\t\t'g'\n\t);\n\tconst descriptorMatches = parsableDescriptor.match(descriptorRegex);\n\n\tlet remainingChars = parsableDescriptor;\n\tlet allModifiersId;\n\n\tif (descriptorMatches) {\n\t\tdescriptorMatches.forEach((match) => {\n\t\t\tallModifiersId = allSymbols[match];\n\n\t\t\tif (!Array.isArray(allModifiersId)) {\n\t\t\t\tallModifiersId = [allModifiersId];\n\t\t\t}\n\n\t\t\tallModifiersId.forEach((modifierId) => {\n\t\t\t\tif (modifiers.includes(modifierId)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmodifiers.push(modifierId);\n\n\t\t\t\tremainingChars = remainingChars.replace(match, '');\n\t\t\t});\n\t\t});\n\t}\n\n\tif (modifiers.length === 0) {\n\t\tthrow new NoSymbolFoundError(chord);\n\t}\n\tif (remainingChars.trim().length > 0) {\n\t\tthrow new InvalidModifierError(chord, remainingChars);\n\t}\n\n\treturn modifiers;\n}\n\nfunction getIntervals(allModifiers, altIntervals) {\n\tif (allModifiers.includes(m.power)) {\n\t\treturn ['1', '5'];\n\t} else if (allModifiers.includes(m.bass)) {\n\t\treturn ['1'];\n\t}\n\n\treturn _uniq([\n\t\t'1',\n\t\t...getThird(allModifiers),\n\t\t...getFourth(allModifiers),\n\t\t...getFifths(allModifiers, altIntervals),\n\t\t...getSixth(allModifiers),\n\t\t...getSevenths(allModifiers),\n\t\t...getNinths(allModifiers, altIntervals),\n\t\t...getElevenths(allModifiers, altIntervals),\n\t\t...getThirteenths(allModifiers, altIntervals),\n\t]).sort((a, b) => intervalsToSemitones[a] - intervalsToSemitones[b]);\n}\n\nfunction getThird(allModifiers) {\n\tconst third = [];\n\tif (allModifiers.includes(m.omit3)) {\n\t\treturn [];\n\t}\n\tif (!hasOneOf(allModifiers, [m.sus, m.sus2])) {\n\t\tif (!hasMajorIntent(allModifiers)) {\n\t\t\tthird.push('b3');\n\t\t} else if (!allModifiers.includes(m.eleventh)) {\n\t\t\tthird.push('3');\n\t\t}\n\t}\n\tif (allModifiers.includes(m.add3)) {\n\t\tthird.push('3');\n\t}\n\treturn third;\n}\n\nfunction getFourth(allModifiers) {\n\tconst fourth = [];\n\tif (hasOneOf(allModifiers, [m.sus, m.add4])) {\n\t\tfourth.push('4');\n\t}\n\treturn fourth;\n}\n\nfunction getFifths(allModifiers, altIntervals) {\n\tconst fifths = [];\n\tif (allModifiers.includes(m.omit5)) {\n\t\treturn [];\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.dim, m.halfDim, m.fifthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b5')\n\t) {\n\t\tfifths.push('b5');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.aug, m.fifthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#5')\n\t) {\n\t\tfifths.push('#5');\n\t}\n\tif (!fifths.length && !allModifiers.includes(m.thirteenthFlat)) {\n\t\tfifths.push('5');\n\t}\n\treturn fifths;\n}\n\nfunction getSixth(allModifiers) {\n\tconst sixth = [];\n\tif (hasOneOf(allModifiers, [m.addb6])) {\n\t\tsixth.push('b6');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t!isExtended(allModifiers) &&\n\t\t!hasOneOf(allModifiers, [m.halfDim])\n\t) {\n\t\tsixth.push('6');\n\t}\n\treturn sixth;\n}\n\nfunction getSevenths(allModifiers) {\n\tconst sevenths = [];\n\tif (hasOneOf(allModifiers, [m.alt])) {\n\t\tsevenths.push('b7');\n\t}\n\tif (hasOneOf(allModifiers, [m.seventh, m.halfDim])) {\n\t\tif (allModifiers.includes(m.dim)) {\n\t\t\tsevenths.push('bb7');\n\t\t} else if (allModifiers.includes(m.halfDim)) {\n\t\t\tsevenths.push('b7');\n\t\t} else {\n\t\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t\t}\n\t} else if (hasOneOf(allModifiers, [m.ninth, m.eleventh, m.thirteenth])) {\n\t\tsevenths.push(getMinorOrMajorSeventh(allModifiers));\n\t}\n\tif (allModifiers.includes(m.add7)) {\n\t\tsevenths.push('7');\n\t}\n\treturn sevenths;\n}\n\nfunction getMinorOrMajorSeventh(allModifiers) {\n\treturn allModifiers.includes(m.ma) ? '7' : 'b7';\n}\n\nfunction getNinths(allModifiers, altIntervals) {\n\tconst ninth = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add69, m.ninth, m.eleventh, m.thirteenth]) &&\n\t\thasNoneOf(allModifiers, [m.ninthFlat, m.ninthSharp])\n\t) {\n\t\tninth.push('9');\n\t}\n\tif (hasOneOf(allModifiers, [m.sus2, m.add9])) {\n\t\tninth.push('9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b9')\n\t) {\n\t\tninth.push('b9');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.ninthSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#9')\n\t) {\n\t\tninth.push('#9');\n\t}\n\treturn ninth;\n}\n\nfunction getElevenths(allModifiers, altIntervals) {\n\tconst elevenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenth]) &&\n\t\t!hasMajorIntent(allModifiers)\n\t) {\n\t\televenths.push('11');\n\t} else if (hasOneOf(allModifiers, [m.eleventh, m.add11])) {\n\t\televenths.push('11');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.eleventhSharp]) ||\n\t\tshouldAlter(allModifiers, altIntervals, '#11')\n\t) {\n\t\televenths.push('#11');\n\t}\n\treturn elevenths;\n}\n\nfunction getThirteenths(allModifiers, altIntervals) {\n\tconst thirteenths = [];\n\tif (\n\t\thasOneOf(allModifiers, [m.add13, m.thirteenth]) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\tisExtended(allModifiers)) ||\n\t\t(hasOneOf(allModifiers, [m.add6, m.add69]) &&\n\t\t\thasOneOf(allModifiers, [m.halfDim]))\n\t) {\n\t\tthirteenths.push('13');\n\t}\n\tif (\n\t\thasOneOf(allModifiers, [m.thirteenthFlat]) ||\n\t\tshouldAlter(allModifiers, altIntervals, 'b13')\n\t) {\n\t\tthirteenths.push('b13');\n\t}\n\treturn thirteenths;\n}\n\nfunction shouldAlter(allModifiers, altIntervals, interval) {\n\treturn allModifiers.includes(m.alt) && altIntervals.includes(interval);\n}\n\nfunction hasMajorIntent(allModifiers) {\n\treturn hasNoneOf(allModifiers, [m.mi, m.dim, m.dim7, m.halfDim]);\n}\n\nfunction isExtended(allModifiers) {\n\treturn hasOneOf(allModifiers, [\n\t\tm.seventh,\n\t\tm.ninth,\n\t\tm.eleventh,\n\t\tm.thirteenth,\n\t]);\n}\n\n// Based on https://stackoverflow.com/a/6969486\nfunction escapeRegex(string) {\n\treturn string.replace(/[.\\-*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction getSemitones(allIntervals) {\n\treturn allIntervals\n\t\t.map((interval) => intervalsToSemitones[interval])\n\t\t.sort((a, b) => a - b);\n}\n\n// intents will be used later at formatting for disambiguation of some potentially confusing cases\nfunction getIntents(allModifiers) {\n\treturn {\n\t\tmajor: hasMajorIntent(allModifiers),\n\t\televenth: allModifiers.includes(m.eleventh),\n\t\talt: allModifiers.includes(m.alt),\n\t};\n}\n", "import chain from '../helpers/chain';\nimport _cloneDeep from 'lodash/cloneDeep';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport { allVariantsPerGroup } from '../dictionaries/notes';\n\nimport {\n\tInvalidInputError,\n\tUnexpectedError,\n} from '../helpers/ChordParsingError';\n\nimport checkIntervalsConsistency from './filters/checkIntervalsConsistency';\nimport formatSymbol from './filters/formatSymbol';\nimport formatSymbolParts from './filters/formatSymbolParts';\nimport getParsableDescriptor from './filters/getParsableDescriptor';\nimport initChord from './filters/initChord';\nimport nameIndividualChordNotes from './filters/nameIndividualChordNotes';\nimport normalizeNotes from './filters/normalizeNotes';\nimport normalizeDescriptor from './filters/normalizeDescriptor';\nimport parseBase from './filters/parseBase';\nimport parseDescriptor from './filters/parseDescriptor';\n\n/**\n * Create a chord parser function\n * @param {ParserConfiguration} [parserConfiguration]\n * @returns {function(String): Chord}\n */\nfunction chordParserFactory(parserConfiguration = {}) {\n\tconst allAltIntervals = ['b5', '#5', 'b9', '#9', '#11', 'b13'];\n\tconst allNotationSystems = ['english', 'german', 'latin'];\n\n\tconst {\n\t\tnotationSystems = _cloneDeep(allNotationSystems),\n\t\taltIntervals = _cloneDeep(allAltIntervals),\n\t\tcustomFilters = [],\n\t} = parserConfiguration;\n\n\tcheckAltIntervals(altIntervals, allAltIntervals);\n\tcheckNotationSystems(notationSystems, allNotationSystems);\n\tcheckCustomFilters(customFilters);\n\n\treturn parseChord;\n\n\t/**\n\t * Convert an input string into an abstract chord structure\n\t * @param {String} symbol - the chord symbol candidate\n\t * @returns {Chord|Object} A chord object if the given string is successfully parsed. An object with an `error` property otherwise.\n\t */\n\tfunction parseChord(symbol) {\n\t\tconst allErrors = [];\n\n\t\tif (!isInputValid(symbol)) {\n\t\t\tconst e = new InvalidInputError();\n\t\t\tallErrors.push(formatError(e));\n\t\t}\n\n\t\tconst allVariantsPerGroupCopy = _cloneDeep(allVariantsPerGroup).filter(\n\t\t\t(variantsGroup) => notationSystems.includes(variantsGroup.name)\n\t\t);\n\n\t\tlet chord;\n\t\tlet allFilters;\n\t\tlet variants;\n\n\t\tif (!allErrors.length) {\n\t\t\twhile (allVariantsPerGroupCopy.length && !chord) {\n\t\t\t\tvariants = allVariantsPerGroupCopy.shift();\n\n\t\t\t\tallFilters = [\n\t\t\t\t\tinitChord.bind(null, parserConfiguration),\n\t\t\t\t\tparseBase.bind(null, variants.notes),\n\t\t\t\t\tgetParsableDescriptor,\n\t\t\t\t\tparseDescriptor.bind(null, altIntervals),\n\t\t\t\t\tcheckIntervalsConsistency,\n\t\t\t\t\tnormalizeNotes,\n\t\t\t\t\tnormalizeDescriptor,\n\t\t\t\t\tformatSymbolParts,\n\t\t\t\t\tformatSymbol,\n\t\t\t\t\tnameIndividualChordNotes,\n\t\t\t\t\t...customFilters,\n\t\t\t\t];\n\n\t\t\t\ttry {\n\t\t\t\t\tchord = chain(allFilters, symbol);\n\t\t\t\t\tif (chord) {\n\t\t\t\t\t\tchord.input.notationSystem = variants.name;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tallErrors.push(getUnexpectedError(variants.name));\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {\n\t\t\t\t\tallErrors.push(formatError(e, variants.name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn chord ? chord : { error: allErrors };\n\t}\n}\n\nfunction checkAltIntervals(altIntervals, allAltIntervals) {\n\tcheckArray('altIntervals', altIntervals, allAltIntervals, true);\n}\n\nfunction checkNotationSystems(notationSystems, allNotationSystems) {\n\tcheckArray('notationSystems', notationSystems, allNotationSystems);\n}\n\nfunction checkArray(arrayName, arrayToTest, allowedValues, allowEmpty) {\n\tif (!Array.isArray(arrayToTest)) {\n\t\tthrow new TypeError(`'${arrayName}' should be an array`);\n\t}\n\tif (!allowEmpty && arrayToTest.length === 0) {\n\t\tthrow new TypeError(`'${arrayName}' cannot be empty`);\n\t}\n\tarrayToTest.forEach((system) => {\n\t\tif (!allowedValues.includes(system)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`'${system}' is not a valid value for ${arrayName}`\n\t\t\t);\n\t\t}\n\t});\n}\n\nfunction isInputValid(input) {\n\treturn typeof input === 'string' && input.length > 0;\n}\n\nfunction getUnexpectedError(notationSystem) {\n\tconst error = new UnexpectedError();\n\treturn formatError(error, notationSystem);\n}\n\nfunction formatError(exceptionError, notationSystem) {\n\treturn {\n\t\ttype: exceptionError.name,\n\t\tchord: exceptionError.chord,\n\t\tmessage: exceptionError.message,\n\t\tnotationSystem,\n\t};\n}\n\n/**\n * @module chordParserFactory\n * Expose the chordParserFactory() function\n */\nexport default chordParserFactory;\n", "import { hasExactly } from '../../helpers/hasElement';\n\nconst shortDescriptors = {\n\tsus2: 'sus2',\n\tadd2: '2',\n\tomit: 'no',\n\tma: 'M',\n\tmi: 'm',\n\tdim: '°',\n\taug7: '7+',\n\televenth: '11',\n};\n\n/**\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function shortenNormalized(chord) {\n\tlet descriptor;\n\tlet chordChanges = chord.formatted.chordChanges;\n\n\tif (isSus2(chord)) {\n\t\tdescriptor = shortDescriptors.sus2;\n\t\tchordChanges = [];\n\t} else if (isAdd2(chord)) {\n\t\tdescriptor = shortDescriptors.add2;\n\t\tchordChanges = [];\n\t} else if (isAug7(chord)) {\n\t\tdescriptor = shortDescriptors.aug7;\n\t\tchordChanges = [];\n\t} else {\n\t\tdescriptor = chord.formatted.descriptor\n\t\t\t.replace('mi', shortDescriptors.mi)\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('dim', shortDescriptors.dim);\n\n\t\tif (isEleventh(chord)) {\n\t\t\tdescriptor = descriptor.replace(\n\t\t\t\t/7sus|9sus/,\n\t\t\t\tshortDescriptors.eleventh\n\t\t\t);\n\t\t}\n\t}\n\n\tchordChanges = chordChanges.map((change) => {\n\t\treturn change\n\t\t\t.replace(/[m|M]a/, shortDescriptors.ma)\n\t\t\t.replace('omit', shortDescriptors.omit);\n\t});\n\n\treturn {\n\t\t...chord,\n\t\tformatted: {\n\t\t\t...chord.formatted,\n\t\t\tdescriptor,\n\t\t\tchordChanges,\n\t\t},\n\t};\n}\n\nfunction isSus2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '5', '9']);\n}\n\nfunction isAdd2(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '5', '9']);\n}\n\nfunction isAug7(chord) {\n\treturn hasExactly(chord.normalized.intervals, ['1', '3', '#5', 'b7']);\n}\n\nfunction isEleventh(chord) {\n\treturn chord.normalized.intents.eleventh;\n}\n", "import _difference from 'lodash/difference';\n\nimport chain from '../../helpers/chain';\n\nimport normalizeDescriptor from '../../parser/filters/normalizeDescriptor';\nimport formatSymbolParts from '../../parser/filters/formatSymbolParts';\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\nimport intervalsToSemitones from '../../dictionaries/intervalsToSemitones';\n\nimport { hasNoneOf } from '../../helpers/hasElement';\n\n/**\n * @param {Chord} chord\n * @param {('none'|'max'|'core')} level\n * @returns {Chord}\n */\nexport default function simplify(level = 'none', chord) {\n\tif (level === 'none') {\n\t\treturn chord;\n\t}\n\n\tconst intervalsToRemove = {\n\t\tmax: [\n\t\t\t'4',\n\t\t\t'b5',\n\t\t\t'#5',\n\t\t\t'6',\n\t\t\t'bb7',\n\t\t\t'b7',\n\t\t\t'7',\n\t\t\t'b9',\n\t\t\t'9',\n\t\t\t'#9',\n\t\t\t'11',\n\t\t\t'#11',\n\t\t\t'b13',\n\t\t\t'13',\n\t\t],\n\t\tcore: ['4', 'b9', '9', '#9', '11', '#11', 'b13', '13'],\n\t};\n\n\tconst intervals = _difference(\n\t\tchord.normalized.intervals,\n\t\tintervalsToRemove[level]\n\t);\n\n\tif (hasNoneOf(intervals, ['b3', '3'])) {\n\t\tintervals.push(chord.normalized.intents.major ? '3' : 'b3');\n\t}\n\n\tif (hasNoneOf(intervals, ['b5', '5', '#5'])) {\n\t\tintervals.push('5');\n\t}\n\n\tchord.normalized.intervals = intervals;\n\tchord.normalized.semitones = intervals.map(\n\t\t(interval) => intervalsToSemitones[interval]\n\t);\n\tchord.normalized.intents.eleventh = false;\n\tchord.normalized.intents.alt = false;\n\n\tif (level === 'max') {\n\t\tdelete chord.normalized.bassNote;\n\t}\n\n\tconst allFilters = [\n\t\tnormalizeDescriptor,\n\t\tformatSymbolParts,\n\t\tnameIndividualChordNotes,\n\t];\n\n\treturn chain(allFilters, chord);\n}\n", "import _invert from 'lodash/invert';\n\nimport nameIndividualChordNotes from '../../parser/filters/nameIndividualChordNotes';\n\nconst notes = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'];\n\nconst sharpsToFlats = {\n\t'C#': 'Db',\n\t'D#': 'Eb',\n\t'F#': 'Gb',\n\t'G#': 'Ab',\n\t'A#': 'Bb',\n};\n\nconst flatsToSharps = _invert(sharpsToFlats);\n\nexport default function transpose(transposeValue, useFlats, chord) {\n\tconst { rootNote, bassNote } = chord.normalized;\n\n\tconst rootSharp = convertToSharp(rootNote);\n\tchord.normalized.rootNote = transposeNote(\n\t\trootSharp,\n\t\ttransposeValue,\n\t\tuseFlats\n\t);\n\tchord.formatted.rootNote = chord.normalized.rootNote;\n\n\tif (bassNote) {\n\t\tconst bassSharp = convertToSharp(bassNote);\n\t\tchord.normalized.bassNote = transposeNote(\n\t\t\tbassSharp,\n\t\t\ttransposeValue,\n\t\t\tuseFlats\n\t\t);\n\t\tchord.formatted.bassNote = chord.normalized.bassNote;\n\t}\n\n\treturn nameIndividualChordNotes(chord);\n}\n\nfunction transposeNote(note, value, useFlats) {\n\tconst noteIndex = notes.indexOf(note);\n\tconst transposedIndex = noteIndex + value;\n\n\tconst octaves = Math.floor(transposedIndex / 12);\n\tconst correctedTransposedIndex = transposedIndex - octaves * 12;\n\n\tconst transposed = notes[correctedTransposedIndex];\n\n\treturn useFlats ? sharpsToFlats[transposed] || transposed : transposed;\n}\n\nfunction convertToSharp(note) {\n\treturn flatsToSharps[note] || note;\n}\n", "const translationTables = {\n\tgerman: {\n\t\tAb: 'As',\n\t\tA: 'A',\n\t\t'A#': 'Ais',\n\t\tBb: 'Hes',\n\t\tB: 'H',\n\t\tC: 'C',\n\t\t'C#': 'Cis',\n\t\tDb: 'Des',\n\t\tD: 'D',\n\t\t'D#': 'Dis',\n\t\tEb: 'Es',\n\t\tE: 'E',\n\t\tF: 'F',\n\t\t'F#': 'Fis',\n\t\tGb: 'Ges',\n\t\tG: 'G',\n\t\t'G#': 'Gis',\n\t},\n\tlatin: {\n\t\tAb: 'Lab',\n\t\tA: 'La',\n\t\t'A#': 'La#',\n\t\tBb: 'Sib',\n\t\tB: 'Si',\n\t\tC: 'Do',\n\t\t'C#': 'Do#',\n\t\tDb: 'Reb',\n\t\tD: 'Re',\n\t\t'D#': 'Re#',\n\t\tEb: 'Mib',\n\t\tE: 'Mi',\n\t\tF: 'Fa',\n\t\t'F#': 'Fa#',\n\t\tGb: 'Solb',\n\t\tG: 'Sol',\n\t\t'G#': 'Sol#',\n\t},\n};\nconst allNotationSystems = Object.keys(translationTables);\n\n/**\n * @param {('auto'|'english'|'german'|'latin')} notationSystem\n * @param {Chord} chord\n * @returns {Chord|Null}\n */\nexport default function convertNotationSystem(\n\tnotationSystem = 'english',\n\tchord\n) {\n\tconst finalNotationSystem =\n\t\tnotationSystem === 'auto' ? chord.input.notationSystem : notationSystem;\n\n\tif (finalNotationSystem === 'english') return chord;\n\tif (!allNotationSystems.includes(finalNotationSystem)) return null;\n\n\tchord.formatted.rootNote =\n\t\ttranslationTables[finalNotationSystem][chord.formatted.rootNote];\n\n\tif (chord.formatted.bassNote) {\n\t\tchord.formatted.bassNote =\n\t\t\ttranslationTables[finalNotationSystem][chord.formatted.bassNote];\n\t}\n\treturn chord;\n}\n", "/**\n * @param {Chord} chord\n * @returns {String}\n */\nexport default function textPrinter(chord) {\n\treturn chord && chord.formatted && chord.formatted.symbol\n\t\t? chord.formatted.symbol\n\t\t: null;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport textPrinter from './text';\nimport chordParserFactory from '../../parser/chordParserFactory';\n\n/**\n * This printer returns a `chord` object reflecting the applied rendering filters. This object is very close to what would\n * be obtained by re-parsing the rendered chord.\n * It is basically the `chord` object in its current state, with 2 differences:\n * - a re-built `input` property to include all the changes applied during rendering (transposition, simplification, etc.)\n * - a removed `notationSystems` parser configuration since it may not be relevant anymore, especially if the rendering changed the notation system\n *\n * @param {Chord} chord\n * @returns {Chord}\n */\nexport default function rawPrinter(chord) {\n\t// make sure the chord can be re-parsed, whichever notation system was used for the rendering\n\tdelete chord.parserConfiguration.notationSystems;\n\n\tconst cloned = _cloneDeep(chord);\n\n\t// Re-parse the rendered chord to get the 'input' property right\n\tconst textPrinted = textPrinter(chord);\n\tconst parseChord = chordParserFactory(chord.parserConfiguration);\n\tconst reParsed = parseChord(textPrinted);\n\tcloned.input = reParsed.input;\n\n\treturn cloned;\n}\n", "import _cloneDeep from 'lodash/cloneDeep';\n\nimport chain from '../helpers/chain';\nimport checkCustomFilters from '../helpers/checkCustomFilters';\n\nimport shortenNormalized from './filters/shortenNormalized';\nimport simplifyFilter from './filters/simplify';\nimport transpose from './filters/transpose';\nimport convertNotationSystem from './filters/convertNotationSystem';\nimport formatSymbol from '../parser/filters/formatSymbol';\nimport textPrinter from './printer/text';\nimport rawPrinter from './printer/raw';\n\n/**\n * Create a pre-configured chord rendering function\n * @param {RendererConfiguration} [rendererConfiguration]\n * @returns {function(Chord): String}\n */\nfunction chordRendererFactory({\n\tuseShortNamings = false,\n\tsimplify = 'none',\n\ttransposeValue = 0,\n\tharmonizeAccidentals = false,\n\tuseFlats = false,\n\tprinter = 'text',\n\tnotationSystem = 'english',\n\tcustomFilters = [],\n} = {}) {\n\tcheckCustomFilters(customFilters);\n\n\tconst allFilters = [];\n\n\tif (['max', 'core'].includes(simplify)) {\n\t\tallFilters.push(simplifyFilter.bind(null, simplify));\n\t}\n\n\tif (harmonizeAccidentals || transposeValue !== 0) {\n\t\tallFilters.push(transpose.bind(null, transposeValue, useFlats));\n\t}\n\n\tif (useShortNamings) {\n\t\tallFilters.push(shortenNormalized);\n\t}\n\n\tallFilters.push(\n\t\tconvertNotationSystem.bind(null, notationSystem),\n\t\tformatSymbol,\n\t\t...customFilters\n\t);\n\n\treturn renderChord;\n\n\t/**\n\t * Render a chord structure\n\t * @param {Chord} chord - the chord structure to render\n\t * @returns {String|Chord} output depends on the selected printer: string for text printer (default), Chord for raw printer\n\t */\n\tfunction renderChord(chord) {\n\t\tif (!isValidChord(chord)) {\n\t\t\treturn null;\n\t\t}\n\t\tconst filteredChord = chain(allFilters, _cloneDeep(chord));\n\n\t\treturn printer === 'raw'\n\t\t\t? rawPrinter(filteredChord)\n\t\t\t: textPrinter(filteredChord);\n\t}\n}\n\nconst isValidChord = (chord) => {\n\treturn chord && typeof chord === 'object' && !chord.error && chord.input;\n};\n\n/**\n * @module chordRendererFactory\n * Expose the chordRendererFactory() function\n **/\nexport default chordRendererFactory;\n", "import './typedefs';\n\nimport chordParserFactory from './parser/chordParserFactory';\nimport chordRendererFactory from './renderer/chordRendererFactory';\n\nexport { chordParserFactory, chordRendererFactory };\n", "import Promise from 'promise';\nimport { Playlist, Song, Cell, Chord } from './parser.js';\nimport { Converter, LogLevel } from './converter.js';\nimport { Version } from './version.js';\n\nexport function convertSync(ireal, options = {}) {\n const playlist = new Playlist(ireal);\n playlist.songs.forEach(song => {\n song.musicXml = Converter.convert(song, options);\n });\n return playlist;\n}\n\nexport async function convert(ireal, options = {}) {\n return new Promise(resolve => resolve(convertSync(ireal, options)));\n}\n\nexport { Playlist, Song, Cell, Chord, Converter, LogLevel, Version };\n", "/**\n * The iReal Pro parser is derived from\n * https://github.com/daumling/ireal-renderer\n * which is itself derived from\n * https://github.com/pianosnake/ireal-reader\n *\n * None of those modules did exactly what is needed here, namely return\n * a full structure that can be iterated downstream.\n */\n\nimport diff from 'fast-diff';\n\nexport class Playlist {\n constructor(ireal){\n const playlistEncoded = /.*?(irealb(?:ook)?):\\/\\/([^\"]*)/.exec(ireal);\n const playlist = decodeURIComponent(playlistEncoded[2]);\n const parts = playlist.split(\"===\"); //songs are separated by ===\n if (parts.length > 1) this.name = parts.pop(); //playlist name\n this.songs = parts\n .map(part => {\n try {\n return new Song(part, playlistEncoded[1] === 'irealbook');\n }\n catch (error) {\n const parts = part.split(\"=\");\n const title = Song.parseTitle(parts[0].trim());\n console.error(`[ireal-musicxml] [${title}] ${error}`);\n return null;\n }\n })\n .filter(song => song !== null)\n .reduce((songs, song) => {\n if (songs.length > 0) {\n // Detect multi-part songs via their titles.\n // The parts of the same song have the same title, except for the part number, so they follow each other in the list.\n // The `diff` module compares two titles and returns a list of similarities and differences.\n // We expect the first diff to be a similarity, followed by differences that are only numeric.\n // When we find a multi-part song, we just concatenate the cells into the first part.\n const diffs = diff(songs[songs.length-1].title, song.title);\n if (diffs[0][0] === 0 && diffs.every(d => d[0] === 0 || d[1].match(/^\\d+$/))) {\n songs[songs.length-1].cells = songs[songs.length-1].cells.concat(song.cells);\n return songs;\n }\n }\n songs.push(song);\n return songs;\n }, []);\n }\n}\n\nexport class Cell {\n constructor() {\n this.annots = [];\n this.comments = [];\n this.bars = \"\";\n this.spacer = 0;\n this.chord = null;\n }\n}\n\nexport class Chord {\n constructor(note, modifiers = \"\", over = null, alternate = null) {\n this.note = note;\n this.modifiers = modifiers;\n this.over = over;\n this.alternate = alternate;\n }\n}\n\nexport class Song {\n constructor(ireal, oldFormat = false) {\n this.cells = [];\n this.musicXml = \"\";\n if (!ireal) {\n this.title = \"\";\n this.composer = \"\";\n this.style = \"\";\n this.key = \"\";\n this.transpose = 0;\n this.groove = \"\";\n this.bpm = 0;\n this.repeats = 0;\n return;\n }\n const parts = ireal.split(\"=\"); //split on one sign, remove the blanks\n if (oldFormat) {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[2].trim();\n this.key = parts[3];\n this.cells = this.parse(parts[5]);\n }\n else {\n this.title = Song.parseTitle(parts[0].trim());\n this.composer = Song.parseComposer(parts[1].trim());\n this.style = parts[3].trim();\n this.key = parts[4];\n this.transpose = +parts[5] || 0; // TODO\n this.groove = parts[7];\n this.bpm = +parts[8];\n this.repeats = +parts[9] || 3;\n const music = parts[6].split(\"1r34LbKcu7\");\n this.cells = this.parse(unscramble(music[1]));\n }\n }\n\n /**\n * The RegExp for a complete chord. The match array contains:\n * 1 - the base note\n * 2 - the modifiers (+-ohd0123456789 and su for sus)\n * 3 - any comments (may be e.g. add, sub, or private stuff)\n * 4 - the \"over\" part starting with a slash\n * 5 - the top chord as (chord)\n * @type RegExp\n */\n static chordRegex = /^([A-G][b#]?)((?:sus|alt|add|[+\\-^\\dhob#])*)(\\*.+?\\*)*(\\/[A-G][#b]?)?(\\(.*?\\))?/;\n static chordRegex2 = /^([ Wp])()()(\\/[A-G][#b]?)?(\\(.*?\\))?/;\t// need the empty captures to match chordRegex\n\n static regExps = [\n /^\\*[a-zA-Z]/,\t\t\t\t\t\t\t// section\n /^T\\d\\d/,\t\t\t\t\t\t\t\t// time measurement\n /^N./,\t\t\t\t\t\t\t\t\t// repeat marker\n /^<.*?>/,\t\t\t\t\t\t\t\t// comments\n Song.chordRegex,\t\t\t\t// chords\n Song.chordRegex2,\t\t\t\t// space, W and p (with optional alt chord)\n ];\n\n /**\n * The parser cracks up the raw music string into several objects,\n * one for each cell. iReal Pro works with rows of 16 cell each. The result\n * is stored at song.cells.\n *\n * Each object has the following properties:\n *\n * chord: if non-null, a chord object with these properties:\n * note - the base note (also blank, W = invisible root, p/x/r - pause/bar repeat/double-bar repeat, n - no chord)\n * modifiers - the modifiers, like 7, + o etc (string)\n * over - if non-null, another chord object for the under-note\n * alternate - if non-null another chord object for the alternate chord\n * annots: annotations, a string of:\n * *x - section, like *v, *I, *A, *B etc\n * Nx - repeat bots (N1, N2 etc)\n * Q - coda\n * S - segno\n * Txx - measure (T44 = 4/4 etc, but T12 = 12/8)\n * U - END\n * f - fermata\n * l - (letter l) normal notes\n * s - small notes\n * comments: an array of comment strings\n * bars: bar specifiers, a string of:\n * | - single vertical bar, left\n * [ - double bar, left\n * ] - double bar, right\n * { - repeat bar, left\n * } - repeat bar, right\n * Z - end bar, right\n * spacer - a number indicating the number of vertical spacers above this cell\n *\n * @returns [Cell]\n */\n parse(ireal) {\n let text = ireal.trim();\n const arr = [];\n while (text) {\n let found = false;\n for (let i = 0; i < Song.regExps.length; i++) {\n const match = Song.regExps[i].exec(text);\n if (match) {\n found = true;\n if (match.length <= 2) {\n arr.push(match[0]);\n text = text.substr(match[0].length);\n }\n else {\n // a chord\n arr.push(match);\n text = text.substr(match[0].length);\n }\n break;\n }\n }\n if (!found) {\n // ignore the comma separator\n if (text[0] !== ',')\n arr.push(text[0]);\n text = text.substr(1);\n }\n }\n\n // pass 2: extract prefixes, suffixes, annotations and comments\n const cells = [];\n let obj = this.newCell(cells);\n let prevobj = null;\n for (let i = 0; i < arr.length; i++) {\n let cell = arr[i];\n if (cell instanceof Array) {\n obj.chord = this.parseChord(cell);\n cell = \" \";\n }\n switch (cell[0]) {\n case '{':\t// open repeat\n case '[':\t// open double bar\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = cell; cell = null; break;\n case '|':\t// single bar - close previous and open this\n if (prevobj) { prevobj.bars += ')'; prevobj = null; }\n obj.bars = '('; cell = null; break;\n case ']':\t// close double bar\n case '}':\t// close repeat\n case 'Z':\t// ending double bar\n if (prevobj) { prevobj.bars += cell; prevobj = null; }\n cell = null; break;\n case 'n':\t// N.C.\n obj.chord = new Chord(cell[0]);\n break;\n case ',':\tcell = null; break; // separator\n case 'S':\t// segno\n case 'T':\t// time measurement\n case 'Q':\t// coda\n case 'N':\t// repeat\n case 'U':\t// END\n case 's':\t// small\n case 'l':\t// normal\n case 'f':\t// fermata\n case '*': obj.annots.push(cell); cell = null; break;\n case 'Y': obj.spacer++; cell = null; prevobj = null; break;\n case 'r':\n case 'x':\n case 'W':\n obj.chord = new Chord(cell);\n break;\n case '<':\n cell = cell.substr(1, cell.length-2);\n obj.comments.push(cell);\n cell = null; break;\n default:\n }\n if (cell && i < arr.length-1) {\n prevobj = obj;\t\t// so we can add any closing barline later\n obj = this.newCell(cells);\n }\n }\n return cells;\n }\n\n /**\n * The title had \"A\" and \"The\" at the back (e.g. \"Gentle Rain, The\")\n */\n static parseTitle(title) {\n return title.replace(/(.*)(, )(A|The)$/g, '$3 $1');\n }\n\n /**\n * The composer is reversed (last first) if it only has 2 names :shrug:\n */\n static parseComposer(composer) {\n const parts = composer.split(/(\\s+)/); // match and return spaces too\n if (parts.length == 3) { // [last, spaces, first]\n return parts[2] + parts[1] + parts[0];\n }\n return composer;\n }\n\n parseChord(chord) {\n var note = chord[1] || \" \";\n var modifiers = chord[2] || \"\";\n var comment = chord[3] || \"\";\n if (comment)\n modifiers += comment.substr(1, comment.length-2);\n var over = chord[4] || \"\";\n if (over[0] === '/')\n over = over.substr(1);\n var alternate = chord[5] || null;\n if (alternate) {\n chord = Song.chordRegex.exec(alternate.substr(1, alternate.length-2));\n if (!chord)\n alternate = null;\n else\n alternate = this.parseChord(chord);\n }\n // empty cell?\n if (note === \" \" && !alternate && !over)\n return null;\n if (over) {\n var offset = (over[1] === '#' || over[1] === 'b') ? 2 : 1;\n over = new Chord(over.substr(0, offset), over.substr(offset), null, null);\n }\n else\n over = null;\n return new Chord(note, modifiers, over, alternate);\n }\n\n newCell(cells) {\n var obj = new Cell;\n cells.push(obj);\n return obj;\n }\n}\n\n// Unscrambling hints from https://github.com/ironss/accompaniser/blob/master/irealb_parser.lua\n// Strings are broken up in 50 character segments. each segment undergoes character substitution addressed by obfusc50()\n// Note that a final part of length 50 or 51 is not scrambled.\n// Finally need to substitute for Kcl, LZ and XyQ.\nfunction unscramble(s) {\n let r = '', p;\n\n while (s.length > 51){\n p = s.substring(0, 50);\n s = s.substring(50);\n r = r + obfusc50(p);\n }\n r = r + s;\n // now undo substitution obfuscation\n r = r.replace(/Kcl/g, '| x').replace(/LZ/g, ' |').replace(/XyQ/g, ' ');\n return r;\n}\n\nfunction obfusc50(s) {\n // the first 5 characters are switched with the last 5\n const newString = s.split('');\n for (let i = 0; i < 5; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n // characters 10-24 are also switched\n for (let i = 10; i < 24; i++){\n newString[49 - i] = s[i];\n newString[i] = s[49 - i];\n }\n return newString.join('');\n}\n", "import jstoxml from 'jstoxml';\nimport ChordSymbol from 'chord-symbol';\nconst { chordParserFactory, chordRendererFactory } = ChordSymbol;\nimport { Version } from './version.js';\n\nexport class LogLevel {\n static Debug = 0;\n static Info = 1;\n static Warn = 2;\n static Error = 3;\n static None = 4;\n}\n\nconst MUSICXML_VERSION = '4.0';\nconst SCALING_MM = 7;\nconst SCALING_TENTHS = 40;\n\nexport class Converter {\n static defaultOptions = {\n 'divisions': 768, // same as used by iReal\n 'notation': 'rhythmic', // 'rhythmic' for rhythmic notation, 'slash' for slash notation\n 'step': 'B', // chord note\n 'octave': 4, // chord note octave\n 'notehead': 'slash', // chord note head\n 'noteheadSize': 'large', // size of chord note head\n 'date': true, // include encoding date\n 'clef': false, // hide clef by default\n 'keySignature': false, // hide key signature by default\n 'pageWidth': 210, // mm (A4)\n 'pageHeight': 297, // mm (A4)\n 'pageMargin': 15, // mm\n 'logLevel': LogLevel.Warn\n };\n\n static sequenceAttributes = [\n // Expected order of attribute elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/attributes/\n 'divisions',\n 'key',\n 'time',\n 'staves',\n 'part-symbol',\n 'instruments',\n 'clef',\n 'staff-details',\n 'transpose',\n 'directive',\n 'measure-style'\n ];\n\n static sequenceNote = [\n // Expected order of note elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/note/\n 'cue',\n 'pitch',\n 'rest',\n 'unpitched',\n 'duration',\n 'tie',\n 'voice',\n 'type',\n 'dot',\n 'accidental',\n 'time-modification',\n 'stem',\n 'notehead',\n 'notehead-text',\n 'staff',\n 'beam',\n 'notations',\n 'lyric',\n 'play'\n ];\n\n static sequenceNotations = [\n // Expected order of notations elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/notations/\n 'accidental-mark',\n 'arpeggiate',\n 'articulations',\n 'dynamics',\n 'fermata',\n 'glissando',\n 'non-arpeggiate',\n 'ornaments',\n 'other-notation',\n 'slide',\n 'slur',\n 'technical',\n 'tied',\n 'tuplet'\n ];\n\n static sequenceBarline = [\n // Expected order of barline elements.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/barline/\n 'bar-style',\n 'footnote',\n 'level',\n 'wavy-line',\n 'segno',\n 'coda',\n 'fermata',\n 'ending',\n 'repeat'\n ];\n\n static mapAlter = {\n '#': 1,\n 'b': -1\n };\n\n static mapFifthsToAlters = {\n 'sharp': ['F', 'C', 'G', 'D', 'A', 'E', 'B'],\n 'flat': ['B', 'E', 'A', 'D', 'G', 'C', 'F']\n };\n\n static mapRepeats = {\n \"D.C. al Coda\": Converter.prototype.convertDaCapo,\n \"D.C. al Fine\": Converter.prototype.convertDaCapo,\n \"D.C. al 1st End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 2nd End.\": Converter.prototype.convertDaCapo,\n \"D.C. al 3rd End.\": Converter.prototype.convertDaCapo,\n \"D.S. al Coda\": Converter.prototype.convertDalSegno,\n \"D.S. al Fine\": Converter.prototype.convertDalSegno,\n \"D.S. al 1st End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 2nd End.\": Converter.prototype.convertDalSegno,\n \"D.S. al 3rd End.\": Converter.prototype.convertDalSegno,\n \"Fine\": Converter.prototype.convertFine,\n \"3x\": Converter.prototype.convertRepeatNx,\n \"4x\": Converter.prototype.convertRepeatNx,\n \"5x\": Converter.prototype.convertRepeatNx,\n \"6x\": Converter.prototype.convertRepeatNx,\n \"7x\": Converter.prototype.convertRepeatNx,\n \"8x\": Converter.prototype.convertRepeatNx\n };\n\n static convert(song, options = {}) {\n const realOptions = Object.assign({}, this.defaultOptions, options);\n return new Converter(song, realOptions).convert();\n }\n\n constructor(song, options) {\n this.song = song;\n this.options = options;\n this.time = { beats: 4, beatType: 4 };\n this.fifths = null; // key signature's degree of fifths\n this.measure = null; // current measure (of class Measure) being built\n this.barRepeat = 0; // current bar number for single- and double-bar repeats\n this.codas = []; // list of measures containing codas\n this.repeats = 0; // repeat count for closing repeat barline\n this.emptyCells = 0; // consecutive empty cells\n this.emptyCellNewSystem = false; // did a new system occur in an empty cell?\n\n // In iRP, there are 16 cells per line.\n // The width in mm of a single cell depends on the page width and the margins.\n this.cellWidth = (this.options.pageWidth - (2 * this.options.pageMargin)) / 16;\n\n // chord-symbol.\n this.parseChord = chordParserFactory({ \"altIntervals\": [\n \"b5\",\n \"b9\"\n ]});\n this.renderChord = chordRendererFactory({\n useShortNamings: true,\n printer: 'raw'\n });\n }\n\n convert() {\n return jstoxml.toXML(this.convertSong(), {\n header: `\n\n\n `.trim(),\n indent: ' '\n });\n }\n\n convertSong() {\n return {\n _name: 'score-partwise',\n _attrs: { 'version': MUSICXML_VERSION },\n _content: [{\n 'work': {\n 'work-title': this.song.title\n }\n }, {\n 'identification': [{\n _name: 'creator',\n _attrs: { 'type': 'composer' },\n _content: this.song.composer\n }, {\n 'encoding': [{\n 'software': `@infojunkie/ireal-musicxml ${Version.version}`\n }, { ...(this.options.date && {\n 'encoding-date': Converter.convertDate(new Date())\n })}, {\n _name: 'supports',\n _attrs: { 'element': 'accidental', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'element': 'transpose', 'type': 'no' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-page', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }, {\n _name: 'supports',\n _attrs: { 'attribute': 'new-system', 'element': 'print', 'type': 'yes', 'value': 'yes' }\n }]\n }]\n }, {\n 'defaults': {\n 'scaling': {\n 'millimeters': SCALING_MM,\n 'tenths': SCALING_TENTHS\n },\n 'page-layout': {\n 'page-height': Converter._mmToTenths(this.options.pageHeight),\n 'page-width': Converter._mmToTenths(this.options.pageWidth),\n 'page-margins': {\n 'left-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'right-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'top-margin': Converter._mmToTenths(this.options.pageMargin, 4),\n 'bottom-margin': Converter._mmToTenths(this.options.pageMargin, 4)\n }\n }\n }\n }, {\n 'part-list': {\n _name: 'score-part',\n _attrs: { 'id': 'P1' },\n _content: {\n _name: 'part-name',\n _attrs: { 'print-object': 'no' },\n _content: 'Lead Sheet'\n }\n }\n }, {\n _name: 'part',\n _attrs: { 'id': 'P1' },\n _content: this.convertMeasures()\n }]\n };\n }\n\n // Date in yyyy-mm-dd\n // https://stackoverflow.com/a/50130338/209184\n static convertDate(date) {\n return new Date(date.getTime() - (date.getTimezoneOffset() * 60000))\n .toISOString()\n .split('T')[0];\n }\n\n static Measure = class {\n constructor(number) {\n this.body = {\n _name: 'measure',\n _attrs: { 'number': number },\n _content: []\n };\n this.attributes = [];\n this.chords = [];\n this.barlines = [];\n this.barEnding = null;\n }\n\n number() {\n return this.body['_attrs']['number'];\n }\n\n assemble() {\n // Attributes.\n if (this.attributes.length) {\n this.body['_content'].push({\n 'attributes': Converter.reorderSequence(this, this.attributes, Converter.sequenceAttributes)\n });\n }\n\n // Chords.\n this.chords.forEach(chord => {\n this.body['_content'].push({\n 'harmony': chord.harmony\n }, ...chord.notes.map(note => {\n return {\n 'note': note\n };\n }));\n });\n\n // Barlines.\n this.barlines[0]['_content'] = Converter.reorderSequence(this, this.barlines[0]['_content'], Converter.sequenceBarline);\n this.body['_content'].splice(1, 0, this.barlines[0]);\n this.barlines[1]['_content'] = Converter.reorderSequence(this, this.barlines[1]['_content'], Converter.sequenceBarline);\n this.body['_content'].push(this.barlines[1]);\n\n return this.body;\n }\n };\n\n static Chord = class {\n constructor(harmony, notes, ireal) {\n this.harmony = harmony;\n this.notes = notes;\n this.ireal = ireal;\n this.spaces = 0;\n this.fermata = false;\n }\n };\n\n convertMeasures() {\n // Are we starting a new system given the current cell index?\n const isNewSystem = cellIndex => cellIndex > 0 && cellIndex % 16 === 0;\n\n // Loop on cells.\n const measures = this.song.cells.reduce((measures, cell, cellIndex) => {\n // Start a new measure if needed.\n // This means either finding an opening barline or finding non-empty cells while we're not in any measure.\n if (cell.bars.match(/\\(|\\{|\\[/) || (!this.measure && (cell.chord || cell.annots.length || cell.comments.length))) {\n if (this.measure) {\n this._log(LogLevel.Warn, `Starting a new measure over existing measure. Closing current measure first.`);\n this.measure.barlines.push(this.convertBarline('', 'right'));\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n }\n this.measure = new Converter.Measure(measures.length+1, this.options);\n\n // Very first bar: add defaults.\n if (!measures.length) {\n this.measure.attributes.push({\n 'divisions': this.options.divisions\n }, {\n _name: 'clef',\n _attrs: [{ 'print-object': this.options.clef ? 'yes' : 'no' }],\n _content: [{\n 'sign': 'G'\n }, {\n 'line': 2\n }]\n }, {\n 'staff-details': {\n 'staff-lines': 0\n }\n }, {\n 'measure-style': [{\n _name: 'slash',\n _attrs: { 'type': 'start', 'use-stems': this.options.notation === 'rhythmic' ? 'yes' : 'no' }\n }]\n }, this.convertKey());\n\n // Add bpm if any.\n if (this.song.bpm) {\n this.measure.body['_content'].push(this.convertTempo(this.song.bpm));\n }\n\n // Add style and groove.\n this.measure.body['_content'].push(this.convertStyleAndGroove(this.song.style, this.song.groove));\n }\n\n // Add starting barline.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'left'));\n\n // If we're still repeating bars, copy the previous bar now.\n if (this.barRepeat) {\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat-1].chords];\n }\n }\n\n // Short-circuit loop if no measure exists.\n // It can happen that `measure` is still blank in case of empty cells in iReal layout.\n // e.g. Girl From Ipanema in tests.\n if (!this.measure) {\n if (cell.chord || cell.annots.length || cell.comments.length || (cell.bars && cell.bars !== ')')) {\n this._log(LogLevel.Warn, `Found non-empty orphan cell ${JSON.stringify(cell)}`, measures[measures.length-1]);\n }\n\n // This is an empty cell between measures.\n // Count the consecutive empty cells because they will be converted to margins.\n // Also remember that a new system has occurred.\n this.emptyCells++;\n if (isNewSystem(cellIndex)) {\n this.emptyCellNewSystem = true;\n }\n\n return measures;\n }\n\n // Start a new system every 16 cells.\n if (isNewSystem(cellIndex) || this.emptyCellNewSystem) {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _attrs: { 'new-system': 'yes' },\n _content: { ...(this.emptyCellNewSystem && {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }, {\n 'right-margin': '0.00'\n }]\n }\n })}\n });\n }\n\n // If we accumulated empty cells but not at the start of the current system, then we adjust other distances.\n // There are 2 cases to handle:\n // - We're now in a fresh system: Add a right-margin to the previous measure.\n // - We're in the middle of a system: Add a measure-distance to the current measure.\n if (!this.emptyCellNewSystem && this.emptyCells > 0) {\n if (this.measure.body['_content'][0]?.['_name'] === 'print' && this.measure.body['_content'][0]['_attrs']?.['new-system'] === 'yes') {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }]\n }\n }\n });\n }\n else {\n this.measure.body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'measure-layout': {\n 'measure-distance': Converter._mmToTenths(this.cellWidth * this.emptyCells)\n }\n }\n });\n }\n }\n\n // Reset the empty cells.\n this.emptyCellNewSystem = false;\n this.emptyCells = 0;\n\n // Chords.\n if (cell.chord) {\n switch (cell.chord.note) {\n case 'x': {\n // Handle single bar repeat.\n this.barRepeat = 1;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'r': {\n // Handle double bar repeat.\n // We do this in 2 stages, because a blank measure occurs after 'r' (to keep the measure count correct)\n // Here, we copy the next-to-last measure and set the repeat flag.\n // The next opening measure will pick up the remaining measure.\n this.barRepeat = 2;\n // TODO We should probably deep-copy those measures.\n this.measure.chords = [...measures[measures.length-this.barRepeat].chords];\n break;\n }\n case 'p':\n // If slash does not occur as first chord, count it as a space.\n // Otherwise, handle it as 'W'.\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n break;\n }\n // Fall into case 'W'.\n\n case 'W': {\n // Handle invisible root by copying previous chord.\n let target = this.measure;\n if (!target.chords.length) {\n target = measures.slice().reverse().find(m => m.chords.length);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find any measure with chords prior to ${JSON.stringify(cell.chord)}`);\n }\n }\n if (target) {\n const chord = target.chords[target.chords.length-1].ireal;\n chord.over = cell.chord.over;\n chord.alternate = cell.chord.alternate;\n this.measure.chords.push(this.convertChord(chord));\n }\n break;\n }\n case ' ': {\n // TODO Handle alternate chord only.\n this._log(LogLevel.Warn, `Unhandled empty/alternate chord ${JSON.stringify(cell.chord)}`);\n break;\n }\n default: {\n // Process new chord.\n this.measure.chords.push(this.convertChord(cell.chord));\n }\n }\n }\n else if (!this.barRepeat) {\n // There are 16 cells per row, regardless of time signature.\n // Barlines can occur anywhere and the iReal Pro player uses an unknown algorithm\n // to schedule the chords within a measure, using the empty cells as \"hints\" for scheduling.\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=chord-spacing-in-the-editor\n // https://technimo.helpshift.com/a/ireal-pro/?s=editor&f=how-do-i-fit-more-than-48-measures-into-one-chart\n //\n // Our approach to emulate the iReal Pro player is as follows:\n // 1. Whenever we find an empty cell, attach it to the previous chord (or discard it if there's no previous chord)\n // 2. At the end of the measure, adjust the chord durations based on existing empty cells across the measure\n if (this.measure.chords.length) {\n this.measure.chords[this.measure.chords.length-1].spaces++;\n }\n }\n\n // Other attributes.\n cell.annots.forEach(annot => {\n switch(annot[0]) {\n case '*': { // section\n const section = annot.slice(1);\n this.measure.body['_content'].push(this.convertSection(section));\n break;\n }\n case 'T': { // time\n const time = annot.slice(1);\n this.measure.attributes.push(this.convertTime(time));\n break;\n }\n case 'S': { // segno\n this.measure.body['_content'].push(this.convertSegno());\n break;\n }\n case 'N': { // ending\n // TODO This assumes a single ending at a time.\n let ending = parseInt(annot.slice(1));\n if (ending < 1) {\n // It can happen that the ending number comes as 0 from iRP.\n // In this case, we do a best effort of finding the previous ending and incrementing it.\n const target = measures.slice().reverse().find(m => !!m.barEnding);\n ending = target?.barEnding ?? 0 + 1;\n }\n this.measure.barlines[0]['_content'].push(this.convertEnding(ending, 'start'));\n // End the previous ending at the previous measure's right barline.\n // Also, remove the 'discontinue' ending from its starting measure since we found an end to it.\n if (ending > 1) {\n measures[measures.length-1].barlines[1]['_content'].push(this.convertEnding(ending-1, 'stop'));\n const target = measures.slice().reverse().find(m => m.barEnding === ending-1);\n if (!target) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline of any measure`);\n }\n else {\n // The last result is the good one: remove the 'discontinue' ending.\n const index = target.barlines[1]['_content'].findIndex(b => !!b && b['_name'] === 'ending');\n if (index === -1) {\n this._log(LogLevel.Error, `Cannot find ending ${ending-1} in right barline`, target);\n }\n delete target.barlines[1]['_content'][index];\n }\n }\n // We will add a 'discontinue' ending at this measure's right barline.\n this.measure.barEnding = ending;\n break;\n }\n case 'Q': { // coda\n // We add all codas as \"tocoda\" because we expect the last one to be the actual coda.\n // After all measures have been built, adjust the last coda.\n // https://irealpro.com/how-the-coda-symbol-works-in-ireal-pro/\n this.measure.body['_content'].push(this.convertToCoda());\n this.codas.push(this.measure);\n break;\n }\n\n // Ignore small and large chord renderings.\n case 'l':\n case 's': break;\n\n case 'f': { // Fermata\n this.measure.chords[this.measure.chords.length-1].fermata = true;\n break;\n }\n\n case 'U': { // END, treated as Fine.\n this.measure.body['_content'].push(this.convertFine('END'));\n break;\n }\n\n default: this._log(LogLevel.Warn, `Unhandled annotation \"${annot}\"`);\n }\n });\n\n // Comments and repeats.\n // TODO Handle measure offset.\n // https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/offset/\n cell.comments.map(c => c.trim()).forEach(comment => {\n const repeatFn = this._map(Converter.mapRepeats, comment);\n if (repeatFn) {\n this.measure.body['_content'].push(repeatFn.call(this, comment));\n } else {\n this.measure.body['_content'].push(this.convertComment(comment));\n }\n });\n\n // Close and insert the measure if needed.\n // Ignore measures without any chords, they're probably empty spaces.\n if (cell.bars.match(/\\)|\\}|\\]|Z/) && this.measure.chords.length) {\n // Add closing barline and ending if needed.\n this.measure.barlines.push(this.convertBarline(cell.bars, 'right'));\n if (this.measure.barEnding) {\n // In case of numbered repeats, end measure an open repeat by default \u250C\u2500\u2500\u2500\u2500\u2500\u2500\n // \u2502 2.\n // It may be replaced later by a closing repeat \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n // \u2502 2. \u2502\n this.measure.barlines[1]['_content'].push(this.convertEnding(this.measure.barEnding, 'discontinue'));\n }\n\n // Close out the measure.\n if (this.adjustChordsDuration(this.measure)) {\n measures.push(this.measure);\n }\n this.measure = null;\n if (this.barRepeat) this.barRepeat--;\n }\n\n return measures;\n }, []);\n\n // Adjust final right margin if needed.\n const remainingCells = this.song.cells.length % 16 - this.emptyCells;\n if (remainingCells > 0 && measures.length > 0) {\n measures[measures.length-1].body['_content'].splice(0, 0, {\n _name: 'print',\n _content: {\n 'system-layout': {\n 'system-margins': [{\n 'left-margin': '0.00'\n }, {\n 'right-margin': Converter._mmToTenths(this.cellWidth * remainingCells)\n }]\n }\n }\n });\n }\n\n // Adjust last coda if any.\n if (this.codas.length) {\n const target = this.codas[this.codas.length-1];\n const direction = target.body['_content'].findIndex(d =>\n d['_name'] === 'direction' &&\n Array.isArray(d['_content']) &&\n d['_content'].some(s =>\n s['_name'] === 'sound' &&\n Object.keys(s['_attrs']).includes('tocoda')\n )\n );\n if (direction === -1) {\n this._log(LogLevel.Warn, `Cannot find sound direction`, target);\n }\n target.body['_content'][direction] = this.convertCoda();\n }\n\n // `Measure.assemble()` puts all the parts in `Measure.body`.\n return measures.map(measure => measure.assemble());\n }\n\n // Fix order of elements according to sequence as specified by an xs:sequence.\n // @param {array} elements - Array of elements to sort.\n // @param {array} sequence - Array of element names in order of xs:sequence.\n // @return {array} Ordered array of elements.\n static reorderSequence(measure, elements, sequence) {\n return elements.filter(a => Object.keys(a).length).sort((a1, a2) => {\n let k1 = Object.keys(a1)[0]; if (k1 === '_name') k1 = a1[k1];\n let k2 = Object.keys(a2)[0]; if (k2 === '_name') k2 = a2[k2];\n // TODO indexOf() needs to search every time. Make it faster with memoize?\n const i1 = sequence.indexOf(k1);\n const i2 = sequence.indexOf(k2);\n if (i1 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k1}\"`, measure);\n }\n if (i2 === -1) {\n this._log(LogLevel.Warn, `Unrecognized element \"${k2}\"`, measure);\n }\n return i1 - i2;\n });\n }\n\n convertRepeatNx(comment) {\n let repeats = null;\n if (null !== (repeats = comment.match(/(\\d+)x/))) {\n this.repeats = repeats[1];\n }\n }\n\n convertFine(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'fine': 'yes' }\n }]\n };\n }\n\n convertDaCapo(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dacapo': 'yes' }\n }]\n };\n }\n\n convertDalSegno(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'below' },\n _content: [{\n 'direction-type': {\n 'words': comment\n }\n }, {\n _name: 'sound',\n _attrs: { 'dalsegno': 'yes' }\n }]\n };\n }\n\n convertComment(comment) {\n return {\n _name: 'direction',\n _attrs: { 'placement': comment[0] === '*' ? 'above' : 'below' },\n _content: {\n 'direction-type': {\n 'words': comment[0] === '*' ? comment.slice(3) : comment\n }\n }\n };\n }\n\n convertEnding(ending, type) {\n // TODO This assumes a single ending.\n return {\n _name: 'ending',\n _attrs: { 'number': ending, 'type': type },\n _content: `${ending}.`\n };\n }\n\n convertBarline(bars, location) {\n let style = 'regular';\n let repeat = null;\n if (bars.match(/\\[|\\]/)) {\n style = 'light-light';\n }\n else if (bars.match(/Z/)) {\n style = 'light-heavy';\n }\n else if (bars.match(/\\{|\\}/)) {\n style = location === 'left' ? 'heavy-light' : 'light-heavy';\n repeat = location === 'left' ? 'forward' : 'backward';\n }\n\n // Set the current repeat count to 2, which may be changed later if we find a repeat annotation.\n if (repeat === 'forward') {\n this.repeats = 2;\n }\n\n return {\n _name: 'barline',\n _attrs: { 'location': location },\n _content: [{\n 'bar-style': style\n }, { ...(repeat && {\n _name: 'repeat',\n _attrs: { 'direction': repeat, ...(repeat === 'backward' && { 'times': this.repeats }) }\n })}]\n };\n }\n\n convertSection(section) {\n if (section === 'i') section = 'Intro';\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: {\n 'direction-type': {\n 'rehearsal': section\n }\n }\n };\n }\n\n convertSegno() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n _name: 'segno'\n }\n }, {\n _name: 'sound',\n _attrs: { 'segno': 'segno' }\n }]\n };\n }\n\n convertCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n '_name': 'coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'coda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertToCoda() {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': {\n 'words': 'To Coda'\n }\n }, {\n _name: 'sound',\n _attrs: { 'tocoda': 'coda' } // TODO: We assume a single coda\n }]\n };\n }\n\n convertTempo(bpm) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n _name: 'metronome',\n _attrs: { 'parentheses': 'no' },\n _content: [{\n 'beat-unit': this.calculateChordDuration(1)[0].type\n }, {\n 'per-minute': bpm\n }]\n }]\n }, {\n _name: 'sound',\n _attrs: { 'tempo': bpm }\n }]\n };\n }\n\n convertTime(time) {\n let beats = parseInt(time[0]);\n let beatType = parseInt(time[1]);\n if (time === '12') {\n beats = 12;\n beatType = 8;\n }\n this.time = { beats, beatType };\n return {\n 'time': [{\n 'beats': beats\n }, {\n 'beat-type': beatType\n }]\n };\n }\n\n adjustChordsDuration(measure) {\n // Now that the measure is closed, we can adjust the chord durations, taking empty cells into consideration.\n // https://www.irealb.com/forums/showthread.php?25161-Using-empty-cells-to-control-chord-duration\n //\n // Rules:\n // - Minimum chord duration is 1 beat\n // => Each chord starts as 1 beat\n // => Count of chords <= beats per measure\n // - Starting empty cells are discarded (already discarded during the cell loop)\n // - Each remaining empty cell counts as 1 beat (already counted during cell loop)\n // - Empty cell beats are added to their preceding chords (already added during the cell loop)\n // => Total chord durations <= beats per measure\n // - Remaining beats are distributed evenly among chords from first to last\n //\n if (measure.chords.length > this.time.beats) {\n this._log(LogLevel.Error, `Too many chords (${measure.chords.length} out of ${this.time.beats})`, measure);\n return true;\n }\n let beats = measure.chords.reduce((beats, chord) => beats+1+chord.spaces, 0);\n if (!beats) {\n this._log(LogLevel.Warn, `No chord found. Skipping current measure.`, measure);\n return false;\n }\n if (beats > this.time.beats) {\n // Reduce spaces.\n // We're guaranteed to end this loop because measure.chords.length <= this.time.beats\n let chordIndex = 0;\n while (beats > this.time.beats) {\n if (measure.chords[chordIndex].spaces > 0) {\n measure.chords[chordIndex].spaces--;\n beats--;\n }\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n else {\n // Distribute free beats among the chords.\n let chordIndex = 0;\n while (beats < this.time.beats) {\n measure.chords[chordIndex].spaces++;\n beats++;\n chordIndex = (chordIndex + 1) % measure.chords.length;\n }\n }\n\n // Adjust actual chord durations.\n measure.chords = measure.chords.map(chord => {\n chord.notes = this.calculateChordDuration(1+chord.spaces).map((duration, i, ds) =>\n this.convertChordNote(\n duration,\n i === ds.length - 1 ? chord.fermata : false, // Possible fermata on last chord note only\n this.options.notation === 'rhythmic' && ds.length > 1 ? (i > 0 ? 'stop' : 'start') : null // Possible tie in case of rhythmic notation\n )\n );\n return chord;\n });\n\n return true;\n }\n\n calculateChordDuration(beats) {\n // Lowest beat resolution is eighth-note (8).\n const mapDuration = {\n '1': [{ t: 'eighth', d: 0, b: 1 }],\n '2': [{ t: 'quarter', d: 0, b: 2 }],\n '3': [{ t: 'quarter', d: 1, b: 3 }],\n '4': [{ t: 'half', d: 0, b: 4 }],\n '5': [{ t: 'quarter', d: 1, b: 3 }, { t: 'quarter', d: 0, b: 2 }],\n '6': [{ t: 'half', d: 1, b: 6 }],\n '7': [{ t: 'half', d: 2, b: 7 }],\n '8': [{ t: 'whole', d: 0, b: 8 }],\n '9': [{ t: 'half', d: 1, b: 6 }, { t: 'quarter', d: 1, b: 3 }],\n '10': [{ t: 'half', d: 1, b: 6 }, { t: 'half', d: 0, b: 4 }],\n '11': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 0, b: 4 }],\n '12': [{ t: 'whole', d: 1, b: 12 }],\n '13': [{ t: 'half', d: 2, b: 7 }, { t: 'half', d: 1, b: 6 }],\n '14': [{ t: 'whole', d: 2, b: 14 }],\n '15': [{ t: 'whole', d: 0, b: 8 }, { t: 'half', d: 2, b: 7 }],\n };\n\n if (this.options.notation === 'slash') {\n // In case of slash notation, return an array of n=beats elements, each with a duration of 1 beat.\n const index = 1 * 8 / this.time.beatType;\n return Array(beats).fill(this\n ._map(mapDuration, index, [], `Unexpected beat count 1 for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n })[0] // We're sure to get only one entry in this case.\n );\n }\n else {\n // In case of rhythmic notation, return a single note (or 2 tied notes) corresponding to the desired beat count.\n const index = beats * 8 / this.time.beatType;\n return this\n ._map(mapDuration, index, [], `Unexpected beat count ${beats} for time signature ${this.time.beats}/${this.time.beatType}`)\n .map(duration => {\n return {\n duration: duration.b * this.options.divisions / 2,\n type: duration.t,\n dots: duration.d\n };\n });\n }\n }\n\n convertChordNote(duration, fermata = false, tie = null) {\n const altered = Converter.mapFifthsToAlters[this.fifths >= 0 ? 'sharp' : 'flat'].slice(0, Math.abs(this.fifths));\n const noteType = {\n _name: 'pitch',\n _content: [{\n 'step': this.options.step\n }, {\n 'alter': altered.includes(this.options.step) ? (this.fifths > 0 ? 1 : -1) : 0\n }, {\n 'octave': this.options.octave\n }]\n };\n\n const notations = [];\n if (fermata) {\n notations.push({ _name: 'fermata' });\n }\n if (tie) {\n notations.push({ _name: 'tied', _attrs: { 'type': tie } });\n }\n\n return Converter.reorderSequence(this.measure, [noteType, {\n _name: 'cue'\n }, {\n _name: 'notehead',\n _content: this.options.notehead,\n _attrs: [{ 'font-size': this.options.noteheadSize }]\n }, {\n 'duration': duration.duration\n }, {\n 'voice': 1,\n }, {\n _name: 'type',\n _attrs: { 'size': 'full' },\n _content: duration.type\n }, { ...(notations.length && {\n 'notations': Converter.reorderSequence(this.measure, notations, Converter.sequenceNotations)\n })}]\n .concat(Array(duration.dots).fill({ _name: 'dot' })), Converter.sequenceNote);\n }\n\n convertChordDegree(value, type, alter) {\n return {\n _name: 'degree',\n _attrs: { 'print-object': 'no' },\n _content: [{\n 'degree-value': value\n }, {\n 'degree-alter': alter\n }, {\n 'degree-type': type\n }]\n };\n }\n\n convertChordSymbol(chord) {\n const parsedChord = this.renderChord(this.parseChord(`${chord.note}${chord.modifiers}`));\n if (!parsedChord) {\n this._log(LogLevel.Warn, `Unrecognized chord \"${chord.note}${chord.modifiers}\"`);\n return { rootStep: null, rootAlter: null, chordKind: null, chordDegrees: [], chordText: null };\n }\n\n const rootStep = parsedChord.input.rootNote[0];\n const rootAlter = this._map(Converter.mapAlter, parsedChord.input.rootNote[1] || null, null, `Unrecognized accidental in chord \"${parsedChord.input.rootNote}\"`);\n const chordText = parsedChord.formatted.descriptor + parsedChord.formatted.chordChanges.join('');\n\n // Find chord quality (aka kind).\n // `chord-symbol` misses a bunch of MusicXML chord qualities so we'll have to derive them ourselves.\n const mapKind = {\n 'major': 'major',\n 'major6': 'major-sixth',\n 'major7': 'major-seventh',\n 'dominant7': 'dominant',\n 'minor': 'minor',\n 'minor6': 'minor-sixth',\n 'minor7': 'minor-seventh',\n 'minorMajor7': 'major-minor',\n 'augmented': 'augmented',\n 'diminished': 'diminished',\n 'diminished7': 'diminished-seventh',\n 'power': 'power'\n };\n let chordKind = this._map(mapKind, parsedChord.normalized.quality, '', `Unrecognized chord quality \"${parsedChord.normalized.quality}\"`);\n\n // Convert extensions to their equivalent MusicXML kind.\n // Find the highest extension, then replace the word following [major, minor, dominant] with it.\n if (parsedChord.normalized.extensions.length) {\n const extension = Math.max(...parsedChord.normalized.extensions.map(e => parseInt(e))).toString();\n const mapExtensionKind = {\n '9': '-ninth',\n '11': '-11th',\n '13': '-13th'\n };\n chordKind = chordKind.split('-')[0] + this._map(mapExtensionKind, extension, '', `Unhandled extension ${extension}`);\n\n // chord-symbol considers dominant-11th to be suspended - but that's not _necessarily_ the case.\n // https://en.wikipedia.org/wiki/Eleventh_chord\n if (chordKind === 'dominant-11th') {\n parsedChord.normalized.isSuspended = false;\n }\n }\n\n // Detect other chord kinds by explicit interval comparison.\n [\n { intervals: ['1', '4', '5'], kind: 'suspended-fourth', strict: true },\n { intervals: ['1', '5', '9'], kind: 'suspended-second', strict: true },\n { intervals: ['1', 'b3', 'b5', 'b7'], kind: 'half-diminished', strict: true },\n { intervals: ['1', '3', '#5', 'b7'], kind: 'augmented-seventh', strict: false }\n ].some(chord => {\n if (\n (!chord.strict || parsedChord.normalized.intervals.length === chord.intervals.length) &&\n chord.intervals.every((s, i) => s === parsedChord.normalized.intervals[i])\n ) {\n chordKind = chord.kind;\n\n // Remove the intervals from the parsedChord to avoid duplication below.\n chord.intervals.forEach(i => {\n parsedChord.normalized.alterations = parsedChord.normalized.alterations.filter(p => p === i);\n parsedChord.normalized.adds = parsedChord.normalized.adds.filter(p => p === i);\n parsedChord.normalized.omits = parsedChord.normalized.omits.filter(p => p === i);\n });\n\n // Add the missing intervals from the parsedChord to the adds.\n parsedChord.normalized.intervals.forEach(i => {\n if (!chord.intervals.includes(i)) {\n parsedChord.normalized.adds.push(i);\n }\n });\n\n // Stop looping.\n return true;\n }\n });\n\n // Handle suspended chords other than triads.\n const chordDegrees = [];\n if (parsedChord.normalized.isSuspended && !chordKind.includes('suspended')) {\n parsedChord.normalized.adds.push('4');\n // Handle case of sus(add3)\n if (!parsedChord.normalized.adds.includes('3')) {\n parsedChord.normalized.omits.push('3');\n }\n }\n\n // Add chord degrees.\n parsedChord.normalized.alterations.forEach(alteration => {\n const degree = alteration.slice(1);\n chordDegrees.push(\n this.convertChordDegree(\n degree,\n (degree === '5' || parsedChord.normalized.extensions.includes(degree)) ? 'alter' : 'add',\n this._map(Converter.mapAlter, alteration[0], 0, `Unrecognized alter symbol in \"${alteration}\"`)\n )\n );\n });\n parsedChord.normalized.adds.forEach(add => {\n const alteration = Object.keys(Converter.mapAlter).includes(add[0]) ? add[0] : null;\n const degree = alteration ? add.slice(1) : add;\n chordDegrees.push(\n this.convertChordDegree(degree, 'add', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${add}\"`))\n );\n });\n parsedChord.normalized.omits.forEach(omit => {\n const alteration = Object.keys(Converter.mapAlter).includes(omit[0]) ? omit[0] : null;\n const degree = alteration ? omit.slice(1) : omit;\n chordDegrees.push(\n this.convertChordDegree(degree, 'subtract', this._map(Converter.mapAlter, alteration, 0, `Unrecognized alter symbol in \"${omit}\"`))\n );\n });\n\n return { rootStep, rootAlter, chordKind, chordDegrees, chordText };\n }\n\n convertChord(chord) {\n let harmony = null;\n\n // Special case: 'n' for no chord\n if (chord.note === 'n') {\n harmony = [{\n 'root': [{\n _name: 'root-step',\n _attrs: { 'text': '' },\n _content: this.options.step\n }],\n }, {\n _name: 'kind',\n _attrs: { 'text': 'N.C.' },\n _content: 'none',\n }];\n }\n else {\n const { rootStep, rootAlter, chordKind, chordDegrees, chordText } = this.convertChordSymbol(chord);\n\n // Handle bass note\n const bass = !chord.over ? null : [{\n 'bass-step': chord.over.note[0]\n }, { ...(chord.over.note[1] && {\n 'bass-alter': this._map(Converter.mapAlter, chord.over.note[1], null, `Unrecognized accidental in bass note \"${chord.over.note}\"`)\n })}];\n\n harmony = [{\n 'root': [{\n 'root-step': rootStep\n }, { ...(rootAlter && { // Don't generate the root-alter entry if rootAlter is blank\n 'root-alter': rootAlter\n })}],\n }, {\n _name: 'kind',\n _attrs: { 'text': chordText, 'use-symbols': 'no' },\n _content: chordKind,\n }, { ...(bass && {\n 'bass': bass\n })}].concat(chordDegrees);\n }\n\n // TODO Handle alternate chord\n if (chord.alternate) {\n this._log(LogLevel.Warn, `Unhandled alternate chord ${JSON.stringify(chord.alternate)}`);\n }\n\n return new Converter.Chord(\n harmony,\n // Initial chord duration is 1 beat\n this.calculateChordDuration(1).map(duration => this.convertChordNote(duration)),\n chord\n );\n }\n\n convertKey() {\n const mapKeys = {\n // Major keys\n 'C': 0, 'G': 1, 'D': 2, 'A': 3, 'E': 4, 'B': 5, 'F#': 6, 'C#': 7,\n 'F': -1, 'Bb': -2, 'Eb': -3, 'Ab': -4, 'Db': -5, 'Gb': -6, 'Cb': -7,\n // Minor keys\n 'A-': 0, 'E-': 1, 'B-': 2, 'F#-': 3, 'C#-': 4, 'G#-': 5, 'D#-': 6, 'A#-': 7,\n 'D-': -1, 'G-': -2, 'C-': -3, 'F-': -4, 'Bb-': -5, 'Eb-': -6, 'Ab-': -7\n };\n\n // Remember the fifth.\n this.fifths = this._map(mapKeys, this.song.key, 0, `Unrecognized key signature \"${this.song.key}\"`);\n\n return {\n _name: 'key',\n _attrs: [{ 'print-object': this.options.keySignature ? 'yes' : 'no' }],\n _content: [{\n 'fifths': this.fifths\n }, {\n 'mode': this.song.key.slice(-1) === '-' ? 'minor' : 'major'\n }]\n };\n }\n\n convertStyleAndGroove(style, groove) {\n return {\n _name: 'direction',\n _attrs: { 'placement': 'above' },\n _content: [{\n 'direction-type': [{\n 'words': style\n }]\n }, {\n 'sound': [{\n 'play': [{\n _name: 'other-play',\n _attrs: { 'type': 'groove' },\n _content: groove || style\n }]\n }]\n }]\n };\n }\n\n _log(logLevel, message, measure = this.measure) {\n if (logLevel < this.options.logLevel) return;\n const log = `[ireal-musicxml] [${this.song.title}${measure ? '#' + measure.number() : ''}] ${message}`;\n let method = 'warn';\n switch (logLevel) {\n case LogLevel.Debug: method = 'debug'; break;\n case LogLevel.Info: method = 'info'; break;\n case LogLevel.Warn: method = 'warn'; break;\n case LogLevel.Error: method = 'error'; break;\n }\n console[method](log);\n }\n\n _map(map, key, defaultValue, message, logLevel = LogLevel.Warn, measure = this.measure) {\n if (!key) return defaultValue;\n if (!(key in map)) {\n if (message) {\n this._log(logLevel, message, measure);\n }\n return defaultValue || null;\n }\n return map[key];\n }\n\n static _mmToTenths(mm, decimals = 2) {\n const value = mm * SCALING_TENTHS / SCALING_MM;\n const power = Math.pow(10, decimals);\n return Math.round(value * power) / power;\n }\n}\n", "{\n \"name\": \"ireal-musicxml\",\n \"version\": \"2.0.0\",\n \"description\": \"iReal Pro to MusicXML converter.\",\n \"author\": \"Karim Ratib (https://github.com/infojunkie)\",\n \"license\": \"GPL-3.0-only\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/infojunkie/ireal-musicxml\"\n },\n \"homepage\": \"https://github.com/infojunkie/ireal-musicxml\",\n \"type\": \"module\",\n \"main\": \"build/ireal-musicxml.js\",\n \"types\": \"build/ireal-musicxml.d.ts\",\n \"files\": [\n \"LICENSE.txt\",\n \"build/*\",\n \"src/*\"\n ],\n \"bin\": {\n \"ireal-musicxml\": \"src/cli/cli.js\"\n },\n \"scripts\": {\n \"build\": \"esbuild src/lib/index.js --bundle --minify --sourcemap --outfile=build/ireal-musicxml.js && cp src/types/* build/\",\n \"test\": \"npm run test:lint && npm run test:spec\",\n \"test:spec\": \"node --test\",\n \"test:typescript\": \"npm run build && ts-mocha test/**/*.spec.ts\",\n \"test:lint\": \"eslint src --fix\"\n },\n \"devDependencies\": {\n \"@xmldom/xmldom\": \"^0.8.0\",\n \"esbuild\": \"0.24.0\",\n \"eslint\": \"^9.13.0\",\n \"resolve\": \"^1.22.8\",\n \"sanitize-filename\": \"^1.6.3\",\n \"typescript\": \"^4.3.2\",\n \"validate-with-xmllint\": \"^1.2.0\",\n \"xpath.js\": \"^1.1.0\"\n },\n \"dependencies\": {\n \"chord-symbol\": \"^3.0.0\",\n \"fast-diff\": \"^1.2.0\",\n \"jstoxml\": \"^2.0.6\",\n \"promise\": \"^8.1.0\"\n }\n}\n", "import pkg from '../../package.json' with { type: 'json' };\n\nexport class Version {\n static name = pkg.name;\n static version = pkg.version;\n static author = pkg.author;\n static description = pkg.description;\n}"], + "mappings": "giBAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,cAYAA,GAAO,QAAUC,GACjB,SAASA,GAAQC,EAAM,CACdC,GAAM,SACPC,GAAa,EACbC,GAAW,IAGfF,GAAMA,GAAM,MAAM,EAAID,CAC1B,CAEA,IAAIC,GAAQ,CAAC,EAGTE,GAAW,GAIXD,GAIAE,GAAQ,EAIRC,GAAW,KAQf,SAASC,IAAQ,CACb,KAAOF,GAAQH,GAAM,QAAQ,CACzB,IAAIM,EAAeH,GAUnB,GAPAA,GAAQA,GAAQ,EAChBH,GAAMM,CAAY,EAAE,KAAK,EAMrBH,GAAQC,GAAU,CAGlB,QAASG,EAAO,EAAGC,EAAYR,GAAM,OAASG,GAAOI,EAAOC,EAAWD,IACnEP,GAAMO,CAAI,EAAIP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B,KAAKtF,GAAS,MAAOyF,EAAS,QAAS,MACvC,KAAKzF,GAAS,KAAMyF,EAAS,OAAQ,MACrC,KAAKzF,GAAS,KAAMyF,EAAS,OAAQ,MACrC,KAAKzF,GAAS,MAAOyF,EAAS,QAAS,KACzC,CACA,QAAQA,CAAM,EAAED,CAAG,CACrB,CAEA,KAAKE,EAAKC,EAAKC,EAAcL,EAASD,EAAWtF,GAAS,KAAMqC,EAAU,KAAK,QAAS,CACtF,OAAKsD,EACCA,KAAOD,EAMNA,EAAIC,CAAG,GALRJ,GACF,KAAK,KAAKD,EAAUC,EAASlD,CAAO,EAE/BuD,GAAgB,MALRA,CAQnB,CAEA,OAAO,YAAYC,EAAIC,EAAW,EAAG,CACnC,IAAM7B,EAAQ4B,EAAK1F,GAAiBD,GAC9B6F,EAAQ,KAAK,IAAI,GAAID,CAAQ,EACnC,OAAO,KAAK,MAAM7B,EAAQ8B,CAAK,EAAIA,CACrC,CACF,EFxwCO,SAASC,GAAYC,EAAOC,EAAU,CAAC,EAAG,CAC/C,IAAMC,EAAW,IAAIC,GAASH,CAAK,EACnC,OAAAE,EAAS,MAAM,QAAQE,GAAQ,CAC7BA,EAAK,SAAWC,GAAU,QAAQD,EAAMH,CAAO,CACjD,CAAC,EACMC,CACT,CAEA,eAAsBI,GAAQN,EAAOC,EAAU,CAAC,EAAG,CACjD,OAAO,IAAI,GAAAM,QAAQC,GAAWA,EAAQT,GAAYC,EAAOC,CAAO,CAAC,CAAC,CACpE", + "names": ["require_browser_raw", "__commonJSMin", "exports", "module", "rawAsap", "task", "queue", "requestFlush", "flushing", "index", "capacity", "flush", "currentIndex", "scan", "newLength", "scope", "BrowserMutationObserver", "makeRequestCallFromMutationObserver", "makeRequestCallFromTimer", "callback", "toggle", "observer", "node", "timeoutHandle", "handleTimer", "intervalHandle", "require_core", "__commonJSMin", "exports", "module", "asap", "noop", "LAST_ERROR", "IS_ERROR", "getThen", "obj", "ex", "tryCallOne", "fn", "a", "tryCallTwo", "b", "Promise", "doResolve", "onFulfilled", "onRejected", "safeThen", "res", "handle", "Handler", "self", "resolve", "reject", "deferred", "handleResolved", "cb", "ret", "newValue", "then", "finale", "i", "promise", "done", "value", "reason", "require_done", "__commonJSMin", "exports", "module", "Promise", "onFulfilled", "onRejected", "self", "err", "require_finally", "__commonJSMin", "exports", "module", "Promise", "f", "value", "err", "require_es6_extensions", "__commonJSMin", "exports", "module", "Promise", "TRUE", "valuePromise", "FALSE", "NULL", "UNDEFINED", "ZERO", "EMPTYSTRING", "value", "then", "ex", "resolve", "reject", "iterableToArray", "iterable", "x", "arr", "args", "remaining", "res", "i", "val", "p", "onSettledFulfill", "onSettledReject", "reason", "mapAllSettled", "item", "values", "onRejected", "getAggregateError", "errors", "error", "promises", "hasResolved", "rejectionReasons", "resolveOnce", "rejectionCheck", "require_browser_asap", "__commonJSMin", "exports", "module", "rawAsap", "freeTasks", "pendingErrors", "requestErrorThrow", "throwFirstError", "asap", "task", "rawTask", "RawTask", "error", "require_node_extensions", "__commonJSMin", "exports", "module", "Promise", "asap", "fn", "argumentCount", "denodeifyWithCount", "denodeifyWithoutCount", "callbackFn", "args", "i", "body", "fnLength", "_", "index", "callback", "ctx", "ex", "resolve", "reject", "value", "err", "require_synchronous", "__commonJSMin", "exports", "module", "Promise", "require_lib", "__commonJSMin", "exports", "module", "require_promise", "__commonJSMin", "exports", "module", "require_diff", "__commonJSMin", "exports", "module", "DIFF_DELETE", "DIFF_INSERT", "DIFF_EQUAL", "diff_main", "text1", "text2", "cursor_pos", "cleanup", "_fix_unicode", "editdiff", "find_cursor_edit_diff", "commonlength", "diff_commonPrefix", "commonprefix", "diff_commonSuffix", "commonsuffix", "diffs", "diff_compute_", "diff_cleanupMerge", "diff_cleanupSemantic", "longtext", "shorttext", "hm", "diff_halfMatch_", "text1_a", "text1_b", "text2_a", "text2_b", "mid_common", "diffs_a", "diffs_b", "diff_bisect_", "text1_length", "text2_length", "max_d", "v_offset", "v_length", "v1", "v2", "x", "delta", "front", "k1start", "k1end", "k2start", "k2end", "d", "k1", "k1_offset", "x1", "y1", "k2_offset", "x2", "diff_bisectSplit_", "k2", "y2", "y", "text1a", "text2a", "text1b", "text2b", "diffsb", "pointermin", "pointermax", "pointermid", "pointerstart", "is_surrogate_pair_start", "diff_commonOverlap_", "text_length", "best", "length", "pattern", "found", "pointerend", "is_surrogate_pair_end", "diff_halfMatchI_", "i", "seed", "j", "best_common", "best_longtext_a", "best_longtext_b", "best_shorttext_a", "best_shorttext_b", "prefixLength", "suffixLength", "hm1", "hm2", "changes", "equalities", "equalitiesLength", "lastequality", "pointer", "length_insertions1", "length_deletions1", "length_insertions2", "length_deletions2", "diff_cleanupSemanticLossless", "deletion", "insertion", "overlap_length1", "overlap_length2", "nonAlphaNumericRegex_", "whitespaceRegex_", "linebreakRegex_", "blanklineEndRegex_", "blanklineStartRegex_", "diff_cleanupSemanticScore_", "one", "two", "char1", "char2", "nonAlphaNumeric1", "nonAlphaNumeric2", "whitespace1", "whitespace2", "lineBreak1", "lineBreak2", "blankLine1", "blankLine2", "equality1", "edit", "equality2", "commonOffset", "commonString", "bestEquality1", "bestEdit", "bestEquality2", "bestScore", "score", "fix_unicode", "count_delete", "count_insert", "text_delete", "text_insert", "previous_equality", "ends_with_pair_start", "stray", "k", "starts_with_pair_end", "n", "charCode", "str", "remove_empty_tuples", "tuples", "ret", "make_edit_splice", "before", "oldMiddle", "newMiddle", "after", "oldText", "newText", "oldRange", "newRange", "oldLength", "newLength", "oldCursor", "oldBefore", "oldAfter", "maybeNewCursor", "editBefore", "newCursor", "newBefore", "newAfter", "oldPrefix", "newPrefix", "editAfter", "cursor", "oldSuffix", "newSuffix", "replaceRange", "diff", "require_jstoxml", "__commonJSMin", "exports", "global", "factory", "mod", "_exports", "_toConsumableArray", "arr", "_arrayWithoutHoles", "_iterableToArray", "_unsupportedIterableToArray", "_nonIterableSpread", "o", "minLen", "_arrayLikeToArray", "n", "iter", "len", "i", "arr2", "ownKeys", "object", "enumerableOnly", "keys", "symbols", "sym", "_objectSpread", "target", "source", "key", "_defineProperty", "obj", "value", "_typeof", "ARRAY", "BOOLEAN", "DATE", "NULL", "NUMBER", "OBJECT", "SPECIAL_OBJECT", "STRING", "PRIVATE_VARS", "PRIVATE_VARS_REGEXP", "getIndentStr", "indent", "depth", "getType", "val", "filterStr", "inputStr", "filter", "regexp", "str", "entity", "getAttributeKeyVals", "attributes", "keyVals", "attr", "filteredVal", "valStr", "formatAttributes", "keysValsJoined", "objToArray", "PRIMITIVE_TYPES", "isPrimitive", "SIMPLE_TYPES", "isSimpleType", "isSimpleXML", "xmlStr", "DEFAULT_XML_HEADER", "getHeaderString", "_ref", "header", "isOutputStart", "shouldOutputHeader", "shouldUseDefaultHeader", "defaultEntityFilter", "toXML", "config", "_config$depth", "_isFirstItem", "_config$_isOutputStar", "_isOutputStart", "_config$attributesFil", "rawAttributesFilter", "_config$filter", "rawFilter", "shouldTurnOffAttributesFilter", "attributesFilter", "shouldTurnOffFilter", "indentStr", "valType", "headerStr", "outputStr", "_name", "_content", "isArrayOfPrimitives", "primitives", "a", "newVal", "newValType", "isNewValSimple", "preIndentStr", "preTag", "valIsEmpty", "shouldSelfClose", "selfCloseStr", "attributesString", "tag", "preTagCloseStr", "postTag", "outputArr", "index", "newConfig", "outputObj", "privateVar", "hasContent", "newContentObj", "xml", "fnResult", "_outputArr", "singleVal", "_default", "require_chord_symbol", "__commonJSMin", "exports", "module", "root", "factory", "getNative", "__webpack_require__", "DataView", "hashClear", "hashDelete", "hashGet", "hashHas", "hashSet", "Hash", "entries", "index", "length", "entry", "listCacheClear", "listCacheDelete", "listCacheGet", "listCacheHas", "listCacheSet", "ListCache", "Map", "mapCacheClear", "mapCacheDelete", "mapCacheGet", "mapCacheHas", "mapCacheSet", "MapCache", "Promise", "Set", "setCacheAdd", "setCacheHas", "SetCache", "values", "stackClear", "stackDelete", "stackGet", "stackHas", "stackSet", "Stack", "data", "Symbol", "Uint8Array", "WeakMap", "apply", "func", "thisArg", "args", "arrayEach", "array", "iteratee", "arrayFilter", "predicate", "resIndex", "result", "value", "baseIndexOf", "arrayIncludes", "arrayIncludesWith", "comparator", "baseTimes", "isArguments", "isArray", "isBuffer", "isIndex", "isTypedArray", "objectProto", "hasOwnProperty", "arrayLikeKeys", "inherited", "isArr", "isArg", "isBuff", "isType", "skipIndexes", "key", "arrayMap", "arrayPush", "offset", "arraySome", "baseAssignValue", "eq", "assignValue", "object", "objValue", "assocIndexOf", "copyObject", "keys", "baseAssign", "source", "keysIn", "baseAssignIn", "defineProperty", "cloneBuffer", "copyArray", "copySymbols", "copySymbolsIn", "getAllKeys", "getAllKeysIn", "getTag", "initCloneArray", "initCloneByTag", "initCloneObject", "isMap", "isObject", "isSet", "CLONE_DEEP_FLAG", "CLONE_FLAT_FLAG", "CLONE_SYMBOLS_FLAG", "argsTag", "arrayTag", "boolTag", "dateTag", "errorTag", "funcTag", "genTag", "mapTag", "numberTag", "objectTag", "regexpTag", "setTag", "stringTag", "symbolTag", "weakMapTag", "arrayBufferTag", "dataViewTag", "float32Tag", "float64Tag", "int8Tag", "int16Tag", "int32Tag", "uint8Tag", "uint8ClampedTag", "uint16Tag", "uint32Tag", "cloneableTags", "baseClone", "bitmask", "customizer", "stack", "isDeep", "isFlat", "isFull", "tag", "isFunc", "stacked", "subValue", "keysFunc", "props", "objectCreate", "baseCreate", "proto", "baseUnary", "cacheHas", "LARGE_ARRAY_SIZE", "baseDifference", "includes", "isCommon", "valuesLength", "outer", "computed", "valuesIndex", "baseFindIndex", "fromIndex", "fromRight", "isFlattenable", "baseFlatten", "depth", "isStrict", "createBaseFor", "baseFor", "baseForOwn", "castPath", "toKey", "baseGet", "path", "baseGetAllKeys", "symbolsFunc", "getRawTag", "objectToString", "nullTag", "undefinedTag", "symToStringTag", "baseGetTag", "baseHasIn", "baseIsNaN", "strictIndexOf", "baseInverter", "setter", "accumulator", "isObjectLike", "baseIsArguments", "baseIsEqualDeep", "baseIsEqual", "other", "equalArrays", "equalByTag", "equalObjects", "COMPARE_PARTIAL_FLAG", "equalFunc", "objIsArr", "othIsArr", "objTag", "othTag", "objIsObj", "othIsObj", "isSameTag", "objIsWrapped", "othIsWrapped", "objUnwrapped", "othUnwrapped", "baseIsMap", "COMPARE_UNORDERED_FLAG", "baseIsMatch", "matchData", "noCustomizer", "srcValue", "isFunction", "isMasked", "toSource", "reRegExpChar", "reIsHostCtor", "funcProto", "funcToString", "reIsNative", "baseIsNative", "pattern", "baseIsSet", "isLength", "typedArrayTags", "baseIsTypedArray", "baseMatches", "baseMatchesProperty", "identity", "property", "baseIteratee", "isPrototype", "nativeKeys", "baseKeys", "nativeKeysIn", "baseKeysIn", "isProto", "getMatchData", "matchesStrictComparable", "get", "hasIn", "isKey", "isStrictComparable", "baseProperty", "basePropertyDeep", "overRest", "setToString", "baseRest", "start", "constant", "baseSetToString", "string", "n", "isSymbol", "INFINITY", "symbolProto", "symbolToString", "baseToString", "trimmedEndIndex", "reTrimStart", "baseTrim", "createSet", "setToArray", "baseUniq", "seen", "set", "seenIndex", "cache", "stringToPath", "toString", "cloneArrayBuffer", "arrayBuffer", "freeExports", "freeModule", "moduleExports", "Buffer", "allocUnsafe", "buffer", "cloneDataView", "dataView", "reFlags", "cloneRegExp", "regexp", "symbolValueOf", "cloneSymbol", "symbol", "cloneTypedArray", "typedArray", "isNew", "newValue", "getSymbols", "getSymbolsIn", "coreJsData", "iterable", "isArrayLike", "createFind", "findIndexFunc", "collection", "createInverter", "toIteratee", "noop", "isPartial", "arrLength", "othLength", "arrStacked", "othStacked", "arrValue", "othValue", "compared", "othIndex", "mapToArray", "convert", "objProps", "objLength", "othProps", "objStacked", "skipCtor", "objCtor", "othCtor", "freeGlobal", "isKeyable", "getMapData", "map", "getValue", "overArg", "getPrototype", "nativeObjectToString", "isOwn", "unmasked", "stubArray", "propertyIsEnumerable", "nativeGetSymbols", "promiseTag", "dataViewCtorString", "mapCtorString", "promiseCtorString", "setCtorString", "weakMapCtorString", "Ctor", "ctorString", "hasPath", "hasFunc", "nativeCreate", "HASH_UNDEFINED", "spreadableSymbol", "MAX_SAFE_INTEGER", "reIsUint", "type", "reIsDeepProp", "reIsPlainProp", "maskSrcKey", "uid", "arrayProto", "splice", "lastIndex", "size", "memoize", "MAX_MEMOIZE_SIZE", "memoizeCapped", "freeProcess", "nodeUtil", "types", "transform", "arg", "nativeMax", "otherArgs", "freeSelf", "shortOut", "HOT_COUNT", "HOT_SPAN", "nativeNow", "count", "lastCalled", "stamp", "remaining", "pairs", "rePropName", "reEscapeChar", "match", "number", "quote", "subString", "reWhitespace", "clone", "cloneDeep", "isArrayLikeObject", "difference", "findIndex", "find", "toInteger", "defaultValue", "invert", "stubFalse", "nativeIsBuffer", "isEqual", "asyncTag", "proxyTag", "nodeIsMap", "nodeIsSet", "nodeIsTypedArray", "FUNC_ERROR_TEXT", "resolver", "memoized", "toNumber", "MAX_INTEGER", "toFinite", "sign", "remainder", "NAN", "reIsBadHex", "reIsBinary", "reIsOctal", "freeParseInt", "isBinary", "uniq", "without", "__webpack_module_cache__", "moduleId", "cachedModule", "__webpack_modules__", "getter", "definition", "obj", "prop", "chain", "allFunctions", "input", "reduce", "fn", "checkCustomFilters", "customFilters", "Array", "TypeError", "some", "filter", "helpers_checkCustomFilters", "notes", "AFlat", "A", "ASharp", "BFlat", "B", "C", "CSharp", "DFlat", "D", "DSharp", "EFlat", "E", "F", "FSharp", "GFlat", "G", "GSharp", "english", "Ab", "Bb", "Cb", "Db", "Eb", "Fb", "Gb", "latin", "Lab", "La", "Sib", "Si", "Dob", "Do", "Reb", "R\u00E9b", "Re", "R\u00E9", "Mib", "Mi", "Fab", "Fa", "Solb", "Sol", "german", "As", "Ais", "Hes", "H", "His", "Ces", "Cis", "Des", "Dis", "Es", "Eis", "Fes", "Fis", "Ges", "Gis", "getAccidentalsVariation", "variant", "Object", "acc", "curr", "replace", "englishVariantsToNotes", "_objectSpread", "latinVariantsToNotes", "germanVariantsToNotes", "allVariantsToNotes", "allVariants", "sort", "a", "b", "englishVariants", "latinVariants", "germanVariants", "allVariantsPerGroup", "name", "InvalidInputError", "_this", "_classCallCheck", "_super", "Error", "UnexpectedError", "_this2", "message", "_super2", "ChordSymbolError", "chord", "errorName", "_this3", "_super3", "NoSymbolFoundError", "_super4", "InvalidModifierError", "invalidChars", "descriptor", "_super5", "InvalidIntervalsError", "forbiddenCombo", "join", "_super6", "hasExactly", "allIntervals", "search", "arraySearch", "_isArray", "_isEqual", "hasOneOf", "has", "hasAll", "hasNoneOf", "require", "lookupMethod", "interval", "allForbiddenCombos", "checkIntervalsConsistency", "intervals", "normalized", "combo", "formatSymbol", "_chord$formatted", "formatted", "rootNote", "bassNote", "chordChanges", "qualities", "ma", "ma6", "ma7", "dom7", "mi", "mi6", "mi7", "miMa7", "aug", "dim", "dim7", "power", "bass", "majorQualities", "minorQualities", "qualityToDescriptor", "_qualityToDescriptor", "formatSymbolParts_defineProperty", "getHighestExtension", "intents", "alt", "chordChangesDescriptors", "add", "add7", "omit", "sus", "formatSymbolParts", "getDescriptor", "getChordChanges", "quality", "isSuspended", "extensions", "highestExtension", "major", "alterations", "formattedOmits", "formatOmits", "omits", "isAltered", "formattedAdds", "formatAdds", "adds", "_toConsumableArray", "omitted", "getParsableDescriptor", "allFilters", "toLowerCaseExceptMajorM", "removeSpaces", "addDisambiguators", "addMissingVerbs", "parsableDescriptor", "toLowerCase", "allTokensWithVerbs", "currentVerb", "hasVerb", "parenthesis", "split", "forEach", "token", "startsWith", "push", "initChord", "parserConfiguration", "_cloneDeep", "notesSharp", "notesFlat", "rootNoteToScaleAccidentals", "_rootNoteToScaleAccid", "nameIndividualChordNotes_defineProperty", "maj", "min", "nameIndividualChordNotes", "semitones", "minMaj", "refNotes", "rootNoteIndex", "indexOf", "indexedNotes", "nameIndividualChordNotes_toConsumableArray", "slice", "chordNotes", "i", "normalizeNotes", "normalizeDescriptor", "chordIntervals", "_clone", "isPowerChord", "isBass", "getOmits", "getIsSuspended", "_getChordQuality", "getChordQuality", "qualityIntervals", "getExtensions", "baseIntervals", "normalizeDescriptor_toConsumableArray", "_getAddsAndAlteration", "getAddsAndAlterations", "normalizeDescriptor_objectSpread", "hasMajorIntent", "intervalsForQualityDetection", "getIntervalsForQualityDetection", "intervalsToQualities", "_find", "o", "undoOmit3", "bind", "undoSuspension", "undoAlt5", "_uniq", "with3rd", "unSuspended", "_without", "isAlt", "unaltered", "canBeExtended", "isMinorExtended13th", "isMajorExtended13th", "isExtended11th", "isExtended9th", "canHave11th", "isAlteration", "hasAdd3", "sortIntervals", "_qualityAlterations", "qualityAlterations", "normalizeDescriptor_defineProperty", "sortableA", "Number", "parseInt", "sortableB", "parseBase", "noteVariants", "notesRegex", "notesAndDescriptorRegex", "RegExp", "allModifiers", "halfDim", "seventh", "sus2", "ninth", "eleventh", "thirteenth", "fifthFlat", "fifthSharp", "ninthFlat", "ninthSharp", "eleventhSharp", "thirteenthFlat", "add3", "add4", "addb6", "add6", "add69", "add9", "add11", "add13", "omit3", "omit5", "\u0394", "M", "Ma", "Maj", "Major", "major7th", "getDerivedModifiers", "allSymbols", "modifiers_objectSpread", "m", "Min", "Minor", "minor", "diminished", "\u00D8", "\u00F8", "h", "augmented", "sus4", "suspended", "suspended4", "suspended2", "b3", "b5", "b9", "addb9", "b13", "addb13", "add2", "b6", "no3", "no5", "altered", "modifierId", "derivedFn", "modifiers", "intervalsToSemitones", "bb7", "b7", "parseDescriptor", "altIntervals", "getModifiers", "getIntervals", "getSemitones", "getIntents", "descriptorRegex", "escapeRegex", "descriptorMatches", "remainingChars", "allModifiersId", "trim", "parseDescriptor_toConsumableArray", "getThird", "getFourth", "getFifths", "getSixth", "getSevenths", "getNinths", "getElevenths", "getThirteenths", "third", "fourth", "fifths", "shouldAlter", "sixth", "isExtended", "sevenths", "getMinorOrMajorSeventh", "elevenths", "thirteenths", "chordParserFactory", "allAltIntervals", "allNotationSystems", "_parserConfiguration$", "notationSystems", "_parserConfiguration$2", "_parserConfiguration$3", "checkAltIntervals", "checkNotationSystems", "parseChord", "allErrors", "isInputValid", "e", "formatError", "allVariantsPerGroupCopy", "variantsGroup", "variants", "shift", "chordParserFactory_toConsumableArray", "notationSystem", "getUnexpectedError", "error", "checkArray", "arrayName", "arrayToTest", "allowedValues", "allowEmpty", "system", "exceptionError", "parser_chordParserFactory", "shortDescriptors", "aug7", "shortenNormalized", "isSus2", "isAdd2", "isAug7", "isEleventh", "change", "shortenNormalized_objectSpread", "simplify", "level", "intervalsToRemove", "max", "core", "_difference", "sharpsToFlats", "flatsToSharps", "_invert", "transpose", "transposeValue", "useFlats", "_chord$normalized", "rootSharp", "convertToSharp", "transposeNote", "bassSharp", "note", "noteIndex", "transposedIndex", "octaves", "Math", "floor", "correctedTransposedIndex", "transposed", "translationTables", "convertNotationSystem", "finalNotationSystem", "textPrinter", "rawPrinter", "cloned", "textPrinted", "reParsed", "chordRendererFactory", "_ref", "_ref$useShortNamings", "useShortNamings", "_ref$simplify", "_ref$transposeValue", "_ref$harmonizeAcciden", "harmonizeAccidentals", "_ref$useFlats", "_ref$printer", "printer", "_ref$notationSystem", "_ref$customFilters", "simplifyFilter", "chordRendererFactory_toConsumableArray", "renderChord", "isValidChord", "filteredChord", "chordRendererFactory_typeof", "renderer_chordRendererFactory", "import_promise", "import_fast_diff", "Playlist", "ireal", "playlistEncoded", "parts", "part", "Song", "error", "title", "song", "songs", "diffs", "diff", "d", "Cell", "Chord", "note", "modifiers", "over", "alternate", "_Song", "oldFormat", "music", "unscramble", "text", "arr", "found", "i", "match", "cells", "obj", "prevobj", "cell", "composer", "chord", "comment", "offset", "r", "p", "obfusc50", "newString", "import_jstoxml", "import_chord_symbol", "package_default", "Version", "package_default", "chordParserFactory", "chordRendererFactory", "ChordSymbol", "LogLevel", "MUSICXML_VERSION", "SCALING_MM", "SCALING_TENTHS", "Converter", "_Converter", "song", "options", "realOptions", "jstoxml", "Version", "date", "number", "chord", "note", "harmony", "notes", "ireal", "isNewSystem", "cellIndex", "measures", "cell", "target", "m", "annot", "section", "time", "ending", "index", "b", "c", "comment", "repeatFn", "remainingCells", "direction", "d", "s", "measure", "elements", "sequence", "a", "a1", "a2", "k1", "k2", "i1", "i2", "repeats", "type", "bars", "location", "style", "repeat", "bpm", "beats", "beatType", "chordIndex", "duration", "ds", "mapDuration", "fermata", "tie", "altered", "noteType", "notations", "value", "alter", "parsedChord", "rootStep", "rootAlter", "chordText", "mapKind", "chordKind", "extension", "e", "mapExtensionKind", "i", "p", "chordDegrees", "alteration", "degree", "add", "omit", "bass", "mapKeys", "groove", "logLevel", "message", "log", "method", "map", "key", "defaultValue", "mm", "decimals", "power", "convertSync", "ireal", "options", "playlist", "Playlist", "song", "Converter", "convert", "Promise", "resolve"] } diff --git a/src/lib/converter.js b/src/lib/converter.js index 73e4621..d8ce4ac 100644 --- a/src/lib/converter.js +++ b/src/lib/converter.js @@ -1,5 +1,6 @@ import jstoxml from 'jstoxml'; -import { chordParserFactory, chordRendererFactory } from 'chord-symbol/lib/chord-symbol-esm.js'; +import ChordSymbol from 'chord-symbol'; +const { chordParserFactory, chordRendererFactory } = ChordSymbol; import { Version } from './version.js'; export class LogLevel {