(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5819],{94062:function(n,e,r){"use strict";r.d(e,{Z:function(){return a}});var t=r(41051),o=r(2968),i=r(85893);function a(n){var e=n.url,r=n.text;return(0,i.jsxs)(o.Z,{external:!0,href:e,children:[(0,i.jsx)(t.Z,{name:"book"})," ",(0,i.jsx)("span",{children:r})]})}},60439:function(n,e,r){"use strict";r.d(e,{Z:function(){return I}});var t=r(94184),o=r.n(t),i=r(6557),a=r.n(i),l=r(67294),c=r(45697),u=r.n(c),s=r(93379),d=r.n(s),p=r(7795),A=r.n(p),f=r(90569),b=r.n(f),m=r(3565),h=r.n(m),y=r(19216),g=r.n(y),v=r(44589),x=r.n(v),C=r(86015),E={};E.styleTagTransform=x(),E.setAttributes=h(),E.insert=b().bind(null,"head"),E.domAPI=A(),E.insertStyleElement=g(),d()(C.Z,E);var w=C.Z&&C.Z.locals?C.Z.locals:void 0,j=r(41051),B=r(56803),S=r(21517),O=r(85893);function k(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,u=!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){u=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,e)||function(n,e){if(n){if("string"==typeof n)return P(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)?P(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 P(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}(n,C),l=e(i)||!i&&t&&"cannot be empty";return(0,v.jsxs)("span",{className:g.wrapper,children:[(0,v.jsx)("input",w({type:"text",value:i},a)),l&&(0,v.jsx)("span",{className:g.error,children:l})]})}B.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},49443:function(n,e,r){"use strict";r.d(e,{Z:function(){return x}});var t=r(27361),o=r.n(t),i=r(67294),a=r(45697),l=r.n(a),c=r(97494),u={useRaw:l().bool,raw:l().string,parsed:l().any},s={name:l().string.isRequired,labels:l().arrayOf(l().string).isRequired,properties:l().objectOf((function(n,e,r,t,o){try{l().checkPropTypes({propValue:l().shape(u).isRequired},{propValue:n},t,r)}catch(n){return new Error("Invalid prop `"+o+"` supplied to `"+r+"`. Validation failed.")}})).isRequired},d=r(62417),p=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 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 b(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);r=0||(o[r]=n[r]);return o}(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,r)&&(o[r]=n[r])}return o}function H(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 z(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,t=new Array(e);r":sn("GT"),"/":sn("FSLH"),"?":sn("QMARK")};function An(n){var e,r,t,o=n.onClose,l=(r=(0,i.useState)("Type something..."),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,u=!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){u=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(r,t)||cn(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.")}()),c=l[0],u=l[1],s=null===(e=(0,a.v9)(ln.l9))||void 0===e?void 0:e.enable_send_string_behavior,d=(0,i.useMemo)((function(){return c.split("").reduce((function(n,e){var r=function(n){if(pn[n])return pn[n];var e,r=function(n,e){var r="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!r){if(Array.isArray(n)||(r=cn(n))){r&&(n=r);var t=0,o=function(){};return{s:o,n:function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(n)},n:function(){var n=r.next();return a=n.done,n},e:function(n){l=!0,i=n},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(dn);try{for(r.s();!(e=r.n()).done;){var t=e.value,o=t.pattern,i=t.convert;if(n.match(o))return i(n)}}catch(n){r.e(n)}finally{r.f()}}(e);return r&&n.push(r),n}),[])}),[c]),A=(0,an.NE)(d),f=(0,i.useCallback)((function(n){n&&(n.focus(),n.select())}),[]);return(0,D.jsx)($.Z,{children:(0,D.jsxs)(nn.Z,{dismissText:!1,children:[(0,D.jsx)("h2",{children:"Create Typing Sequence"}),(0,D.jsx)("p",{children:"Type a message to generate a sequence of bindings in the macro."}),s&&(0,D.jsxs)("p",{children:[(0,D.jsx)("strong",{children:"Note:"})," the new ",(0,D.jsx)(en.Z,{url:"https://zmk.dev/docs/behaviors/send-string",text:"ZMK Docs: Send String Behavior"})," provides a simpler and more efficient way to trigger the input of a sequence of characters."]}),(0,D.jsx)("textarea",{value:c,ref:f,style:{width:"100%",height:"6rem"},onChange:function(n){return u(n.target.value)}}),(0,D.jsx)("div",{className:k.macroBindings,children:A.map((function(n,e){return(0,D.jsx)(i.Fragment,{children:(0,D.jsx)(rn.Z,{selectable:!1,themeClass:p()(tn.Z.keyDefaultTheme,tn.Z.unified),children:(0,D.jsx)(on.Z,{node:n.params[0],onSelect:function(){}})})},e)}))}),(0,D.jsxs)("div",{className:k.macroActions,children:[(0,D.jsx)(Q.Z,{onClick:function(){return o(A)},children:"Add to macro"}),(0,D.jsx)(Q.Z,{onClick:function(){return o([])},secondary:!0,children:"Cancel"})]})]})})}var fn=r(82607),bn=r(41051),mn=r(56803),hn=r(29709),yn=r(63105),gn=r.n(yn),vn=r(7739),xn=r.n(vn),Cn=r(35161),En=r.n(Cn),wn=r(44908),jn=r.n(wn),Bn=r(5454),Sn=r(27234),On=r(95130),kn=r(81485),Pn=r(41696);function In(n){return function(n){if(Array.isArray(n))return Dn(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||Zn(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 Zn(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}}function Dn(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r1){var o=xn()(t,"affectedParamIndex");for(var i in o){var a=o[i];a.length>1&&n.push({message:"Multiple substitions to the same binding parameter",affectedBindings:jn()([].concat(In(En()(a,"controlBindingIndex")),[r]))})}}return n}),[])}(e)),In(function(n,e){return n.reduce((function(n,r){var t,o,i=e[r.affectedBindingIndex];if(i&&0===r.affectedParamIndex){var a,l=(t=Bn.baseParametersByCode[i.value]||[],o=1,function(n){if(Array.isArray(n))return n}(t)||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,u=!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){u=!0,o=n}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,o)||Zn(t,o)||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];(null==l||null===(a=l.enum)||void 0===a?void 0:a.some((function(n){return n.additionalParams})))&&n.push({message:"Parameter assignment may affect additional parameters",affectedBindings:[r.affectedBindingIndex]})}return n}),[])}(e,n)),In(function(n,e,r){return n.reduce((function(n,t){var o=t.controlBindingIndex,i=t.affectedBindingIndex,a=t.affectedParamIndex;if(-1===i)return n;var l=e[i],c=(0,Pn.L)(l,r);return c&&c.length-1n.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);r"},bindings:{parsed:[{value:"&none",params:[]}],raw:"&none"}}};return o.name=n,o.labels=r,o.properties.label={parsed:t,raw:'"'.concat(t,'"')},o}(c,a))}),[c,t,a]),p=(0,ue.zq)(c);return(0,D.jsx)($.Z,{onDismiss:o,children:(0,D.jsxs)(nn.Z,{dismissText:null,children:[(0,D.jsx)("h3",{children:"Add new macro"}),(0,D.jsx)("div",{children:(0,D.jsxs)("label",{children:["Macro name: ",(0,D.jsx)(he.Z,{required:!0,value:c,validator:ue.zq,onChange:s})]})}),(0,D.jsx)("p",{children:(0,D.jsxs)("em",{children:["This value will be used for binding the macro's actions in your keymap (e.g. ",(0,D.jsxs)("code",{children:["&",c]}),") and should be unique. It will also be used internally for the node name and label property, which you can customize later."]})}),(0,D.jsxs)("div",{style:{textAlign:"center",margin:"10px"},children:[(0,D.jsx)(Q.Z,{disabled:!c||p,onClick:d,children:"Create"}),(0,D.jsx)(Q.Z,{onClick:o,secondary:!0,children:"Cancel"})]})]})})}ge.propTypes={onCreate:s().func.isRequired,onCancel:s().func.isRequired};var ve=r(2968);function xe(n){return xe="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},xe(n)}function Ce(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 Ee(n){for(var e=1;en.length)&&(e=n.length);for(var r=0,t=new Array(e);rn.length)&&(e=n.length);for(var r=0,t=new Array(e);r * {\n margin: 5px;\n}\n\n.TBgT7nB7JSSjnTpMQeXp {\n position: relative;\n width: 450px;\n /* border: 1px solid lightgray; */\n margin: 0 auto;\n padding: 5px;\n\n display: flex;\n flex-wrap: wrap;\n}\n\n.TBgT7nB7JSSjnTpMQeXp > * {\n margin: 5px;\n width: 65px;\n height: 65px;\n}\n\n.YMJbsLvnEGObUy4Y_i6w {\n width: 100%;\n height: 30px;\n box-sizing: border-box;\n}\n.YMJbsLvnEGObUy4Y_i6w:hover {\n background-color: var(--hover-selection);\n color: var(--key-color-hover);\n}\n.YMJbsLvnEGObUy4Y_i6w > :first-child {\n width: 100% !important;\n height: 100% !important;\n}\n\n.TBgT7nB7JSSjnTpMQeXp [draggable] {\n cursor: grab;\n}\n\n.I5drc4dA5Kpshp3PPle1 {\n visibility: hidden;\n position: absolute;\n top: 0px;\n right: 0px;\n font-size: 80%;\n\n color: var(--key-color-hover);\n}\n.I5drc4dA5Kpshp3PPle1 > * {\n margin: 2px;\n opacity: 0.5;\n cursor: pointer;\n}\n.TBgT7nB7JSSjnTpMQeXp :hover .I5drc4dA5Kpshp3PPle1 {\n visibility: visible;\n z-index: 10;\n}\n\n.I5drc4dA5Kpshp3PPle1 :hover {\n opacity: 1;\n}\n\n\n.iD9DsKMZZ1dQxr04488w {\n margin: 10px 0;\n display: flex;\n}\n\n.iD9DsKMZZ1dQxr04488w label {\n display: inline-block;\n width: 120px;\n text-align: right;\n margin-right: 10px;\n}\n\n.quGO7XFPrHoYiqu22mwg {\n font-size: 80%;\n}\n\n.ziS4tbh9X5RXMVKil0ZJ {\n width: 450px;\n margin: 0 auto;\n}\n.ziS4tbh9X5RXMVKil0ZJ .e5WrxtOt36BgXq_LJJSL {\n color: indianred\n}\n\n.BP90__cBSejXKVP6ojjM {\n cursor: pointer;\n}\n\n.Lvxxm3_prm2iJ0zIfRNq {\n outline: 2px solid crimson;\n}\n","",{version:3,sources:["webpack://./src/Keyboard/Macros/styles.module.css"],names:[],mappings:"AAAA;EACE,oBAAoB;AACtB;;AAEA;EACE,YAAY;EACZ,gBAAgB;AAClB;AACA;EACE,kBAAkB;EAClB,gBAAgB;EAChB,iBAAiB;EACjB,wCAAwC;AAC1C;;AAEA;EACE,YAAY;EACZ,sBAAsB;AACxB;AACA;EACE,aAAa;EACb,kBAAkB;EAClB,8BAA8B;EAC9B,2CAA2C;EAC3C,aAAa;AACf;AACA;EACE,SAAS;AACX;AACA;EACE,eAAe;EACf,YAAY;EACZ,YAAY;AACd;AACA;EACE,UAAU;AACZ;AACA;EACE,oBAAoB;AACtB;;AAEA;EACE,kBAAkB;AACpB;AACA;EACE,WAAW;AACb;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,iCAAiC;EACjC,cAAc;EACd,YAAY;;EAEZ,aAAa;EACb,eAAe;AACjB;;AAEA;EACE,WAAW;EACX,WAAW;EACX,YAAY;AACd;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,sBAAsB;AACxB;AACA;EACE,wCAAwC;EACxC,6BAA6B;AAC/B;AACA;EACE,sBAAsB;EACtB,uBAAuB;AACzB;;AAEA;EACE,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,QAAQ;EACR,UAAU;EACV,cAAc;;EAEd,6BAA6B;AAC/B;AACA;EACE,WAAW;EACX,YAAY;EACZ,eAAe;AACjB;AACA;EACE,mBAAmB;EACnB,WAAW;AACb;;AAEA;EACE,UAAU;AACZ;;;AAGA;EACE,cAAc;EACd,aAAa;AACf;;AAEA;EACE,qBAAqB;EACrB,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,YAAY;EACZ,cAAc;AAChB;AACA;EACE;AACF;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,0BAA0B;AAC5B",sourcesContent:[".main {\n padding-bottom: 60px;\n}\n\n.header, .footer {\n width: 550px;\n margin: 1px auto;\n}\n.footer {\n text-align: center;\n margin-top: 10px;\n padding-top: 20px;\n border-top: 2px solid var(--key-bg-base);\n}\n\n.macro {\n width: 550px;\n margin: 10px auto 40px;\n}\n.heading {\n display: flex;\n position: relative;\n justify-content: space-between;\n border-bottom: 2px solid var(--key-bg-base);\n margin: 5px 0;\n}\n.heading h5 {\n margin: 0;\n}\n.action {\n cursor: pointer;\n padding: 5px;\n opacity: 0.6;\n}\n.action:hover {\n opacity: 1;\n}\n.remove {\n color: var(--delete);\n}\n\n.macroActions {\n text-align: center;\n}\n.macroActions > * {\n margin: 5px;\n}\n\n.macroBindings {\n position: relative;\n width: 450px;\n /* border: 1px solid lightgray; */\n margin: 0 auto;\n padding: 5px;\n\n display: flex;\n flex-wrap: wrap;\n}\n\n.macroBindings > * {\n margin: 5px;\n width: 65px;\n height: 65px;\n}\n\n.controlBinding {\n width: 100%;\n height: 30px;\n box-sizing: border-box;\n}\n.controlBinding:hover {\n background-color: var(--hover-selection);\n color: var(--key-color-hover);\n}\n.controlBinding > :first-child {\n width: 100% !important;\n height: 100% !important;\n}\n\n.macroBindings [draggable] {\n cursor: grab;\n}\n\n.actions {\n visibility: hidden;\n position: absolute;\n top: 0px;\n right: 0px;\n font-size: 80%;\n\n color: var(--key-color-hover);\n}\n.actions > * {\n margin: 2px;\n opacity: 0.5;\n cursor: pointer;\n}\n.macroBindings :hover .actions {\n visibility: visible;\n z-index: 10;\n}\n\n.actions :hover {\n opacity: 1;\n}\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.betaDisclaimer {\n font-size: 80%;\n}\n\n.parameterWarnings {\n width: 450px;\n margin: 0 auto;\n}\n.parameterWarnings .message {\n color: indianred\n}\n\n.warningHighlightIcon {\n cursor: pointer;\n}\n\n.bindingWarningHighlight {\n outline: 2px solid crimson;\n}\n"],sourceRoot:""}]),a.locals={main:"kc8Au327pmIjKO7auLXT",header:"iNHvhyaEJ4ILoK0oc97e",footer:"QSl4rRImPNo_Abu68kKW",macro:"Us3Ihf0AoVbZvDulP74Q",heading:"OVI4IkVsVzyk0eIAn9NX",action:"QNlSO_GSGhRfUFRE_v8E",remove:"DvzBwGDH7HsnnIbqaeHi",macroActions:"mwhR_W7iqHq803xNBV1H",macroBindings:"TBgT7nB7JSSjnTpMQeXp",controlBinding:"YMJbsLvnEGObUy4Y_i6w",actions:"I5drc4dA5Kpshp3PPle1",field:"iD9DsKMZZ1dQxr04488w",betaDisclaimer:"quGO7XFPrHoYiqu22mwg",parameterWarnings:"ziS4tbh9X5RXMVKil0ZJ",message:"e5WrxtOt36BgXq_LJJSL",warningHighlightIcon:"BP90__cBSejXKVP6ojjM",bindingWarningHighlight:"Lvxxm3_prm2iJ0zIfRNq"},e.Z=a},45652:function(n,e,r){var t=r(88668),o=r(47443),i=r(1196),a=r(74757),l=r(23593),c=r(21814);n.exports=function(n,e,r){var u=-1,s=o,d=n.length,p=!0,A=[],f=A;if(r)p=!1,s=i;else if(d>=200){var b=e?null:l(n);if(b)return c(b);p=!1,s=a,f=new t}else f=e?[]:A;n:for(;++u