diff --git a/_assets/index.87e1e585.js b/_assets/index.87e1e585.js
new file mode 100644
index 0000000..bb895bd
--- /dev/null
+++ b/_assets/index.87e1e585.js
@@ -0,0 +1,7 @@
+function e(e,t){const n=Object.create(null),o=e.split(",");for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl"),n=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){if(I(e)){const t={};for(let n=0;n{if(e){const n=e.split(i);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function a(e){let t="";if(S(e))t=e;else if(I(e))for(let n=0;nnull==e?"":x(e)?JSON.stringify(e,c,2):String(e),c=(e,t)=>E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n])=>(e[t+" =>"]=n,e),{})}:C(t)?{[`Set(${t.size})`]:[...t.values()]}:!x(t)||I(t)||R(t)?t:String(t),u={},d=[],p=()=>{},h=()=>!1,f=/^on[^a-z]/,m=e=>f.test(e),L=e=>e.startsWith("onUpdate:"),g=Object.assign,b=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},v=Object.prototype.hasOwnProperty,y=(e,t)=>v.call(e,t),I=Array.isArray,E=e=>"[object Map]"===T(e),C=e=>"[object Set]"===T(e),w=e=>"function"==typeof e,S=e=>"string"==typeof e,k=e=>"symbol"==typeof e,x=e=>null!==e&&"object"==typeof e,_=e=>x(e)&&w(e.then)&&w(e.catch),M=Object.prototype.toString,T=e=>M.call(e),R=e=>"[object Object]"===T(e),N=e=>S(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,D=e("key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),A=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},O=/-(\w)/g,P=A(e=>e.replace(O,(e,t)=>t?t.toUpperCase():"")),B=/\B([A-Z])/g,F=A(e=>e.replace(B,"-$1").toLowerCase()),U=A(e=>e.charAt(0).toUpperCase()+e.slice(1)),V=(e,t)=>e!==t&&(e==e||t==t),G=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},$=new WeakMap,H=[];let j;const z=Symbol(""),W=Symbol("");function Q(e,t=u){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const n=function(e,t){const n=function(){if(!n.active)return t.scheduler?void 0:e();if(!H.includes(n)){Y(n);try{return te(),H.push(n),j=n,e()}finally{H.pop(),ne(),j=H[H.length-1]}}};return n.id=X++,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||n(),n}function Z(e){e.active&&(Y(e),e.options.onStop&&e.options.onStop(),e.active=!1)}let X=0;function Y(e){const{deps:t}=e;if(t.length){for(let n=0;n{e&&e.forEach(e=>{(e!==j||e.options.allowRecurse)&&a.add(e)})};if("clear"===t)s.forEach(l);else if("length"===n&&I(e))s.forEach((e,t)=>{("length"===t||t>=o)&&l(e)});else switch(void 0!==n&&l(s.get(n)),t){case"add":I(e)?N(n)&&l(s.get("length")):(l(s.get(z)),E(e)&&l(s.get(W)));break;case"delete":I(e)||(l(s.get(z)),E(e)&&l(s.get(W)));break;case"set":E(e)&&l(s.get(z))}a.forEach(e=>{e.options.scheduler?e.options.scheduler(e):e()})}const ie=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(k)),se=de(),ae=de(!1,!0),le=de(!0),ce=de(!0,!0),ue={};function de(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_raw"===o&&r===(e?Fe:Be).get(n))return n;const i=I(n);if(i&&y(ue,o))return Reflect.get(ue,o,r);const s=Reflect.get(n,o,r);if(k(o)?ie.has(o):"__proto__"===o||"__v_isRef"===o)return s;if(e||oe(n,0,o),t)return s;if(Ze(s)){return!i||!N(o)?s.value:s}return x(s)?e?Ge(s):Ve(s):s}}["includes","indexOf","lastIndexOf"].forEach(e=>{const t=Array.prototype[e];ue[e]=function(...e){const n=ze(this);for(let e=0,t=this.length;e{const t=Array.prototype[e];ue[e]=function(...e){ee();const n=t.apply(this,e);return te(),n}});function pe(e=!1){return function(t,n,o,r){const i=t[n];if(!e&&(o=ze(o),!I(t)&&Ze(i)&&!Ze(o)))return i.value=o,!0;const s=I(t)&&N(n)?Number(n)!0,deleteProperty:(e,t)=>!0},me=g({},he,{get:ae,set:pe(!0)}),Le=(g({},fe,{get:ce}),e=>x(e)?Ve(e):e),ge=e=>x(e)?Ge(e):e,be=e=>e,ve=e=>Reflect.getPrototypeOf(e);function ye(e,t,n=!1,o=!1){const r=ze(e=e.__v_raw),i=ze(t);t!==i&&!n&&oe(r,0,t),!n&&oe(r,0,i);const{has:s}=ve(r),a=n?ge:o?be:Le;return s.call(r,t)?a(e.get(t)):s.call(r,i)?a(e.get(i)):void 0}function Ie(e,t=!1){const n=this.__v_raw,o=ze(n),r=ze(e);return e!==r&&!t&&oe(o,0,e),!t&&oe(o,0,r),e===r?n.has(e):n.has(e)||n.has(r)}function Ee(e,t=!1){return e=e.__v_raw,!t&&oe(ze(e),0,z),Reflect.get(e,"size",e)}function Ce(e){e=ze(e);const t=ze(this),n=ve(t).has.call(t,e),o=t.add(e);return n||re(t,"add",e,e),o}function we(e,t){t=ze(t);const n=ze(this),{has:o,get:r}=ve(n);let i=o.call(n,e);i||(e=ze(e),i=o.call(n,e));const s=r.call(n,e),a=n.set(e,t);return i?V(t,s)&&re(n,"set",e,t):re(n,"add",e,t),a}function Se(e){const t=ze(this),{has:n,get:o}=ve(t);let r=n.call(t,e);r||(e=ze(e),r=n.call(t,e));o&&o.call(t,e);const i=t.delete(e);return r&&re(t,"delete",e,void 0),i}function ke(){const e=ze(this),t=0!==e.size,n=e.clear();return t&&re(e,"clear",void 0,void 0),n}function xe(e,t){return function(n,o){const r=this,i=r.__v_raw,s=ze(i),a=e?ge:t?be:Le;return!e&&oe(s,0,z),i.forEach((e,t)=>n.call(o,a(e),a(t),r))}}function _e(e,t,n){return function(...o){const r=this.__v_raw,i=ze(r),s=E(i),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=r[e](...o),u=t?ge:n?be:Le;return!t&&oe(i,0,l?W:z),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Me(e){return function(...t){return"delete"!==e&&this}}const Te={get(e){return ye(this,e)},get size(){return Ee(this)},has:Ie,add:Ce,set:we,delete:Se,clear:ke,forEach:xe(!1,!1)},Re={get(e){return ye(this,e,!1,!0)},get size(){return Ee(this)},has:Ie,add:Ce,set:we,delete:Se,clear:ke,forEach:xe(!1,!0)},Ne={get(e){return ye(this,e,!0)},get size(){return Ee(this,!0)},has(e){return Ie.call(this,e,!0)},add:Me("add"),set:Me("set"),delete:Me("delete"),clear:Me("clear"),forEach:xe(!0,!1)};function De(e,t){const n=t?Re:e?Ne:Te;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(y(n,o)&&o in t?n:t,o,r)}["keys","values","entries",Symbol.iterator].forEach(e=>{Te[e]=_e(e,!1,!1),Ne[e]=_e(e,!0,!1),Re[e]=_e(e,!1,!0)});const Ae={get:De(!1,!1)},Oe={get:De(!1,!0)},Pe={get:De(!0,!1)},Be=new WeakMap,Fe=new WeakMap;function Ue(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>T(e).slice(8,-1))(e))}function Ve(e){return e&&e.__v_isReadonly?e:qe(e,!1,he,Ae)}function Ge(e){return qe(e,!0,fe,Pe)}function qe(e,t,n,o){if(!x(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=t?Fe:Be,i=r.get(e);if(i)return i;const s=Ue(e);if(0===s)return e;const a=new Proxy(e,2===s?o:n);return r.set(e,a),a}function $e(e){return He(e)?$e(e.__v_raw):!(!e||!e.__v_isReactive)}function He(e){return!(!e||!e.__v_isReadonly)}function je(e){return $e(e)||He(e)}function ze(e){return e&&ze(e.__v_raw)||e}function We(e){return q(e,"__v_skip",!0),e}const Qe=e=>x(e)?Ve(e):e;function Ze(e){return Boolean(e&&!0===e.__v_isRef)}function Xe(e){return Ke(e)}class Ye{constructor(e,t=!1){this._rawValue=e,this._shallow=t,this.__v_isRef=!0,this._value=t?e:Qe(e)}get value(){return oe(ze(this),0,"value"),this._value}set value(e){V(ze(e),this._rawValue)&&(this._rawValue=e,this._value=this._shallow?e:Qe(e),re(ze(this),"set","value",e))}}function Ke(e,t=!1){return Ze(e)?e:new Ye(e,t)}function Je(e){return Ze(e)?e.value:e}const et={get:(e,t,n)=>Je(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Ze(r)&&!Ze(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function tt(e){const t=I(e)?new Array(e.length):{};for(const n in e)t[n]=ot(e,n);return t}class nt{constructor(e,t){this._object=e,this._key=t,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(e){this._object[this._key]=e}}function ot(e,t){return Ze(e[t])?e[t]:new nt(e,t)}class rt{constructor(e,t,n){this._setter=t,this._dirty=!0,this.__v_isRef=!0,this.effect=Q(e,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,re(ze(this),"set","value"))}}),this.__v_isReadonly=n}get value(){return this._dirty&&(this._value=this.effect(),this._dirty=!1),oe(ze(this),0,"value"),this._value}set value(e){this._setter(e)}}function it(e,t,n,o){let r;try{r=o?e(...o):e()}catch(e){at(e,t,n)}return r}function st(e,t,n,o){if(w(e)){const r=it(e,t,n,o);return r&&_(r)&&r.catch(e=>{at(e,t,n)}),r}const r=[];for(let i=0;ixt(e)-xt(t)),gt=0;gtnull==e.id?1/0:e.id;function _t(e){ct=!1,lt=!0,St(e),ut.sort((e,t)=>xt(e)-xt(t));try{for(dt=0;dt{l=!0,g(a,Tt(e,t,!0))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(I(s)?s.forEach(e=>a[e]=null):g(a,s),r[o]=a):r[o]=null}function Rt(e,t){return!(!e||!m(t))&&(t=t.replace(/Once$/,""),y(e,t[2].toLowerCase()+t.slice(3))||y(e,t.slice(2)))}let Nt=null;function Dt(e){Nt=e}function At(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:i,propsOptions:[s],slots:a,attrs:l,emit:c,render:u,renderCache:d,data:p,setupState:h,ctx:f}=e;let m;Nt=e;try{let e;if(4&n.shapeFlag){const t=r||o;m=vn(u.call(t,t,d,i,h,p,f)),e=l}else{const n=t;0,m=vn(n.length>1?n(i,{attrs:l,slots:a,emit:c}):n(i,null)),e=t.props?l:Pt(l)}let g=m;if(!1!==t.inheritAttrs&&e){const t=Object.keys(e),{shapeFlag:n}=g;t.length&&(1&n||6&n)&&(s&&t.some(L)&&(e=Bt(e,s)),g=mn(g,e))}n.dirs&&(g.dirs=n.dirs),n.transition&&(g.transition=n.transition),m=g}catch(t){at(t,e,1),m=fn(nn)}return Nt=null,m}function Ot(e){const t=e.filter(e=>!(un(e)&&e.type===nn&&"v-if"!==e.children));return 1===t.length&&un(t[0])?t[0]:null}const Pt=e=>{let t;for(const n in e)("class"===n||"style"===n||m(n))&&((t||(t={}))[n]=e[n]);return t},Bt=(e,t)=>{const n={};for(const o in e)L(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Ft(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;rVt+=e;function qt(e,t,n={},o){let r=e[t];Vt++;const i=(an(),cn(en,{key:n.key},r?r(n):o?o():[],1===e._?64:-2));return Vt--,i}function $t(e,t=Nt){if(!t)return e;const n=(...n)=>{Vt||an(!0);const o=Nt;Dt(t);const r=e(...n);return Dt(o),Vt||ln(),r};return n._c=!0,n}let Ht=null;const jt=[];function zt(e){jt.push(Ht=e)}function Wt(){jt.pop(),Ht=jt[jt.length-1]||null}function Qt(e){return t=>$t((function(){zt(e);const n=t.apply(this,arguments);return Wt(),n}))}function Zt(e){return Kt("components",e)||e}const Xt=Symbol();function Yt(e){return S(e)?Kt("components",e,!1)||e:e||Xt}function Kt(e,t,n=!0){const o=Nt||So;if(o){const n=o.type;if("components"===e){const e=n.displayName||n.name;if(e&&(e===t||e===P(t)||e===U(P(t))))return n}return Jt(o[e]||n[e],t)||Jt(o.appContext[e],t)}}function Jt(e,t){return e&&(e[t]||e[P(t)]||e[U(P(t))])}const en=Symbol(void 0),tn=Symbol(void 0),nn=Symbol(void 0),on=Symbol(void 0),rn=[];let sn=null;function an(e=!1){rn.push(sn=e?null:[])}function ln(){rn.pop(),sn=rn[rn.length-1]||null}function cn(e,t,n,o,r){const i=fn(e,t,n,o,r,!0);return i.dynamicChildren=sn||d,ln(),sn&&sn.push(i),i}function un(e){return!!e&&!0===e.__v_isVNode}function dn(e,t){return e.type===t.type&&e.key===t.key}const pn=({key:e})=>null!=e?e:null,hn=({ref:e})=>null!=e?I(e)?e:{i:Nt,r:e}:null,fn=function(e,t=null,n=null,r=0,i=null,s=!1){e&&e!==Xt||(e=nn);if(un(e)){const o=mn(e,t,!0);return n&&In(o,n),o}l=e,w(l)&&"__vccOpts"in l&&(e=e.__vccOpts);var l;if(t){(je(t)||"__vInternal"in t)&&(t=g({},t));let{class:e,style:n}=t;e&&!S(e)&&(t.class=a(e)),x(n)&&(je(n)&&!I(n)&&(n=g({},n)),t.style=o(n))}const c=S(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:x(e)?4:w(e)?2:0,u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&pn(t),ref:t&&hn(t),scopeId:Ht,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:c,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null};if(In(u,n),128&c){const{content:e,fallback:t}=function(e){const{shapeFlag:t,children:n}=e;let o,r;return 32&t?(o=Ut(n.default),r=Ut(n.fallback)):(o=Ut(n),r=vn(null)),{content:o,fallback:r}}(u);u.ssContent=e,u.ssFallback=t}!s&&sn&&(r>0||6&c)&&32!==r&&sn.push(u);return u};function mn(e,t,n=!1){const{props:o,ref:r,patchFlag:i}=e,s=t?En(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&pn(s),ref:t&&t.ref?n&&r?I(r)?r.concat(hn(t)):[r,hn(t)]:hn(t):r,scopeId:e.scopeId,children:e.children,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==en?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&mn(e.ssContent),ssFallback:e.ssFallback&&mn(e.ssFallback),el:e.el,anchor:e.anchor}}function Ln(e=" ",t=0){return fn(tn,null,e,t)}function gn(e,t){const n=fn(on,null,e);return n.staticCount=t,n}function bn(e="",t=!1){return t?(an(),cn(nn,null,e)):fn(nn,null,e)}function vn(e){return null==e||"boolean"==typeof e?fn(nn):I(e)?fn(en,null,e):"object"==typeof e?null===e.el?e:mn(e):fn(tn,null,String(e))}function yn(e){return null===e.el?e:mn(e)}function In(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(I(t))n=16;else if("object"==typeof t){if(1&o||64&o){const n=t.default;return void(n&&(n._c&&Gt(1),In(e,n()),n._c&&Gt(-1)))}{n=32;const o=t._;o||"__vInternal"in t?3===o&&Nt&&(1024&Nt.vnode.patchFlag?(t._=2,e.patchFlag|=1024):t._=1):t._ctx=Nt}}else w(t)?(t={default:t,_ctx:Nt},n=32):(t=String(t),64&o?(n=16,t=[Ln(t)]):n=8);e.children=t,e.shapeFlag|=n}function En(...e){const t=g({},e[0]);for(let n=1;n{c=!0;const[n,o]=kn(e,t,!0);g(a,n),o&&l.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!c)return r[o]=d;if(I(s))for(let e=0;e-1,o[1]=n<0||e-1||y(o,"default"))&&l.push(t)}}}return r[o]=[a,l]}function xn(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function _n(e,t){return xn(e)===xn(t)}function Mn(e,t){if(I(t)){for(let n=0,o=t.length;n{if(n.isUnmounted)return;ee(),ko(n);const r=st(t,n,e,o);return ko(null),ne(),r});return o?r.unshift(i):r.push(i),i}}const Nn=e=>(t,n=So)=>!xo&&Rn(e,t,n),Dn=Nn("bm"),An=Nn("m"),On=Nn("bu"),Pn=Nn("u"),Bn=Nn("bum"),Fn=Nn("um"),Un=Nn("rtg"),Vn=Nn("rtc"),Gn=e=>e.type.__isKeepAlive;function qn(e,t,n=So){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}e()});if(Rn(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Gn(e.parent.vnode)&&$n(o,t,n,e),e=e.parent}}function $n(e,t,n,o){const r=Rn(t,e,o,!0);Fn(()=>{b(o[t],r)},n)}const Hn=e=>"_"===e[0]||"$stable"===e,jn=e=>I(e)?e.map(vn):[vn(e)],zn=(e,t,n)=>$t(e=>jn(t(e)),n),Wn=(e,t)=>{const n=e._ctx;for(const o in e){if(Hn(o))continue;const r=e[o];if(w(r))t[o]=zn(0,r,n);else if(null!=r){const e=jn(r);t[o]=()=>e}}},Qn=(e,t)=>{const n=jn(t);e.slots.default=()=>n};function Zn(e,t,n,o){const r=e.dirs,i=t&&t.dirs;for(let s=0;s(i.has(e)||(e&&w(e.install)?(i.add(e),e.install(a,...t)):w(e)&&(i.add(e),e(a,...t))),a),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),a),component:(e,t)=>t?(r.components[e]=t,a):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,a):r.directives[e],mount(i,l){if(!s){const c=fn(n,o);return c.appContext=r,l&&t?t(c,i):e(c,i),s=!0,a._container=i,i.__vue_app__=a,c.component.proxy}},unmount(){s&&e(null,a._container)},provide:(e,t)=>(r.provides[e]=t,a)};return a}}const Jn={scheduler:Et,allowRecurse:!0},eo=function(e,t){t&&t.pendingBranch?I(e)?t.effects.push(...e):t.effects.push(e):wt(e,Lt,mt,gt)},to=(e,t,n,o,r)=>{if(I(e))return void e.forEach((e,i)=>to(e,t&&(I(t)?t[i]:t),n,o,r));let i;i=r?4&r.shapeFlag?r.component.proxy:r.el:null;const{i:s,r:a}=e,l=t&&t.r,c=s.refs===u?s.refs={}:s.refs,d=s.setupState;if(null!=l&&l!==a&&(S(l)?(c[l]=null,y(d,l)&&(d[l]=null)):Ze(l)&&(l.value=null)),S(a)){const e=()=>{c[a]=i,y(d,a)&&(d[a]=i)};i?(e.id=-1,eo(e,o)):e()}else if(Ze(a)){const e=()=>{a.value=i};i?(e.id=-1,eo(e,o)):e()}else w(a)&&it(a,n,12,[i,c])};function no(e){return function(e,t){const{insert:n,remove:o,patchProp:r,forcePatchProp:i,createElement:s,createText:a,createComment:l,setText:c,setElementText:h,parentNode:f,nextSibling:m,setScopeId:L=p,cloneNode:b,insertStaticContent:v}=e,E=(e,t,n,o=null,r=null,i=null,s=!1,a=!1)=>{e&&!dn(e,t)&&(o=ie(e),Y(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);const{type:l,ref:c,shapeFlag:u}=t;switch(l){case tn:C(e,t,n,o);break;case nn:w(e,t,n,o);break;case on:null==e&&S(t,n,o,s);break;case en:O(e,t,n,o,r,i,s,a);break;default:1&u?k(e,t,n,o,r,i,s,a):6&u?B(e,t,n,o,r,i,s,a):(64&u||128&u)&&l.process(e,t,n,o,r,i,s,a,le)}null!=c&&r&&to(c,e&&e.ref,r,i,t)},C=(e,t,o,r)=>{if(null==e)n(t.el=a(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},w=(e,t,o,r)=>{null==e?n(t.el=l(t.children||""),o,r):t.el=e.el},S=(e,t,n,o)=>{[e.el,e.anchor]=v(e.children,t,n,o)},k=(e,t,n,o,r,i,s,a)=>{s=s||"svg"===t.type,null==e?x(t,n,o,r,i,s,a):R(e,t,r,i,s,a)},x=(e,t,o,i,a,l,c)=>{let u,d;const{type:p,props:f,shapeFlag:m,transition:L,scopeId:g,patchFlag:v,dirs:y}=e;if(e.el&&void 0!==b&&-1===v)u=e.el=b(e.el);else{if(u=e.el=s(e.type,l,f&&f.is),8&m?h(u,e.children):16&m&&T(e.children,u,null,i,a,l&&"foreignObject"!==p,c||!!e.dynamicChildren),y&&Zn(e,null,i,"created"),f){for(const t in f)D(t)||r(u,t,null,f[t],l,e.children,i,a,oe);(d=f.onVnodeBeforeMount)&&oo(d,i,e)}M(u,g,e,i)}y&&Zn(e,null,i,"beforeMount");const I=(!a||a&&!a.pendingBranch)&&L&&!L.persisted;I&&L.beforeEnter(u),n(u,t,o),((d=f&&f.onVnodeMounted)||I||y)&&eo(()=>{d&&oo(d,i,e),I&&L.enter(u),y&&Zn(e,null,i,"mounted")},a)},M=(e,t,n,o)=>{if(t&&L(e,t),o){const r=o.type.__scopeId;r&&r!==t&&L(e,r+"-s"),n===o.subTree&&M(e,o.vnode.scopeId,o.vnode,o.parent)}},T=(e,t,n,o,r,i,s,a=0)=>{for(let l=a;l{const l=t.el=e.el;let{patchFlag:c,dynamicChildren:d,dirs:p}=t;c|=16&e.patchFlag;const f=e.props||u,m=t.props||u;let L;if((L=m.onVnodeBeforeUpdate)&&oo(L,n,t,e),p&&Zn(t,e,n,"beforeUpdate"),c>0){if(16&c)A(l,t,f,m,n,o,s);else if(2&c&&f.class!==m.class&&r(l,"class",null,m.class,s),4&c&&r(l,"style",f.style,m.style,s),8&c){const a=t.dynamicProps;for(let t=0;t{L&&oo(L,n,t,e),p&&Zn(t,e,n,"updated")},o)},N=(e,t,n,o,r,i)=>{for(let s=0;s{if(n!==o){for(const c in o){if(D(c))continue;const u=o[c],d=n[c];(u!==d||i&&i(e,c))&&r(e,c,d,u,l,t.children,s,a,oe)}if(n!==u)for(const i in n)D(i)||i in o||r(e,i,n[i],null,l,t.children,s,a,oe)}},O=(e,t,o,r,i,s,l,c)=>{const u=t.el=e?e.el:a(""),d=t.anchor=e?e.anchor:a("");let{patchFlag:p,dynamicChildren:h}=t;p>0&&(c=!0),null==e?(n(u,o,r),n(d,o,r),T(t.children,o,d,i,s,l,c)):p>0&&64&p&&h?(N(e.dynamicChildren,h,o,i,s,l),(null!=t.key||i&&t===i.subTree)&&se(e,t,!0)):j(e,t,o,d,i,s,l,c)},B=(e,t,n,o,r,i,s,a)=>{null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,s,a):U(t,n,o,r,i,s,a):V(e,t,a)},U=(e,t,n,o,r,i,s)=>{const a=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||Co,i={uid:wo++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,update:null,render:null,proxy:null,withProxy:null,effects:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:kn(o,r),emitsOptions:Tt(o,r),emit:null,emitted:null,ctx:u,data:u,props:u,attrs:u,slots:u,refs:u,setupState:u,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Mt.bind(null,i),i}(e,o,r);if(Gn(e)&&(a.ctx.renderer=le),function(e,t=!1){xo=t;const{props:n,children:o,shapeFlag:r}=e.vnode,i=4&r;Cn(e,n,i,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=t,q(t,"_",n)):Wn(t,e.slots={})}else e.slots={},t&&Qn(e,t);q(e.slots,"__vInternal",1)})(e,o);const s=i?function(e,t){const n=e.type;e.accessCache={},e.proxy=new Proxy(e.ctx,Io);const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){return{attrs:e.attrs,slots:e.slots,emit:e.emit}}(e):null;So=e,ee();const r=it(o,e,0,[e.props,n]);if(ne(),So=null,_(r)){if(t)return r.then(t=>{_o(e,t)});e.asyncDep=r}else _o(e,r)}else Mo(e)}(e,t):void 0;xo=!1}(a),a.asyncDep){if(r&&r.registerDep(a,$),!e.el){const e=a.subTree=fn(nn);w(null,e,t,n)}}else $(a,e,t,n,r,i,s)},V=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:i}=e,{props:s,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>0))return!(!r&&!a||a&&a.$stable)||o!==s&&(o?!s||Ft(o,s,c):!!s);if(1024&l)return!0;if(16&l)return o?Ft(o,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;t-1&&(ut[t]=null)}(o.update),o.update()}else t.component=e.component,t.el=e.el,o.vnode=t},$=(e,t,n,o,r,i,s)=>{e.update=Q((function(){if(e.isMounted){let t,{next:n,bu:o,u:a,parent:l,vnode:c}=e,d=n;n?H(e,n,s):n=c,n.el=c.el,o&&G(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&oo(t,l,n,c);const p=At(e),h=e.subTree;e.subTree=p,e.refs!==u&&(e.refs={}),E(h,p,f(h.el),ie(h),e,r,i),n.el=p.el,null===d&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,p.el),a&&eo(a,r),(t=n.props&&n.props.onVnodeUpdated)&&eo(()=>{oo(t,l,n,c)},r)}else{let s;const{el:a,props:l}=t,{bm:c,m:u,parent:d}=e;c&&G(c),(s=l&&l.onVnodeBeforeMount)&&oo(s,d,t);const p=e.subTree=At(e);a&&ue?ue(t.el,p,e,r):(E(null,p,n,o,e,r,i),t.el=p.el),u&&eo(u,r),(s=l&&l.onVnodeMounted)&&eo(()=>{oo(s,d,t)},r);const{a:h}=e;h&&256&t.shapeFlag&&eo(h,r),e.isMounted=!0}}),Jn)},H=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:s}}=e,a=ze(r),[l]=e.propsOptions;if(!(o||s>0)||16&s){let o;wn(e,t,r,i);for(const i in a)t&&(y(t,i)||(o=F(i))!==i&&y(t,o))||(l?!n||void 0===n[i]&&void 0===n[o]||(r[i]=Sn(l,t||u,i,void 0,e)):delete r[i]);if(i!==a)for(const e in i)t&&y(t,e)||delete i[e]}else if(8&s){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:n,slots:o}=e;let r=!0,i=u;if(32&n.shapeFlag){const e=t._;e?1===e?r=!1:g(o,t):(r=!t.$stable,Wn(t,o)),i=t}else t&&(Qn(e,t),i={default:1});if(r)for(const e in o)Hn(e)||e in i||delete o[e]})(e,t.children),St(void 0,e.update)},j=(e,t,n,o,r,i,s,a=!1)=>{const l=e&&e.children,c=e?e.shapeFlag:0,u=t.children,{patchFlag:d,shapeFlag:p}=t;if(d>0){if(128&d)return void W(l,u,n,o,r,i,s,a);if(256&d)return void z(l,u,n,o,r,i,s,a)}8&p?(16&c&&oe(l,r,i),u!==l&&h(n,u)):16&c?16&p?W(l,u,n,o,r,i,s,a):oe(l,r,i,!0):(8&c&&h(n,""),16&p&&T(u,n,o,r,i,s,a))},z=(e,t,n,o,r,i,s,a)=>{t=t||d;const l=(e=e||d).length,c=t.length,u=Math.min(l,c);let p;for(p=0;pc?oe(e,r,i,!0,u):T(t,n,o,r,i,s,a,u)},W=(e,t,n,o,r,i,s,a)=>{let l=0;const c=t.length;let u=e.length-1,p=c-1;for(;l<=u&&l<=p;){const o=e[l],c=t[l]=a?yn(t[l]):vn(t[l]);if(!dn(o,c))break;E(o,c,n,null,r,i,s,a),l++}for(;l<=u&&l<=p;){const o=e[u],l=t[p]=a?yn(t[p]):vn(t[p]);if(!dn(o,l))break;E(o,l,n,null,r,i,s,a),u--,p--}if(l>u){if(l<=p){const e=p+1,u=ep)for(;l<=u;)Y(e[l],r,i,!0),l++;else{const h=l,f=l,m=new Map;for(l=f;l<=p;l++){const e=t[l]=a?yn(t[l]):vn(t[l]);null!=e.key&&m.set(e.key,l)}let L,g=0;const b=p-f+1;let v=!1,y=0;const I=new Array(b);for(l=0;l=b){Y(o,r,i,!0);continue}let c;if(null!=o.key)c=m.get(o.key);else for(L=f;L<=p;L++)if(0===I[L-f]&&dn(o,t[L])){c=L;break}void 0===c?Y(o,r,i,!0):(I[c-f]=l+1,c>=y?y=c:v=!0,E(o,t[c],n,null,r,i,s,a),g++)}const C=v?function(e){const t=e.slice(),n=[0];let o,r,i,s,a;const l=e.length;for(o=0;o0&&(t[o]=n[i-1]),n[i]=o)}}i=n.length,s=n[i-1];for(;i-- >0;)n[i]=s,s=t[s];return n}(I):d;for(L=C.length-1,l=b-1;l>=0;l--){const e=f+l,a=t[e],u=e+1{const{el:s,type:a,transition:l,children:c,shapeFlag:u}=e;if(6&u)return void X(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void a.move(e,t,o,le);if(a===en){n(s,t,o);for(let e=0;el.enter(s),i);else{const{leave:e,delayLeave:r,afterLeave:i}=l,a=()=>n(s,t,o),c=()=>{e(s,()=>{a(),i&&i()})};r?r(s,a,c):c()}else n(s,t,o)},Y=(e,t,n,o=!1)=>{const{type:r,props:i,ref:s,children:a,dynamicChildren:l,shapeFlag:c,patchFlag:u,dirs:d}=e;if(null!=s&&t&&to(s,null,t,n,null),256&c)return void t.ctx.deactivate(e);const p=1&c&&d;let h;if((h=i&&i.onVnodeBeforeUnmount)&&oo(h,t,e),6&c)te(e.component,n,o);else{if(128&c)return void e.suspense.unmount(n,o);p&&Zn(e,null,t,"beforeUnmount"),l&&(r!==en||u>0&&64&u)?oe(l,t,n):16&c&&oe(a,t,n),64&c&&e.type.remove(e,le),o&&K(e)}((h=i&&i.onVnodeUnmounted)||p)&&eo(()=>{h&&oo(h,t,e),p&&Zn(e,null,t,"unmounted")},n)},K=e=>{const{type:t,el:n,anchor:r,transition:i}=e;if(t===en)return void J(n,r);const s=()=>{o(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:o}=i,r=()=>t(n,s);o?o(e.el,s,r):r()}else s()},J=(e,t)=>{let n;for(;e!==t;)n=m(e),o(e),e=n;o(t)},te=(e,t,n)=>{const{bum:o,effects:r,update:i,subTree:s,um:a}=e;if(o&&G(o),r)for(let e=0;e{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},oe=(e,t,n,o=!1,r=0)=>{for(let i=r;i6&e.shapeFlag?ie(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el),se=(e,t,n=!1)=>{const o=e.children,r=t.children;if(I(o)&&I(r))for(let e=0;e{null==e?t._vnode&&Y(t._vnode,null,null,!0):E(t._vnode||null,e,t),kt(),t._vnode=e},le={p:E,um:Y,m:X,r:K,mt:U,mc:T,pc:j,pbc:N,n:ie,o:e};let ce,ue;t&&([ce,ue]=t(le));return{render:ae,hydrate:ce,createApp:Kn(ae,ce)}}(e)}function oo(e,t,n,o=null){st(e,t,7,[n,o])}const ro={};function io(e,t,n){return so(e,t,n)}function so(e,t,{immediate:n,deep:o,flush:r,onTrack:i,onTrigger:s}=u,a=So){let l;const c=Ze(e);if(c?l=()=>e.value:$e(e)?(l=()=>e,o=!0):l=I(e)?()=>e.map(e=>Ze(e)?e.value:$e(e)?lo(e):w(e)?it(e,a,2):void 0):w(e)?t?()=>it(e,a,2):()=>{if(!a||!a.isUnmounted)return d&&d(),it(e,a,3,[h])}:p,t&&o){const e=l;l=()=>lo(e())}let d;const h=e=>{d=g.options.onStop=()=>{it(e,a,4)}};let f=I(e)?[]:ro;const m=()=>{if(g.active)if(t){const e=g();(o||c||V(e,f))&&(d&&d(),st(t,a,3,[e,f===ro?void 0:f,h]),f=e)}else g()};let L;m.allowRecurse=!!t,L="sync"===r?m:"post"===r?()=>eo(m,a&&a.suspense):()=>{!a||a.isMounted?function(e){wt(e,ht,pt,ft)}(m):m()};const g=Q(l,{lazy:!0,onTrack:i,onTrigger:s,scheduler:L});return To(g),t?n?m():f=g():"post"===r?eo(g,a&&a.suspense):g(),()=>{Z(g),a&&b(a.effects,g)}}function ao(e,t,n){const o=this.proxy;return so(S(e)?()=>o[e]:e.bind(o),t.bind(o),n,this)}function lo(e,t=new Set){if(!x(e)||t.has(e))return e;if(t.add(e),Ze(e))lo(e.value,t);else if(I(e))for(let n=0;n{lo(e.get(o),t)});else if(C(e))e.forEach(e=>{lo(e,t)});else for(const n in e)lo(e[n],t);return e}function co(e,t){if(So){let n=So.provides;const o=So.parent&&So.parent.provides;o===n&&(n=So.provides=Object.create(o)),n[e]=t}else;}function uo(e,t,n=!1){const o=So||Nt;if(o){const r=o.provides;if(e in r)return r[e];if(arguments.length>1)return n&&w(t)?t():t}}let po=!1;function ho(e,t,n=[],o=[],r=!1){const{mixins:i,extends:s,data:a,computed:l,methods:c,watch:u,provide:d,inject:h,components:f,directives:m,beforeMount:L,mounted:b,beforeUpdate:v,updated:y,activated:E,deactivated:C,beforeDestroy:S,beforeUnmount:k,destroyed:_,unmounted:M,render:T,renderTracked:R,renderTriggered:N,errorCaptured:D}=t,A=e.proxy,O=e.ctx,P=e.appContext.mixins;if(r&&T&&e.render===p&&(e.render=T),r||(po=!0,fo("beforeCreate",t,A,P),po=!1,Lo(e,P,n,o)),s&&ho(e,s,n,o,!0),i&&Lo(e,i,n,o),h)if(I(h))for(let e=0;ego(e,t,A)),a&&go(e,a,A)),l)for(const e in l){const t=l[e],n=Ro({get:w(t)?t.bind(A,A):w(t.get)?t.get.bind(A,A):p,set:!w(t)&&w(t.set)?t.set.bind(A):p});Object.defineProperty(O,e,{enumerable:!0,configurable:!0,get:()=>n.value,set:e=>n.value=e})}if(u&&o.push(u),!r&&o.length&&o.forEach(e=>{for(const t in e)bo(e[t],O,A,t)}),d){const e=w(d)?d.call(A):d;for(const t in e)co(t,e[t])}var B;r&&(f&&g(e.components||(e.components=g({},e.type.components)),f),m&&g(e.directives||(e.directives=g({},e.type.directives)),m)),r||fo("created",t,A,P),L&&Dn(L.bind(A)),b&&An(b.bind(A)),v&&On(v.bind(A)),y&&Pn(y.bind(A)),E&&qn(E.bind(A),"a",B),C&&function(e,t){qn(e,"da",t)}(C.bind(A)),D&&((e,t=So)=>{Rn("ec",e,t)})(D.bind(A)),R&&Vn(R.bind(A)),N&&Un(N.bind(A)),k&&Bn(k.bind(A)),M&&Fn(M.bind(A))}function fo(e,t,n,o){mo(e,o,n);const{extends:r,mixins:i}=t;r&&function e(t,n,o){n.extends&&e(t,n.extends,o);const r=n[t];r&&r.call(o)}(e,r,n),i&&mo(e,i,n);const s=t[e];s&&s.call(n)}function mo(e,t,n){for(let o=0;o{let t=e;for(let e=0;en[o];if(S(e)){const n=t[e];w(n)&&io(r,n)}else if(w(e))io(r,e.bind(n));else if(x(e))if(I(e))e.forEach(e=>bo(e,t,n,o));else{const o=w(e.handler)?e.handler.bind(n):t[e.handler];w(o)&&io(r,o,e)}}function vo(e,t,n){const o=n.appContext.config.optionMergeStrategies,{mixins:r,extends:i}=t;i&&vo(e,i,n),r&&r.forEach(t=>vo(e,t,n));for(const r in t)o&&y(o,r)?e[r]=o[r](e[r],t[r],n.proxy,r):e[r]=t[r]}const yo=g(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>e.parent&&e.parent.proxy,$root:e=>e.root&&e.root.proxy,$emit:e=>e.emit,$options:e=>function(e){const t=e.type,{__merged:n,mixins:o,extends:r}=t;if(n)return n;const i=e.appContext.mixins;if(!i.length&&!o&&!r)return t;const s={};return i.forEach(t=>vo(s,t,e)),vo(s,t,e),t.__merged=s}(e),$forceUpdate:e=>()=>Et(e.update),$nextTick:()=>It,$watch:e=>ao.bind(e)}),Io={get({_:e},t){const{ctx:n,setupState:o,data:r,props:i,accessCache:s,type:a,appContext:l}=e;if("__v_skip"===t)return!0;let c;if("$"!==t[0]){const a=s[t];if(void 0!==a)switch(a){case 0:return o[t];case 1:return r[t];case 3:return n[t];case 2:return i[t]}else{if(o!==u&&y(o,t))return s[t]=0,o[t];if(r!==u&&y(r,t))return s[t]=1,r[t];if((c=e.propsOptions[0])&&y(c,t))return s[t]=2,i[t];if(n!==u&&y(n,t))return s[t]=3,n[t];po||(s[t]=4)}}const d=yo[t];let p,h;return d?("$attrs"===t&&oe(e,0,t),d(e)):(p=a.__cssModules)&&(p=p[t])?p:n!==u&&y(n,t)?(s[t]=3,n[t]):(h=l.config.globalProperties,y(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;if(r!==u&&y(r,t))r[t]=n;else if(o!==u&&y(o,t))o[t]=n;else if(t in e.props)return!1;return("$"!==t[0]||!(t.slice(1)in e))&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:i}},s){let a;return void 0!==n[s]||e!==u&&y(e,s)||t!==u&&y(t,s)||(a=i[0])&&y(a,s)||y(o,s)||y(yo,s)||y(r.config.globalProperties,s)}},Eo=g({},Io,{get(e,t){if(t!==Symbol.unscopables)return Io.get(e,t,e)},has:(e,n)=>"_"!==n[0]&&!t(n)}),Co=Xn();let wo=0;let So=null;const ko=e=>{So=e};let xo=!1;function _o(e,t,n){var o;w(t)?e.render=t:x(t)&&(e.setupState=$e(o=t)?o:new Proxy(o,et)),Mo(e)}function Mo(e,t){const n=e.type;e.render||(e.render=n.render||p,e.render._rc&&(e.withProxy=new Proxy(e.ctx,Eo))),So=e,ho(e,n),So=null}function To(e){So&&(So.effects||(So.effects=[])).push(e)}function Ro(e){const t=function(e){let t,n;return w(e)?(t=e,n=p):(t=e.get,n=e.set),new rt(t,n,w(e)||!e.set)}(e);return To(t.effect),t}function No(e){return w(e)?{setup:e,name:e.name}:e}function Do(e,t,n){const o=arguments.length;return 2===o?x(t)&&!I(t)?un(t)?fn(e,null,[t]):fn(e,t):fn(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&un(n)&&(n=[n]),fn(e,t,n))}function Ao(e,t){let n;if(I(e)||S(e)){n=new Array(e.length);for(let o=0,r=e.length;o{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n)=>t?Bo.createElementNS(Po,e):Bo.createElement(e,n?{is:n}:void 0),createText:e=>Bo.createTextNode(e),createComment:e=>Bo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Bo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode:e=>e.cloneNode(!0),insertStaticContent(e,t,n,o){const r=o?Uo||(Uo=Bo.createElementNS(Po,"svg")):Fo||(Fo=Bo.createElement("div"));r.innerHTML=e;const i=r.firstChild;let s=i,a=s;for(;s;)a=s,Vo.insert(s,t,n),s=r.firstChild;return[i,a]}};const Go=/\s*!important$/;function qo(e,t,n){if(I(n))n.forEach(n=>qo(e,t,n));else if(t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Ho[t];if(n)return n;let o=P(t);if("filter"!==o&&o in e)return Ho[t]=o;o=U(o);for(let n=0;n<$o.length;n++){const r=$o[n]+o;if(r in e)return Ho[t]=r}return t}(e,t);Go.test(n)?e.setProperty(F(o),n.replace(Go,""),"important"):e[o]=n}}const $o=["Webkit","Moz","ms"],Ho={};const jo="http://www.w3.org/1999/xlink";let zo=Date.now;"undefined"!=typeof document&&zo()>document.createEvent("Event").timeStamp&&(zo=()=>performance.now());let Wo=0;const Qo=Promise.resolve(),Zo=()=>{Wo=0};function Xo(e,t,n,o,r=null){const i=e._vei||(e._vei={}),s=i[t];if(o&&s)s.value=o;else{const[n,a]=function(e){let t;if(Yo.test(e)){let n;for(t={};n=e.match(Yo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e.slice(2).toLowerCase(),t]}(t);if(o){!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,i[t]=function(e,t){const n=e=>{(e.timeStamp||zo())>=n.attached-1&&st(function(e,t){if(I(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e(t))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>Wo||(Qo.then(Zo),Wo=zo()))(),n}(o,r),a)}else s&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,s,a),i[t]=void 0)}}const Yo=/(?:Once|Passive|Capture)$/;const Ko=/^on[a-z]/;const Jo=["ctrl","shift","alt","meta"],er={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Jo.some(n=>e[n+"Key"]&&!t.includes(n))},tr=(e,t)=>(n,...o)=>{for(let e=0;e{switch(t){case"class":!function(e,t,n){if(null==t&&(t=""),n)e.setAttribute("class",t);else{const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),e.className=t}}(e,r,i);break;case"style":!function(e,t,n){const o=e.style;if(n)if(S(n))t!==n&&(o.cssText=n);else{for(const e in n)qo(o,e,n[e]);if(t&&!S(t))for(const e in t)null==n[e]&&qo(o,e,"")}else e.removeAttribute("style")}(e,o,r);break;default:m(t)?L(t)||Xo(e,t,0,r,a):function(e,t,n,o){if(o)return"innerHTML"===t||!!(t in e&&Ko.test(t)&&w(n));if("spellcheck"===t||"draggable"===t)return!1;if("form"===t&&"string"==typeof n)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if(Ko.test(t)&&S(n))return!1;return t in e}(e,t,r,i)?function(e,t,n,o,r,i,s){if("innerHTML"===t||"textContent"===t)return o&&s(o,r,i),void(e[t]=null==n?"":n);if("value"!==t||"PROGRESS"===e.tagName)if(""===n&&"boolean"==typeof e[t])e[t]=!0;else if(null==n&&"string"==typeof e[t])e[t]="",e.removeAttribute(t);else try{e[t]=n}catch(e){}else{e._value=n;const t=null==n?"":n;e.value!==t&&(e.value=t)}}(e,t,r,s,a,l,c):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,o,r){if(r&&t.startsWith("xlink:"))null==o?e.removeAttributeNS(jo,t.slice(6,t.length)):e.setAttributeNS(jo,t,o);else{const r=n(t);null==o||r&&!1===o?e.removeAttribute(t):e.setAttribute(t,r?"":o)}}(e,t,r,i))}},forcePatchProp:(e,t)=>"value"===t},Vo);let or;
+/*!
+ * vue-router v4.0.0-beta.6
+ * (c) 2020 Eduardo San Martin Morote
+ * @license MIT
+ */
+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 mr(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),Lr(e,"")}return Lr(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 Vr(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 Gr={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 mi(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 bi(){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 vi(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(vi(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&&vi(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&&br(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=Ve(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{ms[e]={},Ls[e]={itemsPerPage:16,currentPage:1}});const gs={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:ms,isSystemOperationRunning:!1,systemOperationPercentage:null,viewSettings:Ls},bs=Ve(gs);var vs="object"==typeof process&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var ys={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},Is="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Es(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 Cs=Es((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=ys,o=(t=e.exports={}).re=[],r=t.src=[],i=t.t={};let s=0;const a=(e,t,n)=>{const a=s++;vs(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 ws=/^[0-9]+$/,Ss=(e,t)=>{const n=ws.test(e),o=ws.test(t);return n&&o&&(e=+e,t=+t),e===t?0:n&&!o?-1:o&&!n?1:eSs(t,e)};const{MAX_LENGTH:xs,MAX_SAFE_INTEGER:_s}=ys,{re:Ms,t:Ts}=Cs,{compareIdentifiers:Rs}=ks;class Ns{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Ns){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>xs)throw new TypeError(`version is longer than ${xs} characters`);vs("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?Ms[Ts.LOOSE]:Ms[Ts.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>_s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>_s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>_s||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<_s)return t}return e}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(e){if(vs("SemVer.compare",this.version,this.options,e),!(e instanceof Ns)){if("string"==typeof e&&e===this.version)return 0;e=new Ns(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof Ns||(e=new Ns(e,this.options)),Rs(this.major,e.major)||Rs(this.minor,e.minor)||Rs(this.patch,e.patch)}comparePre(e){if(e instanceof Ns||(e=new Ns(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],o=e.prerelease[t];if(vs("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return Rs(n,o)}while(++t)}compareBuild(e){e instanceof Ns||(e=new Ns(e,this.options));let t=0;do{const n=this.build[t],o=e.build[t];if(vs("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return Rs(n,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=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 Ds=Ns;var As=(e,t,n)=>new Ds(e,n).compare(new Ds(t,n));var Os=(e,t,n)=>As(e,t,n)>0,Ps=Es((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,m={},L=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){m[" "+e]||(L.test(e)?m[" "+e]=e+"/":m[" "+e]=y(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(g,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(b,"$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),m=!1,L=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=L-1)),s=m||/\n\n(?!\s*$)/.test(n),g!==L-1&&(m="\n"===n.charAt(n.length-1),s||(s=m)),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,V=k,G={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]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\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?'|\([^()]*\))/};G.def=U(G.def).replace("label",G._label).replace("title",G._title).getRegex(),G.bullet=/(?:[*+-]|\d{1,9}[.)])/,G.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,G.item=U(G.item,"gm").replace(/bull/g,G.bullet).getRegex(),G.list=U(G.list).replace(/bull/g,G.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+G.def.source+")").getRegex(),G._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",G._comment=//,G.html=U(G.html,"i").replace("comment",G._comment).replace("tag",G._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),G.paragraph=U(G._paragraph).replace("hr",G.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","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.blockquote=U(G.blockquote).replace("paragraph",G.paragraph).getRegex(),G.normal=V({},G),G.gfm=V({},G.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*|$)"}),G.gfm.nptable=U(G.gfm.nptable).replace("hr",G.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","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.gfm.table=U(G.gfm.table).replace("hr",G.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","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.pedantic=V({},G.normal,{html:U("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",G._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:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:F,paragraph:U(G.normal._paragraph).replace("hr",G.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",G.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:-]*\\s*>|^<[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",G._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=V({},q),q.pedantic=V({},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=V({},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?"\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+""+o+">\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"},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+">\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='"+n+""},t.image=function(e,t,n){if(null===(e=Y(this.options.sanitize,this.options.baseUrl,e)))return n;var o='
":">"},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,m,L,g,b,v,y="",I=e.length;for(n=0;n0&&"text"===L.tokens[0].type?(L.tokens[0].text=v+" "+L.tokens[0].text,L.tokens[0].tokens&&L.tokens[0].tokens.length>0&&"text"===L.tokens[0].tokens[0].type&&(L.tokens[0].tokens[0].text=v+" "+L.tokens[0].tokens[0].text)):L.tokens.unshift({type:"text",text:v}):m+=v),m+=this.parse(L.tokens,f),u+=this.renderer.listitem(m,b,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 Is&&Is.global===Is?Is: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 Fs=e=>({...tt(Ge(e.state)),...e.computed,...e.actions}),Us=e=>JSON.parse(localStorage.getItem(e)),Vs=(e,t)=>localStorage.setItem(e,JSON.stringify(t)),Gs=e=>parseInt(e,16),qs=e=>Array.isArray(e)?e.map(e=>e.toString(16)):e.toString(16),$s=e=>Array.isArray(e)?e.map(e=>e.toString(16)).join(" "):e.toString(16),Hs=e=>Array.isArray(e)?e.join(" "):e,js=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},Ws=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]},Qs=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Zs=(e,t)=>e&&t&&Math.abs(t.getTime()-e.getTime()),Xs=e=>("0000"+e).slice(-2),Ys=e=>new Promise(t=>{setTimeout(t,e)});var Ks,Js;(Js=Ks||(Ks={})).Closed="closed",Js.Pending="pending",Js.Open="open";const ea=Ve({connectionState:Ks.Closed,inputs:[],outputs:[],log:!0,isWebMidiSupported:!1});var ta,na,oa=Es((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)}(Is)}));(na=ta||(ta={}))[na.STATUS=2]="STATUS",na[na.HANDSHAKE=3]="HANDSHAKE",na[na.WISH=4]="WISH",na[na.AMOUNT=5]="AMOUNT",na[na.BLOCK=6]="BLOCK",na[na.SECTION=7]="SECTION",na[na.PART=8]="PART",na[na.INDEX=9]="INDEX",na[na.NEW_VALUE=10]="NEW_VALUE",na[na.MSG_LENGTH=11]="MSG_LENGTH",na[na.WRITE=12]="WRITE",na[na.NOT_SUPPORTED=13]="NOT_SUPPORTED",na[na.READ=14]="READ",na[na.UART_INTERFACE_ALLOCATED=80]="UART_INTERFACE_ALLOCATED",na[na.UKNOWN_ERROR=704]="UKNOWN_ERROR",na[na.UI_QUEUE_REQ_ID_CONFLICT=711]="UI_QUEUE_REQ_ID_CONFLICT",na[na.UI_QUEUE_REQ_DATA_MISSING=712]="UI_QUEUE_REQ_DATA_MISSING",na[na.UI_QUEUE_REQ_ALREADY_ACTIVE=713]="UI_QUEUE_REQ_ALREADY_ACTIVE",na[na.UI_QUEUE_REQ_NONE_ACTIVE=714]="UI_QUEUE_REQ_NONE_ACTIVE",na[na.UI_QUEUE_SPECIAL_REQ_ID_MISMATCH=715]="UI_QUEUE_SPECIAL_REQ_ID_MISMATCH",na[na.UI_QUEUE_REQUEST_DECODE_ERROR=716]="UI_QUEUE_REQUEST_DECODE_ERROR",na[na.UI_QUEUE_REQUEST_SEND_ERROR=717]="UI_QUEUE_REQUEST_SEND_ERROR",na[na.UI_QUEUE_REQ_DATA_INVALID=718]="UI_QUEUE_REQ_DATA_INVALID",na[na.UI_QUEUE_REQ_TIMED_OUT=719]="UI_QUEUE_REQ_TIMED_OUT",na[na.UI_QUEUE_EMBEDED_RESPONSE_MISMATCH=720]="UI_QUEUE_EMBEDED_RESPONSE_MISMATCH";const ra={code:704,description:"Missing error description (READ error)."},ia={704:ra,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."},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."}},sa=e=>ia[e]||ra,aa=[{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"},{name:"Arduino Nano 33 BLE",id:[33,108,99,106],oldId:[],firmwareFileName:"nano33ble.sysex"},{name:"Adafruit ItsyBitsy nRF52840 Express",id:[59,48,3,95],oldId:[],firmwareFileName:"af_ib_nrf52840.sysex"}],la=(e,t,n)=>{const o=Xe(!0),r=Ve(Sc(e,t)),i=vd.actions.getFilteredSectionsForBlock(e,t),s=async()=>{o.value=!0;const i=t===cs.Value&&n?n.value:void 0,s=await vd.actions.getComponentSettings(e,t,i);Object.assign(r,s),Ys(100).then(()=>o.value=!1)},a=(e,t,n)=>{if(o.value)return;o.value=!0;return vd.actions.setComponentSectionValue(t,()=>{r[e]=t.value,Ys(100).then(()=>o.value=!1),n&&n(t.value)}).catch(e=>(Qu.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:wc[e]}},ca=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&&Ys(10).then(n),o})}},ua=(e,t)=>()=>{if(!window.confirm(e))return!1;t()};var da=(e,t,n)=>As(e,t,n)<0;const{MAX_LENGTH:pa}=ys,{re:ha,t:fa}=Cs;var ma=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Ds)return e;if("string"!=typeof e)return null;if(e.length>pa)return null;if(!(t.loose?ha[fa.LOOSE]:ha[fa.FULL]).test(e))return null;try{return new Ds(e,t)}catch(e){return null}};var La=(e,t)=>{const n=ma(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const ga=e=>{const t=[];for(let n=e.startIndex;n<=e.endIndex;n++)t.push(n);return{...e,indexArray:t}};var ba=No({name:"DeviceForm",props:{block:{required:!0,type:Number},gridCols:{default:3,type:Number}},setup(e){const{numberOfComponents:t,outputId:n}=yd,o=Ro(()=>Number(Zp.currentRoute.value.params.index));return{outputId:n,numberOfComponents:t,index:o,...la(e.block,cs.Value,o)}}});const va={class:"w-full section-heading"},ya={class:"section-heading-inner flex"},Ia=fn("span",{class:"mr-6"},"›",-1),Ea={class:"mr-6 text-gray-400"},Ca={class:"hidden md:block md:flex-grow text-right"},wa={class:"section-content"};ba.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",va,[fn("div",ya,[fn(s,{class:"mr-6",to:{name:e.blockDefinition.routeName}},{default:$t(()=>[fn("h2",null,l(e.blockDefinition.title)+"s",1)]),_:1},8,["to"]),Ia,fn("div",Ea,[Ln(l(e.blockDefinition.title)+" ",1),fn("strong",null,l(e.index),1)]),fn("div",Ca,[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}):bn("",!0),fn("div",wa,[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"]):bn("",!0)],64))),256))],2)])],32)};var Sa=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{...ca(t)}}});Sa.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 ka=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{...ca(t)}}});const xa={class:"form-table-row"};ka.render=function(e,t,n,o,r,i){const s=Zt("FormField");return an(),cn("div",xa,[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"]):bn("",!0)],64))),256))])};var _a=No({name:"DeviceGrid",components:{DeviceGridButton:Sa,DeviceTableComponentRow:ka},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}=yd,{highlights:i}=Wu,{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:da(La(bs.firmwareVersion),"5.4.0")||Os(La(bs.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:da(La(bs.firmwareVersion),"5.4.0")||Os(La(bs.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(ga)})})(r,s):void 0,{componentCount:c,indexRange:u,pages:d,pageSizes:p,sections:h,viewSetting:f}=(e=>{const t=Ro(()=>vd.state.viewSettings[e]),n=Ro(()=>vd.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;twc[e].sections);return{componentCount:n,indexRange:c,pages:o,pageSizes:l,sections:u,viewSetting:t}})(s.value),{columnViewData:m,loading:L,showField:g,onValueChange:b}=((e,t)=>{const n=Xe(!0),o=Sc(e,cs.Value),r=Ve({}),i=Ro(()=>!!t.value.viewListAsTable),s=async()=>{if(2!==vd.state.valueSize||!i.value)return;n.value=!0;const t=await vd.actions.getSectionValues(e);Object.keys(t).forEach(e=>{t[e].forEach((t,n)=>{r[n]||(r[n]={...o}),r[n][e]=t})}),Ys(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 vd.actions.setComponentSectionValue(u,()=>{r[l][o]=u.value,Ys(100).then(()=>n.value=!1),c&&c(u.value)}).catch(e=>(Qu.error("ERROR WHILE SAVING SETTING DATA",e),s()))}}})(s.value,f);return{outputId:t,highlights:i,columnViewData:m,loading:L,showField:g,onValueChange:b,setViewSetting:n,componentCount:c,viewSetting:f,indexRange:u,pages:d,pageSizes:p,sections:h,showMsbControls:o,segments:l}}});const Ma={class:"section-heading"},Ta={key:0,class:"section-heading-inner text-center"},Ra={key:0,class:"section-heading"},Na={class:"section-heading-inner-sm clearfix"},Da={class:""},Aa={key:0,class:"ml-6 float-right"},Oa=fn("span",{class:"text-xs"},"Show",-1),Pa={key:1,class:"ml-6 mt-4 md:mt-0 float-right"},Ba=fn("span",{class:"text-xs ml-4"},"Page",-1),Fa={class:"form-table"},Ua={key:2,class:"device-grid"},Va={class:"text-xl font-bold"},Ga={class:"section-heading text-center"},qa={class:"section-heading-inner-sm"},$a={class:"device-grid"},Ha={class:"text-xl font-bold"};_a.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",Ma,[e.title?(an(),cn("h2",Ta,l(e.title),1)):bn("",!0)]),e.showMsbControls?bn("",!0):(an(),cn("div",Ra,[fn("div",Na,[fn("span",Da,[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",Aa,[Oa,(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))])):bn("",!0),e.viewSetting.viewListAsTable&&e.pages>1?(an(),cn("span",Pa,[Ba,(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))])):bn("",!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}):bn("",!0),fn("div",Fa,[(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",Ua,[(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",Va,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",Ga,[fn("div",qa,l(t.title),1)]),fn("div",$a,[(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",Ha,l(t),1)]),_:2},1032,["output-id","route-name","index","highlight"]))),128))])]))),128)):bn("",!0)],2)};var ja=No({name:"RouteWrapper"});ja.render=function(e,t,n,o,r,i){const s=Zt("router-view");return an(),cn(s,{key:e.$route.fullPath})};var za=No({name:"AnalogIcon"});const Wa={"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"},Qa=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);za.render=function(e,t,n,o,r,i){return an(),cn("svg",Wa,[Qa])};const Za={Enabled:{block:Bi.Analog,key:"enabled",type:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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}},Xa={block:Bi.Analog,title:"Analog",routeName:"device-analogs",iconComponent:We(za),componentCountResponseIndex:2,sections:Za,routes:[{path:"analogs",name:"device-analogs",component:ja,redirect:{name:"device-analogs-list"},children:[{path:"list",name:"device-analogs-list",component:_a,props:{block:Bi.Analog,routeName:"device-analogs-form",segmentGrid:!0}},{path:"analogs/:index",name:"device-analogs-form",component:ba,props:{block:Bi.Analog}}]}]};var Ya=No({name:"IconButton"});const Ka={"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640"},Ja=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),el=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),tl=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),nl=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);Ya.render=function(e,t,n,o,r,i){return an(),cn("svg",Ka,[Ja,el,tl,nl])};const ol={Type:{block:Bi.Button,key:"type",type:cs.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:cs.Value,section:1,component:_i.Select,options:[{value:Gi.Note,text:"Note"},{value:Gi.ProgramChange,text:"Program Change"},{value:Gi.ProgramChangeInc,text:"Program Change Inc"},{value:Gi.ProgramChangeDec,text:"Program Change Dec"},{value:Gi.ProgramChangeOffsetInc,text:"Program Change Offset Increment"},{value:Gi.ProgramChangeOffsetDec,text:"Program Change Offset Decrement"},{value:Gi.ControlChange,text:"CC"},{value:Gi.ControlChangeOff,text:"CC/0 Off"},{value:Gi.MmcStop,text:"MMC Stop"},{value:Gi.MmcPlay,text:"MMC Play"},{value:Gi.MmcRecord,text:"MMC Record"},{value:Gi.MmcPause,text:"MMC Pause"},{value:Gi.RealTimeClock,text:"Real Time Clock"},{value:Gi.RealTimeStart,text:"Real Time Start"},{value:Gi.RealTimeContinue,text:"Real Time Continue"},{value:Gi.RealTimeStop,text:"Real Time Stop"},{value:Gi.RealTimeActiveSensing,text:"Real Time Active Sensing"},{value:Gi.RealTimeSystemReset,text:"Real Time System Reset"},{value:Gi.None,text:"None"},{value:Gi.PresetChange,text:"Preset Change"},{value:Gi.MultiValueIncResetNote,text:"Multi Value IncReset Note"},{value:Gi.MultiValueIncDecNote,text:"Multi Value IncDec Note"},{value:Gi.MultiValueIncResetCC,text:"Multi Value IncReset CC"},{value:Gi.MultiValueIncDecCC,text:"Multi Value IncDec CC"},{value:Gi.NoteOffOnly,text:"Note Off Only"},{value:Gi.ControlChange0Only,text:"CC/0 only"},{value:Gi.BpmInc,text:"BPM Inc"},{value:Gi.BpmDec,text:"BPM Dec"}],label:"Message type",helpText:"",block:Bi.Button},MidiChannel:{showIf:e=>!Zi.includes(e.messageType),key:"midiChannel",type:cs.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:cs.Value,section:2,component:_i.Input,min:0,max:127,label:"MIDI ID",helpText:"",block:Bi.Button},Preset:{showIf:e=>e.messageType==Gi.PresetChange,key:"preset",type:cs.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:cs.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}},rl={block:Bi.Button,title:"Button",routeName:"device-buttons",iconComponent:We(Ya),componentCountResponseIndex:0,sections:ol,routes:[{path:"buttons",name:"device-buttons",component:ja,redirect:{name:"device-buttons-list"},children:[{path:"list",name:"device-buttons-list",component:_a,props:{block:Bi.Button,routeName:"device-buttons-form",segmentGrid:!0}},{path:"buttons/:index",name:"device-buttons-form",component:ba,props:{block:Bi.Button}}]}]};var il=No({name:"Display",setup(){const{sections:e}=hl;return{Block:Bi,sections:e}}});const sl={class:"form-grid"};il.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",sl,[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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!0)])]),_:2},1024)]),_:1},8,["block"])};var al=No({name:"IconDisplay"});const ll={"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"},cl=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),ul=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),dl=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);al.render=function(e,t,n,o,r,i){return an(),cn("svg",ll,[cl,ul,dl])};const pl={EnableDisplay:{block:Bi.Display,key:"enableDisplay",type:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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."}},hl={block:Bi.Display,title:"I2C",routeName:"device-i2c",iconComponent:We(al),sections:pl,routes:[{path:"i2c:",name:"device-i2c",component:il}]};var fl=No({name:"IconEncoder"});const ml={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"},Ll=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),gl=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),bl=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),vl=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),yl=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);fl.render=function(e,t,n,o,r,i){return an(),cn("svg",ml,[Ll,gl,bl,vl,yl])};const Il={Enabled:{block:Bi.Encoder,key:"enabled",type:cs.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:cs.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:cs.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.SingleNoteWithVariableValue,text:"Single note / variable value"},{value:$i.SingleNoteWithFixedValueBothDirections,text:"Single note / repeated value both directions"},{value:$i.SingleNoteWithFixedValueOneDirection0OtherDirection,text:"Single note / repeated value one direction, 0 value other"},{value:$i.TwoNoteWithFixedValueBothDirections,text:"Two note / repeated value both directions"},{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:cs.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:cs.Value,section:3,component:_i.Input,min:0,max:127,max2Byte:16383,label:"MIDI ID (LSB)",helpText:""},MidiId2:{showIf:e=>rs.includes(e.encodingMode)&&!!e.enabled,block:Bi.Encoder,key:"midiId2",type:cs.Value,section:12,component:_i.Input,min:0,max:16383,label:"2nd MIDI ID",helpText:""},MidiIdMSB:{showIf:e=>!Ki.includes(e.encodingMode)&&!!e.enabled,isMsb:!0,block:Bi.Encoder,key:"midiIdMSB",type:cs.Value,section:7,component:_i.Input,min:0,max:127,label:"MIDI ID (MSB)",helpText:""},Acceleration:{showIf:e=>es.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"acceleration",type:cs.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:cs.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."},RepeatedValue:{showIf:e=>os.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"repeatedValue",type:cs.Value,section:11,component:_i.Input,min:0,max:16383,label:"Repeated value",helpText:"Specifies the constant note value to be sent when encoder is moved."},PulsesPerStep:{showIf:e=>e.enabled,block:Bi.Encoder,key:"pulsesPerStep",type:cs.Value,section:5,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."},LowerLimit:{showIf:e=>ns.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"lowerLimit",type:cs.Value,section:9,component:_i.Input,min:0,max:16383,label:"Lower limit",helpText:"Specifies the minimum value which is sent by the encoder input. 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."},UpperLimit:{showIf:e=>ns.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"upperLimit",type:cs.Value,section:10,component:_i.Input,min:0,max:16383,label:"Upper limit",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."}},El={block:Bi.Encoder,title:"Encoder",routeName:"device-encoders",iconComponent:We(fl),componentCountResponseIndex:1,sections:Il,routes:[{path:"encoders",name:"device-encoders",component:ja,redirect:{name:"device-encoders-list"},children:[{path:"list",name:"device-encoders-list",component:_a,props:{block:Bi.Encoder,routeName:"device-encoders-form",title:"Encoder"}},{path:"encoders/:index",name:"device-encoders-form",component:ba,props:{block:Bi.Encoder,gridCols:4}}]}]};var Cl=No({name:"GlobalHardware",setup(){const{valueSize:e,bootLoaderSupport:t,startFactoryReset:n,startReboot:o,startBackup:r}=yd;return{modalVisible:Xe(!1),modalTitle:Xe(""),availableUpdates:Xe([]),onFactoryResetClicked:ua("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:ua("This will initiate a full backup of all parameters stored on the board. Proceed?",r),onBackupFileSelected:e=>{e.length&&yd.startRestore(e[0])}}}});const wl={class:"form-grid"},Sl={class:"form-field"},kl=Ln(" Reboot "),xl=fn("p",{class:"help-text"}," Rebooting the device will make the UI temporarily unavailable. ",-1),_l={class:"form-field"},Ml=Ln(" Reset to factory settings "),Tl=fn("p",{class:"help-text"}," Resets the device to its factory settings. ",-1),Rl={key:0,class:"form-field"},Nl=Ln(" Firmware section "),Dl=fn("p",{class:"help-text"}," Section used to reboot the device into bootloader mode and update the firmware. ",-1),Al={class:"form-grid"},Ol={class:"form-field"},Pl=Ln(" Backup "),Bl=fn("p",{class:"help-text"}," Download a backup of your configuration (incl presets). ",-1),Fl={class:"form-field"},Ul=fn("p",{class:"help-text"}," Select a backup file to restore your device configuration. ",-1);Cl.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",wl,[fn("div",Sl,[fn(s,{onClick:tr(e.startReboot,["prevent"])},{default:$t(()=>[kl]),_:1},8,["onClick"]),xl]),fn("div",_l,[fn(s,{onClick:tr(e.onFactoryResetClicked,["prevent"])},{default:$t(()=>[Ml]),_:1},8,["onClick"]),Tl]),e.bootLoaderSupport?(an(),cn("div",Rl,[fn(a,{to:{name:"device-firmware-update"}},{default:$t(()=>[Nl]),_:1}),Dl])):bn("",!0)])]),_:1}),2===e.valueSize?fn(l,{key:0,title:"Backup & Restore",class:"w-full"},{default:$t(()=>[fn("div",Al,[fn("div",Ol,[fn(s,{onClick:tr(e.onBackupClicked,["prevent"])},{default:$t(()=>[Pl]),_:1},8,["onClick"]),Bl]),fn("div",Fl,[fn(c,{label:"Restore",name:"backup-file",onChange:e.onBackupFileSelected},null,8,["onChange"]),Ul])])]),_:1}):bn("",!0)],64)};var Vl=No({name:"Global",components:{GlobalHardware:Cl},setup(){const{sections:e}=dc,{supportedPresetsCount:t}=yd;return{Block:Bi,sections:e,supportedPresetsCount:t}}});const Gl={class:"form-grid"},ql={class:"form-grid"};Vl.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",Gl,[n(e.sections.DisableForcedValueRefreshAfterPresetChange)?fn(s,{key:0,value:t.disableForcedValueRefreshAfterPresetChange,"field-definition":e.sections.DisableForcedValueRefreshAfterPresetChange,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!0),n(e.sections.EnablePresetChangeWithProgramChangeIn)?fn(s,{key:1,value:t.enablePresetChangeWithProgramChangeIn,"field-definition":e.sections.EnablePresetChangeWithProgramChangeIn,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!0),n(e.sections.PreservePresetState)?fn(s,{key:2,class:"col-span-2",value:t.preservePresetState,"field-definition":e.sections.PreservePresetState,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!0),n(e.sections.ActivePreset)?fn(s,{key:3,value:t.activePreset,"field-definition":e.sections.ActivePreset,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!0)])]),_:2},1024):bn("",!0),fn(a,{title:"MIDI"},{default:$t(()=>[fn("div",ql,[n(e.sections.UseGlobalChannel)?fn(s,{key:0,value:t.useGlobalChannel,"field-definition":e.sections.UseGlobalChannel,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!0)])]),_:2},1024)]),_:1},8,["block"]),fn(c)],64)};var $l=No({name:"GlobalFirmware",setup(){const{firmwareFileName:e,isBootloaderMode:t,startUpdatesCheck:n,bootLoaderSupport:o,startBootLoaderMode:r,startFirmwareUdate:i}=yd,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 Hl=fn("p",{class:"mb-6 text-sm leading-5 text-gray-500"},[Ln(" Your device does not have bootloader support. "),fn("br"),Ln(" To perform a manual firmware update please consult the "),fn("a",{href:"https://github.com/paradajz/OpenDeck/wiki/Firmware-update"},"wiki firmware update page"),Ln(". ")],-1),jl={class:"form-grid"},zl={key:0,class:"form-field"},Wl=Ln(" Check for updates "),Ql=fn("p",{class:"help-text"}," Check for newer firmware versions. ",-1),Zl={key:1,class:"form-field"},Xl=Ln(" Bootloader mode "),Yl=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),Kl={key:2,class:"form-field"},Jl=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),ec={key:2,class:"lg:text-center relative",style:{"min-height":"50vh"}},tc={class:"absolute flex inset-0 opacity-75 bg-gray-900"},nc={key:0,class:"text-sm leading-5 text-gray-200"},oc={key:1,class:"text-sm pb-6"};$l.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",jl,[e.isBootloaderMode?bn("",!0):(an(),cn("div",zl,[fn(a,{disabled:e.loading,onClick:tr(e.checkForUpdates,["prevent"])},{default:$t(()=>[Wl]),_:1},8,["disabled","onClick"]),Ql])),!e.isBootloaderMode&&e.bootLoaderSupport?(an(),cn("div",Zl,[fn(a,{onClick:tr(e.startBootLoaderMode,["prevent"])},{default:$t(()=>[Xl]),_:1},8,["onClick"]),Yl])):bn("",!0),e.isBootloaderMode?(an(),cn("div",Kl,[fn(c,{name:"backup-file",label:"Update Firmware",disabled:!e.isBootloaderMode,onChange:e.onFirmwareFileSelected},null,8,["disabled","onChange"]),Jl])):bn("",!0)])]),_:1}):fn(s,{key:0,title:"No bootloader support",class:"w-full"},{default:$t(()=>[Hl]),_:1}),e.loading?(an(),cn("div",ec,[fn("div",tc,[fn(u,{class:"self-center"})])])):e.updatesChecked?fn(s,{key:3,title:"Updates",class:"w-full"},{default:$t(()=>[e.availableUpdates.length?(an(),cn("div",oc,[(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"])):bn("",!0),fn("div",{innerHTML:t.html_description},null,8,["innerHTML"])]))),128))])):(an(),cn("p",nc," Your firmware is up to date. "))]),_:1}):bn("",!0)],64)};var rc=No({name:"IconGlobal"});const ic={"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"},sc=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),ac=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),lc=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),cc=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);rc.render=function(e,t,n,o,r,i){return an(),cn("svg",ic,[sc,ac,lc,cc])};const uc={PreservePresetState:{block:Bi.Global,key:"preservePresetState",type:cs.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.'},DisableForcedValueRefreshAfterPresetChange:{block:Bi.Global,key:"disableForcedValueRefreshAfterPresetChange",type:cs.Setting,section:2,settingIndex:2,component:_i.Toggle,label:"Disable forced value refresh after preset change",helpText:"If this option isn't enabled, all components will resend their current values once the preset changes."},EnablePresetChangeWithProgramChangeIn:{block:Bi.Global,key:"enablePresetChangeWithProgramChangeIn",type:cs.Setting,section:2,settingIndex:3,component:_i.Toggle,label:"Enable preset change with MIDI Program Change In",helpText:"When enabled, upon receiving MIDI Program Change message (on any interface and any channel) the board will change the preset to cooresponding program change value."},ActivePreset:{block:Bi.Global,key:"activePreset",type:cs.Setting,section:2,settingIndex:0,component:_i.Select,options:()=>{const e=vd.state.supportedPresetsCount||1,t=[];for(let n=0;n{vd.state.activePreset=e},label:"Active preset",helpText:"Preset stores the entire configuration for device."},UseGlobalChannel:{block:Bi.Global,key:"useGlobalChannel",type:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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."}},dc={block:Bi.Global,title:"Global",routeName:"device-global",iconComponent:We(rc),sections:uc,routes:[{path:"",name:"device-global",component:Vl},{path:"firmware-update",name:"device-firmware-update",component:$l}]};var pc=No({name:"DeviceGridWithSettings",props:{block:{required:!0,type:Number},routeName:{required:!0,type:String},settingsTitle:{default:"Global",type:String},segmentGrid:{type:Boolean,default:!1}}});pc.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 hc=No({name:"IconLed"});const fc={"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"},mc=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);hc.render=function(e,t,n,o,r,i){return an(),cn("svg",fc,[mc])};const Lc={BlinkWithMidiClock:{block:Bi.Led,key:"blinkWithMidiClock",type:cs.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:cs.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:cs.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:cs.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},ActivationId:{showIf:e=>!ss.includes(e.controlType),key:"activationId",type:cs.Value,section:3,component:_i.Input,min:0,max:127,label:"Activation ID",helpText:"",block:Bi.Led},RGBEnable:{showIf:e=>!ls.includes(e.controlType),key:"rgbEnable",type:cs.Value,section:4,component:_i.Toggle,label:"RGB Enable",helpText:"",block:Bi.Led},ControlType:{key:"controlType",type:cs.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"},{value:ji.Static,text:"Static / constantly on"}],label:"Control type",helpText:"",block:Bi.Led},ActivationValue:{showIf:e=>!is.includes(e.controlType),key:"activationValue",type:cs.Value,section:6,component:_i.Input,min:0,max:127,label:"Activation Value",helpText:"",block:Bi.Led},MidiChannel:{showIf:e=>!as.includes(e.controlType),key:"midiChannel",type:cs.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."}},gc={block:Bi.Led,title:"LED",routeName:"device-leds",iconComponent:We(hc),componentCountResponseIndex:3,sections:Lc,routes:[{path:"leds",name:"device-leds",component:ja,redirect:{name:"device-leds-list"},children:[{path:"list",name:"device-leds-list",component:pc,props:{block:Bi.Led,routeName:"device-leds-form",segmentGrid:!0}},{path:"leds/:index",name:"device-leds-form",component:ba,props:{block:Bi.Led}}]}]};var bc=No({name:"IconTouchscreen"});const vc={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"},yc=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),Ic=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);bc.render=function(e,t,n,o,r,i){return an(),cn("svg",vc,[yc,Ic])};const Ec={Enabled:{block:Bi.Touchscreen,key:"enableTouchscreen",type:cs.Setting,section:0,settingIndex:0,component:_i.Toggle,label:"Enable",helpText:"Enables or disables the usage of touchscreen."},DisplayManufacturer:{showIf:e=>e.enableTouchscreen,block:Bi.Touchscreen,key:"touchscreenManufacturer",type:cs.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,block:Bi.Touchscreen,key:"touchscreenBrightness",type:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.Value,section:8,min:0,max:15,component:_i.Input,label:"Screen to switch to",helpText:"Screen to which this button switches to."}},Cc={block:Bi.Touchscreen,title:"Touchscreen",routeName:"device-touchscreens",iconComponent:We(bc),componentCountResponseIndex:4,sections:Ec,routes:[{path:"touchscreens",name:"device-touchscreens",component:ja,redirect:{name:"device-touchscreens-list"},children:[{path:"list",name:"device-touchscreens-list",component:pc,props:{block:Bi.Touchscreen,routeName:"device-touchscreens-form",settingsTitle:""}},{path:"touchscreens/:index",name:"device-touchscreens-form",component:ba,props:{block:Bi.Touchscreen,gridCols:4}}]}]},wc={[Bi.Global]:dc,[Bi.Analog]:Xa,[Bi.Button]:rl,[Bi.Encoder]:El,[Bi.Led]:gc,[Bi.Display]:hl,[Bi.Touchscreen]:Cc},Sc=(e,t)=>Object.values(wc[e].sections).reduce((e,n)=>(t&&n.type!==t||(e[n.key]=null),e),{}),kc=Object.values(wc).reduce((e,t)=>(e.push(...t.routes),e),[]);var xc,_c;(_c=xc||(xc={})).CloseConnection="CloseConnection",_c.Handshake="Handshake",_c.GetValueSize="GetValueSize",_c.GetValuesPerMessage="GetValuesPerMessage",_c.GetFirmwareVersion="GetFirmwareVersion",_c.IdentifyBoard="IdentifyBoard",_c.GetFirmwareVersionAndHardwareUid="GetFirmwareVersionAndHardwareUid",_c.GetNumberOfSupportedComponents="GetNumberOfSupportedComponents",_c.GetNumberOfSupportedPresets="GetNumberOfSupportedPresets",_c.Reboot="Reboot",_c.Backup="Backup",_c.GetBootLoaderSupport="GetBootLoaderSupport",_c.BootloaderMode="BootloaderMode",_c.FactoryReset="FactoryReset",_c.GetValue="GetValue",_c.SetValue="SetValue",_c.GetSectionValues="GetSectionValues",_c.RestoreBackup="RestoreBackup",_c.FirmwareUpdate="FirmwareUpdate";const Mc={[xc.Handshake]:{key:xc.Handshake,type:ds.Predefined,specialRequestId:1,isConnectionInfoRequest:!0},[xc.CloseConnection]:{key:xc.CloseConnection,type:ds.Predefined,specialRequestId:0,expectsNoResponse:!0,isConnectionInfoRequest:!0},[xc.GetValueSize]:{key:xc.GetValueSize,type:ds.Predefined,isConnectionInfoRequest:!0,specialRequestId:2,parser:e=>e.length>1?js(e)[0]:e[0]||1},[xc.GetValuesPerMessage]:{key:xc.GetValuesPerMessage,type:ds.Predefined,isConnectionInfoRequest:!0,specialRequestId:3,decodeDoubleByte:!0,parser:e=>e[0]},[xc.GetFirmwareVersion]:{key:xc.GetFirmwareVersion,type:ds.Custom,specialRequestId:86,isConnectionInfoRequest:!0,decodeDoubleByte:!0,parser:e=>"v"+e[0]+"."+e[1]+"."+e[2]},[xc.IdentifyBoard]:{key:xc.IdentifyBoard,type:ds.Custom,specialRequestId:66,decodeDoubleByte:!0,parser:e=>e.slice(0,4)},[xc.GetFirmwareVersionAndHardwareUid]:{key:xc.GetFirmwareVersionAndHardwareUid,type:ds.Custom,isConnectionInfoRequest:!0,specialRequestId:67},[xc.GetNumberOfSupportedComponents]:{key:xc.GetNumberOfSupportedComponents,type:ds.Custom,specialRequestId:77,decodeDoubleByte:!0,parser:e=>{const t={};return Object.values(wc).forEach(n=>{void 0!==n.componentCountResponseIndex&&(t[n.block]=e[n.componentCountResponseIndex])}),t}},[xc.GetNumberOfSupportedPresets]:{key:xc.GetNumberOfSupportedPresets,type:ds.Custom,specialRequestId:80,isConnectionInfoRequest:!0,decodeDoubleByte:!0,parser:e=>e[0]},[xc.Reboot]:{key:xc.Reboot,type:ds.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:127},[xc.GetBootLoaderSupport]:{key:xc.GetBootLoaderSupport,type:ds.Custom,specialRequestId:81,decodeDoubleByte:!0,parser:e=>e[0]},[xc.BootloaderMode]:{key:xc.BootloaderMode,type:ds.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:85},[xc.FactoryReset]:{key:xc.FactoryReset,type:ds.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:68},[xc.Backup]:{key:xc.Backup,type:ds.Custom,specialRequestId:27,hasMultiPartResponse:!0,isSystemOperation:!0},[xc.GetValue]:{key:xc.GetValue,type:ds.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(...Ws(e.index),0,0),n}},[xc.SetValue]:{key:xc.SetValue,type:ds.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(...Ws(e.index),...Ws(e.value)),n}},[xc.GetSectionValues]:{key:xc.GetSectionValues,type:ds.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}},[xc.RestoreBackup]:{key:xc.RestoreBackup,type:ds.Custom,isSystemOperation:!0},[xc.FirmwareUpdate]:{key:xc.FirmwareUpdate,type:ds.Custom,isSystemOperation:!0,expectsNoResponse:!0}},Tc=e=>{const t=wc[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===cs.Setting)(t)||(t=>t.settingIndex===e.index)(t)))},Rc=()=>ea.connectionState===Ks.Pending,Nc=()=>ea.connectionState===Ks.Open,Dc={isConnecting:Ro(()=>Rc()),isConnected:Ro(()=>Nc())};let Ac=null,Oc=null;const Pc=e=>{ea.connectionState=e},Bc=async()=>{Fc();try{Nc()||Rc()||await Gc(),Uc();const e=Zp.currentRoute.value.matched.some(e=>"device"===e.name);if(1===ea.outputs.length&&!e){const e=ea.outputs[0].name.includes("OpenDeck DFU")?"device-firmware-update":"device";Zp.push({name:e,params:{outputId:ea.outputs[0].id}})}}catch(e){Qu.error("MIDI Connection watcher error",e)}Oc=setTimeout(Bc,500)},Fc=()=>{Oc&&(clearTimeout(Oc),Oc=null)},Uc=async()=>{ea.inputs=oa.inputs.filter(e=>e.name.includes("OpenDeck")&&!e.name.includes("BLE")),ea.outputs=oa.outputs.filter(e=>e.name.includes("OpenDeck")&&!e.name.includes("BLE"))},Vc=async e=>{await Gc();const t=oa.outputs.find(t=>t.id===e);if(!t)return Ys(250).then(()=>Vc(e));const n=oa.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]),Ys(1e3).then(()=>{i||(Qu.error("INITIAL HANDSHAKE TIMED OUT, RETRYING"),o("TIMED OUT"))})}).catch(()=>Vc(e.id)))(t,n):Ys(250).then(()=>Vc(e))},Gc=async()=>{if(oa.supported){if(ea.isWebMidiSupported=!0,Ac)return Ac;if(!oa.enabled)return Ac=qc(),Ac;Pc(Ks.Open)}},qc=async()=>new Promise((e,t)=>{if(oa.enabled)return Pc(Ks.Open),e();Pc(Ks.Pending),oa.enable((function(n){if(!n)return Uc(),Pc(Ks.Open),Ac=null,e();Qu.error("Failed to load WebMidi",n),t(n)}),!0)}),$c={state:ea,computed:Dc,actions:{loadMidi:Gc,matchInputOutput:Vc,assignInputs:Uc,findOutputById:e=>oa.outputs.find(t=>t.id===e),startMidiConnectionWatcher:()=>Bc(),stopMidiConnectionWatcher:Fc}},Hc=Fs($c);var jc,zc,Wc,Qc;(zc=jc||(jc={})).Info="info",zc.Midi="midi",zc.Request="request",zc.Error="error",(Qc=Wc||(Wc={})).Midi="midi",Qc.System="system";const Zc={[Wc.Midi]:!0},Xc={};Object.values(Bi).forEach(e=>{Xc[e]={}});const Yc=Ve({...{stack:[],highlights:Xc,logFilter:Zc,showRequestLog:!1,showHexValues:!1,suspendMidiLogs:!1},logFilter:Us("logFilter")||Zc,showRequestLog:Us("showRequestLog")||!1});var Kc,Jc,eu,tu;(Jc=Kc||(Kc={})).Closed="closed",Jc.Pending="pending",Jc.Open="open",(tu=eu||(eu={})).NotSupported="not_supported",tu.MissingIndex="missing_index",tu.UartInterfaceAllocated="uart_interface_allocated";const nu=Xe({}),ou={activeRequestId:Xe(null),nextRequestId:100},ru=()=>{Gu(),ou.activeRequestId.value=null,ou.nextRequestId=100,nu.value={}},iu=e=>Mc[e],su=async e=>{const t=(ou.nextRequestId+=1,ou.nextRequestId);if(nu.value[t])return void zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_ID_CONFLICT,requestId:t});const{specialRequestId:n,isConnectionInfoRequest:o}=iu(e.command),r={...e,id:t,specialRequestId:n,state:hs.Pending,responseCount:0,time:{created:new Date,started:null,finished:null}};return nu.value[t]=r,zu.actions.addRequest(t),o||await ad(),ou.activeRequestId.value?void 0:au(t)},au=async e=>{Vu(!0);const t=nu.value[e];if(t)if(ou.activeRequestId.value)zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_ALREADY_ACTIVE,requestId:e});else try{const n=iu(t.command);n.isSystemOperation&&(bs.isSystemOperationRunning=!0),bs.output.sendSysex(Ti,Array.from(t.payload)),t.time.started=new Date,ou.activeRequestId.value=e,t.state=hs.Sent,n.expectsNoResponse?(ou.activeRequestId.value=null,t.state=hs.Done,t.promiseResolve()):t.command===xc.RestoreBackup&&Ys(2e3).then(()=>{t.state===hs.Sent&&du(t,ta.UI_QUEUE_REQ_TIMED_OUT)})}catch(e){du(t,ta.UI_QUEUE_REQUEST_SEND_ERROR)}else zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_DATA_MISSING,requestId:e})},lu=(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 Qs(a,c)||zu.actions.addError({errorCode:ta.UI_QUEUE_EMBEDED_RESPONSE_MISMATCH}),l.slice(a.length)})(e,t,n):o;s=js(r)}}catch(e){return void zu.actions.addError({errorCode:ta.UI_QUEUE_REQUEST_DECODE_ERROR,payload:o,error:e})}return t.parser?t.parser(s):s},cu=e=>{if((e=>{if(73!==Array.from(e)[6])return!1;const t=e[7],n=2===bs.valueSize?js(e.slice(8,10))[0]:e[8];return zu.actions.addInfo({block:t,index:n,payload:e}),!0})(e.data))return;if((e=>6===e.data.length&&Object.keys(gu).includes(String(e.data[4])))(e))return void zu.actions.addMidi({type:gu[e.data[4]],data:[e.data[4]]});const t=(()=>{const e=ou.activeRequestId.value;if(!e)return;const t=nu.value[e];return t||zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_NONE_ACTIVE,requestId:e}),t})();if(!t)return;if(t.state!==hs.Sent)return void zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_NONE_ACTIVE,payload:e.data});t.responseCount++;const n=iu(t.command),{hasMultiPartResponse:o}=n,r=t.command===xc.Backup,i=2===bs.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===xc.Backup)return{messageStatus:1,messagePart:0,data:n};const o=n[4],r=n[5],i=n.slice(6,-1),{specialRequestId:s}=iu(t.command);return([1,2].includes(s)&&i.length||s&&2===bs.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 du(t,a);let u;r||(u=i?lu(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===xc.GetSectionValues&&126===l;return!o||p?uu(t,s,u):void 0},uu=(e,t,n)=>{const{messageStatus:o,messagePart:r,data:i}=t;e.state=hs.Done,e.responseData=i,e.parsed=n,e.messagePart=r,e.messageStatus=o,e.promiseResolve(),e.time.finished=new Date,pu()},du=(e,t)=>{e.state=hs.Error;const n=sa(t);if(e.errorMessage=n.description,e.promiseReject(n.code),zu.actions.addError({errorCode:n.code,requestId:e.id}),e.config){const n=Tc(e.config);n&&[ta.NOT_SUPPORTED].includes(t)&&ed(n,eu.NotSupported),n&&[ta.UART_INTERFACE_ALLOCATED].includes(t)&&ed(n,eu.UartInterfaceAllocated),n&&[ta.BLOCK,ta.SECTION,ta.INDEX].includes(t)&&ed(n,eu.MissingIndex)}pu()},pu=()=>{ou.activeRequestId.value=null;if(Object.values(nu.value).filter(e=>e.state===hs.Sent).length)return void logger.error("Cannot start next request, there are unfinished sent requests");const e=Object.values(nu.value).filter(e=>e.state===hs.Pending),t=e.length&&e[0].id;if(t)return au(t);Vu(!1)},hu=(e,t)=>{if([ds.Custom,ds.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,bs)},fu=async e=>{const{command:t,handler:n,config:o,payload:r}=e,i=iu(t);return new Promise((e,s)=>su({command:t,payload:r||hu(i,o),handler:n,config:o,promiseResolve:e,promiseReject:s}))},mu=e=>Array.isArray(e)?[240,0,83,67,...e,247]:[],Lu={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"},gu={1:"mmcstop",2:"mmcplay",6:"mmcrecordstart",7:"mmcrecordstop",9:"mmcpause"},bu=["clock","start","continue","stop","activesensing","reset"];var vu="object"==typeof global&&global&&global.Object===Object&&global,yu="object"==typeof self&&self&&self.Object===Object&&self,Iu=vu||yu||Function("return this")(),Eu=Iu.Symbol,Cu=Object.prototype,wu=Cu.hasOwnProperty,Su=Cu.toString,ku=Eu?Eu.toStringTag:void 0;var xu=Object.prototype.toString;var _u=Eu?Eu.toStringTag:void 0;function Mu(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_u&&_u in Object(e)?function(e){var t=wu.call(e,ku),n=e[ku];try{e[ku]=void 0;var o=!0}catch(e){}var r=Su.call(e);return o&&(t?e[ku]=n:delete e[ku]),r}(e):function(e){return xu.call(e)}(e)}function Tu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Ru=/^\s+|\s+$/g,Nu=/^[-+]0x[0-9a-f]+$/i,Du=/^0b[01]+$/i,Au=/^0o[0-7]+$/i,Ou=parseInt;function Pu(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]"==Mu(e)}(e))return NaN;if(Tu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Tu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ru,"");var n=Du.test(e);return n||Au.test(e)?Ou(e.slice(2),n?2:8):Nu.test(e)?NaN:+e}var Bu=function(){return Iu.Date.now()},Fu=Math.max,Uu=Math.min;const Vu=e=>{Yc.suspendMidiLogs=e},Gu=()=>{Yc.stack=[]},qu=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(L,t),u?h(e):s}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function L(){var e=Bu();if(m(e))return g(e);a=setTimeout(L,function(e){var n=t-(e-l);return d?Uu(n,i-(e-c)):n}(e))}function g(e){return a=void 0,p&&o?h(e):(o=r=void 0,s)}function b(){var e=Bu(),n=m(e);if(o=arguments,r=this,l=e,n){if(void 0===a)return f(l);if(d)return clearTimeout(a),a=setTimeout(L,t),h(l)}return void 0===a&&(a=setTimeout(L,t)),s}return t=Pu(t)||0,Tu(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Fu(Pu(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=r=a=void 0},b.flush=function(){return void 0===a?s:g(Bu())},b}(()=>{Yc.stack.length>50&&(Yc.stack=Yc.stack.slice(0,50))},10,{leading:!0,maxWait:10,trailing:!1});function $u(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=Xs(e.getMinutes()),o=Xs(e.getSeconds()),r=e.getMilliseconds();return`${Xs(t)}:${n}:${o} ${r}`})(r);if(t===jc.Info){const e=Yc.highlights[n];if(!e)return void logger.error("Unknown highlight block with id "+n);e[o]=i}const a=t===jc.Midi?!Yc.logFilter[Wc.Midi]:!Yc.logFilter[Wc.System];if(!Yc.showRequestLog||a)return;let l=e.payload;l&&("string"==typeof l&&(l=l.split(",")),Array.isArray(l)||(l=Array.from(l))),Yc.stack.unshift({...e,id:$u(9),payload:l,time:r,timeString:s}),qu()},ju={clearRequestLog:Gu,getFilteredLogs:e=>Yc.stack.filter(e),addRequest:e=>{const t=nu.value[e],n=mu(t.payload),o=n&&Hs($s(n)),r=n&&Hs(n),i=mu((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&&Hs($s(i)),a=i&&Hs(i);Hu({type:jc.Request,requestId:e,dataHex:s,dataDec:a,payloadHex:o,payloadDec:r})},addInfo:e=>{const{payload:t}=e,n=t&&Hs($s(t)),o=t&&Hs(Array.from(t));Hu({type:jc.Info,...e,payloadHex:n,payloadDec:o})},addError:e=>{if(Hu({type:jc.Error,...e}),e.errorCode){const t=sa(e.errorCode);Qu.error(t.description,e.error)}else Qu.error(definition.message,e.error)},addMidi:e=>{if(Yc.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?Lu.noteon:Lu.noteoff:Lu[t],d=o&&Hs(i),p=o&&Hs($s(i)),h={label:u,type:jc.Midi,eventType:t,channel:n,dataHex:p,dataDec:d,value:s,controllerNumber:l,note:a,velocity:c};Hu(h)},toggleLogFilter:e=>{Yc.logFilter[e]=!Yc.logFilter[e],Vs("logFilter",Yc.logFilter)},toggleLog:()=>{Yc.showRequestLog=!Yc.showRequestLog,Vs("showRequestLog",Yc.showRequestLog)},toggleHexValues:()=>{Yc.showHexValues=!Yc.showHexValues,Vs("showHexValues",Yc.showHexValues)},setSuspendMidi:Vu},zu={state:Yc,actions:ju},Wu=Fs(zu),Qu={log:(...e)=>{$c.state.log&&console.log(...e)},warn:(...e)=>{$c.state.log&&console.warn(...e)},error:(e,t)=>{if($c.state.log&&(e&&console.error(e),t&&console.error(t),!t&&!e))throw new Error("Unknown error!")}},Zu=async(e,t)=>{const n={};let o=0;bs.systemOperationPercentage=1;const r=await(async e=>(await e.text()).split("\n").map(e=>e.split(" ").map(Gs)).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 Ys(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 bs.systemOperationPercentage=l>0?l:1,fu({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,bs.systemOperationPercentage=null,!s},Xu=["noteon","noteoff","controlchange","programchange","pitchbend","clock","start","continue","stop","activesensing","reset"],Yu=e=>{Xu.forEach(t=>e.removeListener(t,"all"))};let Ku=null;const Ju=e=>bs.unsupportedComponents[e.block][e.key],ed=(e,t)=>bs.unsupportedComponents[e.block][e.key]=t||!t,td=e=>{Object.assign(bs,e)},nd=async()=>{rd();try{if(!bs.outputId)return Zp.push({name:"home"});if(!await $c.actions.findOutputById(bs.outputId))return Zp.push({name:"home"})}catch(e){return Qu.error("Device connection watcher error",e),Zp.push({name:"home"})}Ku=setTimeout(()=>nd(),1e3)},od=()=>Ys(5e3).then(nd),rd=()=>{Ku&&(clearTimeout(Ku),Ku=null)},id=async e=>{const t=await $c.actions.matchInputOutput(e),{input:n,output:o,isBootloaderMode:r,valueSize:i}=t;if(bs.isBootloaderMode=r,bs.outputId=e,bs.input=n,bs.output=o,bs.valueSize=i,bs.valuesPerMessageRequest=null,bs.firmwareVersion=null,bs.input.removeListener("sysex","all"),bs.input.addListener("sysex","all",cu),Yu(bs.input),(e=>{Xu.forEach(t=>e.addListener(t,"all",zu.actions.addMidi))})(bs.input),r)return bs.boardName=o.name,bs.connectionState=Kc.Open,bs.connectionPromise=null,void od();await fu({command:xc.GetValuesPerMessage,handler:e=>td({valuesPerMessageRequest:e})}),await fu({command:xc.GetFirmwareVersion,handler:e=>td({firmwareVersion:e})}),bs.connectionState=Kc.Open,bs.connectionPromise=null,od(),await cd()},sd=async e=>{if("string"!=typeof e)throw new Error("MISSING OR INVALID DEVICE OUTPUT ID");return bs.connectionPromise||(bs.connectionState=Kc.Pending,bs.connectionPromise=id(e)),bs.connectionPromise},ad=async()=>{if(bs.connectionState!==Kc.Open){if(bs.connectionPromise)return bs.connectionPromise;if(bs.outputId)return sd(bs.outputId);throw new Error("CANNOT ENSURE CONNECTION, MISSING outputId")}},ld=async(e,t)=>(await fu({command:e,handler:t}),bs.connectionState=Kc.Closed,Ys(200).then(()=>Zp.push({name:"home"}))),cd=async()=>{await fu({command:xc.IdentifyBoard,handler:e=>{const t=(e=>aa.find(t=>Qs(t.id,e)||t.oldId&&Qs(t.oldId,e)))(e),n=t&&t.name||"Custom OpenDeck board",o=t&&t.firmwareFileName;td({boardName:n,firmwareFileName:o})}}),await fu({command:xc.GetNumberOfSupportedComponents,handler:e=>td({numberOfComponents:e})});try{2===bs.valueSize&&await fu({command:xc.GetBootLoaderSupport,handler:e=>td({bootLoaderSupport:e})})}catch(e){Qu.error("Error while checking for bootloader support, setting to false",e),td({bootLoaderSupport:!1})}await fu({command:xc.GetNumberOfSupportedPresets,handler:e=>td({supportedPresetsCount:e})})},ud=e=>!Ju(e),dd=e=>1===bs.valueSize||!e.isMsb,pd=(e,t)=>{if(!wc[e])throw new Error("Block definition not found in BlockMap "+e);const{sections:n}=wc[e];return Object.values(n).filter(e=>((e,t)=>e.type===t)(e,t)).filter(ud).filter(dd)},hd={setInfo:td,setViewSetting:(e,t)=>{t.itemsPerPage&&t.itemsPerPage!==bs.viewSettings[e].itemsPerPage&&(bs.viewSettings[e].currentPage=1),Object.assign(bs.viewSettings[e],t)},connectDevice:sd,closeConnection:()=>{rd(),(async()=>{ru(),bs.input&&(bs.input.removeListener("sysex","all"),Yu(bs.input)),Object.assign(bs,gs)})()},ensureConnection:ad,startUpdatesCheck:async e=>{const t=await fetch("https://api.github.com/repos/paradajz/OpenDeck/releases").then(e=>e.json()),n=bs.firmwareVersion;return t.filter(e=>e.name.length&&Os(e.name,n)).map(t=>({html_description:Ps(t.body,{headerIds:!1}),firmwareFileLink:t.assets.find(t=>t.name===e),...t}))},startBootLoaderMode:async()=>{await fu({command:xc.BootloaderMode,handler:()=>Qu.log("Bootloader mode started")})},startFactoryReset:async()=>{await ld(xc.FactoryReset,()=>Qu.log("Bootloader mode started"))},startReboot:async()=>{await ld(xc.Reboot,()=>Qu.log("Reboot mode started"))},startDeviceConnectionWatcher:od,stopDeviceConnectionWatcher:rd,startFirmwareUdate:async e=>{ru();const t=await Zu(e,xc.FirmwareUpdate);bs.isSystemOperationRunning=!1;alert(t?"Firmware update finished":"Firmware update finished with errors")},isControlDisabled:Ju,disableControl:ed,startBackup:async()=>{let e=0,t=null;const n=[];fu({command:xc.Backup,handler:o=>{e||(t=o);const r=e&&Qs(t,o),i=0===e;if(e+=1,i||r||n.push(o.map(qs).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","-");Bs.saveAs(e,`OpenDeckUI-Backup-${t}.sysex`)}return r}}).catch(e=>Qu.error("Failed to read component config",e))},startRestore:async e=>{await Zu(e,xc.RestoreBackup),bs.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 ad();const o={},r=pd(e,t).map(t=>{const{key:r,section:i,onLoad:s,settingIndex:a}=t,l="number"==typeof n?n:a;return fu({command:xc.GetValue,handler:e=>{const t=e[0];o[r]=t,s&&s(t)},config:{block:e,section:i,index:l}}).catch(e=>Qu.error("Failed to read component config",e))});return await Promise.all(r),o},setComponentSectionValue:async(e,t)=>fu({command:xc.SetValue,handler:t,config:e}),getSectionValues:async e=>{await ad();const t={},n=pd(e,cs.Value).map(n=>{const{key:o,section:r}=n;return fu({command:xc.GetSectionValues,handler:e=>(t[o]||(t[o]=[]),t[o].push(...e),!1),config:{block:e,section:r}}).catch(e=>Qu.error("Failed to read component config",e))});return await Promise.all(n),t},getFilteredSectionsForBlock:pd},fd=Ro(()=>bs.input&&bs.input.name),md=Ro(()=>bs.input&&bs.input.manufacturer),Ld=Ro(()=>bs.connectionState===Kc.Pending),gd=Ro(()=>bs.connectionState===Kc.Open),bd=Ro(()=>1===bs.valueSize),vd={state:bs,computed:{name:fd,manufacturer:md,isConnecting:Ld,isConnected:gd,showMsbControls:bd},actions:hd},yd=Fs(vd);var Id=No({name:"LogDataValue",props:{hex:{required:!0,type:String},dec:{required:!0,type:String}},setup(){const{showHexValues:e}=Wu;return{showHexValues:e}}});const Ed={class:"sysex-payload capitalize"},Cd=fn("sup",null,"Hex",-1),wd=fn("sup",null,"Dec",-1);Id.render=function(e,t,n,o,r,i){return an(),cn("span",Ed,[e.showHexValues?(an(),cn(en,{key:0},[Ln("[ "+l(e.hex)+" ] ",1),Cd],64)):(an(),cn(en,{key:1},[Ln("[ "+l(e.dec)+" ] ",1),wd],64))])};var Sd=No({name:"LogMidi",components:{LogDataValue:Id},props:{logEntry:{required:!0,type:Object}},setup:()=>({convertToHexString:$s,MidiEventTypeLabel:Lu,MidiRealtimeEvent:bu})});const kd={class:"border-b border-gray-800 last:border-b-0"},xd={class:"mr-2 text-yellow-300"},_d={key:0,class:"mr-2"},Md=fn("span",{class:"faded"},"channel",-1),Td={key:1,class:"mr-2"},Rd=fn("span",{class:"faded"},"value",-1),Nd={key:2,class:"mr-2"},Dd=fn("span",{class:"faded"},"controller",-1),Ad=fn("span",{class:"faded"},"value",-1),Od={key:3,class:"mr-2"},Pd=fn("span",{class:"faded"},"velocity",-1),Bd={key:4},Fd=fn("span",{class:"sysex-label faded"},"Raw data",-1);Sd.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",kd,[fn("strong",xd,[Ln(l(e.logEntry.label)+" ",1),null!=e.logEntry.note?(an(),cn(en,{key:0},[Ln(l(e.logEntry.note),1)],64)):bn("",!0)]),void 0!==e.logEntry.channel?(an(),cn("span",_d,[Md,Ln(" "+l(e.logEntry.channel),1)])):bn("",!0),void 0!==e.logEntry.value?(an(),cn("span",Td,[Rd,Ln(" "+l(e.logEntry.value),1)])):bn("",!0),void 0!==e.logEntry.controllerNumber?(an(),cn("span",Nd,[Dd,Ln(" "+l(e.logEntry.controllerNumber)+" ",1),Ad,Ln(" "+l(e.logEntry.velocity),1)])):bn("",!0),void 0!==e.logEntry.note?(an(),cn("span",Od,[Pd,Ln(" "+l(e.logEntry.velocity),1)])):bn("",!0),e.logEntry.dataDec&&e.logEntry.dataDec.length?(an(),cn("div",Bd,[Fd,fn(s,{hex:e.logEntry.dataHex,dec:e.logEntry.dataDec},null,8,["hex","dec"])])):bn("",!0)])};var Ud=No({name:"LogRequest",components:{LogDataValue:Id},props:{logEntry:{required:!0,type:Object},requestId:{required:!0,type:Number}},setup:e=>({request:Xe(nu.value[e.requestId]),getDefinitionLabel:e=>{const t=Tc(e);if(!t)return"";const n=t.type===cs.Value&&e.index?"# "+e.index:" - ";return`- ${Bi[e.block]} ${n} ${t&&t.label}`},getDifferenceInMs:Zs,convertToHexString:$s,RequestState:hs,Block:Bi})});const Vd={class:"activity request-request"},Gd={class:"request-command"},qd=Ln(". "),$d={class:"request-command"},Hd={key:0,class:"request-command"},jd={key:1,class:"request-config"},zd={class:"status"},Wd={key:0,class:"timing"},Qd=fn("span",{class:"status-label faded"},"in",-1),Zd={key:1,class:"timing"},Xd=fn("span",{class:"status-label faded"},"waited",-1),Yd={key:0},Kd=fn("span",{class:"sysex-label faded"},"Sent",-1),Jd={key:1},ep={class:""},tp=fn("span",{class:"sysex-label faded"},"Received",-1),np={key:0},op=fn("span",{class:"sysex-label faded"},"Parsed",-1),rp={key:2},ip=fn("span",{class:"sysex-label text-red-700"},"Error",-1),sp={class:"text-red-500"};Ud.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",Vd,[fn("span",{class:{"text-red-500":!!e.request.errorMessage}},[fn("strong",Gd,l(e.request.id),1),qd,fn("strong",$d,l(e.request.command),1),e.request.config?(an(),cn("strong",Hd,l(e.getDefinitionLabel(e.request.config)),1)):bn("",!0),e.request.config&&"number"==typeof e.request.config.value?(an(),cn("strong",jd,l(e.request.config.value),1)):bn("",!0)],2),fn("span",{class:["request-status",e.request.state]},[fn("span",zd,l(e.request.state),1),e.request.time.finished?(an(),cn("span",Wd,[Qd,fn("strong",null,l(e.getDifferenceInMs(e.request.time.finished,e.request.time.started))+"ms",1)])):bn("",!0),e.getDifferenceInMs(e.request.time.started,e.request.time.created)?(an(),cn("span",Zd,[Xd,fn("strong",null,l(e.getDifferenceInMs(e.request.time.started,e.request.time.created))+"ms",1)])):bn("",!0)],2),e.request.payload?(an(),cn("div",Yd,[Kd,fn(s,{dec:e.logEntry.payloadDec,hex:e.logEntry.payloadHex},null,8,["dec","hex"])])):bn("",!0),e.request.responseData?(an(),cn("div",Jd,[fn("div",ep,[tp,fn(s,{hex:e.logEntry.dataHex,dec:e.logEntry.dataDec},null,8,["hex","dec"])]),e.request.parsed?(an(),cn("div",np,[op,fn("span",null,l(e.request.parsed),1)])):bn("",!0)])):bn("",!0),e.request.errorMessage?(an(),cn("div",rp,[ip,fn("span",sp,l(e.request.errorMessage),1)])):bn("",!0)])};var ap=No({name:"LogInfo",components:{LogDataValue:Id},props:{logEntry:{required:!0,type:Object}},setup:()=>({Block:Bi,BlockMap:wc,convertToHexString:$s})});const lp={class:""},cp=fn("strong",{class:"mr-2 text-gray-400"},"Component info",-1),up={key:0},dp={key:1},pp={key:2},hp=fn("span",{class:"sysex-label faded"},"Raw data",-1);ap.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",lp,[cp,e.logEntry.block?(an(),cn("strong",up,l(e.BlockMap[e.logEntry.block].title),1)):bn("",!0),Number.isInteger(e.logEntry.index)?(an(),cn("strong",dp," #"+l(e.logEntry.index),1)):bn("",!0),e.logEntry.payloadDec?(an(),cn("div",pp,[hp,fn(s,{dec:e.logEntry.payloadDec,hex:e.logEntry.payloadHex},null,8,["dec","hex"])])):bn("",!0)])};var fp=No({name:"ActivityError",props:{logEntry:{required:!0,type:Object}},setup:()=>({getErrorDefinition:sa})});const mp={class:"py-2 border-b border-gray-800 last:border-b-0"},Lp={key:0,class:"text-red-500 mr-4"},gp={key:1,class:"text-red-500 mr-2"},bp={class:"text-red-500"};fp.render=function(e,t,n,o,r,i){return an(),cn("div",mp,[e.logEntry.requestId?(an(),cn("strong",Lp,"Request "+l(e.logEntry.requestId),1)):bn("",!0),e.logEntry.errorCode?(an(),cn("strong",gp,"Error Code "+l(e.logEntry.errorCode),1)):bn("",!0),fn("span",bp,l(e.logEntry.message)+" "+l(e.logEntry.errorCode&&e.getErrorDefinition(e.logEntry.errorCode).description),1)])};var vp=No({name:"RequestLogTableRow",components:{LogMidi:Sd,LogRequest:Ud,LogInfo:ap,LogError:fp},props:{logEntry:{required:!0,type:Object}},setup:()=>({LogType:jc})});const yp={class:"w-2/12 text-right"},Ip={class:"w-8/12"};vp.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",yp,l(e.logEntry.timeString),1),fn("td",Ip,[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"]):bn("",!0)])],2)};var Ep=No({name:"RequestLogTable",components:{RequestLogTableRow:vp},setup:()=>({stack:Wu.stack})});const Cp={key:0,class:"table-auto mb-0 request-table"},wp=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),Sp={class:"table-body"};Ep.render=function(e,t,n,o,r,i){const s=Zt("RequestLogTableRow");return e.stack.length?(an(),cn("table",Cp,[wp,fn("tbody",Sp,[(an(!0),cn(en,null,Ao(e.stack,e=>(an(),cn(s,{key:e.id,"log-entry":e},null,8,["log-entry"]))),128))])])):bn("",!0)};var kp=No({name:"RequestLog",components:{RequestLogTable:Ep},setup:()=>({clear:()=>{Wu.clearRequestLog(),Object.keys(nu.value).forEach(e=>{const t=Number(e),n=nu.value[t];[hs.Done,hs.Error].includes(n.state)&&delete nu.value[t]})},LogType:jc,LogFilter:Wc,...Wu})});const xp={class:"request-log section"},_p={class:"section-heading clearfix"},Mp={class:"section-heading-inner"},Tp=fn("span",{class:"mr-6"},"Activity",-1),Rp={key:1,class:"float-right mt-1 clearfix"},Np={class:"inline-block mr-6"},Dp=Ln(" hex "),Ap={class:"request-log-main"};kp.render=function(e,t,n,o,r,i){const s=Zt("FormToggle"),a=Zt("RequestLogTable");return an(),cn("div",xp,[fn("div",_p,[fn("h3",Mp,[Tp,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 ")):bn("",!0),e.showRequestLog?(an(),cn("span",Rp,[fn("span",Np,[fn(s,{value:e.showHexValues,class:"toggle-sm labeled",onChanged:e.toggleHexValues},{default:$t(()=>[Dp]),_: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(()=>[Ln(l(t),1)]),_:2},1032,["value","onChanged"])]))),128))])):bn("",!0)])]),fn("div",Ap,[e.showRequestLog?fn(a,{key:0,class:"w-full"}):bn("",!0)])])};var Op=No({name:"DeviceNavItem",props:{block:{type:Number,required:!0},params:{type:Object,default:void 0}},setup(e){const{title:t,iconComponent:n,routeName:o}=wc[e.block],{numberOfComponents:r}=yd,{highlights:i}=Wu,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(()=>Zp.currentRoute.value.matched.some(e=>e.name===o));return{...ca(s),numberOfComponents:r,active:a,title:t,iconComponent:n,routeName:o}}});const Pp={class:"icon-wrapper"},Bp={key:0,class:"icon-label"},Fp={class:"lg:inline-block text-sm label"},Up=fn("br",null,null,-1);Op.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",Pp,[(an(),cn(Yt(e.iconComponent))),e.numberOfComponents[e.block]?(an(),cn("span",Bp,l(e.numberOfComponents[e.block]),1)):bn("",!0)]),fn("span",Fp,l(e.title),1),Up]),_:1},8,["to","class"])};var Vp=No({name:"DeviceNav",components:{DeviceNavItem:Op},setup(){const{outputId:e,isConnected:t}=yd;return{BlockMap:wc,isConnected:t,outputId:e}}});const Gp={key:0,class:"device-nav"};Vp.render=function(e,t,n,o,r,i){const s=Zt("DeviceNavItem");return e.isConnected?(an(),cn("div",Gp,[(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))])):bn("",!0)};var qp=No({name:"Device",components:{RequestLog:kp,DeviceNav:Vp},setup(){const{connectDevice:e,isConnected:t,isConnecting:n,isSystemOperationRunning:o,systemOperationPercentage:r,isBootloaderMode:i}=yd;return An(async()=>{try{if(await e(Zp.currentRoute.value.params.outputId),i.value)return Zp.push({name:"device-firmware-update"})}catch(e){Qu.error(e)}}),{isConnected:t,isConnecting:n,isBootloaderMode:i,isSystemOperationRunning:o,systemOperationPercentage:r}}});const $p={key:1,class:"relative"};qp.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",$p,[e.isBootloaderMode?bn("",!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}):bn("",!0)])):fn(a,{key:2,custom:"h-64",title:"No WebMidi device found."}),fn(d)],64)};var Hp=No({name:"DeviceSelect",setup:()=>(An(()=>{Hc.assignInputs(),Hc.startMidiConnectionWatcher(),yd.closeConnection()}),{outputs:Hc.outputs})});const jp={class:"surface-neutral border px-8 pt-6 rounded"},zp=fn("br",null,null,-1);Hp.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",jp,[(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),zp,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 Wp=[{name:"home",path:"/",component:Hp},{path:"/device/:outputId",name:"device",component:qp,redirect:{name:"device-global"},children:kc}];var Qp;const Zp=function(e){const t=Qr(e.routes,e);let n=e.parseQuery||mi,o=e.stringifyQuery||Li,{scrollBehavior:r}=e,i=e.history;const s=bi(),a=bi(),l=bi(),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=mr(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:mr(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===Li?gi(e.query):e.query},a,{redirectedFrom:void 0,href:f})}function m(e){return"string"==typeof e?{path:e}:dr({},e)}function L(e,t){if(u!==e)return Ur(8,{from:t,to:e})}function g(e){return b(e)}function b(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=m("function"==typeof e?e(n):e);return b(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])&&br(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=>Vr(e,14)?e:M(e)).then(e=>{if(e){if(Vr(e,2))return b(dr(m(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 v(e,t){const n=L(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(vi(o,e,t));const i=v.bind(null,e,t);return n.push(i),ki(n).then(()=>{n=[];for(const o of s.list())n.push(vi(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(vi(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(vi(r,e,t));else n.push(vi(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(vi(o,e,t));return n.push(i),ki(n)}).catch(e=>Vr(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=L(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=>Vr(e,12)?e:Vr(e,2)?(n.delta&&i.go(-n.delta,!1),b(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=bi(),_=bi();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(m(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,Ve(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:((Qp=location.host&&Qp||location.pathname).indexOf("#")<0&&(Qp+="#"),Ar(Qp)),routes:[...Wp]});var Xp=No({name:"Chevron",props:{type:{type:String,default:"left",validate:e=>["left","right"].includes(e)}}});const Yp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Kp={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"},Jp={key:1,d:"M7.05 9.293L6.343 10 12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z"};Xp.render=function(e,t,n,o,r,i){return an(),cn("svg",Yp,["right"===e.type?(an(),cn("path",Kp)):(an(),cn("path",Jp))])};var eh=No({name:"Hero",props:{title:{type:String,default:null},custom:{type:String,default:""}}});const th={class:"max-w-sm mx-auto flex-1 align-middle"};eh.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",th,l(e.title),1)])],2)};var nh=No({name:"Button",props:{disabled:{default:!1,type:Boolean}}});nh.render=function(e,t,n,o,r,i){return an(),cn("button",{disabled:e.disabled,class:"btn"},[qt(e.$slots,"default")],8,["disabled"])};var oh=No({name:"ButtonLink",props:{to:{required:!0,type:[Object,Boolean]}}});oh.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 rh=No({name:"Section",props:{title:{type:String,default:null},showContent:{type:Boolean,default:!0},wide:{type:Boolean,default:!1}}});const ih={key:0,class:"section-heading"},sh={class:"section-heading-inner"},ah={key:0,class:"section-content"};rh.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",ih,[fn("div",sh,l(e.title),1)])):bn("",!0)]),e.showContent?(an(),cn("div",ah,[qt(e.$slots,"default")])):bn("",!0)],2)};var lh=No({name:"Spinner",props:{name:{default:"",type:String},type:{default:"number",type:String}}});const ch=Qt("data-v-1e6cca72");zt("data-v-1e6cca72");const uh={class:"spinner"},dh=fn("div",{class:"bounce1"},null,-1),ph=fn("div",{class:"bounce2"},null,-1),hh=fn("div",{class:"bounce3"},null,-1);Wt();const fh=ch((function(e,t,n,o,r,i){return an(),cn("div",uh,[dh,ph,hh])}));lh.render=fh,lh.__scopeId="data-v-1e6cca72";var mh=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 Lh=fn("small",null,"previous",-1),gh=fn("small",null,"next",-1);mh.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"}),Lh]),_:1},8,["class","to"]):bn("",!0),e.total&&e.current[gh,fn(s,{type:"right",class:"inline fill-current h-6 w-6"})]),_:1},8,["class","to"]):bn("",!0)],64)};var bh=No({name:"ProgressBar",props:{percentage:{type:Number,default:0}}});const vh={class:"absolute flex inset-0 bg-gray-900"},yh={class:"flex-1 rounded h-6 top-auto self-center opacity-100 justify-center mx-auto max-w-sm bg-gray-600"};bh.render=function(e,t,n,o,r,i){return an(),cn("div",vh,[fn("div",yh,[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 Ih=No({name:"SpinnerOverlay"});const Eh={class:"absolute flex inset-0 opacity-75 bg-gray-900"};Ih.render=function(e,t,n,o,r,i){const s=Zt("Spinner");return an(),cn("div",Eh,[fn(s,{class:"self-center"})])};const Ch=e=>t=>Number(t)t=>Number(t)>e?"Maximum value is "+e:null;var Sh=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}}});Sh.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 kh=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 xh=fn("span",{class:"toggle-track"},null,-1);kh.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"]),xh]),fn("span",{class:"toggle-label",onClick:t[2]||(t[2]=(...t)=>e.toggle(...t))},[qt(e.$slots,"default")])],2)};var _h=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})});_h.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 Mh=No({name:"FormErrorDisplay",props:{errors:{required:!0,type:Array}}});const Th={class:"errors"};Mh.render=function(e,t,n,o,r,i){return an(),cn("div",Th,[(an(!0),cn(en,null,Ao(e.errors,(e,t)=>(an(),cn("div",{key:t},l(e),1))),128))])};const Rh=e=>{const t=[e=>null==e?"Value is required":null];switch(e.component){case _i.Toggle:t.push(Ch(0),wh(1));break;case _i.Input:if(void 0!==e.min&&t.push(Ch(e.min)),void 0!==e.max){let n=e.max2Byte&&yd.showMsbControls?e.max2Byte:e.max;t.push(wh(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 Nh=No({name:"FormField",components:{FormSelect:Sh,FormInput:_h,FormToggle:kh,FormErrorDisplay:Mh},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,m=e.fieldDefinition.settingIndex,L=Ro(()=>yd.isControlDisabled(e.fieldDefinition)),g=tt(e).value,b=Rh(e.fieldDefinition),{input:v,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,b,n=>{Number(n)!==g.value&&t("modified",{key:r,value:Number(n),section:i,settingIndex:m,index:e.index,onLoad:f})}),E={label:s,helpText:a,name:r};o===_i.Select&&(E.options=h);const{showMsbControls:C}=yd;return{fieldComponent:e.fieldDefinition.component,showMsbControls:C,componentProps:E,emit:t,input:v,errors:y,onValueChange:I,label:s,helpText:a,isDisabled:L,isMsb:l,isLsb:c,min:u,max:d,max2Byte:p,ControlDisableType:eu}}});const Dh={class:"label"},Ah={key:0,class:"instructions"},Oh={key:1,class:"error-message text-red-500"},Ph=Ln(" Not supported on this device. "),Bh=Ln(" Not supported on this firmware. "),Fh=Ln(" The UART interface on board required for this peripheral is already taken by another peripheral. "),Uh={key:2,class:"help-text"};Nh.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",Dh,[Ln(l(!e.showMsbControls&&e.isLsb?e.label.replace("(LSB)","").replace("LSB",""):e.label)+" ",1),e.isDisabled||!e.min&&!e.max?bn("",!0):(an(),cn("small",Ah,l(e.min)+" - "+l(!e.showMsbControls&&e.max2Byte||e.max),1))]),e.isDisabled?(an(),cn("p",Oh,[e.isDisabled===e.ControlDisableType.NotSupported?(an(),cn(en,{key:0},[Ph],64)):bn("",!0),e.isDisabled===e.ControlDisableType.MissingIndex?(an(),cn(en,{key:1},[Bh],64)):bn("",!0),e.isDisabled===e.ControlDisableType.UartInterfaceAllocated?(an(),cn(en,{key:2},[Fh],64)):bn("",!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",Uh,l(!e.showMsbControls&&e.helpText?e.helpText.replace("(LSB)","").replace("LSB",""):e.helpText),1)):bn("",!0),fn(s,{class:"error-message",errors:e.errors},null,8,["errors"])],2)):bn("",!0)};var Vh=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 Gh={class:""};Vh.render=function(e,t,n,o,r,i){return an(),cn("label",{class:["btn items-center",{disabled:e.disabled}]},[fn("span",Gh,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 qh={Chevron:Xp,Hero:eh,Button:nh,ButtonLink:oh,Section:rh,Spinner:lh,Siblinks:mh,SpinnerOverlay:Ih,FormField:Nh,FormToggle:kh,FormFileInput:Vh,ProgressBar:bh},$h=No({name:"DeviceSettings",props:{block:{type:Number,required:!0},title:{type:String,default:"Global"}},setup:e=>({...la(e.block,cs.Setting)})});const Hh={key:0,class:"absolute flex inset-0 opacity-75 bg-gray-900"},jh={class:"form-grid"};$h.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",Hh,[fn(s,{class:"self-center"})])):bn("",!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",jh,[(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"]):bn("",!0)],64))),256))])]),_:1},8,["title"])])],32)};var zh={Device:qp,DeviceForm:ba,DeviceGrid:_a,DeviceGridButton:Sa,DeviceNav:Vp,DeviceNavItem:Op,DeviceSettings:$h},Wh=No({name:"App",setup(){const{outputId:e,boardName:t,firmwareVersion:n,activePreset:o}=yd,r=Ro(()=>"home"===Zp.currentRoute.value.name),{isConnected:i,isConnecting:s,isWebMidiSupported:a}=Hc,{supportedPresetsCount:l,isBootloaderMode:c}=yd;return An(()=>{Hc.loadMidi()}),Fn(()=>{Hc.stopMidiConnectionWatcher()}),{isHomePage:r,outputId:e,isWebMidiSupported:a,isConnected:i,isConnecting:s,boardName:t,firmwareVersion:n,activePreset:o,supportedPresetsCount:l,isBootloaderMode:c}}});const Qh={class:"app"},Zh={class:"app-header"},Xh=Ln(" OpenDeck Configurator "),Yh={key:0,class:"app-board-info"},Kh=Ln("OpenDeck DFU mode"),Jh=fn("small",null,"Board",-1),ef=fn("small",null,"Firmware",-1),tf=fn("small",null,"Preset",-1),nf={class:"app-main"},of={class:"content"},rf=fn("div",{class:"max-w-screen-sm mx-auto px-4 pt-24 sm:px-6 lg:px-8"},[fn("p",{class:""},[Ln(" This browser does not support WebMIDI."),fn("br"),Ln("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),sf=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),af={class:"absolute flex inset-0 opacity-75 bg-gray-900"},lf=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),cf=gn('',1);Wh.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",Qh,[fn("nav",Zh,[fn(s,{to:{name:"home"},class:"app-brand"},{default:$t(()=>[Xh]),_:1}),!e.isHomePage&&e.boardName?(an(),cn("span",Yh,[e.isBootloaderMode?(an(),cn(en,{key:0},[Kh],64)):(an(),cn(en,{key:1},[Jh,fn("strong",null,l(e.boardName),1),null!==e.firmwareVersion?(an(),cn(en,{key:0},[ef,fn("strong",null,l(e.firmwareVersion),1)],64)):bn("",!0),e.supportedPresetsCount>1?(an(),cn(en,{key:1},[tf,fn("strong",null,l(e.activePreset+1),1)],64)):bn("",!0)],64))])):bn("",!0)]),fn("div",nf,[fn("div",of,[e.isWebMidiSupported?e.isConnecting?fn(a,{key:1,class:"h-screen",title:"Establishing connection"},{default:$t(()=>[sf,fn("div",af,[fn(c,{class:"self-center"})])]),_:1}):e.isConnected?fn(u,{key:3}):fn(a,{key:2,class:"h-screen",title:"Problem connecting"},{default:$t(()=>[lf]),_:1}):fn(a,{key:0,class:"h-screen"},{default:$t(()=>[rf]),_:1})])]),cf])};const uf=e=>Object.keys(e).forEach(t=>{df.component(t,e[t])}),df=((...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})(Wh);uf(qh),uf(zh),df.use(Zp),df.mount("#app");
diff --git a/_assets/index.e814c84a.js b/_assets/index.e814c84a.js
deleted file mode 100644
index fd66732..0000000
--- a/_assets/index.e814c84a.js
+++ /dev/null
@@ -1,7 +0,0 @@
-function e(e,t){const n=Object.create(null),o=e.split(",");for(let e=0;e!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl"),n=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){if(I(e)){const t={};for(let n=0;n{if(e){const n=e.split(i);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function a(e){let t="";if(S(e))t=e;else if(I(e))for(let n=0;nnull==e?"":x(e)?JSON.stringify(e,c,2):String(e),c=(e,t)=>C(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n])=>(e[t+" =>"]=n,e),{})}:E(t)?{[`Set(${t.size})`]:[...t.values()]}:!x(t)||I(t)||R(t)?t:String(t),u={},d=[],p=()=>{},h=()=>!1,f=/^on[^a-z]/,m=e=>f.test(e),L=e=>e.startsWith("onUpdate:"),g=Object.assign,b=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},v=Object.prototype.hasOwnProperty,y=(e,t)=>v.call(e,t),I=Array.isArray,C=e=>"[object Map]"===T(e),E=e=>"[object Set]"===T(e),w=e=>"function"==typeof e,S=e=>"string"==typeof e,k=e=>"symbol"==typeof e,x=e=>null!==e&&"object"==typeof e,_=e=>x(e)&&w(e.then)&&w(e.catch),M=Object.prototype.toString,T=e=>M.call(e),R=e=>"[object Object]"===T(e),N=e=>S(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,D=e("key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),A=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},O=/-(\w)/g,P=A(e=>e.replace(O,(e,t)=>t?t.toUpperCase():"")),B=/\B([A-Z])/g,F=A(e=>e.replace(B,"-$1").toLowerCase()),U=A(e=>e.charAt(0).toUpperCase()+e.slice(1)),V=(e,t)=>e!==t&&(e==e||t==t),G=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},$=new WeakMap,H=[];let j;const z=Symbol(""),W=Symbol("");function Q(e,t=u){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const n=function(e,t){const n=function(){if(!n.active)return t.scheduler?void 0:e();if(!H.includes(n)){Y(n);try{return te(),H.push(n),j=n,e()}finally{H.pop(),ne(),j=H[H.length-1]}}};return n.id=X++,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||n(),n}function Z(e){e.active&&(Y(e),e.options.onStop&&e.options.onStop(),e.active=!1)}let X=0;function Y(e){const{deps:t}=e;if(t.length){for(let n=0;n{e&&e.forEach(e=>{(e!==j||e.options.allowRecurse)&&a.add(e)})};if("clear"===t)s.forEach(l);else if("length"===n&&I(e))s.forEach((e,t)=>{("length"===t||t>=o)&&l(e)});else switch(void 0!==n&&l(s.get(n)),t){case"add":I(e)?N(n)&&l(s.get("length")):(l(s.get(z)),C(e)&&l(s.get(W)));break;case"delete":I(e)||(l(s.get(z)),C(e)&&l(s.get(W)));break;case"set":C(e)&&l(s.get(z))}a.forEach(e=>{e.options.scheduler?e.options.scheduler(e):e()})}const ie=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(k)),se=de(),ae=de(!1,!0),le=de(!0),ce=de(!0,!0),ue={};function de(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_raw"===o&&r===(e?Fe:Be).get(n))return n;const i=I(n);if(i&&y(ue,o))return Reflect.get(ue,o,r);const s=Reflect.get(n,o,r);if(k(o)?ie.has(o):"__proto__"===o||"__v_isRef"===o)return s;if(e||oe(n,0,o),t)return s;if(Ze(s)){return!i||!N(o)?s.value:s}return x(s)?e?Ge(s):Ve(s):s}}["includes","indexOf","lastIndexOf"].forEach(e=>{const t=Array.prototype[e];ue[e]=function(...e){const n=ze(this);for(let e=0,t=this.length;e{const t=Array.prototype[e];ue[e]=function(...e){ee();const n=t.apply(this,e);return te(),n}});function pe(e=!1){return function(t,n,o,r){const i=t[n];if(!e&&(o=ze(o),!I(t)&&Ze(i)&&!Ze(o)))return i.value=o,!0;const s=I(t)&&N(n)?Number(n)!0,deleteProperty:(e,t)=>!0},me=g({},he,{get:ae,set:pe(!0)}),Le=(g({},fe,{get:ce}),e=>x(e)?Ve(e):e),ge=e=>x(e)?Ge(e):e,be=e=>e,ve=e=>Reflect.getPrototypeOf(e);function ye(e,t,n=!1,o=!1){const r=ze(e=e.__v_raw),i=ze(t);t!==i&&!n&&oe(r,0,t),!n&&oe(r,0,i);const{has:s}=ve(r),a=n?ge:o?be:Le;return s.call(r,t)?a(e.get(t)):s.call(r,i)?a(e.get(i)):void 0}function Ie(e,t=!1){const n=this.__v_raw,o=ze(n),r=ze(e);return e!==r&&!t&&oe(o,0,e),!t&&oe(o,0,r),e===r?n.has(e):n.has(e)||n.has(r)}function Ce(e,t=!1){return e=e.__v_raw,!t&&oe(ze(e),0,z),Reflect.get(e,"size",e)}function Ee(e){e=ze(e);const t=ze(this),n=ve(t).has.call(t,e),o=t.add(e);return n||re(t,"add",e,e),o}function we(e,t){t=ze(t);const n=ze(this),{has:o,get:r}=ve(n);let i=o.call(n,e);i||(e=ze(e),i=o.call(n,e));const s=r.call(n,e),a=n.set(e,t);return i?V(t,s)&&re(n,"set",e,t):re(n,"add",e,t),a}function Se(e){const t=ze(this),{has:n,get:o}=ve(t);let r=n.call(t,e);r||(e=ze(e),r=n.call(t,e));o&&o.call(t,e);const i=t.delete(e);return r&&re(t,"delete",e,void 0),i}function ke(){const e=ze(this),t=0!==e.size,n=e.clear();return t&&re(e,"clear",void 0,void 0),n}function xe(e,t){return function(n,o){const r=this,i=r.__v_raw,s=ze(i),a=e?ge:t?be:Le;return!e&&oe(s,0,z),i.forEach((e,t)=>n.call(o,a(e),a(t),r))}}function _e(e,t,n){return function(...o){const r=this.__v_raw,i=ze(r),s=C(i),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=r[e](...o),u=t?ge:n?be:Le;return!t&&oe(i,0,l?W:z),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Me(e){return function(...t){return"delete"!==e&&this}}const Te={get(e){return ye(this,e)},get size(){return Ce(this)},has:Ie,add:Ee,set:we,delete:Se,clear:ke,forEach:xe(!1,!1)},Re={get(e){return ye(this,e,!1,!0)},get size(){return Ce(this)},has:Ie,add:Ee,set:we,delete:Se,clear:ke,forEach:xe(!1,!0)},Ne={get(e){return ye(this,e,!0)},get size(){return Ce(this,!0)},has(e){return Ie.call(this,e,!0)},add:Me("add"),set:Me("set"),delete:Me("delete"),clear:Me("clear"),forEach:xe(!0,!1)};function De(e,t){const n=t?Re:e?Ne:Te;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(y(n,o)&&o in t?n:t,o,r)}["keys","values","entries",Symbol.iterator].forEach(e=>{Te[e]=_e(e,!1,!1),Ne[e]=_e(e,!0,!1),Re[e]=_e(e,!1,!0)});const Ae={get:De(!1,!1)},Oe={get:De(!1,!0)},Pe={get:De(!0,!1)},Be=new WeakMap,Fe=new WeakMap;function Ue(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>T(e).slice(8,-1))(e))}function Ve(e){return e&&e.__v_isReadonly?e:qe(e,!1,he,Ae)}function Ge(e){return qe(e,!0,fe,Pe)}function qe(e,t,n,o){if(!x(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=t?Fe:Be,i=r.get(e);if(i)return i;const s=Ue(e);if(0===s)return e;const a=new Proxy(e,2===s?o:n);return r.set(e,a),a}function $e(e){return He(e)?$e(e.__v_raw):!(!e||!e.__v_isReactive)}function He(e){return!(!e||!e.__v_isReadonly)}function je(e){return $e(e)||He(e)}function ze(e){return e&&ze(e.__v_raw)||e}function We(e){return q(e,"__v_skip",!0),e}const Qe=e=>x(e)?Ve(e):e;function Ze(e){return Boolean(e&&!0===e.__v_isRef)}function Xe(e){return Ke(e)}class Ye{constructor(e,t=!1){this._rawValue=e,this._shallow=t,this.__v_isRef=!0,this._value=t?e:Qe(e)}get value(){return oe(ze(this),0,"value"),this._value}set value(e){V(ze(e),this._rawValue)&&(this._rawValue=e,this._value=this._shallow?e:Qe(e),re(ze(this),"set","value",e))}}function Ke(e,t=!1){return Ze(e)?e:new Ye(e,t)}function Je(e){return Ze(e)?e.value:e}const et={get:(e,t,n)=>Je(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Ze(r)&&!Ze(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function tt(e){const t=I(e)?new Array(e.length):{};for(const n in e)t[n]=ot(e,n);return t}class nt{constructor(e,t){this._object=e,this._key=t,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(e){this._object[this._key]=e}}function ot(e,t){return Ze(e[t])?e[t]:new nt(e,t)}class rt{constructor(e,t,n){this._setter=t,this._dirty=!0,this.__v_isRef=!0,this.effect=Q(e,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,re(ze(this),"set","value"))}}),this.__v_isReadonly=n}get value(){return this._dirty&&(this._value=this.effect(),this._dirty=!1),oe(ze(this),0,"value"),this._value}set value(e){this._setter(e)}}function it(e,t,n,o){let r;try{r=o?e(...o):e()}catch(e){at(e,t,n)}return r}function st(e,t,n,o){if(w(e)){const r=it(e,t,n,o);return r&&_(r)&&r.catch(e=>{at(e,t,n)}),r}const r=[];for(let i=0;ixt(e)-xt(t)),gt=0;gtnull==e.id?1/0:e.id;function _t(e){ct=!1,lt=!0,St(e),ut.sort((e,t)=>xt(e)-xt(t));try{for(dt=0;dt{l=!0,g(a,Tt(e,t,!0))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(I(s)?s.forEach(e=>a[e]=null):g(a,s),r[o]=a):r[o]=null}function Rt(e,t){return!(!e||!m(t))&&(t=t.replace(/Once$/,""),y(e,t[2].toLowerCase()+t.slice(3))||y(e,t.slice(2)))}let Nt=null;function Dt(e){Nt=e}function At(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:i,propsOptions:[s],slots:a,attrs:l,emit:c,render:u,renderCache:d,data:p,setupState:h,ctx:f}=e;let m;Nt=e;try{let e;if(4&n.shapeFlag){const t=r||o;m=vn(u.call(t,t,d,i,h,p,f)),e=l}else{const n=t;0,m=vn(n.length>1?n(i,{attrs:l,slots:a,emit:c}):n(i,null)),e=t.props?l:Pt(l)}let g=m;if(!1!==t.inheritAttrs&&e){const t=Object.keys(e),{shapeFlag:n}=g;t.length&&(1&n||6&n)&&(s&&t.some(L)&&(e=Bt(e,s)),g=mn(g,e))}n.dirs&&(g.dirs=n.dirs),n.transition&&(g.transition=n.transition),m=g}catch(t){at(t,e,1),m=fn(nn)}return Nt=null,m}function Ot(e){const t=e.filter(e=>!(un(e)&&e.type===nn&&"v-if"!==e.children));return 1===t.length&&un(t[0])?t[0]:null}const Pt=e=>{let t;for(const n in e)("class"===n||"style"===n||m(n))&&((t||(t={}))[n]=e[n]);return t},Bt=(e,t)=>{const n={};for(const o in e)L(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Ft(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;rVt+=e;function qt(e,t,n={},o){let r=e[t];Vt++;const i=(an(),cn(en,{key:n.key},r?r(n):o?o():[],1===e._?64:-2));return Vt--,i}function $t(e,t=Nt){if(!t)return e;const n=(...n)=>{Vt||an(!0);const o=Nt;Dt(t);const r=e(...n);return Dt(o),Vt||ln(),r};return n._c=!0,n}let Ht=null;const jt=[];function zt(e){jt.push(Ht=e)}function Wt(){jt.pop(),Ht=jt[jt.length-1]||null}function Qt(e){return t=>$t((function(){zt(e);const n=t.apply(this,arguments);return Wt(),n}))}function Zt(e){return Kt("components",e)||e}const Xt=Symbol();function Yt(e){return S(e)?Kt("components",e,!1)||e:e||Xt}function Kt(e,t,n=!0){const o=Nt||So;if(o){const n=o.type;if("components"===e){const e=n.displayName||n.name;if(e&&(e===t||e===P(t)||e===U(P(t))))return n}return Jt(o[e]||n[e],t)||Jt(o.appContext[e],t)}}function Jt(e,t){return e&&(e[t]||e[P(t)]||e[U(P(t))])}const en=Symbol(void 0),tn=Symbol(void 0),nn=Symbol(void 0),on=Symbol(void 0),rn=[];let sn=null;function an(e=!1){rn.push(sn=e?null:[])}function ln(){rn.pop(),sn=rn[rn.length-1]||null}function cn(e,t,n,o,r){const i=fn(e,t,n,o,r,!0);return i.dynamicChildren=sn||d,ln(),sn&&sn.push(i),i}function un(e){return!!e&&!0===e.__v_isVNode}function dn(e,t){return e.type===t.type&&e.key===t.key}const pn=({key:e})=>null!=e?e:null,hn=({ref:e})=>null!=e?I(e)?e:{i:Nt,r:e}:null,fn=function(e,t=null,n=null,r=0,i=null,s=!1){e&&e!==Xt||(e=nn);if(un(e)){const o=mn(e,t,!0);return n&&In(o,n),o}l=e,w(l)&&"__vccOpts"in l&&(e=e.__vccOpts);var l;if(t){(je(t)||"__vInternal"in t)&&(t=g({},t));let{class:e,style:n}=t;e&&!S(e)&&(t.class=a(e)),x(n)&&(je(n)&&!I(n)&&(n=g({},n)),t.style=o(n))}const c=S(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:x(e)?4:w(e)?2:0,u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&pn(t),ref:t&&hn(t),scopeId:Ht,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:c,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null};if(In(u,n),128&c){const{content:e,fallback:t}=function(e){const{shapeFlag:t,children:n}=e;let o,r;return 32&t?(o=Ut(n.default),r=Ut(n.fallback)):(o=Ut(n),r=vn(null)),{content:o,fallback:r}}(u);u.ssContent=e,u.ssFallback=t}!s&&sn&&(r>0||6&c)&&32!==r&&sn.push(u);return u};function mn(e,t,n=!1){const{props:o,ref:r,patchFlag:i}=e,s=t?Cn(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:s,key:s&&pn(s),ref:t&&t.ref?n&&r?I(r)?r.concat(hn(t)):[r,hn(t)]:hn(t):r,scopeId:e.scopeId,children:e.children,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==en?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&mn(e.ssContent),ssFallback:e.ssFallback&&mn(e.ssFallback),el:e.el,anchor:e.anchor}}function Ln(e=" ",t=0){return fn(tn,null,e,t)}function gn(e,t){const n=fn(on,null,e);return n.staticCount=t,n}function bn(e="",t=!1){return t?(an(),cn(nn,null,e)):fn(nn,null,e)}function vn(e){return null==e||"boolean"==typeof e?fn(nn):I(e)?fn(en,null,e):"object"==typeof e?null===e.el?e:mn(e):fn(tn,null,String(e))}function yn(e){return null===e.el?e:mn(e)}function In(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(I(t))n=16;else if("object"==typeof t){if(1&o||64&o){const n=t.default;return void(n&&(n._c&&Gt(1),In(e,n()),n._c&&Gt(-1)))}{n=32;const o=t._;o||"__vInternal"in t?3===o&&Nt&&(1024&Nt.vnode.patchFlag?(t._=2,e.patchFlag|=1024):t._=1):t._ctx=Nt}}else w(t)?(t={default:t,_ctx:Nt},n=32):(t=String(t),64&o?(n=16,t=[Ln(t)]):n=8);e.children=t,e.shapeFlag|=n}function Cn(...e){const t=g({},e[0]);for(let n=1;n{c=!0;const[n,o]=kn(e,t,!0);g(a,n),o&&l.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!c)return r[o]=d;if(I(s))for(let e=0;e-1,o[1]=n<0||e-1||y(o,"default"))&&l.push(t)}}}return r[o]=[a,l]}function xn(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function _n(e,t){return xn(e)===xn(t)}function Mn(e,t){if(I(t)){for(let n=0,o=t.length;n{if(n.isUnmounted)return;ee(),ko(n);const r=st(t,n,e,o);return ko(null),ne(),r});return o?r.unshift(i):r.push(i),i}}const Nn=e=>(t,n=So)=>!xo&&Rn(e,t,n),Dn=Nn("bm"),An=Nn("m"),On=Nn("bu"),Pn=Nn("u"),Bn=Nn("bum"),Fn=Nn("um"),Un=Nn("rtg"),Vn=Nn("rtc"),Gn=e=>e.type.__isKeepAlive;function qn(e,t,n=So){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}e()});if(Rn(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Gn(e.parent.vnode)&&$n(o,t,n,e),e=e.parent}}function $n(e,t,n,o){const r=Rn(t,e,o,!0);Fn(()=>{b(o[t],r)},n)}const Hn=e=>"_"===e[0]||"$stable"===e,jn=e=>I(e)?e.map(vn):[vn(e)],zn=(e,t,n)=>$t(e=>jn(t(e)),n),Wn=(e,t)=>{const n=e._ctx;for(const o in e){if(Hn(o))continue;const r=e[o];if(w(r))t[o]=zn(0,r,n);else if(null!=r){const e=jn(r);t[o]=()=>e}}},Qn=(e,t)=>{const n=jn(t);e.slots.default=()=>n};function Zn(e,t,n,o){const r=e.dirs,i=t&&t.dirs;for(let s=0;s(i.has(e)||(e&&w(e.install)?(i.add(e),e.install(a,...t)):w(e)&&(i.add(e),e(a,...t))),a),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),a),component:(e,t)=>t?(r.components[e]=t,a):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,a):r.directives[e],mount(i,l){if(!s){const c=fn(n,o);return c.appContext=r,l&&t?t(c,i):e(c,i),s=!0,a._container=i,i.__vue_app__=a,c.component.proxy}},unmount(){s&&e(null,a._container)},provide:(e,t)=>(r.provides[e]=t,a)};return a}}const Jn={scheduler:Ct,allowRecurse:!0},eo=function(e,t){t&&t.pendingBranch?I(e)?t.effects.push(...e):t.effects.push(e):wt(e,Lt,mt,gt)},to=(e,t,n,o,r)=>{if(I(e))return void e.forEach((e,i)=>to(e,t&&(I(t)?t[i]:t),n,o,r));let i;i=r?4&r.shapeFlag?r.component.proxy:r.el:null;const{i:s,r:a}=e,l=t&&t.r,c=s.refs===u?s.refs={}:s.refs,d=s.setupState;if(null!=l&&l!==a&&(S(l)?(c[l]=null,y(d,l)&&(d[l]=null)):Ze(l)&&(l.value=null)),S(a)){const e=()=>{c[a]=i,y(d,a)&&(d[a]=i)};i?(e.id=-1,eo(e,o)):e()}else if(Ze(a)){const e=()=>{a.value=i};i?(e.id=-1,eo(e,o)):e()}else w(a)&&it(a,n,12,[i,c])};function no(e){return function(e,t){const{insert:n,remove:o,patchProp:r,forcePatchProp:i,createElement:s,createText:a,createComment:l,setText:c,setElementText:h,parentNode:f,nextSibling:m,setScopeId:L=p,cloneNode:b,insertStaticContent:v}=e,C=(e,t,n,o=null,r=null,i=null,s=!1,a=!1)=>{e&&!dn(e,t)&&(o=ie(e),Y(e,r,i,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);const{type:l,ref:c,shapeFlag:u}=t;switch(l){case tn:E(e,t,n,o);break;case nn:w(e,t,n,o);break;case on:null==e&&S(t,n,o,s);break;case en:O(e,t,n,o,r,i,s,a);break;default:1&u?k(e,t,n,o,r,i,s,a):6&u?B(e,t,n,o,r,i,s,a):(64&u||128&u)&&l.process(e,t,n,o,r,i,s,a,le)}null!=c&&r&&to(c,e&&e.ref,r,i,t)},E=(e,t,o,r)=>{if(null==e)n(t.el=a(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},w=(e,t,o,r)=>{null==e?n(t.el=l(t.children||""),o,r):t.el=e.el},S=(e,t,n,o)=>{[e.el,e.anchor]=v(e.children,t,n,o)},k=(e,t,n,o,r,i,s,a)=>{s=s||"svg"===t.type,null==e?x(t,n,o,r,i,s,a):R(e,t,r,i,s,a)},x=(e,t,o,i,a,l,c)=>{let u,d;const{type:p,props:f,shapeFlag:m,transition:L,scopeId:g,patchFlag:v,dirs:y}=e;if(e.el&&void 0!==b&&-1===v)u=e.el=b(e.el);else{if(u=e.el=s(e.type,l,f&&f.is),8&m?h(u,e.children):16&m&&T(e.children,u,null,i,a,l&&"foreignObject"!==p,c||!!e.dynamicChildren),y&&Zn(e,null,i,"created"),f){for(const t in f)D(t)||r(u,t,null,f[t],l,e.children,i,a,oe);(d=f.onVnodeBeforeMount)&&oo(d,i,e)}M(u,g,e,i)}y&&Zn(e,null,i,"beforeMount");const I=(!a||a&&!a.pendingBranch)&&L&&!L.persisted;I&&L.beforeEnter(u),n(u,t,o),((d=f&&f.onVnodeMounted)||I||y)&&eo(()=>{d&&oo(d,i,e),I&&L.enter(u),y&&Zn(e,null,i,"mounted")},a)},M=(e,t,n,o)=>{if(t&&L(e,t),o){const r=o.type.__scopeId;r&&r!==t&&L(e,r+"-s"),n===o.subTree&&M(e,o.vnode.scopeId,o.vnode,o.parent)}},T=(e,t,n,o,r,i,s,a=0)=>{for(let l=a;l{const l=t.el=e.el;let{patchFlag:c,dynamicChildren:d,dirs:p}=t;c|=16&e.patchFlag;const f=e.props||u,m=t.props||u;let L;if((L=m.onVnodeBeforeUpdate)&&oo(L,n,t,e),p&&Zn(t,e,n,"beforeUpdate"),c>0){if(16&c)A(l,t,f,m,n,o,s);else if(2&c&&f.class!==m.class&&r(l,"class",null,m.class,s),4&c&&r(l,"style",f.style,m.style,s),8&c){const a=t.dynamicProps;for(let t=0;t{L&&oo(L,n,t,e),p&&Zn(t,e,n,"updated")},o)},N=(e,t,n,o,r,i)=>{for(let s=0;s{if(n!==o){for(const c in o){if(D(c))continue;const u=o[c],d=n[c];(u!==d||i&&i(e,c))&&r(e,c,d,u,l,t.children,s,a,oe)}if(n!==u)for(const i in n)D(i)||i in o||r(e,i,n[i],null,l,t.children,s,a,oe)}},O=(e,t,o,r,i,s,l,c)=>{const u=t.el=e?e.el:a(""),d=t.anchor=e?e.anchor:a("");let{patchFlag:p,dynamicChildren:h}=t;p>0&&(c=!0),null==e?(n(u,o,r),n(d,o,r),T(t.children,o,d,i,s,l,c)):p>0&&64&p&&h?(N(e.dynamicChildren,h,o,i,s,l),(null!=t.key||i&&t===i.subTree)&&se(e,t,!0)):j(e,t,o,d,i,s,l,c)},B=(e,t,n,o,r,i,s,a)=>{null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,s,a):U(t,n,o,r,i,s,a):V(e,t,a)},U=(e,t,n,o,r,i,s)=>{const a=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||Eo,i={uid:wo++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,update:null,render:null,proxy:null,withProxy:null,effects:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:kn(o,r),emitsOptions:Tt(o,r),emit:null,emitted:null,ctx:u,data:u,props:u,attrs:u,slots:u,refs:u,setupState:u,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Mt.bind(null,i),i}(e,o,r);if(Gn(e)&&(a.ctx.renderer=le),function(e,t=!1){xo=t;const{props:n,children:o,shapeFlag:r}=e.vnode,i=4&r;En(e,n,i,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=t,q(t,"_",n)):Wn(t,e.slots={})}else e.slots={},t&&Qn(e,t);q(e.slots,"__vInternal",1)})(e,o);const s=i?function(e,t){const n=e.type;e.accessCache={},e.proxy=new Proxy(e.ctx,Io);const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){return{attrs:e.attrs,slots:e.slots,emit:e.emit}}(e):null;So=e,ee();const r=it(o,e,0,[e.props,n]);if(ne(),So=null,_(r)){if(t)return r.then(t=>{_o(e,t)});e.asyncDep=r}else _o(e,r)}else Mo(e)}(e,t):void 0;xo=!1}(a),a.asyncDep){if(r&&r.registerDep(a,$),!e.el){const e=a.subTree=fn(nn);w(null,e,t,n)}}else $(a,e,t,n,r,i,s)},V=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:i}=e,{props:s,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>0))return!(!r&&!a||a&&a.$stable)||o!==s&&(o?!s||Ft(o,s,c):!!s);if(1024&l)return!0;if(16&l)return o?Ft(o,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;t-1&&(ut[t]=null)}(o.update),o.update()}else t.component=e.component,t.el=e.el,o.vnode=t},$=(e,t,n,o,r,i,s)=>{e.update=Q((function(){if(e.isMounted){let t,{next:n,bu:o,u:a,parent:l,vnode:c}=e,d=n;n?H(e,n,s):n=c,n.el=c.el,o&&G(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&oo(t,l,n,c);const p=At(e),h=e.subTree;e.subTree=p,e.refs!==u&&(e.refs={}),C(h,p,f(h.el),ie(h),e,r,i),n.el=p.el,null===d&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,p.el),a&&eo(a,r),(t=n.props&&n.props.onVnodeUpdated)&&eo(()=>{oo(t,l,n,c)},r)}else{let s;const{el:a,props:l}=t,{bm:c,m:u,parent:d}=e;c&&G(c),(s=l&&l.onVnodeBeforeMount)&&oo(s,d,t);const p=e.subTree=At(e);a&&ue?ue(t.el,p,e,r):(C(null,p,n,o,e,r,i),t.el=p.el),u&&eo(u,r),(s=l&&l.onVnodeMounted)&&eo(()=>{oo(s,d,t)},r);const{a:h}=e;h&&256&t.shapeFlag&&eo(h,r),e.isMounted=!0}}),Jn)},H=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:s}}=e,a=ze(r),[l]=e.propsOptions;if(!(o||s>0)||16&s){let o;wn(e,t,r,i);for(const i in a)t&&(y(t,i)||(o=F(i))!==i&&y(t,o))||(l?!n||void 0===n[i]&&void 0===n[o]||(r[i]=Sn(l,t||u,i,void 0,e)):delete r[i]);if(i!==a)for(const e in i)t&&y(t,e)||delete i[e]}else if(8&s){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:n,slots:o}=e;let r=!0,i=u;if(32&n.shapeFlag){const e=t._;e?1===e?r=!1:g(o,t):(r=!t.$stable,Wn(t,o)),i=t}else t&&(Qn(e,t),i={default:1});if(r)for(const e in o)Hn(e)||e in i||delete o[e]})(e,t.children),St(void 0,e.update)},j=(e,t,n,o,r,i,s,a=!1)=>{const l=e&&e.children,c=e?e.shapeFlag:0,u=t.children,{patchFlag:d,shapeFlag:p}=t;if(d>0){if(128&d)return void W(l,u,n,o,r,i,s,a);if(256&d)return void z(l,u,n,o,r,i,s,a)}8&p?(16&c&&oe(l,r,i),u!==l&&h(n,u)):16&c?16&p?W(l,u,n,o,r,i,s,a):oe(l,r,i,!0):(8&c&&h(n,""),16&p&&T(u,n,o,r,i,s,a))},z=(e,t,n,o,r,i,s,a)=>{t=t||d;const l=(e=e||d).length,c=t.length,u=Math.min(l,c);let p;for(p=0;pc?oe(e,r,i,!0,u):T(t,n,o,r,i,s,a,u)},W=(e,t,n,o,r,i,s,a)=>{let l=0;const c=t.length;let u=e.length-1,p=c-1;for(;l<=u&&l<=p;){const o=e[l],c=t[l]=a?yn(t[l]):vn(t[l]);if(!dn(o,c))break;C(o,c,n,null,r,i,s,a),l++}for(;l<=u&&l<=p;){const o=e[u],l=t[p]=a?yn(t[p]):vn(t[p]);if(!dn(o,l))break;C(o,l,n,null,r,i,s,a),u--,p--}if(l>u){if(l<=p){const e=p+1,u=ep)for(;l<=u;)Y(e[l],r,i,!0),l++;else{const h=l,f=l,m=new Map;for(l=f;l<=p;l++){const e=t[l]=a?yn(t[l]):vn(t[l]);null!=e.key&&m.set(e.key,l)}let L,g=0;const b=p-f+1;let v=!1,y=0;const I=new Array(b);for(l=0;l=b){Y(o,r,i,!0);continue}let c;if(null!=o.key)c=m.get(o.key);else for(L=f;L<=p;L++)if(0===I[L-f]&&dn(o,t[L])){c=L;break}void 0===c?Y(o,r,i,!0):(I[c-f]=l+1,c>=y?y=c:v=!0,C(o,t[c],n,null,r,i,s,a),g++)}const E=v?function(e){const t=e.slice(),n=[0];let o,r,i,s,a;const l=e.length;for(o=0;o0&&(t[o]=n[i-1]),n[i]=o)}}i=n.length,s=n[i-1];for(;i-- >0;)n[i]=s,s=t[s];return n}(I):d;for(L=E.length-1,l=b-1;l>=0;l--){const e=f+l,a=t[e],u=e+1{const{el:s,type:a,transition:l,children:c,shapeFlag:u}=e;if(6&u)return void X(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void a.move(e,t,o,le);if(a===en){n(s,t,o);for(let e=0;el.enter(s),i);else{const{leave:e,delayLeave:r,afterLeave:i}=l,a=()=>n(s,t,o),c=()=>{e(s,()=>{a(),i&&i()})};r?r(s,a,c):c()}else n(s,t,o)},Y=(e,t,n,o=!1)=>{const{type:r,props:i,ref:s,children:a,dynamicChildren:l,shapeFlag:c,patchFlag:u,dirs:d}=e;if(null!=s&&t&&to(s,null,t,n,null),256&c)return void t.ctx.deactivate(e);const p=1&c&&d;let h;if((h=i&&i.onVnodeBeforeUnmount)&&oo(h,t,e),6&c)te(e.component,n,o);else{if(128&c)return void e.suspense.unmount(n,o);p&&Zn(e,null,t,"beforeUnmount"),l&&(r!==en||u>0&&64&u)?oe(l,t,n):16&c&&oe(a,t,n),64&c&&e.type.remove(e,le),o&&K(e)}((h=i&&i.onVnodeUnmounted)||p)&&eo(()=>{h&&oo(h,t,e),p&&Zn(e,null,t,"unmounted")},n)},K=e=>{const{type:t,el:n,anchor:r,transition:i}=e;if(t===en)return void J(n,r);const s=()=>{o(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:o}=i,r=()=>t(n,s);o?o(e.el,s,r):r()}else s()},J=(e,t)=>{let n;for(;e!==t;)n=m(e),o(e),e=n;o(t)},te=(e,t,n)=>{const{bum:o,effects:r,update:i,subTree:s,um:a}=e;if(o&&G(o),r)for(let e=0;e{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},oe=(e,t,n,o=!1,r=0)=>{for(let i=r;i6&e.shapeFlag?ie(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el),se=(e,t,n=!1)=>{const o=e.children,r=t.children;if(I(o)&&I(r))for(let e=0;e{null==e?t._vnode&&Y(t._vnode,null,null,!0):C(t._vnode||null,e,t),kt(),t._vnode=e},le={p:C,um:Y,m:X,r:K,mt:U,mc:T,pc:j,pbc:N,n:ie,o:e};let ce,ue;t&&([ce,ue]=t(le));return{render:ae,hydrate:ce,createApp:Kn(ae,ce)}}(e)}function oo(e,t,n,o=null){st(e,t,7,[n,o])}const ro={};function io(e,t,n){return so(e,t,n)}function so(e,t,{immediate:n,deep:o,flush:r,onTrack:i,onTrigger:s}=u,a=So){let l;const c=Ze(e);if(c?l=()=>e.value:$e(e)?(l=()=>e,o=!0):l=I(e)?()=>e.map(e=>Ze(e)?e.value:$e(e)?lo(e):w(e)?it(e,a,2):void 0):w(e)?t?()=>it(e,a,2):()=>{if(!a||!a.isUnmounted)return d&&d(),it(e,a,3,[h])}:p,t&&o){const e=l;l=()=>lo(e())}let d;const h=e=>{d=g.options.onStop=()=>{it(e,a,4)}};let f=I(e)?[]:ro;const m=()=>{if(g.active)if(t){const e=g();(o||c||V(e,f))&&(d&&d(),st(t,a,3,[e,f===ro?void 0:f,h]),f=e)}else g()};let L;m.allowRecurse=!!t,L="sync"===r?m:"post"===r?()=>eo(m,a&&a.suspense):()=>{!a||a.isMounted?function(e){wt(e,ht,pt,ft)}(m):m()};const g=Q(l,{lazy:!0,onTrack:i,onTrigger:s,scheduler:L});return To(g),t?n?m():f=g():"post"===r?eo(g,a&&a.suspense):g(),()=>{Z(g),a&&b(a.effects,g)}}function ao(e,t,n){const o=this.proxy;return so(S(e)?()=>o[e]:e.bind(o),t.bind(o),n,this)}function lo(e,t=new Set){if(!x(e)||t.has(e))return e;if(t.add(e),Ze(e))lo(e.value,t);else if(I(e))for(let n=0;n{lo(e.get(o),t)});else if(E(e))e.forEach(e=>{lo(e,t)});else for(const n in e)lo(e[n],t);return e}function co(e,t){if(So){let n=So.provides;const o=So.parent&&So.parent.provides;o===n&&(n=So.provides=Object.create(o)),n[e]=t}else;}function uo(e,t,n=!1){const o=So||Nt;if(o){const r=o.provides;if(e in r)return r[e];if(arguments.length>1)return n&&w(t)?t():t}}let po=!1;function ho(e,t,n=[],o=[],r=!1){const{mixins:i,extends:s,data:a,computed:l,methods:c,watch:u,provide:d,inject:h,components:f,directives:m,beforeMount:L,mounted:b,beforeUpdate:v,updated:y,activated:C,deactivated:E,beforeDestroy:S,beforeUnmount:k,destroyed:_,unmounted:M,render:T,renderTracked:R,renderTriggered:N,errorCaptured:D}=t,A=e.proxy,O=e.ctx,P=e.appContext.mixins;if(r&&T&&e.render===p&&(e.render=T),r||(po=!0,fo("beforeCreate",t,A,P),po=!1,Lo(e,P,n,o)),s&&ho(e,s,n,o,!0),i&&Lo(e,i,n,o),h)if(I(h))for(let e=0;ego(e,t,A)),a&&go(e,a,A)),l)for(const e in l){const t=l[e],n=Ro({get:w(t)?t.bind(A,A):w(t.get)?t.get.bind(A,A):p,set:!w(t)&&w(t.set)?t.set.bind(A):p});Object.defineProperty(O,e,{enumerable:!0,configurable:!0,get:()=>n.value,set:e=>n.value=e})}if(u&&o.push(u),!r&&o.length&&o.forEach(e=>{for(const t in e)bo(e[t],O,A,t)}),d){const e=w(d)?d.call(A):d;for(const t in e)co(t,e[t])}var B;r&&(f&&g(e.components||(e.components=g({},e.type.components)),f),m&&g(e.directives||(e.directives=g({},e.type.directives)),m)),r||fo("created",t,A,P),L&&Dn(L.bind(A)),b&&An(b.bind(A)),v&&On(v.bind(A)),y&&Pn(y.bind(A)),C&&qn(C.bind(A),"a",B),E&&function(e,t){qn(e,"da",t)}(E.bind(A)),D&&((e,t=So)=>{Rn("ec",e,t)})(D.bind(A)),R&&Vn(R.bind(A)),N&&Un(N.bind(A)),k&&Bn(k.bind(A)),M&&Fn(M.bind(A))}function fo(e,t,n,o){mo(e,o,n);const{extends:r,mixins:i}=t;r&&function e(t,n,o){n.extends&&e(t,n.extends,o);const r=n[t];r&&r.call(o)}(e,r,n),i&&mo(e,i,n);const s=t[e];s&&s.call(n)}function mo(e,t,n){for(let o=0;o{let t=e;for(let e=0;en[o];if(S(e)){const n=t[e];w(n)&&io(r,n)}else if(w(e))io(r,e.bind(n));else if(x(e))if(I(e))e.forEach(e=>bo(e,t,n,o));else{const o=w(e.handler)?e.handler.bind(n):t[e.handler];w(o)&&io(r,o,e)}}function vo(e,t,n){const o=n.appContext.config.optionMergeStrategies,{mixins:r,extends:i}=t;i&&vo(e,i,n),r&&r.forEach(t=>vo(e,t,n));for(const r in t)o&&y(o,r)?e[r]=o[r](e[r],t[r],n.proxy,r):e[r]=t[r]}const yo=g(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>e.parent&&e.parent.proxy,$root:e=>e.root&&e.root.proxy,$emit:e=>e.emit,$options:e=>function(e){const t=e.type,{__merged:n,mixins:o,extends:r}=t;if(n)return n;const i=e.appContext.mixins;if(!i.length&&!o&&!r)return t;const s={};return i.forEach(t=>vo(s,t,e)),vo(s,t,e),t.__merged=s}(e),$forceUpdate:e=>()=>Ct(e.update),$nextTick:()=>It,$watch:e=>ao.bind(e)}),Io={get({_:e},t){const{ctx:n,setupState:o,data:r,props:i,accessCache:s,type:a,appContext:l}=e;if("__v_skip"===t)return!0;let c;if("$"!==t[0]){const a=s[t];if(void 0!==a)switch(a){case 0:return o[t];case 1:return r[t];case 3:return n[t];case 2:return i[t]}else{if(o!==u&&y(o,t))return s[t]=0,o[t];if(r!==u&&y(r,t))return s[t]=1,r[t];if((c=e.propsOptions[0])&&y(c,t))return s[t]=2,i[t];if(n!==u&&y(n,t))return s[t]=3,n[t];po||(s[t]=4)}}const d=yo[t];let p,h;return d?("$attrs"===t&&oe(e,0,t),d(e)):(p=a.__cssModules)&&(p=p[t])?p:n!==u&&y(n,t)?(s[t]=3,n[t]):(h=l.config.globalProperties,y(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;if(r!==u&&y(r,t))r[t]=n;else if(o!==u&&y(o,t))o[t]=n;else if(t in e.props)return!1;return("$"!==t[0]||!(t.slice(1)in e))&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:i}},s){let a;return void 0!==n[s]||e!==u&&y(e,s)||t!==u&&y(t,s)||(a=i[0])&&y(a,s)||y(o,s)||y(yo,s)||y(r.config.globalProperties,s)}},Co=g({},Io,{get(e,t){if(t!==Symbol.unscopables)return Io.get(e,t,e)},has:(e,n)=>"_"!==n[0]&&!t(n)}),Eo=Xn();let wo=0;let So=null;const ko=e=>{So=e};let xo=!1;function _o(e,t,n){var o;w(t)?e.render=t:x(t)&&(e.setupState=$e(o=t)?o:new Proxy(o,et)),Mo(e)}function Mo(e,t){const n=e.type;e.render||(e.render=n.render||p,e.render._rc&&(e.withProxy=new Proxy(e.ctx,Co))),So=e,ho(e,n),So=null}function To(e){So&&(So.effects||(So.effects=[])).push(e)}function Ro(e){const t=function(e){let t,n;return w(e)?(t=e,n=p):(t=e.get,n=e.set),new rt(t,n,w(e)||!e.set)}(e);return To(t.effect),t}function No(e){return w(e)?{setup:e,name:e.name}:e}function Do(e,t,n){const o=arguments.length;return 2===o?x(t)&&!I(t)?un(t)?fn(e,null,[t]):fn(e,t):fn(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&un(n)&&(n=[n]),fn(e,t,n))}function Ao(e,t){let n;if(I(e)||S(e)){n=new Array(e.length);for(let o=0,r=e.length;o{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n)=>t?Bo.createElementNS(Po,e):Bo.createElement(e,n?{is:n}:void 0),createText:e=>Bo.createTextNode(e),createComment:e=>Bo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Bo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode:e=>e.cloneNode(!0),insertStaticContent(e,t,n,o){const r=o?Uo||(Uo=Bo.createElementNS(Po,"svg")):Fo||(Fo=Bo.createElement("div"));r.innerHTML=e;const i=r.firstChild;let s=i,a=s;for(;s;)a=s,Vo.insert(s,t,n),s=r.firstChild;return[i,a]}};const Go=/\s*!important$/;function qo(e,t,n){if(I(n))n.forEach(n=>qo(e,t,n));else if(t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Ho[t];if(n)return n;let o=P(t);if("filter"!==o&&o in e)return Ho[t]=o;o=U(o);for(let n=0;n<$o.length;n++){const r=$o[n]+o;if(r in e)return Ho[t]=r}return t}(e,t);Go.test(n)?e.setProperty(F(o),n.replace(Go,""),"important"):e[o]=n}}const $o=["Webkit","Moz","ms"],Ho={};const jo="http://www.w3.org/1999/xlink";let zo=Date.now;"undefined"!=typeof document&&zo()>document.createEvent("Event").timeStamp&&(zo=()=>performance.now());let Wo=0;const Qo=Promise.resolve(),Zo=()=>{Wo=0};function Xo(e,t,n,o,r=null){const i=e._vei||(e._vei={}),s=i[t];if(o&&s)s.value=o;else{const[n,a]=function(e){let t;if(Yo.test(e)){let n;for(t={};n=e.match(Yo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e.slice(2).toLowerCase(),t]}(t);if(o){!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,i[t]=function(e,t){const n=e=>{(e.timeStamp||zo())>=n.attached-1&&st(function(e,t){if(I(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e(t))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>Wo||(Qo.then(Zo),Wo=zo()))(),n}(o,r),a)}else s&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,s,a),i[t]=void 0)}}const Yo=/(?:Once|Passive|Capture)$/;const Ko=/^on[a-z]/;const Jo=["ctrl","shift","alt","meta"],er={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Jo.some(n=>e[n+"Key"]&&!t.includes(n))},tr=(e,t)=>(n,...o)=>{for(let e=0;e{switch(t){case"class":!function(e,t,n){if(null==t&&(t=""),n)e.setAttribute("class",t);else{const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),e.className=t}}(e,r,i);break;case"style":!function(e,t,n){const o=e.style;if(n)if(S(n))t!==n&&(o.cssText=n);else{for(const e in n)qo(o,e,n[e]);if(t&&!S(t))for(const e in t)null==n[e]&&qo(o,e,"")}else e.removeAttribute("style")}(e,o,r);break;default:m(t)?L(t)||Xo(e,t,0,r,a):function(e,t,n,o){if(o)return"innerHTML"===t||!!(t in e&&Ko.test(t)&&w(n));if("spellcheck"===t||"draggable"===t)return!1;if("form"===t&&"string"==typeof n)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if(Ko.test(t)&&S(n))return!1;return t in e}(e,t,r,i)?function(e,t,n,o,r,i,s){if("innerHTML"===t||"textContent"===t)return o&&s(o,r,i),void(e[t]=null==n?"":n);if("value"!==t||"PROGRESS"===e.tagName)if(""===n&&"boolean"==typeof e[t])e[t]=!0;else if(null==n&&"string"==typeof e[t])e[t]="",e.removeAttribute(t);else try{e[t]=n}catch(e){}else{e._value=n;const t=null==n?"":n;e.value!==t&&(e.value=t)}}(e,t,r,s,a,l,c):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,o,r){if(r&&t.startsWith("xlink:"))null==o?e.removeAttributeNS(jo,t.slice(6,t.length)):e.setAttributeNS(jo,t,o);else{const r=n(t);null==o||r&&!1===o?e.removeAttribute(t):e.setAttribute(t,r?"":o)}}(e,t,r,i))}},forcePatchProp:(e,t)=>"value"===t},Vo);let or;
-/*!
- * vue-router v4.0.0-beta.6
- * (c) 2020 Eduardo San Martin Morote
- * @license MIT
- */
-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 mr(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,Cr;function Er(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=""}(Cr||(Cr={}));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),Lr(e,"")}return Lr(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=Er(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?Cr.forward:Cr.back:Cr.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 Vr(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 Gr={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 mi(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 bi(){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 vi(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(vi(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&&vi(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=Ei(e[t-2]);return t>1&&Ei(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&&br(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 Ci=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=Ve(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 Ei(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{ms[e]={},Ls[e]={itemsPerPage:16,currentPage:1}});const gs={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:ms,isSystemOperationRunning:!1,systemOperationPercentage:null,viewSettings:Ls},bs=Ve(gs);var vs="object"==typeof process&&process.env&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var ys={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16},Is="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Cs(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 Es=Cs((function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=ys,o=(t=e.exports={}).re=[],r=t.src=[],i=t.t={};let s=0;const a=(e,t,n)=>{const a=s++;vs(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 ws=/^[0-9]+$/,Ss=(e,t)=>{const n=ws.test(e),o=ws.test(t);return n&&o&&(e=+e,t=+t),e===t?0:n&&!o?-1:o&&!n?1:eSs(t,e)};const{MAX_LENGTH:xs,MAX_SAFE_INTEGER:_s}=ys,{re:Ms,t:Ts}=Es,{compareIdentifiers:Rs}=ks;class Ns{constructor(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Ns){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>xs)throw new TypeError(`version is longer than ${xs} characters`);vs("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?Ms[Ts.LOOSE]:Ms[Ts.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>_s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>_s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>_s||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<_s)return t}return e}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(e){if(vs("SemVer.compare",this.version,this.options,e),!(e instanceof Ns)){if("string"==typeof e&&e===this.version)return 0;e=new Ns(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof Ns||(e=new Ns(e,this.options)),Rs(this.major,e.major)||Rs(this.minor,e.minor)||Rs(this.patch,e.patch)}comparePre(e){if(e instanceof Ns||(e=new Ns(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],o=e.prerelease[t];if(vs("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return Rs(n,o)}while(++t)}compareBuild(e){e instanceof Ns||(e=new Ns(e,this.options));let t=0;do{const n=this.build[t],o=e.build[t];if(vs("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return Rs(n,o)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=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 Ds=Ns;var As=(e,t,n)=>new Ds(e,n).compare(new Ds(t,n));var Os=(e,t,n)=>As(e,t,n)>0,Ps=Cs((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,m={},L=/^[^:]+:\/*[^/]*$/,g=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){m[" "+e]||(L.test(e)?m[" "+e]=e+"/":m[" "+e]=y(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(g,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(b,"$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),m=!1,L=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=L-1)),s=m||/\n\n(?!\s*$)/.test(n),g!==L-1&&(m="\n"===n.charAt(n.length-1),s||(s=m)),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=E,V=k,G={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]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\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?'|\([^()]*\))/};G.def=U(G.def).replace("label",G._label).replace("title",G._title).getRegex(),G.bullet=/(?:[*+-]|\d{1,9}[.)])/,G.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,G.item=U(G.item,"gm").replace(/bull/g,G.bullet).getRegex(),G.list=U(G.list).replace(/bull/g,G.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+G.def.source+")").getRegex(),G._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",G._comment=//,G.html=U(G.html,"i").replace("comment",G._comment).replace("tag",G._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),G.paragraph=U(G._paragraph).replace("hr",G.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","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.blockquote=U(G.blockquote).replace("paragraph",G.paragraph).getRegex(),G.normal=V({},G),G.gfm=V({},G.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*|$)"}),G.gfm.nptable=U(G.gfm.nptable).replace("hr",G.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","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.gfm.table=U(G.gfm.table).replace("hr",G.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","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",G._tag).getRegex(),G.pedantic=V({},G.normal,{html:U("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",G._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:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:F,paragraph:U(G.normal._paragraph).replace("hr",G.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",G.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:-]*\\s*>|^<[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",G._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=V({},q),q.pedantic=V({},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=V({},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?"\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+""+o+">\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"},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+">\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='"+n+""},t.image=function(e,t,n){if(null===(e=Y(this.options.sanitize,this.options.baseUrl,e)))return n;var o='
":">"},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=C,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,m,L,g,b,v,y="",I=e.length;for(n=0;n0&&"text"===L.tokens[0].type?(L.tokens[0].text=v+" "+L.tokens[0].text,L.tokens[0].tokens&&L.tokens[0].tokens.length>0&&"text"===L.tokens[0].tokens[0].type&&(L.tokens[0].tokens[0].text=v+" "+L.tokens[0].tokens[0].text)):L.tokens.unshift({type:"text",text:v}):m+=v),m+=this.parse(L.tokens,f),u+=this.renderer.listitem(m,b,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 Is&&Is.global===Is?Is: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 Fs=e=>({...tt(Ge(e.state)),...e.computed,...e.actions}),Us=e=>JSON.parse(localStorage.getItem(e)),Vs=(e,t)=>localStorage.setItem(e,JSON.stringify(t)),Gs=e=>parseInt(e,16),qs=e=>Array.isArray(e)?e.map(e=>e.toString(16)):e.toString(16),$s=e=>Array.isArray(e)?e.map(e=>e.toString(16)).join(" "):e.toString(16),Hs=e=>Array.isArray(e)?e.join(" "):e,js=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},Ws=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]},Qs=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Zs=(e,t)=>e&&t&&Math.abs(t.getTime()-e.getTime()),Xs=e=>("0000"+e).slice(-2),Ys=e=>new Promise(t=>{setTimeout(t,e)});var Ks,Js;(Js=Ks||(Ks={})).Closed="closed",Js.Pending="pending",Js.Open="open";const ea=Ve({connectionState:Ks.Closed,inputs:[],outputs:[],log:!0,isWebMidiSupported:!1});var ta,na,oa=Cs((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)}(Is)}));(na=ta||(ta={}))[na.STATUS=2]="STATUS",na[na.HANDSHAKE=3]="HANDSHAKE",na[na.WISH=4]="WISH",na[na.AMOUNT=5]="AMOUNT",na[na.BLOCK=6]="BLOCK",na[na.SECTION=7]="SECTION",na[na.PART=8]="PART",na[na.INDEX=9]="INDEX",na[na.NEW_VALUE=10]="NEW_VALUE",na[na.MSG_LENGTH=11]="MSG_LENGTH",na[na.WRITE=12]="WRITE",na[na.NOT_SUPPORTED=13]="NOT_SUPPORTED",na[na.READ=14]="READ",na[na.UART_INTERFACE_ALLOCATED=80]="UART_INTERFACE_ALLOCATED",na[na.CDC_INTERFACE_ALLOCATED=81]="CDC_INTERFACE_ALLOCATED",na[na.UKNOWN_ERROR=704]="UKNOWN_ERROR",na[na.UI_QUEUE_REQ_ID_CONFLICT=711]="UI_QUEUE_REQ_ID_CONFLICT",na[na.UI_QUEUE_REQ_DATA_MISSING=712]="UI_QUEUE_REQ_DATA_MISSING",na[na.UI_QUEUE_REQ_ALREADY_ACTIVE=713]="UI_QUEUE_REQ_ALREADY_ACTIVE",na[na.UI_QUEUE_REQ_NONE_ACTIVE=714]="UI_QUEUE_REQ_NONE_ACTIVE",na[na.UI_QUEUE_SPECIAL_REQ_ID_MISMATCH=715]="UI_QUEUE_SPECIAL_REQ_ID_MISMATCH",na[na.UI_QUEUE_REQUEST_DECODE_ERROR=716]="UI_QUEUE_REQUEST_DECODE_ERROR",na[na.UI_QUEUE_REQUEST_SEND_ERROR=717]="UI_QUEUE_REQUEST_SEND_ERROR",na[na.UI_QUEUE_REQ_DATA_INVALID=718]="UI_QUEUE_REQ_DATA_INVALID",na[na.UI_QUEUE_REQ_TIMED_OUT=719]="UI_QUEUE_REQ_TIMED_OUT",na[na.UI_QUEUE_EMBEDED_RESPONSE_MISMATCH=720]="UI_QUEUE_EMBEDED_RESPONSE_MISMATCH";const ra={code:704,description:"Missing error description (READ error)."},ia={704:ra,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."}},sa=e=>ia[e]||ra,aa=[{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"},{name:"Arduino Nano 33 BLE",id:[33,108,99,106],oldId:[],firmwareFileName:"nano33ble.sysex"},{name:"Adafruit ItsyBitsy nRF52840 Express",id:[59,48,3,95],oldId:[],firmwareFileName:"af_ib_nrf52840.sysex"}],la=(e,t,n)=>{const o=Xe(!0),r=Ve(Sc(e,t)),i=vd.actions.getFilteredSectionsForBlock(e,t),s=async()=>{o.value=!0;const i=t===cs.Value&&n?n.value:void 0,s=await vd.actions.getComponentSettings(e,t,i);Object.assign(r,s),Ys(100).then(()=>o.value=!1)},a=(e,t,n)=>{if(o.value)return;o.value=!0;return vd.actions.setComponentSectionValue(t,()=>{r[e]=t.value,Ys(100).then(()=>o.value=!1),n&&n(t.value)}).catch(e=>(Qu.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:wc[e]}},ca=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&&Ys(10).then(n),o})}},ua=(e,t)=>()=>{if(!window.confirm(e))return!1;t()};var da=(e,t,n)=>As(e,t,n)<0;const{MAX_LENGTH:pa}=ys,{re:ha,t:fa}=Es;var ma=(e,t)=>{if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Ds)return e;if("string"!=typeof e)return null;if(e.length>pa)return null;if(!(t.loose?ha[fa.LOOSE]:ha[fa.FULL]).test(e))return null;try{return new Ds(e,t)}catch(e){return null}};var La=(e,t)=>{const n=ma(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const ga=e=>{const t=[];for(let n=e.startIndex;n<=e.endIndex;n++)t.push(n);return{...e,indexArray:t}};var ba=No({name:"DeviceForm",props:{block:{required:!0,type:Number},gridCols:{default:3,type:Number}},setup(e){const{numberOfComponents:t,outputId:n}=yd,o=Ro(()=>Number(Zp.currentRoute.value.params.index));return{outputId:n,numberOfComponents:t,index:o,...la(e.block,cs.Value,o)}}});const va={class:"w-full section-heading"},ya={class:"section-heading-inner flex"},Ia=fn("span",{class:"mr-6"},"›",-1),Ca={class:"mr-6 text-gray-400"},Ea={class:"hidden md:block md:flex-grow text-right"},wa={class:"section-content"};ba.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",va,[fn("div",ya,[fn(s,{class:"mr-6",to:{name:e.blockDefinition.routeName}},{default:$t(()=>[fn("h2",null,l(e.blockDefinition.title)+"s",1)]),_:1},8,["to"]),Ia,fn("div",Ca,[Ln(l(e.blockDefinition.title)+" ",1),fn("strong",null,l(e.index),1)]),fn("div",Ea,[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}):bn("",!0),fn("div",wa,[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"]):bn("",!0)],64))),256))],2)])],32)};var Sa=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{...ca(t)}}});Sa.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 ka=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{...ca(t)}}});const xa={class:"form-table-row"};ka.render=function(e,t,n,o,r,i){const s=Zt("FormField");return an(),cn("div",xa,[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"]):bn("",!0)],64))),256))])};var _a=No({name:"DeviceGrid",components:{DeviceGridButton:Sa,DeviceTableComponentRow:ka},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}=yd,{highlights:i}=Wu,{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:da(La(bs.firmwareVersion),"5.4.0")||Os(La(bs.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:da(La(bs.firmwareVersion),"5.4.0")||Os(La(bs.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(ga)})})(r,s):void 0,{componentCount:c,indexRange:u,pages:d,pageSizes:p,sections:h,viewSetting:f}=(e=>{const t=Ro(()=>vd.state.viewSettings[e]),n=Ro(()=>vd.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;twc[e].sections);return{componentCount:n,indexRange:c,pages:o,pageSizes:l,sections:u,viewSetting:t}})(s.value),{columnViewData:m,loading:L,showField:g,onValueChange:b}=((e,t)=>{const n=Xe(!0),o=Sc(e,cs.Value),r=Ve({}),i=Ro(()=>!!t.value.viewListAsTable),s=async()=>{if(2!==vd.state.valueSize||!i.value)return;n.value=!0;const t=await vd.actions.getSectionValues(e);Object.keys(t).forEach(e=>{t[e].forEach((t,n)=>{r[n]||(r[n]={...o}),r[n][e]=t})}),Ys(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 vd.actions.setComponentSectionValue(u,()=>{r[l][o]=u.value,Ys(100).then(()=>n.value=!1),c&&c(u.value)}).catch(e=>(Qu.error("ERROR WHILE SAVING SETTING DATA",e),s()))}}})(s.value,f);return{outputId:t,highlights:i,columnViewData:m,loading:L,showField:g,onValueChange:b,setViewSetting:n,componentCount:c,viewSetting:f,indexRange:u,pages:d,pageSizes:p,sections:h,showMsbControls:o,segments:l}}});const Ma={class:"section-heading"},Ta={key:0,class:"section-heading-inner text-center"},Ra={key:0,class:"section-heading"},Na={class:"section-heading-inner-sm clearfix"},Da={class:""},Aa={key:0,class:"ml-6 float-right"},Oa=fn("span",{class:"text-xs"},"Show",-1),Pa={key:1,class:"ml-6 mt-4 md:mt-0 float-right"},Ba=fn("span",{class:"text-xs ml-4"},"Page",-1),Fa={class:"form-table"},Ua={key:2,class:"device-grid"},Va={class:"text-xl font-bold"},Ga={class:"section-heading text-center"},qa={class:"section-heading-inner-sm"},$a={class:"device-grid"},Ha={class:"text-xl font-bold"};_a.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",Ma,[e.title?(an(),cn("h2",Ta,l(e.title),1)):bn("",!0)]),e.showMsbControls?bn("",!0):(an(),cn("div",Ra,[fn("div",Na,[fn("span",Da,[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",Aa,[Oa,(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))])):bn("",!0),e.viewSetting.viewListAsTable&&e.pages>1?(an(),cn("span",Pa,[Ba,(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))])):bn("",!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}):bn("",!0),fn("div",Fa,[(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",Ua,[(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",Va,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",Ga,[fn("div",qa,l(t.title),1)]),fn("div",$a,[(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",Ha,l(t),1)]),_:2},1032,["output-id","route-name","index","highlight"]))),128))])]))),128)):bn("",!0)],2)};var ja=No({name:"RouteWrapper"});ja.render=function(e,t,n,o,r,i){const s=Zt("router-view");return an(),cn(s,{key:e.$route.fullPath})};var za=No({name:"AnalogIcon"});const Wa={"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"},Qa=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);za.render=function(e,t,n,o,r,i){return an(),cn("svg",Wa,[Qa])};const Za={Enabled:{block:Bi.Analog,key:"enabled",type:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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}},Xa={block:Bi.Analog,title:"Analog",routeName:"device-analogs",iconComponent:We(za),componentCountResponseIndex:2,sections:Za,routes:[{path:"analogs",name:"device-analogs",component:ja,redirect:{name:"device-analogs-list"},children:[{path:"list",name:"device-analogs-list",component:_a,props:{block:Bi.Analog,routeName:"device-analogs-form",segmentGrid:!0}},{path:"analogs/:index",name:"device-analogs-form",component:ba,props:{block:Bi.Analog}}]}]};var Ya=No({name:"IconButton"});const Ka={"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 640"},Ja=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),el=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),tl=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),nl=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);Ya.render=function(e,t,n,o,r,i){return an(),cn("svg",Ka,[Ja,el,tl,nl])};const ol={Type:{block:Bi.Button,key:"type",type:cs.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:cs.Value,section:1,component:_i.Select,options:[{value:Gi.Note,text:"Note"},{value:Gi.ProgramChange,text:"Program Change"},{value:Gi.ProgramChangeInc,text:"Program Change Inc"},{value:Gi.ProgramChangeDec,text:"Program Change Dec"},{value:Gi.ProgramChangeOffsetInc,text:"Program Change Offset Increment"},{value:Gi.ProgramChangeOffsetDec,text:"Program Change Offset Decrement"},{value:Gi.ControlChange,text:"CC"},{value:Gi.ControlChangeOff,text:"CC/0 Off"},{value:Gi.MmcStop,text:"MMC Stop"},{value:Gi.MmcPlay,text:"MMC Play"},{value:Gi.MmcRecord,text:"MMC Record"},{value:Gi.MmcPause,text:"MMC Pause"},{value:Gi.RealTimeClock,text:"Real Time Clock"},{value:Gi.RealTimeStart,text:"Real Time Start"},{value:Gi.RealTimeContinue,text:"Real Time Continue"},{value:Gi.RealTimeStop,text:"Real Time Stop"},{value:Gi.RealTimeActiveSensing,text:"Real Time Active Sensing"},{value:Gi.RealTimeSystemReset,text:"Real Time System Reset"},{value:Gi.None,text:"None"},{value:Gi.PresetChange,text:"Preset Change"},{value:Gi.MultiValueIncResetNote,text:"Multi Value IncReset Note"},{value:Gi.MultiValueIncDecNote,text:"Multi Value IncDec Note"},{value:Gi.MultiValueIncResetCC,text:"Multi Value IncReset CC"},{value:Gi.MultiValueIncDecCC,text:"Multi Value IncDec CC"},{value:Gi.NoteOffOnly,text:"Note Off Only"},{value:Gi.ControlChange0Only,text:"CC/0 only"},{value:Gi.BpmInc,text:"BPM Inc"},{value:Gi.BpmDec,text:"BPM Dec"}],label:"Message type",helpText:"",block:Bi.Button},MidiChannel:{showIf:e=>!Zi.includes(e.messageType),key:"midiChannel",type:cs.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:cs.Value,section:2,component:_i.Input,min:0,max:127,label:"MIDI ID",helpText:"",block:Bi.Button},Preset:{showIf:e=>e.messageType==Gi.PresetChange,key:"preset",type:cs.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:cs.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}},rl={block:Bi.Button,title:"Button",routeName:"device-buttons",iconComponent:We(Ya),componentCountResponseIndex:0,sections:ol,routes:[{path:"buttons",name:"device-buttons",component:ja,redirect:{name:"device-buttons-list"},children:[{path:"list",name:"device-buttons-list",component:_a,props:{block:Bi.Button,routeName:"device-buttons-form",segmentGrid:!0}},{path:"buttons/:index",name:"device-buttons-form",component:ba,props:{block:Bi.Button}}]}]};var il=No({name:"Display",setup(){const{sections:e}=hl;return{Block:Bi,sections:e}}});const sl={class:"form-grid"};il.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",sl,[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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!0)])]),_:2},1024)]),_:1},8,["block"])};var al=No({name:"IconDisplay"});const ll={"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"},cl=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),ul=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),dl=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);al.render=function(e,t,n,o,r,i){return an(),cn("svg",ll,[cl,ul,dl])};const pl={EnableDisplay:{block:Bi.Display,key:"enableDisplay",type:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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."}},hl={block:Bi.Display,title:"I2C",routeName:"device-i2c",iconComponent:We(al),sections:pl,routes:[{path:"i2c:",name:"device-i2c",component:il}]};var fl=No({name:"IconEncoder"});const ml={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"},Ll=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),gl=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),bl=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),vl=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),yl=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);fl.render=function(e,t,n,o,r,i){return an(),cn("svg",ml,[Ll,gl,bl,vl,yl])};const Il={Enabled:{block:Bi.Encoder,key:"enabled",type:cs.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:cs.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:cs.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.SingleNoteWithVariableValue,text:"Single note / variable value"},{value:$i.SingleNoteWithFixedValueBothDirections,text:"Single note / repeated value both directions"},{value:$i.SingleNoteWithFixedValueOneDirection0OtherDirection,text:"Single note / repeated value one direction, 0 value other"},{value:$i.TwoNoteWithFixedValueBothDirections,text:"Two note / repeated value both directions"},{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:cs.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:cs.Value,section:3,component:_i.Input,min:0,max:127,max2Byte:16383,label:"MIDI ID (LSB)",helpText:""},MidiId2:{showIf:e=>rs.includes(e.encodingMode)&&!!e.enabled,block:Bi.Encoder,key:"midiId2",type:cs.Value,section:12,component:_i.Input,min:0,max:16383,label:"2nd MIDI ID",helpText:""},MidiIdMSB:{showIf:e=>!Ki.includes(e.encodingMode)&&!!e.enabled,isMsb:!0,block:Bi.Encoder,key:"midiIdMSB",type:cs.Value,section:7,component:_i.Input,min:0,max:127,label:"MIDI ID (MSB)",helpText:""},Acceleration:{showIf:e=>es.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"acceleration",type:cs.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:cs.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."},RepeatedValue:{showIf:e=>os.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"repeatedValue",type:cs.Value,section:11,component:_i.Input,min:0,max:16383,label:"Repeated value",helpText:"Specifies the constant note value to be sent when encoder is moved."},PulsesPerStep:{showIf:e=>e.enabled,block:Bi.Encoder,key:"pulsesPerStep",type:cs.Value,section:5,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."},LowerLimit:{showIf:e=>ns.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"lowerLimit",type:cs.Value,section:9,component:_i.Input,min:0,max:16383,label:"Lower limit",helpText:"Specifies the minimum value which is sent by the encoder input. 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."},UpperLimit:{showIf:e=>ns.includes(e.encodingMode)&&e.enabled,block:Bi.Encoder,key:"upperLimit",type:cs.Value,section:10,component:_i.Input,min:0,max:16383,label:"Upper limit",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."}},Cl={block:Bi.Encoder,title:"Encoder",routeName:"device-encoders",iconComponent:We(fl),componentCountResponseIndex:1,sections:Il,routes:[{path:"encoders",name:"device-encoders",component:ja,redirect:{name:"device-encoders-list"},children:[{path:"list",name:"device-encoders-list",component:_a,props:{block:Bi.Encoder,routeName:"device-encoders-form",title:"Encoder"}},{path:"encoders/:index",name:"device-encoders-form",component:ba,props:{block:Bi.Encoder,gridCols:4}}]}]};var El=No({name:"GlobalHardware",setup(){const{valueSize:e,bootLoaderSupport:t,startFactoryReset:n,startReboot:o,startBackup:r}=yd;return{modalVisible:Xe(!1),modalTitle:Xe(""),availableUpdates:Xe([]),onFactoryResetClicked:ua("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:ua("This will initiate a full backup of all parameters stored on the board. Proceed?",r),onBackupFileSelected:e=>{e.length&&yd.startRestore(e[0])}}}});const wl={class:"form-grid"},Sl={class:"form-field"},kl=Ln(" Reboot "),xl=fn("p",{class:"help-text"}," Rebooting the device will make the UI temporarily unavailable. ",-1),_l={class:"form-field"},Ml=Ln(" Reset to factory settings "),Tl=fn("p",{class:"help-text"}," Resets the device to its factory settings. ",-1),Rl={key:0,class:"form-field"},Nl=Ln(" Firmware section "),Dl=fn("p",{class:"help-text"}," Section used to reboot the device into bootloader mode and update the firmware. ",-1),Al={class:"form-grid"},Ol={class:"form-field"},Pl=Ln(" Backup "),Bl=fn("p",{class:"help-text"}," Download a backup of your configuration (incl presets). ",-1),Fl={class:"form-field"},Ul=fn("p",{class:"help-text"}," Select a backup file to restore your device configuration. ",-1);El.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",wl,[fn("div",Sl,[fn(s,{onClick:tr(e.startReboot,["prevent"])},{default:$t(()=>[kl]),_:1},8,["onClick"]),xl]),fn("div",_l,[fn(s,{onClick:tr(e.onFactoryResetClicked,["prevent"])},{default:$t(()=>[Ml]),_:1},8,["onClick"]),Tl]),e.bootLoaderSupport?(an(),cn("div",Rl,[fn(a,{to:{name:"device-firmware-update"}},{default:$t(()=>[Nl]),_:1}),Dl])):bn("",!0)])]),_:1}),2===e.valueSize?fn(l,{key:0,title:"Backup & Restore",class:"w-full"},{default:$t(()=>[fn("div",Al,[fn("div",Ol,[fn(s,{onClick:tr(e.onBackupClicked,["prevent"])},{default:$t(()=>[Pl]),_:1},8,["onClick"]),Bl]),fn("div",Fl,[fn(c,{label:"Restore",name:"backup-file",onChange:e.onBackupFileSelected},null,8,["onChange"]),Ul])])]),_:1}):bn("",!0)],64)};var Vl=No({name:"Global",components:{GlobalHardware:El},setup(){const{sections:e}=dc,{supportedPresetsCount:t}=yd;return{Block:Bi,sections:e,supportedPresetsCount:t}}});const Gl={class:"form-grid"},ql={class:"form-grid"};Vl.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",Gl,[n(e.sections.DisableForcedValueRefreshAfterPresetChange)?fn(s,{key:0,value:t.disableForcedValueRefreshAfterPresetChange,"field-definition":e.sections.DisableForcedValueRefreshAfterPresetChange,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!0),n(e.sections.EnablePresetChangeWithProgramChangeIn)?fn(s,{key:1,value:t.enablePresetChangeWithProgramChangeIn,"field-definition":e.sections.EnablePresetChangeWithProgramChangeIn,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!0),n(e.sections.PreservePresetState)?fn(s,{key:2,class:"col-span-2",value:t.preservePresetState,"field-definition":e.sections.PreservePresetState,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!0),n(e.sections.ActivePreset)?fn(s,{key:3,value:t.activePreset,"field-definition":e.sections.ActivePreset,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!0)])]),_:2},1024):bn("",!0),fn(a,{title:"MIDI"},{default:$t(()=>[fn("div",ql,[n(e.sections.UseGlobalChannel)?fn(s,{key:0,value:t.useGlobalChannel,"field-definition":e.sections.UseGlobalChannel,onModified:o},null,8,["value","field-definition","onModified"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!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"]):bn("",!0)])]),_:2},1024)]),_:1},8,["block"]),fn(c)],64)};var $l=No({name:"GlobalFirmware",setup(){const{firmwareFileName:e,isBootloaderMode:t,startUpdatesCheck:n,bootLoaderSupport:o,startBootLoaderMode:r,startFirmwareUdate:i}=yd,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 Hl=fn("p",{class:"mb-6 text-sm leading-5 text-gray-500"},[Ln(" Your device does not have bootloader support. "),fn("br"),Ln(" To perform a manual firmware update please consult the "),fn("a",{href:"https://github.com/paradajz/OpenDeck/wiki/Firmware-update"},"wiki firmware update page"),Ln(". ")],-1),jl={class:"form-grid"},zl={key:0,class:"form-field"},Wl=Ln(" Check for updates "),Ql=fn("p",{class:"help-text"}," Check for newer firmware versions. ",-1),Zl={key:1,class:"form-field"},Xl=Ln(" Bootloader mode "),Yl=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),Kl={key:2,class:"form-field"},Jl=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),ec={key:2,class:"lg:text-center relative",style:{"min-height":"50vh"}},tc={class:"absolute flex inset-0 opacity-75 bg-gray-900"},nc={key:0,class:"text-sm leading-5 text-gray-200"},oc={key:1,class:"text-sm pb-6"};$l.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",jl,[e.isBootloaderMode?bn("",!0):(an(),cn("div",zl,[fn(a,{disabled:e.loading,onClick:tr(e.checkForUpdates,["prevent"])},{default:$t(()=>[Wl]),_:1},8,["disabled","onClick"]),Ql])),!e.isBootloaderMode&&e.bootLoaderSupport?(an(),cn("div",Zl,[fn(a,{onClick:tr(e.startBootLoaderMode,["prevent"])},{default:$t(()=>[Xl]),_:1},8,["onClick"]),Yl])):bn("",!0),e.isBootloaderMode?(an(),cn("div",Kl,[fn(c,{name:"backup-file",label:"Update Firmware",disabled:!e.isBootloaderMode,onChange:e.onFirmwareFileSelected},null,8,["disabled","onChange"]),Jl])):bn("",!0)])]),_:1}):fn(s,{key:0,title:"No bootloader support",class:"w-full"},{default:$t(()=>[Hl]),_:1}),e.loading?(an(),cn("div",ec,[fn("div",tc,[fn(u,{class:"self-center"})])])):e.updatesChecked?fn(s,{key:3,title:"Updates",class:"w-full"},{default:$t(()=>[e.availableUpdates.length?(an(),cn("div",oc,[(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"])):bn("",!0),fn("div",{innerHTML:t.html_description},null,8,["innerHTML"])]))),128))])):(an(),cn("p",nc," Your firmware is up to date. "))]),_:1}):bn("",!0)],64)};var rc=No({name:"IconGlobal"});const ic={"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"},sc=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),ac=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),lc=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),cc=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);rc.render=function(e,t,n,o,r,i){return an(),cn("svg",ic,[sc,ac,lc,cc])};const uc={PreservePresetState:{block:Bi.Global,key:"preservePresetState",type:cs.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.'},DisableForcedValueRefreshAfterPresetChange:{block:Bi.Global,key:"disableForcedValueRefreshAfterPresetChange",type:cs.Setting,section:2,settingIndex:2,component:_i.Toggle,label:"Disable forced value refresh after preset change",helpText:"If this option isn't enabled, all components will resend their current values once the preset changes."},EnablePresetChangeWithProgramChangeIn:{block:Bi.Global,key:"enablePresetChangeWithProgramChangeIn",type:cs.Setting,section:2,settingIndex:3,component:_i.Toggle,label:"Enable preset change with MIDI Program Change In",helpText:"When enabled, upon receiving MIDI Program Change message (on any interface and any channel) the board will change the preset to cooresponding program change value."},ActivePreset:{block:Bi.Global,key:"activePreset",type:cs.Setting,section:2,settingIndex:0,component:_i.Select,options:()=>{const e=vd.state.supportedPresetsCount||1,t=[];for(let n=0;n{vd.state.activePreset=e},label:"Active preset",helpText:"Preset stores the entire configuration for device."},UseGlobalChannel:{block:Bi.Global,key:"useGlobalChannel",type:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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."}},dc={block:Bi.Global,title:"Global",routeName:"device-global",iconComponent:We(rc),sections:uc,routes:[{path:"",name:"device-global",component:Vl},{path:"firmware-update",name:"device-firmware-update",component:$l}]};var pc=No({name:"DeviceGridWithSettings",props:{block:{required:!0,type:Number},routeName:{required:!0,type:String},settingsTitle:{default:"Global",type:String},segmentGrid:{type:Boolean,default:!1}}});pc.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 hc=No({name:"IconLed"});const fc={"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"},mc=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);hc.render=function(e,t,n,o,r,i){return an(),cn("svg",fc,[mc])};const Lc={BlinkWithMidiClock:{block:Bi.Led,key:"blinkWithMidiClock",type:cs.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:cs.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:cs.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:cs.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},ActivationId:{showIf:e=>!ss.includes(e.controlType),key:"activationId",type:cs.Value,section:3,component:_i.Input,min:0,max:127,label:"Activation ID",helpText:"",block:Bi.Led},RGBEnable:{showIf:e=>!ls.includes(e.controlType),key:"rgbEnable",type:cs.Value,section:4,component:_i.Toggle,label:"RGB Enable",helpText:"",block:Bi.Led},ControlType:{key:"controlType",type:cs.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"},{value:ji.Static,text:"Static / constantly on"}],label:"Control type",helpText:"",block:Bi.Led},ActivationValue:{showIf:e=>!is.includes(e.controlType),key:"activationValue",type:cs.Value,section:6,component:_i.Input,min:0,max:127,label:"Activation Value",helpText:"",block:Bi.Led},MidiChannel:{showIf:e=>!as.includes(e.controlType),key:"midiChannel",type:cs.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."}},gc={block:Bi.Led,title:"LED",routeName:"device-leds",iconComponent:We(hc),componentCountResponseIndex:3,sections:Lc,routes:[{path:"leds",name:"device-leds",component:ja,redirect:{name:"device-leds-list"},children:[{path:"list",name:"device-leds-list",component:pc,props:{block:Bi.Led,routeName:"device-leds-form",segmentGrid:!0}},{path:"leds/:index",name:"device-leds-form",component:ba,props:{block:Bi.Led}}]}]};var bc=No({name:"IconTouchscreen"});const vc={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"},yc=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),Ic=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);bc.render=function(e,t,n,o,r,i){return an(),cn("svg",vc,[yc,Ic])};const Cc={Enabled:{block:Bi.Touchscreen,key:"enableTouchscreen",type:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.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:cs.Value,section:8,min:0,max:15,component:_i.Input,label:"Screen to switch to",helpText:"Screen to which this button switches to."}},Ec={block:Bi.Touchscreen,title:"Touchscreen",routeName:"device-touchscreens",iconComponent:We(bc),componentCountResponseIndex:4,sections:Cc,routes:[{path:"touchscreens",name:"device-touchscreens",component:ja,redirect:{name:"device-touchscreens-list"},children:[{path:"list",name:"device-touchscreens-list",component:pc,props:{block:Bi.Touchscreen,routeName:"device-touchscreens-form",settingsTitle:""}},{path:"touchscreens/:index",name:"device-touchscreens-form",component:ba,props:{block:Bi.Touchscreen,gridCols:4}}]}]},wc={[Bi.Global]:dc,[Bi.Analog]:Xa,[Bi.Button]:rl,[Bi.Encoder]:Cl,[Bi.Led]:gc,[Bi.Display]:hl,[Bi.Touchscreen]:Ec},Sc=(e,t)=>Object.values(wc[e].sections).reduce((e,n)=>(t&&n.type!==t||(e[n.key]=null),e),{}),kc=Object.values(wc).reduce((e,t)=>(e.push(...t.routes),e),[]);var xc,_c;(_c=xc||(xc={})).CloseConnection="CloseConnection",_c.Handshake="Handshake",_c.GetValueSize="GetValueSize",_c.GetValuesPerMessage="GetValuesPerMessage",_c.GetFirmwareVersion="GetFirmwareVersion",_c.IdentifyBoard="IdentifyBoard",_c.GetFirmwareVersionAndHardwareUid="GetFirmwareVersionAndHardwareUid",_c.GetNumberOfSupportedComponents="GetNumberOfSupportedComponents",_c.GetNumberOfSupportedPresets="GetNumberOfSupportedPresets",_c.Reboot="Reboot",_c.Backup="Backup",_c.GetBootLoaderSupport="GetBootLoaderSupport",_c.BootloaderMode="BootloaderMode",_c.FactoryReset="FactoryReset",_c.GetValue="GetValue",_c.SetValue="SetValue",_c.GetSectionValues="GetSectionValues",_c.RestoreBackup="RestoreBackup",_c.FirmwareUpdate="FirmwareUpdate";const Mc={[xc.Handshake]:{key:xc.Handshake,type:ds.Predefined,specialRequestId:1,isConnectionInfoRequest:!0},[xc.CloseConnection]:{key:xc.CloseConnection,type:ds.Predefined,specialRequestId:0,expectsNoResponse:!0,isConnectionInfoRequest:!0},[xc.GetValueSize]:{key:xc.GetValueSize,type:ds.Predefined,isConnectionInfoRequest:!0,specialRequestId:2,parser:e=>e.length>1?js(e)[0]:e[0]||1},[xc.GetValuesPerMessage]:{key:xc.GetValuesPerMessage,type:ds.Predefined,isConnectionInfoRequest:!0,specialRequestId:3,decodeDoubleByte:!0,parser:e=>e[0]},[xc.GetFirmwareVersion]:{key:xc.GetFirmwareVersion,type:ds.Custom,specialRequestId:86,isConnectionInfoRequest:!0,decodeDoubleByte:!0,parser:e=>"v"+e[0]+"."+e[1]+"."+e[2]},[xc.IdentifyBoard]:{key:xc.IdentifyBoard,type:ds.Custom,specialRequestId:66,decodeDoubleByte:!0,parser:e=>e.slice(0,4)},[xc.GetFirmwareVersionAndHardwareUid]:{key:xc.GetFirmwareVersionAndHardwareUid,type:ds.Custom,isConnectionInfoRequest:!0,specialRequestId:67},[xc.GetNumberOfSupportedComponents]:{key:xc.GetNumberOfSupportedComponents,type:ds.Custom,specialRequestId:77,decodeDoubleByte:!0,parser:e=>{const t={};return Object.values(wc).forEach(n=>{void 0!==n.componentCountResponseIndex&&(t[n.block]=e[n.componentCountResponseIndex])}),t}},[xc.GetNumberOfSupportedPresets]:{key:xc.GetNumberOfSupportedPresets,type:ds.Custom,specialRequestId:80,isConnectionInfoRequest:!0,decodeDoubleByte:!0,parser:e=>e[0]},[xc.Reboot]:{key:xc.Reboot,type:ds.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:127},[xc.GetBootLoaderSupport]:{key:xc.GetBootLoaderSupport,type:ds.Custom,specialRequestId:81,decodeDoubleByte:!0,parser:e=>e[0]},[xc.BootloaderMode]:{key:xc.BootloaderMode,type:ds.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:85},[xc.FactoryReset]:{key:xc.FactoryReset,type:ds.Custom,isConnectionInfoRequest:!0,expectsNoResponse:!0,specialRequestId:68},[xc.Backup]:{key:xc.Backup,type:ds.Custom,specialRequestId:27,hasMultiPartResponse:!0,isSystemOperation:!0},[xc.GetValue]:{key:xc.GetValue,type:ds.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(...Ws(e.index),0,0),n}},[xc.SetValue]:{key:xc.SetValue,type:ds.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(...Ws(e.index),...Ws(e.value)),n}},[xc.GetSectionValues]:{key:xc.GetSectionValues,type:ds.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}},[xc.RestoreBackup]:{key:xc.RestoreBackup,type:ds.Custom,isSystemOperation:!0},[xc.FirmwareUpdate]:{key:xc.FirmwareUpdate,type:ds.Custom,isSystemOperation:!0,expectsNoResponse:!0}},Tc=e=>{const t=wc[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===cs.Setting)(t)||(t=>t.settingIndex===e.index)(t)))},Rc=()=>ea.connectionState===Ks.Pending,Nc=()=>ea.connectionState===Ks.Open,Dc={isConnecting:Ro(()=>Rc()),isConnected:Ro(()=>Nc())};let Ac=null,Oc=null;const Pc=e=>{ea.connectionState=e},Bc=async()=>{Fc();try{Nc()||Rc()||await Gc(),Uc();const e=Zp.currentRoute.value.matched.some(e=>"device"===e.name);if(1===ea.outputs.length&&!e){const e=ea.outputs[0].name.includes("OpenDeck DFU")?"device-firmware-update":"device";Zp.push({name:e,params:{outputId:ea.outputs[0].id}})}}catch(e){Qu.error("MIDI Connection watcher error",e)}Oc=setTimeout(Bc,500)},Fc=()=>{Oc&&(clearTimeout(Oc),Oc=null)},Uc=async()=>{ea.inputs=oa.inputs.filter(e=>e.name.includes("OpenDeck")&&!e.name.includes("BLE")),ea.outputs=oa.outputs.filter(e=>e.name.includes("OpenDeck")&&!e.name.includes("BLE"))},Vc=async e=>{await Gc();const t=oa.outputs.find(t=>t.id===e);if(!t)return Ys(250).then(()=>Vc(e));const n=oa.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]),Ys(1e3).then(()=>{i||(Qu.error("INITIAL HANDSHAKE TIMED OUT, RETRYING"),o("TIMED OUT"))})}).catch(()=>Vc(e.id)))(t,n):Ys(250).then(()=>Vc(e))},Gc=async()=>{if(oa.supported){if(ea.isWebMidiSupported=!0,Ac)return Ac;if(!oa.enabled)return Ac=qc(),Ac;Pc(Ks.Open)}},qc=async()=>new Promise((e,t)=>{if(oa.enabled)return Pc(Ks.Open),e();Pc(Ks.Pending),oa.enable((function(n){if(!n)return Uc(),Pc(Ks.Open),Ac=null,e();Qu.error("Failed to load WebMidi",n),t(n)}),!0)}),$c={state:ea,computed:Dc,actions:{loadMidi:Gc,matchInputOutput:Vc,assignInputs:Uc,findOutputById:e=>oa.outputs.find(t=>t.id===e),startMidiConnectionWatcher:()=>Bc(),stopMidiConnectionWatcher:Fc}},Hc=Fs($c);var jc,zc,Wc,Qc;(zc=jc||(jc={})).Info="info",zc.Midi="midi",zc.Request="request",zc.Error="error",(Qc=Wc||(Wc={})).Midi="midi",Qc.System="system";const Zc={[Wc.Midi]:!0},Xc={};Object.values(Bi).forEach(e=>{Xc[e]={}});const Yc=Ve({...{stack:[],highlights:Xc,logFilter:Zc,showRequestLog:!1,showHexValues:!1,suspendMidiLogs:!1},logFilter:Us("logFilter")||Zc,showRequestLog:Us("showRequestLog")||!1});var Kc,Jc,eu,tu;(Jc=Kc||(Kc={})).Closed="closed",Jc.Pending="pending",Jc.Open="open",(tu=eu||(eu={})).NotSupported="not_supported",tu.MissingIndex="missing_index",tu.UartInterfaceAllocated="uart_interface_allocated",tu.CdcInterfaceAllocated="cdc_interface_allocated";const nu=Xe({}),ou={activeRequestId:Xe(null),nextRequestId:100},ru=()=>{Gu(),ou.activeRequestId.value=null,ou.nextRequestId=100,nu.value={}},iu=e=>Mc[e],su=async e=>{const t=(ou.nextRequestId+=1,ou.nextRequestId);if(nu.value[t])return void zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_ID_CONFLICT,requestId:t});const{specialRequestId:n,isConnectionInfoRequest:o}=iu(e.command),r={...e,id:t,specialRequestId:n,state:hs.Pending,responseCount:0,time:{created:new Date,started:null,finished:null}};return nu.value[t]=r,zu.actions.addRequest(t),o||await ad(),ou.activeRequestId.value?void 0:au(t)},au=async e=>{Vu(!0);const t=nu.value[e];if(t)if(ou.activeRequestId.value)zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_ALREADY_ACTIVE,requestId:e});else try{const n=iu(t.command);n.isSystemOperation&&(bs.isSystemOperationRunning=!0),bs.output.sendSysex(Ti,Array.from(t.payload)),t.time.started=new Date,ou.activeRequestId.value=e,t.state=hs.Sent,n.expectsNoResponse?(ou.activeRequestId.value=null,t.state=hs.Done,t.promiseResolve()):t.command===xc.RestoreBackup&&Ys(2e3).then(()=>{t.state===hs.Sent&&du(t,ta.UI_QUEUE_REQ_TIMED_OUT)})}catch(e){du(t,ta.UI_QUEUE_REQUEST_SEND_ERROR)}else zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_DATA_MISSING,requestId:e})},lu=(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 Qs(a,c)||zu.actions.addError({errorCode:ta.UI_QUEUE_EMBEDED_RESPONSE_MISMATCH}),l.slice(a.length)})(e,t,n):o;s=js(r)}}catch(e){return void zu.actions.addError({errorCode:ta.UI_QUEUE_REQUEST_DECODE_ERROR,payload:o,error:e})}return t.parser?t.parser(s):s},cu=e=>{if((e=>{if(73!==Array.from(e)[6])return!1;const t=e[7],n=2===bs.valueSize?js(e.slice(8,10))[0]:e[8];return zu.actions.addInfo({block:t,index:n,payload:e}),!0})(e.data))return;if((e=>6===e.data.length&&Object.keys(gu).includes(String(e.data[4])))(e))return void zu.actions.addMidi({type:gu[e.data[4]],data:[e.data[4]]});const t=(()=>{const e=ou.activeRequestId.value;if(!e)return;const t=nu.value[e];return t||zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_NONE_ACTIVE,requestId:e}),t})();if(!t)return;if(t.state!==hs.Sent)return void zu.actions.addError({errorCode:ta.UI_QUEUE_REQ_NONE_ACTIVE,payload:e.data});t.responseCount++;const n=iu(t.command),{hasMultiPartResponse:o}=n,r=t.command===xc.Backup,i=2===bs.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===xc.Backup)return{messageStatus:1,messagePart:0,data:n};const o=n[4],r=n[5],i=n.slice(6,-1),{specialRequestId:s}=iu(t.command);return([1,2].includes(s)&&i.length||s&&2===bs.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 du(t,a);let u;r||(u=i?lu(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===xc.GetSectionValues&&126===l;return!o||p?uu(t,s,u):void 0},uu=(e,t,n)=>{const{messageStatus:o,messagePart:r,data:i}=t;e.state=hs.Done,e.responseData=i,e.parsed=n,e.messagePart=r,e.messageStatus=o,e.promiseResolve(),e.time.finished=new Date,pu()},du=(e,t)=>{e.state=hs.Error;const n=sa(t);if(e.errorMessage=n.description,e.promiseReject(n.code),zu.actions.addError({errorCode:n.code,requestId:e.id}),e.config){const n=Tc(e.config);n&&[ta.NOT_SUPPORTED].includes(t)&&ed(n,eu.NotSupported),n&&[ta.UART_INTERFACE_ALLOCATED].includes(t)&&ed(n,eu.UartInterfaceAllocated),n&&[ta.CDC_INTERFACE_ALLOCATED].includes(t)&&ed(n,eu.CdcInterfaceAllocated),n&&[ta.BLOCK,ta.SECTION,ta.INDEX].includes(t)&&ed(n,eu.MissingIndex)}pu()},pu=()=>{ou.activeRequestId.value=null;if(Object.values(nu.value).filter(e=>e.state===hs.Sent).length)return void logger.error("Cannot start next request, there are unfinished sent requests");const e=Object.values(nu.value).filter(e=>e.state===hs.Pending),t=e.length&&e[0].id;if(t)return au(t);Vu(!1)},hu=(e,t)=>{if([ds.Custom,ds.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,bs)},fu=async e=>{const{command:t,handler:n,config:o,payload:r}=e,i=iu(t);return new Promise((e,s)=>su({command:t,payload:r||hu(i,o),handler:n,config:o,promiseResolve:e,promiseReject:s}))},mu=e=>Array.isArray(e)?[240,0,83,67,...e,247]:[],Lu={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"},gu={1:"mmcstop",2:"mmcplay",6:"mmcrecordstart",7:"mmcrecordstop",9:"mmcpause"},bu=["clock","start","continue","stop","activesensing","reset"];var vu="object"==typeof global&&global&&global.Object===Object&&global,yu="object"==typeof self&&self&&self.Object===Object&&self,Iu=vu||yu||Function("return this")(),Cu=Iu.Symbol,Eu=Object.prototype,wu=Eu.hasOwnProperty,Su=Eu.toString,ku=Cu?Cu.toStringTag:void 0;var xu=Object.prototype.toString;var _u=Cu?Cu.toStringTag:void 0;function Mu(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_u&&_u in Object(e)?function(e){var t=wu.call(e,ku),n=e[ku];try{e[ku]=void 0;var o=!0}catch(e){}var r=Su.call(e);return o&&(t?e[ku]=n:delete e[ku]),r}(e):function(e){return xu.call(e)}(e)}function Tu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Ru=/^\s+|\s+$/g,Nu=/^[-+]0x[0-9a-f]+$/i,Du=/^0b[01]+$/i,Au=/^0o[0-7]+$/i,Ou=parseInt;function Pu(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]"==Mu(e)}(e))return NaN;if(Tu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Tu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ru,"");var n=Du.test(e);return n||Au.test(e)?Ou(e.slice(2),n?2:8):Nu.test(e)?NaN:+e}var Bu=function(){return Iu.Date.now()},Fu=Math.max,Uu=Math.min;const Vu=e=>{Yc.suspendMidiLogs=e},Gu=()=>{Yc.stack=[]},qu=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(L,t),u?h(e):s}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function L(){var e=Bu();if(m(e))return g(e);a=setTimeout(L,function(e){var n=t-(e-l);return d?Uu(n,i-(e-c)):n}(e))}function g(e){return a=void 0,p&&o?h(e):(o=r=void 0,s)}function b(){var e=Bu(),n=m(e);if(o=arguments,r=this,l=e,n){if(void 0===a)return f(l);if(d)return clearTimeout(a),a=setTimeout(L,t),h(l)}return void 0===a&&(a=setTimeout(L,t)),s}return t=Pu(t)||0,Tu(n)&&(u=!!n.leading,i=(d="maxWait"in n)?Fu(Pu(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,o=l=r=a=void 0},b.flush=function(){return void 0===a?s:g(Bu())},b}(()=>{Yc.stack.length>50&&(Yc.stack=Yc.stack.slice(0,50))},10,{leading:!0,maxWait:10,trailing:!1});function $u(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=Xs(e.getMinutes()),o=Xs(e.getSeconds()),r=e.getMilliseconds();return`${Xs(t)}:${n}:${o} ${r}`})(r);if(t===jc.Info){const e=Yc.highlights[n];if(!e)return void logger.error("Unknown highlight block with id "+n);e[o]=i}const a=t===jc.Midi?!Yc.logFilter[Wc.Midi]:!Yc.logFilter[Wc.System];if(!Yc.showRequestLog||a)return;let l=e.payload;l&&("string"==typeof l&&(l=l.split(",")),Array.isArray(l)||(l=Array.from(l))),Yc.stack.unshift({...e,id:$u(9),payload:l,time:r,timeString:s}),qu()},ju={clearRequestLog:Gu,getFilteredLogs:e=>Yc.stack.filter(e),addRequest:e=>{const t=nu.value[e],n=mu(t.payload),o=n&&Hs($s(n)),r=n&&Hs(n),i=mu((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&&Hs($s(i)),a=i&&Hs(i);Hu({type:jc.Request,requestId:e,dataHex:s,dataDec:a,payloadHex:o,payloadDec:r})},addInfo:e=>{const{payload:t}=e,n=t&&Hs($s(t)),o=t&&Hs(Array.from(t));Hu({type:jc.Info,...e,payloadHex:n,payloadDec:o})},addError:e=>{if(Hu({type:jc.Error,...e}),e.errorCode){const t=sa(e.errorCode);Qu.error(t.description,e.error)}else Qu.error(definition.message,e.error)},addMidi:e=>{if(Yc.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?Lu.noteon:Lu.noteoff:Lu[t],d=o&&Hs(i),p=o&&Hs($s(i)),h={label:u,type:jc.Midi,eventType:t,channel:n,dataHex:p,dataDec:d,value:s,controllerNumber:l,note:a,velocity:c};Hu(h)},toggleLogFilter:e=>{Yc.logFilter[e]=!Yc.logFilter[e],Vs("logFilter",Yc.logFilter)},toggleLog:()=>{Yc.showRequestLog=!Yc.showRequestLog,Vs("showRequestLog",Yc.showRequestLog)},toggleHexValues:()=>{Yc.showHexValues=!Yc.showHexValues,Vs("showHexValues",Yc.showHexValues)},setSuspendMidi:Vu},zu={state:Yc,actions:ju},Wu=Fs(zu),Qu={log:(...e)=>{$c.state.log&&console.log(...e)},warn:(...e)=>{$c.state.log&&console.warn(...e)},error:(e,t)=>{if($c.state.log&&(e&&console.error(e),t&&console.error(t),!t&&!e))throw new Error("Unknown error!")}},Zu=async(e,t)=>{const n={};let o=0;bs.systemOperationPercentage=1;const r=await(async e=>(await e.text()).split("\n").map(e=>e.split(" ").map(Gs)).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 Ys(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 bs.systemOperationPercentage=l>0?l:1,fu({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,bs.systemOperationPercentage=null,!s},Xu=["noteon","noteoff","controlchange","programchange","pitchbend","clock","start","continue","stop","activesensing","reset"],Yu=e=>{Xu.forEach(t=>e.removeListener(t,"all"))};let Ku=null;const Ju=e=>bs.unsupportedComponents[e.block][e.key],ed=(e,t)=>bs.unsupportedComponents[e.block][e.key]=t||!t,td=e=>{Object.assign(bs,e)},nd=async()=>{rd();try{if(!bs.outputId)return Zp.push({name:"home"});if(!await $c.actions.findOutputById(bs.outputId))return Zp.push({name:"home"})}catch(e){return Qu.error("Device connection watcher error",e),Zp.push({name:"home"})}Ku=setTimeout(()=>nd(),1e3)},od=()=>Ys(5e3).then(nd),rd=()=>{Ku&&(clearTimeout(Ku),Ku=null)},id=async e=>{const t=await $c.actions.matchInputOutput(e),{input:n,output:o,isBootloaderMode:r,valueSize:i}=t;if(bs.isBootloaderMode=r,bs.outputId=e,bs.input=n,bs.output=o,bs.valueSize=i,bs.valuesPerMessageRequest=null,bs.firmwareVersion=null,bs.input.removeListener("sysex","all"),bs.input.addListener("sysex","all",cu),Yu(bs.input),(e=>{Xu.forEach(t=>e.addListener(t,"all",zu.actions.addMidi))})(bs.input),r)return bs.boardName=o.name,bs.connectionState=Kc.Open,bs.connectionPromise=null,void od();await fu({command:xc.GetValuesPerMessage,handler:e=>td({valuesPerMessageRequest:e})}),await fu({command:xc.GetFirmwareVersion,handler:e=>td({firmwareVersion:e})}),bs.connectionState=Kc.Open,bs.connectionPromise=null,od(),await cd()},sd=async e=>{if("string"!=typeof e)throw new Error("MISSING OR INVALID DEVICE OUTPUT ID");return bs.connectionPromise||(bs.connectionState=Kc.Pending,bs.connectionPromise=id(e)),bs.connectionPromise},ad=async()=>{if(bs.connectionState!==Kc.Open){if(bs.connectionPromise)return bs.connectionPromise;if(bs.outputId)return sd(bs.outputId);throw new Error("CANNOT ENSURE CONNECTION, MISSING outputId")}},ld=async(e,t)=>(await fu({command:e,handler:t}),bs.connectionState=Kc.Closed,Ys(200).then(()=>Zp.push({name:"home"}))),cd=async()=>{await fu({command:xc.IdentifyBoard,handler:e=>{const t=(e=>aa.find(t=>Qs(t.id,e)||t.oldId&&Qs(t.oldId,e)))(e),n=t&&t.name||"Custom OpenDeck board",o=t&&t.firmwareFileName;td({boardName:n,firmwareFileName:o})}}),await fu({command:xc.GetNumberOfSupportedComponents,handler:e=>td({numberOfComponents:e})});try{2===bs.valueSize&&await fu({command:xc.GetBootLoaderSupport,handler:e=>td({bootLoaderSupport:e})})}catch(e){Qu.error("Error while checking for bootloader support, setting to false",e),td({bootLoaderSupport:!1})}await fu({command:xc.GetNumberOfSupportedPresets,handler:e=>td({supportedPresetsCount:e})})},ud=e=>!Ju(e),dd=e=>1===bs.valueSize||!e.isMsb,pd=(e,t)=>{if(!wc[e])throw new Error("Block definition not found in BlockMap "+e);const{sections:n}=wc[e];return Object.values(n).filter(e=>((e,t)=>e.type===t)(e,t)).filter(ud).filter(dd)},hd={setInfo:td,setViewSetting:(e,t)=>{t.itemsPerPage&&t.itemsPerPage!==bs.viewSettings[e].itemsPerPage&&(bs.viewSettings[e].currentPage=1),Object.assign(bs.viewSettings[e],t)},connectDevice:sd,closeConnection:()=>{rd(),(async()=>{ru(),bs.input&&(bs.input.removeListener("sysex","all"),Yu(bs.input)),Object.assign(bs,gs)})()},ensureConnection:ad,startUpdatesCheck:async e=>{const t=await fetch("https://api.github.com/repos/paradajz/OpenDeck/releases").then(e=>e.json()),n=bs.firmwareVersion;return t.filter(e=>e.name.length&&Os(e.name,n)).map(t=>({html_description:Ps(t.body,{headerIds:!1}),firmwareFileLink:t.assets.find(t=>t.name===e),...t}))},startBootLoaderMode:async()=>{await fu({command:xc.BootloaderMode,handler:()=>Qu.log("Bootloader mode started")})},startFactoryReset:async()=>{await ld(xc.FactoryReset,()=>Qu.log("Bootloader mode started"))},startReboot:async()=>{await ld(xc.Reboot,()=>Qu.log("Reboot mode started"))},startDeviceConnectionWatcher:od,stopDeviceConnectionWatcher:rd,startFirmwareUdate:async e=>{ru();const t=await Zu(e,xc.FirmwareUpdate);bs.isSystemOperationRunning=!1;alert(t?"Firmware update finished":"Firmware update finished with errors")},isControlDisabled:Ju,disableControl:ed,startBackup:async()=>{let e=0,t=null;const n=[];fu({command:xc.Backup,handler:o=>{e||(t=o);const r=e&&Qs(t,o),i=0===e;if(e+=1,i||r||n.push(o.map(qs).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","-");Bs.saveAs(e,`OpenDeckUI-Backup-${t}.sysex`)}return r}}).catch(e=>Qu.error("Failed to read component config",e))},startRestore:async e=>{await Zu(e,xc.RestoreBackup),bs.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 ad();const o={},r=pd(e,t).map(t=>{const{key:r,section:i,onLoad:s,settingIndex:a}=t,l="number"==typeof n?n:a;return fu({command:xc.GetValue,handler:e=>{const t=e[0];o[r]=t,s&&s(t)},config:{block:e,section:i,index:l}}).catch(e=>Qu.error("Failed to read component config",e))});return await Promise.all(r),o},setComponentSectionValue:async(e,t)=>fu({command:xc.SetValue,handler:t,config:e}),getSectionValues:async e=>{await ad();const t={},n=pd(e,cs.Value).map(n=>{const{key:o,section:r}=n;return fu({command:xc.GetSectionValues,handler:e=>(t[o]||(t[o]=[]),t[o].push(...e),!1),config:{block:e,section:r}}).catch(e=>Qu.error("Failed to read component config",e))});return await Promise.all(n),t},getFilteredSectionsForBlock:pd},fd=Ro(()=>bs.input&&bs.input.name),md=Ro(()=>bs.input&&bs.input.manufacturer),Ld=Ro(()=>bs.connectionState===Kc.Pending),gd=Ro(()=>bs.connectionState===Kc.Open),bd=Ro(()=>1===bs.valueSize),vd={state:bs,computed:{name:fd,manufacturer:md,isConnecting:Ld,isConnected:gd,showMsbControls:bd},actions:hd},yd=Fs(vd);var Id=No({name:"LogDataValue",props:{hex:{required:!0,type:String},dec:{required:!0,type:String}},setup(){const{showHexValues:e}=Wu;return{showHexValues:e}}});const Cd={class:"sysex-payload capitalize"},Ed=fn("sup",null,"Hex",-1),wd=fn("sup",null,"Dec",-1);Id.render=function(e,t,n,o,r,i){return an(),cn("span",Cd,[e.showHexValues?(an(),cn(en,{key:0},[Ln("[ "+l(e.hex)+" ] ",1),Ed],64)):(an(),cn(en,{key:1},[Ln("[ "+l(e.dec)+" ] ",1),wd],64))])};var Sd=No({name:"LogMidi",components:{LogDataValue:Id},props:{logEntry:{required:!0,type:Object}},setup:()=>({convertToHexString:$s,MidiEventTypeLabel:Lu,MidiRealtimeEvent:bu})});const kd={class:"border-b border-gray-800 last:border-b-0"},xd={class:"mr-2 text-yellow-300"},_d={key:0,class:"mr-2"},Md=fn("span",{class:"faded"},"channel",-1),Td={key:1,class:"mr-2"},Rd=fn("span",{class:"faded"},"value",-1),Nd={key:2,class:"mr-2"},Dd=fn("span",{class:"faded"},"controller",-1),Ad=fn("span",{class:"faded"},"value",-1),Od={key:3,class:"mr-2"},Pd=fn("span",{class:"faded"},"velocity",-1),Bd={key:4},Fd=fn("span",{class:"sysex-label faded"},"Raw data",-1);Sd.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",kd,[fn("strong",xd,[Ln(l(e.logEntry.label)+" ",1),null!=e.logEntry.note?(an(),cn(en,{key:0},[Ln(l(e.logEntry.note),1)],64)):bn("",!0)]),void 0!==e.logEntry.channel?(an(),cn("span",_d,[Md,Ln(" "+l(e.logEntry.channel),1)])):bn("",!0),void 0!==e.logEntry.value?(an(),cn("span",Td,[Rd,Ln(" "+l(e.logEntry.value),1)])):bn("",!0),void 0!==e.logEntry.controllerNumber?(an(),cn("span",Nd,[Dd,Ln(" "+l(e.logEntry.controllerNumber)+" ",1),Ad,Ln(" "+l(e.logEntry.velocity),1)])):bn("",!0),void 0!==e.logEntry.note?(an(),cn("span",Od,[Pd,Ln(" "+l(e.logEntry.velocity),1)])):bn("",!0),e.logEntry.dataDec&&e.logEntry.dataDec.length?(an(),cn("div",Bd,[Fd,fn(s,{hex:e.logEntry.dataHex,dec:e.logEntry.dataDec},null,8,["hex","dec"])])):bn("",!0)])};var Ud=No({name:"LogRequest",components:{LogDataValue:Id},props:{logEntry:{required:!0,type:Object},requestId:{required:!0,type:Number}},setup:e=>({request:Xe(nu.value[e.requestId]),getDefinitionLabel:e=>{const t=Tc(e);if(!t)return"";const n=t.type===cs.Value&&e.index?"# "+e.index:" - ";return`- ${Bi[e.block]} ${n} ${t&&t.label}`},getDifferenceInMs:Zs,convertToHexString:$s,RequestState:hs,Block:Bi})});const Vd={class:"activity request-request"},Gd={class:"request-command"},qd=Ln(". "),$d={class:"request-command"},Hd={key:0,class:"request-command"},jd={key:1,class:"request-config"},zd={class:"status"},Wd={key:0,class:"timing"},Qd=fn("span",{class:"status-label faded"},"in",-1),Zd={key:1,class:"timing"},Xd=fn("span",{class:"status-label faded"},"waited",-1),Yd={key:0},Kd=fn("span",{class:"sysex-label faded"},"Sent",-1),Jd={key:1},ep={class:""},tp=fn("span",{class:"sysex-label faded"},"Received",-1),np={key:0},op=fn("span",{class:"sysex-label faded"},"Parsed",-1),rp={key:2},ip=fn("span",{class:"sysex-label text-red-700"},"Error",-1),sp={class:"text-red-500"};Ud.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",Vd,[fn("span",{class:{"text-red-500":!!e.request.errorMessage}},[fn("strong",Gd,l(e.request.id),1),qd,fn("strong",$d,l(e.request.command),1),e.request.config?(an(),cn("strong",Hd,l(e.getDefinitionLabel(e.request.config)),1)):bn("",!0),e.request.config&&"number"==typeof e.request.config.value?(an(),cn("strong",jd,l(e.request.config.value),1)):bn("",!0)],2),fn("span",{class:["request-status",e.request.state]},[fn("span",zd,l(e.request.state),1),e.request.time.finished?(an(),cn("span",Wd,[Qd,fn("strong",null,l(e.getDifferenceInMs(e.request.time.finished,e.request.time.started))+"ms",1)])):bn("",!0),e.getDifferenceInMs(e.request.time.started,e.request.time.created)?(an(),cn("span",Zd,[Xd,fn("strong",null,l(e.getDifferenceInMs(e.request.time.started,e.request.time.created))+"ms",1)])):bn("",!0)],2),e.request.payload?(an(),cn("div",Yd,[Kd,fn(s,{dec:e.logEntry.payloadDec,hex:e.logEntry.payloadHex},null,8,["dec","hex"])])):bn("",!0),e.request.responseData?(an(),cn("div",Jd,[fn("div",ep,[tp,fn(s,{hex:e.logEntry.dataHex,dec:e.logEntry.dataDec},null,8,["hex","dec"])]),e.request.parsed?(an(),cn("div",np,[op,fn("span",null,l(e.request.parsed),1)])):bn("",!0)])):bn("",!0),e.request.errorMessage?(an(),cn("div",rp,[ip,fn("span",sp,l(e.request.errorMessage),1)])):bn("",!0)])};var ap=No({name:"LogInfo",components:{LogDataValue:Id},props:{logEntry:{required:!0,type:Object}},setup:()=>({Block:Bi,BlockMap:wc,convertToHexString:$s})});const lp={class:""},cp=fn("strong",{class:"mr-2 text-gray-400"},"Component info",-1),up={key:0},dp={key:1},pp={key:2},hp=fn("span",{class:"sysex-label faded"},"Raw data",-1);ap.render=function(e,t,n,o,r,i){const s=Zt("LogDataValue");return an(),cn("div",lp,[cp,e.logEntry.block?(an(),cn("strong",up,l(e.BlockMap[e.logEntry.block].title),1)):bn("",!0),Number.isInteger(e.logEntry.index)?(an(),cn("strong",dp," #"+l(e.logEntry.index),1)):bn("",!0),e.logEntry.payloadDec?(an(),cn("div",pp,[hp,fn(s,{dec:e.logEntry.payloadDec,hex:e.logEntry.payloadHex},null,8,["dec","hex"])])):bn("",!0)])};var fp=No({name:"ActivityError",props:{logEntry:{required:!0,type:Object}},setup:()=>({getErrorDefinition:sa})});const mp={class:"py-2 border-b border-gray-800 last:border-b-0"},Lp={key:0,class:"text-red-500 mr-4"},gp={key:1,class:"text-red-500 mr-2"},bp={class:"text-red-500"};fp.render=function(e,t,n,o,r,i){return an(),cn("div",mp,[e.logEntry.requestId?(an(),cn("strong",Lp,"Request "+l(e.logEntry.requestId),1)):bn("",!0),e.logEntry.errorCode?(an(),cn("strong",gp,"Error Code "+l(e.logEntry.errorCode),1)):bn("",!0),fn("span",bp,l(e.logEntry.message)+" "+l(e.logEntry.errorCode&&e.getErrorDefinition(e.logEntry.errorCode).description),1)])};var vp=No({name:"RequestLogTableRow",components:{LogMidi:Sd,LogRequest:Ud,LogInfo:ap,LogError:fp},props:{logEntry:{required:!0,type:Object}},setup:()=>({LogType:jc})});const yp={class:"w-2/12 text-right"},Ip={class:"w-8/12"};vp.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",yp,l(e.logEntry.timeString),1),fn("td",Ip,[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"]):bn("",!0)])],2)};var Cp=No({name:"RequestLogTable",components:{RequestLogTableRow:vp},setup:()=>({stack:Wu.stack})});const Ep={key:0,class:"table-auto mb-0 request-table"},wp=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),Sp={class:"table-body"};Cp.render=function(e,t,n,o,r,i){const s=Zt("RequestLogTableRow");return e.stack.length?(an(),cn("table",Ep,[wp,fn("tbody",Sp,[(an(!0),cn(en,null,Ao(e.stack,e=>(an(),cn(s,{key:e.id,"log-entry":e},null,8,["log-entry"]))),128))])])):bn("",!0)};var kp=No({name:"RequestLog",components:{RequestLogTable:Cp},setup:()=>({clear:()=>{Wu.clearRequestLog(),Object.keys(nu.value).forEach(e=>{const t=Number(e),n=nu.value[t];[hs.Done,hs.Error].includes(n.state)&&delete nu.value[t]})},LogType:jc,LogFilter:Wc,...Wu})});const xp={class:"request-log section"},_p={class:"section-heading clearfix"},Mp={class:"section-heading-inner"},Tp=fn("span",{class:"mr-6"},"Activity",-1),Rp={key:1,class:"float-right mt-1 clearfix"},Np={class:"inline-block mr-6"},Dp=Ln(" hex "),Ap={class:"request-log-main"};kp.render=function(e,t,n,o,r,i){const s=Zt("FormToggle"),a=Zt("RequestLogTable");return an(),cn("div",xp,[fn("div",_p,[fn("h3",Mp,[Tp,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 ")):bn("",!0),e.showRequestLog?(an(),cn("span",Rp,[fn("span",Np,[fn(s,{value:e.showHexValues,class:"toggle-sm labeled",onChanged:e.toggleHexValues},{default:$t(()=>[Dp]),_: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(()=>[Ln(l(t),1)]),_:2},1032,["value","onChanged"])]))),128))])):bn("",!0)])]),fn("div",Ap,[e.showRequestLog?fn(a,{key:0,class:"w-full"}):bn("",!0)])])};var Op=No({name:"DeviceNavItem",props:{block:{type:Number,required:!0},params:{type:Object,default:void 0}},setup(e){const{title:t,iconComponent:n,routeName:o}=wc[e.block],{numberOfComponents:r}=yd,{highlights:i}=Wu,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(()=>Zp.currentRoute.value.matched.some(e=>e.name===o));return{...ca(s),numberOfComponents:r,active:a,title:t,iconComponent:n,routeName:o}}});const Pp={class:"icon-wrapper"},Bp={key:0,class:"icon-label"},Fp={class:"lg:inline-block text-sm label"},Up=fn("br",null,null,-1);Op.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",Pp,[(an(),cn(Yt(e.iconComponent))),e.numberOfComponents[e.block]?(an(),cn("span",Bp,l(e.numberOfComponents[e.block]),1)):bn("",!0)]),fn("span",Fp,l(e.title),1),Up]),_:1},8,["to","class"])};var Vp=No({name:"DeviceNav",components:{DeviceNavItem:Op},setup(){const{outputId:e,isConnected:t}=yd;return{BlockMap:wc,isConnected:t,outputId:e}}});const Gp={key:0,class:"device-nav"};Vp.render=function(e,t,n,o,r,i){const s=Zt("DeviceNavItem");return e.isConnected?(an(),cn("div",Gp,[(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))])):bn("",!0)};var qp=No({name:"Device",components:{RequestLog:kp,DeviceNav:Vp},setup(){const{connectDevice:e,isConnected:t,isConnecting:n,isSystemOperationRunning:o,systemOperationPercentage:r,isBootloaderMode:i}=yd;return An(async()=>{try{if(await e(Zp.currentRoute.value.params.outputId),i.value)return Zp.push({name:"device-firmware-update"})}catch(e){Qu.error(e)}}),{isConnected:t,isConnecting:n,isBootloaderMode:i,isSystemOperationRunning:o,systemOperationPercentage:r}}});const $p={key:1,class:"relative"};qp.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",$p,[e.isBootloaderMode?bn("",!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}):bn("",!0)])):fn(a,{key:2,custom:"h-64",title:"No WebMidi device found."}),fn(d)],64)};var Hp=No({name:"DeviceSelect",setup:()=>(An(()=>{Hc.assignInputs(),Hc.startMidiConnectionWatcher(),yd.closeConnection()}),{outputs:Hc.outputs})});const jp={class:"surface-neutral border px-8 pt-6 rounded"},zp=fn("br",null,null,-1);Hp.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",jp,[(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),zp,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 Wp=[{name:"home",path:"/",component:Hp},{path:"/device/:outputId",name:"device",component:qp,redirect:{name:"device-global"},children:kc}];var Qp;const Zp=function(e){const t=Qr(e.routes,e);let n=e.parseQuery||mi,o=e.stringifyQuery||Li,{scrollBehavior:r}=e,i=e.history;const s=bi(),a=bi(),l=bi(),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=mr(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:mr(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===Li?gi(e.query):e.query},a,{redirectedFrom:void 0,href:f})}function m(e){return"string"==typeof e?{path:e}:dr({},e)}function L(e,t){if(u!==e)return Ur(8,{from:t,to:e})}function g(e){return b(e)}function b(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=m("function"==typeof e?e(n):e);return b(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])&&br(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=>Vr(e,14)?e:M(e)).then(e=>{if(e){if(Vr(e,2))return b(dr(m(e.to),{state:i,force:s,replace:a}),t||d)}else e=C(d,r,!0,a,i);return I(d,r,e),e})}function v(e,t){const n=L(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(vi(o,e,t));const i=v.bind(null,e,t);return n.push(i),ki(n).then(()=>{n=[];for(const o of s.list())n.push(vi(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(vi(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(vi(r,e,t));else n.push(vi(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(vi(o,e,t));return n.push(i),ki(n)}).catch(e=>Vr(e,8)?e:Promise.reject(e))}function I(e,t,n){for(const o of l.list())o(e,t,n)}function C(e,t,n,o,r){const s=L(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 E;function w(){E=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=>Vr(e,12)?e:Vr(e,2)?(n.delta&&i.go(-n.delta,!1),b(e.to,o).catch(hr),Promise.reject()):(n.delta&&i.go(-n.delta,!1),M(e))).then(e=>{(e=e||C(o,r,!1))&&n.delta&&i.go(-n.delta,!1),I(o,r,e)}).catch(hr)})}let S,k,x=bi(),_=bi();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(m(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",Ci),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,Ve(t));let n=e.unmount;D.add(e),e.unmount=function(){D.delete(e),D.size<1&&(E(),c.value=Pr,k=!1,S=!1),n.call(this,arguments)}}}}({history:((Qp=location.host&&Qp||location.pathname).indexOf("#")<0&&(Qp+="#"),Ar(Qp)),routes:[...Wp]});var Xp=No({name:"Chevron",props:{type:{type:String,default:"left",validate:e=>["left","right"].includes(e)}}});const Yp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Kp={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"},Jp={key:1,d:"M7.05 9.293L6.343 10 12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z"};Xp.render=function(e,t,n,o,r,i){return an(),cn("svg",Yp,["right"===e.type?(an(),cn("path",Kp)):(an(),cn("path",Jp))])};var eh=No({name:"Hero",props:{title:{type:String,default:null},custom:{type:String,default:""}}});const th={class:"max-w-sm mx-auto flex-1 align-middle"};eh.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",th,l(e.title),1)])],2)};var nh=No({name:"Button",props:{disabled:{default:!1,type:Boolean}}});nh.render=function(e,t,n,o,r,i){return an(),cn("button",{disabled:e.disabled,class:"btn"},[qt(e.$slots,"default")],8,["disabled"])};var oh=No({name:"ButtonLink",props:{to:{required:!0,type:[Object,Boolean]}}});oh.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 rh=No({name:"Section",props:{title:{type:String,default:null},showContent:{type:Boolean,default:!0},wide:{type:Boolean,default:!1}}});const ih={key:0,class:"section-heading"},sh={class:"section-heading-inner"},ah={key:0,class:"section-content"};rh.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",ih,[fn("div",sh,l(e.title),1)])):bn("",!0)]),e.showContent?(an(),cn("div",ah,[qt(e.$slots,"default")])):bn("",!0)],2)};var lh=No({name:"Spinner",props:{name:{default:"",type:String},type:{default:"number",type:String}}});const ch=Qt("data-v-1e6cca72");zt("data-v-1e6cca72");const uh={class:"spinner"},dh=fn("div",{class:"bounce1"},null,-1),ph=fn("div",{class:"bounce2"},null,-1),hh=fn("div",{class:"bounce3"},null,-1);Wt();const fh=ch((function(e,t,n,o,r,i){return an(),cn("div",uh,[dh,ph,hh])}));lh.render=fh,lh.__scopeId="data-v-1e6cca72";var mh=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 Lh=fn("small",null,"previous",-1),gh=fn("small",null,"next",-1);mh.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"}),Lh]),_:1},8,["class","to"]):bn("",!0),e.total&&e.current[gh,fn(s,{type:"right",class:"inline fill-current h-6 w-6"})]),_:1},8,["class","to"]):bn("",!0)],64)};var bh=No({name:"ProgressBar",props:{percentage:{type:Number,default:0}}});const vh={class:"absolute flex inset-0 bg-gray-900"},yh={class:"flex-1 rounded h-6 top-auto self-center opacity-100 justify-center mx-auto max-w-sm bg-gray-600"};bh.render=function(e,t,n,o,r,i){return an(),cn("div",vh,[fn("div",yh,[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 Ih=No({name:"SpinnerOverlay"});const Ch={class:"absolute flex inset-0 opacity-75 bg-gray-900"};Ih.render=function(e,t,n,o,r,i){const s=Zt("Spinner");return an(),cn("div",Ch,[fn(s,{class:"self-center"})])};const Eh=e=>t=>Number(t)t=>Number(t)>e?"Maximum value is "+e:null;var Sh=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}}});Sh.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 kh=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 xh=fn("span",{class:"toggle-track"},null,-1);kh.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"]),xh]),fn("span",{class:"toggle-label",onClick:t[2]||(t[2]=(...t)=>e.toggle(...t))},[qt(e.$slots,"default")])],2)};var _h=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})});_h.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 Mh=No({name:"FormErrorDisplay",props:{errors:{required:!0,type:Array}}});const Th={class:"errors"};Mh.render=function(e,t,n,o,r,i){return an(),cn("div",Th,[(an(!0),cn(en,null,Ao(e.errors,(e,t)=>(an(),cn("div",{key:t},l(e),1))),128))])};const Rh=e=>{const t=[e=>null==e?"Value is required":null];switch(e.component){case _i.Toggle:t.push(Eh(0),wh(1));break;case _i.Input:if(void 0!==e.min&&t.push(Eh(e.min)),void 0!==e.max){let n=e.max2Byte&&yd.showMsbControls?e.max2Byte:e.max;t.push(wh(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 Nh=No({name:"FormField",components:{FormSelect:Sh,FormInput:_h,FormToggle:kh,FormErrorDisplay:Mh},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,m=e.fieldDefinition.settingIndex,L=Ro(()=>yd.isControlDisabled(e.fieldDefinition)),g=tt(e).value,b=Rh(e.fieldDefinition),{input:v,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,b,n=>{Number(n)!==g.value&&t("modified",{key:r,value:Number(n),section:i,settingIndex:m,index:e.index,onLoad:f})}),C={label:s,helpText:a,name:r};o===_i.Select&&(C.options=h);const{showMsbControls:E}=yd;return{fieldComponent:e.fieldDefinition.component,showMsbControls:E,componentProps:C,emit:t,input:v,errors:y,onValueChange:I,label:s,helpText:a,isDisabled:L,isMsb:l,isLsb:c,min:u,max:d,max2Byte:p,ControlDisableType:eu}}});const Dh={class:"label"},Ah={key:0,class:"instructions"},Oh={key:1,class:"error-message text-red-500"},Ph=Ln(" Not supported on this device. "),Bh=Ln(" Not supported on this firmware. "),Fh=Ln(" The UART interface on board required for this peripheral is already taken by another peripheral. "),Uh=Ln(" CDC interface on board required for this peripheral is already taken by another peripheral. "),Vh={key:2,class:"help-text"};Nh.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",Dh,[Ln(l(!e.showMsbControls&&e.isLsb?e.label.replace("(LSB)","").replace("LSB",""):e.label)+" ",1),e.isDisabled||!e.min&&!e.max?bn("",!0):(an(),cn("small",Ah,l(e.min)+" - "+l(!e.showMsbControls&&e.max2Byte||e.max),1))]),e.isDisabled?(an(),cn("p",Oh,[e.isDisabled===e.ControlDisableType.NotSupported?(an(),cn(en,{key:0},[Ph],64)):bn("",!0),e.isDisabled===e.ControlDisableType.MissingIndex?(an(),cn(en,{key:1},[Bh],64)):bn("",!0),e.isDisabled===e.ControlDisableType.UartInterfaceAllocated?(an(),cn(en,{key:2},[Fh],64)):bn("",!0),e.isDisabled===e.ControlDisableType.CdcInterfaceAllocated?(an(),cn(en,{key:3},[Uh],64)):bn("",!0)])):(an(),cn(Yt(e.fieldComponent),Cn({key:0,value:e.input},e.componentProps,{onChanged:e.onValueChange}),null,16,["value","onChanged"])),e.helpText&&!e.simpleLayout?(an(),cn("p",Vh,l(!e.showMsbControls&&e.helpText?e.helpText.replace("(LSB)","").replace("LSB",""):e.helpText),1)):bn("",!0),fn(s,{class:"error-message",errors:e.errors},null,8,["errors"])],2)):bn("",!0)};var Gh=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 qh={class:""};Gh.render=function(e,t,n,o,r,i){return an(),cn("label",{class:["btn items-center",{disabled:e.disabled}]},[fn("span",qh,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 $h={Chevron:Xp,Hero:eh,Button:nh,ButtonLink:oh,Section:rh,Spinner:lh,Siblinks:mh,SpinnerOverlay:Ih,FormField:Nh,FormToggle:kh,FormFileInput:Gh,ProgressBar:bh},Hh=No({name:"DeviceSettings",props:{block:{type:Number,required:!0},title:{type:String,default:"Global"}},setup:e=>({...la(e.block,cs.Setting)})});const jh={key:0,class:"absolute flex inset-0 opacity-75 bg-gray-900"},zh={class:"form-grid"};Hh.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",jh,[fn(s,{class:"self-center"})])):bn("",!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",zh,[(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"]):bn("",!0)],64))),256))])]),_:1},8,["title"])])],32)};var Wh={Device:qp,DeviceForm:ba,DeviceGrid:_a,DeviceGridButton:Sa,DeviceNav:Vp,DeviceNavItem:Op,DeviceSettings:Hh},Qh=No({name:"App",setup(){const{outputId:e,boardName:t,firmwareVersion:n,activePreset:o}=yd,r=Ro(()=>"home"===Zp.currentRoute.value.name),{isConnected:i,isConnecting:s,isWebMidiSupported:a}=Hc,{supportedPresetsCount:l,isBootloaderMode:c}=yd;return An(()=>{Hc.loadMidi()}),Fn(()=>{Hc.stopMidiConnectionWatcher()}),{isHomePage:r,outputId:e,isWebMidiSupported:a,isConnected:i,isConnecting:s,boardName:t,firmwareVersion:n,activePreset:o,supportedPresetsCount:l,isBootloaderMode:c}}});const Zh={class:"app"},Xh={class:"app-header"},Yh=Ln(" OpenDeck Configurator "),Kh={key:0,class:"app-board-info"},Jh=Ln("OpenDeck DFU mode"),ef=fn("small",null,"Board",-1),tf=fn("small",null,"Firmware",-1),nf=fn("small",null,"Preset",-1),of={class:"app-main"},rf={class:"content"},sf=fn("div",{class:"max-w-screen-sm mx-auto px-4 pt-24 sm:px-6 lg:px-8"},[fn("p",{class:""},[Ln(" This browser does not support WebMIDI."),fn("br"),Ln("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),af=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),lf={class:"absolute flex inset-0 opacity-75 bg-gray-900"},cf=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),uf=gn('',1);Qh.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",Zh,[fn("nav",Xh,[fn(s,{to:{name:"home"},class:"app-brand"},{default:$t(()=>[Yh]),_:1}),!e.isHomePage&&e.boardName?(an(),cn("span",Kh,[e.isBootloaderMode?(an(),cn(en,{key:0},[Jh],64)):(an(),cn(en,{key:1},[ef,fn("strong",null,l(e.boardName),1),null!==e.firmwareVersion?(an(),cn(en,{key:0},[tf,fn("strong",null,l(e.firmwareVersion),1)],64)):bn("",!0),e.supportedPresetsCount>1?(an(),cn(en,{key:1},[nf,fn("strong",null,l(e.activePreset+1),1)],64)):bn("",!0)],64))])):bn("",!0)]),fn("div",of,[fn("div",rf,[e.isWebMidiSupported?e.isConnecting?fn(a,{key:1,class:"h-screen",title:"Establishing connection"},{default:$t(()=>[af,fn("div",lf,[fn(c,{class:"self-center"})])]),_:1}):e.isConnected?fn(u,{key:3}):fn(a,{key:2,class:"h-screen",title:"Problem connecting"},{default:$t(()=>[cf]),_:1}):fn(a,{key:0,class:"h-screen"},{default:$t(()=>[sf]),_:1})])]),uf])};const df=e=>Object.keys(e).forEach(t=>{pf.component(t,e[t])}),pf=((...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})(Qh);df($h),df(Wh),pf.use(Zp),pf.mount("#app");
diff --git a/index.html b/index.html
index 528a441..a480898 100644
--- a/index.html
+++ b/index.html
@@ -13,7 +13,7 @@
-
+