"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8381],{97494:function(e,n,r){r.d(n,{Z:function(){return S}});var t=r(45697),o=r.n(t),i=r(93379),a=r.n(i),l=r(7795),c=r.n(l),u=r(90569),s=r.n(u),p=r(3565),f=r.n(p),d=r(19216),y=r.n(d),b=r(44589),A=r.n(b),m=r(33988),h={};h.styleTagTransform=A(),h.setAttributes=f(),h.insert=s().bind(null,"head"),h.domAPI=c(),h.insertStyleElement=y(),a()(m.Z,h);var v=m.Z&&m.Z.locals?m.Z.locals:void 0,g=r(85893);function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}var x=["validator","required","value"];function C(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function O(e){for(var n=1;n=0||(o[r]=e[r]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,x),l=n(i)||!i&&t&&"cannot be empty";return(0,g.jsxs)("span",{className:v.wrapper,children:[(0,g.jsx)("input",O({type:"text",value:i},a)),l&&(0,g.jsx)("span",{className:v.error,children:l})]})}S.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},98381:function(e,n,r){r.r(n),r.d(n,{default:function(){return vn}});var t=r(67294),o=r(95998),i=r(27926),a=r(41051),l=r(50361),c=r.n(l),u=r(57557),s=r.n(u),p=r(96186),f=r(64261),d=r(18311),y=r(49443),b=r(85893);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function m(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function h(e){for(var n=1;ne.length)&&(n=e.length);for(var r=0,t=new Array(n);r20?me:Ae;return(0,b.jsx)(s,{selected:c,choices:a,onUpdate:u})}function Ae(e){var n=e.selected,r=e.choices,o=e.onUpdate,i=(0,t.useCallback)((function(e){o(n.includes(e)?n.filter((function(n){return n!==e})):[].concat(ce(n),[e]))}),[n,o]);return(0,b.jsx)("ol",{className:F.propertyMultiSelect,children:r.map((function(e,r){return(0,b.jsx)("li",{children:(0,b.jsxs)("label",{children:[(0,b.jsx)("input",{type:"checkbox",checked:n.includes(e),onChange:function(n){return i(e)}}),e]})},r)}))})}function me(e){var n,r,o=e.selected,l=e.choices,c=e.onUpdate,u=(n=(0,t.useState)(!1),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===n){if(Object(r)!==r)return;c=!1}else for(;!(c=(t=i.call(r)).done)&&(l.push(t.value),l.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(n,r)||ue(n,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=u[0],p=u[1],d=(0,t.useCallback)((function(e){c([].concat(ce(o),[e])),p(!1)}),[p,o,c]),y=(0,t.useCallback)((function(e){c(o.filter((function(n){return n!==e})))}),[o,c]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("ul",{className:F.propertyMultiSelectChips,children:o.map((function(e,n){return(0,b.jsx)("li",{children:(0,b.jsxs)("span",{className:F.behaviorBind,children:[e," ",(0,b.jsx)(a.Z,{name:"times",className:F.phandleRemove,onClick:function(){return y(e)}})]})},n)}))}),(0,b.jsxs)(i.Z,{secondary:!0,onClick:function(){return p(!0)},children:[(0,b.jsx)(a.Z,{name:"plus"})," Add"]}),s&&(0,b.jsx)(f.Z,{onDismiss:function(){return p(!1)},children:(0,b.jsx)(ae,{choices:l,onSelect:d})})]})}var he=r(39693),ve=r.n(he),ge=r(98588),je=r(29709);function xe(e){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xe(e)}function Ce(e){return function(e){if(Array.isArray(e))return Be(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ee(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.")}()}function Oe(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function we(e){for(var n=1;ne.length)&&(n=e.length);for(var r=0,t=new Array(n);re.length)&&(n=e.length);for(var r=0,t=new Array(n);re.length)&&(n=e.length);for(var r=0,t=new Array(n);r0&&(0,b.jsx)("p",{children:(0,b.jsxs)("em",{children:[(0,b.jsx)("span",{className:I.requiredIndicator,children:"*"}),"Property is required."]})}),(0,b.jsxs)("div",{style:{textAlign:"center"},children:[(0,b.jsx)(i.Z,{disabled:B.length>0,onClick:C,children:"Okay"}),(0,b.jsx)(i.Z,{onClick:y,secondary:!0,children:"Cancel"})]})]})})})},He=r(2968);function Le(e){var n=e.onDismiss,r=(0,b.jsx)(He.Z,{external:!0,href:"https://github.com/nickcoutsos/keymap-editor/issues",children:"Keymap Editor Issues"});return(0,b.jsx)(f.Z,{onDismiss:n,children:(0,b.jsxs)(p.Z,{onDismiss:n,style:{maxHeight:"80vh",overflow:"scroll"},children:[(0,b.jsx)("h2",{children:"Behavior Editing Beta Test"}),(0,b.jsx)("p",{children:"Welcome to the behavior editing beta!"}),(0,b.jsx)("p",{children:"This feature has been a long time coming, and while it should enable a lot of advanced ZMK features through the app it is still a work in progress. Some features are still missing so the use experience is a little rough, and there may be errors as well. Some familiarity with ZMK behavior functionality is expected."}),(0,b.jsxs)("p",{children:["I've been using it for a while and it seems to be in a pretty workable state, but I can't catch everything, so it would mean a lot to me for you to share any feedback or issues on GitHub: ",r,"."]})]})})}var $e=r(95130),Je=r(69247);function en(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r")}),e}),{}))}}var fn=r(28291);function dn(e){return dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(e)}function yn(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function bn(e){for(var n=1;ne.length)&&(n=e.length);for(var r=0,t=new Array(n);re.length)&&(n=e.length);for(var r=0,t=new Array(n);re.length)&&(n=e.length);for(var r=0,t=new Array(n);r * {\n margin: 2px;\n opacity: 0.5;\n cursor: pointer;\n}\n.gsAzkKxnfzTcp5ApwmWS li :hover .KrcWDYfRVRfvRhpsBFxs {\n visibility: visible;\n z-index: 10;\n}\n\n.KrcWDYfRVRfvRhpsBFxs :hover {\n opacity: 1;\n}\n',"",{version:3,sources:["webpack://./src/Keyboard/Behaviors/PropertyValue/styles.module.css"],names:[],mappings:"AAAA;EACE,mBAAmB;EACnB,WAAW;EACX,aAAa;AACf;;AAEA;;;EAGE,WAAW;AACb;;AAEA;EACE,qBAAqB;EACrB,aAAa;EACb,UAAU;AACZ;AACA;EACE,qBAAqB;EACrB,SAAS;EACT,UAAU;AACZ;AACA;EACE,qBAAqB;EACrB,iBAAiB;AACnB;AACA;EACE,SAAS;AACX;AACA;EACE,iBAAiB;AACnB;AACA;EACE,qBAAqB;EACrB,UAAU;AACZ;AACA;EACE,eAAe;EACf,WAAW;EACX,YAAY;EACZ,sBAAsB;EACtB,mBAAmB;EACnB,oCAAoC;AACtC;AACA;EACE,wCAAwC;EACxC,YAAY;AACd;;AAEA;EACE,2BAA2B;EAC3B,aAAa;AACf;AACA;EACE,YAAY;AACd;;AAEA;EACE,aAAa;EACb,eAAe;EACf,SAAS;EACT,qBAAqB;EACrB,UAAU;EACV,SAAS;AACX;;AAEA,+BAA+B;AAC/B;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",sourcesContent:['.propertyValue [readonly] {\n cursor: not-allowed;\n color: gray;\n outline: gray;\n}\n\ninput.propertyValue[type="text"],\ninput.propertyValue[type="number"],\nselect.propertyValue {\n width: 100%;\n}\n\nol.propertyMultiSelect {\n list-style-type: none;\n margin-top: 0;\n padding: 0;\n}\n.propertyMultiSelectChips {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n.propertyMultiSelectChips li {\n display: inline-block;\n line-height: 2rem;\n}\nol.propertyPhandleSelect {\n margin: 0;\n}\nol.propertyPhandleSelect li {\n line-height: 2rem;\n}\nol.propertyPhandleSingleton {\n list-style-type: none;\n padding: 0;\n}\n.behaviorBind {\n cursor: pointer;\n margin: 2px;\n padding: 5px;\n font-family: monospace;\n border-radius: 1rem;\n background-color: var(--key-bg-base);\n}\n.behaviorBind:hover {\n background-color: var(--hover-selection);\n color: white;\n}\n\n.phandleRemove {\n vertical-align: text-bottom;\n margin: 0 2px;\n}\n.phandleRemove:hover {\n color: black;\n}\n\n.propertyBindingsValue {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n list-style-type: none;\n padding: 0;\n margin: 0;\n}\n\n/* Copied from MacroEditor :( */\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.propertyBindingsValue li :hover .actions {\n visibility: visible;\n z-index: 10;\n}\n\n.actions :hover {\n opacity: 1;\n}\n'],sourceRoot:""}]),a.locals={propertyValue:"S3t60CK1JCROFIrRlm4j",propertyMultiSelect:"MedG7SPG2ge2h7j2yqrJ",propertyMultiSelectChips:"V50Bekt6td9yQOSiDGdx",propertyPhandleSelect:"QNg3v6_eJoK7_qV0_y9n",propertyPhandleSingleton:"u65C3Uji7covMUn996dR",behaviorBind:"xp5u4Uo4X2fxxX9KwwXu",phandleRemove:"gpFGP00LCwlGjK6yrGWw",propertyBindingsValue:"gsAzkKxnfzTcp5ApwmWS",actions:"KrcWDYfRVRfvRhpsBFxs"},n.Z=a},34288:function(e,n,r){var t=r(87537),o=r.n(t),i=r(23645),a=r.n(i)()(o());a.push([e.id,".kcj881bnLDph62EcKelj {\n padding-bottom: 60px;\n}\n\n.GeuMxQtBvZYr0nOURDHd {\n display: flex;\n width: 190px;\n flex-direction: column;\n padding: 10px;\n gap: 10px;\n position: fixed;\n}\n\n.NqlHG1MKBiOUUFAed3CM {\n max-width: 700px;\n margin: 0 auto;\n padding-bottom: 60px;\n}\n\n.NqlHG1MKBiOUUFAed3CM table {\n border-spacing: 0;\n}\n.NqlHG1MKBiOUUFAed3CM table thead {\n text-align: left;\n}\n\n.NqlHG1MKBiOUUFAed3CM table tbody tr td {\n padding: 10px;\n margin: 0;\n}\n.NqlHG1MKBiOUUFAed3CM table tbody tr:nth-child(even) {\n background-color: var(--key-bg-base);\n}\n\n.Q3_rmo3XiEVg8qfXgKX_ {\n cursor: pointer;\n padding: 5px;\n opacity: 0.6;\n}\n.Q3_rmo3XiEVg8qfXgKX_:hover {\n opacity: 1;\n}\n\ntable.czOKx_t_EDF44pilzyzA { max-height: 80vh; }\ntable.czOKx_t_EDF44pilzyzA th { text-align: left }\ntable.czOKx_t_EDF44pilzyzA input { font-family: monospace }\ntable.czOKx_t_EDF44pilzyzA td {\n padding: 4px;\n vertical-align: top;\n}\ntable.czOKx_t_EDF44pilzyzA .s8rWNi6e8BZ7yQubfDws {\n font-family: monospace;\n}\n.Bux6GxjreGZZkcXqx6kv {\n display: block;\n font-style: italic;\n}\n\n.xvIZYbb8L5QbOLcesQ4T {\n color: red;\n font-style: italic;\n}\n","",{version:3,sources:["webpack://./src/Keyboard/Behaviors/styles.module.css"],names:[],mappings:"AAAA;EACE,oBAAoB;AACtB;;AAEA;EACE,aAAa;EACb,YAAY;EACZ,sBAAsB;EACtB,aAAa;EACb,SAAS;EACT,eAAe;AACjB;;AAEA;EACE,gBAAgB;EAChB,cAAc;EACd,oBAAoB;AACtB;;AAEA;EACE,iBAAiB;AACnB;AACA;EACE,gBAAgB;AAClB;;AAEA;EACE,aAAa;EACb,SAAS;AACX;AACA;EACE,oCAAoC;AACtC;;AAEA;EACE,eAAe;EACf,YAAY;EACZ,YAAY;AACd;AACA;EACE,UAAU;AACZ;;AAEA,6BAAmB,gBAAgB,EAAE;AACrC,gCAAsB,iBAAiB;AACvC,mCAAyB,uBAAuB;AAChD;EACE,YAAY;EACZ,mBAAmB;AACrB;AACA;EACE,sBAAsB;AACxB;AACA;EACE,cAAc;EACd,kBAAkB;AACpB;;AAEA;EACE,UAAU;EACV,kBAAkB;AACpB",sourcesContent:[".main {\n padding-bottom: 60px;\n}\n\n.sidebar {\n display: flex;\n width: 190px;\n flex-direction: column;\n padding: 10px;\n gap: 10px;\n position: fixed;\n}\n\n.panel {\n max-width: 700px;\n margin: 0 auto;\n padding-bottom: 60px;\n}\n\n.panel table {\n border-spacing: 0;\n}\n.panel table thead {\n text-align: left;\n}\n\n.panel table tbody tr td {\n padding: 10px;\n margin: 0;\n}\n.panel table tbody tr:nth-child(even) {\n background-color: var(--key-bg-base);\n}\n\n.action {\n cursor: pointer;\n padding: 5px;\n opacity: 0.6;\n}\n.action:hover {\n opacity: 1;\n}\n\ntable.editorForm { max-height: 80vh; }\ntable.editorForm th { text-align: left }\ntable.editorForm input { font-family: monospace }\ntable.editorForm td {\n padding: 4px;\n vertical-align: top;\n}\ntable.editorForm .propertyName {\n font-family: monospace;\n}\n.propertyDeprecation {\n display: block;\n font-style: italic;\n}\n\n.requiredIndicator {\n color: red;\n font-style: italic;\n}\n"],sourceRoot:""}]),a.locals={main:"kcj881bnLDph62EcKelj",sidebar:"GeuMxQtBvZYr0nOURDHd",panel:"NqlHG1MKBiOUUFAed3CM",action:"Q3_rmo3XiEVg8qfXgKX_",editorForm:"czOKx_t_EDF44pilzyzA",propertyName:"s8rWNi6e8BZ7yQubfDws",propertyDeprecation:"Bux6GxjreGZZkcXqx6kv",requiredIndicator:"xvIZYbb8L5QbOLcesQ4T"},n.Z=a}}]); //# sourceMappingURL=8381.7ec7bc962edc67495152.js.map