import{ae as r}from"./index-C9rtWdw7.chunk.mjs";const u=window.OCP?.Accessibility?.disableKeyboardShortcuts?.(),l=/mac|ipad|iphone|darwin/i.test(navigator.userAgent);function m(t){return!(t.target instanceof HTMLElement)||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement||t.target.isContentEditable?!0:document.getElementsByClassName("modal-mask").length!==0}function c(t,n){return e=>{if((l?e.metaKey:e.ctrlKey)===!!n.ctrl){if(e.altKey!==!!n.alt||n.shift!==void 0&&e.shiftKey!==!!n.shift||m(e))return;n.prevent&&e.preventDefault(),n.stop&&e.stopPropagation(),t(e)}}}function d(t,n=()=>{},e={}){if(u)return()=>{};const i=(a,s)=>e.caseSensitive?a.key===s:a.key.toLowerCase()===s.toLowerCase(),o=a=>typeof t=="function"?t(a):typeof t=="string"?i(a,t):Array.isArray(t)?t.some(s=>i(a,s)):!0,f=r(o,c(n,e),{eventName:"keydown",dedupe:!0,passive:!e.prevent}),p=e.push?r(o,c(n,e),{eventName:"keyup",passive:!e.prevent}):()=>{};return()=>{f(),p()}}export{d as u};
//# sourceMappingURL=useHotKey-DJHjuzLO.chunk.mjs.map
