From 6001e07cbc35a887bca20d8e179a2ed134a970a4 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 31 Jul 2023 19:00:21 +0100 Subject: [PATCH] update --- .eslintignore | 2 + .gitignore | 1 + .../NoteBodyViewer/hooks/useSource.ts | 2 +- packages/app-mobile/metro.config.js | 14 +- .../plugins/com.hieuthi.joplin.metis/index.js | 7 + .../com.hieuthi.joplin.metis/manifest.json | 12 + .../com.hieuthi.joplin.metis/todoTxtMdCtrl.js | 1 + .../com.hieuthi.joplin.metis/todoTxtMdRule.js | 1 + .../todoTxtMdView.css | 163 + .../com.hieuthi.joplin.metis/todoTxtMdView.js | 38 + .../index.js | 17 + .../manifest.json | 16 + .../markdownItPlugin.js | 15621 ++++++++++++++++ .../org.joplinapp.plugins.Simple/index.js | 16 +- .../org.joplinapp.plugins.Simple2/index.js | 16 +- packages/app-mobile/root.tsx | 45 +- .../services/plugins/PluginRunner.ts | 7 +- packages/app-mobile/utils/fs-driver-rn.ts | 8 +- .../app-mobile/utils/markupLanguageUtils.ts | 21 + packages/lib/fs-driver-base.ts | 14 + packages/lib/fs-driver-node.ts | 14 +- packages/lib/services/plugins/Plugin.ts | 36 +- .../lib/services/plugins/PluginService.ts | 6 +- packages/lib/services/plugins/reducer.ts | 2 + 24 files changed, 16016 insertions(+), 64 deletions(-) create mode 100644 packages/app-mobile/plugins/com.hieuthi.joplin.metis/index.js create mode 100644 packages/app-mobile/plugins/com.hieuthi.joplin.metis/manifest.json create mode 100644 packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdCtrl.js create mode 100644 packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdRule.js create mode 100644 packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdView.css create mode 100644 packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdView.js create mode 100644 packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/index.js create mode 100644 packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/manifest.json create mode 100644 packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/markdownItPlugin.js create mode 100644 packages/app-mobile/utils/markupLanguageUtils.ts diff --git a/.eslintignore b/.eslintignore index 2e870d255..d8f6766bb 100644 --- a/.eslintignore +++ b/.eslintignore @@ -76,6 +76,7 @@ plugin_types/ readme/ packages/react-native-vosk/lib/ packages/lib/countable/Countable.js +packages/app-mobile/plugins # AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD packages/app-cli/app/LinkSelector.js @@ -457,6 +458,7 @@ packages/app-mobile/utils/checkPermissions.js packages/app-mobile/utils/createRootStyle.js packages/app-mobile/utils/debounce.js packages/app-mobile/utils/fs-driver-rn.js +packages/app-mobile/utils/markupLanguageUtils.js packages/app-mobile/utils/setupNotifications.js packages/app-mobile/utils/shareHandler.js packages/app-mobile/utils/types.js diff --git a/.gitignore b/.gitignore index 50b75e070..ef6d84e5e 100644 --- a/.gitignore +++ b/.gitignore @@ -442,6 +442,7 @@ packages/app-mobile/utils/checkPermissions.js packages/app-mobile/utils/createRootStyle.js packages/app-mobile/utils/debounce.js packages/app-mobile/utils/fs-driver-rn.js +packages/app-mobile/utils/markupLanguageUtils.js packages/app-mobile/utils/setupNotifications.js packages/app-mobile/utils/shareHandler.js packages/app-mobile/utils/types.js diff --git a/packages/app-mobile/components/NoteBodyViewer/hooks/useSource.ts b/packages/app-mobile/components/NoteBodyViewer/hooks/useSource.ts index b18e4efce..f62d53e42 100644 --- a/packages/app-mobile/components/NoteBodyViewer/hooks/useSource.ts +++ b/packages/app-mobile/components/NoteBodyViewer/hooks/useSource.ts @@ -2,7 +2,7 @@ import { useEffect, useState, useMemo, useRef } from 'react'; import shim from '@joplin/lib/shim'; import Setting from '@joplin/lib/models/Setting'; const { themeStyle } = require('../../global-style.js'); -import markupLanguageUtils from '@joplin/lib/markupLanguageUtils'; +import markupLanguageUtils from '../../../utils/markupLanguageUtils'; import Logger from '@joplin/utils/Logger'; const { assetsToHeaders } = require('@joplin/renderer'); diff --git a/packages/app-mobile/metro.config.js b/packages/app-mobile/metro.config.js index 6f5015ff6..d2a685a53 100644 --- a/packages/app-mobile/metro.config.js +++ b/packages/app-mobile/metro.config.js @@ -13,17 +13,17 @@ const path = require('path'); const localPackages = { + '@joplin/fork-htmlparser2': path.resolve(__dirname, '../fork-htmlparser2/'), + '@joplin/fork-sax': path.resolve(__dirname, '../fork-sax/'), + '@joplin/fork-uslug': path.resolve(__dirname, '../fork-uslug/'), '@joplin/lib': path.resolve(__dirname, '../lib/'), + '@joplin/react-native-alarm-notification': path.resolve(__dirname, '../react-native-alarm-notification/'), + '@joplin/react-native-saf-x': path.resolve(__dirname, '../react-native-saf-x/'), '@joplin/renderer': path.resolve(__dirname, '../renderer/'), '@joplin/tools': path.resolve(__dirname, '../tools/'), - '@joplin/utils': path.resolve(__dirname, '../utils/'), - '@joplin/fork-htmlparser2': path.resolve(__dirname, '../fork-htmlparser2/'), - '@joplin/fork-uslug': path.resolve(__dirname, '../fork-uslug/'), - '@joplin/react-native-saf-x': path.resolve(__dirname, '../react-native-saf-x/'), - '@joplin/react-native-alarm-notification': path.resolve(__dirname, '../react-native-alarm-notification/'), - '@joplin/fork-sax': path.resolve(__dirname, '../fork-sax/'), - '@joplin/turndown': path.resolve(__dirname, '../turndown/'), '@joplin/turndown-plugin-gfm': path.resolve(__dirname, '../turndown-plugin-gfm/'), + '@joplin/turndown': path.resolve(__dirname, '../turndown/'), + '@joplin/utils': path.resolve(__dirname, '../utils/'), }; const remappedPackages = { diff --git a/packages/app-mobile/plugins/com.hieuthi.joplin.metis/index.js b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/index.js new file mode 100644 index 000000000..1170c1631 --- /dev/null +++ b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/index.js @@ -0,0 +1,7 @@ +const initPlugin = joplin => { + +!function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";var n=this&&this.__awaiter||function(t,e,o,n){return new(o||(o=Promise))((function(r,i){function u(t){try{c(n.next(t))}catch(t){i(t)}}function l(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(u,l)}c((n=n.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const r=o(1),i=o(2);r.default.plugins.register({onStart:function(){return n(this,void 0,void 0,(function*(){yield r.default.contentScripts.register(i.ContentScriptType.MarkdownItPlugin,"todoTxtMd","./todoTxtMdRule.js"),yield r.default.contentScripts.register(i.ContentScriptType.CodeMirrorPlugin,"todoTxtMdCtrl","./todoTxtMdCtrl.js"),yield r.default.contentScripts.onMessage("todoTxtMd",t=>{r.default.commands.execute("editor.execCommand",{name:"todoTxtAction",args:[t]}),r.default.commands.execute("editor.focus")})}))}})},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=joplin},function(t,e,o){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ContentScriptType=e.SettingStorage=e.AppType=e.SettingItemType=e.ToolbarButtonLocation=e.isContextMenuItemLocation=e.MenuItemLocation=e.ImportModuleOutputFormat=e.FileSystemItem=void 0,function(t){t.File="file",t.Directory="directory"}(e.FileSystemItem||(e.FileSystemItem={})),function(t){t.Markdown="md",t.Html="html"}(e.ImportModuleOutputFormat||(e.ImportModuleOutputFormat={})),function(t){t.File="file",t.Edit="edit",t.View="view",t.Note="note",t.Tools="tools",t.Help="help",t.Context="context",t.NoteListContextMenu="noteListContextMenu",t.EditorContextMenu="editorContextMenu",t.FolderContextMenu="folderContextMenu",t.TagContextMenu="tagContextMenu"}(n=e.MenuItemLocation||(e.MenuItemLocation={})),e.isContextMenuItemLocation=function(t){return[n.Context,n.NoteListContextMenu,n.EditorContextMenu,n.FolderContextMenu,n.TagContextMenu].includes(t)},function(t){t.NoteToolbar="noteToolbar",t.EditorToolbar="editorToolbar"}(e.ToolbarButtonLocation||(e.ToolbarButtonLocation={})),function(t){t[t.Int=1]="Int",t[t.String=2]="String",t[t.Bool=3]="Bool",t[t.Array=4]="Array",t[t.Object=5]="Object",t[t.Button=6]="Button"}(e.SettingItemType||(e.SettingItemType={})),function(t){t.Desktop="desktop",t.Mobile="mobile",t.Cli="cli"}(e.AppType||(e.AppType={})),function(t){t[t.Database=1]="Database",t[t.File=2]="File"}(e.SettingStorage||(e.SettingStorage={})),function(t){t.MarkdownItPlugin="markdownItPlugin",t.CodeMirrorPlugin="codeMirrorPlugin"}(e.ContentScriptType||(e.ContentScriptType={}))}]); + +} + +module.exports = { initPlugin }; diff --git a/packages/app-mobile/plugins/com.hieuthi.joplin.metis/manifest.json b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/manifest.json new file mode 100644 index 000000000..362c920e6 --- /dev/null +++ b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/manifest.json @@ -0,0 +1,12 @@ +{ + "manifest_version": 1, + "id": "com.hieuthi.joplin.metis", + "app_min_version": "2.2", + "version": "0.1.5", + "name": "Metis", + "description": "A Simple Task Manager Plugin for Joplin based on Todo.txt Specification", + "author": "Hieu-Thi Luong", + "homepage_url": "https://github.com/hieuthi/joplin-plugin-metis", + "repository_url": "https://github.com/hieuthi/joplin-plugin-metis", + "keywords": ["joplin-plugin","todo","todotxt","task management"] +} \ No newline at end of file diff --git a/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdCtrl.js b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdCtrl.js new file mode 100644 index 000000000..fe42c55f8 --- /dev/null +++ b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdCtrl.js @@ -0,0 +1 @@ +exports.default=function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){const n=o(1);function r(t){t.defineSimpleMode("todotxt",{start:[{regex:/\s*x\s.*$/,sol:!0,token:"todo-done"},{regex:/\s*\(A\)/,sol:!0,token:"todo-prior-A"},{regex:/\s*\(B\)/,sol:!0,token:"todo-prior-B"},{regex:/\s*\(C\)/,sol:!0,token:"todo-prior-C"},{regex:/\s*\(D\)/,sol:!0,token:"todo-prior-D"},{regex:/\s*\([E-Z]\)/,sol:!0,token:"todo-priority"},{regex:/(\@[^@\s]\S*)/,sol:!0,token:"todo-context"},{regex:/(\s+)(\@[^@\s]\S*)/,token:[null,"todo-context"]},{regex:/(\+[^\+\s]\S*)/,sol:!0,token:"todo-project"},{regex:/(\s+)(\+[^\+\s]\S*)/,token:[null,"todo-project"]},{regex:/([A-Za-z][A-Za-z0-9]*:\S+)/,sol:!0,token:["todo-meta"]},{regex:/(\s+)([A-Za-z][A-Za-z0-9]*:\S+)/,token:[null,"todo-meta"]},{regex:/([1-2]\d{3}[-/\\.](0?[1-9]|1[012])[-/\\.](0[1-9]|[12]\d|3[01]))\b/,token:"todo-date"}]}),t.defineExtension("todoTxtAction",(function(e){const o=e.split(":");switch(o[0]){case"toggleStatus":var r=parseInt(o[1]),s=this.getLine(r);if((i=n.parseLine(s)).isCompleted())i.getCompletionDate&&i.setCompletionDate(null),i.unsetCompleted();else{if(i.getCreationDate()){const t=(new Date).toISOString();i.setCompletionDate(t.slice(0,10))}i.setCompleted()}this.replaceRange(i.toString(),t.Pos(r,0),t.Pos(r,s.length));break;case"changePriority":r=parseInt(o[1]);var i,l="~"==o[2]?null:o[2];s=this.getLine(r);(i=n.parseLine(s)).setPriority(l),this.replaceRange(i.toString(),t.Pos(r,0),t.Pos(r,s.length));break;case"selectLine":r=parseInt(o[1]);var c=(s=this.getLine(r)).search(/[^\s]/),u=s.search(/[^\s](?=[\s]*$)/);this.setSelection(t.Pos(r,c),t.Pos(r,u+1))}}))}t.exports={default:function(t){return{plugin:r,codeMirrorResources:[],codeMirrorOptions:{},assets:function(){return[{mime:"text/css",inline:!0,text:".cm-todo-done, .cm-todo-meta, .cm-todo-date { color: var(--joplin-color-faded);}\n\t\t\t\t\t\t\t.cm-todo-priority { font-weight: bold; }\n\t\t\t\t\t\t\t.cm-todo-prior-A { color: rgb(247, 210, 110); font-weight: bold; }\n\t\t\t\t\t\t\t.cm-todo-prior-B { color: rgb(152, 104, 1); font-weight: bold; }\n\t\t\t\t\t\t\t.cm-todo-prior-C { color: rgb(80, 161, 79); font-weight: bold; }\n\t\t\t\t\t\t\t.cm-todo-prior-D { color: rgb(21, 91, 218); font-weight: bold; }\n\t\t\t\t\t\t\t.cm-todo-project { background-color: rgb(247, 210, 110); color: black}\n\t\t\t\t\t\t\t.cm-todo-context { color: rgb(152, 104, 1) }\n\t\t\t\t\t\t"}]}}}}},function(t,e,o){var n;n=function(){return(()=>{"use strict";var t={283:t=>{function e(t){switch(t){case 9:case 32:return!0}return!1}function o(t){this.tokens_=[];for(var n=0,r=t.length-1;n=0&&e(t.charCodeAt(r));r--);const s=t.substr(n,r-n+1);this.tokens_.push({type:"leadingSpace",content:t.substr(0,n)});const i=s.split(" ");i.length>0&&"x"==i[0]?this.tokens_.push({type:"status",content:i.shift()}):this.tokens_.push({type:"status",content:null}),i.length>0&&3==i[0].length&&40==i[0].charCodeAt(0)&&41==i[0].charCodeAt(2)&&i[0].charCodeAt(1)>=65&&i[0].charCodeAt(1)<=90?this.tokens_.push({type:"priority",content:i.shift()}):this.tokens_.push({type:"priority",content:null}),i.length>0&&o.isIsoDate(i[0])?(i.length>1&&o.isIsoDate(i[1])?this.tokens_.push({type:"completionDate",content:i.shift()}):this.tokens_.push({type:"completionDate",content:null}),this.tokens_.push({type:"creationDate",content:i.shift()})):(this.tokens_.push({type:"completionDate",content:null}),this.tokens_.push({type:"creationDate",content:null}));for(let t=0;t1&&43==e.charCodeAt(0)&&43!=e.charCodeAt(1)?this.tokens_.push({type:"project",content:e}):e.length>1&&64==e.charCodeAt(0)&&64!=e.charCodeAt(1)?this.tokens_.push({type:"context",content:e}):e.length>2&&e.charCodeAt(0)>=65&&e.charCodeAt(0)<=122&&e.indexOf(":")>=0&&e.indexOf(":")!=e.length-1&&0==!!e.split(":")[0].match(/[^a-zA-Z0-9]/)?this.tokens_.push({type:"meta",content:e}):this.tokens_.push({type:"text",content:e})}this.tokens_.push({type:"trailingSpace",content:t.substr(r+1,t.length)})}o.isIsoDate=function(t){return 10==t.length&&(45==t.charCodeAt(4)||45==t.charCodeAt(7))&&!isNaN(Date.parse(t))},o.prototype.toString=function(){return this.tokens_[0].content+this.tokens_.slice(1,-1).filter(t=>t.content).map(t=>t.content).join(" ")+this.tokens_[this.tokens_.length-1].content},o.prototype.getStatus=function(t=null){return this.tokens_[1].content?this.tokens_[1].content:t},o.prototype.isCompleted=function(){return!!this.tokens_[1].content},o.prototype.setCompleted=function(){this.tokens_[1].content="x"},o.prototype.unsetCompleted=function(){this.tokens_[1].content=null},o.prototype.getPriority=function(t=null){return this.tokens_[2].content?this.tokens_[2].content.charAt(1):t},o.prototype.setPriority=function(t=null){if(t){if(t.length>1)return;const e=t.charCodeAt(0);if(e<65||e>90)return;this.tokens_[2].content="("+t+")"}else this.tokens_[2].content=null},o.prototype.getCompletionDate=function(t=null){return t=t&&o.isIsoDate(t)?t:null,this.tokens_[3].content?this.tokens_[3].content:t},o.prototype.setCompletionDate=function(t){null!==t?o.isIsoDate(t)&&(this.tokens_[3].content=t,this.tokens_[4].content=this.tokens_[4].content||t):this.tokens_[3].content=null},o.prototype.getCreationDate=function(t=null){return t=t&&o.isIsoDate(t)?t:null,this.tokens_[4].content?this.tokens_[4].content:t},o.prototype.setCreationDate=function(t){if(null===t)return this.tokens_[3].content=null,void(this.tokens_[4].content=null);o.isIsoDate(t)&&(this.tokens_[4].content=t)},o.prototype.getProjects=function(){const t=[];for(let e=5;e{var n=o(283),r=o(814);function s(t){this.raw_=t,this.list_=[],this.deleted_=[];const e=t.split("\n");for(let t=0;t0?new n(o):null;this.list_.push({lineIdx:t,raw:o,todo:r})}}s.parse=function(t){return new s(t)},s.parseLine=function(t){return t.trim().length>0?new n(t):null},s.isIsoDate=function(t){return n.isIsoDate(t)},s.prototype.toString=function(){return this.list_.map(t=>t.todo?t.todo.toString():t.raw).join("\n")},s.prototype.getList=function(){return this.list_},s.prototype.getDeleted=function(){return this.deleted_},s.prototype.getTodos=function(){return this.list_.filter(t=>t.todo).map(t=>t.todo)},s.prototype.getTodoView=function(){return new r(this.list_.filter(t=>t.todo),this)},s.prototype.trim=function(){return this.getTodos().forEach(t=>t.trim()),this.deleted_=this.deleted_.concat(this.list_.filter(t=>null==t.todo)),this.list_=this.list_.filter(t=>t.todo),this},s.prototype.delete=function(t){const e=this.list_.indexOf(t);return e>=0&&(this.list_.splice(e,1),this.deleted_.push(t)),this},t.exports=s},814:t=>{var e={default:{},status:{nullValue:"o",order:"asc"},priority:{nullValue:"~",order:"desc"},creationDate:{nullValue:"1970-01-01",order:"desc"},completionDate:{nullValue:"1970-01-01",order:"desc"},"meta-due":{nullValue:"9999-12-31",order:"asc"}},o={status:{nullValue:"o"},priority:{nullValue:"~"},project:{nullValue:"+null"},context:{nullValue:"@null"},"meta-due":{nullValue:"null"}};function n(t,e,o){return o.indexOf(t)===e}function r(t){const e=t[0],o="asc"==t[1]?1:-1,n=t[2];if("meta-"==e.slice(0,5)){var r=e.slice(5);return function(t,e){var s=t.todo.getMeta(r)[0]||n,i=e.todo.getMeta(r)[0]||n;return console.log(e.todo.getMeta(r)),s>i?1*o:st.toLowerCase()),o.map(t=>t.toLowerCase()).some(t=>n.includes(t))):o.some(t=>n.includes(t))}}switch(o){case"status":return function(t){return n.includes(t.todo.getStatus(r))};case"priority":return function(t){return n.includes(t.todo.getPriority(r))};case"project":return function(t){const o=t.todo.getProjects();return o.length<1&&o.push(r),n=n.map(t=>43==t.charCodeAt(0)?t:"+"+t),e?(n=n.map(t=>t.toLowerCase()),o.map(t=>t.toLowerCase()).some(t=>n.includes(t))):o.some(t=>n.includes(t))};case"context":return function(t){const o=t.todo.getContexts();return o.length<1&&o.push(r),n=n.map(t=>64==t.charCodeAt(0)?t:"@"+t),e?(n=n.map(t=>t.toLowerCase()),o.map(t=>t.toLowerCase()).some(t=>n.includes(t))):o.some(t=>n.includes(t))}}}function i(t,e){this.list_=t,this.todoTxt_=e}i.prototype.toString=function(){return this.list_.map(t=>t.todo?t.lineIdx+": "+t.todo.toString():t.lineIdx+": "+t.raw).join("\n")},i.prototype.getList=function(){return this.list_},i.prototype.sort=function(t){for(var o=[],n=0;n1&&["desc","asc"].includes(r[1])&&(s=r[1]),r.length>2&&(l=r[2]),(o=o.filter(t=>t[0]!==i)).push([i,s,l])}else(o=o.filter(t=>"priority"!==t[0]&&"status"!==t[0])).push(["priority",e.priority.order,e.priority.nullValue]),o.push(["status",e.status.order,e.status.nullValue])}var c=this.list_;for(n=0;n2&&(l=e[2]),n.push([e[0],e[1],l])}}var c=this.list_;for(r=0;rt.todo.isCompleted()).length;case"notcompleted":return this.list_.filter(t=>!1===t.todo.isCompleted()).length;default:return this.list_.length}},i.prototype.getCountedProjects=function(){return this.list_.reduce((t,e)=>t.concat(e.todo.getProjects().filter(n)),[]).reduce((t,e)=>(t[e]=1+(0|t[e]),t),{})},i.prototype.getCountedContexts=function(){return this.list_.reduce((t,e)=>t.concat(e.todo.getContexts().filter(n)),[]).reduce((t,e)=>(t[e]=1+(0|t[e]),t),{})},t.exports=i}},e={};return function o(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={exports:{}};return t[n](s,s.exports,o),s.exports}(718)})()},t.exports=n()}]).default; \ No newline at end of file diff --git a/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdRule.js b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdRule.js new file mode 100644 index 000000000..7d16faf4c --- /dev/null +++ b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdRule.js @@ -0,0 +1 @@ +exports.default=function(t){var e={};function n(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(o,s,function(e){return t[e]}.bind(null,s));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){const o=n(1);function s(t,e){var n=[];const o=e.todo,s=Object.assign(new t.Token("checkbox_input","input",0),{attrs:[["type","checkbox"]]});o.isCompleted()&&s.attrs.push(["checked","checked"]),n=n.concat([Object.assign(new t.Token("label_open","label",1),{attrs:[["class","todo-checkbox"]]}),s,Object.assign(new t.Token("span_open","span",1),{attrs:[["class","todo-checkmark"]]}),new t.Token("span_close","span",-1),new t.Token("label_close","label",-1)]);const r=o.getPriority("~");var i=["A","B","C","D","E","~"];!1===i.includes(r)&&(i=["A","B","C","D","E",r,"~"]),n.push(Object.assign(new t.Token("div_open","div",1),{attrs:[["class","todo-priority"]]})),n.push(Object.assign(new t.Token("select_open","select",1),{attrs:[["name","priority"]]})),i.forEach((function(e){let o=new t.Token("option_open","option",1);o.attrs=[["value",e]],r==e&&o.attrs.push(["selected","selected"]),n.push(o),n.push(Object.assign(new t.Token("html_inline","",0),{content:e})),n.push(new t.Token("option_close","option",-1))})),n.push(new t.Token("select_close","select",-1)),n.push(new t.Token("div_close","div",-1));var c="";const l=o.getBodyTokens();for(var u=0;u${t.content}`;break;case"context":c+=` ${t.content}`;break;case"meta":c+=` ${t.content}`;break;default:c=c+" "+t.content}}return n.push(Object.assign(new t.Token("inline","",0),{content:c,children:[]})),n.push(Object.assign(new t.Token("span_open","span",1),{attrs:[["class","todo-panel"]]})),c=`${o.getCompletionDate()||" "} `,c+=`${o.getCreationDate()||" "} `,c+='Select',n.push(Object.assign(new t.Token("inline","",0),{content:c,children:[]})),n.push(new t.Token("span_close","span",-1)),n}function r(t,e,n,r){var i=t.tokens;for(let e=0;e0&&a.push(t.shift()),l.push(a)}}const f=n.content.split("\n");f[f.length-1].search("```")>=0&&f.pop();const g=o.parse(f.join("\n")).getTodoView(),_=g.filter(l,!0).sort(c),k=_.getCountedProjects(),y=_.getCountedContexts();todoTokens=[],todoTokens.push(Object.assign(new t.Token("bullet_list_open","ul",1),{block:!0,attrs:[["class","todotxt"]]}));var p=`Sort: ${c.join(" ")} Filter: ${l.join(" ")} Show: ${_.count("notcompleted")}/${g.count("notcompleted")} OPEN ${_.count()}/${g.count()} ALL `;p+="Projects: ",Object.keys(k).sort().forEach(t=>{p+=`${t}${k[t]} `}),p+="Contexts: ",Object.keys(y).sort().forEach(t=>{p+=`${t}${y[t]} `}),todoTokens.push(Object.assign(new t.Token("list_item_open","li",1),{block:!0,attrs:[["class","todotxt-header"]]})),todoTokens.push(Object.assign(new t.Token("inline","",0),{content:p,children:[]})),todoTokens.push(Object.assign(new t.Token("list_item_open","li",-1),{block:!0}));const m=_.getList();for(u=0;u{"use strict";var t={283:t=>{function e(t){switch(t){case 9:case 32:return!0}return!1}function n(t){this.tokens_=[];for(var o=0,s=t.length-1;o=0&&e(t.charCodeAt(s));s--);const r=t.substr(o,s-o+1);this.tokens_.push({type:"leadingSpace",content:t.substr(0,o)});const i=r.split(" ");i.length>0&&"x"==i[0]?this.tokens_.push({type:"status",content:i.shift()}):this.tokens_.push({type:"status",content:null}),i.length>0&&3==i[0].length&&40==i[0].charCodeAt(0)&&41==i[0].charCodeAt(2)&&i[0].charCodeAt(1)>=65&&i[0].charCodeAt(1)<=90?this.tokens_.push({type:"priority",content:i.shift()}):this.tokens_.push({type:"priority",content:null}),i.length>0&&n.isIsoDate(i[0])?(i.length>1&&n.isIsoDate(i[1])?this.tokens_.push({type:"completionDate",content:i.shift()}):this.tokens_.push({type:"completionDate",content:null}),this.tokens_.push({type:"creationDate",content:i.shift()})):(this.tokens_.push({type:"completionDate",content:null}),this.tokens_.push({type:"creationDate",content:null}));for(let t=0;t1&&43==e.charCodeAt(0)&&43!=e.charCodeAt(1)?this.tokens_.push({type:"project",content:e}):e.length>1&&64==e.charCodeAt(0)&&64!=e.charCodeAt(1)?this.tokens_.push({type:"context",content:e}):e.length>2&&e.charCodeAt(0)>=65&&e.charCodeAt(0)<=122&&e.indexOf(":")>=0&&e.indexOf(":")!=e.length-1&&0==!!e.split(":")[0].match(/[^a-zA-Z0-9]/)?this.tokens_.push({type:"meta",content:e}):this.tokens_.push({type:"text",content:e})}this.tokens_.push({type:"trailingSpace",content:t.substr(s+1,t.length)})}n.isIsoDate=function(t){return 10==t.length&&(45==t.charCodeAt(4)||45==t.charCodeAt(7))&&!isNaN(Date.parse(t))},n.prototype.toString=function(){return this.tokens_[0].content+this.tokens_.slice(1,-1).filter(t=>t.content).map(t=>t.content).join(" ")+this.tokens_[this.tokens_.length-1].content},n.prototype.getStatus=function(t=null){return this.tokens_[1].content?this.tokens_[1].content:t},n.prototype.isCompleted=function(){return!!this.tokens_[1].content},n.prototype.setCompleted=function(){this.tokens_[1].content="x"},n.prototype.unsetCompleted=function(){this.tokens_[1].content=null},n.prototype.getPriority=function(t=null){return this.tokens_[2].content?this.tokens_[2].content.charAt(1):t},n.prototype.setPriority=function(t=null){if(t){if(t.length>1)return;const e=t.charCodeAt(0);if(e<65||e>90)return;this.tokens_[2].content="("+t+")"}else this.tokens_[2].content=null},n.prototype.getCompletionDate=function(t=null){return t=t&&n.isIsoDate(t)?t:null,this.tokens_[3].content?this.tokens_[3].content:t},n.prototype.setCompletionDate=function(t){null!==t?n.isIsoDate(t)&&(this.tokens_[3].content=t,this.tokens_[4].content=this.tokens_[4].content||t):this.tokens_[3].content=null},n.prototype.getCreationDate=function(t=null){return t=t&&n.isIsoDate(t)?t:null,this.tokens_[4].content?this.tokens_[4].content:t},n.prototype.setCreationDate=function(t){if(null===t)return this.tokens_[3].content=null,void(this.tokens_[4].content=null);n.isIsoDate(t)&&(this.tokens_[4].content=t)},n.prototype.getProjects=function(){const t=[];for(let e=5;e{var o=n(283),s=n(814);function r(t){this.raw_=t,this.list_=[],this.deleted_=[];const e=t.split("\n");for(let t=0;t0?new o(n):null;this.list_.push({lineIdx:t,raw:n,todo:s})}}r.parse=function(t){return new r(t)},r.parseLine=function(t){return t.trim().length>0?new o(t):null},r.isIsoDate=function(t){return o.isIsoDate(t)},r.prototype.toString=function(){return this.list_.map(t=>t.todo?t.todo.toString():t.raw).join("\n")},r.prototype.getList=function(){return this.list_},r.prototype.getDeleted=function(){return this.deleted_},r.prototype.getTodos=function(){return this.list_.filter(t=>t.todo).map(t=>t.todo)},r.prototype.getTodoView=function(){return new s(this.list_.filter(t=>t.todo),this)},r.prototype.trim=function(){return this.getTodos().forEach(t=>t.trim()),this.deleted_=this.deleted_.concat(this.list_.filter(t=>null==t.todo)),this.list_=this.list_.filter(t=>t.todo),this},r.prototype.delete=function(t){const e=this.list_.indexOf(t);return e>=0&&(this.list_.splice(e,1),this.deleted_.push(t)),this},t.exports=r},814:t=>{var e={default:{},status:{nullValue:"o",order:"asc"},priority:{nullValue:"~",order:"desc"},creationDate:{nullValue:"1970-01-01",order:"desc"},completionDate:{nullValue:"1970-01-01",order:"desc"},"meta-due":{nullValue:"9999-12-31",order:"asc"}},n={status:{nullValue:"o"},priority:{nullValue:"~"},project:{nullValue:"+null"},context:{nullValue:"@null"},"meta-due":{nullValue:"null"}};function o(t,e,n){return n.indexOf(t)===e}function s(t){const e=t[0],n="asc"==t[1]?1:-1,o=t[2];if("meta-"==e.slice(0,5)){var s=e.slice(5);return function(t,e){var r=t.todo.getMeta(s)[0]||o,i=e.todo.getMeta(s)[0]||o;return console.log(e.todo.getMeta(s)),r>i?1*n:rt.toLowerCase()),n.map(t=>t.toLowerCase()).some(t=>o.includes(t))):n.some(t=>o.includes(t))}}switch(n){case"status":return function(t){return o.includes(t.todo.getStatus(s))};case"priority":return function(t){return o.includes(t.todo.getPriority(s))};case"project":return function(t){const n=t.todo.getProjects();return n.length<1&&n.push(s),o=o.map(t=>43==t.charCodeAt(0)?t:"+"+t),e?(o=o.map(t=>t.toLowerCase()),n.map(t=>t.toLowerCase()).some(t=>o.includes(t))):n.some(t=>o.includes(t))};case"context":return function(t){const n=t.todo.getContexts();return n.length<1&&n.push(s),o=o.map(t=>64==t.charCodeAt(0)?t:"@"+t),e?(o=o.map(t=>t.toLowerCase()),n.map(t=>t.toLowerCase()).some(t=>o.includes(t))):n.some(t=>o.includes(t))}}}function i(t,e){this.list_=t,this.todoTxt_=e}i.prototype.toString=function(){return this.list_.map(t=>t.todo?t.lineIdx+": "+t.todo.toString():t.lineIdx+": "+t.raw).join("\n")},i.prototype.getList=function(){return this.list_},i.prototype.sort=function(t){for(var n=[],o=0;o1&&["desc","asc"].includes(s[1])&&(r=s[1]),s.length>2&&(c=s[2]),(n=n.filter(t=>t[0]!==i)).push([i,r,c])}else(n=n.filter(t=>"priority"!==t[0]&&"status"!==t[0])).push(["priority",e.priority.order,e.priority.nullValue]),n.push(["status",e.status.order,e.status.nullValue])}var l=this.list_;for(o=0;o2&&(c=e[2]),o.push([e[0],e[1],c])}}var l=this.list_;for(s=0;st.todo.isCompleted()).length;case"notcompleted":return this.list_.filter(t=>!1===t.todo.isCompleted()).length;default:return this.list_.length}},i.prototype.getCountedProjects=function(){return this.list_.reduce((t,e)=>t.concat(e.todo.getProjects().filter(o)),[]).reduce((t,e)=>(t[e]=1+(0|t[e]),t),{})},i.prototype.getCountedContexts=function(){return this.list_.reduce((t,e)=>t.concat(e.todo.getContexts().filter(o)),[]).reduce((t,e)=>(t[e]=1+(0|t[e]),t),{})},t.exports=i}},e={};return function n(o){var s=e[o];if(void 0!==s)return s.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,n),r.exports}(718)})()},t.exports=o()}]).default; \ No newline at end of file diff --git a/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdView.css b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdView.css new file mode 100644 index 000000000..41632decf --- /dev/null +++ b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdView.css @@ -0,0 +1,163 @@ +ul.todotxt { + --color-default: #999; + --color-faded: #999; + --color-A: rgb(247, 210, 110); /* yellow* */ + --color-B: rgb(152, 104, 1); /* red */ + --color-C: rgb(80, 161, 79); /* green */ + --color-D: rgb(21, 91, 218); /* blue */ + --project-background-color: rgb(247, 210, 110); + --project-color: black; + --context-color: rgb(152, 104, 1); + --transition-duration: 0.15s; +} + +ul.todotxt { list-style:none; } +ul.todotxt li { + list-style-type:none; + border-bottom: dashed 1px; + margin-bottom: 4px; + line-height: 1.2em; +} +ul.todotxt li.todotxt-header { + font-size: 10px; +} + +.todo-priority { + display: inline-block; + width: 1.2em; + overflow: hidden; + color: var(--color-default); + vertical-align: text-bottom; +} +.todo-priority select { + appearance: none; + background-color: transparent; + border-color: transparent; + color: inherit; + font-size: inherit; + font-weight: 700; + cursor: pointer; +} +.todo-priority select:focus-visible { + outline: none; +} +.todo-priority select:hover { + text-decoration: underline; +} + +.todo-panel { + display: block; + font-size: 12px; + line-height: 1em; + text-align: right; + margin: 2px 0 4px 0; + color: var(--color-faded); +} +.todo-completion, .todo-creation { + display: inline-block; + min-width: 6em; +} +.todo-project { + background-color: var(--project-background-color); + color: var(--project-color); + border-radius: 2px; +} +.todo-context { + color: var(--context-color); +} +.todo-count { + color: var(--color-faded); +} +.todo-count::before{ + content: '/'; +} +.todo-meta { + color: var(--color-faded); +} +.todo-select { + display: inline-block; + min-width: 3em; + text-decoration: none; +} +.todo-checkbox { + margin-left: -1.9em; + margin-right: 0.5em; + display: inline-block; + vertical-align: text-top; + position: relative; + cursor: pointer; + user-select: none; +} + +.todo-checkbox input { + position: absolute; + display: none; +} + +.todo-checkbox .todo-checkmark { + width : 1.2em; + height: 1.2em; + position: relative; + display : inline-block; + overflow: hidden; + text-align: center; + color: white; + border: solid 1px var(--color-default); + border-radius: 100%; + transition: background-color var(--transition-duration) ease-in; +} +.todo-checkbox input:checked ~ .todo-checkmark { + background-color: var(--color-default); +} +.todo-checkbox .todo-checkmark:after { + content: '×'; + position: relative; + display: inline-block; + transition: opacity var(--transition-duration); + opacity: 0; +} +.todo-checkbox input:checked ~ .todo-checkmark:after { + opacity: 1.0; +} + +/* Color scheme */ +.prior-A .todo-priority { + color: var(--color-A); +} +.prior-A .todo-checkbox .todo-checkmark { + border-color: var(--color-A); + color: black; +} +.prior-A .todo-checkbox input:checked ~ .todo-checkmark { + background-color: var(--color-A); +} + +.prior-B .todo-priority { + color: var(--color-B); +} +.prior-B .todo-checkbox .todo-checkmark { + border-color: var(--color-B); +} +.prior-B .todo-checkbox input:checked ~ .todo-checkmark { + background-color: var(--color-B); +} + +.prior-C .todo-priority { + color: var(--color-C); +} +.prior-C .todo-checkbox .todo-checkmark { + border-color: var(--color-C); +} +.prior-C .todo-checkbox input:checked ~ .todo-checkmark { + background-color: var(--color-C); +} + +.prior-D .todo-priority { + color: var(--color-D); +} +.prior-D .todo-checkbox .todo-checkmark { + border-color: var(--color-D); +} +.prior-D .todo-checkbox input:checked ~ .todo-checkmark { + background-color: var(--color-D); +} diff --git a/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdView.js b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdView.js new file mode 100644 index 000000000..9e5d5019e --- /dev/null +++ b/packages/app-mobile/plugins/com.hieuthi.joplin.metis/todoTxtMdView.js @@ -0,0 +1,38 @@ +document.addEventListener('joplin-noteDidUpdate', makeTodoViewActionable ); + +if (/WebKit/i.test(navigator.userAgent)) { // sniff + var _timer_todotxt = setInterval(function() { + if (/loaded|complete/.test(document.readyState)) { + makeTodoViewActionable() + } + }, 10); +} + +function makeTodoViewActionable() { + if (_timer_todotxt) clearInterval(_timer_todotxt); + + const todoTxts = document.getElementsByClassName('todotxt'); + for (var i=0; i {webviewApi.postMessage('todoTxtMd', `toggleStatus:${lineIdx}`)}, 170); + } + priority.onchange = function(option) { + var value = option.target.value; + webviewApi.postMessage('todoTxtMd', `changePriority:${lineIdx}:${value}`); + } + selectButton.onclick = function () { + webviewApi.postMessage('todoTxtMd', `selectLine:${lineIdx}`); + } + } + } +} \ No newline at end of file diff --git a/packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/index.js b/packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/index.js new file mode 100644 index 000000000..8c170b421 --- /dev/null +++ b/packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/index.js @@ -0,0 +1,17 @@ +const initPlugin = joplin => { + +joplin.plugins.register({ + onStart: async function() { + await joplin.contentScripts.register( + 'markdownItPlugin', + 'abc_music_sheet', + './markdownItPlugin.js' + ); + }, +}); + +//!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function u(t){try{c(o.next(t))}catch(t){i(t)}}function l(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,l)}c((o=o.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(2);r.default.plugins.register({onStart:function(){return o(this,void 0,void 0,(function*(){yield r.default.contentScripts.register(i.ContentScriptType.MarkdownItPlugin,"abc_music_sheet","./markdownItPlugin.js"),setInterval(()=>{console.log("AAAAAAAAAAAAAAA")},1e3)}))}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=joplin},function(t,e,n){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.ContentScriptType=e.SettingStorage=e.AppType=e.SettingItemType=e.ToolbarButtonLocation=e.isContextMenuItemLocation=e.MenuItemLocation=e.ImportModuleOutputFormat=e.FileSystemItem=void 0,function(t){t.File="file",t.Directory="directory"}(e.FileSystemItem||(e.FileSystemItem={})),function(t){t.Markdown="md",t.Html="html"}(e.ImportModuleOutputFormat||(e.ImportModuleOutputFormat={})),function(t){t.File="file",t.Edit="edit",t.View="view",t.Note="note",t.Tools="tools",t.Help="help",t.Context="context",t.NoteListContextMenu="noteListContextMenu",t.EditorContextMenu="editorContextMenu",t.FolderContextMenu="folderContextMenu",t.TagContextMenu="tagContextMenu"}(o=e.MenuItemLocation||(e.MenuItemLocation={})),e.isContextMenuItemLocation=function(t){return[o.Context,o.NoteListContextMenu,o.EditorContextMenu,o.FolderContextMenu,o.TagContextMenu].includes(t)},function(t){t.NoteToolbar="noteToolbar",t.EditorToolbar="editorToolbar"}(e.ToolbarButtonLocation||(e.ToolbarButtonLocation={})),function(t){t[t.Int=1]="Int",t[t.String=2]="String",t[t.Bool=3]="Bool",t[t.Array=4]="Array",t[t.Object=5]="Object",t[t.Button=6]="Button"}(e.SettingItemType||(e.SettingItemType={})),function(t){t.Desktop="desktop",t.Mobile="mobile",t.Cli="cli"}(e.AppType||(e.AppType={})),function(t){t[t.Database=1]="Database",t[t.File=2]="File"}(e.SettingStorage||(e.SettingStorage={})),function(t){t.MarkdownItPlugin="markdownItPlugin",t.CodeMirrorPlugin="codeMirrorPlugin"}(e.ContentScriptType||(e.ContentScriptType={}))}]); + +} + +module.exports = { initPlugin }; diff --git a/packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/manifest.json b/packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/manifest.json new file mode 100644 index 000000000..77ec329e7 --- /dev/null +++ b/packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/manifest.json @@ -0,0 +1,16 @@ +{ + "manifest_version": 1, + "id": "org.joplinapp.plugins.AbcSheetMusic", + "app_min_version": "2.2", + "version": "1.0.2", + "name": "ABC Sheet Music Plugin", + "description": "Turns ABC text notation into sheet music", + "author": "Laurent Cozic", + "homepage_url": "https://github.com/joplin/plugin-abc-sheet-music", + "repository_url": "https://github.com/joplin/plugin-abc-sheet-music", + "keywords": [ + "sheet music", + "abc", + "notation" + ] +} diff --git a/packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/markdownItPlugin.js b/packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/markdownItPlugin.js new file mode 100644 index 000000000..2129aae09 --- /dev/null +++ b/packages/app-mobile/plugins/org.joplinapp.plugins.AbcSheetMusic/markdownItPlugin.js @@ -0,0 +1,15621 @@ +exports.default = function(e) { + var t = {}; + + function r(i) { + if (t[i]) return t[i].exports; + var a = t[i] = { + i: i, + l: !1, + exports: {} + }; + return e[i].call(a.exports, a, a.exports, r), a.l = !0, a.exports + } + return r.m = e, r.c = t, r.d = function(e, t, i) { + r.o(e, t) || Object.defineProperty(e, t, { + enumerable: !0, + get: i + }) + }, r.r = function(e) { + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { + value: "Module" + }), Object.defineProperty(e, "__esModule", { + value: !0 + }) + }, r.t = function(e, t) { + if (1 & t && (e = r(e)), 8 & t) return e; + if (4 & t && "object" == typeof e && e && e.__esModule) return e; + var i = Object.create(null); + if (r.r(i), Object.defineProperty(i, "default", { + enumerable: !0, + value: e + }), 2 & t && "string" != typeof e) + for (var a in e) r.d(i, a, function(t) { + return e[t] + }.bind(null, a)); + return i + }, r.n = function(e) { + var t = e && e.__esModule ? function() { + return e.default + } : function() { + return e + }; + return r.d(t, "a", t), t + }, r.o = function(e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + }, r.p = "", r(r.s = 27) +}([function(e, t) { + var r = { + clone: function(e) { + var t = {}; + for (var r in e) e.hasOwnProperty(r) && (t[r] = e[r]); + return t + }, + cloneArray: function(e) { + for (var t = [], i = 0; i < e.length; i++) t.push(r.clone(e[i])); + return t + }, + cloneHashOfHash: function(e) { + var t = {}; + for (var i in e) e.hasOwnProperty(i) && (t[i] = r.clone(e[i])); + return t + }, + cloneHashOfArrayOfHash: function(e) { + var t = {}; + for (var i in e) e.hasOwnProperty(i) && (t[i] = r.cloneArray(e[i])); + return t + }, + gsub: function(e, t, r) { + return e.split(t).join(r) + }, + strip: function(e) { + return e.replace(/^\s+/, "").replace(/\s+$/, "") + }, + startsWith: function(e, t) { + return 0 === e.indexOf(t) + }, + endsWith: function(e, t) { + var r = e.length - t.length; + return r >= 0 && e.lastIndexOf(t) === r + }, + each: function(e, t, r) { + for (var i = 0, a = e.length; i < a; i++) t.apply(r, [e[i], i]) + }, + last: function(e) { + return 0 === e.length ? null : e[e.length - 1] + }, + compact: function(e) { + for (var t = [], r = 0; r < e.length; r++) e[r] && t.push(e[r]); + return t + }, + detect: function(e, t) { + for (var r = 0; r < e.length; r++) + if (t(e[r])) return !0; + return !1 + } + }; + // [Element.prototype, CharacterData.prototype, DocumentType.prototype].forEach((function(e) { + // e.hasOwnProperty("remove") || Object.defineProperty(e, "remove", { + // configurable: !0, + // enumerable: !0, + // writable: !0, + // value: function() { + // null !== this.parentNode && this.parentNode.removeChild(this) + // } + // }) + // })), + e.exports = r +}, function(e, t) { + var r = { + FONTEM: 360, + FONTSIZE: 30 + }; + r.STEP = 93 * r.FONTSIZE / 720, r.SPACE = 10, r.TOPNOTE = 15, r.STAVEHEIGHT = 100, r.INDENT = 50, e.exports = r +}, function(e, t) { + var r = function(e, t, r, i, a) { + switch (a = a || {}, this.x = 0, this.c = e, this.dx = t, this.w = r, this.pitch = i, this.scalex = a.scalex || 1, this.scaley = a.scaley || 1, this.type = a.type || "symbol", this.pitch2 = a.pitch2, this.linewidth = a.linewidth, this.klass = a.klass, this.top = i, void 0 !== this.pitch2 && this.pitch2 > this.top && (this.top = this.pitch2), this.bottom = i, void 0 !== this.pitch2 && this.pitch2 < this.bottom && (this.bottom = this.pitch2), a.thickness && (this.top += a.thickness / 2, this.bottom -= a.thickness / 2), a.stemHeight && (a.stemHeight > 0 ? this.top += a.stemHeight : this.bottom += a.stemHeight), this.height = a.height ? a.height : 4, this.centerVertically = !1, this.type) { + case "debug": + this.chordHeightAbove = this.height; + break; + case "lyric": + a.position && "below" === a.position ? this.lyricHeightBelow = this.height : this.lyricHeightAbove = this.height; + break; + case "chord": + a.position && "below" === a.position ? this.chordHeightBelow = this.height : this.chordHeightAbove = this.height; + break; + case "text": + void 0 === this.pitch ? a.position && "below" === a.position ? this.chordHeightBelow = this.height : this.chordHeightAbove = this.height : this.centerVertically = !0; + break; + case "part": + this.partHeightAbove = this.height + } + }; + r.prototype.setX = function(e) { + this.x = e + this.dx + }, r.prototype.setUpperAndLowerElements = function(e) { + switch (this.type) { + case "part": + this.top = e.partHeightAbove + this.height, this.bottom = e.partHeightAbove; + break; + case "text": + case "chord": + this.chordHeightAbove ? (this.top = e.chordHeightAbove, this.bottom = e.chordHeightAbove) : (this.top = e.chordHeightBelow, this.bottom = e.chordHeightBelow); + break; + case "lyric": + this.lyricHeightAbove ? (this.top = e.lyricHeightAbove, this.bottom = e.lyricHeightAbove) : (this.top = e.lyricHeightBelow, this.bottom = e.lyricHeightBelow); + break; + case "debug": + this.top = e.chordHeightAbove, this.bottom = e.chordHeightAbove + } + void 0 !== this.pitch && void 0 !== this.top || window.console.error("RelativeElement position not set.", this.type, this.pitch, this.top, e) + }, r.prototype.draw = function(e, t) { + void 0 === this.pitch && window.console.error(this.type + " Relative Element y-coordinate not set."); + var r = e.calcY(this.pitch); + switch (this.type) { + case "symbol": + if (null === this.c) return null; + var i = "symbol"; + this.klass && (i += " " + this.klass), this.graphelem = e.printSymbol(this.x, this.pitch, this.c, this.scalex, this.scaley, e.addClasses(i)); + break; + case "debug": + this.graphelem = e.renderText(this.x, e.calcY(15), "" + this.c, "debugfont", "debug-msg", "start"); + break; + case "barNumber": + this.graphelem = e.renderText(this.x, r, "" + this.c, "measurefont", "bar-number", "middle"); + break; + case "lyric": + this.graphelem = e.renderText(this.x, r, this.c, "vocalfont", "lyric", "middle"); + break; + case "chord": + this.graphelem = e.renderText(this.x, r, this.c, "gchordfont", "chord", "middle"); + break; + case "decoration": + this.graphelem = e.renderText(this.x, r, this.c, "annotationfont", "annotation", "middle", !0); + break; + case "text": + this.graphelem = e.renderText(this.x, r, this.c, "annotationfont", "annotation", "start", this.centerVertically); + break; + case "multimeasure-text": + this.graphelem = e.renderText(this.x + this.w / 2, r, this.c, "tempofont", "rest", "middle", !1); + break; + case "part": + this.graphelem = e.renderText(this.x, r, this.c, "partsfont", "part", "start"); + break; + case "bar": + this.graphelem = e.printStem(this.x, this.linewidth, r, t || e.calcY(this.pitch2)); + break; + case "stem": + this.graphelem = e.printStem(this.x, this.linewidth, r, e.calcY(this.pitch2)); + break; + case "ledger": + this.graphelem = e.printStaveLine(this.x, this.x + this.w, this.pitch) + } + return 1 !== this.scalex && this.graphelem && e.scaleExistingElem(this.graphelem, this.scalex, this.scaley, this.x, r), this.graphelem + }, e.exports = r +}, function(e, t, r) { + var i = r(1), + a = { + 0: { + d: [ + ["M", 4.83, -14.97], + ["c", .33, -.03, 1.11, 0, 1.47, .06], + ["c", 1.68, .36, 2.97, 1.59, 3.78, 3.6], + ["c", 1.2, 2.97, .81, 6.96, -.9, 9.27], + ["c", -.78, 1.08, -1.71, 1.71, -2.91, 1.95], + ["c", -.45, .09, -1.32, .09, -1.77, 0], + ["c", -.81, -.18, -1.47, -.51, -2.07, -1.02], + ["c", -2.34, -2.07, -3.15, -6.72, -1.74, -10.2], + ["c", .87, -2.16, 2.28, -3.42, 4.14, -3.66], + ["z"], + ["m", 1.11, .87], + ["c", -.21, -.06, -.69, -.09, -.87, -.06], + ["c", -.54, .12, -.87, .42, -1.17, .99], + ["c", -.36, .66, -.51, 1.56, -.6, 3], + ["c", -.03, .75, -.03, 4.59, 0, 5.31], + ["c", .09, 1.5, .27, 2.4, .6, 3.06], + ["c", .24, .48, .57, .78, .96, .9], + ["c", .27, .09, .78, .09, 1.05, 0], + ["c", .39, -.12, .72, -.42, .96, -.9], + ["c", .33, -.66, .51, -1.56, .6, -3.06], + ["c", .03, -.72, .03, -4.56, 0, -5.31], + ["c", -.09, -1.47, -.27, -2.37, -.6, -3.03], + ["c", -.24, -.48, -.54, -.78, -.93, -.9], + ["z"] + ], + w: 10.78, + h: 14.959 + }, + 1: { + d: [ + ["M", 3.3, -15.06], + ["c", .06, -.06, .21, -.03, .66, .15], + ["c", .81, .39, 1.08, .39, 1.83, .03], + ["c", .21, -.09, .39, -.15, .42, -.15], + ["c", .12, 0, .21, .09, .27, .21], + ["c", .06, .12, .06, .33, .06, 5.94], + ["c", 0, 3.93, 0, 5.85, .03, 6.03], + ["c", .06, .36, .15, .69, .27, .96], + ["c", .36, .75, .93, 1.17, 1.68, 1.26], + ["c", .3, .03, .39, .09, .39, .3], + ["c", 0, .15, -.03, .18, -.09, .24], + ["c", -.06, .06, -.09, .06, -.48, .06], + ["c", -.42, 0, -.69, -.03, -2.1, -.24], + ["c", -.9, -.15, -1.77, -.15, -2.67, 0], + ["c", -1.41, .21, -1.68, .24, -2.1, .24], + ["c", -.39, 0, -.42, 0, -.48, -.06], + ["c", -.06, -.06, -.06, -.09, -.06, -.24], + ["c", 0, -.21, .06, -.27, .36, -.3], + ["c", .75, -.09, 1.32, -.51, 1.68, -1.26], + ["c", .12, -.27, .21, -.6, .27, -.96], + ["c", .03, -.18, .03, -1.59, .03, -4.29], + ["c", 0, -3.87, 0, -4.05, -.06, -4.14], + ["c", -.09, -.15, -.18, -.24, -.39, -.24], + ["c", -.12, 0, -.15, .03, -.21, .06], + ["c", -.03, .06, -.45, .99, -.96, 2.13], + ["c", -.48, 1.14, -.9, 2.1, -.93, 2.16], + ["c", -.06, .15, -.21, .24, -.33, .24], + ["c", -.24, 0, -.42, -.18, -.42, -.39], + ["c", 0, -.06, 3.27, -7.62, 3.33, -7.74], + ["z"] + ], + w: 8.94, + h: 15.058 + }, + 2: { + d: [ + ["M", 4.23, -14.97], + ["c", .57, -.06, 1.68, 0, 2.34, .18], + ["c", .69, .18, 1.5, .54, 2.01, .9], + ["c", 1.35, .96, 1.95, 2.25, 1.77, 3.81], + ["c", -.15, 1.35, -.66, 2.34, -1.68, 3.15], + ["c", -.6, .48, -1.44, .93, -3.12, 1.65], + ["c", -1.32, .57, -1.8, .81, -2.37, 1.14], + ["c", -.57, .33, -.57, .33, -.24, .27], + ["c", .39, -.09, 1.26, -.09, 1.68, 0], + ["c", .72, .15, 1.41, .45, 2.1, .9], + ["c", .99, .63, 1.86, .87, 2.55, .75], + ["c", .24, -.06, .42, -.15, .57, -.3], + ["c", .12, -.09, .3, -.42, .3, -.51], + ["c", 0, -.09, .12, -.21, .24, -.24], + ["c", .18, -.03, .39, .12, .39, .3], + ["c", 0, .12, -.15, .57, -.3, .87], + ["c", -.54, 1.02, -1.56, 1.74, -2.79, 2.01], + ["c", -.42, .09, -1.23, .09, -1.62, .03], + ["c", -.81, -.18, -1.32, -.45, -2.01, -1.11], + ["c", -.45, -.45, -.63, -.57, -.96, -.69], + ["c", -.84, -.27, -1.89, .12, -2.25, .9], + ["c", -.12, .21, -.21, .54, -.21, .72], + ["c", 0, .12, -.12, .21, -.27, .24], + ["c", -.15, 0, -.27, -.03, -.33, -.15], + ["c", -.09, -.21, .09, -1.08, .33, -1.71], + ["c", .24, -.66, .66, -1.26, 1.29, -1.89], + ["c", .45, -.45, .9, -.81, 1.92, -1.56], + ["c", 1.29, -.93, 1.89, -1.44, 2.34, -1.98], + ["c", .87, -1.05, 1.26, -2.19, 1.2, -3.63], + ["c", -.06, -1.29, -.39, -2.31, -.96, -2.91], + ["c", -.36, -.33, -.72, -.51, -1.17, -.54], + ["c", -.84, -.03, -1.53, .42, -1.59, 1.05], + ["c", -.03, .33, .12, .6, .57, 1.14], + ["c", .45, .54, .54, .87, .42, 1.41], + ["c", -.15, .63, -.54, 1.11, -1.08, 1.38], + ["c", -.63, .33, -1.2, .33, -1.83, 0], + ["c", -.24, -.12, -.33, -.18, -.54, -.39], + ["c", -.18, -.18, -.27, -.3, -.36, -.51], + ["c", -.24, -.45, -.27, -.84, -.21, -1.38], + ["c", .12, -.75, .45, -1.41, 1.02, -1.98], + ["c", .72, -.72, 1.74, -1.17, 2.85, -1.32], + ["z"] + ], + w: 10.764, + h: 14.97 + }, + 3: { + d: [ + ["M", 3.78, -14.97], + ["c", .3, -.03, 1.41, 0, 1.83, .06], + ["c", 2.22, .3, 3.51, 1.32, 3.72, 2.91], + ["c", .03, .33, .03, 1.26, -.03, 1.65], + ["c", -.12, .84, -.48, 1.47, -1.05, 1.77], + ["c", -.27, .15, -.36, .24, -.45, .39], + ["c", -.09, .21, -.09, .36, 0, .57], + ["c", .09, .15, .18, .24, .51, .39], + ["c", .75, .42, 1.23, 1.14, 1.41, 2.13], + ["c", .06, .42, .06, 1.35, 0, 1.71], + ["c", -.18, .81, -.48, 1.38, -1.02, 1.95], + ["c", -.75, .72, -1.8, 1.2, -3.18, 1.38], + ["c", -.42, .06, -1.56, .06, -1.95, 0], + ["c", -1.89, -.33, -3.18, -1.29, -3.51, -2.64], + ["c", -.03, -.12, -.03, -.33, -.03, -.6], + ["c", 0, -.36, 0, -.42, .06, -.63], + ["c", .12, -.3, .27, -.51, .51, -.75], + ["c", .24, -.24, .45, -.39, .75, -.51], + ["c", .21, -.06, .27, -.06, .6, -.06], + ["c", .33, 0, .39, 0, .6, .06], + ["c", .3, .12, .51, .27, .75, .51], + ["c", .36, .33, .57, .75, .6, 1.2], + ["c", 0, .21, 0, .27, -.06, .42], + ["c", -.09, .18, -.12, .24, -.54, .54], + ["c", -.51, .36, -.63, .54, -.6, .87], + ["c", .06, .54, .54, .9, 1.38, .99], + ["c", .36, .06, .72, .03, .96, -.06], + ["c", .81, -.27, 1.29, -1.23, 1.44, -2.79], + ["c", .03, -.45, .03, -1.95, -.03, -2.37], + ["c", -.09, -.75, -.33, -1.23, -.75, -1.44], + ["c", -.33, -.18, -.45, -.18, -1.98, -.18], + ["c", -1.35, 0, -1.41, 0, -1.5, -.06], + ["c", -.18, -.12, -.24, -.39, -.12, -.6], + ["c", .12, -.15, .15, -.15, 1.68, -.15], + ["c", 1.5, 0, 1.62, 0, 1.89, -.15], + ["c", .18, -.09, .42, -.36, .54, -.57], + ["c", .18, -.42, .27, -.9, .3, -1.95], + ["c", .03, -1.2, -.06, -1.8, -.36, -2.37], + ["c", -.24, -.48, -.63, -.81, -1.14, -.96], + ["c", -.3, -.06, -1.08, -.06, -1.38, .03], + ["c", -.6, .15, -.9, .42, -.96, .84], + ["c", -.03, .3, .06, .45, .63, .84], + ["c", .33, .24, .42, .39, .45, .63], + ["c", .03, .72, -.57, 1.5, -1.32, 1.65], + ["c", -1.05, .27, -2.1, -.57, -2.1, -1.65], + ["c", 0, -.45, .15, -.96, .39, -1.38], + ["c", .12, -.21, .54, -.63, .81, -.81], + ["c", .57, -.42, 1.38, -.69, 2.25, -.81], + ["z"] + ], + w: 9.735, + h: 14.967 + }, + 4: { + d: [ + ["M", 8.64, -14.94], + ["c", .27, -.09, .42, -.12, .54, -.03], + ["c", .09, .06, .15, .21, .15, .3], + ["c", -.03, .06, -1.92, 2.31, -4.23, 5.04], + ["c", -2.31, 2.73, -4.23, 4.98, -4.26, 5.01], + ["c", -.03, .06, .12, .06, 2.55, .06], + ["l", 2.61, 0], + ["l", 0, -2.37], + ["c", 0, -2.19, .03, -2.37, .06, -2.46], + ["c", .03, -.06, .21, -.18, .57, -.42], + ["c", 1.08, -.72, 1.38, -1.08, 1.86, -2.16], + ["c", .12, -.3, .24, -.54, .27, -.57], + ["c", .12, -.12, .39, -.06, .45, .12], + ["c", .06, .09, .06, .57, .06, 3.96], + ["l", 0, 3.9], + ["l", 1.08, 0], + ["c", 1.05, 0, 1.11, 0, 1.2, .06], + ["c", .24, .15, .24, .54, 0, .69], + ["c", -.09, .06, -.15, .06, -1.2, .06], + ["l", -1.08, 0], + ["l", 0, .33], + ["c", 0, .57, .09, 1.11, .3, 1.53], + ["c", .36, .75, .93, 1.17, 1.68, 1.26], + ["c", .3, .03, .39, .09, .39, .3], + ["c", 0, .15, -.03, .18, -.09, .24], + ["c", -.06, .06, -.09, .06, -.48, .06], + ["c", -.42, 0, -.69, -.03, -2.1, -.24], + ["c", -.9, -.15, -1.77, -.15, -2.67, 0], + ["c", -1.41, .21, -1.68, .24, -2.1, .24], + ["c", -.39, 0, -.42, 0, -.48, -.06], + ["c", -.06, -.06, -.06, -.09, -.06, -.24], + ["c", 0, -.21, .06, -.27, .36, -.3], + ["c", .75, -.09, 1.32, -.51, 1.68, -1.26], + ["c", .21, -.42, .3, -.96, .3, -1.53], + ["l", 0, -.33], + ["l", -2.7, 0], + ["c", -2.91, 0, -2.85, 0, -3.09, -.15], + ["c", -.18, -.12, -.3, -.39, -.27, -.54], + ["c", .03, -.06, .18, -.24, .33, -.45], + ["c", .75, -.9, 1.59, -2.07, 2.13, -3.03], + ["c", .33, -.54, .84, -1.62, 1.05, -2.16], + ["c", .57, -1.41, .84, -2.64, .9, -4.05], + ["c", .03, -.63, .06, -.72, .24, -.81], + ["l", .12, -.06], + ["l", .45, .12], + ["c", .66, .18, 1.02, .24, 1.47, .27], + ["c", .6, .03, 1.23, -.09, 2.01, -.33], + ["z"] + ], + w: 11.795, + h: 14.994 + }, + 5: { + d: [ + ["M", 1.02, -14.94], + ["c", .12, -.09, .03, -.09, 1.08, .06], + ["c", 2.49, .36, 4.35, .36, 6.96, -.06], + ["c", .57, -.09, .66, -.06, .81, .06], + ["c", .15, .18, .12, .24, -.15, .51], + ["c", -1.29, 1.26, -3.24, 2.04, -5.58, 2.31], + ["c", -.6, .09, -1.2, .12, -1.71, .12], + ["c", -.39, 0, -.45, 0, -.57, .06], + ["c", -.09, .06, -.15, .12, -.21, .21], + ["l", -.06, .12], + ["l", 0, 1.65], + ["l", 0, 1.65], + ["l", .21, -.21], + ["c", .66, -.57, 1.41, -.96, 2.19, -1.14], + ["c", .33, -.06, 1.41, -.06, 1.95, 0], + ["c", 2.61, .36, 4.02, 1.74, 4.26, 4.14], + ["c", .03, .45, .03, 1.08, -.03, 1.44], + ["c", -.18, 1.02, -.78, 2.01, -1.59, 2.7], + ["c", -.72, .57, -1.62, 1.02, -2.49, 1.2], + ["c", -1.38, .27, -3.03, .06, -4.2, -.54], + ["c", -1.08, -.54, -1.71, -1.32, -1.86, -2.28], + ["c", -.09, -.69, .09, -1.29, .57, -1.74], + ["c", .24, -.24, .45, -.39, .75, -.51], + ["c", .21, -.06, .27, -.06, .6, -.06], + ["c", .33, 0, .39, 0, .6, .06], + ["c", .3, .12, .51, .27, .75, .51], + ["c", .36, .33, .57, .75, .6, 1.2], + ["c", 0, .21, 0, .27, -.06, .42], + ["c", -.09, .18, -.12, .24, -.54, .54], + ["c", -.18, .12, -.36, .3, -.42, .33], + ["c", -.36, .42, -.18, .99, .36, 1.26], + ["c", .51, .27, 1.47, .36, 2.01, .27], + ["c", .93, -.21, 1.47, -1.17, 1.65, -2.91], + ["c", .06, -.45, .06, -1.89, 0, -2.31], + ["c", -.15, -1.2, -.51, -2.1, -1.05, -2.55], + ["c", -.21, -.18, -.54, -.36, -.81, -.39], + ["c", -.3, -.06, -.84, -.03, -1.26, .06], + ["c", -.93, .18, -1.65, .6, -2.16, 1.2], + ["c", -.15, .21, -.27, .3, -.39, .3], + ["c", -.15, 0, -.3, -.09, -.36, -.18], + ["c", -.06, -.09, -.06, -.15, -.06, -3.66], + ["c", 0, -3.39, 0, -3.57, .06, -3.66], + ["c", .03, -.06, .09, -.15, .15, -.18], + ["z"] + ], + w: 10.212, + h: 14.997 + }, + 6: { + d: [ + ["M", 4.98, -14.97], + ["c", .36, -.03, 1.2, 0, 1.59, .06], + ["c", .9, .15, 1.68, .51, 2.25, 1.05], + ["c", .57, .51, .87, 1.23, .84, 1.98], + ["c", -.03, .51, -.21, .9, -.6, 1.26], + ["c", -.24, .24, -.45, .39, -.75, .51], + ["c", -.21, .06, -.27, .06, -.6, .06], + ["c", -.33, 0, -.39, 0, -.6, -.06], + ["c", -.3, -.12, -.51, -.27, -.75, -.51], + ["c", -.39, -.36, -.57, -.78, -.57, -1.26], + ["c", 0, -.27, 0, -.3, .09, -.42], + ["c", .03, -.09, .18, -.21, .3, -.3], + ["c", .12, -.09, .3, -.21, .39, -.27], + ["c", .09, -.06, .21, -.18, .27, -.24], + ["c", .06, -.12, .09, -.15, .09, -.33], + ["c", 0, -.18, -.03, -.24, -.09, -.36], + ["c", -.24, -.39, -.75, -.6, -1.38, -.57], + ["c", -.54, .03, -.9, .18, -1.23, .48], + ["c", -.81, .72, -1.08, 2.16, -.96, 5.37], + ["l", 0, .63], + ["l", .3, -.12], + ["c", .78, -.27, 1.29, -.33, 2.1, -.27], + ["c", 1.47, .12, 2.49, .54, 3.27, 1.29], + ["c", .48, .51, .81, 1.11, .96, 1.89], + ["c", .06, .27, .06, .42, .06, .93], + ["c", 0, .54, 0, .69, -.06, .96], + ["c", -.15, .78, -.48, 1.38, -.96, 1.89], + ["c", -.54, .51, -1.17, .87, -1.98, 1.08], + ["c", -1.14, .3, -2.4, .33, -3.24, .03], + ["c", -1.5, -.48, -2.64, -1.89, -3.27, -4.02], + ["c", -.36, -1.23, -.51, -2.82, -.42, -4.08], + ["c", .3, -3.66, 2.28, -6.3, 4.95, -6.66], + ["z"], + ["m", .66, 7.41], + ["c", -.27, -.09, -.81, -.12, -1.08, -.06], + ["c", -.72, .18, -1.08, .69, -1.23, 1.71], + ["c", -.06, .54, -.06, 3, 0, 3.54], + ["c", .18, 1.26, .72, 1.77, 1.8, 1.74], + ["c", .39, -.03, .63, -.09, .9, -.27], + ["c", .66, -.42, .9, -1.32, .9, -3.24], + ["c", 0, -2.22, -.36, -3.12, -1.29, -3.42], + ["z"] + ], + w: 9.956, + h: 14.982 + }, + 7: { + d: [ + ["M", .21, -14.97], + ["c", .21, -.06, .45, 0, .54, .15], + ["c", .06, .09, .06, .15, .06, .39], + ["c", 0, .24, 0, .33, .06, .42], + ["c", .06, .12, .21, .24, .27, .24], + ["c", .03, 0, .12, -.12, .24, -.21], + ["c", .96, -1.2, 2.58, -1.35, 3.99, -.42], + ["c", .15, .12, .42, .3, .54, .45], + ["c", .48, .39, .81, .57, 1.29, .6], + ["c", .69, .03, 1.5, -.3, 2.13, -.87], + ["c", .09, -.09, .27, -.3, .39, -.45], + ["c", .12, -.15, .24, -.27, .3, -.3], + ["c", .18, -.06, .39, .03, .51, .21], + ["c", .06, .18, .06, .24, -.27, .72], + ["c", -.18, .24, -.54, .78, -.78, 1.17], + ["c", -2.37, 3.54, -3.54, 6.27, -3.87, 9], + ["c", -.03, .33, -.03, .66, -.03, 1.26], + ["c", 0, .9, 0, 1.08, .15, 1.89], + ["c", .06, .45, .06, .48, .03, .6], + ["c", -.06, .09, -.21, .21, -.3, .21], + ["c", -.03, 0, -.27, -.06, -.54, -.15], + ["c", -.84, -.27, -1.11, -.3, -1.65, -.3], + ["c", -.57, 0, -.84, .03, -1.56, .27], + ["c", -.6, .18, -.69, .21, -.81, .15], + ["c", -.12, -.06, -.21, -.18, -.21, -.3], + ["c", 0, -.15, .6, -1.44, 1.2, -2.61], + ["c", 1.14, -2.22, 2.73, -4.68, 5.1, -8.01], + ["c", .21, -.27, .36, -.48, .33, -.48], + ["c", 0, 0, -.12, .06, -.27, .12], + ["c", -.54, .3, -.99, .39, -1.56, .39], + ["c", -.75, .03, -1.2, -.18, -1.83, -.75], + ["c", -.99, -.9, -1.83, -1.17, -2.31, -.72], + ["c", -.18, .15, -.36, .51, -.45, .84], + ["c", -.06, .24, -.06, .33, -.09, 1.98], + ["c", 0, 1.62, -.03, 1.74, -.06, 1.8], + ["c", -.15, .24, -.54, .24, -.69, 0], + ["c", -.06, -.09, -.06, -.15, -.06, -3.57], + ["c", 0, -3.42, 0, -3.48, .06, -3.57], + ["c", .03, -.06, .09, -.12, .15, -.15], + ["z"] + ], + w: 10.561, + h: 15.093 + }, + 8: { + d: [ + ["M", 4.98, -14.97], + ["c", .33, -.03, 1.02, -.03, 1.32, 0], + ["c", 1.32, .12, 2.49, .6, 3.21, 1.32], + ["c", .39, .39, .66, .81, .78, 1.29], + ["c", .09, .36, .09, 1.08, 0, 1.44], + ["c", -.21, .84, -.66, 1.59, -1.59, 2.55], + ["l", -.3, .3], + ["l", .27, .18], + ["c", 1.47, .93, 2.31, 2.31, 2.25, 3.75], + ["c", -.03, .75, -.24, 1.35, -.63, 1.95], + ["c", -.45, .66, -1.02, 1.14, -1.83, 1.53], + ["c", -1.8, .87, -4.2, .87, -6, .03], + ["c", -1.62, -.78, -2.52, -2.16, -2.46, -3.66], + ["c", .06, -.99, .54, -1.77, 1.8, -2.97], + ["c", .54, -.51, .54, -.54, .48, -.57], + ["c", -.39, -.27, -.96, -.78, -1.2, -1.14], + ["c", -.75, -1.11, -.87, -2.4, -.3, -3.6], + ["c", .69, -1.35, 2.25, -2.25, 4.2, -2.4], + ["z"], + ["m", 1.53, .69], + ["c", -.42, -.09, -1.11, -.12, -1.38, -.06], + ["c", -.3, .06, -.6, .18, -.81, .3], + ["c", -.21, .12, -.6, .51, -.72, .72], + ["c", -.51, .87, -.42, 1.89, .21, 2.52], + ["c", .21, .21, .36, .3, 1.95, 1.23], + ["c", .96, .54, 1.74, .99, 1.77, 1.02], + ["c", .09, 0, .63, -.6, .99, -1.11], + ["c", .21, -.36, .48, -.87, .57, -1.23], + ["c", .06, -.24, .06, -.36, .06, -.72], + ["c", 0, -.45, -.03, -.66, -.15, -.99], + ["c", -.39, -.81, -1.29, -1.44, -2.49, -1.68], + ["z"], + ["m", -1.44, 8.07], + ["l", -1.89, -1.08], + ["c", -.03, 0, -.18, .15, -.39, .33], + ["c", -1.2, 1.08, -1.65, 1.95, -1.59, 3], + ["c", .09, 1.59, 1.35, 2.85, 3.21, 3.24], + ["c", .33, .06, .45, .06, .93, .06], + ["c", .63, 0, .81, -.03, 1.29, -.27], + ["c", .9, -.42, 1.47, -1.41, 1.41, -2.4], + ["c", -.06, -.66, -.39, -1.29, -.9, -1.65], + ["c", -.12, -.09, -1.05, -.63, -2.07, -1.23], + ["z"] + ], + w: 10.926, + h: 14.989 + }, + 9: { + d: [ + ["M", 4.23, -14.97], + ["c", .42, -.03, 1.29, 0, 1.62, .06], + ["c", .51, .12, .93, .3, 1.38, .57], + ["c", 1.53, 1.02, 2.52, 3.24, 2.73, 5.94], + ["c", .18, 2.55, -.48, 4.98, -1.83, 6.57], + ["c", -1.05, 1.26, -2.4, 1.89, -3.93, 1.83], + ["c", -1.23, -.06, -2.31, -.45, -3.03, -1.14], + ["c", -.57, -.51, -.87, -1.23, -.84, -1.98], + ["c", .03, -.51, .21, -.9, .6, -1.26], + ["c", .24, -.24, .45, -.39, .75, -.51], + ["c", .21, -.06, .27, -.06, .6, -.06], + ["c", .33, 0, .39, 0, .6, .06], + ["c", .3, .12, .51, .27, .75, .51], + ["c", .39, .36, .57, .78, .57, 1.26], + ["c", 0, .27, 0, .3, -.09, .42], + ["c", -.03, .09, -.18, .21, -.3, .3], + ["c", -.12, .09, -.3, .21, -.39, .27], + ["c", -.09, .06, -.21, .18, -.27, .24], + ["c", -.06, .12, -.06, .15, -.06, .33], + ["c", 0, .18, 0, .24, .06, .36], + ["c", .24, .39, .75, .6, 1.38, .57], + ["c", .54, -.03, .9, -.18, 1.23, -.48], + ["c", .81, -.72, 1.08, -2.16, .96, -5.37], + ["l", 0, -.63], + ["l", -.3, .12], + ["c", -.78, .27, -1.29, .33, -2.1, .27], + ["c", -1.47, -.12, -2.49, -.54, -3.27, -1.29], + ["c", -.48, -.51, -.81, -1.11, -.96, -1.89], + ["c", -.06, -.27, -.06, -.42, -.06, -.96], + ["c", 0, -.51, 0, -.66, .06, -.93], + ["c", .15, -.78, .48, -1.38, .96, -1.89], + ["c", .15, -.12, .33, -.27, .42, -.36], + ["c", .69, -.51, 1.62, -.81, 2.76, -.93], + ["z"], + ["m", 1.17, .66], + ["c", -.21, -.06, -.57, -.06, -.81, -.03], + ["c", -.78, .12, -1.26, .69, -1.41, 1.74], + ["c", -.12, .63, -.15, 1.95, -.09, 2.79], + ["c", .12, 1.71, .63, 2.4, 1.77, 2.46], + ["c", 1.08, .03, 1.62, -.48, 1.8, -1.74], + ["c", .06, -.54, .06, -3, 0, -3.54], + ["c", -.15, -1.05, -.51, -1.53, -1.26, -1.68], + ["z"] + ], + w: 9.959, + h: 14.986 + }, + "rests.multimeasure": { + d: [ + ["M", 0, -4], + ["l", 0, 16], + ["l", 1, 0], + ["l", 0, -5], + ["l", 40, 0], + ["l", 0, 5], + ["l", 1, 0], + ["l", 0, -16], + ["l", -1, 0], + ["l", 0, 5], + ["l", -40, 0], + ["l", 0, -5], + ["z"] + ], + w: 42, + h: 18 + }, + "rests.whole": { + d: [ + ["M", .06, .03], + ["l", .09, -.06], + ["l", 5.46, 0], + ["l", 5.49, 0], + ["l", .09, .06], + ["l", .06, .09], + ["l", 0, 2.19], + ["l", 0, 2.19], + ["l", -.06, .09], + ["l", -.09, .06], + ["l", -5.49, 0], + ["l", -5.46, 0], + ["l", -.09, -.06], + ["l", -.06, -.09], + ["l", 0, -2.19], + ["l", 0, -2.19], + ["z"] + ], + w: 11.25, + h: 4.68 + }, + "rests.half": { + d: [ + ["M", .06, -4.62], + ["l", .09, -.06], + ["l", 5.46, 0], + ["l", 5.49, 0], + ["l", .09, .06], + ["l", .06, .09], + ["l", 0, 2.19], + ["l", 0, 2.19], + ["l", -.06, .09], + ["l", -.09, .06], + ["l", -5.49, 0], + ["l", -5.46, 0], + ["l", -.09, -.06], + ["l", -.06, -.09], + ["l", 0, -2.19], + ["l", 0, -2.19], + ["z"] + ], + w: 11.25, + h: 4.68 + }, + "rests.quarter": { + d: [ + ["M", 1.89, -11.82], + ["c", .12, -.06, .24, -.06, .36, -.03], + ["c", .09, .06, 4.74, 5.58, 4.86, 5.82], + ["c", .21, .39, .15, .78, -.15, 1.26], + ["c", -.24, .33, -.72, .81, -1.62, 1.56], + ["c", -.45, .36, -.87, .75, -.96, .84], + ["c", -.93, .99, -1.14, 2.49, -.6, 3.63], + ["c", .18, .39, .27, .48, 1.32, 1.68], + ["c", 1.92, 2.25, 1.83, 2.16, 1.83, 2.34], + ["c", 0, .18, -.18, .36, -.36, .39], + ["c", -.15, 0, -.27, -.06, -.48, -.27], + ["c", -.75, -.75, -2.46, -1.29, -3.39, -1.08], + ["c", -.45, .09, -.69, .27, -.9, .69], + ["c", -.12, .3, -.21, .66, -.24, 1.14], + ["c", -.03, .66, .09, 1.35, .3, 2.01], + ["c", .15, .42, .24, .66, .45, .96], + ["c", .18, .24, .18, .33, .03, .42], + ["c", -.12, .06, -.18, .03, -.45, -.3], + ["c", -1.08, -1.38, -2.07, -3.36, -2.4, -4.83], + ["c", -.27, -1.05, -.15, -1.77, .27, -2.07], + ["c", .21, -.12, .42, -.15, .87, -.15], + ["c", .87, .06, 2.1, .39, 3.3, .9], + ["l", .39, .18], + ["l", -1.65, -1.95], + ["c", -2.52, -2.97, -2.61, -3.09, -2.7, -3.27], + ["c", -.09, -.24, -.12, -.48, -.03, -.75], + ["c", .15, -.48, .57, -.96, 1.83, -2.01], + ["c", .45, -.36, .84, -.72, .93, -.78], + ["c", .69, -.75, 1.02, -1.8, .9, -2.79], + ["c", -.06, -.33, -.21, -.84, -.39, -1.11], + ["c", -.09, -.15, -.45, -.6, -.81, -1.05], + ["c", -.36, -.42, -.69, -.81, -.72, -.87], + ["c", -.09, -.18, 0, -.42, .21, -.51], + ["z"] + ], + w: 7.888, + h: 21.435 + }, + "rests.8th": { + d: [ + ["M", 1.68, -6.12], + ["c", .66, -.09, 1.23, .09, 1.68, .51], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .09, .33, .18, .66, .21, .72], + ["c", .12, .27, .33, .45, .6, .48], + ["c", .12, 0, .18, 0, .33, -.09], + ["c", .39, -.18, 1.32, -1.29, 1.68, -1.98], + ["c", .09, -.21, .24, -.3, .39, -.3], + ["c", .12, 0, .27, .09, .33, .18], + ["c", .03, .06, -.27, 1.11, -1.86, 6.42], + ["c", -1.02, 3.48, -1.89, 6.39, -1.92, 6.42], + ["c", 0, .03, -.12, .12, -.24, .15], + ["c", -.18, .09, -.21, .09, -.45, .09], + ["c", -.24, 0, -.3, 0, -.48, -.06], + ["c", -.09, -.06, -.21, -.12, -.21, -.15], + ["c", -.06, -.03, .15, -.57, 1.68, -4.92], + ["c", .96, -2.67, 1.74, -4.89, 1.71, -4.89], + ["l", -.51, .15], + ["c", -1.08, .36, -1.74, .48, -2.55, .48], + ["c", -.66, 0, -.84, -.03, -1.32, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .33, -.45, .84, -.81, 1.38, -.9], + ["z"] + ], + w: 7.534, + h: 13.883 + }, + "rests.16th": { + d: [ + ["M", 3.33, -6.12], + ["c", .66, -.09, 1.23, .09, 1.68, .51], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .09, .33, .18, .66, .21, .72], + ["c", .15, .39, .57, .57, .87, .42], + ["c", .39, -.18, 1.2, -1.23, 1.62, -2.07], + ["c", .06, -.15, .24, -.24, .36, -.24], + ["c", .12, 0, .27, .09, .33, .18], + ["c", .03, .06, -.45, 1.86, -2.67, 10.17], + ["c", -1.5, 5.55, -2.73, 10.14, -2.76, 10.17], + ["c", -.03, .03, -.12, .12, -.24, .15], + ["c", -.18, .09, -.21, .09, -.45, .09], + ["c", -.24, 0, -.3, 0, -.48, -.06], + ["c", -.09, -.06, -.21, -.12, -.21, -.15], + ["c", -.06, -.03, .12, -.57, 1.44, -4.92], + ["c", .81, -2.67, 1.47, -4.86, 1.47, -4.89], + ["c", -.03, 0, -.27, .06, -.54, .15], + ["c", -1.08, .36, -1.77, .48, -2.58, .48], + ["c", -.66, 0, -.84, -.03, -1.32, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .72, -1.05, 2.22, -1.23, 3.06, -.42], + ["c", .3, .33, .42, .6, .6, 1.38], + ["c", .09, .45, .21, .78, .33, .9], + ["c", .09, .09, .27, .18, .45, .21], + ["c", .12, 0, .18, 0, .33, -.09], + ["c", .33, -.15, 1.02, -.93, 1.41, -1.59], + ["c", .12, -.21, .18, -.39, .39, -1.08], + ["c", .66, -2.1, 1.17, -3.84, 1.17, -3.87], + ["c", 0, 0, -.21, .06, -.42, .15], + ["c", -.51, .15, -1.2, .33, -1.68, .42], + ["c", -.33, .06, -.51, .06, -.96, .06], + ["c", -.66, 0, -.84, -.03, -1.32, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .33, -.45, .84, -.81, 1.38, -.9], + ["z"] + ], + w: 9.724, + h: 21.383 + }, + "rests.32nd": { + d: [ + ["M", 4.23, -13.62], + ["c", .66, -.09, 1.23, .09, 1.68, .51], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .09, .33, .18, .66, .21, .72], + ["c", .12, .27, .33, .45, .6, .48], + ["c", .12, 0, .18, 0, .27, -.06], + ["c", .33, -.21, .99, -1.11, 1.44, -1.98], + ["c", .09, -.24, .21, -.33, .39, -.33], + ["c", .12, 0, .27, .09, .33, .18], + ["c", .03, .06, -.57, 2.67, -3.21, 13.89], + ["c", -1.8, 7.62, -3.3, 13.89, -3.3, 13.92], + ["c", -.03, .06, -.12, .12, -.24, .18], + ["c", -.21, .09, -.24, .09, -.48, .09], + ["c", -.24, 0, -.3, 0, -.48, -.06], + ["c", -.09, -.06, -.21, -.12, -.21, -.15], + ["c", -.06, -.03, .09, -.57, 1.23, -4.92], + ["c", .69, -2.67, 1.26, -4.86, 1.29, -4.89], + ["c", 0, -.03, -.12, -.03, -.48, .12], + ["c", -1.17, .39, -2.22, .57, -3, .54], + ["c", -.42, -.03, -.75, -.12, -1.11, -.3], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .72, -1.05, 2.22, -1.23, 3.06, -.42], + ["c", .3, .33, .42, .6, .6, 1.38], + ["c", .09, .45, .21, .78, .33, .9], + ["c", .12, .09, .3, .18, .48, .21], + ["c", .12, 0, .18, 0, .3, -.09], + ["c", .42, -.21, 1.29, -1.29, 1.56, -1.89], + ["c", .03, -.12, 1.23, -4.59, 1.23, -4.65], + ["c", 0, -.03, -.18, .03, -.39, .12], + ["c", -.63, .18, -1.2, .36, -1.74, .45], + ["c", -.39, .06, -.54, .06, -1.02, .06], + ["c", -.66, 0, -.84, -.03, -1.32, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .72, -1.05, 2.22, -1.23, 3.06, -.42], + ["c", .3, .33, .42, .6, .6, 1.38], + ["c", .09, .45, .21, .78, .33, .9], + ["c", .18, .18, .51, .27, .72, .15], + ["c", .3, -.12, .69, -.57, 1.08, -1.17], + ["c", .42, -.6, .39, -.51, 1.05, -3.03], + ["c", .33, -1.26, .6, -2.31, .6, -2.34], + ["c", 0, 0, -.21, .03, -.45, .12], + ["c", -.57, .18, -1.14, .33, -1.62, .42], + ["c", -.33, .06, -.51, .06, -.96, .06], + ["c", -.66, 0, -.84, -.03, -1.32, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .33, -.45, .84, -.81, 1.38, -.9], + ["z"] + ], + w: 11.373, + h: 28.883 + }, + "rests.64th": { + d: [ + ["M", 5.13, -13.62], + ["c", .66, -.09, 1.23, .09, 1.68, .51], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .15, .63, .21, .81, .33, .96], + ["c", .18, .21, .54, .3, .75, .18], + ["c", .24, -.12, .63, -.66, 1.08, -1.56], + ["c", .33, -.66, .39, -.72, .6, -.72], + ["c", .12, 0, .27, .09, .33, .18], + ["c", .03, .06, -.69, 3.66, -3.54, 17.64], + ["c", -1.95, 9.66, -3.57, 17.61, -3.57, 17.64], + ["c", -.03, .06, -.12, .12, -.24, .18], + ["c", -.21, .09, -.24, .09, -.48, .09], + ["c", -.24, 0, -.3, 0, -.48, -.06], + ["c", -.09, -.06, -.21, -.12, -.21, -.15], + ["c", -.06, -.03, .06, -.57, 1.05, -4.95], + ["c", .6, -2.7, 1.08, -4.89, 1.08, -4.92], + ["c", 0, 0, -.24, .06, -.51, .15], + ["c", -.66, .24, -1.2, .36, -1.77, .48], + ["c", -.42, .06, -.57, .06, -1.05, .06], + ["c", -.69, 0, -.87, -.03, -1.35, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .72, -1.05, 2.22, -1.23, 3.06, -.42], + ["c", .3, .33, .42, .6, .6, 1.38], + ["c", .09, .45, .21, .78, .33, .9], + ["c", .09, .09, .27, .18, .45, .21], + ["c", .21, .03, .39, -.09, .72, -.42], + ["c", .45, -.45, 1.02, -1.26, 1.17, -1.65], + ["c", .03, -.09, .27, -1.14, .54, -2.34], + ["c", .27, -1.2, .48, -2.19, .51, -2.22], + ["c", 0, -.03, -.09, -.03, -.48, .12], + ["c", -1.17, .39, -2.22, .57, -3, .54], + ["c", -.42, -.03, -.75, -.12, -1.11, -.3], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .36, -.54, .96, -.87, 1.65, -.93], + ["c", .54, -.03, 1.02, .15, 1.41, .54], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .09, .33, .18, .66, .21, .72], + ["c", .15, .39, .57, .57, .9, .42], + ["c", .36, -.18, 1.2, -1.26, 1.47, -1.89], + ["c", .03, -.09, .3, -1.2, .57, -2.43], + ["l", .51, -2.28], + ["l", -.54, .18], + ["c", -1.11, .36, -1.8, .48, -2.61, .48], + ["c", -.66, 0, -.84, -.03, -1.32, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .36, -.54, .96, -.87, 1.65, -.93], + ["c", .54, -.03, 1.02, .15, 1.41, .54], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .15, .63, .21, .81, .33, .96], + ["c", .21, .21, .54, .3, .75, .18], + ["c", .36, -.18, .93, -.93, 1.29, -1.68], + ["c", .12, -.24, .18, -.48, .63, -2.55], + ["l", .51, -2.31], + ["c", 0, -.03, -.18, .03, -.39, .12], + ["c", -1.14, .36, -2.1, .54, -2.82, .51], + ["c", -.42, -.03, -.75, -.12, -1.11, -.3], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .33, -.45, .84, -.81, 1.38, -.9], + ["z"] + ], + w: 12.453, + h: 36.383 + }, + "rests.128th": { + d: [ + ["M", 6.03, -21.12], + ["c", .66, -.09, 1.23, .09, 1.68, .51], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .09, .33, .18, .66, .21, .72], + ["c", .12, .27, .33, .45, .6, .48], + ["c", .21, 0, .33, -.06, .54, -.36], + ["c", .15, -.21, .54, -.93, .78, -1.47], + ["c", .15, -.33, .18, -.39, .3, -.48], + ["c", .18, -.09, .45, 0, .51, .15], + ["c", .03, .09, -7.11, 42.75, -7.17, 42.84], + ["c", -.03, .03, -.15, .09, -.24, .15], + ["c", -.18, .06, -.24, .06, -.45, .06], + ["c", -.24, 0, -.3, 0, -.48, -.06], + ["c", -.09, -.06, -.21, -.12, -.21, -.15], + ["c", -.06, -.03, .03, -.57, .84, -4.98], + ["c", .51, -2.7, .93, -4.92, .9, -4.92], + ["c", 0, 0, -.15, .06, -.36, .12], + ["c", -.78, .27, -1.62, .48, -2.31, .57], + ["c", -.15, .03, -.54, .03, -.81, .03], + ["c", -.66, 0, -.84, -.03, -1.32, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .36, -.54, .96, -.87, 1.65, -.93], + ["c", .54, -.03, 1.02, .15, 1.41, .54], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .09, .33, .18, .66, .21, .72], + ["c", .12, .27, .33, .45, .63, .48], + ["c", .12, 0, .18, 0, .3, -.09], + ["c", .42, -.21, 1.14, -1.11, 1.5, -1.83], + ["c", .12, -.27, .12, -.27, .54, -2.52], + ["c", .24, -1.23, .42, -2.25, .39, -2.25], + ["c", 0, 0, -.24, .06, -.51, .18], + ["c", -1.26, .39, -2.25, .57, -3.06, .54], + ["c", -.42, -.03, -.75, -.12, -1.11, -.3], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .36, -.54, .96, -.87, 1.65, -.93], + ["c", .54, -.03, 1.02, .15, 1.41, .54], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .15, .63, .21, .81, .33, .96], + ["c", .18, .21, .51, .3, .75, .18], + ["c", .36, -.15, 1.05, -.99, 1.41, -1.77], + ["l", .15, -.3], + ["l", .42, -2.25], + ["c", .21, -1.26, .42, -2.28, .39, -2.28], + ["l", -.51, .15], + ["c", -1.11, .39, -1.89, .51, -2.7, .51], + ["c", -.66, 0, -.84, -.03, -1.32, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .36, -.54, .96, -.87, 1.65, -.93], + ["c", .54, -.03, 1.02, .15, 1.41, .54], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .15, .63, .21, .81, .33, .96], + ["c", .18, .18, .48, .27, .72, .21], + ["c", .33, -.12, 1.14, -1.26, 1.41, -1.95], + ["c", 0, -.09, .21, -1.11, .45, -2.34], + ["c", .21, -1.2, .39, -2.22, .39, -2.28], + ["c", .03, -.03, 0, -.03, -.45, .12], + ["c", -.57, .18, -1.2, .33, -1.71, .42], + ["c", -.3, .06, -.51, .06, -.93, .06], + ["c", -.66, 0, -.84, -.03, -1.32, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .36, -.54, .96, -.87, 1.65, -.93], + ["c", .54, -.03, 1.02, .15, 1.41, .54], + ["c", .27, .3, .39, .54, .57, 1.26], + ["c", .09, .33, .18, .66, .21, .72], + ["c", .12, .27, .33, .45, .6, .48], + ["c", .18, 0, .36, -.09, .57, -.33], + ["c", .33, -.36, .78, -1.14, .93, -1.56], + ["c", .03, -.12, .24, -1.2, .45, -2.4], + ["c", .24, -1.2, .42, -2.22, .42, -2.28], + ["c", .03, -.03, 0, -.03, -.39, .09], + ["c", -1.05, .36, -1.8, .48, -2.58, .48], + ["c", -.63, 0, -.84, -.03, -1.29, -.27], + ["c", -1.32, -.63, -1.77, -2.16, -1.02, -3.3], + ["c", .33, -.45, .84, -.81, 1.38, -.9], + ["z"] + ], + w: 12.992, + h: 43.883 + }, + "accidentals.sharp": { + d: [ + ["M", 5.73, -11.19], + ["c", .21, -.12, .54, -.03, .66, .24], + ["c", .06, .12, .06, .21, .06, 2.31], + ["c", 0, 1.23, 0, 2.22, .03, 2.22], + ["c", 0, 0, .27, -.12, .6, -.24], + ["c", .69, -.27, .78, -.3, .96, -.15], + ["c", .21, .15, .21, .18, .21, 1.38], + ["c", 0, 1.02, 0, 1.11, -.06, 1.2], + ["c", -.03, .06, -.09, .12, -.12, .15], + ["c", -.06, .03, -.42, .21, -.84, .36], + ["l", -.75, .33], + ["l", -.03, 2.43], + ["c", 0, 1.32, 0, 2.43, .03, 2.43], + ["c", 0, 0, .27, -.12, .6, -.24], + ["c", .69, -.27, .78, -.3, .96, -.15], + ["c", .21, .15, .21, .18, .21, 1.38], + ["c", 0, 1.02, 0, 1.11, -.06, 1.2], + ["c", -.03, .06, -.09, .12, -.12, .15], + ["c", -.06, .03, -.42, .21, -.84, .36], + ["l", -.75, .33], + ["l", -.03, 2.52], + ["c", 0, 2.28, -.03, 2.55, -.06, 2.64], + ["c", -.21, .36, -.72, .36, -.93, 0], + ["c", -.03, -.09, -.06, -.33, -.06, -2.43], + ["l", 0, -2.31], + ["l", -1.29, .51], + ["l", -1.26, .51], + ["l", 0, 2.43], + ["c", 0, 2.58, 0, 2.52, -.15, 2.67], + ["c", -.06, .09, -.27, .18, -.36, .18], + ["c", -.12, 0, -.33, -.09, -.39, -.18], + ["c", -.15, -.15, -.15, -.09, -.15, -2.43], + ["c", 0, -1.23, 0, -2.22, -.03, -2.22], + ["c", 0, 0, -.27, .12, -.6, .24], + ["c", -.69, .27, -.78, .3, -.96, .15], + ["c", -.21, -.15, -.21, -.18, -.21, -1.38], + ["c", 0, -1.02, 0, -1.11, .06, -1.2], + ["c", .03, -.06, .09, -.12, .12, -.15], + ["c", .06, -.03, .42, -.21, .84, -.36], + ["l", .78, -.33], + ["l", 0, -2.43], + ["c", 0, -1.32, 0, -2.43, -.03, -2.43], + ["c", 0, 0, -.27, .12, -.6, .24], + ["c", -.69, .27, -.78, .3, -.96, .15], + ["c", -.21, -.15, -.21, -.18, -.21, -1.38], + ["c", 0, -1.02, 0, -1.11, .06, -1.2], + ["c", .03, -.06, .09, -.12, .12, -.15], + ["c", .06, -.03, .42, -.21, .84, -.36], + ["l", .78, -.33], + ["l", 0, -2.52], + ["c", 0, -2.28, .03, -2.55, .06, -2.64], + ["c", .21, -.36, .72, -.36, .93, 0], + ["c", .03, .09, .06, .33, .06, 2.43], + ["l", .03, 2.31], + ["l", 1.26, -.51], + ["l", 1.26, -.51], + ["l", 0, -2.43], + ["c", 0, -2.28, 0, -2.43, .06, -2.55], + ["c", .06, -.12, .12, -.18, .27, -.24], + ["z"], + ["m", -.33, 10.65], + ["l", 0, -2.43], + ["l", -1.29, .51], + ["l", -1.26, .51], + ["l", 0, 2.46], + ["l", 0, 2.43], + ["l", .09, -.03], + ["c", .06, -.03, .63, -.27, 1.29, -.51], + ["l", 1.17, -.48], + ["l", 0, -2.46], + ["z"] + ], + w: 8.25, + h: 22.462 + }, + "accidentals.halfsharp": { + d: [ + ["M", 2.43, -10.05], + ["c", .21, -.12, .54, -.03, .66, .24], + ["c", .06, .12, .06, .21, .06, 2.01], + ["c", 0, 1.05, 0, 1.89, .03, 1.89], + ["l", .72, -.48], + ["c", .69, -.48, .69, -.51, .87, -.51], + ["c", .15, 0, .18, .03, .27, .09], + ["c", .21, .15, .21, .18, .21, 1.41], + ["c", 0, 1.11, -.03, 1.14, -.09, 1.23], + ["c", -.03, .03, -.48, .39, -1.02, .75], + ["l", -.99, .66], + ["l", 0, 2.37], + ["c", 0, 1.32, 0, 2.37, .03, 2.37], + ["l", .72, -.48], + ["c", .69, -.48, .69, -.51, .87, -.51], + ["c", .15, 0, .18, .03, .27, .09], + ["c", .21, .15, .21, .18, .21, 1.41], + ["c", 0, 1.11, -.03, 1.14, -.09, 1.23], + ["c", -.03, .03, -.48, .39, -1.02, .75], + ["l", -.99, .66], + ["l", 0, 2.25], + ["c", 0, 1.95, 0, 2.28, -.06, 2.37], + ["c", -.06, .12, -.12, .21, -.24, .27], + ["c", -.27, .12, -.54, .03, -.69, -.24], + ["c", -.06, -.12, -.06, -.21, -.06, -2.01], + ["c", 0, -1.05, 0, -1.89, -.03, -1.89], + ["l", -.72, .48], + ["c", -.69, .48, -.69, .48, -.87, .48], + ["c", -.15, 0, -.18, 0, -.27, -.06], + ["c", -.21, -.15, -.21, -.18, -.21, -1.41], + ["c", 0, -1.11, .03, -1.14, .09, -1.23], + ["c", .03, -.03, .48, -.39, 1.02, -.75], + ["l", .99, -.66], + ["l", 0, -2.37], + ["c", 0, -1.32, 0, -2.37, -.03, -2.37], + ["l", -.72, .48], + ["c", -.69, .48, -.69, .48, -.87, .48], + ["c", -.15, 0, -.18, 0, -.27, -.06], + ["c", -.21, -.15, -.21, -.18, -.21, -1.41], + ["c", 0, -1.11, .03, -1.14, .09, -1.23], + ["c", .03, -.03, .48, -.39, 1.02, -.75], + ["l", .99, -.66], + ["l", 0, -2.25], + ["c", 0, -2.13, 0, -2.28, .06, -2.4], + ["c", .06, -.12, .12, -.18, .27, -.24], + ["z"] + ], + w: 5.25, + h: 20.174 + }, + "accidentals.nat": { + d: [ + ["M", .21, -11.4], + ["c", .24, -.06, .78, 0, .99, .15], + ["c", .03, .03, .03, .48, 0, 2.61], + ["c", -.03, 1.44, -.03, 2.61, -.03, 2.61], + ["c", 0, .03, .75, -.09, 1.68, -.24], + ["c", .96, -.18, 1.71, -.27, 1.74, -.27], + ["c", .15, .03, .27, .15, .36, .3], + ["l", .06, .12], + ["l", .09, 8.67], + ["c", .09, 6.96, .12, 8.67, .09, 8.67], + ["c", -.03, .03, -.12, .06, -.21, .09], + ["c", -.24, .09, -.72, .09, -.96, 0], + ["c", -.09, -.03, -.18, -.06, -.21, -.09], + ["c", -.03, -.03, -.03, -.48, 0, -2.61], + ["c", .03, -1.44, .03, -2.61, .03, -2.61], + ["c", 0, -.03, -.75, .09, -1.68, .24], + ["c", -.96, .18, -1.71, .27, -1.74, .27], + ["c", -.15, -.03, -.27, -.15, -.36, -.3], + ["l", -.06, -.15], + ["l", -.09, -7.53], + ["c", -.06, -4.14, -.09, -8.04, -.12, -8.67], + ["l", 0, -1.11], + ["l", .15, -.06], + ["c", .09, -.03, .21, -.06, .27, -.09], + ["z"], + ["m", 3.75, 8.4], + ["c", 0, -.33, 0, -.42, -.03, -.42], + ["c", -.12, 0, -2.79, .45, -2.79, .48], + ["c", -.03, 0, -.09, 6.3, -.09, 6.33], + ["c", .03, 0, 2.79, -.45, 2.82, -.48], + ["c", 0, 0, .09, -4.53, .09, -5.91], + ["z"] + ], + w: 5.4, + h: 22.8 + }, + "accidentals.flat": { + d: [ + ["M", -.36, -14.07], + ["c", .33, -.06, .87, 0, 1.08, .15], + ["c", .06, .03, .06, .36, -.03, 5.25], + ["c", -.06, 2.85, -.09, 5.19, -.09, 5.19], + ["c", 0, .03, .12, -.03, .24, -.12], + ["c", .63, -.42, 1.41, -.66, 2.19, -.72], + ["c", .81, -.03, 1.47, .21, 2.04, .78], + ["c", .57, .54, .87, 1.26, .93, 2.04], + ["c", .03, .57, -.09, 1.08, -.36, 1.62], + ["c", -.42, .81, -1.02, 1.38, -2.82, 2.61], + ["c", -1.14, .78, -1.44, 1.02, -1.8, 1.44], + ["c", -.18, .18, -.39, .39, -.45, .42], + ["c", -.27, .18, -.57, .15, -.81, -.06], + ["c", -.06, -.09, -.12, -.18, -.15, -.27], + ["c", -.03, -.06, -.09, -3.27, -.18, -8.34], + ["c", -.09, -4.53, -.15, -8.58, -.18, -9.03], + ["l", 0, -.78], + ["l", .12, -.06], + ["c", .06, -.03, .18, -.09, .27, -.12], + ["z"], + ["m", 3.18, 11.01], + ["c", -.21, -.12, -.54, -.15, -.81, -.06], + ["c", -.54, .15, -.99, .63, -1.17, 1.26], + ["c", -.06, .3, -.12, 2.88, -.06, 3.87], + ["c", .03, .42, .03, .81, .06, .9], + ["l", .03, .12], + ["l", .45, -.39], + ["c", .63, -.54, 1.26, -1.17, 1.56, -1.59], + ["c", .3, -.42, .6, -.99, .72, -1.41], + ["c", .18, -.69, .09, -1.47, -.18, -2.07], + ["c", -.15, -.3, -.33, -.51, -.6, -.63], + ["z"] + ], + w: 6.75, + h: 18.801 + }, + "accidentals.halfflat": { + d: [ + ["M", 4.83, -14.07], + ["c", .33, -.06, .87, 0, 1.08, .15], + ["c", .06, .03, .06, .6, -.12, 9.06], + ["c", -.09, 5.55, -.15, 9.06, -.18, 9.12], + ["c", -.03, .09, -.09, .18, -.15, .27], + ["c", -.24, .21, -.54, .24, -.81, .06], + ["c", -.06, -.03, -.27, -.24, -.45, -.42], + ["c", -.36, -.42, -.66, -.66, -1.8, -1.44], + ["c", -1.23, -.84, -1.83, -1.32, -2.25, -1.77], + ["c", -.66, -.78, -.96, -1.56, -.93, -2.46], + ["c", .09, -1.41, 1.11, -2.58, 2.4, -2.79], + ["c", .3, -.06, .84, -.03, 1.23, .06], + ["c", .54, .12, 1.08, .33, 1.53, .63], + ["c", .12, .09, .24, .15, .24, .12], + ["c", 0, 0, -.12, -8.37, -.18, -9.75], + ["l", 0, -.66], + ["l", .12, -.06], + ["c", .06, -.03, .18, -.09, .27, -.12], + ["z"], + ["m", -1.65, 10.95], + ["c", -.6, -.18, -1.08, .09, -1.38, .69], + ["c", -.27, .6, -.36, 1.38, -.18, 2.07], + ["c", .12, .42, .42, .99, .72, 1.41], + ["c", .3, .42, .93, 1.05, 1.56, 1.59], + ["l", .48, .39], + ["l", 0, -.12], + ["c", .03, -.09, .03, -.48, .06, -.9], + ["c", .03, -.57, .03, -1.08, 0, -2.22], + ["c", -.03, -1.62, -.03, -1.62, -.24, -2.07], + ["c", -.21, -.42, -.6, -.75, -1.02, -.84], + ["z"] + ], + w: 6.728, + h: 18.801 + }, + "accidentals.dblflat": { + d: [ + ["M", -.36, -14.07], + ["c", .33, -.06, .87, 0, 1.08, .15], + ["c", .06, .03, .06, .33, -.03, 4.89], + ["c", -.06, 2.67, -.09, 5.01, -.09, 5.22], + ["l", 0, .36], + ["l", .15, -.15], + ["c", .36, -.3, .75, -.51, 1.2, -.63], + ["c", .33, -.09, .96, -.09, 1.26, -.03], + ["c", .27, .09, .63, .27, .87, .45], + ["l", .21, .15], + ["l", 0, -.27], + ["c", 0, -.15, -.03, -2.43, -.09, -5.1], + ["c", -.09, -4.56, -.09, -4.86, -.03, -4.89], + ["c", .15, -.12, .39, -.15, .72, -.15], + ["c", .3, 0, .54, .03, .69, .15], + ["c", .06, .03, .06, .33, -.03, 4.95], + ["c", -.06, 2.7, -.09, 5.04, -.09, 5.22], + ["l", .03, .3], + ["l", .21, -.15], + ["c", .69, -.48, 1.44, -.69, 2.28, -.69], + ["c", .51, 0, .78, .03, 1.2, .21], + ["c", 1.32, .63, 2.01, 2.28, 1.53, 3.69], + ["c", -.21, .57, -.51, 1.02, -1.05, 1.56], + ["c", -.42, .42, -.81, .72, -1.92, 1.5], + ["c", -1.26, .87, -1.5, 1.08, -1.86, 1.5], + ["c", -.39, .45, -.54, .54, -.81, .51], + ["c", -.18, 0, -.21, 0, -.33, -.06], + ["l", -.21, -.21], + ["l", -.06, -.12], + ["l", -.03, -.99], + ["c", -.03, -.54, -.03, -1.29, -.06, -1.68], + ["l", 0, -.69], + ["l", -.21, .24], + ["c", -.36, .42, -.75, .75, -1.8, 1.62], + ["c", -1.02, .84, -1.2, .99, -1.44, 1.38], + ["c", -.36, .51, -.54, .6, -.9, .51], + ["c", -.15, -.03, -.39, -.27, -.42, -.42], + ["c", -.03, -.06, -.09, -3.27, -.18, -8.34], + ["c", -.09, -4.53, -.15, -8.58, -.18, -9.03], + ["l", 0, -.78], + ["l", .12, -.06], + ["c", .06, -.03, .18, -.09, .27, -.12], + ["z"], + ["m", 2.52, 10.98], + ["c", -.18, -.09, -.48, -.12, -.66, -.06], + ["c", -.39, .15, -.69, .54, -.84, 1.14], + ["c", -.06, .24, -.06, .39, -.09, 1.74], + ["c", -.03, 1.44, 0, 2.73, .06, 3.18], + ["l", .03, .15], + ["l", .27, -.27], + ["c", .93, -.96, 1.5, -1.95, 1.74, -3.06], + ["c", .06, -.27, .06, -.39, .06, -.96], + ["c", 0, -.54, 0, -.69, -.06, -.93], + ["c", -.09, -.51, -.27, -.81, -.51, -.93], + ["z"], + ["m", 5.43, 0], + ["c", -.18, -.09, -.51, -.12, -.72, -.06], + ["c", -.54, .12, -.96, .63, -1.17, 1.26], + ["c", -.06, .3, -.12, 2.88, -.06, 3.9], + ["c", .03, .42, .03, .81, .06, .9], + ["l", .03, .12], + ["l", .36, -.3], + ["c", .42, -.36, 1.02, -.96, 1.29, -1.29], + ["c", .36, -.45, .66, -.99, .81, -1.41], + ["c", .42, -1.23, .15, -2.76, -.6, -3.12], + ["z"] + ], + w: 11.613, + h: 18.804 + }, + "accidentals.dblsharp": { + d: [ + ["M", -.18, -3.96], + ["c", .06, -.03, .12, -.06, .15, -.06], + ["c", .09, 0, 2.76, .27, 2.79, .3], + ["c", .12, .03, .15, .12, .15, .51], + ["c", .06, .96, .24, 1.59, .57, 2.1], + ["c", .06, .09, .15, .21, .18, .24], + ["l", .09, .06], + ["l", .09, -.06], + ["c", .03, -.03, .12, -.15, .18, -.24], + ["c", .33, -.51, .51, -1.14, .57, -2.1], + ["c", 0, -.39, .03, -.45, .12, -.51], + ["c", .03, 0, .66, -.09, 1.44, -.15], + ["c", 1.47, -.15, 1.5, -.15, 1.56, -.03], + ["c", .03, .06, 0, .42, -.09, 1.44], + ["c", -.09, .72, -.15, 1.35, -.15, 1.38], + ["c", 0, .03, -.03, .09, -.06, .12], + ["c", -.06, .06, -.12, .09, -.51, .09], + ["c", -1.08, .06, -1.8, .3, -2.28, .75], + ["l", -.12, .09], + ["l", .09, .09], + ["c", .12, .15, .39, .33, .63, .45], + ["c", .42, .18, .96, .27, 1.68, .33], + ["c", .39, 0, .45, .03, .51, .09], + ["c", .03, .03, .06, .09, .06, .12], + ["c", 0, .03, .06, .66, .15, 1.38], + ["c", .09, 1.02, .12, 1.38, .09, 1.44], + ["c", -.06, .12, -.09, .12, -1.56, -.03], + ["c", -.78, -.06, -1.41, -.15, -1.44, -.15], + ["c", -.09, -.06, -.12, -.12, -.12, -.54], + ["c", -.06, -.93, -.24, -1.56, -.57, -2.07], + ["c", -.06, -.09, -.15, -.21, -.18, -.24], + ["l", -.09, -.06], + ["l", -.09, .06], + ["c", -.03, .03, -.12, .15, -.18, .24], + ["c", -.33, .51, -.51, 1.14, -.57, 2.07], + ["c", 0, .42, -.03, .48, -.12, .54], + ["c", -.03, 0, -.66, .09, -1.44, .15], + ["c", -1.47, .15, -1.5, .15, -1.56, .03], + ["c", -.03, -.06, 0, -.42, .09, -1.44], + ["c", .09, -.72, .15, -1.35, .15, -1.38], + ["c", 0, -.03, .03, -.09, .06, -.12], + ["c", .06, -.06, .12, -.09, .51, -.09], + ["c", .72, -.06, 1.26, -.15, 1.68, -.33], + ["c", .24, -.12, .51, -.3, .63, -.45], + ["l", .09, -.09], + ["l", -.12, -.09], + ["c", -.48, -.45, -1.2, -.69, -2.28, -.75], + ["c", -.39, 0, -.45, -.03, -.51, -.09], + ["c", -.03, -.03, -.06, -.09, -.06, -.12], + ["c", 0, -.03, -.06, -.63, -.12, -1.38], + ["c", -.09, -.72, -.15, -1.35, -.15, -1.38], + ["z"] + ], + w: 7.95, + h: 7.977 + }, + "dots.dot": { + d: [ + ["M", 1.32, -1.68], + ["c", .09, -.03, .27, -.06, .39, -.06], + ["c", .96, 0, 1.74, .78, 1.74, 1.71], + ["c", 0, .96, -.78, 1.74, -1.71, 1.74], + ["c", -.96, 0, -1.74, -.78, -1.74, -1.71], + ["c", 0, -.78, .54, -1.5, 1.32, -1.68], + ["z"] + ], + w: 3.45, + h: 3.45 + }, + "noteheads.dbl": { + d: [ + ["M", -.69, -4.02], + ["c", .18, -.09, .36, -.09, .54, 0], + ["c", .18, .09, .24, .15, .33, .3], + ["c", .06, .15, .06, .18, .06, 1.41], + ["l", 0, 1.23], + ["l", .12, -.18], + ["c", .72, -1.26, 2.64, -2.31, 4.86, -2.64], + ["c", .81, -.15, 1.11, -.15, 2.13, -.15], + ["c", .99, 0, 1.29, 0, 2.1, .15], + ["c", .75, .12, 1.38, .27, 2.04, .54], + ["c", 1.35, .51, 2.34, 1.26, 2.82, 2.1], + ["l", .12, .18], + ["l", 0, -1.23], + ["c", 0, -1.2, 0, -1.26, .06, -1.38], + ["c", .09, -.18, .15, -.24, .33, -.33], + ["c", .18, -.09, .36, -.09, .54, 0], + ["c", .18, .09, .24, .15, .33, .3], + ["l", .06, .15], + ["l", 0, 3.54], + ["l", 0, 3.54], + ["l", -.06, .15], + ["c", -.09, .18, -.15, .24, -.33, .33], + ["c", -.18, .09, -.36, .09, -.54, 0], + ["c", -.18, -.09, -.24, -.15, -.33, -.33], + ["c", -.06, -.12, -.06, -.18, -.06, -1.38], + ["l", 0, -1.23], + ["l", -.12, .18], + ["c", -.48, .84, -1.47, 1.59, -2.82, 2.1], + ["c", -.84, .33, -1.71, .54, -2.85, .66], + ["c", -.45, .06, -2.16, .06, -2.61, 0], + ["c", -1.14, -.12, -2.01, -.33, -2.85, -.66], + ["c", -1.35, -.51, -2.34, -1.26, -2.82, -2.1], + ["l", -.12, -.18], + ["l", 0, 1.23], + ["c", 0, 1.23, 0, 1.26, -.06, 1.38], + ["c", -.09, .18, -.15, .24, -.33, .33], + ["c", -.18, .09, -.36, .09, -.54, 0], + ["c", -.18, -.09, -.24, -.15, -.33, -.33], + ["l", -.06, -.15], + ["l", 0, -3.54], + ["c", 0, -3.48, 0, -3.54, .06, -3.66], + ["c", .09, -.18, .15, -.24, .33, -.33], + ["z"], + ["m", 7.71, .63], + ["c", -.36, -.06, -.9, -.06, -1.14, 0], + ["c", -.3, .03, -.66, .24, -.87, .42], + ["c", -.6, .54, -.9, 1.62, -.75, 2.82], + ["c", .12, .93, .51, 1.68, 1.11, 2.31], + ["c", .75, .72, 1.83, 1.2, 2.85, 1.26], + ["c", 1.05, .06, 1.83, -.54, 2.1, -1.65], + ["c", .21, -.9, .12, -1.95, -.24, -2.82], + ["c", -.36, -.81, -1.08, -1.53, -1.95, -1.95], + ["c", -.3, -.15, -.78, -.3, -1.11, -.39], + ["z"] + ], + w: 16.83, + h: 8.145 + }, + "noteheads.whole": { + d: [ + ["M", 6.51, -4.05], + ["c", .51, -.03, 2.01, 0, 2.52, .03], + ["c", 1.41, .18, 2.64, .51, 3.72, 1.08], + ["c", 1.2, .63, 1.95, 1.41, 2.19, 2.31], + ["c", .09, .33, .09, .9, 0, 1.23], + ["c", -.24, .9, -.99, 1.68, -2.19, 2.31], + ["c", -1.08, .57, -2.28, .9, -3.75, 1.08], + ["c", -.66, .06, -2.31, .06, -2.97, 0], + ["c", -1.47, -.18, -2.67, -.51, -3.75, -1.08], + ["c", -1.2, -.63, -1.95, -1.41, -2.19, -2.31], + ["c", -.09, -.33, -.09, -.9, 0, -1.23], + ["c", .24, -.9, .99, -1.68, 2.19, -2.31], + ["c", 1.2, -.63, 2.61, -.99, 4.23, -1.11], + ["z"], + ["m", .57, .66], + ["c", -.87, -.15, -1.53, 0, -2.04, .51], + ["c", -.15, .15, -.24, .27, -.33, .48], + ["c", -.24, .51, -.36, 1.08, -.33, 1.77], + ["c", .03, .69, .18, 1.26, .42, 1.77], + ["c", .6, 1.17, 1.74, 1.98, 3.18, 2.22], + ["c", 1.11, .21, 1.95, -.15, 2.34, -.99], + ["c", .24, -.51, .36, -1.08, .33, -1.8], + ["c", -.06, -1.11, -.45, -2.04, -1.17, -2.76], + ["c", -.63, -.63, -1.47, -1.05, -2.4, -1.2], + ["z"] + ], + w: 14.985, + h: 8.097 + }, + "noteheads.half": { + d: [ + ["M", 7.44, -4.05], + ["c", .06, -.03, .27, -.03, .48, -.03], + ["c", 1.05, 0, 1.71, .24, 2.1, .81], + ["c", .42, .6, .45, 1.35, .18, 2.4], + ["c", -.42, 1.59, -1.14, 2.73, -2.16, 3.39], + ["c", -1.41, .93, -3.18, 1.44, -5.4, 1.53], + ["c", -1.17, .03, -1.89, -.21, -2.28, -.81], + ["c", -.42, -.6, -.45, -1.35, -.18, -2.4], + ["c", .42, -1.59, 1.14, -2.73, 2.16, -3.39], + ["c", .63, -.42, 1.23, -.72, 1.98, -.96], + ["c", .9, -.3, 1.65, -.42, 3.12, -.54], + ["z"], + ["m", 1.29, .87], + ["c", -.27, -.09, -.63, -.12, -.9, -.03], + ["c", -.72, .24, -1.53, .69, -3.27, 1.8], + ["c", -2.34, 1.5, -3.3, 2.25, -3.57, 2.79], + ["c", -.36, .72, -.06, 1.5, .66, 1.77], + ["c", .24, .12, .69, .09, .99, 0], + ["c", .84, -.3, 1.92, -.93, 4.14, -2.37], + ["c", 1.62, -1.08, 2.37, -1.71, 2.61, -2.19], + ["c", .36, -.72, .06, -1.5, -.66, -1.77], + ["z"] + ], + w: 10.37, + h: 8.132 + }, + "noteheads.quarter": { + d: [ + ["M", 6.09, -4.05], + ["c", .36, -.03, 1.2, 0, 1.53, .06], + ["c", 1.17, .24, 1.89, .84, 2.16, 1.83], + ["c", .06, .18, .06, .3, .06, .66], + ["c", 0, .45, 0, .63, -.15, 1.08], + ["c", -.66, 2.04, -3.06, 3.93, -5.52, 4.38], + ["c", -.54, .09, -1.44, .09, -1.83, .03], + ["c", -1.23, -.27, -1.98, -.87, -2.25, -1.86], + ["c", -.06, -.18, -.06, -.3, -.06, -.66], + ["c", 0, -.45, 0, -.63, .15, -1.08], + ["c", .24, -.78, .75, -1.53, 1.44, -2.22], + ["c", 1.2, -1.2, 2.85, -2.01, 4.47, -2.22], + ["z"] + ], + w: 9.81, + h: 8.094 + }, + "noteheads.slash.nostem": { + d: [ + ["M", 9.3, -7.77], + ["c", .06, -.06, .18, -.06, 1.71, -.06], + ["l", 1.65, 0], + ["l", .09, .09], + ["c", .06, .06, .06, .09, .06, .15], + ["c", -.03, .12, -9.21, 15.24, -9.3, 15.33], + ["c", -.06, .06, -.18, .06, -1.71, .06], + ["l", -1.65, 0], + ["l", -.09, -.09], + ["c", -.06, -.06, -.06, -.09, -.06, -.15], + ["c", .03, -.12, 9.21, -15.24, 9.3, -15.33], + ["z"] + ], + w: 12.81, + h: 15.63 + }, + "noteheads.indeterminate": { + d: [ + ["M", .78, -4.05], + ["c", .12, -.03, .24, -.03, .36, .03], + ["c", .03, .03, .93, .72, 1.95, 1.56], + ["l", 1.86, 1.5], + ["l", 1.86, -1.5], + ["c", 1.02, -.84, 1.92, -1.53, 1.95, -1.56], + ["c", .21, -.12, .33, -.09, .75, .24], + ["c", .3, .27, .36, .36, .36, .54], + ["c", 0, .03, -.03, .12, -.06, .18], + ["c", -.03, .06, -.9, .75, -1.89, 1.56], + ["l", -1.8, 1.47], + ["c", 0, .03, .81, .69, 1.8, 1.5], + ["c", .99, .81, 1.86, 1.5, 1.89, 1.56], + ["c", .03, .06, .06, .15, .06, .18], + ["c", 0, .18, -.06, .27, -.36, .54], + ["c", -.42, .33, -.54, .36, -.75, .24], + ["c", -.03, -.03, -.93, -.72, -1.95, -1.56], + ["l", -1.86, -1.5], + ["l", -1.86, 1.5], + ["c", -1.02, .84, -1.92, 1.53, -1.95, 1.56], + ["c", -.21, .12, -.33, .09, -.75, -.24], + ["c", -.3, -.27, -.36, -.36, -.36, -.54], + ["c", 0, -.03, .03, -.12, .06, -.18], + ["c", .03, -.06, .9, -.75, 1.89, -1.56], + ["l", 1.8, -1.47], + ["c", 0, -.03, -.81, -.69, -1.8, -1.5], + ["c", -.99, -.81, -1.86, -1.5, -1.89, -1.56], + ["c", -.06, -.12, -.09, -.21, -.03, -.36], + ["c", .03, -.09, .57, -.57, .72, -.63], + ["z"] + ], + w: 9.843, + h: 8.139 + }, + "scripts.ufermata": { + d: [ + ["M", -.75, -10.77], + ["c", .12, 0, .45, -.03, .69, -.03], + ["c", 2.91, -.03, 5.55, 1.53, 7.41, 4.35], + ["c", 1.17, 1.71, 1.95, 3.72, 2.43, 6.03], + ["c", .12, .51, .12, .57, .03, .69], + ["c", -.12, .21, -.48, .27, -.69, .12], + ["c", -.12, -.09, -.18, -.24, -.27, -.69], + ["c", -.78, -3.63, -3.42, -6.54, -6.78, -7.38], + ["c", -.78, -.21, -1.2, -.24, -2.07, -.24], + ["c", -.63, 0, -.84, 0, -1.2, .06], + ["c", -1.83, .27, -3.42, 1.08, -4.8, 2.37], + ["c", -1.41, 1.35, -2.4, 3.21, -2.85, 5.19], + ["c", -.09, .45, -.15, .6, -.27, .69], + ["c", -.21, .15, -.57, .09, -.69, -.12], + ["c", -.09, -.12, -.09, -.18, .03, -.69], + ["c", .33, -1.62, .78, -3, 1.47, -4.38], + ["c", 1.77, -3.54, 4.44, -5.67, 7.56, -5.97], + ["z"], + ["m", .33, 7.47], + ["c", 1.38, -.3, 2.58, .9, 2.31, 2.25], + ["c", -.15, .72, -.78, 1.35, -1.47, 1.5], + ["c", -1.38, .27, -2.58, -.93, -2.31, -2.31], + ["c", .15, -.69, .78, -1.29, 1.47, -1.44], + ["z"] + ], + w: 19.748, + h: 11.289 + }, + "scripts.dfermata": { + d: [ + ["M", -9.63, -.42], + ["c", .15, -.09, .36, -.06, .51, .03], + ["c", .12, .09, .18, .24, .27, .66], + ["c", .78, 3.66, 3.42, 6.57, 6.78, 7.41], + ["c", .78, .21, 1.2, .24, 2.07, .24], + ["c", .63, 0, .84, 0, 1.2, -.06], + ["c", 1.83, -.27, 3.42, -1.08, 4.8, -2.37], + ["c", 1.41, -1.35, 2.4, -3.21, 2.85, -5.22], + ["c", .09, -.42, .15, -.57, .27, -.66], + ["c", .21, -.15, .57, -.09, .69, .12], + ["c", .09, .12, .09, .18, -.03, .69], + ["c", -.33, 1.62, -.78, 3, -1.47, 4.38], + ["c", -1.92, 3.84, -4.89, 6, -8.31, 6], + ["c", -3.42, 0, -6.39, -2.16, -8.31, -6], + ["c", -.48, -.96, -.84, -1.92, -1.14, -2.97], + ["c", -.18, -.69, -.42, -1.74, -.42, -1.92], + ["c", 0, -.12, .09, -.27, .24, -.33], + ["z"], + ["m", 9.21, 0], + ["c", 1.2, -.27, 2.34, .63, 2.34, 1.86], + ["c", 0, .9, -.66, 1.68, -1.5, 1.89], + ["c", -1.38, .27, -2.58, -.93, -2.31, -2.31], + ["c", .15, -.69, .78, -1.29, 1.47, -1.44], + ["z"] + ], + w: 19.744, + h: 11.274 + }, + "scripts.sforzato": { + d: [ + ["M", -6.45, -3.69], + ["c", .06, -.03, .15, -.06, .18, -.06], + ["c", .06, 0, 2.85, .72, 6.24, 1.59], + ["l", 6.33, 1.65], + ["c", .33, .06, .45, .21, .45, .51], + ["c", 0, .3, -.12, .45, -.45, .51], + ["l", -6.33, 1.65], + ["c", -3.39, .87, -6.18, 1.59, -6.21, 1.59], + ["c", -.21, 0, -.48, -.24, -.51, -.45], + ["c", 0, -.15, .06, -.36, .18, -.45], + ["c", .09, -.06, .87, -.27, 3.84, -1.05], + ["c", 2.04, -.54, 3.84, -.99, 4.02, -1.02], + ["c", .15, -.06, 1.14, -.24, 2.22, -.42], + ["c", 1.05, -.18, 1.92, -.36, 1.92, -.36], + ["c", 0, 0, -.87, -.18, -1.92, -.36], + ["c", -1.08, -.18, -2.07, -.36, -2.22, -.42], + ["c", -.18, -.03, -1.98, -.48, -4.02, -1.02], + ["c", -2.97, -.78, -3.75, -.99, -3.84, -1.05], + ["c", -.12, -.09, -.18, -.3, -.18, -.45], + ["c", .03, -.15, .15, -.3, .3, -.39], + ["z"] + ], + w: 13.5, + h: 7.5 + }, + "scripts.staccato": { + d: [ + ["M", -.36, -1.47], + ["c", .93, -.21, 1.86, .51, 1.86, 1.47], + ["c", 0, .93, -.87, 1.65, -1.8, 1.47], + ["c", -.54, -.12, -1.02, -.57, -1.14, -1.08], + ["c", -.21, -.81, .27, -1.65, 1.08, -1.86], + ["z"] + ], + w: 2.989, + h: 3.004 + }, + "scripts.tenuto": { + d: [ + ["M", -4.2, -.48], + ["l", .12, -.06], + ["l", 4.08, 0], + ["l", 4.08, 0], + ["l", .12, .06], + ["c", .39, .21, .39, .75, 0, .96], + ["l", -.12, .06], + ["l", -4.08, 0], + ["l", -4.08, 0], + ["l", -.12, -.06], + ["c", -.39, -.21, -.39, -.75, 0, -.96], + ["z"] + ], + w: 8.985, + h: 1.08 + }, + "scripts.umarcato": { + d: [ + ["M", -.15, -8.19], + ["c", .15, -.12, .36, -.03, .45, .15], + ["c", .21, .42, 3.45, 7.65, 3.45, 7.71], + ["c", 0, .12, -.12, .27, -.21, .3], + ["c", -.03, .03, -.51, .03, -1.14, .03], + ["c", -1.05, 0, -1.08, 0, -1.17, -.06], + ["c", -.09, -.06, -.24, -.36, -1.17, -2.4], + ["c", -.57, -1.29, -1.05, -2.34, -1.08, -2.34], + ["c", 0, -.03, -.51, 1.02, -1.08, 2.34], + ["c", -.93, 2.07, -1.08, 2.34, -1.14, 2.4], + ["c", -.06, .03, -.15, .06, -.18, .06], + ["c", -.15, 0, -.33, -.18, -.33, -.33], + ["c", 0, -.06, 3.24, -7.32, 3.45, -7.71], + ["c", .03, -.06, .09, -.15, .15, -.15], + ["z"] + ], + w: 7.5, + h: 8.245 + }, + "scripts.dmarcato": { + d: [ + ["M", -3.57, .03], + ["c", .03, 0, .57, -.03, 1.17, -.03], + ["c", 1.05, 0, 1.08, 0, 1.17, .06], + ["c", .09, .06, .24, .36, 1.17, 2.4], + ["c", .57, 1.29, 1.05, 2.34, 1.08, 2.34], + ["c", 0, .03, .51, -1.02, 1.08, -2.34], + ["c", .93, -2.07, 1.08, -2.34, 1.14, -2.4], + ["c", .06, -.03, .15, -.06, .18, -.06], + ["c", .15, 0, .33, .18, .33, .33], + ["c", 0, .09, -3.45, 7.74, -3.54, 7.83], + ["c", -.12, .12, -.3, .12, -.42, 0], + ["c", -.09, -.09, -3.54, -7.74, -3.54, -7.83], + ["c", 0, -.09, .12, -.27, .18, -.3], + ["z"] + ], + w: 7.5, + h: 8.25 + }, + "scripts.stopped": { + d: [ + ["M", -.27, -4.08], + ["c", .18, -.09, .36, -.09, .54, 0], + ["c", .18, .09, .24, .15, .33, .3], + ["l", .06, .15], + ["l", 0, 1.5], + ["l", 0, 1.47], + ["l", 1.47, 0], + ["l", 1.5, 0], + ["l", .15, .06], + ["c", .15, .09, .21, .15, .3, .33], + ["c", .09, .18, .09, .36, 0, .54], + ["c", -.09, .18, -.15, .24, -.33, .33], + ["c", -.12, .06, -.18, .06, -1.62, .06], + ["l", -1.47, 0], + ["l", 0, 1.47], + ["l", 0, 1.47], + ["l", -.06, .15], + ["c", -.09, .18, -.15, .24, -.33, .33], + ["c", -.18, .09, -.36, .09, -.54, 0], + ["c", -.18, -.09, -.24, -.15, -.33, -.33], + ["l", -.06, -.15], + ["l", 0, -1.47], + ["l", 0, -1.47], + ["l", -1.47, 0], + ["c", -1.44, 0, -1.5, 0, -1.62, -.06], + ["c", -.18, -.09, -.24, -.15, -.33, -.33], + ["c", -.09, -.18, -.09, -.36, 0, -.54], + ["c", .09, -.18, .15, -.24, .33, -.33], + ["l", .15, -.06], + ["l", 1.47, 0], + ["l", 1.47, 0], + ["l", 0, -1.47], + ["c", 0, -1.44, 0, -1.5, .06, -1.62], + ["c", .09, -.18, .15, -.24, .33, -.33], + ["z"] + ], + w: 8.295, + h: 8.295 + }, + "scripts.upbow": { + d: [ + ["M", -4.65, -15.54], + ["c", .12, -.09, .36, -.06, .48, .03], + ["c", .03, .03, .09, .09, .12, .15], + ["c", .03, .06, .66, 2.13, 1.41, 4.62], + ["c", 1.35, 4.41, 1.38, 4.56, 2.01, 6.96], + ["l", .63, 2.46], + ["l", .63, -2.46], + ["c", .63, -2.4, .66, -2.55, 2.01, -6.96], + ["c", .75, -2.49, 1.38, -4.56, 1.41, -4.62], + ["c", .06, -.15, .18, -.21, .36, -.24], + ["c", .15, 0, .3, .06, .39, .18], + ["c", .15, .21, .24, -.18, -2.1, 7.56], + ["c", -1.2, 3.96, -2.22, 7.32, -2.25, 7.41], + ["c", 0, .12, -.06, .27, -.09, .3], + ["c", -.12, .21, -.6, .21, -.72, 0], + ["c", -.03, -.03, -.09, -.18, -.09, -.3], + ["c", -.03, -.09, -1.05, -3.45, -2.25, -7.41], + ["c", -2.34, -7.74, -2.25, -7.35, -2.1, -7.56], + ["c", .03, -.03, .09, -.09, .15, -.12], + ["z"] + ], + w: 9.73, + h: 15.608 + }, + "scripts.downbow": { + d: [ + ["M", -5.55, -9.93], + ["l", .09, -.06], + ["l", 5.46, 0], + ["l", 5.46, 0], + ["l", .09, .06], + ["l", .06, .09], + ["l", 0, 4.77], + ["c", 0, 5.28, 0, 4.89, -.18, 5.01], + ["c", -.18, .12, -.42, .06, -.54, -.12], + ["c", -.06, -.09, -.06, -.18, -.06, -2.97], + ["l", 0, -2.85], + ["l", -4.83, 0], + ["l", -4.83, 0], + ["l", 0, 2.85], + ["c", 0, 2.79, 0, 2.88, -.06, 2.97], + ["c", -.15, .24, -.51, .24, -.66, 0], + ["c", -.06, -.09, -.06, -.21, -.06, -4.89], + ["l", 0, -4.77], + ["z"] + ], + w: 11.22, + h: 9.992 + }, + "scripts.turn": { + d: [ + ["M", -4.77, -3.9], + ["c", .36, -.06, 1.05, -.06, 1.44, .03], + ["c", .78, .15, 1.5, .51, 2.34, 1.14], + ["c", .6, .45, 1.05, .87, 2.22, 2.01], + ["c", 1.11, 1.08, 1.62, 1.5, 2.22, 1.86], + ["c", .6, .36, 1.32, .57, 1.92, .57], + ["c", .9, 0, 1.71, -.57, 1.89, -1.35], + ["c", .24, -.93, -.39, -1.89, -1.35, -2.1], + ["l", -.15, -.06], + ["l", -.09, .15], + ["c", -.03, .09, -.15, .24, -.24, .33], + ["c", -.72, .72, -2.04, .54, -2.49, -.36], + ["c", -.48, -.93, .03, -1.86, 1.17, -2.19], + ["c", .3, -.09, 1.02, -.09, 1.35, 0], + ["c", .99, .27, 1.74, .87, 2.25, 1.83], + ["c", .69, 1.41, .63, 3, -.21, 4.26], + ["c", -.21, .3, -.69, .81, -.99, 1.02], + ["c", -.3, .21, -.84, .45, -1.17, .54], + ["c", -1.23, .36, -2.49, .15, -3.72, -.6], + ["c", -.75, -.48, -1.41, -1.02, -2.85, -2.46], + ["c", -1.11, -1.08, -1.62, -1.5, -2.22, -1.86], + ["c", -.6, -.36, -1.32, -.57, -1.92, -.57], + ["c", -.9, 0, -1.71, .57, -1.89, 1.35], + ["c", -.24, .93, .39, 1.89, 1.35, 2.1], + ["l", .15, .06], + ["l", .09, -.15], + ["c", .03, -.09, .15, -.24, .24, -.33], + ["c", .72, -.72, 2.04, -.54, 2.49, .36], + ["c", .48, .93, -.03, 1.86, -1.17, 2.19], + ["c", -.3, .09, -1.02, .09, -1.35, 0], + ["c", -.99, -.27, -1.74, -.87, -2.25, -1.83], + ["c", -.69, -1.41, -.63, -3, .21, -4.26], + ["c", .21, -.3, .69, -.81, .99, -1.02], + ["c", .48, -.33, 1.11, -.57, 1.74, -.66], + ["z"] + ], + w: 16.366, + h: 7.893 + }, + "scripts.trill": { + d: [ + ["M", -.51, -16.02], + ["c", .12, -.09, .21, -.18, .21, -.18], + ["l", -.81, 4.02], + ["l", -.81, 4.02], + ["c", .03, 0, .51, -.27, 1.08, -.6], + ["c", .6, -.3, 1.14, -.63, 1.26, -.66], + ["c", 1.14, -.54, 2.31, -.6, 3.09, -.18], + ["c", .27, .15, .54, .36, .6, .51], + ["l", .06, .12], + ["l", .21, -.21], + ["c", .9, -.81, 2.22, -.99, 3.12, -.42], + ["c", .6, .42, .9, 1.14, .78, 2.07], + ["c", -.15, 1.29, -1.05, 2.31, -1.95, 2.25], + ["c", -.48, -.03, -.78, -.3, -.96, -.81], + ["c", -.09, -.27, -.09, -.9, -.03, -1.2], + ["c", .21, -.75, .81, -1.23, 1.59, -1.32], + ["l", .24, -.03], + ["l", -.09, -.12], + ["c", -.51, -.66, -1.62, -.63, -2.31, .03], + ["c", -.39, .42, -.3, .09, -1.23, 4.77], + ["l", -.81, 4.14], + ["c", -.03, 0, -.12, -.03, -.21, -.09], + ["c", -.33, -.15, -.54, -.18, -.99, -.18], + ["c", -.42, 0, -.66, .03, -1.05, .18], + ["c", -.12, .06, -.21, .09, -.21, .09], + ["c", 0, -.03, .36, -1.86, .81, -4.11], + ["c", .9, -4.47, .87, -4.26, .69, -4.53], + ["c", -.21, -.36, -.66, -.51, -1.17, -.36], + ["c", -.15, .06, -2.22, 1.14, -2.58, 1.38], + ["c", -.12, .09, -.12, .09, -.21, .6], + ["l", -.09, .51], + ["l", .21, .24], + ["c", .63, .75, 1.02, 1.47, 1.2, 2.19], + ["c", .06, .27, .06, .36, .06, .81], + ["c", 0, .42, 0, .54, -.06, .78], + ["c", -.15, .54, -.33, .93, -.63, 1.35], + ["c", -.18, .24, -.57, .63, -.81, .78], + ["c", -.24, .15, -.63, .36, -.84, .42], + ["c", -.27, .06, -.66, .06, -.87, .03], + ["c", -.81, -.18, -1.32, -1.05, -1.38, -2.46], + ["c", -.03, -.6, .03, -.99, .33, -2.46], + ["c", .21, -1.08, .24, -1.32, .21, -1.29], + ["c", -1.2, .48, -2.4, .75, -3.21, .72], + ["c", -.69, -.06, -1.17, -.3, -1.41, -.72], + ["c", -.39, -.75, -.12, -1.8, .66, -2.46], + ["c", .24, -.18, .69, -.42, 1.02, -.51], + ["c", .69, -.18, 1.53, -.15, 2.31, .09], + ["c", .3, .09, .75, .3, .99, .45], + ["c", .12, .09, .15, .09, .15, .03], + ["c", .03, -.03, .33, -1.59, .72, -3.45], + ["c", .36, -1.86, .66, -3.42, .69, -3.45], + ["c", 0, -.03, .03, -.03, .21, .03], + ["c", .21, .06, .27, .06, .48, .06], + ["c", .42, -.03, .78, -.18, 1.26, -.48], + ["c", .15, -.12, .36, -.27, .48, -.39], + ["z"], + ["m", -5.73, 7.68], + ["c", -.27, -.03, -.96, -.06, -1.2, -.03], + ["c", -.81, .12, -1.35, .57, -1.5, 1.2], + ["c", -.18, .66, .12, 1.14, .75, 1.29], + ["c", .66, .12, 1.92, -.12, 3.18, -.66], + ["l", .33, -.15], + ["l", .09, -.39], + ["c", .06, -.21, .09, -.42, .09, -.45], + ["c", 0, -.03, -.45, -.3, -.75, -.45], + ["c", -.27, -.15, -.66, -.27, -.99, -.36], + ["z"], + ["m", 4.29, 3.63], + ["c", -.24, -.39, -.51, -.75, -.51, -.69], + ["c", -.06, .12, -.39, 1.92, -.45, 2.28], + ["c", -.09, .54, -.12, 1.14, -.06, 1.38], + ["c", .06, .42, .21, .6, .51, .57], + ["c", .39, -.06, .75, -.48, .93, -1.14], + ["c", .09, -.33, .09, -1.05, 0, -1.38], + ["c", -.09, -.39, -.24, -.69, -.42, -1.02], + ["z"] + ], + w: 17.963, + h: 16.49 + }, + "scripts.segno": { + d: [ + ["M", -3.72, -11.22], + ["c", .78, -.09, 1.59, .03, 2.31, .42], + ["c", 1.2, .6, 2.01, 1.71, 2.31, 3.09], + ["c", .09, .42, .09, 1.2, .03, 1.5], + ["c", -.15, .45, -.39, .81, -.66, .93], + ["c", -.33, .18, -.84, .21, -1.23, .15], + ["c", -.81, -.18, -1.32, -.93, -1.26, -1.89], + ["c", .03, -.36, .09, -.57, .24, -.9], + ["c", .15, -.33, .45, -.6, .72, -.75], + ["c", .12, -.06, .18, -.09, .18, -.12], + ["c", 0, -.03, -.03, -.15, -.09, -.24], + ["c", -.18, -.45, -.54, -.87, -.96, -1.08], + ["c", -1.11, -.57, -2.34, -.18, -2.88, .9], + ["c", -.24, .51, -.33, 1.11, -.24, 1.83], + ["c", .27, 1.92, 1.5, 3.54, 3.93, 5.13], + ["c", .48, .33, 1.26, .78, 1.29, .78], + ["c", .03, 0, 1.35, -2.19, 2.94, -4.89], + ["l", 2.88, -4.89], + ["l", .84, 0], + ["l", .87, 0], + ["l", -.03, .06], + ["c", -.15, .21, -6.15, 10.41, -6.15, 10.44], + ["c", 0, 0, .21, .15, .48, .27], + ["c", 2.61, 1.47, 4.35, 3.03, 5.13, 4.65], + ["c", 1.14, 2.34, .51, 5.07, -1.44, 6.39], + ["c", -.66, .42, -1.32, .63, -2.13, .69], + ["c", -2.01, .09, -3.81, -1.41, -4.26, -3.54], + ["c", -.09, -.42, -.09, -1.2, -.03, -1.5], + ["c", .15, -.45, .39, -.81, .66, -.93], + ["c", .33, -.18, .84, -.21, 1.23, -.15], + ["c", .81, .18, 1.32, .93, 1.26, 1.89], + ["c", -.03, .36, -.09, .57, -.24, .9], + ["c", -.15, .33, -.45, .6, -.72, .75], + ["c", -.12, .06, -.18, .09, -.18, .12], + ["c", 0, .03, .03, .15, .09, .24], + ["c", .18, .45, .54, .87, .96, 1.08], + ["c", 1.11, .57, 2.34, .18, 2.88, -.9], + ["c", .24, -.51, .33, -1.11, .24, -1.83], + ["c", -.27, -1.92, -1.5, -3.54, -3.93, -5.13], + ["c", -.48, -.33, -1.26, -.78, -1.29, -.78], + ["c", -.03, 0, -1.35, 2.19, -2.91, 4.89], + ["l", -2.88, 4.89], + ["l", -.87, 0], + ["l", -.87, 0], + ["l", .03, -.06], + ["c", .15, -.21, 6.15, -10.41, 6.15, -10.44], + ["c", 0, 0, -.21, -.15, -.48, -.3], + ["c", -2.61, -1.44, -4.35, -3, -5.13, -4.62], + ["c", -.9, -1.89, -.72, -4.02, .48, -5.52], + ["c", .69, -.84, 1.68, -1.41, 2.73, -1.53], + ["z"], + ["m", 8.76, 9.09], + ["c", .03, -.03, .15, -.03, .27, -.03], + ["c", .33, .03, .57, .18, .72, .48], + ["c", .09, .18, .09, .57, 0, .75], + ["c", -.09, .18, -.21, .3, -.36, .39], + ["c", -.15, .06, -.21, .06, -.39, .06], + ["c", -.21, 0, -.27, 0, -.39, -.06], + ["c", -.3, -.15, -.48, -.45, -.48, -.75], + ["c", 0, -.39, .24, -.72, .63, -.84], + ["z"], + ["m", -10.53, 2.61], + ["c", .03, -.03, .15, -.03, .27, -.03], + ["c", .33, .03, .57, .18, .72, .48], + ["c", .09, .18, .09, .57, 0, .75], + ["c", -.09, .18, -.21, .3, -.36, .39], + ["c", -.15, .06, -.21, .06, -.39, .06], + ["c", -.21, 0, -.27, 0, -.39, -.06], + ["c", -.3, -.15, -.48, -.45, -.48, -.75], + ["c", 0, -.39, .24, -.72, .63, -.84], + ["z"] + ], + w: 15, + h: 22.504 + }, + "scripts.coda": { + d: [ + ["M", -.21, -10.47], + ["c", .18, -.12, .42, -.06, .54, .12], + ["c", .06, .09, .06, .18, .06, 1.5], + ["l", 0, 1.38], + ["l", .18, 0], + ["c", .39, .06, .96, .24, 1.38, .48], + ["c", 1.68, .93, 2.82, 3.24, 3.03, 6.12], + ["c", .03, .24, .03, .45, .03, .45], + ["c", 0, .03, .6, .03, 1.35, .03], + ["c", 1.5, 0, 1.47, 0, 1.59, .18], + ["c", .09, .12, .09, .3, 0, .42], + ["c", -.12, .18, -.09, .18, -1.59, .18], + ["c", -.75, 0, -1.35, 0, -1.35, .03], + ["c", 0, 0, 0, .21, -.03, .42], + ["c", -.24, 3.15, -1.53, 5.58, -3.45, 6.36], + ["c", -.27, .12, -.72, .24, -.96, .27], + ["l", -.18, 0], + ["l", 0, 1.38], + ["c", 0, 1.32, 0, 1.41, -.06, 1.5], + ["c", -.15, .24, -.51, .24, -.66, 0], + ["c", -.06, -.09, -.06, -.18, -.06, -1.5], + ["l", 0, -1.38], + ["l", -.18, 0], + ["c", -.39, -.06, -.96, -.24, -1.38, -.48], + ["c", -1.68, -.93, -2.82, -3.24, -3.03, -6.15], + ["c", -.03, -.21, -.03, -.42, -.03, -.42], + ["c", 0, -.03, -.6, -.03, -1.35, -.03], + ["c", -1.5, 0, -1.47, 0, -1.59, -.18], + ["c", -.09, -.12, -.09, -.3, 0, -.42], + ["c", .12, -.18, .09, -.18, 1.59, -.18], + ["c", .75, 0, 1.35, 0, 1.35, -.03], + ["c", 0, 0, 0, -.21, .03, -.45], + ["c", .24, -3.12, 1.53, -5.55, 3.45, -6.33], + ["c", .27, -.12, .72, -.24, .96, -.27], + ["l", .18, 0], + ["l", 0, -1.38], + ["c", 0, -1.53, 0, -1.5, .18, -1.62], + ["z"], + ["m", -.18, 6.93], + ["c", 0, -2.97, 0, -3.15, -.06, -3.15], + ["c", -.09, 0, -.51, .15, -.66, .21], + ["c", -.87, .51, -1.38, 1.62, -1.56, 3.51], + ["c", -.06, .54, -.12, 1.59, -.12, 2.16], + ["l", 0, .42], + ["l", 1.2, 0], + ["l", 1.2, 0], + ["l", 0, -3.15], + ["z"], + ["m", 1.17, -3.06], + ["c", -.09, -.03, -.21, -.06, -.27, -.09], + ["l", -.12, 0], + ["l", 0, 3.15], + ["l", 0, 3.15], + ["l", 1.2, 0], + ["l", 1.2, 0], + ["l", 0, -.81], + ["c", -.06, -2.4, -.33, -3.69, -.93, -4.59], + ["c", -.27, -.39, -.66, -.69, -1.08, -.81], + ["z"], + ["m", -1.17, 10.14], + ["l", 0, -3.15], + ["l", -1.2, 0], + ["l", -1.2, 0], + ["l", 0, .81], + ["c", .03, .96, .06, 1.47, .15, 2.13], + ["c", .24, 2.04, .96, 3.12, 2.13, 3.36], + ["l", .12, 0], + ["l", 0, -3.15], + ["z"], + ["m", 3.18, -2.34], + ["l", 0, -.81], + ["l", -1.2, 0], + ["l", -1.2, 0], + ["l", 0, 3.15], + ["l", 0, 3.15], + ["l", .12, 0], + ["c", 1.17, -.24, 1.89, -1.32, 2.13, -3.36], + ["c", .09, -.66, .12, -1.17, .15, -2.13], + ["z"] + ], + w: 16.035, + h: 21.062 + }, + "scripts.comma": { + d: [ + ["M", 1.14, -4.62], + ["c", .3, -.12, .69, -.03, .93, .15], + ["c", .12, .12, .36, .45, .51, .78], + ["c", .9, 1.77, .54, 4.05, -1.08, 6.75], + ["c", -.36, .63, -.87, 1.38, -.96, 1.44], + ["c", -.18, .12, -.42, .06, -.54, -.12], + ["c", -.09, -.18, -.09, -.3, .12, -.6], + ["c", .96, -1.44, 1.44, -2.97, 1.38, -4.35], + ["c", -.06, -.93, -.3, -1.68, -.78, -2.46], + ["c", -.27, -.39, -.33, -.63, -.24, -.96], + ["c", .09, -.27, .36, -.54, .66, -.63], + ["z"] + ], + w: 3.042, + h: 9.237 + }, + "scripts.roll": { + d: [ + ["M", 1.95, -6], + ["c", .21, -.09, .36, -.09, .57, 0], + ["c", .39, .15, .63, .39, 1.47, 1.35], + ["c", .66, .75, .78, .87, 1.08, 1.05], + ["c", .75, .45, 1.65, .42, 2.4, -.06], + ["c", .12, -.09, .27, -.27, .54, -.6], + ["c", .42, -.54, .51, -.63, .69, -.63], + ["c", .09, 0, .3, .12, .36, .21], + ["c", .09, .12, .12, .3, .03, .42], + ["c", -.06, .12, -3.15, 3.9, -3.3, 4.08], + ["c", -.06, .06, -.18, .12, -.27, .18], + ["c", -.27, .12, -.6, .06, -.99, -.27], + ["c", -.27, -.21, -.42, -.39, -1.08, -1.14], + ["c", -.63, -.72, -.81, -.9, -1.17, -1.08], + ["c", -.36, -.18, -.57, -.21, -.99, -.21], + ["c", -.39, 0, -.63, .03, -.93, .18], + ["c", -.36, .15, -.51, .27, -.9, .81], + ["c", -.24, .27, -.45, .51, -.48, .54], + ["c", -.12, .09, -.27, .06, -.39, 0], + ["c", -.24, -.15, -.33, -.39, -.21, -.6], + ["c", .09, -.12, 3.18, -3.87, 3.33, -4.02], + ["c", .06, -.06, .18, -.15, .24, -.21], + ["z"] + ], + w: 10.817, + h: 6.125 + }, + "scripts.prall": { + d: [ + ["M", -4.38, -3.69], + ["c", .06, -.03, .18, -.06, .24, -.06], + ["c", .3, 0, .27, -.03, 1.89, 1.95], + ["l", 1.53, 1.83], + ["c", .03, 0, .57, -.84, 1.23, -1.83], + ["c", 1.14, -1.68, 1.23, -1.83, 1.35, -1.89], + ["c", .06, -.03, .18, -.06, .24, -.06], + ["c", .3, 0, .27, -.03, 1.89, 1.95], + ["l", 1.53, 1.83], + ["l", .48, -.69], + ["c", .51, -.78, .54, -.84, .69, -.9], + ["c", .42, -.18, .87, .15, .81, .6], + ["c", -.03, .12, -.3, .51, -1.5, 2.37], + ["c", -1.38, 2.07, -1.5, 2.22, -1.62, 2.28], + ["c", -.06, .03, -.18, .06, -.24, .06], + ["c", -.3, 0, -.27, .03, -1.89, -1.95], + ["l", -1.53, -1.83], + ["c", -.03, 0, -.57, .84, -1.23, 1.83], + ["c", -1.14, 1.68, -1.23, 1.83, -1.35, 1.89], + ["c", -.06, .03, -.18, .06, -.24, .06], + ["c", -.3, 0, -.27, .03, -1.89, -1.95], + ["l", -1.53, -1.83], + ["l", -.48, .69], + ["c", -.51, .78, -.54, .84, -.69, .9], + ["c", -.42, .18, -.87, -.15, -.81, -.6], + ["c", .03, -.12, .3, -.51, 1.5, -2.37], + ["c", 1.38, -2.07, 1.5, -2.22, 1.62, -2.28], + ["z"] + ], + w: 15.011, + h: 7.5 + }, + "scripts.arpeggio": { + d: [ + ["M", 1.5, 0], + ["c", 1.5, 2, 1.5, 3, 1.5, 3], + ["s", 0, 1, -2, 1.5], + ["s", -.5, 3, 1, 5.5], + ["l", 1.5, 0], + ["s", -1.75, -2, -1.9, -3.25], + ["s", 2.15, -.6, 2.95, -1.6], + ["s", .45, -1, .5, -1.25], + ["s", 0, -1, -2, -3.9], + ["l", -1.5, 0], + ["z"] + ], + w: 5, + h: 10 + }, + "scripts.mordent": { + d: [ + ["M", -.21, -4.95], + ["c", .27, -.15, .63, 0, .75, .27], + ["c", .06, .12, .06, .24, .06, 1.44], + ["l", 0, 1.29], + ["l", .57, -.84], + ["c", .51, -.75, .57, -.84, .69, -.9], + ["c", .06, -.03, .18, -.06, .24, -.06], + ["c", .3, 0, .27, -.03, 1.89, 1.95], + ["l", 1.53, 1.83], + ["l", .48, -.69], + ["c", .51, -.78, .54, -.84, .69, -.9], + ["c", .42, -.18, .87, .15, .81, .6], + ["c", -.03, .12, -.3, .51, -1.5, 2.37], + ["c", -1.38, 2.07, -1.5, 2.22, -1.62, 2.28], + ["c", -.06, .03, -.18, .06, -.24, .06], + ["c", -.3, 0, -.27, .03, -1.83, -1.89], + ["c", -.81, -.99, -1.5, -1.8, -1.53, -1.86], + ["c", -.06, -.03, -.06, -.03, -.12, .03], + ["c", -.06, .06, -.06, .15, -.06, 2.28], + ["c", 0, 1.95, 0, 2.25, -.06, 2.34], + ["c", -.18, .45, -.81, .48, -1.05, .03], + ["c", -.03, -.06, -.06, -.24, -.06, -1.41], + ["l", 0, -1.35], + ["l", -.57, .84], + ["c", -.54, .78, -.6, .87, -.72, .93], + ["c", -.06, .03, -.18, .06, -.24, .06], + ["c", -.3, 0, -.27, .03, -1.89, -1.95], + ["l", -1.53, -1.83], + ["l", -.48, .69], + ["c", -.51, .78, -.54, .84, -.69, .9], + ["c", -.42, .18, -.87, -.15, -.81, -.6], + ["c", .03, -.12, .3, -.51, 1.5, -2.37], + ["c", 1.38, -2.07, 1.5, -2.22, 1.62, -2.28], + ["c", .06, -.03, .18, -.06, .24, -.06], + ["c", .3, 0, .27, -.03, 1.89, 1.95], + ["l", 1.53, 1.83], + ["c", .03, 0, .06, -.06, .09, -.09], + ["c", .06, -.12, .06, -.15, .06, -2.28], + ["c", 0, -1.92, 0, -2.22, .06, -2.31], + ["c", .06, -.15, .15, -.24, .3, -.3], + ["z"] + ], + w: 15.011, + h: 10.012 + }, + "flags.u8th": { + d: [ + ["M", -.42, 3.75], + ["l", 0, -3.75], + ["l", .21, 0], + ["l", .21, 0], + ["l", 0, .18], + ["c", 0, .3, .06, .84, .12, 1.23], + ["c", .24, 1.53, .9, 3.12, 2.13, 5.16], + ["l", .99, 1.59], + ["c", .87, 1.44, 1.38, 2.34, 1.77, 3.09], + ["c", .81, 1.68, 1.2, 3.06, 1.26, 4.53], + ["c", .03, 1.53, -.21, 3.27, -.75, 5.01], + ["c", -.21, .69, -.51, 1.5, -.6, 1.59], + ["c", -.09, .12, -.27, .21, -.42, .21], + ["c", -.15, 0, -.42, -.12, -.51, -.21], + ["c", -.15, -.18, -.18, -.42, -.09, -.66], + ["c", .15, -.33, .45, -1.2, .57, -1.62], + ["c", .42, -1.38, .6, -2.58, .6, -3.9], + ["c", 0, -.66, 0, -.81, -.06, -1.11], + ["c", -.39, -2.07, -1.8, -4.26, -4.59, -7.14], + ["l", -.42, -.45], + ["l", -.21, 0], + ["l", -.21, 0], + ["l", 0, -3.75], + ["z"] + ], + w: 6.692, + h: 22.59 + }, + "flags.u16th": { + d: [ + ["M", -.42, 7.5], + ["l", 0, -7.5], + ["l", .21, 0], + ["l", .21, 0], + ["l", 0, .39], + ["c", .06, 1.08, .39, 2.19, .99, 3.39], + ["c", .45, .9, .87, 1.59, 1.95, 3.12], + ["c", 1.29, 1.86, 1.77, 2.64, 2.22, 3.57], + ["c", .45, .93, .72, 1.8, .87, 2.64], + ["c", .06, .51, .06, 1.5, 0, 1.92], + ["c", -.12, .6, -.3, 1.2, -.54, 1.71], + ["l", -.09, .24], + ["l", .18, .45], + ["c", .51, 1.2, .72, 2.22, .69, 3.42], + ["c", -.06, 1.53, -.39, 3.03, -.99, 4.53], + ["c", -.3, .75, -.36, .81, -.57, .9], + ["c", -.15, .09, -.33, .06, -.48, 0], + ["c", -.18, -.09, -.27, -.18, -.33, -.33], + ["c", -.09, -.18, -.06, -.3, .12, -.75], + ["c", .66, -1.41, 1.02, -2.88, 1.08, -4.32], + ["c", 0, -.6, -.03, -1.05, -.18, -1.59], + ["c", -.3, -1.2, -.99, -2.4, -2.25, -3.87], + ["c", -.42, -.48, -1.53, -1.62, -2.19, -2.22], + ["l", -.45, -.42], + ["l", -.03, 1.11], + ["l", 0, 1.11], + ["l", -.21, 0], + ["l", -.21, 0], + ["l", 0, -7.5], + ["z"], + ["m", 1.65, .09], + ["c", -.3, -.3, -.69, -.72, -.9, -.87], + ["l", -.33, -.33], + ["l", 0, .15], + ["c", 0, .3, .06, .81, .15, 1.26], + ["c", .27, 1.29, .87, 2.61, 2.04, 4.29], + ["c", .15, .24, .6, .87, .96, 1.38], + ["l", 1.08, 1.53], + ["l", .42, .63], + ["c", .03, 0, .12, -.36, .21, -.72], + ["c", .06, -.33, .06, -1.2, 0, -1.62], + ["c", -.33, -1.71, -1.44, -3.48, -3.63, -5.7], + ["z"] + ], + w: 6.693, + h: 26.337 + }, + "flags.u32nd": { + d: [ + ["M", -.42, 11.25], + ["l", 0, -11.25], + ["l", .21, 0], + ["l", .21, 0], + ["l", 0, .36], + ["c", .09, 1.68, .69, 3.27, 2.07, 5.46], + ["l", .87, 1.35], + ["c", 1.02, 1.62, 1.47, 2.37, 1.86, 3.18], + ["c", .48, 1.02, .78, 1.92, .93, 2.88], + ["c", .06, .48, .06, 1.5, 0, 1.89], + ["c", -.09, .42, -.21, .87, -.36, 1.26], + ["l", -.12, .3], + ["l", .15, .39], + ["c", .69, 1.56, .84, 2.88, .54, 4.38], + ["c", -.09, .45, -.27, 1.08, -.45, 1.47], + ["l", -.12, .24], + ["l", .18, .36], + ["c", .33, .72, .57, 1.56, .69, 2.34], + ["c", .12, 1.02, -.06, 2.52, -.42, 3.84], + ["c", -.27, .93, -.75, 2.13, -.93, 2.31], + ["c", -.18, .15, -.45, .18, -.66, .09], + ["c", -.18, -.09, -.27, -.18, -.33, -.33], + ["c", -.09, -.18, -.06, -.3, .06, -.6], + ["c", .21, -.36, .42, -.9, .57, -1.38], + ["c", .51, -1.41, .69, -3.06, .48, -4.08], + ["c", -.15, -.81, -.57, -1.68, -1.2, -2.55], + ["c", -.72, -.99, -1.83, -2.13, -3.3, -3.33], + ["l", -.48, -.42], + ["l", -.03, 1.53], + ["l", 0, 1.56], + ["l", -.21, 0], + ["l", -.21, 0], + ["l", 0, -11.25], + ["z"], + ["m", 1.26, -3.96], + ["c", -.27, -.3, -.54, -.6, -.66, -.72], + ["l", -.18, -.21], + ["l", 0, .42], + ["c", .06, .87, .24, 1.74, .66, 2.67], + ["c", .36, .87, .96, 1.86, 1.92, 3.18], + ["c", .21, .33, .63, .87, .87, 1.23], + ["c", .27, .39, .6, .84, .75, 1.08], + ["l", .27, .39], + ["l", .03, -.12], + ["c", .12, -.45, .15, -1.05, .09, -1.59], + ["c", -.27, -1.86, -1.38, -3.78, -3.75, -6.33], + ["z"], + ["m", -.27, 6.09], + ["c", -.27, -.21, -.48, -.42, -.51, -.45], + ["c", -.06, -.03, -.06, -.03, -.06, .21], + ["c", 0, .9, .3, 2.04, .81, 3.09], + ["c", .48, 1.02, .96, 1.77, 2.37, 3.63], + ["c", .6, .78, 1.05, 1.44, 1.29, 1.77], + ["c", .06, .12, .15, .21, .15, .18], + ["c", .03, -.03, .18, -.57, .24, -.87], + ["c", .06, -.45, .06, -1.32, -.03, -1.74], + ["c", -.09, -.48, -.24, -.9, -.51, -1.44], + ["c", -.66, -1.35, -1.83, -2.7, -3.75, -4.38], + ["z"] + ], + w: 6.697, + h: 32.145 + }, + "flags.u64th": { + d: [ + ["M", -.42, 15], + ["l", 0, -15], + ["l", .21, 0], + ["l", .21, 0], + ["l", 0, .36], + ["c", .06, 1.2, .39, 2.37, 1.02, 3.66], + ["c", .39, .81, .84, 1.56, 1.8, 3.09], + ["c", .81, 1.26, 1.05, 1.68, 1.35, 2.22], + ["c", .87, 1.5, 1.35, 2.79, 1.56, 4.08], + ["c", .06, .54, .06, 1.56, -.03, 2.04], + ["c", -.09, .48, -.21, .99, -.36, 1.35], + ["l", -.12, .27], + ["l", .12, .27], + ["c", .09, .15, .21, .45, .27, .66], + ["c", .69, 1.89, .63, 3.66, -.18, 5.46], + ["l", -.18, .39], + ["l", .15, .33], + ["c", .3, .66, .51, 1.44, .63, 2.1], + ["c", .06, .48, .06, 1.35, 0, 1.71], + ["c", -.15, .57, -.42, 1.2, -.78, 1.68], + ["l", -.21, .27], + ["l", .18, .33], + ["c", .57, 1.05, .93, 2.13, 1.02, 3.18], + ["c", .06, .72, 0, 1.83, -.21, 2.79], + ["c", -.18, 1.02, -.63, 2.34, -1.02, 3.09], + ["c", -.15, .33, -.48, .45, -.78, .3], + ["c", -.18, -.09, -.27, -.18, -.33, -.33], + ["c", -.09, -.18, -.06, -.3, .03, -.54], + ["c", .75, -1.5, 1.23, -3.45, 1.17, -4.89], + ["c", -.06, -1.02, -.42, -2.01, -1.17, -3.15], + ["c", -.48, -.72, -1.02, -1.35, -1.89, -2.22], + ["c", -.57, -.57, -1.56, -1.5, -1.92, -1.77], + ["l", -.12, -.09], + ["l", 0, 1.68], + ["l", 0, 1.68], + ["l", -.21, 0], + ["l", -.21, 0], + ["l", 0, -15], + ["z"], + ["m", .93, -8.07], + ["c", -.27, -.3, -.48, -.54, -.51, -.54], + ["c", 0, 0, 0, .69, .03, 1.02], + ["c", .15, 1.47, .75, 2.94, 2.04, 4.83], + ["l", 1.08, 1.53], + ["c", .39, .57, .84, 1.2, .99, 1.44], + ["c", .15, .24, .3, .45, .3, .45], + ["c", 0, 0, .03, -.09, .06, -.21], + ["c", .36, -1.59, -.15, -3.33, -1.47, -5.4], + ["c", -.63, -.93, -1.35, -1.83, -2.52, -3.12], + ["z"], + ["m", .06, 6.72], + ["c", -.24, -.21, -.48, -.42, -.51, -.45], + ["l", -.06, -.06], + ["l", 0, .33], + ["c", 0, 1.2, .3, 2.34, .93, 3.6], + ["c", .45, .9, .96, 1.68, 2.25, 3.51], + ["c", .39, .54, .84, 1.17, 1.02, 1.44], + ["c", .21, .33, .33, .51, .33, .48], + ["c", .06, -.09, .21, -.63, .3, -.99], + ["c", .06, -.33, .06, -.45, .06, -.96], + ["c", 0, -.6, -.03, -.84, -.18, -1.35], + ["c", -.3, -1.08, -1.02, -2.28, -2.13, -3.57], + ["c", -.39, -.45, -1.44, -1.47, -2.01, -1.98], + ["z"], + ["m", 0, 6.72], + ["c", -.24, -.21, -.48, -.39, -.51, -.42], + ["l", -.06, -.06], + ["l", 0, .33], + ["c", 0, 1.41, .45, 2.82, 1.38, 4.35], + ["c", .42, .72, .72, 1.14, 1.86, 2.73], + ["c", .36, .45, .75, .99, .87, 1.2], + ["c", .15, .21, .3, .36, .3, .36], + ["c", .06, 0, .3, -.48, .39, -.75], + ["c", .09, -.36, .12, -.63, .12, -1.05], + ["c", -.06, -1.05, -.45, -2.04, -1.2, -3.18], + ["c", -.57, -.87, -1.11, -1.53, -2.07, -2.49], + ["c", -.36, -.33, -.84, -.78, -1.08, -1.02], + ["z"] + ], + w: 6.682, + h: 39.694 + }, + "flags.d8th": { + d: [ + ["M", 5.67, -21.63], + ["c", .24, -.12, .54, -.06, .69, .15], + ["c", .06, .06, .21, .36, .39, .66], + ["c", .84, 1.77, 1.26, 3.36, 1.32, 5.1], + ["c", .03, 1.29, -.21, 2.37, -.81, 3.63], + ["c", -.6, 1.23, -1.26, 2.13, -3.21, 4.38], + ["c", -1.35, 1.53, -1.86, 2.19, -2.4, 2.97], + ["c", -.63, .93, -1.11, 1.92, -1.38, 2.79], + ["c", -.15, .54, -.27, 1.35, -.27, 1.8], + ["l", 0, .15], + ["l", -.21, 0], + ["l", -.21, 0], + ["l", 0, -3.75], + ["l", 0, -3.75], + ["l", .21, 0], + ["l", .21, 0], + ["l", .48, -.3], + ["c", 1.83, -1.11, 3.12, -2.1, 4.17, -3.12], + ["c", .78, -.81, 1.32, -1.53, 1.71, -2.31], + ["c", .45, -.93, .6, -1.74, .51, -2.88], + ["c", -.12, -1.56, -.63, -3.18, -1.47, -4.68], + ["c", -.12, -.21, -.15, -.33, -.06, -.51], + ["c", .06, -.15, .15, -.24, .33, -.33], + ["z"] + ], + w: 8.492, + h: 21.691 + }, + "flags.ugrace": { + d: [ + ["M", 6.03, 6.93], + ["c", .15, -.09, .33, -.06, .51, 0], + ["c", .15, .09, .21, .15, .3, .33], + ["c", .09, .18, .06, .39, -.03, .54], + ["c", -.06, .15, -10.89, 8.88, -11.07, 8.97], + ["c", -.15, .09, -.33, .06, -.48, 0], + ["c", -.18, -.09, -.24, -.15, -.33, -.33], + ["c", -.09, -.18, -.06, -.39, .03, -.54], + ["c", .06, -.15, 10.89, -8.88, 11.07, -8.97], + ["z"] + ], + w: 12.019, + h: 9.954 + }, + "flags.dgrace": { + d: [ + ["M", -6.06, -15.93], + ["c", .18, -.09, .33, -.12, .48, -.06], + ["c", .18, .09, 14.01, 8.04, 14.1, 8.1], + ["c", .12, .12, .18, .33, .18, .51], + ["c", -.03, .21, -.15, .39, -.36, .48], + ["c", -.18, .09, -.33, .12, -.48, .06], + ["c", -.18, -.09, -14.01, -8.04, -14.1, -8.1], + ["c", -.12, -.12, -.18, -.33, -.18, -.51], + ["c", .03, -.21, .15, -.39, .36, -.48], + ["z"] + ], + w: 15.12, + h: 9.212 + }, + "flags.d16th": { + d: [ + ["M", 6.84, -22.53], + ["c", .27, -.12, .57, -.06, .72, .15], + ["c", .15, .15, .33, .87, .45, 1.56], + ["c", .06, .33, .06, 1.35, 0, 1.65], + ["c", -.06, .33, -.15, .78, -.27, 1.11], + ["c", -.12, .33, -.45, .96, -.66, 1.32], + ["l", -.18, .27], + ["l", .09, .18], + ["c", .48, 1.02, .72, 2.25, .69, 3.3], + ["c", -.06, 1.23, -.42, 2.28, -1.26, 3.45], + ["c", -.57, .87, -.99, 1.32, -3, 3.39], + ["c", -1.56, 1.56, -2.22, 2.4, -2.76, 3.45], + ["c", -.42, .84, -.66, 1.8, -.66, 2.55], + ["l", 0, .15], + ["l", -.21, 0], + ["l", -.21, 0], + ["l", 0, -7.5], + ["l", 0, -7.5], + ["l", .21, 0], + ["l", .21, 0], + ["l", 0, 1.14], + ["l", 0, 1.11], + ["l", .27, -.15], + ["c", 1.11, -.57, 1.77, -.99, 2.52, -1.47], + ["c", 2.37, -1.56, 3.69, -3.15, 4.05, -4.83], + ["c", .03, -.18, .03, -.39, .03, -.78], + ["c", 0, -.6, -.03, -.93, -.24, -1.5], + ["c", -.06, -.18, -.12, -.39, -.15, -.45], + ["c", -.03, -.24, .12, -.48, .36, -.6], + ["z"], + ["m", -.63, 7.5], + ["c", -.06, -.18, -.15, -.36, -.15, -.36], + ["c", -.03, 0, -.03, .03, -.06, .06], + ["c", -.06, .12, -.96, 1.02, -1.95, 1.98], + ["c", -.63, .57, -1.26, 1.17, -1.44, 1.35], + ["c", -1.53, 1.62, -2.28, 2.85, -2.55, 4.32], + ["c", -.03, .18, -.03, .54, -.06, .99], + ["l", 0, .69], + ["l", .18, -.09], + ["c", .93, -.54, 2.1, -1.29, 2.82, -1.83], + ["c", .69, -.51, 1.02, -.81, 1.53, -1.29], + ["c", 1.86, -1.89, 2.37, -3.66, 1.68, -5.82], + ["z"] + ], + w: 8.475, + h: 22.591 + }, + "flags.d32nd": { + d: [ + ["M", 6.84, -29.13], + ["c", .27, -.12, .57, -.06, .72, .15], + ["c", .12, .12, .27, .63, .36, 1.11], + ["c", .33, 1.59, .06, 3.06, -.81, 4.47], + ["l", -.18, .27], + ["l", .09, .15], + ["c", .12, .24, .33, .69, .45, 1.05], + ["c", .63, 1.83, .45, 3.57, -.57, 5.22], + ["l", -.18, .3], + ["l", .15, .27], + ["c", .42, .87, .6, 1.71, .57, 2.61], + ["c", -.06, 1.29, -.48, 2.46, -1.35, 3.78], + ["c", -.54, .81, -.93, 1.29, -2.46, 3], + ["c", -.51, .54, -1.05, 1.17, -1.26, 1.41], + ["c", -1.56, 1.86, -2.25, 3.36, -2.37, 5.01], + ["l", 0, .33], + ["l", -.21, 0], + ["l", -.21, 0], + ["l", 0, -11.25], + ["l", 0, -11.25], + ["l", .21, 0], + ["l", .21, 0], + ["l", 0, 1.35], + ["l", .03, 1.35], + ["l", .78, -.39], + ["c", 1.38, -.69, 2.34, -1.26, 3.24, -1.92], + ["c", 1.38, -1.02, 2.28, -2.13, 2.64, -3.21], + ["c", .15, -.48, .18, -.72, .18, -1.29], + ["c", 0, -.57, -.06, -.9, -.24, -1.47], + ["c", -.06, -.18, -.12, -.39, -.15, -.45], + ["c", -.03, -.24, .12, -.48, .36, -.6], + ["z"], + ["m", -.63, 7.2], + ["c", -.09, -.18, -.12, -.21, -.12, -.15], + ["c", -.03, .09, -1.02, 1.08, -2.04, 2.04], + ["c", -1.17, 1.08, -1.65, 1.56, -2.07, 2.04], + ["c", -.84, .96, -1.38, 1.86, -1.68, 2.76], + ["c", -.21, .57, -.27, .99, -.3, 1.65], + ["l", 0, .54], + ["l", .66, -.33], + ["c", 3.57, -1.86, 5.49, -3.69, 5.94, -5.7], + ["c", .06, -.39, .06, -1.2, -.03, -1.65], + ["c", -.06, -.39, -.24, -.9, -.36, -1.2], + ["z"], + ["m", -.06, 7.2], + ["c", -.06, -.15, -.12, -.33, -.15, -.45], + ["l", -.06, -.18], + ["l", -.18, .21], + ["l", -1.83, 1.83], + ["c", -.87, .9, -1.77, 1.8, -1.95, 2.01], + ["c", -1.08, 1.29, -1.62, 2.31, -1.89, 3.51], + ["c", -.06, .3, -.06, .51, -.09, .93], + ["l", 0, .57], + ["l", .09, -.06], + ["c", .75, -.45, 1.89, -1.26, 2.52, -1.74], + ["c", .81, -.66, 1.74, -1.53, 2.22, -2.16], + ["c", 1.26, -1.53, 1.68, -3.06, 1.32, -4.47], + ["z"] + ], + w: 8.385, + h: 29.191 + }, + "flags.d64th": { + d: [ + ["M", 7.08, -32.88], + ["c", .3, -.12, .66, -.03, .78, .24], + ["c", .18, .33, .27, 2.1, .15, 2.64], + ["c", -.09, .39, -.21, .78, -.39, 1.08], + ["l", -.15, .3], + ["l", .09, .27], + ["c", .03, .12, .09, .45, .12, .69], + ["c", .27, 1.44, .18, 2.55, -.3, 3.6], + ["l", -.12, .33], + ["l", .06, .42], + ["c", .27, 1.35, .33, 2.82, .21, 3.63], + ["c", -.12, .6, -.3, 1.23, -.57, 1.8], + ["l", -.15, .27], + ["l", .03, .42], + ["c", .06, 1.02, .06, 2.7, .03, 3.06], + ["c", -.15, 1.47, -.66, 2.76, -1.74, 4.41], + ["c", -.45, .69, -.75, 1.11, -1.74, 2.37], + ["c", -1.05, 1.38, -1.5, 1.98, -1.95, 2.73], + ["c", -.93, 1.5, -1.38, 2.82, -1.44, 4.2], + ["l", 0, .42], + ["l", -.21, 0], + ["l", -.21, 0], + ["l", 0, -15], + ["l", 0, -15], + ["l", .21, 0], + ["l", .21, 0], + ["l", 0, 1.86], + ["l", 0, 1.89], + ["c", 0, 0, .21, -.03, .45, -.09], + ["c", 2.22, -.39, 4.08, -1.11, 5.19, -2.01], + ["c", .63, -.54, 1.02, -1.14, 1.2, -1.8], + ["c", .06, -.3, .06, -1.14, -.03, -1.65], + ["c", -.03, -.18, -.06, -.39, -.09, -.48], + ["c", -.03, -.24, .12, -.48, .36, -.6], + ["z"], + ["m", -.45, 6.15], + ["c", -.03, -.18, -.06, -.42, -.06, -.54], + ["l", -.03, -.18], + ["l", -.33, .3], + ["c", -.42, .36, -.87, .72, -1.68, 1.29], + ["c", -1.98, 1.38, -2.25, 1.59, -2.85, 2.16], + ["c", -.75, .69, -1.23, 1.44, -1.47, 2.19], + ["c", -.15, .45, -.18, .63, -.21, 1.35], + ["l", 0, .66], + ["l", .39, -.18], + ["c", 1.83, -.9, 3.45, -1.95, 4.47, -2.91], + ["c", .93, -.9, 1.53, -1.83, 1.74, -2.82], + ["c", .06, -.33, .06, -.87, .03, -1.32], + ["z"], + ["m", -.27, 4.86], + ["c", -.03, -.21, -.06, -.36, -.06, -.36], + ["c", 0, -.03, -.12, .09, -.24, .24], + ["c", -.39, .48, -.99, 1.08, -2.16, 2.19], + ["c", -1.47, 1.38, -1.92, 1.83, -2.46, 2.49], + ["c", -.66, .87, -1.08, 1.74, -1.29, 2.58], + ["c", -.09, .42, -.15, .87, -.15, 1.44], + ["l", 0, .54], + ["l", .48, -.33], + ["c", 1.5, -1.02, 2.58, -1.89, 3.51, -2.82], + ["c", 1.47, -1.47, 2.25, -2.85, 2.4, -4.26], + ["c", .03, -.39, .03, -1.17, -.03, -1.71], + ["z"], + ["m", -.66, 7.68], + ["c", .03, -.15, .03, -.6, .03, -.99], + ["l", 0, -.72], + ["l", -.27, .33], + ["l", -1.74, 1.98], + ["c", -1.77, 1.92, -2.43, 2.76, -2.97, 3.9], + ["c", -.51, 1.02, -.72, 1.77, -.75, 2.91], + ["c", 0, .63, 0, .63, .06, .6], + ["c", .03, -.03, .3, -.27, .63, -.54], + ["c", .66, -.6, 1.86, -1.8, 2.31, -2.31], + ["c", 1.65, -1.89, 2.52, -3.54, 2.7, -5.16], + ["z"] + ], + w: 8.485, + h: 32.932 + }, + "clefs.C": { + d: [ + ["M", .06, -14.94], + ["l", .09, -.06], + ["l", 1.92, 0], + ["l", 1.92, 0], + ["l", .09, .06], + ["l", .06, .09], + ["l", 0, 14.85], + ["l", 0, 14.82], + ["l", -.06, .09], + ["l", -.09, .06], + ["l", -1.92, 0], + ["l", -1.92, 0], + ["l", -.09, -.06], + ["l", -.06, -.09], + ["l", 0, -14.82], + ["l", 0, -14.85], + ["z"], + ["m", 5.37, 0], + ["c", .09, -.06, .09, -.06, .57, -.06], + ["c", .45, 0, .45, 0, .54, .06], + ["l", .06, .09], + ["l", 0, 7.14], + ["l", 0, 7.11], + ["l", .09, -.06], + ["c", .18, -.18, .72, -.84, .96, -1.2], + ["c", .3, -.45, .66, -1.17, .84, -1.65], + ["c", .36, -.9, .57, -1.83, .6, -2.79], + ["c", .03, -.48, .03, -.54, .09, -.63], + ["c", .12, -.18, .36, -.21, .54, -.12], + ["c", .18, .09, .21, .15, .24, .66], + ["c", .06, .87, .21, 1.56, .57, 2.22], + ["c", .51, 1.02, 1.26, 1.68, 2.22, 1.92], + ["c", .21, .06, .33, .06, .78, .06], + ["c", .45, 0, .57, 0, .84, -.06], + ["c", .45, -.12, .81, -.33, 1.08, -.6], + ["c", .57, -.57, .87, -1.41, .99, -2.88], + ["c", .06, -.54, .06, -3, 0, -3.57], + ["c", -.21, -2.58, -.84, -3.87, -2.16, -4.5], + ["c", -.48, -.21, -1.17, -.36, -1.77, -.36], + ["c", -.69, 0, -1.29, .27, -1.5, .72], + ["c", -.06, .15, -.06, .21, -.06, .42], + ["c", 0, .24, 0, .3, .06, .45], + ["c", .12, .24, .24, .39, .63, .66], + ["c", .42, .3, .57, .48, .69, .72], + ["c", .06, .15, .06, .21, .06, .48], + ["c", 0, .39, -.03, .63, -.21, .96], + ["c", -.3, .6, -.87, 1.08, -1.5, 1.26], + ["c", -.27, .06, -.87, .06, -1.14, 0], + ["c", -.78, -.24, -1.44, -.87, -1.65, -1.68], + ["c", -.12, -.42, -.09, -1.17, .09, -1.71], + ["c", .51, -1.65, 1.98, -2.82, 3.81, -3.09], + ["c", .84, -.09, 2.46, .03, 3.51, .27], + ["c", 2.22, .57, 3.69, 1.8, 4.44, 3.75], + ["c", .36, .93, .57, 2.13, .57, 3.36], + ["c", 0, 1.44, -.48, 2.73, -1.38, 3.81], + ["c", -1.26, 1.5, -3.27, 2.43, -5.28, 2.43], + ["c", -.48, 0, -.51, 0, -.75, -.09], + ["c", -.15, -.03, -.48, -.21, -.78, -.36], + ["c", -.69, -.36, -.87, -.42, -1.26, -.42], + ["c", -.27, 0, -.3, 0, -.51, .09], + ["c", -.57, .3, -.81, .9, -.81, 2.1], + ["c", 0, 1.23, .24, 1.83, .81, 2.13], + ["c", .21, .09, .24, .09, .51, .09], + ["c", .39, 0, .57, -.06, 1.26, -.42], + ["c", .3, -.15, .63, -.33, .78, -.36], + ["c", .24, -.09, .27, -.09, .75, -.09], + ["c", 2.01, 0, 4.02, .93, 5.28, 2.4], + ["c", .9, 1.11, 1.38, 2.4, 1.38, 3.84], + ["c", 0, 1.5, -.3, 2.88, -.84, 3.96], + ["c", -.78, 1.59, -2.19, 2.64, -4.17, 3.15], + ["c", -1.05, .24, -2.67, .36, -3.51, .27], + ["c", -1.83, -.27, -3.3, -1.44, -3.81, -3.09], + ["c", -.18, -.54, -.21, -1.29, -.09, -1.74], + ["c", .15, -.6, .63, -1.2, 1.23, -1.47], + ["c", .36, -.18, .57, -.21, .99, -.21], + ["c", .42, 0, .63, .03, 1.02, .21], + ["c", .42, .21, .84, .63, 1.05, 1.05], + ["c", .18, .36, .21, .6, .21, .96], + ["c", 0, .3, 0, .36, -.06, .51], + ["c", -.12, .24, -.27, .42, -.69, .72], + ["c", -.57, .42, -.69, .63, -.69, 1.08], + ["c", 0, .24, 0, .3, .06, .45], + ["c", .12, .21, .3, .39, .57, .54], + ["c", .42, .18, .87, .21, 1.53, .15], + ["c", 1.08, -.15, 1.8, -.57, 2.34, -1.32], + ["c", .54, -.75, .84, -1.83, .99, -3.51], + ["c", .06, -.57, .06, -3.03, 0, -3.57], + ["c", -.12, -1.47, -.42, -2.31, -.99, -2.88], + ["c", -.27, -.27, -.63, -.48, -1.08, -.6], + ["c", -.27, -.06, -.39, -.06, -.84, -.06], + ["c", -.45, 0, -.57, 0, -.78, .06], + ["c", -1.14, .27, -2.01, 1.17, -2.46, 2.49], + ["c", -.21, .57, -.3, .99, -.33, 1.65], + ["c", -.03, .51, -.06, .57, -.24, .66], + ["c", -.12, .06, -.27, .06, -.39, 0], + ["c", -.21, -.09, -.21, -.15, -.24, -.75], + ["c", -.09, -1.92, -.78, -3.72, -2.01, -5.19], + ["c", -.18, -.21, -.36, -.42, -.39, -.45], + ["l", -.09, -.06], + ["l", 0, 7.11], + ["l", 0, 7.14], + ["l", -.06, .09], + ["c", -.09, .06, -.09, .06, -.54, .06], + ["c", -.48, 0, -.48, 0, -.57, -.06], + ["l", -.06, -.09], + ["l", 0, -14.82], + ["l", 0, -14.85], + ["z"] + ], + w: 20.31, + h: 29.97 + }, + "clefs.F": { + d: [ + ["M", 6.3, -7.8], + ["c", .36, -.03, 1.65, 0, 2.13, .03], + ["c", 3.6, .42, 6.03, 2.1, 6.93, 4.86], + ["c", .27, .84, .36, 1.5, .36, 2.58], + ["c", 0, .9, -.03, 1.35, -.18, 2.16], + ["c", -.78, 3.78, -3.54, 7.08, -8.37, 9.96], + ["c", -1.74, 1.05, -3.87, 2.13, -6.18, 3.12], + ["c", -.39, .18, -.75, .33, -.81, .36], + ["c", -.06, .03, -.15, .06, -.18, .06], + ["c", -.15, 0, -.33, -.18, -.33, -.33], + ["c", 0, -.15, .06, -.21, .51, -.48], + ["c", 3, -1.77, 5.13, -3.21, 6.84, -4.74], + ["c", .51, -.45, 1.59, -1.5, 1.95, -1.95], + ["c", 1.89, -2.19, 2.88, -4.32, 3.15, -6.78], + ["c", .06, -.42, .06, -1.77, 0, -2.19], + ["c", -.24, -2.01, -.93, -3.63, -2.04, -4.71], + ["c", -.63, -.63, -1.29, -1.02, -2.07, -1.2], + ["c", -1.62, -.39, -3.36, .15, -4.56, 1.44], + ["c", -.54, .6, -1.05, 1.47, -1.32, 2.22], + ["l", -.09, .21], + ["l", .24, -.12], + ["c", .39, -.21, .63, -.24, 1.11, -.24], + ["c", .3, 0, .45, 0, .66, .06], + ["c", 1.92, .48, 2.85, 2.55, 1.95, 4.38], + ["c", -.45, .99, -1.41, 1.62, -2.46, 1.71], + ["c", -1.47, .09, -2.91, -.87, -3.39, -2.25], + ["c", -.18, -.57, -.21, -1.32, -.03, -2.28], + ["c", .39, -2.25, 1.83, -4.2, 3.81, -5.19], + ["c", .69, -.36, 1.59, -.6, 2.37, -.69], + ["z"], + ["m", 11.58, 2.52], + ["c", .84, -.21, 1.71, .3, 1.89, 1.14], + ["c", .3, 1.17, -.72, 2.19, -1.89, 1.89], + ["c", -.99, -.21, -1.5, -1.32, -1.02, -2.25], + ["c", .18, -.39, .6, -.69, 1.02, -.78], + ["z"], + ["m", 0, 7.5], + ["c", .84, -.21, 1.71, .3, 1.89, 1.14], + ["c", .21, .87, -.3, 1.71, -1.14, 1.89], + ["c", -.87, .21, -1.71, -.3, -1.89, -1.14], + ["c", -.21, -.84, .3, -1.71, 1.14, -1.89], + ["z"] + ], + w: 20.153, + h: 23.142 + }, + "clefs.G": { + d: [ + ["M", 9.69, -37.41], + ["c", .09, -.09, .24, -.06, .36, 0], + ["c", .12, .09, .57, .6, .96, 1.11], + ["c", 1.77, 2.34, 3.21, 5.85, 3.57, 8.73], + ["c", .21, 1.56, .03, 3.27, -.45, 4.86], + ["c", -.69, 2.31, -1.92, 4.47, -4.23, 7.44], + ["c", -.3, .39, -.57, .72, -.6, .75], + ["c", -.03, .06, 0, .15, .18, .78], + ["c", .54, 1.68, 1.38, 4.44, 1.68, 5.49], + ["l", .09, .42], + ["l", .39, 0], + ["c", 1.47, .09, 2.76, .51, 3.96, 1.29], + ["c", 1.83, 1.23, 3.06, 3.21, 3.39, 5.52], + ["c", .09, .45, .12, 1.29, .06, 1.74], + ["c", -.09, 1.02, -.33, 1.83, -.75, 2.73], + ["c", -.84, 1.71, -2.28, 3.06, -4.02, 3.72], + ["l", -.33, .12], + ["l", .03, 1.26], + ["c", 0, 1.74, -.06, 3.63, -.21, 4.62], + ["c", -.45, 3.06, -2.19, 5.49, -4.47, 6.21], + ["c", -.57, .18, -.9, .21, -1.59, .21], + ["c", -.69, 0, -1.02, -.03, -1.65, -.21], + ["c", -1.14, -.27, -2.13, -.84, -2.94, -1.65], + ["c", -.99, -.99, -1.56, -2.16, -1.71, -3.54], + ["c", -.09, -.81, .06, -1.53, .45, -2.13], + ["c", .63, -.99, 1.83, -1.56, 3, -1.53], + ["c", 1.5, .09, 2.64, 1.32, 2.73, 2.94], + ["c", .06, 1.47, -.93, 2.7, -2.37, 2.97], + ["c", -.45, .06, -.84, .03, -1.29, -.09], + ["l", -.21, -.09], + ["l", .09, .12], + ["c", .39, .54, .78, .93, 1.32, 1.26], + ["c", 1.35, .87, 3.06, 1.02, 4.35, .36], + ["c", 1.44, -.72, 2.52, -2.28, 2.97, -4.35], + ["c", .15, -.66, .24, -1.5, .3, -3.03], + ["c", .03, -.84, .03, -2.94, 0, -3], + ["c", -.03, 0, -.18, 0, -.36, .03], + ["c", -.66, .12, -.99, .12, -1.83, .12], + ["c", -1.05, 0, -1.71, -.06, -2.61, -.3], + ["c", -4.02, -.99, -7.11, -4.35, -7.8, -8.46], + ["c", -.12, -.66, -.12, -.99, -.12, -1.83], + ["c", 0, -.84, 0, -1.14, .15, -1.92], + ["c", .36, -2.28, 1.41, -4.62, 3.3, -7.29], + ["l", 2.79, -3.6], + ["c", .54, -.66, .96, -1.2, .96, -1.23], + ["c", 0, -.03, -.09, -.33, -.18, -.69], + ["c", -.96, -3.21, -1.41, -5.28, -1.59, -7.68], + ["c", -.12, -1.38, -.15, -3.09, -.06, -3.96], + ["c", .33, -2.67, 1.38, -5.07, 3.12, -7.08], + ["c", .36, -.42, .99, -1.05, 1.17, -1.14], + ["z"], + ["m", 2.01, 4.71], + ["c", -.15, -.3, -.3, -.54, -.3, -.54], + ["c", -.03, 0, -.18, .09, -.3, .21], + ["c", -2.4, 1.74, -3.87, 4.2, -4.26, 7.11], + ["c", -.06, .54, -.06, 1.41, -.03, 1.89], + ["c", .09, 1.29, .48, 3.12, 1.08, 5.22], + ["c", .15, .42, .24, .78, .24, .81], + ["c", 0, .03, .84, -1.11, 1.23, -1.68], + ["c", 1.89, -2.73, 2.88, -5.07, 3.15, -7.53], + ["c", .09, -.57, .12, -1.74, .06, -2.37], + ["c", -.09, -1.23, -.27, -1.92, -.87, -3.12], + ["z"], + ["m", -2.94, 20.7], + ["c", -.21, -.72, -.39, -1.32, -.42, -1.32], + ["c", 0, 0, -1.2, 1.47, -1.86, 2.37], + ["c", -2.79, 3.63, -4.02, 6.3, -4.35, 9.3], + ["c", -.03, .21, -.03, .69, -.03, 1.08], + ["c", 0, .69, 0, .75, .06, 1.11], + ["c", .12, .54, .27, .99, .51, 1.47], + ["c", .69, 1.38, 1.83, 2.55, 3.42, 3.42], + ["c", .96, .54, 2.07, .9, 3.21, 1.08], + ["c", .78, .12, 2.04, .12, 2.94, -.03], + ["c", .51, -.06, .45, -.03, .42, -.3], + ["c", -.24, -3.33, -.72, -6.33, -1.62, -10.08], + ["c", -.09, -.39, -.18, -.75, -.18, -.78], + ["c", -.03, -.03, -.42, 0, -.81, .09], + ["c", -.9, .18, -1.65, .57, -2.22, 1.14], + ["c", -.72, .72, -1.08, 1.65, -1.05, 2.64], + ["c", .06, .96, .48, 1.83, 1.23, 2.58], + ["c", .36, .36, .72, .63, 1.17, .9], + ["c", .33, .18, .36, .21, .42, .33], + ["c", .18, .42, -.18, .9, -.6, .87], + ["c", -.18, -.03, -.84, -.36, -1.26, -.63], + ["c", -.78, -.51, -1.38, -1.11, -1.86, -1.83], + ["c", -1.77, -2.7, -.99, -6.42, 1.71, -8.19], + ["c", .3, -.21, .81, -.48, 1.17, -.63], + ["c", .3, -.09, 1.02, -.3, 1.14, -.3], + ["c", .06, 0, .09, 0, .09, -.03], + ["c", .03, -.03, -.51, -1.92, -1.23, -4.26], + ["z"], + ["m", 3.78, 7.41], + ["c", -.18, -.03, -.36, -.06, -.39, -.06], + ["c", -.03, 0, 0, .21, .18, 1.02], + ["c", .75, 3.18, 1.26, 6.3, 1.5, 9.09], + ["c", .06, .72, 0, .69, .51, .42], + ["c", .78, -.36, 1.44, -.96, 1.98, -1.77], + ["c", 1.08, -1.62, 1.2, -3.69, .3, -5.55], + ["c", -.81, -1.62, -2.31, -2.79, -4.08, -3.15], + ["z"] + ], + w: 19.051, + h: 57.057 + }, + "clefs.perc": { + d: [ + ["M", 5.07, -7.44], + ["l", .09, -.06], + ["l", 1.53, 0], + ["l", 1.53, 0], + ["l", .09, .06], + ["l", .06, .09], + ["l", 0, 7.35], + ["l", 0, 7.32], + ["l", -.06, .09], + ["l", -.09, .06], + ["l", -1.53, 0], + ["l", -1.53, 0], + ["l", -.09, -.06], + ["l", -.06, -.09], + ["l", 0, -7.32], + ["l", 0, -7.35], + ["z"], + ["m", 6.63, 0], + ["l", .09, -.06], + ["l", 1.53, 0], + ["l", 1.53, 0], + ["l", .09, .06], + ["l", .06, .09], + ["l", 0, 7.35], + ["l", 0, 7.32], + ["l", -.06, .09], + ["l", -.09, .06], + ["l", -1.53, 0], + ["l", -1.53, 0], + ["l", -.09, -.06], + ["l", -.06, -.09], + ["l", 0, -7.32], + ["l", 0, -7.35], + ["z"] + ], + w: 9.99, + h: 14.97 + }, + "timesig.common": { + d: [ + ["M", 6.66, -7.83], + ["c", .72, -.06, 1.41, -.03, 1.98, .09], + ["c", 1.2, .27, 2.34, .96, 3.09, 1.92], + ["c", .63, .81, 1.08, 1.86, 1.14, 2.73], + ["c", .06, 1.02, -.51, 1.92, -1.44, 2.22], + ["c", -.24, .09, -.3, .09, -.63, .09], + ["c", -.33, 0, -.42, 0, -.63, -.06], + ["c", -.66, -.24, -1.14, -.63, -1.41, -1.2], + ["c", -.15, -.3, -.21, -.51, -.24, -.9], + ["c", -.06, -1.08, .57, -2.04, 1.56, -2.37], + ["c", .18, -.06, .27, -.06, .63, -.06], + ["l", .45, 0], + ["c", .06, .03, .09, .03, .09, 0], + ["c", 0, 0, -.09, -.12, -.24, -.27], + ["c", -1.02, -1.11, -2.55, -1.68, -4.08, -1.5], + ["c", -1.29, .15, -2.04, .69, -2.4, 1.74], + ["c", -.36, .93, -.42, 1.89, -.42, 5.37], + ["c", 0, 2.97, .06, 3.96, .24, 4.77], + ["c", .24, 1.08, .63, 1.68, 1.41, 2.07], + ["c", .81, .39, 2.16, .45, 3.18, .09], + ["c", 1.29, -.45, 2.37, -1.53, 3.03, -2.97], + ["c", .15, -.33, .33, -.87, .39, -1.17], + ["c", .09, -.24, .15, -.36, .3, -.39], + ["c", .21, -.03, .42, .15, .39, .36], + ["c", -.06, .39, -.42, 1.38, -.69, 1.89], + ["c", -.96, 1.8, -2.49, 2.94, -4.23, 3.18], + ["c", -.99, .12, -2.58, -.06, -3.63, -.45], + ["c", -.96, -.36, -1.71, -.84, -2.4, -1.5], + ["c", -1.11, -1.11, -1.8, -2.61, -2.04, -4.56], + ["c", -.06, -.6, -.06, -2.01, 0, -2.61], + ["c", .24, -1.95, .9, -3.45, 2.01, -4.56], + ["c", .69, -.66, 1.44, -1.11, 2.37, -1.47], + ["c", .63, -.24, 1.47, -.42, 2.22, -.48], + ["z"] + ], + w: 13.038, + h: 15.689 + }, + "timesig.cut": { + d: [ + ["M", 6.24, -10.44], + ["c", .09, -.06, .09, -.06, .48, -.06], + ["c", .36, 0, .36, 0, .45, .06], + ["l", .06, .09], + ["l", 0, 1.23], + ["l", 0, 1.26], + ["l", .27, 0], + ["c", 1.26, 0, 2.49, .45, 3.48, 1.29], + ["c", 1.05, .87, 1.8, 2.28, 1.89, 3.48], + ["c", .06, 1.02, -.51, 1.92, -1.44, 2.22], + ["c", -.24, .09, -.3, .09, -.63, .09], + ["c", -.33, 0, -.42, 0, -.63, -.06], + ["c", -.66, -.24, -1.14, -.63, -1.41, -1.2], + ["c", -.15, -.3, -.21, -.51, -.24, -.9], + ["c", -.06, -1.08, .57, -2.04, 1.56, -2.37], + ["c", .18, -.06, .27, -.06, .63, -.06], + ["l", .45, 0], + ["c", .06, .03, .09, .03, .09, 0], + ["c", 0, -.03, -.45, -.51, -.66, -.69], + ["c", -.87, -.69, -1.83, -1.05, -2.94, -1.11], + ["l", -.42, 0], + ["l", 0, 7.17], + ["l", 0, 7.14], + ["l", .42, 0], + ["c", .69, -.03, 1.23, -.18, 1.86, -.51], + ["c", 1.05, -.51, 1.89, -1.47, 2.46, -2.7], + ["c", .15, -.33, .33, -.87, .39, -1.17], + ["c", .09, -.24, .15, -.36, .3, -.39], + ["c", .21, -.03, .42, .15, .39, .36], + ["c", -.03, .24, -.21, .78, -.39, 1.2], + ["c", -.96, 2.37, -2.94, 3.9, -5.13, 3.9], + ["l", -.3, 0], + ["l", 0, 1.26], + ["l", 0, 1.23], + ["l", -.06, .09], + ["c", -.09, .06, -.09, .06, -.45, .06], + ["c", -.39, 0, -.39, 0, -.48, -.06], + ["l", -.06, -.09], + ["l", 0, -1.29], + ["l", 0, -1.29], + ["l", -.21, -.03], + ["c", -1.23, -.21, -2.31, -.63, -3.21, -1.29], + ["c", -.15, -.09, -.45, -.36, -.66, -.57], + ["c", -1.11, -1.11, -1.8, -2.61, -2.04, -4.56], + ["c", -.06, -.6, -.06, -2.01, 0, -2.61], + ["c", .24, -1.95, .93, -3.45, 2.04, -4.59], + ["c", .42, -.39, .78, -.66, 1.26, -.93], + ["c", .75, -.45, 1.65, -.75, 2.61, -.9], + ["l", .21, -.03], + ["l", 0, -1.29], + ["l", 0, -1.29], + ["z"], + ["m", -.06, 10.44], + ["c", 0, -5.58, 0, -6.99, -.03, -6.99], + ["c", -.15, 0, -.63, .27, -.87, .45], + ["c", -.45, .36, -.75, .93, -.93, 1.77], + ["c", -.18, .81, -.24, 1.8, -.24, 4.74], + ["c", 0, 2.97, .06, 3.96, .24, 4.77], + ["c", .24, 1.08, .66, 1.68, 1.41, 2.07], + ["c", .12, .06, .3, .12, .33, .15], + ["l", .09, 0], + ["l", 0, -6.96], + ["z"] + ], + w: 13.038, + h: 20.97 + }, + "timesig.imperfectum": { + d: [ + ["M", 13, -5], + ["a", 8, 8, 0, 1, 0, 0, 10] + ], + w: 13.038, + h: 20.97 + }, + "timesig.imperfectum2": { + d: [ + ["M", 13, -5], + ["a", 8, 8, 0, 1, 0, 0, 10] + ], + w: 13.038, + h: 20.97 + }, + "timesig.perfectum": { + d: [ + ["M", 13, -5], + ["a", 8, 8, 0, 1, 0, 0, 10] + ], + w: 13.038, + h: 20.97 + }, + "timesig.perfectum2": { + d: [ + ["M", 13, -5], + ["a", 8, 8, 0, 1, 0, 0, 10] + ], + w: 13.038, + h: 20.97 + }, + f: { + d: [ + ["M", 9.93, -14.28], + ["c", 1.53, -.18, 2.88, .45, 3.12, 1.5], + ["c", .12, .51, 0, 1.32, -.27, 1.86], + ["c", -.15, .3, -.42, .57, -.63, .69], + ["c", -.69, .36, -1.56, .03, -1.83, -.69], + ["c", -.09, -.24, -.09, -.69, 0, -.87], + ["c", .06, -.12, .21, -.24, .45, -.42], + ["c", .42, -.24, .57, -.45, .6, -.72], + ["c", .03, -.33, -.09, -.39, -.63, -.42], + ["c", -.3, 0, -.45, 0, -.6, .03], + ["c", -.81, .21, -1.35, .93, -1.74, 2.46], + ["c", -.06, .27, -.48, 2.25, -.48, 2.31], + ["c", 0, .03, .39, .03, .9, .03], + ["c", .72, 0, .9, 0, .99, .06], + ["c", .42, .15, .45, .72, .03, .9], + ["c", -.12, .06, -.24, .06, -1.17, .06], + ["l", -1.05, 0], + ["l", -.78, 2.55], + ["c", -.45, 1.41, -.87, 2.79, -.96, 3.06], + ["c", -.87, 2.37, -2.37, 4.74, -3.78, 5.91], + ["c", -1.05, .9, -2.04, 1.23, -3.09, 1.08], + ["c", -1.11, -.18, -1.89, -.78, -2.04, -1.59], + ["c", -.12, -.66, .15, -1.71, .54, -2.19], + ["c", .69, -.75, 1.86, -.54, 2.22, .39], + ["c", .06, .15, .09, .27, .09, .48], + ["c", 0, .24, -.03, .27, -.12, .42], + ["c", -.03, .09, -.15, .18, -.27, .27], + ["c", -.09, .06, -.27, .21, -.36, .27], + ["c", -.24, .18, -.36, .36, -.39, .6], + ["c", -.03, .33, .09, .39, .63, .42], + ["c", .42, 0, .63, -.03, .9, -.15], + ["c", .6, -.3, .96, -.96, 1.38, -2.64], + ["c", .09, -.42, .63, -2.55, 1.17, -4.77], + ["l", 1.02, -4.08], + ["c", 0, -.03, -.36, -.03, -.81, -.03], + ["c", -.72, 0, -.81, 0, -.93, -.06], + ["c", -.42, -.18, -.39, -.75, .03, -.9], + ["c", .09, -.06, .27, -.06, 1.05, -.06], + ["l", .96, 0], + ["l", 0, -.09], + ["c", .06, -.18, .3, -.72, .51, -1.17], + ["c", 1.2, -2.46, 3.3, -4.23, 5.34, -4.5], + ["z"] + ], + w: 16.155, + h: 19.445 + }, + m: { + d: [ + ["M", 2.79, -8.91], + ["c", .09, 0, .3, -.03, .45, -.03], + ["c", .24, .03, .3, .03, .45, .12], + ["c", .36, .15, .63, .54, .75, 1.02], + ["l", .03, .21], + ["l", .33, -.3], + ["c", .69, -.69, 1.38, -1.02, 2.07, -1.02], + ["c", .27, 0, .33, 0, .48, .06], + ["c", .21, .09, .48, .36, .63, .6], + ["c", .03, .09, .12, .27, .18, .42], + ["c", .03, .15, .09, .27, .12, .27], + ["c", 0, 0, .09, -.09, .18, -.21], + ["c", .33, -.39, .87, -.81, 1.29, -.99], + ["c", .78, -.33, 1.47, -.21, 2.01, .33], + ["c", .3, .33, .48, .69, .6, 1.14], + ["c", .09, .42, .06, .54, -.54, 3.06], + ["c", -.33, 1.29, -.57, 2.4, -.57, 2.43], + ["c", 0, .12, .09, .21, .21, .21], + ["c", .24, 0, .75, -.3, 1.2, -.72], + ["c", .45, -.39, .6, -.45, .78, -.27], + ["c", .18, .18, .09, .36, -.45, .87], + ["c", -1.05, .96, -1.83, 1.47, -2.58, 1.71], + ["c", -.93, .33, -1.53, .21, -1.8, -.33], + ["c", -.06, -.15, -.06, -.21, -.06, -.45], + ["c", 0, -.24, .03, -.48, .6, -2.82], + ["c", .42, -1.71, .6, -2.64, .63, -2.79], + ["c", .03, -.57, -.3, -.75, -.84, -.48], + ["c", -.24, .12, -.54, .39, -.66, .63], + ["c", -.03, .09, -.42, 1.38, -.9, 3], + ["c", -.9, 3.15, -.84, 3, -1.14, 3.15], + ["l", -.15, .09], + ["l", -.78, 0], + ["c", -.6, 0, -.78, 0, -.84, -.06], + ["c", -.09, -.03, -.18, -.18, -.18, -.27], + ["c", 0, -.03, .36, -1.38, .84, -2.97], + ["c", .57, -2.04, .81, -2.97, .84, -3.12], + ["c", .03, -.54, -.3, -.72, -.84, -.45], + ["c", -.24, .12, -.57, .42, -.66, .63], + ["c", -.06, .09, -.51, 1.44, -1.05, 2.97], + ["c", -.51, 1.56, -.99, 2.85, -.99, 2.91], + ["c", -.06, .12, -.21, .24, -.36, .3], + ["c", -.12, .06, -.21, .06, -.9, .06], + ["c", -.6, 0, -.78, 0, -.84, -.06], + ["c", -.09, -.03, -.18, -.18, -.18, -.27], + ["c", 0, -.03, .45, -1.38, .99, -2.97], + ["c", 1.05, -3.18, 1.05, -3.18, .93, -3.45], + ["c", -.12, -.27, -.39, -.3, -.72, -.15], + ["c", -.54, .27, -1.14, 1.17, -1.56, 2.4], + ["c", -.06, .15, -.15, .3, -.18, .36], + ["c", -.21, .21, -.57, .27, -.72, .09], + ["c", -.09, -.09, -.06, -.21, .06, -.63], + ["c", .48, -1.26, 1.26, -2.46, 2.01, -3.21], + ["c", .57, -.54, 1.2, -.87, 1.83, -1.02], + ["z"] + ], + w: 14.687, + h: 9.126 + }, + p: { + d: [ + ["M", 1.92, -8.7], + ["c", .27, -.09, .81, -.06, 1.11, .03], + ["c", .54, .18, .93, .51, 1.17, .99], + ["c", .09, .15, .15, .33, .18, .36], + ["l", 0, .12], + ["l", .3, -.27], + ["c", .66, -.6, 1.35, -1.02, 2.13, -1.2], + ["c", .21, -.06, .33, -.06, .78, -.06], + ["c", .45, 0, .51, 0, .84, .09], + ["c", 1.29, .33, 2.07, 1.32, 2.25, 2.79], + ["c", .09, .81, -.09, 2.01, -.45, 2.79], + ["c", -.54, 1.26, -1.86, 2.55, -3.18, 3.03], + ["c", -.45, .18, -.81, .24, -1.29, .24], + ["c", -.69, -.03, -1.35, -.18, -1.86, -.45], + ["c", -.3, -.15, -.51, -.18, -.69, -.09], + ["c", -.09, .03, -.18, .09, -.18, .12], + ["c", -.09, .12, -1.05, 2.94, -1.05, 3.06], + ["c", 0, .24, .18, .48, .51, .63], + ["c", .18, .06, .54, .15, .75, .15], + ["c", .21, 0, .36, .06, .42, .18], + ["c", .12, .18, .06, .42, -.12, .54], + ["c", -.09, .03, -.15, .03, -.78, 0], + ["c", -1.98, -.15, -3.81, -.15, -5.79, 0], + ["c", -.63, .03, -.69, .03, -.78, 0], + ["c", -.24, -.15, -.24, -.57, .03, -.66], + ["c", .06, -.03, .48, -.09, .99, -.12], + ["c", .87, -.06, 1.11, -.09, 1.35, -.21], + ["c", .18, -.06, .33, -.18, .39, -.3], + ["c", .06, -.12, 3.24, -9.42, 3.27, -9.6], + ["c", .06, -.33, .03, -.57, -.15, -.69], + ["c", -.09, -.06, -.12, -.06, -.3, -.06], + ["c", -.69, .06, -1.53, 1.02, -2.28, 2.61], + ["c", -.09, .21, -.21, .45, -.27, .51], + ["c", -.09, .12, -.33, .24, -.48, .24], + ["c", -.18, 0, -.36, -.15, -.36, -.3], + ["c", 0, -.24, .78, -1.83, 1.26, -2.55], + ["c", .72, -1.11, 1.47, -1.74, 2.28, -1.92], + ["z"], + ["m", 5.37, 1.47], + ["c", -.27, -.12, -.75, -.03, -1.14, .21], + ["c", -.75, .48, -1.47, 1.68, -1.89, 3.15], + ["c", -.45, 1.47, -.42, 2.34, 0, 2.7], + ["c", .45, .39, 1.26, .21, 1.83, -.36], + ["c", .51, -.51, .99, -1.68, 1.38, -3.27], + ["c", .3, -1.17, .33, -1.74, .15, -2.13], + ["c", -.09, -.15, -.15, -.21, -.33, -.3], + ["z"] + ], + w: 14.689, + h: 13.127 + }, + r: { + d: [ + ["M", 6.33, -9.12], + ["c", .27, -.03, .93, 0, 1.2, .06], + ["c", .84, .21, 1.23, .81, 1.02, 1.53], + ["c", -.24, .75, -.9, 1.17, -1.56, .96], + ["c", -.33, -.09, -.51, -.3, -.66, -.75], + ["c", -.03, -.12, -.09, -.24, -.12, -.3], + ["c", -.09, -.15, -.3, -.24, -.48, -.24], + ["c", -.57, 0, -1.38, .54, -1.65, 1.08], + ["c", -.06, .15, -.33, 1.17, -.9, 3.27], + ["c", -.57, 2.31, -.81, 3.12, -.87, 3.21], + ["c", -.03, .06, -.12, .15, -.18, .21], + ["l", -.12, .06], + ["l", -.81, .03], + ["c", -.69, 0, -.81, 0, -.9, -.03], + ["c", -.09, -.06, -.18, -.21, -.18, -.3], + ["c", 0, -.06, .39, -1.62, .9, -3.51], + ["c", .84, -3.24, .87, -3.45, .87, -3.72], + ["c", 0, -.21, 0, -.27, -.03, -.36], + ["c", -.12, -.15, -.21, -.24, -.42, -.24], + ["c", -.24, 0, -.45, .15, -.78, .42], + ["c", -.33, .36, -.45, .54, -.72, 1.14], + ["c", -.03, .12, -.21, .24, -.36, .27], + ["c", -.12, 0, -.15, 0, -.24, -.06], + ["c", -.18, -.12, -.18, -.21, -.06, -.54], + ["c", .21, -.57, .42, -.93, .78, -1.32], + ["c", .54, -.51, 1.2, -.81, 1.95, -.87], + ["c", .81, -.03, 1.53, .3, 1.92, .87], + ["l", .12, .18], + ["l", .09, -.09], + ["c", .57, -.45, 1.41, -.84, 2.19, -.96], + ["z"] + ], + w: 9.41, + h: 9.132 + }, + s: { + d: [ + ["M", 4.47, -8.73], + ["c", .09, 0, .36, -.03, .57, -.03], + ["c", .75, .03, 1.29, .24, 1.71, .63], + ["c", .51, .54, .66, 1.26, .36, 1.83], + ["c", -.24, .42, -.63, .57, -1.11, .42], + ["c", -.33, -.09, -.6, -.36, -.6, -.57], + ["c", 0, -.03, .06, -.21, .15, -.39], + ["c", .12, -.21, .15, -.33, .18, -.48], + ["c", 0, -.24, -.06, -.48, -.15, -.6], + ["c", -.15, -.21, -.42, -.24, -.75, -.15], + ["c", -.27, .06, -.48, .18, -.69, .36], + ["c", -.39, .39, -.51, .96, -.33, 1.38], + ["c", .09, .21, .42, .51, .78, .72], + ["c", 1.11, .69, 1.59, 1.11, 1.89, 1.68], + ["c", .21, .39, .24, .78, .15, 1.29], + ["c", -.18, 1.2, -1.17, 2.16, -2.52, 2.52], + ["c", -1.02, .24, -1.95, .12, -2.7, -.42], + ["c", -.72, -.51, -.99, -1.47, -.6, -2.19], + ["c", .24, -.48, .72, -.63, 1.17, -.42], + ["c", .33, .18, .54, .45, .57, .81], + ["c", 0, .21, -.03, .3, -.33, .51], + ["c", -.33, .24, -.39, .42, -.27, .69], + ["c", .06, .15, .21, .27, .45, .33], + ["c", .3, .09, .87, .09, 1.2, 0], + ["c", .75, -.21, 1.23, -.72, 1.29, -1.35], + ["c", .03, -.42, -.15, -.81, -.54, -1.2], + ["c", -.24, -.24, -.48, -.42, -1.41, -1.02], + ["c", -.69, -.42, -1.05, -.93, -1.05, -1.47], + ["c", 0, -.39, .12, -.87, .3, -1.23], + ["c", .27, -.57, .78, -1.05, 1.38, -1.35], + ["c", .24, -.12, .63, -.27, .9, -.3], + ["z"] + ], + w: 6.632, + h: 8.758 + }, + z: { + d: [ + ["M", 2.64, -7.95], + ["c", .36, -.09, .81, -.03, 1.71, .27], + ["c", .78, .21, .96, .27, 1.74, .3], + ["c", .87, .06, 1.02, .03, 1.38, -.21], + ["c", .21, -.15, .33, -.15, .48, -.06], + ["c", .15, .09, .21, .3, .15, .45], + ["c", -.03, .06, -1.26, 1.26, -2.76, 2.67], + ["l", -2.73, 2.55], + ["l", .54, .03], + ["c", .54, .03, .72, .03, 2.01, .15], + ["c", .36, .03, .9, .06, 1.2, .09], + ["c", .66, 0, .81, -.03, 1.02, -.24], + ["c", .3, -.3, .39, -.72, .27, -1.23], + ["c", -.06, -.27, -.06, -.27, -.03, -.39], + ["c", .15, -.3, .54, -.27, .69, .03], + ["c", .15, .33, .27, 1.02, .27, 1.5], + ["c", 0, 1.47, -1.11, 2.7, -2.52, 2.79], + ["c", -.57, .03, -1.02, -.09, -2.01, -.51], + ["c", -1.02, -.42, -1.23, -.48, -2.13, -.54], + ["c", -.81, -.06, -.96, -.03, -1.26, .18], + ["c", -.12, .06, -.24, .12, -.27, .12], + ["c", -.27, 0, -.45, -.3, -.36, -.51], + ["c", .03, -.06, 1.32, -1.32, 2.91, -2.79], + ["l", 2.88, -2.73], + ["c", -.03, 0, -.21, .03, -.42, .06], + ["c", -.21, .03, -.78, .09, -1.23, .12], + ["c", -1.11, .12, -1.23, .15, -1.95, .27], + ["c", -.72, .15, -1.17, .18, -1.29, .09], + ["c", -.27, -.18, -.21, -.75, .12, -1.26], + ["c", .39, -.6, .93, -1.02, 1.59, -1.2], + ["z"] + ], + w: 8.573, + h: 8.743 + }, + "+": { + d: [ + ["M", 3.48, -9.3], + ["c", .18, -.09, .36, -.09, .54, 0], + ["c", .18, .09, .24, .15, .33, .3], + ["l", .06, .15], + ["l", 0, 1.29], + ["l", 0, 1.29], + ["l", 1.29, 0], + ["c", 1.23, 0, 1.29, 0, 1.41, .06], + ["c", .06, .03, .15, .09, .18, .12], + ["c", .12, .09, .21, .33, .21, .48], + ["c", 0, .15, -.09, .39, -.21, .48], + ["c", -.03, .03, -.12, .09, -.18, .12], + ["c", -.12, .06, -.18, .06, -1.41, .06], + ["l", -1.29, 0], + ["l", 0, 1.29], + ["c", 0, 1.23, 0, 1.29, -.06, 1.41], + ["c", -.09, .18, -.15, .24, -.3, .33], + ["c", -.21, .09, -.39, .09, -.57, 0], + ["c", -.18, -.09, -.24, -.15, -.33, -.33], + ["c", -.06, -.12, -.06, -.18, -.06, -1.41], + ["l", 0, -1.29], + ["l", -1.29, 0], + ["c", -1.23, 0, -1.29, 0, -1.41, -.06], + ["c", -.18, -.09, -.24, -.15, -.33, -.33], + ["c", -.09, -.18, -.09, -.36, 0, -.54], + ["c", .09, -.18, .15, -.24, .33, -.33], + ["l", .15, -.06], + ["l", 1.26, 0], + ["l", 1.29, 0], + ["l", 0, -1.29], + ["c", 0, -1.23, 0, -1.29, .06, -1.41], + ["c", .09, -.18, .15, -.24, .33, -.33], + ["z"] + ], + w: 7.507, + h: 7.515 + }, + ",": { + d: [ + ["M", 1.32, -3.36], + ["c", .57, -.15, 1.17, .03, 1.59, .45], + ["c", .45, .45, .6, .96, .51, 1.89], + ["c", -.09, 1.23, -.42, 2.46, -.99, 3.93], + ["c", -.3, .72, -.72, 1.62, -.78, 1.68], + ["c", -.18, .21, -.51, .18, -.66, -.06], + ["c", -.03, -.06, -.06, -.15, -.06, -.18], + ["c", 0, -.06, .12, -.33, .24, -.63], + ["c", .84, -1.8, 1.02, -2.61, .69, -3.24], + ["c", -.12, -.24, -.27, -.36, -.75, -.6], + ["c", -.36, -.15, -.42, -.21, -.6, -.39], + ["c", -.69, -.69, -.69, -1.71, 0, -2.4], + ["c", .21, -.21, .51, -.39, .81, -.45], + ["z"] + ], + w: 3.452, + h: 8.143 + }, + "-": { + d: [ + ["M", .18, -5.34], + ["c", .09, -.06, .15, -.06, 2.31, -.06], + ["c", 2.46, 0, 2.37, 0, 2.46, .21], + ["c", .12, .21, .03, .42, -.15, .54], + ["c", -.09, .06, -.15, .06, -2.28, .06], + ["c", -2.16, 0, -2.22, 0, -2.31, -.06], + ["c", -.27, -.15, -.27, -.54, -.03, -.69], + ["z"] + ], + w: 5.001, + h: .81 + }, + ".": { + d: [ + ["M", 1.32, -3.36], + ["c", 1.05, -.27, 2.1, .57, 2.1, 1.65], + ["c", 0, 1.08, -1.05, 1.92, -2.1, 1.65], + ["c", -.9, -.21, -1.5, -1.14, -1.26, -2.04], + ["c", .12, -.63, .63, -1.11, 1.26, -1.26], + ["z"] + ], + w: 3.413, + h: 3.402 + }, + "scripts.wedge": { + d: [ + ["M", -3.66, -7.44], + ["c", .06, -.09, 0, -.09, .81, .03], + ["c", 1.86, .3, 3.84, .3, 5.73, 0], + ["c", .78, -.12, .72, -.12, .78, -.03], + ["c", .15, .15, .12, .24, -.24, .6], + ["c", -.93, .93, -1.98, 2.76, -2.67, 4.62], + ["c", -.3, .78, -.51, 1.71, -.51, 2.13], + ["c", 0, .15, 0, .18, -.06, .27], + ["c", -.12, .09, -.24, .09, -.36, 0], + ["c", -.06, -.09, -.06, -.12, -.06, -.27], + ["c", 0, -.42, -.21, -1.35, -.51, -2.13], + ["c", -.69, -1.86, -1.74, -3.69, -2.67, -4.62], + ["c", -.36, -.36, -.39, -.45, -.24, -.6], + ["z"] + ], + w: 7.49, + h: 7.752 + }, + "scripts.thumb": { + d: [ + ["M", -.54, -3.69], + ["c", .15, -.03, .36, -.06, .51, -.06], + ["c", 1.44, 0, 2.58, 1.11, 2.94, 2.85], + ["c", .09, .48, .09, 1.32, 0, 1.8], + ["c", -.27, 1.41, -1.08, 2.43, -2.16, 2.73], + ["l", -.18, .06], + ["l", 0, .12], + ["c", .03, .06, .06, .45, .09, .87], + ["c", .03, .57, .03, .78, 0, .84], + ["c", -.09, .27, -.39, .48, -.66, .48], + ["c", -.27, 0, -.57, -.21, -.66, -.48], + ["c", -.03, -.06, -.03, -.27, 0, -.84], + ["c", .03, -.42, .06, -.81, .09, -.87], + ["l", 0, -.12], + ["l", -.18, -.06], + ["c", -1.08, -.3, -1.89, -1.32, -2.16, -2.73], + ["c", -.09, -.48, -.09, -1.32, 0, -1.8], + ["c", .15, -.84, .51, -1.53, 1.02, -2.04], + ["c", .39, -.39, .84, -.63, 1.35, -.75], + ["z"], + ["m", 1.05, .9], + ["c", -.15, -.09, -.21, -.09, -.45, -.12], + ["c", -.15, 0, -.3, .03, -.39, .03], + ["c", -.57, .18, -.9, .72, -1.08, 1.74], + ["c", -.06, .48, -.06, 1.8, 0, 2.28], + ["c", .15, .9, .42, 1.44, .9, 1.65], + ["c", .18, .09, .21, .09, .51, .09], + ["c", .3, 0, .33, 0, .51, -.09], + ["c", .48, -.21, .75, -.75, .9, -1.65], + ["c", .03, -.27, .03, -.54, .03, -1.14], + ["c", 0, -.6, 0, -.87, -.03, -1.14], + ["c", -.15, -.9, -.45, -1.44, -.9, -1.65], + ["z"] + ], + w: 5.955, + h: 9.75 + }, + "scripts.open": { + d: [ + ["M", -.54, -3.69], + ["c", .15, -.03, .36, -.06, .51, -.06], + ["c", 1.44, 0, 2.58, 1.11, 2.94, 2.85], + ["c", .09, .48, .09, 1.32, 0, 1.8], + ["c", -.33, 1.74, -1.47, 2.85, -2.91, 2.85], + ["c", -1.44, 0, -2.58, -1.11, -2.91, -2.85], + ["c", -.09, -.48, -.09, -1.32, 0, -1.8], + ["c", .15, -.84, .51, -1.53, 1.02, -2.04], + ["c", .39, -.39, .84, -.63, 1.35, -.75], + ["z"], + ["m", 1.11, .9], + ["c", -.21, -.09, -.27, -.09, -.51, -.12], + ["c", -.3, 0, -.42, .03, -.66, .15], + ["c", -.24, .12, -.51, .39, -.66, .63], + ["c", -.54, .93, -.63, 2.64, -.21, 3.81], + ["c", .21, .54, .51, .9, .93, 1.11], + ["c", .21, .09, .24, .09, .54, .09], + ["c", .3, 0, .33, 0, .54, -.09], + ["c", .42, -.21, .72, -.57, .93, -1.11], + ["c", .36, -.99, .36, -2.37, 0, -3.36], + ["c", -.21, -.54, -.51, -.9, -.9, -1.11], + ["z"] + ], + w: 5.955, + h: 7.5 + }, + "scripts.longphrase": { + d: [ + ["M", 1.47, -15.09], + ["c", .36, -.09, .66, -.18, .69, -.18], + ["c", .06, 0, .06, .54, .06, 11.25], + ["l", 0, 11.25], + ["l", -.63, .15], + ["c", -.66, .18, -1.44, .39, -1.5, .39], + ["c", -.03, 0, -.03, -3.39, -.03, -11.25], + ["l", 0, -11.25], + ["l", .36, -.09], + ["c", .21, -.06, .66, -.18, 1.05, -.27], + ["z"] + ], + w: 2.16, + h: 23.04 + }, + "scripts.mediumphrase": { + d: [ + ["M", 1.47, -7.59], + ["c", .36, -.09, .66, -.18, .69, -.18], + ["c", .06, 0, .06, .39, .06, 7.5], + ["l", 0, 7.5], + ["l", -.63, .15], + ["c", -.66, .18, -1.44, .39, -1.5, .39], + ["c", -.03, 0, -.03, -2.28, -.03, -7.5], + ["l", 0, -7.5], + ["l", .36, -.09], + ["c", .21, -.06, .66, -.18, 1.05, -.27], + ["z"] + ], + w: 2.16, + h: 15.54 + }, + "scripts.shortphrase": { + d: [ + ["M", 1.47, -7.59], + ["c", .36, -.09, .66, -.18, .69, -.18], + ["c", .06, 0, .06, .21, .06, 3.75], + ["l", 0, 3.75], + ["l", -.42, .09], + ["c", -.57, .18, -1.65, .45, -1.71, .45], + ["c", -.03, 0, -.03, -.72, -.03, -3.75], + ["l", 0, -3.75], + ["l", .36, -.09], + ["c", .21, -.06, .66, -.18, 1.05, -.27], + ["z"] + ], + w: 2.16, + h: 8.04 + }, + "scripts.snap": { + d: [ + ["M", 4.5, -3.39], + ["c", .36, -.03, .96, -.03, 1.35, 0], + ["c", 1.56, .15, 3.15, .9, 4.2, 2.01], + ["c", .24, .27, .33, .42, .33, .6], + ["c", 0, .27, .03, .24, -2.46, 2.22], + ["c", -1.29, 1.02, -2.4, 1.86, -2.49, 1.92], + ["c", -.18, .09, -.3, .09, -.48, 0], + ["c", -.09, -.06, -1.2, -.9, -2.49, -1.92], + ["c", -2.49, -1.98, -2.46, -1.95, -2.46, -2.22], + ["c", 0, -.18, .09, -.33, .33, -.6], + ["c", 1.05, -1.08, 2.64, -1.86, 4.17, -2.01], + ["z"], + ["m", 1.29, 1.17], + ["c", -1.47, -.15, -2.97, .3, -4.14, 1.2], + ["l", -.18, .15], + ["l", .06, .09], + ["c", .15, .12, 3.63, 2.85, 3.66, 2.85], + ["c", .03, 0, 3.51, -2.73, 3.66, -2.85], + ["l", .06, -.09], + ["l", -.18, -.15], + ["c", -.84, -.66, -1.89, -1.08, -2.94, -1.2], + ["z"] + ], + w: 10.38, + h: 6.84 + }, + "noteheads.slash.whole": { + d: [ + ["M", 5, -5], + ["l", 1, 1], + ["l", -5, 5], + ["l", -1, -1], + ["z"], + ["m", 4, 6], + ["l", -5, -5], + ["l", 2, -2], + ["l", 5, 5], + ["z"], + ["m", 0, -2], + ["l", 1, 1], + ["l", -5, 5], + ["l", -1, -1], + ["z"], + ["m", -4, 6], + ["l", -5, -5], + ["l", 2, -2], + ["l", 5, 5], + ["z"] + ], + w: 10.81, + h: 15.63 + }, + "noteheads.slash.quarter": { + d: [ + ["M", 9, -6], + ["l", 0, 4], + ["l", -9, 9], + ["l", 0, -4], + ["z"] + ], + w: 9, + h: 9 + }, + "noteheads.harmonic.quarter": { + d: [ + ["M", 3.63, -4.02], + ["c", .09, -.06, .18, -.09, .24, -.03], + ["c", .03, .03, .87, .93, 1.83, 2.01], + ["c", 1.5, 1.65, 1.8, 1.98, 1.8, 2.04], + ["c", 0, .06, -.3, .39, -1.8, 2.04], + ["c", -.96, 1.08, -1.8, 1.98, -1.83, 2.01], + ["c", -.06, .06, -.15, .03, -.24, -.03], + ["c", -.12, -.09, -3.54, -3.84, -3.6, -3.93], + ["c", -.03, -.03, -.03, -.09, -.03, -.15], + ["c", .03, -.06, 3.45, -3.84, 3.63, -3.96], + ["z"] + ], + w: 7.5, + h: 8.165 + } + }, + n = function(e) { + for (var t = [], r = 0, i = e.length; r < i; r++) { + t[r] = []; + for (var a = 0, n = e[r].length; a < n; a++) t[r][a] = e[r][a] + } + return t + }, + s = { + printSymbol: function(e, t, r, i, s) { + if (!a[r]) return null; + var o = n(a[r].d); + o[0][1] += e, o[0][2] += t; + for (var c = "", l = 0; l < o.length; l++) c += o[l].join(" "); + return i.path({ + path: c, + stroke: "none", + fill: "#000000", + class: s + }) + }, + getPathForSymbol: function(e, t, r, i, s) { + if (i = i || 1, s = s || 1, !a[r]) return null; + var o = n(a[r].d); + return 1 === i && 1 === s || function(e, t, r) { + for (var i = 0, a = e.length; i < a; i++) { + var n, s, o = e[i]; + for (n = 1, s = o.length; n < s; n++) o[n] *= n % 2 ? t : r + } + }(o, i, s), o[0][1] += e, o[0][2] += t, o + }, + getSymbolWidth: function(e) { + return a[e] ? a[e].w : 0 + }, + symbolHeightInPitches: function(e) { + return (a[e] ? a[e].h : 0) / i.STEP + }, + getSymbolAlign: function(e) { + return "scripts" === e.substring(0, 7) && "scripts.roll" !== e ? "center" : "left" + }, + getYCorr: function(e) { + switch (e) { + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + case "+": + return -2; + case "timesig.common": + case "timesig.cut": + return 0; + case "flags.d32nd": + return -1; + case "flags.d64th": + return -2; + case "flags.u32nd": + return 1; + case "flags.u64th": + return 3; + case "rests.whole": + return 1; + case "rests.half": + case "rests.8th": + case "rests.quarter": + case "rests.16th": + case "rests.32nd": + case "rests.64th": + return -1; + case "f": + case "m": + case "p": + case "s": + case "z": + return -4; + case "scripts.trill": + case "scripts.upbow": + case "scripts.downbow": + return -2; + case "scripts.ufermata": + case "scripts.wedge": + case "scripts.roll": + case "scripts.shortphrase": + case "scripts.longphrase": + return -1; + case "scripts.dfermata": + return 1; + default: + return 0 + } + }, + setSymbol: function(e, t) { + a[e] = t + } + }; + e.exports = s +}, function(e, t, r) { + var i = r(1), + a = function(e, t, r, i, a, n) { + n || (n = {}), this.tuneNumber = a, this.abcelem = e, this.duration = t, this.durationClass = n.durationClassOveride ? n.durationClassOveride : this.duration, this.minspacing = r || 0, this.x = 0, this.children = [], this.heads = [], this.extra = [], this.extraw = 0, this.w = 0, this.right = [], this.invisible = !1, this.bottom = void 0, this.top = void 0, this.type = i, this.specialY = { + tempoHeightAbove: 0, + partHeightAbove: 0, + volumeHeightAbove: 0, + dynamicHeightAbove: 0, + endingHeightAbove: 0, + chordHeightAbove: 0, + lyricHeightAbove: 0, + lyricHeightBelow: 0, + chordHeightBelow: 0, + volumeHeightBelow: 0, + dynamicHeightBelow: 0 + } + }; + a.prototype.setUpperAndLowerElements = function(e) { + for (var t = 0; t < this.children.length; t++) { + var r = this.children[t]; + for (var i in this.specialY) this.specialY.hasOwnProperty(i) && r[i] && (r.pitch = e[i], void 0 === r.top && (r.setUpperAndLowerElements(e), this.pushTop(r.top), this.pushBottom(r.bottom))) + } + }, a.prototype.getMinWidth = function() { + return this.w + }, a.prototype.getExtraWidth = function() { + return -this.extraw + }, a.prototype.addExtra = function(e) { + e.dx < this.extraw && (this.extraw = e.dx), this.extra[this.extra.length] = e, this.addChild(e) + }, a.prototype.addHead = function(e) { + e.dx < this.extraw && (this.extraw = e.dx), this.heads[this.heads.length] = e, this.addRight(e) + }, a.prototype.addRight = function(e) { + e.dx + e.w > this.w && (this.w = e.dx + e.w), this.right[this.right.length] = e, this.addChild(e) + }, a.prototype.addCentered = function(e) { + var t = e.w / 2; - t < this.extraw && (this.extraw = -t), this.extra[this.extra.length] = e, e.dx + t > this.w && (this.w = e.dx + t), this.right[this.right.length] = e, this.addChild(e) + }, a.prototype.setLimit = function(e, t) { + t[e] && (this.specialY[e] ? this.specialY[e] = Math.max(this.specialY[e], t[e]) : this.specialY[e] = t[e]) + }, a.prototype.addChild = function(e) { + e.parent = this, this.children[this.children.length] = e, this.pushTop(e.top), this.pushBottom(e.bottom), this.setLimit("tempoHeightAbove", e), this.setLimit("partHeightAbove", e), this.setLimit("volumeHeightAbove", e), this.setLimit("dynamicHeightAbove", e), this.setLimit("endingHeightAbove", e), this.setLimit("chordHeightAbove", e), this.setLimit("lyricHeightAbove", e), this.setLimit("lyricHeightBelow", e), this.setLimit("chordHeightBelow", e), this.setLimit("volumeHeightBelow", e), this.setLimit("dynamicHeightBelow", e) + }, a.prototype.pushTop = function(e) { + void 0 !== e && (void 0 === this.top ? this.top = e : this.top = Math.max(e, this.top)) + }, a.prototype.pushBottom = function(e) { + void 0 !== e && (void 0 === this.bottom ? this.bottom = e : this.bottom = Math.min(e, this.bottom)) + }, a.prototype.setX = function(e) { + this.x = e; + for (var t = 0; t < this.children.length; t++) this.children[t].setX(e) + }, a.prototype.setHint = function() { + this.hint = !0 + }, a.prototype.draw = function(e, t) { + if (!this.invisible) { + this.elemset = [], e.beginGroup(); + for (var r = 0; r < this.children.length; r++) { + 0; + var a = this.children[r].draw(e, t); + a && this.elemset.push(a) + } + var n = this.type; + if (("note" === this.type || "rest" === this.type) && (n = (n += " d" + this.durationClass).replace(/\./g, "-"), this.abcelem.pitches)) + for (var s = 0; s < this.abcelem.pitches.length; s++) n += " p" + this.abcelem.pitches[s].pitch; + var o = e.endGroup(n); + o && this.elemset.push(o), this.klass && this.setClass("mark", "", "#00ff00"), this.hint && this.setClass("abcjs-hint", "", null); + var c = e.printShadedBox(this.x, e.calcY(this.top), this.w, e.calcY(this.bottom) - e.calcY(this.top), "#000000", 0), + l = this, + h = e.controller; + c.addEventListener("mouseup", (function() { + var e = []; + if (l.elemset) + for (var t = 0; t < l.elemset.length; t++) { + var r = l.elemset[t]; + r && e.push(r.getAttribute("class")) + } + h.notifySelect(l, l.tuneNumber, e) + })), this.abcelem.abselem = this; + i.STEP + } + }, a.prototype.isIE = /*@cc_on!@*/ !1, a.prototype.setClass = function(e, t, r) { + for (var i = 0; i < this.elemset.length; i++) { + var a = this.elemset[i]; + a.setAttribute("fill", r); + var n = a.getAttribute("class"); + n || (n = ""), n = (n = n.replace(t, "")).replace(e, ""), e.length > 0 && (n.length > 0 && " " !== n.charAt(n.length - 1) && (n += " "), n += e), a.setAttribute("class", n) + } + }, a.prototype.highlight = function(e, t) { + void 0 === e && (e = "abcjs-note_selected"), void 0 === t && (t = "#ff0000"), this.setClass(e, "", t) + }, a.prototype.unhighlight = function(e, t) { + void 0 === e && (e = "abcjs-note_selected"), void 0 === t && (t = "#000000"), this.setClass("", e, t) + }, e.exports = a +}, function(e, t) { + e.exports = function() { + for (var e, t, r, i, a, n = 0, s = arguments[n++], o = []; s;) { + if (t = /^[^\x25]+/.exec(s)) o.push(t[0]); + else if (t = /^\x25{2}/.exec(s)) o.push("%"); + else { + if (!(t = /^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(s))) throw "Huh ?!"; + if (null == (e = arguments[t[1] || n++]) || null == e) throw "Too few arguments."; + if (/[^s]/.test(t[7]) && "number" != typeof e) throw "Expecting number but found " + typeof e; + switch (t[7]) { + case "b": + e = e.toString(2); + break; + case "c": + e = String.fromCharCode(e); + break; + case "d": + e = parseInt(e); + break; + case "e": + e = t[6] ? e.toExponential(t[6]) : e.toExponential(); + break; + case "f": + e = t[6] ? parseFloat(e).toFixed(t[6]) : parseFloat(e); + break; + case "o": + e = e.toString(8); + break; + case "s": + e = (e = String(e)) && t[6] ? e.substring(0, t[6]) : e; + break; + case "u": + e = Math.abs(e); + break; + case "x": + e = e.toString(16); + break; + case "X": + e = e.toString(16).toUpperCase() + } + e = /[def]/.test(t[7]) && t[2] && e > 0 ? "+" + e : e, i = t[3] ? "0" == t[3] ? "0" : t[3].charAt(1) : " ", a = t[5] - String(e).length, r = t[5] ? str_repeat(i, a) : "", o.push(t[4] ? e + r : r + e) + } + s = s.substring(t[0].length) + } + return o.join("") + } +}, function(e, t) { + e.exports = function() { + return window.abcjsAudioContext + } +}, function(e, t, r) { + var i = r(6); + e.exports = function() { + var e = i(); + return e ? void 0 !== e.resume : !!window.Promise && (window.AudioContext || window.webkitAudioContext || navigator.mozAudioContext || navigator.msAudioContext) + } +}, function(e, t) { + function r(e, t) { + for (var r = [], i = null, a = 0; a < e.length; a++) { + var n = e[a]; + n.top !== i && (r.push({ + milliseconds: n.milliseconds - t, + top: n.top, + bottom: n.top + n.height + }), i = n.top) + } + return r + } + e.exports = function(e, t) { + var i = this; + if (t || (t = {}), i.qpm = t.qpm ? parseInt(t.qpm, 10) : null, !i.qpm) { + var a = e.metaText ? e.metaText.tempo : null; + i.qpm = e.getBpm(a) + } + i.extraMeasuresAtBeginning = t.extraMeasuresAtBeginning ? parseInt(t.extraMeasuresAtBeginning, 10) : 0, i.beatCallback = t.beatCallback, i.eventCallback = t.eventCallback, i.lineEndCallback = t.lineEndCallback, i.lineEndAnticipation = t.lineEndAnticipation ? parseInt(t.lineEndAnticipation, 10) : 0, i.beatSubdivisions = t.beatSubdivisions ? parseInt(t.beatSubdivisions, 10) : 1, i.replaceTarget = function(e) { + e.setTiming(i.qpm, i.extraMeasuresAtBeginning), 0 === e.noteTimings.length && e.setTiming(0, 0), i.lineEndCallback && (i.lineEndTimings = r(e.noteTimings, i.lineEndAnticipation)), i.noteTimings = e.noteTimings + }, i.replaceTarget(e), 0 !== i.noteTimings.length && (i.noteTimings = e.noteTimings, i.millisecondsPerBeat = 1e3 / (i.qpm / 60) / i.beatSubdivisions, i.lastMoment = i.noteTimings[i.noteTimings.length - 1].milliseconds, i.totalBeats = Math.round(i.lastMoment / i.millisecondsPerBeat), i.startTime = null, i.currentBeat = 0, i.currentEvent = 0, i.isPaused = !1, i.isRunning = !1, i.pausedTime = null, i.justUnpaused = !1, i.newSeekPercent = 0, i.justSeeked = !1, i.doTiming = function(e) { + if (i.startTime) { + if (i.justUnpaused) { + var t = e - i.pausedTime; + i.startTime += t + } + } else i.startTime = e; + if (i.justUnpaused = !1, i.justSeeked && (! function(e) { + var t = (e - i.startTime) / i.lastMoment - i.newSeekPercent, + r = i.lastMoment * t; + i.startTime = i.startTime + r; + var a = e - i.startTime; + a += 50; + var n = i.currentBeat; + for (i.currentBeat = Math.floor(a / i.millisecondsPerBeat), i.beatCallback && n !== i.currentBeat && i.beatCallback(i.currentBeat / i.beatSubdivisions, i.totalBeats / i.beatSubdivisions, i.lastMoment), i.currentEvent = 0; i.noteTimings.length > i.currentEvent && i.noteTimings[i.currentEvent].milliseconds < a;) i.currentEvent++; + i.eventCallback && i.currentEvent > 0 && "event" === i.noteTimings[i.currentEvent - 1].type && i.eventCallback(i.noteTimings[i.currentEvent - 1]) + }(e), i.justSeeked = !1), i.isPaused) i.pausedTime = e; + else if (i.isRunning) { + var r = e - i.startTime; + for (r += 50; i.noteTimings.length > i.currentEvent && i.noteTimings[i.currentEvent].milliseconds < r;) i.eventCallback && "event" === i.noteTimings[i.currentEvent].type && i.eventCallback(i.noteTimings[i.currentEvent]), i.currentEvent++; + r < i.lastMoment ? (requestAnimationFrame(i.doTiming), i.currentBeat * i.millisecondsPerBeat < r && (i.beatCallback && i.beatCallback(i.currentBeat / i.beatSubdivisions, i.totalBeats / i.beatSubdivisions, i.lastMoment), i.currentBeat++)) : i.currentBeat <= i.totalBeats && i.beatCallback && (i.beatCallback(i.currentBeat / i.beatSubdivisions, i.totalBeats / i.beatSubdivisions, i.lastMoment), i.currentBeat++, requestAnimationFrame(i.doTiming)), i.lineEndCallback && i.lineEndTimings.length && i.lineEndTimings[0].milliseconds <= r && (i.lineEndCallback(i.lineEndTimings[0]), i.lineEndTimings.shift()), r >= i.lastMoment && i.eventCallback && i.eventCallback(null) + } + }, i.start = function() { + i.isRunning = !0, i.isPaused && (i.isPaused = !1, i.justUnpaused = !0), requestAnimationFrame(i.doTiming) + }, i.pause = function() { + i.isPaused = !0, i.isRunning = !1 + }, i.reset = function() { + i.currentBeat = 0, i.currentEvent = 0, i.startTime = null, i.pausedTime = null, i.lineEndCallback && (i.lineEndTimings = r(i.noteTimings, i.lineEndAnticipation)) + }, i.stop = function() { + i.pause(), i.reset() + }, i.setProgress = function(e) { + e < 0 && (e = 0), e > 1 && (e = 1), i.newSeekPercent = e, i.justSeeked = !0, requestAnimationFrame(i.doTiming) + }) + } +}, function(e, t, r) { + var i = r(0), + a = r(10), + n = {}; + ! function() { + "use strict"; + n.numberOfTunes = function(e) { + var t = e.split("\nX:").length; + return 0 === t && (t = 1), t + }; + var e = n.TuneBook = function(e) { + for (var t = this, r = "", a = (e = i.strip(e)).split("\nX:"), n = 1; n < a.length; n++) a[n] = "X:" + a[n]; + var s = 0; + if (t.tunes = [], i.each(a, (function(e) { + t.tunes.push({ + abc: e, + startPos: s + }), s += e.length + 1 + })), t.tunes.length > 1 && !i.startsWith(t.tunes[0].abc, "X:")) { + var o = t.tunes.shift().abc.split("\n"); + i.each(o, (function(e) { + i.startsWith(e, "%%") && (r += e + "\n") + })) + } + t.header = r, i.each(t.tunes, (function(e) { + var t = e.abc.indexOf("\n\n"); + t > 0 && (e.abc = e.abc.substring(0, t)), e.pure = e.abc, e.abc = r + e.abc; + var i = e.pure.split("T:"); + i.length > 1 ? (i = i[1].split("\n"), e.title = i[0].replace(/^\s+|\s+$/g, "")) : e.title = ""; + var a = e.pure.substring(2, e.pure.indexOf("\n")); + e.id = a.replace(/^\s+|\s+$/g, "") + })) + }; + e.prototype.getTuneById = function(e) { + for (var t = 0; t < this.tunes.length; t++) + if (this.tunes[t].id === "" + e) return this.tunes[t]; + return null + }, e.prototype.getTuneByTitle = function(e) { + for (var t = 0; t < this.tunes.length; t++) + if (this.tunes[t].title === e) return this.tunes[t]; + return null + }, n.parseOnly = function(e, t) { + for (var r = n.numberOfTunes(e), i = [], a = 0; a < r; a++) i.push(1); + return n.renderEngine((function() {}), i, e, t) + }, n.renderEngine = function(t, r, i, n) { + var s = []; + if (void 0 !== r && void 0 !== i) { + var o; + (!(o = r) || o.propertyIsEnumerable("length") || "object" != typeof o || "number" != typeof o.length) && (r = [r]), void 0 === n && (n = {}); + for (var c = n.startingTune ? parseInt(n.startingTune, 10) : 0, l = new e(i), h = new a, u = 0; u < r.length; u++) { + var d = r[u]; + if ("*" === d || "string" == typeof d && (d = document.getElementById(d)), d) + if (c >= 0 && c < l.tunes.length) { + h.parse(l.tunes[c].abc, n, l.tunes[c].startPos - l.header.length); + var p = h.getTune(), + f = t(d, p, u, l.tunes[c].abc); + s.push(f || p) + } else d.hasOwnProperty("innerHTML") && (d.innerHTML = ""); + c++ + } + return s + } + }, n.extractMeasures = function(t) { + for (var r = [], i = new e(t), a = 0; a < i.tunes.length; a++) { + for (var s = i.tunes[a], o = s.abc.split("K:"), c = o[1].split("\n"), l = o[0] + "K:" + c[0] + "\n", h = null, u = null, d = null, p = [], f = !1, m = n.parseOnly(s.abc)[0], g = m.getPickupLength() > 0, v = 0; v < m.lines.length; v++) { + var b = m.lines[v]; + if (b.staff) + for (var y = 0; y < 1; y++) + for (var w = b.staff[y], k = 0; k < 1; k++) + for (var x = w.voices[k], S = 0; S < x.length; S++) { + var A = x[S]; + if (null === d && A.startChar >= 0 && (d = A.startChar, u = void 0 === A.chord ? h : null), A.chord && (h = A), "bar" === A.el_type) { + if (f) { + var T = { + abc: s.abc.substring(d, A.endChar) + }; + (h = u && u.chord && u.chord.length > 0 ? u.chord[0].name : null) && (T.lastChord = h), A.startEnding && (T.startEnding = A.startEnding), A.endEnding && (T.endEnding = A.endEnding), p.push(T), d = null, f = !1 + } + } else "note" === A.el_type && (f = !0) + } + } + r.push({ + header: l, + measures: p, + hasPickup: g + }) + } + return r + } + }(), e.exports = n +}, function(e, t, r) { + var i = r(0), + a = r(11), + n = r(31), + s = r(12), + o = r(32), + c = r(17), + l = r(18), + h = r(19); + e.exports = function() { + "use strict"; + var e = new h, + t = new o; + + function r(e, t, r) { + e.positioning || (e.positioning = {}), e.positioning[t] = r + } + + function u(e, t, r) { + e.fonts || (e.fonts = {}), e.fonts[t] = r + } + this.getTune = function() { + return { + formatting: e.formatting, + lines: e.lines, + media: e.media, + metaText: e.metaText, + version: e.version, + addElementToEvents: e.addElementToEvents, + addUsefulCallbackInfo: e.addUsefulCallbackInfo, + getBarLength: e.getBarLength, + getBeatLength: e.getBeatLength, + getBeatsPerMeasure: e.getBeatsPerMeasure, + getBpm: e.getBpm, + getMeter: e.getMeter, + getMeterFraction: e.getMeterFraction, + getPickupLength: e.getPickupLength, + getKeySignature: e.getKeySignature, + makeVoicesArray: e.makeVoicesArray, + millisecondsPerMeasure: e.millisecondsPerMeasure, + setupEvents: e.setupEvents, + setTiming: e.setTiming + } + }; + var d = { + reset: function() { + for (var e in this) this.hasOwnProperty(e) && "function" != typeof this[e] && delete this[e]; + this.iChar = 0, this.key = { + accidentals: [], + root: "none", + acc: "", + mode: "" + }, this.meter = null, this.origMeter = null, this.hasMainTitle = !1, this.default_length = .125, this.clef = { + type: "treble", + verticalPos: 0 + }, this.next_note_duration = 0, this.start_new_line = !0, this.is_in_header = !0, this.is_in_history = !1, this.partForNextLine = {}, this.havent_set_length = !0, this.voices = {}, this.staves = [], this.macros = {}, this.currBarNumber = 1, this.barCounter = {}, this.inTextBlock = !1, this.inPsBlock = !1, this.ignoredDecorations = [], this.textBlock = "", this.score_is_present = !1, this.inEnding = !1, this.inTie = [], this.inTieChord = {}, this.vocalPosition = "auto", this.dynamicPosition = "auto", this.chordPosition = "auto", this.ornamentPosition = "auto", this.volumePosition = "auto", this.openSlurs = [], this.freegchord = !1 + }, + differentFont: function(e, t) { + return this[e].decoration !== t[e].decoration || (this[e].face !== t[e].face || (this[e].size !== t[e].size || (this[e].style !== t[e].style || this[e].weight !== t[e].weight))) + }, + addFormattingOptions: function(e, t, i) { + "note" === i ? ("auto" !== this.vocalPosition && r(e, "vocalPosition", this.vocalPosition), "auto" !== this.dynamicPosition && r(e, "dynamicPosition", this.dynamicPosition), "auto" !== this.chordPosition && r(e, "chordPosition", this.chordPosition), "auto" !== this.ornamentPosition && r(e, "ornamentPosition", this.ornamentPosition), "auto" !== this.volumePosition && r(e, "volumePosition", this.volumePosition), this.differentFont("annotationfont", t) && u(e, "annotationfont", this.annotationfont), this.differentFont("gchordfont", t) && u(e, "gchordfont", this.gchordfont), this.differentFont("vocalfont", t) && u(e, "vocalfont", this.vocalfont), this.differentFont("tripletfont", t) && u(e, "tripletfont", this.tripletfont)) : "bar" === i && ("auto" !== this.dynamicPosition && r(e, "dynamicPosition", this.dynamicPosition), "auto" !== this.chordPosition && r(e, "chordPosition", this.chordPosition), "auto" !== this.ornamentPosition && r(e, "ornamentPosition", this.ornamentPosition), "auto" !== this.volumePosition && r(e, "volumePosition", this.volumePosition), this.differentFont("measurefont", t) && u(e, "measurefont", this.measurefont), this.differentFont("repeatfont", t) && u(e, "repeatfont", this.repeatfont)) + } + }, + p = function(e) { + var t = i.gsub(e, "", " "); + return t = i.gsub(t, "&", "&"), t = i.gsub(t, "<", "<"), i.gsub(t, ">", ">") + }, + f = function(t, r, i) { + r || (r = " "); + var a = r.charAt(i); + " " === a && (a = "SPACE"); + var n, s = p(r.substring(0, i)) + '' + a + "" + p(r.substring(i + 1)); + ! function(e) { + d.warnings || (d.warnings = []), d.warnings.push(e) + }("Music Line:" + e.getNumLines() + ":" + (i + 1) + ": " + t + ": " + s), n = { + message: t, + line: r, + startChar: d.iChar + i, + column: i + }, d.warningObjects || (d.warningObjects = []), d.warningObjects.push(n) + }, + m = new n(t, f, d, e); + this.getWarnings = function() { + return d.warnings + }, this.getWarningObjects = function() { + return d.warningObjects + }; + var g = function(e, r) { + if ('"' === e.charAt(r)) { + var i = t.getBrackettedSubstring(e, r, 5); + if (i[2] || f("Missing the closing quote while parsing the chord symbol", e, r), i[0] > 0 && i[1].length > 0 && "^" === i[1].charAt(0)) i[1] = i[1].substring(1), i[2] = "above"; + else if (i[0] > 0 && i[1].length > 0 && "_" === i[1].charAt(0)) i[1] = i[1].substring(1), i[2] = "below"; + else if (i[0] > 0 && i[1].length > 0 && "<" === i[1].charAt(0)) i[1] = i[1].substring(1), i[2] = "left"; + else if (i[0] > 0 && i[1].length > 0 && ">" === i[1].charAt(0)) i[1] = i[1].substring(1), i[2] = "right"; + else if (i[0] > 0 && i[1].length > 0 && "@" === i[1].charAt(0)) { + i[1] = i[1].substring(1); + var a = t.getFloat(i[1]); + 0 === a.digits && f("Missing first position in absolutely positioned annotation.", e, r), i[1] = i[1].substring(a.digits), "," !== i[1][0] && f("Missing comma absolutely positioned annotation.", e, r), i[1] = i[1].substring(1); + var n = t.getFloat(i[1]); + 0 === n.digits && f("Missing second position in absolutely positioned annotation.", e, r), i[1] = i[1].substring(n.digits); + var s = t.skipWhiteSpace(i[1]); + i[1] = i[1].substring(s), i[2] = null, i[3] = { + x: a.value, + y: n.value + } + } else !0 !== d.freegchord && (i[1] = i[1].replace(/([ABCDEFG0-9])b/g, "$1♭"), i[1] = i[1].replace(/([ABCDEFG0-9])#/g, "$1♯")), i[2] = "default", i[1] = c.chordName(d, i[1]); + return i + } + return [0, ""] + }, + v = ["trill", "lowermordent", "uppermordent", "mordent", "pralltriller", "accent", "fermata", "invertedfermata", "tenuto", "0", "1", "2", "3", "4", "5", "+", "wedge", "open", "thumb", "snap", "turn", "roll", "breath", "shortphrase", "mediumphrase", "longphrase", "segno", "coda", "D.S.", "D.C.", "fine", "slide", "^", "marcato", "upbow", "downbow", "/", "//", "///", "////", "trem1", "trem2", "trem3", "trem4", "turnx", "invertedturn", "invertedturnx", "trill(", "trill)", "arpeggio", "xstem", "mark", "umarcato", "style=normal", "style=harmonic", "style=rhythm", "style=x"], + b = ["p", "pp", "f", "ff", "mf", "mp", "ppp", "pppp", "fff", "ffff", "sfz"], + y = ["crescendo(", "crescendo)", "diminuendo(", "diminuendo)"], + w = [ + ["<", "accent"], + [">", "accent"], + ["tr", "trill"], + ["plus", "+"], + ["emphasis", "accent"], + ["^", "umarcato"], + ["marcato", "umarcato"] + ], + k = [ + ["<(", "crescendo("], + ["<)", "crescendo)"], + [">(", "diminuendo("], + [">)", "diminuendo)"] + ], + x = function(e, r) { + var a = d.macros[e.charAt(r)]; + if (void 0 !== a) return "!" !== a.charAt(0) && "+" !== a.charAt(0) || (a = a.substring(1)), "!" !== a.charAt(a.length - 1) && "+" !== a.charAt(a.length - 1) || (a = a.substring(0, a.length - 1)), i.detect(v, (function(e) { + return a === e + })) ? [1, a] : i.detect(b, (function(e) { + return a === e + })) ? ("hidden" === d.volumePosition && (a = ""), [1, a]) : i.detect(y, (function(e) { + return "hidden" === d.dynamicPosition && (a = ""), a === e + })) ? [1, a] : (i.detect(d.ignoredDecorations, (function(e) { + return a === e + })) || f("Unknown macro: " + a, e, r), [1, ""]); + switch (e.charAt(r)) { + case ".": + return [1, "staccato"]; + case "u": + return [1, "upbow"]; + case "v": + return [1, "downbow"]; + case "~": + return [1, "irishroll"]; + case "!": + case "+": + var n = t.getBrackettedSubstring(e, r, 5); + return n[1].length > 0 && ("^" === n[1].charAt(0) || "_" === n[1].charAt(0)) && (n[1] = n[1].substring(1)), i.detect(v, (function(e) { + return n[1] === e + })) ? n : i.detect(b, (function(e) { + return n[1] === e + })) ? ("hidden" === d.volumePosition && (n[1] = ""), n) : i.detect(y, (function(e) { + return n[1] === e + })) ? ("hidden" === d.dynamicPosition && (n[1] = ""), n) : i.detect(w, (function(e) { + return n[1] === e[0] && (n[1] = e[1], !0) + })) ? n : i.detect(k, (function(e) { + return n[1] === e[0] && (n[1] = e[1], !0) + })) ? ("hidden" === d.dynamicPosition && (n[1] = ""), n) : "!" !== e.charAt(r) || 1 !== n[0] && "!" === e.charAt(r + n[0] - 1) ? (f("Unknown decoration: " + n[1], e, r), n[1] = "", n) : [1, null]; + case "H": + return [1, "fermata"]; + case "J": + return [1, "slide"]; + case "L": + return [1, "accent"]; + case "M": + return [1, "mordent"]; + case "O": + return [1, "coda"]; + case "P": + return [1, "pralltriller"]; + case "R": + return [1, "roll"]; + case "S": + return [1, "segno"]; + case "T": + return [1, "trill"] + } + return [0, 0] + }, + S = function(e, r) { + for (var i = r; t.isWhiteSpace(e.charAt(r));) r++; + return [r - i] + }, + A = function(e, r) { + var i = t.getBarLine(e, r); + if (0 === i.len) return [0, ""]; + if (i.warn) return f(i.warn, e, r), [i.len, ""]; + for (var a = 0; a < e.length && " " === e.charAt(r + i.len + a); a++); + var n = i.len; + if ("[" === e.charAt(r + i.len + a) && (i.len += a + 1), '"' === e.charAt(r + i.len) && "[" === e.charAt(r + i.len - 1)) { + var s = t.getBrackettedSubstring(e, r + i.len, 5); + return [i.len + s[0], i.token, s[1]] + } + var o = t.getTokenOf(e.substring(r + i.len), "1234567890-,"); + return 0 === o.len || "-" === o.token[0] ? [n, i.token] : [i.len + o.len, i.token, o.token] + }, + T = { + 2: 3, + 3: 2, + 4: 3, + 5: 2, + 6: 2, + 7: 2, + 8: 3, + 9: 2 + }, + C = function(e, r) { + for (var i = {}, a = r; + "(" === e.charAt(r) || t.isWhiteSpace(e.charAt(r));) "(" === e.charAt(r) && (r + 1 < e.length && e.charAt(r + 1) >= "2" && e.charAt(r + 1) <= "9" ? (void 0 !== i.triplet ? f("Can't nest triplets", e, r) : (i.triplet = e.charAt(r + 1) - "0", i.tripletQ = T[i.triplet], i.num_notes = i.triplet, r + 2 < e.length && ":" === e.charAt(r + 2) && (r + 3 < e.length && ":" === e.charAt(r + 3) ? r + 4 < e.length && e.charAt(r + 4) >= "1" && e.charAt(r + 4) <= "9" ? (i.num_notes = e.charAt(r + 4) - "0", r += 3) : f("expected number after the two colons after the triplet to mark the duration", e, r) : r + 3 < e.length && e.charAt(r + 3) >= "1" && e.charAt(r + 3) <= "9" ? (i.tripletQ = e.charAt(r + 3) - "0", r + 4 < e.length && ":" === e.charAt(r + 4) ? r + 5 < e.length && e.charAt(r + 5) >= "1" && e.charAt(r + 5) <= "9" && (i.num_notes = e.charAt(r + 5) - "0", r += 4) : r += 2) : f("expected number after the triplet to mark the duration", e, r))), r++) : void 0 === i.startSlur ? i.startSlur = 1 : i.startSlur++), r++; + return i.consumed = r - a, i + }, + _ = function(e, t) { + switch (e.charAt(t)) { + case ">": + return t < e.length - 1 && ">" === e.charAt(t + 1) ? [2, 1.75, .25] : [1, 1.5, .5]; + case "<": + return t < e.length - 1 && "<" === e.charAt(t + 1) ? [2, .25, 1.75] : [1, .5, 1.5] + } + return null + }, + N = function(e) { + return void 0 !== e.duration && e.duration < .25 && (e.end_beam = !0), e + }, + E = { + A: 5, + B: 6, + C: 0, + D: 1, + E: 2, + F: 3, + G: 4, + a: 12, + b: 13, + c: 7, + d: 8, + e: 9, + f: 10, + g: 11 + }, + B = { + x: "invisible", + y: "spacer", + z: "rest", + Z: "multimeasure" + }, + M = function(r, i, a, n) { + for (var s = function(e) { + return "octave" === e || "duration" === e || "Zduration" === e || "broken_rhythm" === e || "end_slur" === e + }, o = "startSlur", l = !1;;) { + switch (r.charAt(i)) { + case "(": + if ("startSlur" !== o) return s(o) ? (a.endChar = i, a) : null; + void 0 === a.startSlur ? a.startSlur = 1 : a.startSlur++; + break; + case ")": + if (!s(o)) return null; + void 0 === a.endSlur ? a.endSlur = 1 : a.endSlur++; + break; + case "^": + if ("startSlur" === o) a.accidental = "sharp", o = "sharp2"; + else { + if ("sharp2" !== o) return s(o) ? (a.endChar = i, a) : null; + a.accidental = "dblsharp", o = "pitch" + } + break; + case "_": + if ("startSlur" === o) a.accidental = "flat", o = "flat2"; + else { + if ("flat2" !== o) return s(o) ? (a.endChar = i, a) : null; + a.accidental = "dblflat", o = "pitch" + } + break; + case "=": + if ("startSlur" !== o) return s(o) ? (a.endChar = i, a) : null; + a.accidental = "natural", o = "pitch"; + break; + case "A": + case "B": + case "C": + case "D": + case "E": + case "F": + case "G": + case "a": + case "b": + case "c": + case "d": + case "e": + case "f": + case "g": + if ("startSlur" !== o && "sharp2" !== o && "flat2" !== o && "pitch" !== o) return s(o) ? (a.endChar = i, a) : null; + if (a.pitch = E[r.charAt(i)], c.note(d, a), o = "octave", n && 0 !== d.next_note_duration ? (a.duration = d.default_length * d.next_note_duration, d.next_note_duration = 0, l = !0) : a.duration = d.default_length, d.clef && "perc" === d.clef.type || d.currentVoice && "perc" === d.currentVoice.clef) { + var h = r.charAt(i); + if (a.accidental) { + h = { + dblflat: "__", + flat: "_", + natural: "=", + sharp: "^", + dblsharp: "^^" + } [a.accidental] + h + } + e.formatting && e.formatting.midi && e.formatting.midi.drummap && (a.midipitch = e.formatting.midi.drummap[h]) + } + break; + case ",": + if ("octave" !== o) return s(o) ? (a.endChar = i, a) : null; + a.pitch -= 7; + break; + case "'": + if ("octave" !== o) return s(o) ? (a.endChar = i, a) : null; + a.pitch += 7; + break; + case "x": + case "y": + case "z": + case "Z": + if ("startSlur" !== o) return s(o) ? (a.endChar = i, a) : null; + a.rest = { + type: B[r.charAt(i)] + }, delete a.accidental, delete a.startSlur, delete a.startTie, delete a.endSlur, delete a.endTie, delete a.end_beam, delete a.grace_notes, "multimeasure" === a.rest.type ? (a.duration = 1, o = "Zduration") : (n && 0 !== d.next_note_duration ? (a.duration = d.default_length * d.next_note_duration, d.next_note_duration = 0, l = !0) : a.duration = d.default_length, o = "duration"); + break; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + case "0": + case "/": + if ("octave" === o || "duration" === o) { + var u = t.getFraction(r, i); + for (a.duration = a.duration * u.value, a.endChar = u.index; u.index < r.length && (t.isWhiteSpace(r.charAt(u.index)) || "-" === r.charAt(u.index));) "-" === r.charAt(u.index) ? a.startTie = {} : a = N(a), u.index++; + i = u.index - 1, o = "broken_rhythm" + } else if ("sharp2" === o) a.accidental = "quartersharp", o = "pitch"; + else { + if ("flat2" !== o) { + if ("Zduration" === o) { + var p = t.getNumber(r, i); + return a.duration = p.num, a.endChar = p.index, a + } + return null + } + a.accidental = "quarterflat", o = "pitch" + } + break; + case "-": + if ("startSlur" === o) e.addTieToLastNote(), a.endTie = !0; + else { + if ("octave" !== o && "duration" !== o && "end_slur" !== o) return "broken_rhythm" === o ? (a.endChar = i, a) : null; + if (a.startTie = {}, l || !n) return t.isWhiteSpace(r.charAt(i + 1)) && N(a), a.endChar = i + 1, a; + o = "broken_rhythm" + } + break; + case " ": + case "\t": + if (!s(o)) return null; + a.end_beam = !0; + do { + "-" === r.charAt(i) && (a.startTie = {}), i++ + } while (i < r.length && (t.isWhiteSpace(r.charAt(i)) || "-" === r.charAt(i))); + if (a.endChar = i, l || !n || "<" !== r.charAt(i) && ">" !== r.charAt(i)) return a; + i--, o = "broken_rhythm"; + break; + case ">": + case "<": + if (!s(o)) return null; + if (!n) return a.endChar = i, a; + var f = _(r, i); + i += f[0] - 1, d.next_note_duration = f[2], a.duration = f[1] * a.duration, o = "end_slur"; + break; + default: + return s(o) ? (a.endChar = i, a) : null + } + if (++i === r.length) return s(o) ? (a.endChar = i, a) : null + } + return null + }; + + function L() { + var t = { + startChar: -1, + endChar: -1 + }; + d.partForNextLine.title && (t.part = d.partForNextLine), t.clef = d.currentVoice && void 0 !== d.staves[d.currentVoice.staffNum].clef ? i.clone(d.staves[d.currentVoice.staffNum].clef) : i.clone(d.clef); + var r = d.currentVoice ? d.currentVoice.scoreTranspose : 0; + if (t.key = s.standardKey(d.key.root + d.key.acc + d.key.mode, d.key.root, d.key.acc, r), t.key.mode = d.key.mode, d.key.impliedNaturals && (t.key.impliedNaturals = d.key.impliedNaturals), d.key.explicitAccidentals) + for (var a = 0; a < d.key.explicitAccidentals.length; a++) { + for (var n = !1, o = 0; o < t.key.accidentals.length; o++) t.key.accidentals[o].note === d.key.explicitAccidentals[a].note && (t.key.accidentals[o].acc = d.key.explicitAccidentals[a].acc, n = !0); + n || t.key.accidentals.push(d.key.explicitAccidentals[a]) + } + if (d.targetKey = t.key, t.key.explicitAccidentals && delete t.key.explicitAccidentals, s.addPosToKey(t.clef, t.key), null !== d.meter ? (d.currentVoice ? (i.each(d.staves, (function(e) { + e.meter = d.meter + })), t.meter = d.staves[d.currentVoice.staffNum].meter, d.staves[d.currentVoice.staffNum].meter = null) : t.meter = d.meter, d.meter = null) : d.currentVoice && d.staves[d.currentVoice.staffNum].meter && (t.meter = d.staves[d.currentVoice.staffNum].meter, d.staves[d.currentVoice.staffNum].meter = null), d.currentVoice && d.currentVoice.name && (t.name = d.currentVoice.name), d.vocalfont && (t.vocalfont = d.vocalfont), d.tripletfont && (t.tripletfont = d.tripletfont), d.style && (t.style = d.style), d.currentVoice) { + var c = d.staves[d.currentVoice.staffNum]; + c.brace && (t.brace = c.brace), c.bracket && (t.bracket = c.bracket), c.connectBarLines && (t.connectBarLines = c.connectBarLines), c.name && (t.name = c.name[d.currentVoice.index]), c.subname && (t.subname = c.subname[d.currentVoice.index]), d.currentVoice.stem && (t.stem = d.currentVoice.stem), d.currentVoice.stafflines && (t.stafflines = d.currentVoice.stafflines), d.currentVoice.staffscale && (t.staffscale = d.currentVoice.staffscale), d.currentVoice.scale && (t.scale = d.currentVoice.scale), d.currentVoice.style && (t.style = d.currentVoice.style), d.currentVoice.transpose && (t.clef.transpose = d.currentVoice.transpose) + } + var l = void 0 === d.currentVoice || 0 === d.currentVoice.staffNum && 0 === d.currentVoice.index; + 0 === d.barNumbers && l && 1 !== d.currBarNumber && (t.barNumber = d.currBarNumber), e.startNewLine(t), d.key.impliedNaturals && delete d.key.impliedNaturals, d.partForNextLine = {} + } + var P = function(e, r) { + if ("{" === e.charAt(r)) { + var i = t.getBrackettedSubstring(e, r, 1, "}"); + i[2] || f("Missing the closing '}' while parsing grace note", e, r), ")" === e[r + i[0]] && (i[0]++, i[1] += ")"); + for (var a = [], n = 0, s = !1; n < i[1].length;) { + var o = !1; + "/" === i[1].charAt(n) && (o = !0, n++); + var c = M(i[1], n, {}, !1); + null !== c ? (c.duration = c.duration / (8 * d.default_length), o && (c.acciaccatura = !0), a.push(c), s && (c.endTie = !0, s = !1), c.startTie && (s = !0), n = c.endChar, delete c.endChar) : (" " === i[1].charAt(n) ? a.length > 0 && (a[a.length - 1].end_beam = !0) : f("Unknown character '" + i[1].charAt(n) + "' while parsing grace note", e, r), n++) + } + if (a.length) return [i[0], a] + } + return [0] + }; + + function H(e, t) { + if ("&" === e.charAt(t)) { + for (var r = t; e.charAt(t) && ":" !== e.charAt(t) && "|" !== e.charAt(t);) t++; + return [t - r, e.substring(r + 1, t)] + } + return [0] + } + + function q(e) { + var t = e.origMeter; + return t && "specified" === t.type && t.value && 0 !== t.value.length ? parseInt(t.value[0].num, 10) / parseInt(t.value[0].den, 10) : 1 + } + var D = function(e, t, r) { + if (void 0 === e.inTie[t]) return !1; + var i = e.currentVoice ? e.currentVoice.index : 0; + return !(!e.inTie[t][i] || void 0 === r.pitches && "spacer" === r.rest.type) + }, + I = function(e, t, r) { + var i = e.currentVoice ? e.currentVoice.index : 0; + void 0 === e.inTie[t] && (e.inTie[t] = []), e.inTie[t][i] = r + }, + z = function(r) { + var a = m.parseHeader(r); + a.regular && function(r) { + m.resolveTempo(), d.is_in_header = !1; + for (var a = 0, n = d.iChar; t.isWhiteSpace(r.charAt(a)) && a < r.length;) a++; + if (a !== r.length && "%" !== r.charAt(a)) { + var s = d.start_new_line; + void 0 === d.continueall ? d.start_new_line = !0 : d.start_new_line = !1; + var o = 0, + c = m.letter_to_body_header(r, a); + c[0] > 0 && (a += c[0], "V" === c[1] && (s = !0)); + for (var l = {}, h = 0; a < r.length;) { + var u = a; + if ("%" === r.charAt(a)) break; + var p = m.letter_to_inline_header(r, a); + if (p[0] > 0) a += p[0], "V" === p[1] && (s = !0); + else { + var v; + for (s && (L(), s = !1);;) + if ((v = t.eatWhiteSpace(r, a)) > 0 && (a += v), a > 0 && "" === r.charAt(a - 1) && (v = m.letter_to_body_header(r, a))[0] > 0 && ("V" === v[1] && L(), a = v[0], d.start_new_line = !1), (v = S(r, a))[0] > 0 && (a += v[0]), (v = g(r, a))[0] > 0) { + l.chord || (l.chord = []); + var b = t.translateString(v[1]); + b = b.replace(/;/g, "\n"); + for (var y = !1, w = 0; w < l.chord.length; w++) l.chord[w].position === v[2] && (y = !0, l.chord[w].name += "\n" + b); + !1 === y && (null === v[2] && v[3] ? l.chord.push({ + name: b, + rel_position: v[3] + }) : l.chord.push({ + name: b, + position: v[2] + })), a += v[0]; + var k = t.skipWhiteSpace(r.substring(a)); + k > 0 && (l.force_end_beam_last = !0), a += k + } else if ((v = -1 === "ABCDEFGabcdefgxyzZ[]|^_{".indexOf(r.charAt(a)) ? x(r, a) : [0])[0] > 0) null === v[1] ? a + 1 < r.length && L() : v[1].length > 0 && (0 === v[1].indexOf("style=") ? l.style = v[1].substr(6) : (void 0 === l.decoration && (l.decoration = []), l.decoration.push(v[1]))), a += v[0]; + else { + if (!((v = P(r, a))[0] > 0)) break; + l.gracenotes = v[1], a += v[0] + } + if ((v = A(r, a))[0] > 0) { + h = 0, void 0 !== l.gracenotes && (l.rest = { + type: "spacer" + }, l.duration = .125, d.addFormattingOptions(l, e.formatting, "note"), e.appendElement("note", n + a, n + a + v[0], l), d.measureNotEmpty = !0, l = {}); + var T = { + type: v[1] + }; + if (0 === T.type.length) f("Unknown bar type", r, a); + else { + if (d.inEnding && "bar_thin" !== T.type && (T.endEnding = !0, d.inEnding = !1), v[2] && (T.startEnding = v[2], d.inEnding && (T.endEnding = !0), d.inEnding = !0), void 0 !== l.decoration && (T.decoration = l.decoration), void 0 !== l.chord && (T.chord = l.chord), T.startEnding && void 0 === d.barFirstEndingNum ? d.barFirstEndingNum = d.currBarNumber : T.startEnding && T.endEnding && d.barFirstEndingNum ? d.currBarNumber = d.barFirstEndingNum : T.endEnding && (d.barFirstEndingNum = void 0), "bar_invisible" !== T.type && d.measureNotEmpty)(void 0 === d.currentVoice || 0 === d.currentVoice.staffNum && 0 === d.currentVoice.index) && (d.currBarNumber++, d.barNumbers && d.currBarNumber % d.barNumbers == 0 && (T.barNumber = d.currBarNumber)); + d.addFormattingOptions(l, e.formatting, "bar"), e.appendElement("bar", n + a, n + a + v[0], T), d.measureNotEmpty = !1, l = {} + } + a += v[0]; + d.currentVoice && (d.currentVoice.staffNum, d.currentVoice.index) + } else if ("&" === r[a])(v = H(r, a))[0] > 0 && (e.appendElement("overlay", n, n + 1, {}), a += 1, h++); + else { + if ((v = C(r, a)).consumed > 0 && (void 0 !== v.startSlur && (l.startSlur = v.startSlur), void 0 !== v.triplet && (o > 0 ? f("Can't nest triplets", r, a) : (l.startTriplet = v.triplet, l.tripletMultiplier = v.tripletQ / v.triplet, o = void 0 === v.num_notes ? v.triplet : v.num_notes)), a += v.consumed), "[" === r.charAt(a)) { + var E = a; + a++; + for (var B = null, z = !1, O = !1; !O;) { + var R = x(r, a); + R[0] > 0 && (a += R[0]); + var V = M(r, a, {}, !1); + if (null !== V) R[0] > 0 && 0 !== R[1].indexOf("style=") && (void 0 === l.decoration && (l.decoration = []), l.decoration.push(R[1])), V.end_beam && (l.end_beam = !0, delete V.end_beam), void 0 === l.pitches ? (l.duration = V.duration, l.pitches = [V]) : l.pitches.push(V), delete V.duration, R[0] > 0 && 0 === R[1].indexOf("style=") && (l.pitches[l.pitches.length - 1].style = R[1].substr(6)), d.inTieChord[l.pitches.length] && (V.endTie = !0, d.inTieChord[l.pitches.length] = void 0), V.startTie && (d.inTieChord[l.pitches.length] = !0), a = V.endChar, delete V.endChar; + else if (" " === r.charAt(a)) f("Spaces are not allowed in chords", r, a), a++; + else { + if (a < r.length && "]" === r.charAt(a)) { + a++, 0 !== d.next_note_duration && (l.duration = l.duration * d.next_note_duration, d.next_note_duration = 0), D(d, h, l) && (i.each(l.pitches, (function(e) { + e.endTie = !0 + })), I(d, h, !1)), o > 0 && 0 === --o && (l.endTriplet = !0); + for (var F = !1; a < r.length && !F;) { + switch (r.charAt(a)) { + case " ": + case "\t": + N(l); + break; + case ")": + void 0 === l.endSlur ? l.endSlur = 1 : l.endSlur++; + break; + case "-": + i.each(l.pitches, (function(e) { + e.startTie = {} + })), I(d, h, !0); + break; + case ">": + case "<": + var G = _(r, a); + a += G[0] - 1, d.next_note_duration = G[2], B ? B *= G[1] : B = G[1]; + break; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + case "/": + var j = t.getFraction(r, a); + B = j.value, a = j.index, " " === r.charAt(a) && (z = !0), "-" === r.charAt(a) || ")" === r.charAt(a) || " " === r.charAt(a) || "<" === r.charAt(a) || ">" === r.charAt(a) ? a-- : F = !0; + break; + default: + F = !0 + } + F || a++ + } + } else f("Expected ']' to end the chords", r, a); + void 0 !== l.pitches && (null !== B && (l.duration = l.duration * B, z && N(l)), d.addFormattingOptions(l, e.formatting, "note"), e.appendElement("note", n + E, n + a, l), d.measureNotEmpty = !0, l = {}), O = !0 + } + } + } else { + var Y = {}, + U = M(r, a, Y, !0); + void 0 !== Y.endTie && I(d, h, !0), null !== U && (void 0 !== U.pitch ? (l.pitches = [{}], void 0 !== U.accidental && (l.pitches[0].accidental = U.accidental), l.pitches[0].pitch = U.pitch, U.midipitch && (l.pitches[0].midipitch = U.midipitch), void 0 !== U.endSlur && (l.pitches[0].endSlur = U.endSlur), void 0 !== U.endTie && (l.pitches[0].endTie = U.endTie), void 0 !== U.startSlur && (l.pitches[0].startSlur = U.startSlur), void 0 !== l.startSlur && (l.pitches[0].startSlur = l.startSlur), void 0 !== U.startTie && (l.pitches[0].startTie = U.startTie), void 0 !== l.startTie && (l.pitches[0].startTie = l.startTie)) : (l.rest = U.rest, void 0 !== U.endSlur && (l.endSlur = U.endSlur), void 0 !== U.endTie && (l.rest.endTie = U.endTie), void 0 !== U.startSlur && (l.startSlur = U.startSlur), void 0 !== U.startTie && (l.rest.startTie = U.startTie), void 0 !== l.startTie && (l.rest.startTie = l.startTie)), void 0 !== U.chord && (l.chord = U.chord), void 0 !== U.duration && (l.duration = U.duration), void 0 !== U.decoration && (l.decoration = U.decoration), void 0 !== U.graceNotes && (l.graceNotes = U.graceNotes), delete l.startSlur, D(d, h, l) && (void 0 !== l.pitches ? l.pitches[0].endTie = !0 : "spacer" !== l.rest.type && (l.rest.endTie = !0), I(d, h, !1)), (U.startTie || l.startTie) && I(d, h, !0), a = U.endChar, o > 0 && 0 === --o && (l.endTriplet = !0), U.end_beam && N(l), l.rest && "rest" === l.rest.type && 1 === l.duration && q(d) <= 1 && (l.rest.type = "whole", l.duration = q(d)), d.addFormattingOptions(l, e.formatting, "note"), e.appendElement("note", n + u, n + a, l), d.measureNotEmpty = !0, l = {}) + } + a === u && (" " !== r.charAt(a) && "`" !== r.charAt(a) && f("Unknown character ignored", r, a), a++) + } + } + } + } + }(a.str), a.newline && L(), a.words && function(e, r) { + if (e) { + "-" !== (r = i.strip(r)).charAt(r.length - 1) && (r += " "); + for (var a = [], n = 0, s = !1, o = function(e) { + var o = i.strip(r.substring(n, e)); + if (n = e + 1, o.length > 0) { + s && (o = i.gsub(o, "~", " ")); + var c = r.charAt(e); + return "_" !== c && "-" !== c && (c = " "), a.push({ + syllable: t.translateString(o), + divider: c + }), s = !1, !0 + } + return !1 + }, c = 0; c < r.length; c++) switch (r.charAt(c)) { + case " ": + case "": + o(c); + break; + case "-": + !o(c) && a.length > 0 && (i.last(a).divider = "-", a.push({ + skip: !0, + to: "next" + })); + break; + case "_": + o(c), a.push({ + skip: !0, + to: "slur" + }); + break; + case "*": + o(c), a.push({ + skip: !0, + to: "next" + }); + break; + case "|": + o(c), a.push({ + skip: !0, + to: "bar" + }); + break; + case "~": + s = !0 + } + i.each(e, (function(e) { + if (0 !== a.length) + if (a[0].skip) { + switch (a[0].to) { + case "next": + case "slur": + "note" === e.el_type && null !== e.pitches && a.shift(); + break; + case "bar": + "bar" === e.el_type && a.shift() + } + "bar" !== e.el_type && (void 0 === e.lyric ? e.lyric = [{ + syllable: "", + divider: " " + }] : e.lyric.push({ + syllable: "", + divider: " " + })) + } else if ("note" === e.el_type && void 0 === e.rest) { + var t = a.shift(); + t.syllable && (t.syllable = t.syllable.replace(/ +/g, " ")), void 0 === e.lyric ? e.lyric = [t] : e.lyric.push(t) + } + })) + } else f("Can't add words before the first line of music", e, 0) + }(e.getCurrentVoice(), r.substring(2)), a.symbols && function(e, r) { + if (e) { + "-" !== (r = i.strip(r)).charAt(r.length - 1) && (r += " "); + for (var a = [], n = 0, s = !1, o = function(e) { + var o = i.strip(r.substring(n, e)); + if (n = e + 1, o.length > 0) { + s && (o = i.gsub(o, "~", " ")); + var c = r.charAt(e); + return "_" !== c && "-" !== c && (c = " "), a.push({ + syllable: t.translateString(o), + divider: c + }), s = !1, !0 + } + return !1 + }, c = 0; c < r.length; c++) switch (r.charAt(c)) { + case " ": + case "": + o(c); + break; + case "-": + !o(c) && a.length > 0 && (i.last(a).divider = "-", a.push({ + skip: !0, + to: "next" + })); + break; + case "_": + o(c), a.push({ + skip: !0, + to: "slur" + }); + break; + case "*": + o(c), a.push({ + skip: !0, + to: "next" + }); + break; + case "|": + o(c), a.push({ + skip: !0, + to: "bar" + }); + break; + case "~": + s = !0 + } + i.each(e, (function(e) { + if (0 !== a.length) + if (a[0].skip) switch (a[0].to) { + case "next": + case "slur": + "note" === e.el_type && null !== e.pitches && a.shift(); + break; + case "bar": + "bar" === e.el_type && a.shift() + } else if ("note" === e.el_type && void 0 === e.rest) { + var t = a.shift(); + void 0 === e.lyric ? e.lyric = [t] : e.lyric.push(t) + } + })) + } else f("Can't add symbols before the first line of music", e, 0) + }(e.getCurrentVoice(), r.substring(2)), a.recurse && z(a.str) + }; + + function O(e, t) { + e.push({ + el_type: "hint" + }); + for (var r = 0; r < t.length; r++) { + var a = t[r], + n = i.clone(a); + if (e.push(n), "bar" === a.el_type) return + } + } + + function R(e, t) { + for (var r = 0; r < e.length; r++) { + var i = e[r], + a = t[r]; + if (a) + for (var n = 0; n < a.voices.length; n++) { + var s = a.voices[n], + o = i.voices[n]; + o && O(o, s) + } + } + } + this.parse = function(r, n, s) { + if (n || (n = {}), s || (s = 0), e.reset(), n.print && (e.media = "print"), d.reset(), d.iChar = s, n.visualTranspose ? (d.globalTranspose = parseInt(n.visualTranspose), 0 === d.globalTranspose && (d.globalTranspose = void 0)) : d.globalTranspose = void 0, n.lineBreaks) { + d.lineBreaks = {}; + for (var o = 0; o < n.lineBreaks.length; o++) d.lineBreaks["" + (n.lineBreaks[o] + 1)] = !0 + } + m.reset(t, f, d, e), r = i.gsub(r, "\r\n", "\n"), r = i.gsub(r, "\r", "\n"); + var c = (r = (r = (r += "\n").replace(/\n\\.*\n/g, "\n")).replace(/\\([ \t]*)(%.*)*\n/g, (function(e, t, r) { + return t + " " + (r ? " ".substring(0, r.length) : "") + }))).split("\n"); + 0 === i.last(c).length && c.pop(); + try { + n.format && a.globalFormatting(n.format), i.each(c, (function(r) { + if (n.header_only && !1 === d.is_in_header) throw "normal_abort"; + if (n.stop_on_warning && d.warnings) throw "normal_abort"; + d.is_in_history ? ":" === r.charAt(1) ? (d.is_in_history = !1, z(r)) : e.addMetaText("history", t.translateString(t.stripComment(r))) : d.inTextBlock ? i.startsWith(r, "%%endtext") ? (e.addText(d.textBlock), d.inTextBlock = !1) : i.startsWith(r, "%%") ? d.textBlock += " " + r.substring(2) : d.textBlock += " " + r : d.inPsBlock ? i.startsWith(r, "%%endps") ? d.inPsBlock = !1 : d.textBlock += " " + r : z(r), d.iChar += r.length + 1 + })); + var h = 792, + u = 612; + switch (d.papersize) { + case "legal": + h = 1008, u = 612; + break; + case "A4": + h = 842.4, u = 597.6 + } + if (d.landscape) { + var p = h; + h = u, u = p + } + d.openSlurs = e.cleanUp(u, h, d.barsperstaff, d.staffnonote, d.openSlurs) + } catch (e) { + if ("normal_abort" !== e) throw e + } + n.hint_measures && function() { + for (var t = 0; t < e.lines.length; t++) { + var r = e.lines[t].staff; + if (r) { + for (var i = t + 1; i < e.lines.length && void 0 === e.lines[i].staff;) i++; + if (i < e.lines.length) R(r, e.lines[i].staff) + } + } + }(), l.wrapLines(e, d.lineBreaks) + } + } +}, function(e, t, r) { + var i = r(0), + a = {}; + ! function() { + "use strict"; + var e, t, r, n; + a.initialize = function(i, a, s, o) { + e = i, t = a, n = o, (r = s).annotationfont = { + face: "Helvetica", + size: 12, + weight: "normal", + style: "normal", + decoration: "none" + }, r.gchordfont = { + face: "Helvetica", + size: 12, + weight: "normal", + style: "normal", + decoration: "none" + }, r.historyfont = { + face: '"Times New Roman"', + size: 16, + weight: "normal", + style: "normal", + decoration: "none" + }, r.infofont = { + face: '"Times New Roman"', + size: 14, + weight: "normal", + style: "italic", + decoration: "none" + }, r.measurefont = { + face: '"Times New Roman"', + size: 14, + weight: "normal", + style: "italic", + decoration: "none" + }, r.partsfont = { + face: '"Times New Roman"', + size: 15, + weight: "normal", + style: "normal", + decoration: "none" + }, r.repeatfont = { + face: '"Times New Roman"', + size: 13, + weight: "normal", + style: "normal", + decoration: "none" + }, r.textfont = { + face: '"Times New Roman"', + size: 16, + weight: "normal", + style: "normal", + decoration: "none" + }, r.tripletfont = { + face: "Times", + size: 11, + weight: "normal", + style: "italic", + decoration: "none" + }, r.vocalfont = { + face: '"Times New Roman"', + size: 13, + weight: "bold", + style: "normal", + decoration: "none" + }, r.wordsfont = { + face: '"Times New Roman"', + size: 16, + weight: "normal", + style: "normal", + decoration: "none" + }, n.formatting.composerfont = { + face: '"Times New Roman"', + size: 14, + weight: "normal", + style: "italic", + decoration: "none" + }, n.formatting.subtitlefont = { + face: '"Times New Roman"', + size: 16, + weight: "normal", + style: "normal", + decoration: "none" + }, n.formatting.tempofont = { + face: '"Times New Roman"', + size: 15, + weight: "bold", + style: "normal", + decoration: "none" + }, n.formatting.titlefont = { + face: '"Times New Roman"', + size: 20, + weight: "normal", + style: "normal", + decoration: "none" + }, n.formatting.footerfont = { + face: '"Times New Roman"', + size: 12, + weight: "normal", + style: "normal", + decoration: "none" + }, n.formatting.headerfont = { + face: '"Times New Roman"', + size: 12, + weight: "normal", + style: "normal", + decoration: "none" + }, n.formatting.voicefont = { + face: '"Times New Roman"', + size: 13, + weight: "bold", + style: "normal", + decoration: "none" + }, n.formatting.annotationfont = r.annotationfont, n.formatting.gchordfont = r.gchordfont, n.formatting.historyfont = r.historyfont, n.formatting.infofont = r.infofont, n.formatting.measurefont = r.measurefont, n.formatting.partsfont = r.partsfont, n.formatting.repeatfont = r.repeatfont, n.formatting.textfont = r.textfont, n.formatting.tripletfont = r.tripletfont, n.formatting.vocalfont = r.vocalfont, n.formatting.wordsfont = r.wordsfont + }; + var s = { + gchordfont: !0, + measurefont: !0, + partsfont: !0 + }, + o = function(e, r, i, a, n) { + function o() { + var o = parseInt(e[0].token); + return e.shift(), r ? 0 === e.length ? { + face: r.face, + weight: r.weight, + style: r.style, + decoration: r.decoration, + size: o + } : 1 === e.length && "box" === e[0].token && s[n] ? { + face: r.face, + weight: r.weight, + style: r.style, + decoration: r.decoration, + size: o, + box: !0 + } : (t("Extra parameters in font definition.", i, a), { + face: r.face, + weight: r.weight, + style: r.style, + decoration: r.decoration, + size: o + }) : (t("Can't set just the size of the font since there is no default value.", i, a), { + face: '"Times New Roman"', + weight: "normal", + style: "normal", + decoration: "none", + size: o + }) + } + if ("*" === e[0].token) { + if (e.shift(), "number" === e[0].type) return o(); + t("Expected font size number after *.", i, a) + } + if ("number" === e[0].type) return o(); + for (var c, l = [], h = "normal", u = "normal", d = "none", p = !1, f = "face", m = !1; e.length;) { + var g = e.shift(), + v = g.token.toLowerCase(); + switch (f) { + case "face": + m || "utf" !== v && "number" !== g.type && "bold" !== v && "italic" !== v && "underline" !== v && "box" !== v ? l.length > 0 && "-" === g.token ? (m = !0, l[l.length - 1] = l[l.length - 1] + g.token) : m ? (m = !1, l[l.length - 1] = l[l.length - 1] + g.token) : l.push(g.token) : "number" === g.type ? (c ? t("Font size specified twice in font definition.", i, a) : c = g.token, f = "modifier") : "bold" === v ? h = "bold" : "italic" === v ? u = "italic" : "underline" === v ? d = "underline" : "box" === v ? (s[n] ? p = !0 : t('This font style doesn\'t support "box"', i, a), f = "finished") : "utf" === v ? (g = e.shift(), f = "size") : t("Unknown parameter " + g.token + " in font definition.", i, a); + break; + case "size": + "number" === g.type ? c ? t("Font size specified twice in font definition.", i, a) : c = g.token : t("Expected font size in font definition.", i, a), f = "modifier"; + break; + case "modifier": + "bold" === v ? h = "bold" : "italic" === v ? u = "italic" : "underline" === v ? d = "underline" : "box" === v ? (s[n] ? p = !0 : t('This font style doesn\'t support "box"', i, a), f = "finished") : t("Unknown parameter " + g.token + " in font definition.", i, a); + break; + case "finished": + t('Extra characters found after "box" in font definition.', i, a) + } + } + void 0 === c ? r ? c = r.size : (t("Must specify the size of the font since there is no default value.", i, a), c = 12) : c = parseFloat(c); + var b = function(e) { + switch (e) { + case "Arial-Italic": + return { + face: "Arial", weight: "normal", style: "italic", decoration: "none" + }; + case "Arial-Bold": + return { + face: "Arial", weight: "bold", style: "normal", decoration: "none" + }; + case "Bookman-Demi": + return { + face: "Bookman,serif", weight: "bold", style: "normal", decoration: "none" + }; + case "Bookman-DemiItalic": + return { + face: "Bookman,serif", weight: "bold", style: "italic", decoration: "none" + }; + case "Bookman-Light": + return { + face: "Bookman,serif", weight: "normal", style: "normal", decoration: "none" + }; + case "Bookman-LightItalic": + return { + face: "Bookman,serif", weight: "normal", style: "italic", decoration: "none" + }; + case "Courier": + return { + face: '"Courier New"', weight: "normal", style: "normal", decoration: "none" + }; + case "Courier-Oblique": + return { + face: '"Courier New"', weight: "normal", style: "italic", decoration: "none" + }; + case "Courier-Bold": + return { + face: '"Courier New"', weight: "bold", style: "normal", decoration: "none" + }; + case "Courier-BoldOblique": + return { + face: '"Courier New"', weight: "bold", style: "italic", decoration: "none" + }; + case "AvantGarde-Book": + return { + face: "AvantGarde,Arial", weight: "normal", style: "normal", decoration: "none" + }; + case "AvantGarde-BookOblique": + return { + face: "AvantGarde,Arial", weight: "normal", style: "italic", decoration: "none" + }; + case "AvantGarde-Demi": + case "Avant-Garde-Demi": + return { + face: "AvantGarde,Arial", weight: "bold", style: "normal", decoration: "none" + }; + case "AvantGarde-DemiOblique": + return { + face: "AvantGarde,Arial", weight: "bold", style: "italic", decoration: "none" + }; + case "Helvetica-Oblique": + return { + face: "Helvetica", weight: "normal", style: "italic", decoration: "none" + }; + case "Helvetica-Bold": + return { + face: "Helvetica", weight: "bold", style: "normal", decoration: "none" + }; + case "Helvetica-BoldOblique": + return { + face: "Helvetica", weight: "bold", style: "italic", decoration: "none" + }; + case "Helvetica-Narrow": + return { + face: '"Helvetica Narrow",Helvetica', weight: "normal", style: "normal", decoration: "none" + }; + case "Helvetica-Narrow-Oblique": + return { + face: '"Helvetica Narrow",Helvetica', weight: "normal", style: "italic", decoration: "none" + }; + case "Helvetica-Narrow-Bold": + return { + face: '"Helvetica Narrow",Helvetica', weight: "bold", style: "normal", decoration: "none" + }; + case "Helvetica-Narrow-BoldOblique": + return { + face: '"Helvetica Narrow",Helvetica', weight: "bold", style: "italic", decoration: "none" + }; + case "Palatino-Roman": + return { + face: "Palatino", weight: "normal", style: "normal", decoration: "none" + }; + case "Palatino-Italic": + return { + face: "Palatino", weight: "normal", style: "italic", decoration: "none" + }; + case "Palatino-Bold": + return { + face: "Palatino", weight: "bold", style: "normal", decoration: "none" + }; + case "Palatino-BoldItalic": + return { + face: "Palatino", weight: "bold", style: "italic", decoration: "none" + }; + case "NewCenturySchlbk-Roman": + return { + face: '"New Century",serif', weight: "normal", style: "normal", decoration: "none" + }; + case "NewCenturySchlbk-Italic": + return { + face: '"New Century",serif', weight: "normal", style: "italic", decoration: "none" + }; + case "NewCenturySchlbk-Bold": + return { + face: '"New Century",serif', weight: "bold", style: "normal", decoration: "none" + }; + case "NewCenturySchlbk-BoldItalic": + return { + face: '"New Century",serif', weight: "bold", style: "italic", decoration: "none" + }; + case "Times": + case "Times-Roman": + case "Times-Narrow": + case "Times-Courier": + case "Times-New-Roman": + return { + face: '"Times New Roman"', weight: "normal", style: "normal", decoration: "none" + }; + case "Times-Italic": + case "Times-Italics": + return { + face: '"Times New Roman"', weight: "normal", style: "italic", decoration: "none" + }; + case "Times-Bold": + return { + face: '"Times New Roman"', weight: "bold", style: "normal", decoration: "none" + }; + case "Times-BoldItalic": + return { + face: '"Times New Roman"', weight: "bold", style: "italic", decoration: "none" + }; + case "ZapfChancery-MediumItalic": + return { + face: '"Zapf Chancery",cursive,serif', weight: "normal", style: "normal", decoration: "none" + }; + default: + return null + } + }(l = l.join(" ")), + y = {}; + return b ? (y.face = b.face, y.weight = b.weight, y.style = b.style, y.decoration = b.decoration, y.size = c, p && (y.box = !0), y) : (y.face = l, y.weight = h, y.style = u, y.decoration = d, y.size = c, p && (y.box = !0), y) + }, + c = function(e, t, i) { + return 0 === t.length ? 'Directive "' + e + '" requires a font as a parameter.' : (r[e] = o(t, r[e], i, 0, e), r.is_in_header && (n.formatting[e] = r[e]), null) + }, + l = function(e, t) { + var r = ""; + i.each(t, (function(e) { + r += e.token + })); + var a = parseFloat(r); + if (isNaN(a) || 0 === a) return 'Directive "' + e + '" requires a number as a parameter.'; + n.formatting.scale = a + }, + h = function(e, t, i, a, n) { + if (1 !== i.length || "number" !== i[0].type) return 'Directive "' + t + '" requires a number as a parameter.'; + var s = i[0].intt; + return void 0 !== a && s < a ? 'Directive "' + t + '" requires a number greater than or equal to ' + a + " as a parameter." : void 0 !== n && s > n ? 'Directive "' + t + '" requires a number less than or equal to ' + n + " as a parameter." : (r[e] = s, null) + }, + u = function(e, t, i) { + if (1 === i.length && ("true" === i[0].token || "false" === i[0].token)) return r[e] = "true" === i[0].token, null; + var a = h(e, t, i, 0, 1); + return null !== a ? a : (r[e] = 1 === r[e], null) + }, + d = function(e, t, i, a) { + if (1 !== i.length) return 'Directive "' + t + '" requires one of [ ' + a.join(", ") + " ] as a parameter."; + for (var n = i[0].token, s = !1, o = 0; !s && o < a.length; o++) a[o] === n && (s = !0); + return s ? (r[e] = n, null) : 'Directive "' + t + '" requires one of [ ' + a.join(", ") + " ] as a parameter." + }, + p = ["nobarlines", "barlines", "beataccents", "nobeataccents", "droneon", "droneoff", "drumon", "drumoff", "fermatafixed", "fermataproportional", "gchordon", "gchordoff", "controlcombo", "temperamentnormal", "noportamento"], + f = ["gchord", "ptstress", "beatstring"], + m = ["bassvol", "chordvol", "c", "channel", "beatmod", "deltaloudness", "drumbars", "gracedivider", "makechordchannels", "randomchordattack", "chordattack", "stressmodel", "transpose", "rtranspose", "vol", "volinc"], + g = ["program"], + v = ["ratio", "snt", "bendvelocity", "pitchbend", "control", "temperamentlinear"], + b = ["beat"], + y = ["drone"], + w = ["portamento"], + k = ["expand", "grace", "trim"], + x = ["drum", "chordname"]; + a.parseFontChangeLine = function(e) { + var t = e.split("$"); + if (t.length > 1 && r.setfont) { + for (var i = [{ + text: t[0] + }], a = 1; a < t.length; a++) "0" === t[a].charAt(0) ? i.push({ + text: t[a].substring(1) + }) : "1" === t[a].charAt(0) && r.setfont[1] ? i.push({ + font: r.setfont[1], + text: t[a].substring(1) + }) : "2" === t[a].charAt(0) && r.setfont[2] ? i.push({ + font: r.setfont[2], + text: t[a].substring(1) + }) : "3" === t[a].charAt(0) && r.setfont[3] ? i.push({ + font: r.setfont[3], + text: t[a].substring(1) + }) : "4" === t[a].charAt(0) && r.setfont[4] ? i.push({ + font: r.setfont[4], + text: t[a].substring(1) + }) : i[i.length - 1].text += "$" + t[a]; + if (i.length > 1) return i + } + return e + }; + var S = ["auto", "above", "below", "hidden"]; + a.addDirective = function(s) { + var A = e.tokenize(s, 0, s.length); + if (0 === A.length || "alpha" !== A[0].type) return null; + var T = s.substring(s.indexOf(A[0].token) + A[0].token.length); + T = e.stripComment(T); + var C = A.shift().token.toLowerCase(), + _ = ""; + switch (C) { + case "bagpipes": + n.formatting.bagpipes = !0; + break; + case "flatbeams": + n.formatting.flatbeams = !0; + break; + case "landscape": + r.landscape = !0; + break; + case "papersize": + r.papersize = T; + break; + case "slurgraces": + n.formatting.slurgraces = !0; + break; + case "stretchlast": + n.formatting.stretchlast = !0; + break; + case "titlecaps": + r.titlecaps = !0; + break; + case "titleleft": + n.formatting.titleleft = !0; + break; + case "measurebox": + n.formatting.measurebox = !0; + break; + case "vocal": + return d("vocalPosition", C, A, S); + case "dynamic": + return d("dynamicPosition", C, A, S); + case "gchord": + return d("chordPosition", C, A, S); + case "ornament": + return d("ornamentPosition", C, A, S); + case "volume": + return d("volumePosition", C, A, S); + case "botmargin": + case "botspace": + case "composerspace": + case "indent": + case "leftmargin": + case "linesep": + case "musicspace": + case "partsspace": + case "pageheight": + case "pagewidth": + case "rightmargin": + case "staffsep": + case "staffwidth": + case "subtitlespace": + case "sysstaffsep": + case "systemsep": + case "textspace": + case "titlespace": + case "topmargin": + case "topspace": + case "vocalspace": + case "wordsspace": + return function(t, r) { + var i = e.getMeasurement(r); + return 0 === i.used || 0 !== r.length ? 'Directive "' + t + '" requires a measurement as a parameter.' : (n.formatting[t] = i.value, null) + }(C, A); + case "voicescale": + if (1 !== A.length || "number" !== A[0].type) return "voicescale requires one float as a parameter"; + var N = A.shift(); + return r.currentVoice && (r.currentVoice.scale = N.floatt, n.changeVoiceScale(r.currentVoice.scale)), null; + case "vskip": + var E = function(t, r) { + var i = e.getMeasurement(r); + return 0 === i.used || 0 !== r.length ? { + error: 'Directive "' + t + '" requires a measurement as a parameter.' + } : i.value + }(C, A); + return E.error ? E.error : (n.addSpacing(E), null); + case "scale": + l(C, A); + break; + case "sep": + if (0 === A.length) n.addSeparator(); + else { + var B = e.getMeasurement(A); + if (0 === B.used) return 'Directive "' + C + '" requires 3 numbers: space above, space below, length of line'; + var M = B.value; + if (0 === (B = e.getMeasurement(A)).used) return 'Directive "' + C + '" requires 3 numbers: space above, space below, length of line'; + var L = B.value; + if (0 === (B = e.getMeasurement(A)).used || 0 !== A.length) return 'Directive "' + C + '" requires 3 numbers: space above, space below, length of line'; + var P = B.value; + n.addSeparator(M, L, P) + } + break; + case "barsperstaff": + if (null !== (_ = h("barsperstaff", C, A))) return _; + break; + case "staffnonote": + if (1 !== A.length) return "Directive staffnonote requires one parameter: 0 or 1"; + if ("0" === A[0].token) r.staffnonote = !0; + else { + if ("1" !== A[0].token) return "Directive staffnonote requires one parameter: 0 or 1 (received " + A[0].token + ")"; + r.staffnonote = !1 + } + break; + case "printtempo": + if (null !== (_ = u("printTempo", C, A))) return _; + break; + case "partsbox": + if (null !== (_ = u("partsBox", C, A))) return _; + r.partsfont.box = r.partsBox; + break; + case "freegchord": + if (null !== (_ = u("freegchord", C, A))) return _; + break; + case "measurenb": + case "barnumbers": + if (null !== (_ = h("barNumbers", C, A))) return _; + break; + case "setbarnb": + if (1 !== A.length || "number" !== A[0].type) return "Directive setbarnb requires a number as a parameter."; + r.currBarNumber = n.setBarNumberImmediate(A[0].intt); + break; + case "begintext": + r.inTextBlock = !0; + break; + case "continueall": + r.continueall = !0; + break; + case "beginps": + r.inPsBlock = !0, t("Postscript ignored", s, 0); + break; + case "deco": + T.length > 0 && r.ignoredDecorations.push(T.substring(0, T.indexOf(" "))), t("Decoration redefinition ignored", s, 0); + break; + case "text": + var H = e.translateString(T); + n.addText(a.parseFontChangeLine(H)); + break; + case "center": + var q = e.translateString(T); + n.addCentered(a.parseFontChangeLine(q)); + break; + case "font": + break; + case "setfont": + var D = e.tokenize(T, 0, T.length); + if (D.length >= 4 && "-" === D[0].token && "number" === D[1].type) { + var I = parseInt(D[1].token); + I >= 1 && I <= 4 && (r.setfont || (r.setfont = []), D.shift(), D.shift(), r.setfont[I] = o(D, r.setfont[I], s, 0, "setfont")) + } + break; + case "gchordfont": + case "partsfont": + case "tripletfont": + case "vocalfont": + case "textfont": + case "annotationfont": + case "historyfont": + case "infofont": + case "measurefont": + case "repeatfont": + case "wordsfont": + return c(C, A, s); + case "composerfont": + case "subtitlefont": + case "tempofont": + case "titlefont": + case "voicefont": + case "footerfont": + case "headerfont": + return function(e, t, r) { + return 0 === t.length ? 'Directive "' + e + '" requires a font as a parameter.' : (n.formatting[e] = o(t, n.formatting[e], r, 0, e), null) + }(C, A, s); + case "barlabelfont": + case "barnumberfont": + case "barnumfont": + return c("measurefont", A, s); + case "staves": + case "score": + r.score_is_present = !0; + for (var z, O = function(e, t, a, n, s) { + (t || 0 === r.staves.length) && r.staves.push({ + index: r.staves.length, + numVoices: 0 + }); + var o = i.last(r.staves); + void 0 !== a && (o.bracket = a), void 0 !== n && (o.brace = n), s && (o.connectBarLines = "end"), void 0 === r.voices[e] && (r.voices[e] = { + staffNum: o.index, + index: o.numVoices + }, o.numVoices++) + }, R = !1, V = !1, F = !1, G = !1, j = !1, Y = !1, U = !1, W = function() { + if (U = !0, z) { + var e = "start"; + z.staffNum > 0 && ("start" !== r.staves[z.staffNum - 1].connectBarLines && "continue" !== r.staves[z.staffNum - 1].connectBarLines || (e = "continue")), r.staves[z.staffNum].connectBarLines = e + } + }; A.length;) { + var X = A.shift(); + switch (X.token) { + case "(": + R ? t("Can't nest parenthesis in %%score", s, X.start) : (R = !0, G = !0); + break; + case ")": + !R || G ? t("Unexpected close parenthesis in %%score", s, X.start) : R = !1; + break; + case "[": + V ? t("Can't nest brackets in %%score", s, X.start) : (V = !0, j = !0); + break; + case "]": + !V || j ? t("Unexpected close bracket in %%score", s, X.start) : (V = !1, r.staves[z.staffNum].bracket = "end"); + break; + case "{": + F ? t("Can't nest braces in %%score", s, X.start) : (F = !0, Y = !0); + break; + case "}": + !F || Y ? t("Unexpected close brace in %%score", s, X.start) : (F = !1, r.staves[z.staffNum].brace = "end"); + break; + case "|": + W(); + break; + default: + for (var K = ""; + ("alpha" === X.type || "number" === X.type) && (K += X.token, X.continueId);) X = A.shift(); + O(K, !R || G, j ? "start" : V ? "continue" : void 0, Y ? "start" : F ? "continue" : void 0, U), G = !1, j = !1, Y = !1, U = !1, z = r.voices[K], "staves" === C && W() + } + } + break; + case "newpage": + var Q = e.getInt(T); + n.addNewPage(0 === Q.digits ? -1 : Q.value); + break; + case "abc": + var Z = T.split(" "); + switch (Z[0]) { + case "-copyright": + case "-creator": + case "-edited-by": + case "-version": + case "-charset": + var J = Z.shift(); + n.addMetaText(C + J, Z.join(" ")); + break; + default: + return "Unknown directive: " + C + Z[0] + } + break; + case "header": + case "footer": + var $ = e.getMeat(T, 0, T.length); + '"' === ($ = T.substring($.start, $.end)).charAt(0) && '"' === $.charAt($.length - 1) && ($ = $.substring(1, $.length - 1)); + var ee = $.split("\t"), + te = {}; + te = 1 === ee.length ? { + left: "", + center: ee[0], + right: "" + } : 2 === ee.length ? { + left: ee[0], + center: ee[1], + right: "" + } : { + left: ee[0], + center: ee[1], + right: ee[2] + }, ee.length > 3 && t("Too many tabs in " + C + ": " + ee.length + " found.", T, 0), n.addMetaTextObj(C, te); + break; + case "midi": + var re = e.tokenize(T, 0, T.length, !0); + re.length > 0 && "=" === re[0].token && re.shift(), 0 === re.length ? t("Expected midi command", T, 0) : function(e, r, i) { + var a = e.shift().token, + n = []; + if (p.indexOf(a) >= 0) 0 !== e.length && t("Unexpected parameter in MIDI " + a, i, 0); + else if (f.indexOf(a) >= 0) 1 !== e.length ? t("Expected one parameter in MIDI " + a, i, 0) : n.push(e[0].token); + else if (m.indexOf(a) >= 0) 1 !== e.length ? t("Expected one parameter in MIDI " + a, i, 0) : "number" !== e[0].type ? t("Expected one integer parameter in MIDI " + a, i, 0) : n.push(e[0].intt); + else if (g.indexOf(a) >= 0) 1 !== e.length && 2 !== e.length ? t("Expected one or two parameters in MIDI " + a, i, 0) : "number" !== e[0].type || 2 === e.length && "number" !== e[1].type ? t("Expected integer parameter in MIDI " + a, i, 0) : (n.push(e[0].intt), 2 === e.length && n.push(e[1].intt)); + else if (v.indexOf(a) >= 0) 2 !== e.length ? t("Expected two parameters in MIDI " + a, i, 0) : "number" !== e[0].type || "number" !== e[1].type ? t("Expected two integer parameters in MIDI " + a, i, 0) : (n.push(e[0].intt), n.push(e[1].intt)); + else if (w.indexOf(a) >= 0) 2 !== e.length ? t("Expected two parameters in MIDI " + a, i, 0) : "alpha" !== e[0].type || "number" !== e[1].type ? t("Expected one string and one integer parameters in MIDI " + a, i, 0) : (n.push(e[0].token), n.push(e[1].intt)); + else if ("drummap" === a) 2 === e.length && "alpha" === e[0].type && "number" === e[1].type ? (r.formatting || (r.formatting = {}), r.formatting.midi || (r.formatting.midi = {}), r.formatting.midi.drummap || (r.formatting.midi.drummap = {}), r.formatting.midi.drummap[e[0].token] = e[1].intt, n = r.formatting.midi.drummap) : 3 === e.length && "punct" === e[0].type && "alpha" === e[1].type && "number" === e[2].type ? (r.formatting || (r.formatting = {}), r.formatting.midi || (r.formatting.midi = {}), r.formatting.midi.drummap || (r.formatting.midi.drummap = {}), r.formatting.midi.drummap[e[0].token + e[1].token] = e[2].intt, n = r.formatting.midi.drummap) : t("Expected one note name and one integer parameter in MIDI " + a, i, 0); + else if (k.indexOf(a) >= 0) 3 !== e.length || "number" !== e[0].type || "/" !== e[1].token || "number" !== e[2].type ? t("Expected fraction parameter in MIDI " + a, i, 0) : (n.push(e[0].intt), n.push(e[2].intt)); + else if (b.indexOf(a) >= 0) 4 !== e.length ? t("Expected four parameters in MIDI " + a, i, 0) : "number" !== e[0].type || "number" !== e[1].type || "number" !== e[2].type || "number" !== e[3].type ? t("Expected four integer parameters in MIDI " + a, i, 0) : (n.push(e[0].intt), n.push(e[1].intt), n.push(e[2].intt), n.push(e[3].intt)); + else if (y.indexOf(a) >= 0) 5 !== e.length ? t("Expected five parameters in MIDI " + a, i, 0) : "number" !== e[0].type || "number" !== e[1].type || "number" !== e[2].type || "number" !== e[3].type || "number" !== e[4].type ? t("Expected five integer parameters in MIDI " + a, i, 0) : (n.push(e[0].intt), n.push(e[1].intt), n.push(e[2].intt), n.push(e[3].intt), n.push(e[4].intt)); + else if (g.indexOf(a) >= 0) 1 !== e.length || 4 !== e.length ? t("Expected one or two parameters in MIDI " + a, i, 0) : "number" !== e[0].type ? t("Expected integer parameter in MIDI " + a, i, 0) : 4 === e.length ? ("octave" !== e[1].token && t("Expected octave parameter in MIDI " + a, i, 0), "=" !== e[2].token && t("Expected octave parameter in MIDI " + a, i, 0), "number" !== e[3].type && t("Expected integer parameter for octave in MIDI " + a, i, 0)) : (n.push(e[0].intt), 4 === e.length && n.push(e[3].intt)); + else if (x.indexOf(a) >= 0) + if (e.length < 2) t("Expected string parameter and at least one integer parameter in MIDI " + a, i, 0); + else if ("alpha" !== e[0].type) t("Expected string parameter and at least one integer parameter in MIDI " + a, i, 0); + else { + var s = e.shift(); + for (n.push(s.token); e.length > 0;) "number" !== (s = e.shift()).type && t("Expected integer parameter in MIDI " + a, i, 0), n.push(s.intt) + } + r.hasBeginMusic() ? r.appendElement("midi", -1, -1, { + cmd: a, + params: n + }) : (void 0 === r.formatting.midi && (r.formatting.midi = {}), r.formatting.midi[a] = n) + }(re, n, T); + break; + case "map": + case "percmap": + case "playtempo": + case "auquality": + case "continuous": + case "nobarcheck": + n.formatting[C] = T; + break; + default: + return "Unknown directive: " + C + } + return null + }, a.globalFormatting = function(i) { + for (var a in i) + if (i.hasOwnProperty(a)) { + var n, s = "" + i[a], + o = e.tokenize(s, 0, s.length); + switch (a) { + case "titlefont": + case "gchordfont": + case "composerfont": + case "footerfont": + case "headerfont": + case "historyfont": + case "infofont": + case "measurefont": + case "partsfont": + case "repeatfont": + case "subtitlefont": + case "tempofont": + case "textfont": + case "voicefont": + case "tripletfont": + case "vocalfont": + case "wordsfont": + case "annotationfont": + c(a, o, s); + break; + case "scale": + l(a, o); + break; + case "partsbox": + null !== (n = u("partsBox", a, o)) && t(n), r.partsfont.box = r.partsBox; + break; + case "freegchord": + null !== (n = u("freegchord", a, o)) && t(n); + default: + t("Formatting directive unrecognized: ", a, 0) + } + } + } + }(), e.exports = a +}, function(e, t, r) { + var i = r(0), + a = r(11), + n = r(17), + s = {}; + ! function() { + var e, t, r, o; + s.initialize = function(i, a, n, s) { + e = i, t = a, r = n, o = s + }, s.standardKey = function(e, t, i, a) { + var s = { + acc: "sharp", + note: "f" + }, + o = { + acc: "sharp", + note: "c" + }, + c = { + acc: "sharp", + note: "g" + }, + l = { + acc: "sharp", + note: "d" + }, + h = { + acc: "sharp", + note: "A" + }, + u = { + acc: "sharp", + note: "e" + }, + d = { + acc: "sharp", + note: "B" + }, + p = { + acc: "flat", + note: "B" + }, + f = { + acc: "flat", + note: "e" + }, + m = { + acc: "flat", + note: "A" + }, + g = { + acc: "flat", + note: "d" + }, + v = { + acc: "flat", + note: "G" + }, + b = { + acc: "flat", + note: "c" + }, + y = { + acc: "flat", + note: "F" + }, + w = { + "C#": [s, o, c, l, h, u, d], + "A#m": [s, o, c, l, h, u, d], + "G#Mix": [s, o, c, l, h, u, d], + "D#Dor": [s, o, c, l, h, u, d], + "E#Phr": [s, o, c, l, h, u, d], + "F#Lyd": [s, o, c, l, h, u, d], + "B#Loc": [s, o, c, l, h, u, d], + "F#": [s, o, c, l, h, u], + "D#m": [s, o, c, l, h, u], + "C#Mix": [s, o, c, l, h, u], + "G#Dor": [s, o, c, l, h, u], + "A#Phr": [s, o, c, l, h, u], + BLyd: [s, o, c, l, h, u], + "E#Loc": [s, o, c, l, h, u], + B: [s, o, c, l, h], + "G#m": [s, o, c, l, h], + "F#Mix": [s, o, c, l, h], + "C#Dor": [s, o, c, l, h], + "D#Phr": [s, o, c, l, h], + ELyd: [s, o, c, l, h], + "A#Loc": [s, o, c, l, h], + E: [s, o, c, l], + "C#m": [s, o, c, l], + BMix: [s, o, c, l], + "F#Dor": [s, o, c, l], + "G#Phr": [s, o, c, l], + ALyd: [s, o, c, l], + "D#Loc": [s, o, c, l], + A: [s, o, c], + "F#m": [s, o, c], + EMix: [s, o, c], + BDor: [s, o, c], + "C#Phr": [s, o, c], + DLyd: [s, o, c], + "G#Loc": [s, o, c], + D: [s, o], + Bm: [s, o], + AMix: [s, o], + EDor: [s, o], + "F#Phr": [s, o], + GLyd: [s, o], + "C#Loc": [s, o], + G: [s], + Em: [s], + DMix: [s], + ADor: [s], + BPhr: [s], + CLyd: [s], + "F#Loc": [s], + C: [], + Am: [], + GMix: [], + DDor: [], + EPhr: [], + FLyd: [], + BLoc: [], + F: [p], + Dm: [p], + CMix: [p], + GDor: [p], + APhr: [p], + BbLyd: [p], + ELoc: [p], + Bb: [p, f], + Gm: [p, f], + FMix: [p, f], + CDor: [p, f], + DPhr: [p, f], + EbLyd: [p, f], + ALoc: [p, f], + Eb: [p, f, m], + Cm: [p, f, m], + BbMix: [p, f, m], + FDor: [p, f, m], + GPhr: [p, f, m], + AbLyd: [p, f, m], + DLoc: [p, f, m], + Ab: [p, f, m, g], + Fm: [p, f, m, g], + EbMix: [p, f, m, g], + BbDor: [p, f, m, g], + CPhr: [p, f, m, g], + DbLyd: [p, f, m, g], + GLoc: [p, f, m, g], + Db: [p, f, m, g, v], + Bbm: [p, f, m, g, v], + AbMix: [p, f, m, g, v], + EbDor: [p, f, m, g, v], + FPhr: [p, f, m, g, v], + GbLyd: [p, f, m, g, v], + CLoc: [p, f, m, g, v], + Gb: [p, f, m, g, v, b], + Ebm: [p, f, m, g, v, b], + DbMix: [p, f, m, g, v, b], + AbDor: [p, f, m, g, v, b], + BbPhr: [p, f, m, g, v, b], + CbLyd: [p, f, m, g, v, b], + FLoc: [p, f, m, g, v, b], + Cb: [p, f, m, g, v, b, y], + Abm: [p, f, m, g, v, b, y], + GbMix: [p, f, m, g, v, b, y], + DbDor: [p, f, m, g, v, b, y], + EbPhr: [p, f, m, g, v, b, y], + FbLyd: [p, f, m, g, v, b, y], + BbLoc: [p, f, m, g, v, b, y], + "A#": [p, f], + "B#": [], + "D#": [p, f, m], + "E#": [p], + "G#": [p, f, m, g], + Gbm: [s, o, c, l, h, u, d] + }; + return n.keySignature(r, w, e, t, i, a) + }; + var c = { + treble: { + clef: "treble", + pitch: 4, + mid: 0 + }, + "treble+8": { + clef: "treble+8", + pitch: 4, + mid: 0 + }, + "treble-8": { + clef: "treble-8", + pitch: 4, + mid: 0 + }, + "treble^8": { + clef: "treble+8", + pitch: 4, + mid: 0 + }, + treble_8: { + clef: "treble-8", + pitch: 4, + mid: 0 + }, + treble1: { + clef: "treble", + pitch: 2, + mid: 2 + }, + treble2: { + clef: "treble", + pitch: 4, + mid: 0 + }, + treble3: { + clef: "treble", + pitch: 6, + mid: -2 + }, + treble4: { + clef: "treble", + pitch: 8, + mid: -4 + }, + treble5: { + clef: "treble", + pitch: 10, + mid: -6 + }, + perc: { + clef: "perc", + pitch: 6, + mid: 0 + }, + none: { + clef: "none", + mid: 0 + }, + bass: { + clef: "bass", + pitch: 8, + mid: -12 + }, + "bass+8": { + clef: "bass+8", + pitch: 8, + mid: -12 + }, + "bass-8": { + clef: "bass-8", + pitch: 8, + mid: -12 + }, + "bass^8": { + clef: "bass+8", + pitch: 8, + mid: -12 + }, + bass_8: { + clef: "bass-8", + pitch: 8, + mid: -12 + }, + "bass+16": { + clef: "bass", + pitch: 8, + mid: -12 + }, + "bass-16": { + clef: "bass", + pitch: 8, + mid: -12 + }, + "bass^16": { + clef: "bass", + pitch: 8, + mid: -12 + }, + bass_16: { + clef: "bass", + pitch: 8, + mid: -12 + }, + bass1: { + clef: "bass", + pitch: 2, + mid: -6 + }, + bass2: { + clef: "bass", + pitch: 4, + mid: -8 + }, + bass3: { + clef: "bass", + pitch: 6, + mid: -10 + }, + bass4: { + clef: "bass", + pitch: 8, + mid: -12 + }, + bass5: { + clef: "bass", + pitch: 10, + mid: -14 + }, + tenor: { + clef: "alto", + pitch: 8, + mid: -8 + }, + tenor1: { + clef: "alto", + pitch: 2, + mid: -2 + }, + tenor2: { + clef: "alto", + pitch: 4, + mid: -4 + }, + tenor3: { + clef: "alto", + pitch: 6, + mid: -6 + }, + tenor4: { + clef: "alto", + pitch: 8, + mid: -8 + }, + tenor5: { + clef: "alto", + pitch: 10, + mid: -10 + }, + alto: { + clef: "alto", + pitch: 6, + mid: -6 + }, + alto1: { + clef: "alto", + pitch: 2, + mid: -2 + }, + alto2: { + clef: "alto", + pitch: 4, + mid: -4 + }, + alto3: { + clef: "alto", + pitch: 6, + mid: -6 + }, + alto4: { + clef: "alto", + pitch: 8, + mid: -8 + }, + alto5: { + clef: "alto", + pitch: 10, + mid: -10 + }, + "alto+8": { + clef: "alto+8", + pitch: 6, + mid: -6 + }, + "alto-8": { + clef: "alto-8", + pitch: 6, + mid: -6 + }, + "alto^8": { + clef: "alto+8", + pitch: 6, + mid: -6 + }, + alto_8: { + clef: "alto-8", + pitch: 6, + mid: -6 + } + }, + l = function(e, t) { + var r = c[e]; + return (r ? r.mid : 0) + t + }; + s.fixClef = function(e) { + var t = c[e.type]; + t && (e.clefPos = t.pitch, e.type = t.clef) + }, s.deepCopyKey = function(e) { + var t = { + accidentals: [], + root: e.root, + acc: e.acc, + mode: e.mode + }; + return i.each(e.accidentals, (function(e) { + t.accidentals.push(i.clone(e)) + })), t + }; + var h = { + A: 5, + B: 6, + C: 0, + D: 1, + E: 2, + F: 3, + G: 4, + a: 12, + b: 13, + c: 7, + d: 8, + e: 9, + f: 10, + g: 11 + }; + s.addPosToKey = function(e, t) { + var r = e.verticalPos; + i.each(t.accidentals, (function(e) { + var t = h[e.note]; + t -= r, e.verticalPos = t + })), t.impliedNaturals && i.each(t.impliedNaturals, (function(e) { + var t = h[e.note]; + t -= r, e.verticalPos = t + })), r < -10 ? (i.each(t.accidentals, (function(e) { + e.verticalPos -= 7, (e.verticalPos >= 11 || 10 === e.verticalPos && "flat" === e.acc) && (e.verticalPos -= 7), "A" === e.note && "sharp" === e.acc && (e.verticalPos -= 7), "G" !== e.note && "F" !== e.note || "flat" !== e.acc || (e.verticalPos -= 7) + })), t.impliedNaturals && i.each(t.impliedNaturals, (function(e) { + e.verticalPos -= 7, (e.verticalPos >= 11 || 10 === e.verticalPos && "flat" === e.acc) && (e.verticalPos -= 7), "A" === e.note && "sharp" === e.acc && (e.verticalPos -= 7), "G" !== e.note && "F" !== e.note || "flat" !== e.acc || (e.verticalPos -= 7) + }))) : r < -4 ? (i.each(t.accidentals, (function(e) { + e.verticalPos -= 7, -8 !== r || "f" !== e.note && "g" !== e.note || "sharp" !== e.acc || (e.verticalPos -= 7) + })), t.impliedNaturals && i.each(t.impliedNaturals, (function(e) { + e.verticalPos -= 7, -8 !== r || "f" !== e.note && "g" !== e.note || "sharp" !== e.acc || (e.verticalPos -= 7) + }))) : r >= 7 && (i.each(t.accidentals, (function(e) { + e.verticalPos += 7 + })), t.impliedNaturals && i.each(t.impliedNaturals, (function(e) { + e.verticalPos += 7 + }))) + }, s.fixKey = function(e, t) { + var r = i.clone(t); + return s.addPosToKey(e, r), r + }; + var u = function(e) { + var t = 0, + r = e.charAt(t++); + "^" !== r && "_" !== r || (r = e.charAt(t++)); + var i = h[r]; + for (void 0 === i && (i = 6); t < e.length; t++) + if ("," === e.charAt(t)) i -= 7; + else { + if ("'" !== e.charAt(t)) break; + i += 7 + } return { + mid: i - 6, + str: e.substring(t) + } + }; + s.parseKey = function(i) { + 0 === i.length && (i = "none"); + var n = e.tokenize(i, 0, i.length), + o = {}; + switch (n[0].token) { + case "HP": + a.addDirective("bagpipes"), r.key = { + root: "HP", + accidentals: [], + acc: "", + mode: "" + }, o.foundKey = !0, n.shift(); + break; + case "Hp": + a.addDirective("bagpipes"), r.key = { + root: "Hp", + accidentals: [{ + acc: "natural", + note: "g" + }, { + acc: "sharp", + note: "f" + }, { + acc: "sharp", + note: "c" + }], + acc: "", + mode: "" + }, o.foundKey = !0, n.shift(); + break; + case "none": + r.key = { + root: "none", + accidentals: [], + acc: "", + mode: "" + }, o.foundKey = !0, n.shift(); + break; + default: + var c = e.getKeyPitch(n[0].token); + if (c.len > 0) { + o.foundKey = !0; + var h = "", + u = ""; + n[0].token.length > 1 ? n[0].token = n[0].token.substring(1) : n.shift(); + var d = c.token; + if (n.length > 0) { + var p = e.getSharpFlat(n[0].token); + if (p.len > 0 && (n[0].token.length > 1 ? n[0].token = n[0].token.substring(1) : n.shift(), d += p.token, h = p.token), n.length > 0) { + var f = e.getMode(n[0].token); + f.len > 0 && (n.shift(), d += f.token, u = f.token) + } + if (void 0 === s.standardKey(d, c.token, h, 0)) return t("Unsupported key signature: " + d, i, 0), o + } + var m = s.deepCopyKey(r.key), + g = r.globalTranspose ? -r.globalTranspose : 0; + if (r.key = s.deepCopyKey(s.standardKey(d, c.token, h, g)), r.key.mode = u, m) { + for (var v, b = 0; b < r.key.accidentals.length; b++) + for (v = 0; v < m.accidentals.length; v++) m.accidentals[v].note && r.key.accidentals[b].note.toLowerCase() === m.accidentals[v].note.toLowerCase() && (m.accidentals[v].note = null); + for (v = 0; v < m.accidentals.length; v++) m.accidentals[v].note && (r.key.impliedNaturals || (r.key.impliedNaturals = []), r.key.impliedNaturals.push({ + acc: "natural", + note: m.accidentals[v].note + })) + } + } + } + if (0 === n.length) return o; + if ("exp" === n[0].token && n.shift(), 0 === n.length) return o; + if ("oct" === n[0].token && n.shift(), 0 === n.length) return o; + var y, w = e.getKeyAccidentals2(n); + if (w.warn && t(w.warn, i, 0), w.accs) { + o.foundKey || (o.foundKey = !0, r.key = { + root: "none", + acc: "", + mode: "", + accidentals: [] + }), + function(e) { + for (var t = 0; t < e.length; t++) "b" === e[t].note ? e[t].note = "B" : "a" === e[t].note ? e[t].note = "A" : "F" === e[t].note ? e[t].note = "f" : "E" === e[t].note ? e[t].note = "e" : "D" === e[t].note ? e[t].note = "d" : "C" === e[t].note ? e[t].note = "c" : "G" === e[t].note && "sharp" === e[t].acc ? e[t].note = "g" : "g" === e[t].note && "flat" === e[t].acc && (e[t].note = "G") + }(w.accs); + for (var k = 0; k < w.accs.length; k++) { + for (var x = !1, S = 0; S < r.key.accidentals.length && !x; S++) r.key.accidentals[S].note === w.accs[k].note && (x = !0, r.key.accidentals[S].acc !== w.accs[k].acc && (r.key.accidentals[S].acc = w.accs[k].acc, r.key.explicitAccidentals || (r.key.explicitAccidentals = []), r.key.explicitAccidentals.push(w.accs[k]))); + if (!x && (r.key.explicitAccidentals || (r.key.explicitAccidentals = []), r.key.explicitAccidentals.push(w.accs[k]), r.key.accidentals.push(w.accs[k]), r.key.impliedNaturals)) + for (var A = 0; A < r.key.impliedNaturals.length; A++) r.key.impliedNaturals[A].note === w.accs[k].note && r.key.impliedNaturals.splice(A, 1) + } + } + for (; n.length > 0;) switch (n[0].token) { + case "m": + case "middle": + if (n.shift(), 0 === n.length) return t("Expected = after middle", i, 0), o; + if ("=" !== (y = n.shift()).token) { + t("Expected = after middle", i, y.start); + break + } + if (0 === n.length) return t("Expected parameter after middle=", i, 0), o; + var T = e.getPitchFromTokens(n); + T.warn && t(T.warn, i, 0), T.position && (r.clef.verticalPos = T.position - 6); + break; + case "transpose": + if (n.shift(), 0 === n.length) return t("Expected = after transpose", i, 0), o; + if ("=" !== (y = n.shift()).token) { + t("Expected = after transpose", i, y.start); + break + } + if (0 === n.length) return t("Expected parameter after transpose=", i, 0), o; + if ("number" !== n[0].type) { + t("Expected number after transpose", i, n[0].start); + break + } + r.clef.transpose = n[0].intt, n.shift(); + break; + case "stafflines": + if (n.shift(), 0 === n.length) return t("Expected = after stafflines", i, 0), o; + if ("=" !== (y = n.shift()).token) { + t("Expected = after stafflines", i, y.start); + break + } + if (0 === n.length) return t("Expected parameter after stafflines=", i, 0), o; + if ("number" !== n[0].type) { + t("Expected number after stafflines", i, n[0].start); + break + } + r.clef.stafflines = n[0].intt, n.shift(); + break; + case "staffscale": + if (n.shift(), 0 === n.length) return t("Expected = after staffscale", i, 0), o; + if ("=" !== (y = n.shift()).token) { + t("Expected = after staffscale", i, y.start); + break + } + if (0 === n.length) return t("Expected parameter after staffscale=", i, 0), o; + if ("number" !== n[0].type) { + t("Expected number after staffscale", i, n[0].start); + break + } + r.clef.staffscale = n[0].floatt, n.shift(); + break; + case "style": + if (n.shift(), 0 === n.length) return t("Expected = after style", i, 0), o; + if ("=" !== (y = n.shift()).token) { + t("Expected = after style", i, y.start); + break + } + if (0 === n.length) return t("Expected parameter after style=", i, 0), o; + switch (n[0].token) { + case "normal": + case "harmonic": + case "rhythm": + case "x": + r.style = n[0].token, n.shift(); + break; + default: + t("error parsing style element: " + n[0].token, i, n[0].start) + } + break; + case "clef": + if (n.shift(), 0 === n.length) return t("Expected = after clef", i, 0), o; + if ("=" !== (y = n.shift()).token) { + t("Expected = after clef", i, y.start); + break + } + if (0 === n.length) return t("Expected parameter after clef=", i, 0), o; + case "treble": + case "bass": + case "alto": + case "tenor": + case "perc": + var C = n.shift(); + switch (C.token) { + case "treble": + case "tenor": + case "alto": + case "bass": + case "perc": + case "none": + break; + case "C": + C.token = "alto"; + break; + case "F": + C.token = "bass"; + break; + case "G": + C.token = "treble"; + break; + case "c": + C.token = "alto"; + break; + case "f": + C.token = "bass"; + break; + case "g": + C.token = "treble"; + break; + default: + t("Expected clef name. Found " + C.token, i, C.start) + } + n.length > 0 && "number" === n[0].type && (C.token += n[0].token, n.shift()), n.length > 1 && ("-" === n[0].token || "+" === n[0].token || "^" === n[0].token || "_" === n[0].token) && "8" === n[1].token && (C.token += n[0].token + n[1].token, n.shift(), n.shift()), r.clef = { + type: C.token, + verticalPos: l(C.token, 0) + }, r.currentVoice && void 0 !== r.currentVoice.transpose && (r.clef.transpose = r.currentVoice.transpose), o.foundClef = !0; + break; + default: + t("Unknown parameter: " + n[0].token, i, n[0].start), n.shift() + } + return o + }; + s.parseVoice = function(i, a, n) { + var s = e.getMeat(i, a, n), + c = s.start, + h = s.end, + d = e.getToken(i, c, h); + if (0 !== d.length) { + var p = !1; + void 0 === r.voices[d] && (r.voices[d] = {}, p = !0, r.score_is_present && t("Can't have an unknown V: id when the %score directive is present", i, c)), c += d.length, c += e.eatWhiteSpace(i, c); + for (var f = { + startStaff: p + }, m = function(r) { + var a = e.getVoiceToken(i, c, h); + void 0 !== a.warn ? t("Expected value for " + r + " in voice: " + a.warn, i, c) : 0 === a.token.length && '"' !== i.charAt(c) ? t("Expected value for " + r + " in voice", i, c) : f[r] = a.token, c += a.len + }, g = function(a, n, s) { + var o = e.getVoiceToken(i, c, h); + void 0 !== o.warn ? t("Expected value for " + n + " in voice: " + o.warn, i, c) : 0 === o.token.length && '"' !== i.charAt(c) ? t("Expected value for " + n + " in voice", i, c) : ("number" === s && (o.token = parseFloat(o.token)), r.voices[a][n] = o.token), c += o.len + }, v = function(r, a) { + var n = e.getVoiceToken(i, c, h); + if (void 0 !== n.warn) t("Expected value for " + r + " in voice: " + n.warn, i, c); + else { + if (0 !== n.token.length || '"' === i.charAt(c)) return "number" === a && (n.token = parseFloat(n.token)), n.token; + t("Expected value for " + r + " in voice", i, c) + } + c += n.len + }, b = function(a, n) { + var s = e.getVoiceToken(i, c, h); + if (void 0 !== s.warn) t("Expected one of (_B, _E, _b, _e) for " + n + " in voice: " + s.warn, i, c); + else if (0 === s.token.length && '"' !== i.charAt(c)) t("Expected one of (_B, _E, _b, _e) for " + n + " in voice", i, c); + else { + var o = { + _B: 2, + _E: 9, + _b: -10, + _e: -3 + } [s.token]; + o ? r.voices[a][n] = o : t("Expected one of (_B, _E, _b, _e) for " + n + " in voice", i, c) + } + c += s.len + }; c < h;) { + var y = e.getVoiceToken(i, c, h); + if (c += y.len, y.warn) t("Error parsing voice: " + y.warn, i, c); + else { + var w = null; + switch (y.token) { + case "clef": + case "cl": + m("clef"); + var k = 0; + void 0 !== f.clef && (f.clef = f.clef.replace(/[',]/g, ""), -1 !== f.clef.indexOf("+16") && (k += 14, f.clef = f.clef.replace("+16", "")), f.verticalPos = l(f.clef, k)); + break; + case "treble": + case "bass": + case "tenor": + case "alto": + case "perc": + case "none": + case "treble'": + case "bass'": + case "tenor'": + case "alto'": + case "none'": + case "treble''": + case "bass''": + case "tenor''": + case "alto''": + case "none''": + case "treble,": + case "bass,": + case "tenor,": + case "alto,": + case "none,": + case "treble,,": + case "bass,,": + case "tenor,,": + case "alto,,": + case "none,,": + f.clef = y.token.replace(/[',]/g, ""), f.verticalPos = l(f.clef, 0), r.voices[d].clef = y.token; + break; + case "staves": + case "stave": + case "stv": + m("staves"); + break; + case "brace": + case "brc": + m("brace"); + break; + case "bracket": + case "brk": + m("bracket"); + break; + case "name": + case "nm": + m("name"); + break; + case "subname": + case "sname": + case "snm": + m("subname"); + break; + case "merge": + f.startStaff = !1; + break; + case "stem": + case "stems": + void 0 !== (w = e.getVoiceToken(i, c, h)).warn ? t("Expected value for stems in voice: " + w.warn, i, c) : "up" === w.token || "down" === w.token ? r.voices[d].stem = w.token : t("Expected up or down for voice stem", i, c), c += w.len; + break; + case "up": + case "down": + r.voices[d].stem = y.token; + break; + case "middle": + case "m": + m("verticalPos"), f.verticalPos = u(f.verticalPos).mid; + break; + case "gchords": + case "gch": + r.voices[d].suppressChords = !0, "0" === (w = e.getVoiceToken(i, c, h)).token && (c += w.len); + break; + case "space": + case "spc": + m("spacing"); + break; + case "scale": + g(d, "scale", "number"); + break; + case "score": + b(d, "scoreTranspose"); + break; + case "transpose": + g(d, "transpose", "number"); + break; + case "stafflines": + g(d, "stafflines", "number"); + break; + case "staffscale": + g(d, "staffscale", "number"); + break; + case "octave": + g(d, "octave", "number"); + break; + case "volume": + g(d, "volume", "number"); + break; + case "cue": + var x = v("cue", "string"); + r.voices[d].scale = "on" === x ? .6 : 1; + break; + case "style": + void 0 !== (w = e.getVoiceToken(i, c, h)).warn ? t("Expected value for style in voice: " + w.warn, i, c) : "normal" === w.token || "harmonic" === w.token || "rhythm" === w.token || "x" === w.token ? r.voices[d].style = w.token : t("Expected one of [normal, harmonic, rhythm, x] for voice style", i, c), c += w.len + } + } + c += e.eatWhiteSpace(i, c) + } + if ((f.startStaff || 0 === r.staves.length) && (r.staves.push({ + index: r.staves.length, + meter: r.origMeter + }), r.score_is_present || (r.staves[r.staves.length - 1].numVoices = 0)), void 0 === r.voices[d].staffNum) { + r.voices[d].staffNum = r.staves.length - 1; + var S = 0; + for (var A in r.voices) r.voices.hasOwnProperty(A) && r.voices[A].staffNum === r.voices[d].staffNum && S++; + r.voices[d].index = S - 1 + } + var T = r.staves[r.voices[d].staffNum]; + r.score_is_present || T.numVoices++, f.clef && (T.clef = { + type: f.clef, + verticalPos: f.verticalPos + }), f.spacing && (T.spacing_below_offset = f.spacing), f.verticalPos && (T.verticalPos = f.verticalPos), f.name && (T.name ? T.name.push(f.name) : T.name = [f.name]), f.subname && (T.subname ? T.subname.push(f.subname) : T.subname = [f.subname]), + function(e) { + r.currentVoice = r.voices[e], o.setCurrentVoice(r.currentVoice.staffNum, r.currentVoice.index) + }(d) + } else t("Expected a voice id", i, c) + } + }(), e.exports = s +}, function(e, t, r) { + var i = r(50), + a = r(22), + n = r(51), + s = r(15), + o = r(6), + c = r(7), + l = r(23), + h = r(14), + u = r(52), + d = r(53), + p = r(54), + f = "MIDI is not supported in this browser."; + e.exports = function() { + var e = this; + e.audioBufferPossible = void 0, e.directSource = [], e.startTimeSec = void 0, e.pausedTimeSec = void 0, e.audioBuffers = [], e.duration = void 0, e.isRunning = !1, e.init = function(t) { + t || (t = {}), s(t.audioContext); + var r = o().currentTime; + if (e.debugCallback = t.debugCallback, e.debugCallback && e.debugCallback("init called"), e.audioBufferPossible = e._deviceCapable(), !e.audioBufferPossible) return Promise.reject({ + status: "NotSupported", + message: f + }); + e.soundFontUrl = t.soundFontUrl ? t.soundFontUrl : "https://paulrosen.github.io/midi-js-soundfonts/FluidR3_GM/", e.millisecondsPerMeasure = t.millisecondsPerMeasure ? t.millisecondsPerMeasure : t.visualObj ? t.visualObj.millisecondsPerMeasure() : 1e3; + var i = t.options ? t.options : {}; + if (e.meterSize = 1, t.visualObj) { + var a = d(t.visualObj, i); + e.flattened = p(a, i), e.meterSize = t.visualObj.getMeterFraction().num / t.visualObj.getMeterFraction().den + } else { + if (!t.sequence) return Promise.reject(new Error("Must pass in either a visualObj or a sequence")); + e.flattened = t.sequence + } + e.sequenceCallback = i.sequenceCallback, e.callbackContext = i.callbackContext, e.onEnded = t.onEnded; + var n = {}, + c = h[0]; + e.flattened.tracks.forEach((function(e) { + e.forEach((function(e) { + if ("program" === e.cmd && h[e.instrument] && (c = h[e.instrument]), void 0 !== e.pitch) { + var t = e.pitch + 60; + l[t] ? (n[c] || (n[c] = {}), n[c][l[t]] = !0) : console.log("Can't find note: ", t) + } + })) + })), e.debugCallback && e.debugCallback("note gathering time = " + Math.floor(1e3 * (o().currentTime - r)) + "ms"), r = o().currentTime; + var u = []; + Object.keys(n).forEach((function(e) { + Object.keys(n[e]).forEach((function(t) { + u.push({ + instrument: e, + note: t + }) + })) + })); + for (var m = [], g = 0; g < u.length; g += 256) m.push(u.slice(g, g + 256)); + return new Promise((function(t, i) { + var a = [], + n = 0, + s = function() { + n < m.length ? e._loadBatch(m[n], e.soundFontUrl, r).then((function(e) { + r = o().currentTime, a.push(e), n++, s() + }), i) : t(a) + }; + s() + })) + }, e._loadBatch = function(t, r, a) { + var n = []; + return t.forEach((function(e) { + n.push(i(r, e.instrument, e.note, o())) + })), Promise.all(n).then((function(t) { + return e.debugCallback && e.debugCallback("mp3 load time = " + Math.floor(1e3 * (o().currentTime - a)) + "ms"), Promise.resolve(t) + })) + }, e.prime = function() { + return e.isRunning = !1, e.audioBufferPossible ? (e.debugCallback && e.debugCallback("prime called"), new Promise((function(t) { + var r = o().currentTime, + i = e.millisecondsPerMeasure / 1e3 / e.meterSize; + e.duration = e.flattened.totalDuration * i; + var s = Math.floor(o().sampleRate * e.duration); + e.stop(); + var c = n(e.flattened); + e.sequenceCallback && e.sequenceCallback(c, e.callbackContext), e.audioBuffers = [], c.forEach((function(t) { + var r = o().createBuffer(1, s, o().sampleRate), + n = r.getChannelData(0); + t.forEach((function(t) { + e._placeNote(n, t, i, a) + })), e.audioBuffers.push(r) + })), e.debugCallback && (e.debugCallback("sampleRate = " + o().sampleRate), e.debugCallback("totalSamples = " + s), e.debugCallback("creationTime = " + Math.floor(1e3 * (o().currentTime - r)) + "ms")), t({ + status: "ok", + seconds: 0 + }) + }))) : Promise.reject(new Error(f)) + }, e.start = function() { + if (e.pausedTimeSec) e.resume(); + else { + if (!e.audioBufferPossible) throw new Error(f); + e.debugCallback && e.debugCallback("start called"), e._kickOffSound(0), e.startTimeSec = o().currentTime, e.pausedTimeSec = void 0, e.debugCallback && e.debugCallback("MIDI STARTED", e.startTimeSec) + } + }, e.pause = function() { + if (!e.audioBufferPossible) throw new Error(f); + e.debugCallback && e.debugCallback("pause called"), e.pausedTimeSec || (e.stop(), e.pausedTimeSec = o().currentTime) + }, e.resume = function() { + if (!e.audioBufferPossible) throw new Error(f); + e.debugCallback && e.debugCallback("resume called"); + var t = e.pausedTimeSec - e.startTimeSec; + e.startTimeSec = o().currentTime - t, e.pausedTimeSec = void 0, e._kickOffSound(t) + }, e.seek = function(t) { + var r = e.duration * t; + if (!e.audioBufferPossible) throw new Error(f); + e.debugCallback && e.debugCallback("seek called sec=" + r), e.isRunning && (e.stop(), e._kickOffSound(r)); + var i = e.pausedTimeSec ? e.pausedTimeSec - e.startTimeSec : void 0; + e.startTimeSec = o().currentTime - r, e.pausedTimeSec && (e.pausedTimeSec = e.startTimeSec + i) + }, e.stop = function() { + e.isRunning = !1, e.pausedTimeSec = void 0, e.directSource.forEach((function(e) { + try { + e.stop() + } catch (e) { + console.log("direct source didn't stop:", e) + } + })), e.directSource = [] + }, e.download = function() { + return u(e) + }, e._deviceCapable = function() { + return !!c() || (console.warn(f), e.debugCallback && e.debugCallback(f), !1) + }, e._kickOffSound = function(t) { + e.isRunning = !0, e.directSource = [], e.audioBuffers.forEach((function(t, r) { + e.directSource[r] = o().createBufferSource(), e.directSource[r].buffer = t, e.directSource[r].connect(o().destination) + })), e.directSource.forEach((function(e) { + e.start(0, t) + })), e.onEnded && (e.directSource[0].onended = function() { + e.onEnded(e.callbackContext) + }) + }, e._placeNote = function(e, t, r, i) { + var a = Math.floor(t.start * o().sampleRate * r), + n = (t.end - t.start) * r, + s = l[t.pitch + 60]; + if (s) + for (var c = i[t.instrument][s].getChannelData(0), h = Math.min(c.length, Math.floor(n * o().sampleRate)), u = 0; u < h; u++) { + var d = c[u] * t.volume / 128; + e[a + u] ? e[a + u] = .75 * (e[a + u] + d) : e[a + u] = d + } + } + } +}, function(e, t) { + e.exports = ["acoustic_grand_piano", "bright_acoustic_piano", "electric_grand_piano", "honkytonk_piano", "electric_piano_1", "electric_piano_2", "harpsichord", "clavinet", "celesta", "glockenspiel", "music_box", "vibraphone", "marimba", "xylophone", "tubular_bells", "dulcimer", "drawbar_organ", "percussive_organ", "rock_organ", "church_organ", "reed_organ", "accordion", "harmonica", "tango_accordion", "acoustic_guitar_nylon", "acoustic_guitar_steel", "electric_guitar_jazz", "electric_guitar_clean", "electric_guitar_muted", "overdriven_guitar", "distortion_guitar", "guitar_harmonics", "acoustic_bass", "electric_bass_finger", "electric_bass_pick", "fretless_bass", "slap_bass_1", "slap_bass_2", "synth_bass_1", "synth_bass_2", "violin", "viola", "cello", "contrabass", "tremolo_strings", "pizzicato_strings", "orchestral_harp", "timpani", "string_ensemble_1", "string_ensemble_2", "synth_strings_1", "synth_strings_2", "choir_aahs", "voice_oohs", "synth_choir", "orchestra_hit", "trumpet", "trombone", "tuba", "muted_trumpet", "french_horn", "brass_section", "synth_brass_1", "synth_brass_2", "soprano_sax", "alto_sax", "tenor_sax", "baritone_sax", "oboe", "english_horn", "bassoon", "clarinet", "piccolo", "flute", "recorder", "pan_flute", "blown_bottle", "shakuhachi", "whistle", "ocarina", "lead_1_square", "lead_2_sawtooth", "lead_3_calliope", "lead_4_chiff", "lead_5_charang", "lead_6_voice", "lead_7_fifths", "lead_8_bass__lead", "pad_1_new_age", "pad_2_warm", "pad_3_polysynth", "pad_4_choir", "pad_5_bowed", "pad_6_metallic", "pad_7_halo", "pad_8_sweep", "fx_1_rain", "fx_2_soundtrack", "fx_3_crystal", "fx_4_atmosphere", "fx_5_brightness", "fx_6_goblins", "fx_7_echoes", "fx_8_scifi", "sitar", "banjo", "shamisen", "koto", "kalimba", "bagpipe", "fiddle", "shanai", "tinkle_bell", "agogo", "steel_drums", "woodblock", "taiko_drum", "melodic_tom", "synth_drum", "reverse_cymbal", "guitar_fret_noise", "breath_noise", "seashore", "bird_tweet", "telephone_ring", "helicopter", "applause", "gunshot", "percussion"] +}, function(e, t) { + e.exports = function(e) { + return window.abcjsAudioContext || (e || (e = new(e = window.AudioContext || window.webkitAudioContext || navigator.mozAudioContext || navigator.msAudioContext)), window.abcjsAudioContext = e), "suspended" !== window.abcjsAudioContext.state + } +}, function(e, t, r) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), t.fromCodePoint = String.fromCodePoint || function(e) { + return String.fromCharCode(Math.floor((e - 65536) / 1024) + 55296, (e - 65536) % 1024 + 56320) + }, t.getCodePoint = String.prototype.codePointAt ? function(e, t) { + return e.codePointAt(t) + } : function(e, t) { + return 1024 * (e.charCodeAt(t) - 55296) + e.charCodeAt(t + 1) - 56320 + 65536 + }, t.highSurrogateFrom = 55296, t.highSurrogateTo = 56319 +}, function(e, t) { + var r = {}, + i = { + C: 0, + "C#": 1, + Db: 1, + D: 2, + "D#": 3, + Eb: 3, + E: 4, + F: 5, + "F#": 6, + Gb: 6, + G: 7, + "G#": 8, + Ab: 8, + A: 9, + "A#": 10, + Bb: 10, + B: 11 + }, + a = ["C", "Db", "D", "Eb", "E", "F", "F#", "G", "Ab", "A", "Bb", "B"], + n = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "Bb", "B"]; + r.keySignature = function(e, t, r, s, o, c) { + c || (c = 0), e.localTransposeVerticalMovement = 0, e.localTransposePreferFlats = !1; + var l = t[r]; + if (!l) return e.key; + if (e.localTranspose = (e.globalTranspose ? e.globalTranspose : 0) + c, !e.localTranspose) return { + accidentals: l, + root: s, + acc: o + }; + if (e.globalTransposeOrigKeySig = l, e.localTranspose % 12 == 0) return e.localTransposeVerticalMovement = e.localTranspose / 12 * 7, { + accidentals: l, + root: s, + acc: o + }; + var h = r[0]; + "b" === r[1] || "#" === r[1] ? (h += r[1], r = r.substr(2)) : r = r.substr(1); + for (var u = i[h] + e.localTranspose; u < 0;) u += 12; + u > 11 && (u %= 12); + var d = "m" === r[0] ? n[u] : a[u], + p = d + r, + f = t[p]; + f.length > 0 && "flat" === f[0].acc && (e.localTransposePreferFlats = !0); + var m = p.charCodeAt(0) - h.charCodeAt(0); + return e.localTranspose > 0 ? m < 0 ? m += 7 : 0 === m && ("#" !== h[1] && "b" !== p[1] || (m += 7)) : e.localTranspose < 0 && (m > 0 ? m -= 7 : 0 === m && ("b" !== h[1] && "#" !== p[1] || (m -= 7))), e.localTranspose > 0 ? e.localTransposeVerticalMovement = m + 7 * Math.floor(e.localTranspose / 12) : e.localTransposeVerticalMovement = m + 7 * Math.ceil(e.localTranspose / 12), { + accidentals: f, + root: d[0], + acc: d.length > 1 ? d[1] : "" + } + }; + var s = ["C", "C♯", "D", "D♯", "E", "F", "F♯", "G", "G♯", "A", "A♯", "B"], + o = ["C", "D♭", "D", "E♭", "E", "F", "G♭", "G", "A♭", "A", "B♭", "B"], + c = ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"], + l = ["C", "Db", "D", "Eb", "E", "F", "Gb", "G", "Ab", "A", "Bb", "B"]; + r.chordName = function(e, t) { + if (e.localTranspose && e.localTranspose % 12 != 0) { + for (var r = e.localTranspose; r < 0;) r += 12; + r > 11 && (r %= 12); + for (var i = (t = (t = (t = (t = (t = (t = (t = (t = e.freegchord ? (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = t.replace(/Cb/g, "`~11`")).replace(/Db/g, "`~1`")).replace(/Eb/g, "`~3`")).replace(/Fb/g, "`~4`")).replace(/Gb/g, "`~6`")).replace(/Ab/g, "`~8`")).replace(/Bb/g, "`~10`")).replace(/C#/g, "`~1`")).replace(/D#/g, "`~3`")).replace(/E#/g, "`~5`")).replace(/F#/g, "`~6`")).replace(/G#/g, "`~8`")).replace(/A#/g, "`~10`")).replace(/B#/g, "`~0`") : (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = t.replace(/C♭/g, "`~11`")).replace(/D♭/g, "`~1`")).replace(/E♭/g, "`~3`")).replace(/F♭/g, "`~4`")).replace(/G♭/g, "`~6`")).replace(/A♭/g, "`~8`")).replace(/B♭/g, "`~10`")).replace(/C♯/g, "`~1`")).replace(/D♯/g, "`~3`")).replace(/E♯/g, "`~5`")).replace(/F♯/g, "`~6`")).replace(/G♯/g, "`~8`")).replace(/A♯/g, "`~10`")).replace(/B♯/g, "`~0`")).replace(/C/g, "`~0`")).replace(/D/g, "`~2`")).replace(/E/g, "`~4`")).replace(/F/g, "`~5`")).replace(/G/g, "`~7`")).replace(/A/g, "`~9`")).replace(/B/g, "`~11`")).split("`"), a = 0; a < i.length; a++) + if ("~" === i[a][0]) { + var n = parseInt(i[a].substr(1), 10); + (n += r) > 11 && (n -= 12), e.freegchord ? i[a] = e.localTransposePreferFlats ? l[n] : c[n] : i[a] = e.localTransposePreferFlats ? o[n] : s[n] + } t = i.join("") + } + return t + }; + var h = ["c", "d", "e", "f", "g", "a", "b"]; + var u = { + dblflat: -2, + flat: -1, + natural: 0, + sharp: 1, + dblsharp: 2 + }, + d = { + "-2": "dblflat", + "-1": "flat", + 0: "natural", + 1: "sharp", + 2: "dblsharp" + }; + r.note = function(e, t) { + if (e.localTranspose) { + var r = t.pitch; + if (t.pitch = t.pitch + e.localTransposeVerticalMovement, t.accidental) { + var i = function(e, t, r, i, a) { + for (var n = h[(e + 49) % 7], s = 0, o = 0; o < i.length; o++) i[o].note.toLowerCase() === n && (s = u[i[o].acc]); + for (var c = u[r] - s, l = h[(t + 49) % 7], d = 0, p = 0; p < a.accidentals.length; p++) a.accidentals[p].note.toLowerCase() === l && (d = u[a.accidentals[p].acc]); + var f = c + d; + return f < -2 && (t--, f += "c" === l || "f" === l ? 1 : 2), f > 2 && (t++, f -= "b" === l || "e" === l ? 1 : 2), [t, f] + }(r, t.pitch, t.accidental, e.globalTransposeOrigKeySig, e.targetKey); + t.pitch = i[0], t.accidental = d[i[1]] + } + } + }, e.exports = r +}, function(e, t) { + function r(e) { + for (var t = [], r = 0; r < e.length; r++) t.push(e[r]); + return t + } + + function i(e, t, i, a, n, s, o, c, l, h, u) { + for (var d = h; d < e.length; d++) { + var p = e[d]; + i += p, a += p; + var f = Math.abs(i - t[c]); + if (Math.abs(f - s) < t[0] / 10) + if (f < s) { + var m = r(n), + g = r(l); + g.push(d - 1), m.push(a - p), u.push({ + accumulator: i, + lineAccumulator: p, + lineWidths: m, + lastVariance: Math.abs(i - t[c + 1]), + highestVariance: Math.max(o, s), + currLine: c + 1, + lineBreaks: g, + startIndex: d + 1 + }) + } else f > s && d < e.length - 1 && (m = r(n), g = r(l), u.push({ + accumulator: i, + lineAccumulator: a, + lineWidths: m, + lastVariance: f, + highestVariance: Math.max(o, f), + currLine: c, + lineBreaks: g, + startIndex: d + 1 + })); + f > s ? (l.push(d - 1), c++, o = Math.max(o, s), s = Math.abs(i - t[c]), n.push(a - p), a = p) : s = f + } + n.push(a) + } + + function a(e, t, r, i, a) { + var n = new a, + s = { + lineBreaks: e, + staffwidth: t + }; + for (var o in i) i.hasOwnProperty(o) && "wrap" !== o && "staffwidth" !== o && (s[o] = i[o]); + return n.parse(r, s), { + tune: n.getTune(), + revisedParams: s + } + } + e.exports = { + wrapLines: function(e, t) { + if (t && 0 !== e.lines.length) { + for (var r = [], i = [], a = [], n = [], s = [], o = "", c = {}, l = 0, h = 0; h < e.lines.length; h++) { + var u = e.lines[h]; + if (u.staff) { + for (var d = u.staff, p = 0; p < d.length; p++) { + void 0 === i[p] && (i[p] = [], a[p] = [], n[p] = [], s[p] = []); + for (var f = d[p], m = f.voices, g = 0; g < m.length; g++) { + void 0 === i[p][g] && (i[p][g] = !0, a[p][g] = 0, n[p][g] = 0, s[p][g] = 0), l > 0 && (a[p][g] += l); + for (var v = m[g], b = 0; b < v.length; b++) { + if (i[p][g]) { + if (r[a[p][g]] || (r[a[p][g]] = { + staff: [] + }), !r[a[p][g]].staff[p]) + for (var y in r[a[p][g]].staff[p] = { + voices: [] + }, f) f.hasOwnProperty(y) && ("meter" === y ? 1 !== r.length && o === JSON.stringify(f[y]) || (o = JSON.stringify(f[y]), r[a[p][g]].staff[p][y] = f[y]) : "voices" !== y && (r[a[p][g]].staff[p][y] = f[y])); + s[p][g] && (r[a[p][g]].staff[p].barNumber = s[p][g]), i[p][g] = !1 + } + var w = v[b]; + if (!r[a[p][g]].staff[p].voices[g]) + for (var k in r[a[p][g]].staff[p].voices[g] = [], c) c.hasOwnProperty(k) && r[a[p][g]].staff[p].voices[g].push(c[k]); + r[a[p][g]].staff[p].voices[g].push(w), "stem" === w.el_type && (c[w.el_type] = w), "bar" === w.el_type && (n[p][g]++, t[n[p][g]] && (i[p][g] = !0, a[p][g]++, s[p][g] = w.barNumber, delete w.barNumber)) + } + } + } + l = 0 + } else r.push(u), l++ + } + e.lines = r + } + }, + calcLineWraps: function(e, t, r, n, s, o) { + if (n.staffwidth < t.left) return { + explanation: "Staffwidth is narrower than the margin", + tune: e, + revisedParams: n + }; + var c = n.scale ? Math.max(n.scale, .1) : 1, + l = n.wrap.minSpacing ? Math.max(parseFloat(n.wrap.minSpacing), 1) : 1, + h = n.wrap.minSpacingLimit ? Math.max(parseFloat(n.wrap.minSpacingLimit), 1) : l - .1, + u = n.wrap.maxSpacing ? Math.max(parseFloat(n.wrap.maxSpacing), 1) : void 0; + n.wrap.lastLineLimit && !u && (u = Math.max(parseFloat(n.wrap.lastLineLimit), 1)), n.wrap.targetHeight && Math.max(parseInt(n.wrap.targetHeight, 10), 100); + var d = n.wrap.preferredMeasuresPerLine ? Math.max(parseInt(n.wrap.preferredMeasuresPerLine, 10), 1) : void 0, + p = (n.staffwidth - t.left) / l / c, + f = (n.staffwidth - t.left) / u / c, + m = (n.staffwidth - t.left) / h / c, + g = { + widths: t, + lineBreakPoint: p, + minLineSize: f, + attempts: [], + staffWidth: n.staffwidth, + minWidth: Math.round(m) + }, + v = null; + if (d) { + var b = function(e, t, r) { + for (var i = [], a = [], n = 0, s = !1, o = 0; o < e.length; o++)(n += e[o]) > t && (s = !0), o % r == r - 1 && (o !== e.length - 1 && i.push(o), a.push(Math.round(n)), n = 0); + return { + failed: s, + totals: a, + lineBreaks: i + } + }(t.measureWidths, p, d); + g.attempts.push({ + type: "Fixed Measures Per Line", + preferredMeasuresPerLine: d, + lineBreaks: b.lineBreaks, + failed: b.failed, + totals: b.totals + }), b.failed || (v = b.lineBreaks) + } + if (!v) { + var y = function(e, t) { + for (var r = [], i = [], a = 0, n = 0; n < e.length; n++) { + var s = e[n], + o = a + s; + if (o < t) a = o; + else t - a < o - t && a > 0 ? (r.push(n - 1), i.push(Math.round(a - s)), a = s) : n < e.length - 1 && (r.push(n), i.push(Math.round(a)), a = 0) + } + return i.push(Math.round(a)), { + lineBreaks: r, + totals: i + } + }(t.measureWidths, p); + g.attempts.push({ + type: "Free Form", + lineBreaks: y.lineBreaks, + totals: y.totals + }), v = y.lineBreaks, y = function(e, t, r, a) { + for (var n = Math.ceil(e.total / t) + 1, s = Math.floor(e.total / n), o = [], c = 0; c < n; c++) o.push(s * (c + 1)); + var l = []; + l.push({ + accumulator: 0, + lineAccumulator: 0, + lineWidths: [], + lastVariance: 999999, + highestVariance: 0, + currLine: 0, + lineBreaks: [], + startIndex: 0 + }); + for (var h = 0; h < l.length;) i(e.measureWidths, o, l[h].accumulator, l[h].lineAccumulator, l[h].lineWidths, l[h].lastVariance, l[h].highestVariance, l[h].currLine, l[h].lineBreaks, l[h].startIndex, l), h++; + for (c = 0; c < l.length; c++) { + var u = l[c]; + u.variances = [], u.aveVariance = 0; + for (var d = 0; d < u.lineWidths.length; d++) { + var p = u.lineWidths[d]; + u.variances.push(p - o[0]), u.aveVariance += Math.abs(p - o[0]) + } + u.aveVariance = u.aveVariance / u.lineWidths.length, a.attempts.push({ + type: "optimizeLineWidths", + lineBreaks: u.lineBreaks, + variances: u.variances, + aveVariance: u.aveVariance, + widths: e.measureWidths + }) + } + var f = 9999999, + m = -1; + for (c = 0; c < l.length; c++)(u = l[c]).aveVariance < f && (f = u.aveVariance, m = c); + return { + failed: !1, + lineBreaks: l[m].lineBreaks, + variance: l[m].highestVariance + } + }(t, p, 0, g), g.attempts.push({ + type: "Optimize", + failed: y.failed, + reason: y.reason, + lineBreaks: y.lineBreaks, + totals: y.totals + }), y.failed || (v = y.lineBreaks) + } + var w = n.staffwidth, + k = a(v, w, r, n, s), + x = o.getMeasureWidths(k.tune), + S = !0; + return g.attempts.push({ + type: "heightCheck", + height: x.height + }), 0 === v.length && f > t.total && (w = t.total * u * c + t.left, g.attempts.push({ + type: "too sparse", + newWidth: Math.round(w) + }), S = !1), S || (k = a(v, w, r, n, s)), k.explanation = g, k + } + } +}, function(e, t, r) { + var i = r(0), + a = r(12), + n = r(1); + e.exports = function() { + this.getBeatLength = function() { + for (var e = 0; e < this.lines.length; e++) + if (this.lines[e].staff) + for (var t = 0; t < this.lines[e].staff.length; t++) + if (this.lines[e].staff[t].meter) { + var r = this.lines[e].staff[t].meter; + if ("specified" === r.type) { + if (r.value.length > 0) { + var i = parseInt(r.value[0].num, 10), + a = parseInt(r.value[0].den, 10); + return 3 === i && 8 === a || 6 === i && 8 === a ? 3 / 8 : 6 === i && 4 === a ? 3 / 4 : 9 === i && 8 === a || 12 === i && 8 === a ? 3 / 8 : 1 / a + } + return 1 / 4 + } + return "cut_time" === r.type ? .5 : 1 / 4 + } return 1 / 4 + }, this.getPickupLength = function() { + for (var e = 0, t = this.getBarLength(), r = 0; r < this.lines.length; r++) + if (this.lines[r].staff) + for (var i = 0; i < this.lines[r].staff.length; i++) + for (var a = 0; a < this.lines[r].staff[i].voices.length; a++) + for (var n = this.lines[r].staff[i].voices[a], s = 1, o = 0; o < n.length; o++) { + var c = n[o].rest && "spacer" === n[o].rest.type; + if (n[o].startTriplet && (s = n[o].tripletMultiplier), n[o].duration && !c && (e += n[o].duration * s), n[o].endTriplet && (s = 1), e >= t && (e -= t), "bar" === n[o].el_type) return e + } + return e + }, this.getBarLength = function() { + var e = this.getMeterFraction(); + return e.num / e.den + }, this.millisecondsPerMeasure = function(e) { + var t; + if (e) t = e; + else { + var r = this.metaText ? this.metaText.tempo : null; + t = this.getBpm(r) + } + return t <= 0 && (t = 1), 6e4 * (this.getBeatsPerMeasure() / t) + }, this.getBeatsPerMeasure = function() { + var e, t = this.getMeterFraction(); + return (e = 8 === t.den ? t.num / 3 : t.num) <= 0 && (e = 1), e + }, this.reset = function() { + this.version = "1.0.1", this.media = "screen", this.metaText = {}, this.formatting = {}, this.lines = [], this.staffNum = 0, this.voiceNum = 0, this.lineNum = 0 + }, this.resolveOverlays = function() { + for (var e = !1, t = 0; t < this.lines.length; t++) { + var r = this.lines[t]; + if (r.staff) + for (var a = 0; a < r.staff.length; a++) { + for (var n = r.staff[a], s = [], o = 0; o < n.voices.length; o++) { + var c = n.voices[o]; + s.push({ + hasOverlay: !1, + voice: [], + snip: [] + }); + for (var l = 0, h = !1, u = -1, d = 0; d < c.length; d++) { + var p = c[d]; + "overlay" !== p.el_type || h ? "bar" === p.el_type ? (h ? (h = !1, s[o].snip.push({ + start: u, + len: d - u + }), s[o].voice.push(p)) : (l > 0 && s[o].voice.push({ + el_type: "note", + duration: l, + rest: { + type: "invisible" + }, + startChar: p.startChar, + endChar: p.endChar + }), s[o].voice.push(p)), l = 0) : "note" === p.el_type ? h ? s[o].voice.push(p) : l += p.duration : "scale" !== p.el_type && "stem" !== p.el_type && "overlay" !== p.el_type && "style" !== p.el_type && "transpose" !== p.el_type || s[o].voice.push(p) : (e = !0, h = !0, u = d, s[o].hasOverlay = !0) + } + s[o].hasOverlay && 0 === s[o].snip.length && s[o].snip.push({ + start: u, + len: c.length - u + }) + } + for (o = 0; o < s.length; o++) { + var f = s[o]; + if (f.hasOverlay) { + n.voices.push(f.voice); + for (var m = f.snip.length - 1; m >= 0; m--) { + var g = f.snip[m]; + n.voices[o].splice(g.start, g.len) + } + for (m = 0; m < n.voices[n.voices.length - 1].length; m++) { + n.voices[n.voices.length - 1][m] = i.clone(n.voices[n.voices.length - 1][m]); + var v = n.voices[n.voices.length - 1][m]; + "bar" === v.el_type && v.startEnding && delete v.startEnding, "bar" === v.el_type && v.endEnding && delete v.endEnding + } + } + } + } + } + return e + }, this.cleanUp = function(e, t, r, n, s) { + this.closeLine(), this.metaText.tempo && this.metaText.tempo.bpm && !this.metaText.tempo.duration && (this.metaText.tempo.duration = [this.getBeatLength()]); + var o, c, l, h = !1; + for (o = 0; o < this.lines.length; o++) + if (void 0 !== this.lines[o].staff) { + var u = !1; + for (c = 0; c < this.lines[o].staff.length; c++) + if (void 0 === this.lines[o].staff[c]) h = !0, this.lines[o].staff[c] = null; + else + for (l = 0; l < this.lines[o].staff[c].voices.length; l++) void 0 === this.lines[o].staff[c].voices[l] ? this.lines[o].staff[c].voices[l] = [] : this.containsNotes(this.lines[o].staff[c].voices[l]) && (u = !0); + u || (this.lines[o] = null, h = !0) + } if (h && (this.lines = i.compact(this.lines), i.each(this.lines, (function(e) { + e.staff && (e.staff = i.compact(e.staff)) + }))), r) + for (; m(this.lines, r);); + if (n) { + for (h = !1, o = 0; o < this.lines.length; o++) + if (void 0 !== this.lines[o].staff) + for (c = 0; c < this.lines[o].staff.length; c++) { + var d = !1; + for (l = 0; l < this.lines[o].staff[c].voices.length; l++) this.containsNotesStrict(this.lines[o].staff[c].voices[l]) && (d = !0); + d || (h = !0, this.lines[o].staff[c] = null) + } + h && i.each(this.lines, (function(e) { + e.staff && (e.staff = i.compact(e.staff)) + })) + } + for (function(e) { + for (var t = !0, r = 0; r < e.length; r++) { + var i = e[r]; + if (i.staff) { + for (var a = 0; a < i.staff.length; a++) { + var n = i.staff[a]; + if (n.title) { + for (var s = !1, o = 0; o < n.title.length; o++) n.title[o] ? (n.title[o] = t ? n.title[o].name : n.title[o].subname, n.title[o] ? s = !0 : n.title[o] = "") : n.title[o] = ""; + s || delete n.title + } + } + t = !1 + } + } + }(this.lines), o = 0; o < this.lines.length; o++) + if (this.lines[o].staff) + for (c = 0; c < this.lines[o].staff.length; c++) delete this.lines[o].staff[c].workingClef; + for (; this.resolveOverlays();); + + function p(e) { + for (var t, r = function(e, r, a) { + if (void 0 === s[a]) { + for (t = 0; t < s.length; t++) + if (void 0 !== s[t]) { + a = t; + break + } if (void 0 === s[a]) { + var n = 100 * a + 1; + i.each(e.endSlur, (function(e) { + n === e && --n + })), s[a] = [n] + } + } + for (var o, c = 0; c < r; c++) o = s[a].pop(), e.endSlur.push(o); + return 0 === s[a].length && delete s[a], o + }, a = function(e, t, r, a) { + e.startSlur = [], void 0 === s[r] && (s[r] = []); + for (var n = 100 * r + 1, o = 0; o < t; o++) a && (i.each(a, (function(e) { + n === e && ++n + })), i.each(a, (function(e) { + n === e && ++n + })), i.each(a, (function(e) { + n === e && ++n + }))), i.each(s[r], (function(e) { + n === e && ++n + })), i.each(s[r], (function(e) { + n === e && ++n + })), s[r].push(n), e.startSlur.push({ + label: n + }), n++ + }, n = 0; n < e.length; n++) { + var o = e[n]; + if ("note" === o.el_type) { + if (o.gracenotes) + for (var c = 0; c < o.gracenotes.length; c++) { + if (o.gracenotes[c].endSlur) { + var l = o.gracenotes[c].endSlur; + o.gracenotes[c].endSlur = []; + for (var h = 0; h < l; h++) r(o.gracenotes[c], 1, 20) + } + o.gracenotes[c].startSlur && (t = o.gracenotes[c].startSlur, a(o.gracenotes[c], t, 20)) + } + if (o.endSlur && (t = o.endSlur, o.endSlur = [], r(o, t, 0)), o.startSlur && a(o, t = o.startSlur, 0), o.pitches) { + for (var u = [], d = 0; d < o.pitches.length; d++) + if (o.pitches[d].endSlur) { + var p = o.pitches[d].endSlur; + o.pitches[d].endSlur = []; + for (var f = 0; f < p; f++) { + var m = r(o.pitches[d], 1, d + 1); + u.push(m) + } + } for (d = 0; d < o.pitches.length; d++) o.pitches[d].startSlur && (t = o.pitches[d].startSlur, a(o.pitches[d], t, d + 1, u)); + o.gracenotes && o.pitches[0].endSlur && 100 === o.pitches[0].endSlur[0] && o.pitches[0].startSlur && (o.gracenotes[0].endSlur ? o.gracenotes[0].endSlur.push(o.pitches[0].startSlur[0].label) : o.gracenotes[0].endSlur = [o.pitches[0].startSlur[0].label], 1 === o.pitches[0].endSlur.length ? delete o.pitches[0].endSlur : 100 === o.pitches[0].endSlur[0] ? o.pitches[0].endSlur.shift() : 100 === o.pitches[0].endSlur[o.pitches[0].endSlur.length - 1] && o.pitches[0].endSlur.pop(), 1 === s[1].length ? delete s[1] : s[1].pop()) + } + } + } + } + + function f(e) { + a.fixClef(e) + } + + function m(e, t) { + for (o = 0; o < e.length; o++) + if (void 0 !== e[o].staff) + for (c = 0; c < e[o].staff.length; c++) { + var r = []; + for (l = 0; l < e[o].staff[c].voices.length; l++) + for (var a = e[o].staff[c].voices[l], n = 0, s = 0; s < a.length; s++) + if ("bar" === a[s].el_type) { + if (++n >= t && s < a.length - 1) { + var h = g(e, o); + if (!h) { + var u = JSON.parse(JSON.stringify(e[o])); + e.push(i.clone(u)), h = e[e.length - 1]; + for (var d = 0; d < h.staff.length; d++) + for (var p = 0; p < h.staff[d].voices.length; p++) h.staff[d].voices[p] = [] + } + var f = s + 1, + m = e[o].staff[c].voices[l].slice(f); + return e[o].staff[c].voices[l] = e[o].staff[c].voices[l].slice(0, f), h.staff[c].voices[l] = r.concat(m.concat(h.staff[c].voices[l])), !0 + } + } else a[s].duration || r.push(a[s]) + } + return !1 + } + + function g(e, t) { + for (t++; e.length > t;) { + if (e[t].staff) return e[t]; + t++ + } + return null + } + for (this.lineNum = 0; this.lineNum < this.lines.length; this.lineNum++) { + var v = this.lines[this.lineNum].staff; + if (v) + for (this.staffNum = 0; this.staffNum < v.length; this.staffNum++) + for (v[this.staffNum].clef && f(v[this.staffNum].clef), this.voiceNum = 0; this.voiceNum < v[this.staffNum].voices.length; this.voiceNum++) { + var b = v[this.staffNum].voices[this.voiceNum]; + p(b); + for (var y = 0; y < b.length; y++) "clef" === b[y].el_type && f(b[y]); + if (b.length > 0 && b[b.length - 1].barNumber) { + var w = g(this.lines, this.lineNum); + w && (w.staff[0].barNumber = b[b.length - 1].barNumber), delete b[b.length - 1].barNumber + } + } + } + return this.formatting.pagewidth || (this.formatting.pagewidth = e), this.formatting.pageheight || (this.formatting.pageheight = t), delete this.staffNum, delete this.voiceNum, delete this.lineNum, delete this.potentialStartBeam, delete this.potentialEndBeam, delete this.vskipPending, s + }, this.reset(), this.getLastNote = function() { + if (this.lines[this.lineNum] && this.lines[this.lineNum].staff && this.lines[this.lineNum].staff[this.staffNum] && this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]) + for (var e = this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum].length - 1; e >= 0; e--) { + var t = this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum][e]; + if ("note" === t.el_type) return t + } + return null + }, this.addTieToLastNote = function() { + var e = this.getLastNote(); + return !!(e && e.pitches && e.pitches.length > 0) && (e.pitches[0].startTie = {}, !0) + }, this.getDuration = function(e) { + return e.duration ? e.duration : 0 + }, this.closeLine = function() { + this.potentialStartBeam && this.potentialEndBeam && (this.potentialStartBeam.startBeam = !0, this.potentialEndBeam.endBeam = !0), delete this.potentialStartBeam, delete this.potentialEndBeam + }, this.appendElement = function(e, t, r, a) { + var n = this; + a.el_type = e, null !== t && (a.startChar = t), null !== r && (a.endChar = r); + var s = function() { + void 0 !== n.potentialStartBeam && void 0 !== n.potentialEndBeam && (n.potentialStartBeam.startBeam = !0, n.potentialEndBeam.endBeam = !0), delete n.potentialStartBeam, delete n.potentialEndBeam + }; + "note" === e ? n.getDuration(a) >= .25 || a.force_end_beam_last && void 0 !== n.potentialStartBeam ? s() : a.end_beam && void 0 !== n.potentialStartBeam ? void 0 === a.rest ? (n.potentialStartBeam.startBeam = !0, a.endBeam = !0, delete n.potentialStartBeam, delete n.potentialEndBeam) : s() : void 0 === a.rest && (void 0 === n.potentialStartBeam ? a.end_beam || (n.potentialStartBeam = a, delete n.potentialEndBeam) : n.potentialEndBeam = a) : s(); + delete a.end_beam, delete a.force_end_beam_last, + function(e) { + var t = n.lines[n.lineNum].staff[n.staffNum]; + if (t) { + if (void 0 !== e.pitches) { + var r = t.workingClef.verticalPos; + i.each(e.pitches, (function(e) { + e.verticalPos = e.pitch - r + })) + } + if (void 0 !== e.gracenotes) { + var a = t.workingClef.verticalPos; + i.each(e.gracenotes, (function(e) { + e.verticalPos = e.pitch - a + })) + } + t.voices[n.voiceNum].push(e) + } + }(a) + }, this.appendStartingElement = function(e, t, r, a) { + var n; + this.closeLine(), "key" === e && (n = a.impliedNaturals, delete a.impliedNaturals, delete a.explicitAccidentals); + var s = i.clone(a); + if (this.lines[this.lineNum].staff) { + this.lines[this.lineNum].staff.length <= this.staffNum && (this.lines[this.lineNum].staff[this.staffNum] = {}, this.lines[this.lineNum].staff[this.staffNum].clef = i.clone(this.lines[this.lineNum].staff[0].clef), this.lines[this.lineNum].staff[this.staffNum].key = i.clone(this.lines[this.lineNum].staff[0].key), this.lines[this.lineNum].staff[0].meter && (this.lines[this.lineNum].staff[this.staffNum].meter = i.clone(this.lines[this.lineNum].staff[0].meter)), this.lines[this.lineNum].staff[this.staffNum].workingClef = i.clone(this.lines[this.lineNum].staff[0].workingClef), this.lines[this.lineNum].staff[this.staffNum].voices = [ + [] + ]), "clef" === e && (this.lines[this.lineNum].staff[this.staffNum].workingClef = s); + for (var o = this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum], c = 0; c < o.length; c++) { + if ("note" === o[c].el_type || "bar" === o[c].el_type) return s.el_type = e, s.startChar = t, s.endChar = r, n && (s.accidentals = n.concat(s.accidentals)), void o.push(s); + if (o[c].el_type === e) return s.el_type = e, s.startChar = t, s.endChar = r, n && (s.accidentals = n.concat(s.accidentals)), void(o[c] = s) + } + this.lines[this.lineNum].staff[this.staffNum][e] = a + } + }, this.getNumLines = function() { + return this.lines.length + }, this.pushLine = function(e) { + this.vskipPending && (e.vskip = this.vskipPending, delete this.vskipPending), this.lines.push(e) + }, this.addSubtitle = function(e) { + this.pushLine({ + subtitle: e + }) + }, this.addSpacing = function(e) { + this.vskipPending = e + }, this.addNewPage = function(e) { + this.pushLine({ + newpage: e + }) + }, this.addSeparator = function(e, t, r) { + this.pushLine({ + separator: { + spaceAbove: e, + spaceBelow: t, + lineLength: r + } + }) + }, this.addText = function(e) { + this.pushLine({ + text: e + }) + }, this.addCentered = function(e) { + this.pushLine({ + text: [{ + text: e, + center: !0 + }] + }) + }, this.containsNotes = function(e) { + for (var t = 0; t < e.length; t++) + if ("note" === e[t].el_type || "bar" === e[t].el_type) return !0; + return !1 + }, this.containsNotesStrict = function(e) { + for (var t = 0; t < e.length; t++) + if ("note" === e[t].el_type && void 0 === e[t].rest) return !0; + return !1 + }, this.changeVoiceScale = function(e) { + this.appendElement("scale", null, null, { + size: e + }) + }, this.startNewLine = function(e) { + var t = this; + this.closeLine(); + var r = function(e) { + var r = t.lines[t.lineNum].staff[t.staffNum]; + if (r.voices[t.voiceNum] = [], r.title || (r.title = []), r.title[t.voiceNum] = { + name: e.name, + subname: e.subname + }, e.style && t.appendElement("style", null, null, { + head: e.style + }), e.stem) t.appendElement("stem", null, null, { + direction: e.stem + }); + else if (t.voiceNum > 0) { + if (void 0 !== r.voices[0]) { + for (var i = !1, a = 0; a < r.voices[0].length; a++) "stem" === r.voices[0].el_type && (i = !0); + if (!i) { + r.voices[0].splice(0, 0, { + el_type: "stem", + direction: "up" + }) + } + } + t.appendElement("stem", null, null, { + direction: "down" + }) + } + e.scale && t.appendElement("scale", null, null, { + size: e.scale + }) + }, + i = function(e) { + e.key && e.key.impliedNaturals && (e.key.accidentals = e.key.accidentals.concat(e.key.impliedNaturals), delete e.key.impliedNaturals), t.lines[t.lineNum].staff[t.staffNum] = { + voices: [], + clef: e.clef, + key: e.key, + workingClef: e.clef + }, void 0 !== e.stafflines && (t.lines[t.lineNum].staff[t.staffNum].clef.stafflines = e.stafflines, t.lines[t.lineNum].staff[t.staffNum].workingClef.stafflines = e.stafflines), e.staffscale && (t.lines[t.lineNum].staff[t.staffNum].staffscale = e.staffscale), e.tripletfont && (t.lines[t.lineNum].staff[t.staffNum].tripletfont = e.tripletfont), e.vocalfont && (t.lines[t.lineNum].staff[t.staffNum].vocalfont = e.vocalfont), e.bracket && (t.lines[t.lineNum].staff[t.staffNum].bracket = e.bracket), e.brace && (t.lines[t.lineNum].staff[t.staffNum].brace = e.brace), e.connectBarLines && (t.lines[t.lineNum].staff[t.staffNum].connectBarLines = e.connectBarLines), e.barNumber && (t.lines[t.lineNum].staff[t.staffNum].barNumber = e.barNumber), r(e), e.part && t.appendElement("part", e.part.startChar, e.part.endChar, { + title: e.part.title + }), void 0 !== e.meter && (t.lines[t.lineNum].staff[t.staffNum].meter = e.meter) + }; + if (void 0 === this.lines[this.lineNum]) ! function(e) { + t.lines[t.lineNum] = { + staff: [] + }, i(e) + }(e); + else if (void 0 === this.lines[this.lineNum].staff) this.lineNum++, this.startNewLine(e); + else if (void 0 === this.lines[this.lineNum].staff[this.staffNum]) i(e); + else if (void 0 === this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]) r(e); + else { + if (!this.containsNotes(this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum])) return; + this.lineNum++, this.startNewLine(e) + } + }, this.setBarNumberImmediate = function(e) { + var t = this.getCurrentVoice(); + if (t && t.length > 0) { + var r = t[t.length - 1]; + if ("bar" !== r.el_type) return e - 1; + void 0 !== r.barNumber && (r.barNumber = e) + } + return e + }, this.hasBeginMusic = function() { + for (var e = 0; e < this.lines.length; e++) + if (this.lines[e].staff) return !0; + return !1 + }, this.isFirstLine = function(e) { + for (var t = e - 1; t >= 0; t--) + if (void 0 !== this.lines[t].staff) return !1; + return !0 + }, this.getMeter = function() { + for (var e = 0; e < this.lines.length; e++) { + var t = this.lines[e]; + if (t.staff) + for (var r = 0; r < t.staff.length; r++) { + var i = t.staff[r].meter; + if (i) return i + } + } + return { + type: "common_time" + } + }, this.getMeterFraction = function() { + var e = this.getMeter(), + t = 4, + r = 4; + return e && ("specified" === e.type ? (t = parseInt(e.value[0].num, 10), r = parseInt(e.value[0].den, 10)) : "cut_time" === e.type ? (t = 2, r = 2) : "common_time" === e.type && (t = 4, r = 4)), this.meter = { + num: t, + den: r + }, this.meter + }, this.getKeySignature = function() { + for (var e = 0; e < this.lines.length; e++) { + var t = this.lines[e]; + if (t.staff) + for (var r = 0; r < t.staff.length; r++) + if (t.staff[r].key) return t.staff[r].key + } + return {} + }, this.getCurrentVoice = function() { + return void 0 !== this.lines[this.lineNum] && void 0 !== this.lines[this.lineNum].staff[this.staffNum] && void 0 !== this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum] ? this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum] : null + }, this.setCurrentVoice = function(e, t) { + this.staffNum = e, this.voiceNum = t; + for (var r = 0; r < this.lines.length; r++) + if (this.lines[r].staff && (void 0 === this.lines[r].staff[e] || void 0 === this.lines[r].staff[e].voices[t] || !this.containsNotes(this.lines[r].staff[e].voices[t]))) return void(this.lineNum = r); + this.lineNum = r + }, this.addMetaText = function(e, t) { + void 0 === this.metaText[e] ? this.metaText[e] = t : this.metaText[e] += "\n" + t + }, this.addMetaTextArray = function(e, t) { + void 0 === this.metaText[e] ? this.metaText[e] = [t] : this.metaText[e].push(t) + }, this.addMetaTextObj = function(e, t) { + this.metaText[e] = t + }, this.addElementToEvents = function(e, t, r, a, n, s, o, c, l, h) { + if (t.hint) return { + isTiedState: void 0, + duration: 0 + }; + var u = t.durationClass ? t.durationClass : t.duration; + if (t.abcelem.rest && "spacer" === t.abcelem.rest.type && (u = 0), u > 0) { + for (var d = [], p = 0; p < t.elemset.length; p++) null !== t.elemset[p] && d.push(t.elemset[p]); + var f = t.startTie; + if (void 0 !== l) e["event" + l].elements.push(d), h && (e["event" + r] || (e["event" + r] = { + type: "event", + milliseconds: r, + line: s, + measureNumber: o, + top: a, + height: n, + left: null, + width: 0, + elements: [], + startChar: null, + endChar: null, + startCharArray: [], + endCharArray: [] + }), e["event" + r].measureStart = !0, h = !1), f || (l = void 0); + else { + if (e["event" + r]) { + if (e["event" + r].left ? e["event" + r].left = Math.min(e["event" + r].left, t.x) : e["event" + r].left = t.x, e["event" + r].elements.push(d), e["event" + r].startCharArray.push(t.abcelem.startChar), e["event" + r].endCharArray.push(t.abcelem.endChar), null === e["event" + r].startChar && (e["event" + r].startChar = t.abcelem.startChar), null === e["event" + r].endChar && (e["event" + r].endChar = t.abcelem.endChar), t.abcelem.midiPitches && t.abcelem.midiPitches.length) { + e["event" + r].midiPitches || (e["event" + r].midiPitches = []); + for (p = 0; p < t.abcelem.midiPitches.length; p++) e["event" + r].midiPitches.push(t.abcelem.midiPitches[p]) + } + if (t.abcelem.midiGraceNotePitches && t.abcelem.midiGraceNotePitches.length) { + e["event" + r].midiGraceNotePitches || (e["event" + r].midiGraceNotePitches = []); + for (var m = 0; m < t.abcelem.midiGraceNotePitches.length; m++) e["event" + r].midiGraceNotePitches.push(t.abcelem.midiGraceNotePitches[m]) + } + } else e["event" + r] = { + type: "event", + milliseconds: r, + line: s, + measureNumber: o, + top: a, + height: n, + left: t.x, + width: t.w, + elements: [d], + startChar: t.abcelem.startChar, + endChar: t.abcelem.endChar, + startCharArray: [t.abcelem.startChar], + endCharArray: [t.abcelem.endChar], + midiPitches: t.abcelem.midiPitches ? i.cloneArray(t.abcelem.midiPitches) : [] + }, t.abcelem.midiGraceNotePitches && (e["event" + r].midiGraceNotePitches = i.cloneArray(t.abcelem.midiGraceNotePitches)); + h && (e["event" + r].measureStart = !0, h = !1), f && (l = r) + } + } + return { + isTiedState: l, + duration: u / c, + nextIsBar: h || "bar" === t.type + } + }, this.makeVoicesArray = function() { + for (var e = [], t = 0; t < this.engraver.staffgroups.length; t++) + for (var r = this.engraver.staffgroups[t], i = r.staffs[0], a = i.absoluteY, s = a - i.top * n.STEP, o = r.staffs[r.staffs.length - 1], c = (a = o.absoluteY) - o.bottom * n.STEP - s, l = r.voices, h = 0; h < l.length; h++) { + var u = 0, + d = !1; + e[h] || (e[h] = []); + for (var p = l[h].children, f = 0; f < p.length; f++) e[h].push({ + top: s, + height: c, + line: t, + measureNumber: u, + elem: p[f] + }), "bar" === p[f].type && d && u++, "note" !== p[f].type && "rest" !== p[f].type || (d = !0) + } + return e + }, this.setupEvents = function(e, t, r) { + for (var i, a = [], n = {}, s = e, o = !0, c = this.makeVoicesArray(), l = 0; l < c.length; l++) + for (var h = s, u = Math.round(1e3 * h), d = 0, p = -1, f = c[l], m = 0; m < f.length; m++) { + var g = f[m].elem; + if ("tempo" === g.abcelem.el_type) { + r = this.getBpm(g.abcelem); + t = this.getBeatLength() * (r / 60) + } + var v = this.addElementToEvents(n, g, u, f[m].top, f[m].height, f[m].line, f[m].measureNumber, t, i, o); + if (i = v.isTiedState, o = v.nextIsBar, h += v.duration, u = Math.round(1e3 * h), "bar" === g.type) { + var b = g.abcelem.type, + y = "bar_right_repeat" === b || "bar_dbl_repeat" === b, + w = "1" === g.abcelem.startEnding, + k = "bar_left_repeat" === b || "bar_dbl_repeat" === b || "bar_right_repeat" === b; + if (y) { + -1 === p && (p = m); + for (var x = d; x < p; x++) { + var S = f[x].elem; + i = (v = this.addElementToEvents(n, S, u, f[x].top, f[x].height, f[x].line, f[x].measureNumber, t, i, o)).isTiedState, o = v.nextIsBar, h += v.duration, u = Math.round(1e3 * h) + } + o = !0, p = -1 + } + w && (p = m), k && (d = m) + } + } + return function(e) { + for (var t, r, i, a, n = e.length - 1; n >= 0; n--) { + var s = e[n]; + "bar" === s.type ? (s.top = i, s.nextTop = t, t = i, s.bottom = a, s.nextBottom = r, r = a) : "event" === s.type && (i = s.top, a = s.top + s.height) + } + }(a = function(e) { + var t = []; + for (var r in e) e.hasOwnProperty(r) && t.push(e[r]); + return t = t.sort((function(e, t) { + var r = e.milliseconds - t.milliseconds; + return 0 !== r ? r : "bar" === e.type ? -1 : 1 + })) + }(n)), a.push({ + type: "end", + milliseconds: u + }), this.addUsefulCallbackInfo(a, r), a + }, this.addUsefulCallbackInfo = function(e, t) { + for (var r = this.millisecondsPerMeasure(t), i = 0; i < e.length; i++) { + e[i].millisecondsPerMeasure = r + } + }, this.getBpm = function(e) { + var t; + if (e) { + t = e.bpm; + var r = this.getBeatLength(); + t = t * (e.duration && e.duration.length > 0 ? e.duration[0] : r) / r + } + if (!t) { + t = 180; + var i = this.getMeterFraction(); + i && 8 === i.den && (t = 120) + } + return t + }, this.setTiming = function(e, t) { + if (!e) { + var r = this.metaText ? this.metaText.tempo : null; + e = this.getBpm(r) + } + var i = this.getBeatLength(), + a = e / 60, + n = this.getBarLength() / i * t / a; + n && (n -= this.getPickupLength() / i / a); + var s = i * a; + this.noteTimings = this.setupEvents(n, s, e) + } + } +}, function(e, t, r) { + var i = r(1), + a = r(34), + n = r(48), + s = function(e, t) { + t = t || {}, this.responsive = t.responsive, this.space = 3 * i.SPACE, this.scale = t.scale ? parseFloat(t.scale) : 0, this.scale > .1 || (this.scale = void 0), t.staffwidth ? (this.staffwidthScreen = t.staffwidth, this.staffwidthPrint = t.staffwidth) : (this.staffwidthScreen = 740, this.staffwidthPrint = 680), this.editable = t.editable || !1, this.listeners = [], t.clickListener && this.addSelectListener(t.clickListener), this.renderer = new n(e, t.regression, t.add_classes), this.renderer.setPaddingOverride(t), this.renderer.controller = this, this.reset() + }; + + function o(e, t, r, i, a, n, s) { + return e && i / r < .66 && !t || Math.abs(r - i) < 2 ? null : n > 0 ? ((a = (r - (i - n * a)) / n) * s > 50 && (a = 50 / s), a) : null + } + s.prototype.reset = function() { + this.selected = [], this.ingroup = !1, this.staffgroups = [], this.lastStaffGroupIndex = -1, this.engraver && this.engraver.reset(), this.engraver = null, this.renderer.reset() + }, s.prototype.engraveABC = function(e, t) { + void 0 === e[0] && (e = [e]), this.reset(); + for (var r = 0; r < e.length; r++) void 0 === t && (t = r), this.engraveTune(e[r], t); + if (this.renderer.doRegression) return this.renderer.regressionLines.join("\n") + }, s.prototype.adjustNonScaledItems = function(e) { + this.width /= e, this.renderer.adjustNonScaledItems(e) + }, s.prototype.getMeasureWidths = function(e) { + this.reset(), this.renderer.lineNumber = null, this.renderer.newTune(e), this.engraver = new a(this.renderer, 0, { + bagpipes: e.formatting.bagpipes, + flatbeams: e.formatting.flatbeams + }), this.engraver.setStemHeight(this.renderer.spacing.stemHeight), e.formatting.staffwidth ? this.width = 1.33 * e.formatting.staffwidth : this.width = this.renderer.isPrint ? this.staffwidthPrint : this.staffwidthScreen; + var t = e.formatting.scale ? e.formatting.scale : this.scale; + "resize" === this.responsive && (t = void 0), void 0 === t && (t = this.renderer.isPrint ? .75 : 1), this.adjustNonScaledItems(t); + var r = { + left: 0, + measureWidths: [], + height: 0, + total: 0 + }; + r.height = this.renderer.padding.top + this.renderer.spacing.music + this.renderer.padding.bottom + 24; + for (var n = !1, s = 0; s < e.lines.length; s++) { + var o = e.lines[s]; + if (o.staff) { + if (o.staffGroup = this.engraver.createABCLine(o.staff, n ? null : e.metaText.tempo), o.staffGroup.layout(0, this.renderer, !1), o.staffGroup.voices.length > 0) + for (var c = o.staffGroup.voices[0], l = !1, h = 0, u = 0; u < c.children.length; u++) { + var d = c.children[u]; + l || d.isClef || d.isKeySig || (l = !0, r.left = d.x, h = d.x), "bar" === d.type && (r.measureWidths.push(d.x - h), r.total += d.x - h, h = d.x) + } + n = !0, r.height += o.staffGroup.calcHeight() * i.STEP + } + } + return r + }, s.prototype.engraveTune = function(e, t) { + this.renderer.lineNumber = null, this.renderer.newTune(e), this.engraver = new a(this.renderer, t, { + bagpipes: e.formatting.bagpipes, + flatbeams: e.formatting.flatbeams + }), this.engraver.setStemHeight(this.renderer.spacing.stemHeight), this.engraver.measureLength = e.getMeterFraction().num / e.getMeterFraction().den, e.formatting.staffwidth ? this.width = 1.33 * e.formatting.staffwidth : this.width = this.renderer.isPrint ? this.staffwidthPrint : this.staffwidthScreen; + var r, i, n = e.formatting.scale ? e.formatting.scale : this.scale; + "resize" === this.responsive && (n = void 0), void 0 === n && (n = this.renderer.isPrint ? .75 : 1), this.adjustNonScaledItems(n); + var s = !1; + for (r = 0; r < e.lines.length; r++)(i = e.lines[r]).staff && (i.staffGroup = this.engraver.createABCLine(i.staff, s ? null : e.metaText.tempo), s = !0); + var o = this.width; + for (r = 0; r < e.lines.length; r++)(i = e.lines[r]).staff && (this.setXSpacing(i.staffGroup, e.formatting, r === e.lines.length - 1, !1), i.staffGroup.w > o && (o = i.staffGroup.w)); + for (r = 0; r < e.lines.length; r++) + if ((i = e.lines[r]).staffGroup && i.staffGroup.voices) { + for (var c = 0; c < i.staffGroup.voices.length; c++) i.staffGroup.voices[c].layoutBeams(); + i.staffGroup.setUpperAndLowerElements(this.renderer) + } for (r = 0; r < e.lines.length; r++)(i = e.lines[r]).staffGroup && (i.staffGroup.height = i.staffGroup.calcHeight()); + this.renderer.topMargin(e), this.renderer.engraveTopText(this.width, e), this.renderer.addMusicPadding(), this.staffgroups = [], this.lastStaffGroupIndex = -1; + for (var l = 0; l < e.lines.length; l++) this.renderer.lineNumber = l, (i = e.lines[l]).staff ? this.engraveStaffLine(i.staffGroup) : i.subtitle && 0 !== l ? this.renderer.outputSubtitle(this.width, i.subtitle) : void 0 !== i.text ? this.renderer.outputFreeText(i.text, i.vskip) : void 0 !== i.separator && this.renderer.outputSeparator(i.separator); + this.renderer.moveY(24), this.renderer.engraveExtraText(this.width, e), this.renderer.setPaperSize(o, n, this.responsive) + }, s.prototype.setXSpacing = function(e, t, r, i) { + for (var a = this.space, n = 0; n < 8; n++) { + var s = e.layout(a, this.renderer, i); + if (a = o(r, !!t.stretchlast && t.stretchlast, this.width + this.renderer.padding.left, e.w, a, s.spacingUnits, s.minSpace), i && console.log("setXSpace", n, e.w, a, e.minspace), null === a) break + }! function(e) { + for (var t = 0; t < e.length; t++) + for (var r = e[t], i = 1; i < r.children.length - 1; i++) { + var a = r.children[i]; + if (a.abcelem.rest && ("whole" === a.abcelem.rest.type || "multimeasure" === a.abcelem.rest.type)) { + var n = r.children[i - 1], + s = (r.children[i + 1].x - n.x) / 2 + n.x; + a.x = s - a.w / 2; + for (var o = 0; o < a.children.length; o++) a.children[o].x = a.x + } + } + }(e.voices) + }, s.prototype.engraveStaffLine = function(e) { + this.lastStaffGroupIndex > -1 && this.renderer.addStaffPadding(this.staffgroups[this.lastStaffGroupIndex], e), this.renderer.voiceNumber = null, e.draw(this.renderer); + var t = e.height * i.STEP; + this.staffgroups[this.staffgroups.length] = e, this.lastStaffGroupIndex = this.staffgroups.length - 1, this.renderer.y += t + }, s.prototype.notifySelect = function(e, t, r) { + this.clearSelection(), e.highlight && (this.selected = [e], e.highlight()); + for (var i = e.abcelem || {}, a = 0; a < this.listeners.length; a++) this.listeners[a](i, t, r) + }, s.prototype.clearSelection = function() { + for (var e = 0; e < this.selected.length; e++) this.selected[e].unhighlight(); + this.selected = [] + }, s.prototype.addSelectListener = function(e) { + this.listeners[this.listeners.length] = e + }, s.prototype.rangeHighlight = function(e, t) { + this.clearSelection(); + for (var r = 0; r < this.staffgroups.length; r++) + for (var i = this.staffgroups[r].voices, a = 0; a < i.length; a++) + for (var n = i[a].children, s = 0; s < n.length; s++) { + var o = n[s].abcelem.startChar, + c = n[s].abcelem.endChar; + (t > o && e < c || t === e && t === c) && (this.selected[this.selected.length] = n[s], n[s].highlight()) + } + }, e.exports = s +}, function(e, t) { + var r = function(e) { + this.anchor1 = e.anchor1, this.anchor2 = e.anchor2, e.isGrace && (this.isGrace = !0), e.fixedY && (this.fixedY = !0), e.stemDir && (this.stemDir = e.stemDir), void 0 !== e.voiceNumber && (this.voiceNumber = e.voiceNumber), this.internalNotes = [] + }; + r.prototype.addInternalNote = function(e) { + this.internalNotes.push(e) + }, r.prototype.setEndAnchor = function(e) { + this.anchor2 = e + }, r.prototype.setStartX = function(e) { + this.startLimitX = e + }, r.prototype.setEndX = function(e) { + this.endLimitX = e + }, r.prototype.setHint = function() { + this.hint = !0 + }, r.prototype.setUpperAndLowerElements = function(e) {}, r.prototype.calcTieDirection = function() { + if (this.isGrace) this.above = !1; + else if (0 === this.voiceNumber) this.above = !0; + else if (this.voiceNumber > 0) this.above = !1; + else { + var e; + e = this.anchor1 ? this.anchor1.pitch : this.anchor2 ? this.anchor2.pitch : 14, this.anchor1 && "down" === this.anchor1.stemDir && this.anchor2 && "down" === this.anchor2.stemDir ? this.above = !0 : this.anchor1 && "up" === this.anchor1.stemDir && this.anchor2 && "up" === this.anchor2.stemDir ? this.above = !1 : this.anchor1 && this.anchor2 ? this.above = e >= 6 : this.anchor1 ? this.above = "down" === this.anchor1.stemDir : this.anchor2 ? this.above = "down" === this.anchor2.stemDir : this.above = e >= 6 + } + }, r.prototype.calcSlurDirection = function() { + if (this.isGrace) this.above = !1; + else if (0 === this.voiceNumber) this.above = !0; + else if (this.voiceNumber > 0) this.above = !1; + else { + var e = !1; + this.anchor1 && "down" === this.anchor1.stemDir && (e = !0), this.anchor2 && "down" === this.anchor2.stemDir && (e = !0); + for (var t = 0; t < this.internalNotes.length; t++) { + "down" === this.internalNotes[t].stemDir && (e = !0) + } + this.above = e + } + }, r.prototype.calcX = function(e, t) { + this.anchor1 ? (this.startX = this.anchor1.x, this.anchor1.scalex < 1 && (this.startX -= 3)) : this.startLimitX ? this.startX = this.startLimitX.x + this.startLimitX.w : this.startX = e, this.anchor2 ? this.endX = this.anchor2.x : this.endLimitX ? this.endX = this.endLimitX.x : this.endX = t + }, r.prototype.calcTieY = function() { + this.anchor1 ? this.startY = this.anchor1.pitch : this.anchor2 ? this.startY = this.anchor2.pitch : this.startY = this.above ? 14 : 0, this.anchor2 ? this.endY = this.anchor2.pitch : this.anchor1 ? this.endY = this.anchor1.pitch : this.endY = this.above ? 14 : 0 + }, r.prototype.calcSlurY = function() { + if (this.anchor1 && this.anchor2) { + this.above && "up" === this.anchor1.stemDir && !this.fixedY ? (this.startY = (this.anchor1.highestVert + this.anchor1.pitch) / 2, this.startX += this.anchor1.w / 2) : this.startY = this.anchor1.pitch; + var e = this.anchor2.parent.beam && this.anchor2.parent.beam.stemsUp && this.anchor2.parent.beam.elems[0] !== this.anchor2.parent, + t = (this.anchor2.highestVert + this.anchor2.pitch) / 2; + this.above && "up" === this.anchor2.stemDir && !this.fixedY && !e && t < this.startY ? (this.endY = t, this.endX += this.anchor2.w / 2) : this.endY = this.above && e ? this.anchor2.highestVert : this.anchor2.pitch + } else this.anchor1 ? this.startY = this.endY = this.anchor1.pitch : this.anchor2 ? this.startY = this.endY = this.anchor2.pitch : (this.startY = this.above ? 14 : 0, this.endY = this.above ? 14 : 0) + }, r.prototype.avoidCollisionAbove = function() { + if (this.above) { + for (var e = -50, t = 0; t < this.internalNotes.length; t++) this.internalNotes[t].highestVert > e && (e = this.internalNotes[t].highestVert); + e > this.startY && e > this.endY && (this.startY = this.endY = e - 1) + } + }, r.prototype.layout = function(e, t) { + this.anchor1 && this.anchor2 ? this.anchor1.pitch === this.anchor2.pitch && 0 === this.internalNotes.length ? this.isTie = !0 : this.isTie = !1 : this.isTie = !0, this.isTie ? (this.calcTieDirection(), this.calcX(e, t), this.calcTieY()) : (this.calcSlurDirection(), this.calcX(e, t), this.calcSlurY()), this.avoidCollisionAbove() + }, r.prototype.draw = function(e, t, r) { + var i; + this.layout(t, r), this.hint && (i = "abcjs-hint"); + var a = this.fixedY ? 1.5 : 0; + e.drawArc(this.startX, this.endX, this.startY + a, this.endY + a, this.above, i, this.isTie) + }, e.exports = r +}, function(e, t) { + e.exports = {} +}, function(e, t) { + e.exports = { + 21: "A0", + 22: "Bb0", + 23: "B0", + 24: "C1", + 25: "Db1", + 26: "D1", + 27: "Eb1", + 28: "E1", + 29: "F1", + 30: "Gb1", + 31: "G1", + 32: "Ab1", + 33: "A1", + 34: "Bb1", + 35: "B1", + 36: "C2", + 37: "Db2", + 38: "D2", + 39: "Eb2", + 40: "E2", + 41: "F2", + 42: "Gb2", + 43: "G2", + 44: "Ab2", + 45: "A2", + 46: "Bb2", + 47: "B2", + 48: "C3", + 49: "Db3", + 50: "D3", + 51: "Eb3", + 52: "E3", + 53: "F3", + 54: "Gb3", + 55: "G3", + 56: "Ab3", + 57: "A3", + 58: "Bb3", + 59: "B3", + 60: "C4", + 61: "Db4", + 62: "D4", + 63: "Eb4", + 64: "E4", + 65: "F4", + 66: "Gb4", + 67: "G4", + 68: "Ab4", + 69: "A4", + 70: "Bb4", + 71: "B4", + 72: "C5", + 73: "Db5", + 74: "D5", + 75: "Eb5", + 76: "E5", + 77: "F5", + 78: "Gb5", + 79: "G5", + 80: "Ab5", + 81: "A5", + 82: "Bb5", + 83: "B5", + 84: "C6", + 85: "Db6", + 86: "D6", + 87: "Eb6", + 88: "E6", + 89: "F6", + 90: "Gb6", + 91: "G6", + 92: "Ab6", + 93: "A6", + 94: "Bb6", + 95: "B6", + 96: "C7", + 97: "Db7", + 98: "D7", + 99: "Eb7", + 100: "E7", + 101: "F7", + 102: "Gb7", + 103: "G7", + 104: "Ab7", + 105: "A7", + 106: "Bb7", + 107: "B7", + 108: "C8", + 109: "Db8", + 110: "D8", + 111: "Eb8", + 112: "E8", + 113: "F8", + 114: "Gb8", + 115: "G8", + 116: "Ab8", + 117: "A8", + 118: "Bb8", + 119: "B8", + 120: "C9", + 121: "Db9" + } +}, function(e, t) { + e.exports = function() { + var e = this; + e.tracks = [], e.totalDuration = 0, e.addTrack = function() { + return e.tracks.push([]), e.tracks.length - 1 + }, e.setInstrument = function(t, r) { + e.tracks[t].push({ + channel: 0, + cmd: "program", + instrument: r + }) + }, e.appendNote = function(t, r, i, a) { + e.tracks[t].push({ + cmd: "start", + pitch: r - 60, + volume: a + }), e.tracks[t].push({ + cmd: "move", + duration: i + }), e.tracks[t].push({ + cmd: "stop", + pitch: r - 60 + }); + var n = 0; + e.tracks[t].forEach((function(e) { + e.duration && (n += e.duration) + })), e.totalDuration = Math.max(e.totalDuration, n) + } + } +}, function(e, t, r) { + var i = r(7), + a = r(15), + n = r(6), + s = r(0); + + function o(e, t, r, s, o) { + var l = !0; + if (n() ? l = "suspended" === n().state : a(), !i()) throw { + status: "NotSupported", + message: "This browser does not support audio." + }; + (l || o) && r && r.classList.add("abcjs-loading"), l ? n().resume().then((function() { + s ? s().then((function(i) { + c(e, t, r, o) + })) : c(e, t, r, o) + })) : c(e, t, r, o) + } + + function c(e, t, r, i) { + i ? e(t).then((function() { + r && r.classList.remove("abcjs-loading") + })) : (e(t), r && r.classList.remove("abcjs-loading")) + } + e.exports = function(e, t) { + var r = this; + if ("string" == typeof e) { + var i = e; + if (!(e = document.querySelector(i))) throw new Error('Cannot find element "' + i + '" in the DOM.') + } else if (!(e instanceof HTMLElement)) throw new Error("The first parameter must be a valid element or selector in the DOM."); + if (r.parent = e, r.options = {}, t && (r.options = s.clone(t)), r.options.ac && a(r.options.ac), function(e, t) { + var r = !!t.loopHandler, + i = !!t.restartHandler, + a = !!t.playHandler || !!t.playPromiseHandler, + n = !!t.progressHandler, + s = !!t.warpHandler, + o = !1 !== t.hasClock, + c = '
\n'; + if (r) { + var l = t.repeatTitle ? t.repeatTitle : "Click to toggle play once/repeat.", + h = t.repeatAria ? t.repeatAria : l; + c += '\n' + } + if (i) { + var u = t.restartTitle ? t.restartTitle : "Click to go to beginning.", + d = t.restartAria ? t.restartAria : u; + c += '\n' + } + if (a) { + var p = t.playTitle ? t.playTitle : "Click to play/pause.", + f = t.playAria ? t.playAria : p; + c += '\n' + } + if (n) { + var m = t.randomTitle ? t.randomTitle : "Click to change the playback position.", + g = t.randomAria ? t.randomAria : m; + c += '\n' + } + o && (c += '\n'); + if (s) { + var v = t.warpTitle ? t.warpTitle : "Change the playback speed.", + b = t.warpAria ? t.warpAria : v, + y = t.bpm ? t.bpm : "BPM"; + c += ' ( ' + y + ")\n" + } + c += "
\n", e.innerHTML = c + }(r.parent, r.options), function(e) { + var t = !!e.options.loopHandler, + r = !!e.options.restartHandler, + i = !!e.options.playHandler || !!e.options.playPromiseHandler, + a = !!e.options.progressHandler, + n = !!e.options.warpHandler, + s = e.parent.querySelector(".abcjs-midi-start"); + t && e.parent.querySelector(".abcjs-midi-loop").addEventListener("click", (function(t) { + o(e.options.loopHandler, t, s, e.options.afterResume) + })); + r && e.parent.querySelector(".abcjs-midi-reset").addEventListener("click", (function(t) { + o(e.options.restartHandler, t, s, e.options.afterResume) + })); + i && s.addEventListener("click", (function(t) { + o(e.options.playPromiseHandler || e.options.playHandler, t, s, e.options.afterResume, !!e.options.playPromiseHandler) + })); + a && e.parent.querySelector(".abcjs-midi-progress-background").addEventListener("click", (function(t) { + o(e.options.progressHandler, t, s, e.options.afterResume) + })); + n && e.parent.querySelector(".abcjs-midi-tempo").addEventListener("change", (function(t) { + o(e.options.warpHandler, t, s, e.options.afterResume) + })) + }(r), r.setTempo = function(e) { + var t = r.parent.querySelector(".abcjs-midi-current-tempo"); + t && (t.innerHTML = e) + }, r.resetAll = function() { + for (var e = r.parent.querySelectorAll(".abcjs-pushed"), t = 0; t < e.length; t++) { + e[t].classList.remove("abcjs-pushed") + } + }, r.pushPlay = function(e) { + var t = r.parent.querySelector(".abcjs-midi-start"); + t && (e ? t.classList.add("abcjs-pushed") : t.classList.remove("abcjs-pushed")) + }, r.pushLoop = function(e) { + var t = r.parent.querySelector(".abcjs-midi-loop"); + t && (e ? t.classList.add("abcjs-pushed") : t.classList.remove("abcjs-pushed")) + }, r.setProgress = function(e, t) { + var i = r.parent.querySelector(".abcjs-midi-progress-background"), + a = r.parent.querySelector(".abcjs-midi-progress-indicator"); + if (i && a) { + var n = i.clientWidth * e; + a.style.left = n + "px"; + var s = r.parent.querySelector(".abcjs-midi-clock"); + if (s) { + var o = t * e / 1e3, + c = Math.floor(o / 60), + l = Math.floor(o % 60), + h = l < 10 ? "0" + l : l; + s.innerHTML = c + ":" + h + } + } + }, r.options.afterResume) { + var c = !1; + r.options.ac ? c = "suspended" !== r.options.ac.state : n() && (c = "suspended" !== n().state), c && r.options.afterResume() + } + } +}, function(e, t, r) { + var i = r(25), + a = r(13), + n = r(8); + e.exports = function() { + var e = this; + e.warp = 100, e.cursorControl = null, e.visualObj = null, e.timer = null, e.midiBuffer = null, e.options = null, e.currentTempo = null, e.control = null, e.isLooping = !1, e.isStarted = !1, e.isLoaded = !1, e.load = function(t, r, a) { + a || (a = {}), e.control = new i(t, { + loopHandler: a.displayLoop ? e.toggleLoop : void 0, + restartHandler: a.displayRestart ? e.restart : void 0, + playPromiseHandler: a.displayPlay ? e.play : void 0, + progressHandler: a.displayProgress ? e.randomAccess : void 0, + warpHandler: a.displayWarp ? e.onWarp : void 0, + afterResume: e.init + }), e.cursorControl = r + }, e.setTune = function(t, r, i) { + return e.isLoaded = !1, e.visualObj = t, e.options = i, e.control && (e.pause(), e.setProgress(0, 1), e.control.resetAll(), e.restart(), e.isStarted = !1), e.isLooping = !1, r ? e.go() : Promise.resolve({ + status: "no-audio-context" + }) + }, e.go = function() { + var t = 100 * e.visualObj.millisecondsPerMeasure() / e.warp; + return e.currentTempo = Math.round(e.visualObj.getBeatsPerMeasure() / t * 6e4), e.control && e.control.setTempo(e.currentTempo), e.percent = 0, e.midiBuffer || (e.midiBuffer = new a), e.midiBuffer.init({ + visualObj: e.visualObj, + options: e.options, + millisecondsPerMeasure: t + }).then((function() { + return e.midiBuffer.prime() + })).then((function() { + var t = 16; + return e.cursorControl && void 0 !== e.cursorControl.beatSubdivisions && parseInt(e.cursorControl.beatSubdivisions, 10) >= 1 && parseInt(e.cursorControl.beatSubdivisions, 10) <= 64 && (t = parseInt(e.cursorControl.beatSubdivisions, 10)), e.timer = new n(e.visualObj, { + beatCallback: e.beatCallback, + eventCallback: e.eventCallback, + lineEndCallback: e.lineEndCallback, + qpm: e.currentTempo, + extraMeasuresAtBeginning: e.cursorControl ? e.cursorControl.extraMeasuresAtBeginning : void 0, + lineEndAnticipation: e.cursorControl ? e.cursorControl.lineEndAnticipation : void 0, + beatSubdivisions: t + }), e.cursorControl && e.cursorControl.onReady && "function" == typeof e.cursorControl.onReady && e.cursorControl.onReady(e), e.isLoaded = !0, Promise.resolve({ + status: "created" + }) + })) + }, e.destroy = function() { + e.timer && (e.timer.reset(), e.timer.stop(), e.timer = null), e.midiBuffer && (e.midiBuffer.stop(), e.midiBuffer = null), e.setProgress(0, 1), e.control && e.control.resetAll() + }, e.play = function() { + return e.isLoaded ? e._play() : e.go().then((function() { + return e._play() + })) + }, e._play = function() { + return e.isStarted = !e.isStarted, e.isStarted ? (e.cursorControl && e.cursorControl.onStart && "function" == typeof e.cursorControl.onStart && e.cursorControl.onStart(), e.midiBuffer.start(), e.timer.start(), e.control && e.control.pushPlay(!0)) : e.pause(), Promise.resolve({ + status: "ok" + }) + }, e.pause = function() { + e.timer && (e.timer.pause(), e.midiBuffer.pause(), e.control && e.control.pushPlay(!1)) + }, e.toggleLoop = function() { + e.isLooping = !e.isLooping, e.control && e.control.pushLoop(e.isLooping) + }, e.restart = function() { + e.timer && (e.timer.setProgress(0), e.midiBuffer.seek(0)) + }, e.randomAccess = function(t) { + return e.isLoaded ? e._randomAccess(t) : e.go().then((function() { + return e._randomAccess(t) + })) + }, e._randomAccess = function(t) { + var r = t.target.classList.contains("abcjs-midi-progress-indicator") ? t.target.parentNode : t.target, + i = (t.x - r.offsetLeft) / r.offsetWidth; + i < 0 && (i = 0), i > 100 && (i = 100), e.timer.setProgress(i), e.midiBuffer.seek(i) + }, e.onWarp = function(t) { + var r = t.target.value; + if (parseInt(r, 10) > 0) { + e.warp = parseInt(r, 10); + var i = e.isStarted, + a = e.percent; + e.destroy(), e.isStarted = !1, e.go().then((function() { + e.setProgress(a, 1e3 * e.midiBuffer.duration), i && e.play(), e.timer.setProgress(a), e.midiBuffer.seek(a) + })) + } + }, e.setProgress = function(t, r) { + e.percent = t, e.control && e.control.setProgress(t, r) + }, e.finished = function() { + e.timer.reset(), e.isLooping ? (e.timer.start(), e.midiBuffer.start()) : (e.timer.stop(), e.isStarted && (e.control && e.control.pushPlay(!1), e.isStarted = !1, e.cursorControl && e.cursorControl.onFinished && "function" == typeof e.cursorControl.onFinished && e.cursorControl.onFinished(), e.setProgress(0, 1))) + }, e.beatCallback = function(t, r, i) { + var a = t / r; + e.setProgress(a, i), e.cursorControl && e.cursorControl.onBeat && "function" == typeof e.cursorControl.onBeat && e.cursorControl.onBeat(t, r, i) + }, e.eventCallback = function(t) { + t ? e.cursorControl && e.cursorControl.onEvent && "function" == typeof e.cursorControl.onEvent && e.cursorControl.onEvent(t) : e.finished() + }, e.lineEndCallback = function(t) { + e.cursorControl && e.cursorControl.onLineEnd && "function" == typeof e.cursorControl.onLineEnd && e.cursorControl.onLineEnd(t) + }, e.getUrl = function() { + return e.midiBuffer.download() + }, e.download = function(t) { + var r = e.getUrl(), + i = document.createElement("a"); + document.body.appendChild(i), i.setAttribute("style", "display: none;"), i.href = r, i.download = t || "output.wav", i.click(), window.URL.revokeObjectURL(r), document.body.removeChild(i) + } + } +}, function(e, t, r) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + const i = r(28), + a = (new(0, r(58).AllHtmlEntities)).encode; + t.default = function() { + return { + plugin: function(e, t) { + const r = e.renderer.rules.fence || function(e, t, r, i, a) { + return a.renderToken(e, t, r, i, a) + }; + e.renderer.rules.fence = function(e, t, n, s, o) { + const c = e[t]; + if ("abc" !== c.info) return r(e, t, n, s, o); + const l = "abc_target_" + Math.random() + "_" + Date.now(), + h = document.createElement("div"); + let u = ""; + try { + h.setAttribute("id", l), h.style.display = "none", document.body.appendChild(h), i.renderAbc(l, c.content.trim()), u = '
' + h.innerHTML + "
" + } catch (e) { + return console.error(e), '
Could not render ABC notation: ' + a(e.message) + "
" + } finally { + document.body.removeChild(h) + } + return u + } + }, + assets: function() { + return [{ + inline: !0, + mime: "text/css", + text: "\n\t\t\t\t\t\t.abc-notation-block svg {\n\t\t\t\t\t\t\tbackground-color: white;\n\t\t\t\t\t\t}\n\t\t\t\t\t" + }] + } + } + } +}, function(e, t, r) { + var i = r(29), + a = r(30), + n = r(9), + s = {}; + s.signature = "abcjs-basic v" + i, Object.keys(a).forEach((function(e) { + s[e] = a[e] + })), Object.keys(n).forEach((function(e) { + s[e] = n[e] + })), s.renderAbc = r(33), s.TimingCallbacks = r(8); + var o = r(3); + s.setGlyph = o.setSymbol; + var c = r(13), + l = r(14), + h = r(23), + u = r(24), + d = r(25), + p = r(15), + f = r(6), + m = r(7), + g = r(55), + v = r(26); + s.synth = { + CreateSynth: c, + instrumentIndexToName: l, + pitchToNoteName: h, + SynthController: v, + SynthSequence: u, + CreateSynthControl: d, + registerAudioContext: p, + activeAudioContext: f, + supportsAudio: m, + playEvent: g + }; + var b = r(56); + s.Editor = b, e.exports = s +}, function(e, t) { + e.exports = "5.12.0" +}, function(e, t, r) { + r(1), r(0); + var i = r(8), + a = {}; + ! function() { + "use strict"; + var e, t; + a.startAnimation = function(r, a, n) { + function s(e) { + for (var t = 0; t < e.length; t++) { + var r = e[t]; + r.classList.contains("abcjs-bar") || (r.style.display = "none") + } + } + var o; + + function c(e) { + n.hideCurrentMeasure ? function(e) { + s(r.querySelectorAll(e)) + }(e) : n.hideFinishedMeasures && function(e) { + o && s(r.querySelectorAll(o)), o = e + }(e) + } + e && (e.stop(), e = void 0), n.showCursor && ((t = r.querySelector(".abcjs-cursor")) || ((t = document.createElement("DIV")).className = "abcjs-cursor cursor", t.style.position = "absolute", r.appendChild(t), r.style.position = "relative")), (e = new i(a, { + qpm: n.bpm, + eventCallback: function(r) { + if (r) { + if (r.measureStart) { + var i = ".abcjs-l" + (a = r).line + ".abcjs-m" + a.measureNumber; + i && c(i) + } + t && (t.style.left = r.left + "px", t.style.top = r.top + "px", t.style.width = r.width + "px", t.style.height = r.height + "px") + } else e.stop(), e = void 0; + var a + } + })).start() + }, a.pauseAnimation = function(t) { + e && (t ? e.pause() : e.start()) + }, a.stopAnimation = function() { + e && (e.stop(), e = void 0) + } + }(), e.exports = a +}, function(e, t, r) { + var i = r(0), + a = r(11), + n = r(12); + e.exports = function(e, t, r, s) { + this.reset = function(e, t, r, i) { + n.initialize(e, t, r, i), a.initialize(e, t, r, i) + }, this.reset(e, t, r, s), this.setTitle = function(t) { + if (r.hasMainTitle) s.addSubtitle(e.translateString(e.stripComment(t))); + else { + var i = e.translateString(e.theReverser(e.stripComment(t))); + r.titlecaps && (i = i.toUpperCase()), s.addMetaText("title", i), r.hasMainTitle = !0 + } + }, this.setMeter = function(i) { + if ("C" === (i = e.stripComment(i))) return !0 === r.havent_set_length && (r.default_length = .125, r.havent_set_length = !1), { + type: "common_time" + }; + if ("C|" === i) return !0 === r.havent_set_length && (r.default_length = .125, r.havent_set_length = !1), { + type: "cut_time" + }; + if ("o" === i) return !0 === r.havent_set_length && (r.default_length = .125, r.havent_set_length = !1), { + type: "tempus_perfectum" + }; + if ("c" === i) return !0 === r.havent_set_length && (r.default_length = .125, r.havent_set_length = !1), { + type: "tempus_imperfectum" + }; + if ("o." === i) return !0 === r.havent_set_length && (r.default_length = .125, r.havent_set_length = !1), { + type: "tempus_perfectum_prolatio" + }; + if ("c." === i) return !0 === r.havent_set_length && (r.default_length = .125, r.havent_set_length = !1), { + type: "tempus_imperfectum_prolatio" + }; + if (0 === i.length || "none" === i.toLowerCase()) return !0 === r.havent_set_length && (r.default_length = .125, r.havent_set_length = !1), null; + var a = e.tokenize(i, 0, i.length); + try { + var n = function() { + var e = function() { + var e = { + value: 0, + num: "" + }, + t = a.shift(); + for ("(" === t.token && (t = a.shift());;) { + if ("number" !== t.type) throw "Expected top number of meter"; + if (e.value += parseInt(t.token), e.num += t.token, 0 === a.length || "/" === a[0].token) return e; + if (")" === (t = a.shift()).token) { + if (0 === a.length || "/" === a[0].token) return e; + throw "Unexpected paren in meter" + } + if ("." !== t.token && "+" !== t.token) throw "Expected top number of meter"; + if (e.num += t.token, 0 === a.length) throw "Expected top number of meter"; + t = a.shift() + } + return e + }(); + if (0 === a.length) return e; + var t = a.shift(); + if ("/" !== t.token) throw "Expected slash in meter"; + if ("number" !== (t = a.shift()).type) throw "Expected bottom number of meter"; + return e.den = t.token, e.value = e.value / parseInt(e.den), e + }; + if (0 === a.length) throw "Expected meter definition in M: line"; + for (var s = { + type: "specified", + value: [] + }, o = 0;;) { + var c = n(); + o += c.value; + var l = { + num: c.num + }; + if (void 0 !== c.den && (l.den = c.den), s.value.push(l), 0 === a.length) break + } + return !0 === r.havent_set_length && (r.default_length = o < .75 ? .0625 : .125, r.havent_set_length = !1), s + } catch (e) { + t(e, i, 0) + } + return null + }, this.calcTempo = function(e) { + var t = 1 / 4; + r.meter && "specified" === r.meter.type ? t = 1 / parseInt(r.meter.value[0].den) : r.origMeter && "specified" === r.origMeter.type && (t = 1 / parseInt(r.origMeter.value[0].den)); + for (var i = 0; i < e.duration; i++) e.duration[i] = t * e.duration[i]; + return e + }, this.resolveTempo = function() { + r.tempo && (this.calcTempo(r.tempo), s.metaText.tempo = r.tempo, delete r.tempo) + }, this.addUserDefinition = function(e, a, n) { + var s = e.indexOf("=", a); + if (-1 !== s) { + var o = i.strip(e.substring(a, s)), + c = i.strip(e.substring(s + 1)); + if (1 === o.length) { + -1 !== "HIJKLMNOPQRSTUVWXYhijklmnopqrstuvw~".indexOf(o) ? 0 !== c.length ? (void 0 === r.macros && (r.macros = {}), r.macros[o] = c) : t("Missing macro definition", e, a) : t("Macro definitions must be H-Y, h-w, or tilde", e, a) + } else t("Macro definitions can only be one character", e, a) + } else t("Need an = in a macro definition", e, a) + }, this.setDefaultLength = function(e, t, a) { + var n = i.gsub(e.substring(t, a), " ", "").split("/"); + if (2 === n.length) { + var s = parseInt(n[0]), + o = parseInt(n[1]); + o > 0 && (r.default_length = s / o, r.havent_set_length = !1) + } else 1 === n.length && "1" === n[0] && (r.default_length = 1, r.havent_set_length = !1) + }; + var o = { + larghissimo: 20, + adagissimo: 24, + sostenuto: 28, + grave: 32, + largo: 40, + lento: 50, + larghetto: 60, + adagio: 68, + adagietto: 74, + andante: 80, + andantino: 88, + "marcia moderato": 84, + "andante moderato": 100, + moderato: 112, + allegretto: 116, + "allegro moderato": 120, + allegro: 126, + animato: 132, + agitato: 140, + veloce: 148, + "mosso vivo": 156, + vivace: 164, + vivacissimo: 172, + allegrissimo: 176, + presto: 184, + prestissimo: 210 + }; + this.setTempo = function(i, a, n) { + try { + var s = e.tokenize(i, a, n); + if (0 === s.length) throw "Missing parameter in Q: field"; + var c = {}, + l = !0, + h = s.shift(); + if ("quote" === h.type && (c.preString = h.token, h = s.shift(), 0 === s.length)) return o[c.preString.toLowerCase()] && (c.bpm = o[c.preString.toLowerCase()], c.suppressBpm = !0), { + type: "immediate", + tempo: c + }; + if ("alpha" === h.type && "C" === h.token) { + if (0 === s.length) throw "Missing tempo after C in Q: field"; + if ("punct" === (h = s.shift()).type && "=" === h.token) { + if (0 === s.length) throw "Missing tempo after = in Q: field"; + if ("number" !== (h = s.shift()).type) throw "Expected number after = in Q: field"; + c.duration = [1], c.bpm = parseInt(h.token) + } else { + if ("number" !== h.type) throw "Expected number or equal after C in Q: field"; + if (c.duration = [parseInt(h.token)], 0 === s.length) throw "Missing = after duration in Q: field"; + if ("punct" !== (h = s.shift()).type || "=" !== h.token) throw "Expected = after duration in Q: field"; + if (0 === s.length) throw "Missing tempo after = in Q: field"; + if ("number" !== (h = s.shift()).type) throw "Expected number after = in Q: field"; + c.bpm = parseInt(h.token) + } + } else { + if ("number" !== h.type) throw "Unknown value in Q: field"; + var u = parseInt(h.token); + if (0 === s.length || "quote" === s[0].type) c.duration = [1], c.bpm = u; + else { + if (l = !1, "punct" !== (h = s.shift()).type && "/" !== h.token) throw "Expected fraction in Q: field"; + if ("number" !== (h = s.shift()).type) throw "Expected fraction in Q: field"; + var d = parseInt(h.token); + for (c.duration = [u / d]; s.length > 0 && "=" !== s[0].token && "quote" !== s[0].type;) { + if ("number" !== (h = s.shift()).type) throw "Expected fraction in Q: field"; + if (u = parseInt(h.token), "punct" !== (h = s.shift()).type && "/" !== h.token) throw "Expected fraction in Q: field"; + if ("number" !== (h = s.shift()).type) throw "Expected fraction in Q: field"; + d = parseInt(h.token), c.duration.push(u / d) + } + if ("punct" !== (h = s.shift()).type && "=" !== h.token) throw "Expected = in Q: field"; + if ("number" !== (h = s.shift()).type) throw "Expected tempo in Q: field"; + c.bpm = parseInt(h.token) + } + } + if (0 !== s.length && ("quote" === (h = s.shift()).type && (c.postString = h.token, h = s.shift()), 0 !== s.length)) throw "Unexpected string at end of Q: field"; + return !1 === r.printTempo && (c.suppress = !0), { + type: l ? "delaySet" : "immediate", + tempo: c + } + } catch (e) { + return t(e, i, a), { + type: "none" + } + } + }, this.letter_to_inline_header = function(i, o) { + var c = e.eatWhiteSpace(i, o); + if (o += c, i.length >= o + 5 && "[" === i.charAt(o) && ":" === i.charAt(o + 2)) { + var l = i.indexOf("]", o), + h = r.iChar + o, + u = r.iChar + l + 1; + switch (i.substring(o, o + 3)) { + case "[I:": + var d = a.addDirective(i.substring(o + 3, l)); + return d && t(d, i, o), [l - o + 1 + c]; + case "[M:": + var p = this.setMeter(i.substring(o + 3, l)); + return s.hasBeginMusic() && p ? s.appendStartingElement("meter", h, u, p) : r.meter = p, [l - o + 1 + c]; + case "[K:": + var f = n.parseKey(i.substring(o + 3, l)); + return f.foundClef && s.hasBeginMusic() && s.appendStartingElement("clef", h, u, r.clef), f.foundKey && s.hasBeginMusic() && s.appendStartingElement("key", h, u, n.fixKey(r.clef, r.key)), [l - o + 1 + c]; + case "[P:": + return s.lines.length <= s.lineNum ? r.partForNextLine = { + title: i.substring(o + 3, l), + startChar: h, + endChar: u + } : s.appendElement("part", h, u, { + title: i.substring(o + 3, l) + }), [l - o + 1 + c]; + case "[L:": + return this.setDefaultLength(i, o + 3, l), [l - o + 1 + c]; + case "[Q:": + if (l > 0) { + var m = this.setTempo(i, o + 3, l); + return "delaySet" === m.type ? s.appendElement("tempo", h, u, this.calcTempo(m.tempo)) : "immediate" === m.type && s.appendElement("tempo", h, u, m.tempo), [l - o + 1 + c, i.charAt(o + 1), i.substring(o + 3, l)] + } + break; + case "[V:": + if (l > 0) return n.parseVoice(i, o + 3, l), [l - o + 1 + c, i.charAt(o + 1), i.substring(o + 3, l)] + } + } + return [0] + }, this.letter_to_body_header = function(e, o) { + if (e.length >= o + 3) switch (e.substring(o, o + 2)) { + case "I:": + var c = a.addDirective(e.substring(o + 2)); + return c && t(c, e, o), [e.length]; + case "M:": + var l = this.setMeter(e.substring(o + 2)); + return s.hasBeginMusic() && l && s.appendStartingElement("meter", r.iChar + o, r.iChar + e.length, l), [e.length]; + case "K:": + var h = n.parseKey(e.substring(o + 2)); + return h.foundClef && s.hasBeginMusic() && s.appendStartingElement("clef", r.iChar + o, r.iChar + e.length, r.clef), h.foundKey && s.hasBeginMusic() && s.appendStartingElement("key", r.iChar + o, r.iChar + e.length, n.fixKey(r.clef, r.key)), [e.length]; + case "P:": + return s.hasBeginMusic() && s.appendElement("part", r.iChar + o, r.iChar + e.length, { + title: e.substring(o + 2) + }), [e.length]; + case "L:": + return this.setDefaultLength(e, o + 2, e.length), [e.length]; + case "Q:": + var u = e.indexOf("", o + 2); - 1 === u && (u = e.length); + var d = this.setTempo(e, o + 2, u); + return "delaySet" === d.type ? s.appendElement("tempo", r.iChar + o, r.iChar + e.length, this.calcTempo(d.tempo)) : "immediate" === d.type && s.appendElement("tempo", r.iChar + o, r.iChar + e.length, d.tempo), [u, e.charAt(o), i.strip(e.substring(o + 2))]; + case "V:": + return n.parseVoice(e, o + 2, e.length), [e.length, e.charAt(o), i.strip(e.substring(o + 2))] + } + return [0] + }; + var c = { + A: "author", + B: "book", + C: "composer", + D: "discography", + F: "url", + G: "group", + I: "instruction", + N: "notes", + O: "origin", + R: "rhythm", + S: "source", + W: "unalignedWords", + Z: "transcription" + }; + this.parseHeader = function(o) { + if (i.startsWith(o, "%%")) { + var l = a.addDirective(o.substring(2)); + return l && t(l, o, 2), {} + } + var h = o.indexOf("%"); + if (h >= 0 && (o = o.substring(0, h)), 0 === (o = o.replace(/\s+$/, "")).length) return {}; + if (o.length >= 2 && ":" === o.charAt(1)) { + var u = ""; + o.indexOf("") >= 0 && "w" !== o.charAt(0) && (u = o.substring(o.indexOf("") + 1), o = o.substring(0, o.indexOf(""))); + var d = c[o.charAt(0)]; + if (void 0 !== d) return "unalignedWords" === d ? s.addMetaTextArray(d, a.parseFontChangeLine(e.translateString(e.stripComment(o.substring(2))))) : s.addMetaText(d, e.translateString(e.stripComment(o.substring(2)))), {}; + var p = r.iChar, + f = p + o.length; + switch (o.charAt(0)) { + case "H": + s.addMetaText("history", e.translateString(e.stripComment(o.substring(2)))), r.is_in_history = !0; + break; + case "K": + this.resolveTempo(); + var m = n.parseKey(o.substring(2)); + !r.is_in_header && s.hasBeginMusic() && (m.foundClef && s.appendStartingElement("clef", p, f, r.clef), m.foundKey && s.appendStartingElement("key", p, f, n.fixKey(r.clef, r.key))), r.is_in_header = !1; + break; + case "L": + this.setDefaultLength(o, 2, o.length); + break; + case "M": + r.origMeter = r.meter = this.setMeter(o.substring(2)); + break; + case "P": + r.is_in_header ? s.addMetaText("partOrder", e.translateString(e.stripComment(o.substring(2)))) : r.partForNextLine = { + title: e.translateString(e.stripComment(o.substring(2))), + startChar: p, + endChar: f + }; + break; + case "Q": + var g = this.setTempo(o, 2, o.length); + "delaySet" === g.type ? r.tempo = g.tempo : "immediate" === g.type && (s.metaText.tempo = g.tempo); + break; + case "T": + this.setTitle(o.substring(2)); + break; + case "U": + this.addUserDefinition(o, 2, o.length); + break; + case "V": + if (n.parseVoice(o, 2, o.length), !r.is_in_header) return { + newline: !0 + }; + break; + case "s": + return { + symbols: !0 + }; + case "w": + return { + words: !0 + }; + case "X": + break; + case "E": + case "m": + t("Ignored header", o, 0); + break; + default: + return u.length && (u = "" + u), { + regular: !0, + str: o + u + } + } + return u.length > 0 ? { + recurse: !0, + str: u + } : {} + } + return { + regular: !0, + str: o + } + } + } +}, function(e, t, r) { + var i = r(0); + e.exports = function() { + this.skipWhiteSpace = function(e) { + for (var t = 0; t < e.length; t++) + if (!this.isWhiteSpace(e.charAt(t))) return t; + return e.length + }; + var e = function(e, t) { + return t >= e.length + }; + this.eatWhiteSpace = function(e, t) { + for (var r = t; r < e.length; r++) + if (!this.isWhiteSpace(e.charAt(r))) return r - t; + return r - t + }, this.getKeyPitch = function(t) { + var r = this.skipWhiteSpace(t); + if (e(t, r)) return { + len: 0 + }; + switch (t.charAt(r)) { + case "A": + return { + len: r + 1, token: "A" + }; + case "B": + return { + len: r + 1, token: "B" + }; + case "C": + return { + len: r + 1, token: "C" + }; + case "D": + return { + len: r + 1, token: "D" + }; + case "E": + return { + len: r + 1, token: "E" + }; + case "F": + return { + len: r + 1, token: "F" + }; + case "G": + return { + len: r + 1, token: "G" + } + } + return { + len: 0 + } + }, this.getSharpFlat = function(e) { + if ("bass" === e) return { + len: 0 + }; + switch (e.charAt(0)) { + case "#": + return { + len: 1, token: "#" + }; + case "b": + return { + len: 1, token: "b" + } + } + return { + len: 0 + } + }, this.getMode = function(t) { + var r = function(e, t) { + for (; t < e.length && (e.charAt(t) >= "a" && e.charAt(t) <= "z" || e.charAt(t) >= "A" && e.charAt(t) <= "Z");) t++; + return t + }, + i = this.skipWhiteSpace(t); + if (e(t, i)) return { + len: 0 + }; + var a = t.substring(i, i + 3).toLowerCase(); + switch ((a.length > 1 && " " === a.charAt(1) || "^" === a.charAt(1) || "_" === a.charAt(1) || "=" === a.charAt(1)) && (a = a.charAt(0)), a) { + case "mix": + return { + len: r(t, i), token: "Mix" + }; + case "dor": + return { + len: r(t, i), token: "Dor" + }; + case "phr": + return { + len: r(t, i), token: "Phr" + }; + case "lyd": + return { + len: r(t, i), token: "Lyd" + }; + case "loc": + return { + len: r(t, i), token: "Loc" + }; + case "aeo": + return { + len: r(t, i), token: "m" + }; + case "maj": + case "ion": + return { + len: r(t, i), token: "" + }; + case "min": + case "m": + return { + len: r(t, i), token: "m" + } + } + return { + len: 0 + } + }, this.getClef = function(t, r) { + var a = t, + n = this.skipWhiteSpace(t); + if (e(t, n)) return { + len: 0 + }; + var s = !1, + o = t.substring(n); + if (i.startsWith(o, "clef=") && (s = !0, o = o.substring(5), n += 5), 0 === o.length && s) return { + len: n + 5, + warn: "No clef specified: " + a + }; + var c = this.skipWhiteSpace(o); + if (e(o, c)) return { + len: 0 + }; + c > 0 && (n += c, o = o.substring(c)); + var l = null; + if (i.startsWith(o, "treble")) l = "treble"; + else if (i.startsWith(o, "bass3")) l = "bass3"; + else if (i.startsWith(o, "bass")) l = "bass"; + else if (i.startsWith(o, "tenor")) l = "tenor"; + else if (i.startsWith(o, "alto2")) l = "alto2"; + else if (i.startsWith(o, "alto1")) l = "alto1"; + else if (i.startsWith(o, "alto")) l = "alto"; + else if (!r && s && i.startsWith(o, "none")) l = "none"; + else if (i.startsWith(o, "perc")) l = "perc"; + else if (!r && s && i.startsWith(o, "C")) l = "tenor"; + else if (!r && s && i.startsWith(o, "F")) l = "bass"; + else { + if (r || !s || !i.startsWith(o, "G")) return { + len: n + 5, + warn: "Unknown clef specified: " + a + }; + l = "treble" + } + return o = o.substring(l.length), (c = this.isMatch(o, "+8")) > 0 ? l += "+8" : (c = this.isMatch(o, "-8")) > 0 && (l += "-8"), { + len: n + l.length, + token: l, + explicit: s + } + }, this.getBarLine = function(e, t) { + switch (e.charAt(t)) { + case "]": + switch (++t, e.charAt(t)) { + case "|": + return { + len: 2, token: "bar_thick_thin" + }; + case "[": + return ++t, e.charAt(t) >= "1" && e.charAt(t) <= "9" || '"' === e.charAt(t) ? { + len: 2, + token: "bar_invisible" + } : { + len: 1, + warn: "Unknown bar symbol" + }; + default: + return { + len: 1, token: "bar_invisible" + } + } + break; + case ":": + switch (++t, e.charAt(t)) { + case ":": + return { + len: 2, token: "bar_dbl_repeat" + }; + case "|": + switch (++t, e.charAt(t)) { + case "]": + switch (++t, e.charAt(t)) { + case "|": + return ++t, ":" === e.charAt(t) ? { + len: 5, + token: "bar_dbl_repeat" + } : { + len: 3, + token: "bar_right_repeat" + }; + default: + return { + len: 3, token: "bar_right_repeat" + } + } + break; + case "|": + return ++t, ":" === e.charAt(t) ? { + len: 4, + token: "bar_dbl_repeat" + } : { + len: 3, + token: "bar_right_repeat" + }; + default: + return { + len: 2, token: "bar_right_repeat" + } + } + break; + default: + return { + len: 1, warn: "Unknown bar symbol" + } + } + break; + case "[": + if (++t, "|" !== e.charAt(t)) return e.charAt(t) >= "1" && e.charAt(t) <= "9" || '"' === e.charAt(t) ? { + len: 1, + token: "bar_invisible" + } : { + len: 0 + }; + switch (++t, e.charAt(t)) { + case ":": + return { + len: 3, token: "bar_left_repeat" + }; + case "]": + return { + len: 3, token: "bar_invisible" + }; + default: + return { + len: 2, token: "bar_thick_thin" + } + } + break; + case "|": + switch (++t, e.charAt(t)) { + case "]": + return { + len: 2, token: "bar_thin_thick" + }; + case "|": + return ++t, ":" === e.charAt(t) ? { + len: 3, + token: "bar_left_repeat" + } : { + len: 2, + token: "bar_thin_thin" + }; + case ":": + for (var r = 0; + ":" === e.charAt(t + r);) r++; + return { + len: 1 + r, token: "bar_left_repeat" + }; + default: + return { + len: 1, token: "bar_thin" + } + } + } + return { + len: 0 + } + }, this.getTokenOf = function(e, t) { + for (var r = 0; r < e.length; r++) + if (t.indexOf(e.charAt(r)) < 0) return { + len: r, + token: e.substring(0, r) + }; + return { + len: r, + token: e + } + }, this.getToken = function(e, t, r) { + for (var i = t; i < r && !this.isWhiteSpace(e.charAt(i));) i++; + return e.substring(t, i) + }, this.isMatch = function(t, r) { + var a = this.skipWhiteSpace(t); + return e(t, a) ? 0 : i.startsWith(t.substring(a), r) ? a + r.length : 0 + }, this.getPitchFromTokens = function(e) { + var t = {}; + if (t.position = { + A: 5, + B: 6, + C: 0, + D: 1, + E: 2, + F: 3, + G: 4, + a: 12, + b: 13, + c: 7, + d: 8, + e: 9, + f: 10, + g: 11 + } [e[0].token], void 0 === t.position) return { + warn: "Pitch expected. Found: " + e[0].token + }; + for (e.shift(); e.length;) switch (e[0].token) { + case ",": + t.position -= 7, e.shift(); + break; + case "'": + t.position += 7, e.shift(); + break; + default: + return t + } + return t + }, this.getKeyAccidentals2 = function(e) { + for (var t; e.length > 0;) { + var r; + if ("^" === e[0].token) { + if (r = "sharp", e.shift(), 0 === e.length) return { + accs: t, + warn: "Expected note name after " + r + }; + switch (e[0].token) { + case "^": + r = "dblsharp", e.shift(); + break; + case "/": + r = "quartersharp", e.shift() + } + } else if ("=" === e[0].token) r = "natural", e.shift(); + else { + if ("_" !== e[0].token) return { + accs: t + }; + if (r = "flat", e.shift(), 0 === e.length) return { + accs: t, + warn: "Expected note name after " + r + }; + switch (e[0].token) { + case "_": + r = "dblflat", e.shift(); + break; + case "/": + r = "quarterflat", e.shift() + } + } + if (0 === e.length) return { + accs: t, + warn: "Expected note name after " + r + }; + switch (e[0].token.charAt(0)) { + case "a": + case "b": + case "c": + case "d": + case "e": + case "f": + case "g": + case "A": + case "B": + case "C": + case "D": + case "E": + case "F": + case "G": + void 0 === t && (t = []), t.push({ + acc: r, + note: e[0].token.charAt(0) + }), 1 === e[0].token.length ? e.shift() : e[0].token = e[0].token.substring(1); + break; + default: + return { + accs: t, warn: "Expected note name after " + r + " Found: " + e[0].token + } + } + } + return { + accs: t + } + }, this.getKeyAccidental = function(t) { + var r = { + "^": "sharp", + "^^": "dblsharp", + "=": "natural", + _: "flat", + __: "dblflat", + "_/": "quarterflat", + "^/": "quartersharp" + }, + i = this.skipWhiteSpace(t); + if (e(t, i)) return { + len: 0 + }; + var a = null; + switch (t.charAt(i)) { + case "^": + case "_": + case "=": + a = t.charAt(i); + break; + default: + return { + len: 0 + } + } + if (i++, e(t, i)) return { + len: 1, + warn: "Expected note name after accidental" + }; + switch (t.charAt(i)) { + case "a": + case "b": + case "c": + case "d": + case "e": + case "f": + case "g": + case "A": + case "B": + case "C": + case "D": + case "E": + case "F": + case "G": + return { + len: i + 1, token: { + acc: r[a], + note: t.charAt(i) + } + }; + case "^": + case "_": + case "/": + if (a += t.charAt(i), i++, e(t, i)) return { + len: 2, + warn: "Expected note name after accidental" + }; + switch (t.charAt(i)) { + case "a": + case "b": + case "c": + case "d": + case "e": + case "f": + case "g": + case "A": + case "B": + case "C": + case "D": + case "E": + case "F": + case "G": + return { + len: i + 1, token: { + acc: r[a], + note: t.charAt(i) + } + }; + default: + return { + len: 2, warn: "Expected note name after accidental" + } + } + break; + default: + return { + len: 1, warn: "Expected note name after accidental" + } + } + }, this.isWhiteSpace = function(e) { + return " " === e || "\t" === e || "" === e + }, this.getMeat = function(e, t, r) { + var i = e.indexOf("%", t); + for (i >= 0 && i < r && (r = i); t < r && (" " === e.charAt(t) || "\t" === e.charAt(t) || "" === e.charAt(t));) t++; + for (; t < r && (" " === e.charAt(r - 1) || "\t" === e.charAt(r - 1) || "" === e.charAt(r - 1));) r--; + return { + start: t, + end: r + } + }; + var t = function(e) { + return e >= "A" && e <= "Z" || e >= "a" && e <= "z" + }, + r = function(e) { + return e >= "0" && e <= "9" + }; + this.tokenize = function(e, i, a, n) { + var s = this.getMeat(e, i, a); + i = s.start, a = s.end; + for (var o, c = []; i < a;) { + if ('"' === e.charAt(i)) { + for (o = i + 1; o < a && '"' !== e.charAt(o);) o++; + c.push({ + type: "quote", + token: e.substring(i + 1, o), + start: i + 1, + end: o + }), o++ + } else if (t(e.charAt(i))) { + if (o = i + 1, n) + for (; o < a && !this.isWhiteSpace(e.charAt(o));) o++; + else + for (; o < a && t(e.charAt(o));) o++; + c.push({ + type: "alpha", + token: e.substring(i, o), + continueId: r(e.charAt(o)), + start: i, + end: o + }), i = o + 1 + } else if ("." === e.charAt(i) && r(e.charAt(o + 1))) { + o = i + 1; + for (var l; o < a && r(e.charAt(o));) o++; + l = parseFloat(e.substring(i, o)), c.push({ + type: "number", + token: e.substring(i, o), + intt: null, + floatt: l, + continueId: t(e.charAt(o)), + start: i, + end: o + }), i = o + 1 + } else if (r(e.charAt(i)) || "-" === e.charAt(i) && r(e.charAt(o + 1))) { + o = i + 1; + for (var h, u = null; o < a && r(e.charAt(o));) o++; + if ("." === e.charAt(o) && r(e.charAt(o + 1))) + for (o++; o < a && r(e.charAt(o));) o++; + else u = parseInt(e.substring(i, o)); + h = parseFloat(e.substring(i, o)), c.push({ + type: "number", + token: e.substring(i, o), + intt: u, + floatt: h, + continueId: t(e.charAt(o)), + start: i, + end: o + }), i = o + 1 + } else " " === e.charAt(i) || "\t" === e.charAt(i) || c.push({ + type: "punct", + token: e.charAt(i), + start: i, + end: i + 1 + }), o = i + 1; + i = o + } + return c + }, this.getVoiceToken = function(e, t, r) { + for (var i = t; i < r && this.isWhiteSpace(e.charAt(i)) || "=" === e.charAt(i);) i++; + if ('"' === e.charAt(i)) { + var a = e.indexOf('"', i + 1); + return -1 === a || a >= r ? { + len: 1, + err: "Missing close quote" + } : { + len: a - t + 1, + token: this.translateString(e.substring(i + 1, a)) + } + } + for (var n = i; n < r && !this.isWhiteSpace(e.charAt(n)) && "=" !== e.charAt(n);) n++; + return { + len: n - t + 1, + token: e.substring(i, n) + } + }; + var a = { + "`a": "à", + "'a": "á", + "^a": "â", + "~a": "ã", + '"a': "ä", + oa: "å", + aa: "å", + "=a": "ā", + ua: "ă", + ";a": "ą", + "`e": "è", + "'e": "é", + "^e": "ê", + '"e': "ë", + "=e": "ē", + ue: "ĕ", + ";e": "ę", + ".e": "ė", + "`i": "ì", + "'i": "í", + "^i": "î", + '"i': "ï", + "=i": "ī", + ui: "ĭ", + ";i": "į", + "`o": "ò", + "'o": "ó", + "^o": "ô", + "~o": "õ", + '"o': "ö", + "=o": "ō", + uo: "ŏ", + "/o": "ø", + "`u": "ù", + "'u": "ú", + "^u": "û", + "~u": "ũ", + '"u': "ü", + ou: "ů", + "=u": "ū", + uu: "ŭ", + ";u": "ų", + "`A": "À", + "'A": "Á", + "^A": "Â", + "~A": "Ã", + '"A': "Ä", + oA: "Å", + AA: "Å", + "=A": "Ā", + uA: "Ă", + ";A": "Ą", + "`E": "È", + "'E": "É", + "^E": "Ê", + '"E': "Ë", + "=E": "Ē", + uE: "Ĕ", + ";E": "Ę", + ".E": "Ė", + "`I": "Ì", + "'I": "Í", + "^I": "Î", + "~I": "Ĩ", + '"I': "Ï", + "=I": "Ī", + uI: "Ĭ", + ";I": "Į", + ".I": "İ", + "`O": "Ò", + "'O": "Ó", + "^O": "Ô", + "~O": "Õ", + '"O': "Ö", + "=O": "Ō", + uO: "Ŏ", + "/O": "Ø", + "`U": "Ù", + "'U": "Ú", + "^U": "Û", + "~U": "Ũ", + '"U': "Ü", + oU: "Ů", + "=U": "Ū", + uU: "Ŭ", + ";U": "Ų", + ae: "æ", + AE: "Æ", + oe: "œ", + OE: "Œ", + ss: "ß", + "'c": "ć", + "^c": "ĉ", + uc: "č", + cc: "ç", + ".c": "ċ", + cC: "Ç", + "'C": "Ć", + "^C": "Ĉ", + uC: "Č", + ".C": "Ċ", + "~N": "Ñ", + "~n": "ñ", + "=s": "š", + vs: "š", + DH: "Ð", + dh: "ð", + HO: "Ő", + Ho: "ő", + HU: "Ű", + Hu: "ű", + "'Y": "Ý", + "'y": "ý", + "^Y": "Ŷ", + "^y": "ŷ", + '"Y': "Ÿ", + '"y': "ÿ", + vS: "Š", + vZ: "Ž", + vz: "ž" + }, + n = { + "#": "♯", + b: "♭", + "=": "♮" + }, + s = { + 201: "♯", + 202: "♭", + 203: "♮", + 241: "¡", + 242: "¢", + 252: "a", + 262: "2", + 272: "o", + 302: "Â", + 312: "Ê", + 322: "Ò", + 332: "Ú", + 342: "â", + 352: "ê", + 362: "ò", + 372: "ú", + 243: "£", + 253: "«", + 263: "3", + 273: "»", + 303: "Ã", + 313: "Ë", + 323: "Ó", + 333: "Û", + 343: "ã", + 353: "ë", + 363: "ó", + 373: "û", + 244: "¤", + 254: "¬", + 264: " ́", + 274: "1⁄4", + 304: "Ä", + 314: "Ì", + 324: "Ô", + 334: "Ü", + 344: "ä", + 354: "ì", + 364: "ô", + 374: "ü", + 245: "¥", + 255: "-", + 265: "μ", + 275: "1⁄2", + 305: "Å", + 315: "Í", + 325: "Õ", + 335: "Ý", + 345: "å", + 355: "í", + 365: "õ", + 375: "ý", + 246: "¦", + 256: "®", + 266: "¶", + 276: "3⁄4", + 306: "Æ", + 316: "Î", + 326: "Ö", + 336: "Þ", + 346: "æ", + 356: "î", + 366: "ö", + 376: "þ", + 247: "§", + 257: " ̄", + 267: "·", + 277: "¿", + 307: "Ç", + 317: "Ï", + 327: "×", + 337: "ß", + 347: "ç", + 357: "ï", + 367: "÷", + 377: "ÿ", + 250: " ̈", + 260: "°", + 270: " ̧", + 300: "À", + 310: "È", + 320: "Ð", + 330: "Ø", + 340: "à", + 350: "è", + 360: "ð", + 370: "ø", + 251: "©", + 261: "±", + 271: "1", + 301: "Á", + 311: "É", + 321: "Ñ", + 331: "Ù", + 341: "á", + 351: "é", + 361: "ñ", + 371: "ù" + }; + this.translateString = function(e) { + var t = e.split("\\"); + if (1 === t.length) return e; + var r = null; + return i.each(t, (function(e) { + if (null === r) r = e; + else { + var t = a[e.substring(0, 2)]; + void 0 !== t ? r += t + e.substring(2) : void 0 !== (t = s[e.substring(0, 3)]) ? r += t + e.substring(3) : (t = n[e.substring(0, 1)], r += void 0 !== t ? t + e.substring(1) : "\\" + e) + } + })), r + }, this.getNumber = function(e, t) { + for (var r = 0; t < e.length;) switch (e.charAt(t)) { + case "0": + r *= 10, t++; + break; + case "1": + r = 10 * r + 1, t++; + break; + case "2": + r = 10 * r + 2, t++; + break; + case "3": + r = 10 * r + 3, t++; + break; + case "4": + r = 10 * r + 4, t++; + break; + case "5": + r = 10 * r + 5, t++; + break; + case "6": + r = 10 * r + 6, t++; + break; + case "7": + r = 10 * r + 7, t++; + break; + case "8": + r = 10 * r + 8, t++; + break; + case "9": + r = 10 * r + 9, t++; + break; + default: + return { + num: r, index: t + } + } + return { + num: r, + index: t + } + }, this.getFraction = function(e, t) { + var r = 1, + i = 1; + if ("/" !== e.charAt(t)) { + var a = this.getNumber(e, t); + r = a.num, t = a.index + } + if ("/" === e.charAt(t)) { + if (t++, "/" === e.charAt(t)) { + for (var n = .5; + "/" === e.charAt(t++);) n /= 2; + return { + value: r * n, + index: t - 1 + } + } + var s = t, + o = this.getNumber(e, t); + 0 === o.num && s === t && (o.num = 2), 0 !== o.num && (i = o.num), t = o.index + } + return { + value: r / i, + index: t + } + }, this.theReverser = function(e) { + return i.endsWith(e, ", The") ? "The " + e.substring(0, e.length - 5) : i.endsWith(e, ", A") ? "A " + e.substring(0, e.length - 3) : e + }, this.stripComment = function(e) { + var t = e.indexOf("%"); + return t >= 0 ? i.strip(e.substring(0, t)) : i.strip(e) + }, this.getInt = function(e) { + var t = parseInt(e); + if (isNaN(t)) return { + digits: 0 + }; + var r = "" + t; + return { + value: t, + digits: e.indexOf(r) + r.length + } + }, this.getFloat = function(e) { + var t = parseFloat(e); + if (isNaN(t)) return { + digits: 0 + }; + var r = "" + t; + return { + value: t, + digits: e.indexOf(r) + r.length + } + }, this.getMeasurement = function(e) { + if (0 === e.length) return { + used: 0 + }; + var t = 1, + r = ""; + if ("-" === e[0].token) e.shift(), r = "-", t++; + else if ("number" !== e[0].type) return { + used: 0 + }; + if (r += e.shift().token, 0 === e.length) return { + used: 1, + value: parseInt(r) + }; + var i = e.shift(); + if ("." === i.token) { + if (t++, 0 === e.length) return { + used: t, + value: parseInt(r) + }; + if ("number" === e[0].type && (r = r + "." + (i = e.shift()).token, t++, 0 === e.length)) return { + used: t, + value: parseFloat(r) + }; + i = e.shift() + } + switch (i.token) { + case "pt": + return { + used: t + 1, value: parseFloat(r) + }; + case "cm": + return { + used: t + 1, value: parseFloat(r) / 2.54 * 72 + }; + case "in": + return { + used: t + 1, value: 72 * parseFloat(r) + }; + default: + return e.unshift(i), { + used: t, + value: parseFloat(r) + } + } + return { + used: 0 + } + }; + var o = function(e) { + for (; - 1 !== e.indexOf("\\n");) e = e.replace("\\n", "\n"); + return e + }; + this.getBrackettedSubstring = function(e, t, r, i) { + for (var a = i || e.charAt(t), n = t + 1; n < e.length && e.charAt(n) !== a;) ++n; + return e.charAt(n) === a ? [n - t + 1, o(e.substring(t + 1, n)), !0] : ((n = t + r) > e.length - 1 && (n = e.length - 1), [n - t + 1, o(e.substring(t + 1, n)), !1]) + } + } +}, function(e, t, r) { + var i = r(9), + a = r(19), + n = r(20), + s = r(10), + o = r(18), + c = {}; + + function l() { + var e = window.innerWidth; + for (var t in c) + if (c.hasOwnProperty(t)) { + var r = c[t]; + e -= 2 * r.offsetLeft, r.style.width = e + "px" + } + } + + function h(e, t, r, i) { + r.viewportHorizontal ? (e.innerHTML = '
', r.scrollHorizontal ? (e.style.overflowX = "auto", e.style.overflowY = "hidden") : e.style.overflow = "hidden", c[e.id] = e, e = e.children[0]) : r.viewportVertical ? (e.innerHTML = '
', e.style.overflowX = "hidden", e.style.overflowY = "auto", e = e.children[0]) : e.innerHTML = ""; + var a = new n(e, r); + (a.engraveABC(t, i), t.engraver = a, r.viewportVertical || r.viewportHorizontal) && (e.parentNode.style.width = e.style.width) + } + + function u(e, t, r, i) { + function n(e) { + var t = new a; + return t.formatting = e.formatting, t.media = e.media, t.version = e.version, t.metaText = {}, t.lines = [], t + } + for (var s, o = [], c = 0; c < t.lines.length; c++) { + var l = t.lines[c]; + s || (s = n(t)), 0 === c && (s.metaText.tempo = t.metaText.tempo, s.metaText.title = t.metaText.title, s.metaText.header = t.metaText.header, s.metaText.rhythm = t.metaText.rhythm, s.metaText.origin = t.metaText.origin, s.metaText.composer = t.metaText.composer, s.metaText.author = t.metaText.author, s.metaText.partOrder = t.metaText.partOrder), s.lines.push(l), l.staff && (o.push(s), s = void 0) + } + if (s) + for (var u = o[o.length - 1], d = 0; d < s.lines.length; d++) u.lines.push(s.lines[d]); + (s = o[o.length - 1]).metaText.unalignedWords = t.metaText.unalignedWords, s.metaText.book = t.metaText.book, s.metaText.source = t.metaText.source, s.metaText.discography = t.metaText.discography, s.metaText.notes = t.metaText.notes, s.metaText.transcription = t.metaText.transcription, s.metaText.history = t.metaText.history, s.metaText["abc-copyright"] = t.metaText["abc-copyright"], s.metaText["abc-creator"] = t.metaText["abc-creator"], s.metaText["abc-edited-by"] = t.metaText["abc-edited-by"], s.metaText.footer = t.metaText.footer; + var p = {}; + for (var f in r) r.hasOwnProperty(f) && (p[f] = r[f]); + var m = p.paddingtop, + g = p.paddingbottom; + e.innerHTML = ""; + for (var v = 0; v < o.length; v++) { + var b = document.createElement("div"); + e.appendChild(b), 0 === v ? (p.paddingtop = m, p.paddingbottom = -20) : v === o.length - 1 ? (p.paddingtop = 10, p.paddingbottom = g) : (p.paddingtop = 10, p.paddingbottom = -20), h(b, o[v], p, i), 0 === v ? t.engraver = o[v].engraver : t.engraver.staffgroups ? o[v].engraver.staffgroups.length > 0 && t.engraver.staffgroups.push(o[v].engraver.staffgroups[0]) : t.engraver.staffgroups = o[v].engraver.staffgroups + } + } + window.addEventListener("resize", l), window.addEventListener("orientationChange", l); + e.exports = function(e, t, r, a, c) { + var l, d = {}; + if (r) + for (l in r) r.hasOwnProperty(l) && (d[l] = r[l]); + if (a) + for (l in a) a.hasOwnProperty(l) && ("listener" === l ? a[l].highlight && (d.clickListener = a[l].highlight) : d[l] = a[l]); + if (c) + for (l in c) c.hasOwnProperty(l) && (d[l] = c[l]); + return i.renderEngine((function(e, t, r, i) { + var a = !1; + return "*" === e && (a = !0, (e = document.createElement("div")).setAttribute("style", "display:none;"), document.body.appendChild(e)), d.afterParsing && d.afterParsing(t, r, i), !a && d.wrap && d.staffwidth ? t = function(e, t, r, i, a) { + var c = new n(e, a), + l = c.getMeasureWidths(t), + d = o.calcLineWraps(t, l, i, a, s, c); + !a.oneSvgPerLine || d.tune.lines.length < 2 ? h(e, d.tune, d.revisedParams, r) : u(e, d.tune, d.revisedParams, r); + return d.tune.explanation = d.explanation, d.tune + }(e, t, r, i, d) : (a || !d.oneSvgPerLine || t.lines.length < 2 ? h(e, t, d, r) : u(e, t, d, r), a && e.parentNode.removeChild(e), null) + }), e, t, d) + } +}, function(e, t, r) { + var i, a = r(4), + n = r(35), + s = r(36), + o = r(37), + c = r(38), + l = r(39), + h = r(40), + u = r(43), + d = r(3), + p = r(2), + f = r(1), + m = r(44), + g = r(45), + v = r(21), + b = r(46), + y = r(47), + w = r(0); + ! function() { + "use strict"; + var e = function(e) { + var t = 0; + return e.duration && (t = e.duration), t + }, + t = !1, + r = { + rest: { + 0: "rests.whole", + 1: "rests.half", + 2: "rests.quarter", + 3: "rests.8th", + 4: "rests.16th", + 5: "rests.32nd", + 6: "rests.64th", + 7: "rests.128th", + multi: "rests.multimeasure" + }, + note: { + "-1": "noteheads.dbl", + 0: "noteheads.whole", + 1: "noteheads.half", + 2: "noteheads.quarter", + 3: "noteheads.quarter", + 4: "noteheads.quarter", + 5: "noteheads.quarter", + 6: "noteheads.quarter", + 7: "noteheads.quarter", + nostem: "noteheads.quarter" + }, + rhythm: { + "-1": "noteheads.slash.whole", + 0: "noteheads.slash.whole", + 1: "noteheads.slash.whole", + 2: "noteheads.slash.quarter", + 3: "noteheads.slash.quarter", + 4: "noteheads.slash.quarter", + 5: "noteheads.slash.quarter", + 6: "noteheads.slash.quarter", + 7: "noteheads.slash.quarter", + nostem: "noteheads.slash.nostem" + }, + x: { + "-1": "noteheads.indeterminate", + 0: "noteheads.indeterminate", + 1: "noteheads.indeterminate", + 2: "noteheads.indeterminate", + 3: "noteheads.indeterminate", + 4: "noteheads.indeterminate", + 5: "noteheads.indeterminate", + 6: "noteheads.indeterminate", + 7: "noteheads.indeterminate", + nostem: "noteheads.indeterminate" + }, + harmonic: { + "-1": "noteheads.harmonic.quarter", + 0: "noteheads.harmonic.quarter", + 1: "noteheads.harmonic.quarter", + 2: "noteheads.harmonic.quarter", + 3: "noteheads.harmonic.quarter", + 4: "noteheads.harmonic.quarter", + 5: "noteheads.harmonic.quarter", + 6: "noteheads.harmonic.quarter", + 7: "noteheads.harmonic.quarter", + nostem: "noteheads.harmonic.quarter" + }, + uflags: { + 3: "flags.u8th", + 4: "flags.u16th", + 5: "flags.u32nd", + 6: "flags.u64th" + }, + dflags: { + 3: "flags.d8th", + 4: "flags.d16th", + 5: "flags.d32nd", + 6: "flags.d64th" + } + }; + + function k(e, t) { + var r = e[t]; + if ("note" !== r.el_type || !r.startBeam || r.endBeam) return { + count: 1, + elem: r + }; + for (var i = []; t < e.length && "note" === e[t].el_type && (i.push(e[t]), !e[t].endBeam);) t++; + return { + count: i.length, + elem: i + } + } + + function x(e) { + if (e.pitches) { + S(e); + for (var t = 0, r = 0; r < e.pitches.length; r++) t += e.pitches[r].verticalPos; + e.averagepitch = t / e.pitches.length, e.minpitch = e.pitches[0].verticalPos, e.maxpitch = e.pitches[e.pitches.length - 1].verticalPos + } + }(i = function(e, t, r) { + this.decoration = new h, this.renderer = e, this.tuneNumber = t, this.isBagpipes = r.bagpipes, this.flatBeams = r.flatbeams, this.reset() + }).prototype.reset = function() { + this.slurs = {}, this.ties = [], this.voiceScale = 1, this.slursbyvoice = {}, this.tiesbyvoice = {}, this.endingsbyvoice = {}, this.scaleByVoice = {}, this.tripletmultiplier = 1, this.abcline = void 0, this.accidentalSlot = void 0, this.accidentalshiftx = void 0, this.dotshiftx = void 0, this.hasVocals = !1, this.minY = void 0, this.partstartelem = void 0, this.startlimitelem = void 0, this.stemdir = void 0 + }, i.prototype.setStemHeight = function(e) { + this.stemHeight = e / f.STEP + }, i.prototype.getCurrentVoiceId = function(e, t) { + return "s" + e + "v" + t + }, i.prototype.pushCrossLineElems = function(e, t) { + this.slursbyvoice[this.getCurrentVoiceId(e, t)] = this.slurs, this.tiesbyvoice[this.getCurrentVoiceId(e, t)] = this.ties, this.endingsbyvoice[this.getCurrentVoiceId(e, t)] = this.partstartelem, this.scaleByVoice[this.getCurrentVoiceId(e, t)] = this.voiceScale + }, i.prototype.popCrossLineElems = function(e, t) { + this.slurs = this.slursbyvoice[this.getCurrentVoiceId(e, t)] || {}, this.ties = this.tiesbyvoice[this.getCurrentVoiceId(e, t)] || [], this.partstartelem = this.endingsbyvoice[this.getCurrentVoiceId(e, t)], this.voiceScale = this.scaleByVoice[this.getCurrentVoiceId(e, t)], void 0 === this.voiceScale && (this.voiceScale = 1) + }, i.prototype.containsLyrics = function(e) { + for (var t = 0; t < e.length; t++) + for (var r = 0; r < e[t].voices.length; r++) + for (var i = 0; i < e[t].voices[r].length; i++) { + var a = e[t].voices[r][i]; + if (a.lyric) return void(a.positioning && "below" !== a.positioning.vocalPosition || (this.hasVocals = !0)) + } + }, i.prototype.createABCLine = function(e, r) { + this.minY = 2, this.containsLyrics(e); + var i = new m; + this.tempoSet = !1; + for (var a = 0; a < e.length; a++) t && this.restoreState(), t = !1, this.createABCStaff(i, e[a], r, a); + return i + }, i.prototype.createABCStaff = function(e, t, r, i) { + for (var a = 0; a < t.voices.length; a++) { + var n = new y(a, t.voices.length); + 0 === a ? (n.barfrom = "start" === t.connectBarLines || "continue" === t.connectBarLines, n.barto = "continue" === t.connectBarLines || "end" === t.connectBarLines) : n.duplicate = !0, t.title && t.title[a] && (n.header = t.title[a]); + var h = o(t.clef, this.tuneNumber); + h && (0 === a && t.barNumber && this.addMeasureNumber(t.barNumber, h), n.addChild(h)); + var u = c(t.key, this.tuneNumber); + if (u && (n.addChild(u), this.startlimitelem = u), t.meter) { + "specified" === t.meter.type ? this.measureLength = t.meter.value[0].num / t.meter.value[0].den : this.measureLength = 1; + var d = l(t.meter, this.tuneNumber); + n.addChild(d), this.startlimitelem = d + } + n.duplicate && (n.children = []); + var p = t.clef.stafflines || 0 === t.clef.stafflines ? t.clef.stafflines : 5; + e.addVoice(n, i, p); + var f = 1 === p; + this.createABCVoice(t.voices[a], r, i, a, f, n), e.setStaffLimits(n), "start" === t.brace ? e.brace = new s(1, !0) : ("end" === t.brace && e.brace || "continue" === t.brace && e.brace) && e.brace.increaseStavesIncluded() + } + }, i.prototype.createABCVoice = function(e, r, i, n, s, o) { + this.popCrossLineElems(i, n), this.stemdir = this.isBagpipes ? "down" : null, this.abcline = e, this.partstartelem && (this.partstartelem = new u("", null, null), o.addOther(this.partstartelem)); + var c = o.voicetotal < 2 ? -1 : o.voicenumber; + for (var l in this.slurs) this.slurs.hasOwnProperty(l) && (this.slurs[l] = new v({ + force: this.slurs[l].force, + voiceNumber: c, + stemDir: this.slurs[l].stemDir + }), t && this.slurs[l].setHint(), o.addOther(this.slurs[l])); + for (var h = 0; h < this.ties.length; h++) this.ties[h] = new v({ + force: this.ties[h].force, + stemDir: this.ties[h].stemDir, + voiceNumber: c + }), t && this.ties[h].setHint(), o.addOther(this.ties[h]); + for (var d = 0; d < this.abcline.length; d++) x(this.abcline[d]), this.minY = Math.min(this.abcline[d].minpitch, this.minY); + for (var p = 0 === i, f = 0; f < this.abcline.length;) { + var m = k(this.abcline, f), + b = this.createABCElement(p, s, o, m.elem); + if (b) + for (h = 0; h < b.length; h++) { + if (!this.tempoSet && r && !r.suppress) { + this.tempoSet = !0; + var y = new a(m.elem, 0, 0, "tempo", this.tuneNumber, {}); + y.addChild(new g(r, this.tuneNumber, C)), o.addChild(y) + } + o.addChild(b[h]) + } + f += m.count + } + this.pushCrossLineElems(i, n) + }, i.prototype.saveState = function() { + this.tiesSave = w.cloneArray(this.ties), this.slursSave = w.cloneHashOfHash(this.slurs), this.slursbyvoiceSave = w.cloneHashOfHash(this.slursbyvoice), this.tiesbyvoiceSave = w.cloneHashOfArrayOfHash(this.tiesbyvoice) + }, i.prototype.restoreState = function() { + this.ties = w.cloneArray(this.tiesSave), this.slurs = w.cloneHashOfHash(this.slursSave), this.slursbyvoice = w.cloneHashOfHash(this.slursbyvoiceSave), this.tiesbyvoice = w.cloneHashOfArrayOfHash(this.tiesbyvoiceSave) + }, i.prototype.createABCElement = function(e, r, i, n) { + var s = []; + switch (n.el_type) { + case void 0: + s = this.createBeam(r, i, n); + break; + case "note": + s[0] = this.createNote(n, !1, r, i), this.triplet && this.triplet.isClosed() && (i.addOther(this.triplet), this.triplet = null, this.tripletmultiplier = 1); + break; + case "bar": + s[0] = this.createBarLine(i, n, e), i.duplicate && s.length > 0 && (s[0].invisible = !0); + break; + case "meter": + s[0] = l(n, this.tuneNumber), this.startlimitelem = s[0], i.duplicate && s.length > 0 && (s[0].invisible = !0); + break; + case "clef": + if (s[0] = o(n, this.tuneNumber), !s[0]) return null; + i.duplicate && s.length > 0 && (s[0].invisible = !0); + break; + case "key": + var h = c(n, this.tuneNumber); + h && (s[0] = h, this.startlimitelem = s[0]), i.duplicate && s.length > 0 && (s[0].invisible = !0); + break; + case "stem": + this.stemdir = n.direction; + break; + case "part": + var u = new a(n, 0, 0, "part", this.tuneNumber), + d = this.renderer.getTextSize(n.title, "partsfont", "part"); + u.addChild(new p(n.title, 0, 0, void 0, { + type: "part", + height: d.height / f.STEP + })), s[0] = u; + break; + case "tempo": + var m = new a(n, 0, 0, "tempo", this.tuneNumber); + m.addChild(new g(n, this.tuneNumber, C)), s[0] = m; + break; + case "style": + "normal" === n.head ? delete this.style : this.style = n.head; + break; + case "hint": + t = !0, this.saveState(); + break; + case "midi": + break; + case "scale": + this.voiceScale = n.size; + break; + default: + var v = new a(n, 0, 0, "unsupported", this.tuneNumber); + v.addChild(new p("element type " + n.el_type, 0, 0, void 0, { + type: "debug" + })), s[0] = v + } + return s + }, i.prototype.calcBeamDir = function(e, t, r) { + if (this.stemdir) return this.stemdir; + for (var i = new n(this.stemHeight * this.voiceScale, this.stemdir, this.flatBeams), a = 0; a < r.length; a++) i.add({ + abcelem: r[a] + }); + return i.calcDir() ? "up" : "down" + }, i.prototype.createBeam = function(e, r, i) { + var a = [], + s = this.calcBeamDir(e, r, i), + o = new n(this.stemHeight * this.voiceScale, s, this.flatBeams); + t && o.setHint(); + var c = this.stemdir; + this.stemdir = s; + for (var l = 0; l < i.length; l++) { + var h = i[l], + u = this.createNote(h, !0, e, r); + a.push(u), o.add(u), this.triplet && this.triplet.isClosed() && (r.addOther(this.triplet), this.triplet = null, this.tripletmultiplier = 1) + } + return this.stemdir = c, r.addBeam(o), a + }; + var S = function(e) { + var t; + do { + t = !0; + for (var r = 0; r < e.pitches.length - 1; r++) + if (e.pitches[r].pitch > e.pitches[r + 1].pitch) { + t = !1; + var i = e.pitches[r]; + e.pitches[r] = e.pitches[r + 1], e.pitches[r + 1] = i + } + } while (!t) + }, + A = function(e, t, r, i, a, n, s, o, c) { + for (var l = r; l > 11; l--) l % 2 != 0 || i || e.addChild(new p(null, o, (a + 4) * c, l, { + type: "ledger" + })); + for (l = t; l < 1; l++) l % 2 != 0 || i || e.addChild(new p(null, o, (a + 4) * c, l, { + type: "ledger" + })); + for (l = 0; l < n.length; l++) { + var h = a; + "down" === s && (h = -h), e.addChild(new p(null, h + o, (a + 4) * c, n[l], { + type: "ledger" + })) + } + }; + + function T(e, t) { + for (var r = 0; r < e.length; r++) + if (JSON.stringify(e[r]) === JSON.stringify(t)) return; + e.push(t) + } + i.prototype.addGraceNotes = function(e, i, a, s, o, c, l) { + var h, u = null; + e.gracenotes.length > 1 && (u = new n(.7 * o, "grace", c), t && u.setHint(), u.mainNote = a); + var f, m = []; + for (f = e.gracenotes.length - 1; f >= 0; f--) l += 10, m[f] = l, e.gracenotes[f].accidental && (l += 7); + for (f = 0; f < e.gracenotes.length; f++) { + var g = e.gracenotes[f].verticalPos; + h = u ? null : r.uflags[c ? 5 : 3]; + var b = C(a, "noteheads.quarter", e.gracenotes[f], "up", -m[f], -m[f], h, 0, 0, .6 * this.voiceScale, [], !1); + b.notehead.highestVert = b.notehead.pitch + .7 * o; + var y = b.notehead; + if (this.addSlursAndTies(a, e.gracenotes[f], y, i, "up", !0), a.addExtra(y), e.gracenotes[f].acciaccatura) { + var w = e.gracenotes[f].verticalPos + 4.2, + k = u ? 5 : 6; + a.addRight(new p("flags.ugrace", -m[f] + k, 0, w, { + scalex: .6, + scaley: .6 + })) + } + if (u) { + var x = e.gracenotes[f].duration / 2; + c && (x /= 2); + var S = { + heads: [y], + abcelem: { + averagepitch: g, + minpitch: g, + maxpitch: g, + duration: x + } + }; + u.add(S) + } else { + var T = g + 1 / 3 * .6, + _ = g + 4.2, + N = y.dx + y.w; + a.addExtra(new p(null, N, 0, T, { + type: "stem", + pitch2: _, + linewidth: -.6 + })) + } + if (A(a, g, g, !1, d.getSymbolWidth("noteheads.quarter"), [], !0, y.dx - 1, .6), 0 === f && !c && (!e.rest || "spacer" !== e.rest.type && "invisible" !== e.rest.type)) { + 1 === e.gracenotes.length && (y.pitch, s.pitch); + i.addOther(new v({ + anchor1: y, + anchor2: s, + isGrace: !0 + })) + } + } + return u && i.addBeam(u), l + }, i.prototype.addNoteToAbcElement = function(t, i, a, n, s, o, c, l, h) { + var u, f, m, g, v, b = 0, + y = 0, + w = 0, + k = [], + x = [], + S = 0, + A = i.averagepitch >= 6 ? "down" : "up"; + for (n && (A = n), (s = i.style ? i.style : s) && "normal" !== s || (s = "note"), (g = o ? r[s].nostem : r[s][-c]) || console.log("noteSymbol:", s, c, o), v = "down" === A ? i.pitches.length - 2 : 1; + "down" === A ? v >= 0 : v < i.pitches.length; v = "down" === A ? v - 1 : v + 1) { + var _ = i.pitches["down" === A ? v + 1 : v - 1], + N = i.pitches[v], + E = "down" === A ? _.pitch - N.pitch : N.pitch - _.pitch; + E <= 1 && !_.printer_shift && (N.printer_shift = E ? "different" : "same", (N.verticalPos > 11 || N.verticalPos < 1) && k.push(N.verticalPos - N.verticalPos % 2), "down" === A ? y = d.getSymbolWidth(g) + 2 : b = d.getSymbolWidth(g) + 2) + } + var B = i.pitches.length; + for (v = 0; v < i.pitches.length; v++) { + var M, L; + if (!l) M = "down" === A && 0 !== v || "up" === A && v !== B - 1 ? null : r["down" === A ? "dflags" : "uflags"][-c]; + if (L = i.pitches[v].style ? r[i.pitches[v].style][-c] : g, i.pitches[v].highestVert = i.pitches[v].verticalPos, ("up" === n || "up" === A) && 0 === v || ("down" === n || "down" === A) && v === B - 1) { + if ((i.startSlur || 1 === B) && (i.pitches[v].highestVert = i.pitches[B - 1].verticalPos, e(i) < 1 && ("up" === n || "up" === A) && (i.pitches[v].highestVert += 6)), i.startSlur) + for (i.pitches[v].startSlur || (i.pitches[v].startSlur = []), m = 0; m < i.startSlur.length; m++) T(i.pitches[v].startSlur, i.startSlur[m]); + if (i.endSlur) + for (i.pitches[v].highestVert = i.pitches[B - 1].verticalPos, e(i) < 1 && ("up" === n || "up" === A) && (i.pitches[v].highestVert += 6), i.pitches[v].endSlur || (i.pitches[v].endSlur = []), m = 0; m < i.endSlur.length; m++) T(i.pitches[v].endSlur, i.endSlur[m]) + } + var P = !l && c <= -1, + H = C(t, L, i.pitches[v], A, 0, -y, M, a, b, this.voiceScale, x, !n); + S = Math.max(d.getSymbolWidth(L), S), t.extraw -= H.extraLeft, (u = H.notehead) && (this.addSlursAndTies(t, i.pitches[v], u, h, P ? A : null, !1), i.gracenotes && i.gracenotes.length > 0 && (u.bottom = u.bottom - 1), t.addHead(u)), y += H.accidentalshiftx, w = Math.max(w, H.dotshiftx) + } + if (P) { + var q = 7 * this.voiceScale, + D = "down" === A ? i.minpitch - q : i.minpitch + 1 / 3; + D > 6 && !n && (D = 6); + var I = "down" === A ? i.maxpitch - 1 / 3 : i.maxpitch + q; + I < 6 && !n && (I = 6); + var z = "down" === A || 0 === t.heads.length ? 0 : t.heads[0].w, + O = "down" === A ? 1 : -1; + "noteheads.slash.quarter" === u.c && ("down" === A ? I -= 1 : D += 1), t.addExtra(new p(null, z, 0, D, { + type: "stem", + pitch2: I, + linewidth: O + })), f = Math.min(D, I) + } + return { + noteHead: u, + roomTaken: y, + roomTakenRight: w, + min: f, + additionalLedgers: k, + dir: A, + symbolWidth: S + } + }, i.prototype.addLyric = function(e, t) { + var r = ""; + w.each(t.lyric, (function(e) { + var t = " " === e.divider ? "" : e.divider; + r += e.syllable + t + "\n" + })); + var i = this.renderer.getTextSize(r, "vocalfont", "lyric"), + a = t.positioning ? t.positioning.vocalPosition : "below"; + e.addCentered(new p(r, 0, i.width, void 0, { + type: "lyric", + position: a, + height: i.height / f.STEP + })) + }, i.prototype.addChord = function(e, t, r, i) { + for (var a = 0; a < t.chord.length; a++) { + var n, s = 0, + o = this.renderer.getTextSize(t.chord[a].name, "annotationfont", "annotation"), + c = o.width, + l = o.height / f.STEP; + switch (t.chord[a].position) { + case "left": + s = -(r += c + 7), n = t.averagepitch, e.addExtra(new p(t.chord[a].name, s, c + 4, n, { + type: "text", + height: l + })); + break; + case "right": + s = i += 4, n = t.averagepitch, e.addRight(new p(t.chord[a].name, s, c + 4, n, { + type: "text", + height: l + })); + break; + case "below": + e.addRight(new p(t.chord[a].name, 0, c + 8, void 0, { + type: "text", + position: "below", + height: l + })); + break; + case "above": + e.addRight(new p(t.chord[a].name, 0, c + 8, void 0, { + type: "text", + height: l + })); + break; + default: + if (t.chord[a].rel_position) { + var h = t.chord[a].rel_position.y + 3 * f.STEP; + e.addChild(new p(t.chord[a].name, s + t.chord[a].rel_position.x, 0, t.minpitch + h / f.STEP, { + type: "text", + height: l + })) + } else { + var u = "above"; + t.positioning && t.positioning.chordPosition && (u = t.positioning.chordPosition), l = (o = this.renderer.getTextSize(t.chord[a].name, "gchordfont", "chord")).height / f.STEP, c = o.width, e.addCentered(new p(t.chord[a].name, s, c, void 0, { + type: "chord", + position: u, + height: l + })) + } + } + } + return { + roomTaken: r, + roomTakenRight: i + } + }, i.prototype.createNote = function(i, n, s, o) { + var c, l = null, + h = 0, + u = 0, + f = 0, + m = [], + g = e(i), + v = !1; + 0 === g && (v = !0, g = .25, n = !0); + for (var y = Math.floor(Math.log(g) / Math.log(2)), w = 0, k = Math.pow(2, y), x = k / 2; k < g; w++, k += x, x /= 2); + i.startTriplet && (this.tripletmultiplier = i.tripletMultiplier); + var S = g * this.tripletmultiplier; + i.rest && "multimeasure" === i.rest.type && (S = 1); + var T = i.rest ? "rest" : "note", + _ = new a(i, S, 1, T, this.tuneNumber, { + durationClassOveride: i.duration * this.tripletmultiplier + }); + if (t && _.setHint(), i.rest) { + this.measureLength === g && "invisible" !== i.rest.type && "spacer" !== i.rest.type && (i.rest.type = "whole"); + var N = function(e, t, i, a, n, s, o, c, l) { + var h, u, f, m, g = 7; + switch (n && ("down" === s && (g = 3), "up" === s && (g = 11)), o && (g = i < .5 || i < 1 ? 7 : 5), t.rest.type) { + case "whole": + h = r.rest[0], t.averagepitch = g, t.minpitch = g, t.maxpitch = g, a = 0; + break; + case "rest": + h = "rhythm" === t.style ? r.rhythm[-c] : r.rest[-c], t.averagepitch = g, t.minpitch = g, t.maxpitch = g; + break; + case "invisible": + case "spacer": + h = "", t.averagepitch = g, t.minpitch = g, t.maxpitch = g; + break; + case "multimeasure": + h = r.rest.multi, t.averagepitch = g, t.minpitch = g, t.maxpitch = g, a = 0; + var v = d.getSymbolWidth(h); + e.addHead(new p(h, -v, 2 * v, 7)); + var b = new p("" + t.duration, 0, v, 16, { + type: "multimeasure-text" + }); + e.addExtra(b) + } + if ("multimeasure" !== t.rest.type) { + var y = C(e, h, { + verticalPos: g + }, null, 0, 0, null, a, 0, l, [], !1); + (u = y.notehead) && (e.addHead(u), f = y.accidentalshiftx, m = y.dotshiftx) + } + return { + noteHead: u, + roomTaken: f, + roomTakenRight: m + } + }(_, i, g, w, o.voicetotal > 1, this.stemdir, s, y, this.voiceScale); + l = N.noteHead, h = N.roomTaken, u = N.roomTakenRight + } else { + var E = this.addNoteToAbcElement(_, i, w, this.stemdir, this.style, v, y, n, o); + void 0 !== E.min && (this.minY = Math.min(E.min, this.minY)), l = E.noteHead, h = E.roomTaken, u = E.roomTakenRight, m = E.additionalLedgers, c = E.dir, f = E.symbolWidth + } + if (void 0 !== i.lyric && this.addLyric(_, i), void 0 !== i.gracenotes && (h += this.addGraceNotes(i, o, _, l, this.stemHeight * this.voiceScale, this.isBagpipes, h)), i.decoration && this.decoration.createDecoration(o, i.decoration, _.top, l ? l.w : 0, _, h, c, _.bottom, i.positioning, this.hasVocals), i.barNumber && _.addChild(new p(i.barNumber, -10, 0, 0, { + type: "barNumber" + })), A(_, i.minpitch, i.maxpitch, i.rest, f, m, c, -2, 1), void 0 !== i.chord) { + var B = this.addChord(_, i, h, u); + h = B.roomTaken, u = B.roomTakenRight + } + return i.startTriplet && (this.triplet = new b(i.startTriplet, l, { + flatBeams: this.flatBeams + })), i.endTriplet && this.triplet && this.triplet.setCloseAnchor(l), !this.triplet || i.startTriplet || i.endTriplet || this.triplet.middleNote(l), _ + }; + var C = function(e, t, r, i, a, n, s, o, c, l, h, u) { + var f, m = r.verticalPos, + g = 0, + v = 0, + b = 0; + if (void 0 === t) e.addChild(new p("pitch is undefined", 0, 0, 0, { + type: "debug" + })); + else if ("" === t) f = new p(null, 0, 0, m); + else { + var y = a; + if (r.printer_shift) { + var w = "same" === r.printer_shift ? 1 : 0; + y = "down" === i ? -d.getSymbolWidth(t) * l + w : d.getSymbolWidth(t) * l - w + } + var k = { + scalex: l, + scaley: l, + thickness: d.symbolHeightInPitches(t) * l + }; + if ((f = new p(t, y, d.getSymbolWidth(t) * l, m, k)).stemDir = i, s) { + var x = m + ("down" === i ? -7 : 7) * l; + u && ("down" === i && x > 6 && (x = 6), "up" === i && x < 6 && (x = 6)); + var S = "down" === i ? a : a + f.w - .6; + e.addRight(new p(s, S, d.getSymbolWidth(s) * l, x, { + scalex: l, + scaley: l + })) + } + for (v = f.w + c - 2 + 5 * o; o > 0; o--) { + var A = 1 - Math.abs(m) % 2; + e.addRight(new p("dots.dot", f.w + c - 2 + 5 * o, d.getSymbolWidth("dots.dot"), m + A)) + } + } + if (f && (f.highestVert = r.highestVert), r.accidental) { + var T; + switch (r.accidental) { + case "quartersharp": + T = "accidentals.halfsharp"; + break; + case "dblsharp": + T = "accidentals.dblsharp"; + break; + case "sharp": + T = "accidentals.sharp"; + break; + case "quarterflat": + T = "accidentals.halfflat"; + break; + case "flat": + T = "accidentals.flat"; + break; + case "dblflat": + T = "accidentals.dblflat"; + break; + case "natural": + T = "accidentals.nat" + } + for (var C = !1, _ = n, N = 0; N < h.length; N++) + if (m - h[N][0] >= 6) { + h[N][0] = m, _ = h[N][1], C = !0; + break + }! 1 === C && (_ -= d.getSymbolWidth(T) * l + 2, h.push([m, _]), g = d.getSymbolWidth(T) * l + 2), e.addExtra(new p(T, _, d.getSymbolWidth(T), m, { + scalex: l, + scaley: l + })), b = d.getSymbolWidth(T) / 2 + } + return { + notehead: f, + accidentalshiftx: g, + dotshiftx: v, + extraLeft: b + } + }; + i.prototype.addSlursAndTies = function(e, r, i, a, n, s) { + if (r.endTie && this.ties.length > 0) { + for (var o = !1, c = 0; c < this.ties.length; c++) + if (this.ties[c].anchor1 && this.ties[c].anchor1.pitch === i.pitch) { + this.ties[c].setEndAnchor(i), this.ties.splice(c, 1), o = !0; + break + } o || (this.ties[0].setEndAnchor(i), this.ties.splice(0, 1)) + } + var l = a.voicetotal < 2 ? -1 : a.voicenumber; + if (r.startTie) { + var h = new v({ + anchor1: i, + force: "down" === this.stemdir || "up" === this.stemdir, + stemDir: this.stemdir, + isGrace: s, + voiceNumber: l + }); + t && h.setHint(), this.ties[this.ties.length] = h, a.addOther(h), e.startTie = !0 + } + if (r.endSlur) + for (var u = 0; u < r.endSlur.length; u++) { + var d = r.endSlur[u]; + this.slurs[d] ? ((f = this.slurs[d]).setEndAnchor(i), delete this.slurs[d]) : (f = new v({ + anchor2: i, + stemDir: this.stemdir, + voiceNumber: l + }), t && f.setHint(), a.addOther(f)), this.startlimitelem && f.setStartX(this.startlimitelem) + } else if (!s) + for (var p in this.slurs) this.slurs.hasOwnProperty(p) && this.slurs[p].addInternalNote(i); + if (r.startSlur) + for (u = 0; u < r.startSlur.length; u++) { + d = r.startSlur[u].label; + var f = new v({ + anchor1: i, + stemDir: this.stemdir, + voiceNumber: l + }); + t && f.setHint(), this.slurs[d] = f, a.addOther(f) + } + }, i.prototype.addMeasureNumber = function(e, t) { + var r = this.renderer.getTextSize(e, "measurefont", "bar-number"); + t.addChild(new p(e, 0, 0, 11 + r.height / f.STEP, { + type: "barNumber" + })) + }, i.prototype.createBarLine = function(e, t, r) { + var i = new a(t, 0, 10, "bar", this.tuneNumber), + n = null, + s = 0; + t.barNumber && this.addMeasureNumber(t.barNumber, i); + var o = "bar_right_repeat" === t.type || "bar_dbl_repeat" === t.type, + c = "bar_left_repeat" !== t.type && "bar_thick_thin" !== t.type && "bar_invisible" !== t.type, + l = "bar_right_repeat" === t.type || "bar_dbl_repeat" === t.type || "bar_left_repeat" === t.type || "bar_thin_thick" === t.type || "bar_thick_thin" === t.type, + h = "bar_left_repeat" === t.type || "bar_thick_thin" === t.type || "bar_thin_thin" === t.type || "bar_dbl_repeat" === t.type, + d = "bar_left_repeat" === t.type || "bar_dbl_repeat" === t.type; + if (o || d) { + for (var f in this.slurs) this.slurs.hasOwnProperty(f) && this.slurs[f].setEndX(i); + this.startlimitelem = i + } + if (o && (i.addRight(new p("dots.dot", s, 1, 7)), i.addRight(new p("dots.dot", s, 1, 5)), s += 6), c && (n = new p(null, s, 1, 2, { + type: "bar", + pitch2: 10, + linewidth: .6 + }), i.addRight(n)), "bar_invisible" === t.type && (n = new p(null, s, 1, 2, { + type: "none", + pitch2: 10, + linewidth: .6 + }), i.addRight(n)), t.decoration && this.decoration.createDecoration(e, t.decoration, 12, l ? 3 : 1, i, 0, "down", 2, t.positioning, this.hasVocals), l && (n = new p(null, s += 4, 4, 2, { + type: "bar", + pitch2: 10, + linewidth: 4 + }), i.addRight(n), s += 5), this.partstartelem && t.endEnding && (this.partstartelem.anchor2 = n, this.partstartelem = null), h && (n = new p(null, s += 3, 1, 2, { + type: "bar", + pitch2: 10, + linewidth: .6 + }), i.addRight(n)), d && (s += 3, i.addRight(new p("dots.dot", s, 1, 7)), i.addRight(new p("dots.dot", s, 1, 5))), t.startEnding && r) { + var m = this.renderer.getTextSize(t.startEnding, "repeatfont", "").width; + i.minspacing += m + 10, this.partstartelem = new u(t.startEnding, n, null), e.addOther(this.partstartelem) + } + return i.extraw -= 5, i + } + }(), e.exports = i +}, function(e, t, r) { + r(4); + var i, a = r(2), + n = r(1), + s = function(e) { + return void 0 === e ? 0 : Math.floor(Math.log(e) / Math.log(2)) + }; + ! function() { + "use strict"; + (i = function(e, t, r) { + this.isflat = r, this.isgrace = t && "grace" === t, this.forceup = this.isgrace || t && "up" === t, this.forcedown = t && "down" === t, this.elems = [], this.total = 0, this.allrests = !0, this.stemHeight = e, this.beams = [] + }).prototype.setHint = function() { + this.hint = !0 + }, i.prototype.add = function(e) { + var t = e.abcelem.averagepitch; + void 0 !== t && (this.allrests = this.allrests && e.abcelem.rest, e.beam = this, this.elems.push(e), this.total += t, (void 0 === this.min || e.abcelem.minpitch < this.min) && (this.min = e.abcelem.minpitch), (void 0 === this.max || e.abcelem.maxpitch > this.max) && (this.max = e.abcelem.maxpitch)) + }; + + function e(e, t, r, i) { + if (!e.children) return i; + for (var a = 0; a < e.children.length; a++) { + var n = e.children[a]; + t && void 0 !== n.top && "flags.ugrace" === n.c ? i = Math.max(i, n.top - r) : t || void 0 === n.bottom || "flags.ugrace" !== n.c || (i = Math.max(i, r - n.bottom + 7)) + } + return i + } + + function t(e, t) { + return t ? e / t : 0 + } + + function r(e, t, r, i, a) { + return t + (i - t) / (r - e) * (a - e) + } + + function o(e, t, r, i, a, n, s) { + var o = "beam-elem"; + s && (o += " abcjs-hint"); + var c = "M" + t + " " + (r = e.calcY(r)) + " L" + i + " " + (a = e.calcY(a)) + "L" + i + " " + (a + n) + " L" + t + " " + (r + n) + "z"; + e.printPath({ + path: c, + stroke: "none", + fill: "#000000", + class: e.addClasses(o) + }) + } + i.prototype.calcDir = function() { + return !!this.forceup || !this.forcedown && t(this.total, this.elems.length) < 6 + }, i.prototype.layout = function() { + if (0 !== this.elems.length && !this.allrests) { + this.stemsUp = this.calcDir(); + var i = function(e, t) { + var r = e ? n.STEP : -n.STEP; + t && (r *= .4); + return r + }(this.stemsUp, this.isgrace), + o = this.elems[0], + c = this.elems[this.elems.length - 1], + l = 0, + h = this.stemsUp ? o.abcelem.maxpitch : o.abcelem.minpitch; + l = e(o, this.stemsUp, h, l), l = e(c, this.stemsUp, h, l), l = Math.max(this.stemHeight, l + 3); + var u = function(e, r, i, a, n, s, o, c, l, h) { + var u = t(e, r), + d = i - 2, + p = i - 2, + f = Math.round(a ? Math.max(u + d, l + p) : Math.min(u - d, c - p)), + m = function(e, t, r, i) { + if (i) return 0; + var a = e - t, + n = r / 2; + a > n && (a = n); + a < -n && (a = -n); + return a + }(n, s, r, o), + g = f + Math.floor(m / 2), + v = f + Math.floor(-m / 2); + h || (a && f < 6 || !a && f > 6) && (g = 6, v = 6); + return [g, v] + }(this.total, this.elems.length, l, this.stemsUp, o.abcelem.averagepitch, c.abcelem.averagepitch, this.isflat, this.min, this.max, this.isgrace), + d = function(e, t, r) { + var i = t.heads[e ? 0 : t.heads.length - 1], + a = r.heads[e ? 0 : r.heads.length - 1], + n = i.x; + e && (n += i.w - .6); + var s = a.x; + e && (s += a.w); + return [n, s] + }(this.stemsUp, o, c); + this.beams.push({ + startX: d[0], + endX: d[1], + startY: u[0], + endY: u[1], + dy: i + }); + for (var p = function(e, t, i, a, n) { + for (var o = [], c = [], l = 0; l < e.length; l++) { + var h = e[l]; + if (!h.abcelem.rest) { + var u = h.heads[t ? 0 : h.heads.length - 1], + d = u.x + (t ? u.w : 0), + p = r(i.startX, i.startY, i.endX, i.endY, d), + f = t ? -1.5 : 1.5; + a && (f = 2 * f / 3); + var m = h.abcelem.duration; + 0 === m && (m = .25); + for (var g = s(m); g < -3; g++) c[-4 - g] ? c[-4 - g].single = !1 : c[-4 - g] = { + x: d + (t ? -.6 : 0), + y: p + f * (-4 - g + 1), + durlog: g, + single: !0 + }; + for (var v = c.length - 1; v >= 0; v--) + if (l === e.length - 1 || s(e[l + 1].abcelem.duration) > -v - 4) { + var b = d, + y = p + f * (v + 1); + c[v].single && (b = 0 === l ? d + 5 : d - 5, y = r(i.startX, i.startY, i.endX, i.endY, b) + f * (v + 1)), o.push({ + startX: c[v].x, + endX: b, + startY: c[v].y, + endY: y, + dy: n + }), c = c.slice(0, v) + } + } + } + return o + }(this.elems, this.stemsUp, this.beams[0], this.isgrace, i), f = 0; f < p.length; f++) this.beams.push(p[f]); + ! function(e, t, i, s, o) { + for (var c = 0; c < e.length; c++) { + var l = e[c]; + if (!l.abcelem.rest) { + var h = !l.addExtra, + u = h ? o : l, + d = l.heads[t ? 0 : l.heads.length - 1], + p = d.pitch + (t ? .2 : -.2), + f = t ? d.w : 0, + m = d.x + f, + g = r(i.startX, i.startY, i.endX, i.endY, m), + v = t ? -.6 : .6; + t || (g -= s / 2 / n.STEP), h && (f += l.heads[0].dx), "noteheads.slash.quarter" === d.c && (t ? p += 1 : p -= 1); + var b = new a(null, f, 0, p, { + type: "stem", + pitch2: g, + linewidth: v + }); + b.setX(u.x), u.addExtra(b) + } + } + }(this.elems, this.stemsUp, this.beams[0], i, this.mainNote) + } + }, i.prototype.isAbove = function() { + return this.stemsUp + }, i.prototype.heightAtMidpoint = function(e, t) { + if (0 === this.beams.length) return 0; + var i = this.beams[0], + a = e + (t - e) / 2; + return r(i.startX, i.startY, i.endX, i.endY, a) + }, i.prototype.yAtNote = function(e) { + var t = this.beams[0]; + return r(t.startX, t.startY, t.endX, t.endY, e.x) + }, i.prototype.xAtMidpoint = function(e, t) { + return e + (t - e) / 2 + }, i.prototype.draw = function(e) { + if (0 !== this.beams.length) { + e.beginGroup(); + for (var t = 0; t < this.beams.length; t++) { + var r = this.beams[t]; + o(e, r.startX, r.startY, r.endX, r.endY, r.dy, this.hint) + } + e.endGroup("beam-elem") + } + } + }(), e.exports = i +}, function(e, t) { + var r = function() { + this.length = 1 + }; + r.prototype.increaseStavesIncluded = function() { + this.length++ + }, r.prototype.setLocation = function(e) { + this.x = e + }, r.prototype.getWidth = function() { + return 10 + }, r.prototype.layout = function(e, t, r) { + this.startY = t, this.endY = r + }, r.prototype.draw = function(e, t, r) { + this.layout(e, t, r), e.drawBrace(this.x, this.startY, this.endY) + }, e.exports = r +}, function(e, t, r) { + var i, a = r(4), + n = r(3), + s = r(2); + ! function() { + "use strict"; + i = function(e, t) { + var r, i = 0, + o = new a(e, 0, 10, "staff-extra", t); + switch (o.isClef = !0, e.type) { + case "treble": + r = "clefs.G"; + break; + case "tenor": + case "alto": + r = "clefs.C"; + break; + case "bass": + r = "clefs.F"; + break; + case "treble+8": + r = "clefs.G", i = 1; + break; + case "tenor+8": + r = "clefs.C", i = 1; + break; + case "bass+8": + r = "clefs.F", i = 1; + break; + case "alto+8": + r = "clefs.C", i = 1; + break; + case "treble-8": + r = "clefs.G", i = -1; + break; + case "tenor-8": + r = "clefs.C", i = -1; + break; + case "bass-8": + r = "clefs.F", i = -1; + break; + case "alto-8": + r = "clefs.C", i = -1; + break; + case "none": + return null; + case "perc": + r = "clefs.perc"; + break; + default: + o.addChild(new s("clef=" + e.type, 0, 0, void 0, { + type: "debug" + })) + } + if (r && (o.addRight(new s(r, 5, n.getSymbolWidth(r), e.clefPos)), "clefs.G" === r ? (o.top = 13, o.bottom = -1) : (o.top = 10, o.bottom = 2), 0 !== i)) { + var c = (n.getSymbolWidth(r) - n.getSymbolWidth("8") * (2 / 3)) / 2; + o.addRight(new s("8", 5 + c, n.getSymbolWidth("8") * (2 / 3), i > 0 ? o.top + 3 : o.bottom - 1, { + scalex: 2 / 3, + scaley: 2 / 3 + })), o.top += 2 + } + return o + } + }(), e.exports = i +}, function(e, t, r) { + var i, a = r(4), + n = r(3), + s = r(2), + o = r(0); + ! function() { + "use strict"; + i = function(e, t) { + if (!e.accidentals || 0 === e.accidentals.length) return null; + var r = new a(e, 0, 10, "staff-extra", t); + r.isKeySig = !0; + var i = 0; + return o.each(e.accidentals, (function(e) { + var t; + switch (e.acc) { + case "sharp": + t = "accidentals.sharp"; + break; + case "natural": + t = "accidentals.nat"; + break; + case "flat": + t = "accidentals.flat"; + break; + case "quartersharp": + t = "accidentals.halfsharp"; + break; + case "quarterflat": + t = "accidentals.halfflat"; + break; + default: + t = "accidentals.flat" + } + r.addRight(new s(t, i, n.getSymbolWidth(t), e.verticalPos, { + thickness: n.symbolHeightInPitches(t) + })), i += n.getSymbolWidth(t) + 2 + }), this), r + } + }(), e.exports = i +}, function(e, t, r) { + var i, a = r(4), + n = r(3), + s = r(2); + ! function() { + "use strict"; + i = function(e, t) { + var r = new a(e, 0, 10, "staff-extra", t); + if ("specified" === e.type) + for (var i = 0, o = 0; o < e.value.length; o++) + if (0 !== o && (r.addRight(new s("+", i + 1, n.getSymbolWidth("+"), 6, { + thickness: n.symbolHeightInPitches("+") + })), i += n.getSymbolWidth("+") + 2), e.value[o].den) { + for (var c = 0, l = 0; l < e.value[o].num.length; l++) c += n.getSymbolWidth(e.value[o].num.charAt(l)); + var h = 0; + for (l = 0; l < e.value[o].num.length; l++) h += n.getSymbolWidth(e.value[o].den.charAt(l)); + var u = Math.max(c, h); + r.addRight(new s(e.value[o].num, i + (u - c) / 2, c, 8, { + thickness: n.symbolHeightInPitches(e.value[o].num.charAt(0)) + })), r.addRight(new s(e.value[o].den, i + (u - h) / 2, h, 4, { + thickness: n.symbolHeightInPitches(e.value[o].den.charAt(0)) + })), i += u + } else { + for (var d = 0, p = 0; p < e.value[o].num.length; p++) d += n.getSymbolWidth(e.value[o].num.charAt(p)); + r.addRight(new s(e.value[o].num, i, d, 6, { + thickness: n.symbolHeightInPitches(e.value[o].num.charAt(0)) + })), i += d + } + else "common_time" === e.type ? r.addRight(new s("timesig.common", 0, n.getSymbolWidth("timesig.common"), 6, { + thickness: n.symbolHeightInPitches("timesig.common") + })) : "cut_time" === e.type ? r.addRight(new s("timesig.cut", 0, n.getSymbolWidth("timesig.cut"), 6, { + thickness: n.symbolHeightInPitches("timesig.cut") + })) : "tempus_imperfectum" === e.type ? r.addRight(new s("timesig.imperfectum", 0, n.getSymbolWidth("timesig.imperfectum"), 6, { + thickness: n.symbolHeightInPitches("timesig.imperfectum") + })) : "tempus_imperfectum_prolatio" === e.type ? r.addRight(new s("timesig.imperfectum2", 0, n.getSymbolWidth("timesig.imperfectum2"), 6, { + thickness: n.symbolHeightInPitches("timesig.imperfectum2") + })) : "tempus_perfectum" === e.type ? r.addRight(new s("timesig.perfectum", 0, n.getSymbolWidth("timesig.perfectum"), 6, { + thickness: n.symbolHeightInPitches("timesig.perfectum") + })) : "tempus_perfectum_prolatio" === e.type ? r.addRight(new s("timesig.perfectum2", 0, n.getSymbolWidth("timesig.perfectum2"), 6, { + thickness: n.symbolHeightInPitches("timesig.perfectum2") + })) : console.log("time signature:", e); + return r + } + }(), e.exports = i +}, function(e, t, r) { + var i, a = r(41), + n = r(42), + s = r(3), + o = r(2), + c = r(21); + ! function() { + "use strict"; + var e = function(e, t, r, i, a) { + function n(e, t) { + var n = "down" === a ? function() { + if (0 === i.heads.length) return 2; + for (var e = i.heads[0].pitch, t = 1; t < i.heads.length; t++) e = Math.min(e, i.heads[t].pitch); + return e + }() + 1 : function() { + if (0 === i.heads.length) return 10; + for (var e = i.heads[0].pitch, t = 1; t < i.heads.length; t++) e = Math.max(e, i.heads[t].pitch); + return e + }() + 9; + "down" !== a && 1 === t && n--; + var c = r / 2; + c += "down" === a ? -5 : 3; + for (var l = 0; l < t; l++) n -= 1, i.addChild(new o(e, c, s.getSymbolWidth(e), n)) + } + for (var c = 0; c < e.length; c++) switch (e[c]) { + case "/": + n("flags.ugrace", 1); + break; + case "//": + n("flags.ugrace", 2); + break; + case "///": + n("flags.ugrace", 3); + break; + case "////": + n("flags.ugrace", 4) + } + }; + (i = function() { + this.startDiminuendoX = void 0, this.startCrescendoX = void 0, this.minTop = 12, this.minBottom = 0 + }).prototype.dynamicDecoration = function(e, t, r, i) { + for (var a, s, o = 0; o < t.length; o++) switch (t[o]) { + case "diminuendo(": + this.startDiminuendoX = r, a = void 0; + break; + case "diminuendo)": + a = { + start: this.startDiminuendoX, + stop: r + }, this.startDiminuendoX = void 0; + break; + case "crescendo(": + this.startCrescendoX = r, s = void 0; + break; + case "crescendo)": + s = { + start: this.startCrescendoX, + stop: r + }, this.startCrescendoX = void 0 + } + a && e.addOther(new n(a.start, a.stop, ">", i)), s && e.addOther(new n(s.start, s.stop, "<", i)) + }, i.prototype.createDecoration = function(t, r, i, n, l, h, u, d, p, f) { + p || (p = { + ornamentPosition: "above", + volumePosition: f ? "above" : "below", + dynamicPosition: f ? "above" : "below" + }), + function(e, t, r, i) { + for (var n = 0; n < t.length; n++) switch (t[n]) { + case "p": + case "mp": + case "pp": + case "ppp": + case "pppp": + case "f": + case "ff": + case "fff": + case "ffff": + case "sfz": + case "mf": + var s = new a(r, t[n], i); + e.addOther(s) + } + }(t, r, l, p.volumePosition), this.dynamicDecoration(t, r, l, p.dynamicPosition), e(r, 0, n, l, u); + var m = function(e, t, r, i, a, n, l, h) { + for (var u, d = 0; d < t.length; d++) { + if ("staccato" === t[d] || "tenuto" === t[d] || "accent" === t[d]) { + var p = "scripts." + t[d]; + if ("accent" === t[d] && (p = "scripts.sforzato"), u = void 0 === u ? "down" === l ? r + 2 : h - 2 : "down" === l ? u + 2 : u - 2, "accent" === t[d]) "up" === l ? u-- : u++; + else switch (u) { + case 2: + case 4: + case 6: + case 8: + case 10: + "up" === l ? u-- : u++ + } + r > 9 && u++; + var f = i / 2; + "center" !== s.getSymbolAlign(p) && (f -= s.getSymbolWidth(p) / 2), a.addChild(new o(p, f, s.getSymbolWidth(p), u)) + } + if ("slide" === t[d] && a.heads[0]) { + var m = a.heads[0].pitch, + g = new o("", -n - 15, 0, (m -= 2) - 1), + v = new o("", -n - 5, 0, m + 1); + a.addChild(g), a.addChild(v), e.addOther(new c({ + anchor1: g, + anchor2: v, + fixedY: !0 + })) + } + } + return void 0 === u && (u = r), { + above: u, + below: a.bottom + } + }(t, r, i, n, l, h, u, d); + m.above = Math.max(m.above, this.minTop); + ! function(e, t, r, i, a, n, c) { + function l(e, t) { + "above" === e ? i.above += t : i.below -= t + } + + function h(e) { + var t; + return "above" === e ? (t = i.above) < n && (t = n) : (t = i.below) > c && (t = c), t + } + + function u(e, i) { + var a = h(i); + r.addChild(new o(e, t / 2, 0, a + 2, { + type: "decoration", + klass: "ornament", + thickness: 3 + })), l(i, 5) + } + + function d(e, i) { + var a = t / 2; + "center" !== s.getSymbolAlign(e) && (a -= s.getSymbolWidth(e) / 2); + var n = s.symbolHeightInPitches(e) + 1, + c = h(i); + c = "above" === i ? c + n / 2 : c - n / 2, r.addChild(new o(e, a, s.getSymbolWidth(e), c, { + klass: "ornament", + thickness: s.symbolHeightInPitches(e) + })), l(i, n) + } + for (var p = { + "+": "scripts.stopped", + open: "scripts.open", + snap: "scripts.snap", + wedge: "scripts.wedge", + thumb: "scripts.thumb", + shortphrase: "scripts.shortphrase", + mediumphrase: "scripts.mediumphrase", + longphrase: "scripts.longphrase", + trill: "scripts.trill", + roll: "scripts.roll", + irishroll: "scripts.roll", + marcato: "scripts.umarcato", + dmarcato: "scripts.dmarcato", + umarcato: "scripts.umarcato", + turn: "scripts.turn", + uppermordent: "scripts.prall", + pralltriller: "scripts.prall", + mordent: "scripts.mordent", + lowermordent: "scripts.mordent", + downbow: "scripts.downbow", + upbow: "scripts.upbow", + fermata: "scripts.ufermata", + invertedfermata: "scripts.dfermata", + breath: ",", + coda: "scripts.coda", + segno: "scripts.segno" + }, f = !1, m = 0; m < e.length; m++) switch (e[m]) { + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "D.C.": + case "D.S.": + u(e[m], a), f = !0; + break; + case "fine": + u("FINE", a), f = !0; + break; + case "+": + case "open": + case "snap": + case "wedge": + case "thumb": + case "shortphrase": + case "mediumphrase": + case "longphrase": + case "trill": + case "roll": + case "irishroll": + case "marcato": + case "dmarcato": + case "turn": + case "uppermordent": + case "pralltriller": + case "mordent": + case "lowermordent": + case "downbow": + case "upbow": + case "fermata": + case "breath": + case "umarcato": + case "coda": + case "segno": + d(p[e[m]], a), f = !0; + break; + case "invertedfermata": + d(p[e[m]], "below"), f = !0; + break; + case "mark": + r.klass = "mark" + } + }(r, n, l, m, p.ornamentPosition, this.minTop, this.minBottom); + ! function(e, t, r) { + for (var i = 0; i < e.length; i++) switch (e[i]) { + case "arpeggio": + for (var a = t.abcelem.minpitch - 1; a <= t.abcelem.maxpitch; a += 2) t.addExtra(new o("scripts.arpeggio", 2 * -s.getSymbolWidth("scripts.arpeggio") - r, 0, a + 2, { + klass: "ornament", + thickness: s.symbolHeightInPitches("scripts.arpeggio") + })) + } + }(r, l, h) + } + }(), e.exports = i +}, function(e, t, r) { + r(1); + var i = function(e, t, r) { + this.anchor = e, this.dec = t, "below" === r ? this.volumeHeightBelow = 5 : this.volumeHeightAbove = 5, this.pitch = void 0 + }; + i.prototype.setUpperAndLowerElements = function(e) { + this.volumeHeightAbove ? this.pitch = e.volumeHeightAbove : this.pitch = e.volumeHeightBelow + }, i.prototype.draw = function(e, t, r) { + void 0 === this.pitch && window.console.error("Dynamic Element y-coordinate not set."); + e.printSymbol(this.anchor.x, this.pitch, this.dec, 1, 1, e.addClasses("decoration")) + }, e.exports = i +}, function(e, t, r) { + var i = r(5), + a = function(e, t, r, i) { + this.anchor1 = e, this.anchor2 = t, this.dir = r, "above" === i ? this.dynamicHeightAbove = 4 : this.dynamicHeightBelow = 4, this.pitch = void 0 + }; + a.prototype.setUpperAndLowerElements = function(e) { + this.dynamicHeightAbove ? this.pitch = e.dynamicHeightAbove : this.pitch = e.dynamicHeightBelow + }, a.prototype.draw = function(e) { + void 0 === this.pitch && window.console.error("Crescendo Element y-coordinate not set."); + var t = e.calcY(this.pitch) + 4; + "<" === this.dir ? (this.drawLine(e, t + 4, t), this.drawLine(e, t + 4, t + 8)) : (this.drawLine(e, t, t + 4), this.drawLine(e, t + 8, t + 4)) + }, a.prototype.drawLine = function(e, t, r) { + var a = this.anchor1 ? this.anchor1.x : 0, + n = this.anchor2 ? this.anchor2.x : 800, + s = i("M %f %f L %f %f", a, t, n, r); + e.printPath({ + path: s, + stroke: "#000000", + class: e.addClasses("decoration") + }) + }, e.exports = a +}, function(e, t, r) { + var i = r(5), + a = function(e, t, r) { + this.text = e, this.anchor1 = t, this.anchor2 = r, this.endingHeightAbove = 5, this.pitch = void 0 + }; + a.prototype.setUpperAndLowerElements = function(e) { + this.pitch = e.endingHeightAbove - 2 + }, a.prototype.draw = function(e, t, r) { + void 0 === this.pitch && window.console.error("Ending Element y-coordinate not set."); + var a, n = e.calcY(this.pitch); + this.anchor1 && (t = this.anchor1.x + this.anchor1.w, a = i("M %f %f L %f %f", t, n, t, n + 20), e.printPath({ + path: a, + stroke: "#000000", + fill: "#000000", + class: e.addClasses("ending") + }), e.renderText(t + 5, e.calcY(this.pitch - .5), this.text, "repeatfont", "ending", "start")), this.anchor2 && (r = this.anchor2.x, a = i("M %f %f L %f %f", r, n, r, n + 20), e.printPath({ + path: a, + stroke: "#000000", + fill: "#000000", + class: e.addClasses("ending") + })), a = i("M %f %f L %f %f", t, n, r, n), e.printPath({ + path: a, + stroke: "#000000", + fill: "#000000", + class: e.addClasses("ending") + }) + }, e.exports = a +}, function(e, t, r) { + var i = r(1), + a = function() { + this.voices = [], this.staffs = [], this.brace = void 0 + }; + a.prototype.setLimit = function(e, t) { + t.specialY[e] && (t.staff.specialY[e] ? t.staff.specialY[e] = Math.max(t.staff.specialY[e], t.specialY[e]) : t.staff.specialY[e] = t.specialY[e]) + }, a.prototype.addVoice = function(e, t, r) { + var i = this.voices.length; + this.voices[i] = e, this.staffs[t] ? this.staffs[t].voices.push(i) : this.staffs[this.staffs.length] = { + top: 10, + bottom: 2, + lines: r, + voices: [i], + specialY: { + tempoHeightAbove: 0, + partHeightAbove: 0, + volumeHeightAbove: 0, + dynamicHeightAbove: 0, + endingHeightAbove: 0, + chordHeightAbove: 0, + lyricHeightAbove: 0, + lyricHeightBelow: 0, + chordHeightBelow: 0, + volumeHeightBelow: 0, + dynamicHeightBelow: 0 + } + }, e.staff = this.staffs[t] + }, a.prototype.setStaffLimits = function(e) { + e.staff.top = Math.max(e.staff.top, e.top), e.staff.bottom = Math.min(e.staff.bottom, e.bottom), this.setLimit("tempoHeightAbove", e), this.setLimit("partHeightAbove", e), this.setLimit("volumeHeightAbove", e), this.setLimit("dynamicHeightAbove", e), this.setLimit("endingHeightAbove", e), this.setLimit("chordHeightAbove", e), this.setLimit("lyricHeightAbove", e), this.setLimit("lyricHeightBelow", e), this.setLimit("chordHeightBelow", e), this.setLimit("volumeHeightBelow", e), this.setLimit("dynamicHeightBelow", e) + }, a.prototype.setUpperAndLowerElements = function(e) { + for (var t, r = 0; r < this.staffs.length; r++) { + var a = this.staffs[r], + n = { + tempoHeightAbove: 0, + partHeightAbove: 0, + volumeHeightAbove: 0, + dynamicHeightAbove: 0, + endingHeightAbove: 0, + chordHeightAbove: 0, + lyricHeightAbove: 0, + lyricHeightBelow: 0, + chordHeightBelow: 0, + volumeHeightBelow: 0, + dynamicHeightBelow: 0 + }; + 0, a.specialY.lyricHeightAbove && (a.top += a.specialY.lyricHeightAbove, n.lyricHeightAbove = a.top), a.specialY.chordHeightAbove && (a.top += a.specialY.chordHeightAbove, n.chordHeightAbove = a.top), a.specialY.endingHeightAbove && (a.specialY.chordHeightAbove ? a.top += 2 : a.top += a.specialY.endingHeightAbove, n.endingHeightAbove = a.top), a.specialY.dynamicHeightAbove && a.specialY.volumeHeightAbove ? (a.top += Math.max(a.specialY.dynamicHeightAbove, a.specialY.volumeHeightAbove), n.dynamicHeightAbove = a.top, n.volumeHeightAbove = a.top) : a.specialY.dynamicHeightAbove ? (a.top += a.specialY.dynamicHeightAbove, n.dynamicHeightAbove = a.top) : a.specialY.volumeHeightAbove && (a.top += a.specialY.volumeHeightAbove, n.volumeHeightAbove = a.top), a.specialY.partHeightAbove && (a.top += a.specialY.partHeightAbove, n.partHeightAbove = a.top), a.specialY.tempoHeightAbove && (a.top += a.specialY.tempoHeightAbove, n.tempoHeightAbove = a.top), a.specialY.lyricHeightBelow && (n.lyricHeightBelow = a.bottom, a.bottom -= a.specialY.lyricHeightBelow), a.specialY.chordHeightBelow && (n.chordHeightBelow = a.bottom, a.bottom -= a.specialY.chordHeightBelow), a.specialY.volumeHeightBelow && a.specialY.dynamicHeightBelow ? (n.volumeHeightBelow = a.bottom, n.dynamicHeightBelow = a.bottom, a.bottom -= Math.max(a.specialY.volumeHeightBelow, a.specialY.dynamicHeightBelow)) : a.specialY.volumeHeightBelow ? (n.volumeHeightBelow = a.bottom, a.bottom -= a.specialY.volumeHeightBelow) : a.specialY.dynamicHeightBelow && (n.dynamicHeightBelow = a.bottom, a.bottom -= a.specialY.dynamicHeightBelow); + for (var s = 0; s < a.voices.length; s++) { + this.voices[a.voices[s]].setUpperAndLowerElements(n) + } + if (void 0 !== t) { + var o = t + (a.top - 10), + c = e.spacing.systemStaffSeparation / i.STEP - o; + c > 0 && (a.top += c) + } + t = 2 - a.bottom + } + }, a.prototype.finished = function() { + for (var e = 0; e < this.voices.length; e++) + if (!this.voices[e].layoutEnded()) return !1; + return !0 + }, a.prototype.layout = function(e, t, r) { + var i, a = 0, + n = 1e3, + s = function(e, t, r) { + for (var i = e.padding.left, a = 0, n = 0; n < t.length; n++) + if (t[n].header) { + var s = e.getTextSize(t[n].header, "voicefont", ""); + a = Math.max(a, s.width) + } return a && (a += e.getTextSize("A", "voicefont", "").width), i += a, r && (r.setLocation(i), i += r.getWidth()), i + }(t, this.voices, this.brace); + this.startx = s; + var o = 0; + for (r && console.log("init layout", e), i = 0; i < this.voices.length; i++) this.voices[i].beginLayout(s); + for (var c = 0; !this.finished();) { + for (o = null, i = 0; i < this.voices.length; i++) this.voices[i].layoutEnded() || o && !(this.voices[i].getDurationIndex() < o) || (o = this.voices[i].getDurationIndex()); + var l = [], + h = []; + for (i = 0; i < this.voices.length; i++) { + this.voices[i].getDurationIndex() - o > 1e-7 ? h.push(this.voices[i]) : l.push(this.voices[i]) + } + c = 0; + var u = 0; + for (i = 0; i < l.length; i++) l[i].getNextX() > s && (s = l[i].getNextX(), c = l[i].getSpacingUnits(), u = l[i].spacingduration); + for (a += c, n = Math.min(n, c), r && console.log("currentduration: ", o, a, n), i = 0; i < l.length; i++) { + var d = l[i].layoutOneItem(s, e), + p = d - s; + if (p > 0) { + s = d; + for (var f = 0; f < i; f++) l[f].shiftRight(p) + } + } + for (i = 0; i < h.length; i++) h[i].spacingduration -= u, h[i].updateNextX(s, e); + for (i = 0; i < l.length; i++) { + l[i].updateIndices() + } + } + for (i = 0; i < this.voices.length; i++) this.voices[i].getNextX() > s && (s = this.voices[i].getNextX(), c = this.voices[i].getSpacingUnits()); + for (a += c, this.w = s, i = 0; i < this.voices.length; i++) this.voices[i].w = this.w; + return { + spacingUnits: a, + minSpace: n + } + }, a.prototype.calcHeight = function() { + for (var e = 0, t = 0; t < this.voices.length; t++) { + var r = this.voices[t].staff; + this.voices[t].duplicate || (e += r.top, r.bottom < 0 && (e += -r.bottom)) + } + return e + }, a.prototype.draw = function(e) { + e.addInvisibleMarker("abcjs-top-of-system"); + for (var t, r, a = e.y, n = 0; n < this.staffs.length; n++) { + var s = this.staffs[n]; + e.moveY(i.STEP, s.top), s.absoluteY = e.y, s.bottom < 0 && e.moveY(i.STEP, -s.bottom) + } + var o = 0; + e.measureNumber = null, e.noteNumber = null; + for (var c = 0; c < this.voices.length; c++) { + var l = this.voices[c].staff; + e.y = l.absoluteY, e.voiceNumber = c, this.voices[c].duplicate || (t || (t = e.calcY(10)), r = e.calcY(2), 0 !== l.lines && (e.measureNumber = null, e.noteNumber = null, e.printStave(this.startx, this.w, l.lines))), this.voices[c].draw(e, o), e.measureNumber = null, e.noteNumber = null, this.voices[c].duplicate || (o = e.calcY(2)), this.brace && c === this.brace.length - 1 && this.brace && this.brace.draw(e, t, r) + } + e.measureNumber = null, e.noteNumber = null, this.staffs.length > 1 && e.printStem(this.startx, .6, t, r), e.y = a + }, e.exports = a +}, function(e, t, r) { + var i, a = r(4), + n = r(2); + ! function() { + "use strict"; + (i = function(e, t, r) { + this.tempo = e, this.tuneNumber = t, this.tempoHeightAbove = 5, this.pitch = void 0, this.tempo.duration && !this.tempo.suppressBpm && (this.note = this.createNote(r, e, t)) + }).prototype.setUpperAndLowerElements = function(e) { + if (this.pitch = e.tempoHeightAbove, this.top = e.tempoHeightAbove, this.bottom = e.tempoHeightAbove, this.note) { + var t = this.pitch - 5 + 1; + this.note.top = t, this.note.bottom = t; + for (var r = 0; r < this.note.children.length; r++) { + var i = this.note.children[r]; + i.top += t, i.bottom += t, i.pitch += t, void 0 !== i.pitch2 && (i.pitch2 += t) + } + } + }, i.prototype.setX = function(e) { + this.x = e + }, i.prototype.createNote = function(e, t, r) { + var i, s, o, c = t.duration[0], + l = new a(t, c, 1, "tempo", r); + c <= 1 / 32 ? (o = "noteheads.quarter", s = "flags.u32nd", i = 0) : c <= 1 / 16 ? (o = "noteheads.quarter", s = "flags.u16th", i = 0) : c <= 3 / 32 ? (o = "noteheads.quarter", s = "flags.u16nd", i = 1) : c <= 1 / 8 ? (o = "noteheads.quarter", s = "flags.u8th", i = 0) : c <= 3 / 16 ? (o = "noteheads.quarter", s = "flags.u8th", i = 1) : c <= 1 / 4 ? (o = "noteheads.quarter", i = 0) : c <= 3 / 8 ? (o = "noteheads.quarter", i = 1) : c <= .5 ? (o = "noteheads.half", i = 0) : c <= 3 / 4 ? (o = "noteheads.half", i = 1) : c <= 1 ? (o = "noteheads.whole", i = 0) : c <= 1.5 ? (o = "noteheads.whole", i = 1) : c <= 2 ? (o = "noteheads.dbl", i = 0) : (o = "noteheads.dbl", i = 1); + var h, u = e(l, o, { + verticalPos: 0 + }, "up", 0, 0, s, i, 0, .75, [], !1).notehead; + if (l.addHead(u), "noteheads.whole" !== o && "noteheads.dbl" !== o) { + var d = u.dx + u.w; + h = new n(null, d, 0, .25, { + type: "stem", + pitch2: 5.25, + linewidth: -.6 + }), l.addExtra(h) + } + return l + }, i.prototype.draw = function(e) { + var t = this.x; + void 0 === this.pitch && window.console.error("Tempo Element y-coordinate not set."); + var r, i = e.calcY(this.pitch); + if (this.tempo.preString) { + r = e.renderText(t, i, this.tempo.preString, "tempofont", "tempo", "start"); + var a = e.getTextSize(this.tempo.preString, "tempofont", "tempo", r), + n = a.width; + t += n + n / this.tempo.preString.length + } + if (this.note) { + this.note && this.note.setX(t); + for (var s = 0; s < this.note.children.length; s++) this.note.children[s].draw(e, t); + t += this.note.w + 5; + var o = "= " + this.tempo.bpm; + r = e.renderText(t, i, o, "tempofont", "tempo", "start"); + var c = (a = e.getTextSize(o, "tempofont", "tempo", r)).width; + t += c + c / o.length + } + this.tempo.postString && e.renderText(t, i, this.tempo.postString, "tempofont", "tempo", "start") + } + }(), e.exports = i +}, function(e, t, r) { + var i, a = r(5); + ! function() { + "use strict"; + + function e(e, t, r, i, n, s) { + var o = a("M %f %f L %f %f", t, r, i, n); + e.printPath({ + path: o, + stroke: "#000000", + class: e.addClasses("triplet d" + s) + }) + }(i = function(e, t, r) { + this.anchor1 = t, this.number = e, this.duration = ("" + t.parent.durationClass).replace(/\./, "-"), this.middleElems = [], this.flatBeams = r.flatBeams + }).prototype.isClosed = function() { + return this.anchor2 + }, i.prototype.middleNote = function(e) { + this.middleElems.push(e) + }, i.prototype.setCloseAnchor = function(e) { + this.anchor2 = e, this.anchor1.parent.beam && (this.endingHeightAbove = 4) + }, i.prototype.setUpperAndLowerElements = function() {}, i.prototype.layout = function() { + if (this.anchor1 && this.anchor2) + if (this.hasBeam = this.anchor1.parent.beam && this.anchor1.parent.beam === this.anchor2.parent.beam, this.hasBeam) { + var e = this.anchor1.parent.beam, + t = e.isAbove() ? this.anchor1.x + this.anchor1.w : this.anchor1.x; + this.yTextPos = e.heightAtMidpoint(t, this.anchor2.x), this.yTextPos += e.isAbove() ? 3 : -2, this.top = this.yTextPos + 1, this.bottom = this.yTextPos - 2, e.isAbove() && (this.endingHeightAbove = 4) + } else { + this.startNote = Math.max(this.anchor1.parent.top, 9) + 4, this.endNote = Math.max(this.anchor2.parent.top, 9) + 4, "rest" === this.anchor1.parent.type && "rest" !== this.anchor2.parent.type ? this.startNote = this.endNote : "rest" === this.anchor2.parent.type && "rest" !== this.anchor1.parent.type && (this.endNote = this.startNote); + for (var r = 0, i = 0; i < this.middleElems.length; i++) r = Math.max(r, this.middleElems[i].top); + ((r += 4) > this.startNote || r > this.endNote) && (this.startNote = r, this.endNote = r), this.flatBeams && (this.startNote = Math.max(this.startNote, this.endNote), this.endNote = Math.max(this.startNote, this.endNote)), this.yTextPos = this.startNote + (this.endNote - this.startNote) / 2, this.top = this.yTextPos + 1 + } delete this.middleElems, delete this.flatBeams + }, i.prototype.draw = function(t) { + var r; + if (this.hasBeam) { + var i = this.anchor1.parent.beam.isAbove() ? this.anchor1.x + this.anchor1.w : this.anchor1.x; + r = this.anchor1.parent.beam.xAtMidpoint(i, this.anchor2.x) + } else r = this.anchor1.x + (this.anchor2.x + this.anchor2.w - this.anchor1.x) / 2, + function(t, r, i, a, n, s) { + i = t.calcY(i), n = t.calcY(n); + e(t, r, i, r, i + 5, s), e(t, a, n, a, n + 5, s); + var o = r + (a - r) / 2, + c = (n - i) / (a - r), + l = o - 8; + e(t, r, i, l, i + (l - r) * c, s); + var h = o + 8; + e(t, h, i + (h - r) * c, a, n, s) + }(t, this.anchor1.x, this.startNote, this.anchor2.x + this.anchor2.w, this.endNote, this.duration); + t.renderText(r, t.calcY(this.yTextPos), "" + this.number, "tripletfont", t.addClasses("triplet d" + this.duration), "middle", !0) + } + }(), e.exports = i +}, function(e, t, r) { + var i = r(0), + a = function(e, t) { + this.children = [], this.beams = [], this.otherchildren = [], this.w = 0, this.duplicate = !1, this.voicenumber = e, this.voicetotal = t, this.bottom = 7, this.top = 7, this.specialY = { + tempoHeightAbove: 0, + partHeightAbove: 0, + volumeHeightAbove: 0, + dynamicHeightAbove: 0, + endingHeightAbove: 0, + chordHeightAbove: 0, + lyricHeightAbove: 0, + lyricHeightBelow: 0, + chordHeightBelow: 0, + volumeHeightBelow: 0, + dynamicHeightBelow: 0 + } + }; + a.prototype.addChild = function(e) { + if ("bar" === e.type) { + for (var t = !0, r = 0; t && r < this.children.length; r++) "staff-extra" !== this.children[r].type && "tempo" !== this.children[r].type && (t = !1); + t || (this.beams.push("bar"), this.otherchildren.push("bar")) + } + this.children[this.children.length] = e, this.setRange(e) + }, a.prototype.setLimit = function(e, t) { + var r = t.specialY; + r || (r = t), r[e] && (this.specialY[e] ? this.specialY[e] = Math.max(this.specialY[e], r[e]) : this.specialY[e] = r[e]) + }, a.prototype.moveDecorations = function(e) { + for (var t = 0; t < e.elems.length; t++) { + var r = e.elems[t]; + if (r.top) + for (var i = e.yAtNote(r), a = 0; a < r.children.length; a++) { + var n = r.children[a]; + if ("ornament" === n.klass && n.bottom - 1.5 < i) { + var s = i - n.bottom + 1.5; + n.bottom += s, n.top += s, n.pitch += s, i = r.top = n.top + } + } + } + }, a.prototype.adjustRange = function(e) { + void 0 !== e.bottom && (this.bottom = Math.min(this.bottom, e.bottom)), void 0 !== e.top && (this.top = Math.max(this.top, e.top)) + }, a.prototype.setRange = function(e) { + this.adjustRange(e), this.setLimit("tempoHeightAbove", e), this.setLimit("partHeightAbove", e), this.setLimit("volumeHeightAbove", e), this.setLimit("dynamicHeightAbove", e), this.setLimit("endingHeightAbove", e), this.setLimit("chordHeightAbove", e), this.setLimit("lyricHeightAbove", e), this.setLimit("lyricHeightBelow", e), this.setLimit("chordHeightBelow", e), this.setLimit("volumeHeightBelow", e), this.setLimit("dynamicHeightBelow", e) + }, a.prototype.setUpperAndLowerElements = function(e) { + var t; + for (t = 0; t < this.children.length; t++) { + (r = this.children[t]).setUpperAndLowerElements(e) + } + for (t = 0; t < this.otherchildren.length; t++) { + var r; + "string" != typeof(r = this.otherchildren[t]) && r.setUpperAndLowerElements(e) + } + }, a.prototype.addOther = function(e) { + this.otherchildren.push(e), this.setRange(e) + }, a.prototype.addBeam = function(e) { + this.beams.push(e) + }, a.prototype.updateIndices = function() { + this.layoutEnded() || (this.durationindex += this.children[this.i].duration, "bar" === this.children[this.i].type && (this.durationindex = Math.round(64 * this.durationindex) / 64), this.i++) + }, a.prototype.layoutEnded = function() { + return this.i >= this.children.length + }, a.prototype.getDurationIndex = function() { + return this.durationindex - (this.children[this.i] && this.children[this.i].duration > 0 ? 0 : 5e-7) + }, a.prototype.getSpacingUnits = function() { + return Math.sqrt(8 * this.spacingduration) + }, a.prototype.getNextX = function() { + return Math.max(this.minx, this.nextx) + }, a.prototype.beginLayout = function(e) { + this.i = 0, this.durationindex = 0, this.startx = e, this.minx = e, this.nextx = e, this.spacingduration = 0 + }, a.prototype.layoutOneItem = function(e, t) { + var r = this.children[this.i]; + if (!r) return 0; + var i = e - this.minx, + a = r.getExtraWidth(); + return i < a && (0 === this.i || "bar" !== r.type || "part" !== this.children[this.i - 1].type && "tempo" !== this.children[this.i - 1].type) && (e += a - i), r.setX(e), this.spacingduration = r.duration, this.minx = e + r.getMinWidth(), this.i !== this.children.length - 1 && (this.minx += r.minspacing), this.updateNextX(e, t), e + }, a.prototype.updateNextX = function(e, t) { + this.nextx = e + t * Math.sqrt(8 * this.spacingduration) + }, a.prototype.shiftRight = function(e) { + var t = this.children[this.i]; + t && (t.setX(t.x + e), this.minx += e, this.nextx += e) + }, a.prototype.draw = function(e, t) { + var r, a = this.w - 1; + if (e.staffbottom = this.staff.bottom, e.measureNumber = null, e.noteNumber = null, this.header) { + var n = 14 - (this.voicenumber + 1) * (12 / (this.voicetotal + 1)); + e.renderText(e.padding.left, e.calcY(n), this.header, "voicefont", "staff-extra voice-name", "start") + } + for (var s = 0, o = this.children.length; s < o; s++) { + var c = this.children[s], + l = !1; + "staff-extra" !== c.type && null === e.measureNumber && (e.measureNumber = 0, e.noteNumber = 0, l = !0), c.draw(e, this.barto || s === o - 1 ? t : 0), ("note" === c.type || "rest" === (r = c).type && r.abcelem && r.abcelem.rest && "spacer" !== r.abcelem.rest.type) && e.noteNumber++, "bar" !== c.type || l || (e.measureNumber++, e.noteNumber = 0) + } + e.measureNumber = 0, e.noteNumber = 0, i.each(this.beams, (function(t) { + "bar" === t ? (e.measureNumber++, e.noteNumber = 0) : t.draw(e) + })), e.measureNumber = 0, e.noteNumber = 0; + var h = this; + i.each(this.otherchildren, (function(t) { + "bar" === t ? (e.measureNumber++, e.noteNumber = 0) : t.draw(e, h.startx + 10, a) + })) + }, a.prototype.layoutBeams = function() { + for (var e = 0; e < this.beams.length; e++) + if (this.beams[e].layout) { + this.beams[e].layout(), this.moveDecorations(this.beams[e]); + for (var t = 0; t < this.beams[e].elems.length; t++) this.adjustRange(this.beams[e].elems[t]) + } for (e = 0; e < this.otherchildren.length; e++) { + var r = this.otherchildren[e]; + r.layout && (r.layout(), this.adjustRange(r)) + } + this.staff.top = Math.max(this.staff.top, this.top), this.staff.bottom = Math.min(this.staff.bottom, this.bottom) + }, e.exports = a +}, function(e, t, r) { + var i = r(3), + a = r(1), + n = r(5), + s = r(49), + o = function(e, t, r) { + this.paper = new s(e), this.controller = null, this.space = 3 * a.SPACE, this.padding = {}, this.doRegression = t, this.shouldAddClasses = r, this.doRegression && (this.regressionLines = []), this.reset() + }; + o.prototype.reset = function() { + this.paper.clear(), this.y = 0, this.abctune = null, this.lastM = null, this.ingroup = !1, this.path = null, this.isPrint = !1, this.initVerticalSpace(), this.doRegression && (this.regressionLines = []) + }, o.prototype.newTune = function(e) { + this.abctune = e, this.setVerticalSpace(e.formatting), this.measureNumber = null, this.noteNumber = null, this.setPrintMode("print" === e.media), this.setPadding(e) + }, o.prototype.createElemSet = function() { + return this.paper.openGroup() + }, o.prototype.closeElemSet = function() { + return this.paper.closeGroup() + }, o.prototype.setPrintMode = function(e) { + this.isPrint = e + }, o.prototype.setPaperSize = function(e, t, r) { + var i = (e + this.padding.right) * t, + a = (this.y + this.padding.bottom) * t; + this.isPrint && (a = Math.max(a, 1056)), this.doRegression && this.regressionLines.push("PAPER SIZE: (" + i + "," + a + ")"); + var n = "Sheet Music"; + this.abctune && this.abctune.metaText && this.abctune.metaText.title && (n += ' for "' + this.abctune.metaText.title + '"'), this.paper.setTitle(n); + var s = { + overflow: "hidden" + }; + "resize" === r ? this.paper.setResponsiveWidth(i, a) : (s.width = "", s.height = a + "px", t < 1 ? (s.width = i + "px", this.paper.setSize(i / t, a / t)) : this.paper.setSize(i, a)), this.paper.setScale(t), this.paper.setParentStyles(s) + }, o.prototype.setPaddingOverride = function(e) { + this.paddingOverride = { + top: e.paddingtop, + bottom: e.paddingbottom, + right: e.paddingright, + left: e.paddingleft + } + }, o.prototype.setPadding = function(e) { + function t(t, r, i, a, n) { + void 0 !== e.formatting[i] ? t.padding[r] = e.formatting[i] : void 0 !== t.paddingOverride[r] ? t.padding[r] = t.paddingOverride[r] : t.isPrint ? t.padding[r] = a : t.padding[r] = n + } + t(this, "top", "topmargin", 38, 15), t(this, "bottom", "botmargin", 38, 15), t(this, "left", "leftmargin", 68, 15), t(this, "right", "rightmargin", 68, 15) + }, o.prototype.adjustNonScaledItems = function(e) { + this.padding.top /= e, this.padding.bottom /= e, this.padding.left /= e, this.padding.right /= e, this.abctune.formatting.headerfont.size /= e, this.abctune.formatting.footerfont.size /= e + }, o.prototype.initVerticalSpace = function() { + this.spacing = { + composer: 7.56, + graceBefore: 8.67, + graceInside: 10.67, + graceAfter: 16, + info: 0, + lineSkipFactor: 1.1, + music: 7.56, + paragraphSkipFactor: .4, + parts: 11.33, + slurHeight: 1, + staffSeparation: 61.33, + stemHeight: 36.67, + subtitle: 3.78, + systemStaffSeparation: 48, + text: 18.9, + title: 7.56, + top: 30.24, + vocal: 30.67, + words: 0 + } + }, o.prototype.setVerticalSpace = function(e) { + void 0 !== e.staffsep && (this.spacing.staffSeparation = 4 * e.staffsep / 3), void 0 !== e.composerspace && (this.spacing.composer = 4 * e.composerspace / 3), void 0 !== e.partsspace && (this.spacing.parts = 4 * e.partsspace / 3), void 0 !== e.textspace && (this.spacing.text = 4 * e.textspace / 3), void 0 !== e.musicspace && (this.spacing.music = 4 * e.musicspace / 3), void 0 !== e.titlespace && (this.spacing.title = 4 * e.titlespace / 3), void 0 !== e.sysstaffsep && (this.spacing.systemStaffSeparation = 4 * e.sysstaffsep / 3), void 0 !== e.subtitlespace && (this.spacing.subtitle = 4 * e.subtitlespace / 3), void 0 !== e.topspace && (this.spacing.top = 4 * e.topspace / 3), void 0 !== e.vocalspace && (this.spacing.vocal = 4 * e.vocalspace / 3), void 0 !== e.wordsspace && (this.spacing.words = 4 * e.wordsspace / 3) + }, o.prototype.topMargin = function(e) { + this.moveY(this.padding.top) + }, o.prototype.addMusicPadding = function() { + this.moveY(this.spacing.music) + }, o.prototype.addStaffPadding = function(e, t) { + var r = -(e.staffs[e.staffs.length - 1].bottom - 2), + i = (t.staffs[0].top - 10 + r) * a.STEP; + i < this.spacing.staffSeparation && this.moveY(this.spacing.staffSeparation - i) + }, o.prototype.engraveTopText = function(e, t) { + if (t.metaText.header && this.isPrint) { + var r = this.getTextSize("XXXX", "headerfont", "abcjs-header abcjs-meta-top").height; + this.y -= r, this.outputTextIf(this.padding.left, t.metaText.header.left, "headerfont", "header meta-top", 0, null, "start"), this.outputTextIf(this.padding.left + e / 2, t.metaText.header.center, "headerfont", "header meta-top", 0, null, "middle"), this.outputTextIf(this.padding.left + e, t.metaText.header.right, "headerfont", "header meta-top", 0, null, "end"), this.y += r + } + if (this.isPrint && this.moveY(this.spacing.top), this.outputTextIf(this.padding.left + e / 2, t.metaText.title, "titlefont", "title meta-top", this.spacing.title, 0, "middle"), t.lines[0] && this.outputTextIf(this.padding.left + e / 2, t.lines[0].subtitle, "subtitlefont", "text meta-top", this.spacing.subtitle, 0, "middle"), t.metaText.rhythm || t.metaText.origin || t.metaText.composer) { + this.moveY(this.spacing.composer); + var i = this.outputTextIf(this.padding.left, t.metaText.rhythm, "infofont", "meta-top", 0, null, "start"), + a = ""; + if (t.metaText.composer && (a += t.metaText.composer), t.metaText.origin && (a += " (" + t.metaText.origin + ")"), a.length > 0) { + var n = this.outputTextIf(this.padding.left + e, a, "composerfont", "meta-top", 0, null, "end"); + this.moveY(n[1]) + } else this.moveY(i[1]); + this.moveY(-6) + } + this.outputTextIf(this.padding.left + e, t.metaText.author, "composerfont", "meta-top", 0, 0, "end"), this.outputTextIf(this.padding.left, t.metaText.partOrder, "partsfont", "meta-bottom", 0, 0, "start") + }, o.prototype.engraveExtraText = function(e, t) { + if (this.lineNumber = null, this.measureNumber = null, this.noteNumber = null, this.voiceNumber = null, t.metaText.unalignedWords) { + var r = this.getFontAndAttr("wordsfont", "meta-bottom"), + i = this.getTextSize("i", "wordsfont", "meta-bottom"); + t.metaText.unalignedWords.length > 0 && this.moveY(this.spacing.words, 1); + for (var n = 0; n < t.metaText.unalignedWords.length; n++) + if ("" === t.metaText.unalignedWords[n]) this.moveY(r.font.size, 1); + else if ("string" == typeof t.metaText.unalignedWords[n]) this.outputTextIf(this.padding.left + a.INDENT, t.metaText.unalignedWords[n], "wordsfont", "meta-bottom", 0, 0, "start"); + else { + for (var s = 0, o = 0, c = 0; c < t.metaText.unalignedWords[n].length; c++) { + var l = t.metaText.unalignedWords[n][c], + h = l.font ? l.font : "wordsfont", + u = (this.renderText(this.padding.left + a.INDENT + o, this.y, l.text, h, "meta-bottom", !1), this.getTextSize(l.text, h, "meta-bottom")); + s = Math.max(s, u.height), o += u.width, " " === l.text[l.text.length - 1] && (o += i.width) + } + this.moveY(s, 1) + } + t.metaText.unalignedWords.length > 0 && this.moveY(r.font.size, 2) + } + var d = ""; + t.metaText.book && (d += "Book: " + t.metaText.book + "\n"), t.metaText.source && (d += "Source: " + t.metaText.source + "\n"), t.metaText.discography && (d += "Discography: " + t.metaText.discography + "\n"), t.metaText.notes && (d += "Notes: " + t.metaText.notes + "\n"), t.metaText.transcription && (d += "Transcription: " + t.metaText.transcription + "\n"), t.metaText.history && (d += "History: " + t.metaText.history + "\n"), t.metaText["abc-copyright"] && (d += "Copyright: " + t.metaText["abc-copyright"] + "\n"), t.metaText["abc-creator"] && (d += "Creator: " + t.metaText["abc-creator"] + "\n"), t.metaText["abc-edited-by"] && (d += "Edited By: " + t.metaText["abc-edited-by"] + "\n"), this.outputTextIf(this.padding.left, d, "historyfont", "meta-bottom", this.spacing.info, 0, "start"), t.metaText.footer && this.isPrint && (this.outputTextIf(this.padding.left, t.metaText.footer.left, "footerfont", "header meta-bottom", 0, null, "start"), this.outputTextIf(this.padding.left + e / 2, t.metaText.footer.center, "footerfont", "header meta-bottom", 0, null, "middle"), this.outputTextIf(this.padding.left + e, t.metaText.footer.right, "footerfont", "header meta-bottom", 0, null, "end")) + }, o.prototype.outputFreeText = function(e, t) { + t && this.moveY(t); + var r = this.getFontAndAttr("textfont", "defined-text"); + if ("" === e) this.moveY(2 * r.attr["font-size"]); + else if ("string" == typeof e) this.moveY(r.attr["font-size"] / 2), this.outputTextIf(this.padding.left, e, "textfont", "defined-text", 0, 0, "start"); + else { + for (var i = "", a = !1, n = 0; n < e.length; n++) e[n].font && (i += "FONT(" + e[n].font + ")"), i += e[n].text, e[n].center && (a = !0); + var s = a ? "middle" : "start", + o = a ? this.controller.width / 2 : this.padding.left; + this.outputTextIf(o, i, "textfont", "defined-text", 0, 1, s) + } + }, o.prototype.outputSeparator = function(e) { + e.lineLength && (this.moveY(e.spaceAbove), this.printSeparator(e.lineLength), this.moveY(e.spaceBelow)) + }, o.prototype.outputSubtitle = function(e, t) { + this.outputTextIf(this.padding.left + e / 2, t, "subtitlefont", "text meta-top", this.spacing.subtitle, 0, "middle") + }, o.prototype.beginGroup = function() { + this.path = [], this.lastM = [0, 0], this.ingroup = !0 + }, o.prototype.addPath = function(e) { + if (0 !== (e = e || []).length) { + e[0][0] = "m", e[0][1] -= this.lastM[0], e[0][2] -= this.lastM[1], this.lastM[0] += e[0][1], this.lastM[1] += e[0][2], this.path.push(e[0]); + for (var t = 1, r = e.length; t < r; t++) "m" === e[t][0] && (this.lastM[0] += e[t][1], this.lastM[1] += e[t][2]), this.path.push(e[t]) + } + }, o.prototype.endGroup = function(e) { + if (this.ingroup = !1, 0 === this.path.length) return null; + for (var t = "", r = 0; r < this.path.length; r++) t += this.path[r].join(" "); + var i = this.paper.path({ + path: t, + stroke: "none", + fill: "#000000", + class: this.addClasses(e) + }); + return this.path = [], this.doRegression && this.addToRegression(i), i + }, o.prototype.printStaveLine = function(e, t, r, i) { + var a = "staff"; + void 0 !== i && (a += " " + i); + var s = .35, + o = "#000000"; + var c = this.calcY(r), + l = n("M %f %f L %f %f L %f %f L %f %f z", e, c - s, t, c - s, t, c + s, e, c + s), + h = this.paper.pathToBack({ + path: l, + stroke: "none", + fill: o, + class: this.addClasses(a) + }); + return this.doRegression && this.addToRegression(h), h + }, o.prototype.printStem = function(e, t, r, i) { + if (t < 0) { + var a = i; + i = r, r = a + } + var n = "#000000"; /*@cc_on!@*/ + ~~e === e && (e += .05); + var s = [ + ["M", e, r], + ["L", e, i], + ["L", e + t, i], + ["L", e + t, r], + ["z"] + ]; + if (!this.ingroup) { + for (var o = "", c = 0; c < s.length; c++) o += s[c].join(" "); + var l = this.paper.pathToBack({ + path: o, + stroke: "none", + fill: n, + class: this.addClasses("stem") + }); + return this.doRegression && this.addToRegression(l), l + } + this.addPath(s) + }, o.prototype.printSymbol = function(e, t, r, a, n, s) { + var o, c, l, h, u, d; + if (!r) return null; + if (r.length > 1 && r.indexOf(".") < 0) { + this.paper.openGroup(); + for (var p = 0, f = 0; f < r.length; f++) { + var m = r.charAt(f); + c = i.getYCorr(m), (o = i.printSymbol(e + p, this.calcY(t + c), m, this.paper, s)) ? (this.doRegression && this.addToRegression(o), f < r.length - 1 && (p += (l = m, h = r.charAt(f + 1), u = i.getSymbolWidth(m), d = void 0, d = u, "f" === l && "f" === h && (d = 2 * d / 3), "p" === l && "p" === h && (d = 5 * d / 6), "f" === l && "z" === h && (d = 5 * d / 8), d))) : this.renderText(e, this.y, "no symbol:" + r, "debugfont", "debug-msg", "start") + } + return this.paper.closeGroup() + } + if (c = i.getYCorr(r), this.ingroup) this.addPath(i.getPathForSymbol(e, this.calcY(t + c), r, a, n)); + else { + if (o = i.printSymbol(e, this.calcY(t + c), r, this.paper, s)) return this.doRegression && this.addToRegression(o), o; + this.renderText(e, this.y, "no symbol:" + r, "debugfont", "debug-msg", "start") + } + return null + }, o.prototype.scaleExistingElem = function(e, t, r, i, a) { + this.paper.setAttributeOnElement(e, { + style: "transform:scale(" + t + "," + r + ");transform-origin:" + i + "px " + a + "px;" + }) + }, o.prototype.printPath = function(e) { + var t = this.paper.path(e); + return this.doRegression && this.addToRegression(t), t + }, o.prototype.drawBrace = function(e, t, r) { + var i = r - t, + a = [7.5, -8, 21, 0, 18.5, -10.5, 7.5], + s = [0, i / 5.5, i / 3.14, i / 2, i / 2.93, i / 4.88, 0], + o = n("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z", e + a[0], t + s[0], e + a[1], t + s[1], e + a[2], t + s[2], e + a[3], t + s[3], e + a[4], t + s[4], e + a[5], t + s[5], e + a[6], t + s[6]), + c = this.paper.path({ + path: o, + stroke: "#000000", + fill: "#000000", + class: this.addClasses("brace") + }); + o = n("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z", e + (a = [0, 17.5, -7.5, 6.6, -5, 20, 0])[0], t + (s = [i / 2, i / 1.46, i / 1.22, i, i / 1.19, i / 1.42, i / 2])[0], e + a[1], t + s[1], e + a[2], t + s[2], e + a[3], t + s[3], e + a[4], t + s[4], e + a[5], t + s[5], e + a[6], t + s[6]); + var l = this.paper.path({ + path: o, + stroke: "#000000", + fill: "#000000", + class: this.addClasses("brace") + }); + return this.doRegression && (this.addToRegression(c), this.addToRegression(l)), c + l + }, o.prototype.drawArc = function(e, t, r, i, a, s, o) { + var c = o ? 1.2 : 1.5; + e += 6, t += 4, r += a ? c : -c, i += a ? c : -c; + var l = this.calcY(r), + h = this.calcY(i), + u = t - e, + d = h - l, + p = Math.sqrt(u * u + d * d), + f = u / p, + m = d / p, + g = p / 3.5, + v = o ? 10 : 25, + b = (a ? -1 : 1) * Math.min(v, Math.max(4, g)), + y = e + g * f - b * m, + w = l + g * m + b * f, + k = t - g * f - b * m, + x = h - g * m + b * f, + S = n("M %f %f C %f %f %f %f %f %f C %f %f %f %f %f %f z", e, l, y, w, k, x, t, h, k - 2 * m, x + 2 * f, y - 2 * m, w + 2 * f, e, l); + s ? s += " slur" : s = "slur"; + var A = this.paper.path({ + path: S, + stroke: "none", + fill: "#000000", + class: this.addClasses(s) + }); + return this.doRegression && this.addToRegression(A), A + }, o.prototype.calcY = function(e) { + return this.y - e * a.STEP + }, o.prototype.printStave = function(e, t, r) { + var i = "top-line"; + if (this.paper.openGroup({ + prepend: !0 + }), 1 !== r) { + for (var a = r - 1; a >= 0; a--) this.printStaveLine(e, t, 2 * (a + 1), i), i = void 0; + this.paper.closeGroup() + } else this.printStaveLine(e, t, 6, i) + }, o.prototype.addClasses = function(e, t) { + if (!this.shouldAddClasses) return ""; + var r = []; + if (e.length > 0 && r.push(e), null !== this.lineNumber && void 0 !== this.lineNumber && r.push("l" + this.lineNumber), null !== this.measureNumber && void 0 !== this.measureNumber && r.push("m" + this.measureNumber), null !== this.voiceNumber && void 0 !== this.voiceNumber && r.push("v" + this.voiceNumber), (e.indexOf("note") >= 0 || e.indexOf("rest") >= 0 || e.indexOf("lyric") >= 0) && null !== this.noteNumber && void 0 !== this.noteNumber && r.push("n" + this.noteNumber), r.length > 0) { + r = (r = r.join(" ")).split(" "); + for (var i = 0; i < r.length; i++) 0 !== r[i].indexOf("abcjs-") && r[i].length > 0 && (r[i] = "abcjs-" + r[i]) + } + return r.join(" ") + }, o.prototype.getFontAndAttr = function(e, t) { + var r, i = { + "font-size": (r = "string" == typeof e ? (r = this.abctune.formatting[e]) ? { + face: r.face, + size: 4 * r.size / 3, + decoration: r.decoration, + style: r.style, + weight: r.weight, + box: r.box + } : { + face: "Arial", + size: 16, + decoration: "underline", + style: "normal", + weight: "normal" + } : { + face: e.face, + size: 4 * e.size / 3, + decoration: e.decoration, + style: e.style, + weight: e.weight, + box: e.box + }).size, + "font-style": r.style, + "font-family": r.face, + "font-weight": r.weight, + "text-decoration": r.decoration, + class: this.addClasses(t), + font: "" + }; + return { + font: r, + attr: i + } + }, o.prototype.getTextSize = function(e, t, r, i) { + var a = this.getFontAndAttr(t, r), + n = this.paper.getTextSize(e, a.attr, i); + return a.font.box && (n.height += 8, n.width += 8), n + }, o.prototype.renderText = function(e, t, r, i, a, n, s) { + var o = this.getFontAndAttr(i, a); + n && (o.attr["text-anchor"] = n), o.attr.x = e, o.attr.y = t + 7, s || (o.attr.dy = "0.5em"), "debugfont" === i && (console.log("Debug msg: " + r), o.attr.stroke = "#ff0000"), r = (r = r.replace(/\n\n/g, "\n \n")).replace(/^\n/, " \n"), o.font.box && (o.attr.x += 2, o.attr.y += 4); + var c = this.paper.text(r, o.attr); + if (o.font.box) { + var l = this.getTextSize(r, i, a); + this.paper.rect({ + x: e - 2, + y: t, + width: l.width + 4, + height: l.height + 4 - 2, + stroke: "#888888", + fill: "transparent" + }) + } + return this.doRegression && this.addToRegression(c), c + }, o.prototype.moveY = function(e, t) { + void 0 === t && (t = 1), this.y += e * t + }, o.prototype.skipSpaceY = function() { + this.y += this.space + }, o.prototype.outputTextIf = function(e, t, r, i, a, n, s) { + if (t) { + a && this.moveY(a); + this.renderText(e, this.y, t, r, i, s); + var o = this.getTextSize(t, r, i), + c = isNaN(o.width) ? 0 : o.width, + l = isNaN(o.height) ? 0 : o.height; + if (this.getFontAndAttr(r, i).font.box && (c += 8, l += 8), null !== n) { + var h = t.split("\n").length; + isNaN(o.height) || this.moveY(l / h, h + n) + } + return [c, l] + } + return [0, 0] + }, o.prototype.addInvisibleMarker = function(e) { + var t = this.y; + t = Math.round(t); + var r = n("M %f %f L %f %f L %f %f L %f %f z", 0, t - .35, 100, t - .35, 100, t + .35, 0, t + .35); + this.paper.pathToBack({ + path: r, + stroke: "none", + fill: "rgba(0,0,0,0)", + "fill-opacity": 0, + class: this.addClasses(e), + "data-vertical": t + }) + }, o.prototype.printSeparator = function(e) { + var t = Math.round(this.y), + r = (this.controller.width - e) / 2, + i = r + e, + a = "M " + r + " " + t + " L " + i + " " + t + " L " + i + " " + (t + 1) + " L " + r + " " + (t + 1) + " L " + r + " " + t + " z"; + this.paper.pathToBack({ + path: a, + stroke: "rgba(0,0,0,0)", + fill: "rgba(0,0,0,255)", + class: this.addClasses("defined-text") + }) + }, o.prototype.printHorizontalLine = function(e, t, r) { + var i = .35, + a = "rgba(0,0,255,.4)", + s = this.y; + t && (s = t), s = Math.round(s), this.paper.text("" + Math.round(s), { + x: 10, + y: s, + "text-anchor": "start", + "font-size": "18px", + fill: a, + stroke: a + }); + var o = n("M %f %f L %f %f L %f %f L %f %f z", 50, s - i, 50 + e, s - i, e, s + i, 50, s + i); + this.paper.pathToBack({ + path: o, + stroke: "none", + fill: a, + class: this.addClasses("staff") + }); + for (var c = 1; c < e / 100; c++) o = n("M %f %f L %f %f L %f %f L %f %f z", 100 * c - i, s - 5, 100 * c - i, s + 5, 100 * c + i, s - 5, 100 * c + i, s + 5), this.paper.pathToBack({ + path: o, + stroke: "none", + fill: a, + class: this.addClasses("staff") + }); + r && this.paper.text(r, { + x: e + 70, + y: s, + "text-anchor": "start", + "font-size": "18px", + fill: a, + stroke: a + }) + }, o.prototype.printShadedBox = function(e, t, r, i, a, n, s) { + var o = this.paper.rect({ + x: e, + y: t, + width: r, + height: i, + fill: a, + stroke: a, + "fill-opacity": n, + "stroke-opacity": n + }); + return s && this.paper.text(s, { + x: 0, + y: t + 7, + "text-anchor": "start", + "font-size": "14px", + fill: "rgba(0,0,255,.4)", + stroke: "rgba(0,0,255,.4)" + }), o + }, o.prototype.printVerticalLine = function(e, t, r) { + var i = n("M %f %f L %f %f L %f %f L %f %f z", e - .35, t, e - .35, r, e + .35, t, e + .35, r); + this.paper.pathToBack({ + path: i, + stroke: "none", + fill: "#00aaaa", + class: this.addClasses("staff") + }), i = n("M %f %f L %f %f L %f %f L %f %f z", e - 20, t, e - 20, t + 3, e, t, e, t + 3), this.paper.pathToBack({ + path: i, + stroke: "none", + fill: "#00aaaa", + class: this.addClasses("staff") + }), i = n("M %f %f L %f %f L %f %f L %f %f z", e + 20, r, e + 20, r + 3, e, r, e, r + 3), this.paper.pathToBack({ + path: i, + stroke: "none", + fill: "#00aaaa", + class: this.addClasses("staff") + }) + }, o.prototype.addToRegression = function(e) { + var t; + try { + t = e.getBBox() + } catch (e) { + t = { + width: 0, + height: 0 + } + } + var r = e.type + " " + t.toString() + " ", + i = []; + for (var a in e.attrs) e.attrs.hasOwnProperty(a) && ("class" === a ? r = e.attrs[a] + " " + r : i.push(a + ": " + e.attrs[a])); + i.sort(), r += "{ " + i.join(" ") + " }", this.regressionLines.push(r) + }, e.exports = o +}, function(e, t) { + var r = "http://www.w3.org/2000/svg"; + + function i(e) { + this.svg = a(), e.appendChild(this.svg) + } + + function a() { + var e = document.createElementNS(r, "svg"); + return e.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"), e.setAttribute("role", "img"), e + } + i.prototype.clear = function() { + if (this.svg) { + var e = this.svg.parentNode; + this.svg = a(), e && (e.innerHTML = "", e.appendChild(this.svg)) + } + }, i.prototype.setTitle = function(e) { + var t = document.createElement("title"), + r = document.createTextNode(e); + t.appendChild(r), this.svg.insertBefore(t, this.svg.firstChild) + }, i.prototype.setResponsiveWidth = function(e, t) { + if (this.svg.setAttribute("viewBox", "0 0 " + e + " " + t), this.svg.setAttribute("preserveAspectRatio", "xMinYMin meet"), this.svg.removeAttribute("height"), this.svg.removeAttribute("width"), this.svg.style.display = "inline-block", this.svg.style.position = "absolute", this.svg.style.top = "0", this.svg.style.left = "0", this.svg.parentNode) { + var r = this.svg.parentNode.getAttribute("class"); + r ? r.indexOf("abcjs-container") < 0 && this.svg.parentNode.setAttribute("class", r + " abcjs-container") : this.svg.parentNode.setAttribute("class", "abcjs-container"), this.svg.parentNode.style.display = "inline-block", this.svg.parentNode.style.position = "relative", this.svg.parentNode.style.width = "100%"; + var i = t / e * 100; + this.svg.parentNode.style["padding-bottom"] = i + "%", this.svg.parentNode.style["vertical-align"] = "middle", this.svg.parentNode.style.overflow = "hidden" + } + }, i.prototype.setSize = function(e, t) { + this.svg.setAttribute("width", e), this.svg.setAttribute("height", t) + }, i.prototype.setScale = function(e) { + 1 !== e ? (this.svg.style.transform = "scale(" + e + "," + e + ")", this.svg.style["-ms-transform"] = "scale(" + e + "," + e + ")", this.svg.style["-webkit-transform"] = "scale(" + e + "," + e + ")", this.svg.style["transform-origin"] = "0 0", this.svg.style["-ms-transform-origin-x"] = "0", this.svg.style["-ms-transform-origin-y"] = "0", this.svg.style["-webkit-transform-origin-x"] = "0", this.svg.style["-webkit-transform-origin-y"] = "0") : (this.svg.style.transform = "", this.svg.style["-ms-transform"] = "", this.svg.style["-webkit-transform"] = "") + }, i.prototype.setParentStyles = function(e) { + for (var t in e) e.hasOwnProperty(t) && this.svg.parentNode && (this.svg.parentNode.style[t] = e[t]); + this.dummySvg && (document.querySelector("body").removeChild(this.dummySvg), this.dummySvg = null) + }, i.prototype.rect = function(e) { + var t = document.createElementNS(r, "rect"); + for (var i in e) { + if (e.hasOwnProperty(i))("" + e[i]).indexOf("NaN"), t.setAttributeNS(null, i, e[i]) + } + return this.append(t), t + }, i.prototype.text = function(e, t, i) { + var a = document.createElementNS(r, "text"); + for (var n in t) t.hasOwnProperty(n) && a.setAttribute(n, t[n]); + for (var s = ("" + e).split("\n"), o = 0; o < s.length; o++) { + var c = document.createElementNS(r, "tspan"); + c.textContent = s[o], c.setAttribute("x", t.x ? t.x : 0), 0 !== o && c.setAttribute("dy", "1.2em"), a.appendChild(c) + } + return i ? i.appendChild(a) : this.append(a), a + }, i.prototype.guessWidth = function(e, t) { + var r, i = this.createDummySvg(), + a = this.text(e, t, i); + try { + r = a.getBBox(), r = isNaN(r.height) || !r.height ? { + width: t["font-size"] / 2, + height: t["font-size"] + 2 + } : { + width: r.width, + height: r.height + } + } catch (e) { + r = { + width: t["font-size"] / 2, + height: t["font-size"] + 2 + } + } + return i.removeChild(a), r + }, i.prototype.createDummySvg = function() { + if (!this.dummySvg) { + this.dummySvg = a(); + this.dummySvg.setAttribute("style", ["display: block !important;", "height: 1px;", "width: 1px;", "position: absolute;"].join("")), document.querySelector("body").appendChild(this.dummySvg) + } + return this.dummySvg + }, i.prototype.getTextSize = function(e, t, r) { + if ("number" == typeof e && (e = "" + e), !e || e.match(/^\s+$/)) return { + width: 0, + height: 0 + }; + var i, a = !r; + r || (r = this.text(e, t)); + try { + i = r.getBBox(), i = isNaN(i.height) || !i.height ? this.guessWidth(e, t) : { + width: i.width, + height: i.height + } + } catch (r) { + i = this.guessWidth(e, t) + } + return a && (this.currentGroup ? this.currentGroup.removeChild(r) : this.svg.removeChild(r)), i + }, i.prototype.openGroup = function(e) { + e = e || {}; + var t = document.createElementNS(r, "g"); + return e.prepend ? this.svg.insertBefore(t, this.svg.firstChild) : this.svg.appendChild(t), this.currentGroup = t, t + }, i.prototype.closeGroup = function() { + var e = this.currentGroup; + return this.currentGroup = null, e + }, i.prototype.path = function(e) { + var t = document.createElementNS(r, "path"); + for (var i in e) e.hasOwnProperty(i) && ("path" === i ? t.setAttributeNS(null, "d", e.path) : t.setAttributeNS(null, i, e[i])); + return this.append(t), t + }, i.prototype.pathToBack = function(e) { + var t = document.createElementNS(r, "path"); + for (var i in e) e.hasOwnProperty(i) && ("path" === i ? t.setAttributeNS(null, "d", e.path) : t.setAttributeNS(null, i, e[i])); + return this.prepend(t), t + }, i.prototype.append = function(e) { + this.currentGroup ? this.currentGroup.appendChild(e) : this.svg.appendChild(e) + }, i.prototype.prepend = function(e) { + this.currentGroup ? this.currentGroup.appendChild(e) : this.svg.insertBefore(e, this.svg.firstChild) + }, i.prototype.setAttributeOnElement = function(e, t) { + for (var r in t) t.hasOwnProperty(r) && e.setAttributeNS(null, r, t[r]) + }, e.exports = i +}, function(e, t, r) { + var i = r(22); + e.exports = function(e, t, r, a) { + return new Promise((function(n, s) { + i[t] || (i[t] = {}); + var o = i[t]; + if ("error" === o[r]) return s(new Error("Unable to load sound font " + e + " " + t + " " + r)); + if (o[r]) return n({ + instrument: t, + name: r + }); + o[r] = "pending"; + var c = new XMLHttpRequest; + c.open("GET", e + t + "-mp3/" + r + ".mp3", !0), c.responseType = "arraybuffer"; + var l = this; + + function h(e) { + o[r] = e, n({ + instrument: t, + name: r + }) + } + + function u(e) { + l.debugCallback && l.debugCallback(e), console.log(e), s(e) + } + c.onload = function(t) { + if (200 !== this.status) { + o[r] = "error"; + var i = "Onload error loading sound: " + r + " " + e + " " + t.currentTarget.status + " " + t.currentTarget.statusText; + return l.debugCallback && l.debugCallback(i), s(new Error(i)) + } + a.decodeAudioData(this.response, h, u) + }, c.addEventListener("error", (function() { + o[r] = "error"; + var t = "Error in loading sound: " + e; + return l.debugCallback && l.debugCallback(t), s(new Error(t)) + }), !1), c.send() + })) + } +}, function(e, t, r) { + var i = r(14); + e.exports = function(e) { + for (var t = [], r = 0; r < e.tracks.length; r++) t.push([]); + var a = {}, + n = i[0]; + return e.tracks.forEach((function(e, r) { + var s = 0; + e.forEach((function(e) { + switch (e.cmd) { + case "start": + a[e.pitch] = { + time: s, + instrument: n, + volume: e.volume + }; + break; + case "move": + s += e.duration; + break; + case "stop": + t[r].push({ + pitch: e.pitch, + instrument: a[e.pitch].instrument, + start: a[e.pitch].time, + end: s, + volume: a[e.pitch].volume + }), delete a[e.pitch]; + break; + case "program": + n = i[e.instrument]; + break; + default: + console.log("Unhanded midi event", e) + } + })) + })), t + } +}, function(e, t) { + e.exports = function(e) { + return window.URL.createObjectURL(function(e) { + var t, r, i = e.length, + a = e[0].length * i * 2 + 44, + n = new ArrayBuffer(a), + s = new DataView(n), + o = [], + c = 0, + l = 0; + for (u(1179011410), u(a - 8), u(1163280727), u(544501094), u(16), h(1), h(i), u(e[0].sampleRate), u(2 * e[0].sampleRate * i), h(2 * i), h(16), u(1635017060), u(a - l - 4), t = 0; t < e.length; t++) o.push(e[t].getChannelData(0)); + for (; l < a;) { + for (t = 0; t < o.length; t++) r = 0 | (.5 + (r = Math.max(-1, Math.min(1, o[t][c]))) < 0 ? 32768 * r : 32767 * r), s.setInt16(l, r, !0), l += 2; + c++ + } + return new Blob([n], { + type: "audio/wav" + }); + + function h(e) { + s.setUint16(l, e, !0), l += 2 + } + + function u(e) { + s.setUint32(l, e, !0), l += 4 + } + }(e.audioBuffers)) + } +}, function(e, t) { + var r; + ! function() { + "use strict"; + var e; + + function t(e) { + var t = 1 / 4; + e.duration && (t = e.duration[0]); + var r = 60; + return e.bpm && (r = e.bpm), t * r / .25 + } + + function i(t) { + var r; + switch (t.type) { + case "common_time": + r = { + el_type: "meter", + num: 4, + den: 4 + }; + break; + case "cut_time": + r = { + el_type: "meter", + num: 2, + den: 2 + }; + break; + case "specified": + r = { + el_type: "meter", + num: t.value[0].num, + den: t.value[0].den + }; + break; + default: + r = { + el_type: "meter" + } + } + return e = r.num / r.den, r + } + r = function(r, a) { + var n = void 0, + s = (a = a || {}).program || 0, + o = a.midiTranspose || 0, + c = a.channel || 0, + l = a.drum || "", + h = a.drumBars || 1, + u = a.drumIntro || 0, + d = "" !== l; + s = parseInt(s, 10), o = parseInt(o, 10), 10 === (c = parseInt(c, 10)) && (s = 128), l = l.split(" "), h = parseInt(h, 10), u = parseInt(u, 10); + var p = r.formatting.bagpipes; + p && (s = 71); + var f = []; + if (r.formatting.midi) { + var m = r.formatting.midi; + m.program && m.program.length > 0 && (s = m.program[0], m.program.length > 1 && (s = m.program[1], c = m.program[0])), m.transpose && (o = m.transpose[0]), m.channel && (c = m.channel[0]), m.drum && (l = m.drum), m.drumbars && (h = m.drumbars[0]), m.drumon && (d = !0), 10 === c && (s = 128), m.beat && f.push({ + el_type: "beat", + beats: m.beat + }), m.nobeataccents && f.push({ + el_type: "beataccents", + value: !1 + }) + } + n = a.qpm ? parseInt(a.qpm, 10) : r.metaText.tempo ? t(r.metaText.tempo) : a.defaultQpm ? a.defaultQpm : 180; + var g = []; + p && g.push({ + el_type: "bagpipes" + }), g.push({ + el_type: "instrument", + program: s + }), c && g.push({ + el_type: "channel", + channel: c + }), o && g.push({ + el_type: "transpose", + transpose: o + }), g.push({ + el_type: "tempo", + qpm: n + }); + for (var v = 0; v < f.length; v++) g.push(f[v]); + for (var b = [], y = [], w = [], k = !1, x = 0; x < r.lines.length; x++) { + var S = r.lines[x]; + if (S.staff) + for (var A = S.staff, T = 0, C = 0; C < A.length; C++) + for (var _ = A[C], N = 0; N < _.voices.length; N++) { + var E = _.voices[N]; + if (b[T] || (b[T] = [].concat(JSON.parse(JSON.stringify(g)))), _.clef && "perc" === _.clef.type) + for (var B = 0; B < b[T].length; B++) "instrument" === b[T][B].el_type && (b[T][B].program = 128); + else _.key && ("HP" === _.key.root ? b[T].push({ + el_type: "key", + accidentals: [{ + acc: "natural", + note: "g" + }, { + acc: "sharp", + note: "f" + }, { + acc: "sharp", + note: "c" + }] + }) : b[T].push({ + el_type: "key", + accidentals: _.key.accidentals + })); + _.meter && b[T].push(i(_.meter)), !k && d && (b[T].push({ + el_type: "drum", + params: { + pattern: l, + bars: h, + on: d, + intro: u + } + }), k = !0), _.clef && _.clef.transpose && (_.clef.el_type = "clef", b[T].push({ + el_type: "transpose", + transpose: _.clef.transpose + })), r.formatting.midi && r.formatting.midi.drumoff && (b[T].push({ + el_type: "bar" + }), b[T].push({ + el_type: "drum", + params: { + pattern: "", + on: !1 + } + })); + for (var M = 0, L = 0; L < E.length; L++) { + var P = E[L]; + switch (P.el_type) { + case "note": + P.rest && "spacer" === P.rest.type || (P.decoration && (P.decoration.indexOf("ppp") >= 0 ? b[T].push({ + el_type: "beat", + beats: [30, 20, 10, 1] + }) : P.decoration.indexOf("pp") >= 0 ? b[T].push({ + el_type: "beat", + beats: [45, 35, 20, 1] + }) : P.decoration.indexOf("p") >= 0 ? b[T].push({ + el_type: "beat", + beats: [60, 50, 35, 1] + }) : P.decoration.indexOf("mp") >= 0 ? b[T].push({ + el_type: "beat", + beats: [75, 65, 50, 1] + }) : P.decoration.indexOf("mf") >= 0 ? b[T].push({ + el_type: "beat", + beats: [90, 80, 65, 1] + }) : P.decoration.indexOf("f") >= 0 ? b[T].push({ + el_type: "beat", + beats: [105, 95, 80, 1] + }) : P.decoration.indexOf("ff") >= 0 ? b[T].push({ + el_type: "beat", + beats: [120, 110, 95, 1] + }) : P.decoration.indexOf("fff") >= 0 && b[T].push({ + el_type: "beat", + beats: [127, 125, 110, 1] + })), b[T].push(P), M++); + break; + case "key": + "HP" === P.root ? b[T].push({ + el_type: "key", + accidentals: [{ + acc: "natural", + note: "g" + }, { + acc: "sharp", + note: "f" + }, { + acc: "sharp", + note: "c" + }] + }) : b[T].push({ + el_type: "key", + accidentals: P.accidentals + }); + break; + case "meter": + b[T].push(i(P)); + break; + case "clef": + P.transpose && b[T].push({ + el_type: "transpose", + transpose: P.transpose + }); + break; + case "tempo": + n = t(P), b[T].push({ + el_type: "tempo", + qpm: n + }); + break; + case "bar": + M > 0 && b[T].push({ + el_type: "bar" + }), M = 0; + var H = "bar_right_repeat" === P.type || "bar_dbl_repeat" === P.type, + q = "1" === P.startEnding, + D = "bar_left_repeat" === P.type || "bar_dbl_repeat" === P.type || "bar_right_repeat" === P.type; + if (H) { + var I = y[T]; + I || (I = 0); + var z = w[T]; + z || (z = b[T].length), b[T] = b[T].concat(b[T].slice(I, z)), w[T] = void 0, y[T] = void 0 + } + q && (w[T] = b[T].length), D && (y[T] = b[T].length); + break; + case "style": + case "part": + break; + case "stem": + case "scale": + break; + case "midi": + var O = !1; + switch (P.cmd) { + case "drumon": + d = !0, O = !0; + break; + case "drumoff": + d = !1, O = !0; + break; + case "drum": + l = P.params, O = !0; + break; + case "drumbars": + h = P.params[0], O = !0; + break; + case "drummap": + break; + case "program": + b[T].push({ + el_type: "instrument", + program: P.params[0] + }); + break; + case "transpose": + b[T].push({ + el_type: "transpose", + transpose: P.params[0] + }); + break; + case "gchordoff": + b[T].push({ + el_type: "gchord", + tacet: !0 + }); + break; + case "gchordon": + b[T].push({ + el_type: "gchord", + tacet: !1 + }); + break; + case "beat": + b[T].push({ + el_type: "beat", + beats: P.params + }); + break; + case "nobeataccents": + b[T].push({ + el_type: "beataccents", + value: !1 + }); + break; + case "beataccents": + b[T].push({ + el_type: "beataccents", + value: !0 + }); + break; + case "vol": + b[T].push({ + el_type: "vol", + volume: P.params[0] + }); + break; + case "volinc": + b[T].push({ + el_type: "volinc", + volume: P.params[0] + }); + break; + default: + console.log("MIDI seq: midi cmd not handled: ", P.cmd, P) + } + O && (b[0].push({ + el_type: "drum", + params: { + pattern: l, + bars: h, + intro: u, + on: d + } + }), k = !0); + break; + default: + console.log("MIDI: element type " + P.el_type + " not handled.") + } + } + T++ + } + } + if (u) + for (var R = r.getPickupLength(), V = 0; V < b.length; V++) { + for (var F = 0; + "note" !== b[V][F].el_type && b[V].length > F;) F++; + if (b[V].length > F) + for (var G = 0; G < u; G++) 0 === R || G < u - 1 ? b[V].splice(F, 0, { + el_type: "note", + rest: { + type: "rest" + }, + duration: e + }, { + el_type: "bar" + }) : b[V].splice(F, 0, { + el_type: "note", + rest: { + type: "rest" + }, + duration: e - R + }) + } + return b + } + }(), e.exports = r +}, function(e, t) { + var r; + ! function() { + "use strict"; + var e, t, i, a, n, s, o, c, l, h, u, d, p, f, m, g, v, b, y, w, k, x, S, A = 1, + T = { + num: 4, + den: 4 + }, + C = !1, + _ = !0, + N = 105, + E = 95, + B = 85, + M = .25, + L = {}; + + function P(e) { + for (var t = 0, r = 0; r < e.length; r++) { + for (var i = e[r], a = 0, n = 0; n < i.length; n++) { + var s = i[n]; + s.duration && (a += s.duration) + } + t = Math.max(t, a) + } + return t + } + + function H(e) { + switch (e.den) { + case 2: + return .5; + case 4: + return .25; + case 8: + return .375; + case 16: + return .125 + } + return .25 + } + r = function(r, q) { + q || (q = {}), e = [], t = [0, 0, 0, 0, 0, 0, 0], a = !1, n = 1, s = [], o = void 0, c = void 0, A = 1, l = void 0, h = void 0, u = void 0, f = void 0, d = {}, T = { + num: 4, + den: 4 + }, m = [], v = r.length, g = !1, b = [], y = void 0, w = 0, C = !!q.chordsOff, _ = !0, N = 105, E = 95, B = 85, M = .25, k = void 0, x = void 0, S = [], !1, L = {}, + function(e) { + for (var t = 0; t < e.length; t++) + for (var r = e[t], i = 0; i < r.length; i++) { + delete r[i].currentTrackMilliseconds + } + }(r); + for (var D = 0; D < r.length; D++) { + i = 0, p = -1; + var z = r[D]; + u = [{ + cmd: "program", + channel: D, + instrument: l + }], f = 0, d = {}; + for (var O = 0; O < z.length; O++) { + var V = z[O]; + switch (V.el_type) { + case "note": + I(V, q.voicesOff); + break; + case "key": + t = R(V); + break; + case "meter": + c || (c = V), M = H(T = V); + break; + case "tempo": + o ? A = V.qpm ? o / V.qpm : 1 : o = V.qpm; + break; + case "transpose": + i = V.transpose; + break; + case "bar": + m.length > 0 && 0 === D && (K(), b = []), w = 0, e = [], 0 === D && Z(r.length + 1); + break; + case "bagpipes": + a = !0; + break; + case "instrument": + if (void 0 === l && (l = V.program), h = V.program, u.length > 0 && "program" === u[u.length - 1].cmd) u[u.length - 1].instrument = V.program; + else { + var F; + for (F = u.length - 1; F >= 0 && "program" !== u[F].cmd; F--); + (F < 0 || u[F].instrument !== V.program) && u.push({ + cmd: "program", + channel: D, + instrument: V.program + }) + } + break; + case "channel": + break; + case "drum": + L = Q(V.params); + break; + case "gchord": + q.chordsOff || (C = V.tacet); + break; + case "beat": + N = V.beats[0], E = V.beats[1], B = V.beats[2]; + break; + case "vol": + k = V.volume; + break; + case "volinc": + x = V.volume; + break; + case "beataccents": + _ = V.value; + break; + default: + console.log("MIDI creation. Unknown el_type: " + V.el_type + "\n") + } + } + void 0 === u[0].instrument && (u[0].instrument = l || 0), s.push(u), m.length > 0 && (g = !0), S.length > 0 && !0 + } + return m.length > 0 && s.push(m), S.length > 0 && s.push(S), { + tempo: o, + instrument: l, + tracks: s, + totalDuration: P(s) + } + }; + var q = ["break", "(break)", "no chord", "n.c.", "tacet"]; + + function D() { + for (var e = 0, t = 0; t < u.length; t++) "move" === u[t].cmd && (e += u[t].duration); + return e + } + + function I(e, t) { + var r; + k ? (r = k, k = void 0) : r = _ ? 0 === w ? N : w % M < .001 ? E : B : E, x && (r += x, x = void 0), r < 0 && (r = 0), r > 127 && (r = 127); + var s = t ? 0 : r, + c = function(e) { + if (C) return "break"; + if (g || !e.chord || 0 === e.chord.length) return null; + for (var t = 0; t < e.chord.length; t++) { + var r = e.chord[t]; + if ("default" === r.position) return r.name; + if (q.indexOf(r.name.toLowerCase()) >= 0) return "break" + } + return null + }(e); + if (c) { + var l = function(e) { + if (0 === e.length) return; + if ("break" === e) return { + chick: [] + }; + var t = e.substring(0, 1); + if ("(" === t) { + if (0 === (e = e.substring(1, e.length - 2)).length) return; + t = e.substring(0, 1) + } + var r = G[t]; + if (!r) return; + var a, n = (r += i) - 5; + 1 === e.length && (a = Y(r, "")); + var s = e.substring(1), + o = s.substring(0, 1); + "b" === o || "♭" === o ? (r--, n--, s = s.substring(1)) : "#" !== o && "♯" !== o || (r++, n++, s = s.substring(1)); + var c = s.split("/"); + if (a = Y(r, c[0]), 2 === c.length) { + if (G[c[1].substring(0, 1)]) { + var l = { + "#": 1, + "♯": 1, + b: -1, + "♭": -1 + } [c[1].substring(1)] || 0; + r = G[c[1].substring(0, 1)] + l + i, n = r + } + } + return { + boom: r, + boom2: n, + chick: a + } + }(c); + if (l) { + if (0 === m.length) { + m.push({ + cmd: "program", + channel: v, + instrument: 0 + }); + var S = D(); + S > 0 && m.push({ + cmd: "move", + duration: S * A + }) + } + y = l, b.push({ + chord: y, + beat: w + }) + } + } + e.startTriplet && (n = e.tripletMultiplier); + var T, L = (e.durationClass ? e.durationClass : e.duration) * n; + if (w += L, e.gracenotes) { + var P = a || p < 0 || 0 === u.length, + H = P ? L : u[p].duration; + T = function(e, t) { + for (var r, i = 0, a = [], n = 0; n < e.length; n++) r = e[n], i += r.duration; + var s = 2 * (i /= 8) > t ? t / (2 * i) : 1; + for (n = 0; n < e.length; n++) { + var o = (r = e[n]).midipitch ? r.midipitch - 60 : r.pitch; + a.push({ + pitch: o, + duration: r.duration / 8 * s + }) + } + return a + }(e.gracenotes, H), a || (L = V(T, P, L, null, s)) + } + if (e.currentTrackMilliseconds || (e.currentTrackMilliseconds = []), e.currentTrackMilliseconds.push(f / M / o * 60 * 1e3), e.pitches) { + T && a && (L = V(T, !0, L, null, s)); + var I = []; + e.midiPitches = []; + for (var z = 0; z < e.pitches.length; z++) { + var R = e.pitches[z], + F = O(R); + if (I.push({ + pitch: F, + startTie: R.startTie + }), e.midiPitches.push({ + pitch: F + 60, + durationInMeasures: L * A, + volume: r, + instrument: h + }), d["" + F]) { + for (var j = u.length - 1; j >= 0; j--) + if ("start" === u[j].cmd && u[j].pitch === F && u[j].elem) { + for (var U = u[j].elem.midiPitches, W = 0; W < U.length; W++) U[W].pitch - 60 === F && (U[W].durationInMeasures += L * A); + break + } + } else u.push({ + cmd: "start", + pitch: F, + volume: s + }); + R.startTie ? (d["" + F] = !0, u[u.length - 1].elem = e) : R.endTie && (d["" + F] = !1) + } + if (e.gracenotes) + for (var X = 0; X < e.gracenotes.length; X++) { + e.midiGraceNotePitches = []; + var K = e.gracenotes[X]; + e.midiGraceNotePitches.push({ + pitch: O(K) + 60, + durationInMeasures: 0, + volume: r, + instrument: h + }) + } + var Q = 1 / 128, + Z = L - 1 / 128; + Z < 0 && (Z = 0, Q = 0), u.push({ + cmd: "move", + duration: Z * A + }), p = u.length - 1, f += Z * A; + for (var J = 0; J < I.length; J++) d["" + I[J].pitch] || u.push({ + cmd: "stop", + pitch: I[J].pitch + }); + u.push({ + cmd: "move", + duration: Q * A + }), f += Q * A + } else e.rest && (u.push({ + cmd: "move", + duration: L * A + }), f += L * A); + e.endTriplet && (n = 1) + } + var z = [0, 2, 4, 5, 7, 9, 11]; + + function O(r) { + if (r.midipitch) return r.midipitch - 60; + var a = r.pitch; + if (r.accidental) switch (r.accidental) { + case "sharp": + e[a] = 1; + break; + case "flat": + e[a] = -1; + break; + case "natural": + e[a] = 0; + break; + case "dblsharp": + e[a] = 2; + break; + case "dblflat": + e[a] = -2 + } + var n = 12 * function(e) { + return Math.floor(e / 7) + }(a) + z[F(a)]; + return void 0 !== e[a] ? n += e[a] : n += t[F(a)], n += i + } + + function R(e) { + var t = [0, 0, 0, 0, 0, 0, 0]; + if (!e.accidentals) return t; + for (var r = 0; r < e.accidentals.length; r++) { + var i = e.accidentals[r], + a = "sharp" === i.acc ? 1 : "natural" === i.acc ? 0 : -1; + t[F(i.note.toLowerCase().charCodeAt(0) - "c".charCodeAt(0))] += a + } + return t + } + + function V(e, t, r, i, a) { + for (var n = 0; n < e.length; n++) { + var s = e[n]; + s !== i && u.push({ + cmd: "start", + pitch: s.pitch, + volume: a + }), u.push({ + cmd: "move", + duration: e[n].duration * A + }), s !== i && u.push({ + cmd: "stop", + pitch: s.pitch + }), t || (u[p].duration -= e[n].duration), r -= e[n].duration + } + return r + } + + function F(e) { + return (e %= 7) < 0 && (e += 7), e + } + var G = { + A: -27, + B: -25, + C: -24, + D: -22, + E: -20, + F: -19, + G: -17 + }; + var j = { + dim: [0, 3, 6], + "°": [0, 3, 6], + "˚": [0, 3, 6], + dim7: [0, 3, 6, 9], + "°7": [0, 3, 6, 9], + "˚7": [0, 3, 6, 9], + "ø7": [0, 3, 6, 10], + "m7(b5)": [0, 3, 6, 10], + m7b5: [0, 3, 6, 10], + "-7(b5)": [0, 3, 6, 10], + "-7b5": [0, 3, 6, 10], + "7b5": [0, 4, 6, 10], + "7(b5)": [0, 4, 6, 10], + "7♭5": [0, 4, 6, 10], + "7(b9,b5)": [0, 4, 6, 10, 13], + "7b9,b5": [0, 4, 6, 10, 13], + "7(#9,b5)": [0, 4, 6, 10, 15], + "7#9b5": [0, 4, 6, 10, 15], + "maj7(b5)": [0, 3, 6, 11], + maj7b5: [0, 3, 6, 11], + "13(b5)": [0, 4, 6, 10, 14, 18], + "13b5": [0, 4, 6, 10, 14, 18], + m: [0, 3, 7], + "-": [0, 3, 7], + m6: [0, 3, 7, 9], + "-6": [0, 3, 7, 9], + m7: [0, 3, 7, 10], + "-7": [0, 3, 7, 10], + "-(b6)": [0, 3, 7, 8], + "-b6": [0, 3, 7, 8], + "-6/9": [0, 3, 7, 9, 14], + "-7(b9)": [0, 3, 7, 10, 13], + "-7b9": [0, 3, 7, 10, 13], + "-maj7": [0, 3, 7, 11], + "-9+7": [0, 3, 7, 11, 13], + "-11": [0, 3, 7, 11, 14, 16], + M: [0, 4, 7], + 6: [0, 4, 7, 9], + "6/9": [0, 4, 7, 9, 14], + 7: [0, 4, 7, 10], + 9: [0, 4, 7, 10, 14], + 11: [0, 4, 7, 10, 14, 16], + 13: [0, 4, 7, 10, 14, 18], + "7b9": [0, 4, 7, 10, 13], + "7♭9": [0, 4, 7, 10, 13], + "7(b9)": [0, 4, 7, 10, 13], + "7(#9)": [0, 4, 7, 10, 15], + "7#9": [0, 4, 7, 10, 15], + "(13)": [0, 4, 7, 10, 14, 18], + "7(9,13)": [0, 4, 7, 10, 14, 18], + "7(#9,b13)": [0, 4, 7, 10, 15, 17], + "7(#11)": [0, 4, 7, 10, 14, 17], + "7#11": [0, 4, 7, 10, 14, 17], + "7(b13)": [0, 4, 7, 10, 17], + "7b13": [0, 4, 7, 10, 17], + "9(#11)": [0, 4, 7, 10, 14, 17], + "9#11": [0, 4, 7, 10, 14, 17], + "13(#11)": [0, 4, 7, 10, 15, 18], + "13#11": [0, 4, 7, 10, 15, 18], + maj7: [0, 4, 7, 11], + "∆7": [0, 4, 7, 11], + "Δ7": [0, 4, 7, 11], + maj9: [0, 4, 7, 11, 14], + "maj7(9)": [0, 4, 7, 11, 14], + "maj7(11)": [0, 4, 7, 11, 16], + "maj7(#11)": [0, 4, 7, 11, 17], + "maj7(13)": [0, 4, 7, 11, 18], + "maj7(9,13)": [0, 4, 7, 11, 14, 18], + "7sus4": [0, 5, 7, 10], + m7sus4: [0, 5, 7, 10], + sus4: [0, 5, 7], + sus2: [0, 2, 7], + "7sus2": [0, 2, 7, 10], + "9sus4": [0, 5, 7, 14], + "13sus4": [0, 5, 7, 18], + aug7: [0, 4, 8, 10], + "+7": [0, 4, 8, 10], + "+": [0, 4, 8], + "7#5": [0, 4, 8, 10], + "7♯5": [0, 4, 8, 10], + "7+5": [0, 4, 8, 10], + "9#5": [0, 4, 8, 10, 14], + "9♯5": [0, 4, 8, 10, 14], + "9+5": [0, 4, 8, 10, 14], + "-7(#5)": [0, 3, 8, 10], + "-7#5": [0, 3, 8, 10], + "7(#5)": [0, 4, 8, 10], + "7(b9,#5)": [0, 4, 8, 10, 13], + "7b9#5": [0, 4, 8, 10, 13], + "maj7(#5)": [0, 4, 8, 11], + "maj7#5": [0, 4, 8, 11], + "maj7(#5,#11)": [0, 4, 8, 11, 14], + "maj7#5#11": [0, 4, 8, 11, 14], + "9(#5)": [0, 4, 8, 10, 14], + "13(#5)": [0, 4, 8, 10, 14, 18], + "13#5": [0, 4, 8, 10, 14, 18] + }; + + function Y(e, t) { + var r = j[t]; + r || (r = j.M), e += 12; + for (var i = [], a = 0; a < r.length; a++) i.push(e + r[a]); + return i + } + + function U(e, t) { + void 0 !== e && m.push({ + cmd: "start", + pitch: e, + volume: 64 + }), m.push({ + cmd: "move", + duration: t / 2 * A + }), void 0 !== e && m.push({ + cmd: "stop", + pitch: e + }), m.push({ + cmd: "move", + duration: t / 2 * A + }) + } + + function W(e, t) { + for (var r = 0; r < e.length; r++) m.push({ + cmd: "start", + pitch: e[r], + volume: 48 + }); + for (m.push({ + cmd: "move", + duration: t / 2 * A + }), r = 0; r < e.length; r++) m.push({ + cmd: "stop", + pitch: e[r] + }); + m.push({ + cmd: "move", + duration: t / 2 * A + }) + } + var X = { + "2/2": ["boom", "chick"], + "2/4": ["boom", "chick"], + "3/4": ["boom", "chick", "chick"], + "4/4": ["boom", "chick", "boom2", "chick"], + "5/4": ["boom", "chick", "chick", "boom2", "chick"], + "6/8": ["boom", "", "chick", "boom2", "", "chick"], + "9/8": ["boom", "", "chick", "boom2", "", "chick", "boom2", "", "chick"], + "12/8": ["boom", "", "chick", "boom2", "", "chick", "boom2", "", "chick", "boom2", "", "chick"] + }; + + function K() { + var e = T.num, + t = T.den, + r = 1 / t, + i = X[e + "/" + t], + a = parseInt(e, 10) / parseInt(t, 10), + n = Math.abs(a - w); + if (!i || n > .0078125) { + i = []; + for (var s = w / r, o = 0; o < s; o++) i.push("chick") + } + if (0 === b.length && b.push({ + beat: 0, + chord: y + }), 0 !== b[0].beat && y && b.unshift({ + beat: 0, + chord: y + }), 1 !== b.length) { + for (var c = {}, l = 0; l < b.length; l++) { + var h = b[l]; + c["" + Math.floor(h.beat / r)] = h + } + for (var u = 0; u < i.length; u++) { + var d; + switch (c["" + u] && (d = c["" + u]), i[u]) { + case "boom": + c["" + (u + 1)] ? W(d.chord.chick, r) : U(d.chord.boom, r); + break; + case "boom2": + c["" + (u + 1)] ? W(d.chord.chick, r) : U(d.chord.boom2, r); + break; + case "chick": + W(d.chord.chick, r); + break; + case "": + c["" + u] ? W(d.chord.chick, r) : m.push({ + cmd: "move", + duration: r * A + }) + } + } + } else + for (var p = 0; p < i.length; p++) switch (i[p]) { + case "boom": + U(b[0].chord.boom, r); + break; + case "boom2": + U(b[0].chord.boom2, r); + break; + case "chick": + W(b[0].chord.chick, r); + break; + case "": + m.push({ + cmd: "move", + duration: r * A + }) + } + } + + function Q(e) { + if (0 === e.pattern.length || !1 === e.on) return { + on: !1 + }; + for (var t = e.pattern[0], r = [], i = "", a = 0, n = 0; n < t.length; n++) + if ("d" === t[n] && a++, "d" === t[n] || "z" === t[n]) 0 !== i.length ? (r.push(i), i = t[n]) : i += t[n]; + else { + if (0 === i.length) return { + on: !1 + }; + i += t[n] + } if (0 !== i.length && r.push(i), e.pattern.length !== 2 * a + 1) return { + on: !1 + }; + for (var s = { + on: !0, + bars: e.bars, + pattern: [] + }, o = 1 / T.den, c = 0, l = 0; l < r.length; l++) { + i = r[l]; + for (var h = 1, u = !1, d = 0, p = 1; p < i.length; p++) switch (i[p]) { + case "/": + 0 !== d && (h *= d), d = 0, u = !0; + break; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + d = 10 * d + i[p]; + break; + default: + return { + on: !1 + } + } + u ? (0 === d && (d = 2), h /= d) : d && (h *= d), "d" === i[0] ? (s.pattern.push({ + len: h * o, + pitch: e.pattern[1 + c], + velocity: e.pattern[1 + c + a] + }), c++) : s.pattern.push({ + len: h * o, + pitch: null + }) + } + for (var f = 0, m = T.num / T.den, g = 0; g < s.pattern.length; g++) f += s.pattern[g].len; + var v = f / (e.bars ? e.bars : 1) / m; + for (g = 0; g < s.pattern.length; g++) s.pattern[g].len = s.pattern[g].len / v; + return s + } + + function Z(e) { + if (0 !== S.length || L.on) { + var t, r, i, a = T.num / T.den; + if (0 === S.length) { + S.push({ + cmd: "program", + channel: e, + instrument: 128 + }); + var n = D(); + if (n > 0 && n < a - .01) return void S.push({ + cmd: "move", + duration: n * A + }) + } + if (L.on) + for (var s = 0; s < L.pattern.length; s++) { + var o = L.pattern[s].len * A; + L.pattern[s].pitch ? (t = L.pattern[s].pitch, r = o, i = L.pattern[s].velocity, S.push({ + cmd: "start", + pitch: t - 60, + volume: i + }), S.push({ + cmd: "move", + duration: r + }), S.push({ + cmd: "stop", + pitch: t - 60 + })) : S.push({ + cmd: "move", + duration: o + }) + } else S.push({ + cmd: "move", + duration: a * A + }) + } + } + }(), e.exports = r +}, function(e, t, r) { + var i = r(24), + a = r(13); + e.exports = function(e, t, r) { + for (var n = new i, s = 0; s < e.length; s++) { + var o = e[s], + c = n.addTrack(); + if (n.setInstrument(c, o.instrument), 0 === s && t) + for (var l = 0; l < t.length; l++) { + var h = t[l]; + n.appendNote(c, h.pitch, 1 / 64, h.volume) + } + n.appendNote(c, o.pitch, o.durationInMeasures, o.volume) + } + var u = new a; + return u.init({ + sequence: n, + millisecondsPerMeasure: r + }).then((function() { + return u.prime() + })).then((function() { + return u.start() + })) + } +}, function(e, t, r) { + var i = r(9).TuneBook, + a = r(0), + n = r(10), + s = r(57), + o = r(20), + c = r(26), + l = r(7); + if ("function" != typeof window.CustomEvent) { + var h = function(e, t) { + t = t || { + bubbles: !1, + cancelable: !1, + detail: void 0 + }; + var r = document.createEvent("CustomEvent"); + return r.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), r + }; + h.prototype = window.Event.prototype, window.CustomEvent = h + } + var u = function(e) { + this.textarea = document.getElementById(e), this.initialText = this.textarea.value, this.isDragging = !1 + }; + u.prototype.addSelectionListener = function(e) { + this.textarea.onmousemove = function(t) { + this.isDragging && e.fireSelectionChanged() + } + }, u.prototype.addChangeListener = function(e) { + this.changelistener = e, this.textarea.onkeyup = function() { + e.fireChanged() + }, this.textarea.onmousedown = function() { + this.isDragging = !0, e.fireSelectionChanged() + }, this.textarea.onmouseup = function() { + this.isDragging = !1, e.fireChanged() + }, this.textarea.onchange = function() { + e.fireChanged() + } + }, u.prototype.getSelection = function() { + return { + start: this.textarea.selectionStart, + end: this.textarea.selectionEnd + } + }, u.prototype.setSelection = function(e, t) { + if (this.textarea.setSelectionRange) this.textarea.setSelectionRange(e, t); + else if (this.textarea.createTextRange) { + var r = this.textarea.createTextRange(); + r.collapse(!0), r.moveEnd("character", t), r.moveStart("character", e), r.select() + } + this.textarea.focus() + }, u.prototype.getString = function() { + return this.textarea.value + }, u.prototype.setString = function(e) { + this.textarea.value = e, this.initialText = this.getString(), this.changelistener && this.changelistener.fireChanged() + }, u.prototype.getElem = function() { + return this.textarea + }; + var d = function(e, t) { + var r; + if (this.abcjsParams = {}, t.abcjsParams) + for (r in t.abcjsParams) t.abcjsParams.hasOwnProperty(r) && (this.abcjsParams[r] = t.abcjsParams[r]); + if (t.midi_options) + for (r in t.midi_options) t.midi_options.hasOwnProperty(r) && (this.abcjsParams[r] = t.midi_options[r]); + if (t.parser_options) + for (r in t.parser_options) t.parser_options.hasOwnProperty(r) && (this.abcjsParams[r] = t.parser_options[r]); + if (t.render_options) + for (r in t.render_options) t.render_options.hasOwnProperty(r) && (this.abcjsParams[r] = t.render_options[r]); + t.indicate_changed && (this.indicate_changed = !0), this.editarea = "string" == typeof e ? new u(e) : e, this.editarea.addSelectionListener(this), this.editarea.addChangeListener(this), t.canvas_id ? this.div = document.getElementById(t.canvas_id) : t.paper_id ? this.div = document.getElementById(t.paper_id) : (this.div = document.createElement("DIV"), this.editarea.getElem().parentNode.insertBefore(this.div, this.editarea.getElem())), t.selectionChangeCallback && (this.selectionChangeCallback = t.selectionChangeCallback), t.synth && l() && (this.synth = { + el: t.synth.el, + cursorControl: t.synth.cursorControl, + options: t.synth.options + }), t.generate_midi && (this.generate_midi = t.generate_midi, this.abcjsParams.generateDownload && ("string" == typeof t.midi_download_id ? this.downloadMidi = document.getElementById(t.midi_download_id) : t.midi_download_id && (this.downloadMidi = t.midi_download_id)), !1 !== this.abcjsParams.generateInline && ("string" == typeof t.midi_id ? this.inlineMidi = document.getElementById(t.midi_id) : t.midi_id && (this.inlineMidi = t.midi_id))), (t.generate_warnings || t.warnings_id) && (t.warnings_id ? this.warningsdiv = document.getElementById(t.warnings_id) : this.warningsdiv = this.div), this.onchangeCallback = t.onchange, t.gui && (this.target = document.getElementById(e), this.abcjsParams.editable = !0), this.oldt = "", this.bReentry = !1, this.parseABC(), this.modelChanged(), this.addClassName = function(e, t) { + return function(e, t) { + var r = e.className; + return r.length > 0 && (r === t || new RegExp("(^|\\s)" + t + "(\\s|$)").test(r)) + }(e, t) || (e.className += (e.className ? " " : "") + t), e + }, this.removeClassName = function(e, t) { + return e.className = a.strip(e.className.replace(new RegExp("(^|\\s+)" + t + "(\\s+|$)"), " ")), e + }, this.setReadOnly = function(e) { + var t = this.editarea.getElem(); + e ? (t.setAttribute("readonly", "yes"), this.addClassName(t, "abc_textarea_readonly")) : (t.removeAttribute("readonly"), this.removeClassName(t, "abc_textarea_readonly")) + } + }; + d.prototype.renderTune = function(e, t, r) { + var a = new i(e), + s = n(); + s.parse(a.tunes[0].abc, t, a.tunes[0].startPos - a.header.length); + var c = s.getTune(); + new o(r, this.abcjsParams).engraveABC(c) + }, d.prototype.redrawMidi = function() { + if (this.generate_midi && !this.midiPause) { + var e = new window.CustomEvent("generateMidi", { + detail: { + tunes: this.tunes, + abcjsParams: this.abcjsParams, + downloadMidiEl: this.downloadMidi, + inlineMidiEl: this.inlineMidi, + engravingEl: this.div + } + }); + window.dispatchEvent(e) + } + this.synth && (this.synth.synthControl || (this.synth.synthControl = new c, this.synth.synthControl.load(this.synth.el, this.synth.cursorControl, this.synth.options)), this.synth.synthControl.setTune(this.tunes[0], !1)) + }, d.prototype.modelChanged = function() { + if (void 0 === this.tunes) return void 0 !== this.downloadMidi && (this.downloadMidi.innerHTML = ""), void 0 !== this.inlineMidi && (this.inlineMidi.innerHTML = ""), void(this.div.innerHTML = ""); + if (!this.bReentry) { + if (this.bReentry = !0, this.timerId = null, this.div.innerHTML = "", this.engraver_controller = new o(this.div, this.abcjsParams), this.engraver_controller.engraveABC(this.tunes), this.tunes[0].engraver = this.engraver_controller, this.redrawMidi(), this.warningsdiv && (this.warningsdiv.innerHTML = this.warnings ? this.warnings.join("
") : "No errors"), this.target) new s(this.target, !0).printABC(this.tunes[0]); + this.engraver_controller.addSelectListener(this.highlight.bind(this)), this.updateSelection(), this.bReentry = !1 + } + }, d.prototype.paramChanged = function(e) { + if (e) + for (var t in e) e.hasOwnProperty(t) && (this.abcjsParams[t] = e[t]); + this.oldt = "", this.fireChanged() + }, d.prototype.parseABC = function() { + var e = this.editarea.getString(); + if (e === this.oldt) return this.updateSelection(), !1; + if (this.oldt = e, "" === e) return this.tunes = void 0, this.warnings = "", !0; + var t = new i(e); + this.tunes = [], this.startPos = [], this.warnings = []; + for (var r = 0; r < t.tunes.length; r++) { + var a = new n; + a.parse(t.tunes[r].abc, this.abcjsParams, t.tunes[r].startPos - t.header.length), this.tunes[r] = a.getTune(), this.startPos[r] = t.tunes[r].startPos; + for (var s = a.getWarnings() || [], o = 0; o < s.length; o++) this.warnings.push(s[o]) + } + return !0 + }, d.prototype.updateSelection = function() { + var e = this.editarea.getSelection(); + try { + this.engraver_controller.rangeHighlight(e.start, e.end) + } catch (e) {} + this.selectionChangeCallback && this.selectionChangeCallback(e.start, e.end) + }, d.prototype.fireSelectionChanged = function() { + this.updateSelection() + }, d.prototype.setDirtyStyle = function(e) { + if (void 0 !== this.indicate_changed) { + var t, r, i = this.editarea.getElem(); + e ? function(e, t) { + var r = e.className; + return r.length > 0 && (r === t || new RegExp("(^|\\s)" + t + "(\\s|$)").test(r)) + }(t = i, r = "abc_textarea_dirty") || (t.className += (t.className ? " " : "") + r) : function(e, t) { + e.className = a.strip(e.className.replace(new RegExp("(^|\\s+)" + t + "(\\s+|$)"), " ")) + }(i, "abc_textarea_dirty") + } + }, d.prototype.fireChanged = function() { + if (!this.bIsPaused && this.parseABC()) { + var e = this; + this.timerId && clearTimeout(this.timerId), this.timerId = setTimeout((function() { + e.modelChanged() + }), 300); + var t = this.isDirty(); + this.wasDirty !== t && (this.wasDirty = t, this.setDirtyStyle(t)), this.onchangeCallback && this.onchangeCallback(this) + } + }, d.prototype.setNotDirty = function() { + this.editarea.initialText = this.editarea.getString(), this.wasDirty = !1, this.setDirtyStyle(!1) + }, d.prototype.isDirty = function() { + return void 0 !== this.indicate_changed && this.editarea.initialText !== this.editarea.getString() + }, d.prototype.highlight = function(e, t, r) { + this.editarea.setSelection(e.startChar, e.endChar), this.selectionChangeCallback && this.selectionChangeCallback(e.startChar, e.endChar) + }, d.prototype.pause = function(e) { + this.bIsPaused = e, e || this.fireChanged() + }, d.prototype.millisecondsPerMeasure = function() { + return this.synth.synthControl.visualObj.millisecondsPerMeasure() + }, d.prototype.pauseMidi = function(e) { + this.midiPause = e, e || this.redrawMidi() + }, e.exports = d +}, function(e, t) { + var r = function(e, t) { + this.elem = e, this.text = "", this.l = 1 / 8, this.reposition = t || !1 + }; + r.prototype.printString = function(e, t) { + this.reposition && t && (t.startChar = this.text.length), this.text += e, this.reposition && t && (t.endChar = this.text.length) + }, r.prototype.printNewLine = function() { + this.text += "\n" + }, r.prototype.printSpace = function() { + this.text[this.text.length - 1].match(/\s/) || (this.text += " ") + }, r.prototype.printABC = function(e) { + this.text = "", this.abctune = e, this.printHeader(), this.printBody(), this.elem.value = this.text + }, r.prototype.printHeader = function() { + this.printHeaderLine("x", "X", "1"), this.printHeaderLine("title", "T"), this.printHeaderLine("composer", "C"), this.printHeaderLine("history", "H"), this.printHeaderLine("author", "A"), this.printHeaderLine("book", "B"), this.printHeaderLine("discography", "D"), this.printHeaderLine("url", "F"), this.printHeaderLine("group", "G"), this.printHeaderLine("instruction", "I"), this.printHeaderLine("notes", "N"), this.printHeaderLine("origin", "O"), this.printHeaderLine("rhythm", "R"), this.printHeaderLine("source", "S"), this.printHeaderLine("unalignedwords", "W"), this.printHeaderLine("transcription", "Z"), this.printHeaderLine("NULL", "L", "1/8"), this.printHeaderLine("NULL", "M", this.getMeterString(this.abctune.lines[0].staff[0].meter)), this.printHeaderLine("NULL", "K", this.getKeyString(this.abctune.lines[0].staff[0].key)) + }, r.prototype.getKeyString = function(e) { + return e.root + e.acc + e.mode + }, r.prototype.getMeterString = function(e) { + switch (e.type) { + case "cut_time": + return "C|"; + case "common_time": + return "C"; + case "specified": + return e.value[0].den ? e.value[0].num + "/" + e.value[0].den : e.value[0].num + } + return "" + }, r.prototype.printHeaderLine = function(e, t, r) { + var i = this.abctune.metaText[e] || r; + if (void 0 !== i) + for (var a = i.split("\n"), n = 0; n < a.length; n++) this.printString(t + ": " + a[n]), this.printNewLine() + }, r.prototype.getElem = function() { + return this.abcline.length <= this.pos ? null : this.abcline[this.pos] + }, r.prototype.getNextElem = function() { + return this.abcline.length <= this.pos + 1 ? null : this.abcline[this.pos + 1] + }, r.prototype.printBody = function() { + for (var e = 0; e < this.abctune.lines.length; e++) { + var t = this.abctune.lines[e]; + t.staff ? this.printABCLine(t.staff) : t.subtitle && 0 !== e || t.text + } + }, r.prototype.printABCLine = function(e) { + for (this.s = 0; this.s < e.length; this.s++) this.printABCStaff(e[this.s]) + }, r.prototype.printABCStaff = function(e) { + for (this.v = 0; this.v < e.voices.length; this.v++) this.printABCVoice(e.voices[this.v]) + }, r.prototype.printABCVoice = function(e) { + for (this.abcline = e, this.pos = 0; this.pos < this.abcline.length; this.pos++) this.printABCElement(); + this.printNewLine() + }, r.prototype.printABCElement = function() { + var e = this.getElem(); + switch (e.el_type) { + case "note": + this.printBeam(); + break; + case "bar": + this.printBarLine(e) + } + }, r.prototype.printBeam = function() { + if (this.printSpace(), this.getElem().startBeam && !this.getElem().endBeam) + for (; this.getElem() && (this.printNote(this.getElem()), !this.getElem().endBeam);) this.pos++; + else this.printNote(this.getElem()); + this.printSpace() + }, r.prototype.printNote = function(e) { + var t, r = ""; + if (void 0 !== e.chord) + for (t = 0; t < e.chord.length; t++) r += '"' + e.chord[t].name + '"'; + var i = { + staccato: ".", + upbow: "u", + downbow: "v", + roll: "~", + fermata: "H", + slide: "J", + accent: "L", + mordent: "M", + pralltriller: "P", + trill: "T", + lower: "." + }; + if (void 0 !== e.decoration) + for (t = 0; t < e.decoration.length; t++) { + var a = e.decoration[t]; + i[a] ? r += i[a] : (r += "!", r += a, r += "!") + } + if (void 0 !== e.gracenotes) { + for (r += "{", t = 0; t < e.gracenotes.length; t++) r += this.getNoteString(e.gracenotes[t]); + r += "}" + } + var n = !1; + if (1 === e.pitches.length && e.pitches[0].startSlur && (n = !0, r += this.multiplyString("(", e.pitches[0].startSlur.length)), e.startSlur && (r += this.multiplyString("(", e.startSlur.length)), (1 === e.pitches.length && e.pitches[0].endSlur || e.endSlur) && (n = !0), e.startTriplet && (r += "(3"), e.pitches) { + for (e.pitches.length > 1 && (r += "["), t = 0; t < e.pitches.length; t++) e.pitches[t].duration = e.duration, r += this.getNoteString(e.pitches[t], n); + e.pitches.length > 1 && (r += "]") + } + 1 === e.pitches.length && e.pitches[0].endSlur && (r += this.multiplyString(")", e.pitches[0].endSlur.length)), e.endSlur && (r += this.multiplyString(")", e.endSlur.length)), this.printString(r, e) + }, r.prototype.getNoteString = function(e, t) { + var r = ""; + !t && e.startSlur && (r += "("); + var i = ""; + switch (e.accidental) { + case "quartersharp": + i = "^/"; + break; + case "dblsharp": + i = "^^"; + break; + case "sharp": + i = "^"; + break; + case "quarterflat": + i = "_/"; + break; + case "flat": + i = "_"; + break; + case "dblflat": + i = "__"; + break; + case "natural": + i = "=" + } + r += i; + var a = ["C", "D", "E", "F", "G", "A", "B"][this.extractNote(e.pitch)], + n = this.extractOctave(e.pitch); + if (n > 0) + for (a = a.toLowerCase(), n--; n > 0;) a += "'", n--; + else + for (; n < 0;) a += ",", n++; + return r += a, e.duration && (r += this.getDurationString(e.duration)), !t && e.endSlur && (r += ")"), e.startTie && (r += "-"), r + }, r.prototype.getDurationString = function(e) { + if (e / this.l > 1) return e / this.l; + var t = ""; + return this.l / e > 1 && (t += "/", this.l / e > 2 && (t += this.l / e)), t + }, r.prototype.extractNote = function(e) { + var t = e % 7; + return t < 0 && (t += 7), t + }, r.prototype.extractOctave = function(e) { + return Math.floor(e / 7) + }, r.prototype.printBarLine = function(e) { + var t = ""; + switch (e.type) { + case "bar_thin": + t += "|"; + break; + case "bar_thin_thick": + t += "|]"; + break; + case "bar_thin_thin": + t += "||"; + break; + case "bar_thick_thin": + t += "[|"; + break; + case "bar_dbl_repeat": + t += ":||:"; + break; + case "bar_left_repeat": + t += "|:"; + break; + case "bar_right_repeat": + t += ":|"; + break; + case "bar_invisible": + t += "" + } + this.printString(t, e) + }, r.prototype.multiplyString = function(e, t) { + for (var r = ""; t > 0; t--) r += e; + return r + }, e.exports = r +}, function(e, t, r) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = r(59); + t.XmlEntities = i.XmlEntities; + var a = r(60); + t.Html4Entities = a.Html4Entities; + var n = r(61); + t.Html5Entities = n.Html5Entities, t.AllHtmlEntities = n.Html5Entities +}, function(e, t, r) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = r(16), + a = { + "<": "<", + ">": ">", + """: '"', + "&apos": "'", + "&": "&", + "<": "<", + ">": ">", + """: '"', + "'": "'", + "&": "&" + }, + n = { + 60: "lt", + 62: "gt", + 34: "quot", + 39: "apos", + 38: "amp" + }, + s = { + "<": "<", + ">": ">", + '"': """, + "'": "'", + "&": "&" + }, + o = function() { + function e() {} + return e.prototype.encode = function(e) { + return e && e.length ? e.replace(/[<>"'&]/g, (function(e) { + return s[e] + })) : "" + }, e.encode = function(t) { + return (new e).encode(t) + }, e.prototype.decode = function(e) { + return e && e.length ? e.replace(/&#?[0-9a-zA-Z]+;?/g, (function(e) { + if ("#" === e.charAt(1)) { + var t = "x" === e.charAt(2).toLowerCase() ? parseInt(e.substr(3), 16) : parseInt(e.substr(2)); + return !isNaN(t) || t >= -32768 ? t <= 65535 ? String.fromCharCode(t) : i.fromCodePoint(t) : "" + } + return a[e] || e + })) : "" + }, e.decode = function(t) { + return (new e).decode(t) + }, e.prototype.encodeNonUTF = function(e) { + if (!e || !e.length) return ""; + for (var t = e.length, r = "", a = 0; a < t;) { + var s = e.charCodeAt(a), + o = n[s]; + o ? (r += "&" + o + ";", a++) : (s < 32 || s > 126 ? s >= i.highSurrogateFrom && s <= i.highSurrogateTo ? (r += "&#" + i.getCodePoint(e, a) + ";", a++) : r += "&#" + s + ";" : r += e.charAt(a), a++) + } + return r + }, e.encodeNonUTF = function(t) { + return (new e).encodeNonUTF(t) + }, e.prototype.encodeNonASCII = function(e) { + if (!e || !e.length) return ""; + for (var t = e.length, r = "", a = 0; a < t;) { + var n = e.charCodeAt(a); + n <= 255 ? r += e[a++] : (n >= i.highSurrogateFrom && n <= i.highSurrogateTo ? (r += "&#" + i.getCodePoint(e, a) + ";", a++) : r += "&#" + n + ";", a++) + } + return r + }, e.encodeNonASCII = function(t) { + return (new e).encodeNonASCII(t) + }, e + }(); + t.XmlEntities = o +}, function(e, t, r) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = r(16), + a = ["apos", "nbsp", "iexcl", "cent", "pound", "curren", "yen", "brvbar", "sect", "uml", "copy", "ordf", "laquo", "not", "shy", "reg", "macr", "deg", "plusmn", "sup2", "sup3", "acute", "micro", "para", "middot", "cedil", "sup1", "ordm", "raquo", "frac14", "frac12", "frac34", "iquest", "Agrave", "Aacute", "Acirc", "Atilde", "Auml", "Aring", "AElig", "Ccedil", "Egrave", "Eacute", "Ecirc", "Euml", "Igrave", "Iacute", "Icirc", "Iuml", "ETH", "Ntilde", "Ograve", "Oacute", "Ocirc", "Otilde", "Ouml", "times", "Oslash", "Ugrave", "Uacute", "Ucirc", "Uuml", "Yacute", "THORN", "szlig", "agrave", "aacute", "acirc", "atilde", "auml", "aring", "aelig", "ccedil", "egrave", "eacute", "ecirc", "euml", "igrave", "iacute", "icirc", "iuml", "eth", "ntilde", "ograve", "oacute", "ocirc", "otilde", "ouml", "divide", "oslash", "ugrave", "uacute", "ucirc", "uuml", "yacute", "thorn", "yuml", "quot", "amp", "lt", "gt", "OElig", "oelig", "Scaron", "scaron", "Yuml", "circ", "tilde", "ensp", "emsp", "thinsp", "zwnj", "zwj", "lrm", "rlm", "ndash", "mdash", "lsquo", "rsquo", "sbquo", "ldquo", "rdquo", "bdquo", "dagger", "Dagger", "permil", "lsaquo", "rsaquo", "euro", "fnof", "Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega", "alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", "lambda", "mu", "nu", "xi", "omicron", "pi", "rho", "sigmaf", "sigma", "tau", "upsilon", "phi", "chi", "psi", "omega", "thetasym", "upsih", "piv", "bull", "hellip", "prime", "Prime", "oline", "frasl", "weierp", "image", "real", "trade", "alefsym", "larr", "uarr", "rarr", "darr", "harr", "crarr", "lArr", "uArr", "rArr", "dArr", "hArr", "forall", "part", "exist", "empty", "nabla", "isin", "notin", "ni", "prod", "sum", "minus", "lowast", "radic", "prop", "infin", "ang", "and", "or", "cap", "cup", "int", "there4", "sim", "cong", "asymp", "ne", "equiv", "le", "ge", "sub", "sup", "nsub", "sube", "supe", "oplus", "otimes", "perp", "sdot", "lceil", "rceil", "lfloor", "rfloor", "lang", "rang", "loz", "spades", "clubs", "hearts", "diams"], + n = [39, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 34, 38, 60, 62, 338, 339, 352, 353, 376, 710, 732, 8194, 8195, 8201, 8204, 8205, 8206, 8207, 8211, 8212, 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8240, 8249, 8250, 8364, 402, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 977, 978, 982, 8226, 8230, 8242, 8243, 8254, 8260, 8472, 8465, 8476, 8482, 8501, 8592, 8593, 8594, 8595, 8596, 8629, 8656, 8657, 8658, 8659, 8660, 8704, 8706, 8707, 8709, 8711, 8712, 8713, 8715, 8719, 8721, 8722, 8727, 8730, 8733, 8734, 8736, 8743, 8744, 8745, 8746, 8747, 8756, 8764, 8773, 8776, 8800, 8801, 8804, 8805, 8834, 8835, 8836, 8838, 8839, 8853, 8855, 8869, 8901, 8968, 8969, 8970, 8971, 9001, 9002, 9674, 9824, 9827, 9829, 9830], + s = {}, + o = {}; + ! function() { + for (var e = 0, t = a.length; e < t;) { + var r = a[e], + i = n[e]; + s[r] = String.fromCharCode(i), o[i] = r, e++ + } + }(); + var c = function() { + function e() {} + return e.prototype.decode = function(e) { + return e && e.length ? e.replace(/&(#?[\w\d]+);?/g, (function(e, t) { + var r; + if ("#" === t.charAt(0)) { + var a = "x" === t.charAt(1).toLowerCase() ? parseInt(t.substr(2), 16) : parseInt(t.substr(1)); + (!isNaN(a) || a >= -32768) && (r = a <= 65535 ? String.fromCharCode(a) : i.fromCodePoint(a)) + } else r = s[t]; + return r || e + })) : "" + }, e.decode = function(t) { + return (new e).decode(t) + }, e.prototype.encode = function(e) { + if (!e || !e.length) return ""; + for (var t = e.length, r = "", i = 0; i < t;) { + var a = o[e.charCodeAt(i)]; + r += a ? "&" + a + ";" : e.charAt(i), i++ + } + return r + }, e.encode = function(t) { + return (new e).encode(t) + }, e.prototype.encodeNonUTF = function(e) { + if (!e || !e.length) return ""; + for (var t = e.length, r = "", a = 0; a < t;) { + var n = e.charCodeAt(a), + s = o[n]; + s ? r += "&" + s + ";" : n < 32 || n > 126 ? n >= i.highSurrogateFrom && n <= i.highSurrogateTo ? (r += "&#" + i.getCodePoint(e, a) + ";", a++) : r += "&#" + n + ";" : r += e.charAt(a), a++ + } + return r + }, e.encodeNonUTF = function(t) { + return (new e).encodeNonUTF(t) + }, e.prototype.encodeNonASCII = function(e) { + if (!e || !e.length) return ""; + for (var t = e.length, r = "", a = 0; a < t;) { + var n = e.charCodeAt(a); + n <= 255 ? r += e[a++] : (n >= i.highSurrogateFrom && n <= i.highSurrogateTo ? (r += "&#" + i.getCodePoint(e, a) + ";", a++) : r += "&#" + n + ";", a++) + } + return r + }, e.encodeNonASCII = function(t) { + return (new e).encodeNonASCII(t) + }, e + }(); + t.Html4Entities = c +}, function(e, t, r) { + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }); + var i = r(16), + a = [ + ["Aacute", [193]], + ["aacute", [225]], + ["Abreve", [258]], + ["abreve", [259]], + ["ac", [8766]], + ["acd", [8767]], + ["acE", [8766, 819]], + ["Acirc", [194]], + ["acirc", [226]], + ["acute", [180]], + ["Acy", [1040]], + ["acy", [1072]], + ["AElig", [198]], + ["aelig", [230]], + ["af", [8289]], + ["Afr", [120068]], + ["afr", [120094]], + ["Agrave", [192]], + ["agrave", [224]], + ["alefsym", [8501]], + ["aleph", [8501]], + ["Alpha", [913]], + ["alpha", [945]], + ["Amacr", [256]], + ["amacr", [257]], + ["amalg", [10815]], + ["amp", [38]], + ["AMP", [38]], + ["andand", [10837]], + ["And", [10835]], + ["and", [8743]], + ["andd", [10844]], + ["andslope", [10840]], + ["andv", [10842]], + ["ang", [8736]], + ["ange", [10660]], + ["angle", [8736]], + ["angmsdaa", [10664]], + ["angmsdab", [10665]], + ["angmsdac", [10666]], + ["angmsdad", [10667]], + ["angmsdae", [10668]], + ["angmsdaf", [10669]], + ["angmsdag", [10670]], + ["angmsdah", [10671]], + ["angmsd", [8737]], + ["angrt", [8735]], + ["angrtvb", [8894]], + ["angrtvbd", [10653]], + ["angsph", [8738]], + ["angst", [197]], + ["angzarr", [9084]], + ["Aogon", [260]], + ["aogon", [261]], + ["Aopf", [120120]], + ["aopf", [120146]], + ["apacir", [10863]], + ["ap", [8776]], + ["apE", [10864]], + ["ape", [8778]], + ["apid", [8779]], + ["apos", [39]], + ["ApplyFunction", [8289]], + ["approx", [8776]], + ["approxeq", [8778]], + ["Aring", [197]], + ["aring", [229]], + ["Ascr", [119964]], + ["ascr", [119990]], + ["Assign", [8788]], + ["ast", [42]], + ["asymp", [8776]], + ["asympeq", [8781]], + ["Atilde", [195]], + ["atilde", [227]], + ["Auml", [196]], + ["auml", [228]], + ["awconint", [8755]], + ["awint", [10769]], + ["backcong", [8780]], + ["backepsilon", [1014]], + ["backprime", [8245]], + ["backsim", [8765]], + ["backsimeq", [8909]], + ["Backslash", [8726]], + ["Barv", [10983]], + ["barvee", [8893]], + ["barwed", [8965]], + ["Barwed", [8966]], + ["barwedge", [8965]], + ["bbrk", [9141]], + ["bbrktbrk", [9142]], + ["bcong", [8780]], + ["Bcy", [1041]], + ["bcy", [1073]], + ["bdquo", [8222]], + ["becaus", [8757]], + ["because", [8757]], + ["Because", [8757]], + ["bemptyv", [10672]], + ["bepsi", [1014]], + ["bernou", [8492]], + ["Bernoullis", [8492]], + ["Beta", [914]], + ["beta", [946]], + ["beth", [8502]], + ["between", [8812]], + ["Bfr", [120069]], + ["bfr", [120095]], + ["bigcap", [8898]], + ["bigcirc", [9711]], + ["bigcup", [8899]], + ["bigodot", [10752]], + ["bigoplus", [10753]], + ["bigotimes", [10754]], + ["bigsqcup", [10758]], + ["bigstar", [9733]], + ["bigtriangledown", [9661]], + ["bigtriangleup", [9651]], + ["biguplus", [10756]], + ["bigvee", [8897]], + ["bigwedge", [8896]], + ["bkarow", [10509]], + ["blacklozenge", [10731]], + ["blacksquare", [9642]], + ["blacktriangle", [9652]], + ["blacktriangledown", [9662]], + ["blacktriangleleft", [9666]], + ["blacktriangleright", [9656]], + ["blank", [9251]], + ["blk12", [9618]], + ["blk14", [9617]], + ["blk34", [9619]], + ["block", [9608]], + ["bne", [61, 8421]], + ["bnequiv", [8801, 8421]], + ["bNot", [10989]], + ["bnot", [8976]], + ["Bopf", [120121]], + ["bopf", [120147]], + ["bot", [8869]], + ["bottom", [8869]], + ["bowtie", [8904]], + ["boxbox", [10697]], + ["boxdl", [9488]], + ["boxdL", [9557]], + ["boxDl", [9558]], + ["boxDL", [9559]], + ["boxdr", [9484]], + ["boxdR", [9554]], + ["boxDr", [9555]], + ["boxDR", [9556]], + ["boxh", [9472]], + ["boxH", [9552]], + ["boxhd", [9516]], + ["boxHd", [9572]], + ["boxhD", [9573]], + ["boxHD", [9574]], + ["boxhu", [9524]], + ["boxHu", [9575]], + ["boxhU", [9576]], + ["boxHU", [9577]], + ["boxminus", [8863]], + ["boxplus", [8862]], + ["boxtimes", [8864]], + ["boxul", [9496]], + ["boxuL", [9563]], + ["boxUl", [9564]], + ["boxUL", [9565]], + ["boxur", [9492]], + ["boxuR", [9560]], + ["boxUr", [9561]], + ["boxUR", [9562]], + ["boxv", [9474]], + ["boxV", [9553]], + ["boxvh", [9532]], + ["boxvH", [9578]], + ["boxVh", [9579]], + ["boxVH", [9580]], + ["boxvl", [9508]], + ["boxvL", [9569]], + ["boxVl", [9570]], + ["boxVL", [9571]], + ["boxvr", [9500]], + ["boxvR", [9566]], + ["boxVr", [9567]], + ["boxVR", [9568]], + ["bprime", [8245]], + ["breve", [728]], + ["Breve", [728]], + ["brvbar", [166]], + ["bscr", [119991]], + ["Bscr", [8492]], + ["bsemi", [8271]], + ["bsim", [8765]], + ["bsime", [8909]], + ["bsolb", [10693]], + ["bsol", [92]], + ["bsolhsub", [10184]], + ["bull", [8226]], + ["bullet", [8226]], + ["bump", [8782]], + ["bumpE", [10926]], + ["bumpe", [8783]], + ["Bumpeq", [8782]], + ["bumpeq", [8783]], + ["Cacute", [262]], + ["cacute", [263]], + ["capand", [10820]], + ["capbrcup", [10825]], + ["capcap", [10827]], + ["cap", [8745]], + ["Cap", [8914]], + ["capcup", [10823]], + ["capdot", [10816]], + ["CapitalDifferentialD", [8517]], + ["caps", [8745, 65024]], + ["caret", [8257]], + ["caron", [711]], + ["Cayleys", [8493]], + ["ccaps", [10829]], + ["Ccaron", [268]], + ["ccaron", [269]], + ["Ccedil", [199]], + ["ccedil", [231]], + ["Ccirc", [264]], + ["ccirc", [265]], + ["Cconint", [8752]], + ["ccups", [10828]], + ["ccupssm", [10832]], + ["Cdot", [266]], + ["cdot", [267]], + ["cedil", [184]], + ["Cedilla", [184]], + ["cemptyv", [10674]], + ["cent", [162]], + ["centerdot", [183]], + ["CenterDot", [183]], + ["cfr", [120096]], + ["Cfr", [8493]], + ["CHcy", [1063]], + ["chcy", [1095]], + ["check", [10003]], + ["checkmark", [10003]], + ["Chi", [935]], + ["chi", [967]], + ["circ", [710]], + ["circeq", [8791]], + ["circlearrowleft", [8634]], + ["circlearrowright", [8635]], + ["circledast", [8859]], + ["circledcirc", [8858]], + ["circleddash", [8861]], + ["CircleDot", [8857]], + ["circledR", [174]], + ["circledS", [9416]], + ["CircleMinus", [8854]], + ["CirclePlus", [8853]], + ["CircleTimes", [8855]], + ["cir", [9675]], + ["cirE", [10691]], + ["cire", [8791]], + ["cirfnint", [10768]], + ["cirmid", [10991]], + ["cirscir", [10690]], + ["ClockwiseContourIntegral", [8754]], + ["clubs", [9827]], + ["clubsuit", [9827]], + ["colon", [58]], + ["Colon", [8759]], + ["Colone", [10868]], + ["colone", [8788]], + ["coloneq", [8788]], + ["comma", [44]], + ["commat", [64]], + ["comp", [8705]], + ["compfn", [8728]], + ["complement", [8705]], + ["complexes", [8450]], + ["cong", [8773]], + ["congdot", [10861]], + ["Congruent", [8801]], + ["conint", [8750]], + ["Conint", [8751]], + ["ContourIntegral", [8750]], + ["copf", [120148]], + ["Copf", [8450]], + ["coprod", [8720]], + ["Coproduct", [8720]], + ["copy", [169]], + ["COPY", [169]], + ["copysr", [8471]], + ["CounterClockwiseContourIntegral", [8755]], + ["crarr", [8629]], + ["cross", [10007]], + ["Cross", [10799]], + ["Cscr", [119966]], + ["cscr", [119992]], + ["csub", [10959]], + ["csube", [10961]], + ["csup", [10960]], + ["csupe", [10962]], + ["ctdot", [8943]], + ["cudarrl", [10552]], + ["cudarrr", [10549]], + ["cuepr", [8926]], + ["cuesc", [8927]], + ["cularr", [8630]], + ["cularrp", [10557]], + ["cupbrcap", [10824]], + ["cupcap", [10822]], + ["CupCap", [8781]], + ["cup", [8746]], + ["Cup", [8915]], + ["cupcup", [10826]], + ["cupdot", [8845]], + ["cupor", [10821]], + ["cups", [8746, 65024]], + ["curarr", [8631]], + ["curarrm", [10556]], + ["curlyeqprec", [8926]], + ["curlyeqsucc", [8927]], + ["curlyvee", [8910]], + ["curlywedge", [8911]], + ["curren", [164]], + ["curvearrowleft", [8630]], + ["curvearrowright", [8631]], + ["cuvee", [8910]], + ["cuwed", [8911]], + ["cwconint", [8754]], + ["cwint", [8753]], + ["cylcty", [9005]], + ["dagger", [8224]], + ["Dagger", [8225]], + ["daleth", [8504]], + ["darr", [8595]], + ["Darr", [8609]], + ["dArr", [8659]], + ["dash", [8208]], + ["Dashv", [10980]], + ["dashv", [8867]], + ["dbkarow", [10511]], + ["dblac", [733]], + ["Dcaron", [270]], + ["dcaron", [271]], + ["Dcy", [1044]], + ["dcy", [1076]], + ["ddagger", [8225]], + ["ddarr", [8650]], + ["DD", [8517]], + ["dd", [8518]], + ["DDotrahd", [10513]], + ["ddotseq", [10871]], + ["deg", [176]], + ["Del", [8711]], + ["Delta", [916]], + ["delta", [948]], + ["demptyv", [10673]], + ["dfisht", [10623]], + ["Dfr", [120071]], + ["dfr", [120097]], + ["dHar", [10597]], + ["dharl", [8643]], + ["dharr", [8642]], + ["DiacriticalAcute", [180]], + ["DiacriticalDot", [729]], + ["DiacriticalDoubleAcute", [733]], + ["DiacriticalGrave", [96]], + ["DiacriticalTilde", [732]], + ["diam", [8900]], + ["diamond", [8900]], + ["Diamond", [8900]], + ["diamondsuit", [9830]], + ["diams", [9830]], + ["die", [168]], + ["DifferentialD", [8518]], + ["digamma", [989]], + ["disin", [8946]], + ["div", [247]], + ["divide", [247]], + ["divideontimes", [8903]], + ["divonx", [8903]], + ["DJcy", [1026]], + ["djcy", [1106]], + ["dlcorn", [8990]], + ["dlcrop", [8973]], + ["dollar", [36]], + ["Dopf", [120123]], + ["dopf", [120149]], + ["Dot", [168]], + ["dot", [729]], + ["DotDot", [8412]], + ["doteq", [8784]], + ["doteqdot", [8785]], + ["DotEqual", [8784]], + ["dotminus", [8760]], + ["dotplus", [8724]], + ["dotsquare", [8865]], + ["doublebarwedge", [8966]], + ["DoubleContourIntegral", [8751]], + ["DoubleDot", [168]], + ["DoubleDownArrow", [8659]], + ["DoubleLeftArrow", [8656]], + ["DoubleLeftRightArrow", [8660]], + ["DoubleLeftTee", [10980]], + ["DoubleLongLeftArrow", [10232]], + ["DoubleLongLeftRightArrow", [10234]], + ["DoubleLongRightArrow", [10233]], + ["DoubleRightArrow", [8658]], + ["DoubleRightTee", [8872]], + ["DoubleUpArrow", [8657]], + ["DoubleUpDownArrow", [8661]], + ["DoubleVerticalBar", [8741]], + ["DownArrowBar", [10515]], + ["downarrow", [8595]], + ["DownArrow", [8595]], + ["Downarrow", [8659]], + ["DownArrowUpArrow", [8693]], + ["DownBreve", [785]], + ["downdownarrows", [8650]], + ["downharpoonleft", [8643]], + ["downharpoonright", [8642]], + ["DownLeftRightVector", [10576]], + ["DownLeftTeeVector", [10590]], + ["DownLeftVectorBar", [10582]], + ["DownLeftVector", [8637]], + ["DownRightTeeVector", [10591]], + ["DownRightVectorBar", [10583]], + ["DownRightVector", [8641]], + ["DownTeeArrow", [8615]], + ["DownTee", [8868]], + ["drbkarow", [10512]], + ["drcorn", [8991]], + ["drcrop", [8972]], + ["Dscr", [119967]], + ["dscr", [119993]], + ["DScy", [1029]], + ["dscy", [1109]], + ["dsol", [10742]], + ["Dstrok", [272]], + ["dstrok", [273]], + ["dtdot", [8945]], + ["dtri", [9663]], + ["dtrif", [9662]], + ["duarr", [8693]], + ["duhar", [10607]], + ["dwangle", [10662]], + ["DZcy", [1039]], + ["dzcy", [1119]], + ["dzigrarr", [10239]], + ["Eacute", [201]], + ["eacute", [233]], + ["easter", [10862]], + ["Ecaron", [282]], + ["ecaron", [283]], + ["Ecirc", [202]], + ["ecirc", [234]], + ["ecir", [8790]], + ["ecolon", [8789]], + ["Ecy", [1069]], + ["ecy", [1101]], + ["eDDot", [10871]], + ["Edot", [278]], + ["edot", [279]], + ["eDot", [8785]], + ["ee", [8519]], + ["efDot", [8786]], + ["Efr", [120072]], + ["efr", [120098]], + ["eg", [10906]], + ["Egrave", [200]], + ["egrave", [232]], + ["egs", [10902]], + ["egsdot", [10904]], + ["el", [10905]], + ["Element", [8712]], + ["elinters", [9191]], + ["ell", [8467]], + ["els", [10901]], + ["elsdot", [10903]], + ["Emacr", [274]], + ["emacr", [275]], + ["empty", [8709]], + ["emptyset", [8709]], + ["EmptySmallSquare", [9723]], + ["emptyv", [8709]], + ["EmptyVerySmallSquare", [9643]], + ["emsp13", [8196]], + ["emsp14", [8197]], + ["emsp", [8195]], + ["ENG", [330]], + ["eng", [331]], + ["ensp", [8194]], + ["Eogon", [280]], + ["eogon", [281]], + ["Eopf", [120124]], + ["eopf", [120150]], + ["epar", [8917]], + ["eparsl", [10723]], + ["eplus", [10865]], + ["epsi", [949]], + ["Epsilon", [917]], + ["epsilon", [949]], + ["epsiv", [1013]], + ["eqcirc", [8790]], + ["eqcolon", [8789]], + ["eqsim", [8770]], + ["eqslantgtr", [10902]], + ["eqslantless", [10901]], + ["Equal", [10869]], + ["equals", [61]], + ["EqualTilde", [8770]], + ["equest", [8799]], + ["Equilibrium", [8652]], + ["equiv", [8801]], + ["equivDD", [10872]], + ["eqvparsl", [10725]], + ["erarr", [10609]], + ["erDot", [8787]], + ["escr", [8495]], + ["Escr", [8496]], + ["esdot", [8784]], + ["Esim", [10867]], + ["esim", [8770]], + ["Eta", [919]], + ["eta", [951]], + ["ETH", [208]], + ["eth", [240]], + ["Euml", [203]], + ["euml", [235]], + ["euro", [8364]], + ["excl", [33]], + ["exist", [8707]], + ["Exists", [8707]], + ["expectation", [8496]], + ["exponentiale", [8519]], + ["ExponentialE", [8519]], + ["fallingdotseq", [8786]], + ["Fcy", [1060]], + ["fcy", [1092]], + ["female", [9792]], + ["ffilig", [64259]], + ["fflig", [64256]], + ["ffllig", [64260]], + ["Ffr", [120073]], + ["ffr", [120099]], + ["filig", [64257]], + ["FilledSmallSquare", [9724]], + ["FilledVerySmallSquare", [9642]], + ["fjlig", [102, 106]], + ["flat", [9837]], + ["fllig", [64258]], + ["fltns", [9649]], + ["fnof", [402]], + ["Fopf", [120125]], + ["fopf", [120151]], + ["forall", [8704]], + ["ForAll", [8704]], + ["fork", [8916]], + ["forkv", [10969]], + ["Fouriertrf", [8497]], + ["fpartint", [10765]], + ["frac12", [189]], + ["frac13", [8531]], + ["frac14", [188]], + ["frac15", [8533]], + ["frac16", [8537]], + ["frac18", [8539]], + ["frac23", [8532]], + ["frac25", [8534]], + ["frac34", [190]], + ["frac35", [8535]], + ["frac38", [8540]], + ["frac45", [8536]], + ["frac56", [8538]], + ["frac58", [8541]], + ["frac78", [8542]], + ["frasl", [8260]], + ["frown", [8994]], + ["fscr", [119995]], + ["Fscr", [8497]], + ["gacute", [501]], + ["Gamma", [915]], + ["gamma", [947]], + ["Gammad", [988]], + ["gammad", [989]], + ["gap", [10886]], + ["Gbreve", [286]], + ["gbreve", [287]], + ["Gcedil", [290]], + ["Gcirc", [284]], + ["gcirc", [285]], + ["Gcy", [1043]], + ["gcy", [1075]], + ["Gdot", [288]], + ["gdot", [289]], + ["ge", [8805]], + ["gE", [8807]], + ["gEl", [10892]], + ["gel", [8923]], + ["geq", [8805]], + ["geqq", [8807]], + ["geqslant", [10878]], + ["gescc", [10921]], + ["ges", [10878]], + ["gesdot", [10880]], + ["gesdoto", [10882]], + ["gesdotol", [10884]], + ["gesl", [8923, 65024]], + ["gesles", [10900]], + ["Gfr", [120074]], + ["gfr", [120100]], + ["gg", [8811]], + ["Gg", [8921]], + ["ggg", [8921]], + ["gimel", [8503]], + ["GJcy", [1027]], + ["gjcy", [1107]], + ["gla", [10917]], + ["gl", [8823]], + ["glE", [10898]], + ["glj", [10916]], + ["gnap", [10890]], + ["gnapprox", [10890]], + ["gne", [10888]], + ["gnE", [8809]], + ["gneq", [10888]], + ["gneqq", [8809]], + ["gnsim", [8935]], + ["Gopf", [120126]], + ["gopf", [120152]], + ["grave", [96]], + ["GreaterEqual", [8805]], + ["GreaterEqualLess", [8923]], + ["GreaterFullEqual", [8807]], + ["GreaterGreater", [10914]], + ["GreaterLess", [8823]], + ["GreaterSlantEqual", [10878]], + ["GreaterTilde", [8819]], + ["Gscr", [119970]], + ["gscr", [8458]], + ["gsim", [8819]], + ["gsime", [10894]], + ["gsiml", [10896]], + ["gtcc", [10919]], + ["gtcir", [10874]], + ["gt", [62]], + ["GT", [62]], + ["Gt", [8811]], + ["gtdot", [8919]], + ["gtlPar", [10645]], + ["gtquest", [10876]], + ["gtrapprox", [10886]], + ["gtrarr", [10616]], + ["gtrdot", [8919]], + ["gtreqless", [8923]], + ["gtreqqless", [10892]], + ["gtrless", [8823]], + ["gtrsim", [8819]], + ["gvertneqq", [8809, 65024]], + ["gvnE", [8809, 65024]], + ["Hacek", [711]], + ["hairsp", [8202]], + ["half", [189]], + ["hamilt", [8459]], + ["HARDcy", [1066]], + ["hardcy", [1098]], + ["harrcir", [10568]], + ["harr", [8596]], + ["hArr", [8660]], + ["harrw", [8621]], + ["Hat", [94]], + ["hbar", [8463]], + ["Hcirc", [292]], + ["hcirc", [293]], + ["hearts", [9829]], + ["heartsuit", [9829]], + ["hellip", [8230]], + ["hercon", [8889]], + ["hfr", [120101]], + ["Hfr", [8460]], + ["HilbertSpace", [8459]], + ["hksearow", [10533]], + ["hkswarow", [10534]], + ["hoarr", [8703]], + ["homtht", [8763]], + ["hookleftarrow", [8617]], + ["hookrightarrow", [8618]], + ["hopf", [120153]], + ["Hopf", [8461]], + ["horbar", [8213]], + ["HorizontalLine", [9472]], + ["hscr", [119997]], + ["Hscr", [8459]], + ["hslash", [8463]], + ["Hstrok", [294]], + ["hstrok", [295]], + ["HumpDownHump", [8782]], + ["HumpEqual", [8783]], + ["hybull", [8259]], + ["hyphen", [8208]], + ["Iacute", [205]], + ["iacute", [237]], + ["ic", [8291]], + ["Icirc", [206]], + ["icirc", [238]], + ["Icy", [1048]], + ["icy", [1080]], + ["Idot", [304]], + ["IEcy", [1045]], + ["iecy", [1077]], + ["iexcl", [161]], + ["iff", [8660]], + ["ifr", [120102]], + ["Ifr", [8465]], + ["Igrave", [204]], + ["igrave", [236]], + ["ii", [8520]], + ["iiiint", [10764]], + ["iiint", [8749]], + ["iinfin", [10716]], + ["iiota", [8489]], + ["IJlig", [306]], + ["ijlig", [307]], + ["Imacr", [298]], + ["imacr", [299]], + ["image", [8465]], + ["ImaginaryI", [8520]], + ["imagline", [8464]], + ["imagpart", [8465]], + ["imath", [305]], + ["Im", [8465]], + ["imof", [8887]], + ["imped", [437]], + ["Implies", [8658]], + ["incare", [8453]], + ["in", [8712]], + ["infin", [8734]], + ["infintie", [10717]], + ["inodot", [305]], + ["intcal", [8890]], + ["int", [8747]], + ["Int", [8748]], + ["integers", [8484]], + ["Integral", [8747]], + ["intercal", [8890]], + ["Intersection", [8898]], + ["intlarhk", [10775]], + ["intprod", [10812]], + ["InvisibleComma", [8291]], + ["InvisibleTimes", [8290]], + ["IOcy", [1025]], + ["iocy", [1105]], + ["Iogon", [302]], + ["iogon", [303]], + ["Iopf", [120128]], + ["iopf", [120154]], + ["Iota", [921]], + ["iota", [953]], + ["iprod", [10812]], + ["iquest", [191]], + ["iscr", [119998]], + ["Iscr", [8464]], + ["isin", [8712]], + ["isindot", [8949]], + ["isinE", [8953]], + ["isins", [8948]], + ["isinsv", [8947]], + ["isinv", [8712]], + ["it", [8290]], + ["Itilde", [296]], + ["itilde", [297]], + ["Iukcy", [1030]], + ["iukcy", [1110]], + ["Iuml", [207]], + ["iuml", [239]], + ["Jcirc", [308]], + ["jcirc", [309]], + ["Jcy", [1049]], + ["jcy", [1081]], + ["Jfr", [120077]], + ["jfr", [120103]], + ["jmath", [567]], + ["Jopf", [120129]], + ["jopf", [120155]], + ["Jscr", [119973]], + ["jscr", [119999]], + ["Jsercy", [1032]], + ["jsercy", [1112]], + ["Jukcy", [1028]], + ["jukcy", [1108]], + ["Kappa", [922]], + ["kappa", [954]], + ["kappav", [1008]], + ["Kcedil", [310]], + ["kcedil", [311]], + ["Kcy", [1050]], + ["kcy", [1082]], + ["Kfr", [120078]], + ["kfr", [120104]], + ["kgreen", [312]], + ["KHcy", [1061]], + ["khcy", [1093]], + ["KJcy", [1036]], + ["kjcy", [1116]], + ["Kopf", [120130]], + ["kopf", [120156]], + ["Kscr", [119974]], + ["kscr", [12e4]], + ["lAarr", [8666]], + ["Lacute", [313]], + ["lacute", [314]], + ["laemptyv", [10676]], + ["lagran", [8466]], + ["Lambda", [923]], + ["lambda", [955]], + ["lang", [10216]], + ["Lang", [10218]], + ["langd", [10641]], + ["langle", [10216]], + ["lap", [10885]], + ["Laplacetrf", [8466]], + ["laquo", [171]], + ["larrb", [8676]], + ["larrbfs", [10527]], + ["larr", [8592]], + ["Larr", [8606]], + ["lArr", [8656]], + ["larrfs", [10525]], + ["larrhk", [8617]], + ["larrlp", [8619]], + ["larrpl", [10553]], + ["larrsim", [10611]], + ["larrtl", [8610]], + ["latail", [10521]], + ["lAtail", [10523]], + ["lat", [10923]], + ["late", [10925]], + ["lates", [10925, 65024]], + ["lbarr", [10508]], + ["lBarr", [10510]], + ["lbbrk", [10098]], + ["lbrace", [123]], + ["lbrack", [91]], + ["lbrke", [10635]], + ["lbrksld", [10639]], + ["lbrkslu", [10637]], + ["Lcaron", [317]], + ["lcaron", [318]], + ["Lcedil", [315]], + ["lcedil", [316]], + ["lceil", [8968]], + ["lcub", [123]], + ["Lcy", [1051]], + ["lcy", [1083]], + ["ldca", [10550]], + ["ldquo", [8220]], + ["ldquor", [8222]], + ["ldrdhar", [10599]], + ["ldrushar", [10571]], + ["ldsh", [8626]], + ["le", [8804]], + ["lE", [8806]], + ["LeftAngleBracket", [10216]], + ["LeftArrowBar", [8676]], + ["leftarrow", [8592]], + ["LeftArrow", [8592]], + ["Leftarrow", [8656]], + ["LeftArrowRightArrow", [8646]], + ["leftarrowtail", [8610]], + ["LeftCeiling", [8968]], + ["LeftDoubleBracket", [10214]], + ["LeftDownTeeVector", [10593]], + ["LeftDownVectorBar", [10585]], + ["LeftDownVector", [8643]], + ["LeftFloor", [8970]], + ["leftharpoondown", [8637]], + ["leftharpoonup", [8636]], + ["leftleftarrows", [8647]], + ["leftrightarrow", [8596]], + ["LeftRightArrow", [8596]], + ["Leftrightarrow", [8660]], + ["leftrightarrows", [8646]], + ["leftrightharpoons", [8651]], + ["leftrightsquigarrow", [8621]], + ["LeftRightVector", [10574]], + ["LeftTeeArrow", [8612]], + ["LeftTee", [8867]], + ["LeftTeeVector", [10586]], + ["leftthreetimes", [8907]], + ["LeftTriangleBar", [10703]], + ["LeftTriangle", [8882]], + ["LeftTriangleEqual", [8884]], + ["LeftUpDownVector", [10577]], + ["LeftUpTeeVector", [10592]], + ["LeftUpVectorBar", [10584]], + ["LeftUpVector", [8639]], + ["LeftVectorBar", [10578]], + ["LeftVector", [8636]], + ["lEg", [10891]], + ["leg", [8922]], + ["leq", [8804]], + ["leqq", [8806]], + ["leqslant", [10877]], + ["lescc", [10920]], + ["les", [10877]], + ["lesdot", [10879]], + ["lesdoto", [10881]], + ["lesdotor", [10883]], + ["lesg", [8922, 65024]], + ["lesges", [10899]], + ["lessapprox", [10885]], + ["lessdot", [8918]], + ["lesseqgtr", [8922]], + ["lesseqqgtr", [10891]], + ["LessEqualGreater", [8922]], + ["LessFullEqual", [8806]], + ["LessGreater", [8822]], + ["lessgtr", [8822]], + ["LessLess", [10913]], + ["lesssim", [8818]], + ["LessSlantEqual", [10877]], + ["LessTilde", [8818]], + ["lfisht", [10620]], + ["lfloor", [8970]], + ["Lfr", [120079]], + ["lfr", [120105]], + ["lg", [8822]], + ["lgE", [10897]], + ["lHar", [10594]], + ["lhard", [8637]], + ["lharu", [8636]], + ["lharul", [10602]], + ["lhblk", [9604]], + ["LJcy", [1033]], + ["ljcy", [1113]], + ["llarr", [8647]], + ["ll", [8810]], + ["Ll", [8920]], + ["llcorner", [8990]], + ["Lleftarrow", [8666]], + ["llhard", [10603]], + ["lltri", [9722]], + ["Lmidot", [319]], + ["lmidot", [320]], + ["lmoustache", [9136]], + ["lmoust", [9136]], + ["lnap", [10889]], + ["lnapprox", [10889]], + ["lne", [10887]], + ["lnE", [8808]], + ["lneq", [10887]], + ["lneqq", [8808]], + ["lnsim", [8934]], + ["loang", [10220]], + ["loarr", [8701]], + ["lobrk", [10214]], + ["longleftarrow", [10229]], + ["LongLeftArrow", [10229]], + ["Longleftarrow", [10232]], + ["longleftrightarrow", [10231]], + ["LongLeftRightArrow", [10231]], + ["Longleftrightarrow", [10234]], + ["longmapsto", [10236]], + ["longrightarrow", [10230]], + ["LongRightArrow", [10230]], + ["Longrightarrow", [10233]], + ["looparrowleft", [8619]], + ["looparrowright", [8620]], + ["lopar", [10629]], + ["Lopf", [120131]], + ["lopf", [120157]], + ["loplus", [10797]], + ["lotimes", [10804]], + ["lowast", [8727]], + ["lowbar", [95]], + ["LowerLeftArrow", [8601]], + ["LowerRightArrow", [8600]], + ["loz", [9674]], + ["lozenge", [9674]], + ["lozf", [10731]], + ["lpar", [40]], + ["lparlt", [10643]], + ["lrarr", [8646]], + ["lrcorner", [8991]], + ["lrhar", [8651]], + ["lrhard", [10605]], + ["lrm", [8206]], + ["lrtri", [8895]], + ["lsaquo", [8249]], + ["lscr", [120001]], + ["Lscr", [8466]], + ["lsh", [8624]], + ["Lsh", [8624]], + ["lsim", [8818]], + ["lsime", [10893]], + ["lsimg", [10895]], + ["lsqb", [91]], + ["lsquo", [8216]], + ["lsquor", [8218]], + ["Lstrok", [321]], + ["lstrok", [322]], + ["ltcc", [10918]], + ["ltcir", [10873]], + ["lt", [60]], + ["LT", [60]], + ["Lt", [8810]], + ["ltdot", [8918]], + ["lthree", [8907]], + ["ltimes", [8905]], + ["ltlarr", [10614]], + ["ltquest", [10875]], + ["ltri", [9667]], + ["ltrie", [8884]], + ["ltrif", [9666]], + ["ltrPar", [10646]], + ["lurdshar", [10570]], + ["luruhar", [10598]], + ["lvertneqq", [8808, 65024]], + ["lvnE", [8808, 65024]], + ["macr", [175]], + ["male", [9794]], + ["malt", [10016]], + ["maltese", [10016]], + ["Map", [10501]], + ["map", [8614]], + ["mapsto", [8614]], + ["mapstodown", [8615]], + ["mapstoleft", [8612]], + ["mapstoup", [8613]], + ["marker", [9646]], + ["mcomma", [10793]], + ["Mcy", [1052]], + ["mcy", [1084]], + ["mdash", [8212]], + ["mDDot", [8762]], + ["measuredangle", [8737]], + ["MediumSpace", [8287]], + ["Mellintrf", [8499]], + ["Mfr", [120080]], + ["mfr", [120106]], + ["mho", [8487]], + ["micro", [181]], + ["midast", [42]], + ["midcir", [10992]], + ["mid", [8739]], + ["middot", [183]], + ["minusb", [8863]], + ["minus", [8722]], + ["minusd", [8760]], + ["minusdu", [10794]], + ["MinusPlus", [8723]], + ["mlcp", [10971]], + ["mldr", [8230]], + ["mnplus", [8723]], + ["models", [8871]], + ["Mopf", [120132]], + ["mopf", [120158]], + ["mp", [8723]], + ["mscr", [120002]], + ["Mscr", [8499]], + ["mstpos", [8766]], + ["Mu", [924]], + ["mu", [956]], + ["multimap", [8888]], + ["mumap", [8888]], + ["nabla", [8711]], + ["Nacute", [323]], + ["nacute", [324]], + ["nang", [8736, 8402]], + ["nap", [8777]], + ["napE", [10864, 824]], + ["napid", [8779, 824]], + ["napos", [329]], + ["napprox", [8777]], + ["natural", [9838]], + ["naturals", [8469]], + ["natur", [9838]], + ["nbsp", [160]], + ["nbump", [8782, 824]], + ["nbumpe", [8783, 824]], + ["ncap", [10819]], + ["Ncaron", [327]], + ["ncaron", [328]], + ["Ncedil", [325]], + ["ncedil", [326]], + ["ncong", [8775]], + ["ncongdot", [10861, 824]], + ["ncup", [10818]], + ["Ncy", [1053]], + ["ncy", [1085]], + ["ndash", [8211]], + ["nearhk", [10532]], + ["nearr", [8599]], + ["neArr", [8663]], + ["nearrow", [8599]], + ["ne", [8800]], + ["nedot", [8784, 824]], + ["NegativeMediumSpace", [8203]], + ["NegativeThickSpace", [8203]], + ["NegativeThinSpace", [8203]], + ["NegativeVeryThinSpace", [8203]], + ["nequiv", [8802]], + ["nesear", [10536]], + ["nesim", [8770, 824]], + ["NestedGreaterGreater", [8811]], + ["NestedLessLess", [8810]], + ["nexist", [8708]], + ["nexists", [8708]], + ["Nfr", [120081]], + ["nfr", [120107]], + ["ngE", [8807, 824]], + ["nge", [8817]], + ["ngeq", [8817]], + ["ngeqq", [8807, 824]], + ["ngeqslant", [10878, 824]], + ["nges", [10878, 824]], + ["nGg", [8921, 824]], + ["ngsim", [8821]], + ["nGt", [8811, 8402]], + ["ngt", [8815]], + ["ngtr", [8815]], + ["nGtv", [8811, 824]], + ["nharr", [8622]], + ["nhArr", [8654]], + ["nhpar", [10994]], + ["ni", [8715]], + ["nis", [8956]], + ["nisd", [8954]], + ["niv", [8715]], + ["NJcy", [1034]], + ["njcy", [1114]], + ["nlarr", [8602]], + ["nlArr", [8653]], + ["nldr", [8229]], + ["nlE", [8806, 824]], + ["nle", [8816]], + ["nleftarrow", [8602]], + ["nLeftarrow", [8653]], + ["nleftrightarrow", [8622]], + ["nLeftrightarrow", [8654]], + ["nleq", [8816]], + ["nleqq", [8806, 824]], + ["nleqslant", [10877, 824]], + ["nles", [10877, 824]], + ["nless", [8814]], + ["nLl", [8920, 824]], + ["nlsim", [8820]], + ["nLt", [8810, 8402]], + ["nlt", [8814]], + ["nltri", [8938]], + ["nltrie", [8940]], + ["nLtv", [8810, 824]], + ["nmid", [8740]], + ["NoBreak", [8288]], + ["NonBreakingSpace", [160]], + ["nopf", [120159]], + ["Nopf", [8469]], + ["Not", [10988]], + ["not", [172]], + ["NotCongruent", [8802]], + ["NotCupCap", [8813]], + ["NotDoubleVerticalBar", [8742]], + ["NotElement", [8713]], + ["NotEqual", [8800]], + ["NotEqualTilde", [8770, 824]], + ["NotExists", [8708]], + ["NotGreater", [8815]], + ["NotGreaterEqual", [8817]], + ["NotGreaterFullEqual", [8807, 824]], + ["NotGreaterGreater", [8811, 824]], + ["NotGreaterLess", [8825]], + ["NotGreaterSlantEqual", [10878, 824]], + ["NotGreaterTilde", [8821]], + ["NotHumpDownHump", [8782, 824]], + ["NotHumpEqual", [8783, 824]], + ["notin", [8713]], + ["notindot", [8949, 824]], + ["notinE", [8953, 824]], + ["notinva", [8713]], + ["notinvb", [8951]], + ["notinvc", [8950]], + ["NotLeftTriangleBar", [10703, 824]], + ["NotLeftTriangle", [8938]], + ["NotLeftTriangleEqual", [8940]], + ["NotLess", [8814]], + ["NotLessEqual", [8816]], + ["NotLessGreater", [8824]], + ["NotLessLess", [8810, 824]], + ["NotLessSlantEqual", [10877, 824]], + ["NotLessTilde", [8820]], + ["NotNestedGreaterGreater", [10914, 824]], + ["NotNestedLessLess", [10913, 824]], + ["notni", [8716]], + ["notniva", [8716]], + ["notnivb", [8958]], + ["notnivc", [8957]], + ["NotPrecedes", [8832]], + ["NotPrecedesEqual", [10927, 824]], + ["NotPrecedesSlantEqual", [8928]], + ["NotReverseElement", [8716]], + ["NotRightTriangleBar", [10704, 824]], + ["NotRightTriangle", [8939]], + ["NotRightTriangleEqual", [8941]], + ["NotSquareSubset", [8847, 824]], + ["NotSquareSubsetEqual", [8930]], + ["NotSquareSuperset", [8848, 824]], + ["NotSquareSupersetEqual", [8931]], + ["NotSubset", [8834, 8402]], + ["NotSubsetEqual", [8840]], + ["NotSucceeds", [8833]], + ["NotSucceedsEqual", [10928, 824]], + ["NotSucceedsSlantEqual", [8929]], + ["NotSucceedsTilde", [8831, 824]], + ["NotSuperset", [8835, 8402]], + ["NotSupersetEqual", [8841]], + ["NotTilde", [8769]], + ["NotTildeEqual", [8772]], + ["NotTildeFullEqual", [8775]], + ["NotTildeTilde", [8777]], + ["NotVerticalBar", [8740]], + ["nparallel", [8742]], + ["npar", [8742]], + ["nparsl", [11005, 8421]], + ["npart", [8706, 824]], + ["npolint", [10772]], + ["npr", [8832]], + ["nprcue", [8928]], + ["nprec", [8832]], + ["npreceq", [10927, 824]], + ["npre", [10927, 824]], + ["nrarrc", [10547, 824]], + ["nrarr", [8603]], + ["nrArr", [8655]], + ["nrarrw", [8605, 824]], + ["nrightarrow", [8603]], + ["nRightarrow", [8655]], + ["nrtri", [8939]], + ["nrtrie", [8941]], + ["nsc", [8833]], + ["nsccue", [8929]], + ["nsce", [10928, 824]], + ["Nscr", [119977]], + ["nscr", [120003]], + ["nshortmid", [8740]], + ["nshortparallel", [8742]], + ["nsim", [8769]], + ["nsime", [8772]], + ["nsimeq", [8772]], + ["nsmid", [8740]], + ["nspar", [8742]], + ["nsqsube", [8930]], + ["nsqsupe", [8931]], + ["nsub", [8836]], + ["nsubE", [10949, 824]], + ["nsube", [8840]], + ["nsubset", [8834, 8402]], + ["nsubseteq", [8840]], + ["nsubseteqq", [10949, 824]], + ["nsucc", [8833]], + ["nsucceq", [10928, 824]], + ["nsup", [8837]], + ["nsupE", [10950, 824]], + ["nsupe", [8841]], + ["nsupset", [8835, 8402]], + ["nsupseteq", [8841]], + ["nsupseteqq", [10950, 824]], + ["ntgl", [8825]], + ["Ntilde", [209]], + ["ntilde", [241]], + ["ntlg", [8824]], + ["ntriangleleft", [8938]], + ["ntrianglelefteq", [8940]], + ["ntriangleright", [8939]], + ["ntrianglerighteq", [8941]], + ["Nu", [925]], + ["nu", [957]], + ["num", [35]], + ["numero", [8470]], + ["numsp", [8199]], + ["nvap", [8781, 8402]], + ["nvdash", [8876]], + ["nvDash", [8877]], + ["nVdash", [8878]], + ["nVDash", [8879]], + ["nvge", [8805, 8402]], + ["nvgt", [62, 8402]], + ["nvHarr", [10500]], + ["nvinfin", [10718]], + ["nvlArr", [10498]], + ["nvle", [8804, 8402]], + ["nvlt", [60, 8402]], + ["nvltrie", [8884, 8402]], + ["nvrArr", [10499]], + ["nvrtrie", [8885, 8402]], + ["nvsim", [8764, 8402]], + ["nwarhk", [10531]], + ["nwarr", [8598]], + ["nwArr", [8662]], + ["nwarrow", [8598]], + ["nwnear", [10535]], + ["Oacute", [211]], + ["oacute", [243]], + ["oast", [8859]], + ["Ocirc", [212]], + ["ocirc", [244]], + ["ocir", [8858]], + ["Ocy", [1054]], + ["ocy", [1086]], + ["odash", [8861]], + ["Odblac", [336]], + ["odblac", [337]], + ["odiv", [10808]], + ["odot", [8857]], + ["odsold", [10684]], + ["OElig", [338]], + ["oelig", [339]], + ["ofcir", [10687]], + ["Ofr", [120082]], + ["ofr", [120108]], + ["ogon", [731]], + ["Ograve", [210]], + ["ograve", [242]], + ["ogt", [10689]], + ["ohbar", [10677]], + ["ohm", [937]], + ["oint", [8750]], + ["olarr", [8634]], + ["olcir", [10686]], + ["olcross", [10683]], + ["oline", [8254]], + ["olt", [10688]], + ["Omacr", [332]], + ["omacr", [333]], + ["Omega", [937]], + ["omega", [969]], + ["Omicron", [927]], + ["omicron", [959]], + ["omid", [10678]], + ["ominus", [8854]], + ["Oopf", [120134]], + ["oopf", [120160]], + ["opar", [10679]], + ["OpenCurlyDoubleQuote", [8220]], + ["OpenCurlyQuote", [8216]], + ["operp", [10681]], + ["oplus", [8853]], + ["orarr", [8635]], + ["Or", [10836]], + ["or", [8744]], + ["ord", [10845]], + ["order", [8500]], + ["orderof", [8500]], + ["ordf", [170]], + ["ordm", [186]], + ["origof", [8886]], + ["oror", [10838]], + ["orslope", [10839]], + ["orv", [10843]], + ["oS", [9416]], + ["Oscr", [119978]], + ["oscr", [8500]], + ["Oslash", [216]], + ["oslash", [248]], + ["osol", [8856]], + ["Otilde", [213]], + ["otilde", [245]], + ["otimesas", [10806]], + ["Otimes", [10807]], + ["otimes", [8855]], + ["Ouml", [214]], + ["ouml", [246]], + ["ovbar", [9021]], + ["OverBar", [8254]], + ["OverBrace", [9182]], + ["OverBracket", [9140]], + ["OverParenthesis", [9180]], + ["para", [182]], + ["parallel", [8741]], + ["par", [8741]], + ["parsim", [10995]], + ["parsl", [11005]], + ["part", [8706]], + ["PartialD", [8706]], + ["Pcy", [1055]], + ["pcy", [1087]], + ["percnt", [37]], + ["period", [46]], + ["permil", [8240]], + ["perp", [8869]], + ["pertenk", [8241]], + ["Pfr", [120083]], + ["pfr", [120109]], + ["Phi", [934]], + ["phi", [966]], + ["phiv", [981]], + ["phmmat", [8499]], + ["phone", [9742]], + ["Pi", [928]], + ["pi", [960]], + ["pitchfork", [8916]], + ["piv", [982]], + ["planck", [8463]], + ["planckh", [8462]], + ["plankv", [8463]], + ["plusacir", [10787]], + ["plusb", [8862]], + ["pluscir", [10786]], + ["plus", [43]], + ["plusdo", [8724]], + ["plusdu", [10789]], + ["pluse", [10866]], + ["PlusMinus", [177]], + ["plusmn", [177]], + ["plussim", [10790]], + ["plustwo", [10791]], + ["pm", [177]], + ["Poincareplane", [8460]], + ["pointint", [10773]], + ["popf", [120161]], + ["Popf", [8473]], + ["pound", [163]], + ["prap", [10935]], + ["Pr", [10939]], + ["pr", [8826]], + ["prcue", [8828]], + ["precapprox", [10935]], + ["prec", [8826]], + ["preccurlyeq", [8828]], + ["Precedes", [8826]], + ["PrecedesEqual", [10927]], + ["PrecedesSlantEqual", [8828]], + ["PrecedesTilde", [8830]], + ["preceq", [10927]], + ["precnapprox", [10937]], + ["precneqq", [10933]], + ["precnsim", [8936]], + ["pre", [10927]], + ["prE", [10931]], + ["precsim", [8830]], + ["prime", [8242]], + ["Prime", [8243]], + ["primes", [8473]], + ["prnap", [10937]], + ["prnE", [10933]], + ["prnsim", [8936]], + ["prod", [8719]], + ["Product", [8719]], + ["profalar", [9006]], + ["profline", [8978]], + ["profsurf", [8979]], + ["prop", [8733]], + ["Proportional", [8733]], + ["Proportion", [8759]], + ["propto", [8733]], + ["prsim", [8830]], + ["prurel", [8880]], + ["Pscr", [119979]], + ["pscr", [120005]], + ["Psi", [936]], + ["psi", [968]], + ["puncsp", [8200]], + ["Qfr", [120084]], + ["qfr", [120110]], + ["qint", [10764]], + ["qopf", [120162]], + ["Qopf", [8474]], + ["qprime", [8279]], + ["Qscr", [119980]], + ["qscr", [120006]], + ["quaternions", [8461]], + ["quatint", [10774]], + ["quest", [63]], + ["questeq", [8799]], + ["quot", [34]], + ["QUOT", [34]], + ["rAarr", [8667]], + ["race", [8765, 817]], + ["Racute", [340]], + ["racute", [341]], + ["radic", [8730]], + ["raemptyv", [10675]], + ["rang", [10217]], + ["Rang", [10219]], + ["rangd", [10642]], + ["range", [10661]], + ["rangle", [10217]], + ["raquo", [187]], + ["rarrap", [10613]], + ["rarrb", [8677]], + ["rarrbfs", [10528]], + ["rarrc", [10547]], + ["rarr", [8594]], + ["Rarr", [8608]], + ["rArr", [8658]], + ["rarrfs", [10526]], + ["rarrhk", [8618]], + ["rarrlp", [8620]], + ["rarrpl", [10565]], + ["rarrsim", [10612]], + ["Rarrtl", [10518]], + ["rarrtl", [8611]], + ["rarrw", [8605]], + ["ratail", [10522]], + ["rAtail", [10524]], + ["ratio", [8758]], + ["rationals", [8474]], + ["rbarr", [10509]], + ["rBarr", [10511]], + ["RBarr", [10512]], + ["rbbrk", [10099]], + ["rbrace", [125]], + ["rbrack", [93]], + ["rbrke", [10636]], + ["rbrksld", [10638]], + ["rbrkslu", [10640]], + ["Rcaron", [344]], + ["rcaron", [345]], + ["Rcedil", [342]], + ["rcedil", [343]], + ["rceil", [8969]], + ["rcub", [125]], + ["Rcy", [1056]], + ["rcy", [1088]], + ["rdca", [10551]], + ["rdldhar", [10601]], + ["rdquo", [8221]], + ["rdquor", [8221]], + ["CloseCurlyDoubleQuote", [8221]], + ["rdsh", [8627]], + ["real", [8476]], + ["realine", [8475]], + ["realpart", [8476]], + ["reals", [8477]], + ["Re", [8476]], + ["rect", [9645]], + ["reg", [174]], + ["REG", [174]], + ["ReverseElement", [8715]], + ["ReverseEquilibrium", [8651]], + ["ReverseUpEquilibrium", [10607]], + ["rfisht", [10621]], + ["rfloor", [8971]], + ["rfr", [120111]], + ["Rfr", [8476]], + ["rHar", [10596]], + ["rhard", [8641]], + ["rharu", [8640]], + ["rharul", [10604]], + ["Rho", [929]], + ["rho", [961]], + ["rhov", [1009]], + ["RightAngleBracket", [10217]], + ["RightArrowBar", [8677]], + ["rightarrow", [8594]], + ["RightArrow", [8594]], + ["Rightarrow", [8658]], + ["RightArrowLeftArrow", [8644]], + ["rightarrowtail", [8611]], + ["RightCeiling", [8969]], + ["RightDoubleBracket", [10215]], + ["RightDownTeeVector", [10589]], + ["RightDownVectorBar", [10581]], + ["RightDownVector", [8642]], + ["RightFloor", [8971]], + ["rightharpoondown", [8641]], + ["rightharpoonup", [8640]], + ["rightleftarrows", [8644]], + ["rightleftharpoons", [8652]], + ["rightrightarrows", [8649]], + ["rightsquigarrow", [8605]], + ["RightTeeArrow", [8614]], + ["RightTee", [8866]], + ["RightTeeVector", [10587]], + ["rightthreetimes", [8908]], + ["RightTriangleBar", [10704]], + ["RightTriangle", [8883]], + ["RightTriangleEqual", [8885]], + ["RightUpDownVector", [10575]], + ["RightUpTeeVector", [10588]], + ["RightUpVectorBar", [10580]], + ["RightUpVector", [8638]], + ["RightVectorBar", [10579]], + ["RightVector", [8640]], + ["ring", [730]], + ["risingdotseq", [8787]], + ["rlarr", [8644]], + ["rlhar", [8652]], + ["rlm", [8207]], + ["rmoustache", [9137]], + ["rmoust", [9137]], + ["rnmid", [10990]], + ["roang", [10221]], + ["roarr", [8702]], + ["robrk", [10215]], + ["ropar", [10630]], + ["ropf", [120163]], + ["Ropf", [8477]], + ["roplus", [10798]], + ["rotimes", [10805]], + ["RoundImplies", [10608]], + ["rpar", [41]], + ["rpargt", [10644]], + ["rppolint", [10770]], + ["rrarr", [8649]], + ["Rrightarrow", [8667]], + ["rsaquo", [8250]], + ["rscr", [120007]], + ["Rscr", [8475]], + ["rsh", [8625]], + ["Rsh", [8625]], + ["rsqb", [93]], + ["rsquo", [8217]], + ["rsquor", [8217]], + ["CloseCurlyQuote", [8217]], + ["rthree", [8908]], + ["rtimes", [8906]], + ["rtri", [9657]], + ["rtrie", [8885]], + ["rtrif", [9656]], + ["rtriltri", [10702]], + ["RuleDelayed", [10740]], + ["ruluhar", [10600]], + ["rx", [8478]], + ["Sacute", [346]], + ["sacute", [347]], + ["sbquo", [8218]], + ["scap", [10936]], + ["Scaron", [352]], + ["scaron", [353]], + ["Sc", [10940]], + ["sc", [8827]], + ["sccue", [8829]], + ["sce", [10928]], + ["scE", [10932]], + ["Scedil", [350]], + ["scedil", [351]], + ["Scirc", [348]], + ["scirc", [349]], + ["scnap", [10938]], + ["scnE", [10934]], + ["scnsim", [8937]], + ["scpolint", [10771]], + ["scsim", [8831]], + ["Scy", [1057]], + ["scy", [1089]], + ["sdotb", [8865]], + ["sdot", [8901]], + ["sdote", [10854]], + ["searhk", [10533]], + ["searr", [8600]], + ["seArr", [8664]], + ["searrow", [8600]], + ["sect", [167]], + ["semi", [59]], + ["seswar", [10537]], + ["setminus", [8726]], + ["setmn", [8726]], + ["sext", [10038]], + ["Sfr", [120086]], + ["sfr", [120112]], + ["sfrown", [8994]], + ["sharp", [9839]], + ["SHCHcy", [1065]], + ["shchcy", [1097]], + ["SHcy", [1064]], + ["shcy", [1096]], + ["ShortDownArrow", [8595]], + ["ShortLeftArrow", [8592]], + ["shortmid", [8739]], + ["shortparallel", [8741]], + ["ShortRightArrow", [8594]], + ["ShortUpArrow", [8593]], + ["shy", [173]], + ["Sigma", [931]], + ["sigma", [963]], + ["sigmaf", [962]], + ["sigmav", [962]], + ["sim", [8764]], + ["simdot", [10858]], + ["sime", [8771]], + ["simeq", [8771]], + ["simg", [10910]], + ["simgE", [10912]], + ["siml", [10909]], + ["simlE", [10911]], + ["simne", [8774]], + ["simplus", [10788]], + ["simrarr", [10610]], + ["slarr", [8592]], + ["SmallCircle", [8728]], + ["smallsetminus", [8726]], + ["smashp", [10803]], + ["smeparsl", [10724]], + ["smid", [8739]], + ["smile", [8995]], + ["smt", [10922]], + ["smte", [10924]], + ["smtes", [10924, 65024]], + ["SOFTcy", [1068]], + ["softcy", [1100]], + ["solbar", [9023]], + ["solb", [10692]], + ["sol", [47]], + ["Sopf", [120138]], + ["sopf", [120164]], + ["spades", [9824]], + ["spadesuit", [9824]], + ["spar", [8741]], + ["sqcap", [8851]], + ["sqcaps", [8851, 65024]], + ["sqcup", [8852]], + ["sqcups", [8852, 65024]], + ["Sqrt", [8730]], + ["sqsub", [8847]], + ["sqsube", [8849]], + ["sqsubset", [8847]], + ["sqsubseteq", [8849]], + ["sqsup", [8848]], + ["sqsupe", [8850]], + ["sqsupset", [8848]], + ["sqsupseteq", [8850]], + ["square", [9633]], + ["Square", [9633]], + ["SquareIntersection", [8851]], + ["SquareSubset", [8847]], + ["SquareSubsetEqual", [8849]], + ["SquareSuperset", [8848]], + ["SquareSupersetEqual", [8850]], + ["SquareUnion", [8852]], + ["squarf", [9642]], + ["squ", [9633]], + ["squf", [9642]], + ["srarr", [8594]], + ["Sscr", [119982]], + ["sscr", [120008]], + ["ssetmn", [8726]], + ["ssmile", [8995]], + ["sstarf", [8902]], + ["Star", [8902]], + ["star", [9734]], + ["starf", [9733]], + ["straightepsilon", [1013]], + ["straightphi", [981]], + ["strns", [175]], + ["sub", [8834]], + ["Sub", [8912]], + ["subdot", [10941]], + ["subE", [10949]], + ["sube", [8838]], + ["subedot", [10947]], + ["submult", [10945]], + ["subnE", [10955]], + ["subne", [8842]], + ["subplus", [10943]], + ["subrarr", [10617]], + ["subset", [8834]], + ["Subset", [8912]], + ["subseteq", [8838]], + ["subseteqq", [10949]], + ["SubsetEqual", [8838]], + ["subsetneq", [8842]], + ["subsetneqq", [10955]], + ["subsim", [10951]], + ["subsub", [10965]], + ["subsup", [10963]], + ["succapprox", [10936]], + ["succ", [8827]], + ["succcurlyeq", [8829]], + ["Succeeds", [8827]], + ["SucceedsEqual", [10928]], + ["SucceedsSlantEqual", [8829]], + ["SucceedsTilde", [8831]], + ["succeq", [10928]], + ["succnapprox", [10938]], + ["succneqq", [10934]], + ["succnsim", [8937]], + ["succsim", [8831]], + ["SuchThat", [8715]], + ["sum", [8721]], + ["Sum", [8721]], + ["sung", [9834]], + ["sup1", [185]], + ["sup2", [178]], + ["sup3", [179]], + ["sup", [8835]], + ["Sup", [8913]], + ["supdot", [10942]], + ["supdsub", [10968]], + ["supE", [10950]], + ["supe", [8839]], + ["supedot", [10948]], + ["Superset", [8835]], + ["SupersetEqual", [8839]], + ["suphsol", [10185]], + ["suphsub", [10967]], + ["suplarr", [10619]], + ["supmult", [10946]], + ["supnE", [10956]], + ["supne", [8843]], + ["supplus", [10944]], + ["supset", [8835]], + ["Supset", [8913]], + ["supseteq", [8839]], + ["supseteqq", [10950]], + ["supsetneq", [8843]], + ["supsetneqq", [10956]], + ["supsim", [10952]], + ["supsub", [10964]], + ["supsup", [10966]], + ["swarhk", [10534]], + ["swarr", [8601]], + ["swArr", [8665]], + ["swarrow", [8601]], + ["swnwar", [10538]], + ["szlig", [223]], + ["Tab", [9]], + ["target", [8982]], + ["Tau", [932]], + ["tau", [964]], + ["tbrk", [9140]], + ["Tcaron", [356]], + ["tcaron", [357]], + ["Tcedil", [354]], + ["tcedil", [355]], + ["Tcy", [1058]], + ["tcy", [1090]], + ["tdot", [8411]], + ["telrec", [8981]], + ["Tfr", [120087]], + ["tfr", [120113]], + ["there4", [8756]], + ["therefore", [8756]], + ["Therefore", [8756]], + ["Theta", [920]], + ["theta", [952]], + ["thetasym", [977]], + ["thetav", [977]], + ["thickapprox", [8776]], + ["thicksim", [8764]], + ["ThickSpace", [8287, 8202]], + ["ThinSpace", [8201]], + ["thinsp", [8201]], + ["thkap", [8776]], + ["thksim", [8764]], + ["THORN", [222]], + ["thorn", [254]], + ["tilde", [732]], + ["Tilde", [8764]], + ["TildeEqual", [8771]], + ["TildeFullEqual", [8773]], + ["TildeTilde", [8776]], + ["timesbar", [10801]], + ["timesb", [8864]], + ["times", [215]], + ["timesd", [10800]], + ["tint", [8749]], + ["toea", [10536]], + ["topbot", [9014]], + ["topcir", [10993]], + ["top", [8868]], + ["Topf", [120139]], + ["topf", [120165]], + ["topfork", [10970]], + ["tosa", [10537]], + ["tprime", [8244]], + ["trade", [8482]], + ["TRADE", [8482]], + ["triangle", [9653]], + ["triangledown", [9663]], + ["triangleleft", [9667]], + ["trianglelefteq", [8884]], + ["triangleq", [8796]], + ["triangleright", [9657]], + ["trianglerighteq", [8885]], + ["tridot", [9708]], + ["trie", [8796]], + ["triminus", [10810]], + ["TripleDot", [8411]], + ["triplus", [10809]], + ["trisb", [10701]], + ["tritime", [10811]], + ["trpezium", [9186]], + ["Tscr", [119983]], + ["tscr", [120009]], + ["TScy", [1062]], + ["tscy", [1094]], + ["TSHcy", [1035]], + ["tshcy", [1115]], + ["Tstrok", [358]], + ["tstrok", [359]], + ["twixt", [8812]], + ["twoheadleftarrow", [8606]], + ["twoheadrightarrow", [8608]], + ["Uacute", [218]], + ["uacute", [250]], + ["uarr", [8593]], + ["Uarr", [8607]], + ["uArr", [8657]], + ["Uarrocir", [10569]], + ["Ubrcy", [1038]], + ["ubrcy", [1118]], + ["Ubreve", [364]], + ["ubreve", [365]], + ["Ucirc", [219]], + ["ucirc", [251]], + ["Ucy", [1059]], + ["ucy", [1091]], + ["udarr", [8645]], + ["Udblac", [368]], + ["udblac", [369]], + ["udhar", [10606]], + ["ufisht", [10622]], + ["Ufr", [120088]], + ["ufr", [120114]], + ["Ugrave", [217]], + ["ugrave", [249]], + ["uHar", [10595]], + ["uharl", [8639]], + ["uharr", [8638]], + ["uhblk", [9600]], + ["ulcorn", [8988]], + ["ulcorner", [8988]], + ["ulcrop", [8975]], + ["ultri", [9720]], + ["Umacr", [362]], + ["umacr", [363]], + ["uml", [168]], + ["UnderBar", [95]], + ["UnderBrace", [9183]], + ["UnderBracket", [9141]], + ["UnderParenthesis", [9181]], + ["Union", [8899]], + ["UnionPlus", [8846]], + ["Uogon", [370]], + ["uogon", [371]], + ["Uopf", [120140]], + ["uopf", [120166]], + ["UpArrowBar", [10514]], + ["uparrow", [8593]], + ["UpArrow", [8593]], + ["Uparrow", [8657]], + ["UpArrowDownArrow", [8645]], + ["updownarrow", [8597]], + ["UpDownArrow", [8597]], + ["Updownarrow", [8661]], + ["UpEquilibrium", [10606]], + ["upharpoonleft", [8639]], + ["upharpoonright", [8638]], + ["uplus", [8846]], + ["UpperLeftArrow", [8598]], + ["UpperRightArrow", [8599]], + ["upsi", [965]], + ["Upsi", [978]], + ["upsih", [978]], + ["Upsilon", [933]], + ["upsilon", [965]], + ["UpTeeArrow", [8613]], + ["UpTee", [8869]], + ["upuparrows", [8648]], + ["urcorn", [8989]], + ["urcorner", [8989]], + ["urcrop", [8974]], + ["Uring", [366]], + ["uring", [367]], + ["urtri", [9721]], + ["Uscr", [119984]], + ["uscr", [120010]], + ["utdot", [8944]], + ["Utilde", [360]], + ["utilde", [361]], + ["utri", [9653]], + ["utrif", [9652]], + ["uuarr", [8648]], + ["Uuml", [220]], + ["uuml", [252]], + ["uwangle", [10663]], + ["vangrt", [10652]], + ["varepsilon", [1013]], + ["varkappa", [1008]], + ["varnothing", [8709]], + ["varphi", [981]], + ["varpi", [982]], + ["varpropto", [8733]], + ["varr", [8597]], + ["vArr", [8661]], + ["varrho", [1009]], + ["varsigma", [962]], + ["varsubsetneq", [8842, 65024]], + ["varsubsetneqq", [10955, 65024]], + ["varsupsetneq", [8843, 65024]], + ["varsupsetneqq", [10956, 65024]], + ["vartheta", [977]], + ["vartriangleleft", [8882]], + ["vartriangleright", [8883]], + ["vBar", [10984]], + ["Vbar", [10987]], + ["vBarv", [10985]], + ["Vcy", [1042]], + ["vcy", [1074]], + ["vdash", [8866]], + ["vDash", [8872]], + ["Vdash", [8873]], + ["VDash", [8875]], + ["Vdashl", [10982]], + ["veebar", [8891]], + ["vee", [8744]], + ["Vee", [8897]], + ["veeeq", [8794]], + ["vellip", [8942]], + ["verbar", [124]], + ["Verbar", [8214]], + ["vert", [124]], + ["Vert", [8214]], + ["VerticalBar", [8739]], + ["VerticalLine", [124]], + ["VerticalSeparator", [10072]], + ["VerticalTilde", [8768]], + ["VeryThinSpace", [8202]], + ["Vfr", [120089]], + ["vfr", [120115]], + ["vltri", [8882]], + ["vnsub", [8834, 8402]], + ["vnsup", [8835, 8402]], + ["Vopf", [120141]], + ["vopf", [120167]], + ["vprop", [8733]], + ["vrtri", [8883]], + ["Vscr", [119985]], + ["vscr", [120011]], + ["vsubnE", [10955, 65024]], + ["vsubne", [8842, 65024]], + ["vsupnE", [10956, 65024]], + ["vsupne", [8843, 65024]], + ["Vvdash", [8874]], + ["vzigzag", [10650]], + ["Wcirc", [372]], + ["wcirc", [373]], + ["wedbar", [10847]], + ["wedge", [8743]], + ["Wedge", [8896]], + ["wedgeq", [8793]], + ["weierp", [8472]], + ["Wfr", [120090]], + ["wfr", [120116]], + ["Wopf", [120142]], + ["wopf", [120168]], + ["wp", [8472]], + ["wr", [8768]], + ["wreath", [8768]], + ["Wscr", [119986]], + ["wscr", [120012]], + ["xcap", [8898]], + ["xcirc", [9711]], + ["xcup", [8899]], + ["xdtri", [9661]], + ["Xfr", [120091]], + ["xfr", [120117]], + ["xharr", [10231]], + ["xhArr", [10234]], + ["Xi", [926]], + ["xi", [958]], + ["xlarr", [10229]], + ["xlArr", [10232]], + ["xmap", [10236]], + ["xnis", [8955]], + ["xodot", [10752]], + ["Xopf", [120143]], + ["xopf", [120169]], + ["xoplus", [10753]], + ["xotime", [10754]], + ["xrarr", [10230]], + ["xrArr", [10233]], + ["Xscr", [119987]], + ["xscr", [120013]], + ["xsqcup", [10758]], + ["xuplus", [10756]], + ["xutri", [9651]], + ["xvee", [8897]], + ["xwedge", [8896]], + ["Yacute", [221]], + ["yacute", [253]], + ["YAcy", [1071]], + ["yacy", [1103]], + ["Ycirc", [374]], + ["ycirc", [375]], + ["Ycy", [1067]], + ["ycy", [1099]], + ["yen", [165]], + ["Yfr", [120092]], + ["yfr", [120118]], + ["YIcy", [1031]], + ["yicy", [1111]], + ["Yopf", [120144]], + ["yopf", [120170]], + ["Yscr", [119988]], + ["yscr", [120014]], + ["YUcy", [1070]], + ["yucy", [1102]], + ["yuml", [255]], + ["Yuml", [376]], + ["Zacute", [377]], + ["zacute", [378]], + ["Zcaron", [381]], + ["zcaron", [382]], + ["Zcy", [1047]], + ["zcy", [1079]], + ["Zdot", [379]], + ["zdot", [380]], + ["zeetrf", [8488]], + ["ZeroWidthSpace", [8203]], + ["Zeta", [918]], + ["zeta", [950]], + ["zfr", [120119]], + ["Zfr", [8488]], + ["ZHcy", [1046]], + ["zhcy", [1078]], + ["zigrarr", [8669]], + ["zopf", [120171]], + ["Zopf", [8484]], + ["Zscr", [119989]], + ["zscr", [120015]], + ["zwj", [8205]], + ["zwnj", [8204]] + ], + n = [ + ["NewLine", [10]] + ], + s = {}, + o = {}; + ! function(e, t) { + var r = a.length; + for (; r--;) { + var i = a[r], + s = i[0], + o = i[1], + c = o[0], + l = o[1], + h = c < 32 || c > 126 || 62 === c || 60 === c || 38 === c || 34 === c || 39 === c, + u = void 0; + h && (u = t[c] = t[c] || {}), l ? (e[s] = String.fromCharCode(c) + String.fromCharCode(l), h && (u[l] = s)) : (e[s] = String.fromCharCode(c), h && (u[""] = s)) + } + r = n.length; + for (; r--;) { + var d = n[r], + p = (s = d[0], d[1]); + c = p[0], l = p[1]; + e[s] = String.fromCharCode(c) + (l ? String.fromCharCode(l) : "") + } + }(s, o); + var c = function() { + function e() {} + return e.prototype.decode = function(e) { + return e && e.length ? e.replace(/&(#?[\w\d]+);?/g, (function(e, t) { + var r; + if ("#" === t.charAt(0)) { + var a = "x" === t.charAt(1) ? parseInt(t.substr(2).toLowerCase(), 16) : parseInt(t.substr(1)); + (!isNaN(a) || a >= -32768) && (r = a <= 65535 ? String.fromCharCode(a) : i.fromCodePoint(a)) + } else r = s[t]; + return r || e + })) : "" + }, e.decode = function(t) { + return (new e).decode(t) + }, e.prototype.encode = function(e) { + if (!e || !e.length) return ""; + for (var t = e.length, r = "", i = 0; i < t;) { + var a = o[e.charCodeAt(i)]; + if (a) { + var n = a[e.charCodeAt(i + 1)]; + if (n ? i++ : n = a[""], n) { + r += "&" + n + ";", i++; + continue + } + } + r += e.charAt(i), i++ + } + return r + }, e.encode = function(t) { + return (new e).encode(t) + }, e.prototype.encodeNonUTF = function(e) { + if (!e || !e.length) return ""; + for (var t = e.length, r = "", a = 0; a < t;) { + var n = e.charCodeAt(a), + s = o[n]; + if (s) { + var c = s[e.charCodeAt(a + 1)]; + if (c ? a++ : c = s[""], c) { + r += "&" + c + ";", a++; + continue + } + } + n < 32 || n > 126 ? n >= i.highSurrogateFrom && n <= i.highSurrogateTo ? (r += "&#" + i.getCodePoint(e, a) + ";", a++) : r += "&#" + n + ";" : r += e.charAt(a), a++ + } + return r + }, e.encodeNonUTF = function(t) { + return (new e).encodeNonUTF(t) + }, e.prototype.encodeNonASCII = function(e) { + if (!e || !e.length) return ""; + for (var t = e.length, r = "", a = 0; a < t;) { + var n = e.charCodeAt(a); + n <= 255 ? r += e[a++] : n >= i.highSurrogateFrom && n <= i.highSurrogateTo ? (r += "&#" + i.getCodePoint(e, a) + ";", a += 2) : (r += "&#" + n + ";", a++) + } + return r + }, e.encodeNonASCII = function(t) { + return (new e).encodeNonASCII(t) + }, e + }(); + t.Html5Entities = c +}]).default; \ No newline at end of file diff --git a/packages/app-mobile/plugins/org.joplinapp.plugins.Simple/index.js b/packages/app-mobile/plugins/org.joplinapp.plugins.Simple/index.js index e3e44303c..2be3a42c9 100644 --- a/packages/app-mobile/plugins/org.joplinapp.plugins.Simple/index.js +++ b/packages/app-mobile/plugins/org.joplinapp.plugins.Simple/index.js @@ -1,14 +1,4 @@ -let script = null; - -let joplin = { - plugins: { - register: s => { - script = s; - }, - }, -}; - -const setJoplin = v => joplin = v; +const initPlugin = joplin => { joplin.plugins.register({ onStart: async function() { @@ -19,4 +9,6 @@ joplin.plugins.register({ }, }); -module.exports = { script, setJoplin }; +} + +module.exports = { initPlugin }; diff --git a/packages/app-mobile/plugins/org.joplinapp.plugins.Simple2/index.js b/packages/app-mobile/plugins/org.joplinapp.plugins.Simple2/index.js index 555b18d78..d8839e7e8 100644 --- a/packages/app-mobile/plugins/org.joplinapp.plugins.Simple2/index.js +++ b/packages/app-mobile/plugins/org.joplinapp.plugins.Simple2/index.js @@ -1,14 +1,4 @@ -let script = null; - -let joplin = { - plugins: { - register: s => { - script = s; - }, - }, -}; - -const setJoplin = v => joplin = v; +const initPlugin = joplin => { joplin.plugins.register({ onStart: async function() { @@ -19,4 +9,6 @@ joplin.plugins.register({ }, }); -module.exports = { script, setJoplin }; +} + +module.exports = { initPlugin }; diff --git a/packages/app-mobile/root.tsx b/packages/app-mobile/root.tsx index 052359bc0..5ea485d2d 100644 --- a/packages/app-mobile/root.tsx +++ b/packages/app-mobile/root.tsx @@ -468,6 +468,41 @@ const simplePluginManifest2 = `{ ] }`; +// const abcPlugin = require('./plugins/org.joplinapp.plugins.AbcSheetMusic/index.js'); +// const abcPluginManifest = `{ +// "manifest_version": 1, +// "id": "org.joplinapp.plugins.AbcSheetMusic", +// "app_min_version": "2.2", +// "version": "1.0.2", +// "name": "ABC Sheet Music Plugin", +// "description": "Turns ABC text notation into sheet music", +// "author": "Laurent Cozic", +// "homepage_url": "https://github.com/joplin/plugin-abc-sheet-music", +// "repository_url": "https://github.com/joplin/plugin-abc-sheet-music", +// "keywords": [ +// "sheet music", +// "abc", +// "notation" +// ] +// }`; + +// const abcPluginContentScript = require('./plugins/org.joplinapp.plugins.AbcSheetMusic/markdownItPlugin.js'); + +const metisPlugin = require('./plugins/com.hieuthi.joplin.metis/index.js'); +const metisManifest = `{ + "manifest_version": 1, + "id": "com.hieuthi.joplin.metis", + "app_min_version": "2.2", + "version": "0.1.5", + "name": "Metis", + "description": "A Simple Task Manager Plugin for Joplin based on Todo.txt Specification", + "author": "Hieu-Thi Luong", + "homepage_url": "https://github.com/hieuthi/joplin-plugin-metis", + "repository_url": "https://github.com/hieuthi/joplin-plugin-metis", + "keywords": ["joplin-plugin","todo","todotxt","task management"] +}`; +const metisContentScript = require('./plugins/com.hieuthi.joplin.metis/todoTxtMdRule.js'); + const initPluginService = async () => { const service = PluginService.instance(); const runner = new PluginRunner(); @@ -483,11 +518,17 @@ const initPluginService = async () => { } ); - const plugin1 = await PluginService.instance().loadPluginFromModule(simplePlugin1, simplePluginManifest1); + const plugin1 = await PluginService.instance().loadPluginFromModule({ main: simplePlugin1 }, simplePluginManifest1); await PluginService.instance().runPlugin(plugin1); - const plugin2 = await PluginService.instance().loadPluginFromModule(simplePlugin2, simplePluginManifest2); + const plugin2 = await PluginService.instance().loadPluginFromModule({ main: simplePlugin2 }, simplePluginManifest2); await PluginService.instance().runPlugin(plugin2); + + // const plugin3 = await PluginService.instance().loadPluginFromModule({ main: abcPlugin, contentScripts: { ['markdownItPlugin.js']: abcPluginContentScript } }, abcPluginManifest); + // await PluginService.instance().runPlugin(plugin3); + + const plugin4 = await PluginService.instance().loadPluginFromModule({ main: metisPlugin, contentScripts: { ['todoTxtMdView.js']: metisContentScript } }, metisManifest); + await PluginService.instance().runPlugin(plugin4); }; // eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied diff --git a/packages/app-mobile/services/plugins/PluginRunner.ts b/packages/app-mobile/services/plugins/PluginRunner.ts index aba6af88f..cfee53775 100644 --- a/packages/app-mobile/services/plugins/PluginRunner.ts +++ b/packages/app-mobile/services/plugins/PluginRunner.ts @@ -1,12 +1,15 @@ import Global from '@joplin/lib/services/plugins/api/Global'; import BasePluginRunner from '@joplin/lib/services/plugins/BasePluginRunner'; import Plugin from '@joplin/lib/services/plugins/Plugin'; +import Logger from '@joplin/utils/Logger'; + +const logger = Logger.create('PluginRunner'); export default class PluginRunner extends BasePluginRunner { public async run(plugin: Plugin, sandbox: Global): Promise { - plugin.module.setJoplin(sandbox.joplin); - await sandbox.joplin.plugins.register(plugin.module.script); + logger.info(`Run plugin: ${plugin.id}`); + plugin.module.main.initPlugin(sandbox.joplin); } } diff --git a/packages/app-mobile/utils/fs-driver-rn.ts b/packages/app-mobile/utils/fs-driver-rn.ts index d94d74c93..9c8320020 100644 --- a/packages/app-mobile/utils/fs-driver-rn.ts +++ b/packages/app-mobile/utils/fs-driver-rn.ts @@ -256,12 +256,8 @@ export default class FsDriverRN extends FsDriverBase { return output ? output : null; } - public resolve(path: string) { - return resolve(path); - } - - public resolveRelativePathWithinDir(_baseDir: string, relativePath: string) { - throw new Error(`Not implemented: resolveRelativePathWithinDir(): ${relativePath}`); + public resolve(...pathSegments: string[]) { + return resolve(...pathSegments); } public async md5File(path: string): Promise { diff --git a/packages/app-mobile/utils/markupLanguageUtils.ts b/packages/app-mobile/utils/markupLanguageUtils.ts new file mode 100644 index 000000000..87250949a --- /dev/null +++ b/packages/app-mobile/utils/markupLanguageUtils.ts @@ -0,0 +1,21 @@ +import { MarkupLanguageUtils as BaseMarkupLanguageUtils } from '@joplin/lib/markupLanguageUtils'; +import { PluginStates } from '@joplin/lib/services/plugins/reducer'; +import { contentScriptsToRendererRules } from '@joplin/lib/services/plugins/utils/loadContentScripts'; +import { Options } from '@joplin/renderer/MarkupToHtml'; + +class MarkupLanguageUtils extends BaseMarkupLanguageUtils { + + public newMarkupToHtml(plugins: PluginStates = null, options: Options = null) { + plugins = plugins || {}; + + return super.newMarkupToHtml(null, { + extraRendererRules: contentScriptsToRendererRules(plugins), + ...options, + }); + } + +} + +const markupLanguageUtils = new MarkupLanguageUtils(); + +export default markupLanguageUtils; diff --git a/packages/lib/fs-driver-base.ts b/packages/lib/fs-driver-base.ts index ac479a1f5..339b31e16 100644 --- a/packages/lib/fs-driver-base.ts +++ b/packages/lib/fs-driver-base.ts @@ -158,6 +158,20 @@ export default class FsDriverBase { }; } + public resolve(..._pathSegments: string[]): string { + throw new Error('Not implemented'); + } + + // Resolves the provided relative path to an absolute path within baseDir. The function + // also checks that the absolute path is within baseDir, to avoid security issues. + // It is expected that baseDir is a safe path (not user-provided). + public resolveRelativePathWithinDir(baseDir: string, relativePath: string) { + const resolvedBaseDir = this.resolve(baseDir); + const resolvedPath = this.resolve(baseDir, relativePath); + if (resolvedPath.indexOf(resolvedBaseDir) !== 0) throw new Error(`Resolved path for relative path "${relativePath}" is not within base directory "${baseDir}" (Was resolved to ${resolvedPath})`); + return resolvedPath; + } + public async tarExtract(_options: any) { throw new Error('Not implemented'); } diff --git a/packages/lib/fs-driver-node.ts b/packages/lib/fs-driver-node.ts index ffcdfa1c2..f83455f47 100644 --- a/packages/lib/fs-driver-node.ts +++ b/packages/lib/fs-driver-node.ts @@ -186,18 +186,8 @@ export default class FsDriverNode extends FsDriverBase { throw new Error(`Unsupported encoding: ${encoding}`); } - public resolve(path: string) { - return require('path').resolve(path); - } - - // Resolves the provided relative path to an absolute path within baseDir. The function - // also checks that the absolute path is within baseDir, to avoid security issues. - // It is expected that baseDir is a safe path (not user-provided). - public resolveRelativePathWithinDir(baseDir: string, relativePath: string) { - const resolvedBaseDir = nodeResolve(baseDir); - const resolvedPath = nodeResolve(baseDir, relativePath); - if (resolvedPath.indexOf(resolvedBaseDir) !== 0) throw new Error(`Resolved path for relative path "${relativePath}" is not within base directory "${baseDir}" (Was resolved to ${resolvedPath})`); - return resolvedPath; + public resolve(...pathSegments: string[]) { + return nodeResolve(...pathSegments); } public async md5File(path: string): Promise { diff --git a/packages/lib/services/plugins/Plugin.ts b/packages/lib/services/plugins/Plugin.ts index ebeee93e5..1b2aee74e 100644 --- a/packages/lib/services/plugins/Plugin.ts +++ b/packages/lib/services/plugins/Plugin.ts @@ -4,6 +4,7 @@ import shim from '../../shim'; import { ViewHandle } from './utils/createViewHandle'; import { ContentScriptType } from './api/types'; import Logger from '@joplin/utils/Logger'; +import Joplin from './api/Joplin'; const EventEmitter = require('events'); const logger = Logger.create('Plugin'); @@ -15,12 +16,20 @@ interface ViewControllers { export interface ContentScript { id: string; path: string; + module?: any; } interface ContentScripts { [type: string]: ContentScript[]; } +export interface Module { + main: { + initPlugin: (joplin: Joplin)=> void; + }; + contentScripts?: Record; +} + export default class Plugin { private baseDir_: string; @@ -38,10 +47,10 @@ export default class Plugin { private contentScriptMessageListeners_: Record = {}; private dataDir_: string; private dataDirCreated_ = false; - private module_: any|null = null; + private module_: Module|null = null; // eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied - public constructor(baseDir: string, manifest: PluginManifest, scriptText: string, dispatch: Function, dataDir: string, module: any|null = null) { + public constructor(baseDir: string, manifest: PluginManifest, scriptText: string, dispatch: Function, dataDir: string, module: Module|null = null) { this.baseDir_ = baseDir ? shim.fsDriver().resolve(baseDir) : ''; this.manifest_ = manifest; this.scriptText_ = scriptText; @@ -75,7 +84,7 @@ export default class Plugin { return this.baseDir_; } - public get module(): any|null { + public get module(): Module|null { return this.module_; } @@ -111,13 +120,25 @@ export default class Plugin { public async registerContentScript(type: ContentScriptType, id: string, path: string) { if (!this.contentScripts_[type]) this.contentScripts_[type] = []; - const absolutePath = shim.fsDriver().resolveRelativePathWithinDir(this.baseDir, path); + let absolutePath = ''; + let scriptModule: any = null; - if (!(await shim.fsDriver().exists(absolutePath))) throw new Error(`Could not find content script at path ${absolutePath}`); + if (this.module) { + const normalizePath = (p: string) => { + if (p.startsWith('./')) return p.substring(2); + return p; + }; - this.contentScripts_[type].push({ id, path: absolutePath }); + const moduleKey = normalizePath(path); + scriptModule = this.module.contentScripts[moduleKey]; + logger.debug(`"${this.id}": Registered content script: ${type}: ${id}: ${moduleKey}`); + } else { + absolutePath = shim.fsDriver().resolveRelativePathWithinDir(this.baseDir, path); + if (!(await shim.fsDriver().exists(absolutePath))) throw new Error(`Could not find content script at path ${absolutePath}`); + logger.debug(`"${this.id}": Registered content script: ${type}: ${id}: ${absolutePath}`); + } - logger.debug(`"${this.id}": Registered content script: ${type}: ${id}: ${absolutePath}`); + this.contentScripts_[type].push({ id, path: absolutePath, module: scriptModule }); this.dispatch_({ type: 'PLUGIN_CONTENT_SCRIPTS_ADD', @@ -126,6 +147,7 @@ export default class Plugin { type: type, id: id, path: absolutePath, + module: scriptModule, }, }); } diff --git a/packages/lib/services/plugins/PluginService.ts b/packages/lib/services/plugins/PluginService.ts index 224b4dd74..2cf9fdc9c 100644 --- a/packages/lib/services/plugins/PluginService.ts +++ b/packages/lib/services/plugins/PluginService.ts @@ -1,4 +1,4 @@ -import Plugin from './Plugin'; +import Plugin, { Module } from './Plugin'; import manifestFromObject from './utils/manifestFromObject'; import Global from './api/Global'; import BasePluginRunner from './BasePluginRunner'; @@ -287,7 +287,7 @@ export default class PluginService extends BaseService { } } - public async loadPluginFromModule(module: any, manifestText: string): Promise { + public async loadPluginFromModule(module: Module, manifestText: string): Promise { return this.loadPlugin( '', manifestText, @@ -297,7 +297,7 @@ export default class PluginService extends BaseService { ); } - private async loadPlugin(baseDir: string, manifestText: string, scriptText: string, pluginIdIfNotSpecified: string, module: any|null = null): Promise { + private async loadPlugin(baseDir: string, manifestText: string, scriptText: string, pluginIdIfNotSpecified: string, module: Module|null = null): Promise { baseDir = rtrimSlashes(baseDir); const manifestObj = JSON.parse(manifestText); diff --git a/packages/lib/services/plugins/reducer.ts b/packages/lib/services/plugins/reducer.ts index 6e732aef5..573bb4f4b 100644 --- a/packages/lib/services/plugins/reducer.ts +++ b/packages/lib/services/plugins/reducer.ts @@ -17,6 +17,7 @@ interface PluginViewStates { interface PluginContentScriptState { id: string; path: string; + module?: any; } interface PluginContentScriptStates { @@ -170,6 +171,7 @@ const reducer = (draftRoot: Draft, action: any) => { draft.plugins[action.pluginId].contentScripts[type].push({ id: action.contentScript.id, path: action.contentScript.path, + module: action.contentScript.module, }); break; }