From 106aab5fa7aadb008f33e631a038af0a7efd51c7 Mon Sep 17 00:00:00 2001 From: webui_bot <2544094+webui_bot@users.noreply.github.com> Date: Sun, 15 Oct 2023 06:17:18 +0000 Subject: [PATCH] update webui --- _assets/{index.97249f83.js => index.c7b1ac12.js} | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename _assets/{index.97249f83.js => index.c7b1ac12.js} (80%) diff --git a/_assets/index.97249f83.js b/_assets/index.c7b1ac12.js similarity index 80% rename from _assets/index.97249f83.js rename to _assets/index.c7b1ac12.js index 60fcfa6..21bb443 100644 --- a/_assets/index.97249f83.js +++ b/_assets/index.c7b1ac12.js @@ -4,4 +4,4 @@ function e(e,t){const n=Object.create(null),o=e.split(",");for(let e=0;err?Symbol(e):"_vr_"+e,sr=ir("rvlm"),ar=ir("rvd"),lr=ir("r"),cr=ir("rl"),ur="undefined"!=typeof window;const dr=Object.assign;function pr(e,t){const n={};for(const o in t){const r=t[o];n[o]=Array.isArray(r)?r.map(e):e(r)}return n}let hr=()=>{};const fr=/\/$/;function Lr(e,t,n="/"){let o,r={},i="",s="";const a=t.indexOf("?"),l=t.indexOf("#",a>-1?a:0);return a>-1&&(o=t.slice(0,a),i=t.slice(a+1,l>-1?l:t.length),r=e(i)),l>-1&&(o=o||t.slice(0,l),s=t.slice(l,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/");let r,i,s=n.length-1;for(r=0;re===t[n]):1===e.length&&e[0]===t}var Ir,Er;function Cr(e){if(!e)if(ur){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(fr,"")}!function(e){e.pop="pop",e.push="push"}(Ir||(Ir={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(Er||(Er={}));const wr=/^[^#]+#/;function Sr(e,t){return e.replace(wr,"#")+t}const kr=()=>({left:window.pageXOffset,top:window.pageYOffset});function xr(e){let t;if("el"in e){let n=e.el;const o="string"==typeof n&&n.startsWith("#"),r="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.pageXOffset,null!=t.top?t.top:window.pageYOffset)}function _r(e,t){return(history.state?history.state.position-t:-1)+e}const Mr=new Map;let Tr=()=>location.protocol+"//"+location.host;function Rr(e,t){const{pathname:n,search:o,hash:r}=t;if(e.indexOf("#")>-1){let e=r.slice(1);return"/"!==e[0]&&(e="/"+e),mr(e,"")}return mr(n,e)+o+r}function Nr(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?kr():null}}function Dr(e){const{history:t,location:n}=window;let o={value:Rr(e,n)},r={value:t.state};function i(o,i,s){const a=Tr()+(e.indexOf("#")>-1&&n.search?n.pathname+n.search+"#":e)+o;try{t[s?"replaceState":"pushState"](i,"",a),r.value=i}catch(e){!function(e,...t){console.warn("[Vue Router warn]: "+e,...t)}("Error with push/replace State",e),n[s?"replace":"assign"](a)}}return r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:r,push:function(e,n){const r=dr({},t.state,{forward:e,scroll:kr()});i(r.current,r,!0),i(e,dr({},Nr(o.value,e,null),{position:r.position+1},n),!1),o.value=e},replace:function(e,n){i(e,dr({},t.state,Nr(r.value.back,e,r.value.forward,!0),n,{position:r.value.position}),!0),o.value=e}}}function Ar(e){const t=Dr(e=Cr(e)),n=function(e,t,n,o){let r=[],i=[],s=null;const a=({state:i})=>{const a=Rr(e,location),l=n.value,c=t.value;let u=0;if(i){if(n.value=a,t.value=i,s&&s===l)return void(s=null);u=c?i.position-c.position:0}else o(a);r.forEach(e=>{e(n.value,l,{delta:u,type:Ir.pop,direction:u?u>0?Er.forward:Er.back:Er.unknown})})};function l(){const{history:e}=window;e.state&&e.replaceState(dr({},e.state,{scroll:kr()}),"")}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",l),{pauseListeners:function(){s=n.value},listen:function(e){r.push(e);const t=()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)};return i.push(t),t},destroy:function(){for(const e of i)e();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",l)}}}(e,t.state,t.location,t.replace);const o=dr({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:Sr.bind(null,e)},t,n);return Object.defineProperty(o,"location",{get:()=>t.location.value}),Object.defineProperty(o,"state",{get:()=>t.state.value}),o}function Or(e){return"string"==typeof e||"symbol"==typeof e}const Pr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Br=ir("nf");var Fr;function Ur(e,t){return dr(new Error,{type:e,[Br]:!0},t)}function Gr(e,t){return e instanceof Error&&Br in e&&(null==t||!!(e.type&t))}!function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(Fr||(Fr={}));const Vr={sensitive:!1,strict:!1,start:!0,end:!0},qr=/[.+*?^${}()[\]/\\]/g;function $r(e,t){let n=0;for(;nt.length?1===t.length&&80===t[0]?1:-1:0}function Hr(e,t){let n=0;const o=e.score,r=t.score;for(;n1&&("*"===a||"+"===a)&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):t("Invalid state to consume buffer"),c="")}function p(){c+=a}for(;l{i(p)}:hr}function i(e){if(Or(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(i),t.alias.forEach(i))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(i),e.alias.forEach(i))}}function s(e){let t=0;for(;t=0;)t++;n.splice(t,0,e),e.record.name&&!Xr(e)&&o.set(e.record.name,e)}return t=Kr({strict:!1,end:!0,sensitive:!1},t),e.forEach(e=>r(e)),{addRoute:r,resolve:function(e,t){let r,i,s,a={};if("name"in e&&e.name){if(r=o.get(e.name),!r)throw Ur(1,{location:e});s=r.record.name,a=dr(function(e,t){let n={};for(let o of t)o in e&&(n[o]=e[o]);return n}(t.params,r.keys.filter(e=>!e.optional).map(e=>e.name)),e.params),i=r.stringify(a)}else if("path"in e)i=e.path,r=n.find(e=>e.re.test(i)),r&&(a=r.parse(i),s=r.record.name);else{if(r=t.name?o.get(t.name):n.find(e=>e.re.test(t.path)),!r)throw Ur(1,{location:e,currentLocation:t});s=r.record.name,a=dr({},t.params,e.params),i=r.stringify(a)}const l=[];let c=r;for(;c;)l.unshift(c.record),c=c.parent;return{name:s,path:i,params:a,matched:l,meta:Yr(l)}},removeRoute:i,getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}function Zr(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(let o in e.components)t[o]="boolean"==typeof n?n:n[o];return t}function Xr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Yr(e){return e.reduce((e,t)=>dr(e,t.meta),{})}function Kr(e,t){let n={};for(let o in e)n[o]=o in t?t[o]:e[o];return n}const Jr=/#/g,ei=/&/g,ti=/\//g,ni=/=/g,oi=/\?/g,ri=/%5B/g,ii=/%5D/g,si=/%5E/g,ai=/%60/g,li=/%7B/g,ci=/%7C/g,ui=/%7D/g;function di(e){return encodeURI(""+e).replace(ci,"|").replace(ri,"[").replace(ii,"]")}function pi(e){return di(e).replace(Jr,"%23").replace(ei,"%26").replace(ni,"%3D").replace(ai,"`").replace(li,"{").replace(ui,"}").replace(si,"^")}function hi(e){return function(e){return di(e).replace(Jr,"%23").replace(oi,"%3F")}(e).replace(ti,"%2F")}function fi(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}function Li(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let e=0;ee&&pi(e)):[o&&pi(o)];for(let e=0;enull==e?null:""+e):null==o?o:""+o)}return t}function vi(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e,reset:function(){e=[]}}}function bi(e,t,n,o,r){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((s,a)=>{const l=e=>{var l;!1===e?a(Ur(4,{from:n,to:t})):e instanceof Error?a(e):"string"==typeof(l=e)||l&&"object"==typeof l?a(Ur(2,{from:t,to:e})):(i&&o.enterCallbacks[r]===i&&"function"==typeof e&&i.push(e),s())};let c=Promise.resolve(e.call(o&&o.instances[r],t,n,l));e.length<3&&(c=c.then(l)),c.catch(e=>a(e))})}function yi(e,t,n,o){const r=[];for(const s of e)for(const e in s.components){let a=s.components[e];if("beforeRouteEnter"===t||s.instances[e])if("object"==typeof(i=a)||"displayName"in i||"props"in i||"__vccOpts"in i){const i=(a.__vccOpts||a)[t];i&&r.push(bi(i,n,o,s,e))}else{let i=a();i=i.catch(()=>null),r.push(()=>i.then(r=>{if(!r)return Promise.reject(new Error(`Couldn't resolve component "${e}" for the following record with path "${s.path}"`));const i=(a=r).__esModule||rr&&"Module"===a[Symbol.toStringTag]?r.default:r;var a;s.components[e]=i;const l=i[t];return l&&bi(l,n,o,s,e)()}))}}var i;return r}function Ii(e){const t=uo(lr),n=uo(cr),o=Ro(()=>t.resolve(Je(e.to))),r=Ro(()=>{let{matched:e}=o.value,{length:t}=e;const r=e[t-1];let i=n.matched;if(!r||!i.length)return-1;let s=i.findIndex(gr.bind(null,r));if(s>-1)return s;let a=Ci(e[t-2]);return t>1&&Ci(r)===a&&i[i.length-1].path!==a?i.findIndex(gr.bind(null,e[t-2])):s}),i=Ro(()=>r.value>-1&&function(e,t){for(let n in t){let o=t[n],r=e[n];if("string"==typeof o){if(o!==r)return!1}else if(!Array.isArray(r)||r.length!==o.length||o.some((e,t)=>e!==r[t]))return!1}return!0}(n.params,o.value.params)),s=Ro(()=>r.value>-1&&r.value===n.matched.length-1&&vr(n.params,o.value.params));return{route:o,href:Ro(()=>o.value.href),isActive:i,isExactActive:s,navigate:function(n={}){return function(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return;if(e.defaultPrevented)return;if(void 0!==e.button&&0!==e.button)return;if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}e.preventDefault&&e.preventDefault();return!0}(n)?t[Je(e.replace)?"replace":"push"](Je(e.to)):Promise.resolve()}}}const Ei=No({name:"RouterLink",props:{to:{type:[String,Object],required:!0},activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},setup(e,{slots:t,attrs:n}){const o=Ge(Ii(e)),{options:r}=uo(lr),i=Ro(()=>({[wi(e.activeClass,r.linkActiveClass,"router-link-active")]:o.isActive,[wi(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:o.isExactActive}));return()=>{const r=t.default&&t.default(o);return e.custom?r:Do("a",dr({"aria-current":o.isExactActive?e.ariaCurrentValue:null,onClick:o.navigate,href:o.href},n,{class:i.value}),r)}}});function Ci(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}let wi=(e,t,n)=>null!=e?e:null!=t?t:n;const Si=No({name:"RouterView",props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:n}){const o=uo(cr),r=uo(ar,0),i=Ro(()=>(e.route||o).matched[r]);co(ar,r+1),co(sr,i);const s=Xe();return()=>{const r=e.route||o,a=i.value,l=a&&a.components[e.name];if(!l)return n.default?n.default({Component:l,route:r}):null;const c=a.props[e.name],u=c?!0===c?r.params:"function"==typeof c?c(r):c:null,d=e.name,p=Do(l,dr({},u,t,{onVnodeMounted:()=>{a.instances[d]=s.value,(a.enterCallbacks[d]||[]).forEach(e=>e(s.value))},onVnodeUnmounted:()=>{a.instances[d]=null},ref:s}));return n.default?n.default({Component:p,route:r}):p}}});function ki(e){return e.reduce((e,t)=>e.then(()=>t()),Promise.resolve())}function xi(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let s=0;s{ds[e]={},ps[e]={itemsPerPage:16,currentPage:1}});const hs={outputId:null,input:null,output:null,isBootloaderMode:null,connectionState:null,connectionPromise:null,valueSize:null,valuesPerMessageRequest:null,boardName:null,firmwareFileName:null,firmwareVersion:null,bootLoaderSupport:!1,activePreset:null,supportedPresetsCount:null,numberOfComponents:[],unsupportedComponents:ds,isSystemOperationRunning:!1,systemOperationPercentage:null,viewSettings:ps},fs=Ge(hs);var Ls="object"==typeof process&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var ms={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},gs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function vs(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var bs=vs((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=ms,o=(t=e.exports={}).re=[],r=t.src=[],i=t.t={};let s=0;const a=(e,t,n)=>{const a=s++;Ls(a,t),i[e]=a,r[a]=t,o[a]=new RegExp(t,n?"g":void 0)};a("NUMERICIDENTIFIER","0|[1-9]\\d*"),a("NUMERICIDENTIFIERLOOSE","[0-9]+"),a("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),a("MAINVERSION",`(${r[i.NUMERICIDENTIFIER]})\\.(${r[i.NUMERICIDENTIFIER]})\\.(${r[i.NUMERICIDENTIFIER]})`),a("MAINVERSIONLOOSE",`(${r[i.NUMERICIDENTIFIERLOOSE]})\\.(${r[i.NUMERICIDENTIFIERLOOSE]})\\.(${r[i.NUMERICIDENTIFIERLOOSE]})`),a("PRERELEASEIDENTIFIER",`(?:${r[i.NUMERICIDENTIFIER]}|${r[i.NONNUMERICIDENTIFIER]})`),a("PRERELEASEIDENTIFIERLOOSE",`(?:${r[i.NUMERICIDENTIFIERLOOSE]}|${r[i.NONNUMERICIDENTIFIER]})`),a("PRERELEASE",`(?:-(${r[i.PRERELEASEIDENTIFIER]}(?:\\.${r[i.PRERELEASEIDENTIFIER]})*))`),a("PRERELEASELOOSE",`(?:-?(${r[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${r[i.PRERELEASEIDENTIFIERLOOSE]})*))`),a("BUILDIDENTIFIER","[0-9A-Za-z-]+"),a("BUILD",`(?:\\+(${r[i.BUILDIDENTIFIER]}(?:\\.${r[i.BUILDIDENTIFIER]})*))`),a("FULLPLAIN",`v?${r[i.MAINVERSION]}${r[i.PRERELEASE]}?${r[i.BUILD]}?`),a("FULL",`^${r[i.FULLPLAIN]}$`),a("LOOSEPLAIN",`[v=\\s]*${r[i.MAINVERSIONLOOSE]}${r[i.PRERELEASELOOSE]}?${r[i.BUILD]}?`),a("LOOSE",`^${r[i.LOOSEPLAIN]}$`),a("GTLT","((?:<|>)?=?)"),a("XRANGEIDENTIFIERLOOSE",r[i.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),a("XRANGEIDENTIFIER",r[i.NUMERICIDENTIFIER]+"|x|X|\\*"),a("XRANGEPLAIN",`[v=\\s]*(${r[i.XRANGEIDENTIFIER]})(?:\\.(${r[i.XRANGEIDENTIFIER]})(?:\\.(${r[i.XRANGEIDENTIFIER]})(?:${r[i.PRERELEASE]})?${r[i.BUILD]}?)?)?`),a("XRANGEPLAINLOOSE",`[v=\\s]*(${r[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[i.XRANGEIDENTIFIERLOOSE]})(?:${r[i.PRERELEASELOOSE]})?${r[i.BUILD]}?)?)?`),a("XRANGE",`^${r[i.GTLT]}\\s*${r[i.XRANGEPLAIN]}$`),a("XRANGELOOSE",`^${r[i.GTLT]}\\s*${r[i.XRANGEPLAINLOOSE]}$`),a("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),a("COERCERTL",r[i.COERCE],!0),a("LONETILDE","(?:~>?)"),a("TILDETRIM",`(\\s*)${r[i.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",a("TILDE",`^${r[i.LONETILDE]}${r[i.XRANGEPLAIN]}$`),a("TILDELOOSE",`^${r[i.LONETILDE]}${r[i.XRANGEPLAINLOOSE]}$`),a("LONECARET","(?:\\^)"),a("CARETTRIM",`(\\s*)${r[i.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",a("CARET",`^${r[i.LONECARET]}${r[i.XRANGEPLAIN]}$`),a("CARETLOOSE",`^${r[i.LONECARET]}${r[i.XRANGEPLAINLOOSE]}$`),a("COMPARATORLOOSE",`^${r[i.GTLT]}\\s*(${r[i.LOOSEPLAIN]})$|^$`),a("COMPARATOR",`^${r[i.GTLT]}\\s*(${r[i.FULLPLAIN]})$|^$`),a("COMPARATORTRIM",`(\\s*)${r[i.GTLT]}\\s*(${r[i.LOOSEPLAIN]}|${r[i.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",a("HYPHENRANGE",`^\\s*(${r[i.XRANGEPLAIN]})\\s+-\\s+(${r[i.XRANGEPLAIN]})\\s*$`),a("HYPHENRANGELOOSE",`^\\s*(${r[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${r[i.XRANGEPLAINLOOSE]})\\s*$`),a("STAR","(<|>)?=?\\s*\\*"),a("GTE0","^\\s*>=\\s*0.0.0\\s*$"),a("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const ys=/^[0-9]+$/,Is=(e,t)=>{const n=ys.test(e),o=ys.test(t);return n&&o&&(e=+e,t=+t),e===t?0:n&&!o?-1:o&&!n?1:eIs(t,e)};const{MAX_LENGTH:Cs,MAX_SAFE_INTEGER:ws}=ms,{re:Ss,t:ks}=bs,{compareIdentifiers:xs}=Es;class _s{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof _s){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>Cs)throw new TypeError(`version is longer than ${Cs} characters`);Ls("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?Ss[ks.LOOSE]:Ss[ks.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ws||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ws||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ws||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}var Ms=_s;var Ts=(e,t,n)=>new Ms(e,n).compare(new Ms(t,n));var Rs=(e,t,n)=>Ts(e,t,n)>0,Ns=vs((function(e,t){e.exports=function(){function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(o=e[Symbol.iterator]()).next.bind(o)}var o=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),r=(o.defaults,o.getDefaults,o.changeDefaults,/[&<>"']/),i=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g,h=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,L={},m=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){L[" "+e]||(m.test(e)?L[" "+e]=e+"/":L[" "+e]=y(e,"/",!0));var n=-1===(e=L[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(g,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(v,"$1")+t:e+t}function y(e,t,n){var o=e.length;if(0===o)return"";for(var r=0;r=0&&"\\"===n[r];)o=!o;return o?"|":" |"})).split(/ \|/),o=0;if(n.length>t)n.splice(t);else for(;n.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var o=t[t.length-1];if(o&&"paragraph"===o.type)return{raw:n[0],text:n[0].trimRight()};var r=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:N(r,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],o=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var o=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=o.length?e.slice(o.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:o}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:D(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var o,r=n.align.length;for(o=0;o ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,o,r,i,s,a,l,c=t[0],u=t[2],d=u.length>1,p=")"===u[u.length-1],h={type:"list",raw:c,ordered:d,start:d?+u.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),L=!1,m=f.length,g=0;g1||this.options.smartLists&&r!==u)&&(i=f.slice(g+1).join("\n"),h.raw=h.raw.substring(0,h.raw.length-i.length),g=m-1)),s=L||/\n\n(?!\s*$)/.test(n),g!==m-1&&(L="\n"===n.charAt(n.length-1),s||(s=L)),s&&(h.loose=!0),l=void 0,(a=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),h.items.push({type:"list_item",raw:c,task:a,checked:l,loose:s,text:n});return h}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):A(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:D(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var o,r=n.align.length;for(o=0;o/i.test(o[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(o[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(o[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:o[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):A(o[0]):o[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=O(t[2],"()");if(n>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,o).trim(),t[3]=""}var r=t[2],i="";if(this.options.pedantic){var s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s?(r=s[1],i=s[3]):i=""}else i=t[3]?t[3].slice(1,-1):"";return P(t,{href:(r=r.trim().replace(/^<([\s\S]*)>$/,"$1"))?r.replace(this.rules.inline._escapes,"$1"):r,title:i?i.replace(this.rules.inline._escapes,"$1"):i},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var o=(n[2]||n[1]).replace(/\s+/g," ");if(!(o=t[o.toLowerCase()])||!o.href){var r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return P(n,o,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var o=this.rules.inline.strong.start.exec(e);if(o&&(!o[1]||o[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var r,i="**"===o[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(i.lastIndex=0;null!=(o=i.exec(t));)if(r=this.rules.inline.strong.middle.exec(t.slice(0,o.index+3)))return{type:"strong",raw:e.slice(0,r[0].length),text:e.slice(2,r[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var o=this.rules.inline.em.start.exec(e);if(o&&(!o[1]||o[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var r,i="*"===o[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(i.lastIndex=0;null!=(o=i.exec(t));)if(r=this.rules.inline.em.middle.exec(t.slice(0,o.index+2)))return{type:"em",raw:e.slice(0,r[0].length),text:e.slice(1,r[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),o=/[^ ]/.test(n),r=n.startsWith(" ")&&n.endsWith(" ");return o&&r&&(n=n.substring(1,n.length-1)),n=A(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,o,r=this.rules.inline.autolink.exec(e);if(r)return o="@"===r[2]?"mailto:"+(n=A(this.options.mangle?t(r[1]):r[1])):n=A(r[1]),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var o,r;if("@"===n[2])r="mailto:"+(o=A(this.options.mangle?t(n[0]):n[0]));else{var i;do{i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(i!==n[0]);o=A(n[0]),r="www."===n[1]?"http://"+o:o}return{type:"link",raw:n[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}},t.inlineText=function(e,t,n){var o,r=this.rules.inline.text.exec(e);if(r)return o=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):A(r[0]):r[0]:A(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:o}},e}(),F=S,U=C,G=k,V={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:F,table:F,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};V.def=U(V.def).replace("label",V._label).replace("title",V._title).getRegex(),V.bullet=/(?:[*+-]|\d{1,9}[.)])/,V.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,V.item=U(V.item,"gm").replace(/bull/g,V.bullet).getRegex(),V.list=U(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex(),V._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V._comment=//,V.html=U(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V.paragraph=U(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.blockquote=U(V.blockquote).replace("paragraph",V.paragraph).getRegex(),V.normal=G({},V),V.gfm=G({},V.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),V.gfm.nptable=U(V.gfm.nptable).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.gfm.table=U(V.gfm.table).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.pedantic=G({},V.normal,{html:U("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",V._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:F,paragraph:U(V.normal._paragraph).replace("hr",V.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var q={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:F,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:F,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};q.punctuation=U(q.punctuation).replace(/punctuation/g,q._punctuation).getRegex(),q._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",q._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",q.em.start=U(q.em.start).replace(/punctuation/g,q._punctuation).getRegex(),q.em.middle=U(q.em.middle).replace(/punctuation/g,q._punctuation).replace(/overlapSkip/g,q._overlapSkip).getRegex(),q.em.endAst=U(q.em.endAst,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.em.endUnd=U(q.em.endUnd,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.strong.start=U(q.strong.start).replace(/punctuation/g,q._punctuation).getRegex(),q.strong.middle=U(q.strong.middle).replace(/punctuation/g,q._punctuation).replace(/blockSkip/g,q._blockSkip).getRegex(),q.strong.endAst=U(q.strong.endAst,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.strong.endUnd=U(q.strong.endUnd,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.blockSkip=U(q._blockSkip,"g").getRegex(),q.overlapSkip=U(q._overlapSkip,"g").getRegex(),q._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,q._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,q._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,q.autolink=U(q.autolink).replace("scheme",q._scheme).replace("email",q._email).getRegex(),q._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,q.tag=U(q.tag).replace("comment",V._comment).replace("attribute",q._attribute).getRegex(),q._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,q._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,q.link=U(q.link).replace("label",q._label).replace("href",q._href).replace("title",q._title).getRegex(),q.reflink=U(q.reflink).replace("label",q._label).getRegex(),q.reflinkSearch=U(q.reflinkSearch,"g").replace("reflink",q.reflink).replace("nolink",q.nolink).getRegex(),q.normal=G({},q),q.pedantic=G({},q.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:U(/^!?\[(label)\]\((.*?)\)/).replace("label",q._label).getRegex(),reflink:U(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q._label).getRegex()}),q.gfm=G({},q.normal,{escape:U(q.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),o+="&#"+n+";";return o}var Z=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||H,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:j.normal,inline:z.normal};this.options.pedantic?(t.block=j.pedantic,t.inline=z.pedantic):this.options.gfm&&(t.block=j.gfm,this.options.breaks?t.inline=z.breaks:t.inline=z.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,o,r,i=t.prototype;return i.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},i.blockTokens=function(e,t,n){var o,r,i,s;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(o=this.tokenizer.space(e))e=e.substring(o.raw.length),o.type&&t.push(o);else if(o=this.tokenizer.code(e,t))e=e.substring(o.raw.length),o.type?t.push(o):((s=t[t.length-1]).raw+="\n"+o.raw,s.text+="\n"+o.text);else if(o=this.tokenizer.fences(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.heading(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.nptable(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.hr(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.blockquote(e))e=e.substring(o.raw.length),o.tokens=this.blockTokens(o.text,[],n),t.push(o);else if(o=this.tokenizer.list(e)){for(e=e.substring(o.raw.length),i=o.items.length,r=0;r0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(a));)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,o))e=e.substring(i.raw.length),n=i.inLink,o=i.inRawBlock,t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,o)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,o)),t.push(i);else if(i=this.tokenizer.strong(e,a,r))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,o),t.push(i);else if(i=this.tokenizer.em(e,a,r))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,o),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,o),t.push(i);else if(i=this.tokenizer.autolink(e,Q))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,Q))){if(i=this.tokenizer.inlineText(e,o,W))e=e.substring(i.raw.length),r=i.raw.slice(-1),t.push(i);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(i.raw.length),t.push(i);return t},n=t,r=[{key:"rules",get:function(){return{block:j,inline:z}}}],(o=null)&&e(n.prototype,o),r&&e(n,r),t}(),X=o.defaults,Y=w,K=I,J=function(){function e(e){this.options=e||X}var t=e.prototype;return t.code=function(e,t,n){var o=(t||"").match(/\S*/)[0];if(this.options.highlight){var r=this.options.highlight(e,o);null!=r&&r!==e&&(n=!0,e=r)}return o?'
'+(n?e:K(e,!0))+"
\n":"
"+(n?e:K(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,o){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,n){var o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=Y(this.options.sanitize,this.options.baseUrl,e)))return n;var o='"},t.image=function(e,t,n){if(null===(e=Y(this.options.sanitize,this.options.baseUrl,e)))return n;var o=''+n+'":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=o.defaults,oe=E,re=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new J,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,o,r,i,s,a,l,c,u,d,p,h,f,L,m,g,v,b,y="",I=e.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):L+=b),L+=this.parse(m.tokens,f),u+=this.renderer.listitem(L,v,g);y+=this.renderer.list(u,p,h);continue;case"html":y+=this.renderer.html(d.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1An error occurred:

    "+ae(e.message+"",!0)+"
    ";throw e}}return de.options=de.setOptions=function(e){return ie(de.defaults,e),ce(de.defaults),de},de.getDefaults=le,de.defaults=ue,de.use=function(e){var t=ie({},e);if(e.renderer&&function(){var n=de.defaults.renderer||new J,o=function(t){var o=n[t];n[t]=function(){for(var r=arguments.length,i=new Array(r),s=0;s=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof gs&&gs.global===gs?gs:void 0,i=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,i,s){var a=r.URL||r.webkitURL,l=document.createElement("a");i=i||e.name||"download",l.download=i,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):n(l.href)?t(e,i,s):o(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,i){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,i),r);else if(n(e))t(e,r,i);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){o(s)}))}}:function(e,n,o,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,o);var s="application/octet-stream"===e.type,a=/constructor/i.test(r.HTMLElement)||r.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&a)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var u=r.URL||r.webkitURL,d=u.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});r.saveAs=i.saveAs=i,e.exports=i}()}));const As=e=>({...tt(Ve(e.state)),...e.computed,...e.actions}),Os=e=>JSON.parse(localStorage.getItem(e)),Ps=(e,t)=>localStorage.setItem(e,JSON.stringify(t)),Bs=e=>parseInt(e,16),Fs=e=>Array.isArray(e)?e.map(e=>e.toString(16)):e.toString(16),Us=e=>Array.isArray(e)?e.map(e=>e.toString(16)).join(" "):e.toString(16),Gs=e=>Array.isArray(e)?e.join(" "):e,Vs=e=>{if(e.length%2!=0)throw new Error("CANNOT DECODE 2 BYTE VALUE: UNEVEN DATA VALUE LENGTH");const t=[];for(let n=0;n{1&e?t|=128:t&=-129;let n=e>>=1;return n<<=8,n|=t,n},$s=e=>{let t=e>>8&255,n=255&e;return t=t<<1&127,n>>7&1?t|=1:t&=-2,n&=127,[t,n]},Hs=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),js=(e,t)=>e&&t&&Math.abs(t.getTime()-e.getTime()),zs=e=>("0000"+e).slice(-2),Ws=e=>new Promise(t=>{setTimeout(t,e)});var Qs,Zs;(Zs=Qs||(Qs={})).Closed="closed",Zs.Pending="pending",Zs.Open="open";const Xs=Ge({connectionState:Qs.Closed,inputs:[],outputs:[],log:!0,isWebMidiSupported:!1});var Ys,Ks,Js=vs((function(e){!function(t){function n(){if(n.prototype._singleton)throw new Error("WebMidi is a singleton, it cannot be instantiated directly.");(n.prototype._singleton=this)._inputs=[],this._outputs=[],this._userHandlers={},this._stateChangeQueue=[],this._processingStateChange=!1,this._midiInterfaceEvents=["connected","disconnected"],this._nrpnBuffer=[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]],this._nrpnEventsEnabled=!0,this._nrpnTypes=["entry","increment","decrement"],this._notes=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],this._semitones={C:0,D:2,E:4,F:5,G:7,A:9,B:11},Object.defineProperties(this,{MIDI_SYSTEM_MESSAGES:{value:{sysex:240,timecode:241,songposition:242,songselect:243,tuningrequest:246,sysexend:247,clock:248,start:250,continue:251,stop:252,activesensing:254,reset:255,midimessage:0,unknownsystemmessage:-1},writable:!1,enumerable:!0,configurable:!1},MIDI_CHANNEL_MESSAGES:{value:{noteoff:8,noteon:9,keyaftertouch:10,controlchange:11,channelmode:11,nrpn:11,programchange:12,channelaftertouch:13,pitchbend:14},writable:!1,enumerable:!0,configurable:!1},MIDI_REGISTERED_PARAMETER:{value:{pitchbendrange:[0,0],channelfinetuning:[0,1],channelcoarsetuning:[0,2],tuningprogram:[0,3],tuningbank:[0,4],modulationrange:[0,5],azimuthangle:[61,0],elevationangle:[61,1],gain:[61,2],distanceratio:[61,3],maximumdistance:[61,4],maximumdistancegain:[61,5],referencedistanceratio:[61,6],panspreadangle:[61,7],rollangle:[61,8]},writable:!1,enumerable:!0,configurable:!1},MIDI_CONTROL_CHANGE_MESSAGES:{value:{bankselectcoarse:0,modulationwheelcoarse:1,breathcontrollercoarse:2,footcontrollercoarse:4,portamentotimecoarse:5,dataentrycoarse:6,volumecoarse:7,balancecoarse:8,pancoarse:10,expressioncoarse:11,effectcontrol1coarse:12,effectcontrol2coarse:13,generalpurposeslider1:16,generalpurposeslider2:17,generalpurposeslider3:18,generalpurposeslider4:19,bankselectfine:32,modulationwheelfine:33,breathcontrollerfine:34,footcontrollerfine:36,portamentotimefine:37,dataentryfine:38,volumefine:39,balancefine:40,panfine:42,expressionfine:43,effectcontrol1fine:44,effectcontrol2fine:45,holdpedal:64,portamento:65,sustenutopedal:66,softpedal:67,legatopedal:68,hold2pedal:69,soundvariation:70,resonance:71,soundreleasetime:72,soundattacktime:73,brightness:74,soundcontrol6:75,soundcontrol7:76,soundcontrol8:77,soundcontrol9:78,soundcontrol10:79,generalpurposebutton1:80,generalpurposebutton2:81,generalpurposebutton3:82,generalpurposebutton4:83,reverblevel:91,tremololevel:92,choruslevel:93,celestelevel:94,phaserlevel:95,databuttonincrement:96,databuttondecrement:97,nonregisteredparametercoarse:98,nonregisteredparameterfine:99,registeredparametercoarse:100,registeredparameterfine:101},writable:!1,enumerable:!0,configurable:!1},MIDI_NRPN_MESSAGES:{value:{entrymsb:6,entrylsb:38,increment:96,decrement:97,paramlsb:98,parammsb:99,nullactiveparameter:127},writable:!1,enumerable:!0,configurable:!1},MIDI_CHANNEL_MODE_MESSAGES:{value:{allsoundoff:120,resetallcontrollers:121,localcontrol:122,allnotesoff:123,omnimodeoff:124,omnimodeon:125,monomodeon:126,polymodeon:127},writable:!1,enumerable:!0,configurable:!1},octaveOffset:{value:0,writable:!0,enumerable:!0,configurable:!1}}),Object.defineProperties(this,{supported:{enumerable:!0,get:function(){return"requestMIDIAccess"in navigator}},enabled:{enumerable:!0,get:function(){return void 0!==this.interface}.bind(this)},inputs:{enumerable:!0,get:function(){return this._inputs}.bind(this)},outputs:{enumerable:!0,get:function(){return this._outputs}.bind(this)},sysexEnabled:{enumerable:!0,get:function(){return!(!this.interface||!this.interface.sysexEnabled)}.bind(this)},nrpnEventsEnabled:{enumerable:!0,get:function(){return!!this._nrpnEventsEnabled}.bind(this),set:function(e){return this._nrpnEventsEnabled=e,this._nrpnEventsEnabled}},nrpnTypes:{enumerable:!0,get:function(){return this._nrpnTypes}.bind(this)},time:{enumerable:!0,get:function(){return performance.now()}}})}var o=new n;function r(e){var t=this;this._userHandlers={channel:{},system:{}},this._midiInput=e,Object.defineProperties(this,{connection:{enumerable:!0,get:function(){return t._midiInput.connection}},id:{enumerable:!0,get:function(){return t._midiInput.id}},manufacturer:{enumerable:!0,get:function(){return t._midiInput.manufacturer}},name:{enumerable:!0,get:function(){return t._midiInput.name}},state:{enumerable:!0,get:function(){return t._midiInput.state}},type:{enumerable:!0,get:function(){return t._midiInput.type}}}),this._initializeUserHandlers(),this._midiInput.onmidimessage=this._onMidiMessage.bind(this)}function i(e){var t=this;this._midiOutput=e,Object.defineProperties(this,{connection:{enumerable:!0,get:function(){return t._midiOutput.connection}},id:{enumerable:!0,get:function(){return t._midiOutput.id}},manufacturer:{enumerable:!0,get:function(){return t._midiOutput.manufacturer}},name:{enumerable:!0,get:function(){return t._midiOutput.name}},state:{enumerable:!0,get:function(){return t._midiOutput.state}},type:{enumerable:!0,get:function(){return t._midiOutput.type}}})}n.prototype.enable=function(e,t){this.enabled||(this.supported?navigator.requestMIDIAccess({sysex:t}).then(function(t){var n,o=[],r=[];this.interface=t,this._resetInterfaceUserHandlers(),this.interface.onstatechange=function(e){o.push(e)};for(var i=t.inputs.values(),s=i.next();s&&!s.done;s=i.next())r.push(s.value.open());for(var a=t.outputs.values(),l=a.next();l&&!l.done;l=a.next())r.push(l.value.open());function c(){clearTimeout(n),this._updateInputsAndOutputs(),this.interface.onstatechange=this._onInterfaceStateChange.bind(this),"function"==typeof e&&e.call(this),o.forEach(function(e){this._onInterfaceStateChange(e)}.bind(this))}n=setTimeout(c.bind(this),200),Promise&&Promise.all(r).catch((function(e){})).then(c.bind(this))}.bind(this),function(t){"function"==typeof e&&e.call(this,t)}.bind(this)):"function"==typeof e&&e(new Error("The Web MIDI API is not supported by your browser.")))},n.prototype.disable=function(){if(!this.supported)throw new Error("The Web MIDI API is not supported by your browser.");this.interface&&(this.interface.onstatechange=void 0),this.interface=void 0,this._inputs=[],this._outputs=[],this._nrpnEventsEnabled=!0,this._resetInterfaceUserHandlers()},n.prototype.addListener=function(e,t){if(!this.enabled)throw new Error("WebMidi must be enabled before adding event listeners.");if("function"!=typeof t)throw new TypeError("The 'listener' parameter must be a function.");if(!(0<=this._midiInterfaceEvents.indexOf(e)))throw new TypeError("The specified event type is not supported.");return this._userHandlers[e].push(t),this},n.prototype.hasListener=function(e,t){if(!this.enabled)throw new Error("WebMidi must be enabled before checking event listeners.");if("function"!=typeof t)throw new TypeError("The 'listener' parameter must be a function.");if(!(0<=this._midiInterfaceEvents.indexOf(e)))throw new TypeError("The specified event type is not supported.");for(var n=0;n>4,i=15&e.data[0],s=1+i;if(1=o.MIDI_NRPN_MESSAGES.increment&&t<=o.MIDI_NRPN_MESSAGES.parammsb||t===o.MIDI_NRPN_MESSAGES.entrymsb||t===o.MIDI_NRPN_MESSAGES.entrylsb)){var a={target:this,type:"controlchange",data:e.data,timestamp:e.timeStamp,channel:s,controller:{number:t,name:this.getCcNameByNumber(t)},value:n};if(a.controller.number===o.MIDI_NRPN_MESSAGES.parammsb&&a.value!=o.MIDI_NRPN_MESSAGES.nullactiveparameter)o._nrpnBuffer[i]=[],o._nrpnBuffer[i][0]=a;else if(1===o._nrpnBuffer[i].length&&a.controller.number===o.MIDI_NRPN_MESSAGES.paramlsb)o._nrpnBuffer[i].push(a);else if(2!==o._nrpnBuffer[i].length||a.controller.number!==o.MIDI_NRPN_MESSAGES.increment&&a.controller.number!==o.MIDI_NRPN_MESSAGES.decrement&&a.controller.number!==o.MIDI_NRPN_MESSAGES.entrymsb)if(3===o._nrpnBuffer[i].length&&o._nrpnBuffer[i][2].number===o.MIDI_NRPN_MESSAGES.entrymsb&&a.controller.number===o.MIDI_NRPN_MESSAGES.entrylsb)o._nrpnBuffer[i].push(a);else if(3<=o._nrpnBuffer[i].length&&o._nrpnBuffer[i].length<=4&&a.controller.number===o.MIDI_NRPN_MESSAGES.parammsb&&a.value===o.MIDI_NRPN_MESSAGES.nullactiveparameter)o._nrpnBuffer[i].push(a);else if(4<=o._nrpnBuffer[i].length&&o._nrpnBuffer[i].length<=5&&a.controller.number===o.MIDI_NRPN_MESSAGES.paramlsb&&a.value===o.MIDI_NRPN_MESSAGES.nullactiveparameter){o._nrpnBuffer[i].push(a);var l=[];o._nrpnBuffer[i].forEach((function(e){l.push(e.data)}));var c=o._nrpnBuffer[i][0].value<<7|o._nrpnBuffer[i][1].value,u=o._nrpnBuffer[i][2].value;6===o._nrpnBuffer[i].length&&(u=o._nrpnBuffer[i][2].value<<7|o._nrpnBuffer[i][3].value);var d="";switch(o._nrpnBuffer[i][2].controller.number){case o.MIDI_NRPN_MESSAGES.entrymsb:d=o._nrpnTypes[0];break;case o.MIDI_NRPN_MESSAGES.increment:d=o._nrpnTypes[1];break;case o.MIDI_NRPN_MESSAGES.decrement:d=o._nrpnTypes[2];break;default:throw new Error("The NPRN type was unidentifiable.")}var p={timestamp:a.timestamp,channel:a.channel,type:"nrpn",data:l,controller:{number:c,type:d,name:"Non-Registered Parameter "+c},value:u};o._nrpnBuffer[i]=[],this._userHandlers.channel[p.type]&&this._userHandlers.channel[p.type][p.channel]&&this._userHandlers.channel[p.type][p.channel].forEach((function(e){e(p)}))}else o._nrpnBuffer[i]=[];else o._nrpnBuffer[i].push(a)}},r.prototype._parseChannelEvent=function(e){var t,n,r=e.data[0]>>4,i=1+(15&e.data[0]);1>7&127,r=127&e;return this.send(o.MIDI_SYSTEM_MESSAGES.songposition,[n,r],this._parseTimeParameter(t.time)),this},i.prototype.sendSongSelect=function(e,t){if(t=t||{},!(0<=(e=Math.floor(e))&&e<=127))throw new RangeError("The song number must be between 0 and 127.");return this.send(o.MIDI_SYSTEM_MESSAGES.songselect,[e],this._parseTimeParameter(t.time)),this},i.prototype.sendTuningRequest=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.tuningrequest,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendClock=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.clock,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendStart=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.start,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendContinue=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.continue,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendStop=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.stop,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendActiveSensing=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.activesensing,[],this._parseTimeParameter(e.time)),this},i.prototype.sendReset=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.reset,void 0,this._parseTimeParameter(e.time)),this},i.prototype.stopNote=function(e,t,n){if("all"===e)return this.sendChannelMode("allnotesoff",0,t,n);var r=64;return(n=n||{}).rawVelocity?!isNaN(n.velocity)&&0<=n.velocity&&n.velocity<=127&&(r=n.velocity):!isNaN(n.velocity)&&0<=n.velocity&&n.velocity<=1&&(r=127*n.velocity),this._convertNoteToArray(e).forEach(function(e){o.toMIDIChannels(t).forEach(function(t){this.send((o.MIDI_CHANNEL_MESSAGES.noteoff<<4)+(t-1),[e,Math.round(r)],this._parseTimeParameter(n.time))}.bind(this))}.bind(this)),this},i.prototype.playNote=function(e,t,n){var r,i=64;if((n=n||{}).rawVelocity?!isNaN(n.velocity)&&0<=n.velocity&&n.velocity<=127&&(i=n.velocity):!isNaN(n.velocity)&&0<=n.velocity&&n.velocity<=1&&(i=127*n.velocity),r=this._parseTimeParameter(n.time),this._convertNoteToArray(e).forEach(function(e){o.toMIDIChannels(t).forEach(function(t){this.send((o.MIDI_CHANNEL_MESSAGES.noteon<<4)+(t-1),[e,Math.round(i)],r)}.bind(this))}.bind(this)),!isNaN(n.duration)){n.duration<=0&&(n.duration=0);var s=64;n.rawVelocity?!isNaN(n.release)&&0<=n.release&&n.release<=127&&(s=n.release):!isNaN(n.release)&&0<=n.release&&n.release<=1&&(s=127*n.release),this._convertNoteToArray(e).forEach(function(e){o.toMIDIChannels(t).forEach(function(t){this.send((o.MIDI_CHANNEL_MESSAGES.noteoff<<4)+(t-1),[e,Math.round(s)],(r||o.time)+n.duration)}.bind(this))}.bind(this))}return this},i.prototype.sendKeyAftertouch=function(e,t,n,r){var i=this;if(r=r||{},t<1||16>7&127,l=127&s;return o.toMIDIChannels(t).forEach((function(){r.setRegisteredParameter("channelcoarsetuning",i,t,{time:n.time}),r.setRegisteredParameter("channelfinetuning",[a,l],t,{time:n.time})})),this},i.prototype.setTuningProgram=function(e,t,n){var r=this;if(n=n||{},!(0<=(e=Math.floor(e))&&e<=127))throw new RangeError("The program value must be between 0 and 127");return o.toMIDIChannels(t).forEach((function(){r.setRegisteredParameter("tuningprogram",e,t,{time:n.time})})),this},i.prototype.setTuningBank=function(e,t,n){var r=this;if(n=n||{},!(0<=(e=Math.floor(e)||0)&&e<=127))throw new RangeError("The bank value must be between 0 and 127");return o.toMIDIChannels(t).forEach((function(){r.setRegisteredParameter("tuningbank",e,t,{time:n.time})})),this},i.prototype.sendChannelMode=function(e,t,n,r){if(r=r||{},"string"==typeof e){if(!(e=o.MIDI_CHANNEL_MODE_MESSAGES[e]))throw new TypeError("Invalid channel mode message name.")}else if(!(120<=(e=Math.floor(e))&&e<=127))throw new RangeError("Channel mode numerical identifiers must be between 120 and 127.");if((t=Math.floor(t)||0)<0||127>7&127,a=127&i;return o.toMIDIChannels(t).forEach((function(e){r.send((o.MIDI_CHANNEL_MESSAGES.pitchbend<<4)+(e-1),[a,s],r._parseTimeParameter(n.time))})),this},i.prototype._parseTimeParameter=function(e){var t,n=parseFloat(e);return"string"==typeof e&&"+"===e.substring(0,1)?n&&0o.time&&(t=n),t},i.prototype._convertNoteToArray=function(e){var t=[];return Array.isArray(e)||(e=[e]),e.forEach((function(e){t.push(o.guessNoteNumber(e))})),t},e.exports?e.exports=o:t.WebMidi||(t.WebMidi=o)}(gs)}));(Ks=Ys||(Ys={}))[Ks.STATUS=2]="STATUS",Ks[Ks.HANDSHAKE=3]="HANDSHAKE",Ks[Ks.WISH=4]="WISH",Ks[Ks.AMOUNT=5]="AMOUNT",Ks[Ks.BLOCK=6]="BLOCK",Ks[Ks.SECTION=7]="SECTION",Ks[Ks.PART=8]="PART",Ks[Ks.INDEX=9]="INDEX",Ks[Ks.NEW_VALUE=10]="NEW_VALUE",Ks[Ks.MSG_LENGTH=11]="MSG_LENGTH",Ks[Ks.WRITE=12]="WRITE",Ks[Ks.NOT_SUPPORTED=13]="NOT_SUPPORTED",Ks[Ks.READ=14]="READ",Ks[Ks.UART_INTERFACE_ALLOCATED=80]="UART_INTERFACE_ALLOCATED",Ks[Ks.CDC_INTERFACE_ALLOCATED=81]="CDC_INTERFACE_ALLOCATED",Ks[Ks.UKNOWN_ERROR=704]="UKNOWN_ERROR",Ks[Ks.UI_QUEUE_REQ_ID_CONFLICT=711]="UI_QUEUE_REQ_ID_CONFLICT",Ks[Ks.UI_QUEUE_REQ_DATA_MISSING=712]="UI_QUEUE_REQ_DATA_MISSING",Ks[Ks.UI_QUEUE_REQ_ALREADY_ACTIVE=713]="UI_QUEUE_REQ_ALREADY_ACTIVE",Ks[Ks.UI_QUEUE_REQ_NONE_ACTIVE=714]="UI_QUEUE_REQ_NONE_ACTIVE",Ks[Ks.UI_QUEUE_SPECIAL_REQ_ID_MISMATCH=715]="UI_QUEUE_SPECIAL_REQ_ID_MISMATCH",Ks[Ks.UI_QUEUE_REQUEST_DECODE_ERROR=716]="UI_QUEUE_REQUEST_DECODE_ERROR",Ks[Ks.UI_QUEUE_REQUEST_SEND_ERROR=717]="UI_QUEUE_REQUEST_SEND_ERROR",Ks[Ks.UI_QUEUE_REQ_DATA_INVALID=718]="UI_QUEUE_REQ_DATA_INVALID",Ks[Ks.UI_QUEUE_REQ_TIMED_OUT=719]="UI_QUEUE_REQ_TIMED_OUT",Ks[Ks.UI_QUEUE_EMBEDED_RESPONSE_MISMATCH=720]="UI_QUEUE_EMBEDED_RESPONSE_MISMATCH";const ea={code:704,description:"Missing error description (READ error)."},ta={704:ea,2:{code:2,description:"This error happens when MESSAGE_STATUS isn't REQUEST (0) in request."},3:{code:3,description:"This error is returned when request is correct, but handshake request hasn't been sent to board (or SysEx connection has been closed)."},4:{code:4,description:"This error is returned when WISH is anything other than GET, SET or BACKUP."},5:{code:5,description:"This error is returned when AMOUNT is anything other than SINGLE or ALL."},6:{code:6,description:"This error is returned when BLOCK byte is incorrect."},7:{code:7,description:"This error is returned when SECTION byte is incorrect."},8:{code:8,description:"This error is returned when message part is incorrect."},9:{code:9,description:"This error is returned when wanted parameter is incorrect."},10:{code:10,description:"This error is returned when NEW_VALUE is incorrect."},11:{code:11,description:"This error is returned when request is too short."},12:{code:12,description:"This error is returned when writing new value to board has failed. This can happen if EEPROM on board is damaged (less likely) or if new value is incorrect (more likely)."},13:{code:13,description:"This error is returned when X is not supported by the board."},80:{code:80,description:"This error is returned when other peripheral already allocated wanted interface."},81:{code:81,description:"This error is returned when other peripheral already allocated wanted interface."},14:{code:14,description:"Missing error description (READ error)."},711:{code:711,description:"A Qeue Request tried to acquire next increment ID but it was already used by another request."},712:{code:712,description:"Could not start request, no request found for passed id."},713:{code:713,description:"A Qeue Request was found already active upon starting."},714:{code:714,description:"No Request active in Qeue upon receiving a MIDI response."},715:{code:715,description:"Request did not match specialRequestId event data payload"},716:{code:716,description:"Failed to decode request data."},717:{code:717,description:"Failed to send request."},718:{code:718,description:"Invalid request data."},719:{code:719,description:"Request sent but timed out."},720:{code:720,description:"Received a request not matching the active one."}},na=e=>ta[e]||ea,oa=[{name:"Arduino Leonardo",id:[1,58,76,24],oldId:[1,52,50,124],firmwareFileName:null},{name:"Arduino Mega",id:[9,16,0,18],oldId:[1,16,0,18],firmwareFileName:null},{name:"Arduino Pro Micro",id:[1,107,33,98],oldId:[1,5,13,73],firmwareFileName:null},{name:"Arduino Uno",id:[1,67,14,63],oldId:[1,11,120,50],firmwareFileName:null},{name:"Teensy++ 2.0",id:[112,11,64,30],oldId:[1,11,64,30],firmwareFileName:"teensy2pp.sysex"},{name:"DubFocus v1",id:[],oldId:[1,92,109,93],firmwareFileName:null},{name:"DubFocus 12",id:[85,74,109,41],oldId:[],firmwareFileName:"dubfocus12.sysex"},{name:"DubFocus 16",id:[61,70,72,25],oldId:[],firmwareFileName:"dubfocus16.sysex"},{name:"STM32F4 Discovery",id:[43,19,68,122],oldId:[],firmwareFileName:"discovery.sysex"},{name:"Jamiel",id:[1,12,108,80],oldId:[1,78,126,38],firmwareFileName:null},{name:"Cardamom",id:[99,82,54,48],oldId:[],firmwareFileName:"cardamom.sysex"},{name:"OpenDeck M v2",id:[122,56,41,19],oldId:[],firmwareFileName:"opendeck2.sysex"},{name:"OpenDeck M v1",id:[1,112,51,106],oldId:[1,91,42,85],firmwareFileName:null},{name:"Rooibos",id:[120,82,29,13],oldId:[],firmwareFileName:"rooibos.sysex"},{name:"Bergamot",id:[48,106,107,21],oldId:[],firmwareFileName:"bergamot.sysex"},{name:"DubFocus 16C",id:[44,111,98,103],oldId:[],firmwareFileName:"dubfocus16c.sysex"},{name:"OpenDeck S v1",id:[62,78,115,114],oldId:[],firmwareFileName:"opendeck_s.sysex"},{name:"BlackPill F401CC",id:[114,110,70,97],oldId:[],firmwareFileName:"blackpill401cc.sysex"},{name:"BlackPill F401CE",id:[122,28,101,39],oldId:[],firmwareFileName:"blackpill401ce.sysex"},{name:"BlackPill F411",id:[18,87,110,75],oldId:[],firmwareFileName:"blackpill411.sysex"},{name:"OpenDeck L v3A",id:[51,64,66,79],oldId:[],firmwareFileName:"opendeck3a.sysex"},{name:"OpenDeck L v3B",id:[70,68,60,41],oldId:[],firmwareFileName:"opendeck3b.sysex"},{name:"nRF52840DK",id:[79,4,3,17],oldId:[],firmwareFileName:"nrf52840dk.sysex"},{name:"Raspberry Pi Pico",id:[59,72,34,30],oldId:[],firmwareFileName:"pico.sysex"},{name:"OpenDeck M v2.1",id:[78,103,95,35],oldId:[],firmwareFileName:"opendeck21.sysex"},{name:"OpenDeck L v3.1",id:[9,65,127,60],oldId:[],firmwareFileName:"opendeck31.sysex"},{name:"OpenDeck M v2.2",id:[61,65,31,7],oldId:[],firmwareFileName:"opendeck22.sysex"},{name:"DubFocus 12SR",id:[67,39,10,25],oldId:[],firmwareFileName:"dubfocus12sr.sysex"}],ra=(e,t,n)=>{const o=Xe(!0),r=Ge(Ic(e,t)),i=Ld.actions.getFilteredSectionsForBlock(e,t),s=async()=>{o.value=!0;const i=t===is.Value&&n?n.value:void 0,s=await Ld.actions.getComponentSettings(e,t,i);Object.assign(r,s),Ws(100).then(()=>o.value=!1)},a=(e,t,n)=>{if(o.value)return;o.value=!0;return Ld.actions.setComponentSectionValue(t,()=>{r[e]=t.value,Ws(100).then(()=>o.value=!1),n&&n(t.value)}).catch(e=>(Hu.error("ERROR WHILE SAVING SETTING DATA",e),s()))};return An(()=>s()),n&&io([n],()=>n&&n.value&&s()),{formData:r,loading:o,loadData:s,onSettingChange:t=>{const{key:n,value:o,section:r,settingIndex:i,onLoad:s}=t;return a(n,{block:e,section:r,index:i,value:o},s)},onValueChange:t=>{const{key:o,value:r,section:i,onLoad:s}=t,l={block:e,section:i,index:n.value,value:r};return a(o,l,s)},showField:e=>e&&(!e.showIf||e.showIf(r)),sections:i,blockDefinition:yc[e]}},ia=e=>{const t=Xe(null),n=()=>t.value=(new Date).getTime();return{isHighlighted:Ro(()=>{const o=e.value&&t.value-e.value<250;return o&&Ws(10).then(n),o})}},sa=(e,t)=>()=>{if(!window.confirm(e))return!1;t()};var aa=(e,t,n)=>Ts(e,t,n)<0;const{MAX_LENGTH:la}=ms,{re:ca,t:ua}=bs;var da=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Ms)return e;if("string"!=typeof e)return null;if(e.length>la)return null;if(!(t.loose?ca[ua.LOOSE]:ca[ua.FULL]).test(e))return null;try{return new Ms(e,t)}catch(e){return null}};var pa=(e,t)=>{const n=da(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const ha=e=>{const t=[];for(let n=e.startIndex;n<=e.endIndex;n++)t.push(n);return{...e,indexArray:t}};var fa=No({name:"DeviceForm",props:{block:{required:!0,type:Number},gridCols:{default:3,type:Number}},setup(e){const{numberOfComponents:t,outputId:n}=md,o=Ro(()=>Number(jp.currentRoute.value.params.index));return{outputId:n,numberOfComponents:t,index:o,...ra(e.block,is.Value,o)}}});const La={class:"w-full section-heading"},ma={class:"section-heading-inner flex"},ga=fn("span",{class:"mr-6"},"›",-1),va={class:"mr-6 text-gray-400"},ba={class:"hidden md:block md:flex-grow text-right"},ya={class:"section-content"};fa.render=function(e,t,n,o,r,i){const s=Zt("router-link"),a=Zt("Siblinks"),c=Zt("SpinnerOverlay"),u=Zt("FormField");return an(),cn("form",{class:"relative section",novalidate:"",onSubmit:t[1]||(t[1]=tr(()=>{},["prevent"]))},[fn("h1",La,[fn("div",ma,[fn(s,{class:"mr-6",to:{name:e.blockDefinition.routeName}},{default:$t(()=>[fn("h2",null,l(e.blockDefinition.title)+"s",1)]),_:1},8,["to"]),ga,fn("div",va,[mn(l(e.blockDefinition.title)+" ",1),fn("strong",null,l(e.index),1)]),fn("div",ba,[fn(a,{"param-key":"index",current:e.index,total:e.numberOfComponents[e.block],params:{outputId:e.outputId}},null,8,["current","total","params"])])])]),e.loading?fn(c,{key:0}):vn("",!0),fn("div",ya,[fn("div",{class:["form-grid","lg:grid-cols-"+e.gridCols]},[(an(!0),cn(en,null,Ao(e.sections,t=>(an(),cn(en,null,[e.showField(t)?fn(u,{key:t.key,class:"col-span-"+(t.colspan||1),value:e.formData[t.key],"field-definition":t,onModified:e.onValueChange},null,8,["class","value","field-definition","onModified"]):vn("",!0)],64))),256))],2)])],32)};var Ia=No({name:"DeviceGrid",props:{index:{required:!0,type:Number},outputId:{required:!0,type:String},routeName:{required:!0,type:String},highlight:{default:null,type:Number}},setup(e){const{highlight:t}=tt(e);return{...ia(t)}}});Ia.render=function(e,t,n,o,r,i){const s=Zt("ButtonLink");return an(),cn(s,{to:{name:e.routeName,params:{outputId:e.outputId,index:e.index}},class:{"btn-highlight":e.isHighlighted}},{default:$t(()=>[qt(e.$slots,"default")]),_:3},8,["to","class"])};var Ea=No({name:"DeviceTableComponentRow",props:{formData:{type:Object,default:()=>({})},showField:{required:!0,type:Function},onValueChange:{required:!0,type:Function},index:{required:!0,type:Number},sections:{required:!0,type:Object},highlight:{type:Number,default:null}},setup(e){const{highlight:t}=tt(e);return{...ia(t)}}});const Ca={class:"form-table-row"};Ea.render=function(e,t,n,o,r,i){const s=Zt("FormField");return an(),cn("div",Ca,[fn("div",null,[fn("span",{class:["btn",{"btn-highlight":e.isHighlighted}]},l(e.index),3)]),(an(!0),cn(en,null,Ao(e.sections,t=>(an(),cn(en,null,[e.showField(t,e.formData)?fn(s,{key:t.key,index:e.index,value:e.formData[t.key],"field-definition":t,onModified:e.onValueChange},null,8,["index","value","field-definition","onModified"]):vn("",!0)],64))),256))])};var wa=No({name:"DeviceGrid",components:{DeviceGridButton:Ia,DeviceTableComponentRow:Ea},props:{title:{default:"",type:String},block:{required:!0,type:Number},segmentGrid:{type:Boolean,default:!1},routeName:{required:!0,type:String}},setup(e){const{outputId:t,setViewSetting:n,showMsbControls:o,numberOfComponents:r}=md,{highlights:i}=$u,{block:s,segmentGrid:a}=tt(e),l=a.value?((e,t)=>{const n=Ro(()=>e.value[Bi.Button]||0),o=Ro(()=>e.value[Bi.Analog]||0),r=Ro(()=>e.value[Bi.Led]||0),i=Ro(()=>e.value[Bi.Touchscreen]||0);return Ro(()=>{const e=[];switch(t.value){case Bi.Button:aa(pa(fs.firmwareVersion),"5.4.0")||Rs(pa(fs.firmwareVersion),"6.5.0")?(e.push({title:"Buttons",startIndex:0,endIndex:n.value-o.value-i.value-1}),o.value>0&&e.push({title:"Analog",startIndex:n.value-o.value-i.value,endIndex:n.value-o.value-i.value+o.value-1}),i.value>0&&e.push({title:"Touchscreen",startIndex:n.value-o.value+o.value-i.value,endIndex:n.value-o.value+o.value-1})):(e.push({title:"Buttons",startIndex:0,endIndex:n.value-o.value-1},{title:"Analog",startIndex:n.value-o.value,endIndex:n.value-o.value+o.value-i.value-1}),i.value>0&&e.push({title:"Touchscreen",startIndex:n.value-o.value+o.value-i.value,endIndex:n.value-o.value+o.value-1}));break;case Bi.Analog:aa(pa(fs.firmwareVersion),"5.4.0")||Rs(pa(fs.firmwareVersion),"6.5.0")?e.push({title:"Analog",startIndex:0,endIndex:o.value-1}):e.push({title:"Analog",startIndex:0,endIndex:o.value-i.value-1},{title:"Touchscreen",startIndex:o.value-i.value,endIndex:o.value-1});break;case Bi.Led:e.push({title:"LED",startIndex:0,endIndex:r.value-i.value-1},{title:"Touchscreen",startIndex:r.value-i.value,endIndex:r.value-1})}return e.map(ha)})})(r,s):void 0,{componentCount:c,indexRange:u,pages:d,pageSizes:p,sections:h,viewSetting:f}=(e=>{const t=Ro(()=>Ld.state.viewSettings[e]),n=Ro(()=>Ld.state.numberOfComponents[e]||0),o=Ro(()=>Math.ceil(n.value/t.value.itemsPerPage)),r=Ro(()=>(t.value.currentPage-1)*t.value.itemsPerPage),i=Ro(()=>r.value+t.value.itemsPerPage),s=Ro(()=>i.value>n.value?n.value:i.value),a=[16,32,56,112],l=Ro(()=>a.filter(e=>e{const e=[];for(let t=r.value;tyc[e].sections);return{componentCount:n,indexRange:c,pages:o,pageSizes:l,sections:u,viewSetting:t}})(s.value),{columnViewData:L,loading:m,showField:g,onValueChange:v}=((e,t)=>{const n=Xe(!0),o=Ic(e,is.Value),r=Ge({}),i=Ro(()=>!!t.value.viewListAsTable),s=async()=>{if(2!==Ld.state.valueSize||!i.value)return;n.value=!0;const t=await Ld.actions.getSectionValues(e);Object.keys(t).forEach(e=>{t[e].forEach((t,n)=>{r[n]||(r[n]={...o}),r[n][e]=t})}),Ws(100).then(()=>n.value=!1)};return An(()=>s()),io([i],()=>i.value&&s()),{columnViewData:r,loading:n,loadData:s,showField:(e,t)=>e&&(!e.showIf||e.showIf(t)),onValueChange:t=>{const{key:o,value:i,section:a,index:l,onLoad:c}=t,u={block:e,section:a,index:l,value:i};if(n.value)return;n.value=!0;return Ld.actions.setComponentSectionValue(u,()=>{r[l][o]=u.value,Ws(100).then(()=>n.value=!1),c&&c(u.value)}).catch(e=>(Hu.error("ERROR WHILE SAVING SETTING DATA",e),s()))}}})(s.value,f);return{outputId:t,highlights:i,columnViewData:L,loading:m,showField:g,onValueChange:v,setViewSetting:n,componentCount:c,viewSetting:f,indexRange:u,pages:d,pageSizes:p,sections:h,showMsbControls:o,segments:l}}});const Sa={class:"section-heading"},ka={key:0,class:"section-heading-inner text-center"},xa={key:0,class:"section-heading"},_a={class:"section-heading-inner-sm clearfix"},Ma={class:""},Ta={key:0,class:"ml-6 float-right"},Ra=fn("span",{class:"text-xs"},"Show",-1),Na={key:1,class:"ml-6 mt-4 md:mt-0 float-right"},Da=fn("span",{class:"text-xs ml-4"},"Page",-1),Aa={class:"form-table"},Oa={key:2,class:"device-grid"},Pa={class:"text-xl font-bold"},Ba={class:"section-heading text-center"},Fa={class:"section-heading-inner-sm"},Ua={class:"device-grid"},Ga={class:"text-xl font-bold"};wa.render=function(e,t,n,o,r,i){const s=Zt("SpinnerOverlay"),a=Zt("DeviceTableComponentRow"),c=Zt("DeviceGridButton");return an(),cn("div",{class:["section",{wide:e.viewSetting.viewListAsTable}]},[fn("div",Sa,[e.title?(an(),cn("h2",ka,l(e.title),1)):vn("",!0)]),e.showMsbControls?vn("",!0):(an(),cn("div",xa,[fn("div",_a,[fn("span",Ma,[fn("span",{class:["btn btn-xs mr-2",{"btn-active":!e.viewSetting.viewListAsTable}],onClick:t[1]||(t[1]=t=>e.setViewSetting(e.block,{viewListAsTable:!1}))}," Grid ",2),fn("span",{class:["btn btn-xs",{"btn-active":e.viewSetting.viewListAsTable}],onClick:t[2]||(t[2]=t=>e.setViewSetting(e.block,{viewListAsTable:!0}))}," Table ",2)]),e.viewSetting.viewListAsTable&&e.pageSizes.length?(an(),cn("span",Ta,[Ra,(an(!0),cn(en,null,Ao(e.pageSizes,t=>(an(),cn("span",{key:"page-size-"+t,class:["btn btn-xs ml-1",{"btn-active":t===e.viewSetting.itemsPerPage}],onClick:n=>e.setViewSetting(e.block,{itemsPerPage:t})},l(t),11,["onClick"]))),128))])):vn("",!0),e.viewSetting.viewListAsTable&&e.pages>1?(an(),cn("span",Na,[Da,(an(!0),cn(en,null,Ao(e.pages,t=>(an(),cn("span",{key:"page-size-"+t,class:["btn btn-xs ml-1",{"btn-active":t===e.viewSetting.currentPage}],onClick:n=>e.setViewSetting(e.block,{currentPage:t})},l(t),11,["onClick"]))),128))])):vn("",!0)])])),e.viewSetting.viewListAsTable?(an(),cn("form",{key:1,class:"relative",novalidate:"",onSubmit:t[3]||(t[3]=tr(()=>{},["prevent"]))},[e.loading?fn(s,{key:0}):vn("",!0),fn("div",Aa,[(an(!0),cn(en,null,Ao(e.indexRange,t=>(an(),cn(a,{key:"table-form-"+t,index:t,"form-data":e.columnViewData[t],"show-field":e.showField,sections:e.sections,"on-value-change":e.onValueChange,highlight:e.highlights[e.block][t]},null,8,["index","form-data","show-field","sections","on-value-change","highlight"]))),128))])],32)):!e.segments&&e.componentCount>0?(an(),cn("div",Oa,[(an(!0),cn(en,null,Ao(e.componentCount,t=>(an(),cn(c,{key:"button-"+t,"output-id":e.outputId,"route-name":e.routeName,index:t-1,highlight:e.highlights[e.block][t-1]},{default:$t(()=>[fn("span",Pa,l(t-1),1)]),_:2},1032,["output-id","route-name","index","highlight"]))),128))])):e.segments&&e.segments.length?(an(!0),cn(en,{key:3},Ao(e.segments,(t,n)=>(an(),cn("div",{key:"grid-segment-"+n,class:"grid-segment"},[fn("h3",Ba,[fn("div",Fa,l(t.title),1)]),fn("div",Ua,[(an(!0),cn(en,null,Ao(t.indexArray,t=>(an(),cn(c,{key:"button-"+t,"output-id":e.outputId,"route-name":e.routeName,index:t,highlight:e.highlights[e.block][t]},{default:$t(()=>[fn("span",Ga,l(t),1)]),_:2},1032,["output-id","route-name","index","highlight"]))),128))])]))),128)):vn("",!0)],2)};var Va=No({name:"RouteWrapper"});Va.render=function(e,t,n,o,r,i){const s=Zt("router-view");return an(),cn(s,{key:e.$route.fullPath})};var qa=No({name:"AnalogIcon"});const $a={"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",rel:"Sine Wave by Marco Galtarossa from the Noun Project"},Ha=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M510 171.7C485.19 170.92 477.35 272.27 468.03 320.94C448.38 423.39 442.18 502.75 383.73 504.31C325.28 505.87 319.14 423.39 299.51 320.95C290.19 272.3 283.29 172.48 256.16 171.7C229.03 170.92 222.1 272.29 212.77 320.95C193.13 423.39 190.85 501.2 134.74 502.76C78.63 504.31 59.63 488.35 40 385.9C30.5 336.34 -7.33 344.32 -24.45 336.36C-24.36 332.22 -69.77 285.21 -27.67 298.43C14.44 311.64 57.75 283.73 77.38 386.17C86.71 434.82 100.81 463.22 128.51 462.35C156.21 461.48 162.55 361.77 171.88 313.11C191.52 210.66 188.35 129.74 256.13 129.74C323.91 129.74 320.37 211.44 340 313.89C349.32 362.55 351.15 463.13 383.72 462.35C416.29 461.57 420.67 361.77 430 313.1C449.64 210.65 448.27 131.29 511.4 129.74C574.53 128.19 566.81 207.99 587.91 290C609.01 372.01 633.78 308.68 645.44 320C653.22 327.55 652.18 340.34 642.33 358.39C595.91 382.89 566.74 370.4 554.82 320.94C536.94 246.75 534.81 172.48 510 171.7Z"},null,-1);qa.render=function(e,t,n,o,r,i){return an(),cn("svg",$a,[Ha])};const ja={Enabled:{block:Bi.Analog,key:"enabled",type:is.Value,section:0,component:_i.Toggle,label:"Enable",helpText:"Enables or disables analog input. Disabled by default to avoid sending erratic values when nothing\n is connected to the input."},Invert:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,key:"invert",type:is.Value,section:1,component:_i.Toggle,label:"Invert direction",helpText:"Inverts the direction of the analog input. For example, if CC MIDI message is used, when the potentiometer is\n at its left edge, sent CC value is 0, and when it's at its right edge, sent value is 127. If inversion is enabled, vice\n versa applies.",block:Bi.Analog},Type:{showIf:e=>!!e.enabled,key:"type",type:is.Value,section:2,component:_i.Select,options:[{value:Ui.ControlChange7Bit,text:"Control change 7-bit"},{value:Ui.Note,text:"Note"},{value:Ui.FSR,text:"FSR"},{value:Ui.Button,text:"Button"},{value:Ui.NRPN7bit,text:"NRPN 7-bit"},{value:Ui.NRPN14bit,text:"NRPN 14-bit"},{value:Ui.PitchBend,text:"Pitch bend"},{value:Ui.ControlChange14Bit,text:"Control change 14-bit"}],label:"Message type",helpText:"",block:Bi.Analog},MidiIdLSB:{showIf:e=>!Xi.includes(e.type)&&!!e.enabled,key:"midiIdLSB",type:is.Value,section:3,component:_i.Input,min:0,max:127,max2Byte:16383,label:"MIDI ID (LSB)",helpText:"",block:Bi.Analog,isLsb:!0},MidiIdMSB:{showIf:e=>!Xi.includes(e.type)&&!!e.enabled,isMsb:!0,key:"midiIdMSB",type:is.Value,section:4,component:_i.Input,min:0,max:127,label:"MIDI ID (MSB)",helpText:"",block:Bi.Analog},LowerLimitLSB:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,isLsb:!0,key:"lowerLimitLSB",type:is.Value,section:5,component:_i.Input,min:0,max:127,max2Byte:16383,label:"Lower limit (LSB)",helpText:"Specifies the minimum value which is sent by the analog input. Scaling is used\n here, so this value will be sent when the analog input is at its lowest position. Limit is\n type-dependent. For most types, total range is 0-127. For pitch bend, 14-bit NRPN and\n 14-bit CC, total range is 0-16383.",block:Bi.Analog},LowerLimitMSB:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,isMsb:!0,key:"lowerLimitMSB",type:is.Value,section:6,component:_i.Input,min:0,max:127,label:"Lower limit (MSB)",helpText:"Specifies the minimum value which is sent by the analog input. Scaling is used\n here, so this value will be sent when the analog input is at its lowest position. Limit is\n type-dependent. For most types, total range is 0-127. For pitch bend, 14-bit NRPN and\n 14-bit CC, total range is 0-16383.",block:Bi.Analog},UpperLimitLSB:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,isLsb:!0,key:"upperLimitLSB",type:is.Value,section:7,component:_i.Input,min:0,max:127,max2Byte:16383,label:"Upper limit (LSB)",helpText:"Specifies the maximum value which is sent by the analog input. Scaling is used\n here, so this value will be sent when the analog input is at its highest position. Limit is\n type-dependent. For most types, total range is 0-127. For pitch bend, 14-bit NRPN and\n 14-bit CC, total range is 0-16383.",block:Bi.Analog},UpperLimitMSB:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,isMsb:!0,key:"upperLimitMSB",type:is.Value,section:8,component:_i.Input,min:0,max:127,label:"Upper limit (MSB)",helpText:"Specifies the maximum value which is sent by the analog input. Scaling is used\n here, so this value will be sent when the analog input is at its highest position. Limit is\n type-dependent. For most types, total range is 0-127. For pitch bend, 14-bit NRPN and\n 14-bit CC, total range is 0-16383.",block:Bi.Analog},MidiChannel:{showIf:e=>!Yi.includes(e.type)&&!!e.enabled,key:"midiChannel",type:is.Value,block:Bi.Analog,section:9,component:_i.Input,min:1,max:17,label:"MIDI channel",helpText:"Setting the channel to value 17 will cause sending of data on each MIDI channel."},LowerAdcOffset:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,key:"lowerAdcOffset",type:is.Value,section:10,component:_i.Input,min:0,max:100,label:"Lower ADC offset",helpText:"Specifies lower offset percentage which is used to calculate minimum ADC value upon which MIDI\n values will be based. Useful for inputs which cannot reach minimum ADC value. If for example, the board has\n nominal ADC range 0-4095, setting this value to 10 will calculate MIDI values based on 409-4095 range (assuming\n the upper offset is 0), that is, lower 10% of ADC range will be cut off.",block:Bi.Analog},UpperAdcOffset:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,key:"upperAdcOffset",type:is.Value,section:11,component:_i.Input,min:0,max:100,label:"Upper ADC offset",helpText:"Specifies upper offset percentage which is used to calculate maximum ADC value upon which MIDI\n values will be based. Useful for inputs which cannot reach maximum ADC value. If for example, the board has\n nominal ADC range 0-4095, setting this value to 10 will calculate MIDI values based on 0-3685 range (assuming\n the lower offset is 0), that is, upper 10% of ADC range will be cut off.",block:Bi.Analog}},za={block:Bi.Analog,title:"Analog",routeName:"device-analogs",iconComponent:We(qa),componentCountResponseIndex:2,sections:ja,routes:[{path:"analogs",name:"device-analogs",component:Va,redirect:{name:"device-analogs-list"},children:[{path:"list",name:"device-analogs-list",component:wa,props:{block:Bi.Analog,routeName:"device-analogs-form",segmentGrid:!0}},{path:"analogs/:index",name:"device-analogs-form",component:fa,props:{block:Bi.Analog}}]}]};var Wa=No({name:"IconButton"});const Qa={"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640"},Za=fn("path",{fill:"currentColor",d:"M348.7 84.16L357.94 85.48L367.05 87.16L376.03 89.18L384.88 91.56L393.59 94.27L402.14 97.31L410.54 100.67L418.78 104.35L426.84 108.33L434.72 112.61L442.41 117.19L449.91 122.05L457.21 127.19L464.3 132.6L471.17 138.27L477.81 144.19L484.22 150.36L490.39 156.77L496.32 163.42L501.99 170.29L507.4 177.37L512.53 184.67L517.4 192.17L521.97 199.86L526.25 207.75L530.24 215.81L533.92 224.04L537.28 232.44L540.32 241L543.03 249.7L545.4 258.55L547.43 267.54L549.11 276.65L550.42 285.88L551.37 295.23L551.95 304.68L552.14 314.22L551.95 323.77L551.37 333.22L550.42 342.57L549.11 351.8L547.43 360.91L545.4 369.9L543.03 378.75L540.32 387.45L537.28 396.01L533.92 404.41L530.24 412.64L526.25 420.7L521.97 428.59L517.4 436.28L512.53 443.78L507.4 451.07L501.99 458.16L496.32 465.03L490.39 471.67L484.22 478.09L477.81 484.26L471.17 490.18L464.3 495.85L457.21 501.26L449.91 506.4L442.41 511.26L434.72 515.84L426.84 520.12L418.78 524.1L410.54 527.78L402.14 531.14L393.59 534.18L384.88 536.89L376.03 539.26L367.05 541.29L357.94 542.97L348.7 544.29L339.36 545.24L329.91 545.81L320.36 546.01L310.81 545.81L301.36 545.24L292.02 544.29L282.79 542.97L273.67 541.29L264.69 539.26L255.84 536.89L247.13 534.18L238.58 531.14L230.18 527.78L221.94 524.1L213.88 520.12L206 515.84L198.31 511.26L190.81 506.4L183.51 501.26L176.42 495.85L169.55 490.18L162.91 484.26L156.5 478.09L150.33 471.67L144.4 465.03L138.73 458.16L133.32 451.07L128.19 443.78L123.33 436.28L118.75 428.59L114.47 420.7L110.48 412.64L106.81 404.41L103.44 396.01L100.4 387.45L97.69 378.75L95.32 369.9L93.29 360.91L91.61 351.8L90.3 342.57L89.35 333.22L88.77 323.77L88.58 314.22L88.77 304.68L89.35 295.23L90.3 285.88L91.61 276.65L93.29 267.54L95.32 258.55L97.69 249.7L100.4 241L103.44 232.44L106.81 224.04L110.48 215.81L114.47 207.75L118.75 199.86L123.33 192.17L128.19 184.67L133.32 177.37L138.73 170.29L144.4 163.42L150.33 156.77L156.5 150.36L162.91 144.19L169.55 138.27L176.42 132.6L183.51 127.19L190.81 122.05L198.31 117.19L206 112.61L213.88 108.33L221.94 104.35L230.18 100.67L238.58 97.31L247.13 94.27L255.84 91.56L264.69 89.18L273.67 87.16L282.79 85.48L292.02 84.16L301.36 83.21L310.81 82.64L320.36 82.44L329.91 82.64L339.36 83.21L339.36 83.21L348.7 84.16ZM294.85 107.17L286.54 108.35L278.34 109.86L270.26 111.69L262.29 113.82L254.46 116.26L246.75 119L239.2 122.03L231.78 125.33L224.53 128.92L217.44 132.78L210.51 136.89L203.76 141.27L197.2 145.89L190.82 150.76L184.64 155.86L178.66 161.19L172.88 166.75L167.33 172.52L162 178.5L156.89 184.68L152.03 191.06L147.4 197.63L143.03 204.38L138.91 211.3L135.06 218.39L131.47 225.65L128.16 233.06L125.14 240.62L122.4 248.32L119.96 256.16L117.82 264.12L116 272.21L114.49 280.41L113.3 288.72L112.45 297.13L111.93 305.63L111.76 314.22L111.93 322.82L112.45 331.32L113.3 339.73L114.49 348.04L116 356.24L117.82 364.33L119.96 372.29L122.4 380.13L125.14 387.83L128.16 395.39L131.47 402.8L135.06 410.06L138.91 417.15L143.03 424.07L147.4 430.82L152.03 437.39L156.89 443.77L162 449.95L167.33 455.93L172.88 461.7L178.66 467.26L184.64 472.59L190.82 477.69L197.2 482.56L203.76 487.18L210.51 491.56L217.44 495.67L224.53 499.53L231.78 503.11L239.2 506.42L246.75 509.45L254.46 512.19L262.29 514.62L270.26 516.76L278.34 518.59L286.54 520.1L294.85 521.28L303.26 522.14L311.77 522.65L320.36 522.83L328.95 522.65L337.46 522.14L345.87 521.28L354.18 520.1L362.38 518.59L370.47 516.76L378.43 514.62L386.27 512.19L393.97 509.45L401.53 506.42L408.94 503.11L416.19 499.53L423.28 495.67L430.21 491.56L436.96 487.18L443.53 482.56L449.9 477.69L456.09 472.59L462.07 467.26L467.84 461.7L473.39 455.93L478.72 449.95L483.83 443.77L488.69 437.39L493.32 430.82L497.69 424.07L501.81 417.15L505.67 410.06L509.25 402.8L512.56 395.39L515.59 387.83L518.32 380.13L520.76 372.29L522.9 364.33L524.72 356.24L526.23 348.04L527.42 339.73L528.27 331.32L528.79 322.82L528.96 314.22L528.79 305.63L528.27 297.13L527.42 288.72L526.23 280.41L524.72 272.21L522.9 264.12L520.76 256.16L518.32 248.32L515.59 240.62L512.56 233.06L509.25 225.65L505.67 218.39L501.81 211.3L497.69 204.38L493.32 197.63L488.69 191.06L483.83 184.68L478.72 178.5L473.39 172.52L467.84 166.75L462.07 161.19L456.09 155.86L449.9 150.76L443.53 145.89L436.96 141.27L430.21 136.89L423.28 132.78L416.19 128.92L408.94 125.33L401.53 122.03L393.97 119L386.27 116.26L378.43 113.82L370.47 111.69L362.38 109.86L354.18 108.35L345.87 107.17L337.46 106.31L328.95 105.8L320.36 105.62L311.77 105.8L303.26 106.31L303.26 106.31L294.85 107.17Z"},null,-1),Xa=fn("path",{fill:"currentColor",d:"M343.54 39.74L354.63 40.87L365.58 42.43L376.39 44.42L387.05 46.83L397.55 49.64L407.88 52.86L418.03 56.47L428 60.46L437.77 64.82L447.33 69.54L456.68 74.63L465.81 80.06L474.71 85.82L483.37 91.92L491.77 98.33L499.92 105.06L507.81 112.09L515.42 119.41L522.74 127.02L529.77 134.9L536.49 143.05L542.91 151.46L549.01 160.12L554.77 169.02L560.2 178.15L565.28 187.5L570.01 197.06L574.37 206.83L578.36 216.8L581.97 226.95L585.19 237.28L588 247.78L590.41 258.44L592.4 269.25L593.96 280.2L595.09 291.29L595.77 302.5L596 313.83L595.77 325.16L595.09 336.37L593.96 347.46L592.4 358.41L590.41 369.22L588 379.88L585.19 390.38L581.97 400.71L578.36 410.86L574.37 420.83L570.01 430.6L565.28 440.16L560.2 449.52L554.77 458.64L549.01 467.54L542.91 476.2L536.49 484.61L529.77 492.76L522.74 500.64L515.42 508.25L507.81 515.57L499.92 522.6L491.77 529.33L483.37 535.74L474.71 541.84L465.81 547.6L456.68 553.03L447.33 558.12L437.77 562.84L428 567.21L418.03 571.19L407.88 574.8L397.55 578.02L387.05 580.83L376.39 583.24L365.58 585.23L354.63 586.79L343.54 587.92L332.33 588.6L321 588.83L309.67 588.6L298.46 587.92L287.37 586.79L276.42 585.23L265.61 583.24L254.95 580.83L244.45 578.02L234.12 574.8L223.96 571.19L214 567.21L204.23 562.84L194.67 558.12L185.31 553.03L176.19 547.6L167.29 541.84L158.63 535.74L150.22 529.33L142.07 522.6L134.19 515.57L126.58 508.25L119.26 500.64L112.23 492.76L105.5 484.61L99.09 476.2L92.99 467.54L87.22 458.64L81.8 449.52L76.71 440.16L71.99 430.6L67.62 420.83L63.64 410.86L60.03 400.71L56.81 390.38L54 379.88L51.59 369.22L49.6 358.41L48.04 347.46L46.91 336.37L46.23 325.16L46 313.83L46.23 302.5L46.91 291.29L48.04 280.2L49.6 269.25L51.59 258.44L54 247.78L56.81 237.28L60.03 226.95L63.64 216.8L67.62 206.83L71.99 197.06L76.71 187.5L81.8 178.15L87.22 169.02L92.99 160.12L99.09 151.46L105.5 143.05L112.23 134.9L119.26 127.02L126.58 119.41L134.19 112.09L142.07 105.06L150.22 98.33L158.63 91.92L167.29 85.82L176.19 80.06L185.31 74.63L194.67 69.54L204.23 64.82L214 60.46L223.96 56.47L234.12 52.86L244.45 49.64L254.95 46.83L265.61 44.42L276.42 42.43L287.37 40.87L298.46 39.74L309.67 39.06L321 38.83L332.33 39.06L343.54 39.74ZM299.28 50.88L288.6 51.97L278.04 53.47L267.62 55.39L257.35 57.71L247.23 60.42L237.28 63.52L227.5 67L217.89 70.84L208.48 75.04L199.26 79.6L190.25 84.5L181.45 89.73L172.88 95.29L164.54 101.16L156.44 107.34L148.58 113.83L140.99 120.6L133.65 127.66L126.6 134.99L119.82 142.58L113.34 150.44L107.16 158.54L101.28 166.88L95.73 175.46L90.5 184.25L85.6 193.26L81.04 202.48L76.84 211.89L73 221.5L69.52 231.28L66.42 241.23L63.71 251.35L61.39 261.62L59.47 272.04L57.97 282.6L56.88 293.28L56.22 304.09L56 315L56.22 325.92L56.88 336.72L57.97 347.41L59.47 357.96L61.39 368.38L63.71 378.65L66.42 388.77L69.52 398.73L73 408.51L76.84 418.11L81.04 427.52L85.6 436.74L90.5 445.75L95.73 454.55L101.28 463.12L107.16 471.47L113.34 479.57L119.82 487.42L126.6 495.02L133.65 502.35L140.99 509.41L148.58 516.18L156.44 522.66L164.54 528.84L172.88 534.72L181.45 540.28L190.25 545.51L199.26 550.4L208.48 554.96L217.89 559.16L227.5 563.01L237.28 566.48L247.23 569.58L257.35 572.3L267.62 574.61L278.04 576.53L288.6 578.04L299.28 579.12L310.08 579.78L321 580L331.92 579.78L342.72 579.12L353.41 578.04L363.96 576.53L374.38 574.61L384.65 572.3L394.77 569.58L404.72 566.48L414.51 563.01L424.11 559.16L433.52 554.96L442.74 550.4L451.75 545.51L460.55 540.28L469.12 534.72L477.46 528.84L485.57 522.66L493.42 516.18L501.02 509.41L508.35 502.35L515.4 495.02L522.18 487.42L528.66 479.57L534.84 471.47L540.72 463.12L546.27 454.55L551.51 445.75L556.4 436.74L560.96 427.52L565.16 418.11L569.01 408.51L572.48 398.73L575.58 388.77L578.29 378.65L580.61 368.38L582.53 357.96L584.04 347.41L585.12 336.72L585.78 325.92L586 315L585.78 304.09L585.12 293.28L584.04 282.6L582.53 272.04L580.61 261.62L578.29 251.35L575.58 241.23L572.48 231.28L569.01 221.5L565.16 211.89L560.96 202.48L556.4 193.26L551.51 184.25L546.27 175.46L540.72 166.88L534.84 158.54L528.66 150.44L522.18 142.58L515.4 134.99L508.35 127.66L501.02 120.6L493.42 113.83L485.57 107.34L477.46 101.16L469.12 95.29L460.55 89.73L451.75 84.5L442.74 79.6L433.52 75.04L424.11 70.84L414.51 67L404.72 63.52L394.77 60.42L384.65 57.71L374.38 55.39L363.96 53.47L353.41 51.97L342.72 50.88L331.92 50.22L321 50L310.08 50.22L299.28 50.88Z"},null,-1),Ya=fn("path",{fill:"currentColor",d:"M348.7 84.16L357.94 85.48L367.05 87.16L376.03 89.18L384.88 91.56L393.59 94.27L402.14 97.31L410.54 100.67L418.78 104.35L426.84 108.33L434.72 112.61L442.41 117.19L449.91 122.05L457.21 127.19L464.3 132.6L471.17 138.27L477.81 144.19L484.22 150.36L490.39 156.77L496.32 163.42L501.99 170.29L507.4 177.37L512.53 184.67L517.4 192.17L521.97 199.86L526.25 207.75L530.24 215.81L533.92 224.04L537.28 232.44L540.32 241L543.03 249.7L545.4 258.55L547.43 267.54L549.11 276.65L550.42 285.88L551.37 295.23L551.95 304.68L552.14 314.22L551.95 323.77L551.37 333.22L550.42 342.57L549.11 351.8L547.43 360.91L545.4 369.9L543.03 378.75L540.32 387.45L537.28 396.01L533.92 404.41L530.24 412.64L526.25 420.7L521.97 428.59L517.4 436.28L512.53 443.78L507.4 451.07L501.99 458.16L496.32 465.03L490.39 471.67L484.22 478.09L477.81 484.26L471.17 490.18L464.3 495.85L457.21 501.26L449.91 506.4L442.41 511.26L434.72 515.84L426.84 520.12L418.78 524.1L410.54 527.78L402.14 531.14L393.59 534.18L384.88 536.89L376.03 539.26L367.05 541.29L357.94 542.97L348.7 544.29L339.36 545.24L329.91 545.81L320.36 546.01L310.81 545.81L301.36 545.24L292.02 544.29L282.79 542.97L273.67 541.29L264.69 539.26L255.84 536.89L247.13 534.18L238.58 531.14L230.18 527.78L221.94 524.1L213.88 520.12L206 515.84L198.31 511.26L190.81 506.4L183.51 501.26L176.42 495.85L169.55 490.18L162.91 484.26L156.5 478.09L150.33 471.67L144.4 465.03L138.73 458.16L133.32 451.07L128.19 443.78L123.33 436.28L118.75 428.59L114.47 420.7L110.48 412.64L106.81 404.41L103.44 396.01L100.4 387.45L97.69 378.75L95.32 369.9L93.29 360.91L91.61 351.8L90.3 342.57L89.35 333.22L88.77 323.77L88.58 314.22L88.77 304.68L89.35 295.23L90.3 285.88L91.61 276.65L93.29 267.54L95.32 258.55L97.69 249.7L100.4 241L103.44 232.44L106.81 224.04L110.48 215.81L114.47 207.75L118.75 199.86L123.33 192.17L128.19 184.67L133.32 177.37L138.73 170.29L144.4 163.42L150.33 156.77L156.5 150.36L162.91 144.19L169.55 138.27L176.42 132.6L183.51 127.19L190.81 122.05L198.31 117.19L206 112.61L213.88 108.33L221.94 104.35L230.18 100.67L238.58 97.31L247.13 94.27L255.84 91.56L264.69 89.18L273.67 87.16L282.79 85.48L292.02 84.16L301.36 83.21L310.81 82.64L320.36 82.44L329.91 82.64L339.36 83.21L339.36 83.21L348.7 84.16ZM294.85 107.17L286.54 108.35L278.34 109.86L270.26 111.69L262.29 113.82L254.46 116.26L246.75 119L239.2 122.03L231.78 125.33L224.53 128.92L217.44 132.78L210.51 136.89L203.76 141.27L197.2 145.89L190.82 150.76L184.64 155.86L178.66 161.19L172.88 166.75L167.33 172.52L162 178.5L156.89 184.68L152.03 191.06L147.4 197.63L143.03 204.38L138.91 211.3L135.06 218.39L131.47 225.65L128.16 233.06L125.14 240.62L122.4 248.32L119.96 256.16L117.82 264.12L116 272.21L114.49 280.41L113.3 288.72L112.45 297.13L111.93 305.63L111.76 314.22L111.93 322.82L112.45 331.32L113.3 339.73L114.49 348.04L116 356.24L117.82 364.33L119.96 372.29L122.4 380.13L125.14 387.83L128.16 395.39L131.47 402.8L135.06 410.06L138.91 417.15L143.03 424.07L147.4 430.82L152.03 437.39L156.89 443.77L162 449.95L167.33 455.93L172.88 461.7L178.66 467.26L184.64 472.59L190.82 477.69L197.2 482.56L203.76 487.18L210.51 491.56L217.44 495.67L224.53 499.53L231.78 503.11L239.2 506.42L246.75 509.45L254.46 512.19L262.29 514.62L270.26 516.76L278.34 518.59L286.54 520.1L294.85 521.28L303.26 522.14L311.77 522.65L320.36 522.83L328.95 522.65L337.46 522.14L345.87 521.28L354.18 520.1L362.38 518.59L370.47 516.76L378.43 514.62L386.27 512.19L393.97 509.45L401.53 506.42L408.94 503.11L416.19 499.53L423.28 495.67L430.21 491.56L436.96 487.18L443.53 482.56L449.9 477.69L456.09 472.59L462.07 467.26L467.84 461.7L473.39 455.93L478.72 449.95L483.83 443.77L488.69 437.39L493.32 430.82L497.69 424.07L501.81 417.15L505.67 410.06L509.25 402.8L512.56 395.39L515.59 387.83L518.32 380.13L520.76 372.29L522.9 364.33L524.72 356.24L526.23 348.04L527.42 339.73L528.27 331.32L528.79 322.82L528.96 314.22L528.79 305.63L528.27 297.13L527.42 288.72L526.23 280.41L524.72 272.21L522.9 264.12L520.76 256.16L518.32 248.32L515.59 240.62L512.56 233.06L509.25 225.65L505.67 218.39L501.81 211.3L497.69 204.38L493.32 197.63L488.69 191.06L483.83 184.68L478.72 178.5L473.39 172.52L467.84 166.75L462.07 161.19L456.09 155.86L449.9 150.76L443.53 145.89L436.96 141.27L430.21 136.89L423.28 132.78L416.19 128.92L408.94 125.33L401.53 122.03L393.97 119L386.27 116.26L378.43 113.82L370.47 111.69L362.38 109.86L354.18 108.35L345.87 107.17L337.46 106.31L328.95 105.8L320.36 105.62L311.77 105.8L303.26 106.31L303.26 106.31L294.85 107.17Z"},null,-1),Ka=fn("path",{fill:"currentColor",d:"M319.61 83.99C327.9 83.99 334.61 90.7 334.61 98.99C334.61 137.95 334.61 239.82 334.61 278.78C334.61 287.06 327.9 293.77 319.63 293.77C316.62 293.77 322.6 293.77 319.6 293.77C311.32 293.77 304.61 287.06 304.61 278.78C304.61 239.82 304.61 137.95 304.61 98.99C304.61 90.7 311.33 83.99 319.61 83.99C322.61 83.99 316.61 83.99 319.61 83.99Z"},null,-1);Wa.render=function(e,t,n,o,r,i){return an(),cn("svg",Qa,[Za,Xa,Ya,Ka])};const Ja={Type:{block:Bi.Button,key:"type",type:is.Value,section:0,component:_i.Select,colspan:2,options:[{value:0,text:"Momentary"},{value:1,text:"Latching"}],label:"Type",helpText:"\n Button type can be momentary, which means that configured MIDI message is sent as soon as\n button is released, or latching, which means that MIDI message is sent on\n second button press. All buttons are configured as momentary by\n default. Depending on message type this setting can be ignored."},MidiMessage:{key:"messageType",type:is.Value,section:1,component:_i.Select,options:[{value:Vi.Note,text:"Note"},{value:Vi.ProgramChange,text:"Program Change"},{value:Vi.ProgramChangeInc,text:"Program Change Inc"},{value:Vi.ProgramChangeDec,text:"Program Change Dec"},{value:Vi.ProgramChangeOffsetInc,text:"Program Change Offset Increment"},{value:Vi.ProgramChangeOffsetDec,text:"Program Change Offset Decrement"},{value:Vi.ControlChange,text:"CC"},{value:Vi.ControlChangeOff,text:"CC/0 Off"},{value:Vi.MmcStop,text:"MMC Stop"},{value:Vi.MmcPlay,text:"MMC Play"},{value:Vi.MmcRecord,text:"MMC Record"},{value:Vi.MmcPause,text:"MMC Pause"},{value:Vi.RealTimeClock,text:"Real Time Clock"},{value:Vi.RealTimeStart,text:"Real Time Start"},{value:Vi.RealTimeContinue,text:"Real Time Continue"},{value:Vi.RealTimeStop,text:"Real Time Stop"},{value:Vi.RealTimeActiveSensing,text:"Real Time Active Sensing"},{value:Vi.RealTimeSystemReset,text:"Real Time System Reset"},{value:Vi.None,text:"None"},{value:Vi.PresetChange,text:"Preset Change"},{value:Vi.MultiValueIncResetNote,text:"Multi Value IncReset Note"},{value:Vi.MultiValueIncDecNote,text:"Multi Value IncDec Note"},{value:Vi.MultiValueIncResetCC,text:"Multi Value IncReset CC"},{value:Vi.MultiValueIncDecCC,text:"Multi Value IncDec CC"},{value:Vi.NoteOffOnly,text:"Note Off Only"},{value:Vi.ControlChange0Only,text:"CC/0 only"},{value:Vi.BpmInc,text:"BPM Inc"},{value:Vi.BpmDec,text:"BPM Dec"}],label:"Message type",helpText:"",block:Bi.Button},MidiChannel:{showIf:e=>!Zi.includes(e.messageType),key:"midiChannel",type:is.Value,block:Bi.Button,section:4,component:_i.Input,min:1,max:17,label:"MIDI channel",helpText:"Setting the channel to value 17 will cause sending of data on each MIDI channel."},MidiId:{showIf:e=>!Qi.includes(e.messageType),key:"midiId",type:is.Value,section:2,component:_i.Input,min:0,max:127,label:"MIDI ID",helpText:"",block:Bi.Button},Preset:{showIf:e=>e.messageType==Vi.PresetChange,key:"preset",type:is.Value,section:2,component:_i.Input,min:0,max:9,label:"Preset",helpText:"Preset to switch to once the button is pressed. Numbering starts from 0, so value 0 will load preset 1.",block:Bi.Button},Value:{showIf:e=>!Wi.includes(e.messageType),key:"value",type:is.Value,section:3,component:_i.Input,min:1,max:127,label:"Value",helpText:"Velocity for notes, control value for CC, increment/decrement value for Multi Value message types or offset for Program Change.",block:Bi.Button}},el={block:Bi.Button,title:"Button",routeName:"device-buttons",iconComponent:We(Wa),componentCountResponseIndex:0,sections:Ja,routes:[{path:"buttons",name:"device-buttons",component:Va,redirect:{name:"device-buttons-list"},children:[{path:"list",name:"device-buttons-list",component:wa,props:{block:Bi.Button,routeName:"device-buttons-form",segmentGrid:!0}},{path:"buttons/:index",name:"device-buttons-form",component:fa,props:{block:Bi.Button}}]}]};var tl=No({name:"Display",setup(){const{sections:e}=cl;return{Block:Bi,sections:e}}});const nl={class:"form-grid"};tl.render=function(e,t,n,o,r,i){const s=Zt("FormField"),a=Zt("Section"),l=Zt("DeviceSettings");return an(),cn(l,{class:"i2c flex flex-wrap flex-grow",block:e.Block.Display},{default:$t(({form:t,showField:n,onSettingChange:o})=>[fn(a,{title:"Display"},{default:$t(()=>[fn("div",nl,[fn(s,{value:t.enableDisplay,"field-definition":e.sections.EnableDisplay,onModified:o},null,8,["value","field-definition","onModified"]),n(e.sections.DisplayController)?fn(s,{key:0,value:t.displayController,"field-definition":e.sections.DisplayController,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DisplayResolution)?fn(s,{key:1,value:t.displayResolution,"field-definition":e.sections.DisplayResolution,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DeviceInfoOnStartup)?fn(s,{key:2,value:t.deviceInfoStartup,"field-definition":e.sections.DeviceInfoOnStartup,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.AlternateMidiNoteDisplay)?fn(s,{key:3,value:t.alternateMidiNoteDisplay,"field-definition":e.sections.AlternateMidiNoteDisplay,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.MidiEventRetentionTime)?fn(s,{key:4,value:t.midiEventRetentionTime,"field-definition":e.sections.MidiEventRetentionTime,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0)])]),_:2},1024)]),_:1},8,["block"])};var ol=No({name:"IconDisplay"});const rl={"aria-hidden":"true",focusable:"false","data-icon":"window-maximize",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",rel:"display by Neha Tyagi from the Noun Project"},il=fn("path",{fill:"currentColor",d:"M367.78 473.54C314.69 473.54 261.6 473.54 208.51 473.54C196.3 473.54 184.09 473.54 172.01 473.54C176.39 477.92 180.9 482.43 185.28 486.81C185.28 449.25 185.28 411.69 185.28 374.13C185.28 314.27 185.28 254.41 185.28 194.42C185.28 180.75 185.28 166.94 185.28 153.27C180.9 157.65 176.39 162.17 172.01 166.55C205.46 166.55 239.04 166.55 272.48 166.55C325.57 166.55 378.66 166.55 431.75 166.55C443.97 166.55 456.18 166.55 468.25 166.55C463.87 162.17 459.36 157.65 454.98 153.27C454.98 190.83 454.98 228.39 454.98 265.96C454.98 325.82 454.98 385.67 454.98 445.67C454.98 459.34 454.98 473.14 454.98 486.81C454.98 503.93 481.53 503.93 481.53 486.81C481.53 449.25 481.53 411.69 481.53 374.13C481.53 314.27 481.53 254.41 481.53 194.42C481.53 180.75 481.53 166.94 481.53 153.27C481.53 146.11 475.42 140 468.25 140C434.81 140 401.23 140 367.78 140C314.69 140 261.6 140 208.51 140C196.3 140 184.09 140 172.01 140C164.84 140 158.74 146.11 158.74 153.27C158.74 190.83 158.74 228.39 158.74 265.96C158.74 325.82 158.74 385.67 158.74 445.67C158.74 459.34 158.74 473.14 158.74 486.81C158.74 493.98 164.84 500.08 172.01 500.08C205.46 500.08 239.04 500.08 272.48 500.08C325.57 500.08 378.66 500.08 431.75 500.08C443.97 500.08 456.18 500.08 468.25 500.08C485.24 500.08 485.24 473.54 468.25 473.54C434.81 473.54 401.23 473.54 367.78 473.54Z"},null,-1),sl=fn("path",{fill:"currentColor",d:"M81.23 279.49C81.23 324.22 81.23 369.08 81.23 413.81C81.23 424.16 81.23 434.65 81.23 445C81.23 462.12 107.77 462.12 107.77 445C107.77 416.73 107.77 388.59 107.77 360.32C107.77 315.6 107.77 270.73 107.77 226.01C107.77 215.65 107.77 205.17 107.77 194.82C107.77 177.83 81.23 177.83 81.23 194.82C81.23 194.82 81.23 194.82 81.23 194.82C81.23 232.42 81.23 260.65 81.23 279.49Z"},null,-1),al=fn("path",{fill:"currentColor",d:"M532.23 279.49C532.23 324.22 532.23 369.08 532.23 413.81C532.23 424.16 532.23 434.65 532.23 445C532.23 462.12 558.77 462.12 558.77 445C558.77 416.73 558.77 388.59 558.77 360.32C558.77 315.6 558.77 270.73 558.77 226.01C558.77 215.65 558.77 205.17 558.77 194.82C558.77 177.83 532.23 177.83 532.23 194.82C532.23 194.82 532.23 194.82 532.23 194.82C532.23 232.42 532.23 260.65 532.23 279.49Z"},null,-1);ol.render=function(e,t,n,o,r,i){return an(),cn("svg",rl,[il,sl,al])};const ll={EnableDisplay:{block:Bi.Display,key:"enableDisplay",type:is.Setting,section:0,settingIndex:6,component:_i.Toggle,label:"Enable",helpText:"Enables or disables the usage of small OLED/LCD displays."},DeviceInfoOnStartup:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"deviceInfoStartup",type:is.Setting,section:0,settingIndex:0,component:_i.Toggle,label:"Show device info on startup",helpText:"Enable or disable device info message on startup (firmware version and board name)."},DisplayController:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"displayController",type:is.Setting,section:0,settingIndex:1,component:_i.Select,options:[{value:0,text:"None"},{value:1,text:"SSD1306"}],label:"Display controller",helpText:""},DisplayResolution:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"displayResolution",type:is.Setting,section:0,settingIndex:2,component:_i.Select,options:[{value:0,text:"None"},{value:1,text:"128x64"},{value:2,text:"128x32"}],label:"Display resolution",helpText:""},MidiEventRetentionTime:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"midiEventRetentionTime",type:is.Setting,section:0,settingIndex:3,component:_i.Select,options:[{value:0,text:"0"},{value:1,text:"1"},{value:2,text:"2"},{value:3,text:"3"},{value:4,text:"4"},{value:5,text:"5"}],label:"MIDI event time",helpText:"Timeout after which any message on display will be cleared. If set to 0, message stays on display until new event occurs."},AlternateMidiNoteDisplay:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"alternateMidiNoteDisplay",type:is.Setting,section:0,settingIndex:4,component:_i.Toggle,label:"Alternate MIDI note Display",helpText:"If enabled, MIDI note data will be displayed in note-key format (ie. C#4). If disabled, MIDI note number will be displayed instead."}},cl={block:Bi.Display,title:"I2C",routeName:"device-i2c",iconComponent:We(ol),sections:ll,routes:[{path:"i2c:",name:"device-i2c",component:tl}]};var ul=No({name:"IconEncoder"});const dl={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 640 640","xml:space":"preserve"},pl=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M247.45 180.09L248.54 180.2L249.62 180.36L250.69 180.55L251.75 180.79L252.78 181.07L253.81 181.39L254.81 181.74L255.79 182.14L256.76 182.57L257.7 183.03L258.63 183.53L259.53 184.07L260.41 184.64L261.27 185.24L262.1 185.88L262.9 186.54L263.68 187.24L264.43 187.96L265.15 188.71L265.85 189.49L266.51 190.29L267.15 191.12L267.75 191.98L268.32 192.86L268.86 193.76L269.36 194.69L269.82 195.63L270.25 196.6L270.65 197.58L271 198.58L271.32 199.61L271.6 200.64L271.84 201.7L272.03 202.77L272.19 203.85L272.3 204.94L272.37 206.05L272.39 207.17L272.39 400L230.78 400L230.78 238.25L230.77 237.62L230.73 237L230.67 236.39L230.58 235.78L230.47 235.18L230.34 234.59L230.18 234.01L230.01 233.43L229.81 232.87L229.59 232.32L229.34 231.77L229.08 231.24L228.8 230.73L228.5 230.22L228.18 229.73L227.84 229.25L227.49 228.78L227.11 228.33L226.72 227.89L226.32 227.47L225.89 227.06L225.46 226.67L225.01 226.3L224.54 225.94L224.06 225.61L223.57 225.29L223.06 224.98L222.54 224.7L222.01 224.44L221.47 224.2L220.91 223.98L220.35 223.78L219.78 223.6L219.2 223.44L218.6 223.31L218 223.2L217.4 223.11L216.78 223.05L216.16 223.01L215.53 223L145.96 223L145.4 223.01L144.85 223.04L144.3 223.1L143.76 223.18L143.22 223.28L142.7 223.39L142.18 223.53L141.67 223.69L141.17 223.87L140.68 224.07L140.2 224.28L139.72 224.51L139.26 224.77L138.81 225.03L138.37 225.32L137.95 225.62L137.53 225.93L137.13 226.27L136.74 226.61L136.36 226.97L136 227.35L135.66 227.74L135.32 228.14L135.01 228.56L134.71 228.98L134.42 229.42L134.16 229.87L133.9 230.33L133.67 230.81L133.46 231.29L133.26 231.78L133.08 232.28L132.92 232.79L132.78 233.31L132.67 233.83L132.57 234.37L132.49 234.91L132.43 235.46L132.4 236.01L132.39 236.57L132.39 400L91 400L91 207.39L91.02 206.26L91.09 205.14L91.2 204.04L91.35 202.95L91.55 201.87L91.79 200.81L92.07 199.76L92.39 198.73L92.75 197.72L93.15 196.73L93.58 195.76L94.05 194.8L94.56 193.87L95.1 192.96L95.67 192.08L96.28 191.21L96.92 190.38L97.59 189.57L98.29 188.78L99.02 188.02L99.78 187.29L100.56 186.59L101.37 185.92L102.21 185.28L103.07 184.68L103.96 184.1L104.87 183.56L105.8 183.06L106.75 182.59L107.73 182.15L108.72 181.76L109.73 181.4L110.76 181.08L111.8 180.8L112.87 180.56L113.94 180.36L115.04 180.2L116.14 180.09L117.26 180.02L118.39 180L245.22 180L246.34 180.02L247.45 180.09Z"},null,-1),hl=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M412.37 413.95L412.3 415.06L412.19 416.15L412.03 417.23L411.84 418.3L411.6 419.36L411.32 420.39L411 421.42L410.65 422.42L410.25 423.4L409.82 424.37L409.36 425.31L408.86 426.24L408.32 427.14L407.75 428.02L407.15 428.88L406.51 429.71L405.85 430.51L405.15 431.29L404.43 432.04L403.68 432.76L402.9 433.46L402.1 434.12L401.27 434.76L400.41 435.36L399.53 435.93L398.63 436.47L397.7 436.97L396.76 437.43L395.79 437.86L394.81 438.26L393.81 438.61L392.78 438.93L391.75 439.21L390.69 439.45L389.62 439.64L388.54 439.8L387.45 439.91L386.34 439.98L385.22 440L258.39 440L257.26 439.98L256.14 439.91L255.04 439.8L253.94 439.64L252.87 439.44L251.8 439.2L250.76 438.92L249.73 438.6L248.72 438.24L247.73 437.85L246.75 437.41L245.8 436.94L244.87 436.44L243.96 435.9L243.07 435.32L242.21 434.72L241.37 434.08L240.56 433.41L239.78 432.71L239.02 431.98L238.29 431.22L237.59 430.43L236.92 429.62L236.28 428.79L235.67 427.92L235.1 427.04L234.56 426.13L234.05 425.2L233.58 424.24L233.15 423.27L232.75 422.28L232.39 421.27L232.07 420.24L231.79 419.19L231.55 418.13L231.35 417.05L231.2 415.96L231.09 414.86L231.02 413.74L231 412.61L231 240L272.39 240L272.39 383.43L272.4 383.99L272.43 384.54L272.49 385.09L272.57 385.63L272.67 386.17L272.78 386.69L272.92 387.21L273.08 387.72L273.26 388.22L273.46 388.71L273.67 389.19L273.9 389.67L274.16 390.13L274.42 390.58L274.71 391.02L275.01 391.44L275.32 391.86L275.66 392.26L276 392.65L276.36 393.03L276.74 393.39L277.13 393.73L277.53 394.07L277.95 394.38L278.37 394.68L278.81 394.97L279.26 395.23L279.72 395.49L280.2 395.72L280.68 395.93L281.17 396.13L281.67 396.31L282.18 396.47L282.7 396.61L283.22 396.72L283.76 396.82L284.3 396.9L284.85 396.96L285.4 396.99L285.96 397L355.53 397L356.16 396.99L356.78 396.95L357.4 396.89L358 396.8L358.6 396.69L359.2 396.56L359.78 396.4L360.35 396.22L360.91 396.02L361.47 395.8L362.01 395.56L362.54 395.3L363.06 395.02L363.57 394.71L364.06 394.39L364.54 394.06L365.01 393.7L365.46 393.33L365.89 392.94L366.32 392.53L366.72 392.11L367.11 391.67L367.49 391.22L367.84 390.75L368.18 390.27L368.5 389.78L368.8 389.27L369.08 388.76L369.34 388.23L369.59 387.68L369.81 387.13L370.01 386.57L370.18 385.99L370.34 385.41L370.47 384.82L370.58 384.22L370.67 383.61L370.73 383L370.77 382.38L370.78 381.75L370.78 240L412.39 240L412.39 412.83L412.37 413.95Z"},null,-1),fl=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M527.45 180.09L528.54 180.2L529.62 180.36L530.69 180.55L531.75 180.79L532.78 181.07L533.81 181.39L534.81 181.74L535.79 182.14L536.76 182.57L537.7 183.03L538.63 183.53L539.53 184.07L540.41 184.64L541.27 185.24L542.1 185.88L542.9 186.54L543.68 187.24L544.43 187.96L545.15 188.71L545.85 189.49L546.51 190.29L547.15 191.12L547.75 191.98L548.32 192.86L548.86 193.76L549.36 194.69L549.82 195.63L550.25 196.6L550.65 197.58L551 198.58L551.32 199.61L551.6 200.64L551.84 201.7L552.03 202.77L552.19 203.85L552.3 204.94L552.37 206.05L552.39 207.17L552.39 400L511.45 400L511.45 237.92L511.44 237.29L511.4 236.67L511.34 236.05L511.25 235.45L511.14 234.85L511.01 234.25L510.85 233.67L510.67 233.1L510.47 232.54L510.25 231.98L510.01 231.44L509.75 230.91L509.47 230.39L509.17 229.89L508.85 229.39L508.51 228.91L508.15 228.45L507.78 227.99L507.39 227.56L506.98 227.13L506.56 226.73L506.12 226.34L505.67 225.97L505.21 225.61L504.73 225.27L504.23 224.95L503.73 224.65L503.21 224.37L502.68 224.11L502.13 223.87L501.58 223.64L501.02 223.44L500.45 223.27L499.86 223.11L499.27 222.98L498.67 222.87L498.06 222.78L497.45 222.72L496.83 222.68L496.2 222.67L426.63 222.67L426.07 222.68L425.51 222.71L424.97 222.77L424.42 222.84L423.89 222.94L423.37 223.06L422.85 223.2L422.34 223.36L421.84 223.54L421.34 223.73L420.86 223.95L420.39 224.18L419.93 224.43L419.48 224.7L419.04 224.98L418.61 225.28L418.2 225.6L417.8 225.93L417.41 226.28L417.03 226.64L416.67 227.02L416.32 227.41L415.99 227.81L415.67 228.22L415.37 228.65L415.09 229.09L414.82 229.54L414.57 230L414.34 230.47L414.12 230.95L413.93 231.45L413.75 231.95L413.59 232.46L413.45 232.98L413.33 233.5L413.23 234.03L413.16 234.58L413.1 235.12L413.07 235.68L413.06 236.24L413.06 400L371 400L371 207.39L371.02 206.26L371.09 205.14L371.2 204.04L371.35 202.95L371.55 201.87L371.79 200.81L372.07 199.76L372.39 198.73L372.75 197.72L373.15 196.73L373.58 195.76L374.05 194.8L374.56 193.87L375.1 192.96L375.67 192.08L376.28 191.21L376.92 190.38L377.59 189.57L378.29 188.78L379.02 188.02L379.78 187.29L380.56 186.59L381.37 185.92L382.21 185.28L383.07 184.68L383.96 184.1L384.87 183.56L385.8 183.06L386.75 182.59L387.73 182.15L388.72 181.76L389.73 181.4L390.76 181.08L391.8 180.8L392.87 180.56L393.94 180.36L395.04 180.2L396.14 180.09L397.26 180.02L398.39 180L525.22 180L526.34 180.02L527.45 180.09Z"},null,-1),Ll=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M132.37 413.95L132.3 415.06L132.19 416.15L132.04 417.23L131.84 418.3L131.6 419.36L131.33 420.39L131.01 421.42L130.65 422.42L130.26 423.4L129.83 424.37L129.36 425.31L128.86 426.24L128.32 427.14L127.75 428.02L127.15 428.88L126.52 429.71L125.85 430.51L125.16 431.29L124.44 432.04L123.68 432.76L122.9 433.46L122.1 434.12L121.27 434.76L120.41 435.36L119.53 435.93L118.63 436.47L117.71 436.97L116.76 437.43L115.8 437.86L114.81 438.26L113.81 438.61L112.79 438.93L111.75 439.21L110.7 439.45L109.63 439.64L108.55 439.8L107.45 439.91L106.34 439.98L105.22 440L-21.61 440L-22.74 439.98L-23.86 439.91L-24.96 439.8L-26.05 439.64L-27.13 439.44L-28.19 439.2L-29.24 438.92L-30.27 438.6L-31.28 438.24L-32.27 437.85L-33.24 437.41L-34.2 436.94L-35.13 436.44L-36.04 435.9L-36.92 435.32L-37.79 434.72L-38.62 434.08L-39.43 433.41L-40.22 432.71L-40.98 431.98L-41.71 431.22L-42.41 430.43L-43.08 429.62L-43.72 428.79L-44.32 427.92L-44.9 427.04L-45.44 426.13L-45.94 425.2L-46.41 424.24L-46.85 423.27L-47.24 422.28L-47.6 421.27L-47.92 420.24L-48.2 419.19L-48.44 418.13L-48.64 417.05L-48.8 415.96L-48.91 414.86L-48.98 413.74L-49 412.61L-49 240L-7.61 240L-7.61 383.43L-7.6 383.99L-7.57 384.54L-7.51 385.09L-7.43 385.63L-7.33 386.17L-7.22 386.69L-7.08 387.21L-6.92 387.72L-6.74 388.22L-6.54 388.71L-6.33 389.19L-6.1 389.67L-5.84 390.13L-5.58 390.58L-5.29 391.02L-4.99 391.44L-4.68 391.86L-4.34 392.26L-4 392.65L-3.64 393.03L-3.26 393.39L-2.87 393.73L-2.47 394.07L-2.05 394.38L-1.63 394.68L-1.19 394.97L-0.74 395.23L-0.28 395.49L0.2 395.72L0.68 395.93L1.17 396.13L1.67 396.31L2.18 396.47L2.7 396.61L3.22 396.72L3.76 396.82L4.3 396.9L4.85 396.96L5.4 396.99L5.96 397L75.53 397L76.16 396.99L76.78 396.95L77.4 396.89L78 396.8L78.6 396.69L79.2 396.56L79.78 396.4L80.35 396.22L80.91 396.02L81.47 395.8L82.01 395.56L82.54 395.3L83.06 395.02L83.57 394.71L84.06 394.39L84.54 394.06L85.01 393.7L85.46 393.33L85.89 392.94L86.32 392.53L86.72 392.11L87.11 391.67L87.49 391.22L87.84 390.75L88.18 390.27L88.5 389.78L88.8 389.27L89.08 388.76L89.34 388.23L89.59 387.68L89.81 387.13L90.01 386.57L90.18 385.99L90.34 385.41L90.47 384.82L90.58 384.22L90.67 383.61L90.73 383L90.77 382.38L90.78 381.75L90.78 240L132.39 240L132.39 412.83L132.37 413.95Z"},null,-1),ml=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M692.37 413.95L692.3 415.06L692.19 416.15L692.04 417.23L691.84 418.3L691.6 419.36L691.33 420.39L691.01 421.42L690.65 422.42L690.26 423.4L689.83 424.37L689.36 425.31L688.86 426.24L688.32 427.14L687.75 428.02L687.15 428.88L686.52 429.71L685.85 430.51L685.16 431.29L684.44 432.04L683.68 432.76L682.9 433.46L682.1 434.12L681.27 434.76L680.41 435.36L679.53 435.93L678.63 436.47L677.71 436.97L676.76 437.43L675.8 437.86L674.81 438.26L673.81 438.61L672.79 438.93L671.75 439.21L670.7 439.45L669.63 439.64L668.55 439.8L667.45 439.91L666.34 439.98L665.22 440L538.39 440L537.26 439.98L536.14 439.91L535.04 439.8L533.95 439.64L532.87 439.44L531.81 439.2L530.76 438.92L529.73 438.6L528.72 438.24L527.73 437.85L526.76 437.41L525.8 436.94L524.87 436.44L523.96 435.9L523.08 435.32L522.21 434.72L521.38 434.08L520.57 433.41L519.78 432.71L519.02 431.98L518.29 431.22L517.59 430.43L516.92 429.62L516.28 428.79L515.68 427.92L515.1 427.04L514.56 426.13L514.06 425.2L513.59 424.24L513.15 423.27L512.76 422.28L512.4 421.27L512.08 420.24L511.8 419.19L511.56 418.13L511.36 417.05L511.2 415.96L511.09 414.86L511.02 413.74L511 412.61L511 240L552.39 240L552.39 383.43L552.4 383.99L552.43 384.54L552.49 385.09L552.57 385.63L552.67 386.17L552.78 386.69L552.92 387.21L553.08 387.72L553.26 388.22L553.46 388.71L553.67 389.19L553.9 389.67L554.16 390.13L554.42 390.58L554.71 391.02L555.01 391.44L555.32 391.86L555.66 392.26L556 392.65L556.36 393.03L556.74 393.39L557.13 393.73L557.53 394.07L557.95 394.38L558.37 394.68L558.81 394.97L559.26 395.23L559.72 395.49L560.2 395.72L560.68 395.93L561.17 396.13L561.67 396.31L562.18 396.47L562.7 396.61L563.22 396.72L563.76 396.82L564.3 396.9L564.85 396.96L565.4 396.99L565.96 397L635.53 397L636.16 396.99L636.78 396.95L637.4 396.89L638 396.8L638.6 396.69L639.2 396.56L639.78 396.4L640.35 396.22L640.91 396.02L641.47 395.8L642.01 395.56L642.54 395.3L643.06 395.02L643.57 394.71L644.06 394.39L644.54 394.06L645.01 393.7L645.46 393.33L645.89 392.94L646.32 392.53L646.72 392.11L647.11 391.67L647.49 391.22L647.84 390.75L648.18 390.27L648.5 389.78L648.8 389.27L649.08 388.76L649.34 388.23L649.59 387.68L649.81 387.13L650.01 386.57L650.18 385.99L650.34 385.41L650.47 384.82L650.58 384.22L650.67 383.61L650.73 383L650.77 382.38L650.78 381.75L650.78 240L692.39 240L692.39 412.83L692.37 413.95Z"},null,-1);ul.render=function(e,t,n,o,r,i){return an(),cn("svg",dl,[pl,hl,fl,Ll,ml])};const gl={Enabled:{block:Bi.Encoder,key:"enabled",type:is.Value,section:0,component:_i.Toggle,label:"Enable",helpText:"Encoder needs to be enabled in order to use it.\n Note that enabling the encoder disables two digital inputs (buttons)."},InvertState:{showIf:e=>e.enabled,block:Bi.Encoder,key:"invertState",type:is.Value,section:1,component:_i.Toggle,label:"Invert",helpText:"Inverts the direction of the encoder. For example, if 7Fh01h encoding mode is used, MIDI value 127 will\n be sent in backward direction, and 1 in forward direction. If inversion is enabled, value 1 will be sent when going backwards,\n and 127 when going forward. Same logic applies to any other specified encoding mode."},EncodingMode:{showIf:e=>e.enabled,block:Bi.Encoder,key:"encodingMode",type:is.Value,section:2,colspan:2,component:_i.Select,options:[{value:$i.Controlchange7F,text:"Control change - 7Fh01h"},{value:$i.Controlchange3F,text:"Control change - 3Fh41h"},{value:$i.Controlchange41,text:"Control change - 41h01h"},{value:$i.CC7bit,text:"Control change - Continuous 7-bit"},{value:$i.CC14bit,text:"Control change - Continuous 14-bit"},{value:$i.ProgramChange,text:"Program change"},{value:$i.PitchBend,text:"Pitch bend"},{value:$i.NRPN7bit,text:"NRPN/7-bit"},{value:$i.NRPN14bit,text:"NRPN/14-bit"},{value:$i.PresetChange,text:"Change preset"},{value:$i.Bpm,text:"BPM"}],label:"Message type",helpText:"Specifies the MIDI message which will be sent by the encoder. If Change Preset type is used,\n encoder will be used only to switch between the presets on the device and no MIDI message will be sent. Moving the encoder\n backward will decrement the preset by 1 and moving it forward will increment it, unless Invert option is used. In that case\n inverted logic applies. Note that in order for this option to work accross all presets, Change Preset type should be set in each preset."},MidiChannel:{showIf:e=>!Ji.includes(e.encodingMode)&&!!e.enabled,key:"midiChannel",type:is.Value,block:Bi.Encoder,section:4,component:_i.Input,min:1,max:17,label:"MIDI channel",helpText:"Setting the channel to value 17 will cause sending of data on each MIDI channel."},MidiIdLSB:{showIf:e=>!Ki.includes(e.encodingMode)&&!!e.enabled,isLsb:!0,block:Bi.Encoder,key:"midiIdLSB",type:is.Value,section:3,component:_i.Input,min:0,max:127,max2Byte:16383,label:"MIDI ID (LSB)",helpText:""},MidiIdMSB:{showIf:e=>!Ki.includes(e.encodingMode)&&!!e.enabled,isMsb:!0,block:Bi.Encoder,key:"midiIdMSB",type:is.Value,section:7,component:_i.Input,min:0,max:127,label:"MIDI ID (MSB)",helpText:""},PulsesPerStep:{showIf:e=>e.enabled,block:Bi.Encoder,key:"pulsesPerStep",type:is.Value,section:5,colspan:2,component:_i.Select,options:[{value:2,text:"2"},{value:3,text:"3"},{value:4,text:"4"}],label:"Pulses per step",helpText:"Amount of pulses encoder must generate in order for firmware to register it as single step. Usually 4."},Acceleration:{showIf:e=>es.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"acceleration",type:is.Value,section:6,component:_i.Select,options:[{value:0,text:"Disabled"},{value:1,text:"Slow"},{value:2,text:"Medium"},{value:3,text:"Fast"}],label:"Acceleration",helpText:""},RemoteSync:{showIf:e=>ts.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"remoteSync",type:is.Value,section:8,colspan:2,component:_i.Toggle,label:"Remote sync",helpText:"Used only when continuous CC (7-bit and 14-bit) or pitch bend MIDI messages are used.\n If enabled, CC/pitch bend value received via MIDI IN will be applied internally to the encoder with same MIDI ID and MIDI channel,\n so that next encoder turn increments or decrements received value instead of the last value it sent."}},vl={block:Bi.Encoder,title:"Encoder",routeName:"device-encoders",iconComponent:We(ul),componentCountResponseIndex:1,sections:gl,routes:[{path:"encoders",name:"device-encoders",component:Va,redirect:{name:"device-encoders-list"},children:[{path:"list",name:"device-encoders-list",component:wa,props:{block:Bi.Encoder,routeName:"device-encoders-form",title:"Encoder"}},{path:"encoders/:index",name:"device-encoders-form",component:fa,props:{block:Bi.Encoder,gridCols:4}}]}]};var bl=No({name:"GlobalHardware",setup(){const{valueSize:e,bootLoaderSupport:t,startFactoryReset:n,startReboot:o,startBackup:r}=md;return{modalVisible:Xe(!1),modalTitle:Xe(""),availableUpdates:Xe([]),onFactoryResetClicked:sa("This will reset all the parameters on the board to their factory settings. All analog inputs will be disabled as well. Depending on the board, this can take up to 30 seconds. Proceed?",n),valueSize:e,bootLoaderSupport:t,startReboot:o,onBackupClicked:sa("This will initiate a full backup of all parameters stored on the board. Proceed?",r),onBackupFileSelected:e=>{e.length&&md.startRestore(e[0])}}}});const yl={class:"form-grid"},Il={class:"form-field"},El=mn(" Reboot "),Cl=fn("p",{class:"help-text"}," Rebooting the device will make the UI temporarily unavailable. ",-1),wl={class:"form-field"},Sl=mn(" Reset to factory settings "),kl=fn("p",{class:"help-text"}," Resets the device to its factory settings. ",-1),xl={key:0,class:"form-field"},_l=mn(" Firmware section "),Ml=fn("p",{class:"help-text"}," Section used to reboot the device into bootloader mode and update the firmware. ",-1),Tl={class:"form-grid"},Rl={class:"form-field"},Nl=mn(" Backup "),Dl=fn("p",{class:"help-text"}," Download a backup of your configuration (incl presets). ",-1),Al={class:"form-field"},Ol=fn("p",{class:"help-text"}," Select a backup file to restore your device configuration. ",-1);bl.render=function(e,t,n,o,r,i){const s=Zt("Button"),a=Zt("ButtonLink"),l=Zt("Section"),c=Zt("FormFileInput");return an(),cn(en,null,[fn(l,{title:"Hardware settings"},{default:$t(()=>[fn("div",yl,[fn("div",Il,[fn(s,{onClick:tr(e.startReboot,["prevent"])},{default:$t(()=>[El]),_:1},8,["onClick"]),Cl]),fn("div",wl,[fn(s,{onClick:tr(e.onFactoryResetClicked,["prevent"])},{default:$t(()=>[Sl]),_:1},8,["onClick"]),kl]),e.bootLoaderSupport?(an(),cn("div",xl,[fn(a,{to:{name:"device-firmware-update"}},{default:$t(()=>[_l]),_:1}),Ml])):vn("",!0)])]),_:1}),2===e.valueSize?fn(l,{key:0,title:"Backup & Restore",class:"w-full"},{default:$t(()=>[fn("div",Tl,[fn("div",Rl,[fn(s,{onClick:tr(e.onBackupClicked,["prevent"])},{default:$t(()=>[Nl]),_:1},8,["onClick"]),Dl]),fn("div",Al,[fn(c,{label:"Restore",name:"backup-file",onChange:e.onBackupFileSelected},null,8,["onChange"]),Ol])])]),_:1}):vn("",!0)],64)};var Pl=No({name:"Global",components:{GlobalHardware:bl},setup(){const{sections:e}=ac,{supportedPresetsCount:t}=md;return{Block:Bi,sections:e,supportedPresetsCount:t}}});const Bl={class:"form-grid"},Fl={class:"form-grid"};Pl.render=function(e,t,n,o,r,i){const s=Zt("FormField"),a=Zt("Section"),l=Zt("DeviceSettings"),c=Zt("GlobalHardware");return an(),cn(en,null,[fn(l,{class:"global flex flex-wrap flex-grow",block:e.Block.Global},{default:$t(({form:t,showField:n,onSettingChange:o})=>[e.supportedPresetsCount>1?fn(a,{key:0,title:"Presets"},{default:$t(()=>[fn("div",Bl,[n(e.sections.PreservePresetState)?fn(s,{key:0,class:"col-span-2",value:t.preservePresetState,"field-definition":e.sections.PreservePresetState,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.ActivePreset)?fn(s,{key:1,value:t.activePreset,"field-definition":e.sections.ActivePreset,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0)])]),_:2},1024):vn("",!0),fn(a,{title:"MIDI"},{default:$t(()=>[fn("div",Fl,[n(e.sections.UseGlobalChannel)?fn(s,{key:0,value:t.useGlobalChannel,"field-definition":e.sections.UseGlobalChannel,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.GlobalChannel)?fn(s,{key:1,value:t.globalChannel,"field-definition":e.sections.GlobalChannel,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.StandardNoteOff)?fn(s,{key:2,value:t.standardNoteOff,"field-definition":e.sections.StandardNoteOff,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DinMidiState)?fn(s,{key:3,value:t.dinMidiState,"field-definition":e.sections.DinMidiState,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.BleMidiState)?fn(s,{key:4,value:t.bleMidiState,"field-definition":e.sections.BleMidiState,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.RunningStatus)?fn(s,{key:5,value:t.runningStatus,"field-definition":e.sections.RunningStatus,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.MIDIClock)?fn(s,{key:6,value:t.midiClock,"field-definition":e.sections.MIDIClock,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.UsbToDinThru)?fn(s,{key:7,value:t.usbToDinThru,"field-definition":e.sections.UsbToDinThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.UsbToUsbThru)?fn(s,{key:8,value:t.usbToUsbThru,"field-definition":e.sections.UsbToUsbThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.UsbToBleThru)?fn(s,{key:9,value:t.usbToBleThru,"field-definition":e.sections.UsbToBleThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DinToDinThru)?fn(s,{key:10,value:t.dinToDinThru,"field-definition":e.sections.DinToDinThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DinToUsbThru)?fn(s,{key:11,value:t.dinToUsbThru,"field-definition":e.sections.DinToUsbThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DinToBleThru)?fn(s,{key:12,value:t.dinToBleThru,"field-definition":e.sections.DinToBleThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.BleToDinThru)?fn(s,{key:13,value:t.bleToDinThru,"field-definition":e.sections.BleToDinThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.BleToUsbThru)?fn(s,{key:14,value:t.bleToUsbThru,"field-definition":e.sections.BleToUsbThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.BleToBleThru)?fn(s,{key:15,value:t.bleToBleThru,"field-definition":e.sections.BleToBleThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0)])]),_:2},1024)]),_:1},8,["block"]),fn(c)],64)};var Ul=No({name:"GlobalFirmware",setup(){const{firmwareFileName:e,isBootloaderMode:t,startUpdatesCheck:n,bootLoaderSupport:o,startBootLoaderMode:r,startFirmwareUdate:i}=md,s=Xe(!1),a=Xe(!1),l=Xe([]);return{firmwareFileName:e,loading:s,isBootloaderMode:t,bootLoaderSupport:o,startBootLoaderMode:r,updatesChecked:a,checkForUpdates:async()=>{s.value=!0,l.value=await n(e.value),s.value=!1,a.value=!0},availableUpdates:l,onFirmwareFileSelected:async e=>{e.length&&await i(e[0])}}}});const Gl=fn("p",{class:"mb-6 text-sm leading-5 text-gray-500"},[mn(" Your device does not have bootloader support. "),fn("br"),mn(" To perform a manual firmware update please consult the "),fn("a",{href:"https://github.com/paradajz/OpenDeck/wiki/Firmware-update"},"wiki firmware update page"),mn(". ")],-1),Vl={class:"form-grid"},ql={key:0,class:"form-field"},$l=mn(" Check for updates "),Hl=fn("p",{class:"help-text"}," Check for newer firmware versions. ",-1),jl={key:1,class:"form-field"},zl=mn(" Bootloader mode "),Wl=fn("p",{class:"help-text"},' Starting bootloader mode is required for firmware updates. Once in bootloader mode the device can be updated using the SysEx file downloaded via "Check for updates" button. ',-1),Ql={key:2,class:"form-field"},Zl=fn("p",{class:"help-text"}," Select a firmware file to start board firmware update. UI might become unresponsive while updating. To exit from bootloader mode reboot the device manually. ",-1),Xl={key:2,class:"lg:text-center relative",style:{"min-height":"50vh"}},Yl={class:"absolute flex inset-0 opacity-75 bg-gray-900"},Kl={key:0,class:"text-sm leading-5 text-gray-200"},Jl={key:1,class:"text-sm pb-6"};Ul.render=function(e,t,n,o,r,i){const s=Zt("Section"),a=Zt("Button"),c=Zt("FormFileInput"),u=Zt("Spinner");return an(),cn(en,null,[e.bootLoaderSupport||e.isBootloaderMode?fn(s,{key:1,title:"Firmware update",class:"w-full"},{default:$t(()=>[fn("div",Vl,[e.isBootloaderMode?vn("",!0):(an(),cn("div",ql,[fn(a,{disabled:e.loading,onClick:tr(e.checkForUpdates,["prevent"])},{default:$t(()=>[$l]),_:1},8,["disabled","onClick"]),Hl])),!e.isBootloaderMode&&e.bootLoaderSupport?(an(),cn("div",jl,[fn(a,{onClick:tr(e.startBootLoaderMode,["prevent"])},{default:$t(()=>[zl]),_:1},8,["onClick"]),Wl])):vn("",!0),e.isBootloaderMode?(an(),cn("div",Ql,[fn(c,{name:"backup-file",label:"Update Firmware",disabled:!e.isBootloaderMode,onChange:e.onFirmwareFileSelected},null,8,["disabled","onChange"]),Zl])):vn("",!0)])]),_:1}):fn(s,{key:0,title:"No bootloader support",class:"w-full"},{default:$t(()=>[Gl]),_:1}),e.loading?(an(),cn("div",Xl,[fn("div",Yl,[fn(u,{class:"self-center"})])])):e.updatesChecked?fn(s,{key:3,title:"Updates",class:"w-full"},{default:$t(()=>[e.availableUpdates.length?(an(),cn("div",Jl,[(an(!0),cn(en,null,Ao(e.availableUpdates,t=>(an(),cn("div",{key:t.name,class:"release-description text-gray-200"},[fn("a",{href:"https://github.com/paradajz/OpenDeck/releases/tag/"+t.tag_name},l(t.tag_name),9,["href"]),t.firmwareFileLink?(an(),cn("a",{key:0,class:"my-3 ml-4 py-1 px-2 bg-gray-600 text-gray-300 rounded-full text-xs focus:outline-none focus:shadow-outline",target:"_blank",href:t.firmwareFileLink.browser_download_url}," Download FW file ("+l(e.firmwareFileName)+") ",9,["href"])):vn("",!0),fn("div",{innerHTML:t.html_description},null,8,["innerHTML"])]))),128))])):(an(),cn("p",Kl," Your firmware is up to date. "))]),_:1}):vn("",!0)],64)};var ec=No({name:"IconGlobal"});const tc={"aria-hidden":"true",focusable:"false","data-icon":"wrench",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",rel:"Settings by Icon Factory from the Noun Project"},nc=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M576.29 173.61C574.61 173.06 573.34 171.68 572.91 169.97C570.13 160.98 566.54 152.28 562.16 143.95C561.34 142.41 561.34 140.56 562.16 139.01C562.86 137.7 568.48 127.23 569.18 125.92C573.74 117.33 572.16 106.77 565.28 99.9C563 97.63 544.76 79.46 542.48 77.19C535.61 70.31 525.05 68.72 516.46 73.28C515.16 73.99 504.68 79.61 503.37 80.31C501.83 81.12 499.98 81.12 498.43 80.31C490.11 75.95 481.4 72.38 472.42 69.64C470.73 69.16 469.38 67.91 468.77 66.26C468.35 64.84 464.95 53.46 464.53 52.04C461.74 42.49 452.97 35.95 443.02 36C439.83 36 414.3 36 411.11 36C401.18 35.89 392.38 42.36 389.52 51.87C389.1 53.29 385.7 64.67 385.27 66.09C384.7 67.75 383.33 69.02 381.63 69.47C372.65 72.22 363.94 75.79 355.62 80.13C354.07 80.95 352.22 80.95 350.68 80.13C349.4 79.45 339.2 73.97 337.93 73.28C329.34 68.72 318.79 70.31 311.92 77.19C309.63 79.45 291.31 97.55 289.02 99.82C282.15 106.69 280.56 117.24 285.12 125.83C285.82 127.14 291.44 137.61 292.15 138.92C292.96 140.47 292.96 142.32 292.15 143.87C287.79 152.19 284.22 160.9 281.48 169.88C280.97 171.53 279.72 172.84 278.1 173.43C276.68 173.86 265.3 177.26 263.88 177.68C254.43 180.52 247.98 189.24 248.01 199.1C248.01 202.29 248.01 227.82 248.01 231.01C247.83 240.95 254.22 249.81 263.7 252.77C265.12 253.2 276.43 256.6 277.84 257.02C279.53 257.59 280.82 258.95 281.31 260.66C284.06 269.64 287.63 278.35 291.97 286.68C292.79 288.22 292.79 290.07 291.97 291.62C291.32 292.94 286.12 303.48 285.47 304.8C280.91 313.39 282.49 323.94 289.37 330.81C291.58 333.06 309.27 351.03 311.48 353.27C318.35 360.15 328.91 361.73 337.5 357.17C338.8 356.47 349.28 350.85 350.59 350.15C352.13 349.33 353.98 349.33 355.53 350.15C363.85 354.51 372.56 358.08 381.54 360.81C383.24 361.27 384.61 362.53 385.19 364.2C385.62 365.64 389.09 377.15 389.52 378.59C392.36 388.04 401.07 394.49 410.94 394.46C414.13 394.46 439.66 394.46 442.85 394.46C452.71 394.49 461.43 388.04 464.27 378.59C464.69 377.17 468.09 365.79 468.51 364.37C469.12 362.72 470.47 361.47 472.16 360.99C481.14 358.26 489.85 354.68 498.17 350.32C499.72 349.51 501.57 349.51 503.11 350.32C504.42 351.03 514.9 356.64 516.2 357.35C524.79 361.91 535.35 360.32 542.22 353.44C544.51 351.18 562.82 333.08 565.11 330.81C571.99 323.94 573.57 313.39 569.01 304.8C568.31 303.49 562.69 293.02 561.99 291.71C561.17 290.16 561.17 288.31 561.99 286.76C566.37 278.45 569.97 269.74 572.74 260.75C573.2 259.08 574.47 257.74 576.12 257.2C577.55 256.75 589 253.22 590.43 252.77C599.92 249.89 606.38 241.1 606.3 231.18C606.3 227.99 606.3 202.46 606.3 199.27C606.33 189.41 599.88 180.7 590.43 177.86C590.43 177.86 577.71 174.03 576.29 173.61ZM363 279.29C327.62 243.9 327.62 186.53 363.01 151.15C398.4 115.77 455.76 115.77 491.15 151.15C499.65 159.52 506.37 169.51 510.92 180.54C524.86 214.42 517.1 253.36 491.23 279.31C455.76 314.69 398.38 314.68 363 279.29Z"},null,-1),oc=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M400.01 242.29C414.97 257.26 439.24 257.26 454.21 242.3C469.18 227.33 469.18 203.06 454.21 188.1C454.21 188.09 454.21 188.09 454.21 188.09C439.37 173.12 415.22 173.02 400.25 187.85C400.17 187.93 400.09 188.01 400.01 188.09C385.04 203.05 385.04 227.32 400.01 242.29Z"},null,-1),rc=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M156.19 486.1C168.86 498.77 189.39 498.76 202.05 486.1C214.71 473.43 214.71 452.91 202.05 440.24C189.35 427.67 168.89 427.67 156.18 440.24C143.52 452.91 143.53 473.44 156.19 486.1Z"},null,-1),ic=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M300.38 428.62C298.91 428.24 297.72 427.18 297.17 425.76C295.03 419.02 292.34 412.46 289.11 406.16C288.39 404.81 288.39 403.18 289.11 401.83C289.5 401.09 292.62 395.2 293.01 394.46C297.57 385.89 296.02 375.35 289.2 368.45C287.67 366.93 275.46 354.79 273.94 353.27C267.07 346.39 256.51 344.81 247.92 349.37C247.19 349.76 241.29 352.88 240.55 353.27C239.2 354.01 237.57 354.01 236.22 353.27C229.92 350.05 223.36 347.35 216.62 345.21C215.2 344.66 214.14 343.47 213.76 342C213.52 341.2 211.57 334.82 211.33 334.02C208.57 324.58 199.92 318.09 190.09 318.07C187.92 318.07 170.58 318.07 168.41 318.07C158.45 317.92 149.6 324.39 146.73 333.93C146.49 334.73 144.55 341.11 144.3 341.91C143.93 343.38 142.86 344.58 141.44 345.12C134.7 347.27 128.15 349.96 121.85 353.18C120.49 353.91 118.87 353.91 117.51 353.18C116.77 352.79 110.88 349.67 110.14 349.28C101.57 344.73 91.03 346.28 84.13 353.1C82.58 354.61 70.24 366.68 68.69 368.19C61.87 375.09 60.33 385.63 64.88 394.2C65.27 394.94 68.39 400.83 68.78 401.57C69.51 402.92 69.51 404.55 68.78 405.9C65.64 412.44 63.06 419.23 61.06 426.19C60.52 427.61 59.32 428.68 57.86 429.06C57.06 429.3 50.68 431.24 49.88 431.48C40.67 434.25 34.28 442.6 34.01 452.21C34.01 454.36 34.01 471.56 34.01 473.71C33.75 483.74 40.26 492.7 49.88 495.56C50.68 495.81 57.06 497.75 57.86 497.99C59.32 498.37 60.52 499.43 61.06 500.85C63.21 507.59 65.91 514.15 69.13 520.45C69.85 521.8 69.85 523.43 69.13 524.78C68.74 525.52 65.62 531.42 65.23 532.15C60.67 540.73 62.22 551.26 69.04 558.17C70.55 559.71 82.62 572.06 84.13 573.6C90.99 580.5 101.58 582.06 110.14 577.42C110.88 577.03 116.77 573.9 117.51 573.51C118.87 572.82 120.49 572.82 121.85 573.51C128.15 576.73 134.7 579.43 141.44 581.58C142.86 582.12 143.93 583.32 144.3 584.79C144.55 585.58 146.49 591.97 146.73 592.76C149.68 602.2 158.53 608.54 168.41 608.29C170.58 608.29 187.92 608.29 190.09 608.29C199.94 608.34 208.64 601.87 211.42 592.42C211.66 591.62 213.6 585.24 213.85 584.44C214.22 582.97 215.29 581.77 216.71 581.23C223.38 579.22 229.87 576.66 236.13 573.6C237.48 572.86 239.12 572.86 240.47 573.6C241.2 573.99 247.1 577.11 247.84 577.5C256.4 582.08 266.96 580.54 273.85 573.69C275.38 572.16 287.58 559.95 289.11 558.43C295.93 551.52 297.48 540.99 292.93 532.41C292.54 531.68 289.41 525.78 289.02 525.04C288.28 523.69 288.28 522.06 289.02 520.71C292.28 514.42 294.98 507.87 297.09 501.11C297.63 499.69 298.83 498.63 300.3 498.25C301.09 498.01 307.48 496.07 308.27 495.82C317.71 493.02 324.17 484.33 324.14 474.49C324.14 472.26 324.14 454.44 324.14 452.21C324.07 442.46 317.68 433.89 308.36 431.05C308.36 431.05 301.18 428.86 300.38 428.62ZM126.65 515.63C97.68 486.63 97.7 439.63 126.7 410.66C155.7 381.69 202.7 381.71 231.67 410.71C245.57 424.62 253.38 443.47 253.39 463.13C253.45 482.85 245.61 501.78 231.62 515.68C202.62 544.65 155.63 544.63 126.65 515.63Z"},null,-1);ec.render=function(e,t,n,o,r,i){return an(),cn("svg",tc,[nc,oc,rc,ic])};const sc={PreservePresetState:{block:Bi.Global,key:"preservePresetState",type:is.Setting,section:2,settingIndex:1,component:_i.Toggle,label:"Preserve preset setting",helpText:'When disabled, first preset will always be loaded on device power on.\n Otherwise, preset specified with "Active preset" option is remembered. This is not related to saving of configuration\n to specified preset - the configuration data is always retained even after power off.'},ActivePreset:{block:Bi.Global,key:"activePreset",type:is.Setting,section:2,settingIndex:0,component:_i.Select,options:()=>{const e=Ld.state.supportedPresetsCount||1,t=[];for(let n=0;n{Ld.state.activePreset=e},label:"Active preset",helpText:"Preset stores the entire configuration for device."},UseGlobalChannel:{block:Bi.Global,key:"useGlobalChannel",type:is.Setting,section:0,settingIndex:13,component:_i.Toggle,label:"Use global channel",helpText:"When enabled, specified global MIDI channel will be used for all components. Individual channels for components will be ignored."},GlobalChannel:{showIf:e=>!!e.useGlobalChannel,block:Bi.Global,key:"globalChannel",type:is.Setting,section:0,settingIndex:14,min:1,max:17,component:_i.Input,label:"Global channel",helpText:"Setting the channel to value 17 will cause sending of data on each MIDI channel, and incoming channel for LEDs and other components will be ignored."},StandardNoteOff:{block:Bi.Global,key:"standardNoteOff",type:is.Setting,section:0,settingIndex:0,component:_i.Toggle,label:"Standard note off",helpText:"When disabled, Note On with velocity 0 will be sent as note off. If enabled, true Note Off event will be sent instead."},RunningStatus:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"runningStatus",type:is.Setting,section:0,settingIndex:1,component:_i.Toggle,label:"Running status",helpText:"This setting applies only to DIN MIDI out. When enabled,\n MIDI output bandwidth increases due to lower amount of bytes being sent. This setting can cause issues on older MIDI gear so it's best to leave it disabled."},MIDIClock:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"midiClock",type:is.Setting,section:0,settingIndex:15,component:_i.Toggle,label:"Send MIDI clock",helpText:"This setting applies only to DIN MIDI out.\n When enabled, MIDI clock will be sent out at default BPM of 120. The tempo can be changed with buttons or encoders."},DinMidiState:{block:Bi.Global,key:"dinMidiState",type:is.Setting,section:0,settingIndex:3,component:_i.Toggle,label:"DIN MIDI",helpText:"Enable or disable DIN MIDI input and output."},BleMidiState:{block:Bi.Global,key:"bleMidiState",type:is.Setting,section:0,settingIndex:9,component:_i.Toggle,label:"BLE MIDI",helpText:"Enable or disable BLE (Bluetooth Low Energy) MIDI input and output."},UsbToDinThru:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"usbToDinThru",type:is.Setting,section:0,settingIndex:4,component:_i.Toggle,label:"USB to DIN Thru",helpText:"When enabled, all data received via USB will be forwarded to DIN out."},UsbToUsbThru:{block:Bi.Global,key:"usbToUsbThru",type:is.Setting,section:0,settingIndex:5,component:_i.Toggle,label:"USB to USB Thru",helpText:"When enabled, all data received via USB will be forwarded to USB out."},UsbToBleThru:{showIf:e=>!!e.bleMidiState,block:Bi.Global,key:"usbToBleThru",type:is.Setting,section:0,settingIndex:6,component:_i.Toggle,label:"USB to BLE Thru",helpText:"When enabled, all data received via USB will be forwarded to BLE out."},DinToDinThru:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"dinToDinThru",type:is.Setting,section:0,settingIndex:7,component:_i.Toggle,label:"DIN to DIN Thru",helpText:"When enabled, all data received via DIN will be forwarded to DIN out."},DinToUsbThru:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"dinToUsbThru",type:is.Setting,section:0,settingIndex:2,component:_i.Toggle,label:"DIN to USB Thru",helpText:"When enabled, all data received via DIN will be forwarded to USB out."},DinToBleThru:{showIf:e=>!!e.dinMidiState&&!!e.bleMidiState,block:Bi.Global,key:"dinToBleThru",type:is.Setting,section:0,settingIndex:8,component:_i.Toggle,label:"DIN to BLE Thru",helpText:"When enabled, all data received via DIN will be forwarded to BLE out."},BleToDinThru:{showIf:e=>!!e.dinMidiState&&!!e.bleMidiState,block:Bi.Global,key:"bleToDinThru",type:is.Setting,section:0,settingIndex:10,component:_i.Toggle,label:"BLE to DIN Thru",helpText:"When enabled, all data received via BLE will be forwarded to DIN out."},BleToUsbThru:{showIf:e=>!!e.bleMidiState,block:Bi.Global,key:"bleToUsbThru",type:is.Setting,section:0,settingIndex:11,component:_i.Toggle,label:"BLE to USB Thru",helpText:"When enabled, all data received via BLE will be forwarded to USB out."},BleToBleThru:{showIf:e=>!!e.bleMidiState,block:Bi.Global,key:"bleToBleThru",type:is.Setting,section:0,settingIndex:12,component:_i.Toggle,label:"BLE to BLE Thru",helpText:"When enabled, all data received via BLE will be forwarded to BLE out."}},ac={block:Bi.Global,title:"Global",routeName:"device-global",iconComponent:We(ec),sections:sc,routes:[{path:"",name:"device-global",component:Pl},{path:"firmware-update",name:"device-firmware-update",component:Ul}]};var lc=No({name:"DeviceGridWithSettings",props:{block:{required:!0,type:Number},routeName:{required:!0,type:String},settingsTitle:{default:"Global",type:String},segmentGrid:{type:Boolean,default:!1}}});lc.render=function(e,t,n,o,r,i){const s=Zt("DeviceSettings"),a=Zt("DeviceGrid");return an(),cn(en,null,[fn(s,{key:"settings-"+e.block,class:"w-full",block:e.block,title:e.settingsTitle},null,8,["block","title"]),fn(a,{key:"grid-"+e.block,class:"w-full","route-name":e.routeName,block:e.block,"segment-grid":e.segmentGrid},null,8,["route-name","block","segment-grid"])],64)};var cc=No({name:"IconLed"});const uc={"aria-hidden":"true",focusable:"false","data-icon":"lightbulb",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",rel:"LED by Kiran Shastry from the Noun Project"},dc=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M463.07 208.06C463.14 128.01 398.3 63.07 318.25 63C318.22 63 318.19 63 318.16 63C318.16 63 318.15 63 318.15 63C238.1 63.02 173.23 127.94 173.25 207.99C173.25 208.01 173.25 208.04 173.25 208.07C173.25 223.26 173.25 344.74 173.25 359.93C159.36 364.06 149.88 376.89 150.01 391.38C150.01 396.05 150.01 433.38 150.01 438.05C149.77 443.58 154.05 448.26 159.58 448.51C159.83 448.52 160.08 448.52 160.33 448.51C164.46 448.51 185.11 448.51 222.28 448.51C206.46 465.51 197.68 474.96 195.92 476.84C189.24 484.02 185.54 493.47 185.56 503.27C185.56 522.15 185.56 533.18 185.56 552.06C185.56 558.1 190.45 563 196.49 563C202.53 563 207.43 558.1 207.43 552.06C207.43 533.18 207.43 522.15 207.43 503.27C207.42 499.03 209.01 494.94 211.87 491.81C214.56 488.92 228.03 474.49 252.27 448.51L382.69 448.51C406.93 474.49 420.4 488.92 423.09 491.81C425.95 494.94 427.53 499.03 427.53 503.27C427.53 522.15 427.53 533.18 427.53 552.06C427.53 558.1 432.42 563 438.46 563C444.5 563 449.4 558.1 449.4 552.06C449.4 533.18 449.4 522.15 449.4 503.27C449.41 493.47 445.71 484.02 439.03 476.84C437.28 474.96 428.49 465.51 412.67 448.51C450.67 448.51 471.77 448.51 475.99 448.51C481.53 448.68 486.15 444.32 486.31 438.79C486.32 438.54 486.32 438.3 486.31 438.05C486.31 433.38 486.31 396.05 486.31 391.38C486.44 376.89 476.96 364.06 463.07 359.93C463.07 359.93 463.07 223.25 463.07 208.06ZM195.12 208.07C195.04 140.11 250.06 84.96 318.02 84.87C318.06 84.87 318.11 84.87 318.15 84.87C318.15 84.87 318.16 84.87 318.16 84.87C386.12 84.88 441.2 139.97 441.2 207.93C441.2 207.98 441.2 208.02 441.2 208.07C441.2 218.08 441.2 268.16 441.2 358.29L195.12 358.29C195.12 278.17 195.12 228.1 195.12 208.07ZM464.44 426.64L171.88 426.64C171.88 405.48 171.88 393.73 171.88 391.38C171.88 385.35 176.17 380.16 182.2 380.16C209.39 380.16 426.93 380.16 454.12 380.16C460.15 380.16 464.44 385.35 464.44 391.38C464.44 396.08 464.44 407.84 464.44 426.64Z"},null,-1);cc.render=function(e,t,n,o,r,i){return an(),cn("svg",uc,[dc])};const pc={BlinkWithMidiClock:{block:Bi.Led,key:"blinkWithMidiClock",type:is.Setting,section:2,settingIndex:0,component:_i.Toggle,label:"Blink with MIDI clock",helpText:"Enables or disables LED blinking via MIDI clock. When enabled, MIDI clock is used to toggle LED state. Otherwise, internal timer is used."},StartupAnimation:{key:"startupAnimation",type:is.Setting,section:2,settingIndex:2,component:_i.Toggle,label:"Start-up animation",helpText:"Enables or disables LED animation when the device is powered on.",block:Bi.Led},UseMidiProgramChangeOffset:{key:"useMidiProgramChangeOffset",type:is.Setting,section:2,settingIndex:3,component:_i.Toggle,label:"Use MIDI Program Change Offset",helpText:"When enabled, current internal Program Change Offset will be appended to configured activation ID, if the LED is configured to react to Program Change.",block:Bi.Led},LedColorTesting:{key:"ledColorTesting",type:is.Value,section:0,component:_i.Select,options:[{value:0,text:"Off (no color)"},{value:1,text:"Red"},{value:2,text:"Green"},{value:3,text:"Yellow"},{value:4,text:"Blue"},{value:5,text:"Magenta"},{value:6,text:"Cyan"},{value:7,text:"White"}],label:"LED color testing",helpText:"",block:Bi.Led},ActivationNote:{key:"activationNote",type:is.Value,section:3,component:_i.Input,min:0,max:127,label:"Activation ID",helpText:"",block:Bi.Led},RGBEnable:{showIf:e=>!rs.includes(e.controlType),key:"rgbEnable",type:is.Value,section:4,component:_i.Toggle,label:"RGB Enable",helpText:"",block:Bi.Led},ControlType:{key:"controlType",type:is.Value,section:5,component:_i.Select,options:[{value:ji.MidiInNoteMultiValue,text:"MIDI in / Note (Multi value)"},{value:ji.MidiInCcMultiValue,text:"MIDI in / CC (Multi value)"},{value:ji.MidiInNoteSingleValue,text:"MIDI in / Note (Single value)"},{value:ji.MidiInCcSingleValue,text:"MIDI in / CC (Single value)"},{value:ji.LocalNoteMultiValue,text:"Local / Note (Multi value)"},{value:ji.LocalCcMultiValue,text:"Local / CC (Multi value)"},{value:ji.LocalNoteSingleValue,text:"Local / Note (Single value)"},{value:ji.LocalCcSingleValue,text:"Local / CC (Single value)"},{value:ji.ProgramChange,text:"Program change"},{value:ji.PresetChange,text:"Preset change"}],label:"Control type",helpText:"",block:Bi.Led},ActivationValue:{showIf:e=>!ns.includes(e.controlType),key:"activationValue",type:is.Value,section:6,component:_i.Input,min:0,max:127,label:"Activation Value",helpText:"",block:Bi.Led},MidiChannel:{showIf:e=>!os.includes(e.controlType),key:"midiChannel",type:is.Value,block:Bi.Led,section:7,component:_i.Input,min:1,max:17,label:"MIDI channel",helpText:"Setting the channel to value 17 will ignore the specified MIDI channel."}},hc={block:Bi.Led,title:"LED",routeName:"device-leds",iconComponent:We(cc),componentCountResponseIndex:3,sections:pc,routes:[{path:"leds",name:"device-leds",component:Va,redirect:{name:"device-leds-list"},children:[{path:"list",name:"device-leds-list",component:lc,props:{block:Bi.Led,routeName:"device-leds-form",segmentGrid:!0}},{path:"leds/:index",name:"device-leds-form",component:fa,props:{block:Bi.Led}}]}]};var fc=No({name:"IconTouchscreen"});const Lc={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 640 640","xml:space":"preserve"},mc=fn("path",{d:"M570 487.13L570.41 487.12L570.82 487.09L571.22 487.05L571.62 487L572.02 486.92L572.4 486.84L572.79 486.73L573.16 486.62L573.53 486.49L573.89 486.34L574.25 486.18L574.6 486.01L574.94 485.83L575.27 485.63L575.59 485.42L575.91 485.2L576.21 484.96L576.51 484.72L576.79 484.46L577.07 484.2L577.34 483.92L577.59 483.63L577.84 483.34L578.07 483.03L578.29 482.72L578.5 482.39L578.7 482.06L578.88 481.72L579.06 481.37L579.21 481.02L579.36 480.66L579.49 480.29L579.61 479.91L579.71 479.53L579.8 479.14L579.87 478.75L579.93 478.35L579.97 477.95L579.99 477.54L580 477.13L580 171.61L579.99 171.2L579.97 170.79L579.93 170.39L579.87 169.99L579.8 169.59L579.71 169.21L579.61 168.82L579.49 168.45L579.36 168.08L579.21 167.72L579.06 167.36L578.88 167.01L578.7 166.67L578.5 166.34L578.29 166.02L578.07 165.7L577.84 165.4L577.59 165.1L577.34 164.81L577.07 164.54L576.79 164.27L576.51 164.02L576.21 163.77L575.91 163.54L575.59 163.32L575.27 163.11L574.94 162.91L574.6 162.73L574.25 162.55L573.89 162.4L573.53 162.25L573.16 162.12L572.79 162L572.4 161.9L572.02 161.81L571.62 161.74L571.22 161.68L570.82 161.64L570.41 161.62L570 161.61L70.21 161.61L69.8 161.62L69.39 161.64L68.99 161.68L68.59 161.74L68.2 161.81L67.81 161.9L67.43 162L67.05 162.12L66.68 162.25L66.32 162.4L65.96 162.55L65.62 162.73L65.28 162.91L64.94 163.11L64.62 163.32L64.31 163.54L64 163.77L63.7 164.02L63.42 164.27L63.14 164.54L62.87 164.81L62.62 165.1L62.37 165.4L62.14 165.7L61.92 166.02L61.71 166.34L61.51 166.67L61.33 167.01L61.16 167.36L61 167.72L60.85 168.08L60.72 168.45L60.61 168.82L60.5 169.21L60.42 169.59L60.34 169.99L60.29 170.39L60.25 170.79L60.22 171.2L60.21 171.61L60.21 477.13L60.22 477.54L60.25 477.95L60.29 478.35L60.34 478.75L60.42 479.14L60.5 479.53L60.61 479.91L60.72 480.29L60.85 480.66L61 481.02L61.16 481.37L61.33 481.72L61.51 482.06L61.71 482.39L61.92 482.72L62.14 483.03L62.37 483.34L62.62 483.63L62.87 483.92L63.14 484.2L63.42 484.46L63.7 484.72L64 484.96L64.31 485.2L64.62 485.42L64.94 485.63L65.28 485.83L65.62 486.01L65.96 486.18L66.32 486.34L66.68 486.49L67.05 486.62L67.43 486.73L67.81 486.84L68.2 486.92L68.59 487L68.99 487.05L69.39 487.09L69.8 487.12L70.21 487.13L193.83 487.13L205.17 507.13L50.21 507.13L49.8 507.12L49.39 507.09L48.99 507.05L48.59 507L48.2 506.92L47.81 506.84L47.43 506.73L47.05 506.62L46.68 506.49L46.32 506.34L45.96 506.18L45.62 506.01L45.28 505.83L44.94 505.63L44.62 505.42L44.31 505.2L44 504.96L43.7 504.72L43.42 504.46L43.14 504.2L42.87 503.92L42.62 503.63L42.37 503.34L42.14 503.03L41.92 502.72L41.71 502.39L41.51 502.06L41.33 501.72L41.16 501.37L41 501.02L40.85 500.66L40.72 500.29L40.61 499.91L40.5 499.53L40.42 499.14L40.34 498.75L40.29 498.35L40.25 497.95L40.22 497.54L40.21 497.13L40.21 151.61L40.22 151.2L40.25 150.79L40.29 150.39L40.34 149.99L40.42 149.59L40.5 149.21L40.61 148.82L40.72 148.45L40.85 148.08L41 147.72L41.16 147.36L41.33 147.01L41.51 146.67L41.71 146.34L41.92 146.02L42.14 145.7L42.37 145.4L42.62 145.1L42.87 144.81L43.14 144.54L43.42 144.27L43.7 144.02L44 143.77L44.31 143.54L44.62 143.32L44.94 143.11L45.28 142.91L45.62 142.73L45.96 142.55L46.32 142.4L46.68 142.25L47.05 142.12L47.43 142L47.81 141.9L48.2 141.81L48.59 141.74L48.99 141.68L49.39 141.64L49.8 141.62L50.21 141.61L590 141.61L590.41 141.62L590.82 141.64L591.22 141.68L591.62 141.74L592.02 141.81L592.4 141.9L592.79 142L593.16 142.12L593.53 142.25L593.89 142.4L594.25 142.55L594.6 142.73L594.94 142.91L595.27 143.11L595.59 143.32L595.91 143.54L596.21 143.77L596.51 144.02L596.79 144.27L597.07 144.54L597.34 144.81L597.59 145.1L597.84 145.4L598.07 145.7L598.29 146.02L598.5 146.34L598.7 146.67L598.88 147.01L599.06 147.36L599.21 147.72L599.36 148.08L599.49 148.45L599.61 148.82L599.71 149.21L599.8 149.59L599.87 149.99L599.93 150.39L599.97 150.79L599.99 151.2L600 151.61L600 497.13L599.99 497.54L599.97 497.95L599.93 498.35L599.87 498.75L599.8 499.14L599.71 499.53L599.61 499.91L599.49 500.29L599.36 500.66L599.21 501.02L599.06 501.37L598.88 501.72L598.7 502.06L598.5 502.39L598.29 502.72L598.07 503.03L597.84 503.34L597.59 503.63L597.34 503.92L597.07 504.2L596.79 504.46L596.51 504.72L596.21 504.96L595.91 505.2L595.59 505.42L595.27 505.63L594.94 505.83L594.6 506.01L594.25 506.18L593.89 506.34L593.53 506.49L593.16 506.62L592.79 506.73L592.4 506.84L592.02 506.92L591.62 507L591.22 507.05L590.82 507.09L590.41 507.12L590 507.13L459.78 507.13L459.78 487.13L570 487.13Z",fill:"currentColor"},null,-1),gc=fn("path",{d:"M314.58 279.29C314.58 279.39 314.59 279.9 314.61 280.83C314.61 311.57 314.61 328.65 314.61 332.07C317.72 332.07 320.82 330.52 325.48 330.52C339.46 330.52 350.33 336.73 356.54 347.6C361.19 344.49 365.85 342.94 372.06 342.94C386.04 342.94 396.91 349.15 403.12 360.02C406.22 358.47 412.44 356.91 417.09 356.91C435.18 356.91 448.88 371.54 452.5 390.86C452.53 390.98 452.63 391.57 452.81 392.63C452.81 449.46 452.81 481.03 452.81 487.35C452.81 552.56 401.57 605.36 337.9 605.36C297.53 605.36 260.27 583.62 240.08 547.9C236.97 543.25 230.76 533.93 224.55 523.06C209.02 498.22 190.39 465.61 179.52 446.97C173.31 437.66 170.21 417.47 188.84 403.5C202.46 392.91 220.49 398.53 242.96 420.37C243.07 420.49 243.67 421.08 244.74 422.13C244.74 338.28 244.74 291.7 244.74 282.38C244.74 263.75 260.27 248.22 278.9 248.22C298.52 248.22 313.75 261.43 314.58 279.29ZM264.97 281.36C264.96 281.43 264.95 281.77 264.92 282.38C264.92 383.93 264.92 440.35 264.92 451.63C264.92 456.29 261.82 460.95 257.16 462.5C252.5 464.05 247.84 462.5 244.74 459.4C219.89 428.34 202.81 419.02 199.71 420.58C193.5 425.24 195.05 429.89 196.6 431.45C207.47 451.63 227.66 484.24 241.63 507.53C247.84 519.95 254.05 529.27 257.16 533.93C274.24 561.88 302.19 578.96 334.8 578.96C385.28 578.96 425.22 538.26 426.38 486.56C426.39 486.41 426.39 485.63 426.41 484.24C427.34 428.34 427.86 397.29 427.96 391.08C427.96 384.86 423.3 380.21 418.65 380.21C412.8 380.21 408.33 384.33 407.82 390C407.82 390.07 407.81 390.43 407.78 391.08C407.78 401.32 407.78 407.02 407.78 408.16C407.78 415.92 403.12 420.58 395.36 420.58C388 420.58 383.43 415 382.97 409.14C382.97 409.07 382.96 408.74 382.93 408.16C382.93 391.39 382.93 382.07 382.93 380.21C382.93 373.99 378.27 367.78 372.06 367.78C366.18 367.78 360.3 373.36 359.69 379.23C359.69 379.29 359.67 379.62 359.64 380.21C359.64 396.98 359.64 406.29 359.64 408.16C359.64 415.92 354.98 420.58 347.22 420.58C339.86 420.58 335.3 415 334.84 409.14C334.83 409.07 334.82 408.74 334.8 408.16C334.8 382.07 334.8 367.58 334.8 364.68C334.8 358.47 330.14 353.81 323.93 353.81C316.6 353.81 312.03 357.96 311.55 363.66C311.55 363.73 311.53 364.07 311.51 364.68C311.51 390.76 311.51 405.26 311.51 408.16C310.05 413.98 305.87 418.44 300.23 418.97C300.15 418.97 299.77 418.99 299.08 419.02C298.47 418.99 298.13 418.97 298.06 418.97C292.71 418.37 288.71 413.14 288.26 407.64C288.25 407.57 288.24 407.22 288.22 406.6C288.22 331.14 288.22 289.21 288.22 280.83C288.22 276.17 283.56 271.51 277.35 271.51C270.01 271.51 265.45 275.67 264.97 281.36ZM348.77 276.17C348.77 288.59 345.67 301.02 339.46 311.88C337.9 316.54 334.8 318.1 330.14 318.1C327.03 318.1 325.48 318.1 323.93 316.54C317.72 313.44 316.16 307.23 319.27 299.46C323.93 293.25 325.48 283.94 325.48 276.17C325.48 251.33 305.3 229.59 278.9 229.59C254.05 229.59 232.32 249.77 232.32 276.17C232.32 283.94 233.87 291.7 236.97 297.91C240.08 304.12 238.53 310.33 232.32 313.44C226.1 316.54 219.89 314.99 216.79 308.78C212.13 297.91 209.02 287.04 209.02 276.17C209.02 237.35 240.08 206.3 278.9 206.3C317.72 206.3 348.77 237.35 348.77 276.17Z",fill:"currentColor"},null,-1);fc.render=function(e,t,n,o,r,i){return an(),cn("svg",Lc,[mc,gc])};const vc={Enabled:{block:Bi.Touchscreen,key:"enableTouchscreen",type:is.Setting,section:0,settingIndex:0,component:_i.Toggle,label:"Enable",helpText:"Enables or disables the usage of touchscreen."},FlashingMode:{showIf:e=>e.enableTouchscreen,block:Bi.Touchscreen,key:"touchscreenFlashingMode",type:is.Setting,section:0,settingIndex:4,component:_i.Toggle,label:"Flashing mode",helpText:"Used to bypass communication with the screen to the virtual OpenDeck serial port.\n Useful when flashing the screen via Nextion GUI. When enabled, screen is unavailable to MIDI part of the firmware."},DisplayManufacturer:{showIf:e=>e.enableTouchscreen&&!e.touchscreenFlashingMode,block:Bi.Touchscreen,key:"touchscreenManufacturer",type:is.Setting,section:0,settingIndex:1,component:_i.Select,options:[{value:0,text:"Nextion"},{value:1,text:"Viewtech/Stone HMI"}],label:"Touchscreen manufacturer",helpText:""},Brightness:{showIf:e=>e.enableTouchscreen&&!e.touchscreenFlashingMode,block:Bi.Touchscreen,key:"touchscreenBrightness",type:is.Setting,section:0,settingIndex:2,component:_i.Select,options:[{value:0,text:"10%"},{value:1,text:"25%"},{value:2,text:"50%"},{value:3,text:"75%"},{value:4,text:"80%"},{value:5,text:"90%"},{value:6,text:"100%"}],label:"Touchscreen brightness",helpText:""},InitialScreen:{showIf:e=>e.enableTouchscreen,block:Bi.Touchscreen,key:"initialScreen",type:is.Setting,section:0,settingIndex:3,min:0,max:15,component:_i.Input,label:"Initial screen",helpText:"This will set the screen index which will be loaded on startup."},XPosition:{block:Bi.Touchscreen,key:"xPosition",type:is.Value,section:1,min:0,max:16383,component:_i.Input,label:"X position of this icon",helpText:"Specifies X coordinate on touchscreen where this icon is located. Touchscreen resolution\n needs to be taken into account here. On Viewtech/Stone touchscreens, this parameter is actually icon\n address."},YPosition:{block:Bi.Touchscreen,key:"yPosition",type:is.Value,section:2,min:0,max:16383,component:_i.Input,label:"Y position of this icon",helpText:"Specifies Y coordinate on touchscreen where this icon is located. Touchscreen resolution\n needs to be taken into account here. On Viewtech/Stone touchscreens, this parameter is ignored."},Width:{block:Bi.Touchscreen,key:"width",type:is.Value,section:3,min:0,max:1023,component:_i.Input,label:"Width of this icon",helpText:"Specifies width of this icon. Touchscreen resolution\n needs to be taken into account here. On Viewtech/Stone touchscreens, this parameter is ignored."},Height:{block:Bi.Touchscreen,key:"height",type:is.Value,section:4,min:0,max:639,component:_i.Input,label:"Height of this icon",helpText:"Specifies height of this icon. Touchscreen resolution\n needs to be taken into account here. On Viewtech/Stone touchscreens, this parameter is ignored."},ScreenOn:{block:Bi.Touchscreen,key:"screenOn",type:is.Value,section:5,min:0,max:15,component:_i.Input,label:"Screen index of this icon in on state",helpText:"Specifies screen on which this icon in on state is located."},ScreenOff:{block:Bi.Touchscreen,key:"screenOff",type:is.Value,section:6,min:0,max:15,component:_i.Input,label:"Screen index of this icon in off state",helpText:"Specifies screen on which this icon in off state is located."},ButtonChangesScreen:{block:Bi.Touchscreen,key:"buttonChangesScreen",type:is.Value,section:7,component:_i.Toggle,label:"Button changes screen",helpText:"Specifies whether this button is used to switch to another screen."},ScreenToSwitchTo:{showIf:e=>!!e.buttonChangesScreen,block:Bi.Touchscreen,key:"screenToSwitchTo",type:is.Value,section:8,min:0,max:15,component:_i.Input,label:"Screen to switch to",helpText:"Screen to which this button switches to."}},bc={block:Bi.Touchscreen,title:"Touchscreen",routeName:"device-touchscreens",iconComponent:We(fc),componentCountResponseIndex:4,sections:vc,routes:[{path:"touchscreens",name:"device-touchscreens",component:Va,redirect:{name:"device-touchscreens-list"},children:[{path:"list",name:"device-touchscreens-list",component:lc,props:{block:Bi.Touchscreen,routeName:"device-touchscreens-form",settingsTitle:""}},{path:"touchscreens/:index",name:"device-touchscreens-form",component:fa,props:{block:Bi.Touchscreen,gridCols:4}}]}]},yc={[Bi.Global]:ac,[Bi.Analog]:za,[Bi.Button]:el,[Bi.Encoder]:vl,[Bi.Led]:hc,[Bi.Display]:cl,[Bi.Touchscreen]:bc},Ic=(e,t)=>Object.values(yc[e].sections).reduce((e,n)=>(t&&n.type!==t||(e[n.key]=null),e),{}),Ec=Object.values(yc).reduce((e,t)=>(e.push(...t.routes),e),[]);var Cc,wc;(wc=Cc||(Cc={})).CloseConnection="CloseConnection",wc.Handshake="Handshake",wc.GetValueSize="GetValueSize",wc.GetValuesPerMessage="GetValuesPerMessage",wc.GetFirmwareVersion="GetFirmwareVersion",wc.IdentifyBoard="IdentifyBoard",wc.GetFirmwareVersionAndHardwareUid="GetFirmwareVersionAndHardwareUid",wc.GetNumberOfSupportedComponents="GetNumberOfSupportedComponents",wc.GetNumberOfSupportedPresets="GetNumberOfSupportedPresets",wc.Reboot="Reboot",wc.Backup="Backup",wc.GetBootLoaderSupport="GetBootLoaderSupport",wc.BootloaderMode="BootloaderMode",wc.FactoryReset="FactoryReset",wc.GetValue="GetValue",wc.SetValue="SetValue",wc.GetSectionValues="GetSectionValues",wc.RestoreBackup="RestoreBackup",wc.FirmwareUpdate="FirmwareUpdate";const Sc={[Cc.Handshake]:{key:Cc.Handshake,type:as.Predefined,specialRequestId:1,isConnectionInfoRequest:!0},[Cc.CloseConnection]:{key:Cc.CloseConnection,type:as.Predefined,specialRequestId:0,expectsNoResponse:!0,isConnectionInfoRequest:!0},[Cc.GetValueSize]:{key:Cc.GetValueSize,type:as.Predefined,isConnectionInfoRequest:!0,specialRequestId:2,parser:e=>e.length>1?Vs(e)[0]:e[0]||1},[Cc.GetValuesPerMessage]:{key:Cc.GetValuesPerMessage,type:as.Predefined,isConnectionInfoRequest:!0,specialRequestId:3,decodeDoubleByte:!0,parser:e=>e[0]},[Cc.GetFirmwareVersion]:{key:Cc.GetFirmwareVersion,type:as.Custom,specialRequestId:86,isConnectionInfoRequest:!0,decodeDoubleByte:!0,parser:e=>"v"+e[0]+"."+e[1]+"."+e[2]},[Cc.IdentifyBoard]:{key:Cc.IdentifyBoard,type:as.Custom,specialRequestId:66,decodeDoubleByte:!0,parser:e=>e.slice(0,4)},[Cc.GetFirmwareVersionAndHardwareUid]:{key:Cc.GetFirmwareVersionAndHardwareUid,type:as.Custom,isConnectionInfoRequest:!0,specialRequestId:67},[Cc.GetNumberOfSupportedComponents]:{key:Cc.GetNumberOfSupportedComponents,type:as.Custom,specialRequestId:77,decodeDoubleByte:!0,parser:e=>{const t={};return Object.values(yc).forEach(n=>{void 0!==n.componentCountResponseIndex&&(t[n.block]=e[n.componentCountResponseIndex])}),t}},[Cc.GetNumberOfSupportedPresets]:{key:Cc.GetNumberOfSupportedPresets,type:as.Custom,specialRequestId:80,isConnectionInfoRequest:!0,decodeDoubleByte:!0,parser:e=>e[0]},[Cc.Reboot]:{key:Cc.Reboot,type:as.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:127},[Cc.GetBootLoaderSupport]:{key:Cc.GetBootLoaderSupport,type:as.Custom,specialRequestId:81,decodeDoubleByte:!0,parser:e=>e[0]},[Cc.BootloaderMode]:{key:Cc.BootloaderMode,type:as.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:85},[Cc.FactoryReset]:{key:Cc.FactoryReset,type:as.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:68},[Cc.Backup]:{key:Cc.Backup,type:as.Custom,specialRequestId:27,hasMultiPartResponse:!0,isSystemOperation:!0},[Cc.GetValue]:{key:Cc.GetValue,type:as.Configuration,decodeDoubleByte:!0,responseEmbedsRequest:!0,getPayload:(e,t)=>{const n=[Ri.Request,0,Di.Get,Oi.Single,e.block,e.section];return 1===t.valueSize?n.push(e.index):n.push(...$s(e.index),0,0),n}},[Cc.SetValue]:{key:Cc.SetValue,type:as.Configuration,decodeDoubleByte:!0,responseEmbedsRequest:!0,getPayload:(e,t)=>{const n=[Ri.Request,0,Di.Set,Oi.Single,e.block,e.section];return 1===t.valueSize?n.push(e.index,e.value):n.push(...$s(e.index),...$s(e.value)),n}},[Cc.GetSectionValues]:{key:Cc.GetSectionValues,type:as.Configuration,decodeDoubleByte:!0,responseEmbedsRequest:!0,hasMultiPartResponse:!0,getPayload:(e,t)=>{const n=[Ri.Request,126,Di.Get,Oi.All,e.block,e.section];return 1===t.valueSize?n.push(0):n.push(0,0,0,0),n}},[Cc.RestoreBackup]:{key:Cc.RestoreBackup,type:as.Custom,isSystemOperation:!0},[Cc.FirmwareUpdate]:{key:Cc.FirmwareUpdate,type:as.Custom,isSystemOperation:!0,expectsNoResponse:!0}},kc=e=>{const t=yc[e.block];if(!t)throw new Error(`Missing block definition for block "${e.block}"`);return Object.values(t.sections).find(t=>(t=>t.section===e.section)(t)&&(!(e=>e.type===is.Setting)(t)||(t=>t.settingIndex===e.index)(t)))},xc=()=>Xs.connectionState===Qs.Pending,_c=()=>Xs.connectionState===Qs.Open,Mc={isConnecting:Ro(()=>xc()),isConnected:Ro(()=>_c())};let Tc=null,Rc=null;const Nc=e=>{Xs.connectionState=e},Dc=async()=>{Ac();try{_c()||xc()||await Bc(),Oc();const e=jp.currentRoute.value.matched.some(e=>"device"===e.name);if(1===Xs.outputs.length&&!e){const e=Xs.outputs[0].name.includes("OpenDeck DFU")?"device-firmware-update":"device";jp.push({name:e,params:{outputId:Xs.outputs[0].id}})}}catch(e){Hu.error("MIDI Connection watcher error",e)}Rc=setTimeout(Dc,500)},Ac=()=>{Rc&&(clearTimeout(Rc),Rc=null)},Oc=async()=>{Xs.inputs=Js.inputs.filter(e=>e.name.includes("OpenDeck")&&!e.name.includes("BLE")),Xs.outputs=Js.outputs.filter(e=>e.name.includes("OpenDeck")&&!e.name.includes("BLE"))},Pc=async e=>{await Bc();const t=Js.outputs.find(t=>t.id===e);if(!t)return Ws(250).then(()=>Pc(e));const n=Js.inputs.filter(e=>e.name===t.name);return n.length?(async(e,t)=>new Promise((n,o)=>{let r,i=!1;const s=e.name.includes("OpenDeck DFU");if(s)return r=t.find(e=>e.name.includes("OpenDeck DFU")),i=!0,n({input:r,output:e,isBootloaderMode:s});const a=o=>{r=o.target;const a=7===o.data.length?1:2;t.forEach(e=>{e.removeListener("sysex","all")}),i=!0,n({input:r,output:e,isBootloaderMode:s,valueSize:a})};return t.forEach(e=>{e.removeListener("sysex","all"),e.addListener("sysex","all",a)}),e.sendSysex(Ti,[0,0,1]),Ws(1e3).then(()=>{i||(Hu.error("INITIAL HANDSHAKE TIMED OUT, RETRYING"),o("TIMED OUT"))})}).catch(()=>Pc(e.id)))(t,n):Ws(250).then(()=>Pc(e))},Bc=async()=>{if(Js.supported){if(Xs.isWebMidiSupported=!0,Tc)return Tc;if(!Js.enabled)return Tc=Fc(),Tc;Nc(Qs.Open)}},Fc=async()=>new Promise((e,t)=>{if(Js.enabled)return Nc(Qs.Open),e();Nc(Qs.Pending),Js.enable((function(n){if(!n)return Oc(),Nc(Qs.Open),Tc=null,e();Hu.error("Failed to load WebMidi",n),t(n)}),!0)}),Uc={state:Xs,computed:Mc,actions:{loadMidi:Bc,matchInputOutput:Pc,assignInputs:Oc,findOutputById:e=>Js.outputs.find(t=>t.id===e),startMidiConnectionWatcher:()=>Dc(),stopMidiConnectionWatcher:Ac}},Gc=As(Uc);var Vc,qc,$c,Hc;(qc=Vc||(Vc={})).Info="info",qc.Midi="midi",qc.Request="request",qc.Error="error",(Hc=$c||($c={})).Midi="midi",Hc.System="system";const jc={[$c.Midi]:!0},zc={};Object.values(Bi).forEach(e=>{zc[e]={}});const Wc=Ge({...{stack:[],highlights:zc,logFilter:jc,showRequestLog:!1,showHexValues:!1,suspendMidiLogs:!1},logFilter:Os("logFilter")||jc,showRequestLog:Os("showRequestLog")||!1});var Qc,Zc,Xc,Yc;(Zc=Qc||(Qc={})).Closed="closed",Zc.Pending="pending",Zc.Open="open",(Yc=Xc||(Xc={})).NotSupported="not_supported",Yc.MissingIndex="missing_index",Yc.UartInterfaceAllocated="uart_interface_allocated",Yc.CdcInterfaceAllocated="cdc_interface_allocated";const Kc=Xe({}),Jc={activeRequestId:Xe(null),nextRequestId:100},eu=()=>{Bu(),Jc.activeRequestId.value=null,Jc.nextRequestId=100,Kc.value={}},tu=e=>Sc[e],nu=async e=>{const t=(Jc.nextRequestId+=1,Jc.nextRequestId);if(Kc.value[t])return void qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_ID_CONFLICT,requestId:t});const{specialRequestId:n,isConnectionInfoRequest:o}=tu(e.command),r={...e,id:t,specialRequestId:n,state:cs.Pending,responseCount:0,time:{created:new Date,started:null,finished:null}};return Kc.value[t]=r,qu.actions.addRequest(t),o||await od(),Jc.activeRequestId.value?void 0:ou(t)},ou=async e=>{Pu(!0);const t=Kc.value[e];if(t)if(Jc.activeRequestId.value)qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_ALREADY_ACTIVE,requestId:e});else try{const n=tu(t.command);n.isSystemOperation&&(fs.isSystemOperationRunning=!0),fs.output.sendSysex(Ti,Array.from(t.payload)),t.time.started=new Date,Jc.activeRequestId.value=e,t.state=cs.Sent,n.expectsNoResponse?(Jc.activeRequestId.value=null,t.state=cs.Done,t.promiseResolve()):t.command===Cc.RestoreBackup&&Ws(2e3).then(()=>{t.state===cs.Sent&&au(t,Ys.UI_QUEUE_REQ_TIMED_OUT)})}catch(e){au(t,Ys.UI_QUEUE_REQUEST_SEND_ERROR)}else qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_DATA_MISSING,requestId:e})},ru=(e,t,n)=>{const{data:o}=e,{decodeDoubleByte:r,responseEmbedsRequest:i}=t;let s=o;try{if(r){const r=i?((e,t,n)=>{const{data:o,messageStatus:r,messagePart:i}=e,{hasMultiPartResponse:s}=t,a=s?[1,i,...n.payload.slice(2)]:[1,...n.payload.slice(1)],l=[r,i,...o],c=l.slice(0,a.length);return Hs(a,c)||qu.actions.addError({errorCode:Ys.UI_QUEUE_EMBEDED_RESPONSE_MISMATCH}),l.slice(a.length)})(e,t,n):o;s=Vs(r)}}catch(e){return void qu.actions.addError({errorCode:Ys.UI_QUEUE_REQUEST_DECODE_ERROR,payload:o,error:e})}return t.parser?t.parser(s):s},iu=e=>{if((e=>{if(73!==Array.from(e)[6])return!1;const t=e[7],n=2===fs.valueSize?Vs(e.slice(8,10))[0]:e[8];return qu.actions.addInfo({block:t,index:n,payload:e}),!0})(e.data))return;if((e=>6===e.data.length&&Object.keys(hu).includes(String(e.data[4])))(e))return void qu.actions.addMidi({type:hu[e.data[4]],data:[e.data[4]]});const t=(()=>{const e=Jc.activeRequestId.value;if(!e)return;const t=Kc.value[e];return t||qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_NONE_ACTIVE,requestId:e}),t})();if(!t)return;if(t.state!==cs.Sent)return void qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_NONE_ACTIVE,payload:e.data});t.responseCount++;const n=tu(t.command),{hasMultiPartResponse:o}=n,r=t.command===Cc.Backup,i=2===fs.valueSize;if(i&&!r&&t.specialRequestId&&e.data[6]!==t.specialRequestId)return;let s;try{s=((e,t)=>{const n=Array.from(e);if(t.command===Cc.Backup)return{messageStatus:1,messagePart:0,data:n};const o=n[4],r=n[5],i=n.slice(6,-1),{specialRequestId:s}=tu(t.command);return([1,2].includes(s)&&i.length||s&&2===fs.valueSize)&&i.shift(),{messageStatus:o,messagePart:r,data:i}})(e.data,t)}catch(e){return void logger.error("Failed to process event data",e)}const{messageStatus:a,messagePart:l,data:c}=s;if(a>1)return au(t,a);let u;r||(u=i?ru(s,n,t):((e,t)=>t.parser?t.parser(e.data):e.data)(s,n));const{handler:d}=t,p=d(u||c)||t.command===Cc.GetSectionValues&&126===l;return!o||p?su(t,s,u):void 0},su=(e,t,n)=>{const{messageStatus:o,messagePart:r,data:i}=t;e.state=cs.Done,e.responseData=i,e.parsed=n,e.messagePart=r,e.messageStatus=o,e.promiseResolve(),e.time.finished=new Date,lu()},au=(e,t)=>{e.state=cs.Error;const n=na(t);if(e.errorMessage=n.description,e.promiseReject(n.code),qu.actions.addError({errorCode:n.code,requestId:e.id}),e.config){const n=kc(e.config);n&&[Ys.NOT_SUPPORTED].includes(t)&&Xu(n,Xc.NotSupported),n&&[Ys.UART_INTERFACE_ALLOCATED].includes(t)&&Xu(n,Xc.UartInterfaceAllocated),n&&[Ys.CDC_INTERFACE_ALLOCATED].includes(t)&&Xu(n,Xc.CdcInterfaceAllocated),n&&[Ys.BLOCK,Ys.SECTION,Ys.INDEX].includes(t)&&Xu(n,Xc.MissingIndex)}lu()},lu=()=>{Jc.activeRequestId.value=null;if(Object.values(Kc.value).filter(e=>e.state===cs.Sent).length)return void logger.error("Cannot start next request, there are unfinished sent requests");const e=Object.values(Kc.value).filter(e=>e.state===cs.Pending),t=e.length&&e[0].id;if(t)return ou(t);Pu(!1)},cu=(e,t)=>{if([as.Custom,as.Predefined].includes(e.type)){if(void 0===e.specialRequestId)throw new Error("Missing specialRequestId for definition "+e.key);return[0,0,e.specialRequestId]}if(!e.getPayload)throw new Error("Missing getPayload for definition "+e.type);return e.getPayload(t,fs)},uu=async e=>{const{command:t,handler:n,config:o,payload:r}=e,i=tu(t);return new Promise((e,s)=>nu({command:t,payload:r||cu(i,o),handler:n,config:o,promiseResolve:e,promiseReject:s}))},du=e=>Array.isArray(e)?[240,0,83,67,...e,247]:[],pu={noteon:"Note On",noteoff:"Note Off",controlchange:"Control Change",programchange:"Program Change",pitchbend:"Pitch Bend",clock:"RealTime: Clock",start:"RealTime: Start",continue:"RealTime: Continue",stop:"RealTime: Stop",activesensing:"RealTime: Active Sensing",reset:"RealTime: Reset",mmcstop:"MMC Stop",mmcplay:"MMC Play",mmcrecordstart:"MMC Record Start",mmcrecordstop:"MMC Record Stop",mmcpause:"MMC Pause"},hu={1:"mmcstop",2:"mmcplay",6:"mmcrecordstart",7:"mmcrecordstop",9:"mmcpause"},fu=["clock","start","continue","stop","activesensing","reset"];var Lu="object"==typeof global&&global&&global.Object===Object&&global,mu="object"==typeof self&&self&&self.Object===Object&&self,gu=Lu||mu||Function("return this")(),vu=gu.Symbol,bu=Object.prototype,yu=bu.hasOwnProperty,Iu=bu.toString,Eu=vu?vu.toStringTag:void 0;var Cu=Object.prototype.toString;var wu=vu?vu.toStringTag:void 0;function Su(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":wu&&wu in Object(e)?function(e){var t=yu.call(e,Eu),n=e[Eu];try{e[Eu]=void 0;var o=!0}catch(e){}var r=Iu.call(e);return o&&(t?e[Eu]=n:delete e[Eu]),r}(e):function(e){return Cu.call(e)}(e)}function ku(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var xu=/^\s+|\s+$/g,_u=/^[-+]0x[0-9a-f]+$/i,Mu=/^0b[01]+$/i,Tu=/^0o[0-7]+$/i,Ru=parseInt;function Nu(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==Su(e)}(e))return NaN;if(ku(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ku(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(xu,"");var n=Mu.test(e);return n||Tu.test(e)?Ru(e.slice(2),n?2:8):_u.test(e)?NaN:+e}var Du=function(){return gu.Date.now()},Au=Math.max,Ou=Math.min;const Pu=e=>{Wc.suspendMidiLogs=e},Bu=()=>{Wc.stack=[]},Fu=function(e,t,n){var o,r,i,s,a,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=o,i=r;return o=r=void 0,c=t,s=e.apply(i,n)}function f(e){return c=e,a=setTimeout(m,t),u?h(e):s}function L(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function m(){var e=Du();if(L(e))return g(e);a=setTimeout(m,function(e){var n=t-(e-l);return d?Ou(n,i-(e-c)):n}(e))}function g(e){return a=void 0,p&&o?h(e):(o=r=void 0,s)}function v(){var e=Du(),n=L(e);if(o=arguments,r=this,l=e,n){if(void 0===a)return f(l);if(d)return clearTimeout(a),a=setTimeout(m,t),h(l)}return void 0===a&&(a=setTimeout(m,t)),s}return t=Nu(t)||0,ku(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Au(Nu(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=r=a=void 0},v.flush=function(){return void 0===a?s:g(Du())},v}(()=>{Wc.stack.length>50&&(Wc.stack=Wc.stack.slice(0,50))},10,{leading:!0,maxWait:10,trailing:!1});function Uu(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=n.length;for(let r=0;r{const{type:t,block:n,index:o}=e,r=new Date,i=r.getTime(),s=(e=>{if(!e)return"";const t=e.getHours(),n=zs(e.getMinutes()),o=zs(e.getSeconds()),r=e.getMilliseconds();return`${zs(t)}:${n}:${o} ${r}`})(r);if(t===Vc.Info){const e=Wc.highlights[n];if(!e)return void logger.error("Unknown highlight block with id "+n);e[o]=i}const a=t===Vc.Midi?!Wc.logFilter[$c.Midi]:!Wc.logFilter[$c.System];if(!Wc.showRequestLog||a)return;let l=e.payload;l&&("string"==typeof l&&(l=l.split(",")),Array.isArray(l)||(l=Array.from(l))),Wc.stack.unshift({...e,id:Uu(9),payload:l,time:r,timeString:s}),Fu()},Vu={clearRequestLog:Bu,getFilteredLogs:e=>Wc.stack.filter(e),addRequest:e=>{const t=Kc.value[e],n=du(t.payload),o=n&&Gs(Us(n)),r=n&&Gs(n),i=du((e=>{const t=[];return[e.messageStatus,e.messagePart,e.specialRequestId].forEach(e=>{void 0!==e&&t.push(e)}),Array.isArray(e.responseData)&&t.push(...e.responseData),t})(t)),s=i&&Gs(Us(i)),a=i&&Gs(i);Gu({type:Vc.Request,requestId:e,dataHex:s,dataDec:a,payloadHex:o,payloadDec:r})},addInfo:e=>{const{payload:t}=e,n=t&&Gs(Us(t)),o=t&&Gs(Array.from(t));Gu({type:Vc.Info,...e,payloadHex:n,payloadDec:o})},addError:e=>{if(Gu({type:Vc.Error,...e}),e.errorCode){const t=na(e.errorCode);Hu.error(t.description,e.error)}else Hu.error(definition.message,e.error)},addMidi:e=>{if(Wc.suspendMidiLogs)return;const{type:t,channel:n,data:o,controller:r}=e,i=o?Array.from(o):[],s=e.value&&"controlchange"!==t?e.value:void 0,a=["noteon","noteoff"].includes(t)?o[1]:void 0,l=r&&r.number,c=o&&o.length>2?o[2]:void 0,u="noteoff"==t?o[0]>=144?pu.noteon:pu.noteoff:pu[t],d=o&&Gs(i),p=o&&Gs(Us(i)),h={label:u,type:Vc.Midi,eventType:t,channel:n,dataHex:p,dataDec:d,value:s,controllerNumber:l,note:a,velocity:c};Gu(h)},toggleLogFilter:e=>{Wc.logFilter[e]=!Wc.logFilter[e],Ps("logFilter",Wc.logFilter)},toggleLog:()=>{Wc.showRequestLog=!Wc.showRequestLog,Ps("showRequestLog",Wc.showRequestLog)},toggleHexValues:()=>{Wc.showHexValues=!Wc.showHexValues,Ps("showHexValues",Wc.showHexValues)},setSuspendMidi:Pu},qu={state:Wc,actions:Vu},$u=As(qu),Hu={log:(...e)=>{Uc.state.log&&console.log(...e)},warn:(...e)=>{Uc.state.log&&console.warn(...e)},error:(e,t)=>{if(Uc.state.log&&(e&&console.error(e),t&&console.error(t),!t&&!e))throw new Error("Unknown error!")}},ju=async(e,t)=>{const n={};let o=0;fs.systemOperationPercentage=1;const r=await(async e=>(await e.text()).split("\n").map(e=>e.split(" ").map(Bs)).map(e=>e.slice(4,-1)))(e),i=async e=>{const s=e.length+5,a=(()=>{const e=(new Date).getTime();return Math.floor(e/1e3)})();if(n[a]>2e3)return Ws(250).then(()=>i(e));n[a]?n[a]=n[a]+s:n[a]=s,o+=1;const l=Math.floor(o/r.length*100);return fs.systemOperationPercentage=l>0?l:1,uu({command:t,payload:e,handler:()=>null})};let s=!1;const a=r.reduce((e,t)=>e.then(()=>i(t)).catch(()=>{s=!0,i(t)}),Promise.resolve());return await a,fs.systemOperationPercentage=null,!s},zu=["noteon","noteoff","controlchange","programchange","pitchbend","clock","start","continue","stop","activesensing","reset"],Wu=e=>{zu.forEach(t=>e.removeListener(t,"all"))};let Qu=null;const Zu=e=>fs.unsupportedComponents[e.block][e.key],Xu=(e,t)=>fs.unsupportedComponents[e.block][e.key]=t||!t,Yu=e=>{Object.assign(fs,e)},Ku=async()=>{ed();try{if(!fs.outputId)return jp.push({name:"home"});if(!await Uc.actions.findOutputById(fs.outputId))return jp.push({name:"home"})}catch(e){return Hu.error("Device connection watcher error",e),jp.push({name:"home"})}Qu=setTimeout(()=>Ku(),1e3)},Ju=()=>Ws(5e3).then(Ku),ed=()=>{Qu&&(clearTimeout(Qu),Qu=null)},td=async e=>{const t=await Uc.actions.matchInputOutput(e),{input:n,output:o,isBootloaderMode:r,valueSize:i}=t;if(fs.isBootloaderMode=r,fs.outputId=e,fs.input=n,fs.output=o,fs.valueSize=i,fs.valuesPerMessageRequest=null,fs.firmwareVersion=null,fs.input.removeListener("sysex","all"),fs.input.addListener("sysex","all",iu),Wu(fs.input),(e=>{zu.forEach(t=>e.addListener(t,"all",qu.actions.addMidi))})(fs.input),r)return fs.boardName=o.name,fs.connectionState=Qc.Open,fs.connectionPromise=null,void Ju();await uu({command:Cc.GetValuesPerMessage,handler:e=>Yu({valuesPerMessageRequest:e})}),await uu({command:Cc.GetFirmwareVersion,handler:e=>Yu({firmwareVersion:e})}),fs.connectionState=Qc.Open,fs.connectionPromise=null,Ju(),await id()},nd=async e=>{if("string"!=typeof e)throw new Error("MISSING OR INVALID DEVICE OUTPUT ID");return fs.connectionPromise||(fs.connectionState=Qc.Pending,fs.connectionPromise=td(e)),fs.connectionPromise},od=async()=>{if(fs.connectionState!==Qc.Open){if(fs.connectionPromise)return fs.connectionPromise;if(fs.outputId)return nd(fs.outputId);throw new Error("CANNOT ENSURE CONNECTION, MISSING outputId")}},rd=async(e,t)=>(await uu({command:e,handler:t}),fs.connectionState=Qc.Closed,Ws(200).then(()=>jp.push({name:"home"}))),id=async()=>{await uu({command:Cc.IdentifyBoard,handler:e=>{const t=(e=>oa.find(t=>Hs(t.id,e)||t.oldId&&Hs(t.oldId,e)))(e),n=t&&t.name||"Custom OpenDeck board",o=t&&t.firmwareFileName;Yu({boardName:n,firmwareFileName:o})}}),await uu({command:Cc.GetNumberOfSupportedComponents,handler:e=>Yu({numberOfComponents:e})});try{2===fs.valueSize&&await uu({command:Cc.GetBootLoaderSupport,handler:e=>Yu({bootLoaderSupport:e})})}catch(e){Hu.error("Error while checking for bootloader support, setting to false",e),Yu({bootLoaderSupport:!1})}await uu({command:Cc.GetNumberOfSupportedPresets,handler:e=>Yu({supportedPresetsCount:e})})},sd=e=>!Zu(e),ad=e=>1===fs.valueSize||!e.isMsb,ld=(e,t)=>{if(!yc[e])throw new Error("Block definition not found in BlockMap "+e);const{sections:n}=yc[e];return Object.values(n).filter(e=>((e,t)=>e.type===t)(e,t)).filter(sd).filter(ad)},cd={setInfo:Yu,setViewSetting:(e,t)=>{t.itemsPerPage&&t.itemsPerPage!==fs.viewSettings[e].itemsPerPage&&(fs.viewSettings[e].currentPage=1),Object.assign(fs.viewSettings[e],t)},connectDevice:nd,closeConnection:()=>{ed(),(async()=>{eu(),fs.input&&(fs.input.removeListener("sysex","all"),Wu(fs.input)),Object.assign(fs,hs)})()},ensureConnection:od,startUpdatesCheck:async e=>{const t=await fetch("https://api.github.com/repos/paradajz/OpenDeck/releases").then(e=>e.json()),n=fs.firmwareVersion;return t.filter(e=>e.name.length&&Rs(e.name,n)).map(t=>({html_description:Ns(t.body,{headerIds:!1}),firmwareFileLink:t.assets.find(t=>t.name===e),...t}))},startBootLoaderMode:async()=>{await uu({command:Cc.BootloaderMode,handler:()=>Hu.log("Bootloader mode started")})},startFactoryReset:async()=>{await rd(Cc.FactoryReset,()=>Hu.log("Bootloader mode started"))},startReboot:async()=>{await rd(Cc.Reboot,()=>Hu.log("Reboot mode started"))},startDeviceConnectionWatcher:Ju,stopDeviceConnectionWatcher:ed,startFirmwareUdate:async e=>{eu();const t=await ju(e,Cc.FirmwareUpdate);fs.isSystemOperationRunning=!1;alert(t?"Firmware update finished":"Firmware update finished with errors")},isControlDisabled:Zu,disableControl:Xu,startBackup:async()=>{let e=0,t=null;const n=[];uu({command:Cc.Backup,handler:o=>{e||(t=o);const r=e&&Hs(t,o),i=0===e;if(e+=1,i||r||n.push(o.map(Fs).join(" ")),r){const e=new Blob([n.join("\n")],{type:"text/plain;charset=utf-8"}),t=(new Date).toISOString().slice(0,-8).replace(":","-").replace("T","-");Ds.saveAs(e,`OpenDeckUI-Backup-${t}.sysex`)}return r}}).catch(e=>Hu.error("Failed to read component config",e))},startRestore:async e=>{await ju(e,Cc.RestoreBackup),fs.isSystemOperationRunning=!1,alert("Restoring from backup finished. The board will now reboot and apply the parameters. This can take up to 30 seconds.")},getComponentSettings:async(e,t,n)=>{await od();const o={},r=ld(e,t).map(t=>{const{key:r,section:i,onLoad:s,settingIndex:a}=t,l="number"==typeof n?n:a;return uu({command:Cc.GetValue,handler:e=>{const t=e[0];o[r]=t,s&&s(t)},config:{block:e,section:i,index:l}}).catch(e=>Hu.error("Failed to read component config",e))});return await Promise.all(r),o},setComponentSectionValue:async(e,t)=>uu({command:Cc.SetValue,handler:t,config:e}),getSectionValues:async e=>{await od();const t={},n=ld(e,is.Value).map(n=>{const{key:o,section:r}=n;return uu({command:Cc.GetSectionValues,handler:e=>(t[o]||(t[o]=[]),t[o].push(...e),!1),config:{block:e,section:r}}).catch(e=>Hu.error("Failed to read component config",e))});return await Promise.all(n),t},getFilteredSectionsForBlock:ld},ud=Ro(()=>fs.input&&fs.input.name),dd=Ro(()=>fs.input&&fs.input.manufacturer),pd=Ro(()=>fs.connectionState===Qc.Pending),hd=Ro(()=>fs.connectionState===Qc.Open),fd=Ro(()=>1===fs.valueSize),Ld={state:fs,computed:{name:ud,manufacturer:dd,isConnecting:pd,isConnected:hd,showMsbControls:fd},actions:cd},md=As(Ld);var gd=No({name:"LogDataValue",props:{hex:{required:!0,type:String},dec:{required:!0,type:String}},setup(){const{showHexValues:e}=$u;return{showHexValues:e}}});const vd={class:"sysex-payload capitalize"},bd=fn("sup",null,"Hex",-1),yd=fn("sup",null,"Dec",-1);gd.render=function(e,t,n,o,r,i){return an(),cn("span",vd,[e.showHexValues?(an(),cn(en,{key:0},[mn("[ "+l(e.hex)+" ]  ",1),bd],64)):(an(),cn(en,{key:1},[mn("[ "+l(e.dec)+" ]  ",1),yd],64))])};var Id=No({name:"LogMidi",components:{LogDataValue:gd},props:{logEntry:{required:!0,type:Object}},setup:()=>({convertToHexString:Us,MidiEventTypeLabel:pu,MidiRealtimeEvent:fu})});const Ed={class:"border-b border-gray-800 last:border-b-0"},Cd={class:"mr-2 text-yellow-300"},wd={key:0,class:"mr-2"},Sd=fn("span",{class:"faded"},"channel",-1),kd={key:1,class:"mr-2"},xd=fn("span",{class:"faded"},"value",-1),_d={key:2,class:"mr-2"},Md=fn("span",{class:"faded"},"controller",-1),Td=fn("span",{class:"faded"},"value",-1),Rd={key:3,class:"mr-2"},Nd=fn("span",{class:"faded"},"velocity",-1),Dd={key:4},Ad=fn("span",{class:"sysex-label faded"},"Raw data",-1);Id.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",Ed,[fn("strong",Cd,[mn(l(e.logEntry.label)+" ",1),null!=e.logEntry.note?(an(),cn(en,{key:0},[mn(l(e.logEntry.note),1)],64)):vn("",!0)]),void 0!==e.logEntry.channel?(an(),cn("span",wd,[Sd,mn(" "+l(e.logEntry.channel),1)])):vn("",!0),void 0!==e.logEntry.value?(an(),cn("span",kd,[xd,mn(" "+l(e.logEntry.value),1)])):vn("",!0),void 0!==e.logEntry.controllerNumber?(an(),cn("span",_d,[Md,mn(" "+l(e.logEntry.controllerNumber)+" ",1),Td,mn(" "+l(e.logEntry.velocity),1)])):vn("",!0),void 0!==e.logEntry.note?(an(),cn("span",Rd,[Nd,mn(" "+l(e.logEntry.velocity),1)])):vn("",!0),e.logEntry.dataDec&&e.logEntry.dataDec.length?(an(),cn("div",Dd,[Ad,fn(s,{hex:e.logEntry.dataHex,dec:e.logEntry.dataDec},null,8,["hex","dec"])])):vn("",!0)])};var Od=No({name:"LogRequest",components:{LogDataValue:gd},props:{logEntry:{required:!0,type:Object},requestId:{required:!0,type:Number}},setup:e=>({request:Xe(Kc.value[e.requestId]),getDefinitionLabel:e=>{const t=kc(e);if(!t)return"";const n=t.type===is.Value&&e.index?"# "+e.index:" - ";return`- ${Bi[e.block]} ${n} ${t&&t.label}`},getDifferenceInMs:js,convertToHexString:Us,RequestState:cs,Block:Bi})});const Pd={class:"activity request-request"},Bd={class:"request-command"},Fd=mn(".  "),Ud={class:"request-command"},Gd={key:0,class:"request-command"},Vd={key:1,class:"request-config"},qd={class:"status"},$d={key:0,class:"timing"},Hd=fn("span",{class:"status-label faded"},"in",-1),jd={key:1,class:"timing"},zd=fn("span",{class:"status-label faded"},"waited",-1),Wd={key:0},Qd=fn("span",{class:"sysex-label faded"},"Sent",-1),Zd={key:1},Xd={class:""},Yd=fn("span",{class:"sysex-label faded"},"Received",-1),Kd={key:0},Jd=fn("span",{class:"sysex-label faded"},"Parsed",-1),ep={key:2},tp=fn("span",{class:"sysex-label text-red-700"},"Error",-1),np={class:"text-red-500"};Od.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",Pd,[fn("span",{class:{"text-red-500":!!e.request.errorMessage}},[fn("strong",Bd,l(e.request.id),1),Fd,fn("strong",Ud,l(e.request.command),1),e.request.config?(an(),cn("strong",Gd,l(e.getDefinitionLabel(e.request.config)),1)):vn("",!0),e.request.config&&"number"==typeof e.request.config.value?(an(),cn("strong",Vd,l(e.request.config.value),1)):vn("",!0)],2),fn("span",{class:["request-status",e.request.state]},[fn("span",qd,l(e.request.state),1),e.request.time.finished?(an(),cn("span",$d,[Hd,fn("strong",null,l(e.getDifferenceInMs(e.request.time.finished,e.request.time.started))+"ms",1)])):vn("",!0),e.getDifferenceInMs(e.request.time.started,e.request.time.created)?(an(),cn("span",jd,[zd,fn("strong",null,l(e.getDifferenceInMs(e.request.time.started,e.request.time.created))+"ms",1)])):vn("",!0)],2),e.request.payload?(an(),cn("div",Wd,[Qd,fn(s,{dec:e.logEntry.payloadDec,hex:e.logEntry.payloadHex},null,8,["dec","hex"])])):vn("",!0),e.request.responseData?(an(),cn("div",Zd,[fn("div",Xd,[Yd,fn(s,{hex:e.logEntry.dataHex,dec:e.logEntry.dataDec},null,8,["hex","dec"])]),e.request.parsed?(an(),cn("div",Kd,[Jd,fn("span",null,l(e.request.parsed),1)])):vn("",!0)])):vn("",!0),e.request.errorMessage?(an(),cn("div",ep,[tp,fn("span",np,l(e.request.errorMessage),1)])):vn("",!0)])};var op=No({name:"LogInfo",components:{LogDataValue:gd},props:{logEntry:{required:!0,type:Object}},setup:()=>({Block:Bi,BlockMap:yc,convertToHexString:Us})});const rp={class:""},ip=fn("strong",{class:"mr-2 text-gray-400"},"Component info",-1),sp={key:0},ap={key:1},lp={key:2},cp=fn("span",{class:"sysex-label faded"},"Raw data",-1);op.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",rp,[ip,e.logEntry.block?(an(),cn("strong",sp,l(e.BlockMap[e.logEntry.block].title),1)):vn("",!0),Number.isInteger(e.logEntry.index)?(an(),cn("strong",ap," #"+l(e.logEntry.index),1)):vn("",!0),e.logEntry.payloadDec?(an(),cn("div",lp,[cp,fn(s,{dec:e.logEntry.payloadDec,hex:e.logEntry.payloadHex},null,8,["dec","hex"])])):vn("",!0)])};var up=No({name:"ActivityError",props:{logEntry:{required:!0,type:Object}},setup:()=>({getErrorDefinition:na})});const dp={class:"py-2 border-b border-gray-800 last:border-b-0"},pp={key:0,class:"text-red-500 mr-4"},hp={key:1,class:"text-red-500 mr-2"},fp={class:"text-red-500"};up.render=function(e,t,n,o,r,i){return an(),cn("div",dp,[e.logEntry.requestId?(an(),cn("strong",pp,"Request "+l(e.logEntry.requestId),1)):vn("",!0),e.logEntry.errorCode?(an(),cn("strong",hp,"Error Code "+l(e.logEntry.errorCode),1)):vn("",!0),fn("span",fp,l(e.logEntry.message)+" "+l(e.logEntry.errorCode&&e.getErrorDefinition(e.logEntry.errorCode).description),1)])};var Lp=No({name:"RequestLogTableRow",components:{LogMidi:Id,LogRequest:Od,LogInfo:op,LogError:up},props:{logEntry:{required:!0,type:Object}},setup:()=>({LogType:Vc})});const mp={class:"w-2/12 text-right"},gp={class:"w-8/12"};Lp.render=function(e,t,n,o,r,i){const s=Zt("LogError"),a=Zt("LogRequest"),c=Zt("LogInfo"),u=Zt("LogMidi");return an(),cn("tr",{class:["table-row",{"text-red-500":e.logEntry.type===e.LogType.Error}]},[fn("td",mp,l(e.logEntry.timeString),1),fn("td",gp,[e.logEntry.type===e.LogType.Error?fn(s,{key:0,"log-entry":e.logEntry},null,8,["log-entry"]):e.logEntry.requestId&&e.logEntry.type===e.LogType.Request?fn(a,{key:1,"log-entry":e.logEntry,"request-id":e.logEntry.requestId},null,8,["log-entry","request-id"]):e.logEntry.type===e.LogType.Info?fn(c,{key:2,"log-entry":e.logEntry},null,8,["log-entry"]):e.logEntry.type===e.LogType.Midi?fn(u,{key:3,"log-entry":e.logEntry},null,8,["log-entry"]):vn("",!0)])],2)};var vp=No({name:"RequestLogTable",components:{RequestLogTableRow:Lp},setup:()=>({stack:$u.stack})});const bp={key:0,class:"table-auto mb-0 request-table"},yp=fn("thead",{class:"table-head"},[fn("tr",{class:"text-left"},[fn("th",{class:"w-1/12 text-right"},"Time"),fn("th",{class:"w-8/12"},"Event")])],-1),Ip={class:"table-body"};vp.render=function(e,t,n,o,r,i){const s=Zt("RequestLogTableRow");return e.stack.length?(an(),cn("table",bp,[yp,fn("tbody",Ip,[(an(!0),cn(en,null,Ao(e.stack,e=>(an(),cn(s,{key:e.id,"log-entry":e},null,8,["log-entry"]))),128))])])):vn("",!0)};var Ep=No({name:"RequestLog",components:{RequestLogTable:vp},setup:()=>({clear:()=>{$u.clearRequestLog(),Object.keys(Kc.value).forEach(e=>{const t=Number(e),n=Kc.value[t];[cs.Done,cs.Error].includes(n.state)&&delete Kc.value[t]})},LogType:Vc,LogFilter:$c,...$u})});const Cp={class:"request-log section"},wp={class:"section-heading clearfix"},Sp={class:"section-heading-inner"},kp=fn("span",{class:"mr-6"},"Activity",-1),xp={key:1,class:"float-right mt-1 clearfix"},_p={class:"inline-block mr-6"},Mp=mn(" hex "),Tp={class:"request-log-main"};Ep.render=function(e,t,n,o,r,i){const s=Zt("FormToggle"),a=Zt("RequestLogTable");return an(),cn("div",Cp,[fn("div",wp,[fn("h3",Sp,[kp,fn(s,{class:"mr-8",value:e.showRequestLog,onChanged:e.toggleLog},null,8,["value","onChanged"]),e.showRequestLog&&e.stack.length?(an(),cn("button",{key:0,class:"btn btn-xs mr-6",onClick:t[1]||(t[1]=(...t)=>e.clear(...t))}," clear ")):vn("",!0),e.showRequestLog?(an(),cn("span",xp,[fn("span",_p,[fn(s,{value:e.showHexValues,class:"toggle-sm labeled",onChanged:e.toggleHexValues},{default:$t(()=>[Mp]),_:1},8,["value","onChanged"])]),(an(!0),cn(en,null,Ao(e.LogFilter,(t,n)=>(an(),cn("span",{key:n,class:"inline-block ml-2"},[fn(s,{value:e.logFilter[t],class:"toggle-sm labeled",onChanged:()=>e.toggleLogFilter(t)},{default:$t(()=>[mn(l(t),1)]),_:2},1032,["value","onChanged"])]))),128))])):vn("",!0)])]),fn("div",Tp,[e.showRequestLog?fn(a,{key:0,class:"w-full"}):vn("",!0)])])};var Rp=No({name:"DeviceNavItem",props:{block:{type:Number,required:!0},params:{type:Object,default:void 0}},setup(e){const{title:t,iconComponent:n,routeName:o}=yc[e.block],{numberOfComponents:r}=md,{highlights:i}=$u,s=Ro(()=>(e=>{if(!e)return null;let t=null;return Object.keys(e).forEach(n=>{t=e[n]>t?e[n]:t}),t})(i.value[e.block])),a=Ro(()=>jp.currentRoute.value.matched.some(e=>e.name===o));return{...ia(s),numberOfComponents:r,active:a,title:t,iconComponent:n,routeName:o}}});const Np={class:"icon-wrapper"},Dp={key:0,class:"icon-label"},Ap={class:"lg:inline-block text-sm label"},Op=fn("br",null,null,-1);Rp.render=function(e,t,n,o,r,i){const s=Zt("router-link");return an(),cn(s,{to:{name:e.routeName,params:e.params},class:{active:e.active,[e.routeName]:!0,"btn-highlight":e.isHighlighted}},{default:$t(()=>[fn("span",Np,[(an(),cn(Yt(e.iconComponent))),e.numberOfComponents[e.block]?(an(),cn("span",Dp,l(e.numberOfComponents[e.block]),1)):vn("",!0)]),fn("span",Ap,l(e.title),1),Op]),_:1},8,["to","class"])};var Pp=No({name:"DeviceNav",components:{DeviceNavItem:Rp},setup(){const{outputId:e,isConnected:t}=md;return{BlockMap:yc,isConnected:t,outputId:e}}});const Bp={key:0,class:"device-nav"};Pp.render=function(e,t,n,o,r,i){const s=Zt("DeviceNavItem");return e.isConnected?(an(),cn("div",Bp,[(an(!0),cn(en,null,Ao(Object.values(e.BlockMap),t=>(an(),cn(s,{key:"block-"+t.block,class:"item clearfix",block:t.block,params:{outputId:e.outputId}},null,8,["block","params"]))),128))])):vn("",!0)};var Fp=No({name:"Device",components:{RequestLog:Ep,DeviceNav:Pp},setup(){const{connectDevice:e,isConnected:t,isConnecting:n,isSystemOperationRunning:o,systemOperationPercentage:r,isBootloaderMode:i}=md;return An(async()=>{try{if(await e(jp.currentRoute.value.params.outputId),i.value)return jp.push({name:"device-firmware-update"})}catch(e){Hu.error(e)}}),{isConnected:t,isConnecting:n,isBootloaderMode:i,isSystemOperationRunning:o,systemOperationPercentage:r}}});const Up={key:1,class:"relative"};Fp.render=function(e,t,n,o,r,i){const s=Zt("SpinnerOverlay"),a=Zt("Hero"),l=Zt("DeviceNav"),c=Zt("router-view"),u=Zt("ProgressBar"),d=Zt("RequestLog");return an(),cn(en,null,[e.isConnecting?fn(a,{key:0,custom:"h-64 relative"},{default:$t(()=>[fn(s)]),_:1}):e.isConnected?(an(),cn("div",Up,[e.isBootloaderMode?vn("",!0):fn(l,{key:0}),fn(c),e.isSystemOperationRunning&&Number.isInteger(e.systemOperationPercentage)?fn(u,{key:1,percentage:e.systemOperationPercentage},null,8,["percentage"]):e.isSystemOperationRunning?fn(s,{key:2}):vn("",!0)])):fn(a,{key:2,custom:"h-64",title:"No WebMidi device found."}),fn(d)],64)};var Gp=No({name:"DeviceSelect",setup:()=>(An(()=>{Gc.assignInputs(),Gc.startMidiConnectionWatcher(),md.closeConnection()}),{outputs:Gc.outputs})});const Vp={class:"surface-neutral border px-8 pt-6 rounded"},qp=fn("br",null,null,-1);Gp.render=function(e,t,n,o,r,i){const s=Zt("Hero"),a=Zt("router-link");return e.outputs.length?e.outputs.length>1?fn(s,{key:1,custom:"h-64",title:"Multiple OpenDeck boards detected. Please connect one board at the time in\n order to use configurator."}):fn(s,{key:2,custom:"py-24"},{default:$t(()=>[fn("div",Vp,[(an(!0),cn(en,null,Ao(e.outputs,(t,n)=>(an(),cn(a,{key:t.id,to:{name:"device",params:{outputId:t.id}},class:["block mb-6 cursor-pointer",{"rounded-t":0===n,"rounded-b":n===e.outputs.length-1,"border-gray-400 border-b":n[fn("span",null,l(t.manufacturer||"unknown manufacturer"),1),qp,fn("strong",null,l(t.name),1)]),_:2},1032,["to","class"]))),128))])]),_:1}):fn(s,{key:0,custom:"h-64",title:"No OpenDeck board found. Please connect the board in order to use the\n interface."})};const $p=[{name:"home",path:"/",component:Gp},{path:"/device/:outputId",name:"device",component:Fp,redirect:{name:"device-global"},children:Ec}];var Hp;const jp=function(e){const t=Qr(e.routes,e);let n=e.parseQuery||Li,o=e.stringifyQuery||mi,{scrollBehavior:r}=e,i=e.history;const s=vi(),a=vi(),l=vi(),c=Ke(Pr,!0);let u=Pr;ur&&r&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=pr.bind(null,e=>""+e),p=pr.bind(null,hi),h=pr.bind(null,fi);function f(e,r){if(r={...r||c.value},"string"==typeof e){let o=Lr(n,e,r.path),s=t.resolve({path:o.path},r),a=i.createHref(o.fullPath);return dr(o,s,{params:h(s.params),redirectedFrom:void 0,href:a})}let s;"path"in e?s=dr({},e,{path:Lr(n,e.path,r.path).path}):(s=dr({},e,{params:p(e.params)}),r.params=p(r.params));let a=t.resolve(s,r);const l=di(e.hash||"").replace(li,"{").replace(ui,"}").replace(si,"^");a.params=d(h(a.params));const u=function(e,t){let n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,dr({},e,{hash:l,path:a.path}));let f=i.createHref(u);return dr({fullPath:u,hash:l,query:o===mi?gi(e.query):e.query},a,{redirectedFrom:void 0,href:f})}function L(e){return"string"==typeof e?{path:e}:dr({},e)}function m(e,t){if(u!==e)return Ur(8,{from:t,to:e})}function g(e){return v(e)}function v(e,t){const n=u=f(e),r=c.value,i=e.state,s=e.force,a=!0===e.replace,l=n.matched[n.matched.length-1];if(l&&l.redirect){const{redirect:e}=l;let o=L("function"==typeof e?e(n):e);return v(dr({query:n.query,hash:n.hash,params:n.params},o,{state:i,force:s,replace:a}),t||n)}const d=n;let p;return d.redirectedFrom=t,!s&&function(e,t,n){let o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&gr(t.matched[o],n.matched[r])&&vr(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,r,n)&&(p=Ur(16,{to:d,from:r}),R(r,r,!0,!1)),(p?Promise.resolve(p):y(d,r)).catch(e=>Gr(e,14)?e:M(e)).then(e=>{if(e){if(Gr(e,2))return v(dr(L(e.to),{state:i,force:s,replace:a}),t||d)}else e=E(d,r,!0,a,i);return I(d,r,e),e})}function b(e,t){const n=m(e,t);return n?Promise.reject(n):Promise.resolve()}function y(e,t){let n;n=yi(t.matched.filter(t=>e.matched.indexOf(t)<0).reverse(),"beforeRouteLeave",e,t);const[o,r]=xi(e,t);for(const r of o)for(const o of r.leaveGuards)n.push(bi(o,e,t));const i=b.bind(null,e,t);return n.push(i),ki(n).then(()=>{n=[];for(const o of s.list())n.push(bi(o,e,t));return n.push(i),ki(n)}).then(()=>{n=yi(e.matched.filter(e=>t.matched.indexOf(e)>-1),"beforeRouteUpdate",e,t);for(const o of r)for(const r of o.updateGuards)n.push(bi(r,e,t));return n.push(i),ki(n)}).then(()=>{n=[];for(const o of e.matched)if(o.beforeEnter&&t.matched.indexOf(o)<0)if(Array.isArray(o.beforeEnter))for(const r of o.beforeEnter)n.push(bi(r,e,t));else n.push(bi(o.beforeEnter,e,t));return n.push(i),ki(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=yi(e.matched.filter(e=>t.matched.indexOf(e)<0),"beforeRouteEnter",e,t),n.push(i),ki(n))).then(()=>{n=[];for(const o of a.list())n.push(bi(o,e,t));return n.push(i),ki(n)}).catch(e=>Gr(e,8)?e:Promise.reject(e))}function I(e,t,n){for(const o of l.list())o(e,t,n)}function E(e,t,n,o,r){const s=m(e,t);if(s)return s;const[a]=xi(e,t);for(const e of a)e.leaveGuards=[],e.updateGuards=[],e.instances={},e.enterCallbacks={};const l=t===Pr,u=ur?history.state:{};n&&(o||l?i.replace(e.fullPath,dr({scroll:l&&u&&u.scroll},r)):i.push(e.fullPath,r)),c.value=e,R(e,t,n,l),T()}let C;function w(){C=i.listen((e,t,n)=>{const o=f(e);u=o;const r=c.value;var s,a;ur&&(s=_r(r.fullPath,n.delta),a=kr(),Mr.set(s,a)),y(o,r).catch(e=>Gr(e,12)?e:Gr(e,2)?(n.delta&&i.go(-n.delta,!1),v(e.to,o).catch(hr),Promise.reject()):(n.delta&&i.go(-n.delta,!1),M(e))).then(e=>{(e=e||E(o,r,!1))&&n.delta&&i.go(-n.delta,!1),I(o,r,e)}).catch(hr)})}let S,k,x=vi(),_=vi();function M(e){return T(e),_.list().forEach(t=>t(e)),Promise.reject(e)}function T(e){S||(S=!0,w(),x.list().forEach(([t,n])=>e?n(e):t()),x.reset())}function R(e,t,n,o){if(!ur||!r)return Promise.resolve();let i=!n&&function(e){const t=Mr.get(e);return Mr.delete(e),t}(_r(e.fullPath,0))||(o||!n)&&history.state&&history.state.scroll||null;return It().then(()=>r(e,t,i)).then(e=>e&&xr(e)).catch(M)}function N(e){return new Promise((t,n)=>{let o=_.add(e=>{o(),r(),n(e)}),r=l.add((e,n,i)=>{o(),r(),t(i)});i.go(e)})}const D=new Set;return{currentRoute:c,addRoute:function(e,n){let o,r;return Or(e)?(o=t.getRecordMatcher(e),r=n):r=e,t.addRoute(r,o)},removeRoute:function(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)},hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map(e=>e.record)},resolve:f,options:e,push:g,replace:function(e){return g(dr(L(e),{replace:!0}))},go:N,back:()=>N(-1),forward:()=>N(1),beforeEach:s.add,beforeResolve:a.add,afterEach:l.add,onError:_.add,isReady:function(){return S&&c.value!==Pr?Promise.resolve():new Promise((e,t)=>{x.add([e,t])})},install(e){e.component("RouterLink",Ei),e.component("RouterView",Si),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{get:()=>Je(c)}),ur&&!k&&c.value===Pr&&(k=!0,g(i.location).catch(e=>{}));const t={};for(let e in Pr)t[e]=Ro(()=>c.value[e]);e.provide(lr,this),e.provide(cr,Ge(t));let n=e.unmount;D.add(e),e.unmount=function(){D.delete(e),D.size<1&&(C(),c.value=Pr,k=!1,S=!1),n.call(this,arguments)}}}}({history:((Hp=location.host&&Hp||location.pathname).indexOf("#")<0&&(Hp+="#"),Ar(Hp)),routes:[...$p]});var zp=No({name:"Chevron",props:{type:{type:String,default:"left",validate:e=>["left","right"].includes(e)}}});const Wp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Qp={key:0,d:"M12.95 10.707l.707-.707L8 4.343 6.586 5.757 10.828 10l-4.242 4.243L8 15.657l4.95-4.95z"},Zp={key:1,d:"M7.05 9.293L6.343 10 12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z"};zp.render=function(e,t,n,o,r,i){return an(),cn("svg",Wp,["right"===e.type?(an(),cn("path",Qp)):(an(),cn("path",Zp))])};var Xp=No({name:"Hero",props:{title:{type:String,default:null},custom:{type:String,default:""}}});const Yp={class:"max-w-sm mx-auto flex-1 align-middle"};Xp.render=function(e,t,n,o,r,i){return an(),cn("div",{class:["flex justify-center items-center surface-elevated border-b text-center",e.custom]},[qt(e.$slots,"default",{},()=>[fn("h3",Yp,l(e.title),1)])],2)};var Kp=No({name:"Button",props:{disabled:{default:!1,type:Boolean}}});Kp.render=function(e,t,n,o,r,i){return an(),cn("button",{disabled:e.disabled,class:"btn"},[qt(e.$slots,"default")],8,["disabled"])};var Jp=No({name:"ButtonLink",props:{to:{required:!0,type:[Object,Boolean]}}});Jp.render=function(e,t,n,o,r,i){const s=Zt("router-link");return an(),cn(s,{to:e.to,class:"btn"},{default:$t(()=>[qt(e.$slots,"default")]),_:3},8,["to"])};var eh=No({name:"Section",props:{title:{type:String,default:null},showContent:{type:Boolean,default:!0},wide:{type:Boolean,default:!1}}});const th={key:0,class:"section-heading"},nh={class:"section-heading-inner"},oh={key:0,class:"section-content"};eh.render=function(e,t,n,o,r,i){return an(),cn("div",{class:["section",{"section-wide":!!e.wide}]},[qt(e.$slots,"title",{},()=>[e.title?(an(),cn("h3",th,[fn("div",nh,l(e.title),1)])):vn("",!0)]),e.showContent?(an(),cn("div",oh,[qt(e.$slots,"default")])):vn("",!0)],2)};var rh=No({name:"Spinner",props:{name:{default:"",type:String},type:{default:"number",type:String}}});const ih=Qt("data-v-1e6cca72");zt("data-v-1e6cca72");const sh={class:"spinner"},ah=fn("div",{class:"bounce1"},null,-1),lh=fn("div",{class:"bounce2"},null,-1),ch=fn("div",{class:"bounce3"},null,-1);Wt();const uh=ih((function(e,t,n,o,r,i){return an(),cn("div",sh,[ah,lh,ch])}));rh.render=uh,rh.__scopeId="data-v-1e6cca72";var dh=No({name:"Siblinks",props:{current:{type:Number,required:!0},total:{type:Number,default:0},paramKey:{type:String,required:!0},params:{type:Object,default:void 0}}});const ph=fn("small",null,"previous",-1),hh=fn("small",null,"next",-1);dh.render=function(e,t,n,o,r,i){const s=Zt("Chevron"),a=Zt("router-link");return an(),cn(en,null,[e.total&&e.current>0?fn(a,{key:0,class:["ml-6",{"cursor-pointer":e.current>0,"yellow-700":0===e.current}],to:{params:{...e.params,[e.paramKey]:e.current-1}}},{default:$t(()=>[fn(s,{type:"left",class:"inline fill-current h-6 w-6"}),ph]),_:1},8,["class","to"]):vn("",!0),e.total&&e.current[hh,fn(s,{type:"right",class:"inline fill-current h-6 w-6"})]),_:1},8,["class","to"]):vn("",!0)],64)};var fh=No({name:"ProgressBar",props:{percentage:{type:Number,default:0}}});const Lh={class:"absolute flex inset-0 bg-gray-900"},mh={class:"flex-1 rounded h-6 top-auto self-center opacity-100 justify-center mx-auto max-w-sm bg-gray-600"};fh.render=function(e,t,n,o,r,i){return an(),cn("div",Lh,[fn("div",mh,[fn("div",{class:"flex-1 h-6 text-xs rounded text-center bg-yellow-500 text-gray-800 leading-6",style:{width:e.percentage+"%"}},l(e.percentage)+"% ",5)])])};var gh=No({name:"SpinnerOverlay"});const vh={class:"absolute flex inset-0 opacity-75 bg-gray-900"};gh.render=function(e,t,n,o,r,i){const s=Zt("Spinner");return an(),cn("div",vh,[fn(s,{class:"self-center"})])};const bh=e=>t=>Number(t)t=>Number(t)>e?"Maximum value is "+e:null;var Ih=No({name:"FormSelect",props:{value:{default:"",type:[String,Number]},options:{required:!0,type:[Array,Function]}},setup(e,{emit:t}){const n=Xe(String(e.value)),o=e.options&&"function"==typeof e.options?Ro(()=>{const t=e.options();return n.value=`${String(e.value)}-${t.map(e=>e.value)}`,t}):e.options;return{keyHash:n,emit:t,optionsArray:o}}});Ih.render=function(e,t,n,o,r,i){return an(),cn("select",{key:e.keyHash,class:"form-select mt-1 py-1 text-sm block w-full max-w-sm",value:e.value,onChange:t[1]||(t[1]=t=>e.emit("changed",t.target.value))},[(an(!0),cn(en,null,Ao(e.optionsArray,(e,t)=>(an(),cn("option",{key:t,value:e.value},l(e.text),9,["value"]))),128))],40,["value"])};var Eh=No({name:"FormToggle",props:{value:{default:0,type:[Boolean,Number]}},emits:["changed"],setup(e,{emit:t}){const n=Ro(()=>!!e.value);return{toggle:()=>t("changed",n.value?0:1),isChecked:n}}});const Ch=fn("span",{class:"toggle-track"},null,-1);Eh.render=function(e,t,n,o,r,i){return an(),cn("span",{class:["toggle",{active:e.isChecked}]},[fn("label",null,[fn("input",{type:"checkbox",checked:e.isChecked,class:"toggle-checkbox",onChange:t[1]||(t[1]=(...t)=>e.toggle(...t))},null,40,["checked"]),Ch]),fn("span",{class:"toggle-label",onClick:t[2]||(t[2]=(...t)=>e.toggle(...t))},[qt(e.$slots,"default")])],2)};var wh=No({name:"FormInput",props:{value:{default:"",type:[String,Number]},name:{default:"",type:String},placeholder:{default:"",type:String},type:{default:"number",type:String}},setup:(e,{emit:t})=>({emit:t})});wh.render=function(e,t,n,o,r,i){return an(),cn("input",{value:e.value,class:"form-input mt-1 py-1 text-sm block w-24",type:e.type,name:e.name,placeholder:e.placeholder,onChange:t[1]||(t[1]=t=>e.emit("changed",t.target.value))},null,40,["value","type","name","placeholder"])};var Sh=No({name:"FormErrorDisplay",props:{errors:{required:!0,type:Array}}});const kh={class:"errors"};Sh.render=function(e,t,n,o,r,i){return an(),cn("div",kh,[(an(!0),cn(en,null,Ao(e.errors,(e,t)=>(an(),cn("div",{key:t},l(e),1))),128))])};const xh=e=>{const t=[e=>null==e?"Value is required":null];switch(e.component){case _i.Toggle:t.push(bh(0),yh(1));break;case _i.Input:if(void 0!==e.min&&t.push(bh(e.min)),void 0!==e.max){let n=e.max2Byte&&md.showMsbControls?e.max2Byte:e.max;t.push(yh(n))}break;case _i.Select:e.options&&Array.isArray(e.options)&&t.push((n=e.options.map(e=>e.value),e=>n.includes(Number(e))?null:"Invalid value "+e));break;default:throw new Error(`Unknown component type ${e.component} for ${e.key}`)}var n;return t};var _h=No({name:"FormField",components:{FormSelect:Ih,FormInput:wh,FormToggle:Eh,FormErrorDisplay:Sh},props:{value:{default:null,type:[String,Number]},fieldDefinition:{type:Object,required:!0},index:{type:Number,default:void 0},simpleLayout:{type:Boolean,default:!1}},emits:["modified"],setup(e,{emit:t}){const{fieldDefinition:n}=tt(e),{component:o,key:r,section:i,label:s,helpText:a,isMsb:l,isLsb:c,min:u,max:d,max2Byte:p,options:h,onLoad:f}=n.value,L=e.fieldDefinition.settingIndex,m=Ro(()=>md.isControlDisabled(e.fieldDefinition)),g=tt(e).value,v=xh(e.fieldDefinition),{input:b,errors:y,onValueChange:I}=((e,t,n)=>{const o=Xe(e.value),r=Xe([]),i=e=>{o.value=e,r.value=(t||[]).map(t=>t(e)).filter(e=>!!e),r.value.length||n(e)};return io(e,i),{input:o,errors:r,onValueChange:i}})(g,v,n=>{Number(n)!==g.value&&t("modified",{key:r,value:Number(n),section:i,settingIndex:L,index:e.index,onLoad:f})}),E={label:s,helpText:a,name:r};o===_i.Select&&(E.options=h);const{showMsbControls:C}=md;return{fieldComponent:e.fieldDefinition.component,showMsbControls:C,componentProps:E,emit:t,input:b,errors:y,onValueChange:I,label:s,helpText:a,isDisabled:m,isMsb:l,isLsb:c,min:u,max:d,max2Byte:p,ControlDisableType:Xc}}});const Mh={class:"label"},Th={key:0,class:"instructions"},Rh={key:1,class:"error-message text-red-500"},Nh=mn(" Not supported on this device. "),Dh=mn(" Not supported on this firmware. "),Ah=mn(" The UART interface on board required for this peripheral is already taken by another peripheral. "),Oh=mn(" CDC interface on board required for this peripheral is already taken by another peripheral. "),Ph={key:2,class:"help-text"};_h.render=function(e,t,n,o,r,i){const s=Zt("FormErrorDisplay");return!e.isMsb||e.showMsbControls?(an(),cn("div",{key:0,class:["form-field",{error:e.errors.length}]},[fn("label",Mh,[mn(l(!e.showMsbControls&&e.isLsb?e.label.replace("(LSB)","").replace("LSB",""):e.label)+" ",1),e.isDisabled||!e.min&&!e.max?vn("",!0):(an(),cn("small",Th,l(e.min)+" - "+l(!e.showMsbControls&&e.max2Byte||e.max),1))]),e.isDisabled?(an(),cn("p",Rh,[e.isDisabled===e.ControlDisableType.NotSupported?(an(),cn(en,{key:0},[Nh],64)):vn("",!0),e.isDisabled===e.ControlDisableType.MissingIndex?(an(),cn(en,{key:1},[Dh],64)):vn("",!0),e.isDisabled===e.ControlDisableType.UartInterfaceAllocated?(an(),cn(en,{key:2},[Ah],64)):vn("",!0),e.isDisabled===e.ControlDisableType.CdcInterfaceAllocated?(an(),cn(en,{key:3},[Oh],64)):vn("",!0)])):(an(),cn(Yt(e.fieldComponent),En({key:0,value:e.input},e.componentProps,{onChanged:e.onValueChange}),null,16,["value","onChanged"])),e.helpText&&!e.simpleLayout?(an(),cn("p",Ph,l(!e.showMsbControls&&e.helpText?e.helpText.replace("(LSB)","").replace("LSB",""):e.helpText),1)):vn("",!0),fn(s,{class:"error-message",errors:e.errors},null,8,["errors"])],2)):vn("",!0)};var Bh=No({name:"FormFileInput",props:{name:{default:"",type:String},label:{default:"",type:String},disabled:{default:!1,type:Boolean}},emits:["change"],setup:(e,{emit:t})=>({emit:t})});const Fh={class:""};Bh.render=function(e,t,n,o,r,i){return an(),cn("label",{class:["btn items-center",{disabled:e.disabled}]},[fn("span",Fh,l(e.label),1),fn("input",{class:"hidden",type:"file",name:e.name,disabled:e.disabled,onChange:t[1]||(t[1]=t=>e.emit("change",t.target.files))},null,40,["name","disabled"])],2)};var Uh={Chevron:zp,Hero:Xp,Button:Kp,ButtonLink:Jp,Section:eh,Spinner:rh,Siblinks:dh,SpinnerOverlay:gh,FormField:_h,FormToggle:Eh,FormFileInput:Bh,ProgressBar:fh},Gh=No({name:"DeviceSettings",props:{block:{type:Number,required:!0},title:{type:String,default:"Global"}},setup:e=>({...ra(e.block,is.Setting)})});const Vh={key:0,class:"absolute flex inset-0 opacity-75 bg-gray-900"},qh={class:"form-grid"};Gh.render=function(e,t,n,o,r,i){const s=Zt("Spinner"),a=Zt("FormField"),l=Zt("Section");return an(),cn("form",{class:"relative flex flex-wrap flex-grow",novalidate:"",onSubmit:t[1]||(t[1]=tr(()=>{},["prevent"]))},[e.loading?(an(),cn("div",Vh,[fn(s,{class:"self-center"})])):vn("",!0),qt(e.$slots,"default",{form:e.formData,onSettingChange:e.onSettingChange,showField:e.showField},()=>[fn(l,{title:e.title,class:"w-full"},{default:$t(()=>[fn("div",qh,[(an(!0),cn(en,null,Ao(e.sections,t=>(an(),cn(en,null,[e.showField(t)?fn(a,{key:t.key,value:e.formData[t.key],"field-definition":t,onModified:e.onSettingChange},null,8,["value","field-definition","onModified"]):vn("",!0)],64))),256))])]),_:1},8,["title"])])],32)};var $h={Device:Fp,DeviceForm:fa,DeviceGrid:wa,DeviceGridButton:Ia,DeviceNav:Pp,DeviceNavItem:Rp,DeviceSettings:Gh},Hh=No({name:"App",setup(){const{outputId:e,boardName:t,firmwareVersion:n,activePreset:o}=md,r=Ro(()=>"home"===jp.currentRoute.value.name),{isConnected:i,isConnecting:s,isWebMidiSupported:a}=Gc,{supportedPresetsCount:l,isBootloaderMode:c}=md;return An(()=>{Gc.loadMidi()}),Fn(()=>{Gc.stopMidiConnectionWatcher()}),{isHomePage:r,outputId:e,isWebMidiSupported:a,isConnected:i,isConnecting:s,boardName:t,firmwareVersion:n,activePreset:o,supportedPresetsCount:l,isBootloaderMode:c}}});const jh={class:"app"},zh={class:"app-header"},Wh=mn(" OpenDeck Configurator "),Qh={key:0,class:"app-board-info"},Zh=mn("OpenDeck DFU mode"),Xh=fn("small",null,"Board",-1),Yh=fn("small",null,"Firmware",-1),Kh=fn("small",null,"Preset",-1),Jh={class:"app-main"},ef={class:"content"},tf=fn("div",{class:"max-w-screen-sm mx-auto px-4 pt-24 sm:px-6 lg:px-8"},[fn("p",{class:""},[mn(" This browser does not support WebMIDI."),fn("br"),mn("Please use a Chrome based browser: ")]),fn("p",{class:"mt-4"},[fn("a",{href:"https://www.google.com/chrome/index.html"},"Google Chrome"),fn("br"),fn("a",{href:"https://brave.com/"},"Brave"),fn("br"),fn("a",{href:"https://vivaldi.com/"},"Vivaldi"),fn("br"),fn("a",{href:"https://www.microsoft.com/en-us/edge"},"Microsoft Edge"),fn("br")])],-1),nf=fn("div",{class:"lg:text-center max-w-screen-xl mx-auto px-4 sm:px-6 lg:px-8"},[fn("p",null,"WebMidi connecting")],-1),of={class:"absolute flex inset-0 opacity-75 bg-gray-900"},rf=fn("div",{class:"lg:text-center max-w-screen-xl mx-auto px-4 pt-24 sm:px-6 lg:px-8"},[fn("p",null,"WebMidi failed to conect")],-1),sf=gn('
    ',1);Hh.render=function(e,t,n,o,r,i){const s=Zt("router-link"),a=Zt("Section"),c=Zt("Spinner"),u=Zt("router-view");return an(),cn("div",jh,[fn("nav",zh,[fn(s,{to:{name:"home"},class:"app-brand"},{default:$t(()=>[Wh]),_:1}),!e.isHomePage&&e.boardName?(an(),cn("span",Qh,[e.isBootloaderMode?(an(),cn(en,{key:0},[Zh],64)):(an(),cn(en,{key:1},[Xh,fn("strong",null,l(e.boardName),1),null!==e.firmwareVersion?(an(),cn(en,{key:0},[Yh,fn("strong",null,l(e.firmwareVersion),1)],64)):vn("",!0),e.supportedPresetsCount>1?(an(),cn(en,{key:1},[Kh,fn("strong",null,l(e.activePreset+1),1)],64)):vn("",!0)],64))])):vn("",!0)]),fn("div",Jh,[fn("div",ef,[e.isWebMidiSupported?e.isConnecting?fn(a,{key:1,class:"h-screen",title:"Establishing connection"},{default:$t(()=>[nf,fn("div",of,[fn(c,{class:"self-center"})])]),_:1}):e.isConnected?fn(u,{key:3}):fn(a,{key:2,class:"h-screen",title:"Problem connecting"},{default:$t(()=>[rf]),_:1}):fn(a,{key:0,class:"h-screen"},{default:$t(()=>[tf]),_:1})])]),sf])};const af=e=>Object.keys(e).forEach(t=>{lf.component(t,e[t])}),lf=((...e)=>{const t=(or||(or=no(nr))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(S(e)){return document.querySelector(e)}return e}(e);if(!o)return;const r=t._component;w(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const i=n(o);return o.removeAttribute("v-cloak"),o.setAttribute("data-v-app",""),i},t})(Hh);af(Uh),af($h),lf.use(jp),lf.mount("#app"); +const rr="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,ir=e=>rr?Symbol(e):"_vr_"+e,sr=ir("rvlm"),ar=ir("rvd"),lr=ir("r"),cr=ir("rl"),ur="undefined"!=typeof window;const dr=Object.assign;function pr(e,t){const n={};for(const o in t){const r=t[o];n[o]=Array.isArray(r)?r.map(e):e(r)}return n}let hr=()=>{};const fr=/\/$/;function Lr(e,t,n="/"){let o,r={},i="",s="";const a=t.indexOf("?"),l=t.indexOf("#",a>-1?a:0);return a>-1&&(o=t.slice(0,a),i=t.slice(a+1,l>-1?l:t.length),r=e(i)),l>-1&&(o=o||t.slice(0,l),s=t.slice(l,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/");let r,i,s=n.length-1;for(r=0;re===t[n]):1===e.length&&e[0]===t}var Ir,Er;function Cr(e){if(!e)if(ur){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(fr,"")}!function(e){e.pop="pop",e.push="push"}(Ir||(Ir={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(Er||(Er={}));const wr=/^[^#]+#/;function Sr(e,t){return e.replace(wr,"#")+t}const kr=()=>({left:window.pageXOffset,top:window.pageYOffset});function xr(e){let t;if("el"in e){let n=e.el;const o="string"==typeof n&&n.startsWith("#"),r="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.pageXOffset,null!=t.top?t.top:window.pageYOffset)}function _r(e,t){return(history.state?history.state.position-t:-1)+e}const Mr=new Map;let Tr=()=>location.protocol+"//"+location.host;function Rr(e,t){const{pathname:n,search:o,hash:r}=t;if(e.indexOf("#")>-1){let e=r.slice(1);return"/"!==e[0]&&(e="/"+e),mr(e,"")}return mr(n,e)+o+r}function Nr(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?kr():null}}function Dr(e){const{history:t,location:n}=window;let o={value:Rr(e,n)},r={value:t.state};function i(o,i,s){const a=Tr()+(e.indexOf("#")>-1&&n.search?n.pathname+n.search+"#":e)+o;try{t[s?"replaceState":"pushState"](i,"",a),r.value=i}catch(e){!function(e,...t){console.warn("[Vue Router warn]: "+e,...t)}("Error with push/replace State",e),n[s?"replace":"assign"](a)}}return r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:r,push:function(e,n){const r=dr({},t.state,{forward:e,scroll:kr()});i(r.current,r,!0),i(e,dr({},Nr(o.value,e,null),{position:r.position+1},n),!1),o.value=e},replace:function(e,n){i(e,dr({},t.state,Nr(r.value.back,e,r.value.forward,!0),n,{position:r.value.position}),!0),o.value=e}}}function Ar(e){const t=Dr(e=Cr(e)),n=function(e,t,n,o){let r=[],i=[],s=null;const a=({state:i})=>{const a=Rr(e,location),l=n.value,c=t.value;let u=0;if(i){if(n.value=a,t.value=i,s&&s===l)return void(s=null);u=c?i.position-c.position:0}else o(a);r.forEach(e=>{e(n.value,l,{delta:u,type:Ir.pop,direction:u?u>0?Er.forward:Er.back:Er.unknown})})};function l(){const{history:e}=window;e.state&&e.replaceState(dr({},e.state,{scroll:kr()}),"")}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",l),{pauseListeners:function(){s=n.value},listen:function(e){r.push(e);const t=()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)};return i.push(t),t},destroy:function(){for(const e of i)e();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",l)}}}(e,t.state,t.location,t.replace);const o=dr({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:Sr.bind(null,e)},t,n);return Object.defineProperty(o,"location",{get:()=>t.location.value}),Object.defineProperty(o,"state",{get:()=>t.state.value}),o}function Or(e){return"string"==typeof e||"symbol"==typeof e}const Pr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Br=ir("nf");var Fr;function Ur(e,t){return dr(new Error,{type:e,[Br]:!0},t)}function Gr(e,t){return e instanceof Error&&Br in e&&(null==t||!!(e.type&t))}!function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(Fr||(Fr={}));const Vr={sensitive:!1,strict:!1,start:!0,end:!0},qr=/[.+*?^${}()[\]/\\]/g;function $r(e,t){let n=0;for(;nt.length?1===t.length&&80===t[0]?1:-1:0}function Hr(e,t){let n=0;const o=e.score,r=t.score;for(;n1&&("*"===a||"+"===a)&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):t("Invalid state to consume buffer"),c="")}function p(){c+=a}for(;l{i(p)}:hr}function i(e){if(Or(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(i),t.alias.forEach(i))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(i),e.alias.forEach(i))}}function s(e){let t=0;for(;t=0;)t++;n.splice(t,0,e),e.record.name&&!Xr(e)&&o.set(e.record.name,e)}return t=Kr({strict:!1,end:!0,sensitive:!1},t),e.forEach(e=>r(e)),{addRoute:r,resolve:function(e,t){let r,i,s,a={};if("name"in e&&e.name){if(r=o.get(e.name),!r)throw Ur(1,{location:e});s=r.record.name,a=dr(function(e,t){let n={};for(let o of t)o in e&&(n[o]=e[o]);return n}(t.params,r.keys.filter(e=>!e.optional).map(e=>e.name)),e.params),i=r.stringify(a)}else if("path"in e)i=e.path,r=n.find(e=>e.re.test(i)),r&&(a=r.parse(i),s=r.record.name);else{if(r=t.name?o.get(t.name):n.find(e=>e.re.test(t.path)),!r)throw Ur(1,{location:e,currentLocation:t});s=r.record.name,a=dr({},t.params,e.params),i=r.stringify(a)}const l=[];let c=r;for(;c;)l.unshift(c.record),c=c.parent;return{name:s,path:i,params:a,matched:l,meta:Yr(l)}},removeRoute:i,getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}function Zr(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(let o in e.components)t[o]="boolean"==typeof n?n:n[o];return t}function Xr(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Yr(e){return e.reduce((e,t)=>dr(e,t.meta),{})}function Kr(e,t){let n={};for(let o in e)n[o]=o in t?t[o]:e[o];return n}const Jr=/#/g,ei=/&/g,ti=/\//g,ni=/=/g,oi=/\?/g,ri=/%5B/g,ii=/%5D/g,si=/%5E/g,ai=/%60/g,li=/%7B/g,ci=/%7C/g,ui=/%7D/g;function di(e){return encodeURI(""+e).replace(ci,"|").replace(ri,"[").replace(ii,"]")}function pi(e){return di(e).replace(Jr,"%23").replace(ei,"%26").replace(ni,"%3D").replace(ai,"`").replace(li,"{").replace(ui,"}").replace(si,"^")}function hi(e){return function(e){return di(e).replace(Jr,"%23").replace(oi,"%3F")}(e).replace(ti,"%2F")}function fi(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}function Li(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let e=0;ee&&pi(e)):[o&&pi(o)];for(let e=0;enull==e?null:""+e):null==o?o:""+o)}return t}function vi(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e,reset:function(){e=[]}}}function bi(e,t,n,o,r){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((s,a)=>{const l=e=>{var l;!1===e?a(Ur(4,{from:n,to:t})):e instanceof Error?a(e):"string"==typeof(l=e)||l&&"object"==typeof l?a(Ur(2,{from:t,to:e})):(i&&o.enterCallbacks[r]===i&&"function"==typeof e&&i.push(e),s())};let c=Promise.resolve(e.call(o&&o.instances[r],t,n,l));e.length<3&&(c=c.then(l)),c.catch(e=>a(e))})}function yi(e,t,n,o){const r=[];for(const s of e)for(const e in s.components){let a=s.components[e];if("beforeRouteEnter"===t||s.instances[e])if("object"==typeof(i=a)||"displayName"in i||"props"in i||"__vccOpts"in i){const i=(a.__vccOpts||a)[t];i&&r.push(bi(i,n,o,s,e))}else{let i=a();i=i.catch(()=>null),r.push(()=>i.then(r=>{if(!r)return Promise.reject(new Error(`Couldn't resolve component "${e}" for the following record with path "${s.path}"`));const i=(a=r).__esModule||rr&&"Module"===a[Symbol.toStringTag]?r.default:r;var a;s.components[e]=i;const l=i[t];return l&&bi(l,n,o,s,e)()}))}}var i;return r}function Ii(e){const t=uo(lr),n=uo(cr),o=Ro(()=>t.resolve(Je(e.to))),r=Ro(()=>{let{matched:e}=o.value,{length:t}=e;const r=e[t-1];let i=n.matched;if(!r||!i.length)return-1;let s=i.findIndex(gr.bind(null,r));if(s>-1)return s;let a=Ci(e[t-2]);return t>1&&Ci(r)===a&&i[i.length-1].path!==a?i.findIndex(gr.bind(null,e[t-2])):s}),i=Ro(()=>r.value>-1&&function(e,t){for(let n in t){let o=t[n],r=e[n];if("string"==typeof o){if(o!==r)return!1}else if(!Array.isArray(r)||r.length!==o.length||o.some((e,t)=>e!==r[t]))return!1}return!0}(n.params,o.value.params)),s=Ro(()=>r.value>-1&&r.value===n.matched.length-1&&vr(n.params,o.value.params));return{route:o,href:Ro(()=>o.value.href),isActive:i,isExactActive:s,navigate:function(n={}){return function(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return;if(e.defaultPrevented)return;if(void 0!==e.button&&0!==e.button)return;if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}e.preventDefault&&e.preventDefault();return!0}(n)?t[Je(e.replace)?"replace":"push"](Je(e.to)):Promise.resolve()}}}const Ei=No({name:"RouterLink",props:{to:{type:[String,Object],required:!0},activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},setup(e,{slots:t,attrs:n}){const o=Ge(Ii(e)),{options:r}=uo(lr),i=Ro(()=>({[wi(e.activeClass,r.linkActiveClass,"router-link-active")]:o.isActive,[wi(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:o.isExactActive}));return()=>{const r=t.default&&t.default(o);return e.custom?r:Do("a",dr({"aria-current":o.isExactActive?e.ariaCurrentValue:null,onClick:o.navigate,href:o.href},n,{class:i.value}),r)}}});function Ci(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}let wi=(e,t,n)=>null!=e?e:null!=t?t:n;const Si=No({name:"RouterView",props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:n}){const o=uo(cr),r=uo(ar,0),i=Ro(()=>(e.route||o).matched[r]);co(ar,r+1),co(sr,i);const s=Xe();return()=>{const r=e.route||o,a=i.value,l=a&&a.components[e.name];if(!l)return n.default?n.default({Component:l,route:r}):null;const c=a.props[e.name],u=c?!0===c?r.params:"function"==typeof c?c(r):c:null,d=e.name,p=Do(l,dr({},u,t,{onVnodeMounted:()=>{a.instances[d]=s.value,(a.enterCallbacks[d]||[]).forEach(e=>e(s.value))},onVnodeUnmounted:()=>{a.instances[d]=null},ref:s}));return n.default?n.default({Component:p,route:r}):p}}});function ki(e){return e.reduce((e,t)=>e.then(()=>t()),Promise.resolve())}function xi(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let s=0;s{ds[e]={},ps[e]={itemsPerPage:16,currentPage:1}});const hs={outputId:null,input:null,output:null,isBootloaderMode:null,connectionState:null,connectionPromise:null,valueSize:null,valuesPerMessageRequest:null,boardName:null,firmwareFileName:null,firmwareVersion:null,bootLoaderSupport:!1,activePreset:null,supportedPresetsCount:null,numberOfComponents:[],unsupportedComponents:ds,isSystemOperationRunning:!1,systemOperationPercentage:null,viewSettings:ps},fs=Ge(hs);var Ls="object"==typeof process&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var ms={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},gs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function vs(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var bs=vs((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=ms,o=(t=e.exports={}).re=[],r=t.src=[],i=t.t={};let s=0;const a=(e,t,n)=>{const a=s++;Ls(a,t),i[e]=a,r[a]=t,o[a]=new RegExp(t,n?"g":void 0)};a("NUMERICIDENTIFIER","0|[1-9]\\d*"),a("NUMERICIDENTIFIERLOOSE","[0-9]+"),a("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),a("MAINVERSION",`(${r[i.NUMERICIDENTIFIER]})\\.(${r[i.NUMERICIDENTIFIER]})\\.(${r[i.NUMERICIDENTIFIER]})`),a("MAINVERSIONLOOSE",`(${r[i.NUMERICIDENTIFIERLOOSE]})\\.(${r[i.NUMERICIDENTIFIERLOOSE]})\\.(${r[i.NUMERICIDENTIFIERLOOSE]})`),a("PRERELEASEIDENTIFIER",`(?:${r[i.NUMERICIDENTIFIER]}|${r[i.NONNUMERICIDENTIFIER]})`),a("PRERELEASEIDENTIFIERLOOSE",`(?:${r[i.NUMERICIDENTIFIERLOOSE]}|${r[i.NONNUMERICIDENTIFIER]})`),a("PRERELEASE",`(?:-(${r[i.PRERELEASEIDENTIFIER]}(?:\\.${r[i.PRERELEASEIDENTIFIER]})*))`),a("PRERELEASELOOSE",`(?:-?(${r[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${r[i.PRERELEASEIDENTIFIERLOOSE]})*))`),a("BUILDIDENTIFIER","[0-9A-Za-z-]+"),a("BUILD",`(?:\\+(${r[i.BUILDIDENTIFIER]}(?:\\.${r[i.BUILDIDENTIFIER]})*))`),a("FULLPLAIN",`v?${r[i.MAINVERSION]}${r[i.PRERELEASE]}?${r[i.BUILD]}?`),a("FULL",`^${r[i.FULLPLAIN]}$`),a("LOOSEPLAIN",`[v=\\s]*${r[i.MAINVERSIONLOOSE]}${r[i.PRERELEASELOOSE]}?${r[i.BUILD]}?`),a("LOOSE",`^${r[i.LOOSEPLAIN]}$`),a("GTLT","((?:<|>)?=?)"),a("XRANGEIDENTIFIERLOOSE",r[i.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),a("XRANGEIDENTIFIER",r[i.NUMERICIDENTIFIER]+"|x|X|\\*"),a("XRANGEPLAIN",`[v=\\s]*(${r[i.XRANGEIDENTIFIER]})(?:\\.(${r[i.XRANGEIDENTIFIER]})(?:\\.(${r[i.XRANGEIDENTIFIER]})(?:${r[i.PRERELEASE]})?${r[i.BUILD]}?)?)?`),a("XRANGEPLAINLOOSE",`[v=\\s]*(${r[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${r[i.XRANGEIDENTIFIERLOOSE]})(?:${r[i.PRERELEASELOOSE]})?${r[i.BUILD]}?)?)?`),a("XRANGE",`^${r[i.GTLT]}\\s*${r[i.XRANGEPLAIN]}$`),a("XRANGELOOSE",`^${r[i.GTLT]}\\s*${r[i.XRANGEPLAINLOOSE]}$`),a("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),a("COERCERTL",r[i.COERCE],!0),a("LONETILDE","(?:~>?)"),a("TILDETRIM",`(\\s*)${r[i.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",a("TILDE",`^${r[i.LONETILDE]}${r[i.XRANGEPLAIN]}$`),a("TILDELOOSE",`^${r[i.LONETILDE]}${r[i.XRANGEPLAINLOOSE]}$`),a("LONECARET","(?:\\^)"),a("CARETTRIM",`(\\s*)${r[i.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",a("CARET",`^${r[i.LONECARET]}${r[i.XRANGEPLAIN]}$`),a("CARETLOOSE",`^${r[i.LONECARET]}${r[i.XRANGEPLAINLOOSE]}$`),a("COMPARATORLOOSE",`^${r[i.GTLT]}\\s*(${r[i.LOOSEPLAIN]})$|^$`),a("COMPARATOR",`^${r[i.GTLT]}\\s*(${r[i.FULLPLAIN]})$|^$`),a("COMPARATORTRIM",`(\\s*)${r[i.GTLT]}\\s*(${r[i.LOOSEPLAIN]}|${r[i.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",a("HYPHENRANGE",`^\\s*(${r[i.XRANGEPLAIN]})\\s+-\\s+(${r[i.XRANGEPLAIN]})\\s*$`),a("HYPHENRANGELOOSE",`^\\s*(${r[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${r[i.XRANGEPLAINLOOSE]})\\s*$`),a("STAR","(<|>)?=?\\s*\\*"),a("GTE0","^\\s*>=\\s*0.0.0\\s*$"),a("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}));const ys=/^[0-9]+$/,Is=(e,t)=>{const n=ys.test(e),o=ys.test(t);return n&&o&&(e=+e,t=+t),e===t?0:n&&!o?-1:o&&!n?1:eIs(t,e)};const{MAX_LENGTH:Cs,MAX_SAFE_INTEGER:ws}=ms,{re:Ss,t:ks}=bs,{compareIdentifiers:xs}=Es;class _s{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof _s){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>Cs)throw new TypeError(`version is longer than ${Cs} characters`);Ls("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?Ss[ks.LOOSE]:Ss[ks.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>ws||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ws||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ws||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}var Ms=_s;var Ts=(e,t,n)=>new Ms(e,n).compare(new Ms(t,n));var Rs=(e,t,n)=>Ts(e,t,n)>0,Ns=vs((function(e,t){e.exports=function(){function e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(o=e[Symbol.iterator]()).next.bind(o)}var o=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),r=(o.defaults,o.getDefaults,o.changeDefaults,/[&<>"']/),i=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g,h=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,L={},m=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){L[" "+e]||(m.test(e)?L[" "+e]=e+"/":L[" "+e]=y(e,"/",!0));var n=-1===(e=L[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(g,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(v,"$1")+t:e+t}function y(e,t,n){var o=e.length;if(0===o)return"";for(var r=0;r=0&&"\\"===n[r];)o=!o;return o?"|":" |"})).split(/ \|/),o=0;if(n.length>t)n.splice(t);else for(;n.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var o=t[t.length-1];if(o&&"paragraph"===o.type)return{raw:n[0],text:n[0].trimRight()};var r=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:N(r,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],o=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var o=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=o.length?e.slice(o.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:o}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:D(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var o,r=n.align.length;for(o=0;o ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,o,r,i,s,a,l,c=t[0],u=t[2],d=u.length>1,p=")"===u[u.length-1],h={type:"list",raw:c,ordered:d,start:d?+u.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),L=!1,m=f.length,g=0;g1||this.options.smartLists&&r!==u)&&(i=f.slice(g+1).join("\n"),h.raw=h.raw.substring(0,h.raw.length-i.length),g=m-1)),s=L||/\n\n(?!\s*$)/.test(n),g!==m-1&&(L="\n"===n.charAt(n.length-1),s||(s=L)),s&&(h.loose=!0),l=void 0,(a=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),h.items.push({type:"list_item",raw:c,task:a,checked:l,loose:s,text:n});return h}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):A(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:D(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var o,r=n.align.length;for(o=0;o/i.test(o[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(o[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(o[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:o[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):A(o[0]):o[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=O(t[2],"()");if(n>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,o).trim(),t[3]=""}var r=t[2],i="";if(this.options.pedantic){var s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);s?(r=s[1],i=s[3]):i=""}else i=t[3]?t[3].slice(1,-1):"";return P(t,{href:(r=r.trim().replace(/^<([\s\S]*)>$/,"$1"))?r.replace(this.rules.inline._escapes,"$1"):r,title:i?i.replace(this.rules.inline._escapes,"$1"):i},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var o=(n[2]||n[1]).replace(/\s+/g," ");if(!(o=t[o.toLowerCase()])||!o.href){var r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return P(n,o,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var o=this.rules.inline.strong.start.exec(e);if(o&&(!o[1]||o[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var r,i="**"===o[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(i.lastIndex=0;null!=(o=i.exec(t));)if(r=this.rules.inline.strong.middle.exec(t.slice(0,o.index+3)))return{type:"strong",raw:e.slice(0,r[0].length),text:e.slice(2,r[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var o=this.rules.inline.em.start.exec(e);if(o&&(!o[1]||o[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var r,i="*"===o[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(i.lastIndex=0;null!=(o=i.exec(t));)if(r=this.rules.inline.em.middle.exec(t.slice(0,o.index+2)))return{type:"em",raw:e.slice(0,r[0].length),text:e.slice(1,r[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),o=/[^ ]/.test(n),r=n.startsWith(" ")&&n.endsWith(" ");return o&&r&&(n=n.substring(1,n.length-1)),n=A(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,o,r=this.rules.inline.autolink.exec(e);if(r)return o="@"===r[2]?"mailto:"+(n=A(this.options.mangle?t(r[1]):r[1])):n=A(r[1]),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var o,r;if("@"===n[2])r="mailto:"+(o=A(this.options.mangle?t(n[0]):n[0]));else{var i;do{i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(i!==n[0]);o=A(n[0]),r="www."===n[1]?"http://"+o:o}return{type:"link",raw:n[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}},t.inlineText=function(e,t,n){var o,r=this.rules.inline.text.exec(e);if(r)return o=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):A(r[0]):r[0]:A(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:o}},e}(),F=S,U=C,G=k,V={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:F,table:F,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};V.def=U(V.def).replace("label",V._label).replace("title",V._title).getRegex(),V.bullet=/(?:[*+-]|\d{1,9}[.)])/,V.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,V.item=U(V.item,"gm").replace(/bull/g,V.bullet).getRegex(),V.list=U(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex(),V._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V._comment=//,V.html=U(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V.paragraph=U(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.blockquote=U(V.blockquote).replace("paragraph",V.paragraph).getRegex(),V.normal=G({},V),V.gfm=G({},V.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),V.gfm.nptable=U(V.gfm.nptable).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.gfm.table=U(V.gfm.table).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.pedantic=G({},V.normal,{html:U("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",V._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:F,paragraph:U(V.normal._paragraph).replace("hr",V.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var q={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:F,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:F,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};q.punctuation=U(q.punctuation).replace(/punctuation/g,q._punctuation).getRegex(),q._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",q._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",q.em.start=U(q.em.start).replace(/punctuation/g,q._punctuation).getRegex(),q.em.middle=U(q.em.middle).replace(/punctuation/g,q._punctuation).replace(/overlapSkip/g,q._overlapSkip).getRegex(),q.em.endAst=U(q.em.endAst,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.em.endUnd=U(q.em.endUnd,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.strong.start=U(q.strong.start).replace(/punctuation/g,q._punctuation).getRegex(),q.strong.middle=U(q.strong.middle).replace(/punctuation/g,q._punctuation).replace(/blockSkip/g,q._blockSkip).getRegex(),q.strong.endAst=U(q.strong.endAst,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.strong.endUnd=U(q.strong.endUnd,"g").replace(/punctuation/g,q._punctuation).getRegex(),q.blockSkip=U(q._blockSkip,"g").getRegex(),q.overlapSkip=U(q._overlapSkip,"g").getRegex(),q._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,q._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,q._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,q.autolink=U(q.autolink).replace("scheme",q._scheme).replace("email",q._email).getRegex(),q._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,q.tag=U(q.tag).replace("comment",V._comment).replace("attribute",q._attribute).getRegex(),q._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,q._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,q._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,q.link=U(q.link).replace("label",q._label).replace("href",q._href).replace("title",q._title).getRegex(),q.reflink=U(q.reflink).replace("label",q._label).getRegex(),q.reflinkSearch=U(q.reflinkSearch,"g").replace("reflink",q.reflink).replace("nolink",q.nolink).getRegex(),q.normal=G({},q),q.pedantic=G({},q.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:U(/^!?\[(label)\]\((.*?)\)/).replace("label",q._label).getRegex(),reflink:U(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q._label).getRegex()}),q.gfm=G({},q.normal,{escape:U(q.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),o+="&#"+n+";";return o}var Z=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||H,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:j.normal,inline:z.normal};this.options.pedantic?(t.block=j.pedantic,t.inline=z.pedantic):this.options.gfm&&(t.block=j.gfm,this.options.breaks?t.inline=z.breaks:t.inline=z.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,o,r,i=t.prototype;return i.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},i.blockTokens=function(e,t,n){var o,r,i,s;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(o=this.tokenizer.space(e))e=e.substring(o.raw.length),o.type&&t.push(o);else if(o=this.tokenizer.code(e,t))e=e.substring(o.raw.length),o.type?t.push(o):((s=t[t.length-1]).raw+="\n"+o.raw,s.text+="\n"+o.text);else if(o=this.tokenizer.fences(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.heading(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.nptable(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.hr(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.blockquote(e))e=e.substring(o.raw.length),o.tokens=this.blockTokens(o.text,[],n),t.push(o);else if(o=this.tokenizer.list(e)){for(e=e.substring(o.raw.length),i=o.items.length,r=0;r0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(a));)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,o))e=e.substring(i.raw.length),n=i.inLink,o=i.inRawBlock,t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,o)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,o)),t.push(i);else if(i=this.tokenizer.strong(e,a,r))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,o),t.push(i);else if(i=this.tokenizer.em(e,a,r))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,o),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,o),t.push(i);else if(i=this.tokenizer.autolink(e,Q))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,Q))){if(i=this.tokenizer.inlineText(e,o,W))e=e.substring(i.raw.length),r=i.raw.slice(-1),t.push(i);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(i.raw.length),t.push(i);return t},n=t,r=[{key:"rules",get:function(){return{block:j,inline:z}}}],(o=null)&&e(n.prototype,o),r&&e(n,r),t}(),X=o.defaults,Y=w,K=I,J=function(){function e(e){this.options=e||X}var t=e.prototype;return t.code=function(e,t,n){var o=(t||"").match(/\S*/)[0];if(this.options.highlight){var r=this.options.highlight(e,o);null!=r&&r!==e&&(n=!0,e=r)}return o?'
    '+(n?e:K(e,!0))+"
    \n":"
    "+(n?e:K(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,n,o){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,n){var o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=Y(this.options.sanitize,this.options.baseUrl,e)))return n;var o='"},t.image=function(e,t,n){if(null===(e=Y(this.options.sanitize,this.options.baseUrl,e)))return n;var o=''+n+'":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=o.defaults,oe=E,re=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new J,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,o,r,i,s,a,l,c,u,d,p,h,f,L,m,g,v,b,y="",I=e.length;for(n=0;n0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):L+=b),L+=this.parse(m.tokens,f),u+=this.renderer.listitem(L,v,g);y+=this.renderer.list(u,p,h);continue;case"html":y+=this.renderer.html(d.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1An error occurred:

    "+ae(e.message+"",!0)+"
    ";throw e}}return de.options=de.setOptions=function(e){return ie(de.defaults,e),ce(de.defaults),de},de.getDefaults=le,de.defaults=ue,de.use=function(e){var t=ie({},e);if(e.renderer&&function(){var n=de.defaults.renderer||new J,o=function(t){var o=n[t];n[t]=function(){for(var r=arguments.length,i=new Array(r),s=0;s=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof gs&&gs.global===gs?gs:void 0,i=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,i,s){var a=r.URL||r.webkitURL,l=document.createElement("a");i=i||e.name||"download",l.download=i,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):n(l.href)?t(e,i,s):o(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,i){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,i),r);else if(n(e))t(e,r,i);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){o(s)}))}}:function(e,n,o,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,o);var s="application/octet-stream"===e.type,a=/constructor/i.test(r.HTMLElement)||r.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&a)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var u=r.URL||r.webkitURL,d=u.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});r.saveAs=i.saveAs=i,e.exports=i}()}));const As=e=>({...tt(Ve(e.state)),...e.computed,...e.actions}),Os=e=>JSON.parse(localStorage.getItem(e)),Ps=(e,t)=>localStorage.setItem(e,JSON.stringify(t)),Bs=e=>parseInt(e,16),Fs=e=>Array.isArray(e)?e.map(e=>e.toString(16)):e.toString(16),Us=e=>Array.isArray(e)?e.map(e=>e.toString(16)).join(" "):e.toString(16),Gs=e=>Array.isArray(e)?e.join(" "):e,Vs=e=>{if(e.length%2!=0)throw new Error("CANNOT DECODE 2 BYTE VALUE: UNEVEN DATA VALUE LENGTH");const t=[];for(let n=0;n{1&e?t|=128:t&=-129;let n=e>>=1;return n<<=8,n|=t,n},$s=e=>{let t=e>>8&255,n=255&e;return t=t<<1&127,n>>7&1?t|=1:t&=-2,n&=127,[t,n]},Hs=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),js=(e,t)=>e&&t&&Math.abs(t.getTime()-e.getTime()),zs=e=>("0000"+e).slice(-2),Ws=e=>new Promise(t=>{setTimeout(t,e)});var Qs,Zs;(Zs=Qs||(Qs={})).Closed="closed",Zs.Pending="pending",Zs.Open="open";const Xs=Ge({connectionState:Qs.Closed,inputs:[],outputs:[],log:!0,isWebMidiSupported:!1});var Ys,Ks,Js=vs((function(e){!function(t){function n(){if(n.prototype._singleton)throw new Error("WebMidi is a singleton, it cannot be instantiated directly.");(n.prototype._singleton=this)._inputs=[],this._outputs=[],this._userHandlers={},this._stateChangeQueue=[],this._processingStateChange=!1,this._midiInterfaceEvents=["connected","disconnected"],this._nrpnBuffer=[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]],this._nrpnEventsEnabled=!0,this._nrpnTypes=["entry","increment","decrement"],this._notes=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],this._semitones={C:0,D:2,E:4,F:5,G:7,A:9,B:11},Object.defineProperties(this,{MIDI_SYSTEM_MESSAGES:{value:{sysex:240,timecode:241,songposition:242,songselect:243,tuningrequest:246,sysexend:247,clock:248,start:250,continue:251,stop:252,activesensing:254,reset:255,midimessage:0,unknownsystemmessage:-1},writable:!1,enumerable:!0,configurable:!1},MIDI_CHANNEL_MESSAGES:{value:{noteoff:8,noteon:9,keyaftertouch:10,controlchange:11,channelmode:11,nrpn:11,programchange:12,channelaftertouch:13,pitchbend:14},writable:!1,enumerable:!0,configurable:!1},MIDI_REGISTERED_PARAMETER:{value:{pitchbendrange:[0,0],channelfinetuning:[0,1],channelcoarsetuning:[0,2],tuningprogram:[0,3],tuningbank:[0,4],modulationrange:[0,5],azimuthangle:[61,0],elevationangle:[61,1],gain:[61,2],distanceratio:[61,3],maximumdistance:[61,4],maximumdistancegain:[61,5],referencedistanceratio:[61,6],panspreadangle:[61,7],rollangle:[61,8]},writable:!1,enumerable:!0,configurable:!1},MIDI_CONTROL_CHANGE_MESSAGES:{value:{bankselectcoarse:0,modulationwheelcoarse:1,breathcontrollercoarse:2,footcontrollercoarse:4,portamentotimecoarse:5,dataentrycoarse:6,volumecoarse:7,balancecoarse:8,pancoarse:10,expressioncoarse:11,effectcontrol1coarse:12,effectcontrol2coarse:13,generalpurposeslider1:16,generalpurposeslider2:17,generalpurposeslider3:18,generalpurposeslider4:19,bankselectfine:32,modulationwheelfine:33,breathcontrollerfine:34,footcontrollerfine:36,portamentotimefine:37,dataentryfine:38,volumefine:39,balancefine:40,panfine:42,expressionfine:43,effectcontrol1fine:44,effectcontrol2fine:45,holdpedal:64,portamento:65,sustenutopedal:66,softpedal:67,legatopedal:68,hold2pedal:69,soundvariation:70,resonance:71,soundreleasetime:72,soundattacktime:73,brightness:74,soundcontrol6:75,soundcontrol7:76,soundcontrol8:77,soundcontrol9:78,soundcontrol10:79,generalpurposebutton1:80,generalpurposebutton2:81,generalpurposebutton3:82,generalpurposebutton4:83,reverblevel:91,tremololevel:92,choruslevel:93,celestelevel:94,phaserlevel:95,databuttonincrement:96,databuttondecrement:97,nonregisteredparametercoarse:98,nonregisteredparameterfine:99,registeredparametercoarse:100,registeredparameterfine:101},writable:!1,enumerable:!0,configurable:!1},MIDI_NRPN_MESSAGES:{value:{entrymsb:6,entrylsb:38,increment:96,decrement:97,paramlsb:98,parammsb:99,nullactiveparameter:127},writable:!1,enumerable:!0,configurable:!1},MIDI_CHANNEL_MODE_MESSAGES:{value:{allsoundoff:120,resetallcontrollers:121,localcontrol:122,allnotesoff:123,omnimodeoff:124,omnimodeon:125,monomodeon:126,polymodeon:127},writable:!1,enumerable:!0,configurable:!1},octaveOffset:{value:0,writable:!0,enumerable:!0,configurable:!1}}),Object.defineProperties(this,{supported:{enumerable:!0,get:function(){return"requestMIDIAccess"in navigator}},enabled:{enumerable:!0,get:function(){return void 0!==this.interface}.bind(this)},inputs:{enumerable:!0,get:function(){return this._inputs}.bind(this)},outputs:{enumerable:!0,get:function(){return this._outputs}.bind(this)},sysexEnabled:{enumerable:!0,get:function(){return!(!this.interface||!this.interface.sysexEnabled)}.bind(this)},nrpnEventsEnabled:{enumerable:!0,get:function(){return!!this._nrpnEventsEnabled}.bind(this),set:function(e){return this._nrpnEventsEnabled=e,this._nrpnEventsEnabled}},nrpnTypes:{enumerable:!0,get:function(){return this._nrpnTypes}.bind(this)},time:{enumerable:!0,get:function(){return performance.now()}}})}var o=new n;function r(e){var t=this;this._userHandlers={channel:{},system:{}},this._midiInput=e,Object.defineProperties(this,{connection:{enumerable:!0,get:function(){return t._midiInput.connection}},id:{enumerable:!0,get:function(){return t._midiInput.id}},manufacturer:{enumerable:!0,get:function(){return t._midiInput.manufacturer}},name:{enumerable:!0,get:function(){return t._midiInput.name}},state:{enumerable:!0,get:function(){return t._midiInput.state}},type:{enumerable:!0,get:function(){return t._midiInput.type}}}),this._initializeUserHandlers(),this._midiInput.onmidimessage=this._onMidiMessage.bind(this)}function i(e){var t=this;this._midiOutput=e,Object.defineProperties(this,{connection:{enumerable:!0,get:function(){return t._midiOutput.connection}},id:{enumerable:!0,get:function(){return t._midiOutput.id}},manufacturer:{enumerable:!0,get:function(){return t._midiOutput.manufacturer}},name:{enumerable:!0,get:function(){return t._midiOutput.name}},state:{enumerable:!0,get:function(){return t._midiOutput.state}},type:{enumerable:!0,get:function(){return t._midiOutput.type}}})}n.prototype.enable=function(e,t){this.enabled||(this.supported?navigator.requestMIDIAccess({sysex:t}).then(function(t){var n,o=[],r=[];this.interface=t,this._resetInterfaceUserHandlers(),this.interface.onstatechange=function(e){o.push(e)};for(var i=t.inputs.values(),s=i.next();s&&!s.done;s=i.next())r.push(s.value.open());for(var a=t.outputs.values(),l=a.next();l&&!l.done;l=a.next())r.push(l.value.open());function c(){clearTimeout(n),this._updateInputsAndOutputs(),this.interface.onstatechange=this._onInterfaceStateChange.bind(this),"function"==typeof e&&e.call(this),o.forEach(function(e){this._onInterfaceStateChange(e)}.bind(this))}n=setTimeout(c.bind(this),200),Promise&&Promise.all(r).catch((function(e){})).then(c.bind(this))}.bind(this),function(t){"function"==typeof e&&e.call(this,t)}.bind(this)):"function"==typeof e&&e(new Error("The Web MIDI API is not supported by your browser.")))},n.prototype.disable=function(){if(!this.supported)throw new Error("The Web MIDI API is not supported by your browser.");this.interface&&(this.interface.onstatechange=void 0),this.interface=void 0,this._inputs=[],this._outputs=[],this._nrpnEventsEnabled=!0,this._resetInterfaceUserHandlers()},n.prototype.addListener=function(e,t){if(!this.enabled)throw new Error("WebMidi must be enabled before adding event listeners.");if("function"!=typeof t)throw new TypeError("The 'listener' parameter must be a function.");if(!(0<=this._midiInterfaceEvents.indexOf(e)))throw new TypeError("The specified event type is not supported.");return this._userHandlers[e].push(t),this},n.prototype.hasListener=function(e,t){if(!this.enabled)throw new Error("WebMidi must be enabled before checking event listeners.");if("function"!=typeof t)throw new TypeError("The 'listener' parameter must be a function.");if(!(0<=this._midiInterfaceEvents.indexOf(e)))throw new TypeError("The specified event type is not supported.");for(var n=0;n>4,i=15&e.data[0],s=1+i;if(1=o.MIDI_NRPN_MESSAGES.increment&&t<=o.MIDI_NRPN_MESSAGES.parammsb||t===o.MIDI_NRPN_MESSAGES.entrymsb||t===o.MIDI_NRPN_MESSAGES.entrylsb)){var a={target:this,type:"controlchange",data:e.data,timestamp:e.timeStamp,channel:s,controller:{number:t,name:this.getCcNameByNumber(t)},value:n};if(a.controller.number===o.MIDI_NRPN_MESSAGES.parammsb&&a.value!=o.MIDI_NRPN_MESSAGES.nullactiveparameter)o._nrpnBuffer[i]=[],o._nrpnBuffer[i][0]=a;else if(1===o._nrpnBuffer[i].length&&a.controller.number===o.MIDI_NRPN_MESSAGES.paramlsb)o._nrpnBuffer[i].push(a);else if(2!==o._nrpnBuffer[i].length||a.controller.number!==o.MIDI_NRPN_MESSAGES.increment&&a.controller.number!==o.MIDI_NRPN_MESSAGES.decrement&&a.controller.number!==o.MIDI_NRPN_MESSAGES.entrymsb)if(3===o._nrpnBuffer[i].length&&o._nrpnBuffer[i][2].number===o.MIDI_NRPN_MESSAGES.entrymsb&&a.controller.number===o.MIDI_NRPN_MESSAGES.entrylsb)o._nrpnBuffer[i].push(a);else if(3<=o._nrpnBuffer[i].length&&o._nrpnBuffer[i].length<=4&&a.controller.number===o.MIDI_NRPN_MESSAGES.parammsb&&a.value===o.MIDI_NRPN_MESSAGES.nullactiveparameter)o._nrpnBuffer[i].push(a);else if(4<=o._nrpnBuffer[i].length&&o._nrpnBuffer[i].length<=5&&a.controller.number===o.MIDI_NRPN_MESSAGES.paramlsb&&a.value===o.MIDI_NRPN_MESSAGES.nullactiveparameter){o._nrpnBuffer[i].push(a);var l=[];o._nrpnBuffer[i].forEach((function(e){l.push(e.data)}));var c=o._nrpnBuffer[i][0].value<<7|o._nrpnBuffer[i][1].value,u=o._nrpnBuffer[i][2].value;6===o._nrpnBuffer[i].length&&(u=o._nrpnBuffer[i][2].value<<7|o._nrpnBuffer[i][3].value);var d="";switch(o._nrpnBuffer[i][2].controller.number){case o.MIDI_NRPN_MESSAGES.entrymsb:d=o._nrpnTypes[0];break;case o.MIDI_NRPN_MESSAGES.increment:d=o._nrpnTypes[1];break;case o.MIDI_NRPN_MESSAGES.decrement:d=o._nrpnTypes[2];break;default:throw new Error("The NPRN type was unidentifiable.")}var p={timestamp:a.timestamp,channel:a.channel,type:"nrpn",data:l,controller:{number:c,type:d,name:"Non-Registered Parameter "+c},value:u};o._nrpnBuffer[i]=[],this._userHandlers.channel[p.type]&&this._userHandlers.channel[p.type][p.channel]&&this._userHandlers.channel[p.type][p.channel].forEach((function(e){e(p)}))}else o._nrpnBuffer[i]=[];else o._nrpnBuffer[i].push(a)}},r.prototype._parseChannelEvent=function(e){var t,n,r=e.data[0]>>4,i=1+(15&e.data[0]);1>7&127,r=127&e;return this.send(o.MIDI_SYSTEM_MESSAGES.songposition,[n,r],this._parseTimeParameter(t.time)),this},i.prototype.sendSongSelect=function(e,t){if(t=t||{},!(0<=(e=Math.floor(e))&&e<=127))throw new RangeError("The song number must be between 0 and 127.");return this.send(o.MIDI_SYSTEM_MESSAGES.songselect,[e],this._parseTimeParameter(t.time)),this},i.prototype.sendTuningRequest=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.tuningrequest,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendClock=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.clock,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendStart=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.start,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendContinue=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.continue,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendStop=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.stop,void 0,this._parseTimeParameter(e.time)),this},i.prototype.sendActiveSensing=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.activesensing,[],this._parseTimeParameter(e.time)),this},i.prototype.sendReset=function(e){return e=e||{},this.send(o.MIDI_SYSTEM_MESSAGES.reset,void 0,this._parseTimeParameter(e.time)),this},i.prototype.stopNote=function(e,t,n){if("all"===e)return this.sendChannelMode("allnotesoff",0,t,n);var r=64;return(n=n||{}).rawVelocity?!isNaN(n.velocity)&&0<=n.velocity&&n.velocity<=127&&(r=n.velocity):!isNaN(n.velocity)&&0<=n.velocity&&n.velocity<=1&&(r=127*n.velocity),this._convertNoteToArray(e).forEach(function(e){o.toMIDIChannels(t).forEach(function(t){this.send((o.MIDI_CHANNEL_MESSAGES.noteoff<<4)+(t-1),[e,Math.round(r)],this._parseTimeParameter(n.time))}.bind(this))}.bind(this)),this},i.prototype.playNote=function(e,t,n){var r,i=64;if((n=n||{}).rawVelocity?!isNaN(n.velocity)&&0<=n.velocity&&n.velocity<=127&&(i=n.velocity):!isNaN(n.velocity)&&0<=n.velocity&&n.velocity<=1&&(i=127*n.velocity),r=this._parseTimeParameter(n.time),this._convertNoteToArray(e).forEach(function(e){o.toMIDIChannels(t).forEach(function(t){this.send((o.MIDI_CHANNEL_MESSAGES.noteon<<4)+(t-1),[e,Math.round(i)],r)}.bind(this))}.bind(this)),!isNaN(n.duration)){n.duration<=0&&(n.duration=0);var s=64;n.rawVelocity?!isNaN(n.release)&&0<=n.release&&n.release<=127&&(s=n.release):!isNaN(n.release)&&0<=n.release&&n.release<=1&&(s=127*n.release),this._convertNoteToArray(e).forEach(function(e){o.toMIDIChannels(t).forEach(function(t){this.send((o.MIDI_CHANNEL_MESSAGES.noteoff<<4)+(t-1),[e,Math.round(s)],(r||o.time)+n.duration)}.bind(this))}.bind(this))}return this},i.prototype.sendKeyAftertouch=function(e,t,n,r){var i=this;if(r=r||{},t<1||16>7&127,l=127&s;return o.toMIDIChannels(t).forEach((function(){r.setRegisteredParameter("channelcoarsetuning",i,t,{time:n.time}),r.setRegisteredParameter("channelfinetuning",[a,l],t,{time:n.time})})),this},i.prototype.setTuningProgram=function(e,t,n){var r=this;if(n=n||{},!(0<=(e=Math.floor(e))&&e<=127))throw new RangeError("The program value must be between 0 and 127");return o.toMIDIChannels(t).forEach((function(){r.setRegisteredParameter("tuningprogram",e,t,{time:n.time})})),this},i.prototype.setTuningBank=function(e,t,n){var r=this;if(n=n||{},!(0<=(e=Math.floor(e)||0)&&e<=127))throw new RangeError("The bank value must be between 0 and 127");return o.toMIDIChannels(t).forEach((function(){r.setRegisteredParameter("tuningbank",e,t,{time:n.time})})),this},i.prototype.sendChannelMode=function(e,t,n,r){if(r=r||{},"string"==typeof e){if(!(e=o.MIDI_CHANNEL_MODE_MESSAGES[e]))throw new TypeError("Invalid channel mode message name.")}else if(!(120<=(e=Math.floor(e))&&e<=127))throw new RangeError("Channel mode numerical identifiers must be between 120 and 127.");if((t=Math.floor(t)||0)<0||127>7&127,a=127&i;return o.toMIDIChannels(t).forEach((function(e){r.send((o.MIDI_CHANNEL_MESSAGES.pitchbend<<4)+(e-1),[a,s],r._parseTimeParameter(n.time))})),this},i.prototype._parseTimeParameter=function(e){var t,n=parseFloat(e);return"string"==typeof e&&"+"===e.substring(0,1)?n&&0o.time&&(t=n),t},i.prototype._convertNoteToArray=function(e){var t=[];return Array.isArray(e)||(e=[e]),e.forEach((function(e){t.push(o.guessNoteNumber(e))})),t},e.exports?e.exports=o:t.WebMidi||(t.WebMidi=o)}(gs)}));(Ks=Ys||(Ys={}))[Ks.STATUS=2]="STATUS",Ks[Ks.HANDSHAKE=3]="HANDSHAKE",Ks[Ks.WISH=4]="WISH",Ks[Ks.AMOUNT=5]="AMOUNT",Ks[Ks.BLOCK=6]="BLOCK",Ks[Ks.SECTION=7]="SECTION",Ks[Ks.PART=8]="PART",Ks[Ks.INDEX=9]="INDEX",Ks[Ks.NEW_VALUE=10]="NEW_VALUE",Ks[Ks.MSG_LENGTH=11]="MSG_LENGTH",Ks[Ks.WRITE=12]="WRITE",Ks[Ks.NOT_SUPPORTED=13]="NOT_SUPPORTED",Ks[Ks.READ=14]="READ",Ks[Ks.UART_INTERFACE_ALLOCATED=80]="UART_INTERFACE_ALLOCATED",Ks[Ks.CDC_INTERFACE_ALLOCATED=81]="CDC_INTERFACE_ALLOCATED",Ks[Ks.UKNOWN_ERROR=704]="UKNOWN_ERROR",Ks[Ks.UI_QUEUE_REQ_ID_CONFLICT=711]="UI_QUEUE_REQ_ID_CONFLICT",Ks[Ks.UI_QUEUE_REQ_DATA_MISSING=712]="UI_QUEUE_REQ_DATA_MISSING",Ks[Ks.UI_QUEUE_REQ_ALREADY_ACTIVE=713]="UI_QUEUE_REQ_ALREADY_ACTIVE",Ks[Ks.UI_QUEUE_REQ_NONE_ACTIVE=714]="UI_QUEUE_REQ_NONE_ACTIVE",Ks[Ks.UI_QUEUE_SPECIAL_REQ_ID_MISMATCH=715]="UI_QUEUE_SPECIAL_REQ_ID_MISMATCH",Ks[Ks.UI_QUEUE_REQUEST_DECODE_ERROR=716]="UI_QUEUE_REQUEST_DECODE_ERROR",Ks[Ks.UI_QUEUE_REQUEST_SEND_ERROR=717]="UI_QUEUE_REQUEST_SEND_ERROR",Ks[Ks.UI_QUEUE_REQ_DATA_INVALID=718]="UI_QUEUE_REQ_DATA_INVALID",Ks[Ks.UI_QUEUE_REQ_TIMED_OUT=719]="UI_QUEUE_REQ_TIMED_OUT",Ks[Ks.UI_QUEUE_EMBEDED_RESPONSE_MISMATCH=720]="UI_QUEUE_EMBEDED_RESPONSE_MISMATCH";const ea={code:704,description:"Missing error description (READ error)."},ta={704:ea,2:{code:2,description:"This error happens when MESSAGE_STATUS isn't REQUEST (0) in request."},3:{code:3,description:"This error is returned when request is correct, but handshake request hasn't been sent to board (or SysEx connection has been closed)."},4:{code:4,description:"This error is returned when WISH is anything other than GET, SET or BACKUP."},5:{code:5,description:"This error is returned when AMOUNT is anything other than SINGLE or ALL."},6:{code:6,description:"This error is returned when BLOCK byte is incorrect."},7:{code:7,description:"This error is returned when SECTION byte is incorrect."},8:{code:8,description:"This error is returned when message part is incorrect."},9:{code:9,description:"This error is returned when wanted parameter is incorrect."},10:{code:10,description:"This error is returned when NEW_VALUE is incorrect."},11:{code:11,description:"This error is returned when request is too short."},12:{code:12,description:"This error is returned when writing new value to board has failed. This can happen if EEPROM on board is damaged (less likely) or if new value is incorrect (more likely)."},13:{code:13,description:"This error is returned when X is not supported by the board."},80:{code:80,description:"This error is returned when other peripheral already allocated wanted interface."},81:{code:81,description:"This error is returned when other peripheral already allocated wanted interface."},14:{code:14,description:"Missing error description (READ error)."},711:{code:711,description:"A Qeue Request tried to acquire next increment ID but it was already used by another request."},712:{code:712,description:"Could not start request, no request found for passed id."},713:{code:713,description:"A Qeue Request was found already active upon starting."},714:{code:714,description:"No Request active in Qeue upon receiving a MIDI response."},715:{code:715,description:"Request did not match specialRequestId event data payload"},716:{code:716,description:"Failed to decode request data."},717:{code:717,description:"Failed to send request."},718:{code:718,description:"Invalid request data."},719:{code:719,description:"Request sent but timed out."},720:{code:720,description:"Received a request not matching the active one."}},na=e=>ta[e]||ea,oa=[{name:"Arduino Leonardo",id:[1,58,76,24],oldId:[1,52,50,124],firmwareFileName:null},{name:"Arduino Mega",id:[9,16,0,18],oldId:[1,16,0,18],firmwareFileName:null},{name:"Arduino Pro Micro",id:[1,107,33,98],oldId:[1,5,13,73],firmwareFileName:null},{name:"Arduino Uno",id:[1,67,14,63],oldId:[1,11,120,50],firmwareFileName:null},{name:"Teensy++ 2.0",id:[112,11,64,30],oldId:[1,11,64,30],firmwareFileName:"teensy2pp.sysex"},{name:"DubFocus v1",id:[],oldId:[1,92,109,93],firmwareFileName:null},{name:"DubFocus 12",id:[85,74,109,41],oldId:[],firmwareFileName:"dubfocus12.sysex"},{name:"DubFocus 16",id:[61,70,72,25],oldId:[],firmwareFileName:"dubfocus16.sysex"},{name:"STM32F4 Discovery",id:[43,19,68,122],oldId:[],firmwareFileName:"discovery.sysex"},{name:"Jamiel",id:[1,12,108,80],oldId:[1,78,126,38],firmwareFileName:null},{name:"Cardamom",id:[99,82,54,48],oldId:[],firmwareFileName:"cardamom.sysex"},{name:"OpenDeck M v2",id:[122,56,41,19],oldId:[],firmwareFileName:"opendeck2.sysex"},{name:"OpenDeck M v1",id:[1,112,51,106],oldId:[1,91,42,85],firmwareFileName:null},{name:"Rooibos",id:[120,82,29,13],oldId:[],firmwareFileName:"rooibos.sysex"},{name:"Bergamot",id:[48,106,107,21],oldId:[],firmwareFileName:"bergamot.sysex"},{name:"DubFocus 16C",id:[44,111,98,103],oldId:[],firmwareFileName:"dubfocus16c.sysex"},{name:"OpenDeck S v1",id:[62,78,115,114],oldId:[],firmwareFileName:"opendeck_s.sysex"},{name:"BlackPill F401CC",id:[114,110,70,97],oldId:[],firmwareFileName:"blackpill401cc.sysex"},{name:"BlackPill F401CE",id:[122,28,101,39],oldId:[],firmwareFileName:"blackpill401ce.sysex"},{name:"BlackPill F411",id:[18,87,110,75],oldId:[],firmwareFileName:"blackpill411.sysex"},{name:"OpenDeck L v3A",id:[51,64,66,79],oldId:[],firmwareFileName:"opendeck3a.sysex"},{name:"OpenDeck L v3B",id:[70,68,60,41],oldId:[],firmwareFileName:"opendeck3b.sysex"},{name:"nRF52840DK",id:[79,4,3,17],oldId:[],firmwareFileName:"nrf52840dk.sysex"},{name:"Raspberry Pi Pico",id:[59,72,34,30],oldId:[],firmwareFileName:"pico.sysex"},{name:"OpenDeck M v2.1",id:[78,103,95,35],oldId:[],firmwareFileName:"opendeck21.sysex"},{name:"OpenDeck L v3.1",id:[9,65,127,60],oldId:[],firmwareFileName:"opendeck31.sysex"},{name:"OpenDeck M v2.2",id:[61,65,31,7],oldId:[],firmwareFileName:"opendeck22.sysex"},{name:"DubFocus 12SR",id:[67,39,10,25],oldId:[],firmwareFileName:"dubfocus12sr.sysex"}],ra=(e,t,n)=>{const o=Xe(!0),r=Ge(Ic(e,t)),i=Ld.actions.getFilteredSectionsForBlock(e,t),s=async()=>{o.value=!0;const i=t===is.Value&&n?n.value:void 0,s=await Ld.actions.getComponentSettings(e,t,i);Object.assign(r,s),Ws(100).then(()=>o.value=!1)},a=(e,t,n)=>{if(o.value)return;o.value=!0;return Ld.actions.setComponentSectionValue(t,()=>{r[e]=t.value,Ws(100).then(()=>o.value=!1),n&&n(t.value)}).catch(e=>(Hu.error("ERROR WHILE SAVING SETTING DATA",e),s()))};return An(()=>s()),n&&io([n],()=>n&&n.value&&s()),{formData:r,loading:o,loadData:s,onSettingChange:t=>{const{key:n,value:o,section:r,settingIndex:i,onLoad:s}=t;return a(n,{block:e,section:r,index:i,value:o},s)},onValueChange:t=>{const{key:o,value:r,section:i,onLoad:s}=t,l={block:e,section:i,index:n.value,value:r};return a(o,l,s)},showField:e=>e&&(!e.showIf||e.showIf(r)),sections:i,blockDefinition:yc[e]}},ia=e=>{const t=Xe(null),n=()=>t.value=(new Date).getTime();return{isHighlighted:Ro(()=>{const o=e.value&&t.value-e.value<250;return o&&Ws(10).then(n),o})}},sa=(e,t)=>()=>{if(!window.confirm(e))return!1;t()};var aa=(e,t,n)=>Ts(e,t,n)<0;const{MAX_LENGTH:la}=ms,{re:ca,t:ua}=bs;var da=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Ms)return e;if("string"!=typeof e)return null;if(e.length>la)return null;if(!(t.loose?ca[ua.LOOSE]:ca[ua.FULL]).test(e))return null;try{return new Ms(e,t)}catch(e){return null}};var pa=(e,t)=>{const n=da(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const ha=e=>{const t=[];for(let n=e.startIndex;n<=e.endIndex;n++)t.push(n);return{...e,indexArray:t}};var fa=No({name:"DeviceForm",props:{block:{required:!0,type:Number},gridCols:{default:3,type:Number}},setup(e){const{numberOfComponents:t,outputId:n}=md,o=Ro(()=>Number(jp.currentRoute.value.params.index));return{outputId:n,numberOfComponents:t,index:o,...ra(e.block,is.Value,o)}}});const La={class:"w-full section-heading"},ma={class:"section-heading-inner flex"},ga=fn("span",{class:"mr-6"},"›",-1),va={class:"mr-6 text-gray-400"},ba={class:"hidden md:block md:flex-grow text-right"},ya={class:"section-content"};fa.render=function(e,t,n,o,r,i){const s=Zt("router-link"),a=Zt("Siblinks"),c=Zt("SpinnerOverlay"),u=Zt("FormField");return an(),cn("form",{class:"relative section",novalidate:"",onSubmit:t[1]||(t[1]=tr(()=>{},["prevent"]))},[fn("h1",La,[fn("div",ma,[fn(s,{class:"mr-6",to:{name:e.blockDefinition.routeName}},{default:$t(()=>[fn("h2",null,l(e.blockDefinition.title)+"s",1)]),_:1},8,["to"]),ga,fn("div",va,[mn(l(e.blockDefinition.title)+" ",1),fn("strong",null,l(e.index),1)]),fn("div",ba,[fn(a,{"param-key":"index",current:e.index,total:e.numberOfComponents[e.block],params:{outputId:e.outputId}},null,8,["current","total","params"])])])]),e.loading?fn(c,{key:0}):vn("",!0),fn("div",ya,[fn("div",{class:["form-grid","lg:grid-cols-"+e.gridCols]},[(an(!0),cn(en,null,Ao(e.sections,t=>(an(),cn(en,null,[e.showField(t)?fn(u,{key:t.key,class:"col-span-"+(t.colspan||1),value:e.formData[t.key],"field-definition":t,onModified:e.onValueChange},null,8,["class","value","field-definition","onModified"]):vn("",!0)],64))),256))],2)])],32)};var Ia=No({name:"DeviceGrid",props:{index:{required:!0,type:Number},outputId:{required:!0,type:String},routeName:{required:!0,type:String},highlight:{default:null,type:Number}},setup(e){const{highlight:t}=tt(e);return{...ia(t)}}});Ia.render=function(e,t,n,o,r,i){const s=Zt("ButtonLink");return an(),cn(s,{to:{name:e.routeName,params:{outputId:e.outputId,index:e.index}},class:{"btn-highlight":e.isHighlighted}},{default:$t(()=>[qt(e.$slots,"default")]),_:3},8,["to","class"])};var Ea=No({name:"DeviceTableComponentRow",props:{formData:{type:Object,default:()=>({})},showField:{required:!0,type:Function},onValueChange:{required:!0,type:Function},index:{required:!0,type:Number},sections:{required:!0,type:Object},highlight:{type:Number,default:null}},setup(e){const{highlight:t}=tt(e);return{...ia(t)}}});const Ca={class:"form-table-row"};Ea.render=function(e,t,n,o,r,i){const s=Zt("FormField");return an(),cn("div",Ca,[fn("div",null,[fn("span",{class:["btn",{"btn-highlight":e.isHighlighted}]},l(e.index),3)]),(an(!0),cn(en,null,Ao(e.sections,t=>(an(),cn(en,null,[e.showField(t,e.formData)?fn(s,{key:t.key,index:e.index,value:e.formData[t.key],"field-definition":t,onModified:e.onValueChange},null,8,["index","value","field-definition","onModified"]):vn("",!0)],64))),256))])};var wa=No({name:"DeviceGrid",components:{DeviceGridButton:Ia,DeviceTableComponentRow:Ea},props:{title:{default:"",type:String},block:{required:!0,type:Number},segmentGrid:{type:Boolean,default:!1},routeName:{required:!0,type:String}},setup(e){const{outputId:t,setViewSetting:n,showMsbControls:o,numberOfComponents:r}=md,{highlights:i}=$u,{block:s,segmentGrid:a}=tt(e),l=a.value?((e,t)=>{const n=Ro(()=>e.value[Bi.Button]||0),o=Ro(()=>e.value[Bi.Analog]||0),r=Ro(()=>e.value[Bi.Led]||0),i=Ro(()=>e.value[Bi.Touchscreen]||0);return Ro(()=>{const e=[];switch(t.value){case Bi.Button:aa(pa(fs.firmwareVersion),"5.4.0")||Rs(pa(fs.firmwareVersion),"6.5.0")?(e.push({title:"Buttons",startIndex:0,endIndex:n.value-o.value-i.value-1}),o.value>0&&e.push({title:"Analog",startIndex:n.value-o.value-i.value,endIndex:n.value-o.value-i.value+o.value-1}),i.value>0&&e.push({title:"Touchscreen",startIndex:n.value-o.value+o.value-i.value,endIndex:n.value-o.value+o.value-1})):(e.push({title:"Buttons",startIndex:0,endIndex:n.value-o.value-1},{title:"Analog",startIndex:n.value-o.value,endIndex:n.value-o.value+o.value-i.value-1}),i.value>0&&e.push({title:"Touchscreen",startIndex:n.value-o.value+o.value-i.value,endIndex:n.value-o.value+o.value-1}));break;case Bi.Analog:aa(pa(fs.firmwareVersion),"5.4.0")||Rs(pa(fs.firmwareVersion),"6.5.0")?e.push({title:"Analog",startIndex:0,endIndex:o.value-1}):e.push({title:"Analog",startIndex:0,endIndex:o.value-i.value-1},{title:"Touchscreen",startIndex:o.value-i.value,endIndex:o.value-1});break;case Bi.Led:e.push({title:"LED",startIndex:0,endIndex:r.value-i.value-1},{title:"Touchscreen",startIndex:r.value-i.value,endIndex:r.value-1})}return e.map(ha)})})(r,s):void 0,{componentCount:c,indexRange:u,pages:d,pageSizes:p,sections:h,viewSetting:f}=(e=>{const t=Ro(()=>Ld.state.viewSettings[e]),n=Ro(()=>Ld.state.numberOfComponents[e]||0),o=Ro(()=>Math.ceil(n.value/t.value.itemsPerPage)),r=Ro(()=>(t.value.currentPage-1)*t.value.itemsPerPage),i=Ro(()=>r.value+t.value.itemsPerPage),s=Ro(()=>i.value>n.value?n.value:i.value),a=[16,32,56,112],l=Ro(()=>a.filter(e=>e{const e=[];for(let t=r.value;tyc[e].sections);return{componentCount:n,indexRange:c,pages:o,pageSizes:l,sections:u,viewSetting:t}})(s.value),{columnViewData:L,loading:m,showField:g,onValueChange:v}=((e,t)=>{const n=Xe(!0),o=Ic(e,is.Value),r=Ge({}),i=Ro(()=>!!t.value.viewListAsTable),s=async()=>{if(2!==Ld.state.valueSize||!i.value)return;n.value=!0;const t=await Ld.actions.getSectionValues(e);Object.keys(t).forEach(e=>{t[e].forEach((t,n)=>{r[n]||(r[n]={...o}),r[n][e]=t})}),Ws(100).then(()=>n.value=!1)};return An(()=>s()),io([i],()=>i.value&&s()),{columnViewData:r,loading:n,loadData:s,showField:(e,t)=>e&&(!e.showIf||e.showIf(t)),onValueChange:t=>{const{key:o,value:i,section:a,index:l,onLoad:c}=t,u={block:e,section:a,index:l,value:i};if(n.value)return;n.value=!0;return Ld.actions.setComponentSectionValue(u,()=>{r[l][o]=u.value,Ws(100).then(()=>n.value=!1),c&&c(u.value)}).catch(e=>(Hu.error("ERROR WHILE SAVING SETTING DATA",e),s()))}}})(s.value,f);return{outputId:t,highlights:i,columnViewData:L,loading:m,showField:g,onValueChange:v,setViewSetting:n,componentCount:c,viewSetting:f,indexRange:u,pages:d,pageSizes:p,sections:h,showMsbControls:o,segments:l}}});const Sa={class:"section-heading"},ka={key:0,class:"section-heading-inner text-center"},xa={key:0,class:"section-heading"},_a={class:"section-heading-inner-sm clearfix"},Ma={class:""},Ta={key:0,class:"ml-6 float-right"},Ra=fn("span",{class:"text-xs"},"Show",-1),Na={key:1,class:"ml-6 mt-4 md:mt-0 float-right"},Da=fn("span",{class:"text-xs ml-4"},"Page",-1),Aa={class:"form-table"},Oa={key:2,class:"device-grid"},Pa={class:"text-xl font-bold"},Ba={class:"section-heading text-center"},Fa={class:"section-heading-inner-sm"},Ua={class:"device-grid"},Ga={class:"text-xl font-bold"};wa.render=function(e,t,n,o,r,i){const s=Zt("SpinnerOverlay"),a=Zt("DeviceTableComponentRow"),c=Zt("DeviceGridButton");return an(),cn("div",{class:["section",{wide:e.viewSetting.viewListAsTable}]},[fn("div",Sa,[e.title?(an(),cn("h2",ka,l(e.title),1)):vn("",!0)]),e.showMsbControls?vn("",!0):(an(),cn("div",xa,[fn("div",_a,[fn("span",Ma,[fn("span",{class:["btn btn-xs mr-2",{"btn-active":!e.viewSetting.viewListAsTable}],onClick:t[1]||(t[1]=t=>e.setViewSetting(e.block,{viewListAsTable:!1}))}," Grid ",2),fn("span",{class:["btn btn-xs",{"btn-active":e.viewSetting.viewListAsTable}],onClick:t[2]||(t[2]=t=>e.setViewSetting(e.block,{viewListAsTable:!0}))}," Table ",2)]),e.viewSetting.viewListAsTable&&e.pageSizes.length?(an(),cn("span",Ta,[Ra,(an(!0),cn(en,null,Ao(e.pageSizes,t=>(an(),cn("span",{key:"page-size-"+t,class:["btn btn-xs ml-1",{"btn-active":t===e.viewSetting.itemsPerPage}],onClick:n=>e.setViewSetting(e.block,{itemsPerPage:t})},l(t),11,["onClick"]))),128))])):vn("",!0),e.viewSetting.viewListAsTable&&e.pages>1?(an(),cn("span",Na,[Da,(an(!0),cn(en,null,Ao(e.pages,t=>(an(),cn("span",{key:"page-size-"+t,class:["btn btn-xs ml-1",{"btn-active":t===e.viewSetting.currentPage}],onClick:n=>e.setViewSetting(e.block,{currentPage:t})},l(t),11,["onClick"]))),128))])):vn("",!0)])])),e.viewSetting.viewListAsTable?(an(),cn("form",{key:1,class:"relative",novalidate:"",onSubmit:t[3]||(t[3]=tr(()=>{},["prevent"]))},[e.loading?fn(s,{key:0}):vn("",!0),fn("div",Aa,[(an(!0),cn(en,null,Ao(e.indexRange,t=>(an(),cn(a,{key:"table-form-"+t,index:t,"form-data":e.columnViewData[t],"show-field":e.showField,sections:e.sections,"on-value-change":e.onValueChange,highlight:e.highlights[e.block][t]},null,8,["index","form-data","show-field","sections","on-value-change","highlight"]))),128))])],32)):!e.segments&&e.componentCount>0?(an(),cn("div",Oa,[(an(!0),cn(en,null,Ao(e.componentCount,t=>(an(),cn(c,{key:"button-"+t,"output-id":e.outputId,"route-name":e.routeName,index:t-1,highlight:e.highlights[e.block][t-1]},{default:$t(()=>[fn("span",Pa,l(t-1),1)]),_:2},1032,["output-id","route-name","index","highlight"]))),128))])):e.segments&&e.segments.length?(an(!0),cn(en,{key:3},Ao(e.segments,(t,n)=>(an(),cn("div",{key:"grid-segment-"+n,class:"grid-segment"},[fn("h3",Ba,[fn("div",Fa,l(t.title),1)]),fn("div",Ua,[(an(!0),cn(en,null,Ao(t.indexArray,t=>(an(),cn(c,{key:"button-"+t,"output-id":e.outputId,"route-name":e.routeName,index:t,highlight:e.highlights[e.block][t]},{default:$t(()=>[fn("span",Ga,l(t),1)]),_:2},1032,["output-id","route-name","index","highlight"]))),128))])]))),128)):vn("",!0)],2)};var Va=No({name:"RouteWrapper"});Va.render=function(e,t,n,o,r,i){const s=Zt("router-view");return an(),cn(s,{key:e.$route.fullPath})};var qa=No({name:"AnalogIcon"});const $a={"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",rel:"Sine Wave by Marco Galtarossa from the Noun Project"},Ha=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M510 171.7C485.19 170.92 477.35 272.27 468.03 320.94C448.38 423.39 442.18 502.75 383.73 504.31C325.28 505.87 319.14 423.39 299.51 320.95C290.19 272.3 283.29 172.48 256.16 171.7C229.03 170.92 222.1 272.29 212.77 320.95C193.13 423.39 190.85 501.2 134.74 502.76C78.63 504.31 59.63 488.35 40 385.9C30.5 336.34 -7.33 344.32 -24.45 336.36C-24.36 332.22 -69.77 285.21 -27.67 298.43C14.44 311.64 57.75 283.73 77.38 386.17C86.71 434.82 100.81 463.22 128.51 462.35C156.21 461.48 162.55 361.77 171.88 313.11C191.52 210.66 188.35 129.74 256.13 129.74C323.91 129.74 320.37 211.44 340 313.89C349.32 362.55 351.15 463.13 383.72 462.35C416.29 461.57 420.67 361.77 430 313.1C449.64 210.65 448.27 131.29 511.4 129.74C574.53 128.19 566.81 207.99 587.91 290C609.01 372.01 633.78 308.68 645.44 320C653.22 327.55 652.18 340.34 642.33 358.39C595.91 382.89 566.74 370.4 554.82 320.94C536.94 246.75 534.81 172.48 510 171.7Z"},null,-1);qa.render=function(e,t,n,o,r,i){return an(),cn("svg",$a,[Ha])};const ja={Enabled:{block:Bi.Analog,key:"enabled",type:is.Value,section:0,component:_i.Toggle,label:"Enable",helpText:"Enables or disables analog input. Disabled by default to avoid sending erratic values when nothing\n is connected to the input."},Invert:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,key:"invert",type:is.Value,section:1,component:_i.Toggle,label:"Invert direction",helpText:"Inverts the direction of the analog input. For example, if CC MIDI message is used, when the potentiometer is\n at its left edge, sent CC value is 0, and when it's at its right edge, sent value is 127. If inversion is enabled, vice\n versa applies.",block:Bi.Analog},Type:{showIf:e=>!!e.enabled,key:"type",type:is.Value,section:2,component:_i.Select,options:[{value:Ui.ControlChange7Bit,text:"Control change 7-bit"},{value:Ui.Note,text:"Note"},{value:Ui.FSR,text:"FSR"},{value:Ui.Button,text:"Button"},{value:Ui.NRPN7bit,text:"NRPN 7-bit"},{value:Ui.NRPN14bit,text:"NRPN 14-bit"},{value:Ui.PitchBend,text:"Pitch bend"},{value:Ui.ControlChange14Bit,text:"Control change 14-bit"}],label:"Message type",helpText:"",block:Bi.Analog},MidiIdLSB:{showIf:e=>!Xi.includes(e.type)&&!!e.enabled,key:"midiIdLSB",type:is.Value,section:3,component:_i.Input,min:0,max:127,max2Byte:16383,label:"MIDI ID (LSB)",helpText:"",block:Bi.Analog,isLsb:!0},MidiIdMSB:{showIf:e=>!Xi.includes(e.type)&&!!e.enabled,isMsb:!0,key:"midiIdMSB",type:is.Value,section:4,component:_i.Input,min:0,max:127,label:"MIDI ID (MSB)",helpText:"",block:Bi.Analog},LowerLimitLSB:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,isLsb:!0,key:"lowerLimitLSB",type:is.Value,section:5,component:_i.Input,min:0,max:127,max2Byte:16383,label:"Lower limit (LSB)",helpText:"Specifies the minimum value which is sent by the analog input. Scaling is used\n here, so this value will be sent when the analog input is at its lowest position. Limit is\n type-dependent. For most types, total range is 0-127. For pitch bend, 14-bit NRPN and\n 14-bit CC, total range is 0-16383.",block:Bi.Analog},LowerLimitMSB:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,isMsb:!0,key:"lowerLimitMSB",type:is.Value,section:6,component:_i.Input,min:0,max:127,label:"Lower limit (MSB)",helpText:"Specifies the minimum value which is sent by the analog input. Scaling is used\n here, so this value will be sent when the analog input is at its lowest position. Limit is\n type-dependent. For most types, total range is 0-127. For pitch bend, 14-bit NRPN and\n 14-bit CC, total range is 0-16383.",block:Bi.Analog},UpperLimitLSB:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,isLsb:!0,key:"upperLimitLSB",type:is.Value,section:7,component:_i.Input,min:0,max:127,max2Byte:16383,label:"Upper limit (LSB)",helpText:"Specifies the maximum value which is sent by the analog input. Scaling is used\n here, so this value will be sent when the analog input is at its highest position. Limit is\n type-dependent. For most types, total range is 0-127. For pitch bend, 14-bit NRPN and\n 14-bit CC, total range is 0-16383.",block:Bi.Analog},UpperLimitMSB:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,isMsb:!0,key:"upperLimitMSB",type:is.Value,section:8,component:_i.Input,min:0,max:127,label:"Upper limit (MSB)",helpText:"Specifies the maximum value which is sent by the analog input. Scaling is used\n here, so this value will be sent when the analog input is at its highest position. Limit is\n type-dependent. For most types, total range is 0-127. For pitch bend, 14-bit NRPN and\n 14-bit CC, total range is 0-16383.",block:Bi.Analog},MidiChannel:{showIf:e=>!Yi.includes(e.type)&&!!e.enabled,key:"midiChannel",type:is.Value,block:Bi.Analog,section:9,component:_i.Input,min:1,max:17,label:"MIDI channel",helpText:"Setting the channel to value 17 will cause sending of data on each MIDI channel."},LowerAdcOffset:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,key:"lowerAdcOffset",type:is.Value,section:10,component:_i.Input,min:0,max:100,label:"Lower ADC offset",helpText:"Specifies lower offset percentage which is used to calculate minimum ADC value upon which MIDI\n values will be based. Useful for inputs which cannot reach minimum ADC value. If for example, the board has\n nominal ADC range 0-4095, setting this value to 10 will calculate MIDI values based on 409-4095 range (assuming\n the upper offset is 0), that is, lower 10% of ADC range will be cut off.",block:Bi.Analog},UpperAdcOffset:{showIf:e=>e.type!==Ui.Button&&!!e.enabled,key:"upperAdcOffset",type:is.Value,section:11,component:_i.Input,min:0,max:100,label:"Upper ADC offset",helpText:"Specifies upper offset percentage which is used to calculate maximum ADC value upon which MIDI\n values will be based. Useful for inputs which cannot reach maximum ADC value. If for example, the board has\n nominal ADC range 0-4095, setting this value to 10 will calculate MIDI values based on 0-3685 range (assuming\n the lower offset is 0), that is, upper 10% of ADC range will be cut off.",block:Bi.Analog}},za={block:Bi.Analog,title:"Analog",routeName:"device-analogs",iconComponent:We(qa),componentCountResponseIndex:2,sections:ja,routes:[{path:"analogs",name:"device-analogs",component:Va,redirect:{name:"device-analogs-list"},children:[{path:"list",name:"device-analogs-list",component:wa,props:{block:Bi.Analog,routeName:"device-analogs-form",segmentGrid:!0}},{path:"analogs/:index",name:"device-analogs-form",component:fa,props:{block:Bi.Analog}}]}]};var Wa=No({name:"IconButton"});const Qa={"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640"},Za=fn("path",{fill:"currentColor",d:"M348.7 84.16L357.94 85.48L367.05 87.16L376.03 89.18L384.88 91.56L393.59 94.27L402.14 97.31L410.54 100.67L418.78 104.35L426.84 108.33L434.72 112.61L442.41 117.19L449.91 122.05L457.21 127.19L464.3 132.6L471.17 138.27L477.81 144.19L484.22 150.36L490.39 156.77L496.32 163.42L501.99 170.29L507.4 177.37L512.53 184.67L517.4 192.17L521.97 199.86L526.25 207.75L530.24 215.81L533.92 224.04L537.28 232.44L540.32 241L543.03 249.7L545.4 258.55L547.43 267.54L549.11 276.65L550.42 285.88L551.37 295.23L551.95 304.68L552.14 314.22L551.95 323.77L551.37 333.22L550.42 342.57L549.11 351.8L547.43 360.91L545.4 369.9L543.03 378.75L540.32 387.45L537.28 396.01L533.92 404.41L530.24 412.64L526.25 420.7L521.97 428.59L517.4 436.28L512.53 443.78L507.4 451.07L501.99 458.16L496.32 465.03L490.39 471.67L484.22 478.09L477.81 484.26L471.17 490.18L464.3 495.85L457.21 501.26L449.91 506.4L442.41 511.26L434.72 515.84L426.84 520.12L418.78 524.1L410.54 527.78L402.14 531.14L393.59 534.18L384.88 536.89L376.03 539.26L367.05 541.29L357.94 542.97L348.7 544.29L339.36 545.24L329.91 545.81L320.36 546.01L310.81 545.81L301.36 545.24L292.02 544.29L282.79 542.97L273.67 541.29L264.69 539.26L255.84 536.89L247.13 534.18L238.58 531.14L230.18 527.78L221.94 524.1L213.88 520.12L206 515.84L198.31 511.26L190.81 506.4L183.51 501.26L176.42 495.85L169.55 490.18L162.91 484.26L156.5 478.09L150.33 471.67L144.4 465.03L138.73 458.16L133.32 451.07L128.19 443.78L123.33 436.28L118.75 428.59L114.47 420.7L110.48 412.64L106.81 404.41L103.44 396.01L100.4 387.45L97.69 378.75L95.32 369.9L93.29 360.91L91.61 351.8L90.3 342.57L89.35 333.22L88.77 323.77L88.58 314.22L88.77 304.68L89.35 295.23L90.3 285.88L91.61 276.65L93.29 267.54L95.32 258.55L97.69 249.7L100.4 241L103.44 232.44L106.81 224.04L110.48 215.81L114.47 207.75L118.75 199.86L123.33 192.17L128.19 184.67L133.32 177.37L138.73 170.29L144.4 163.42L150.33 156.77L156.5 150.36L162.91 144.19L169.55 138.27L176.42 132.6L183.51 127.19L190.81 122.05L198.31 117.19L206 112.61L213.88 108.33L221.94 104.35L230.18 100.67L238.58 97.31L247.13 94.27L255.84 91.56L264.69 89.18L273.67 87.16L282.79 85.48L292.02 84.16L301.36 83.21L310.81 82.64L320.36 82.44L329.91 82.64L339.36 83.21L339.36 83.21L348.7 84.16ZM294.85 107.17L286.54 108.35L278.34 109.86L270.26 111.69L262.29 113.82L254.46 116.26L246.75 119L239.2 122.03L231.78 125.33L224.53 128.92L217.44 132.78L210.51 136.89L203.76 141.27L197.2 145.89L190.82 150.76L184.64 155.86L178.66 161.19L172.88 166.75L167.33 172.52L162 178.5L156.89 184.68L152.03 191.06L147.4 197.63L143.03 204.38L138.91 211.3L135.06 218.39L131.47 225.65L128.16 233.06L125.14 240.62L122.4 248.32L119.96 256.16L117.82 264.12L116 272.21L114.49 280.41L113.3 288.72L112.45 297.13L111.93 305.63L111.76 314.22L111.93 322.82L112.45 331.32L113.3 339.73L114.49 348.04L116 356.24L117.82 364.33L119.96 372.29L122.4 380.13L125.14 387.83L128.16 395.39L131.47 402.8L135.06 410.06L138.91 417.15L143.03 424.07L147.4 430.82L152.03 437.39L156.89 443.77L162 449.95L167.33 455.93L172.88 461.7L178.66 467.26L184.64 472.59L190.82 477.69L197.2 482.56L203.76 487.18L210.51 491.56L217.44 495.67L224.53 499.53L231.78 503.11L239.2 506.42L246.75 509.45L254.46 512.19L262.29 514.62L270.26 516.76L278.34 518.59L286.54 520.1L294.85 521.28L303.26 522.14L311.77 522.65L320.36 522.83L328.95 522.65L337.46 522.14L345.87 521.28L354.18 520.1L362.38 518.59L370.47 516.76L378.43 514.62L386.27 512.19L393.97 509.45L401.53 506.42L408.94 503.11L416.19 499.53L423.28 495.67L430.21 491.56L436.96 487.18L443.53 482.56L449.9 477.69L456.09 472.59L462.07 467.26L467.84 461.7L473.39 455.93L478.72 449.95L483.83 443.77L488.69 437.39L493.32 430.82L497.69 424.07L501.81 417.15L505.67 410.06L509.25 402.8L512.56 395.39L515.59 387.83L518.32 380.13L520.76 372.29L522.9 364.33L524.72 356.24L526.23 348.04L527.42 339.73L528.27 331.32L528.79 322.82L528.96 314.22L528.79 305.63L528.27 297.13L527.42 288.72L526.23 280.41L524.72 272.21L522.9 264.12L520.76 256.16L518.32 248.32L515.59 240.62L512.56 233.06L509.25 225.65L505.67 218.39L501.81 211.3L497.69 204.38L493.32 197.63L488.69 191.06L483.83 184.68L478.72 178.5L473.39 172.52L467.84 166.75L462.07 161.19L456.09 155.86L449.9 150.76L443.53 145.89L436.96 141.27L430.21 136.89L423.28 132.78L416.19 128.92L408.94 125.33L401.53 122.03L393.97 119L386.27 116.26L378.43 113.82L370.47 111.69L362.38 109.86L354.18 108.35L345.87 107.17L337.46 106.31L328.95 105.8L320.36 105.62L311.77 105.8L303.26 106.31L303.26 106.31L294.85 107.17Z"},null,-1),Xa=fn("path",{fill:"currentColor",d:"M343.54 39.74L354.63 40.87L365.58 42.43L376.39 44.42L387.05 46.83L397.55 49.64L407.88 52.86L418.03 56.47L428 60.46L437.77 64.82L447.33 69.54L456.68 74.63L465.81 80.06L474.71 85.82L483.37 91.92L491.77 98.33L499.92 105.06L507.81 112.09L515.42 119.41L522.74 127.02L529.77 134.9L536.49 143.05L542.91 151.46L549.01 160.12L554.77 169.02L560.2 178.15L565.28 187.5L570.01 197.06L574.37 206.83L578.36 216.8L581.97 226.95L585.19 237.28L588 247.78L590.41 258.44L592.4 269.25L593.96 280.2L595.09 291.29L595.77 302.5L596 313.83L595.77 325.16L595.09 336.37L593.96 347.46L592.4 358.41L590.41 369.22L588 379.88L585.19 390.38L581.97 400.71L578.36 410.86L574.37 420.83L570.01 430.6L565.28 440.16L560.2 449.52L554.77 458.64L549.01 467.54L542.91 476.2L536.49 484.61L529.77 492.76L522.74 500.64L515.42 508.25L507.81 515.57L499.92 522.6L491.77 529.33L483.37 535.74L474.71 541.84L465.81 547.6L456.68 553.03L447.33 558.12L437.77 562.84L428 567.21L418.03 571.19L407.88 574.8L397.55 578.02L387.05 580.83L376.39 583.24L365.58 585.23L354.63 586.79L343.54 587.92L332.33 588.6L321 588.83L309.67 588.6L298.46 587.92L287.37 586.79L276.42 585.23L265.61 583.24L254.95 580.83L244.45 578.02L234.12 574.8L223.96 571.19L214 567.21L204.23 562.84L194.67 558.12L185.31 553.03L176.19 547.6L167.29 541.84L158.63 535.74L150.22 529.33L142.07 522.6L134.19 515.57L126.58 508.25L119.26 500.64L112.23 492.76L105.5 484.61L99.09 476.2L92.99 467.54L87.22 458.64L81.8 449.52L76.71 440.16L71.99 430.6L67.62 420.83L63.64 410.86L60.03 400.71L56.81 390.38L54 379.88L51.59 369.22L49.6 358.41L48.04 347.46L46.91 336.37L46.23 325.16L46 313.83L46.23 302.5L46.91 291.29L48.04 280.2L49.6 269.25L51.59 258.44L54 247.78L56.81 237.28L60.03 226.95L63.64 216.8L67.62 206.83L71.99 197.06L76.71 187.5L81.8 178.15L87.22 169.02L92.99 160.12L99.09 151.46L105.5 143.05L112.23 134.9L119.26 127.02L126.58 119.41L134.19 112.09L142.07 105.06L150.22 98.33L158.63 91.92L167.29 85.82L176.19 80.06L185.31 74.63L194.67 69.54L204.23 64.82L214 60.46L223.96 56.47L234.12 52.86L244.45 49.64L254.95 46.83L265.61 44.42L276.42 42.43L287.37 40.87L298.46 39.74L309.67 39.06L321 38.83L332.33 39.06L343.54 39.74ZM299.28 50.88L288.6 51.97L278.04 53.47L267.62 55.39L257.35 57.71L247.23 60.42L237.28 63.52L227.5 67L217.89 70.84L208.48 75.04L199.26 79.6L190.25 84.5L181.45 89.73L172.88 95.29L164.54 101.16L156.44 107.34L148.58 113.83L140.99 120.6L133.65 127.66L126.6 134.99L119.82 142.58L113.34 150.44L107.16 158.54L101.28 166.88L95.73 175.46L90.5 184.25L85.6 193.26L81.04 202.48L76.84 211.89L73 221.5L69.52 231.28L66.42 241.23L63.71 251.35L61.39 261.62L59.47 272.04L57.97 282.6L56.88 293.28L56.22 304.09L56 315L56.22 325.92L56.88 336.72L57.97 347.41L59.47 357.96L61.39 368.38L63.71 378.65L66.42 388.77L69.52 398.73L73 408.51L76.84 418.11L81.04 427.52L85.6 436.74L90.5 445.75L95.73 454.55L101.28 463.12L107.16 471.47L113.34 479.57L119.82 487.42L126.6 495.02L133.65 502.35L140.99 509.41L148.58 516.18L156.44 522.66L164.54 528.84L172.88 534.72L181.45 540.28L190.25 545.51L199.26 550.4L208.48 554.96L217.89 559.16L227.5 563.01L237.28 566.48L247.23 569.58L257.35 572.3L267.62 574.61L278.04 576.53L288.6 578.04L299.28 579.12L310.08 579.78L321 580L331.92 579.78L342.72 579.12L353.41 578.04L363.96 576.53L374.38 574.61L384.65 572.3L394.77 569.58L404.72 566.48L414.51 563.01L424.11 559.16L433.52 554.96L442.74 550.4L451.75 545.51L460.55 540.28L469.12 534.72L477.46 528.84L485.57 522.66L493.42 516.18L501.02 509.41L508.35 502.35L515.4 495.02L522.18 487.42L528.66 479.57L534.84 471.47L540.72 463.12L546.27 454.55L551.51 445.75L556.4 436.74L560.96 427.52L565.16 418.11L569.01 408.51L572.48 398.73L575.58 388.77L578.29 378.65L580.61 368.38L582.53 357.96L584.04 347.41L585.12 336.72L585.78 325.92L586 315L585.78 304.09L585.12 293.28L584.04 282.6L582.53 272.04L580.61 261.62L578.29 251.35L575.58 241.23L572.48 231.28L569.01 221.5L565.16 211.89L560.96 202.48L556.4 193.26L551.51 184.25L546.27 175.46L540.72 166.88L534.84 158.54L528.66 150.44L522.18 142.58L515.4 134.99L508.35 127.66L501.02 120.6L493.42 113.83L485.57 107.34L477.46 101.16L469.12 95.29L460.55 89.73L451.75 84.5L442.74 79.6L433.52 75.04L424.11 70.84L414.51 67L404.72 63.52L394.77 60.42L384.65 57.71L374.38 55.39L363.96 53.47L353.41 51.97L342.72 50.88L331.92 50.22L321 50L310.08 50.22L299.28 50.88Z"},null,-1),Ya=fn("path",{fill:"currentColor",d:"M348.7 84.16L357.94 85.48L367.05 87.16L376.03 89.18L384.88 91.56L393.59 94.27L402.14 97.31L410.54 100.67L418.78 104.35L426.84 108.33L434.72 112.61L442.41 117.19L449.91 122.05L457.21 127.19L464.3 132.6L471.17 138.27L477.81 144.19L484.22 150.36L490.39 156.77L496.32 163.42L501.99 170.29L507.4 177.37L512.53 184.67L517.4 192.17L521.97 199.86L526.25 207.75L530.24 215.81L533.92 224.04L537.28 232.44L540.32 241L543.03 249.7L545.4 258.55L547.43 267.54L549.11 276.65L550.42 285.88L551.37 295.23L551.95 304.68L552.14 314.22L551.95 323.77L551.37 333.22L550.42 342.57L549.11 351.8L547.43 360.91L545.4 369.9L543.03 378.75L540.32 387.45L537.28 396.01L533.92 404.41L530.24 412.64L526.25 420.7L521.97 428.59L517.4 436.28L512.53 443.78L507.4 451.07L501.99 458.16L496.32 465.03L490.39 471.67L484.22 478.09L477.81 484.26L471.17 490.18L464.3 495.85L457.21 501.26L449.91 506.4L442.41 511.26L434.72 515.84L426.84 520.12L418.78 524.1L410.54 527.78L402.14 531.14L393.59 534.18L384.88 536.89L376.03 539.26L367.05 541.29L357.94 542.97L348.7 544.29L339.36 545.24L329.91 545.81L320.36 546.01L310.81 545.81L301.36 545.24L292.02 544.29L282.79 542.97L273.67 541.29L264.69 539.26L255.84 536.89L247.13 534.18L238.58 531.14L230.18 527.78L221.94 524.1L213.88 520.12L206 515.84L198.31 511.26L190.81 506.4L183.51 501.26L176.42 495.85L169.55 490.18L162.91 484.26L156.5 478.09L150.33 471.67L144.4 465.03L138.73 458.16L133.32 451.07L128.19 443.78L123.33 436.28L118.75 428.59L114.47 420.7L110.48 412.64L106.81 404.41L103.44 396.01L100.4 387.45L97.69 378.75L95.32 369.9L93.29 360.91L91.61 351.8L90.3 342.57L89.35 333.22L88.77 323.77L88.58 314.22L88.77 304.68L89.35 295.23L90.3 285.88L91.61 276.65L93.29 267.54L95.32 258.55L97.69 249.7L100.4 241L103.44 232.44L106.81 224.04L110.48 215.81L114.47 207.75L118.75 199.86L123.33 192.17L128.19 184.67L133.32 177.37L138.73 170.29L144.4 163.42L150.33 156.77L156.5 150.36L162.91 144.19L169.55 138.27L176.42 132.6L183.51 127.19L190.81 122.05L198.31 117.19L206 112.61L213.88 108.33L221.94 104.35L230.18 100.67L238.58 97.31L247.13 94.27L255.84 91.56L264.69 89.18L273.67 87.16L282.79 85.48L292.02 84.16L301.36 83.21L310.81 82.64L320.36 82.44L329.91 82.64L339.36 83.21L339.36 83.21L348.7 84.16ZM294.85 107.17L286.54 108.35L278.34 109.86L270.26 111.69L262.29 113.82L254.46 116.26L246.75 119L239.2 122.03L231.78 125.33L224.53 128.92L217.44 132.78L210.51 136.89L203.76 141.27L197.2 145.89L190.82 150.76L184.64 155.86L178.66 161.19L172.88 166.75L167.33 172.52L162 178.5L156.89 184.68L152.03 191.06L147.4 197.63L143.03 204.38L138.91 211.3L135.06 218.39L131.47 225.65L128.16 233.06L125.14 240.62L122.4 248.32L119.96 256.16L117.82 264.12L116 272.21L114.49 280.41L113.3 288.72L112.45 297.13L111.93 305.63L111.76 314.22L111.93 322.82L112.45 331.32L113.3 339.73L114.49 348.04L116 356.24L117.82 364.33L119.96 372.29L122.4 380.13L125.14 387.83L128.16 395.39L131.47 402.8L135.06 410.06L138.91 417.15L143.03 424.07L147.4 430.82L152.03 437.39L156.89 443.77L162 449.95L167.33 455.93L172.88 461.7L178.66 467.26L184.64 472.59L190.82 477.69L197.2 482.56L203.76 487.18L210.51 491.56L217.44 495.67L224.53 499.53L231.78 503.11L239.2 506.42L246.75 509.45L254.46 512.19L262.29 514.62L270.26 516.76L278.34 518.59L286.54 520.1L294.85 521.28L303.26 522.14L311.77 522.65L320.36 522.83L328.95 522.65L337.46 522.14L345.87 521.28L354.18 520.1L362.38 518.59L370.47 516.76L378.43 514.62L386.27 512.19L393.97 509.45L401.53 506.42L408.94 503.11L416.19 499.53L423.28 495.67L430.21 491.56L436.96 487.18L443.53 482.56L449.9 477.69L456.09 472.59L462.07 467.26L467.84 461.7L473.39 455.93L478.72 449.95L483.83 443.77L488.69 437.39L493.32 430.82L497.69 424.07L501.81 417.15L505.67 410.06L509.25 402.8L512.56 395.39L515.59 387.83L518.32 380.13L520.76 372.29L522.9 364.33L524.72 356.24L526.23 348.04L527.42 339.73L528.27 331.32L528.79 322.82L528.96 314.22L528.79 305.63L528.27 297.13L527.42 288.72L526.23 280.41L524.72 272.21L522.9 264.12L520.76 256.16L518.32 248.32L515.59 240.62L512.56 233.06L509.25 225.65L505.67 218.39L501.81 211.3L497.69 204.38L493.32 197.63L488.69 191.06L483.83 184.68L478.72 178.5L473.39 172.52L467.84 166.75L462.07 161.19L456.09 155.86L449.9 150.76L443.53 145.89L436.96 141.27L430.21 136.89L423.28 132.78L416.19 128.92L408.94 125.33L401.53 122.03L393.97 119L386.27 116.26L378.43 113.82L370.47 111.69L362.38 109.86L354.18 108.35L345.87 107.17L337.46 106.31L328.95 105.8L320.36 105.62L311.77 105.8L303.26 106.31L303.26 106.31L294.85 107.17Z"},null,-1),Ka=fn("path",{fill:"currentColor",d:"M319.61 83.99C327.9 83.99 334.61 90.7 334.61 98.99C334.61 137.95 334.61 239.82 334.61 278.78C334.61 287.06 327.9 293.77 319.63 293.77C316.62 293.77 322.6 293.77 319.6 293.77C311.32 293.77 304.61 287.06 304.61 278.78C304.61 239.82 304.61 137.95 304.61 98.99C304.61 90.7 311.33 83.99 319.61 83.99C322.61 83.99 316.61 83.99 319.61 83.99Z"},null,-1);Wa.render=function(e,t,n,o,r,i){return an(),cn("svg",Qa,[Za,Xa,Ya,Ka])};const Ja={Type:{block:Bi.Button,key:"type",type:is.Value,section:0,component:_i.Select,colspan:2,options:[{value:0,text:"Momentary"},{value:1,text:"Latching"}],label:"Type",helpText:"\n Button type can be momentary, which means that configured MIDI message is sent as soon as\n button is released, or latching, which means that MIDI message is sent on\n second button press. All buttons are configured as momentary by\n default. Depending on message type this setting can be ignored."},MidiMessage:{key:"messageType",type:is.Value,section:1,component:_i.Select,options:[{value:Vi.Note,text:"Note"},{value:Vi.ProgramChange,text:"Program Change"},{value:Vi.ProgramChangeInc,text:"Program Change Inc"},{value:Vi.ProgramChangeDec,text:"Program Change Dec"},{value:Vi.ProgramChangeOffsetInc,text:"Program Change Offset Increment"},{value:Vi.ProgramChangeOffsetDec,text:"Program Change Offset Decrement"},{value:Vi.ControlChange,text:"CC"},{value:Vi.ControlChangeOff,text:"CC/0 Off"},{value:Vi.MmcStop,text:"MMC Stop"},{value:Vi.MmcPlay,text:"MMC Play"},{value:Vi.MmcRecord,text:"MMC Record"},{value:Vi.MmcPause,text:"MMC Pause"},{value:Vi.RealTimeClock,text:"Real Time Clock"},{value:Vi.RealTimeStart,text:"Real Time Start"},{value:Vi.RealTimeContinue,text:"Real Time Continue"},{value:Vi.RealTimeStop,text:"Real Time Stop"},{value:Vi.RealTimeActiveSensing,text:"Real Time Active Sensing"},{value:Vi.RealTimeSystemReset,text:"Real Time System Reset"},{value:Vi.None,text:"None"},{value:Vi.PresetChange,text:"Preset Change"},{value:Vi.MultiValueIncResetNote,text:"Multi Value IncReset Note"},{value:Vi.MultiValueIncDecNote,text:"Multi Value IncDec Note"},{value:Vi.MultiValueIncResetCC,text:"Multi Value IncReset CC"},{value:Vi.MultiValueIncDecCC,text:"Multi Value IncDec CC"},{value:Vi.NoteOffOnly,text:"Note Off Only"},{value:Vi.ControlChange0Only,text:"CC/0 only"},{value:Vi.BpmInc,text:"BPM Inc"},{value:Vi.BpmDec,text:"BPM Dec"}],label:"Message type",helpText:"",block:Bi.Button},MidiChannel:{showIf:e=>!Zi.includes(e.messageType),key:"midiChannel",type:is.Value,block:Bi.Button,section:4,component:_i.Input,min:1,max:17,label:"MIDI channel",helpText:"Setting the channel to value 17 will cause sending of data on each MIDI channel."},MidiId:{showIf:e=>!Qi.includes(e.messageType),key:"midiId",type:is.Value,section:2,component:_i.Input,min:0,max:127,label:"MIDI ID",helpText:"",block:Bi.Button},Preset:{showIf:e=>e.messageType==Vi.PresetChange,key:"preset",type:is.Value,section:2,component:_i.Input,min:0,max:9,label:"Preset",helpText:"Preset to switch to once the button is pressed. Numbering starts from 0, so value 0 will load preset 1.",block:Bi.Button},Value:{showIf:e=>!Wi.includes(e.messageType),key:"value",type:is.Value,section:3,component:_i.Input,min:1,max:127,label:"Value",helpText:"Velocity for notes, control value for CC, increment/decrement value for Multi Value message types or offset for Program Change.",block:Bi.Button}},el={block:Bi.Button,title:"Button",routeName:"device-buttons",iconComponent:We(Wa),componentCountResponseIndex:0,sections:Ja,routes:[{path:"buttons",name:"device-buttons",component:Va,redirect:{name:"device-buttons-list"},children:[{path:"list",name:"device-buttons-list",component:wa,props:{block:Bi.Button,routeName:"device-buttons-form",segmentGrid:!0}},{path:"buttons/:index",name:"device-buttons-form",component:fa,props:{block:Bi.Button}}]}]};var tl=No({name:"Display",setup(){const{sections:e}=cl;return{Block:Bi,sections:e}}});const nl={class:"form-grid"};tl.render=function(e,t,n,o,r,i){const s=Zt("FormField"),a=Zt("Section"),l=Zt("DeviceSettings");return an(),cn(l,{class:"i2c flex flex-wrap flex-grow",block:e.Block.Display},{default:$t(({form:t,showField:n,onSettingChange:o})=>[fn(a,{title:"Display"},{default:$t(()=>[fn("div",nl,[fn(s,{value:t.enableDisplay,"field-definition":e.sections.EnableDisplay,onModified:o},null,8,["value","field-definition","onModified"]),n(e.sections.DisplayController)?fn(s,{key:0,value:t.displayController,"field-definition":e.sections.DisplayController,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DisplayResolution)?fn(s,{key:1,value:t.displayResolution,"field-definition":e.sections.DisplayResolution,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DeviceInfoOnStartup)?fn(s,{key:2,value:t.deviceInfoStartup,"field-definition":e.sections.DeviceInfoOnStartup,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.AlternateMidiNoteDisplay)?fn(s,{key:3,value:t.alternateMidiNoteDisplay,"field-definition":e.sections.AlternateMidiNoteDisplay,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.MidiEventRetentionTime)?fn(s,{key:4,value:t.midiEventRetentionTime,"field-definition":e.sections.MidiEventRetentionTime,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0)])]),_:2},1024)]),_:1},8,["block"])};var ol=No({name:"IconDisplay"});const rl={"aria-hidden":"true",focusable:"false","data-icon":"window-maximize",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",rel:"display by Neha Tyagi from the Noun Project"},il=fn("path",{fill:"currentColor",d:"M367.78 473.54C314.69 473.54 261.6 473.54 208.51 473.54C196.3 473.54 184.09 473.54 172.01 473.54C176.39 477.92 180.9 482.43 185.28 486.81C185.28 449.25 185.28 411.69 185.28 374.13C185.28 314.27 185.28 254.41 185.28 194.42C185.28 180.75 185.28 166.94 185.28 153.27C180.9 157.65 176.39 162.17 172.01 166.55C205.46 166.55 239.04 166.55 272.48 166.55C325.57 166.55 378.66 166.55 431.75 166.55C443.97 166.55 456.18 166.55 468.25 166.55C463.87 162.17 459.36 157.65 454.98 153.27C454.98 190.83 454.98 228.39 454.98 265.96C454.98 325.82 454.98 385.67 454.98 445.67C454.98 459.34 454.98 473.14 454.98 486.81C454.98 503.93 481.53 503.93 481.53 486.81C481.53 449.25 481.53 411.69 481.53 374.13C481.53 314.27 481.53 254.41 481.53 194.42C481.53 180.75 481.53 166.94 481.53 153.27C481.53 146.11 475.42 140 468.25 140C434.81 140 401.23 140 367.78 140C314.69 140 261.6 140 208.51 140C196.3 140 184.09 140 172.01 140C164.84 140 158.74 146.11 158.74 153.27C158.74 190.83 158.74 228.39 158.74 265.96C158.74 325.82 158.74 385.67 158.74 445.67C158.74 459.34 158.74 473.14 158.74 486.81C158.74 493.98 164.84 500.08 172.01 500.08C205.46 500.08 239.04 500.08 272.48 500.08C325.57 500.08 378.66 500.08 431.75 500.08C443.97 500.08 456.18 500.08 468.25 500.08C485.24 500.08 485.24 473.54 468.25 473.54C434.81 473.54 401.23 473.54 367.78 473.54Z"},null,-1),sl=fn("path",{fill:"currentColor",d:"M81.23 279.49C81.23 324.22 81.23 369.08 81.23 413.81C81.23 424.16 81.23 434.65 81.23 445C81.23 462.12 107.77 462.12 107.77 445C107.77 416.73 107.77 388.59 107.77 360.32C107.77 315.6 107.77 270.73 107.77 226.01C107.77 215.65 107.77 205.17 107.77 194.82C107.77 177.83 81.23 177.83 81.23 194.82C81.23 194.82 81.23 194.82 81.23 194.82C81.23 232.42 81.23 260.65 81.23 279.49Z"},null,-1),al=fn("path",{fill:"currentColor",d:"M532.23 279.49C532.23 324.22 532.23 369.08 532.23 413.81C532.23 424.16 532.23 434.65 532.23 445C532.23 462.12 558.77 462.12 558.77 445C558.77 416.73 558.77 388.59 558.77 360.32C558.77 315.6 558.77 270.73 558.77 226.01C558.77 215.65 558.77 205.17 558.77 194.82C558.77 177.83 532.23 177.83 532.23 194.82C532.23 194.82 532.23 194.82 532.23 194.82C532.23 232.42 532.23 260.65 532.23 279.49Z"},null,-1);ol.render=function(e,t,n,o,r,i){return an(),cn("svg",rl,[il,sl,al])};const ll={EnableDisplay:{block:Bi.Display,key:"enableDisplay",type:is.Setting,section:0,settingIndex:6,component:_i.Toggle,label:"Enable",helpText:"Enables or disables the usage of small OLED/LCD displays."},DeviceInfoOnStartup:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"deviceInfoStartup",type:is.Setting,section:0,settingIndex:0,component:_i.Toggle,label:"Show device info on startup",helpText:"Enable or disable device info message on startup (firmware version and board name)."},DisplayController:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"displayController",type:is.Setting,section:0,settingIndex:1,component:_i.Select,options:[{value:0,text:"None"},{value:1,text:"SSD1306"}],label:"Display controller",helpText:""},DisplayResolution:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"displayResolution",type:is.Setting,section:0,settingIndex:2,component:_i.Select,options:[{value:0,text:"None"},{value:1,text:"128x64"},{value:2,text:"128x32"}],label:"Display resolution",helpText:""},MidiEventRetentionTime:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"midiEventRetentionTime",type:is.Setting,section:0,settingIndex:3,component:_i.Select,options:[{value:0,text:"0"},{value:1,text:"1"},{value:2,text:"2"},{value:3,text:"3"},{value:4,text:"4"},{value:5,text:"5"}],label:"MIDI event time",helpText:"Timeout after which any message on display will be cleared. If set to 0, message stays on display until new event occurs."},AlternateMidiNoteDisplay:{showIf:e=>e.enableDisplay,block:Bi.Display,key:"alternateMidiNoteDisplay",type:is.Setting,section:0,settingIndex:4,component:_i.Toggle,label:"Alternate MIDI note Display",helpText:"If enabled, MIDI note data will be displayed in note-key format (ie. C#4). If disabled, MIDI note number will be displayed instead."}},cl={block:Bi.Display,title:"I2C",routeName:"device-i2c",iconComponent:We(ol),sections:ll,routes:[{path:"i2c:",name:"device-i2c",component:tl}]};var ul=No({name:"IconEncoder"});const dl={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 640 640","xml:space":"preserve"},pl=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M247.45 180.09L248.54 180.2L249.62 180.36L250.69 180.55L251.75 180.79L252.78 181.07L253.81 181.39L254.81 181.74L255.79 182.14L256.76 182.57L257.7 183.03L258.63 183.53L259.53 184.07L260.41 184.64L261.27 185.24L262.1 185.88L262.9 186.54L263.68 187.24L264.43 187.96L265.15 188.71L265.85 189.49L266.51 190.29L267.15 191.12L267.75 191.98L268.32 192.86L268.86 193.76L269.36 194.69L269.82 195.63L270.25 196.6L270.65 197.58L271 198.58L271.32 199.61L271.6 200.64L271.84 201.7L272.03 202.77L272.19 203.85L272.3 204.94L272.37 206.05L272.39 207.17L272.39 400L230.78 400L230.78 238.25L230.77 237.62L230.73 237L230.67 236.39L230.58 235.78L230.47 235.18L230.34 234.59L230.18 234.01L230.01 233.43L229.81 232.87L229.59 232.32L229.34 231.77L229.08 231.24L228.8 230.73L228.5 230.22L228.18 229.73L227.84 229.25L227.49 228.78L227.11 228.33L226.72 227.89L226.32 227.47L225.89 227.06L225.46 226.67L225.01 226.3L224.54 225.94L224.06 225.61L223.57 225.29L223.06 224.98L222.54 224.7L222.01 224.44L221.47 224.2L220.91 223.98L220.35 223.78L219.78 223.6L219.2 223.44L218.6 223.31L218 223.2L217.4 223.11L216.78 223.05L216.16 223.01L215.53 223L145.96 223L145.4 223.01L144.85 223.04L144.3 223.1L143.76 223.18L143.22 223.28L142.7 223.39L142.18 223.53L141.67 223.69L141.17 223.87L140.68 224.07L140.2 224.28L139.72 224.51L139.26 224.77L138.81 225.03L138.37 225.32L137.95 225.62L137.53 225.93L137.13 226.27L136.74 226.61L136.36 226.97L136 227.35L135.66 227.74L135.32 228.14L135.01 228.56L134.71 228.98L134.42 229.42L134.16 229.87L133.9 230.33L133.67 230.81L133.46 231.29L133.26 231.78L133.08 232.28L132.92 232.79L132.78 233.31L132.67 233.83L132.57 234.37L132.49 234.91L132.43 235.46L132.4 236.01L132.39 236.57L132.39 400L91 400L91 207.39L91.02 206.26L91.09 205.14L91.2 204.04L91.35 202.95L91.55 201.87L91.79 200.81L92.07 199.76L92.39 198.73L92.75 197.72L93.15 196.73L93.58 195.76L94.05 194.8L94.56 193.87L95.1 192.96L95.67 192.08L96.28 191.21L96.92 190.38L97.59 189.57L98.29 188.78L99.02 188.02L99.78 187.29L100.56 186.59L101.37 185.92L102.21 185.28L103.07 184.68L103.96 184.1L104.87 183.56L105.8 183.06L106.75 182.59L107.73 182.15L108.72 181.76L109.73 181.4L110.76 181.08L111.8 180.8L112.87 180.56L113.94 180.36L115.04 180.2L116.14 180.09L117.26 180.02L118.39 180L245.22 180L246.34 180.02L247.45 180.09Z"},null,-1),hl=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M412.37 413.95L412.3 415.06L412.19 416.15L412.03 417.23L411.84 418.3L411.6 419.36L411.32 420.39L411 421.42L410.65 422.42L410.25 423.4L409.82 424.37L409.36 425.31L408.86 426.24L408.32 427.14L407.75 428.02L407.15 428.88L406.51 429.71L405.85 430.51L405.15 431.29L404.43 432.04L403.68 432.76L402.9 433.46L402.1 434.12L401.27 434.76L400.41 435.36L399.53 435.93L398.63 436.47L397.7 436.97L396.76 437.43L395.79 437.86L394.81 438.26L393.81 438.61L392.78 438.93L391.75 439.21L390.69 439.45L389.62 439.64L388.54 439.8L387.45 439.91L386.34 439.98L385.22 440L258.39 440L257.26 439.98L256.14 439.91L255.04 439.8L253.94 439.64L252.87 439.44L251.8 439.2L250.76 438.92L249.73 438.6L248.72 438.24L247.73 437.85L246.75 437.41L245.8 436.94L244.87 436.44L243.96 435.9L243.07 435.32L242.21 434.72L241.37 434.08L240.56 433.41L239.78 432.71L239.02 431.98L238.29 431.22L237.59 430.43L236.92 429.62L236.28 428.79L235.67 427.92L235.1 427.04L234.56 426.13L234.05 425.2L233.58 424.24L233.15 423.27L232.75 422.28L232.39 421.27L232.07 420.24L231.79 419.19L231.55 418.13L231.35 417.05L231.2 415.96L231.09 414.86L231.02 413.74L231 412.61L231 240L272.39 240L272.39 383.43L272.4 383.99L272.43 384.54L272.49 385.09L272.57 385.63L272.67 386.17L272.78 386.69L272.92 387.21L273.08 387.72L273.26 388.22L273.46 388.71L273.67 389.19L273.9 389.67L274.16 390.13L274.42 390.58L274.71 391.02L275.01 391.44L275.32 391.86L275.66 392.26L276 392.65L276.36 393.03L276.74 393.39L277.13 393.73L277.53 394.07L277.95 394.38L278.37 394.68L278.81 394.97L279.26 395.23L279.72 395.49L280.2 395.72L280.68 395.93L281.17 396.13L281.67 396.31L282.18 396.47L282.7 396.61L283.22 396.72L283.76 396.82L284.3 396.9L284.85 396.96L285.4 396.99L285.96 397L355.53 397L356.16 396.99L356.78 396.95L357.4 396.89L358 396.8L358.6 396.69L359.2 396.56L359.78 396.4L360.35 396.22L360.91 396.02L361.47 395.8L362.01 395.56L362.54 395.3L363.06 395.02L363.57 394.71L364.06 394.39L364.54 394.06L365.01 393.7L365.46 393.33L365.89 392.94L366.32 392.53L366.72 392.11L367.11 391.67L367.49 391.22L367.84 390.75L368.18 390.27L368.5 389.78L368.8 389.27L369.08 388.76L369.34 388.23L369.59 387.68L369.81 387.13L370.01 386.57L370.18 385.99L370.34 385.41L370.47 384.82L370.58 384.22L370.67 383.61L370.73 383L370.77 382.38L370.78 381.75L370.78 240L412.39 240L412.39 412.83L412.37 413.95Z"},null,-1),fl=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M527.45 180.09L528.54 180.2L529.62 180.36L530.69 180.55L531.75 180.79L532.78 181.07L533.81 181.39L534.81 181.74L535.79 182.14L536.76 182.57L537.7 183.03L538.63 183.53L539.53 184.07L540.41 184.64L541.27 185.24L542.1 185.88L542.9 186.54L543.68 187.24L544.43 187.96L545.15 188.71L545.85 189.49L546.51 190.29L547.15 191.12L547.75 191.98L548.32 192.86L548.86 193.76L549.36 194.69L549.82 195.63L550.25 196.6L550.65 197.58L551 198.58L551.32 199.61L551.6 200.64L551.84 201.7L552.03 202.77L552.19 203.85L552.3 204.94L552.37 206.05L552.39 207.17L552.39 400L511.45 400L511.45 237.92L511.44 237.29L511.4 236.67L511.34 236.05L511.25 235.45L511.14 234.85L511.01 234.25L510.85 233.67L510.67 233.1L510.47 232.54L510.25 231.98L510.01 231.44L509.75 230.91L509.47 230.39L509.17 229.89L508.85 229.39L508.51 228.91L508.15 228.45L507.78 227.99L507.39 227.56L506.98 227.13L506.56 226.73L506.12 226.34L505.67 225.97L505.21 225.61L504.73 225.27L504.23 224.95L503.73 224.65L503.21 224.37L502.68 224.11L502.13 223.87L501.58 223.64L501.02 223.44L500.45 223.27L499.86 223.11L499.27 222.98L498.67 222.87L498.06 222.78L497.45 222.72L496.83 222.68L496.2 222.67L426.63 222.67L426.07 222.68L425.51 222.71L424.97 222.77L424.42 222.84L423.89 222.94L423.37 223.06L422.85 223.2L422.34 223.36L421.84 223.54L421.34 223.73L420.86 223.95L420.39 224.18L419.93 224.43L419.48 224.7L419.04 224.98L418.61 225.28L418.2 225.6L417.8 225.93L417.41 226.28L417.03 226.64L416.67 227.02L416.32 227.41L415.99 227.81L415.67 228.22L415.37 228.65L415.09 229.09L414.82 229.54L414.57 230L414.34 230.47L414.12 230.95L413.93 231.45L413.75 231.95L413.59 232.46L413.45 232.98L413.33 233.5L413.23 234.03L413.16 234.58L413.1 235.12L413.07 235.68L413.06 236.24L413.06 400L371 400L371 207.39L371.02 206.26L371.09 205.14L371.2 204.04L371.35 202.95L371.55 201.87L371.79 200.81L372.07 199.76L372.39 198.73L372.75 197.72L373.15 196.73L373.58 195.76L374.05 194.8L374.56 193.87L375.1 192.96L375.67 192.08L376.28 191.21L376.92 190.38L377.59 189.57L378.29 188.78L379.02 188.02L379.78 187.29L380.56 186.59L381.37 185.92L382.21 185.28L383.07 184.68L383.96 184.1L384.87 183.56L385.8 183.06L386.75 182.59L387.73 182.15L388.72 181.76L389.73 181.4L390.76 181.08L391.8 180.8L392.87 180.56L393.94 180.36L395.04 180.2L396.14 180.09L397.26 180.02L398.39 180L525.22 180L526.34 180.02L527.45 180.09Z"},null,-1),Ll=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M132.37 413.95L132.3 415.06L132.19 416.15L132.04 417.23L131.84 418.3L131.6 419.36L131.33 420.39L131.01 421.42L130.65 422.42L130.26 423.4L129.83 424.37L129.36 425.31L128.86 426.24L128.32 427.14L127.75 428.02L127.15 428.88L126.52 429.71L125.85 430.51L125.16 431.29L124.44 432.04L123.68 432.76L122.9 433.46L122.1 434.12L121.27 434.76L120.41 435.36L119.53 435.93L118.63 436.47L117.71 436.97L116.76 437.43L115.8 437.86L114.81 438.26L113.81 438.61L112.79 438.93L111.75 439.21L110.7 439.45L109.63 439.64L108.55 439.8L107.45 439.91L106.34 439.98L105.22 440L-21.61 440L-22.74 439.98L-23.86 439.91L-24.96 439.8L-26.05 439.64L-27.13 439.44L-28.19 439.2L-29.24 438.92L-30.27 438.6L-31.28 438.24L-32.27 437.85L-33.24 437.41L-34.2 436.94L-35.13 436.44L-36.04 435.9L-36.92 435.32L-37.79 434.72L-38.62 434.08L-39.43 433.41L-40.22 432.71L-40.98 431.98L-41.71 431.22L-42.41 430.43L-43.08 429.62L-43.72 428.79L-44.32 427.92L-44.9 427.04L-45.44 426.13L-45.94 425.2L-46.41 424.24L-46.85 423.27L-47.24 422.28L-47.6 421.27L-47.92 420.24L-48.2 419.19L-48.44 418.13L-48.64 417.05L-48.8 415.96L-48.91 414.86L-48.98 413.74L-49 412.61L-49 240L-7.61 240L-7.61 383.43L-7.6 383.99L-7.57 384.54L-7.51 385.09L-7.43 385.63L-7.33 386.17L-7.22 386.69L-7.08 387.21L-6.92 387.72L-6.74 388.22L-6.54 388.71L-6.33 389.19L-6.1 389.67L-5.84 390.13L-5.58 390.58L-5.29 391.02L-4.99 391.44L-4.68 391.86L-4.34 392.26L-4 392.65L-3.64 393.03L-3.26 393.39L-2.87 393.73L-2.47 394.07L-2.05 394.38L-1.63 394.68L-1.19 394.97L-0.74 395.23L-0.28 395.49L0.2 395.72L0.68 395.93L1.17 396.13L1.67 396.31L2.18 396.47L2.7 396.61L3.22 396.72L3.76 396.82L4.3 396.9L4.85 396.96L5.4 396.99L5.96 397L75.53 397L76.16 396.99L76.78 396.95L77.4 396.89L78 396.8L78.6 396.69L79.2 396.56L79.78 396.4L80.35 396.22L80.91 396.02L81.47 395.8L82.01 395.56L82.54 395.3L83.06 395.02L83.57 394.71L84.06 394.39L84.54 394.06L85.01 393.7L85.46 393.33L85.89 392.94L86.32 392.53L86.72 392.11L87.11 391.67L87.49 391.22L87.84 390.75L88.18 390.27L88.5 389.78L88.8 389.27L89.08 388.76L89.34 388.23L89.59 387.68L89.81 387.13L90.01 386.57L90.18 385.99L90.34 385.41L90.47 384.82L90.58 384.22L90.67 383.61L90.73 383L90.77 382.38L90.78 381.75L90.78 240L132.39 240L132.39 412.83L132.37 413.95Z"},null,-1),ml=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M692.37 413.95L692.3 415.06L692.19 416.15L692.04 417.23L691.84 418.3L691.6 419.36L691.33 420.39L691.01 421.42L690.65 422.42L690.26 423.4L689.83 424.37L689.36 425.31L688.86 426.24L688.32 427.14L687.75 428.02L687.15 428.88L686.52 429.71L685.85 430.51L685.16 431.29L684.44 432.04L683.68 432.76L682.9 433.46L682.1 434.12L681.27 434.76L680.41 435.36L679.53 435.93L678.63 436.47L677.71 436.97L676.76 437.43L675.8 437.86L674.81 438.26L673.81 438.61L672.79 438.93L671.75 439.21L670.7 439.45L669.63 439.64L668.55 439.8L667.45 439.91L666.34 439.98L665.22 440L538.39 440L537.26 439.98L536.14 439.91L535.04 439.8L533.95 439.64L532.87 439.44L531.81 439.2L530.76 438.92L529.73 438.6L528.72 438.24L527.73 437.85L526.76 437.41L525.8 436.94L524.87 436.44L523.96 435.9L523.08 435.32L522.21 434.72L521.38 434.08L520.57 433.41L519.78 432.71L519.02 431.98L518.29 431.22L517.59 430.43L516.92 429.62L516.28 428.79L515.68 427.92L515.1 427.04L514.56 426.13L514.06 425.2L513.59 424.24L513.15 423.27L512.76 422.28L512.4 421.27L512.08 420.24L511.8 419.19L511.56 418.13L511.36 417.05L511.2 415.96L511.09 414.86L511.02 413.74L511 412.61L511 240L552.39 240L552.39 383.43L552.4 383.99L552.43 384.54L552.49 385.09L552.57 385.63L552.67 386.17L552.78 386.69L552.92 387.21L553.08 387.72L553.26 388.22L553.46 388.71L553.67 389.19L553.9 389.67L554.16 390.13L554.42 390.58L554.71 391.02L555.01 391.44L555.32 391.86L555.66 392.26L556 392.65L556.36 393.03L556.74 393.39L557.13 393.73L557.53 394.07L557.95 394.38L558.37 394.68L558.81 394.97L559.26 395.23L559.72 395.49L560.2 395.72L560.68 395.93L561.17 396.13L561.67 396.31L562.18 396.47L562.7 396.61L563.22 396.72L563.76 396.82L564.3 396.9L564.85 396.96L565.4 396.99L565.96 397L635.53 397L636.16 396.99L636.78 396.95L637.4 396.89L638 396.8L638.6 396.69L639.2 396.56L639.78 396.4L640.35 396.22L640.91 396.02L641.47 395.8L642.01 395.56L642.54 395.3L643.06 395.02L643.57 394.71L644.06 394.39L644.54 394.06L645.01 393.7L645.46 393.33L645.89 392.94L646.32 392.53L646.72 392.11L647.11 391.67L647.49 391.22L647.84 390.75L648.18 390.27L648.5 389.78L648.8 389.27L649.08 388.76L649.34 388.23L649.59 387.68L649.81 387.13L650.01 386.57L650.18 385.99L650.34 385.41L650.47 384.82L650.58 384.22L650.67 383.61L650.73 383L650.77 382.38L650.78 381.75L650.78 240L692.39 240L692.39 412.83L692.37 413.95Z"},null,-1);ul.render=function(e,t,n,o,r,i){return an(),cn("svg",dl,[pl,hl,fl,Ll,ml])};const gl={Enabled:{block:Bi.Encoder,key:"enabled",type:is.Value,section:0,component:_i.Toggle,label:"Enable",helpText:"Encoder needs to be enabled in order to use it.\n Note that enabling the encoder disables two digital inputs (buttons)."},InvertState:{showIf:e=>e.enabled,block:Bi.Encoder,key:"invertState",type:is.Value,section:1,component:_i.Toggle,label:"Invert",helpText:"Inverts the direction of the encoder. For example, if 7Fh01h encoding mode is used, MIDI value 127 will\n be sent in backward direction, and 1 in forward direction. If inversion is enabled, value 1 will be sent when going backwards,\n and 127 when going forward. Same logic applies to any other specified encoding mode."},EncodingMode:{showIf:e=>e.enabled,block:Bi.Encoder,key:"encodingMode",type:is.Value,section:2,colspan:2,component:_i.Select,options:[{value:$i.Controlchange7F,text:"Control change - 7Fh01h"},{value:$i.Controlchange3F,text:"Control change - 3Fh41h"},{value:$i.Controlchange41,text:"Control change - 41h01h"},{value:$i.CC7bit,text:"Control change - Continuous 7-bit"},{value:$i.CC14bit,text:"Control change - Continuous 14-bit"},{value:$i.ProgramChange,text:"Program change"},{value:$i.PitchBend,text:"Pitch bend"},{value:$i.NRPN7bit,text:"NRPN/7-bit"},{value:$i.NRPN14bit,text:"NRPN/14-bit"},{value:$i.PresetChange,text:"Change preset"},{value:$i.Bpm,text:"BPM"}],label:"Message type",helpText:"Specifies the MIDI message which will be sent by the encoder. If Change Preset type is used,\n encoder will be used only to switch between the presets on the device and no MIDI message will be sent. Moving the encoder\n backward will decrement the preset by 1 and moving it forward will increment it, unless Invert option is used. In that case\n inverted logic applies. Note that in order for this option to work accross all presets, Change Preset type should be set in each preset."},MidiChannel:{showIf:e=>!Ji.includes(e.encodingMode)&&!!e.enabled,key:"midiChannel",type:is.Value,block:Bi.Encoder,section:4,component:_i.Input,min:1,max:17,label:"MIDI channel",helpText:"Setting the channel to value 17 will cause sending of data on each MIDI channel."},MidiIdLSB:{showIf:e=>!Ki.includes(e.encodingMode)&&!!e.enabled,isLsb:!0,block:Bi.Encoder,key:"midiIdLSB",type:is.Value,section:3,component:_i.Input,min:0,max:127,max2Byte:16383,label:"MIDI ID (LSB)",helpText:""},MidiIdMSB:{showIf:e=>!Ki.includes(e.encodingMode)&&!!e.enabled,isMsb:!0,block:Bi.Encoder,key:"midiIdMSB",type:is.Value,section:7,component:_i.Input,min:0,max:127,label:"MIDI ID (MSB)",helpText:""},PulsesPerStep:{showIf:e=>e.enabled,block:Bi.Encoder,key:"pulsesPerStep",type:is.Value,section:5,colspan:2,component:_i.Select,options:[{value:2,text:"2"},{value:3,text:"3"},{value:4,text:"4"}],label:"Pulses per step",helpText:"Amount of pulses encoder must generate in order for firmware to register it as single step. Usually 4."},Acceleration:{showIf:e=>es.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"acceleration",type:is.Value,section:6,component:_i.Select,options:[{value:0,text:"Disabled"},{value:1,text:"Slow"},{value:2,text:"Medium"},{value:3,text:"Fast"}],label:"Acceleration",helpText:""},RemoteSync:{showIf:e=>ts.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"remoteSync",type:is.Value,section:8,colspan:2,component:_i.Toggle,label:"Remote sync",helpText:"Used only when continuous CC (7-bit and 14-bit) or pitch bend MIDI messages are used.\n If enabled, CC/pitch bend value received via MIDI IN will be applied internally to the encoder with same MIDI ID and MIDI channel,\n so that next encoder turn increments or decrements received value instead of the last value it sent."}},vl={block:Bi.Encoder,title:"Encoder",routeName:"device-encoders",iconComponent:We(ul),componentCountResponseIndex:1,sections:gl,routes:[{path:"encoders",name:"device-encoders",component:Va,redirect:{name:"device-encoders-list"},children:[{path:"list",name:"device-encoders-list",component:wa,props:{block:Bi.Encoder,routeName:"device-encoders-form",title:"Encoder"}},{path:"encoders/:index",name:"device-encoders-form",component:fa,props:{block:Bi.Encoder,gridCols:4}}]}]};var bl=No({name:"GlobalHardware",setup(){const{valueSize:e,bootLoaderSupport:t,startFactoryReset:n,startReboot:o,startBackup:r}=md;return{modalVisible:Xe(!1),modalTitle:Xe(""),availableUpdates:Xe([]),onFactoryResetClicked:sa("This will reset all the parameters on the board to their factory settings. All analog inputs will be disabled as well. Depending on the board, this can take up to 30 seconds. Proceed?",n),valueSize:e,bootLoaderSupport:t,startReboot:o,onBackupClicked:sa("This will initiate a full backup of all parameters stored on the board. Proceed?",r),onBackupFileSelected:e=>{e.length&&md.startRestore(e[0])}}}});const yl={class:"form-grid"},Il={class:"form-field"},El=mn(" Reboot "),Cl=fn("p",{class:"help-text"}," Rebooting the device will make the UI temporarily unavailable. ",-1),wl={class:"form-field"},Sl=mn(" Reset to factory settings "),kl=fn("p",{class:"help-text"}," Resets the device to its factory settings. ",-1),xl={key:0,class:"form-field"},_l=mn(" Firmware section "),Ml=fn("p",{class:"help-text"}," Section used to reboot the device into bootloader mode and update the firmware. ",-1),Tl={class:"form-grid"},Rl={class:"form-field"},Nl=mn(" Backup "),Dl=fn("p",{class:"help-text"}," Download a backup of your configuration (incl presets). ",-1),Al={class:"form-field"},Ol=fn("p",{class:"help-text"}," Select a backup file to restore your device configuration. ",-1);bl.render=function(e,t,n,o,r,i){const s=Zt("Button"),a=Zt("ButtonLink"),l=Zt("Section"),c=Zt("FormFileInput");return an(),cn(en,null,[fn(l,{title:"Hardware settings"},{default:$t(()=>[fn("div",yl,[fn("div",Il,[fn(s,{onClick:tr(e.startReboot,["prevent"])},{default:$t(()=>[El]),_:1},8,["onClick"]),Cl]),fn("div",wl,[fn(s,{onClick:tr(e.onFactoryResetClicked,["prevent"])},{default:$t(()=>[Sl]),_:1},8,["onClick"]),kl]),e.bootLoaderSupport?(an(),cn("div",xl,[fn(a,{to:{name:"device-firmware-update"}},{default:$t(()=>[_l]),_:1}),Ml])):vn("",!0)])]),_:1}),2===e.valueSize?fn(l,{key:0,title:"Backup & Restore",class:"w-full"},{default:$t(()=>[fn("div",Tl,[fn("div",Rl,[fn(s,{onClick:tr(e.onBackupClicked,["prevent"])},{default:$t(()=>[Nl]),_:1},8,["onClick"]),Dl]),fn("div",Al,[fn(c,{label:"Restore",name:"backup-file",onChange:e.onBackupFileSelected},null,8,["onChange"]),Ol])])]),_:1}):vn("",!0)],64)};var Pl=No({name:"Global",components:{GlobalHardware:bl},setup(){const{sections:e}=ac,{supportedPresetsCount:t}=md;return{Block:Bi,sections:e,supportedPresetsCount:t}}});const Bl={class:"form-grid"},Fl={class:"form-grid"};Pl.render=function(e,t,n,o,r,i){const s=Zt("FormField"),a=Zt("Section"),l=Zt("DeviceSettings"),c=Zt("GlobalHardware");return an(),cn(en,null,[fn(l,{class:"global flex flex-wrap flex-grow",block:e.Block.Global},{default:$t(({form:t,showField:n,onSettingChange:o})=>[e.supportedPresetsCount>1?fn(a,{key:0,title:"Presets"},{default:$t(()=>[fn("div",Bl,[n(e.sections.PreservePresetState)?fn(s,{key:0,class:"col-span-2",value:t.preservePresetState,"field-definition":e.sections.PreservePresetState,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.ActivePreset)?fn(s,{key:1,value:t.activePreset,"field-definition":e.sections.ActivePreset,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0)])]),_:2},1024):vn("",!0),fn(a,{title:"MIDI"},{default:$t(()=>[fn("div",Fl,[n(e.sections.UseGlobalChannel)?fn(s,{key:0,value:t.useGlobalChannel,"field-definition":e.sections.UseGlobalChannel,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.GlobalChannel)?fn(s,{key:1,value:t.globalChannel,"field-definition":e.sections.GlobalChannel,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.StandardNoteOff)?fn(s,{key:2,value:t.standardNoteOff,"field-definition":e.sections.StandardNoteOff,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DinMidiState)?fn(s,{key:3,value:t.dinMidiState,"field-definition":e.sections.DinMidiState,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.BleMidiState)?fn(s,{key:4,value:t.bleMidiState,"field-definition":e.sections.BleMidiState,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.RunningStatus)?fn(s,{key:5,value:t.runningStatus,"field-definition":e.sections.RunningStatus,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.MIDIClock)?fn(s,{key:6,value:t.midiClock,"field-definition":e.sections.MIDIClock,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.UsbToDinThru)?fn(s,{key:7,value:t.usbToDinThru,"field-definition":e.sections.UsbToDinThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.UsbToUsbThru)?fn(s,{key:8,value:t.usbToUsbThru,"field-definition":e.sections.UsbToUsbThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.UsbToBleThru)?fn(s,{key:9,value:t.usbToBleThru,"field-definition":e.sections.UsbToBleThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DinToDinThru)?fn(s,{key:10,value:t.dinToDinThru,"field-definition":e.sections.DinToDinThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DinToUsbThru)?fn(s,{key:11,value:t.dinToUsbThru,"field-definition":e.sections.DinToUsbThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.DinToBleThru)?fn(s,{key:12,value:t.dinToBleThru,"field-definition":e.sections.DinToBleThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.BleToDinThru)?fn(s,{key:13,value:t.bleToDinThru,"field-definition":e.sections.BleToDinThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.BleToUsbThru)?fn(s,{key:14,value:t.bleToUsbThru,"field-definition":e.sections.BleToUsbThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0),n(e.sections.BleToBleThru)?fn(s,{key:15,value:t.bleToBleThru,"field-definition":e.sections.BleToBleThru,onModified:o},null,8,["value","field-definition","onModified"]):vn("",!0)])]),_:2},1024)]),_:1},8,["block"]),fn(c)],64)};var Ul=No({name:"GlobalFirmware",setup(){const{firmwareFileName:e,isBootloaderMode:t,startUpdatesCheck:n,bootLoaderSupport:o,startBootLoaderMode:r,startFirmwareUdate:i}=md,s=Xe(!1),a=Xe(!1),l=Xe([]);return{firmwareFileName:e,loading:s,isBootloaderMode:t,bootLoaderSupport:o,startBootLoaderMode:r,updatesChecked:a,checkForUpdates:async()=>{s.value=!0,l.value=await n(e.value),s.value=!1,a.value=!0},availableUpdates:l,onFirmwareFileSelected:async e=>{e.length&&await i(e[0])}}}});const Gl=fn("p",{class:"mb-6 text-sm leading-5 text-gray-500"},[mn(" Your device does not have bootloader support. "),fn("br"),mn(" To perform a manual firmware update please consult the "),fn("a",{href:"https://github.com/paradajz/OpenDeck/wiki/Firmware-update"},"wiki firmware update page"),mn(". ")],-1),Vl={class:"form-grid"},ql={key:0,class:"form-field"},$l=mn(" Check for updates "),Hl=fn("p",{class:"help-text"}," Check for newer firmware versions. ",-1),jl={key:1,class:"form-field"},zl=mn(" Bootloader mode "),Wl=fn("p",{class:"help-text"},' Starting bootloader mode is required for firmware updates. Once in bootloader mode the device can be updated using the SysEx file downloaded via "Check for updates" button. ',-1),Ql={key:2,class:"form-field"},Zl=fn("p",{class:"help-text"}," Select a firmware file to start board firmware update. UI might become unresponsive while updating. To exit from bootloader mode reboot the device manually. ",-1),Xl={key:2,class:"lg:text-center relative",style:{"min-height":"50vh"}},Yl={class:"absolute flex inset-0 opacity-75 bg-gray-900"},Kl={key:0,class:"text-sm leading-5 text-gray-200"},Jl={key:1,class:"text-sm pb-6"};Ul.render=function(e,t,n,o,r,i){const s=Zt("Section"),a=Zt("Button"),c=Zt("FormFileInput"),u=Zt("Spinner");return an(),cn(en,null,[e.bootLoaderSupport||e.isBootloaderMode?fn(s,{key:1,title:"Firmware update",class:"w-full"},{default:$t(()=>[fn("div",Vl,[e.isBootloaderMode?vn("",!0):(an(),cn("div",ql,[fn(a,{disabled:e.loading,onClick:tr(e.checkForUpdates,["prevent"])},{default:$t(()=>[$l]),_:1},8,["disabled","onClick"]),Hl])),!e.isBootloaderMode&&e.bootLoaderSupport?(an(),cn("div",jl,[fn(a,{onClick:tr(e.startBootLoaderMode,["prevent"])},{default:$t(()=>[zl]),_:1},8,["onClick"]),Wl])):vn("",!0),e.isBootloaderMode?(an(),cn("div",Ql,[fn(c,{name:"backup-file",label:"Update Firmware",disabled:!e.isBootloaderMode,onChange:e.onFirmwareFileSelected},null,8,["disabled","onChange"]),Zl])):vn("",!0)])]),_:1}):fn(s,{key:0,title:"No bootloader support",class:"w-full"},{default:$t(()=>[Gl]),_:1}),e.loading?(an(),cn("div",Xl,[fn("div",Yl,[fn(u,{class:"self-center"})])])):e.updatesChecked?fn(s,{key:3,title:"Updates",class:"w-full"},{default:$t(()=>[e.availableUpdates.length?(an(),cn("div",Jl,[(an(!0),cn(en,null,Ao(e.availableUpdates,t=>(an(),cn("div",{key:t.name,class:"release-description text-gray-200"},[fn("a",{href:"https://github.com/paradajz/OpenDeck/releases/tag/"+t.tag_name},l(t.tag_name),9,["href"]),t.firmwareFileLink?(an(),cn("a",{key:0,class:"my-3 ml-4 py-1 px-2 bg-gray-600 text-gray-300 rounded-full text-xs focus:outline-none focus:shadow-outline",target:"_blank",href:t.firmwareFileLink.browser_download_url}," Download FW file ("+l(e.firmwareFileName)+") ",9,["href"])):vn("",!0),fn("div",{innerHTML:t.html_description},null,8,["innerHTML"])]))),128))])):(an(),cn("p",Kl," Your firmware is up to date. "))]),_:1}):vn("",!0)],64)};var ec=No({name:"IconGlobal"});const tc={"aria-hidden":"true",focusable:"false","data-icon":"wrench",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",rel:"Settings by Icon Factory from the Noun Project"},nc=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M576.29 173.61C574.61 173.06 573.34 171.68 572.91 169.97C570.13 160.98 566.54 152.28 562.16 143.95C561.34 142.41 561.34 140.56 562.16 139.01C562.86 137.7 568.48 127.23 569.18 125.92C573.74 117.33 572.16 106.77 565.28 99.9C563 97.63 544.76 79.46 542.48 77.19C535.61 70.31 525.05 68.72 516.46 73.28C515.16 73.99 504.68 79.61 503.37 80.31C501.83 81.12 499.98 81.12 498.43 80.31C490.11 75.95 481.4 72.38 472.42 69.64C470.73 69.16 469.38 67.91 468.77 66.26C468.35 64.84 464.95 53.46 464.53 52.04C461.74 42.49 452.97 35.95 443.02 36C439.83 36 414.3 36 411.11 36C401.18 35.89 392.38 42.36 389.52 51.87C389.1 53.29 385.7 64.67 385.27 66.09C384.7 67.75 383.33 69.02 381.63 69.47C372.65 72.22 363.94 75.79 355.62 80.13C354.07 80.95 352.22 80.95 350.68 80.13C349.4 79.45 339.2 73.97 337.93 73.28C329.34 68.72 318.79 70.31 311.92 77.19C309.63 79.45 291.31 97.55 289.02 99.82C282.15 106.69 280.56 117.24 285.12 125.83C285.82 127.14 291.44 137.61 292.15 138.92C292.96 140.47 292.96 142.32 292.15 143.87C287.79 152.19 284.22 160.9 281.48 169.88C280.97 171.53 279.72 172.84 278.1 173.43C276.68 173.86 265.3 177.26 263.88 177.68C254.43 180.52 247.98 189.24 248.01 199.1C248.01 202.29 248.01 227.82 248.01 231.01C247.83 240.95 254.22 249.81 263.7 252.77C265.12 253.2 276.43 256.6 277.84 257.02C279.53 257.59 280.82 258.95 281.31 260.66C284.06 269.64 287.63 278.35 291.97 286.68C292.79 288.22 292.79 290.07 291.97 291.62C291.32 292.94 286.12 303.48 285.47 304.8C280.91 313.39 282.49 323.94 289.37 330.81C291.58 333.06 309.27 351.03 311.48 353.27C318.35 360.15 328.91 361.73 337.5 357.17C338.8 356.47 349.28 350.85 350.59 350.15C352.13 349.33 353.98 349.33 355.53 350.15C363.85 354.51 372.56 358.08 381.54 360.81C383.24 361.27 384.61 362.53 385.19 364.2C385.62 365.64 389.09 377.15 389.52 378.59C392.36 388.04 401.07 394.49 410.94 394.46C414.13 394.46 439.66 394.46 442.85 394.46C452.71 394.49 461.43 388.04 464.27 378.59C464.69 377.17 468.09 365.79 468.51 364.37C469.12 362.72 470.47 361.47 472.16 360.99C481.14 358.26 489.85 354.68 498.17 350.32C499.72 349.51 501.57 349.51 503.11 350.32C504.42 351.03 514.9 356.64 516.2 357.35C524.79 361.91 535.35 360.32 542.22 353.44C544.51 351.18 562.82 333.08 565.11 330.81C571.99 323.94 573.57 313.39 569.01 304.8C568.31 303.49 562.69 293.02 561.99 291.71C561.17 290.16 561.17 288.31 561.99 286.76C566.37 278.45 569.97 269.74 572.74 260.75C573.2 259.08 574.47 257.74 576.12 257.2C577.55 256.75 589 253.22 590.43 252.77C599.92 249.89 606.38 241.1 606.3 231.18C606.3 227.99 606.3 202.46 606.3 199.27C606.33 189.41 599.88 180.7 590.43 177.86C590.43 177.86 577.71 174.03 576.29 173.61ZM363 279.29C327.62 243.9 327.62 186.53 363.01 151.15C398.4 115.77 455.76 115.77 491.15 151.15C499.65 159.52 506.37 169.51 510.92 180.54C524.86 214.42 517.1 253.36 491.23 279.31C455.76 314.69 398.38 314.68 363 279.29Z"},null,-1),oc=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M400.01 242.29C414.97 257.26 439.24 257.26 454.21 242.3C469.18 227.33 469.18 203.06 454.21 188.1C454.21 188.09 454.21 188.09 454.21 188.09C439.37 173.12 415.22 173.02 400.25 187.85C400.17 187.93 400.09 188.01 400.01 188.09C385.04 203.05 385.04 227.32 400.01 242.29Z"},null,-1),rc=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M156.19 486.1C168.86 498.77 189.39 498.76 202.05 486.1C214.71 473.43 214.71 452.91 202.05 440.24C189.35 427.67 168.89 427.67 156.18 440.24C143.52 452.91 143.53 473.44 156.19 486.1Z"},null,-1),ic=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M300.38 428.62C298.91 428.24 297.72 427.18 297.17 425.76C295.03 419.02 292.34 412.46 289.11 406.16C288.39 404.81 288.39 403.18 289.11 401.83C289.5 401.09 292.62 395.2 293.01 394.46C297.57 385.89 296.02 375.35 289.2 368.45C287.67 366.93 275.46 354.79 273.94 353.27C267.07 346.39 256.51 344.81 247.92 349.37C247.19 349.76 241.29 352.88 240.55 353.27C239.2 354.01 237.57 354.01 236.22 353.27C229.92 350.05 223.36 347.35 216.62 345.21C215.2 344.66 214.14 343.47 213.76 342C213.52 341.2 211.57 334.82 211.33 334.02C208.57 324.58 199.92 318.09 190.09 318.07C187.92 318.07 170.58 318.07 168.41 318.07C158.45 317.92 149.6 324.39 146.73 333.93C146.49 334.73 144.55 341.11 144.3 341.91C143.93 343.38 142.86 344.58 141.44 345.12C134.7 347.27 128.15 349.96 121.85 353.18C120.49 353.91 118.87 353.91 117.51 353.18C116.77 352.79 110.88 349.67 110.14 349.28C101.57 344.73 91.03 346.28 84.13 353.1C82.58 354.61 70.24 366.68 68.69 368.19C61.87 375.09 60.33 385.63 64.88 394.2C65.27 394.94 68.39 400.83 68.78 401.57C69.51 402.92 69.51 404.55 68.78 405.9C65.64 412.44 63.06 419.23 61.06 426.19C60.52 427.61 59.32 428.68 57.86 429.06C57.06 429.3 50.68 431.24 49.88 431.48C40.67 434.25 34.28 442.6 34.01 452.21C34.01 454.36 34.01 471.56 34.01 473.71C33.75 483.74 40.26 492.7 49.88 495.56C50.68 495.81 57.06 497.75 57.86 497.99C59.32 498.37 60.52 499.43 61.06 500.85C63.21 507.59 65.91 514.15 69.13 520.45C69.85 521.8 69.85 523.43 69.13 524.78C68.74 525.52 65.62 531.42 65.23 532.15C60.67 540.73 62.22 551.26 69.04 558.17C70.55 559.71 82.62 572.06 84.13 573.6C90.99 580.5 101.58 582.06 110.14 577.42C110.88 577.03 116.77 573.9 117.51 573.51C118.87 572.82 120.49 572.82 121.85 573.51C128.15 576.73 134.7 579.43 141.44 581.58C142.86 582.12 143.93 583.32 144.3 584.79C144.55 585.58 146.49 591.97 146.73 592.76C149.68 602.2 158.53 608.54 168.41 608.29C170.58 608.29 187.92 608.29 190.09 608.29C199.94 608.34 208.64 601.87 211.42 592.42C211.66 591.62 213.6 585.24 213.85 584.44C214.22 582.97 215.29 581.77 216.71 581.23C223.38 579.22 229.87 576.66 236.13 573.6C237.48 572.86 239.12 572.86 240.47 573.6C241.2 573.99 247.1 577.11 247.84 577.5C256.4 582.08 266.96 580.54 273.85 573.69C275.38 572.16 287.58 559.95 289.11 558.43C295.93 551.52 297.48 540.99 292.93 532.41C292.54 531.68 289.41 525.78 289.02 525.04C288.28 523.69 288.28 522.06 289.02 520.71C292.28 514.42 294.98 507.87 297.09 501.11C297.63 499.69 298.83 498.63 300.3 498.25C301.09 498.01 307.48 496.07 308.27 495.82C317.71 493.02 324.17 484.33 324.14 474.49C324.14 472.26 324.14 454.44 324.14 452.21C324.07 442.46 317.68 433.89 308.36 431.05C308.36 431.05 301.18 428.86 300.38 428.62ZM126.65 515.63C97.68 486.63 97.7 439.63 126.7 410.66C155.7 381.69 202.7 381.71 231.67 410.71C245.57 424.62 253.38 443.47 253.39 463.13C253.45 482.85 245.61 501.78 231.62 515.68C202.62 544.65 155.63 544.63 126.65 515.63Z"},null,-1);ec.render=function(e,t,n,o,r,i){return an(),cn("svg",tc,[nc,oc,rc,ic])};const sc={PreservePresetState:{block:Bi.Global,key:"preservePresetState",type:is.Setting,section:2,settingIndex:1,component:_i.Toggle,label:"Preserve preset setting",helpText:'When disabled, first preset will always be loaded on device power on.\n Otherwise, preset specified with "Active preset" option is remembered. This is not related to saving of configuration\n to specified preset - the configuration data is always retained even after power off.'},ActivePreset:{block:Bi.Global,key:"activePreset",type:is.Setting,section:2,settingIndex:0,component:_i.Select,options:()=>{const e=Ld.state.supportedPresetsCount||1,t=[];for(let n=0;n{Ld.state.activePreset=e},label:"Active preset",helpText:"Preset stores the entire configuration for device."},UseGlobalChannel:{block:Bi.Global,key:"useGlobalChannel",type:is.Setting,section:0,settingIndex:13,component:_i.Toggle,label:"Use global channel",helpText:"When enabled, specified global MIDI channel will be used for all components. Individual channels for components will be ignored."},GlobalChannel:{showIf:e=>!!e.useGlobalChannel,block:Bi.Global,key:"globalChannel",type:is.Setting,section:0,settingIndex:14,min:1,max:17,component:_i.Input,label:"Global channel",helpText:"Setting the channel to value 17 will cause sending of data on each MIDI channel, and incoming channel for LEDs and other components will be ignored."},StandardNoteOff:{block:Bi.Global,key:"standardNoteOff",type:is.Setting,section:0,settingIndex:0,component:_i.Toggle,label:"Standard note off",helpText:"When disabled, Note On with velocity 0 will be sent as note off. If enabled, true Note Off event will be sent instead."},RunningStatus:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"runningStatus",type:is.Setting,section:0,settingIndex:1,component:_i.Toggle,label:"Running status",helpText:"This setting applies only to DIN MIDI out. When enabled,\n MIDI output bandwidth increases due to lower amount of bytes being sent. This setting can cause issues on older MIDI gear so it's best to leave it disabled."},MIDIClock:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"midiClock",type:is.Setting,section:0,settingIndex:15,component:_i.Toggle,label:"Send MIDI clock",helpText:"This setting applies only to DIN MIDI out.\n When enabled, MIDI clock will be sent out at default BPM of 120. The tempo can be changed with buttons or encoders."},DinMidiState:{block:Bi.Global,key:"dinMidiState",type:is.Setting,section:0,settingIndex:3,component:_i.Toggle,label:"DIN MIDI",helpText:"Enable or disable DIN MIDI input and output."},BleMidiState:{block:Bi.Global,key:"bleMidiState",type:is.Setting,section:0,settingIndex:9,component:_i.Toggle,label:"BLE MIDI",helpText:"Enable or disable BLE (Bluetooth Low Energy) MIDI input and output."},UsbToDinThru:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"usbToDinThru",type:is.Setting,section:0,settingIndex:4,component:_i.Toggle,label:"USB to DIN Thru",helpText:"When enabled, all data received via USB will be forwarded to DIN out."},UsbToUsbThru:{block:Bi.Global,key:"usbToUsbThru",type:is.Setting,section:0,settingIndex:5,component:_i.Toggle,label:"USB to USB Thru",helpText:"When enabled, all data received via USB will be forwarded to USB out."},UsbToBleThru:{showIf:e=>!!e.bleMidiState,block:Bi.Global,key:"usbToBleThru",type:is.Setting,section:0,settingIndex:6,component:_i.Toggle,label:"USB to BLE Thru",helpText:"When enabled, all data received via USB will be forwarded to BLE out."},DinToDinThru:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"dinToDinThru",type:is.Setting,section:0,settingIndex:7,component:_i.Toggle,label:"DIN to DIN Thru",helpText:"When enabled, all data received via DIN will be forwarded to DIN out."},DinToUsbThru:{showIf:e=>!!e.dinMidiState,block:Bi.Global,key:"dinToUsbThru",type:is.Setting,section:0,settingIndex:2,component:_i.Toggle,label:"DIN to USB Thru",helpText:"When enabled, all data received via DIN will be forwarded to USB out."},DinToBleThru:{showIf:e=>!!e.dinMidiState&&!!e.bleMidiState,block:Bi.Global,key:"dinToBleThru",type:is.Setting,section:0,settingIndex:8,component:_i.Toggle,label:"DIN to BLE Thru",helpText:"When enabled, all data received via DIN will be forwarded to BLE out."},BleToDinThru:{showIf:e=>!!e.dinMidiState&&!!e.bleMidiState,block:Bi.Global,key:"bleToDinThru",type:is.Setting,section:0,settingIndex:10,component:_i.Toggle,label:"BLE to DIN Thru",helpText:"When enabled, all data received via BLE will be forwarded to DIN out."},BleToUsbThru:{showIf:e=>!!e.bleMidiState,block:Bi.Global,key:"bleToUsbThru",type:is.Setting,section:0,settingIndex:11,component:_i.Toggle,label:"BLE to USB Thru",helpText:"When enabled, all data received via BLE will be forwarded to USB out."},BleToBleThru:{showIf:e=>!!e.bleMidiState,block:Bi.Global,key:"bleToBleThru",type:is.Setting,section:0,settingIndex:12,component:_i.Toggle,label:"BLE to BLE Thru",helpText:"When enabled, all data received via BLE will be forwarded to BLE out."}},ac={block:Bi.Global,title:"Global",routeName:"device-global",iconComponent:We(ec),sections:sc,routes:[{path:"",name:"device-global",component:Pl},{path:"firmware-update",name:"device-firmware-update",component:Ul}]};var lc=No({name:"DeviceGridWithSettings",props:{block:{required:!0,type:Number},routeName:{required:!0,type:String},settingsTitle:{default:"Global",type:String},segmentGrid:{type:Boolean,default:!1}}});lc.render=function(e,t,n,o,r,i){const s=Zt("DeviceSettings"),a=Zt("DeviceGrid");return an(),cn(en,null,[fn(s,{key:"settings-"+e.block,class:"w-full",block:e.block,title:e.settingsTitle},null,8,["block","title"]),fn(a,{key:"grid-"+e.block,class:"w-full","route-name":e.routeName,block:e.block,"segment-grid":e.segmentGrid},null,8,["route-name","block","segment-grid"])],64)};var cc=No({name:"IconLed"});const uc={"aria-hidden":"true",focusable:"false","data-icon":"lightbulb",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640",rel:"LED by Kiran Shastry from the Noun Project"},dc=fn("path",{fill:"currentColor","fill-opacity":"1",d:"M463.07 208.06C463.14 128.01 398.3 63.07 318.25 63C318.22 63 318.19 63 318.16 63C318.16 63 318.15 63 318.15 63C238.1 63.02 173.23 127.94 173.25 207.99C173.25 208.01 173.25 208.04 173.25 208.07C173.25 223.26 173.25 344.74 173.25 359.93C159.36 364.06 149.88 376.89 150.01 391.38C150.01 396.05 150.01 433.38 150.01 438.05C149.77 443.58 154.05 448.26 159.58 448.51C159.83 448.52 160.08 448.52 160.33 448.51C164.46 448.51 185.11 448.51 222.28 448.51C206.46 465.51 197.68 474.96 195.92 476.84C189.24 484.02 185.54 493.47 185.56 503.27C185.56 522.15 185.56 533.18 185.56 552.06C185.56 558.1 190.45 563 196.49 563C202.53 563 207.43 558.1 207.43 552.06C207.43 533.18 207.43 522.15 207.43 503.27C207.42 499.03 209.01 494.94 211.87 491.81C214.56 488.92 228.03 474.49 252.27 448.51L382.69 448.51C406.93 474.49 420.4 488.92 423.09 491.81C425.95 494.94 427.53 499.03 427.53 503.27C427.53 522.15 427.53 533.18 427.53 552.06C427.53 558.1 432.42 563 438.46 563C444.5 563 449.4 558.1 449.4 552.06C449.4 533.18 449.4 522.15 449.4 503.27C449.41 493.47 445.71 484.02 439.03 476.84C437.28 474.96 428.49 465.51 412.67 448.51C450.67 448.51 471.77 448.51 475.99 448.51C481.53 448.68 486.15 444.32 486.31 438.79C486.32 438.54 486.32 438.3 486.31 438.05C486.31 433.38 486.31 396.05 486.31 391.38C486.44 376.89 476.96 364.06 463.07 359.93C463.07 359.93 463.07 223.25 463.07 208.06ZM195.12 208.07C195.04 140.11 250.06 84.96 318.02 84.87C318.06 84.87 318.11 84.87 318.15 84.87C318.15 84.87 318.16 84.87 318.16 84.87C386.12 84.88 441.2 139.97 441.2 207.93C441.2 207.98 441.2 208.02 441.2 208.07C441.2 218.08 441.2 268.16 441.2 358.29L195.12 358.29C195.12 278.17 195.12 228.1 195.12 208.07ZM464.44 426.64L171.88 426.64C171.88 405.48 171.88 393.73 171.88 391.38C171.88 385.35 176.17 380.16 182.2 380.16C209.39 380.16 426.93 380.16 454.12 380.16C460.15 380.16 464.44 385.35 464.44 391.38C464.44 396.08 464.44 407.84 464.44 426.64Z"},null,-1);cc.render=function(e,t,n,o,r,i){return an(),cn("svg",uc,[dc])};const pc={BlinkWithMidiClock:{block:Bi.Led,key:"blinkWithMidiClock",type:is.Setting,section:2,settingIndex:0,component:_i.Toggle,label:"Blink with MIDI clock",helpText:"Enables or disables LED blinking via MIDI clock. When enabled, MIDI clock is used to toggle LED state. Otherwise, internal timer is used."},StartupAnimation:{key:"startupAnimation",type:is.Setting,section:2,settingIndex:2,component:_i.Toggle,label:"Start-up animation",helpText:"Enables or disables LED animation when the device is powered on.",block:Bi.Led},UseMidiProgramChangeOffset:{key:"useMidiProgramChangeOffset",type:is.Setting,section:2,settingIndex:3,component:_i.Toggle,label:"Use MIDI Program Change Offset",helpText:"When enabled, current internal Program Change Offset will be appended to configured activation ID, if the LED is configured to react to Program Change.",block:Bi.Led},LedColorTesting:{key:"ledColorTesting",type:is.Value,section:0,component:_i.Select,options:[{value:0,text:"Off (no color)"},{value:1,text:"Red"},{value:2,text:"Green"},{value:3,text:"Yellow"},{value:4,text:"Blue"},{value:5,text:"Magenta"},{value:6,text:"Cyan"},{value:7,text:"White"}],label:"LED color testing",helpText:"",block:Bi.Led},ActivationNote:{key:"activationNote",type:is.Value,section:3,component:_i.Input,min:0,max:127,label:"Activation ID",helpText:"",block:Bi.Led},RGBEnable:{showIf:e=>!rs.includes(e.controlType),key:"rgbEnable",type:is.Value,section:4,component:_i.Toggle,label:"RGB Enable",helpText:"",block:Bi.Led},ControlType:{key:"controlType",type:is.Value,section:5,component:_i.Select,options:[{value:ji.MidiInNoteMultiValue,text:"MIDI in / Note (Multi value)"},{value:ji.MidiInCcMultiValue,text:"MIDI in / CC (Multi value)"},{value:ji.MidiInNoteSingleValue,text:"MIDI in / Note (Single value)"},{value:ji.MidiInCcSingleValue,text:"MIDI in / CC (Single value)"},{value:ji.LocalNoteMultiValue,text:"Local / Note (Multi value)"},{value:ji.LocalCcMultiValue,text:"Local / CC (Multi value)"},{value:ji.LocalNoteSingleValue,text:"Local / Note (Single value)"},{value:ji.LocalCcSingleValue,text:"Local / CC (Single value)"},{value:ji.ProgramChange,text:"Program change"},{value:ji.PresetChange,text:"Preset change"}],label:"Control type",helpText:"",block:Bi.Led},ActivationValue:{showIf:e=>!ns.includes(e.controlType),key:"activationValue",type:is.Value,section:6,component:_i.Input,min:0,max:127,label:"Activation Value",helpText:"",block:Bi.Led},MidiChannel:{showIf:e=>!os.includes(e.controlType),key:"midiChannel",type:is.Value,block:Bi.Led,section:7,component:_i.Input,min:1,max:17,label:"MIDI channel",helpText:"Setting the channel to value 17 will ignore the specified MIDI channel."}},hc={block:Bi.Led,title:"LED",routeName:"device-leds",iconComponent:We(cc),componentCountResponseIndex:3,sections:pc,routes:[{path:"leds",name:"device-leds",component:Va,redirect:{name:"device-leds-list"},children:[{path:"list",name:"device-leds-list",component:lc,props:{block:Bi.Led,routeName:"device-leds-form",segmentGrid:!0}},{path:"leds/:index",name:"device-leds-form",component:fa,props:{block:Bi.Led}}]}]};var fc=No({name:"IconTouchscreen"});const Lc={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 640 640","xml:space":"preserve"},mc=fn("path",{d:"M570 487.13L570.41 487.12L570.82 487.09L571.22 487.05L571.62 487L572.02 486.92L572.4 486.84L572.79 486.73L573.16 486.62L573.53 486.49L573.89 486.34L574.25 486.18L574.6 486.01L574.94 485.83L575.27 485.63L575.59 485.42L575.91 485.2L576.21 484.96L576.51 484.72L576.79 484.46L577.07 484.2L577.34 483.92L577.59 483.63L577.84 483.34L578.07 483.03L578.29 482.72L578.5 482.39L578.7 482.06L578.88 481.72L579.06 481.37L579.21 481.02L579.36 480.66L579.49 480.29L579.61 479.91L579.71 479.53L579.8 479.14L579.87 478.75L579.93 478.35L579.97 477.95L579.99 477.54L580 477.13L580 171.61L579.99 171.2L579.97 170.79L579.93 170.39L579.87 169.99L579.8 169.59L579.71 169.21L579.61 168.82L579.49 168.45L579.36 168.08L579.21 167.72L579.06 167.36L578.88 167.01L578.7 166.67L578.5 166.34L578.29 166.02L578.07 165.7L577.84 165.4L577.59 165.1L577.34 164.81L577.07 164.54L576.79 164.27L576.51 164.02L576.21 163.77L575.91 163.54L575.59 163.32L575.27 163.11L574.94 162.91L574.6 162.73L574.25 162.55L573.89 162.4L573.53 162.25L573.16 162.12L572.79 162L572.4 161.9L572.02 161.81L571.62 161.74L571.22 161.68L570.82 161.64L570.41 161.62L570 161.61L70.21 161.61L69.8 161.62L69.39 161.64L68.99 161.68L68.59 161.74L68.2 161.81L67.81 161.9L67.43 162L67.05 162.12L66.68 162.25L66.32 162.4L65.96 162.55L65.62 162.73L65.28 162.91L64.94 163.11L64.62 163.32L64.31 163.54L64 163.77L63.7 164.02L63.42 164.27L63.14 164.54L62.87 164.81L62.62 165.1L62.37 165.4L62.14 165.7L61.92 166.02L61.71 166.34L61.51 166.67L61.33 167.01L61.16 167.36L61 167.72L60.85 168.08L60.72 168.45L60.61 168.82L60.5 169.21L60.42 169.59L60.34 169.99L60.29 170.39L60.25 170.79L60.22 171.2L60.21 171.61L60.21 477.13L60.22 477.54L60.25 477.95L60.29 478.35L60.34 478.75L60.42 479.14L60.5 479.53L60.61 479.91L60.72 480.29L60.85 480.66L61 481.02L61.16 481.37L61.33 481.72L61.51 482.06L61.71 482.39L61.92 482.72L62.14 483.03L62.37 483.34L62.62 483.63L62.87 483.92L63.14 484.2L63.42 484.46L63.7 484.72L64 484.96L64.31 485.2L64.62 485.42L64.94 485.63L65.28 485.83L65.62 486.01L65.96 486.18L66.32 486.34L66.68 486.49L67.05 486.62L67.43 486.73L67.81 486.84L68.2 486.92L68.59 487L68.99 487.05L69.39 487.09L69.8 487.12L70.21 487.13L193.83 487.13L205.17 507.13L50.21 507.13L49.8 507.12L49.39 507.09L48.99 507.05L48.59 507L48.2 506.92L47.81 506.84L47.43 506.73L47.05 506.62L46.68 506.49L46.32 506.34L45.96 506.18L45.62 506.01L45.28 505.83L44.94 505.63L44.62 505.42L44.31 505.2L44 504.96L43.7 504.72L43.42 504.46L43.14 504.2L42.87 503.92L42.62 503.63L42.37 503.34L42.14 503.03L41.92 502.72L41.71 502.39L41.51 502.06L41.33 501.72L41.16 501.37L41 501.02L40.85 500.66L40.72 500.29L40.61 499.91L40.5 499.53L40.42 499.14L40.34 498.75L40.29 498.35L40.25 497.95L40.22 497.54L40.21 497.13L40.21 151.61L40.22 151.2L40.25 150.79L40.29 150.39L40.34 149.99L40.42 149.59L40.5 149.21L40.61 148.82L40.72 148.45L40.85 148.08L41 147.72L41.16 147.36L41.33 147.01L41.51 146.67L41.71 146.34L41.92 146.02L42.14 145.7L42.37 145.4L42.62 145.1L42.87 144.81L43.14 144.54L43.42 144.27L43.7 144.02L44 143.77L44.31 143.54L44.62 143.32L44.94 143.11L45.28 142.91L45.62 142.73L45.96 142.55L46.32 142.4L46.68 142.25L47.05 142.12L47.43 142L47.81 141.9L48.2 141.81L48.59 141.74L48.99 141.68L49.39 141.64L49.8 141.62L50.21 141.61L590 141.61L590.41 141.62L590.82 141.64L591.22 141.68L591.62 141.74L592.02 141.81L592.4 141.9L592.79 142L593.16 142.12L593.53 142.25L593.89 142.4L594.25 142.55L594.6 142.73L594.94 142.91L595.27 143.11L595.59 143.32L595.91 143.54L596.21 143.77L596.51 144.02L596.79 144.27L597.07 144.54L597.34 144.81L597.59 145.1L597.84 145.4L598.07 145.7L598.29 146.02L598.5 146.34L598.7 146.67L598.88 147.01L599.06 147.36L599.21 147.72L599.36 148.08L599.49 148.45L599.61 148.82L599.71 149.21L599.8 149.59L599.87 149.99L599.93 150.39L599.97 150.79L599.99 151.2L600 151.61L600 497.13L599.99 497.54L599.97 497.95L599.93 498.35L599.87 498.75L599.8 499.14L599.71 499.53L599.61 499.91L599.49 500.29L599.36 500.66L599.21 501.02L599.06 501.37L598.88 501.72L598.7 502.06L598.5 502.39L598.29 502.72L598.07 503.03L597.84 503.34L597.59 503.63L597.34 503.92L597.07 504.2L596.79 504.46L596.51 504.72L596.21 504.96L595.91 505.2L595.59 505.42L595.27 505.63L594.94 505.83L594.6 506.01L594.25 506.18L593.89 506.34L593.53 506.49L593.16 506.62L592.79 506.73L592.4 506.84L592.02 506.92L591.62 507L591.22 507.05L590.82 507.09L590.41 507.12L590 507.13L459.78 507.13L459.78 487.13L570 487.13Z",fill:"currentColor"},null,-1),gc=fn("path",{d:"M314.58 279.29C314.58 279.39 314.59 279.9 314.61 280.83C314.61 311.57 314.61 328.65 314.61 332.07C317.72 332.07 320.82 330.52 325.48 330.52C339.46 330.52 350.33 336.73 356.54 347.6C361.19 344.49 365.85 342.94 372.06 342.94C386.04 342.94 396.91 349.15 403.12 360.02C406.22 358.47 412.44 356.91 417.09 356.91C435.18 356.91 448.88 371.54 452.5 390.86C452.53 390.98 452.63 391.57 452.81 392.63C452.81 449.46 452.81 481.03 452.81 487.35C452.81 552.56 401.57 605.36 337.9 605.36C297.53 605.36 260.27 583.62 240.08 547.9C236.97 543.25 230.76 533.93 224.55 523.06C209.02 498.22 190.39 465.61 179.52 446.97C173.31 437.66 170.21 417.47 188.84 403.5C202.46 392.91 220.49 398.53 242.96 420.37C243.07 420.49 243.67 421.08 244.74 422.13C244.74 338.28 244.74 291.7 244.74 282.38C244.74 263.75 260.27 248.22 278.9 248.22C298.52 248.22 313.75 261.43 314.58 279.29ZM264.97 281.36C264.96 281.43 264.95 281.77 264.92 282.38C264.92 383.93 264.92 440.35 264.92 451.63C264.92 456.29 261.82 460.95 257.16 462.5C252.5 464.05 247.84 462.5 244.74 459.4C219.89 428.34 202.81 419.02 199.71 420.58C193.5 425.24 195.05 429.89 196.6 431.45C207.47 451.63 227.66 484.24 241.63 507.53C247.84 519.95 254.05 529.27 257.16 533.93C274.24 561.88 302.19 578.96 334.8 578.96C385.28 578.96 425.22 538.26 426.38 486.56C426.39 486.41 426.39 485.63 426.41 484.24C427.34 428.34 427.86 397.29 427.96 391.08C427.96 384.86 423.3 380.21 418.65 380.21C412.8 380.21 408.33 384.33 407.82 390C407.82 390.07 407.81 390.43 407.78 391.08C407.78 401.32 407.78 407.02 407.78 408.16C407.78 415.92 403.12 420.58 395.36 420.58C388 420.58 383.43 415 382.97 409.14C382.97 409.07 382.96 408.74 382.93 408.16C382.93 391.39 382.93 382.07 382.93 380.21C382.93 373.99 378.27 367.78 372.06 367.78C366.18 367.78 360.3 373.36 359.69 379.23C359.69 379.29 359.67 379.62 359.64 380.21C359.64 396.98 359.64 406.29 359.64 408.16C359.64 415.92 354.98 420.58 347.22 420.58C339.86 420.58 335.3 415 334.84 409.14C334.83 409.07 334.82 408.74 334.8 408.16C334.8 382.07 334.8 367.58 334.8 364.68C334.8 358.47 330.14 353.81 323.93 353.81C316.6 353.81 312.03 357.96 311.55 363.66C311.55 363.73 311.53 364.07 311.51 364.68C311.51 390.76 311.51 405.26 311.51 408.16C310.05 413.98 305.87 418.44 300.23 418.97C300.15 418.97 299.77 418.99 299.08 419.02C298.47 418.99 298.13 418.97 298.06 418.97C292.71 418.37 288.71 413.14 288.26 407.64C288.25 407.57 288.24 407.22 288.22 406.6C288.22 331.14 288.22 289.21 288.22 280.83C288.22 276.17 283.56 271.51 277.35 271.51C270.01 271.51 265.45 275.67 264.97 281.36ZM348.77 276.17C348.77 288.59 345.67 301.02 339.46 311.88C337.9 316.54 334.8 318.1 330.14 318.1C327.03 318.1 325.48 318.1 323.93 316.54C317.72 313.44 316.16 307.23 319.27 299.46C323.93 293.25 325.48 283.94 325.48 276.17C325.48 251.33 305.3 229.59 278.9 229.59C254.05 229.59 232.32 249.77 232.32 276.17C232.32 283.94 233.87 291.7 236.97 297.91C240.08 304.12 238.53 310.33 232.32 313.44C226.1 316.54 219.89 314.99 216.79 308.78C212.13 297.91 209.02 287.04 209.02 276.17C209.02 237.35 240.08 206.3 278.9 206.3C317.72 206.3 348.77 237.35 348.77 276.17Z",fill:"currentColor"},null,-1);fc.render=function(e,t,n,o,r,i){return an(),cn("svg",Lc,[mc,gc])};const vc={Enabled:{block:Bi.Touchscreen,key:"enableTouchscreen",type:is.Setting,section:0,settingIndex:0,component:_i.Toggle,label:"Enable",helpText:"Enables or disables the usage of touchscreen."},FlashingMode:{showIf:e=>e.enableTouchscreen,block:Bi.Touchscreen,key:"touchscreenFlashingMode",type:is.Setting,section:0,settingIndex:4,component:_i.Toggle,label:"Flashing mode",helpText:"Used to bypass communication with the screen to the virtual OpenDeck serial port.\n Useful when flashing the screen via Nextion GUI. When enabled, screen is unavailable to MIDI part of the firmware."},DisplayManufacturer:{showIf:e=>e.enableTouchscreen&&!e.touchscreenFlashingMode,block:Bi.Touchscreen,key:"touchscreenManufacturer",type:is.Setting,section:0,settingIndex:1,component:_i.Select,options:[{value:0,text:"Nextion"}],label:"Touchscreen manufacturer",helpText:""},Brightness:{showIf:e=>e.enableTouchscreen&&!e.touchscreenFlashingMode,block:Bi.Touchscreen,key:"touchscreenBrightness",type:is.Setting,section:0,settingIndex:2,component:_i.Select,options:[{value:0,text:"10%"},{value:1,text:"25%"},{value:2,text:"50%"},{value:3,text:"75%"},{value:4,text:"80%"},{value:5,text:"90%"},{value:6,text:"100%"}],label:"Touchscreen brightness",helpText:""},InitialScreen:{showIf:e=>e.enableTouchscreen,block:Bi.Touchscreen,key:"initialScreen",type:is.Setting,section:0,settingIndex:3,min:0,max:15,component:_i.Input,label:"Initial screen",helpText:"This will set the screen index which will be loaded on startup."},XPosition:{block:Bi.Touchscreen,key:"xPosition",type:is.Value,section:1,min:0,max:16383,component:_i.Input,label:"X position of this icon",helpText:"Specifies X coordinate on touchscreen where this icon is located. Touchscreen resolution\n needs to be taken into account here."},YPosition:{block:Bi.Touchscreen,key:"yPosition",type:is.Value,section:2,min:0,max:16383,component:_i.Input,label:"Y position of this icon",helpText:"Specifies Y coordinate on touchscreen where this icon is located. Touchscreen resolution\n needs to be taken into account here."},Width:{block:Bi.Touchscreen,key:"width",type:is.Value,section:3,min:0,max:1023,component:_i.Input,label:"Width of this icon",helpText:"Specifies width of this icon. Touchscreen resolution\n needs to be taken into account here."},Height:{block:Bi.Touchscreen,key:"height",type:is.Value,section:4,min:0,max:639,component:_i.Input,label:"Height of this icon",helpText:"Specifies height of this icon. Touchscreen resolution\n needs to be taken into account here."},ScreenOn:{block:Bi.Touchscreen,key:"screenOn",type:is.Value,section:5,min:0,max:15,component:_i.Input,label:"Screen index of this icon in on state",helpText:"Specifies screen on which this icon in on state is located."},ScreenOff:{block:Bi.Touchscreen,key:"screenOff",type:is.Value,section:6,min:0,max:15,component:_i.Input,label:"Screen index of this icon in off state",helpText:"Specifies screen on which this icon in off state is located."},ButtonChangesScreen:{block:Bi.Touchscreen,key:"buttonChangesScreen",type:is.Value,section:7,component:_i.Toggle,label:"Button changes screen",helpText:"Specifies whether this button is used to switch to another screen."},ScreenToSwitchTo:{showIf:e=>!!e.buttonChangesScreen,block:Bi.Touchscreen,key:"screenToSwitchTo",type:is.Value,section:8,min:0,max:15,component:_i.Input,label:"Screen to switch to",helpText:"Screen to which this button switches to."}},bc={block:Bi.Touchscreen,title:"Touchscreen",routeName:"device-touchscreens",iconComponent:We(fc),componentCountResponseIndex:4,sections:vc,routes:[{path:"touchscreens",name:"device-touchscreens",component:Va,redirect:{name:"device-touchscreens-list"},children:[{path:"list",name:"device-touchscreens-list",component:lc,props:{block:Bi.Touchscreen,routeName:"device-touchscreens-form",settingsTitle:""}},{path:"touchscreens/:index",name:"device-touchscreens-form",component:fa,props:{block:Bi.Touchscreen,gridCols:4}}]}]},yc={[Bi.Global]:ac,[Bi.Analog]:za,[Bi.Button]:el,[Bi.Encoder]:vl,[Bi.Led]:hc,[Bi.Display]:cl,[Bi.Touchscreen]:bc},Ic=(e,t)=>Object.values(yc[e].sections).reduce((e,n)=>(t&&n.type!==t||(e[n.key]=null),e),{}),Ec=Object.values(yc).reduce((e,t)=>(e.push(...t.routes),e),[]);var Cc,wc;(wc=Cc||(Cc={})).CloseConnection="CloseConnection",wc.Handshake="Handshake",wc.GetValueSize="GetValueSize",wc.GetValuesPerMessage="GetValuesPerMessage",wc.GetFirmwareVersion="GetFirmwareVersion",wc.IdentifyBoard="IdentifyBoard",wc.GetFirmwareVersionAndHardwareUid="GetFirmwareVersionAndHardwareUid",wc.GetNumberOfSupportedComponents="GetNumberOfSupportedComponents",wc.GetNumberOfSupportedPresets="GetNumberOfSupportedPresets",wc.Reboot="Reboot",wc.Backup="Backup",wc.GetBootLoaderSupport="GetBootLoaderSupport",wc.BootloaderMode="BootloaderMode",wc.FactoryReset="FactoryReset",wc.GetValue="GetValue",wc.SetValue="SetValue",wc.GetSectionValues="GetSectionValues",wc.RestoreBackup="RestoreBackup",wc.FirmwareUpdate="FirmwareUpdate";const Sc={[Cc.Handshake]:{key:Cc.Handshake,type:as.Predefined,specialRequestId:1,isConnectionInfoRequest:!0},[Cc.CloseConnection]:{key:Cc.CloseConnection,type:as.Predefined,specialRequestId:0,expectsNoResponse:!0,isConnectionInfoRequest:!0},[Cc.GetValueSize]:{key:Cc.GetValueSize,type:as.Predefined,isConnectionInfoRequest:!0,specialRequestId:2,parser:e=>e.length>1?Vs(e)[0]:e[0]||1},[Cc.GetValuesPerMessage]:{key:Cc.GetValuesPerMessage,type:as.Predefined,isConnectionInfoRequest:!0,specialRequestId:3,decodeDoubleByte:!0,parser:e=>e[0]},[Cc.GetFirmwareVersion]:{key:Cc.GetFirmwareVersion,type:as.Custom,specialRequestId:86,isConnectionInfoRequest:!0,decodeDoubleByte:!0,parser:e=>"v"+e[0]+"."+e[1]+"."+e[2]},[Cc.IdentifyBoard]:{key:Cc.IdentifyBoard,type:as.Custom,specialRequestId:66,decodeDoubleByte:!0,parser:e=>e.slice(0,4)},[Cc.GetFirmwareVersionAndHardwareUid]:{key:Cc.GetFirmwareVersionAndHardwareUid,type:as.Custom,isConnectionInfoRequest:!0,specialRequestId:67},[Cc.GetNumberOfSupportedComponents]:{key:Cc.GetNumberOfSupportedComponents,type:as.Custom,specialRequestId:77,decodeDoubleByte:!0,parser:e=>{const t={};return Object.values(yc).forEach(n=>{void 0!==n.componentCountResponseIndex&&(t[n.block]=e[n.componentCountResponseIndex])}),t}},[Cc.GetNumberOfSupportedPresets]:{key:Cc.GetNumberOfSupportedPresets,type:as.Custom,specialRequestId:80,isConnectionInfoRequest:!0,decodeDoubleByte:!0,parser:e=>e[0]},[Cc.Reboot]:{key:Cc.Reboot,type:as.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:127},[Cc.GetBootLoaderSupport]:{key:Cc.GetBootLoaderSupport,type:as.Custom,specialRequestId:81,decodeDoubleByte:!0,parser:e=>e[0]},[Cc.BootloaderMode]:{key:Cc.BootloaderMode,type:as.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:85},[Cc.FactoryReset]:{key:Cc.FactoryReset,type:as.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:68},[Cc.Backup]:{key:Cc.Backup,type:as.Custom,specialRequestId:27,hasMultiPartResponse:!0,isSystemOperation:!0},[Cc.GetValue]:{key:Cc.GetValue,type:as.Configuration,decodeDoubleByte:!0,responseEmbedsRequest:!0,getPayload:(e,t)=>{const n=[Ri.Request,0,Di.Get,Oi.Single,e.block,e.section];return 1===t.valueSize?n.push(e.index):n.push(...$s(e.index),0,0),n}},[Cc.SetValue]:{key:Cc.SetValue,type:as.Configuration,decodeDoubleByte:!0,responseEmbedsRequest:!0,getPayload:(e,t)=>{const n=[Ri.Request,0,Di.Set,Oi.Single,e.block,e.section];return 1===t.valueSize?n.push(e.index,e.value):n.push(...$s(e.index),...$s(e.value)),n}},[Cc.GetSectionValues]:{key:Cc.GetSectionValues,type:as.Configuration,decodeDoubleByte:!0,responseEmbedsRequest:!0,hasMultiPartResponse:!0,getPayload:(e,t)=>{const n=[Ri.Request,126,Di.Get,Oi.All,e.block,e.section];return 1===t.valueSize?n.push(0):n.push(0,0,0,0),n}},[Cc.RestoreBackup]:{key:Cc.RestoreBackup,type:as.Custom,isSystemOperation:!0},[Cc.FirmwareUpdate]:{key:Cc.FirmwareUpdate,type:as.Custom,isSystemOperation:!0,expectsNoResponse:!0}},kc=e=>{const t=yc[e.block];if(!t)throw new Error(`Missing block definition for block "${e.block}"`);return Object.values(t.sections).find(t=>(t=>t.section===e.section)(t)&&(!(e=>e.type===is.Setting)(t)||(t=>t.settingIndex===e.index)(t)))},xc=()=>Xs.connectionState===Qs.Pending,_c=()=>Xs.connectionState===Qs.Open,Mc={isConnecting:Ro(()=>xc()),isConnected:Ro(()=>_c())};let Tc=null,Rc=null;const Nc=e=>{Xs.connectionState=e},Dc=async()=>{Ac();try{_c()||xc()||await Bc(),Oc();const e=jp.currentRoute.value.matched.some(e=>"device"===e.name);if(1===Xs.outputs.length&&!e){const e=Xs.outputs[0].name.includes("OpenDeck DFU")?"device-firmware-update":"device";jp.push({name:e,params:{outputId:Xs.outputs[0].id}})}}catch(e){Hu.error("MIDI Connection watcher error",e)}Rc=setTimeout(Dc,500)},Ac=()=>{Rc&&(clearTimeout(Rc),Rc=null)},Oc=async()=>{Xs.inputs=Js.inputs.filter(e=>e.name.includes("OpenDeck")&&!e.name.includes("BLE")),Xs.outputs=Js.outputs.filter(e=>e.name.includes("OpenDeck")&&!e.name.includes("BLE"))},Pc=async e=>{await Bc();const t=Js.outputs.find(t=>t.id===e);if(!t)return Ws(250).then(()=>Pc(e));const n=Js.inputs.filter(e=>e.name===t.name);return n.length?(async(e,t)=>new Promise((n,o)=>{let r,i=!1;const s=e.name.includes("OpenDeck DFU");if(s)return r=t.find(e=>e.name.includes("OpenDeck DFU")),i=!0,n({input:r,output:e,isBootloaderMode:s});const a=o=>{r=o.target;const a=7===o.data.length?1:2;t.forEach(e=>{e.removeListener("sysex","all")}),i=!0,n({input:r,output:e,isBootloaderMode:s,valueSize:a})};return t.forEach(e=>{e.removeListener("sysex","all"),e.addListener("sysex","all",a)}),e.sendSysex(Ti,[0,0,1]),Ws(1e3).then(()=>{i||(Hu.error("INITIAL HANDSHAKE TIMED OUT, RETRYING"),o("TIMED OUT"))})}).catch(()=>Pc(e.id)))(t,n):Ws(250).then(()=>Pc(e))},Bc=async()=>{if(Js.supported){if(Xs.isWebMidiSupported=!0,Tc)return Tc;if(!Js.enabled)return Tc=Fc(),Tc;Nc(Qs.Open)}},Fc=async()=>new Promise((e,t)=>{if(Js.enabled)return Nc(Qs.Open),e();Nc(Qs.Pending),Js.enable((function(n){if(!n)return Oc(),Nc(Qs.Open),Tc=null,e();Hu.error("Failed to load WebMidi",n),t(n)}),!0)}),Uc={state:Xs,computed:Mc,actions:{loadMidi:Bc,matchInputOutput:Pc,assignInputs:Oc,findOutputById:e=>Js.outputs.find(t=>t.id===e),startMidiConnectionWatcher:()=>Dc(),stopMidiConnectionWatcher:Ac}},Gc=As(Uc);var Vc,qc,$c,Hc;(qc=Vc||(Vc={})).Info="info",qc.Midi="midi",qc.Request="request",qc.Error="error",(Hc=$c||($c={})).Midi="midi",Hc.System="system";const jc={[$c.Midi]:!0},zc={};Object.values(Bi).forEach(e=>{zc[e]={}});const Wc=Ge({...{stack:[],highlights:zc,logFilter:jc,showRequestLog:!1,showHexValues:!1,suspendMidiLogs:!1},logFilter:Os("logFilter")||jc,showRequestLog:Os("showRequestLog")||!1});var Qc,Zc,Xc,Yc;(Zc=Qc||(Qc={})).Closed="closed",Zc.Pending="pending",Zc.Open="open",(Yc=Xc||(Xc={})).NotSupported="not_supported",Yc.MissingIndex="missing_index",Yc.UartInterfaceAllocated="uart_interface_allocated",Yc.CdcInterfaceAllocated="cdc_interface_allocated";const Kc=Xe({}),Jc={activeRequestId:Xe(null),nextRequestId:100},eu=()=>{Bu(),Jc.activeRequestId.value=null,Jc.nextRequestId=100,Kc.value={}},tu=e=>Sc[e],nu=async e=>{const t=(Jc.nextRequestId+=1,Jc.nextRequestId);if(Kc.value[t])return void qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_ID_CONFLICT,requestId:t});const{specialRequestId:n,isConnectionInfoRequest:o}=tu(e.command),r={...e,id:t,specialRequestId:n,state:cs.Pending,responseCount:0,time:{created:new Date,started:null,finished:null}};return Kc.value[t]=r,qu.actions.addRequest(t),o||await od(),Jc.activeRequestId.value?void 0:ou(t)},ou=async e=>{Pu(!0);const t=Kc.value[e];if(t)if(Jc.activeRequestId.value)qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_ALREADY_ACTIVE,requestId:e});else try{const n=tu(t.command);n.isSystemOperation&&(fs.isSystemOperationRunning=!0),fs.output.sendSysex(Ti,Array.from(t.payload)),t.time.started=new Date,Jc.activeRequestId.value=e,t.state=cs.Sent,n.expectsNoResponse?(Jc.activeRequestId.value=null,t.state=cs.Done,t.promiseResolve()):t.command===Cc.RestoreBackup&&Ws(2e3).then(()=>{t.state===cs.Sent&&au(t,Ys.UI_QUEUE_REQ_TIMED_OUT)})}catch(e){au(t,Ys.UI_QUEUE_REQUEST_SEND_ERROR)}else qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_DATA_MISSING,requestId:e})},ru=(e,t,n)=>{const{data:o}=e,{decodeDoubleByte:r,responseEmbedsRequest:i}=t;let s=o;try{if(r){const r=i?((e,t,n)=>{const{data:o,messageStatus:r,messagePart:i}=e,{hasMultiPartResponse:s}=t,a=s?[1,i,...n.payload.slice(2)]:[1,...n.payload.slice(1)],l=[r,i,...o],c=l.slice(0,a.length);return Hs(a,c)||qu.actions.addError({errorCode:Ys.UI_QUEUE_EMBEDED_RESPONSE_MISMATCH}),l.slice(a.length)})(e,t,n):o;s=Vs(r)}}catch(e){return void qu.actions.addError({errorCode:Ys.UI_QUEUE_REQUEST_DECODE_ERROR,payload:o,error:e})}return t.parser?t.parser(s):s},iu=e=>{if((e=>{if(73!==Array.from(e)[6])return!1;const t=e[7],n=2===fs.valueSize?Vs(e.slice(8,10))[0]:e[8];return qu.actions.addInfo({block:t,index:n,payload:e}),!0})(e.data))return;if((e=>6===e.data.length&&Object.keys(hu).includes(String(e.data[4])))(e))return void qu.actions.addMidi({type:hu[e.data[4]],data:[e.data[4]]});const t=(()=>{const e=Jc.activeRequestId.value;if(!e)return;const t=Kc.value[e];return t||qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_NONE_ACTIVE,requestId:e}),t})();if(!t)return;if(t.state!==cs.Sent)return void qu.actions.addError({errorCode:Ys.UI_QUEUE_REQ_NONE_ACTIVE,payload:e.data});t.responseCount++;const n=tu(t.command),{hasMultiPartResponse:o}=n,r=t.command===Cc.Backup,i=2===fs.valueSize;if(i&&!r&&t.specialRequestId&&e.data[6]!==t.specialRequestId)return;let s;try{s=((e,t)=>{const n=Array.from(e);if(t.command===Cc.Backup)return{messageStatus:1,messagePart:0,data:n};const o=n[4],r=n[5],i=n.slice(6,-1),{specialRequestId:s}=tu(t.command);return([1,2].includes(s)&&i.length||s&&2===fs.valueSize)&&i.shift(),{messageStatus:o,messagePart:r,data:i}})(e.data,t)}catch(e){return void logger.error("Failed to process event data",e)}const{messageStatus:a,messagePart:l,data:c}=s;if(a>1)return au(t,a);let u;r||(u=i?ru(s,n,t):((e,t)=>t.parser?t.parser(e.data):e.data)(s,n));const{handler:d}=t,p=d(u||c)||t.command===Cc.GetSectionValues&&126===l;return!o||p?su(t,s,u):void 0},su=(e,t,n)=>{const{messageStatus:o,messagePart:r,data:i}=t;e.state=cs.Done,e.responseData=i,e.parsed=n,e.messagePart=r,e.messageStatus=o,e.promiseResolve(),e.time.finished=new Date,lu()},au=(e,t)=>{e.state=cs.Error;const n=na(t);if(e.errorMessage=n.description,e.promiseReject(n.code),qu.actions.addError({errorCode:n.code,requestId:e.id}),e.config){const n=kc(e.config);n&&[Ys.NOT_SUPPORTED].includes(t)&&Xu(n,Xc.NotSupported),n&&[Ys.UART_INTERFACE_ALLOCATED].includes(t)&&Xu(n,Xc.UartInterfaceAllocated),n&&[Ys.CDC_INTERFACE_ALLOCATED].includes(t)&&Xu(n,Xc.CdcInterfaceAllocated),n&&[Ys.BLOCK,Ys.SECTION,Ys.INDEX].includes(t)&&Xu(n,Xc.MissingIndex)}lu()},lu=()=>{Jc.activeRequestId.value=null;if(Object.values(Kc.value).filter(e=>e.state===cs.Sent).length)return void logger.error("Cannot start next request, there are unfinished sent requests");const e=Object.values(Kc.value).filter(e=>e.state===cs.Pending),t=e.length&&e[0].id;if(t)return ou(t);Pu(!1)},cu=(e,t)=>{if([as.Custom,as.Predefined].includes(e.type)){if(void 0===e.specialRequestId)throw new Error("Missing specialRequestId for definition "+e.key);return[0,0,e.specialRequestId]}if(!e.getPayload)throw new Error("Missing getPayload for definition "+e.type);return e.getPayload(t,fs)},uu=async e=>{const{command:t,handler:n,config:o,payload:r}=e,i=tu(t);return new Promise((e,s)=>nu({command:t,payload:r||cu(i,o),handler:n,config:o,promiseResolve:e,promiseReject:s}))},du=e=>Array.isArray(e)?[240,0,83,67,...e,247]:[],pu={noteon:"Note On",noteoff:"Note Off",controlchange:"Control Change",programchange:"Program Change",pitchbend:"Pitch Bend",clock:"RealTime: Clock",start:"RealTime: Start",continue:"RealTime: Continue",stop:"RealTime: Stop",activesensing:"RealTime: Active Sensing",reset:"RealTime: Reset",mmcstop:"MMC Stop",mmcplay:"MMC Play",mmcrecordstart:"MMC Record Start",mmcrecordstop:"MMC Record Stop",mmcpause:"MMC Pause"},hu={1:"mmcstop",2:"mmcplay",6:"mmcrecordstart",7:"mmcrecordstop",9:"mmcpause"},fu=["clock","start","continue","stop","activesensing","reset"];var Lu="object"==typeof global&&global&&global.Object===Object&&global,mu="object"==typeof self&&self&&self.Object===Object&&self,gu=Lu||mu||Function("return this")(),vu=gu.Symbol,bu=Object.prototype,yu=bu.hasOwnProperty,Iu=bu.toString,Eu=vu?vu.toStringTag:void 0;var Cu=Object.prototype.toString;var wu=vu?vu.toStringTag:void 0;function Su(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":wu&&wu in Object(e)?function(e){var t=yu.call(e,Eu),n=e[Eu];try{e[Eu]=void 0;var o=!0}catch(e){}var r=Iu.call(e);return o&&(t?e[Eu]=n:delete e[Eu]),r}(e):function(e){return Cu.call(e)}(e)}function ku(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var xu=/^\s+|\s+$/g,_u=/^[-+]0x[0-9a-f]+$/i,Mu=/^0b[01]+$/i,Tu=/^0o[0-7]+$/i,Ru=parseInt;function Nu(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==Su(e)}(e))return NaN;if(ku(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ku(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(xu,"");var n=Mu.test(e);return n||Tu.test(e)?Ru(e.slice(2),n?2:8):_u.test(e)?NaN:+e}var Du=function(){return gu.Date.now()},Au=Math.max,Ou=Math.min;const Pu=e=>{Wc.suspendMidiLogs=e},Bu=()=>{Wc.stack=[]},Fu=function(e,t,n){var o,r,i,s,a,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=o,i=r;return o=r=void 0,c=t,s=e.apply(i,n)}function f(e){return c=e,a=setTimeout(m,t),u?h(e):s}function L(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function m(){var e=Du();if(L(e))return g(e);a=setTimeout(m,function(e){var n=t-(e-l);return d?Ou(n,i-(e-c)):n}(e))}function g(e){return a=void 0,p&&o?h(e):(o=r=void 0,s)}function v(){var e=Du(),n=L(e);if(o=arguments,r=this,l=e,n){if(void 0===a)return f(l);if(d)return clearTimeout(a),a=setTimeout(m,t),h(l)}return void 0===a&&(a=setTimeout(m,t)),s}return t=Nu(t)||0,ku(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Au(Nu(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=r=a=void 0},v.flush=function(){return void 0===a?s:g(Du())},v}(()=>{Wc.stack.length>50&&(Wc.stack=Wc.stack.slice(0,50))},10,{leading:!0,maxWait:10,trailing:!1});function Uu(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=n.length;for(let r=0;r{const{type:t,block:n,index:o}=e,r=new Date,i=r.getTime(),s=(e=>{if(!e)return"";const t=e.getHours(),n=zs(e.getMinutes()),o=zs(e.getSeconds()),r=e.getMilliseconds();return`${zs(t)}:${n}:${o} ${r}`})(r);if(t===Vc.Info){const e=Wc.highlights[n];if(!e)return void logger.error("Unknown highlight block with id "+n);e[o]=i}const a=t===Vc.Midi?!Wc.logFilter[$c.Midi]:!Wc.logFilter[$c.System];if(!Wc.showRequestLog||a)return;let l=e.payload;l&&("string"==typeof l&&(l=l.split(",")),Array.isArray(l)||(l=Array.from(l))),Wc.stack.unshift({...e,id:Uu(9),payload:l,time:r,timeString:s}),Fu()},Vu={clearRequestLog:Bu,getFilteredLogs:e=>Wc.stack.filter(e),addRequest:e=>{const t=Kc.value[e],n=du(t.payload),o=n&&Gs(Us(n)),r=n&&Gs(n),i=du((e=>{const t=[];return[e.messageStatus,e.messagePart,e.specialRequestId].forEach(e=>{void 0!==e&&t.push(e)}),Array.isArray(e.responseData)&&t.push(...e.responseData),t})(t)),s=i&&Gs(Us(i)),a=i&&Gs(i);Gu({type:Vc.Request,requestId:e,dataHex:s,dataDec:a,payloadHex:o,payloadDec:r})},addInfo:e=>{const{payload:t}=e,n=t&&Gs(Us(t)),o=t&&Gs(Array.from(t));Gu({type:Vc.Info,...e,payloadHex:n,payloadDec:o})},addError:e=>{if(Gu({type:Vc.Error,...e}),e.errorCode){const t=na(e.errorCode);Hu.error(t.description,e.error)}else Hu.error(definition.message,e.error)},addMidi:e=>{if(Wc.suspendMidiLogs)return;const{type:t,channel:n,data:o,controller:r}=e,i=o?Array.from(o):[],s=e.value&&"controlchange"!==t?e.value:void 0,a=["noteon","noteoff"].includes(t)?o[1]:void 0,l=r&&r.number,c=o&&o.length>2?o[2]:void 0,u="noteoff"==t?o[0]>=144?pu.noteon:pu.noteoff:pu[t],d=o&&Gs(i),p=o&&Gs(Us(i)),h={label:u,type:Vc.Midi,eventType:t,channel:n,dataHex:p,dataDec:d,value:s,controllerNumber:l,note:a,velocity:c};Gu(h)},toggleLogFilter:e=>{Wc.logFilter[e]=!Wc.logFilter[e],Ps("logFilter",Wc.logFilter)},toggleLog:()=>{Wc.showRequestLog=!Wc.showRequestLog,Ps("showRequestLog",Wc.showRequestLog)},toggleHexValues:()=>{Wc.showHexValues=!Wc.showHexValues,Ps("showHexValues",Wc.showHexValues)},setSuspendMidi:Pu},qu={state:Wc,actions:Vu},$u=As(qu),Hu={log:(...e)=>{Uc.state.log&&console.log(...e)},warn:(...e)=>{Uc.state.log&&console.warn(...e)},error:(e,t)=>{if(Uc.state.log&&(e&&console.error(e),t&&console.error(t),!t&&!e))throw new Error("Unknown error!")}},ju=async(e,t)=>{const n={};let o=0;fs.systemOperationPercentage=1;const r=await(async e=>(await e.text()).split("\n").map(e=>e.split(" ").map(Bs)).map(e=>e.slice(4,-1)))(e),i=async e=>{const s=e.length+5,a=(()=>{const e=(new Date).getTime();return Math.floor(e/1e3)})();if(n[a]>2e3)return Ws(250).then(()=>i(e));n[a]?n[a]=n[a]+s:n[a]=s,o+=1;const l=Math.floor(o/r.length*100);return fs.systemOperationPercentage=l>0?l:1,uu({command:t,payload:e,handler:()=>null})};let s=!1;const a=r.reduce((e,t)=>e.then(()=>i(t)).catch(()=>{s=!0,i(t)}),Promise.resolve());return await a,fs.systemOperationPercentage=null,!s},zu=["noteon","noteoff","controlchange","programchange","pitchbend","clock","start","continue","stop","activesensing","reset"],Wu=e=>{zu.forEach(t=>e.removeListener(t,"all"))};let Qu=null;const Zu=e=>fs.unsupportedComponents[e.block][e.key],Xu=(e,t)=>fs.unsupportedComponents[e.block][e.key]=t||!t,Yu=e=>{Object.assign(fs,e)},Ku=async()=>{ed();try{if(!fs.outputId)return jp.push({name:"home"});if(!await Uc.actions.findOutputById(fs.outputId))return jp.push({name:"home"})}catch(e){return Hu.error("Device connection watcher error",e),jp.push({name:"home"})}Qu=setTimeout(()=>Ku(),1e3)},Ju=()=>Ws(5e3).then(Ku),ed=()=>{Qu&&(clearTimeout(Qu),Qu=null)},td=async e=>{const t=await Uc.actions.matchInputOutput(e),{input:n,output:o,isBootloaderMode:r,valueSize:i}=t;if(fs.isBootloaderMode=r,fs.outputId=e,fs.input=n,fs.output=o,fs.valueSize=i,fs.valuesPerMessageRequest=null,fs.firmwareVersion=null,fs.input.removeListener("sysex","all"),fs.input.addListener("sysex","all",iu),Wu(fs.input),(e=>{zu.forEach(t=>e.addListener(t,"all",qu.actions.addMidi))})(fs.input),r)return fs.boardName=o.name,fs.connectionState=Qc.Open,fs.connectionPromise=null,void Ju();await uu({command:Cc.GetValuesPerMessage,handler:e=>Yu({valuesPerMessageRequest:e})}),await uu({command:Cc.GetFirmwareVersion,handler:e=>Yu({firmwareVersion:e})}),fs.connectionState=Qc.Open,fs.connectionPromise=null,Ju(),await id()},nd=async e=>{if("string"!=typeof e)throw new Error("MISSING OR INVALID DEVICE OUTPUT ID");return fs.connectionPromise||(fs.connectionState=Qc.Pending,fs.connectionPromise=td(e)),fs.connectionPromise},od=async()=>{if(fs.connectionState!==Qc.Open){if(fs.connectionPromise)return fs.connectionPromise;if(fs.outputId)return nd(fs.outputId);throw new Error("CANNOT ENSURE CONNECTION, MISSING outputId")}},rd=async(e,t)=>(await uu({command:e,handler:t}),fs.connectionState=Qc.Closed,Ws(200).then(()=>jp.push({name:"home"}))),id=async()=>{await uu({command:Cc.IdentifyBoard,handler:e=>{const t=(e=>oa.find(t=>Hs(t.id,e)||t.oldId&&Hs(t.oldId,e)))(e),n=t&&t.name||"Custom OpenDeck board",o=t&&t.firmwareFileName;Yu({boardName:n,firmwareFileName:o})}}),await uu({command:Cc.GetNumberOfSupportedComponents,handler:e=>Yu({numberOfComponents:e})});try{2===fs.valueSize&&await uu({command:Cc.GetBootLoaderSupport,handler:e=>Yu({bootLoaderSupport:e})})}catch(e){Hu.error("Error while checking for bootloader support, setting to false",e),Yu({bootLoaderSupport:!1})}await uu({command:Cc.GetNumberOfSupportedPresets,handler:e=>Yu({supportedPresetsCount:e})})},sd=e=>!Zu(e),ad=e=>1===fs.valueSize||!e.isMsb,ld=(e,t)=>{if(!yc[e])throw new Error("Block definition not found in BlockMap "+e);const{sections:n}=yc[e];return Object.values(n).filter(e=>((e,t)=>e.type===t)(e,t)).filter(sd).filter(ad)},cd={setInfo:Yu,setViewSetting:(e,t)=>{t.itemsPerPage&&t.itemsPerPage!==fs.viewSettings[e].itemsPerPage&&(fs.viewSettings[e].currentPage=1),Object.assign(fs.viewSettings[e],t)},connectDevice:nd,closeConnection:()=>{ed(),(async()=>{eu(),fs.input&&(fs.input.removeListener("sysex","all"),Wu(fs.input)),Object.assign(fs,hs)})()},ensureConnection:od,startUpdatesCheck:async e=>{const t=await fetch("https://api.github.com/repos/paradajz/OpenDeck/releases").then(e=>e.json()),n=fs.firmwareVersion;return t.filter(e=>e.name.length&&Rs(e.name,n)).map(t=>({html_description:Ns(t.body,{headerIds:!1}),firmwareFileLink:t.assets.find(t=>t.name===e),...t}))},startBootLoaderMode:async()=>{await uu({command:Cc.BootloaderMode,handler:()=>Hu.log("Bootloader mode started")})},startFactoryReset:async()=>{await rd(Cc.FactoryReset,()=>Hu.log("Bootloader mode started"))},startReboot:async()=>{await rd(Cc.Reboot,()=>Hu.log("Reboot mode started"))},startDeviceConnectionWatcher:Ju,stopDeviceConnectionWatcher:ed,startFirmwareUdate:async e=>{eu();const t=await ju(e,Cc.FirmwareUpdate);fs.isSystemOperationRunning=!1;alert(t?"Firmware update finished":"Firmware update finished with errors")},isControlDisabled:Zu,disableControl:Xu,startBackup:async()=>{let e=0,t=null;const n=[];uu({command:Cc.Backup,handler:o=>{e||(t=o);const r=e&&Hs(t,o),i=0===e;if(e+=1,i||r||n.push(o.map(Fs).join(" ")),r){const e=new Blob([n.join("\n")],{type:"text/plain;charset=utf-8"}),t=(new Date).toISOString().slice(0,-8).replace(":","-").replace("T","-");Ds.saveAs(e,`OpenDeckUI-Backup-${t}.sysex`)}return r}}).catch(e=>Hu.error("Failed to read component config",e))},startRestore:async e=>{await ju(e,Cc.RestoreBackup),fs.isSystemOperationRunning=!1,alert("Restoring from backup finished. The board will now reboot and apply the parameters. This can take up to 30 seconds.")},getComponentSettings:async(e,t,n)=>{await od();const o={},r=ld(e,t).map(t=>{const{key:r,section:i,onLoad:s,settingIndex:a}=t,l="number"==typeof n?n:a;return uu({command:Cc.GetValue,handler:e=>{const t=e[0];o[r]=t,s&&s(t)},config:{block:e,section:i,index:l}}).catch(e=>Hu.error("Failed to read component config",e))});return await Promise.all(r),o},setComponentSectionValue:async(e,t)=>uu({command:Cc.SetValue,handler:t,config:e}),getSectionValues:async e=>{await od();const t={},n=ld(e,is.Value).map(n=>{const{key:o,section:r}=n;return uu({command:Cc.GetSectionValues,handler:e=>(t[o]||(t[o]=[]),t[o].push(...e),!1),config:{block:e,section:r}}).catch(e=>Hu.error("Failed to read component config",e))});return await Promise.all(n),t},getFilteredSectionsForBlock:ld},ud=Ro(()=>fs.input&&fs.input.name),dd=Ro(()=>fs.input&&fs.input.manufacturer),pd=Ro(()=>fs.connectionState===Qc.Pending),hd=Ro(()=>fs.connectionState===Qc.Open),fd=Ro(()=>1===fs.valueSize),Ld={state:fs,computed:{name:ud,manufacturer:dd,isConnecting:pd,isConnected:hd,showMsbControls:fd},actions:cd},md=As(Ld);var gd=No({name:"LogDataValue",props:{hex:{required:!0,type:String},dec:{required:!0,type:String}},setup(){const{showHexValues:e}=$u;return{showHexValues:e}}});const vd={class:"sysex-payload capitalize"},bd=fn("sup",null,"Hex",-1),yd=fn("sup",null,"Dec",-1);gd.render=function(e,t,n,o,r,i){return an(),cn("span",vd,[e.showHexValues?(an(),cn(en,{key:0},[mn("[ "+l(e.hex)+" ]  ",1),bd],64)):(an(),cn(en,{key:1},[mn("[ "+l(e.dec)+" ]  ",1),yd],64))])};var Id=No({name:"LogMidi",components:{LogDataValue:gd},props:{logEntry:{required:!0,type:Object}},setup:()=>({convertToHexString:Us,MidiEventTypeLabel:pu,MidiRealtimeEvent:fu})});const Ed={class:"border-b border-gray-800 last:border-b-0"},Cd={class:"mr-2 text-yellow-300"},wd={key:0,class:"mr-2"},Sd=fn("span",{class:"faded"},"channel",-1),kd={key:1,class:"mr-2"},xd=fn("span",{class:"faded"},"value",-1),_d={key:2,class:"mr-2"},Md=fn("span",{class:"faded"},"controller",-1),Td=fn("span",{class:"faded"},"value",-1),Rd={key:3,class:"mr-2"},Nd=fn("span",{class:"faded"},"velocity",-1),Dd={key:4},Ad=fn("span",{class:"sysex-label faded"},"Raw data",-1);Id.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",Ed,[fn("strong",Cd,[mn(l(e.logEntry.label)+" ",1),null!=e.logEntry.note?(an(),cn(en,{key:0},[mn(l(e.logEntry.note),1)],64)):vn("",!0)]),void 0!==e.logEntry.channel?(an(),cn("span",wd,[Sd,mn(" "+l(e.logEntry.channel),1)])):vn("",!0),void 0!==e.logEntry.value?(an(),cn("span",kd,[xd,mn(" "+l(e.logEntry.value),1)])):vn("",!0),void 0!==e.logEntry.controllerNumber?(an(),cn("span",_d,[Md,mn(" "+l(e.logEntry.controllerNumber)+" ",1),Td,mn(" "+l(e.logEntry.velocity),1)])):vn("",!0),void 0!==e.logEntry.note?(an(),cn("span",Rd,[Nd,mn(" "+l(e.logEntry.velocity),1)])):vn("",!0),e.logEntry.dataDec&&e.logEntry.dataDec.length?(an(),cn("div",Dd,[Ad,fn(s,{hex:e.logEntry.dataHex,dec:e.logEntry.dataDec},null,8,["hex","dec"])])):vn("",!0)])};var Od=No({name:"LogRequest",components:{LogDataValue:gd},props:{logEntry:{required:!0,type:Object},requestId:{required:!0,type:Number}},setup:e=>({request:Xe(Kc.value[e.requestId]),getDefinitionLabel:e=>{const t=kc(e);if(!t)return"";const n=t.type===is.Value&&e.index?"# "+e.index:" - ";return`- ${Bi[e.block]} ${n} ${t&&t.label}`},getDifferenceInMs:js,convertToHexString:Us,RequestState:cs,Block:Bi})});const Pd={class:"activity request-request"},Bd={class:"request-command"},Fd=mn(".  "),Ud={class:"request-command"},Gd={key:0,class:"request-command"},Vd={key:1,class:"request-config"},qd={class:"status"},$d={key:0,class:"timing"},Hd=fn("span",{class:"status-label faded"},"in",-1),jd={key:1,class:"timing"},zd=fn("span",{class:"status-label faded"},"waited",-1),Wd={key:0},Qd=fn("span",{class:"sysex-label faded"},"Sent",-1),Zd={key:1},Xd={class:""},Yd=fn("span",{class:"sysex-label faded"},"Received",-1),Kd={key:0},Jd=fn("span",{class:"sysex-label faded"},"Parsed",-1),ep={key:2},tp=fn("span",{class:"sysex-label text-red-700"},"Error",-1),np={class:"text-red-500"};Od.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",Pd,[fn("span",{class:{"text-red-500":!!e.request.errorMessage}},[fn("strong",Bd,l(e.request.id),1),Fd,fn("strong",Ud,l(e.request.command),1),e.request.config?(an(),cn("strong",Gd,l(e.getDefinitionLabel(e.request.config)),1)):vn("",!0),e.request.config&&"number"==typeof e.request.config.value?(an(),cn("strong",Vd,l(e.request.config.value),1)):vn("",!0)],2),fn("span",{class:["request-status",e.request.state]},[fn("span",qd,l(e.request.state),1),e.request.time.finished?(an(),cn("span",$d,[Hd,fn("strong",null,l(e.getDifferenceInMs(e.request.time.finished,e.request.time.started))+"ms",1)])):vn("",!0),e.getDifferenceInMs(e.request.time.started,e.request.time.created)?(an(),cn("span",jd,[zd,fn("strong",null,l(e.getDifferenceInMs(e.request.time.started,e.request.time.created))+"ms",1)])):vn("",!0)],2),e.request.payload?(an(),cn("div",Wd,[Qd,fn(s,{dec:e.logEntry.payloadDec,hex:e.logEntry.payloadHex},null,8,["dec","hex"])])):vn("",!0),e.request.responseData?(an(),cn("div",Zd,[fn("div",Xd,[Yd,fn(s,{hex:e.logEntry.dataHex,dec:e.logEntry.dataDec},null,8,["hex","dec"])]),e.request.parsed?(an(),cn("div",Kd,[Jd,fn("span",null,l(e.request.parsed),1)])):vn("",!0)])):vn("",!0),e.request.errorMessage?(an(),cn("div",ep,[tp,fn("span",np,l(e.request.errorMessage),1)])):vn("",!0)])};var op=No({name:"LogInfo",components:{LogDataValue:gd},props:{logEntry:{required:!0,type:Object}},setup:()=>({Block:Bi,BlockMap:yc,convertToHexString:Us})});const rp={class:""},ip=fn("strong",{class:"mr-2 text-gray-400"},"Component info",-1),sp={key:0},ap={key:1},lp={key:2},cp=fn("span",{class:"sysex-label faded"},"Raw data",-1);op.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",rp,[ip,e.logEntry.block?(an(),cn("strong",sp,l(e.BlockMap[e.logEntry.block].title),1)):vn("",!0),Number.isInteger(e.logEntry.index)?(an(),cn("strong",ap," #"+l(e.logEntry.index),1)):vn("",!0),e.logEntry.payloadDec?(an(),cn("div",lp,[cp,fn(s,{dec:e.logEntry.payloadDec,hex:e.logEntry.payloadHex},null,8,["dec","hex"])])):vn("",!0)])};var up=No({name:"ActivityError",props:{logEntry:{required:!0,type:Object}},setup:()=>({getErrorDefinition:na})});const dp={class:"py-2 border-b border-gray-800 last:border-b-0"},pp={key:0,class:"text-red-500 mr-4"},hp={key:1,class:"text-red-500 mr-2"},fp={class:"text-red-500"};up.render=function(e,t,n,o,r,i){return an(),cn("div",dp,[e.logEntry.requestId?(an(),cn("strong",pp,"Request "+l(e.logEntry.requestId),1)):vn("",!0),e.logEntry.errorCode?(an(),cn("strong",hp,"Error Code "+l(e.logEntry.errorCode),1)):vn("",!0),fn("span",fp,l(e.logEntry.message)+" "+l(e.logEntry.errorCode&&e.getErrorDefinition(e.logEntry.errorCode).description),1)])};var Lp=No({name:"RequestLogTableRow",components:{LogMidi:Id,LogRequest:Od,LogInfo:op,LogError:up},props:{logEntry:{required:!0,type:Object}},setup:()=>({LogType:Vc})});const mp={class:"w-2/12 text-right"},gp={class:"w-8/12"};Lp.render=function(e,t,n,o,r,i){const s=Zt("LogError"),a=Zt("LogRequest"),c=Zt("LogInfo"),u=Zt("LogMidi");return an(),cn("tr",{class:["table-row",{"text-red-500":e.logEntry.type===e.LogType.Error}]},[fn("td",mp,l(e.logEntry.timeString),1),fn("td",gp,[e.logEntry.type===e.LogType.Error?fn(s,{key:0,"log-entry":e.logEntry},null,8,["log-entry"]):e.logEntry.requestId&&e.logEntry.type===e.LogType.Request?fn(a,{key:1,"log-entry":e.logEntry,"request-id":e.logEntry.requestId},null,8,["log-entry","request-id"]):e.logEntry.type===e.LogType.Info?fn(c,{key:2,"log-entry":e.logEntry},null,8,["log-entry"]):e.logEntry.type===e.LogType.Midi?fn(u,{key:3,"log-entry":e.logEntry},null,8,["log-entry"]):vn("",!0)])],2)};var vp=No({name:"RequestLogTable",components:{RequestLogTableRow:Lp},setup:()=>({stack:$u.stack})});const bp={key:0,class:"table-auto mb-0 request-table"},yp=fn("thead",{class:"table-head"},[fn("tr",{class:"text-left"},[fn("th",{class:"w-1/12 text-right"},"Time"),fn("th",{class:"w-8/12"},"Event")])],-1),Ip={class:"table-body"};vp.render=function(e,t,n,o,r,i){const s=Zt("RequestLogTableRow");return e.stack.length?(an(),cn("table",bp,[yp,fn("tbody",Ip,[(an(!0),cn(en,null,Ao(e.stack,e=>(an(),cn(s,{key:e.id,"log-entry":e},null,8,["log-entry"]))),128))])])):vn("",!0)};var Ep=No({name:"RequestLog",components:{RequestLogTable:vp},setup:()=>({clear:()=>{$u.clearRequestLog(),Object.keys(Kc.value).forEach(e=>{const t=Number(e),n=Kc.value[t];[cs.Done,cs.Error].includes(n.state)&&delete Kc.value[t]})},LogType:Vc,LogFilter:$c,...$u})});const Cp={class:"request-log section"},wp={class:"section-heading clearfix"},Sp={class:"section-heading-inner"},kp=fn("span",{class:"mr-6"},"Activity",-1),xp={key:1,class:"float-right mt-1 clearfix"},_p={class:"inline-block mr-6"},Mp=mn(" hex "),Tp={class:"request-log-main"};Ep.render=function(e,t,n,o,r,i){const s=Zt("FormToggle"),a=Zt("RequestLogTable");return an(),cn("div",Cp,[fn("div",wp,[fn("h3",Sp,[kp,fn(s,{class:"mr-8",value:e.showRequestLog,onChanged:e.toggleLog},null,8,["value","onChanged"]),e.showRequestLog&&e.stack.length?(an(),cn("button",{key:0,class:"btn btn-xs mr-6",onClick:t[1]||(t[1]=(...t)=>e.clear(...t))}," clear ")):vn("",!0),e.showRequestLog?(an(),cn("span",xp,[fn("span",_p,[fn(s,{value:e.showHexValues,class:"toggle-sm labeled",onChanged:e.toggleHexValues},{default:$t(()=>[Mp]),_:1},8,["value","onChanged"])]),(an(!0),cn(en,null,Ao(e.LogFilter,(t,n)=>(an(),cn("span",{key:n,class:"inline-block ml-2"},[fn(s,{value:e.logFilter[t],class:"toggle-sm labeled",onChanged:()=>e.toggleLogFilter(t)},{default:$t(()=>[mn(l(t),1)]),_:2},1032,["value","onChanged"])]))),128))])):vn("",!0)])]),fn("div",Tp,[e.showRequestLog?fn(a,{key:0,class:"w-full"}):vn("",!0)])])};var Rp=No({name:"DeviceNavItem",props:{block:{type:Number,required:!0},params:{type:Object,default:void 0}},setup(e){const{title:t,iconComponent:n,routeName:o}=yc[e.block],{numberOfComponents:r}=md,{highlights:i}=$u,s=Ro(()=>(e=>{if(!e)return null;let t=null;return Object.keys(e).forEach(n=>{t=e[n]>t?e[n]:t}),t})(i.value[e.block])),a=Ro(()=>jp.currentRoute.value.matched.some(e=>e.name===o));return{...ia(s),numberOfComponents:r,active:a,title:t,iconComponent:n,routeName:o}}});const Np={class:"icon-wrapper"},Dp={key:0,class:"icon-label"},Ap={class:"lg:inline-block text-sm label"},Op=fn("br",null,null,-1);Rp.render=function(e,t,n,o,r,i){const s=Zt("router-link");return an(),cn(s,{to:{name:e.routeName,params:e.params},class:{active:e.active,[e.routeName]:!0,"btn-highlight":e.isHighlighted}},{default:$t(()=>[fn("span",Np,[(an(),cn(Yt(e.iconComponent))),e.numberOfComponents[e.block]?(an(),cn("span",Dp,l(e.numberOfComponents[e.block]),1)):vn("",!0)]),fn("span",Ap,l(e.title),1),Op]),_:1},8,["to","class"])};var Pp=No({name:"DeviceNav",components:{DeviceNavItem:Rp},setup(){const{outputId:e,isConnected:t}=md;return{BlockMap:yc,isConnected:t,outputId:e}}});const Bp={key:0,class:"device-nav"};Pp.render=function(e,t,n,o,r,i){const s=Zt("DeviceNavItem");return e.isConnected?(an(),cn("div",Bp,[(an(!0),cn(en,null,Ao(Object.values(e.BlockMap),t=>(an(),cn(s,{key:"block-"+t.block,class:"item clearfix",block:t.block,params:{outputId:e.outputId}},null,8,["block","params"]))),128))])):vn("",!0)};var Fp=No({name:"Device",components:{RequestLog:Ep,DeviceNav:Pp},setup(){const{connectDevice:e,isConnected:t,isConnecting:n,isSystemOperationRunning:o,systemOperationPercentage:r,isBootloaderMode:i}=md;return An(async()=>{try{if(await e(jp.currentRoute.value.params.outputId),i.value)return jp.push({name:"device-firmware-update"})}catch(e){Hu.error(e)}}),{isConnected:t,isConnecting:n,isBootloaderMode:i,isSystemOperationRunning:o,systemOperationPercentage:r}}});const Up={key:1,class:"relative"};Fp.render=function(e,t,n,o,r,i){const s=Zt("SpinnerOverlay"),a=Zt("Hero"),l=Zt("DeviceNav"),c=Zt("router-view"),u=Zt("ProgressBar"),d=Zt("RequestLog");return an(),cn(en,null,[e.isConnecting?fn(a,{key:0,custom:"h-64 relative"},{default:$t(()=>[fn(s)]),_:1}):e.isConnected?(an(),cn("div",Up,[e.isBootloaderMode?vn("",!0):fn(l,{key:0}),fn(c),e.isSystemOperationRunning&&Number.isInteger(e.systemOperationPercentage)?fn(u,{key:1,percentage:e.systemOperationPercentage},null,8,["percentage"]):e.isSystemOperationRunning?fn(s,{key:2}):vn("",!0)])):fn(a,{key:2,custom:"h-64",title:"No WebMidi device found."}),fn(d)],64)};var Gp=No({name:"DeviceSelect",setup:()=>(An(()=>{Gc.assignInputs(),Gc.startMidiConnectionWatcher(),md.closeConnection()}),{outputs:Gc.outputs})});const Vp={class:"surface-neutral border px-8 pt-6 rounded"},qp=fn("br",null,null,-1);Gp.render=function(e,t,n,o,r,i){const s=Zt("Hero"),a=Zt("router-link");return e.outputs.length?e.outputs.length>1?fn(s,{key:1,custom:"h-64",title:"Multiple OpenDeck boards detected. Please connect one board at the time in\n order to use configurator."}):fn(s,{key:2,custom:"py-24"},{default:$t(()=>[fn("div",Vp,[(an(!0),cn(en,null,Ao(e.outputs,(t,n)=>(an(),cn(a,{key:t.id,to:{name:"device",params:{outputId:t.id}},class:["block mb-6 cursor-pointer",{"rounded-t":0===n,"rounded-b":n===e.outputs.length-1,"border-gray-400 border-b":n[fn("span",null,l(t.manufacturer||"unknown manufacturer"),1),qp,fn("strong",null,l(t.name),1)]),_:2},1032,["to","class"]))),128))])]),_:1}):fn(s,{key:0,custom:"h-64",title:"No OpenDeck board found. Please connect the board in order to use the\n interface."})};const $p=[{name:"home",path:"/",component:Gp},{path:"/device/:outputId",name:"device",component:Fp,redirect:{name:"device-global"},children:Ec}];var Hp;const jp=function(e){const t=Qr(e.routes,e);let n=e.parseQuery||Li,o=e.stringifyQuery||mi,{scrollBehavior:r}=e,i=e.history;const s=vi(),a=vi(),l=vi(),c=Ke(Pr,!0);let u=Pr;ur&&r&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=pr.bind(null,e=>""+e),p=pr.bind(null,hi),h=pr.bind(null,fi);function f(e,r){if(r={...r||c.value},"string"==typeof e){let o=Lr(n,e,r.path),s=t.resolve({path:o.path},r),a=i.createHref(o.fullPath);return dr(o,s,{params:h(s.params),redirectedFrom:void 0,href:a})}let s;"path"in e?s=dr({},e,{path:Lr(n,e.path,r.path).path}):(s=dr({},e,{params:p(e.params)}),r.params=p(r.params));let a=t.resolve(s,r);const l=di(e.hash||"").replace(li,"{").replace(ui,"}").replace(si,"^");a.params=d(h(a.params));const u=function(e,t){let n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,dr({},e,{hash:l,path:a.path}));let f=i.createHref(u);return dr({fullPath:u,hash:l,query:o===mi?gi(e.query):e.query},a,{redirectedFrom:void 0,href:f})}function L(e){return"string"==typeof e?{path:e}:dr({},e)}function m(e,t){if(u!==e)return Ur(8,{from:t,to:e})}function g(e){return v(e)}function v(e,t){const n=u=f(e),r=c.value,i=e.state,s=e.force,a=!0===e.replace,l=n.matched[n.matched.length-1];if(l&&l.redirect){const{redirect:e}=l;let o=L("function"==typeof e?e(n):e);return v(dr({query:n.query,hash:n.hash,params:n.params},o,{state:i,force:s,replace:a}),t||n)}const d=n;let p;return d.redirectedFrom=t,!s&&function(e,t,n){let o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&gr(t.matched[o],n.matched[r])&&vr(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,r,n)&&(p=Ur(16,{to:d,from:r}),R(r,r,!0,!1)),(p?Promise.resolve(p):y(d,r)).catch(e=>Gr(e,14)?e:M(e)).then(e=>{if(e){if(Gr(e,2))return v(dr(L(e.to),{state:i,force:s,replace:a}),t||d)}else e=E(d,r,!0,a,i);return I(d,r,e),e})}function b(e,t){const n=m(e,t);return n?Promise.reject(n):Promise.resolve()}function y(e,t){let n;n=yi(t.matched.filter(t=>e.matched.indexOf(t)<0).reverse(),"beforeRouteLeave",e,t);const[o,r]=xi(e,t);for(const r of o)for(const o of r.leaveGuards)n.push(bi(o,e,t));const i=b.bind(null,e,t);return n.push(i),ki(n).then(()=>{n=[];for(const o of s.list())n.push(bi(o,e,t));return n.push(i),ki(n)}).then(()=>{n=yi(e.matched.filter(e=>t.matched.indexOf(e)>-1),"beforeRouteUpdate",e,t);for(const o of r)for(const r of o.updateGuards)n.push(bi(r,e,t));return n.push(i),ki(n)}).then(()=>{n=[];for(const o of e.matched)if(o.beforeEnter&&t.matched.indexOf(o)<0)if(Array.isArray(o.beforeEnter))for(const r of o.beforeEnter)n.push(bi(r,e,t));else n.push(bi(o.beforeEnter,e,t));return n.push(i),ki(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=yi(e.matched.filter(e=>t.matched.indexOf(e)<0),"beforeRouteEnter",e,t),n.push(i),ki(n))).then(()=>{n=[];for(const o of a.list())n.push(bi(o,e,t));return n.push(i),ki(n)}).catch(e=>Gr(e,8)?e:Promise.reject(e))}function I(e,t,n){for(const o of l.list())o(e,t,n)}function E(e,t,n,o,r){const s=m(e,t);if(s)return s;const[a]=xi(e,t);for(const e of a)e.leaveGuards=[],e.updateGuards=[],e.instances={},e.enterCallbacks={};const l=t===Pr,u=ur?history.state:{};n&&(o||l?i.replace(e.fullPath,dr({scroll:l&&u&&u.scroll},r)):i.push(e.fullPath,r)),c.value=e,R(e,t,n,l),T()}let C;function w(){C=i.listen((e,t,n)=>{const o=f(e);u=o;const r=c.value;var s,a;ur&&(s=_r(r.fullPath,n.delta),a=kr(),Mr.set(s,a)),y(o,r).catch(e=>Gr(e,12)?e:Gr(e,2)?(n.delta&&i.go(-n.delta,!1),v(e.to,o).catch(hr),Promise.reject()):(n.delta&&i.go(-n.delta,!1),M(e))).then(e=>{(e=e||E(o,r,!1))&&n.delta&&i.go(-n.delta,!1),I(o,r,e)}).catch(hr)})}let S,k,x=vi(),_=vi();function M(e){return T(e),_.list().forEach(t=>t(e)),Promise.reject(e)}function T(e){S||(S=!0,w(),x.list().forEach(([t,n])=>e?n(e):t()),x.reset())}function R(e,t,n,o){if(!ur||!r)return Promise.resolve();let i=!n&&function(e){const t=Mr.get(e);return Mr.delete(e),t}(_r(e.fullPath,0))||(o||!n)&&history.state&&history.state.scroll||null;return It().then(()=>r(e,t,i)).then(e=>e&&xr(e)).catch(M)}function N(e){return new Promise((t,n)=>{let o=_.add(e=>{o(),r(),n(e)}),r=l.add((e,n,i)=>{o(),r(),t(i)});i.go(e)})}const D=new Set;return{currentRoute:c,addRoute:function(e,n){let o,r;return Or(e)?(o=t.getRecordMatcher(e),r=n):r=e,t.addRoute(r,o)},removeRoute:function(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)},hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map(e=>e.record)},resolve:f,options:e,push:g,replace:function(e){return g(dr(L(e),{replace:!0}))},go:N,back:()=>N(-1),forward:()=>N(1),beforeEach:s.add,beforeResolve:a.add,afterEach:l.add,onError:_.add,isReady:function(){return S&&c.value!==Pr?Promise.resolve():new Promise((e,t)=>{x.add([e,t])})},install(e){e.component("RouterLink",Ei),e.component("RouterView",Si),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{get:()=>Je(c)}),ur&&!k&&c.value===Pr&&(k=!0,g(i.location).catch(e=>{}));const t={};for(let e in Pr)t[e]=Ro(()=>c.value[e]);e.provide(lr,this),e.provide(cr,Ge(t));let n=e.unmount;D.add(e),e.unmount=function(){D.delete(e),D.size<1&&(C(),c.value=Pr,k=!1,S=!1),n.call(this,arguments)}}}}({history:((Hp=location.host&&Hp||location.pathname).indexOf("#")<0&&(Hp+="#"),Ar(Hp)),routes:[...$p]});var zp=No({name:"Chevron",props:{type:{type:String,default:"left",validate:e=>["left","right"].includes(e)}}});const Wp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Qp={key:0,d:"M12.95 10.707l.707-.707L8 4.343 6.586 5.757 10.828 10l-4.242 4.243L8 15.657l4.95-4.95z"},Zp={key:1,d:"M7.05 9.293L6.343 10 12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z"};zp.render=function(e,t,n,o,r,i){return an(),cn("svg",Wp,["right"===e.type?(an(),cn("path",Qp)):(an(),cn("path",Zp))])};var Xp=No({name:"Hero",props:{title:{type:String,default:null},custom:{type:String,default:""}}});const Yp={class:"max-w-sm mx-auto flex-1 align-middle"};Xp.render=function(e,t,n,o,r,i){return an(),cn("div",{class:["flex justify-center items-center surface-elevated border-b text-center",e.custom]},[qt(e.$slots,"default",{},()=>[fn("h3",Yp,l(e.title),1)])],2)};var Kp=No({name:"Button",props:{disabled:{default:!1,type:Boolean}}});Kp.render=function(e,t,n,o,r,i){return an(),cn("button",{disabled:e.disabled,class:"btn"},[qt(e.$slots,"default")],8,["disabled"])};var Jp=No({name:"ButtonLink",props:{to:{required:!0,type:[Object,Boolean]}}});Jp.render=function(e,t,n,o,r,i){const s=Zt("router-link");return an(),cn(s,{to:e.to,class:"btn"},{default:$t(()=>[qt(e.$slots,"default")]),_:3},8,["to"])};var eh=No({name:"Section",props:{title:{type:String,default:null},showContent:{type:Boolean,default:!0},wide:{type:Boolean,default:!1}}});const th={key:0,class:"section-heading"},nh={class:"section-heading-inner"},oh={key:0,class:"section-content"};eh.render=function(e,t,n,o,r,i){return an(),cn("div",{class:["section",{"section-wide":!!e.wide}]},[qt(e.$slots,"title",{},()=>[e.title?(an(),cn("h3",th,[fn("div",nh,l(e.title),1)])):vn("",!0)]),e.showContent?(an(),cn("div",oh,[qt(e.$slots,"default")])):vn("",!0)],2)};var rh=No({name:"Spinner",props:{name:{default:"",type:String},type:{default:"number",type:String}}});const ih=Qt("data-v-1e6cca72");zt("data-v-1e6cca72");const sh={class:"spinner"},ah=fn("div",{class:"bounce1"},null,-1),lh=fn("div",{class:"bounce2"},null,-1),ch=fn("div",{class:"bounce3"},null,-1);Wt();const uh=ih((function(e,t,n,o,r,i){return an(),cn("div",sh,[ah,lh,ch])}));rh.render=uh,rh.__scopeId="data-v-1e6cca72";var dh=No({name:"Siblinks",props:{current:{type:Number,required:!0},total:{type:Number,default:0},paramKey:{type:String,required:!0},params:{type:Object,default:void 0}}});const ph=fn("small",null,"previous",-1),hh=fn("small",null,"next",-1);dh.render=function(e,t,n,o,r,i){const s=Zt("Chevron"),a=Zt("router-link");return an(),cn(en,null,[e.total&&e.current>0?fn(a,{key:0,class:["ml-6",{"cursor-pointer":e.current>0,"yellow-700":0===e.current}],to:{params:{...e.params,[e.paramKey]:e.current-1}}},{default:$t(()=>[fn(s,{type:"left",class:"inline fill-current h-6 w-6"}),ph]),_:1},8,["class","to"]):vn("",!0),e.total&&e.current[hh,fn(s,{type:"right",class:"inline fill-current h-6 w-6"})]),_:1},8,["class","to"]):vn("",!0)],64)};var fh=No({name:"ProgressBar",props:{percentage:{type:Number,default:0}}});const Lh={class:"absolute flex inset-0 bg-gray-900"},mh={class:"flex-1 rounded h-6 top-auto self-center opacity-100 justify-center mx-auto max-w-sm bg-gray-600"};fh.render=function(e,t,n,o,r,i){return an(),cn("div",Lh,[fn("div",mh,[fn("div",{class:"flex-1 h-6 text-xs rounded text-center bg-yellow-500 text-gray-800 leading-6",style:{width:e.percentage+"%"}},l(e.percentage)+"% ",5)])])};var gh=No({name:"SpinnerOverlay"});const vh={class:"absolute flex inset-0 opacity-75 bg-gray-900"};gh.render=function(e,t,n,o,r,i){const s=Zt("Spinner");return an(),cn("div",vh,[fn(s,{class:"self-center"})])};const bh=e=>t=>Number(t)t=>Number(t)>e?"Maximum value is "+e:null;var Ih=No({name:"FormSelect",props:{value:{default:"",type:[String,Number]},options:{required:!0,type:[Array,Function]}},setup(e,{emit:t}){const n=Xe(String(e.value)),o=e.options&&"function"==typeof e.options?Ro(()=>{const t=e.options();return n.value=`${String(e.value)}-${t.map(e=>e.value)}`,t}):e.options;return{keyHash:n,emit:t,optionsArray:o}}});Ih.render=function(e,t,n,o,r,i){return an(),cn("select",{key:e.keyHash,class:"form-select mt-1 py-1 text-sm block w-full max-w-sm",value:e.value,onChange:t[1]||(t[1]=t=>e.emit("changed",t.target.value))},[(an(!0),cn(en,null,Ao(e.optionsArray,(e,t)=>(an(),cn("option",{key:t,value:e.value},l(e.text),9,["value"]))),128))],40,["value"])};var Eh=No({name:"FormToggle",props:{value:{default:0,type:[Boolean,Number]}},emits:["changed"],setup(e,{emit:t}){const n=Ro(()=>!!e.value);return{toggle:()=>t("changed",n.value?0:1),isChecked:n}}});const Ch=fn("span",{class:"toggle-track"},null,-1);Eh.render=function(e,t,n,o,r,i){return an(),cn("span",{class:["toggle",{active:e.isChecked}]},[fn("label",null,[fn("input",{type:"checkbox",checked:e.isChecked,class:"toggle-checkbox",onChange:t[1]||(t[1]=(...t)=>e.toggle(...t))},null,40,["checked"]),Ch]),fn("span",{class:"toggle-label",onClick:t[2]||(t[2]=(...t)=>e.toggle(...t))},[qt(e.$slots,"default")])],2)};var wh=No({name:"FormInput",props:{value:{default:"",type:[String,Number]},name:{default:"",type:String},placeholder:{default:"",type:String},type:{default:"number",type:String}},setup:(e,{emit:t})=>({emit:t})});wh.render=function(e,t,n,o,r,i){return an(),cn("input",{value:e.value,class:"form-input mt-1 py-1 text-sm block w-24",type:e.type,name:e.name,placeholder:e.placeholder,onChange:t[1]||(t[1]=t=>e.emit("changed",t.target.value))},null,40,["value","type","name","placeholder"])};var Sh=No({name:"FormErrorDisplay",props:{errors:{required:!0,type:Array}}});const kh={class:"errors"};Sh.render=function(e,t,n,o,r,i){return an(),cn("div",kh,[(an(!0),cn(en,null,Ao(e.errors,(e,t)=>(an(),cn("div",{key:t},l(e),1))),128))])};const xh=e=>{const t=[e=>null==e?"Value is required":null];switch(e.component){case _i.Toggle:t.push(bh(0),yh(1));break;case _i.Input:if(void 0!==e.min&&t.push(bh(e.min)),void 0!==e.max){let n=e.max2Byte&&md.showMsbControls?e.max2Byte:e.max;t.push(yh(n))}break;case _i.Select:e.options&&Array.isArray(e.options)&&t.push((n=e.options.map(e=>e.value),e=>n.includes(Number(e))?null:"Invalid value "+e));break;default:throw new Error(`Unknown component type ${e.component} for ${e.key}`)}var n;return t};var _h=No({name:"FormField",components:{FormSelect:Ih,FormInput:wh,FormToggle:Eh,FormErrorDisplay:Sh},props:{value:{default:null,type:[String,Number]},fieldDefinition:{type:Object,required:!0},index:{type:Number,default:void 0},simpleLayout:{type:Boolean,default:!1}},emits:["modified"],setup(e,{emit:t}){const{fieldDefinition:n}=tt(e),{component:o,key:r,section:i,label:s,helpText:a,isMsb:l,isLsb:c,min:u,max:d,max2Byte:p,options:h,onLoad:f}=n.value,L=e.fieldDefinition.settingIndex,m=Ro(()=>md.isControlDisabled(e.fieldDefinition)),g=tt(e).value,v=xh(e.fieldDefinition),{input:b,errors:y,onValueChange:I}=((e,t,n)=>{const o=Xe(e.value),r=Xe([]),i=e=>{o.value=e,r.value=(t||[]).map(t=>t(e)).filter(e=>!!e),r.value.length||n(e)};return io(e,i),{input:o,errors:r,onValueChange:i}})(g,v,n=>{Number(n)!==g.value&&t("modified",{key:r,value:Number(n),section:i,settingIndex:L,index:e.index,onLoad:f})}),E={label:s,helpText:a,name:r};o===_i.Select&&(E.options=h);const{showMsbControls:C}=md;return{fieldComponent:e.fieldDefinition.component,showMsbControls:C,componentProps:E,emit:t,input:b,errors:y,onValueChange:I,label:s,helpText:a,isDisabled:m,isMsb:l,isLsb:c,min:u,max:d,max2Byte:p,ControlDisableType:Xc}}});const Mh={class:"label"},Th={key:0,class:"instructions"},Rh={key:1,class:"error-message text-red-500"},Nh=mn(" Not supported on this device. "),Dh=mn(" Not supported on this firmware. "),Ah=mn(" The UART interface on board required for this peripheral is already taken by another peripheral. "),Oh=mn(" CDC interface on board required for this peripheral is already taken by another peripheral. "),Ph={key:2,class:"help-text"};_h.render=function(e,t,n,o,r,i){const s=Zt("FormErrorDisplay");return!e.isMsb||e.showMsbControls?(an(),cn("div",{key:0,class:["form-field",{error:e.errors.length}]},[fn("label",Mh,[mn(l(!e.showMsbControls&&e.isLsb?e.label.replace("(LSB)","").replace("LSB",""):e.label)+" ",1),e.isDisabled||!e.min&&!e.max?vn("",!0):(an(),cn("small",Th,l(e.min)+" - "+l(!e.showMsbControls&&e.max2Byte||e.max),1))]),e.isDisabled?(an(),cn("p",Rh,[e.isDisabled===e.ControlDisableType.NotSupported?(an(),cn(en,{key:0},[Nh],64)):vn("",!0),e.isDisabled===e.ControlDisableType.MissingIndex?(an(),cn(en,{key:1},[Dh],64)):vn("",!0),e.isDisabled===e.ControlDisableType.UartInterfaceAllocated?(an(),cn(en,{key:2},[Ah],64)):vn("",!0),e.isDisabled===e.ControlDisableType.CdcInterfaceAllocated?(an(),cn(en,{key:3},[Oh],64)):vn("",!0)])):(an(),cn(Yt(e.fieldComponent),En({key:0,value:e.input},e.componentProps,{onChanged:e.onValueChange}),null,16,["value","onChanged"])),e.helpText&&!e.simpleLayout?(an(),cn("p",Ph,l(!e.showMsbControls&&e.helpText?e.helpText.replace("(LSB)","").replace("LSB",""):e.helpText),1)):vn("",!0),fn(s,{class:"error-message",errors:e.errors},null,8,["errors"])],2)):vn("",!0)};var Bh=No({name:"FormFileInput",props:{name:{default:"",type:String},label:{default:"",type:String},disabled:{default:!1,type:Boolean}},emits:["change"],setup:(e,{emit:t})=>({emit:t})});const Fh={class:""};Bh.render=function(e,t,n,o,r,i){return an(),cn("label",{class:["btn items-center",{disabled:e.disabled}]},[fn("span",Fh,l(e.label),1),fn("input",{class:"hidden",type:"file",name:e.name,disabled:e.disabled,onChange:t[1]||(t[1]=t=>e.emit("change",t.target.files))},null,40,["name","disabled"])],2)};var Uh={Chevron:zp,Hero:Xp,Button:Kp,ButtonLink:Jp,Section:eh,Spinner:rh,Siblinks:dh,SpinnerOverlay:gh,FormField:_h,FormToggle:Eh,FormFileInput:Bh,ProgressBar:fh},Gh=No({name:"DeviceSettings",props:{block:{type:Number,required:!0},title:{type:String,default:"Global"}},setup:e=>({...ra(e.block,is.Setting)})});const Vh={key:0,class:"absolute flex inset-0 opacity-75 bg-gray-900"},qh={class:"form-grid"};Gh.render=function(e,t,n,o,r,i){const s=Zt("Spinner"),a=Zt("FormField"),l=Zt("Section");return an(),cn("form",{class:"relative flex flex-wrap flex-grow",novalidate:"",onSubmit:t[1]||(t[1]=tr(()=>{},["prevent"]))},[e.loading?(an(),cn("div",Vh,[fn(s,{class:"self-center"})])):vn("",!0),qt(e.$slots,"default",{form:e.formData,onSettingChange:e.onSettingChange,showField:e.showField},()=>[fn(l,{title:e.title,class:"w-full"},{default:$t(()=>[fn("div",qh,[(an(!0),cn(en,null,Ao(e.sections,t=>(an(),cn(en,null,[e.showField(t)?fn(a,{key:t.key,value:e.formData[t.key],"field-definition":t,onModified:e.onSettingChange},null,8,["value","field-definition","onModified"]):vn("",!0)],64))),256))])]),_:1},8,["title"])])],32)};var $h={Device:Fp,DeviceForm:fa,DeviceGrid:wa,DeviceGridButton:Ia,DeviceNav:Pp,DeviceNavItem:Rp,DeviceSettings:Gh},Hh=No({name:"App",setup(){const{outputId:e,boardName:t,firmwareVersion:n,activePreset:o}=md,r=Ro(()=>"home"===jp.currentRoute.value.name),{isConnected:i,isConnecting:s,isWebMidiSupported:a}=Gc,{supportedPresetsCount:l,isBootloaderMode:c}=md;return An(()=>{Gc.loadMidi()}),Fn(()=>{Gc.stopMidiConnectionWatcher()}),{isHomePage:r,outputId:e,isWebMidiSupported:a,isConnected:i,isConnecting:s,boardName:t,firmwareVersion:n,activePreset:o,supportedPresetsCount:l,isBootloaderMode:c}}});const jh={class:"app"},zh={class:"app-header"},Wh=mn(" OpenDeck Configurator "),Qh={key:0,class:"app-board-info"},Zh=mn("OpenDeck DFU mode"),Xh=fn("small",null,"Board",-1),Yh=fn("small",null,"Firmware",-1),Kh=fn("small",null,"Preset",-1),Jh={class:"app-main"},ef={class:"content"},tf=fn("div",{class:"max-w-screen-sm mx-auto px-4 pt-24 sm:px-6 lg:px-8"},[fn("p",{class:""},[mn(" This browser does not support WebMIDI."),fn("br"),mn("Please use a Chrome based browser: ")]),fn("p",{class:"mt-4"},[fn("a",{href:"https://www.google.com/chrome/index.html"},"Google Chrome"),fn("br"),fn("a",{href:"https://brave.com/"},"Brave"),fn("br"),fn("a",{href:"https://vivaldi.com/"},"Vivaldi"),fn("br"),fn("a",{href:"https://www.microsoft.com/en-us/edge"},"Microsoft Edge"),fn("br")])],-1),nf=fn("div",{class:"lg:text-center max-w-screen-xl mx-auto px-4 sm:px-6 lg:px-8"},[fn("p",null,"WebMidi connecting")],-1),of={class:"absolute flex inset-0 opacity-75 bg-gray-900"},rf=fn("div",{class:"lg:text-center max-w-screen-xl mx-auto px-4 pt-24 sm:px-6 lg:px-8"},[fn("p",null,"WebMidi failed to conect")],-1),sf=gn('
    ',1);Hh.render=function(e,t,n,o,r,i){const s=Zt("router-link"),a=Zt("Section"),c=Zt("Spinner"),u=Zt("router-view");return an(),cn("div",jh,[fn("nav",zh,[fn(s,{to:{name:"home"},class:"app-brand"},{default:$t(()=>[Wh]),_:1}),!e.isHomePage&&e.boardName?(an(),cn("span",Qh,[e.isBootloaderMode?(an(),cn(en,{key:0},[Zh],64)):(an(),cn(en,{key:1},[Xh,fn("strong",null,l(e.boardName),1),null!==e.firmwareVersion?(an(),cn(en,{key:0},[Yh,fn("strong",null,l(e.firmwareVersion),1)],64)):vn("",!0),e.supportedPresetsCount>1?(an(),cn(en,{key:1},[Kh,fn("strong",null,l(e.activePreset+1),1)],64)):vn("",!0)],64))])):vn("",!0)]),fn("div",Jh,[fn("div",ef,[e.isWebMidiSupported?e.isConnecting?fn(a,{key:1,class:"h-screen",title:"Establishing connection"},{default:$t(()=>[nf,fn("div",of,[fn(c,{class:"self-center"})])]),_:1}):e.isConnected?fn(u,{key:3}):fn(a,{key:2,class:"h-screen",title:"Problem connecting"},{default:$t(()=>[rf]),_:1}):fn(a,{key:0,class:"h-screen"},{default:$t(()=>[tf]),_:1})])]),sf])};const af=e=>Object.keys(e).forEach(t=>{lf.component(t,e[t])}),lf=((...e)=>{const t=(or||(or=no(nr))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(S(e)){return document.querySelector(e)}return e}(e);if(!o)return;const r=t._component;w(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const i=n(o);return o.removeAttribute("v-cloak"),o.setAttribute("data-v-app",""),i},t})(Hh);af(Uh),af($h),lf.use(jp),lf.mount("#app"); diff --git a/index.html b/index.html index 9ad9100..7856986 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@
    - + \ No newline at end of file