@ovnonvo/abc-editor 0.1.5 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,98 +1,98 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-amber-300:oklch(87.9% .169 91.605);--color-amber-500:oklch(76.9% .188 70.08);--color-cyan-400:oklch(78.9% .154 211.53);--color-blue-600:oklch(54.6% .245 262.881);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-950:oklch(12.9% .042 264.695);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.inline{display:inline}.table{display:table}.h-1\\/3{height:33.3333%}.h-2\\/3{height:66.6667%}.h-full{height:100%}.h-screen{height:100vh}.w-full{width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-slate-600{border-color:var(--color-slate-600)}.bg-amber-500\\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/20{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-950{background-color:var(--color-slate-950)}.p-4{padding:calc(var(--spacing)*4)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.pr-3{padding-right:calc(var(--spacing)*3)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-amber-300{color:var(--color-amber-300)}.text-amber-500{color:var(--color-amber-500)}.text-cyan-400{color:var(--color-cyan-400)}.text-slate-200{color:var(--color-slate-200)}.text-slate-500{color:var(--color-slate-500)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[foo\\:bar\\]{foo:bar}.last\\:mb-0:last-child{margin-bottom:calc(var(--spacing)*0)}@media(hover:hover){.hover\\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\\:bg-slate-800\\/30:hover{background-color:#1d293d4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-slate-800\\/30:hover{background-color:color-mix(in oklab,var(--color-slate-800)30%,transparent)}}}@media(min-width:48rem){.md\\:h-full{height:100%}.md\\:w-1\\/2{width:50%}.md\\:flex-row{flex-direction:row}}}:root{--abc-ink:#e8f1ff;--abc-key:#7ad7ff;--abc-value:#ffd48a;--abc-lyrics-key:#ff7ba1;--abc-lyrics-value:#ffc8d8;--abc-note:#f8fbff;--abc-octave-high:#73f8c4;--abc-octave-low:#c7b3ff;--abc-rest:#8ca3b8;--abc-rest-muted:#596779;--abc-accidental:#f2c079;--abc-duration-long:#ffa25f;--abc-duration-short:#6edff6;--abc-duration-fraction:#ffe38f;--abc-broken:#7be495;--abc-bar:#79cfff;--abc-bar-double:#4aafff;--abc-chord:#ff8ccf;--abc-slur-0:#ff92b2;--abc-slur-1:#ffd77a;--abc-slur-2:#7ed4ff;--abc-slur-3:#92f3c6;--abc-slur-4:#c6a9ff;--abc-tuplet:#82f0a2;--abc-tie:#f07fb3;--abc-tie-dotted:#ff9ecf;--abc-ornament:#9fb0ff;--abc-chord-symbol:#63f5d3;--abc-annotation:#ffd88a;--abc-decoration:#d1a6ff;--abc-grace:#a4f28f;--abc-volta:#f9a15a;--abc-inline-bracket:#8ca7c0;--abc-inline-key:#7ad7ff;--abc-inline-value:#ffdcb2;--abc-comment:#7b8797}.abc-preview svg text{fill:#fff!important}textarea::placeholder{color:#64748b;opacity:1}.abc-meta-key{color:var(--abc-key);font-weight:600}.abc-meta-value{color:var(--abc-value)}.abc-lyrics-key{color:var(--abc-lyrics-key);font-weight:600}.abc-lyrics-value{color:var(--abc-lyrics-value)}.abc-note{color:var(--abc-note)}.abc-octave-high{color:var(--abc-octave-high);font-weight:600}.abc-octave-low{color:var(--abc-octave-low);font-weight:600}.abc-rest{color:var(--abc-rest)}.abc-rest-invisible{color:var(--abc-rest-muted);opacity:.5}.abc-accidental{color:var(--abc-accidental)}.abc-duration{font-weight:600}.abc-duration-long{color:var(--abc-duration-long)}.abc-duration-short{color:var(--abc-duration-short)}.abc-duration-fraction{color:var(--abc-duration-fraction)}.abc-broken-rhythm{color:var(--abc-broken);font-weight:700}.abc-bar{color:var(--abc-bar);font-weight:600}.abc-bar-double{color:var(--abc-bar-double);font-weight:900}.abc-chord{color:var(--abc-chord)}.abc-slur{font-weight:700}.abc-slur-level-0{color:var(--abc-slur-0)}.abc-slur-level-1{color:var(--abc-slur-1)}.abc-slur-level-2{color:var(--abc-slur-2)}.abc-slur-level-3{color:var(--abc-slur-3)}.abc-slur-level-4{color:var(--abc-slur-4)}.abc-tuplet{color:var(--abc-tuplet);font-weight:700}.abc-tie{color:var(--abc-tie);font-weight:600}.abc-tie-dotted{color:var(--abc-tie-dotted)}.abc-ornament{color:var(--abc-ornament);font-weight:700}.abc-chord-symbol{color:var(--abc-chord-symbol);font-weight:700}.abc-annotation{color:var(--abc-annotation);font-style:italic;font-weight:600}.abc-decoration{color:var(--abc-decoration);font-weight:700}.abc-grace-note{color:var(--abc-grace);font-weight:600}.abc-volta-bracket{color:var(--abc-volta);font-weight:700}.abc-inline-field-bracket{color:var(--abc-inline-bracket)}.abc-inline-field-key{color:var(--abc-inline-key);font-weight:600}.abc-inline-field-value{color:var(--abc-inline-value)}.abc-comment{color:var(--abc-comment);font-style:italic}.abc-text{color:var(--abc-ink)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-600:oklch(54.6% .245 262.881);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-950:oklch(12.9% .042 264.695);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.inline{display:inline}.table{display:table}.h-1\\/3{height:33.3333%}.h-2\\/3{height:66.6667%}.h-full{height:100%}.h-screen{height:100vh}.w-full{width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-start{align-items:flex-start}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-slate-600{border-color:var(--color-slate-600)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-950{background-color:var(--color-slate-950)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.pr-3{padding-right:calc(var(--spacing)*3)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-slate-200{color:var(--color-slate-200)}.text-slate-500{color:var(--color-slate-500)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[foo\\:bar\\]{foo:bar}.last\\:mb-0:last-child{margin-bottom:calc(var(--spacing)*0)}@media(hover:hover){.hover\\:bg-slate-700:hover{background-color:var(--color-slate-700)}}@media(min-width:48rem){.md\\:h-full{height:100%}.md\\:w-1\\/2{width:50%}.md\\:flex-row{flex-direction:row}}}:root{--abc-ink:#1a1a1a;--abc-key:#06c;--abc-value:#996300;--abc-lyrics-key:#c06;--abc-lyrics-value:#b30059;--abc-note:#000;--abc-octave-high:#00994d;--abc-octave-low:#60c;--abc-rest:#666;--abc-rest-muted:#999;--abc-accidental:#b35900;--abc-duration-long:#cc5200;--abc-duration-short:#09c;--abc-duration-fraction:#c90;--abc-broken:#00b359;--abc-bar:#0080cc;--abc-bar-double:#06c;--abc-chord:#c09;--abc-slur-0:#cc004d;--abc-slur-1:#cc8000;--abc-slur-2:#0080cc;--abc-slur-3:#00b359;--abc-slur-4:#70c;--abc-tuplet:#00b359;--abc-tie:#c06;--abc-tie-dotted:#cc0080;--abc-ornament:#56c;--abc-chord-symbol:#00997a;--abc-annotation:#c80;--abc-decoration:#86c;--abc-grace:#66b300;--abc-volta:#c60;--abc-inline-bracket:#666;--abc-inline-key:#06c;--abc-inline-value:#960;--abc-comment:#999}[data-theme=dark]{--abc-ink:#e8f1ff;--abc-key:#7ad7ff;--abc-value:#ffd48a;--abc-lyrics-key:#ff7ba1;--abc-lyrics-value:#ffc8d8;--abc-note:#f8fbff;--abc-octave-high:#73f8c4;--abc-octave-low:#c7b3ff;--abc-rest:#8ca3b8;--abc-rest-muted:#596779;--abc-accidental:#f2c079;--abc-duration-long:#ffa25f;--abc-duration-short:#6edff6;--abc-duration-fraction:#ffe38f;--abc-broken:#7be495;--abc-bar:#79cfff;--abc-bar-double:#4aafff;--abc-chord:#ff8ccf;--abc-slur-0:#ff92b2;--abc-slur-1:#ffd77a;--abc-slur-2:#7ed4ff;--abc-slur-3:#92f3c6;--abc-slur-4:#c6a9ff;--abc-tuplet:#82f0a2;--abc-tie:#f07fb3;--abc-tie-dotted:#ff9ecf;--abc-ornament:#9fb0ff;--abc-chord-symbol:#63f5d3;--abc-annotation:#ffd88a;--abc-decoration:#d1a6ff;--abc-grace:#a4f28f;--abc-volta:#f9a15a;--abc-inline-bracket:#8ca7c0;--abc-inline-key:#7ad7ff;--abc-inline-value:#ffdcb2;--abc-comment:#7b8797}.abc-preview svg text{fill:#000!important}.abc-preview[data-theme=dark] svg text{fill:#fff!important}textarea::placeholder{color:#999;opacity:1}[data-theme=dark] textarea::placeholder{color:#64748b}.abc-meta-key{color:var(--abc-key);font-weight:600}.abc-meta-value{color:var(--abc-value)}.abc-lyrics-key{color:var(--abc-lyrics-key);font-weight:600}.abc-lyrics-value{color:var(--abc-lyrics-value)}.abc-note{color:var(--abc-note)}.abc-octave-high{color:var(--abc-octave-high);font-weight:600}.abc-octave-low{color:var(--abc-octave-low);font-weight:600}.abc-rest{color:var(--abc-rest)}.abc-rest-invisible{color:var(--abc-rest-muted);opacity:.5}.abc-accidental{color:var(--abc-accidental)}.abc-duration{font-weight:600}.abc-duration-long{color:var(--abc-duration-long)}.abc-duration-short{color:var(--abc-duration-short)}.abc-duration-fraction{color:var(--abc-duration-fraction)}.abc-broken-rhythm{color:var(--abc-broken);font-weight:700}.abc-bar{color:var(--abc-bar);font-weight:600}.abc-bar-double{color:var(--abc-bar-double);font-weight:900}.abc-chord{color:var(--abc-chord)}.abc-slur{font-weight:700}.abc-slur-level-0{color:var(--abc-slur-0)}.abc-slur-level-1{color:var(--abc-slur-1)}.abc-slur-level-2{color:var(--abc-slur-2)}.abc-slur-level-3{color:var(--abc-slur-3)}.abc-slur-level-4{color:var(--abc-slur-4)}.abc-tuplet{color:var(--abc-tuplet);font-weight:700}.abc-tie{color:var(--abc-tie);font-weight:600}.abc-tie-dotted{color:var(--abc-tie-dotted)}.abc-ornament{color:var(--abc-ornament);font-weight:700}.abc-chord-symbol{color:var(--abc-chord-symbol);font-weight:700}.abc-annotation{color:var(--abc-annotation);font-style:italic;font-weight:600}.abc-decoration{color:var(--abc-decoration);font-weight:700}.abc-grace-note{color:var(--abc-grace);font-weight:600}.abc-volta-bracket{color:var(--abc-volta);font-weight:700}.abc-inline-field-bracket{color:var(--abc-inline-bracket)}.abc-inline-field-key{color:var(--abc-inline-key);font-weight:600}.abc-inline-field-value{color:var(--abc-inline-value)}.abc-comment{color:var(--abc-comment);font-style:italic}.abc-text{color:var(--abc-ink)}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  import { jsx as h, jsxs as T } from "react/jsx-runtime";
3
- import { useState as M, useCallback as N, useEffect as B, useRef as I, useMemo as F } from "react";
4
- import K from "abcjs";
5
- const j = (t) => t.split(`
6
- `).map((s, r) => r + 1).join(`
7
- `), y = /^([ABCDFGHIKLMmNOPQRrSsTUVWwXZ]:)(.*)$/, E = /[A-Ga-g]/, H = /[\^_=]/, V = /[',]/, G = /\|[:|\]]?|:?\|/, Q = /[\\[\]]/, z = /[()]/, Y = /^\(\d+$/, P = /^\/?\d+(\/\d+)?$/, k = /[zZx]/, $ = /^\.?-$/, J = /[.~HLMOPSTuv]/, X = /^"[^"]*"$/, O = /^"[\^_<>@][^"]*"$/, Z = /^![^!]+!$/, q = /^\{[^}]+\}$/, tt = /^\[\d+$/, et = /^\[([ABCDFGHIKLMmNOPQRrSsTUVWwXZ]):([^\]]*)\]$/, nt = /^[<>]+$/, st = /^%.*$/, d = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;"), rt = (t, e) => {
8
- const s = t[e];
9
- if (s !== "|" && s !== ":")
3
+ import { useState as k, useCallback as I, useEffect as L, useRef as y, useMemo as K } from "react";
4
+ import j from "abcjs";
5
+ const V = (e) => e.split(`
6
+ `).map((n, s) => s + 1).join(`
7
+ `), C = /^([ABCDFGHIKLMmNOPQRrSsTUVWwXZ]:)(.*)$/, E = /[A-Ga-g]/, G = /[\^_=]/, Q = /[',]/, z = /\|[:|\]]?|:?\|/, Y = /[\\[\]]/, J = /[()]/, X = /^\(\d+$/, P = /^\/?\d+(\/\d+)?$/, O = /[zZx]/, $ = /^\.?-$/, Z = /[.~HLMOPSTuv]/, q = /^"[^"]*"$/, R = /^"[\^_<>@][^"]*"$/, ee = /^![^!]+!$/, te = /^\{[^}]+\}$/, ne = /^\[\d+$/, se = /^\[([ABCDFGHIKLMmNOPQRrSsTUVWwXZ]):([^\]]*)\]$/, re = /^[<>]+$/, le = /^%.*$/, d = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;"), ae = (e, t) => {
8
+ const n = e[t];
9
+ if (n !== "|" && n !== ":")
10
10
  return null;
11
- let r = s, l = e + 1;
12
- for (; l < t.length && (t[l] === "|" || t[l] === ":" || t[l] === "]"); )
13
- r += t[l], l++;
14
- return G.test(r) ? {
15
- html: `<span class="${r === "||" ? "abc-bar-double" : "abc-bar"}">${d(r)}</span>`,
11
+ let s = n, l = t + 1;
12
+ for (; l < e.length && (e[l] === "|" || e[l] === ":" || e[l] === "]"); )
13
+ s += e[l], l++;
14
+ return z.test(s) ? {
15
+ html: `<span class="${s === "||" ? "abc-bar-double" : "abc-bar"}">${d(s)}</span>`,
16
16
  nextIndex: l
17
17
  } : null;
18
- }, lt = (t, e) => {
19
- const s = t[e];
20
- return H.test(s) ? {
21
- html: `<span class="abc-accidental">${d(s)}</span>`,
22
- nextIndex: e + 1
18
+ }, oe = (e, t) => {
19
+ const n = e[t];
20
+ return G.test(n) ? {
21
+ html: `<span class="abc-accidental">${d(n)}</span>`,
22
+ nextIndex: t + 1
23
23
  } : null;
24
- }, at = (t, e, s) => {
25
- const r = t[e];
26
- if (!z.test(r))
24
+ }, ce = (e, t, n) => {
25
+ const s = e[t];
26
+ if (!J.test(s))
27
27
  return null;
28
- if (r === "(") {
29
- if (e + 1 < t.length && /\d/.test(t[e + 1])) {
30
- let l = r, n = e + 1;
31
- for (; n < t.length && /\d/.test(t[n]); )
32
- l += t[n], n++;
33
- if (Y.test(l))
28
+ if (s === "(") {
29
+ if (t + 1 < e.length && /\d/.test(e[t + 1])) {
30
+ let l = s, r = t + 1;
31
+ for (; r < e.length && /\d/.test(e[r]); )
32
+ l += e[r], r++;
33
+ if (X.test(l))
34
34
  return {
35
35
  html: `<span class="abc-tuplet">${d(l)}</span>`,
36
- nextIndex: n,
36
+ nextIndex: r,
37
37
  slurLevelDelta: 0
38
38
  };
39
39
  }
40
40
  return {
41
- html: `<span class="abc-slur abc-slur-level-${s % 5}">${d(r)}</span>`,
42
- nextIndex: e + 1,
41
+ html: `<span class="abc-slur abc-slur-level-${n % 5}">${d(s)}</span>`,
42
+ nextIndex: t + 1,
43
43
  slurLevelDelta: 1
44
44
  };
45
- } else if (r === ")")
45
+ } else if (s === ")")
46
46
  return {
47
- html: `<span class="abc-slur abc-slur-level-${Math.max(0, s - 1) % 5}">${d(r)}</span>`,
48
- nextIndex: e + 1,
47
+ html: `<span class="abc-slur abc-slur-level-${Math.max(0, n - 1) % 5}">${d(s)}</span>`,
48
+ nextIndex: t + 1,
49
49
  slurLevelDelta: -1
50
50
  };
51
51
  return null;
52
- }, ot = (t, e) => {
53
- const s = t[e];
54
- if (!E.test(s))
52
+ }, ie = (e, t) => {
53
+ const n = e[t];
54
+ if (!E.test(n))
55
55
  return null;
56
- let r = `<span class="abc-note">${d(s)}</span>`, l = e + 1, n = "";
57
- for (; l < t.length && V.test(t[l]); )
58
- n += t[l], l++;
59
- if (n) {
60
- const c = n[0] === "'" ? "abc-octave-high" : "abc-octave-low";
61
- r += `<span class="${c}">${d(n)}</span>`;
56
+ let s = `<span class="abc-note">${d(n)}</span>`, l = t + 1, r = "";
57
+ for (; l < e.length && Q.test(e[l]); )
58
+ r += e[l], l++;
59
+ if (r) {
60
+ const c = r[0] === "'" ? "abc-octave-high" : "abc-octave-low";
61
+ s += `<span class="${c}">${d(r)}</span>`;
62
62
  }
63
63
  let a = "";
64
- if (l < t.length && (t[l] === "/" || /\d/.test(t[l]))) {
65
- for (t[l] === "/" && (a += t[l], l++); l < t.length && /\d/.test(t[l]); )
66
- a += t[l], l++;
67
- if (l < t.length && t[l] === "/")
68
- for (a += t[l], l++; l < t.length && /\d/.test(t[l]); )
69
- a += t[l], l++;
64
+ if (l < e.length && (e[l] === "/" || /\d/.test(e[l]))) {
65
+ for (e[l] === "/" && (a += e[l], l++); l < e.length && /\d/.test(e[l]); )
66
+ a += e[l], l++;
67
+ if (l < e.length && e[l] === "/")
68
+ for (a += e[l], l++; l < e.length && /\d/.test(e[l]); )
69
+ a += e[l], l++;
70
70
  if (a && P.test(a)) {
71
71
  let c = "abc-duration";
72
- a.startsWith("/") ? c += " abc-duration-short" : a.includes("/") ? c += " abc-duration-fraction" : c += " abc-duration-long", r += `<span class="${c}">${d(a)}</span>`;
72
+ a.startsWith("/") ? c += " abc-duration-short" : a.includes("/") ? c += " abc-duration-fraction" : c += " abc-duration-long", s += `<span class="${c}">${d(a)}</span>`;
73
73
  }
74
74
  }
75
75
  return {
76
- html: r,
76
+ html: s,
77
77
  nextIndex: l
78
78
  };
79
- }, ct = (t, e) => {
80
- const s = t[e];
81
- return Q.test(s) ? {
82
- html: `<span class="abc-chord">${d(s)}</span>`,
83
- nextIndex: e + 1
79
+ }, ue = (e, t) => {
80
+ const n = e[t];
81
+ return Y.test(n) ? {
82
+ html: `<span class="abc-chord">${d(n)}</span>`,
83
+ nextIndex: t + 1
84
84
  } : null;
85
- }, it = (t, e) => {
86
- const s = t[e];
87
- if (!k.test(s))
85
+ }, de = (e, t) => {
86
+ const n = e[t];
87
+ if (!O.test(n))
88
88
  return null;
89
- let l = `<span class="${s === "x" ? "abc-rest-invisible" : "abc-rest"}">${d(s)}</span>`, n = e + 1, a = "";
90
- if (n < t.length && (t[n] === "/" || /\d/.test(t[n]))) {
91
- for (t[n] === "/" && (a += t[n], n++); n < t.length && /\d/.test(t[n]); )
92
- a += t[n], n++;
93
- if (n < t.length && t[n] === "/")
94
- for (a += t[n], n++; n < t.length && /\d/.test(t[n]); )
95
- a += t[n], n++;
89
+ let l = `<span class="${n === "x" ? "abc-rest-invisible" : "abc-rest"}">${d(n)}</span>`, r = t + 1, a = "";
90
+ if (r < e.length && (e[r] === "/" || /\d/.test(e[r]))) {
91
+ for (e[r] === "/" && (a += e[r], r++); r < e.length && /\d/.test(e[r]); )
92
+ a += e[r], r++;
93
+ if (r < e.length && e[r] === "/")
94
+ for (a += e[r], r++; r < e.length && /\d/.test(e[r]); )
95
+ a += e[r], r++;
96
96
  if (a && P.test(a)) {
97
97
  let c = "abc-duration";
98
98
  a.startsWith("/") ? c += " abc-duration-short" : a.includes("/") ? c += " abc-duration-fraction" : c += " abc-duration-long", l += `<span class="${c}">${d(a)}</span>`;
@@ -100,207 +100,207 @@ const j = (t) => t.split(`
100
100
  }
101
101
  return {
102
102
  html: l,
103
- nextIndex: n
103
+ nextIndex: r
104
104
  };
105
- }, ut = (t, e) => {
106
- const s = t[e];
107
- return s === "." && e + 1 < t.length && t[e + 1] === "-" && $.test(".-") ? {
105
+ }, pe = (e, t) => {
106
+ const n = e[t];
107
+ return n === "." && t + 1 < e.length && e[t + 1] === "-" && $.test(".-") ? {
108
108
  html: `<span class="abc-tie abc-tie-dotted">${d(".-")}</span>`,
109
- nextIndex: e + 2
110
- } : s === "-" && $.test(s) ? {
111
- html: `<span class="abc-tie">${d(s)}</span>`,
112
- nextIndex: e + 1
109
+ nextIndex: t + 2
110
+ } : n === "-" && $.test(n) ? {
111
+ html: `<span class="abc-tie">${d(n)}</span>`,
112
+ nextIndex: t + 1
113
113
  } : null;
114
- }, dt = (t, e) => {
115
- const s = t[e];
116
- return !J.test(s) || s === "." && e + 1 < t.length && t[e + 1] === "-" ? null : {
117
- html: `<span class="abc-ornament">${d(s)}</span>`,
118
- nextIndex: e + 1
114
+ }, he = (e, t) => {
115
+ const n = e[t];
116
+ return !Z.test(n) || n === "." && t + 1 < e.length && e[t + 1] === "-" ? null : {
117
+ html: `<span class="abc-ornament">${d(n)}</span>`,
118
+ nextIndex: t + 1
119
119
  };
120
- }, pt = (t, e) => {
121
- if (t[e] !== '"')
120
+ }, fe = (e, t) => {
121
+ if (e[t] !== '"')
122
122
  return null;
123
- let r = e + 1;
124
- for (; r < t.length && t[r] !== '"'; )
125
- r++;
126
- if (r >= t.length)
123
+ let s = t + 1;
124
+ for (; s < e.length && e[s] !== '"'; )
125
+ s++;
126
+ if (s >= e.length)
127
127
  return null;
128
- const l = t.substring(e, r + 1);
129
- return O.test(l) ? {
128
+ const l = e.substring(t, s + 1);
129
+ return R.test(l) ? {
130
130
  html: `<span class="abc-annotation">${d(l)}</span>`,
131
- nextIndex: r + 1
131
+ nextIndex: s + 1
132
132
  } : null;
133
- }, ht = (t, e) => {
134
- if (t[e] !== '"')
133
+ }, me = (e, t) => {
134
+ if (e[t] !== '"')
135
135
  return null;
136
- let r = e + 1;
137
- for (; r < t.length && t[r] !== '"'; )
138
- r++;
139
- if (r >= t.length)
136
+ let s = t + 1;
137
+ for (; s < e.length && e[s] !== '"'; )
138
+ s++;
139
+ if (s >= e.length)
140
140
  return null;
141
- const l = t.substring(e, r + 1);
142
- return O.test(l) || !X.test(l) ? null : {
141
+ const l = e.substring(t, s + 1);
142
+ return R.test(l) || !q.test(l) ? null : {
143
143
  html: `<span class="abc-chord-symbol">${d(l)}</span>`,
144
- nextIndex: r + 1
144
+ nextIndex: s + 1
145
145
  };
146
- }, ft = (t, e) => {
147
- if (t[e] !== "!")
146
+ }, ge = (e, t) => {
147
+ if (e[t] !== "!")
148
148
  return null;
149
- let r = e + 1;
150
- for (; r < t.length && t[r] !== "!"; )
151
- r++;
152
- if (r >= t.length)
149
+ let s = t + 1;
150
+ for (; s < e.length && e[s] !== "!"; )
151
+ s++;
152
+ if (s >= e.length)
153
153
  return null;
154
- const l = t.substring(e, r + 1);
155
- return Z.test(l) ? {
154
+ const l = e.substring(t, s + 1);
155
+ return ee.test(l) ? {
156
156
  html: `<span class="abc-decoration">${d(l)}</span>`,
157
- nextIndex: r + 1
157
+ nextIndex: s + 1
158
158
  } : null;
159
- }, mt = (t, e) => {
160
- if (t[e] !== "{")
159
+ }, be = (e, t) => {
160
+ if (e[t] !== "{")
161
161
  return null;
162
- let r = e + 1;
163
- for (; r < t.length && t[r] !== "}"; )
164
- r++;
165
- if (r >= t.length)
162
+ let s = t + 1;
163
+ for (; s < e.length && e[s] !== "}"; )
164
+ s++;
165
+ if (s >= e.length)
166
166
  return null;
167
- const l = t.substring(e, r + 1);
168
- return q.test(l) ? {
167
+ const l = e.substring(t, s + 1);
168
+ return te.test(l) ? {
169
169
  html: `<span class="abc-grace-note">${d(l)}</span>`,
170
- nextIndex: r + 1
170
+ nextIndex: s + 1
171
171
  } : null;
172
- }, gt = (t, e) => {
173
- if (t[e] !== "[")
172
+ }, ve = (e, t) => {
173
+ if (e[t] !== "[")
174
174
  return null;
175
- let r = e + 1;
176
- for (; r < t.length && t[r] !== "]"; )
177
- r++;
178
- if (r >= t.length)
175
+ let s = t + 1;
176
+ for (; s < e.length && e[s] !== "]"; )
177
+ s++;
178
+ if (s >= e.length)
179
179
  return null;
180
- const n = t.substring(e, r + 1).match(et);
181
- if (!n)
180
+ const r = e.substring(t, s + 1).match(se);
181
+ if (!r)
182
182
  return null;
183
- const [, a, c] = n;
183
+ const [, a, c] = r;
184
184
  return {
185
185
  html: `<span class="abc-inline-field-bracket">[</span><span class="abc-inline-field-key">${d(a)}:</span><span class="abc-inline-field-value">${d(c)}</span><span class="abc-inline-field-bracket">]</span>`,
186
- nextIndex: r + 1
186
+ nextIndex: s + 1
187
187
  };
188
- }, bt = (t, e) => {
189
- if (t[e] !== "[" || e + 1 >= t.length || !/\d/.test(t[e + 1]))
188
+ }, Ae = (e, t) => {
189
+ if (e[t] !== "[" || t + 1 >= e.length || !/\d/.test(e[t + 1]))
190
190
  return null;
191
- let r = e + 1;
192
- for (; r < t.length && /\d/.test(t[r]); )
193
- r++;
194
- const l = t.substring(e, r);
195
- return tt.test(l) ? {
191
+ let s = t + 1;
192
+ for (; s < e.length && /\d/.test(e[s]); )
193
+ s++;
194
+ const l = e.substring(t, s);
195
+ return ne.test(l) ? {
196
196
  html: `<span class="abc-volta-bracket">${d(l)}</span>`,
197
- nextIndex: r
197
+ nextIndex: s
198
198
  } : null;
199
- }, vt = (t, e) => {
200
- const s = t[e];
201
- if (s !== ">" && s !== "<")
199
+ }, xe = (e, t) => {
200
+ const n = e[t];
201
+ if (n !== ">" && n !== "<")
202
202
  return null;
203
- let r = e + 1;
204
- for (; r < t.length && t[r] === s; )
205
- r++;
206
- const l = t.substring(e, r);
207
- return nt.test(l) ? {
203
+ let s = t + 1;
204
+ for (; s < e.length && e[s] === n; )
205
+ s++;
206
+ const l = e.substring(t, s);
207
+ return re.test(l) ? {
208
208
  html: `<span class="abc-broken-rhythm">${d(l)}</span>`,
209
- nextIndex: r
209
+ nextIndex: s
210
210
  } : null;
211
- }, xt = (t) => {
212
- let e = "", s = 0, r = 0;
213
- for (; s < t.length; ) {
214
- const l = rt(t, s);
211
+ }, Te = (e) => {
212
+ let t = "", n = 0, s = 0;
213
+ for (; n < e.length; ) {
214
+ const l = ae(e, n);
215
215
  if (l) {
216
- e += l.html, s = l.nextIndex;
216
+ t += l.html, n = l.nextIndex;
217
217
  continue;
218
218
  }
219
- const n = ft(t, s);
220
- if (n) {
221
- e += n.html, s = n.nextIndex;
219
+ const r = ge(e, n);
220
+ if (r) {
221
+ t += r.html, n = r.nextIndex;
222
222
  continue;
223
223
  }
224
- const a = mt(t, s);
224
+ const a = be(e, n);
225
225
  if (a) {
226
- e += a.html, s = a.nextIndex;
226
+ t += a.html, n = a.nextIndex;
227
227
  continue;
228
228
  }
229
- const c = lt(t, s);
229
+ const c = oe(e, n);
230
230
  if (c) {
231
- e += c.html, s = c.nextIndex;
231
+ t += c.html, n = c.nextIndex;
232
232
  continue;
233
233
  }
234
- const v = dt(t, s);
235
- if (v) {
236
- e += v.html, s = v.nextIndex;
234
+ const b = he(e, n);
235
+ if (b) {
236
+ t += b.html, n = b.nextIndex;
237
237
  continue;
238
238
  }
239
- const f = pt(t, s);
239
+ const f = fe(e, n);
240
240
  if (f) {
241
- e += f.html, s = f.nextIndex;
241
+ t += f.html, n = f.nextIndex;
242
242
  continue;
243
243
  }
244
- const i = ht(t, s);
244
+ const i = me(e, n);
245
245
  if (i) {
246
- e += i.html, s = i.nextIndex;
246
+ t += i.html, n = i.nextIndex;
247
247
  continue;
248
248
  }
249
- const o = at(t, s, r);
249
+ const o = ce(e, n, s);
250
250
  if (o) {
251
- e += o.html, s = o.nextIndex, o.slurLevelDelta && (r += o.slurLevelDelta);
251
+ t += o.html, n = o.nextIndex, o.slurLevelDelta && (s += o.slurLevelDelta);
252
252
  continue;
253
253
  }
254
- const u = it(t, s);
254
+ const u = de(e, n);
255
255
  if (u) {
256
- e += u.html, s = u.nextIndex;
256
+ t += u.html, n = u.nextIndex;
257
257
  continue;
258
258
  }
259
- const p = ot(t, s);
259
+ const p = ie(e, n);
260
260
  if (p) {
261
- e += p.html, s = p.nextIndex;
261
+ t += p.html, n = p.nextIndex;
262
262
  continue;
263
263
  }
264
- const x = vt(t, s);
265
- if (x) {
266
- e += x.html, s = x.nextIndex;
264
+ const v = xe(e, n);
265
+ if (v) {
266
+ t += v.html, n = v.nextIndex;
267
267
  continue;
268
268
  }
269
- const m = gt(t, s);
269
+ const m = ve(e, n);
270
270
  if (m) {
271
- e += m.html, s = m.nextIndex;
271
+ t += m.html, n = m.nextIndex;
272
272
  continue;
273
273
  }
274
- const g = bt(t, s);
274
+ const g = Ae(e, n);
275
275
  if (g) {
276
- e += g.html, s = g.nextIndex;
276
+ t += g.html, n = g.nextIndex;
277
277
  continue;
278
278
  }
279
- const A = ct(t, s);
279
+ const A = ue(e, n);
280
280
  if (A) {
281
- e += A.html, s = A.nextIndex;
281
+ t += A.html, n = A.nextIndex;
282
282
  continue;
283
283
  }
284
- const b = ut(t, s);
285
- if (b) {
286
- e += b.html, s = b.nextIndex;
284
+ const N = pe(e, n);
285
+ if (N) {
286
+ t += N.html, n = N.nextIndex;
287
287
  continue;
288
288
  }
289
- e += `<span class="abc-text">${d(t[s])}</span>`, s++;
289
+ t += `<span class="abc-text">${d(e[n])}</span>`, n++;
290
290
  }
291
- return e;
292
- }, _ = (t) => t.split(`
293
- `).map((s) => {
294
- if (st.test(s))
295
- return `<span class="abc-comment">${d(s)}</span>`;
296
- const r = s.match(y);
297
- if (r) {
298
- const [, l, n] = r;
299
- return l === "w:" || l === "W:" ? `<span class="abc-lyrics-key">${d(l)}</span><span class="abc-lyrics-value">${d(n)}</span>` : `<span class="abc-meta-key">${d(l)}</span><span class="abc-meta-value">${d(n)}</span>`;
291
+ return t;
292
+ }, _ = (e) => e.split(`
293
+ `).map((n) => {
294
+ if (le.test(n))
295
+ return `<span class="abc-comment">${d(n)}</span>`;
296
+ const s = n.match(C);
297
+ if (s) {
298
+ const [, l, r] = s;
299
+ return l === "w:" || l === "W:" ? `<span class="abc-lyrics-key">${d(l)}</span><span class="abc-lyrics-value">${d(r)}</span>` : `<span class="abc-meta-key">${d(l)}</span><span class="abc-meta-value">${d(r)}</span>`;
300
300
  }
301
- return xt(s);
301
+ return Te(n);
302
302
  }).join(`
303
- `), At = {
303
+ `), Ne = {
304
304
  "X:": [
305
305
  { value: "1", description: "Reference number 1" },
306
306
  { value: "2", description: "Reference number 2" }
@@ -446,7 +446,7 @@ const j = (t) => t.split(`
446
446
  { value: "Your Name", description: "Transcriber name" },
447
447
  { value: "ABC transcription", description: "Transcription note" }
448
448
  ]
449
- }, Tt = (t) => At[t] || [], Nt = [
449
+ }, Ie = (e) => Ne[e] || [], ye = [
450
450
  {
451
451
  value: "/header",
452
452
  description: "Insert basic ABC header template",
@@ -457,14 +457,14 @@ L:1/4
457
457
  K:C
458
458
  `
459
459
  }
460
- ], It = (t) => t.startsWith("/") ? Nt.filter(
461
- (e) => e.value.toLowerCase().startsWith(t.toLowerCase())
462
- ) : [], yt = ({
463
- value: t,
464
- textareaRef: e,
465
- onChange: s
460
+ ], Ce = (e) => e.startsWith("/") ? ye.filter(
461
+ (t) => t.value.toLowerCase().startsWith(e.toLowerCase())
462
+ ) : [], Be = ({
463
+ value: e,
464
+ textareaRef: t,
465
+ onChange: n
466
466
  }) => {
467
- const [r, l] = M({
467
+ const [s, l] = k({
468
468
  isOpen: !1,
469
469
  suggestions: [],
470
470
  selectedIndex: 0,
@@ -472,10 +472,10 @@ K:C
472
472
  fieldKey: null,
473
473
  inputValue: "",
474
474
  isCommand: !1
475
- }), n = N(() => {
476
- if (!e.current)
475
+ }), r = I(() => {
476
+ if (!t.current)
477
477
  return null;
478
- const i = e.current.selectionStart, o = t.substring(0, i).split(`
478
+ const i = t.current.selectionStart, o = e.substring(0, i).split(`
479
479
  `), u = o[o.length - 1];
480
480
  if (u.startsWith("/"))
481
481
  return {
@@ -485,11 +485,11 @@ K:C
485
485
  lineStartPos: i - u.length,
486
486
  isCommand: !0
487
487
  };
488
- const p = u.match(y);
488
+ const p = u.match(C);
489
489
  if (p) {
490
- const [, x, m] = p;
490
+ const [, v, m] = p;
491
491
  return {
492
- fieldKey: x,
492
+ fieldKey: v,
493
493
  inputValue: m,
494
494
  line: u,
495
495
  lineStartPos: i - u.length,
@@ -497,21 +497,21 @@ K:C
497
497
  };
498
498
  }
499
499
  return null;
500
- }, [t, e]), a = N(() => {
501
- if (!e.current)
500
+ }, [e, t]), a = I(() => {
501
+ if (!t.current)
502
502
  return { top: 0, left: 0 };
503
- const i = e.current, o = i.selectionStart, p = t.substring(0, o).split(`
504
- `).length - 1, x = parseFloat(getComputedStyle(i).lineHeight) || 24;
505
- return { top: (parseFloat(getComputedStyle(i).paddingTop) || 16) + (p + 1) * x - i.scrollTop, left: 60 };
506
- }, [t, e]);
507
- B(() => {
508
- const i = n();
503
+ const i = t.current, o = i.selectionStart, p = e.substring(0, o).split(`
504
+ `).length - 1, v = parseFloat(getComputedStyle(i).lineHeight) || 24;
505
+ return { top: (parseFloat(getComputedStyle(i).paddingTop) || 16) + (p + 1) * v - i.scrollTop, left: 60 };
506
+ }, [e, t]);
507
+ L(() => {
508
+ const i = r();
509
509
  if (!i) {
510
510
  l((u) => ({ ...u, isOpen: !1 }));
511
511
  return;
512
512
  }
513
513
  let o = [];
514
- if (i.isCommand ? o = It(i.inputValue) : i.fieldKey && (o = Tt(i.fieldKey).filter(
514
+ if (i.isCommand ? o = Ce(i.inputValue) : i.fieldKey && (o = Ie(i.fieldKey).filter(
515
515
  (p) => p.value.toLowerCase().startsWith(i.inputValue.toLowerCase())
516
516
  )), o.length > 0) {
517
517
  const u = a();
@@ -526,30 +526,30 @@ K:C
526
526
  });
527
527
  } else
528
528
  l((u) => ({ ...u, isOpen: !1 }));
529
- }, [t, n, a]);
530
- const c = N(
529
+ }, [e, r, a]);
530
+ const c = I(
531
531
  (i) => {
532
- if (!e.current)
532
+ if (!t.current)
533
533
  return;
534
- const o = e.current.selectionStart, u = t.substring(0, o).split(`
534
+ const o = t.current.selectionStart, u = e.substring(0, o).split(`
535
535
  `), p = u[u.length - 1];
536
- let x, m;
537
- if (r.isCommand && i.template) {
538
- const g = t.substring(0, o - p.length), A = t.substring(o);
539
- x = g + i.template + A, m = g.length + i.template.length;
540
- } else if (r.fieldKey) {
541
- const g = r.fieldKey + i.value, A = t.substring(0, o - p.length), b = t.substring(o);
542
- x = A + g + b, m = A.length + g.length;
536
+ let v, m;
537
+ if (s.isCommand && i.template) {
538
+ const g = e.substring(0, o - p.length), A = e.substring(o);
539
+ v = g + i.template + A, m = g.length + i.template.length;
540
+ } else if (s.fieldKey) {
541
+ const g = s.fieldKey + i.value, A = e.substring(0, o - p.length), N = e.substring(o);
542
+ v = A + g + N, m = A.length + g.length;
543
543
  } else
544
544
  return;
545
- s(x), setTimeout(() => {
546
- e.current && (e.current.selectionStart = m, e.current.selectionEnd = m, e.current.focus());
545
+ n(v), setTimeout(() => {
546
+ t.current && (t.current.selectionStart = m, t.current.selectionEnd = m, t.current.focus());
547
547
  }, 0), l((g) => ({ ...g, isOpen: !1 }));
548
548
  },
549
- [e, r.fieldKey, r.isCommand, t, s]
550
- ), v = N(
549
+ [t, s.fieldKey, s.isCommand, e, n]
550
+ ), b = I(
551
551
  (i) => {
552
- if (r.isOpen)
552
+ if (s.isOpen)
553
553
  switch (i.key) {
554
554
  case "ArrowDown":
555
555
  i.preventDefault(), l((o) => ({
@@ -564,57 +564,57 @@ K:C
564
564
  }));
565
565
  break;
566
566
  case "Enter":
567
- r.suggestions.length > 0 && (i.preventDefault(), c(r.suggestions[r.selectedIndex]));
567
+ s.suggestions.length > 0 && (i.preventDefault(), c(s.suggestions[s.selectedIndex]));
568
568
  break;
569
569
  case "Escape":
570
570
  i.preventDefault(), l((o) => ({ ...o, isOpen: !1 }));
571
571
  break;
572
572
  }
573
573
  },
574
- [r.isOpen, r.suggestions, r.selectedIndex, c]
575
- ), f = N((i) => {
574
+ [s.isOpen, s.suggestions, s.selectedIndex, c]
575
+ ), f = I((i) => {
576
576
  l((o) => ({ ...o, selectedIndex: i }));
577
577
  }, []);
578
578
  return {
579
- isOpen: r.isOpen,
580
- suggestions: r.suggestions,
581
- selectedIndex: r.selectedIndex,
582
- position: r.position,
583
- handleKeyDown: v,
579
+ isOpen: s.isOpen,
580
+ suggestions: s.suggestions,
581
+ selectedIndex: s.selectedIndex,
582
+ position: s.position,
583
+ handleKeyDown: b,
584
584
  selectSuggestion: c,
585
585
  handleMouseEnter: f
586
586
  };
587
- }, Ct = ({
588
- suggestions: t,
589
- selectedIndex: e,
590
- position: s,
591
- onSelect: r,
587
+ }, we = ({
588
+ suggestions: e,
589
+ selectedIndex: t,
590
+ position: n,
591
+ onSelect: s,
592
592
  onMouseEnter: l
593
593
  }) => {
594
- const n = I(null);
595
- return B(() => {
596
- n.current?.scrollIntoView({
594
+ const r = y(null);
595
+ return L(() => {
596
+ r.current?.scrollIntoView({
597
597
  block: "nearest",
598
598
  behavior: "smooth"
599
599
  });
600
- }, [e]), t.length === 0 ? null : /* @__PURE__ */ h(
600
+ }, [t]), e.length === 0 ? null : /* @__PURE__ */ h(
601
601
  "div",
602
602
  {
603
603
  className: "absolute z-50 bg-slate-800 border border-slate-600 rounded-md shadow-lg overflow-hidden",
604
604
  style: {
605
- top: `${s.top}px`,
606
- left: `${s.left}px`,
605
+ top: `${n.top}px`,
606
+ left: `${n.left}px`,
607
607
  minWidth: "200px",
608
608
  maxWidth: "400px",
609
609
  maxHeight: "300px",
610
610
  overflowY: "auto"
611
611
  },
612
- children: t.map((a, c) => /* @__PURE__ */ T(
612
+ children: e.map((a, c) => /* @__PURE__ */ T(
613
613
  "div",
614
614
  {
615
- ref: c === e ? n : null,
616
- className: `px-3 py-2 cursor-pointer ${c === e ? "bg-blue-600 text-white" : "text-slate-200 hover:bg-slate-700"}`,
617
- onClick: () => r(a),
615
+ ref: c === t ? r : null,
616
+ className: `px-3 py-2 cursor-pointer ${c === t ? "bg-blue-600 text-white" : "text-slate-200 hover:bg-slate-700"}`,
617
+ onClick: () => s(a),
618
618
  onMouseEnter: () => l(c),
619
619
  children: [
620
620
  /* @__PURE__ */ h("div", { className: "font-mono text-sm", children: a.value }),
@@ -625,102 +625,102 @@ K:C
625
625
  ))
626
626
  }
627
627
  );
628
- }, wt = (t) => {
629
- const e = t.trim();
630
- if (e === "C")
628
+ }, Ee = (e) => {
629
+ const t = e.trim();
630
+ if (t === "C")
631
631
  return { beatsPerMeasure: 4, beatUnit: 4 };
632
- if (e === "C|")
632
+ if (t === "C|")
633
633
  return { beatsPerMeasure: 2, beatUnit: 2 };
634
- const s = e.match(/^(\d+)\/(\d+)$/);
635
- return s ? {
636
- beatsPerMeasure: parseInt(s[1], 10),
637
- beatUnit: parseInt(s[2], 10)
634
+ const n = t.match(/^(\d+)\/(\d+)$/);
635
+ return n ? {
636
+ beatsPerMeasure: parseInt(n[1], 10),
637
+ beatUnit: parseInt(n[2], 10)
638
638
  } : { beatsPerMeasure: 4, beatUnit: 4 };
639
- }, Et = (t) => {
640
- const s = t.trim().match(/^(\d+)\/(\d+)$/);
641
- return s ? parseInt(s[1], 10) / parseInt(s[2], 10) : 1 / 8;
642
- }, Bt = (t) => {
643
- const e = t.split(`
639
+ }, Le = (e) => {
640
+ const n = e.trim().match(/^(\d+)\/(\d+)$/);
641
+ return n ? parseInt(n[1], 10) / parseInt(n[2], 10) : 1 / 8;
642
+ }, Se = (e) => {
643
+ const t = e.split(`
644
644
  `);
645
- let s = { beatsPerMeasure: 4, beatUnit: 4 }, r = 1 / 8;
646
- for (const l of e) {
647
- const n = l.match(y);
648
- if (n) {
649
- const [, a, c] = n;
650
- a === "M:" ? s = wt(c) : a === "L:" && (r = Et(c));
645
+ let n = { beatsPerMeasure: 4, beatUnit: 4 }, s = 1 / 8;
646
+ for (const l of t) {
647
+ const r = l.match(C);
648
+ if (r) {
649
+ const [, a, c] = r;
650
+ a === "M:" ? n = Ee(c) : a === "L:" && (s = Le(c));
651
651
  }
652
652
  }
653
- return { meter: s, unitNoteLength: r };
654
- }, L = (t) => {
655
- if (!t)
653
+ return { meter: n, unitNoteLength: s };
654
+ }, M = (e) => {
655
+ if (!e)
656
656
  return 1;
657
- if (t.startsWith("/"))
658
- return 1 / parseInt(t.substring(1), 10);
659
- if (t.includes("/")) {
660
- const [e, s] = t.split("/");
661
- return parseInt(e, 10) / parseInt(s, 10);
657
+ if (e.startsWith("/"))
658
+ return 1 / parseInt(e.substring(1), 10);
659
+ if (e.includes("/")) {
660
+ const [t, n] = e.split("/");
661
+ return parseInt(t, 10) / parseInt(n, 10);
662
662
  }
663
- return parseInt(t, 10);
664
- }, St = (t, e) => {
665
- let s = 0, r = 0;
666
- for (; r < t.length; ) {
667
- const l = t[r];
668
- if (E.test(l) || k.test(l)) {
669
- let n = r + 1;
670
- for (; n < t.length && (t[n] === "'" || t[n] === ","); )
671
- n++;
663
+ return parseInt(e, 10);
664
+ }, $e = (e, t) => {
665
+ let n = 0, s = 0;
666
+ for (; s < e.length; ) {
667
+ const l = e[s];
668
+ if (E.test(l) || O.test(l)) {
669
+ let r = s + 1;
670
+ for (; r < e.length && (e[r] === "'" || e[r] === ","); )
671
+ r++;
672
672
  let a = "";
673
- if (n < t.length && (t[n] === "/" || /\d/.test(t[n]))) {
674
- const o = n;
675
- for (t[n] === "/" && n++; n < t.length && /\d/.test(t[n]); )
676
- n++;
677
- if (n < t.length && t[n] === "/")
678
- for (n++; n < t.length && /\d/.test(t[n]); )
679
- n++;
680
- a = t.substring(o, n);
673
+ if (r < e.length && (e[r] === "/" || /\d/.test(e[r]))) {
674
+ const o = r;
675
+ for (e[r] === "/" && r++; r < e.length && /\d/.test(e[r]); )
676
+ r++;
677
+ if (r < e.length && e[r] === "/")
678
+ for (r++; r < e.length && /\d/.test(e[r]); )
679
+ r++;
680
+ a = e.substring(o, r);
681
681
  }
682
- const c = L(a), v = e.unitNoteLength * c, f = 1 / e.meter.beatUnit, i = v / f;
683
- s += i, r = n;
682
+ const c = M(a), b = t.unitNoteLength * c, f = 1 / t.meter.beatUnit, i = b / f;
683
+ n += i, s = r;
684
684
  } else if (l === "[") {
685
- let n = r + 1;
686
- for (; n < t.length && t[n] !== "]"; ) {
687
- const a = t[n];
685
+ let r = s + 1;
686
+ for (; r < e.length && e[r] !== "]"; ) {
687
+ const a = e[r];
688
688
  if (E.test(a)) {
689
- let c = n + 1;
690
- for (; c < t.length && (t[c] === "'" || t[c] === ","); )
689
+ let c = r + 1;
690
+ for (; c < e.length && (e[c] === "'" || e[c] === ","); )
691
691
  c++;
692
- n = c;
692
+ r = c;
693
693
  } else
694
- n++;
694
+ r++;
695
695
  }
696
- if (n < t.length && t[n] === "]") {
697
- n++;
696
+ if (r < e.length && e[r] === "]") {
697
+ r++;
698
698
  let a = "";
699
- if (n < t.length && (t[n] === "/" || /\d/.test(t[n]))) {
700
- const o = n;
701
- for (t[n] === "/" && n++; n < t.length && /\d/.test(t[n]); )
702
- n++;
703
- if (n < t.length && t[n] === "/")
704
- for (n++; n < t.length && /\d/.test(t[n]); )
705
- n++;
706
- a = t.substring(o, n);
699
+ if (r < e.length && (e[r] === "/" || /\d/.test(e[r]))) {
700
+ const o = r;
701
+ for (e[r] === "/" && r++; r < e.length && /\d/.test(e[r]); )
702
+ r++;
703
+ if (r < e.length && e[r] === "/")
704
+ for (r++; r < e.length && /\d/.test(e[r]); )
705
+ r++;
706
+ a = e.substring(o, r);
707
707
  }
708
- const c = L(a), v = e.unitNoteLength * c, f = 1 / e.meter.beatUnit, i = v / f;
709
- s += i;
708
+ const c = M(a), b = t.unitNoteLength * c, f = 1 / t.meter.beatUnit, i = b / f;
709
+ n += i;
710
710
  }
711
- r = n;
711
+ s = r;
712
712
  } else
713
- r++;
713
+ s++;
714
714
  }
715
- return s;
716
- }, $t = (t) => {
717
- const e = [], s = t.split(`
718
- `), r = Bt(t);
719
- return s.forEach((l, n) => {
720
- if (!(l.trim().startsWith("%") || y.test(l)) && l.includes("|")) {
715
+ return n;
716
+ }, _e = (e) => {
717
+ const t = [], n = e.split(`
718
+ `), s = Se(e);
719
+ return n.forEach((l, r) => {
720
+ if (!(l.trim().startsWith("%") || C.test(l)) && l.includes("|")) {
721
721
  let a = 0;
722
722
  const c = l.split("|");
723
- let v = 0;
723
+ let b = 0;
724
724
  c.forEach((f, i) => {
725
725
  if (i === c.length - 1 && f.trim() === "")
726
726
  return;
@@ -729,12 +729,12 @@ K:C
729
729
  a += f.length + 1;
730
730
  return;
731
731
  }
732
- const u = St(o, r), p = r.meter.beatsPerMeasure;
732
+ const u = $e(o, s), p = s.meter.beatsPerMeasure;
733
733
  if (Math.abs(u - p) > 0.01) {
734
734
  const m = l.indexOf(o, a), g = m + o.length;
735
- e.push({
736
- line: n,
737
- measureIndex: v,
735
+ t.push({
736
+ line: r,
737
+ measureIndex: b,
738
738
  startCol: m,
739
739
  endCol: g,
740
740
  expected: p,
@@ -742,77 +742,98 @@ K:C
742
742
  message: `Expected ${p} beats, got ${u.toFixed(2)}`
743
743
  });
744
744
  }
745
- v++, a += f.length + 1;
745
+ b++, a += f.length + 1;
746
746
  });
747
747
  }
748
- }), e;
749
- }, Pt = ({ value: t, onChange: e }) => {
750
- const s = I(null), r = I(null), l = I(null), [n, a] = M(null), c = j(t), v = _(t), f = F(() => $t(t), [t]), {
751
- isOpen: i,
752
- suggestions: o,
753
- selectedIndex: u,
754
- position: p,
755
- handleKeyDown: x,
756
- selectSuggestion: m,
757
- handleMouseEnter: g
758
- } = yt({ value: t, textareaRef: s, onChange: e }), A = () => {
759
- s.current && r.current && l.current && (r.current.scrollTop = s.current.scrollTop, l.current.scrollTop = s.current.scrollTop);
748
+ }), t;
749
+ }, Oe = ({ value: e, onChange: t, theme: n = "light" }) => {
750
+ const s = y(null), l = y(null), r = y(null), [a, c] = k(null), b = V(e), f = _(e), i = K(() => _e(e), [e]), o = n === "dark" ? {
751
+ bg: "#161616",
752
+ editorBg: "#1a1a1a",
753
+ lineNumBg: "#0f0f0f",
754
+ caretColor: "#fff",
755
+ errorHeader: "#94a3b8",
756
+ errorIcon: "#f59e0b",
757
+ errorLocation: "#22d3ee",
758
+ errorMessage: "#fcd34d",
759
+ errorHighlight: "rgba(245, 158, 11, 0.2)"
760
+ } : {
761
+ bg: "#f5f5f5",
762
+ editorBg: "#ffffff",
763
+ lineNumBg: "#eeeeee",
764
+ caretColor: "#000",
765
+ errorHeader: "#64748b",
766
+ errorIcon: "#d97706",
767
+ errorLocation: "#0891b2",
768
+ errorMessage: "#b45309",
769
+ errorHighlight: "#fde047"
770
+ }, {
771
+ isOpen: u,
772
+ suggestions: p,
773
+ selectedIndex: v,
774
+ position: m,
775
+ handleKeyDown: g,
776
+ selectSuggestion: A,
777
+ handleMouseEnter: N
778
+ } = Be({ value: e, textareaRef: s, onChange: t }), D = () => {
779
+ s.current && l.current && r.current && (l.current.scrollTop = s.current.scrollTop, r.current.scrollTop = s.current.scrollTop);
760
780
  };
761
- return /* @__PURE__ */ h("div", { className: "w-full h-full flex flex-col p-4", style: { backgroundColor: "#161616" }, children: /* @__PURE__ */ T("div", { className: "w-full flex-1 flex flex-col rounded-lg border border-slate-600 overflow-hidden", style: { backgroundColor: "#1a1a1a" }, children: [
781
+ return /* @__PURE__ */ h("div", { className: "w-full h-full flex flex-col p-4", "data-theme": n, style: { backgroundColor: o.bg }, children: /* @__PURE__ */ T("div", { className: "w-full flex-1 flex flex-col rounded-lg border border-slate-600 overflow-hidden", style: { backgroundColor: o.editorBg }, children: [
762
782
  /* @__PURE__ */ T("div", { className: "flex-1 flex overflow-hidden", children: [
763
783
  /* @__PURE__ */ h(
764
784
  "div",
765
785
  {
766
- ref: r,
786
+ ref: l,
767
787
  className: "overflow-hidden text-right text-sm font-mono leading-relaxed text-slate-500 select-none",
768
- style: { backgroundColor: "#0f0f0f", minWidth: "2.5rem" },
769
- children: /* @__PURE__ */ h("pre", { className: "m-0 pl-1 pr-3 py-4", children: c })
788
+ style: { backgroundColor: o.lineNumBg, minWidth: "2.5rem" },
789
+ children: /* @__PURE__ */ h("pre", { className: "m-0 pl-1 pr-3 py-4", children: b })
770
790
  }
771
791
  ),
772
792
  /* @__PURE__ */ T("div", { className: "flex-1 relative", children: [
773
793
  /* @__PURE__ */ h(
774
794
  "div",
775
795
  {
776
- ref: l,
796
+ ref: r,
777
797
  className: "absolute inset-0 overflow-hidden px-4 py-4 text-sm font-mono leading-relaxed pointer-events-none",
778
798
  style: {
779
- backgroundColor: "#1a1a1a",
780
- opacity: n ? 0.3 : 1,
799
+ backgroundColor: o.editorBg,
800
+ opacity: a ? 0.3 : 1,
781
801
  transition: "opacity 0.2s"
782
802
  },
783
803
  children: /* @__PURE__ */ h(
784
804
  "pre",
785
805
  {
786
806
  className: "m-0",
787
- dangerouslySetInnerHTML: { __html: v }
807
+ dangerouslySetInnerHTML: { __html: f }
788
808
  }
789
809
  )
790
810
  }
791
811
  ),
792
- n && (() => {
793
- const b = t.split(`
794
- `), R = (b[n.line] || "").substring(n.startCol, n.endCol), D = _(R);
812
+ a && (() => {
813
+ const x = e.split(`
814
+ `), U = (x[a.line] || "").substring(a.startCol, a.endCol), H = _(U);
795
815
  return /* @__PURE__ */ h(
796
816
  "div",
797
817
  {
798
818
  className: "absolute inset-0 overflow-hidden px-4 py-4 text-sm font-mono leading-relaxed pointer-events-none",
799
819
  style: { backgroundColor: "transparent" },
800
- children: /* @__PURE__ */ h("pre", { className: "m-0", children: b.map((C, w) => {
801
- if (w === n.line) {
802
- const U = C.substring(0, n.startCol), W = C.substring(n.endCol);
820
+ children: /* @__PURE__ */ h("pre", { className: "m-0", children: x.map((B, w) => {
821
+ if (w === a.line) {
822
+ const W = B.substring(0, a.startCol), F = B.substring(a.endCol);
803
823
  return /* @__PURE__ */ T("div", { children: [
804
- /* @__PURE__ */ h("span", { style: { opacity: 0 }, children: U }),
824
+ /* @__PURE__ */ h("span", { style: { opacity: 0 }, children: W }),
805
825
  /* @__PURE__ */ h(
806
826
  "span",
807
827
  {
808
- className: "bg-amber-500/20 px-1 rounded",
809
- dangerouslySetInnerHTML: { __html: D }
828
+ className: "px-1 rounded",
829
+ style: { backgroundColor: o.errorHighlight },
830
+ dangerouslySetInnerHTML: { __html: H }
810
831
  }
811
832
  ),
812
- /* @__PURE__ */ h("span", { style: { opacity: 0 }, children: W })
833
+ /* @__PURE__ */ h("span", { style: { opacity: 0 }, children: F })
813
834
  ] }, w);
814
835
  }
815
- return /* @__PURE__ */ h("div", { style: { opacity: 0 }, children: C }, w);
836
+ return /* @__PURE__ */ h("div", { style: { opacity: 0 }, children: B }, w);
816
837
  }) })
817
838
  }
818
839
  );
@@ -822,55 +843,58 @@ K:C
822
843
  {
823
844
  ref: s,
824
845
  className: "absolute inset-0 w-full h-full resize-none px-4 py-4 text-sm font-mono leading-relaxed outline-none border-0",
825
- style: { backgroundColor: "transparent", color: "transparent", caretColor: "#fff" },
826
- value: t,
827
- onChange: (b) => e(b.target.value),
828
- onScroll: A,
829
- onKeyDown: x,
846
+ style: { backgroundColor: "transparent", color: "transparent", caretColor: o.caretColor },
847
+ value: e,
848
+ onChange: (x) => t(x.target.value),
849
+ onScroll: D,
850
+ onKeyDown: g,
830
851
  spellCheck: !1,
831
852
  placeholder: "Type /header to insert template..."
832
853
  }
833
854
  ),
834
- i && /* @__PURE__ */ h(
835
- Ct,
855
+ u && /* @__PURE__ */ h(
856
+ we,
836
857
  {
837
- suggestions: o,
838
- selectedIndex: u,
839
- position: p,
840
- onSelect: m,
841
- onMouseEnter: g
858
+ suggestions: p,
859
+ selectedIndex: v,
860
+ position: m,
861
+ onSelect: A,
862
+ onMouseEnter: N
842
863
  }
843
864
  )
844
865
  ] })
845
866
  ] }),
846
- f.length > 0 && /* @__PURE__ */ T(
867
+ i.length > 0 && /* @__PURE__ */ T(
847
868
  "div",
848
869
  {
849
870
  className: "border-t border-slate-600 px-4 py-3 text-xs font-mono overflow-auto",
850
- style: { backgroundColor: "#0f0f0f", maxHeight: "8rem" },
871
+ style: { backgroundColor: o.lineNumBg, maxHeight: "8rem" },
851
872
  children: [
852
- /* @__PURE__ */ T("div", { className: "text-slate-500 mb-2 text-[10px] uppercase tracking-wide", children: [
873
+ /* @__PURE__ */ T("div", { className: "mb-2 text-[10px] uppercase tracking-wide", style: { color: o.errorHeader }, children: [
853
874
  "Validation Errors (",
854
- f.length,
875
+ i.length,
855
876
  ")"
856
877
  ] }),
857
- f.map((b, S) => /* @__PURE__ */ T(
878
+ i.map((x, S) => /* @__PURE__ */ T(
858
879
  "div",
859
880
  {
860
- className: "flex items-start gap-3 mb-2 last:mb-0 hover:bg-slate-800/30 px-2 py-1 rounded transition-colors cursor-pointer",
861
- onMouseEnter: () => a(b),
862
- onMouseLeave: () => a(null),
881
+ className: "flex items-start gap-3 mb-2 last:mb-0 px-2 py-1 rounded transition-colors cursor-pointer",
882
+ style: {
883
+ backgroundColor: a === x ? n === "dark" ? "rgba(51, 65, 85, 0.3)" : "rgba(226, 232, 240, 0.6)" : "transparent"
884
+ },
885
+ onMouseEnter: () => c(x),
886
+ onMouseLeave: () => c(null),
863
887
  children: [
864
- /* @__PURE__ */ h("span", { className: "text-amber-500 shrink-0 mt-0.5", children: "⚠️" }),
888
+ /* @__PURE__ */ h("span", { className: "shrink-0 mt-0.5", style: { color: o.errorIcon }, children: "⚠️" }),
865
889
  /* @__PURE__ */ T("div", { className: "flex-1 flex gap-2", children: [
866
- /* @__PURE__ */ T("span", { className: "text-cyan-400 shrink-0", children: [
890
+ /* @__PURE__ */ T("span", { className: "shrink-0", style: { color: o.errorLocation }, children: [
867
891
  "Ln ",
868
- b.line + 1,
892
+ x.line + 1,
869
893
  ", M",
870
- b.measureIndex + 1,
894
+ x.measureIndex + 1,
871
895
  ":"
872
896
  ] }),
873
- /* @__PURE__ */ h("span", { className: "text-amber-300", children: b.message })
897
+ /* @__PURE__ */ h("span", { style: { color: o.errorMessage }, children: x.message })
874
898
  ] })
875
899
  ]
876
900
  },
@@ -880,46 +904,46 @@ K:C
880
904
  }
881
905
  )
882
906
  ] }) });
883
- }, kt = ({ value: t }) => {
884
- const e = I(null);
885
- return B(() => {
886
- e.current && K.renderAbc(e.current, t, {
907
+ }, Re = ({ value: e, theme: t = "light" }) => {
908
+ const n = y(null);
909
+ return L(() => {
910
+ n.current && j.renderAbc(n.current, e, {
887
911
  responsive: "resize",
888
- foregroundColor: "#ffffff",
912
+ foregroundColor: t === "dark" ? "#ffffff" : "#000000",
889
913
  format: {
890
914
  titlefont: "serif 20"
891
915
  }
892
916
  });
893
- }, [t]), /* @__PURE__ */ h("div", { ref: e, className: "w-full abc-preview" });
917
+ }, [e, t]), /* @__PURE__ */ h("div", { ref: n, className: "w-full abc-preview", "data-theme": t });
894
918
  };
895
919
  export {
896
- H as ABC_ACCIDENTAL_PATTERN,
897
- O as ABC_ANNOTATION_PATTERN,
898
- G as ABC_BAR_PATTERN,
899
- nt as ABC_BROKEN_RHYTHM_PATTERN,
900
- Q as ABC_CHORD_BRACKET_PATTERN,
901
- X as ABC_CHORD_SYMBOL_PATTERN,
902
- Nt as ABC_COMMANDS,
903
- st as ABC_COMMENT_PATTERN,
904
- Z as ABC_DECORATION_PATTERN,
920
+ G as ABC_ACCIDENTAL_PATTERN,
921
+ R as ABC_ANNOTATION_PATTERN,
922
+ z as ABC_BAR_PATTERN,
923
+ re as ABC_BROKEN_RHYTHM_PATTERN,
924
+ Y as ABC_CHORD_BRACKET_PATTERN,
925
+ q as ABC_CHORD_SYMBOL_PATTERN,
926
+ ye as ABC_COMMANDS,
927
+ le as ABC_COMMENT_PATTERN,
928
+ ee as ABC_DECORATION_PATTERN,
905
929
  P as ABC_DURATION_PATTERN,
906
- y as ABC_FIELD_PATTERN,
907
- q as ABC_GRACE_NOTE_PATTERN,
908
- et as ABC_INLINE_FIELD_PATTERN,
930
+ C as ABC_FIELD_PATTERN,
931
+ te as ABC_GRACE_NOTE_PATTERN,
932
+ se as ABC_INLINE_FIELD_PATTERN,
909
933
  E as ABC_NOTE_PATTERN,
910
- V as ABC_OCTAVE_PATTERN,
911
- J as ABC_ORNAMENT_PATTERN,
912
- k as ABC_REST_PATTERN,
913
- z as ABC_SLUR_PATTERN,
914
- At as ABC_SUGGESTIONS,
934
+ Q as ABC_OCTAVE_PATTERN,
935
+ Z as ABC_ORNAMENT_PATTERN,
936
+ O as ABC_REST_PATTERN,
937
+ J as ABC_SLUR_PATTERN,
938
+ Ne as ABC_SUGGESTIONS,
915
939
  $ as ABC_TIE_PATTERN,
916
- Y as ABC_TUPLET_PATTERN,
917
- tt as ABC_VOLTA_BRACKET_PATTERN,
918
- Pt as AbcEditor,
919
- kt as AbcPreview,
920
- Ct as SuggestionList,
940
+ X as ABC_TUPLET_PATTERN,
941
+ ne as ABC_VOLTA_BRACKET_PATTERN,
942
+ Oe as AbcEditor,
943
+ Re as AbcPreview,
944
+ we as SuggestionList,
921
945
  _ as highlightAbc,
922
- yt as useAbcAutoComplete,
923
- j as useLineNumbers,
924
- $t as validateAbc
946
+ Be as useAbcAutoComplete,
947
+ V as useLineNumbers,
948
+ _e as validateAbc
925
949
  };