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Q,WAAW,IAAI,EAAI,KAAS,EAAG,EAAI,eAAuC,OAAjB,EAAI,MAAM,IAAI,GAAa,MAAM,CAAC,YAAY,gBAAgB,CAAC,EAAI,GAAG,YAAY,EAAE,EAAE,gBAAiB,GAAG,SAAU,kBACpM,KAAM,cACN,QAAS,WACP,IAAI,EAAS,KAET,EAAY,OAAO,KAAK,KAAK,YACjC,KAAK,cAAgB,EAAU,QAAO,SAAU,GAAY,OAAO,EAAU,SAAS,EAAS,aAAe,IAE9G,KAAK,cAAc,SACjB,SAAU,GAAY,OAAQ,EAAO,EAAS,cAAgB,WAC1D,KAAK,MAAM,EAAS,aACtB,EAAE,KAAK,EAAU,IAGrB,KAAK,cAAc,SAAQ,SAAU,GAAY,OAAO,SAAS,iBAAiB,EAAS,UAAW,EAAO,EAAS,cAAgB,GAExI,EACA,UAAW,WACT,IAAI,EAAS,KAEb,KAAK,cAAc,SAAQ,SAAU,GAAY,OAAO,SAAS,oBAC7D,EAAS,UACT,EAAO,EAAS,cACf,GAEP,GAIF,SAAS,EAAQ,GACX,EAAQ,YACZ,EAAQ,WAAY,EACpB,EAAI,UAAU,cAAe,GAC/B,CAGA,IAAI,EAAS,CACX,QAAS,GAIP,EAAY,KACM,oBAAX,OACT,EAAY,OAAO,IACQ,oBAAX,SAChB,EAAY,OAAO,KAEjB,GACF,EAAU,IAAI,GAGhB,EAAQ,QAAU,EAClB,EAAQ,QAAU,EAElB,OAAO,eAAe,EAAS,aAAc,CAAE,OAAO,GAEvD","file":"/npm/vue-shortcut@0.1.2/dist/vue-shortcut.umd.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/vue-shortcut@0.1.2/dist/vue-shortcut.umd.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n  typeof define === 'function' && define.amd ? define(['exports'], factory) :\n  (factory((global.VueShortcut = {})));\n}(this, (function (exports) { 'use strict';\n\n  !function(){var a={\".\":\"shortcutLoadItems\",\"/\":\"shortcutSearchItems\",\"?\":\"shortcutShowHelp\",j:\"shortcutNextItem\",k:\"shortcutPrevItem\",n:\"shortcutNewItem\",o:\"shortcutOpenItem\"},b={input:!0,textarea:!0,select:!0};document.addEventListener(\"keypress\",function(c){var d,e=document.activeElement.tagName.toLowerCase(),f=a[String.fromCharCode(c.charCode)];void 0===typeof f||b[e]||(window.CustomEvent?d=new CustomEvent(f):(d=document.createEvent(\"CustomEvent\"), d.initCustomEvent(f,!1,!1,null)), document.dispatchEvent(d));});}();\n\n  (function(){ if(typeof document !== 'undefined'){ var head=document.head||document.getElementsByTagName('head')[0], style=document.createElement('style'), css=\" /*# sourceMappingURL=vue-shortcut.vue.map */\"; style.type='text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); } })();\n\n  var shortcuts = [\n    {\n      eventName: \"shortcutNextItem\",\n      emittedLabel: \"nextItem\"\n    },\n    {\n      eventName: \"shortcutPrevItem\",\n      emittedLabel: \"prevItem\"\n    },\n    {\n      eventName: \"shortcutNewItem\",\n      emittedLabel: \"newItem\"\n    },\n    {\n      eventName: \"shortcutOpenItem\",\n      emittedLabel: \"openItem\"\n    },\n    {\n      eventName: \"shortcutSearchItems\",\n      emittedLabel: \"searchItems\"\n    },\n    {\n      eventName: \"shortcutLoadItems\",\n      emittedLabel: \"loadItems\"\n    },\n    {\n      eventName: \"shortcutShowHelp\",\n      emittedLabel: \"showHelp\"\n    }\n  ];\n\n  var component = {render: function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"vue-shortcut\"},[_vm._t(\"default\")],2)},staticRenderFns: [],_scopeId: 'data-v-f184f69a',\n    name: \"VueShortcut\",\n    created: function created() {\n      var this$1 = this;\n\n      var listeners = Object.keys(this.$listeners);\n      this.usedShortcuts = shortcuts.filter(function (shortcut) { return listeners.includes(shortcut.emittedLabel); }\n      );\n      this.usedShortcuts.forEach(\n        function (shortcut) { return (this$1[shortcut.emittedLabel] = function() {\n            this.$emit(shortcut.emittedLabel);\n          }.bind(this$1)); }\n      );\n\n      this.usedShortcuts.forEach(function (shortcut) { return document.addEventListener(shortcut.eventName, this$1[shortcut.emittedLabel]); }\n      );\n    },\n    destroyed: function destroyed() {\n      var this$1 = this;\n\n      this.usedShortcuts.forEach(function (shortcut) { return document.removeEventListener(\n          shortcut.eventName,\n          this$1[shortcut.emittedLabel]\n        ); }\n      );\n    }\n  };\n\n  // install function executed by Vue.use()\n  function install(Vue) {\n    if (install.installed) { return; }\n    install.installed = true;\n    Vue.component(\"VueShortcut\", component);\n  }\n\n  // create module definition for Vue.use()\n  var plugin = {\n    install: install\n  };\n\n  // auto-install when vue is found\n  var GlobalVue = null;\n  if (typeof window !== \"undefined\") {\n    GlobalVue = window.Vue;\n  } else if (typeof global !== \"undefined\") {\n    GlobalVue = global.Vue;\n  }\n  if (GlobalVue) {\n    GlobalVue.use(plugin);\n  }\n\n  exports.install = install;\n  exports.default = component;\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n"]}