summaryrefslogtreecommitdiffhomepage
path: root/GithubPicker.2598399af837a4c8ebcb.js
blob: f2dd0ae58a1dbd2a2a1f274de0c76ff32d81e5a2 (plain)
1
2
3
/*! For license information please see GithubPicker.2598399af837a4c8ebcb.js.LICENSE.txt */
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3203],{27926:function(t,e,n){"use strict";n.d(e,{Z:function(){return O}});var r=n(93379),o=n.n(r),i=n(7795),a=n.n(i),c=n(90569),s=n.n(c),u=n(3565),l=n.n(u),f=n(19216),d=n.n(f),h=n(44589),p=n.n(h),y=n(56281),m={};m.styleTagTransform=p(),m.setAttributes=l(),m.insert=s().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=d(),o()(y.Z,m);var v=y.Z&&y.Z.locals?y.Z.locals:void 0,g=n(85893);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 A=["children","secondary","className"];function x(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?x(Object(n),!0).forEach((function(e){j(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function j(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==b(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==b(r))return r;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:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){var e=t.children,n=t.secondary,r=t.className,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,A);return(0,g.jsx)("button",w(w({className:[r,v.action,n&&v.secondary].join(" ")},o),{},{children:e}))}E.defaultProps={className:""};var O=E},72054:function(t,e,n){"use strict";n.d(e,{Z:function(){return B}});var r=n(94184),o=n.n(r),i=n(67294),a=n(45697),c=n.n(a),s=n(93379),u=n.n(s),l=n(7795),f=n.n(l),d=n(90569),h=n.n(d),p=n(3565),y=n.n(p),m=n(19216),v=n.n(m),g=n(44589),b=n.n(g),A=n(56634),x={};x.styleTagTransform=b(),x.setAttributes=y(),x.insert=h().bind(null,"head"),x.domAPI=f(),x.insertStyleElement=v(),u()(A.Z,x);var w=A.Z&&A.Z.locals?A.Z.locals:void 0,j=n(21517),E=n(64261),O=n(62092),C=n(85893);function S(t){return S="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},S(t)}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function B(t){var e,n,r,a,c,s=t.actions,u=(e=(0,E.X)(),n=4,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}(e,n)||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],f=u[2],d=u[3],h=(0,i.useRef)();return(0,j.Z)(h,f),(0,C.jsxs)("div",{ref:h,className:w.wrapper,children:[(0,C.jsx)(O.Z,{className:w.button,onClick:d,icon:"ellipsis"}),(0,C.jsx)("div",{className:o()(w.menu,(r={},a=w.open,c=l,(a=function(t){var e=function(t,e){if("object"!==S(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===S(e)?e:String(e)}(a))in r?Object.defineProperty(r,a,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[a]=c,r)),children:(0,C.jsx)("ul",{children:s.map((function(t,e){return(0,C.jsx)("li",{onClick:function(){return function(t){f(),t()}(t.callback)},children:t.content},e)}))})})]})}B.propTypes={actions:c().arrayOf(c().shape({callback:c().func.isRequired,content:c().oneOfType([c().node,c().string]).isRequired})).isRequired}},97494:function(t,e,n){"use strict";n.d(e,{Z:function(){return C}});var r=n(45697),o=n.n(r),i=n(93379),a=n.n(i),c=n(7795),s=n.n(c),u=n(90569),l=n.n(u),f=n(3565),d=n.n(f),h=n(19216),p=n.n(h),y=n(44589),m=n.n(y),v=n(33988),g={};g.styleTagTransform=m(),g.setAttributes=d(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=p(),a()(v.Z,g);var b=v.Z&&v.Z.locals?v.Z.locals:void 0,A=n(85893);function x(t){return x="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},x(t)}var w=["validator","required","value"];function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function E(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){O(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function O(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==x(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===x(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t){var e=t.validator,n=t.required,r=void 0!==n&&n,o=t.value,i=void 0===o?"":o,a=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,w),c=e(i)||!i&&r&&"cannot be empty";return(0,A.jsxs)("span",{className:b.wrapper,children:[(0,A.jsx)("input",E({type:"text",value:i},a)),c&&(0,A.jsx)("span",{className:b.error,children:c})]})}C.propTypes={value:o().any.isRequired,required:o().bool,validator:o().func}},92087:function(t,e,n){"use strict";var r=n(45697),o=n.n(r),i=n(96186),a=n(64261),c=n(80031),s=n(85893);function u(t){var e=t.onDismiss;return(0,s.jsx)(a.Z,{children:(0,s.jsxs)(i.Z,{onDismiss:e,children:[(0,s.jsx)("h2",{children:"Automatic Layout Generation Failed"}),(0,s.jsx)("p",{children:"No accompanying layout was found with your keymap file and the Keymap Editor was unable to generate one automatically for you."}),(0,s.jsx)("p",{children:"Something went wrong with the attempted automatic layout generation for your keyboard and there's no automatic way to recover, but if you want to reach out for assistance maybe we can work together to resolve any technical issues or else craft a manual layout for your keyboard."}),(0,s.jsxs)("p",{children:["Share your experience at ",c.qM,"."]})]})})}u.propTypes={onDismiss:o().func.isRequired},e.Z=u},88461:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return Ye}});var r=n(13311),o=n.n(r),i=n(66379),a=n.n(i),c=n(67294),s=n(45697),u=n.n(s),l=n(93965),f=n(96186),d=n(64261),h=n(85893),p={maxHeight:"300px",overflow:"auto",padding:"10px",fontFamily:"monospace",fontSize:"80%",backgroundColor:"rgb(239, 239, 239, 0.5)"},y={margin:"10px"};function m(t){var e=t.onDismiss,n=t.title,r=t.errors,o=function(t){if("InfoValidationError"===t)return"config/info.json"}(n);return(0,h.jsx)(d.Z,{children:(0,h.jsxs)(f.Z,{onDismiss:e,children:[(0,h.jsx)("h2",{children:n}),o&&(0,h.jsxs)("p",{children:["Errors in the file ",(0,h.jsx)("code",{children:o}),"."]}),(0,h.jsx)("ul",{style:p,children:r.map((function(t,e){return(0,h.jsx)("li",{style:y,children:t},e)}))})]})})}var v=n(97168),g=n(35161),b=n.n(g),A=n(6020),x="selectedGithubRepository",w="selectedGithubBranch",j="selectedGithubKeyboard";function E(t,e){try{return JSON.parse((0,A.U2)("".concat(j,":").concat(t,":").concat(e)))}catch(t){return null}}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var C={blocked:!1,initialized:!1,selectedRepoId:null,selectedBranchName:null,selectedKeyboard:null,loadedGitInfo:null,noBranches:!1,branches:[],keyboards:[],loading:!1,warningFlags:[]},S=(0,v.oM)({name:"github-picker",initialState:C,reducers:{clearSelection:function(t){t.warningFlags=[],t.loading=!1},integrationInitialized:function(t){var e,n=function(){try{return JSON.parse((0,A.U2)(x))}catch(t){return null}}(),r=l.ZP.repositories||[];o()(r,{id:n})?e=n:r.length>0&&(e=r[0].id),t.initialized=!0,t.selectedRepoId=e},loadingBranchesList:function(t){t.noBranches=!1,t.loading=!0},loadedBranchesList:function(t,e){var n=t.selectedRepoId,r=e.payload.branches,i=o()(l.ZP.repositories,{id:n});t.noBranches=0===r.length,t.branches=r,t.keyboard=null,t.keyboards=[],t.loading=!1;for(var a=b()(r,"name"),c=i.default_branch,s=function(t){try{return JSON.parse((0,A.U2)("".concat(w,":").concat(t)))}catch(t){return null}}(n),u=0,f=[1===r.length?r[0].name:null,s,c];u<f.length;u++){var d=f[u];if(a.includes(d)){t.selectedBranchName=d,t.selectedKeyboard=E(n,d);break}}},loadingKeyboardsList:function(t){t.loading=!0},loadedKeyboardsList:function(t,e){var n=t.selectedRepoId,r=t.selectedBranchName,o=e.payload,i=o.keyboards,a=o.default;t.keyboards=i,t.loading=!1;for(var c=E(n,r),s=0,u=[1===i.length?i[0]:null,c,a];s<u.length;s++){var l=u[s];if(i.includes(l)){t.selectedKeyboard=l;break}}},createdBranch:function(t,e){t.branches.push({id:e.payload.name,name:e.payload.name,protected:!1})},selectedRepository:function(t,e){var n;t.selectedRepoId=e.payload.repository.id,t.selectedBranchName=null,t.selectedKeyboard=null,t.noBranches=!1,t.branches=[],n=t.selectedRepoId,(0,A.t8)(x,JSON.stringify(n))},selectedBranch:function(t,e){var n,r;t.selectedBranchName=e.payload.name,t.selectedKeyboard=E(t.selectedRepoId,t.selectedBranchName),n=t.selectedRepoId,r=t.selectedBranchName,(0,A.t8)("".concat(w,":").concat(n),JSON.stringify(r))},selectedKeyboard:function(t,e){var n,r,o;t.selectedKeyboard=e.payload.name,n=t.selectedRepoId,r=t.selectedBranchName,o=t.selectedKeyboard,(0,A.t8)("".concat(j,":").concat(n,":").concat(r),JSON.stringify(o))},keyboardLoading:function(t,e){t.loading=!0,t.loadedGitInfo=null},keyboardLoadedSuccess:function(t,e){var n=e.payload.response,r=n.keymap,o=n.gitInfo;t.warningFlags=r.warningFlags||[],t.loadedGitInfo=o,t.loading=!1}}});function k(){var t,e,n,r=(e=(0,c.useReducer)(S.reducer,C),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(t,e):void 0}}(e,n)||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.")}()),o=r[0],i=(t=r[1],(0,c.useMemo)((function(){return Object.keys(S.actions).reduce((function(e,n){return e[n]=function(){var e;return t((e=S.actions)[n].apply(e,arguments))},e}),{})}),[t]));return[o,i]}var B=n(69247);function L(t){var e=t.onDismiss,n=t.missingPath;return(0,h.jsx)(d.Z,{children:(0,h.jsxs)(f.Z,{onDismiss:e,children:[(0,h.jsx)("h2",{children:"Missing keyboard definition?"}),(0,h.jsxs)("p",{children:["Hi there! The repository you're trying to load from doesn't have a defined ",(0,h.jsx)("code",{children:n}),". Right now this application is expecting to look at that directory to discover keyboard definitions for experimental features like automatic layout generation."]}),(0,h.jsx)("p",{children:"Is it possible that the keyboard you're trying to edit relies on data from the ZMK or other repositories? Fetching from other repositories is not currently supported."}),(0,h.jsx)("p",{children:"I'm a humble developer and have only worked with configurations for my own handwired builds, so if you feel you're receiving this message in error then please consider opening an issue on this project's GitHub repository to let me know what I can do differently."})]})})}L.propTypes={onDismiss:u().func.isRequired,missingPath:u().string.isRequired};var P=L,Z=n(2968),_=n(62092);function T(){return(0,h.jsxs)("div",{style:{display:"flex",gap:"20px",textAlign:"center"},children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:(0,h.jsx)("img",{alt:"Example correct GitHub installation selection",src:"repo-selection-good.png"})}),(0,h.jsx)("p",{children:(0,h.jsx)("strong",{children:"Do this!"})})]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:(0,h.jsx)("img",{alt:"Example incorrect GitHub installation selection",src:"repo-selection-bad.png"})}),(0,h.jsx)("p",{children:(0,h.jsx)("strong",{children:"Don't do this!"})})]})]})}function D(){return(0,h.jsx)(d.Z,{children:(0,h.jsxs)(f.Z,{style:{maxWidth:"min-content"},dismissText:null,children:[(0,h.jsx)("h2",{children:"App Disabled"}),(0,h.jsxs)("p",{children:["Hello there, your installation of the keymap editor's GitHub app is currently disabled. ",(0,h.jsx)("em",{children:"This is not a ban!"})]}),(0,h.jsxs)("p",{children:["When you installed this app for your GitHub account you installed it for ",(0,h.jsx)("em",{children:"all"})," of your repositories, and we need to do a little cleanup as we roll out some new features as it's very likely you will have other repositories unrelated to ZMK keyboard configurations."]}),(0,h.jsx)("h3",{children:"How to fix this"}),(0,h.jsxs)("p",{children:["If you're still interested in using the keymap editor (and I'd love for you to be able to) please go to your ",(0,h.jsx)(Z.Z,{href:l.kz,children:"installation settings"})," on GitHub and select only the repositories you want to use with this tool. As soon as that's done you'll be sent back here and ready to go."]}),(0,h.jsx)(T,{}),(0,h.jsx)(_.Z,{collection:"brands",icon:"github",text:"Fix Repository Selection",style:{display:"block",margin:"0 auto",fontSize:"120%",padding:"5px 10px"},onClick:l.ZP.beginInstallAppFlow}),(0,h.jsx)("p",{children:"As always, if you're looking for clarification or further assistance please visit our GitHub repo and open an issue or start a discussion."})]})})}D.propTypes={installation:u().shape({id:u().number.isRequired}).isRequired};var M=D,I=n(80031);function N(t){var e=t.onDismiss;return(0,h.jsx)(d.Z,{children:(0,h.jsxs)(f.Z,{onDismiss:e,children:[(0,h.jsx)("h2",{children:"Is this a zmk-config repo?"}),(0,h.jsxs)("p",{children:["Hi there! The repository you're trying to load from doesn't have a defined ",(0,h.jsx)("code",{children:"config"})," directory. Right now this application is expecting to look at that directory to discover keymaps and other metadata."]}),I.t6]})})}N.propTypes={onDismiss:u().func.isRequired,otherRepoOrBranchAvailable:u().bool};var G=N,$=n(92087),R=function(){return(0,h.jsx)(d.Z,{children:(0,h.jsxs)(f.Z,{dismissText:null,children:[(0,h.jsx)("h2",{children:"GitHub Account Blocked"}),(0,h.jsx)("p",{children:"Hi, your access to this application has been disabled."}),(0,h.jsxs)("p",{children:["This could be an innocent mistake. Possibly you've misunderstood the intended purpose of this app, possibly I got carried away with some housekeeping. If you want more information or feel this was done in error, please reach out to ",(0,h.jsx)("em",{children:"nickcoutsos"})," on GitHub or Discord (you can find me on the ZMK server)."]})]})})};function F(t){var e=t.onDismiss;return(0,h.jsx)(d.Z,{children:(0,h.jsxs)(f.Z,{onDismiss:e,children:[(0,h.jsx)("h2",{children:"No Layout Available"}),(0,h.jsx)("p",{children:"Your keymap doesn't have an accompanying layout and we don't know enough about your keyboard to generate one for you automatically."}),(0,h.jsxs)("p",{children:["If you meant to include layout data, please make sure that its in the same directory as your keymap, like ",(0,h.jsx)("code",{children:"config/info.json"})," or ",(0,h.jsx)("code",{children:"config/<keyboard>.json"}),"."]}),I.Yo,I.t6]})})}F.propTypes={onDismiss:u().func.isRequired};var Y=F;function q(){return(0,h.jsx)(d.Z,{centerOnly:!0,children:(0,h.jsxs)(f.Z,{dismissText:null,style:{width:"400px"},children:[(0,h.jsx)("h2",{children:"Authenticate with GitHub"}),(0,h.jsx)("p",{children:"Please log-in to GitHub to continue."}),(0,h.jsx)(_.Z,{collection:"brands",icon:"github",text:"Login with GitHub",style:{display:"block",margin:"0 auto"},onClick:function(){return l.ZP.beginLoginFlow()}})]})})}q.propTypes={};var z=q;function K(){var t=l.ZP.username?"Welcome, ".concat(l.ZP.username,"!"):"Welcome!";return(0,h.jsx)(d.Z,{centerOnly:!0,children:(0,h.jsxs)(f.Z,{style:{maxWidth:"min-content"},dismissText:null,children:[(0,h.jsx)("h2",{children:t}),(0,h.jsxs)("p",{children:["To begin importing your own keymaps, you'll need to grant the Keymap Editor app access to your relevant GitHub repositories. Please make sure to ",(0,h.jsx)("em",{children:"only"})," select repositories that are set up for ZMK keyboard configurations."]}),(0,h.jsxs)("p",{children:["This app requires read and write access to the repositories you select in order to write to arbitrary ",(0,h.jsx)("code",{children:".keymap"})," files. It also receives all build action events for the repository, which generates quite a bit of traffic."]}),(0,h.jsx)(T,{}),(0,h.jsxs)("p",{children:["Selecting ",(0,h.jsx)("code",{children:"All repositories"})," for the app installation will lead to a suspension."]}),(0,h.jsx)(_.Z,{collection:"brands",icon:"github",text:"Add Repository",style:{display:"block",margin:"0 auto",fontSize:"120%",padding:"5px 10px"},onClick:l.ZP.beginInstallAppFlow})]})})}K.propTypes={};var U=K,W=(0,h.jsx)(Z.Z,{external:!0,href:"https://zmk.dev/docs/user-setup#user-config-setup-script",children:"User Config Setup Script"});function H(t){var e=t.onDismiss;return(0,h.jsx)(d.Z,{children:(0,h.jsxs)(f.Z,{onDismiss:e,children:[(0,h.jsx)("h2",{children:"Empty Repository"}),(0,h.jsxs)("p",{children:["The selected repository doesn't appear to contain anything yet. please be sure to use ZMK's ",W," to initialize your repo first."]}),I.t6]})})}var V=n(41051);function J(t){var e=t.onDismiss;return(0,h.jsx)(d.Z,{children:(0,h.jsxs)(f.Z,{onDismiss:e,children:[(0,h.jsx)("h2",{children:"No Keymap Available"}),(0,h.jsxs)("p",{children:["We couldn't find a ",(0,h.jsx)("code",{children:".keymap"})," file in your ",(0,h.jsx)("code",{children:"config/"})," folder."]}),(0,h.jsxs)("p",{children:["Please ensure that any keymap(s) you wish to edit are placed in that directory even if an accompanying keyboard definition exists in your under the ",(0,h.jsx)("code",{children:"config/boards/..."})," directory."]}),(0,h.jsxs)("p",{children:["If you have any questions please feel free to reach out by creating an issue at ",I.qM,"."]})]})})}J.propTypes={onDismiss:u().func.isRequired};var X=J,Q=n(91892),tt=n(93379),et=n.n(tt),nt=n(7795),rt=n.n(nt),ot=n(90569),it=n.n(ot),at=n(3565),ct=n.n(at),st=n(19216),ut=n.n(st),lt=n(44589),ft=n.n(lt),dt=n(92127),ht={};ht.styleTagTransform=ft(),ht.setAttributes=ct(),ht.insert=it().bind(null,"head"),ht.domAPI=rt(),ht.insertStyleElement=ut(),et()(dt.Z,ht);var pt=dt.Z&&dt.Z.locals?dt.Z.locals:void 0;function yt(t){return yt="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},yt(t)}var mt=["children"];function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function gt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vt(Object(n),!0).forEach((function(e){bt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function bt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==yt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===yt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function At(t){var e=t.children,n=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,mt);return(0,h.jsxs)("div",gt(gt({},n),{},{className:pt.spinner,children:[(0,h.jsx)("i",{className:"".concat(pt.icon," fa fa-spinner")}),e]}))}function xt(){return(0,h.jsx)(V.Z,{name:"shield",title:"Branch is protected -- cannot commit changes"})}function wt(t){var e=t.state,n=t.actions,r=t.choices,i=t.selections,a=r.repositories,c=r.repositoryChoices,s=r.branchChoices,u=r.keyboardChoices,f=i.selectedRepoChoice,d=i.selectedBranchChoice,p=i.selectedKeyboardChoice,y=e.branches,m=e.keyboards,v=e.loading;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q.Z,{label:"Repository",value:f,options:c,onChange:function(t){var e=t.id,r=o()(a,{id:e});n.selectedRepository({repository:r})},getValue:function(t){return t.id},getOptionValue:function(t){return t.id},getOptionLabel:function(t){return t.full||t.name},formatOptionLabel:function(t,e){var n=e.context;return(0,h.jsx)(h.Fragment,{children:"value"===n?t.name:t.full||t.name})},children:(0,h.jsxs)("button",{onClick:l.ZP.beginInstallAppFlow,style:{fontStyle:"italic",padding:"0 12px",textAlign:"left",width:"100%"},children:[(0,h.jsx)(V.Z,{name:"sliders"})," Add/remove repositories..."]})}),y.length>1&&(0,h.jsx)(Q.Z,{label:"Branch",value:d,options:s,onChange:function(t){var e=t.id;return n.selectedBranch({name:e})},getOptionValue:function(t){return t.id},getOptionLabel:function(t){return t.name},formatOptionLabel:function(t){return(0,h.jsxs)(h.Fragment,{children:[t.protected&&(0,h.jsx)(xt,{})," ",t.name]})}}),m.length>1&&(0,h.jsx)(Q.Z,{label:"Keyboard",value:p,options:u,getOptionValue:function(t){return t.id},getOptionLabel:function(t){return t.name},onChange:function(t){var e=t.id;return n.selectedKeyboard({name:e})}}),v&&(0,h.jsx)(B.oT,{children:(0,h.jsx)(At,{})})]})}var jt=n(80047),Et={};Et.styleTagTransform=ft(),Et.setAttributes=ct(),Et.insert=it().bind(null,"head"),Et.domAPI=rt(),Et.insertStyleElement=ut(),et()(jt.Z,Et);var Ot=jt.Z&&jt.Z.locals?jt.Z.locals:void 0;function Ct(t){var e,n=t.choices,r=t.selections,o=t.state,i=t.onExpand,a=n.keyboardChoices,c=r.selectedRepoChoice,s=o.selectedBranchName,u=o.selectedKeyboard,l=o.loading;return(0,h.jsxs)(B.zx,{onClick:i,className:Ot.compactWrapper,children:[(0,h.jsxs)(B.oT,{id:"compact-github-picker",style:{display:"flex",flexDirection:"column",justifyContent:"center",lineHeight:"normal"},children:[(0,h.jsx)("span",{children:c.name}),(0,h.jsxs)("span",{style:{marginLeft:"10px",fontSize:"65%"},children:[(0,h.jsx)(V.Z,{name:"code-branch"}),(0,h.jsx)("span",{children:s})]})]}),(0,h.jsxs)(B.oT,{children:["/ ",l?(0,h.jsx)(At,{}):(0,h.jsx)("span",{children:u||(null===(e=a[0])||void 0===e?void 0:e.name)})]})]})}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 kt(){kt=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),c=new O(o||[]);return r(a,"_invoke",{value:x(t,n,c)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function h(){}function p(){}var y={};s(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(C([])));v&&v!==e&&n.call(v,i)&&(y=v);var g=p.prototype=d.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,c){var s=l(t[r],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==St(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function w(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function j(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,r(g,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(A.prototype),s(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),s(g,c,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,O.prototype={constructor:O,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(E),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Bt(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Lt(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){Bt(i,r,o,a,c,"next",t)}function c(t){Bt(i,r,o,a,c,"throw",t)}a(void 0)}))}}function Pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Zt=n(50361),_t=n.n(Zt),Tt=n(39693),Dt=n.n(Tt),Mt=n(18446),It=n.n(Mt),Nt=n(95998),Gt=n(51606),$t=n(27484),Rt=n.n($t),Ft=n(84110),Yt=n.n(Ft);function qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}Rt().extend(Yt());var zt=["success"],Kt=["action_required","cancelled","failure","skipped","stale","timed_out"];function Ut(t){var e,n,r=t.timestamp,o=(e=(0,c.useState)(Rt()(r).fromNow()),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return qt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qt(t,e):void 0}}(e,n)||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.")}()),i=o[0],a=o[1];return(0,c.useEffect)((function(){a(Rt()(r).fromNow());var t=setInterval((function(){a(Rt()(r).fromNow())}),6e4);return function(){return clearInterval(t)}}),[r,a]),(0,h.jsx)("span",{title:r,children:i})}function Wt(t){var e=t.latestRun,n=zt.includes(e.conclusion)?(0,h.jsx)(V.Z,{name:"check"}):Kt.includes(e.conclusion)?(0,h.jsx)(V.Z,{name:"xmark"}):(0,h.jsx)(At,{});return(0,h.jsx)(Z.Z,{href:e.html_url,external:!0,showExternal:!1,children:(0,h.jsxs)("div",{className:Ot.buildDetails,children:[(0,h.jsxs)("span",{className:Ot.buildSummary,children:[(0,h.jsx)("span",{children:"Latest"})," (",(0,h.jsx)("code",{children:e.head_sha.slice(0,5)}),") ",(0,h.jsx)("span",{children:n}),(0,h.jsx)("br",{}),(0,h.jsx)(Ut,{timestamp:e.updated_at})]}),(0,h.jsx)(V.Z,{name:"file-arrow-down",className:[Ot.buildStatus,Ot.buildSuccess].join(" ")})]})})}Wt.propTypes={latestRun:u().shape({id:u().number.isRequired,name:u().string.isRequired,head_sha:u().string.isRequired,status:u().oneOf(["completed","action_required","cancelled","failure","neutral","skipped","stale","success","timed_out","in_progress","queued","requested","waiting"]).isRequired,conclusion:u().oneOf([null,"action_required","cancelled","failure","neutral","success","skipped","stale","timed_out"]),created_at:u().string.isRequired,updated_at:u().string.isRequired})};var Ht=Wt,Vt=n(27926);function Jt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Xt(t){var e,n,r=t.onConfirm,o=t.onCancel,i=(e=(0,c.useState)(""),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return Jt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jt(t,e):void 0}}(e,n)||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=i[0],s=i[1];return(0,h.jsx)(d.Z,{children:(0,h.jsxs)(f.Z,{dismissText:null,children:[(0,h.jsx)("h2",{children:"Commit keymap changes"}),(0,h.jsx)("textarea",{style:{width:"100%"},placeholder:"Message (optional)",value:a,onChange:function(t){s(t.target.value)}}),(0,h.jsxs)("p",{style:{textAlign:"center",gap:"10px"},children:[(0,h.jsx)(Vt.Z,{onClick:function(){return r(a)},children:"Commit"}),(0,h.jsx)(Vt.Z,{onClick:o,secondary:!0,children:"Cancel"})]})]})})}Xt.propTypes={onConfirm:u().func.isRequired,onCancel:u().func.isRequired};var Qt=Xt,te=n(72054),ee=n(97494);function ne(t){return ne="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},ne(t)}function re(){re=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),c=new O(o||[]);return r(a,"_invoke",{value:x(t,n,c)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function h(){}function p(){}var y={};s(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(C([])));v&&v!==e&&n.call(v,i)&&(y=v);var g=p.prototype=d.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,c){var s=l(t[r],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==ne(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function w(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function j(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,r(g,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(A.prototype),s(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),s(g,c,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,O.prototype={constructor:O,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(E),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function oe(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function ie(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){oe(i,r,o,a,c,"next",t)}function c(t){oe(i,r,o,a,c,"throw",t)}a(void 0)}))}}function ae(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ce(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ae(Object(n),!0).forEach((function(e){se(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function se(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==ne(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ne(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ue(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function le(t){return t.match(/\/\./)?"slash-separated component cannot begin with a dot":t.match(/\/.*\.lock/)?"slash-separated component cannot end with .lock":-1!==t.indexOf("..")?"cannot have two consecutive dots anywhere":t.match(/[?*[]/)?'cannot contain "?", "*", "["':t.startsWith("/")||t.endsWith("/")?"cannot begin or end with slash":-1!==t.indexOf(" ")?'cannot contain " "':-1!==t.indexOf("@{")?'cannot contain sequence "@{"':"@"===t?'cannot be "@"':-1!==t.indexOf("\\")?'cannot contain "\\"':t.endsWith(".")?'cannot end with "."':void 0}function fe(t){var e,n,r=t.onConfirm,o=t.onCancel,i=t.branches,a=t.selected,s=t.repo,u=(0,c.useMemo)((function(){return i.map((function(t){var e=t.name;return{id:e,name:e}}))}),[i]),p=(e=(0,c.useState)({name:"",source:u.find((function(t){return t.id===a})),submitting:!1}),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return ue(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(t,e):void 0}}(e,n)||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.")}()),y=p[0],m=p[1],v=(0,c.useMemo)((function(){return y.name&&y.source&&!y.submitting&&!le(y.name)}),[y]),g=(0,c.useCallback)((function(t){m((function(e){return ce(ce({},e),{},{name:t.target.value})}))}),[m]),b=(0,c.useCallback)((function(t){m((function(e){return ce(ce({},e),{},{source:t})}))}),[m]),A=(0,c.useCallback)(ie(re().mark((function t(){return re().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return m((function(t){return ce(ce({},t),{},{submitting:!0})})),t.prev=1,t.next=4,l.ZP.createBranch(s,y.source.id,y.name);case 4:t.next=11;break;case 6:return t.prev=6,t.t0=t.catch(1),console.error("Branch creation failed",t.t0),m((function(t){return ce(ce({},t),{},{submitting:!1})})),t.abrupt("return");case 11:m((function(t){return ce(ce({},t),{},{submitting:!1})})),r(y.name);case 13:case"end":return t.stop()}}),t,null,[[1,6]])}))),[s,y.source,y.name,m,r]);return(0,h.jsx)(d.Z,{onDismiss:o,children:(0,h.jsxs)(f.Z,{dismissText:null,children:[(0,h.jsx)("h2",{children:"Create new branch"}),(0,h.jsxs)(B.__,{children:["Source ",(0,h.jsx)(Q.Z,{value:y.source,options:u,getOptionValue:function(t){return t.id},getOptionLabel:function(t){return t.name},onChange:b})]}),(0,h.jsx)(B.oT,{children:(0,h.jsxs)(B.__,{children:["Branch ",(0,h.jsx)(ee.Z,{value:y.name,validator:le,disabled:y.submitting,onChange:g})]})}),(0,h.jsxs)("p",{style:{textAlign:"center",gap:"10px"},children:[(0,h.jsx)(Vt.Z,{disabled:!v,onClick:A,children:y.submitting?(0,h.jsx)(At,{}):(0,h.jsx)("span",{children:"Confirm"})}),(0,h.jsx)(Vt.Z,{disabled:y.submitting,onClick:o,secondary:!0,children:"Cancel"})]})]})})}fe.propTypes={onConfirm:u().func.isRequired,onCancel:u().func.isRequired,branches:u().array.isRequired,selected:u().string.isRequired,repo:u().any};var de=fe,he=n(83858),pe=n.n(he),ye=n(21007);function me(t){return me="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},me(t)}function ve(){ve=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),c=new O(o||[]);return r(a,"_invoke",{value:x(t,n,c)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function h(){}function p(){}var y={};s(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(C([])));v&&v!==e&&n.call(v,i)&&(y=v);var g=p.prototype=d.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,c){var s=l(t[r],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==me(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function w(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function j(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,r(g,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(A.prototype),s(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),s(g,c,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,O.prototype={constructor:O,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(E),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function ge(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function be(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ae=function(t){return t};function xe(t){var e,n,r=t.onDismiss,o=(e=(0,c.useState)(null),n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,n)||function(t,e){if(t){if("string"==typeof t)return be(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(t,e):void 0}}(e,n)||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.")}()),i=o[0],a=o[1],s=(0,Nt.v9)(Ae),u=s.keyboard,l=u.keymap,p=u.layout,y=s.sourceOther.keymapRaw;return(0,c.useEffect)((function(){function t(){var e;return e=ve().mark((function t(){var e;return ve().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,pe()(p,_t()(l),y);case 3:e=t.sent,a(e),t.next=12;break;case 7:throw t.prev=7,t.t0=t.catch(0),console.error("Failed to update/parse",l),console.error(t.t0),t.t0;case 12:case"end":return t.stop()}}),t,null,[[0,7]])})),t=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(t){ge(i,r,o,a,c,"next",t)}function c(t){ge(i,r,o,a,c,"throw",t)}a(void 0)}))},t.apply(this,arguments)}!function(){t.apply(this,arguments)}()}),[l,y,p,a]),(0,h.jsx)(d.Z,{onDismiss:r,children:(0,h.jsxs)(f.Z,{onDismiss:r,style:{maxWidth:"70vw"},children:[(0,h.jsx)("h1",{children:"Raw Keymap"}),(0,h.jsxs)("p",{children:["This is a preview of your current keymap changes applied to the original ",(0,h.jsx)("code",{children:".keymap"})," file contents from your repository."]}),(0,h.jsxs)("p",{children:["Any changes shown here will not be committed to your repository until you click the ",(0,h.jsx)("em",{children:"Save"})," button in the action bar."]}),null!==i&&(0,h.jsx)(ye.O,{copyable:!0,text:i})]})})}function we(t){return we="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},we(t)}function je(){je=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),c=new O(o||[]);return r(a,"_invoke",{value:x(t,n,c)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function h(){}function p(){}var y={};s(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(C([])));v&&v!==e&&n.call(v,i)&&(y=v);var g=p.prototype=d.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,c){var s=l(t[r],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==we(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function w(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function j(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,r(g,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(A.prototype),s(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),s(g,c,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,O.prototype={constructor:O,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(E),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Ee(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Oe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||Ce(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 Ce(t,e){if(t){if("string"==typeof t)return Se(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Se(t,e):void 0}}function Se(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ke=function(t){return t};function Be(t){var e,n=t.state,r=t.actions,o=(0,Nt.I0)(),i=(0,Nt.v9)(ke),a=i.source,s=i.sourceOther,u=i.keyboard,f=i._unmodifiedKeymap,p=i.saving,y=i.experimentalSettings,m=i.latestBuild,v=Oe((0,c.useState)(!1),2),g=v[0],b=v[1],A=Oe((0,d.X)(),3),x=A[0],w=A[1],j=A[2],E=n.loadedGitInfo,O=Dt()([(null==u?void 0:u.keymap)&&{callback:w,content:(0,h.jsx)("span",{title:"Generate keymap devicetree code without committing to GitHub",children:"View keymap data"})}].concat(function(t){if(Array.isArray(t))return Se(t)}(e=l.ZP.installations.map((function(t){return{callback:function(){return l.ZP.manageInstallationRepos(t.id)},content:(0,h.jsxs)(h.Fragment,{children:["Manage repos for ",(0,h.jsx)("em",{children:t.account.login})]})}})))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||Ce(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:function(){return b(!0)},content:(0,h.jsx)(h.Fragment,{children:"Create new branch"})},{callback:function(){return l.ZP.logout()},content:(0,h.jsx)(h.Fragment,{children:"Log out"})}])),C=u&&!It()(u.keymap,f),S=(0,c.useCallback)((function(t){var e,n=s.github,r=n.repository,i=n.branch;(e=je().mark((function e(){var n,a,c,d,h,p,m,v;return je().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o({type:"COMMIT_DIALOG_CLOSE"}),o({type:"KEYMAP_SAVE_START"}),n=u.layout,a=u.keymap,c=_t()(a),(0,Gt.removeUnmodifiedNodes)(c,f),e.prev=5,e.next=8,l.ZP.commitChanges(r,i,n,c,{message:t,experimentalSettings:y,keyboard:s.github.keyboard,loadedGitInfo:E});case 8:d=e.sent,h=d.data,o({type:"KEYMAP_SAVE_SUCCESS",keymap:h}),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(5),v=null!==(p=e.t0.response)&&void 0!==p&&null!==(m=p.data)&&void 0!==m&&m.commitMismatch?{commitMismatch:!0}:{},o({type:"KEYMAP_SAVE_FAILURE",details:v});case 17:case"end":return e.stop()}}),e,null,[[5,13]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(t){Ee(i,r,o,a,c,"next",t)}function c(t){Ee(i,r,o,a,c,"throw",t)}a(void 0)}))})()}),[s,E,u,o,y,f]);return(0,h.jsxs)("div",{className:Ot.pickerActions,children:["github"===a&&!s.github.isProtected&&(0,h.jsx)(Vt.Z,{title:"Commit keymap changes to GitHub repository",disabled:!C,onClick:function(){o({type:"COMMIT_DIALOG_OPEN"})},children:p?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("span",{children:"Saving"})," ",(0,h.jsx)(At,{})]}):(0,h.jsx)("span",{children:"Save"})}),"github"===a&&s.github.isProtected&&(0,h.jsxs)(Vt.Z,{title:"Cannot commit changes to this branch",disabled:!0,children:[(0,h.jsx)(V.Z,{name:"shield"})," Read-only"]}),i.commitDialogOpen&&(0,h.jsx)(Qt,{onConfirm:S,onCancel:function(){return o({type:"COMMIT_DIALOG_CLOSE"})}}),m&&(0,h.jsx)(Ht,{latestRun:m}),(0,h.jsx)(B.oT,{children:(0,h.jsx)(te.Z,{actions:O})}),g&&(0,h.jsx)(de,{repo:n.selectedRepoId,branches:n.branches,selected:n.selectedBranchName,onCancel:function(){return b(!1)},onConfirm:function(t){b(!1),r.createdBranch({name:t}),r.selectedBranch({name:t})}}),x&&(0,h.jsx)(xe,{onDismiss:j})]})}function Le(t){return Le="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},Le(t)}function Pe(){Pe=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function u(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),c=new O(o||[]);return r(a,"_invoke",{value:x(t,n,c)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function d(){}function h(){}function p(){}var y={};s(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(C([])));v&&v!==e&&n.call(v,i)&&(y=v);var g=p.prototype=d.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function o(r,i,a,c){var s=l(t[r],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==Le(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=w(a,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=l(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function w(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function j(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function C(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=p,r(g,"constructor",{value:p,configurable:!0}),r(p,"constructor",{value:h,configurable:!0}),h.displayName=s(p,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,s(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(A.prototype),s(A.prototype,a,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new A(u(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),s(g,c,"Generator"),s(g,i,(function(){return this})),s(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=C,O.prototype={constructor:O,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(E),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function Ze(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _e(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ze(Object(n),!0).forEach((function(e){Te(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Te(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Le(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Le(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function De(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function Me(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,c=[],s=!0,u=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(c.push(r.value),c.length!==e);s=!0);}catch(t){u=!0,o=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ie(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ie(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 Ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ne=function(t){return a()(t,{name:"MissingRepoFile",path:"config"})},Ge=function(t){return a()(t,{name:"MissingRepoFile",intent:"directory-structure"})},$e=function(t){return a()(t,{name:"MissingRepoFile",path:"config/info.json"})||a()(t,{name:"MissingRepoFile",intent:"metadata"})},Re=function(t){return"MissingRepoFile"===(null==t?void 0:t.name)&&(null==t?void 0:t.path.match(/config\/boards\/[^/]+\/[^/]+\/[^/]+?\..*$/))};function Fe(t){var e=Me(k(),2),n=e[0],r=e[1],i=function(t,e){var n=t.branches,r=t.keyboards,i=t.selectedRepoId,a=t.selectedBranchName,s=t.selectedKeyboard,u=(l.ZP.repositories||[]).map((function(t){return{id:t.id,name:t.name,full:t.full_name}})),f=(0,c.useMemo)((function(){return function(t){if(Array.isArray(t))return Pt(t)}(t=u)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Pt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pt(t,e):void 0}}(t)||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.")}();var t}),[u]),d=(0,c.useMemo)((function(){return n.map((function(t){return{id:t.name,name:t.name,protected:t.protected}}))}),[n]),h=(0,c.useMemo)((function(){return r.map((function(t){return{id:t,name:t}}))}),[r]),p=(0,c.useMemo)((function(){return o()(u,{id:i})}),[u,i]),y=(0,c.useMemo)((function(){return o()(d,{id:a})}),[d,a]),m=(0,c.useMemo)((function(){return o()(h,{id:s})}),[h,s]);return(0,c.useEffect)((function(){i&&Lt(kt().mark((function t(){var n,r;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loadingBranchesList(),n=o()(l.ZP.repositories,{id:i}),t.next=4,l.ZP.fetchRepoBranches(n);case 4:r=t.sent,e.loadedBranchesList({branches:r});case 6:case"end":return t.stop()}}),t)})))()}),[i,e]),(0,c.useEffect)((function(){i&&a&&Lt(kt().mark((function t(){var n,r;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.loadingKeyboardsList(),n=o()(l.ZP.repositories,{id:i}),t.next=4,l.ZP.fetchBranchKeyboards(n,a);case 4:r=t.sent,e.loadedKeyboardsList(r);case 6:case"end":return t.stop()}}),t)})))()}),[i,a,e]),[{repositories:u,repositoryChoices:f,branchChoices:d,keyboardChoices:h},{selectedRepoChoice:p,selectedBranchChoice:y,selectedKeyboardChoice:m}]}(n,r),a=Me(i,2),s=a[0],u=a[1],f=n.initialized,d=n.selectedRepoId,p=n.selectedBranchName,y=n.selectedKeyboard,v=n.loading,g=t.expanded,b=t.onSelect,A=t.onExpand,x=t.onError;(0,c.useEffect)((function(){var t=function(){return l.ZP.beginLoginFlow()},e=function(){r.clearSelection(),x({dialog:R})},n=function(){r.clearSelection(),x({dialog:$.Z})},o=function(t){var e=m;Ne(t)&&(e=G),Re(t)&&(e=P),$e(t)&&(e=Y),Ge(t)&&(e=X),r.clearSelection(),x({dialog:e,dialogProps:{title:t.name,errors:t.errors}})};return l.ZP.init().then(r.integrationInitialized),l.ZP.on("authentication-failed",t),l.ZP.on("blocked",e),l.ZP.on("repo-validation-error",o),l.ZP.on("layout-generation-failed",n),function(){l.ZP.off("authentication-failed",t),l.ZP.off("blocked",e),l.ZP.off("repo-validation-error",o),l.ZP.off("layout-generation-failed",n)}}),[r,x]),(0,c.useEffect)((function(){!n.loading&&n.noBranches&&x({dialog:H})}),[n,x]);var w=(0,c.useCallback)(function(){var t,e=(t=Pe().mark((function t(e,n,i){var a,c,u,f,d,h;return Pe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=l.ZP.repositories,f=null===(a=o()(u,{id:e}))||void 0===a?void 0:a.full_name,d=null===(c=o()(s.branchChoices,{id:n}))||void 0===c?void 0:c.protected,r.keyboardLoading(),t.next=6,l.ZP.fetchLayoutAndKeymap(f,n,{keyboard:i});case 6:h=t.sent,r.keyboardLoadedSuccess({response:h}),b(_e({github:{repository:f,branch:n,keyboard:i,isProtected:d}},h));case 9:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){De(i,r,o,a,c,"next",t)}function c(t){De(i,r,o,a,c,"throw",t)}a(void 0)}))});return function(t,n,r){return e.apply(this,arguments)}}(),[r,s.branchChoices,b]),j=(0,c.useCallback)((function(){return w(d,p,y)}),[w,d,p,y]);return(0,c.useEffect)((function(){d&&p&&w(d,p,y)}),[d,p,y,w]),f?n.blocked?(0,h.jsx)(R,{}):l.ZP.isGitHubAuthorized()?l.ZP.isAppSuspendedForRepoSelection()?(0,h.jsx)(M,{}):l.ZP.isAppInstalled()?(0,h.jsxs)(h.Fragment,{children:[g?(0,h.jsx)(wt,{state:n,actions:r,choices:s,selections:u}):(0,h.jsx)(Ct,{onExpand:A,state:n,actions:r,choices:s,selections:u}),p&&!v&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(B.zx,{onClick:j,children:(0,h.jsx)(V.Z,{name:"sync"})}),(0,h.jsx)(Be,{state:n,actions:r})]})]}):(0,h.jsx)(U,{}):(0,h.jsx)(z,{}):null}Fe.propTypes={expanded:u().bool.isRequired,onExpand:u().func.isRequired,onError:u().func.isRequired,onSelect:u().func.isRequired};var Ye=Fe},56281:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.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:""}]),a.locals={action:"pi2Ig8c3Fdh4H2Jpxdo7",secondary:"Ctpu4E2dZYJ6g8CUGFOF"},e.Z=a},56634:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.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(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.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},92127:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".FMkASzwt_oMscZdObpDQ {\n  display: inline-block;\n  text-align: center;\n}\n.TNF6aRMBPANvZifB27ZK {\n  display: inline-block;\n  animation: GGCs7iiBiwDCnT80cyTh 1s linear infinite;\n}\n\n@keyframes GGCs7iiBiwDCnT80cyTh {\n  from { transform: rotate(0deg); }\n  to { transform: rotate(360deg); }\n}","",{version:3,sources:["webpack://./src/Common/spinner.module.css"],names:[],mappings:"AAAA;EACE,qBAAqB;EACrB,kBAAkB;AACpB;AACA;EACE,qBAAqB;EACrB,kDAAkC;AACpC;;AAEA;EACE,OAAO,uBAAuB,EAAE;EAChC,KAAK,yBAAyB,EAAE;AAClC",sourcesContent:[".spinner {\n  display: inline-block;\n  text-align: center;\n}\n.icon {\n  display: inline-block;\n  animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n  from { transform: rotate(0deg); }\n  to { transform: rotate(360deg); }\n}"],sourceRoot:""}]),a.locals={spinner:"FMkASzwt_oMscZdObpDQ",icon:"TNF6aRMBPANvZifB27ZK",spin:"GGCs7iiBiwDCnT80cyTh"},e.Z=a},80047:function(t,e,n){"use strict";var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".z8z3GXuYqlepCz4tRPZj {\n  cursor: pointer;\n  display: flex;\n  font-size: 1em;\n  box-sizing: border-box;\n  background: none;\n  border: none;\n  text-align: left;\n  border-radius: 4px;\n  gap: 5px;\n  height: 38px;\n  padding: 0 8px;\n\n  /* color: hsl(0, 0%, 20%); */\n}\n\n.z8z3GXuYqlepCz4tRPZj:hover {\n  background-color: var(--hover-selection);\n  color: white;\n}\n\n.yyHfal9pM4DzShMl4LAY {\n  display: inline-flex;\n  height: 30px;\n  border-radius: 5px;\n  align-items: center;\n\n  font-size: 70%;\n  padding: 0 4px;\n\n  background-color: royalblue;\n  color: white;\n  text-decoration: none;\n}\n\n.ukdycT4tarWVlV3PC6Rr {\n  display: flex;\n  height: 38px;\n  gap: 4px;\n}\n\n.ukdycT4tarWVlV3PC6Rr button,\n.ukdycT4tarWVlV3PC6Rr .yyHfal9pM4DzShMl4LAY {\n  height: 38px !important;\n}\n\n.yyHfal9pM4DzShMl4LAY code {\n  font-family: monospace;\n}\n\n.QvI5wo7_u6OeAc12ib0W {\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n  font-size: 200%;\n  text-align: center;\n}\n\n.eUw5NZqoPPF3BcyYDpJx {\n  /* color: var(--selection); */\n}\n\n.XjY4lN_lY3nSgHcw67bX {\n  /* color: brown; */\n}\n\n.Ap_OwCtp3j1Q29Phpw3V {\n  color: gold;\n  animation: WjBuPfls4V41d2sjbNFU 1s linear alternate infinite;\n}\n\n@keyframes WjBuPfls4V41d2sjbNFU {\n  from { opacity: 0.5; }\n  to { opacity: 1; }\n}\n","",{version:3,sources:["webpack://./src/Sources/Github/styles.module.css"],names:[],mappings:"AAAA;EACE,eAAe;EACf,aAAa;EACb,cAAc;EACd,sBAAsB;EACtB,gBAAgB;EAChB,YAAY;EACZ,gBAAgB;EAChB,kBAAkB;EAClB,QAAQ;EACR,YAAY;EACZ,cAAc;;EAEd,4BAA4B;AAC9B;;AAEA;EACE,wCAAwC;EACxC,YAAY;AACd;;AAEA;EACE,oBAAoB;EACpB,YAAY;EACZ,kBAAkB;EAClB,mBAAmB;;EAEnB,cAAc;EACd,cAAc;;EAEd,2BAA2B;EAC3B,YAAY;EACZ,qBAAqB;AACvB;;AAEA;EACE,aAAa;EACb,YAAY;EACZ,QAAQ;AACV;;AAEA;;EAEE,uBAAuB;AACzB;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,iBAAiB;EACjB,eAAe;EACf,kBAAkB;AACpB;;AAEA;EACE,6BAA6B;AAC/B;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,WAAW;EACX,4DAA6C;AAC/C;;AAEA;EACE,OAAO,YAAY,EAAE;EACrB,KAAK,UAAU,EAAE;AACnB",sourcesContent:[".compactWrapper {\n  cursor: pointer;\n  display: flex;\n  font-size: 1em;\n  box-sizing: border-box;\n  background: none;\n  border: none;\n  text-align: left;\n  border-radius: 4px;\n  gap: 5px;\n  height: 38px;\n  padding: 0 8px;\n\n  /* color: hsl(0, 0%, 20%); */\n}\n\n.compactWrapper:hover {\n  background-color: var(--hover-selection);\n  color: white;\n}\n\n.buildDetails {\n  display: inline-flex;\n  height: 30px;\n  border-radius: 5px;\n  align-items: center;\n\n  font-size: 70%;\n  padding: 0 4px;\n\n  background-color: royalblue;\n  color: white;\n  text-decoration: none;\n}\n\n.pickerActions {\n  display: flex;\n  height: 38px;\n  gap: 4px;\n}\n\n.pickerActions button,\n.pickerActions .buildDetails {\n  height: 38px !important;\n}\n\n.buildDetails code {\n  font-family: monospace;\n}\n\n.buildStatus {\n  width: 30px;\n  height: 30px;\n  line-height: 30px;\n  font-size: 200%;\n  text-align: center;\n}\n\n.buildSuccess {\n  /* color: var(--selection); */\n}\n\n.buildFailed {\n  /* color: brown; */\n}\n\n.buildPending {\n  color: gold;\n  animation: pulse 1s linear alternate infinite;\n}\n\n@keyframes pulse {\n  from { opacity: 0.5; }\n  to { opacity: 1; }\n}\n"],sourceRoot:""}]),a.locals={compactWrapper:"z8z3GXuYqlepCz4tRPZj",buildDetails:"yyHfal9pM4DzShMl4LAY",pickerActions:"ukdycT4tarWVlV3PC6Rr",buildStatus:"QvI5wo7_u6OeAc12ib0W",buildSuccess:"eUw5NZqoPPF3BcyYDpJx",buildFailed:"XjY4lN_lY3nSgHcw67bX",buildPending:"Ap_OwCtp3j1Q29Phpw3V",pulse:"WjBuPfls4V41d2sjbNFU"},e.Z=a},27484:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",c="week",s="month",u="quarter",l="year",f="date",d="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,s),i=n-o<0,a=e.clone().add(r+(i?-1:1),s);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:s,y:l,w:c,d:a,D:f,h:i,m:o,s:r,ms:n,Q:u}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",b={};b[g]=y;var A=function(t){return t instanceof E},x=function t(e,n,r){var o;if(!e)return g;if("string"==typeof e){var i=e.toLowerCase();b[i]&&(o=i),n&&(b[i]=n,o=i);var a=e.split("-");if(!o&&a.length>1)return t(a[0])}else{var c=e.name;b[c]=e,o=c}return!r&&o&&(g=o),o||!r&&g},w=function(t,e){if(A(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new E(n)},j=v;j.l=x,j.i=A,j.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var E=function(){function y(t){this.$L=x(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(j.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return j},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return j.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,u=!!j.u(e)||e,d=j.p(t),h=function(t,e){var r=j.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return u?r:r.endOf(a)},p=function(t,e){return j.w(n.toDate()[t].apply(n.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,m=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(d){case l:return u?h(1,0):h(31,11);case s:return u?h(1,m):h(0,m+1);case c:var b=this.$locale().weekStart||0,A=(y<b?y+7:y)-b;return h(u?v-A:v+(6-A),m);case a:case f:return p(g+"Hours",0);case i:return p(g+"Minutes",1);case o:return p(g+"Seconds",2);case r:return p(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var c,u=j.p(t),d="set"+(this.$u?"UTC":""),h=(c={},c[a]=d+"Date",c[f]=d+"Date",c[s]=d+"Month",c[l]=d+"FullYear",c[i]=d+"Hours",c[o]=d+"Minutes",c[r]=d+"Seconds",c[n]=d+"Milliseconds",c)[u],p=u===a?this.$D+(e-this.$W):e;if(u===s||u===l){var y=this.clone().set(f,1);y.$d[h](p),y.init(),this.$d=y.set(f,Math.min(this.$D,y.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[j.p(t)]()},m.add=function(n,u){var f,d=this;n=Number(n);var h=j.p(u),p=function(t){var e=w(d);return j.w(e.date(e.date()+Math.round(t*n)),d)};if(h===s)return this.set(s,this.$M+n);if(h===l)return this.set(l,this.$y+n);if(h===a)return p(1);if(h===c)return p(7);var y=(f={},f[o]=t,f[i]=e,f[r]=1e3,f)[h]||1,m=this.$d.getTime()+n*y;return j.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=j.z(this),i=this.$H,a=this.$m,c=this.$M,s=n.weekdays,u=n.months,l=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].slice(0,i)},f=function(t){return j.s(i%12||12,t,"0")},h=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},y={YY:String(this.$y).slice(-2),YYYY:this.$y,M:c+1,MM:j.s(c+1,2,"0"),MMM:l(n.monthsShort,c,u,3),MMMM:l(u,c),D:this.$D,DD:j.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,s,2),ddd:l(n.weekdaysShort,this.$W,s,3),dddd:s[this.$W],H:String(i),HH:j.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,a,!0),A:h(i,a,!1),m:String(a),mm:j.s(a,2,"0"),s:String(this.$s),ss:j.s(this.$s,2,"0"),SSS:j.s(this.$ms,3,"0"),Z:o};return r.replace(p,(function(t,e){return e||y[t]||o.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,f,d){var h,p=j.p(f),y=w(n),m=(y.utcOffset()-this.utcOffset())*t,v=this-y,g=j.m(this,y);return g=(h={},h[l]=g/12,h[s]=g,h[u]=g/3,h[c]=(v-m)/6048e5,h[a]=(v-m)/864e5,h[i]=v/e,h[o]=v/t,h[r]=v/1e3,h)[p]||v,d?g:j.a(g)},m.daysInMonth=function(){return this.endOf(s).$D},m.$locale=function(){return b[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=x(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return j.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),O=E.prototype;return w.prototype=O,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",s],["$y",l],["$D",f]].forEach((function(t){O[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,E,w),t.$i=!0),w},w.locale=x,w.isDayjs=A,w.unix=function(t){return w(1e3*t)},w.en=b[g],w.Ls=b,w.p={},w}()},84110:function(t){t.exports=function(){"use strict";return function(t,e,n){t=t||{};var r=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(t,e,n,o){return r.fromToBase(t,e,n,o)}n.en.relativeTime=o,r.fromToBase=function(e,r,i,a,c){for(var s,u,l,f=i.$locale().relativeTime||o,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],h=d.length,p=0;p<h;p+=1){var y=d[p];y.d&&(s=a?n(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var m=(t.rounding||Math.round)(Math.abs(s));if(l=s>0,m<=y.r||!y.r){m<=1&&p>0&&(y=d[p-1]);var v=f[y.l];c&&(m=c(""+m)),u="string"==typeof v?v.replace("%d",m):v(m,r,y.l,l);break}}if(r)return u;var g=l?f.future:f.past;return"function"==typeof g?g(u):g.replace("%s",u)},r.to=function(t,e){return i(t,e,this,!0)},r.from=function(t,e){return i(t,e,this)};var a=function(t){return t.$u?n.utc():n()};r.toNow=function(t){return this.to(a(this),t)},r.fromNow=function(t){return this.from(a(this),t)}}}()},69199:function(t,e,n){var r=n(89881),o=n(98612);t.exports=function(t,e){var n=-1,i=o(t)?Array(t.length):[];return r(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}},66379:function(t,e,n){var r=n(2958),o=n(1499);t.exports=function(t,e){return t===e||r(t,e,o(e))}},35161:function(t,e,n){var r=n(29932),o=n(67206),i=n(69199),a=n(1469);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},66317:function(){},99918:function(){}}]);
//# sourceMappingURL=GithubPicker.2598399af837a4c8ebcb.js.map