diff options
Diffstat (limited to '2679.b4e9e4b30761a92e581e.js')
-rw-r--r-- | 2679.b4e9e4b30761a92e581e.js | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/2679.b4e9e4b30761a92e581e.js b/2679.b4e9e4b30761a92e581e.js deleted file mode 100644 index 56ccafa..0000000 --- a/2679.b4e9e4b30761a92e581e.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 2679.b4e9e4b30761a92e581e.js.LICENSE.txt */ -(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2679],{27926:function(t,e,r){"use strict";r.d(e,{Z:function(){return k}});var n=r(93379),o=r.n(n),a=r(7795),i=r.n(a),c=r(90569),u=r.n(c),l=r(3565),s=r.n(l),f=r(19216),d=r.n(f),p=r(44589),y=r.n(p),h=r(56281),m={};m.styleTagTransform=y(),m.setAttributes=s(),m.insert=u().bind(null,"head"),m.domAPI=i(),m.insertStyleElement=d(),o()(h.Z,m);var v=h.Z&&h.Z.locals?h.Z.locals:void 0,b=r(85893);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}var A=["children","secondary","className"];function w(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?w(Object(r),!0).forEach((function(e){O(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function O(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==g(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===g(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function j(t){var e=t.children,r=t.secondary,n=t.className,o=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,A);return(0,b.jsx)("button",x(x({className:[n,v.action,r&&v.secondary].join(" ")},o),{},{children:e}))}j.defaultProps={className:""};var k=j},86042:function(t,e,r){"use strict";r.r(e),r.d(e,{ClipboardPicker:function(){return St},default:function(){return Lt}});var n=r(50361),o=r.n(n),a=r(67294),i=r(97168),c=r(85893);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===u(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(t,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(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var y="keymap_editor_clipboard_keyboards",h="".concat(y,":"),m="keymap_editor_clipboard_selected_keyboard",v=JSON.stringify({keymapRaw:"",keymapParsed:null,metadataRaw:"",metadataParsed:null});function b(){var t,e=JSON.parse(localStorage.getItem(m)||"null"),r=JSON.parse(localStorage.getItem(y)||"[]"),n=e||(null===(t=r[0])||void 0===t?void 0:t.id),o=JSON.parse(localStorage.getItem("".concat(h).concat(n))||"null"),a=null==o?void 0:o.keymapRaw,i=null==o?void 0:o.keymapParsed,c=null==o?void 0:o.metadataRaw,u=null==o?void 0:o.metadataParsed;return{keyboards:r,selectedKeyboard:n,keymapRaw:a,keymapParsed:i,metadataRaw:c,metadataParsed:u,modalOpen:!a,pending:{keymapRaw:a,keymapParsed:i,metadataRaw:c,metadataParsed:u}}}var g=(0,i.oM)({name:"clipboard-picker",initialState:b,reducers:{selectedKeyboard:function(t,e){t.selectedKeyboard=e.payload.keyboard;var r="".concat(h).concat(t.selectedKeyboard),n=JSON.parse(localStorage.getItem(r)||v),o=n.keymapRaw,a=n.keymapParsed,i=n.metadataRaw,c=n.metadataParsed;t.keymapRaw=o,t.keymapParsed=a,t.metadataRaw=i,t.metadataParsed=c,localStorage.setItem(m,JSON.stringify(t.selectedKeyboard))},addKeyboard:function(t,e){var r=e.payload,n=r.id,o=r.name,a={id:n,name:void 0===o?null:o};t.keyboards.push(a),localStorage.setItem(y,JSON.stringify(t.keyboards)),localStorage.setItem("".concat(h).concat(n),v)},setKeymap:function(t,e){var r=e.payload,n=r.raw,o=r.parsed,a=r.pending,i=void 0!==a&&a;t.pending.keymapRaw=n,t.pending.keymapParsed=o,i||(t.keymapRaw=n,t.keymapParsed=o)},setMetadata:function(t,e){var r=e.payload,n=r.raw,o=r.parsed,a=r.pending,i=void 0!==a&&a?t.pending:t;i.metadataRaw=n,i.metadataParsed=o},confirmPending:function(t){t.keymapRaw=t.pending.keymapRaw,t.keymapParsed=t.pending.keymapParsed,t.metadataRaw=t.pending.metadataRaw,t.metadataParsed=t.pending.metadataParsed;var e="".concat(h).concat(t.selectedKeyboard);localStorage.setItem(e,JSON.stringify({keymapRaw:t.keymapRaw,keymapParsed:t.keymapParsed,metadataRaw:t.metadataRaw,metadataParsed:t.metadataParsed}));var r=t.keyboards.find((function(e){return e.id===t.selectedKeyboard}));r.name||(r.name=t.metadataParsed.name,localStorage.setItem(y,JSON.stringify(t.keyboards)))},openModal:function(t){t.modalOpen=!0,t.pending.keymapRaw=t.keymapRaw,t.pending.keymapParsed=t.keymapParsed,t.pending.metadataRaw=t.metadataRaw,t.pending.metadataParsed=t.metadataRaw?JSON.parse(t.metadataRaw):null},closeModal:function(t){t.modalOpen=!1}}});var A=(0,a.createContext)([{},{}]);function w(t){var e=t.children,r=d(function(){var t,e=d((0,a.useReducer)(g.reducer,null,b),2),r=e[0],n=(t=e[1],(0,a.useMemo)((function(){return Object.keys(g.actions).reduce((function(e,r){return e[r]=function(){var e;return t((e=g.actions)[r].apply(e,arguments))},e}),{})}),[t]));return[r,n]}(),2),n=r[0],o=r[1];return(0,c.jsx)(A.Provider,{value:[n,o],children:e})}var x=r(91829),O=r(64261),j=r(96186),k=r(27926),E=r(80031),C=r(33295),P=r.n(C),S=r(41696);function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}var L=["value","onChange"];function I(){I=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),c=new k(o||[]);return n(i,"_invoke",{value:w(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function d(){}function p(){}function y(){}var h={};u(h,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(E([])));v&&v!==e&&r.call(v,a)&&(h=v);var b=y.prototype=d.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(n,a,i,c){var u=s(t[n],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==B(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return o("throw",t,i,c)}))}c(u.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function w(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function E(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=y,n(b,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:p,configurable:!0}),p.displayName=u(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},g(A.prototype),u(A.prototype,i,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new A(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(b),u(b,c,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=E,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function N(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_(Object(r),!0).forEach((function(e){T(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function T(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==B(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===B(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function D(t){var e,r,n=t.value,o=t.onChange,i=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,L),u=(e=(0,a.useState)({raw:n,parsed:null}),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return Z(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(t,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=u[0].raw,s=u[1];(0,a.useEffect)((function(){s((function(t){return R(R({},t),{},{raw:n})}))}),[n,s]);var f=(0,a.useCallback)((function(t){var e=t.target.value;s((function(t){return R(R({},t),{},{raw:e})}))}),[s]);return(0,a.useEffect)((function(){function t(){var e;return e=I().mark((function t(){var e;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,P()(l);case 2:e=t.sent,(0,S.L)(e),s((function(t){return R(R({},t),{},{parsed:e})})),o({raw:l,parsed:e});case 6:case"end":return t.stop()}}),t)})),t=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(t){N(a,n,o,i,c,"next",t)}function c(t){N(a,n,o,i,c,"throw",t)}i(void 0)}))},t.apply(this,arguments)}l&&function(){t.apply(this,arguments)}()}),[l,s,o]),(0,c.jsx)("textarea",R({onChange:f,value:l},i))}var K=r(93379),Y=r.n(K),U=r(7795),M=r.n(U),F=r(90569),G=r.n(F),J=r(3565),q=r.n(J),z=r(19216),Q=r.n(z),W=r(44589),H=r.n(W),$=r(8153),V={};V.styleTagTransform=H(),V.setAttributes=q(),V.insert=G().bind(null,"head"),V.domAPI=M(),V.insertStyleElement=Q(),Y()($.Z,V);var X=$.Z&&$.Z.locals?$.Z.locals:void 0;function tt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return et(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?et(t,e):void 0}}(t,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 et(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function rt(t){var e=t.onSubmit,r=t.onCancel,n=tt((0,a.useContext)(A),2),o=n[0],i=n[1],u=o.pending,l=tt((0,x.Z)(!u.metadataRaw),2),s=l[0],f=l[1],d=(0,a.useCallback)((function(t){var e=t.target.value,r=null,n=null;try{r=JSON.parse(e)}catch(t){n=t}i.setMetadata({pending:!0,raw:e,parsed:r,errors:n})}),[i]),p=(0,a.useCallback)((function(t){var e=t.raw,r=t.parsed;i.setKeymap({pending:!0,raw:e,parsed:r})}),[i]),y=(0,a.useCallback)((function(){i.confirmPending(),e({keymap:u.keymapParsed,metadata:u.metadataParsed})}),[i,u,e]),h=!u.metadataParsed||!u.keymapParsed;return(0,c.jsx)(O.Z,{onDismiss:r,children:(0,c.jsxs)(j.Z,{style:{maxWidth:"640px",maxHeight:"90vh",overflow:"auto"},dismissText:null,children:[(0,c.jsxs)("article",{className:X.source,"data-expanded":s,children:[(0,c.jsxs)("h2",{onClick:f,children:["Keyboard",u.metadataParsed&&(0,c.jsxs)(c.Fragment,{children:[": ",(0,c.jsx)("code",{children:u.metadataParsed.name})]})]}),(0,c.jsxs)("section",{className:X.sourceContent,children:[(0,c.jsx)("p",{children:"In order to understand what keyboard you're using and now to display it visually, please paste the JSON source metadata file below."}),u.metadataParsed&&(0,c.jsxs)("p",{children:["Parsed metadata for: ",u.metadataParsed.name]}),(0,c.jsx)("textarea",{cols:80,rows:u.metadataParsed?22:5,wrap:"off",spellCheck:!1,value:u.metadataRaw,onChange:d}),!u.metadataParsed&&(0,c.jsxs)("div",{className:X.metadataHelp,children:[(0,c.jsx)("h3",{children:"Not sure what to put here?"}),(0,c.jsxs)("p",{children:["The ",(0,c.jsx)("em",{children:"Keymap Editor"})," app depends on a defined keyboard layout both to provide a friendly graphical representation to edit and a readable textual representation. You can learn more about this at ",E.Jh,"."]}),(0,c.jsxs)("p",{children:["Note: If your keyboard works with QMK's Configurator you may be able to quickly get a visual representation by pasting the contents of that keyboard's ",(0,c.jsx)("code",{children:"info.json"})," file here."]})]})]})]}),(0,c.jsx)("h2",{children:"Keymap"}),(0,c.jsxs)("p",{children:["Paste the devicetree source from your ",(0,c.jsx)("code",{children:".keymap"})," file below."]}),(0,c.jsxs)("p",{children:["You can ",(0,c.jsx)("em",{children:"technically"})," make changes directly to the DeviceTree code here, but this isn't intended as an editor."]}),(0,c.jsx)(D,{cols:80,rows:22,wrap:"off",spellCheck:!1,value:u.keymapRaw,onChange:p}),(0,c.jsxs)("p",{style:{textAlign:"center"},children:[(0,c.jsx)(k.Z,{disabled:h,onClick:y,children:"Set Keymap"}),(0,c.jsx)(k.Z,{onClick:r,secondary:!0,children:"Cancel"})]})]})})}var nt=r(18446),ot=r.n(nt),at=r(95998),it=r(83858),ct=r.n(it),ut=r(69247),lt=r(41051);function st(t){return st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},st(t)}function ft(){ft=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),c=new k(o||[]);return n(i,"_invoke",{value:w(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function d(){}function p(){}function y(){}var h={};u(h,a,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(E([])));v&&v!==e&&r.call(v,a)&&(h=v);var b=y.prototype=d.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(n,a,i,c){var u=s(t[n],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==st(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return o("throw",t,i,c)}))}c(u.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function w(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=x(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function x(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function E(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=y,n(b,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:p,configurable:!0}),p.displayName=u(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},g(A.prototype),u(A.prototype,i,(function(){return this})),t.AsyncIterator=A,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new A(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},g(b),u(b,c,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=E,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(j),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function dt(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function pt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){dt(a,n,o,i,c,"next",t)}function c(t){dt(a,n,o,i,c,"throw",t)}i(void 0)}))}}function yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ht(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach((function(e){mt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function mt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==st(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==st(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===st(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return bt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bt(t,e):void 0}}(t,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 bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var gt=function(t){var e;return null===(e=t.keyboard)||void 0===e?void 0:e.keymap};function At(){var t,e,r,n,i=(t=(0,at.v9)(gt),e=vt((0,a.useContext)(A),2),r=e[0],n=e[1],[(0,a.useMemo)((function(){return t&&r.keymapParsed&&!ot()(t,r.keymapParsed)}),[t,r.keymapParsed]),(0,a.useCallback)(pt(ft().mark((function e(){var a,i,c,u,l,s,f;return ft().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=r.metadataParsed.layouts,i=t.chosen["zmk,matrix_transform"]?t.chosen["zmk,matrix_transform"].replace(/^&/,""):null,c=Object.keys(a)[0],u=a[i]||a[c],l=u.layout,e.next=6,ct()(l,o()(t),r.keymapRaw);case 6:return s=e.sent,e.next=9,P()(s);case 9:return f=e.sent,(0,S.L)(f),n.setKeymap({raw:s,parsed:f}),e.abrupt("return",s);case 13:case"end":return e.stop()}}),e)}))),[t,r,n])]),u=vt(i,2),l={updateNeeded:u[0],update:u[1]};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(wt,ht({},l)),(0,c.jsx)(xt,ht({},l))]})}function wt(t){var e=t.updateNeeded,r=t.update,n=vt((0,a.useContext)(A),2),o=n[0].selectedKeyboard,i=n[1].openModal,u=(0,a.useCallback)(pt(ft().mark((function t(){return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=3;break}return t.next=3,r();case 3:i();case 4:case"end":return t.stop()}}),t)}))),[i,r,e]);if(o)return(0,c.jsx)(ut.zx,{onClick:u,title:"View/update keymap code",children:"Keymap"})}function xt(t){var e=t.updateNeeded,r=t.update,n=e?"Copy updated keymap":"No changes",o=vt((0,a.useContext)(A),1)[0].keymapParsed,i=vt((0,a.useState)(!1),2),u=i[0],l=i[1],s=(0,a.useCallback)(pt(ft().mark((function t(){var e;return ft().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r();case 3:return e=t.sent,t.next=6,navigator.clipboard.writeText(e);case 6:l(!0),setTimeout((function(){return l(!1)}),1500),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(0),console.error("Clipboard write failed"),console.log(t.t0);case 14:case"end":return t.stop()}}),t,null,[[0,10]])}))),[r]);return o?(0,c.jsx)(ut.zx,{title:n,disabled:!e,className:X.copyButton,onClick:s,"data-show-copied":u,children:(0,c.jsx)(lt.Z,{name:e?"clipboard-list":"clipboard-check"})}):null}function Ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function jt(){var t,e,r=(t=(0,a.useContext)(A),e=2,function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ot(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ot(t,e):void 0}}(t,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.")}())[1],n=r.selectedKeyboard,o=r.addKeyboard,i=r.openModal,u=(0,a.useCallback)((function(){var t=Date.now();o({id:t}),n({keyboard:t}),i()}),[o,n,i]);return(0,c.jsxs)("button",{onClick:u,children:[(0,c.jsx)(lt.Z,{name:"gear"})," Add Keyboard"]})}function kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Et(){var t,e,r=(t=(0,a.useContext)(A),e=2,function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return kt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kt(t,e):void 0}}(t,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.")}()),n=r[0],o=n.keyboards,i=n.selectedKeyboard,u=r[1].selectedKeyboard,l=(0,a.useMemo)((function(){return o.find((function(t){return t.id===i}))}),[o,i]),s=(0,a.useCallback)((function(t){u({keyboard:t.id})}),[u]);return 0===o.length?(0,c.jsx)(jt,{}):(0,c.jsx)(ut.Ph,{value:l,options:o,onChange:s,getOptionLabel:function(t){return t.name||"<unnamed>"},getOptionValue:function(t){return t.id},formatOptionLabel:function(t){return t.name||(0,c.jsx)("em",{children:"[unnamed]"})},children:(0,c.jsx)(jt,{})})}function Ct(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Pt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pt(t,e):void 0}}(t,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 Pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function St(t){var e=t.onSelect,r=(t.onError,Ct((0,a.useContext)(A),2)),n=r[0],i=r[1].closeModal,u=Ct((0,a.useState)(null),2),l=u[0],s=u[1],f=(0,a.useCallback)((function(t,r){var n=r.layouts,a=t.chosen["zmk,matrix_transform"]?t.chosen["zmk,matrix_transform"].replace(/^&/,""):null,i=Object.keys(n)[0],c=n[a]||n[i];e(o()({source:"clipboard",keyboard:"",layoutMetadata:c,layout:c.layout,keymap:t,sensors:c.sensors||[]}))}),[e]);(0,a.useEffect)((function(){n.keymapParsed&&n.metadataParsed&&f(n.keymapParsed,n.metadataParsed)}),[f,n.keymapParsed,n.metadataParsed]);var d=(0,a.useCallback)((function(t){var e=t.keymap,r=t.metadata;f(e,r),i()}),[f,i]);return(0,a.useEffect)((function(){l||(s(!0),n.keymapParsed&&n.metadataParsed&&f(n.keymapParsed,n.metadataParsed))}),[l,s,f,n]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Et,{}),(0,c.jsx)(At,{}),n.modalOpen&&(0,c.jsx)(rt,{onSubmit:d,onCancel:i})]})}var Bt,Lt=(Bt=St,function(t){return(0,c.jsx)(w,{children:(0,c.jsx)(Bt,s({},t))})})},56281:function(t,e,r){"use strict";var n=r(87537),o=r.n(n),a=r(23645),i=r.n(a)()(o());i.push([t.id,"button.pi2Ig8c3Fdh4H2Jpxdo7 {\n display: inline-block;\n cursor: pointer;\n background-color: var(--hover-selection);\n color: white;\n\n font-size: 16px;\n border: none;\n border-radius: 5px;\n padding: 0 5px;\n\n height: 30px;\n line-height: 30px;\n vertical-align: middle;\n}\n\nbutton.Ctpu4E2dZYJ6g8CUGFOF {\n color: var(--fg);\n background-color: transparent;\n}\n\nbutton.pi2Ig8c3Fdh4H2Jpxdo7[disabled] {\n filter: saturate(20%);\n opacity: .5;\n cursor: not-allowed;\n}\n","",{version:3,sources:["webpack://./src/Common/action-button.module.css"],names:[],mappings:"AAAA;EACE,qBAAqB;EACrB,eAAe;EACf,wCAAwC;EACxC,YAAY;;EAEZ,eAAe;EACf,YAAY;EACZ,kBAAkB;EAClB,cAAc;;EAEd,YAAY;EACZ,iBAAiB;EACjB,sBAAsB;AACxB;;AAEA;EACE,gBAAgB;EAChB,6BAA6B;AAC/B;;AAEA;EACE,qBAAqB;EACrB,WAAW;EACX,mBAAmB;AACrB",sourcesContent:["button.action {\n display: inline-block;\n cursor: pointer;\n background-color: var(--hover-selection);\n color: white;\n\n font-size: 16px;\n border: none;\n border-radius: 5px;\n padding: 0 5px;\n\n height: 30px;\n line-height: 30px;\n vertical-align: middle;\n}\n\nbutton.secondary {\n color: var(--fg);\n background-color: transparent;\n}\n\nbutton.action[disabled] {\n filter: saturate(20%);\n opacity: .5;\n cursor: not-allowed;\n}\n"],sourceRoot:""}]),i.locals={action:"pi2Ig8c3Fdh4H2Jpxdo7",secondary:"Ctpu4E2dZYJ6g8CUGFOF"},e.Z=i},8153:function(t,e,r){"use strict";var n=r(87537),o=r.n(n),a=r(23645),i=r.n(a)()(o());i.push([t.id,'.fnnwBtqwiwSQgnuN5sqg h2 {\n cursor: pointer;\n}\n\n.meN56P3rXkTYWdDY0oZq {\n height: auto;\n transition: height 100ms ease-out;\n}\n\n.H4OUxP43w5pZ9RYBB72x {\n background-color: rgba(0, 0, 0, 0.1);\n margin: 10px;\n padding: 0 10px;\n border-radius: 4px;\n}\n\n[data-expanded="false"] .meN56P3rXkTYWdDY0oZq {\n height: 0;\n overflow: hidden;\n}\n\n[data-expanded="false"] h2 {\n margin-bottom: 0;\n}\n\n.eVrbmh_w8MbnDUOfUD2N {\n position: relative;\n}\n.eVrbmh_w8MbnDUOfUD2N span {\n font-size: 120%;\n margin: auto 5px;\n}\n\n.eVrbmh_w8MbnDUOfUD2N[data-show-copied="true"]::after {\n content: "Copied!";\n position: absolute;\n right: -5px;\n top: 50%;\n\n transform: translate(100%, -50%);\n background-color: var(--selection);\n color: white;\n padding: 10px;\n border-radius: 4px;\n\n animation: normal 1.5s h0IIQBfKFzrLn6r9v5qG;\n}\n\n@keyframes h0IIQBfKFzrLn6r9v5qG {\n 0% { opacity: 0; width: 0; margin-left: -100%; }\n 2.5% { opacity: 1; width: auto; }\n 75% { opacity: 1; margin-left: 0; }\n 100% { opacity: 0; }\n}',"",{version:3,sources:["webpack://./src/Sources/Clipboard/styles.module.css"],names:[],mappings:"AAAA;EACE,eAAe;AACjB;;AAEA;EACE,YAAY;EACZ,iCAAiC;AACnC;;AAEA;EACE,oCAAoC;EACpC,YAAY;EACZ,eAAe;EACf,kBAAkB;AACpB;;AAEA;EACE,SAAS;EACT,gBAAgB;AAClB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;AACpB;AACA;EACE,eAAe;EACf,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,WAAW;EACX,QAAQ;;EAER,gCAAgC;EAChC,kCAAkC;EAClC,YAAY;EACZ,aAAa;EACb,kBAAkB;;EAElB,2CAA+B;AACjC;;AAEA;EACE,KAAK,UAAU,EAAE,QAAQ,EAAE,kBAAkB,EAAE;EAC/C,OAAO,UAAU,EAAE,WAAW,EAAE;EAChC,MAAM,UAAU,EAAE,cAAc,EAAE;EAClC,OAAO,UAAU,EAAE;AACrB",sourcesContent:['.source h2 {\n cursor: pointer;\n}\n\n.sourceContent {\n height: auto;\n transition: height 100ms ease-out;\n}\n\n.metadataHelp {\n background-color: rgba(0, 0, 0, 0.1);\n margin: 10px;\n padding: 0 10px;\n border-radius: 4px;\n}\n\n[data-expanded="false"] .sourceContent {\n height: 0;\n overflow: hidden;\n}\n\n[data-expanded="false"] h2 {\n margin-bottom: 0;\n}\n\n.copyButton {\n position: relative;\n}\n.copyButton span {\n font-size: 120%;\n margin: auto 5px;\n}\n\n.copyButton[data-show-copied="true"]::after {\n content: "Copied!";\n position: absolute;\n right: -5px;\n top: 50%;\n\n transform: translate(100%, -50%);\n background-color: var(--selection);\n color: white;\n padding: 10px;\n border-radius: 4px;\n\n animation: normal 1.5s popInOut;\n}\n\n@keyframes popInOut {\n 0% { opacity: 0; width: 0; margin-left: -100%; }\n 2.5% { opacity: 1; width: auto; }\n 75% { opacity: 1; margin-left: 0; }\n 100% { opacity: 0; }\n}'],sourceRoot:""}]),i.locals={source:"fnnwBtqwiwSQgnuN5sqg",sourceContent:"meN56P3rXkTYWdDY0oZq",metadataHelp:"H4OUxP43w5pZ9RYBB72x",copyButton:"eVrbmh_w8MbnDUOfUD2N",popInOut:"h0IIQBfKFzrLn6r9v5qG"},e.Z=i},80857:function(){},68437:function(){}}]); -//# sourceMappingURL=2679.b4e9e4b30761a92e581e.js.map
\ No newline at end of file |