import{__exports as e}from"../../../_virtual/index.js_commonjs-exports";Object.defineProperty(e,"__esModule",{value:!0});for(var r="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},o={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:r?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},n={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},a=1;a<20;a++)n["f"+a]=111+a;function i(e,r,t){r&&!("byKey"in r)&&(t=r,r=null),Array.isArray(e)||(e=[e]);var o=e.map((function(e){return l(e,r)})),n=function(e){return o.some((function(r){return c(r,e)}))};return null==t?n:n(t)}function l(e,r){var o=r&&r.byKey,n={},a=(e=e.replace("++","+add")).split("+"),i=a.length;for(var l in t)n[t[l]]=!1;var c=!0,d=!1,y=void 0;try{for(var f,p=a[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var w=f.value,m=w.endsWith("?")&&w.length>1;m&&(w=w.slice(0,-1));var h=s(w),v=t[h];1!==i&&v||(o?n.key=h:n.which=u(w)),v&&(n[v]=!m||null)}}catch(e){d=!0,y=e}finally{try{!c&&p.return&&p.return()}finally{if(d)throw y}}return n}function c(e,r){for(var t in e){var o=e[t],n=void 0;if(null!=o&&((null!=(n="key"===t&&null!=r.key?r.key.toLowerCase():"which"===t?91===o&&93===r.which?91:r.which:r[t])||!1!==o)&&n!==o))return!1}return!0}function u(e){return e=s(e),n[e]||e.toUpperCase().charCodeAt(0)}function s(e){return e=e.toLowerCase(),e=o[e]||e}e.default=i,e.isHotkey=i,e.isCodeHotkey=function(e,r){return i(e,r)};var d=e.isKeyHotkey=function(e,r){return i(e,{byKey:!0},r)};e.parseHotkey=l,e.compareHotkey=c,e.toKeyCode=u,e.toKeyName=s;export{d as isKeyHotkey};
//# sourceMappingURL=index.js.map
