summaryrefslogtreecommitdiffhomepage
path: root/LayerEditorTab.e38d2b555b5ba12e6a54.js
blob: 46a0ed6dd553d78d381bbe1b711ca68ba44197ed (plain)
1
2
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[6793],{72054:function(n,e,r){"use strict";r.d(e,{Z:function(){return O}});var t=r(94184),o=r.n(t),i=r(67294),a=r(45697),l=r.n(a),c=r(93379),s=r.n(c),u=r(7795),A=r.n(u),d=r(90569),p=r.n(d),f=r(3565),y=r.n(f),b=r(19216),m=r.n(b),g=r(44589),h=r.n(g),v=r(56634),C={};C.styleTagTransform=h(),C.setAttributes=y(),C.insert=p().bind(null,"head"),C.domAPI=A(),C.insertStyleElement=m(),s()(v.Z,C);var x=v.Z&&v.Z.locals?v.Z.locals:void 0,E=r(21517),j=r(64261),B=r(62092),w=r(85893);function S(n){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},S(n)}function k(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function O(n){var e,r,t,a,l,c=n.actions,s=(e=(0,j.X)(),r=4,function(n){if(Array.isArray(n))return n}(e)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,r)||function(n,e){if(n){if("string"==typeof n)return k(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(n,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],A=s[2],d=s[3],p=(0,i.useRef)();return(0,E.Z)(p,A),(0,w.jsxs)("div",{ref:p,className:x.wrapper,children:[(0,w.jsx)(B.Z,{className:x.button,onClick:d,icon:"ellipsis"}),(0,w.jsx)("div",{className:o()(x.menu,(t={},a=x.open,l=u,(a=function(n){var e=function(n,e){if("object"!==S(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==S(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===S(e)?e:String(e)}(a))in t?Object.defineProperty(t,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[a]=l,t)),children:(0,w.jsx)("ul",{children:c.map((function(n,e){return(0,w.jsx)("li",{onClick:function(){return function(n){A(),n()}(n.callback)},children:n.content},e)}))})})]})}O.propTypes={actions:l().arrayOf(l().shape({callback:l().func.isRequired,content:l().oneOfType([l().node,l().string]).isRequired})).isRequired}},97494:function(n,e,r){"use strict";r.d(e,{Z:function(){return w}});var t=r(45697),o=r.n(t),i=r(93379),a=r.n(i),l=r(7795),c=r.n(l),s=r(90569),u=r.n(s),A=r(3565),d=r.n(A),p=r(19216),f=r.n(p),y=r(44589),b=r.n(y),m=r(33988),g={};g.styleTagTransform=b(),g.setAttributes=d(),g.insert=u().bind(null,"head"),g.domAPI=c(),g.insertStyleElement=f(),a()(m.Z,g);var h=m.Z&&m.Z.locals?m.Z.locals:void 0,v=r(85893);function C(n){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},C(n)}var x=["validator","required","value"];function E(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function j(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){B(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function B(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==C(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==C(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===C(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function w(n){var e=n.validator,r=n.required,t=void 0!==r&&r,o=n.value,i=void 0===o?"":o,a=function(n,e){if(null==n)return{};var r,t,o=function(n,e){if(null==n)return{};var r,t,o={},i=Object.keys(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,x),l=e(i)||!i&&t&&"cannot be empty";return(0,v.jsxs)("span",{className:h.wrapper,children:[(0,v.jsx)("input",j({type:"text",value:i},a)),l&&(0,v.jsx)("span",{className:h.error,children:l})]})}w.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},58887:function(n,e,r){"use strict";r.d(e,{Z:function(){return A}});var t=r(94184),o=r.n(t),i=r(86322),a=r(91118),l=r(48118),c=r(85893);function s(n){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},s(n)}function u(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==s(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==s(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===s(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function A(n){var e=n.keyPositions;return(0,c.jsx)(i.i,{bindings:[],renderKey:function(n){var r,t=n.index;return(0,c.jsx)(a.Z,{selectable:!1,themeClass:o()((r={},u(r,l.Z.key,!0),u(r,l.Z.highlight,e.includes(t)),r),l.Z.keyMini)})}})}},77593:function(n,e,r){"use strict";r.d(e,{Z:function(){return C},l:function(){return x}});var t=r(78718),o=r.n(t),i=r(45697),a=r.n(i),l=r(67294),c=r(39316),s=r(95872),u=r(94995),A=r(85893);function d(n){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},d(n)}var p=["keyLayout","renderOptions","children"];function f(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function y(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){b(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function b(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==d(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===d(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}var m=function(n){return o()(n,["x","y"])},g=function(n){return{x:n.rx,y:n.ry,a:n.r}},h=function(n){var e=n.w,r=void 0===e?1:e,t=n.u,o=void 0===t?r:t,i=n.h;return{u:o,h:void 0===i?1:i}},v=(0,l.createContext)({});function C(n){var e=n.keyLayout,r=n.renderOptions,t=n.children,o=function(n,e){if(null==n)return{};var r,t,o=function(n,e){if(null==n)return{};var r,t,o={},i=Object.keys(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t<i.length;t++)r=i[t],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,p),i=m(e),a=g(e),u=h(e),d=(0,c.Pi)(i,u,a,r),f=(0,l.useRef)();return(0,A.jsx)("div",y(y({ref:f,className:s.Z.placer,style:d,"data-u":u.u,"data-h":u.h},o),{},{children:(0,A.jsx)(v.Provider,{value:{position:i,rotation:a,size:u,ref:f},children:t})}))}function x(){return(0,l.useContext)(v)}C.propTypes={scale:a().number,keyLayout:u.v.isRequired},C.defaultProps={scale:1}},86322:function(n,e,r){"use strict";r.d(e,{Z:function(){return b},i:function(){return m}});var t=r(45697),o=r.n(t),i=r(67294),a=r(77593),l=r(94995),c=r(20817),s=r(39316),u=r(85893);function A(n){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},A(n)}function d(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function p(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function f(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){y(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function y(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==A(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==A(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===A(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function b(n){var e,r,t,o,l,A=n.layout,p=n.renderKey,f=n.renderOptions,y=(0,i.useContext)(c.VY),b=y.layout,m=y.layoutBbox,g=(o=(0,i.useState)(window.innerWidth-121),l=2,r=(e=function(n){if(Array.isArray(n))return n}(o)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(o,l)||function(n,e){if(n){if("string"==typeof n)return d(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(n,e):void 0}}(o,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],t=e[1],(0,i.useEffect)((function(){function n(){t(window.innerWidth-121)}return window.addEventListener("resize",n),function(){return window.removeEventListener("resize",n)}}),[t]),r),h=m.max.x-m.min.x,v=f?f.keySize/s.Cg:1,C=1===v?Math.max(.5,Math.min(1,g/h)):n.scale,x=A||b,E=(0,i.useMemo)((function(){return{width:"".concat(C*v*(m.max.x-m.min.x),"px"),height:"".concat(C*v*(m.max.y-m.min.y),"px")}}),[C,v,m]),j=(0,i.useMemo)((function(){return{transform:"scale(".concat(C,")"),transformOrigin:0}}),[C]);return(0,u.jsx)("div",{style:E,children:(0,u.jsx)("div",{style:j,children:x.map((function(n,e){return(0,u.jsx)(a.Z,{keyLayout:n,renderOptions:f,children:p({index:e,keyLayout:n})},e)}))})})}function m(n){var e=(0,c.Z7)().renderOptions;return(0,u.jsx)(b,f(f({},n),{},{renderOptions:e}))}b.propTypes={layout:l.bK,renderKey:o().func.isRequired,scale:o().number},b.defaultProps={scale:1}},50062:function(n,e,r){"use strict";r.r(e),r.d(e,{default:function(){return _e}});var t={};r.r(t),r.d(t,{colemak:function(){return Wn},colemakModDh:function(){return Qn},dvorak:function(){return Fn},options:function(){return Rn},qwerty:function(){return Mn}});var o=r(95998),i=r(67294),a=r(97494),l=r(64261),c=r(96186),s=r(93379),u=r.n(s),A=r(7795),d=r.n(A),p=r(90569),f=r.n(p),y=r(3565),b=r.n(y),m=r(19216),g=r.n(m),h=r(44589),v=r.n(h),C=r(59500),x={};x.styleTagTransform=v(),x.setAttributes=b(),x.insert=f().bind(null,"head"),x.domAPI=d(),x.insertStyleElement=g(),u()(C.Z,x);var E=C.Z&&C.Z.locals?C.Z.locals:void 0,j=r(62417),B=r(27926),w=r(80736),S=r(85893);function k(n){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},k(n)}function O(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function P(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?O(Object(r),!0).forEach((function(e){T(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function T(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==k(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==k(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===k(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function Z(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var I=function(n){var e,r,t,s=n.layerIndex,u=n.onClose,A=(0,o.I0)(),d=(0,o.v9)(w.vl)[s],p=(r=(0,i.useState)({name:d.name,label:(null===(e=d.properties.label)||void 0===e?void 0:e.parsed)||""}),t=2,function(n){if(Array.isArray(n))return n}(r)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(r,t)||function(n,e){if(n){if("string"==typeof n)return Z(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(n,e):void 0}}(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=p[0],y=p[1],b=!(0,j.Gk)(f.name);return(0,S.jsx)(l.Z,{onDismiss:u,children:(0,S.jsxs)(c.Z,{dismissText:"",children:[(0,S.jsxs)("h2",{children:["Customize Layer ",(0,S.jsx)("code",{children:d.name})]}),(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{className:E.field,children:[(0,S.jsx)("label",{htmlFor:"customize-layer-name",children:"Name"}),(0,S.jsx)(a.Z,{id:"customize-layer-name",placeholder:"Default",value:f.name,validator:j.Gk,onChange:function(n){return y((function(e){return P(P({},e),{},{name:n.target.value})}))}})]}),(0,S.jsxs)("div",{className:E.field,children:[(0,S.jsx)("label",{htmlFor:"customize-layer-label",children:"Label"}),(0,S.jsx)("input",{id:"customize-layer-label",placeholder:"Default",value:f.label,onChange:function(n){return y((function(e){return P(P({},e),{},{label:n.target.value})}))}})]})]}),(0,S.jsxs)("div",{style:{textAlign:"center",gap:"5px"},children:[(0,S.jsx)(B.Z,{onClick:function(){A((0,w.vc)(P({layerIndex:s},f))),u()},disabled:!b,children:"OK"}),(0,S.jsx)(B.Z,{onClick:u,secondary:!0,children:"Cancel"})]})]})})},D=r(45697),L=r.n(D),U=r(72054);function Y(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function q(n){var e,r=n.layerIndex,t=n.additionalActions,a=void 0===t?[]:t,l=(0,o.I0)(),c=(0,i.useMemo)((function(){return{transparentToKeypress:function(){return l((0,w.c7)({layerIndex:r}))},transparentToNone:function(){return l((0,w.sT)({layerIndex:r}))},noneToKeypress:function(){return l((0,w.UH)({layerIndex:r}))},noneToTransparent:function(){return l((0,w.v1)({layerIndex:r}))},emptyKeypressToTransparent:function(){return l((0,w.QR)({layerIndex:r}))},emptyKeypressToNone:function(){return l((0,w.En)({layerIndex:r}))}}}),[l,r]);return(0,S.jsx)(U.Z,{actions:[].concat((e=a,function(n){if(Array.isArray(n))return Y(n)}(e)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(e)||function(n,e){if(n){if("string"==typeof n)return Y(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(n,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[{callback:c.transparentToKeypress,content:(0,S.jsxs)(S.Fragment,{children:["Convert ",(0,S.jsx)("code",{children:"&trans"})," to ",(0,S.jsx)("code",{children:"&kp"})]})},{callback:c.transparentToNone,content:(0,S.jsxs)(S.Fragment,{children:["Convert ",(0,S.jsx)("code",{children:"&trans"})," to ",(0,S.jsx)("code",{children:"&none"})]})},{callback:c.noneToKeypress,content:(0,S.jsxs)(S.Fragment,{children:["Convert ",(0,S.jsx)("code",{children:"&none"})," to ",(0,S.jsx)("code",{children:"&kp"})]})},{callback:c.noneToTransparent,content:(0,S.jsxs)(S.Fragment,{children:["Convert ",(0,S.jsx)("code",{children:"&none"})," to ",(0,S.jsx)("code",{children:"&trans"})]})},{callback:c.emptyKeypressToTransparent,content:(0,S.jsxs)(S.Fragment,{children:["Convert ",(0,S.jsx)("code",{children:"&kp ⦸"})," to ",(0,S.jsx)("code",{children:"&trans"})]})},{callback:c.emptyKeypressToNone,content:(0,S.jsxs)(S.Fragment,{children:["Convert ",(0,S.jsx)("code",{children:"&kp ⦸"})," to ",(0,S.jsx)("code",{children:"&none"})]})}])})}q.propTypes={layerIndex:L().number.isRequired,additionalActions:L().arrayOf(L().shape({callback:L().func.isRequired,content:L().oneOfType([L().node,L().string]).isRequired}))};var K=r(86322),N=r(82607),R=r(61953),M=r(41051),W=r(80031);function Q(){return(0,S.jsxs)("div",{style:{maxWidth:"600px",margin:"0 auto"},children:[(0,S.jsxs)("h3",{children:[(0,S.jsx)(M.Z,{name:"warning"})," ",(0,S.jsx)("span",{children:"No bindings defined"})]}),(0,S.jsxs)("p",{children:["Usually this is a parsing issue; either this layer in your keymap does not have a ",(0,S.jsx)("code",{children:"bindings"})," property, or there's a syntax problem preventing it from being parsed."]}),(0,S.jsxs)("p",{children:["You should go back and verify that the syntax looks correct before attempting to make changes in the app. (Sometimes the bindings array is missing the ",(0,S.jsx)("code",{children:">;"})," at the end)"]}),W.t6]})}var F=r(76106),H=r(94596),z=r(80671),V=r(58887),X=r(91118);function _(n){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_(n)}function G(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function J(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?G(Object(r),!0).forEach((function(e){$(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function $(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==_(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==_(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===_(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function nn(n){return(0,S.jsx)(z.Z,J(J({},n),{},{Heading:en}))}function en(n){var e=n.bindingIndex,r=n.bindTree;return(0,S.jsxs)("div",{className:H.Z.keyBindingHeader,children:[(0,S.jsx)(V.Z,{keyPositions:[e],styleOverrides:{display:"inline-block",padding:"3px",borderRadius:"3px"},scale:.15}),(0,S.jsx)(M.Z,{name:"arrow-right"}),(0,S.jsx)(X.Z,{selectable:!1,children:(0,S.jsx)(F.Z,{value:r})})]})}function rn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function tn(n){var e,r,t=n.activeLayer,a=(0,o.I0)(),l=(0,o.v9)(w.vl)[t].properties.bindings,c=(e=(0,i.useState)(null),r=2,function(n){if(Array.isArray(n))return n}(e)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,r)||function(n,e){if(n){if("string"==typeof n)return rn(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rn(n,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=c[0],u=c[1],A=(0,i.useCallback)((function(n,e){a((0,w.V6)({layerIndex:t,bindIndex:n,binding:e}))}),[a,t]);return null!=l&&l.parsed?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(K.Z,{renderKey:function(n){var e=n.index;return n.keyLayout,l.parsed[e]&&(0,S.jsx)(N.Z,{binding:l.parsed[e],keyWrapperProps:{className:R.Z.unified,onClick:function(n){n.stopPropagation(),u(e)}}})}}),null!==s&&(0,S.jsx)(nn,{binding:l.parsed[s],bindingIndex:s,onCancel:function(){return u(null)},onUpdate:function(n){A(s,n),u(null)}})]}):(0,S.jsx)(Q,{})}var on=r(59140),an=r(46908);function ln(n){var e=n.layerIndex,r=(0,an.Q)().setActiveTab,t=(0,o.v9)(on.Iu),a=(0,i.useMemo)((function(){return t.filter((function(n){var r,t;return(null===(r=n.properties)||void 0===r||null===(t=r["then-layer"])||void 0===t?void 0:t.parsed)===e}))}),[t,e]),l=(0,i.useCallback)((function(n){n.stopPropagation(),r(1)}),[r]);return 0===a.length?null:(0,S.jsxs)("div",{onClick:l,className:E.layerActionPrompt,children:[(0,S.jsx)(M.Z,{className:"fa-flip-horizontal ".concat(E.icon),name:"arrow-right-to-bracket"}),(0,S.jsxs)("div",{className:E.details,children:[(0,S.jsx)("span",{children:a.length})," ",(0,S.jsx)("span",{children:"conditional layer references"})]})]})}var cn=r(94184),sn=r.n(cn),un=r(50361),An=r.n(un),dn=r(2062),pn=r(45556),fn={};fn.styleTagTransform=v(),fn.setAttributes=b(),fn.insert=f().bind(null,"head"),fn.domAPI=d(),fn.insertStyleElement=g(),u()(pn.Z,fn);var yn=pn.Z&&pn.Z.locals?pn.Z.locals:void 0,bn=r(39693),mn=r.n(bn),gn=r(62029),hn=r(20817),vn=r(29709);function Cn(n){return Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cn(n)}function xn(n,e){if(n){if("string"==typeof n)return En(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?En(n,e):void 0}}function En(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function jn(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function Bn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jn(Object(r),!0).forEach((function(e){wn(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):jn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function wn(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==Cn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==Cn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===Cn(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function Sn(){return{modifiers:[],eventFiredSinceHoldStart:!1}}function kn(n){return["Alt","Control","Shift","Meta"].includes(n)}function On(n){return On="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},On(n)}function Pn(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function Tn(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pn(Object(r),!0).forEach((function(e){Zn(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Pn(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function Zn(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==On(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==On(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===On(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function In(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return Dn(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dn(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var Ln={Alt:"ALT",Control:"CTRL",Shift:"SHFT",Meta:"GUI",ArrowUp:"UP",ArrowDown:"DOWN",ArrowLeft:"LEFT",ArrowRight:"RIGHT",Escape:"ESC",Tab:"TAB",Enter:"RET",Home:"HOME",End:"END",PageDown:"PG_DN",PageUp:"PG_UP",Backspace:"BSPC",Delete:"DEL"};function Un(n,e){var r=e.behaviorBind,t=void 0===r?"&kp":r,o=e.defaultStart,a=void 0!==o&&o,l=(0,i.useContext)(hn.VY).bindingCount,c=In((0,i.useState)(a),2),s=c[0],u=c[1],A=In((0,i.useState)(0),2),d=A[0],p=A[1],f=(0,i.useCallback)((function(){d<l-1&&p(d+1)}),[d,p,l]),y=(0,i.useCallback)((function(e){e.value=t,n((function(n){return Tn(Tn({},n),{},{properties:Tn(Tn({},n.properties),{},{bindings:Tn(Tn({},n.properties.bindings),{},{parsed:(0,vn.xw)(n.properties.bindings.parsed,d,e)})})})})),f()}),[n,t,d,f]);!function(n,e){var r,t,o=(r=(0,i.useReducer)((function(n,e){switch(e.type){case"HOLD_MODIFIER":return Bn(Bn({},n),{},{modifiers:[].concat((r=n.modifiers,function(n){if(Array.isArray(n))return En(n)}(r)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(r)||xn(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[e.event.key])});case"RELEASE_MODIFIER":return function(n,e){var r=n.modifiers.filter((function(n){return n!==e.event.key}));return Bn(Bn({},n),{},{modifiers:r,eventFiredSinceHoldStart:r.length>0&&n.eventFiredSinceHoldStart})}(n,e);case"EVENT_FIRED":return Bn(Bn({},n),{},{eventFiredSinceHoldStart:!0});default:return n}var r}),null,Sn),t=2,function(n){if(Array.isArray(n))return n}(r)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(r,t)||xn(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],l=o[1],c=(0,i.useCallback)((function(n){n.repeat||(kn(n.key)?l({type:"HOLD_MODIFIER",event:n}):(n.preventDefault(),e(n),l({type:"EVENT_FIRED"})))}),[l,e]),s=(0,i.useCallback)((function(n){kn(n.key)&&l({type:"RELEASE_MODIFIER",event:n}),a.eventFiredSinceHoldStart||e(n)}),[a.eventFiredSinceHoldStart,e,l]);(0,i.useEffect)((function(){if(n)return document.body.addEventListener("keydown",c),document.body.addEventListener("keyup",s),function(){document.body.removeEventListener("keydown",c),document.body.removeEventListener("keyup",s)}}),[n,c,s])}(s,(0,i.useCallback)((function(n){var e=function(n){var e=function(n){return mn()([n.altKey&&"LA",n.ctrlKey&&"LC",n.metaKey&&"LG",n.shiftKey&&"LS"])}(n),r=(0,gn.mapCharacter)(n.key.toLowerCase())||function(n){var e=Ln[n.key],r=function(n){switch(n.location){case 1:return"L";case 2:return"R";default:return""}}(n);return e?{value:"&kp",params:[{value:r+e,params:[]}]}:null}(n);if(r)return{value:r.value,params:e.reduce((function(n,e){return[{value:e,params:n}]}),r.params)}}(n);e&&y(e)}),[y]));var b=(0,i.useCallback)((function(){u(!0)}),[u]),m=(0,i.useCallback)((function(){u(!1)}),[u]);return[{isActive:s,bindIndex:d},{startQuickAssignment:b,cancelQuickAssignment:m,setBindIndex:p,setBind:y}]}var Yn=r(91892),qn=["ESC","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"],Kn=["N1","N2","N3","N4","N5","N6","N7","N8","N9","N0"],Nn=["LCTRL","LALT","LGUI","SPACE","RGUI","RALT","RCTRL"],Rn=[{id:"qwerty",label:"QWERTY"},{id:"dvorak",label:"Dvorak"},{id:"colemak",label:"Colemak"},{id:"colemakModDh",label:"Colemak Mod-DH"}],Mn=[qn,["GRAVE"].concat(Kn,["MINUS","EQUAL","BSPC"]),["TAB","Q","W","E","R","T","Y","U","I","O","P","LBKT","RBKT","BSLH"],["CAPS","A","S","D","F","G","H","J","K","L","SEMI","APOS","ENTER"],["LSHFT","Z","X","C","V","B","N","M","COMMA","DOT","FSLH","RSHFT"],Nn],Wn=[qn,["GRAVE"].concat(Kn,["MINUS","EQUAL","BSPC"]),["TAB","Q","W","F","P","G","J","L","U","Y","SEMI","LBKT","RBKT","BSLH"],["CAPS","A","R","S","T","D","H","N","E","I","O","APOS","ENTER"],["LSHFT","Z","X","C","V","B","K","M","COMMA","DOT","FSLH","RSHFT"],Nn],Qn=[qn,["GRAVE"].concat(Kn,["MINUS","EQUAL","BSPC"]),["TAB","Q","W","F","P","B","J","L","U","Y","SEMI","LBKT","RBKT","BSLH"],["CAPS","A","R","S","T","G","M","N","E","I","O","APOS","ENTER"],["LSHFT","Z","X","C","V","D","K","H","COMMA","DOT","FSLH","RSHFT"],Nn],Fn=[qn,["GRAVE"].concat(Kn,["LBKT","RBKT","BSPC"]),["TAB","APOS","COMMA","DOT","P","Y","F","G","C","R","L","FSLH","EQUAL","BSLH"],["CAPS","A","O","E","U","I","D","H","T","N","S","MINUS","ENTER"],["LSHFT","SEMI","Q","J","K","X","B","M","W","V","Z","RSHFT"],Nn];function Hn(n){return Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hn(n)}function zn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function Vn(n){var e,r,o=n.onSelect,a=(e=(0,i.useState)(Rn[0]),r=2,function(n){if(Array.isArray(n))return n}(e)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,r)||function(n,e){if(n){if("string"==typeof n)return zn(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zn(n,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],c=a[1];return(0,S.jsxs)("div",{children:[(0,S.jsxs)("div",{children:["Keymap palette: ",(0,S.jsx)(Yn.Z,{value:l,options:Rn,onChange:c,getOptionValue:function(n){return n.id}})]}),(0,S.jsx)("div",{className:yn.keymapPalette,children:t[l.id].map((function(n,e){return(0,S.jsx)(Xn,{keys:n,onSelect:o},e)}))})]})}function Xn(n){var e=n.keys,r=n.onSelect;return(0,S.jsx)("div",{className:yn.keymapPaletteRow,children:e.map((function(n,e){return(0,S.jsx)(_n,{behavior:"&kp",code:n,onSelect:r},e)}))})}function _n(n){var e,r,t,o=n.behavior,i=n.code,a=n.onSelect,l={value:o,params:[{value:i,params:[]}]};return(0,S.jsx)(X.Z,{themeClass:sn()(yn.mini,(e={},r=yn.spacebar,t="SPACE"===i,(r=function(n){var e=function(n,e){if("object"!==Hn(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==Hn(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===Hn(e)?e:String(e)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e)),onClick:function(){return a(l)},children:(0,S.jsx)(F.Z,{hideBehavior:!0,value:l})})}var Gn=r(35937),Jn=r.n(Gn),$n=r(81485),ne=r(77593),ee=r(49700);function re(n){return re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},re(n)}function te(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return oe(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oe(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oe(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function ie(n){var e,r,t,a=n.layer,s=n.layerIndex,u=n.onClose,A=(0,o.I0)(),d=(e=(0,i.useContext)($n.c),r=e.behaviorParameters,t=e.sources.behaviours,(0,i.useMemo)((function(){return Object.values(Jn()(t,(function(n,e){return 1===r[e].length&&"code"===r[e][0]}))).map((function(n){var e,r;return{id:n.code,label:(null===(e=n.properties)||void 0===e||null===(r=e.label)||void 0===r?void 0:r.parsed)||"",description:n.description}}))}),[t,r])),p=te((0,i.useState)(d[0]),2),f=p[0],y=p[1],b=te((0,i.useState)((function(){return An()(a)})),2),m=b[0],g=te(Un(b[1],{behaviorBind:f.id,defaultStart:!0}),2),h=g[0],v=g[1],C=(0,i.useCallback)((function(){A((0,w.tj)({layerIndex:s,layer:m})),u()}),[A,m,s,u]),x=(0,S.jsx)("span",{style:{display:"inline-block",fontSize:"initial",fontWeight:"normal",verticalAlign:"middle"},children:(0,S.jsx)(Yn.Z,{options:d,value:f,onChange:y,getOptionValue:function(n){return n.id},formatOptionLabel:function(n){return(0,S.jsx)("code",{title:"".concat(n.label," ").concat(n.description),children:n.id})}})});return(0,S.jsx)(l.Z,{onDismiss:u,children:(0,S.jsxs)(c.Z,{classes:[yn.quickAssignDialog],dismissText:"",children:[(0,S.jsx)("h2",{children:"Quick-assign layer keybindings"}),(0,S.jsx)("div",{style:{display:"flex",justifyContent:"center",overflow:"auto"},children:(0,S.jsx)(K.Z,{bindings:m.properties.bindings.parsed,renderKey:function(n){var e=n.index;return m.properties.bindings.parsed[e]&&(0,S.jsx)(ae,{binding:m.properties.bindings.parsed[e],selected:h.bindIndex===e,onClick:function(){return v.setBindIndex(e)}})}})}),(0,S.jsx)("div",{style:{textAlign:"center"},children:(0,S.jsx)(dn.Z,{children:(0,S.jsx)("span",{children:"Click on a different key to jump ahead or go back and correct a previous binding."})})}),(0,S.jsxs)("div",{className:yn.toolSection,children:[(0,S.jsxs)("div",{className:yn.description,children:[(0,S.jsx)("p",{children:"Set a binding at the highlighted position by tapping the desired key on your keyboard or by selecting from the palette to the right."}),(0,S.jsxs)("div",{children:["Use behavior: ",x]}),(0,S.jsxs)("p",{className:yn.finePrint,children:["Note: modified keys can be captured, except when a different key is produced, like ",(0,S.jsx)("kbd",{children:"Alt"})," + ",(0,S.jsx)("kbd",{children:"A"})," becoming the ",(0,S.jsx)("code",{children:"å"})," character on a Mac. You may need to manually set these bindings afterwards."]})]}),(0,S.jsx)(Vn,{onSelect:v.setBind})]}),(0,S.jsxs)(c.k,{children:[(0,S.jsx)(B.Z,{onClick:C,children:"Okay"}),(0,S.jsx)(B.Z,{secondary:!0,onClick:u,children:"Cancel"})]})]})})}function ae(n){var e,r,t,o=n.binding,a=n.selected,l=n.onClick,c=(0,ne.l)().ref.current;return(0,i.useEffect)((function(){c&&a&&(0,ee.n)(c,{behavior:"auto",block:"center"})}),[c,a]),(0,S.jsx)(N.Z,{binding:o,keyWrapperProps:{onClick:l,selectable:!1,className:sn()(yn.quickBindKey,(e={},r=yn.quickBindKeyHighlight,t=a,(r=function(n){var e=function(n,e){if("object"!==re(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==re(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===re(e)?e:String(e)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e))}})}var le=r(64536),ce=r(87694),se={};se.styleTagTransform=v(),se.setAttributes=b(),se.insert=f().bind(null,"head"),se.domAPI=d(),se.insertStyleElement=g(),u()(ce.Z,se);var ue=ce.Z&&ce.Z.locals?ce.Z.locals:void 0;function Ae(n){var e=n.children;return(0,S.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 80",className:ue.curvedText,children:[(0,S.jsx)("path",{id:"curve",d:"M 10 40 A 30 30 0 0 1 70 40",fill:"none",stroke:"none"}),(0,S.jsx)("text",{className:R.Z["behaviour-binding"],style:{textAnchor:"middle",opacity:.8},children:(0,S.jsx)("textPath",{xlinkHref:"#curve",startOffset:"50%",children:e})})]})}function de(n){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},de(n)}function pe(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function fe(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pe(Object(r),!0).forEach((function(e){ye(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):pe(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function ye(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==de(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==de(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===de(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function be(n){var e=n.binding,r=n.keyWrapperProps,t=void 0===r?{}:r;return(0,S.jsxs)(X.Z,fe(fe({themeClass:ue.encoder},t),{},{children:[(0,S.jsx)(F.Z,{value:e,hideBehavior:!0}),(0,S.jsx)(Ae,{children:e.value})]}))}function me(n){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},me(n)}function ge(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function he(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ge(Object(r),!0).forEach((function(e){ve(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function ve(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==me(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==me(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===me(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}be.propTypes={binding:le.U4.isRequired,keyWrapperProps:L().any};var Ce=function(n){return n.keyboard.sensors};function xe(n){return(0,S.jsx)(z.Z,he(he({},n),{},{Heading:Ee,context:"encoders"}))}function Ee(n){var e=n.bindingIndex,r=n.bindTree,t=(0,o.v9)(Ce)[e],i=t.name||t.identifier;return(0,S.jsxs)("div",{className:H.Z.keyBindingHeader,children:[(0,S.jsxs)("h2",{children:["Set ",(0,S.jsx)("code",{children:i})," bindings"]}),(0,S.jsx)(be,{binding:r,keyWrapperProps:{selectable:!1}})]})}function je(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function Be(n){var e,r,t=n.layerIndex,a=n.layer,l=n.sensors,c=(0,o.I0)(),s=(e=(0,i.useState)(null),r=2,function(n){if(Array.isArray(n))return n}(e)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,r)||function(n,e){if(n){if("string"==typeof n)return je(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?je(n,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],A=s[1],d=(a.properties["sensor-bindings"]||{}).parsed,p=void 0===d?[]:d,f=p,y=(0,i.useCallback)((function(n){c((0,w.zi)({layerIndex:t,sensorIndex:u,bindings:n})),A(null)}),[t,u,A,c]);function b(n,e){c((0,w.zi)({layerIndex:t,sensorIndex:n,bindings:e}))}return(0,S.jsxs)("div",{style:{margin:"0 0 30px"},children:[(0,S.jsx)("h3",{children:"Sensor bindings"}),(0,S.jsx)("div",{style:{display:"flex",flexDirection:"row",gap:"25px"},children:l.map((function(n,e){return(0,S.jsx)(we,{index:e,sensor:n,binding:f[e],canAdd:void 0===f[e]&&f.length===e,canDelete:void 0!==f[e]&&f.length===e+1,onUpdate:b,onEdit:function(){return A(e)}},e)}))}),null!==u&&(0,S.jsx)(xe,{binding:p[u],bindingIndex:u,onCancel:function(){return A(null)},onUpdate:y})]})}function we(n){var e=n.sensor,r=n.binding,t=n.index,o=n.onUpdate,a=n.canAdd,l=n.canDelete,c=n.onEdit,s=e.name||e.identifier,u=(null==r?void 0:r.value)||"&inc_dec_kp",A=(null==r?void 0:r.params)||[{value:0,_isPlaceholder:!0,params:[]},{value:0,_isPlaceholder:!0,params:[]}],d=(0,i.useCallback)((function(){o(t,void 0)}),[t,o]),p=(0,i.useCallback)((function(){o(t,{value:"&inc_dec_kp",params:[{value:0,_isPlaceholder:!0,params:[]},{value:0,_isPlaceholder:!0,params:[]}]})}),[t,o]);return(0,S.jsxs)("div",{className:E.sensor,"data-unbound":!r,children:[(0,S.jsxs)("label",{style:{fontSize:"90%"},children:[(0,S.jsx)("code",{children:s}),l&&(0,S.jsx)(M.Z,{name:"trash-can",title:"Remove sensor binding from this layer",className:E.deleteSensorBinding,onClick:d})]}),r&&(0,S.jsx)(be,{binding:r||{value:u,params:A},keyWrapperProps:{onClick:c}}),a&&(0,S.jsx)(X.Z,{onClick:p,title:"Add sensor binding to this layer",themeClass:sn()(ue.encoder,E.addSensorBinding),children:(0,S.jsx)(M.Z,{name:"add"})})]})}var Se="Rapidly set keycode bindings by typing or clicking";function ke(n){var e=n.layerIndex,r=n.onOpen,t=(0,o.v9)(w.vl)[e];return(0,i.useMemo)((function(){return function(n){var e,r=(null===(e=n.properties.bindings)||void 0===e?void 0:e.parsed)||[];return r.filter((function(n){return"&trans"===n.value})).length/r.length>=.95}(t)}),[t])?(0,S.jsxs)("div",{title:Se,onClick:r,className:E.layerActionPrompt,open:!0,children:[(0,S.jsx)(M.Z,{className:E.icon,name:"keyboard"}),(0,S.jsx)("div",{className:E.details,children:(0,S.jsx)("em",{children:"Quick Assign"})})]}):null}function Oe(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return Pe(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pe(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var Te=function(n){return n.keyboard.sensors};function Ze(n){var e=n.layer,r=n.layerIndex,t=(n.isActiveLayer,(0,o.v9)(Te)),a=Oe((0,i.useState)(!1),2),l=a[0],c=a[1],s=Oe((0,i.useState)(!1),2),u=s[0],A=s[1],d=(0,i.useCallback)((function(){return c(!0)}),[c]),p=(0,i.useCallback)((function(){return A(!0)}),[A]),f=(0,i.useCallback)((function(){return A(!1)}),[A]),y=(0,i.useMemo)((function(){return[{callback:d,content:"Change Configuration"},{callback:p,content:(0,S.jsxs)(S.Fragment,{children:["Quick ",(0,S.jsx)("code",{children:"&kp"})," Assignment"]})}]}),[d,p]);return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("div",{className:E.layerWrapper,children:[(0,S.jsx)(Ie,{layer:e,layerIndex:r,additionalActions:y,openQuickAssign:p}),(0,S.jsx)(tn,{activeLayer:r}),(0,S.jsx)("div",{className:E.sensors,"data-sensor-count":t.length,children:(0,S.jsx)(Be,{sensors:t,layerIndex:r,layer:e})})]}),l&&(0,S.jsx)(I,{layerIndex:r,onClose:function(){return c(!1)}}),u&&(0,S.jsx)(ie,{layer:e,layerIndex:r,onClose:f})]})}function Ie(n){var e=n.layer,r=n.layerIndex,t=n.additionalActions,o=n.openQuickAssign;return(0,S.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"5px"},children:[(0,S.jsx)("h3",{children:e.name}),(0,S.jsx)(ln,{layerIndex:r}),(0,S.jsx)(q,{layerIndex:r,additionalActions:t}),(0,S.jsx)(ke,{layerIndex:r,onOpen:o})]})}var De=r(30341),Le={};Le.styleTagTransform=v(),Le.setAttributes=b(),Le.insert=f().bind(null,"head"),Le.domAPI=d(),Le.insertStyleElement=g(),u()(De.Z,Le);var Ue=De.Z&&De.Z.locals?De.Z.locals:void 0,Ye=r(56803),qe=r(50868),Ke=r(18311);function Ne(n){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ne(n)}function Re(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function Me(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Re(Object(r),!0).forEach((function(e){We(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function We(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==Ne(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==Ne(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===Ne(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function Qe(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,s=!1;try{if(i=(r=r.call(n)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==e);c=!0);}catch(n){s=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return Fe(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fe(n,e):void 0}}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function He(n){var e=n.activeLayer,r=n.onSelect,t=(0,i.useRef)(null),a=(0,o.I0)(),l=(0,i.useContext)(hn.VY).bindingCount,c=(0,i.useContext)($n.c),s=(0,i.useContext)(Ke.v),u=(0,o.v9)(w.vl),A=(0,i.useCallback)((function(n){r(n)}),[r]),d=(0,i.useCallback)((function(){a((0,w.Xv)({bindingCount:l})),r(u.length)}),[a,l,r,u]),p=(0,i.useMemo)((function(){return function(n){var e=u[n].name;window.confirm("Really delete layer: ".concat(e,"?"))&&(a((0,w.Q)({index:n})),a((0,qe.fD)(n,null,u,c,s)))}}),[u,a,c,s]),f=(0,i.useCallback)((function(n,e){n.stopPropagation();var r=e.dragIndex,t=e.dropIndex;r!==t&&(a((0,w.WF)({currentIndex:r,targetIndex:t})),a((0,qe.fD)(r,t,u,c,s)))}),[u,a,c,s]),y=function(n){var e=Qe((0,i.useState)({dragIndex:null,dropIndex:null}),2),r=e[0],t=r.dragIndex,o=r.dropIndex,a=e[1],l=(0,i.useCallback)((function(n){return n.preventDefault()}),[]),c=(0,i.useCallback)((function(n){var e=Number(n.target.dataset.slotIndex);a({dragIndex:e,dropIndex:null})}),[a]),s=(0,i.useCallback)((function(n){a((function(e){return null===e.dropIndex&&n.stopPropagation(),{dragIndex:null,dropIndex:null}}))}),[a]),u=(0,i.useCallback)((function(n){n.preventDefault();var e=Number(n.target.dataset.dropPosition);a((function(n){return Me(Me({},n),{},{dropIndex:e})}))}),[a]),A=(0,i.useCallback)((function(n){var e=Number(n.target.dataset.dropPosition);a((function(n){return Me(Me({},n),{},{dropIndex:n.dropIndex===e?null:n.dropIndex})}))}),[a]),d=(0,i.useCallback)((function(e){n(e,{dragIndex:t,dropIndex:o}),a({dragIndex:null,dropIndex:null})}),[t,o,a,n]);return[{isDragging:null!==t,dragIndex:t,dropIndex:o},{handleDragStart:c,handleDragEnd:s,handleDragEnter:u,handleDragLeave:A,handleDragOver:l,handleDrop:d}]}(f),b=Qe(y,2),m=b[0],g=b[1];return(0,S.jsx)("div",{className:Ue.layerSelector,ref:t,children:(0,S.jsxs)("ul",{"data-dragging":m.isDragging,children:[u.map((function(n,r){return(0,S.jsxs)("li",{className:e===r?Ue.active:"","data-slot-index":r,draggable:!0,onDragStart:g.handleDragStart,onDragEnd:g.handleDragEnd,onDrop:g.handleDrop,children:[(0,S.jsx)("div",{className:mn()([Ue.dropper,m.dropIndex===r&&Ue.dropTarget]).join(" "),"data-drop-position":r,onDragEnter:g.handleDragEnter,onDragOver:g.handleDragOver,onDragLeave:g.handleDragLeave,onDrop:g.handleDrop}),(0,S.jsxs)("div",{onClick:function(){return A(r)},className:mn()([Ue.layer,m.dragIndex===r&&Ue.dragging,m.isDragging&&m.dropIndex!==m.dragIndex&&m.dropIndex!==m.dragIndex+1&&null!==m.dropIndex&&r>=m.dropIndex&&Ue.displaced]).join(" "),children:[(0,S.jsx)("span",{className:Ue.index,children:r}),(0,S.jsxs)("span",{className:Ue.name,children:[n.name,(0,S.jsx)(M.Z,{name:"times-circle",className:Ue.delete,onClick:(0,Ye.s)((function(){return p(r)}))})]})]})]},"slot-".concat(r))})),m.isDragging&&m.dragIndex<u.length-1&&(0,S.jsx)("li",{"data-slot-index":u.length,onDragEnd:g.handleDragEnd,onDrop:g.handleDrop,children:(0,S.jsx)("div",{className:mn()([Ue.dropper,m.dropIndex===u.length&&Ue.dropTarget]).join(" "),"data-drop-position":u.length,onDragEnter:g.handleDragEnter,onDragOver:g.handleDragOver,onDragLeave:g.handleDragLeave,onDrop:g.handleDrop})},"slot-".concat(u.length)),!m.isDragging&&(0,S.jsx)("li",{onClick:d,children:(0,S.jsxs)("div",{className:Ue.layer,children:[(0,S.jsx)(M.Z,{className:Ue.index,name:"plus"}),(0,S.jsx)("span",{className:Ue.name,children:"Add Layer"})]})})]})})}He.propTypes={activeLayer:L().number.isRequired,onSelect:L().func.isRequired};var ze=He;function Ve(){var n=(0,o.I0)(),e=(0,i.useContext)(hn.VY).bindingCount;return(0,S.jsxs)("div",{style:{textAlign:"center"},children:[(0,S.jsx)("h3",{children:"No keymap layers defined"}),(0,S.jsx)(B.Z,{onClick:function(){return n((0,w.Xv)({bindingCount:e}))},children:"Add layer"})]})}var Xe=function(n){return n.navigation.activeLayer},_e=function(){var n=(0,o.v9)(w.vl),e=(0,o.v9)(Xe),r=(0,o.I0)(),t=Math.max(0,Math.min(e,n.length-1));return 0===n.length?(0,S.jsx)(Ve,{}):(0,S.jsxs)("div",{className:E.container,children:[(0,S.jsx)(ze,{activeLayer:t,onSelect:function(n){return r(function(n){return{type:"SWITCH_LAYER",payload:{index:n}}}(n))}}),(0,S.jsx)(Ze,{layer:n[t],layerIndex:t,isActiveLayer:!0})]})}},94995:function(n,e,r){"use strict";r.d(e,{bK:function(){return p},v:function(){return d}});var t=r(45697),o=r.n(t);function i(n){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},i(n)}function a(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function l(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){c(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function c(n,e,r){return(e=function(n){var e=function(n,e){if("object"!==i(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==i(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===i(e)?e:String(e)}(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}var s={x:o().number.isRequired,y:o().number.isRequired},u={a:o().number,rx:o().number,ry:o().number},A={u:o().number,h:o().number},d=o().shape(l(l(l({},s),u),A)),p=o().arrayOf(d)},56803:function(n,e,r){"use strict";function t(n){return function(e){e.stopPropagation(),n()}}function o(n){return function(e){n[e.key]&&n[e.key]()}}r.d(e,{s:function(){return t},w:function(){return o}})},29709:function(n,e,r){"use strict";function t(n){return function(n){if(Array.isArray(n))return o(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,e){if(n){if("string"==typeof n)return o(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(n,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}r.d(e,{f5:function(){return i},xE:function(){return l},xw:function(){return a}});var i=function(n,e){return[].concat(t(n.slice(0,e)),t(n.slice(e+1)))},a=function(n,e,r){return[].concat(t(n.slice(0,e)),[r],t(n.slice(e+1)))};function l(n,e,r){return-1===r?[].concat(t(n.filter((function(n,r){return r!==e}))),[n[e]]):n.reduce((function(t,o,i){return i===r&&t.push(n[e]),i!==e&&t.push(o),t}),[])}},56634:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,".Jzs3iq1rDP5C8GJijmFR {\n  position: relative;\n}\n\n.NaSZTgWxjXTcejbI5OvU {\n  border: none;\n  background: none;\n}\n.NaSZTgWxjXTcejbI5OvU:hover {\n  cursor: pointer;;\n}\n\n.jThiLc5_BrUyl71v3rKn {\n  display: inline-block;\n  position: absolute;\n  top: 100%;\n  left: 0;\n  width: max-content;\n  z-index: 1;\n  font-size: 70%;\n  padding: 5px 10px;\n\n  border-radius: 4px;\n}\n\n.jThiLc5_BrUyl71v3rKn p {\n  display: inline-block;\n  cursor: pointer;\n  margin: 0;\n}\n\n.jThiLc5_BrUyl71v3rKn ul {\n  display: none;\n}\n.jThiLc5_BrUyl71v3rKn.xG2GKlsc07jLEb2aMC6H {\n  background: var(--dialog-bg, var(--bg));\n  box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.5);\n}\n.jThiLc5_BrUyl71v3rKn.xG2GKlsc07jLEb2aMC6H ul {\n  display: block;\n  padding: 0;\n  margin: 0;\n  list-style-type: none;\n}\n\n.jThiLc5_BrUyl71v3rKn li {\n  cursor: pointer;\n  margin: 2px 0;\n  line-height: 20px;\n  padding: 0 5px;\n  border-radius: 10px;\n}\n\n.jThiLc5_BrUyl71v3rKn li:hover {\n  background-color: var(--hover-selection);\n  color: white;\n}\n","",{version:3,sources:["webpack://./src/Common/action-menu.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB;;AAEA;EACE,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,eAAe;AACjB;;AAEA;EACE,qBAAqB;EACrB,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,kBAAkB;EAClB,UAAU;EACV,cAAc;EACd,iBAAiB;;EAEjB,kBAAkB;AACpB;;AAEA;EACE,qBAAqB;EACrB,eAAe;EACf,SAAS;AACX;;AAEA;EACE,aAAa;AACf;AACA;EACE,uCAAuC;EACvC,8CAA8C;AAChD;AACA;EACE,cAAc;EACd,UAAU;EACV,SAAS;EACT,qBAAqB;AACvB;;AAEA;EACE,eAAe;EACf,aAAa;EACb,iBAAiB;EACjB,cAAc;EACd,mBAAmB;AACrB;;AAEA;EACE,wCAAwC;EACxC,YAAY;AACd",sourcesContent:[".wrapper {\n  position: relative;\n}\n\n.button {\n  border: none;\n  background: none;\n}\n.button:hover {\n  cursor: pointer;;\n}\n\n.menu {\n  display: inline-block;\n  position: absolute;\n  top: 100%;\n  left: 0;\n  width: max-content;\n  z-index: 1;\n  font-size: 70%;\n  padding: 5px 10px;\n\n  border-radius: 4px;\n}\n\n.menu p {\n  display: inline-block;\n  cursor: pointer;\n  margin: 0;\n}\n\n.menu ul {\n  display: none;\n}\n.menu.open {\n  background: var(--dialog-bg, var(--bg));\n  box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.5);\n}\n.menu.open ul {\n  display: block;\n  padding: 0;\n  margin: 0;\n  list-style-type: none;\n}\n\n.menu li {\n  cursor: pointer;\n  margin: 2px 0;\n  line-height: 20px;\n  padding: 0 5px;\n  border-radius: 10px;\n}\n\n.menu li:hover {\n  background-color: var(--hover-selection);\n  color: white;\n}\n"],sourceRoot:""}]),a.locals={wrapper:"Jzs3iq1rDP5C8GJijmFR",button:"NaSZTgWxjXTcejbI5OvU",menu:"jThiLc5_BrUyl71v3rKn",open:"xG2GKlsc07jLEb2aMC6H"},e.Z=a},33988:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,".OaJISbD1WCmb03at77EG {\n  position: relative;\n}\n\n.MUN9De8dUvbPGH9cEDoQ {\n  position: absolute;\n  z-index: 10;\n  bottom: 0;\n  left: 50%;\n  transform: translate(-50%, 100%);\n  max-width: 250px;\n  width: 100%;\n\n  border-radius: 4px;\n  padding: 3px 5px;\n\n  color: white;\n  background-color: var(--error-highlight);\n  font-size: 85%;\n  font-family: sans-serif;\n\n  opacity: 0.9;\n}\n.MUN9De8dUvbPGH9cEDoQ::before {\n  position: absolute;\n  display: block;\n  content: ' ';\n  z-index: -1;\n\n  left: 50%;\n  width: 10px;\n  height: 10px;\n\n  background-color: var(--error-highlight);\n  transform: translate(-50%, -7px) rotate(45deg);\n}\n","",{version:3,sources:["webpack://./src/Common/input.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT,SAAS;EACT,gCAAgC;EAChC,gBAAgB;EAChB,WAAW;;EAEX,kBAAkB;EAClB,gBAAgB;;EAEhB,YAAY;EACZ,wCAAwC;EACxC,cAAc;EACd,uBAAuB;;EAEvB,YAAY;AACd;AACA;EACE,kBAAkB;EAClB,cAAc;EACd,YAAY;EACZ,WAAW;;EAEX,SAAS;EACT,WAAW;EACX,YAAY;;EAEZ,wCAAwC;EACxC,8CAA8C;AAChD",sourcesContent:[".wrapper {\n  position: relative;\n}\n\n.error {\n  position: absolute;\n  z-index: 10;\n  bottom: 0;\n  left: 50%;\n  transform: translate(-50%, 100%);\n  max-width: 250px;\n  width: 100%;\n\n  border-radius: 4px;\n  padding: 3px 5px;\n\n  color: white;\n  background-color: var(--error-highlight);\n  font-size: 85%;\n  font-family: sans-serif;\n\n  opacity: 0.9;\n}\n.error::before {\n  position: absolute;\n  display: block;\n  content: ' ';\n  z-index: -1;\n\n  left: 50%;\n  width: 10px;\n  height: 10px;\n\n  background-color: var(--error-highlight);\n  transform: translate(-50%, -7px) rotate(45deg);\n}\n"],sourceRoot:""}]),a.locals={wrapper:"OaJISbD1WCmb03at77EG",error:"MUN9De8dUvbPGH9cEDoQ"},e.Z=a},49040:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,'.lD5TsvdIbEAHNdmhfnlb {\n  background-color: var(--key-bg-base);\n}\n.yk89E4zK9zlO69OXhKn5:hover {\n  cursor: pointer;\n  border: 4px solid var(--selection);\n  box-sizing: border-box;\n}\n\n.pzTvsxKjpy6MqcFhxh9j {\n  background-color: var(--selection);\n}\n.pzTvsxKjpy6MqcFhxh9j:hover {\n  background-color: var(--hover-selection);\n}\n\n.r_Sdklnj57CE2ZjnBDw6 {\n  background-color: var(--hover-selection);\n  filter: brightness(135%);\n}\n\n.Ich9T1nSzHs1a84insfp {\n  background-color: var(--hover-selection);\n  filter: brightness(75%);\n}\n\n._3U1zi1J1sXT41AzpAA1j {\n  position: absolute;\n  bottom: 0;\n  right: 50%;\n  transform: translate(50%, 100%);\n}\n\n.f38_8PxgThEPWT2hn3qF {\n  border-radius: 1px;\n}\n\n@media not (prefers-color-scheme: dark) {\n  body:not([data-theme="dark"]) .f38_8PxgThEPWT2hn3qF:not(.pzTvsxKjpy6MqcFhxh9j) {\n    filter:brightness(95%);\n  }\n}',"",{version:3,sources:["webpack://./src/Keyboard/Common/keyPositionSelectorStyles.module.css"],names:[],mappings:"AAAA;EACE,oCAAoC;AACtC;AACA;EACE,eAAe;EACf,kCAAkC;EAClC,sBAAsB;AACxB;;AAEA;EACE,kCAAkC;AACpC;AACA;EACE,wCAAwC;AAC1C;;AAEA;EACE,wCAAwC;EACxC,wBAAwB;AAC1B;;AAEA;EACE,wCAAwC;EACxC,uBAAuB;AACzB;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV,+BAA+B;AACjC;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE;IACE,sBAAsB;EACxB;AACF",sourcesContent:['.key {\n  background-color: var(--key-bg-base);\n}\n.selectable:hover {\n  cursor: pointer;\n  border: 4px solid var(--selection);\n  box-sizing: border-box;\n}\n\n.highlight {\n  background-color: var(--selection);\n}\n.highlight:hover {\n  background-color: var(--hover-selection);\n}\n\n.previewAdd {\n  background-color: var(--hover-selection);\n  filter: brightness(135%);\n}\n\n.previewRemove {\n  background-color: var(--hover-selection);\n  filter: brightness(75%);\n}\n\n.tip {\n  position: absolute;\n  bottom: 0;\n  right: 50%;\n  transform: translate(50%, 100%);\n}\n\n.keyMini {\n  border-radius: 1px;\n}\n\n@media not (prefers-color-scheme: dark) {\n  body:not([data-theme="dark"]) .keyMini:not(.highlight) {\n    filter:brightness(95%);\n  }\n}'],sourceRoot:""}]),a.locals={key:"lD5TsvdIbEAHNdmhfnlb",selectable:"yk89E4zK9zlO69OXhKn5",highlight:"pzTvsxKjpy6MqcFhxh9j",previewAdd:"r_Sdklnj57CE2ZjnBDw6",previewRemove:"Ich9T1nSzHs1a84insfp",tip:"_3U1zi1J1sXT41AzpAA1j",keyMini:"f38_8PxgThEPWT2hn3qF"},e.Z=a},87694:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i),l=r(2),c=a()(o());c.i(l.Z,"",!0),c.push([n.id,"svg.mHwtgLgRyOKZxgCygVr1 {\n\tposition: absolute;\n\ttop: -2px;\n\tleft: 0;\n\tfill: var(--key-color-base);\n\tdisplay: block;\n\twidth: 80px;\n\theight: 80px;\n\tfont-size: 10px;\n\tpointer-events: none;\n}\nsvg.mHwtgLgRyOKZxgCygVr1 * {\n\tpointer-events: initial;\n}\n\n.sMh70qqZgwLOUFa2MhLd {\n\twidth: 80px;\n\theight: 80px;\n\tborder-radius: 100%;\n\tbackground-color: var(--key-bg-base);\n\tcolor: var(--key-color-base);\n}\n\n."+l.Z.locals.key+"."+l.Z.locals.selectable+" {\n\tcursor: pointer;\n}\n."+l.Z.locals.key+"."+l.Z.locals.selectable+":hover ."+l.Z.locals["behaviour-binding"]+" {\n\tfill: var(--key-color-hover);\n}\n\n.sMh70qqZgwLOUFa2MhLd ."+l.Z.locals.params+'[data-is-root="true"] {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n.sMh70qqZgwLOUFa2MhLd .'+l.Z.locals.params+'[data-is-root="true"] .'+l.Z.locals.param+':first-child::before {\n\tcontent: "⟳";\n\tfont-size: 140%;\n\tfont-weight: bold;\n}\n.sMh70qqZgwLOUFa2MhLd .'+l.Z.locals.params+'[data-is-root="true"] .'+l.Z.locals.param+':nth-child(2)::before {\n\tcontent: "⟲";\n\tfont-size: 140%;\n\tfont-weight: bold;\n}\n.sMh70qqZgwLOUFa2MhLd.'+l.Z.locals.selectable+":hover ."+l.Z.locals.params+'[data-is-root="true"] .'+l.Z.locals.param+":first-child::before,\n.sMh70qqZgwLOUFa2MhLd."+l.Z.locals.selectable+":hover ."+l.Z.locals.params+'[data-is-root="true"] .'+l.Z.locals.param+":nth-child(2)::before {\n\tcolor: white;\n}\n","",{version:3,sources:["webpack://./src/Keyboard/Encoders/styles.module.css"],names:[],mappings:"AAQA;CACC,kBAAkB;CAClB,SAAS;CACT,OAAO;CACP,2BAA2B;CAC3B,cAAc;CACd,WAAW;CACX,YAAY;CACZ,eAAe;CACf,oBAAoB;AACrB;AACA;CACC,uBAAuB;AACxB;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,mBAAmB;CACnB,oCAAoC;CACpC,4BAA4B;AAC7B;;AAEA;CACC,eAAe;AAChB;AACA;CACC,4BAA4B;AAC7B;;AAEA;CACC,aAAa;CACb,sBAAsB;AACvB;AACA;CACC,YAAY;CACZ,eAAe;CACf,iBAAiB;AAClB;AACA;CACC,YAAY;CACZ,eAAe;CACf,iBAAiB;AAClB;AACA;;CAEC,YAAY;AACb",sourcesContent:[':import("../Keys/styles.module.css") {\n\tkey: key;\n\tselectable: selectable;\n\tbehaviour-binding: behaviour-binding;\n  params: params;\n  param: param;\n}\n\nsvg.curvedText {\n\tposition: absolute;\n\ttop: -2px;\n\tleft: 0;\n\tfill: var(--key-color-base);\n\tdisplay: block;\n\twidth: 80px;\n\theight: 80px;\n\tfont-size: 10px;\n\tpointer-events: none;\n}\nsvg.curvedText * {\n\tpointer-events: initial;\n}\n\n.encoder {\n\twidth: 80px;\n\theight: 80px;\n\tborder-radius: 100%;\n\tbackground-color: var(--key-bg-base);\n\tcolor: var(--key-color-base);\n}\n\n.key.selectable {\n\tcursor: pointer;\n}\n.key.selectable:hover .behaviour-binding {\n\tfill: var(--key-color-hover);\n}\n\n.encoder .params[data-is-root="true"] {\n\tdisplay: flex;\n\tflex-direction: column;\n}\n.encoder .params[data-is-root="true"] .param:first-child::before {\n\tcontent: "⟳";\n\tfont-size: 140%;\n\tfont-weight: bold;\n}\n.encoder .params[data-is-root="true"] .param:nth-child(2)::before {\n\tcontent: "⟲";\n\tfont-size: 140%;\n\tfont-weight: bold;\n}\n.encoder.selectable:hover .params[data-is-root="true"] .param:first-child::before,\n.encoder.selectable:hover .params[data-is-root="true"] .param:nth-child(2)::before {\n\tcolor: white;\n}\n'],sourceRoot:""}]),c.locals={curvedText:"mHwtgLgRyOKZxgCygVr1",encoder:"sMh70qqZgwLOUFa2MhLd"},e.Z=c},45556:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i),l=r(87995),c=r(2),s=a()(o());s.i(l.Z,"",!0),s.i(c.Z,"",!0),s.push([n.id,"."+l.Z.locals.placer+" {\n  scroll-margin: 40px;\n}\n.wbULZuqr8zmHnhI2QjaR:not(.pjTygs0eyLHe1G3Xw6JL) {\n  cursor: pointer;\n}\n.pjTygs0eyLHe1G3Xw6JL {\n  outline: 3px solid var(--selection);\n}\n\n.wbULZuqr8zmHnhI2QjaR:hover {\n  color: var(--key-color-hover);\n  background-color: var(--selection);\n}\n.wbULZuqr8zmHnhI2QjaR:hover {\n  background-color: var(--hover-selection);\n}\n\n.xwgaptE1umBWGQIj_42K {\n  max-width: 80vw;\n  overflow-x: scroll;\n}\n\n.DQQq3MXERdVlb6r3DssI {\n  display: flex;\n  justify-content: center;\n  gap: 30px;\n  margin: 20px 0;\n}\n\n.xwgaptE1umBWGQIj_42K .oEZv6H105FHPPebrlLkA {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: flex-start;\n  max-width: 40%;\n  border-radius: 4px;\n  background-color: var(--code-bg);\n  padding: 40px 50px;\n}\n\n.xwgaptE1umBWGQIj_42K .oEZv6H105FHPPebrlLkA p {\n  font-size: 120%;\n  line-height: 1.3em;\n  margin: 0\n}\n\n.xwgaptE1umBWGQIj_42K .oEZv6H105FHPPebrlLkA p.JK6o82jSwTPHQQj5jCA0 {\n  font-size: 80%;\n  font-style: italic;\n  line-height: 1.2em;\n}\n\n.RQku2XjoFau46LS8EdwH {\n  display: flex;\n  flex-direction: column;\n  gap: 5px;\n  margin: 5px 0;\n}\n\n.zAlG1X0UmQPAE8EMk9ja {\n  display: flex;\n  gap: 5px;\n}\n\n.ar3OaRDoQPDf4u9YY0mP {\n\n\twidth: 30px;\n\theight: 30px;\n\tfont-size: 80%;\n}\n.ar3OaRDoQPDf4u9YY0mP.ADEbrNebJWbSIrZIch0I {\n  width: 205px\n}\n.ar3OaRDoQPDf4u9YY0mP:hover {\n  cursor: pointer;\n}\n","",{version:3,sources:["webpack://./src/Keyboard/Layers/QuickAssign/styles.module.css"],names:[],mappings:"AAIA;EACE,mBAAmB;AACrB;AACA;EACE,eAAe;AACjB;AACA;EACE,mCAAmC;AACrC;;AAEA;EACE,6BAA6B;EAC7B,kCAAkC;AACpC;AACA;EACE,wCAAwC;AAC1C;;AAEA;EACE,eAAe;EACf,kBAAkB;AACpB;;AAEA;EACE,aAAa;EACb,uBAAuB;EACvB,SAAS;EACT,cAAc;AAChB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,8BAA8B;EAC9B,uBAAuB;EACvB,cAAc;EACd,kBAAkB;EAClB,gCAAgC;EAChC,kBAAkB;AACpB;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB;AACF;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,kBAAkB;AACpB;;AAEA;EACE,aAAa;EACb,sBAAsB;EACtB,QAAQ;EACR,aAAa;AACf;;AAEA;EACE,aAAa;EACb,QAAQ;AACV;;AAEA;;CAGC,WAAW;CACX,YAAY;CACZ,cAAc;AACf;AACA;EACE;AACF;AACA;EACE,eAAe;AACjB",sourcesContent:[":import(\"../../styles.module.css\") {\n  placer: placer;\n}\n\n.placer {\n  scroll-margin: 40px;\n}\n.quickBindKey:not(.quickBindKeyHighlight) {\n  cursor: pointer;\n}\n.quickBindKeyHighlight {\n  outline: 3px solid var(--selection);\n}\n\n.quickBindKey:hover {\n  color: var(--key-color-hover);\n  background-color: var(--selection);\n}\n.quickBindKey:hover {\n  background-color: var(--hover-selection);\n}\n\n.quickAssignDialog {\n  max-width: 80vw;\n  overflow-x: scroll;\n}\n\n.toolSection {\n  display: flex;\n  justify-content: center;\n  gap: 30px;\n  margin: 20px 0;\n}\n\n.quickAssignDialog .description {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: flex-start;\n  max-width: 40%;\n  border-radius: 4px;\n  background-color: var(--code-bg);\n  padding: 40px 50px;\n}\n\n.quickAssignDialog .description p {\n  font-size: 120%;\n  line-height: 1.3em;\n  margin: 0\n}\n\n.quickAssignDialog .description p.finePrint {\n  font-size: 80%;\n  font-style: italic;\n  line-height: 1.2em;\n}\n\n.keymapPalette {\n  display: flex;\n  flex-direction: column;\n  gap: 5px;\n  margin: 5px 0;\n}\n\n.keymapPaletteRow {\n  display: flex;\n  gap: 5px;\n}\n\n.mini {\n  composes: keyDefaultTheme from '../../Keys/styles.module.css';\n\n\twidth: 30px;\n\theight: 30px;\n\tfont-size: 80%;\n}\n.mini.spacebar {\n  width: 205px\n}\n.mini:hover {\n  cursor: pointer;\n}\n"],sourceRoot:""}]),s.locals={quickBindKey:"wbULZuqr8zmHnhI2QjaR",quickBindKeyHighlight:"pjTygs0eyLHe1G3Xw6JL",quickAssignDialog:"xwgaptE1umBWGQIj_42K",toolSection:"DQQq3MXERdVlb6r3DssI",description:"oEZv6H105FHPPebrlLkA",finePrint:"JK6o82jSwTPHQQj5jCA0",keymapPalette:"RQku2XjoFau46LS8EdwH",keymapPaletteRow:"zAlG1X0UmQPAE8EMk9ja",mini:"ar3OaRDoQPDf4u9YY0mP "+c.Z.locals.keyDefaultTheme,spacebar:"ADEbrNebJWbSIrZIch0I"},e.Z=s},30341:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,'.JeRmYfUKXTg9VqWZshKO {\n  pointer-events: none;\n  z-index: 2;\n  opacity: 0.75;\n  margin-left: 5px;\n  margin-bottom: 60px;\n  width: 36px;\n}\n.JeRmYfUKXTg9VqWZshKO:hover {\n  opacity: initial;\n}\n.JeRmYfUKXTg9VqWZshKO > * {\n  pointer-events: all;\n}\n\n.JeRmYfUKXTg9VqWZshKO ul {\n  display: flex;\n  position: relative;\n  flex-direction: column;\n  list-style-type: none;\n  margin: 0;\n  padding: 0;\n}\n.JeRmYfUKXTg9VqWZshKO li {\n  position: relative;\n  padding: 0;\n  margin: 0;\n  width: max-content;\n  height: 36px;\n  cursor: pointer;\n}\n.JeRmYfUKXTg9VqWZshKO .u2LnyyXbhUKWkR8h1WgY {\n  cursor: grab;\n}\n.Svi1LYw7uQ_NUkdl_Qqu, .QHkrJNCowEE3i9FocgKe {\n  background-color: var(--key-bg-base);\n  color: var(--key-color-base);\n  /* border-radius: 0 18px 18px 0; */\n  height: 36px;\n  padding: 0px;\n  margin: 2px;\n  width: max-content;\n}\n.JeRmYfUKXTg9VqWZshKO li:first-child .Svi1LYw7uQ_NUkdl_Qqu {\n  border-radius: 4px 4px 0 0;\n}\n.JeRmYfUKXTg9VqWZshKO li:last-child .Svi1LYw7uQ_NUkdl_Qqu {\n  border-radius: 0 0 4px 4px;\n}\n.JeRmYfUKXTg9VqWZshKO li:hover .Svi1LYw7uQ_NUkdl_Qqu {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 4px;\n}\n.JeRmYfUKXTg9VqWZshKO:not([data-dragging="true"]) li:hover .Svi1LYw7uQ_NUkdl_Qqu {\n  background-color: rgba(60, 179, 113, 0.85);\n  color: white;\n  padding-right: 35px;\n}\n[data-dragging="true"] .Svi1LYw7uQ_NUkdl_Qqu {\n  padding-right: 35px;\n}\n.JeRmYfUKXTg9VqWZshKO .u2LnyyXbhUKWkR8h1WgY .Svi1LYw7uQ_NUkdl_Qqu {\n  background-color: rgb(60, 179, 113);\n  color: white;\n}\n\n.JeRmYfUKXTg9VqWZshKO li * {\n  display: inline-block;\n}\n.JeRmYfUKXTg9VqWZshKO li .yVeX9ivshCU7PiJfbG2v {\n  overflow: auto;\n  width: 36px;\n  height: 36px;\n  line-height: 36px;\n  text-align: center;\n}\n.JeRmYfUKXTg9VqWZshKO li .tV7QyJybi_Gy9OnFqX6l {\n  overflow: hidden;\n  width: 0;\n  height: 36px;\n  line-height: 36px;\n  padding: 0;\n  font-variant: small-caps;\n}\n\n.Svi1LYw7uQ_NUkdl_Qqu {\n  margin: 4px 2px 4px 0;\n  transition: margin-top .15s ease-in;\n}\n.Svi1LYw7uQ_NUkdl_Qqu.pRqaGgm21Psy3msTmiKg {\n  cursor: grabbing;\n  background-color: royalblue !important;\n  color: white;\n  opacity: 0.3;\n}\n\n.v7BdtxvE2YVCWNVJlnry {\n  position: absolute;\n\n  min-width: 200px;\n  width: 100%;\n  height: 40px;\n  /* border: 1px dotted tomato; */\n}\n\n[data-dragging="false"] .v7BdtxvE2YVCWNVJlnry {\n  display: none;\n}\n.a4BtINSAm0wAMDfWjTWQ {\n  /* position: relative; */\n  width: 200px;\n  opacity: .3;\n}\n\n.Svi1LYw7uQ_NUkdl_Qqu.RMyVbbtfIDcsWDY7Qb1c {\n  margin-top: 34px;\n}\n\n.JeRmYfUKXTg9VqWZshKO ul :hover .Svi1LYw7uQ_NUkdl_Qqu .tV7QyJybi_Gy9OnFqX6l,\n[data-dragging="true"] .Svi1LYw7uQ_NUkdl_Qqu .tV7QyJybi_Gy9OnFqX6l {\n  transition: .15s ease-in;\n  width: auto;\n  padding: 0 0 0 10px;\n}\n\n.JeRmYfUKXTg9VqWZshKO button {\n  width: 30px;\n  height: 36px;\n  line-height: 36px;\n  padding: 0;\n  text-align: center;\n  border-radius: 18px;\n}\n\n.JeRmYfUKXTg9VqWZshKO .htA0l4uMnWt9050_zphf {\n  cursor: pointer;\n  position: absolute;\n  right: 10px;\n  visibility: hidden;\n\n  height: 36px;\n  line-height: 36px;\n}\n.JeRmYfUKXTg9VqWZshKO li:hover .htA0l4uMnWt9050_zphf {\n  visibility: visible;\n}\n',"",{version:3,sources:["webpack://./src/Keyboard/Layers/layer-switcher.module.css"],names:[],mappings:"AAAA;EACE,oBAAoB;EACpB,UAAU;EACV,aAAa;EACb,gBAAgB;EAChB,mBAAmB;EACnB,WAAW;AACb;AACA;EACE,gBAAgB;AAClB;AACA;EACE,mBAAmB;AACrB;;AAEA;EACE,aAAa;EACb,kBAAkB;EAClB,sBAAsB;EACtB,qBAAqB;EACrB,SAAS;EACT,UAAU;AACZ;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,SAAS;EACT,kBAAkB;EAClB,YAAY;EACZ,eAAe;AACjB;AACA;EACE,YAAY;AACd;AACA;EACE,oCAAoC;EACpC,4BAA4B;EAC5B,kCAAkC;EAClC,YAAY;EACZ,YAAY;EACZ,WAAW;EACX,kBAAkB;AACpB;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,0BAA0B;AAC5B;AACA;EACE,4BAA4B;EAC5B,+BAA+B;AACjC;AACA;EACE,0CAA0C;EAC1C,YAAY;EACZ,mBAAmB;AACrB;AACA;EACE,mBAAmB;AACrB;AACA;EACE,mCAAmC;EACnC,YAAY;AACd;;AAEA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;AACpB;AACA;EACE,gBAAgB;EAChB,QAAQ;EACR,YAAY;EACZ,iBAAiB;EACjB,UAAU;EACV,wBAAwB;AAC1B;;AAEA;EACE,qBAAqB;EACrB,mCAAmC;AACrC;AACA;EACE,gBAAgB;EAChB,sCAAsC;EACtC,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,kBAAkB;;EAElB,gBAAgB;EAChB,WAAW;EACX,YAAY;EACZ,+BAA+B;AACjC;;AAEA;EACE,aAAa;AACf;AACA;EACE,wBAAwB;EACxB,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,gBAAgB;AAClB;;AAEA;;EAEE,wBAAwB;EACxB,WAAW;EACX,mBAAmB;AACrB;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,UAAU;EACV,kBAAkB;EAClB,mBAAmB;AACrB;;AAEA;EACE,eAAe;EACf,kBAAkB;EAClB,WAAW;EACX,kBAAkB;;EAElB,YAAY;EACZ,iBAAiB;AACnB;AACA;EACE,mBAAmB;AACrB",sourcesContent:['.layerSelector {\n  pointer-events: none;\n  z-index: 2;\n  opacity: 0.75;\n  margin-left: 5px;\n  margin-bottom: 60px;\n  width: 36px;\n}\n.layerSelector:hover {\n  opacity: initial;\n}\n.layerSelector > * {\n  pointer-events: all;\n}\n\n.layerSelector ul {\n  display: flex;\n  position: relative;\n  flex-direction: column;\n  list-style-type: none;\n  margin: 0;\n  padding: 0;\n}\n.layerSelector li {\n  position: relative;\n  padding: 0;\n  margin: 0;\n  width: max-content;\n  height: 36px;\n  cursor: pointer;\n}\n.layerSelector .active {\n  cursor: grab;\n}\n.layer, .addLayer {\n  background-color: var(--key-bg-base);\n  color: var(--key-color-base);\n  /* border-radius: 0 18px 18px 0; */\n  height: 36px;\n  padding: 0px;\n  margin: 2px;\n  width: max-content;\n}\n.layerSelector li:first-child .layer {\n  border-radius: 4px 4px 0 0;\n}\n.layerSelector li:last-child .layer {\n  border-radius: 0 0 4px 4px;\n}\n.layerSelector li:hover .layer {\n  border-top-right-radius: 4px;\n  border-bottom-right-radius: 4px;\n}\n.layerSelector:not([data-dragging="true"]) li:hover .layer {\n  background-color: rgba(60, 179, 113, 0.85);\n  color: white;\n  padding-right: 35px;\n}\n[data-dragging="true"] .layer {\n  padding-right: 35px;\n}\n.layerSelector .active .layer {\n  background-color: rgb(60, 179, 113);\n  color: white;\n}\n\n.layerSelector li * {\n  display: inline-block;\n}\n.layerSelector li .index {\n  overflow: auto;\n  width: 36px;\n  height: 36px;\n  line-height: 36px;\n  text-align: center;\n}\n.layerSelector li .name {\n  overflow: hidden;\n  width: 0;\n  height: 36px;\n  line-height: 36px;\n  padding: 0;\n  font-variant: small-caps;\n}\n\n.layer {\n  margin: 4px 2px 4px 0;\n  transition: margin-top .15s ease-in;\n}\n.layer.dragging {\n  cursor: grabbing;\n  background-color: royalblue !important;\n  color: white;\n  opacity: 0.3;\n}\n\n.dropper {\n  position: absolute;\n\n  min-width: 200px;\n  width: 100%;\n  height: 40px;\n  /* border: 1px dotted tomato; */\n}\n\n[data-dragging="false"] .dropper {\n  display: none;\n}\n.dropTarget {\n  /* position: relative; */\n  width: 200px;\n  opacity: .3;\n}\n\n.layer.displaced {\n  margin-top: 34px;\n}\n\n.layerSelector ul :hover .layer .name,\n[data-dragging="true"] .layer .name {\n  transition: .15s ease-in;\n  width: auto;\n  padding: 0 0 0 10px;\n}\n\n.layerSelector button {\n  width: 30px;\n  height: 36px;\n  line-height: 36px;\n  padding: 0;\n  text-align: center;\n  border-radius: 18px;\n}\n\n.layerSelector .delete {\n  cursor: pointer;\n  position: absolute;\n  right: 10px;\n  visibility: hidden;\n\n  height: 36px;\n  line-height: 36px;\n}\n.layerSelector li:hover .delete {\n  visibility: visible;\n}\n'],sourceRoot:""}]),a.locals={layerSelector:"JeRmYfUKXTg9VqWZshKO",active:"u2LnyyXbhUKWkR8h1WgY",layer:"Svi1LYw7uQ_NUkdl_Qqu",addLayer:"QHkrJNCowEE3i9FocgKe",index:"yVeX9ivshCU7PiJfbG2v",name:"tV7QyJybi_Gy9OnFqX6l",dragging:"pRqaGgm21Psy3msTmiKg",dropper:"v7BdtxvE2YVCWNVJlnry",dropTarget:"a4BtINSAm0wAMDfWjTWQ",displaced:"RMyVbbtfIDcsWDY7Qb1c",delete:"htA0l4uMnWt9050_zphf"},e.Z=a},59500:function(n,e,r){"use strict";var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([n.id,'.SUaJKzUCF84KzpcParhE {\n  display: flex;\n  flex-direction: row;\n  width: 100vw;\n}\n\n.ULm7RKJYCZDRV0HmcA7C {\n  position: absolute;\n  top: 0;\n  width: 100vw;\n  height: 100vh;\n  overflow: auto;\n  scroll-snap-stop: normal;\n  scroll-snap-type: y proximity;\n}\n\n.XWq43GGa2yCVXqY4Syw3 {\n  width: fit-content;\n  scroll-snap-align: start;\n  margin: 0 auto;\n  padding: 0 40px 40px;\n}\n\n.EwvVNY6vlf7HwYmXTbzi {\n  margin: 10px 0;\n  display: flex;\n}\n\n.EwvVNY6vlf7HwYmXTbzi label {\n  display: inline-block;\n  width: 120px;\n  text-align: right;\n  margin-right: 10px;\n}\n\n.uhiC_7TzN7eCNbm5C6a8[data-sensor-count="0"] {\n  display: none;\n}\n\n.ztwqyyB2FFS4oWgcCyZC label {\n  display: inline-block;\n  margin-bottom: 10px;\n}\n.ztwqyyB2FFS4oWgcCyZC[data-unbound="true"] label code {\n  opacity: 0.5;\n}\n\n.N98b5r9XUT9yotsaxhB7 {\n  cursor: pointer;\n  margin-left: 5px;\n}\n\n.QZ1jUOy1FEDFG3IrI5JM { cursor: pointer; }\n.QZ1jUOy1FEDFG3IrI5JM:hover {\n  color: white;\n}\n\n.QZG9dMy8Vvb4jExjMbNq {\n  position: relative;\n  font-weight: normal;\n  font-size: 0.75em;\n  color: var(--key-color-base);\n  padding: 5px;\n  background-color: var(--dialog-bg);\n  border-radius: 1rem;\n  cursor: pointer;\n}\n\n.QZG9dMy8Vvb4jExjMbNq .ZZ1YEtKhAc2ew68XlWlU {\n  display: block;\n  font-size: 1rem;\n}\n.QZG9dMy8Vvb4jExjMbNq:hover,\n.QZG9dMy8Vvb4jExjMbNq[open] {\n  color: royalblue;\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n\n.QZG9dMy8Vvb4jExjMbNq .khHtvu4X2wwOnAF6CQ3Y {\n  display: none;\n  position: absolute;\n  top: 50%;\n  right: 0px;\n  z-index: 2;\n  transform: translate(100%, -50%);\n  width: max-content;\n  line-height: 1rem;\n  padding: 5px 5px 5px 0;\n  border-radius: 0 4px 4px 0;\n}\n\n.QZG9dMy8Vvb4jExjMbNq:hover .khHtvu4X2wwOnAF6CQ3Y,\n.QZG9dMy8Vvb4jExjMbNq[open] .khHtvu4X2wwOnAF6CQ3Y {\n  display: block;\n  background-color: var(--dialog-bg);\n}',"",{version:3,sources:["webpack://./src/Keyboard/Layers/style.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,mBAAmB;EACnB,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,MAAM;EACN,YAAY;EACZ,aAAa;EACb,cAAc;EACd,wBAAwB;EACxB,6BAA6B;AAC/B;;AAEA;EACE,kBAAkB;EAClB,wBAAwB;EACxB,cAAc;EACd,oBAAoB;AACtB;;AAEA;EACE,cAAc;EACd,aAAa;AACf;;AAEA;EACE,qBAAqB;EACrB,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,aAAa;AACf;;AAEA;EACE,qBAAqB;EACrB,mBAAmB;AACrB;AACA;EACE,YAAY;AACd;;AAEA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA,wBAAoB,eAAe,EAAE;AACrC;EACE,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,mBAAmB;EACnB,iBAAiB;EACjB,4BAA4B;EAC5B,YAAY;EACZ,kCAAkC;EAClC,mBAAmB;EACnB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,eAAe;AACjB;AACA;;EAEE,gBAAgB;EAChB,0BAA0B;EAC1B,6BAA6B;AAC/B;;AAEA;EACE,aAAa;EACb,kBAAkB;EAClB,QAAQ;EACR,UAAU;EACV,UAAU;EACV,gCAAgC;EAChC,kBAAkB;EAClB,iBAAiB;EACjB,sBAAsB;EACtB,0BAA0B;AAC5B;;AAEA;;EAEE,cAAc;EACd,kCAAkC;AACpC",sourcesContent:['.container {\n  display: flex;\n  flex-direction: row;\n  width: 100vw;\n}\n\n.layerScrollContainer {\n  position: absolute;\n  top: 0;\n  width: 100vw;\n  height: 100vh;\n  overflow: auto;\n  scroll-snap-stop: normal;\n  scroll-snap-type: y proximity;\n}\n\n.layerWrapper {\n  width: fit-content;\n  scroll-snap-align: start;\n  margin: 0 auto;\n  padding: 0 40px 40px;\n}\n\n.field {\n  margin: 10px 0;\n  display: flex;\n}\n\n.field label {\n  display: inline-block;\n  width: 120px;\n  text-align: right;\n  margin-right: 10px;\n}\n\n.sensors[data-sensor-count="0"] {\n  display: none;\n}\n\n.sensor label {\n  display: inline-block;\n  margin-bottom: 10px;\n}\n.sensor[data-unbound="true"] label code {\n  opacity: 0.5;\n}\n\n.deleteSensorBinding {\n  cursor: pointer;\n  margin-left: 5px;\n}\n\n.addSensorBinding { cursor: pointer; }\n.addSensorBinding:hover {\n  color: white;\n}\n\n.layerActionPrompt {\n  position: relative;\n  font-weight: normal;\n  font-size: 0.75em;\n  color: var(--key-color-base);\n  padding: 5px;\n  background-color: var(--dialog-bg);\n  border-radius: 1rem;\n  cursor: pointer;\n}\n\n.layerActionPrompt .icon {\n  display: block;\n  font-size: 1rem;\n}\n.layerActionPrompt:hover,\n.layerActionPrompt[open] {\n  color: royalblue;\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n}\n\n.layerActionPrompt .details {\n  display: none;\n  position: absolute;\n  top: 50%;\n  right: 0px;\n  z-index: 2;\n  transform: translate(100%, -50%);\n  width: max-content;\n  line-height: 1rem;\n  padding: 5px 5px 5px 0;\n  border-radius: 0 4px 4px 0;\n}\n\n.layerActionPrompt:hover .details,\n.layerActionPrompt[open] .details {\n  display: block;\n  background-color: var(--dialog-bg);\n}'],sourceRoot:""}]),a.locals={container:"SUaJKzUCF84KzpcParhE",layerScrollContainer:"ULm7RKJYCZDRV0HmcA7C",layerWrapper:"XWq43GGa2yCVXqY4Syw3",field:"EwvVNY6vlf7HwYmXTbzi",sensors:"uhiC_7TzN7eCNbm5C6a8",sensor:"ztwqyyB2FFS4oWgcCyZC",deleteSensorBinding:"N98b5r9XUT9yotsaxhB7",addSensorBinding:"QZ1jUOy1FEDFG3IrI5JM",layerActionPrompt:"QZG9dMy8Vvb4jExjMbNq",icon:"ZZ1YEtKhAc2ew68XlWlU",details:"khHtvu4X2wwOnAF6CQ3Y"},e.Z=a},35937:function(n,e,r){var t=r(29932),o=r(67206),i=r(63012),a=r(46904);n.exports=function(n,e){if(null==n)return{};var r=t(a(n),(function(n){return[n]}));return e=o(e),i(n,r,(function(n,r){return e(n,r[0])}))}},48118:function(n,e,r){"use strict";var t=r(93379),o=r.n(t),i=r(7795),a=r.n(i),l=r(90569),c=r.n(l),s=r(3565),u=r.n(s),A=r(19216),d=r.n(A),p=r(44589),f=r.n(p),y=r(49040),b={};b.styleTagTransform=f(),b.setAttributes=u(),b.insert=c().bind(null,"head"),b.domAPI=a(),b.insertStyleElement=d(),o()(y.Z,b),e.Z=y.Z&&y.Z.locals?y.Z.locals:void 0}}]);
//# sourceMappingURL=LayerEditorTab.e38d2b555b5ba12e6a54.js.map