"use strict";const e={};exports.classListMutation=function(e,r){const t=Object.keys(r);for(let n=0,{length:s}=t[n];n<s;n+=1){const s=t[n];"string"==typeof s&&s.length>0&&(r[s]?e.add(s):e.remove(s))}},exports.isShiftMetaOrControlKey=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},exports.keyCodes={tab:9,backspace:8,enter:13,escape:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46,shift:16},exports.normalizeKeyValue=function(e){switch(e){case"Spacebar":return" ";case"Esc":return"Escape";case"Del":return"Delete";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Up":return"ArrowUp";default:return e}},exports.runActionOnBufferedTypedCharacters=function(r,t){const n=r.key;if(n&&n.length>1)return;e._clearBufferId&&clearTimeout(e._clearBufferId),e._keyBuffer=e._keyBuffer||[],e._keyBuffer.push(n),t(e._keyBuffer.join("").toLowerCase()),e._clearBufferId=setTimeout(()=>{e._keyBuffer=[]},700)};
