├── src
├── docs
│ ├── pages
│ │ ├── end.vue
│ │ ├── step-1.vue
│ │ ├── doc.vue
│ │ ├── step-7.vue
│ │ ├── start.vue
│ │ ├── step.vue
│ │ ├── step-2.vue
│ │ ├── step-3.vue
│ │ ├── step-4.vue
│ │ ├── step-6.vue
│ │ └── step-5.vue
│ ├── img
│ │ └── bg.jpg
│ ├── main.js
│ ├── App.vue
│ └── routes.js
├── keycodes
│ ├── functionkeys.js
│ ├── aliases.js
│ ├── lowercase.js
│ ├── numpad.js
│ ├── codes.js
│ └── index.js
├── index.js
├── main.js
└── helpers.js
├── .eslintignore
├── postcss.config.js
├── babel.config.js
├── docs
├── img
│ └── bg.b458a270.jpg
├── index.html
├── css
│ └── index.a639c980.css
└── js
│ ├── index.91841365.js
│ ├── index.91841365.js.map
│ └── chunk-vendors.6c30874f.js
├── jest.config.js
├── .editorconfig
├── CONTRIBUTING.md
├── .gitignore
├── vue.config.js
├── tests
└── unit
│ ├── Foo.vue
│ ├── directive.spec.js
│ ├── keycodes.spec.js
│ └── helpers.spec.js
├── .eslintrc.js
├── LICENSE
├── package.json
└── README.md
/src/docs/pages/end.vue:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | dist
2 | docs
--------------------------------------------------------------------------------
/src/docs/img/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dafrok/v-hotkey/HEAD/src/docs/img/bg.jpg
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 |
3 | module.exports = {
4 | presets: ['@babel/preset-env']
5 | }
6 |
--------------------------------------------------------------------------------
/docs/img/bg.b458a270.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Dafrok/v-hotkey/HEAD/docs/img/bg.b458a270.jpg
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: '@vue/cli-plugin-unit-jest/presets/no-babel'
3 | }
4 |
--------------------------------------------------------------------------------
/src/keycodes/functionkeys.js:
--------------------------------------------------------------------------------
1 | export default {
2 | f1: 112,
3 | f2: 113,
4 | f3: 114,
5 | f4: 115,
6 | f5: 116,
7 | f6: 117,
8 | f7: 118,
9 | f8: 119,
10 | f9: 120,
11 | f10: 121,
12 | f11: 122,
13 | f12: 123
14 | }
15 |
--------------------------------------------------------------------------------
/src/docs/pages/step-1.vue:
--------------------------------------------------------------------------------
1 |
2 | section
3 | h1.title Get Start
4 | section.hero-section
5 | p Press ← to previous page.
6 | p Press → to next page.
7 | p Press esc to return home.
8 |
9 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_size = 2
7 | indent_style = space
8 | end_of_line = lf
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # CONTRIBUTING
2 |
3 | ## Development
4 |
5 | ```bash
6 | # Dev server run at http://locahost:8080
7 | $ npm i
8 | $ npm run dev
9 | ```
10 |
11 | ## Build
12 |
13 | ```
14 | $ npm run build
15 | ```
16 |
17 | ## Build docs
18 |
19 | ```
20 | $ npm run build:docs
21 | ```
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | coverage
4 | /dist
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 |
15 | # Editor directories and files
16 | .idea
17 | .vscode
18 | *.suo
19 | *.ntvs*
20 | *.njsproj
21 | *.sln
22 | *.sw?
23 |
--------------------------------------------------------------------------------
/src/keycodes/aliases.js:
--------------------------------------------------------------------------------
1 | export default {
2 | windows: 91,
3 | '⇧': 16,
4 | '⌥': 18,
5 | '⌃': 17,
6 | '⌘': 91,
7 | ctl: 17,
8 | control: 17,
9 | option: 18,
10 | pause: 19,
11 | break: 19,
12 | caps: 20,
13 | return: 13,
14 | escape: 27,
15 | spc: 32,
16 | pgup: 33,
17 | pgdn: 34,
18 | ins: 45,
19 | del: 46,
20 | cmd: 91
21 | }
22 |
--------------------------------------------------------------------------------
/src/keycodes/lowercase.js:
--------------------------------------------------------------------------------
1 | export default {
2 | a: 65,
3 | b: 66,
4 | c: 67,
5 | d: 68,
6 | e: 69,
7 | f: 70,
8 | g: 71,
9 | h: 72,
10 | i: 73,
11 | j: 74,
12 | k: 75,
13 | l: 76,
14 | m: 77,
15 | n: 78,
16 | o: 79,
17 | p: 80,
18 | q: 81,
19 | r: 82,
20 | s: 83,
21 | t: 84,
22 | u: 85,
23 | v: 86,
24 | w: 87,
25 | x: 88,
26 | y: 89,
27 | z: 90
28 | }
29 |
--------------------------------------------------------------------------------
/src/keycodes/numpad.js:
--------------------------------------------------------------------------------
1 | export default {
2 | 'numpad*': 106,
3 | 'numpad+': 43,
4 | numpadadd: 43,
5 | 'numpad-': 109,
6 | 'numpad.': 110,
7 | 'numpad/': 111,
8 | numlock: 144,
9 | numpad0: 96,
10 | numpad1: 97,
11 | numpad2: 98,
12 | numpad3: 99,
13 | numpad4: 100,
14 | numpad5: 101,
15 | numpad6: 102,
16 | numpad7: 103,
17 | numpad8: 104,
18 | numpad9: 105
19 | }
20 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
V-Hotkey
--------------------------------------------------------------------------------
/src/docs/pages/doc.vue:
--------------------------------------------------------------------------------
1 |
2 | article(v-hotkey="keymap")
3 | h1 Documentation
4 |
5 |
6 |
24 |
--------------------------------------------------------------------------------
/src/docs/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueHotkey from '../../src/index.js'
3 | import VueRouter from 'vue-router'
4 |
5 | import App from './App.vue'
6 | import routes from './routes'
7 |
8 | import 'bulma/css/bulma.css'
9 |
10 | Vue.use(VueHotkey)
11 | Vue.use(VueRouter)
12 |
13 | const router = new VueRouter({ routes })
14 |
15 | /* eslint-disable no-new */
16 | new Vue({
17 | el: '#app',
18 | router,
19 | render (h) {
20 | return h(App)
21 | }
22 | })
23 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | const HtmlWebpackTemplate = require('html-webpack-template')
2 |
3 | const isProduction = process.env.NODE_ENV === 'production'
4 |
5 | /** @type {import('@vue/cli-service').ProjectOptions} */
6 | module.exports = {
7 | publicPath: isProduction ? '/v-hotkey/' : '',
8 | pages: {
9 | index: {
10 | entry: './src/docs/main',
11 | title: 'V-Hotkey',
12 | template: HtmlWebpackTemplate,
13 | inject: false,
14 | appMountId: 'app'
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/tests/unit/Foo.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | Toggle
8 |
9 |
13 | Hello hotkey
14 |
15 |
16 |
17 |
18 |
31 |
--------------------------------------------------------------------------------
/src/docs/pages/step-7.vue:
--------------------------------------------------------------------------------
1 |
2 | section(v-hotkey="keymap")
3 | h1.title Well done!
4 | section.hero-section
5 | p Press enter to give me a STAR.
6 | p Press esc to return home.
7 |
8 |
25 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | const isProduction = process.env.NODE_ENV === 'production'
2 |
3 | module.exports = {
4 | root: true,
5 | parserOptions: {
6 | parser: 'babel-eslint',
7 | sourceType: 'module'
8 | },
9 | extends: ['standard', 'plugin:vue/recommended'],
10 | plugins: ['vue'],
11 | overrides: [{
12 | files: ['**/*.spec.js'],
13 | plugins: ['jest'],
14 | env: {
15 | jest: true
16 | }
17 | }],
18 | rules: {
19 | 'arrow-parens': 'off',
20 | 'generator-star-spacing': 'off',
21 | 'no-debugger': isProduction ? 'error' : 'off',
22 | 'no-prototype-builtins': 'off'
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import { bindEvent, unbindEvent } from './main'
2 |
3 | const buildDirective = function (alias = {}) {
4 | return {
5 | bind (el, binding) {
6 | bindEvent(el, binding, alias)
7 | },
8 | componentUpdated (el, binding) {
9 | if (binding.value !== binding.oldValue) {
10 | unbindEvent(el)
11 | bindEvent(el, binding, alias)
12 | }
13 | },
14 | unbind: unbindEvent
15 | }
16 | }
17 |
18 | const plugin = {
19 | install (Vue, alias = {}) {
20 | Vue.directive('hotkey', buildDirective(alias))
21 | },
22 |
23 | directive: buildDirective()
24 | }
25 |
26 | export default plugin
27 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import { getKeyMap } from './keycodes'
2 | import { assignKeyHandler } from './helpers'
3 |
4 | /**
5 | *
6 | * @param {Object} el
7 | * @param {Object} bindings
8 | * @param {Object} alias
9 | */
10 | function bindEvent (el, { value, modifiers }, alias) {
11 | el._keyMap = getKeyMap(value, alias)
12 | el._keyHandler = e => assignKeyHandler(e, el._keyMap, modifiers)
13 |
14 | document.addEventListener('keydown', el._keyHandler)
15 | document.addEventListener('keyup', el._keyHandler)
16 | }
17 |
18 | /**
19 | *
20 | * @param {Object} el
21 | */
22 | function unbindEvent (el) {
23 | document.removeEventListener('keydown', el._keyHandler)
24 | document.removeEventListener('keyup', el._keyHandler)
25 | }
26 |
27 | export {
28 | bindEvent,
29 | unbindEvent
30 | }
31 |
--------------------------------------------------------------------------------
/src/docs/pages/start.vue:
--------------------------------------------------------------------------------
1 |
2 | div(v-hotkey="keymap")
3 | h1.title V-Hotkey
4 | h2.subtitle Vue 2.x directive for binding hotkeys to components.
5 | section.hero-section
6 | p Press enter to get start.
7 | p Press space to see the documentation.
8 |
9 |
10 |
30 |
--------------------------------------------------------------------------------
/src/docs/pages/step.vue:
--------------------------------------------------------------------------------
1 |
2 | section(v-hotkey="keymap")
3 | transition(name="slide", mode="out-in")
4 | router-view
5 |
6 |
7 |
36 |
--------------------------------------------------------------------------------
/tests/unit/directive.spec.js:
--------------------------------------------------------------------------------
1 | import { mount, createLocalVue } from '@vue/test-utils'
2 | import hotkeyDirective from '../../src/index'
3 | import Foo from './Foo.vue'
4 |
5 | const localVue = createLocalVue()
6 | localVue.use(hotkeyDirective)
7 |
8 | describe('Hotkey works', () => {
9 | it('shows div on enter down', async () => {
10 | const wrapper = mount(Foo, {
11 | localVue,
12 | attachToDocument: true
13 | })
14 | let div = wrapper.find('.visible')
15 | expect(div.exists()).toBe(false)
16 | wrapper.trigger('keydown.enter')
17 | div = wrapper.find('.visible')
18 | expect(div.exists()).toBe(true)
19 | expect(div.text()).toBe('Hello hotkey')
20 | })
21 |
22 | it('hiddes div on esc down', async () => {
23 | const wrapper = mount(Foo, {
24 | localVue,
25 | attachToDocument: true
26 | })
27 | wrapper.trigger('keydown.enter')
28 | let div = wrapper.find('.visible')
29 | expect(div.exists()).toBe(true)
30 | wrapper.trigger('keydown.esc')
31 | div = wrapper.find('.visible')
32 | expect(div.exists()).toBe(false)
33 | })
34 | })
35 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 马金花儿
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/src/docs/App.vue:
--------------------------------------------------------------------------------
1 |
2 | section.hero.is-fullheight
3 | .hero-body
4 | .container.has-text-centered
5 | transition(name="slide", mode="out-in")
6 | router-view
7 |
8 |
9 |
11 |
12 |
46 |
--------------------------------------------------------------------------------
/src/keycodes/codes.js:
--------------------------------------------------------------------------------
1 | import aliases from './aliases'
2 | import functionKeys from './functionkeys'
3 | import lowercase from './lowercase'
4 | import numpad from './numpad'
5 |
6 | export default {
7 | backspace: 8,
8 | tab: 9,
9 | enter: 13,
10 | shift: 16,
11 | ctrl: 17,
12 | alt: 18,
13 | 'pause/break': 19,
14 | capslock: 20,
15 | esc: 27,
16 | space: 32,
17 | pageup: 33,
18 | pagedown: 34,
19 | end: 35,
20 | home: 36,
21 | left: 37,
22 | up: 38,
23 | right: 39,
24 | down: 40,
25 | insert: 45,
26 | delete: 46,
27 | command: 91,
28 | meta: 91,
29 | leftcommand: 91,
30 | rightcommand: 93,
31 | scrolllock: 145,
32 | mycomputer: 182,
33 | mycalculator: 183,
34 | ';': 186,
35 | '=': 187,
36 | ',': 188,
37 | '-': 189,
38 | '.': 190,
39 | '/': 191,
40 | '`': 192,
41 | '[': 219,
42 | '\\': 220,
43 | ']': 221,
44 | "'": 222,
45 | ':': 186,
46 | '+': 187,
47 | '<': 188,
48 | _: 189,
49 | '>': 190,
50 | '?': 191,
51 | '~': 192,
52 | '{': 219,
53 | '|': 220,
54 | '}': 221,
55 | '"': 222,
56 | ...lowercase,
57 | ...numpad,
58 | ...functionKeys,
59 | ...aliases
60 | }
61 |
--------------------------------------------------------------------------------
/src/docs/routes.js:
--------------------------------------------------------------------------------
1 | import Step1 from './pages/step-1.vue'
2 | import Step2 from './pages/step-2.vue'
3 | import Step3 from './pages/step-3.vue'
4 | import Step4 from './pages/step-4.vue'
5 | import Step5 from './pages/step-5.vue'
6 | import Step6 from './pages/step-6.vue'
7 | import Step7 from './pages/step-7.vue'
8 | import Start from './pages/start.vue'
9 | import Step from './pages/step.vue'
10 |
11 | export default [
12 | {
13 | path: '/',
14 | alias: '/start',
15 | component: Start
16 | },
17 | {
18 | path: '/step',
19 | component: Step,
20 | children: [
21 | {
22 | path: '1',
23 | component: Step1
24 | },
25 | {
26 | path: '2',
27 | component: Step2
28 | },
29 | {
30 | path: '3',
31 | component: Step3
32 | },
33 | {
34 | path: '4',
35 | component: Step4
36 | },
37 | {
38 | path: '5',
39 | component: Step5
40 | },
41 | {
42 | path: '6',
43 | component: Step6
44 | },
45 | {
46 | path: '7',
47 | component: Step7
48 | }
49 | ]
50 | }
51 | ]
52 |
--------------------------------------------------------------------------------
/src/docs/pages/step-2.vue:
--------------------------------------------------------------------------------
1 |
2 | section(v-hotkey="keymap")
3 | h1.title(ref="hello") Hello world.
4 | section.hero-section
5 | p Press enter to say hello.
6 | transition(name="slide")
7 | p(:class="{next: true, show: show}") Press → to play next case.
8 |
9 |
10 |
37 |
38 |
58 |
--------------------------------------------------------------------------------
/src/docs/pages/step-3.vue:
--------------------------------------------------------------------------------
1 |
2 | section(v-hotkey="keymap")
3 | h1.title Keyup and Keydown Listeners.
4 | section.hero-section
5 | p Press and hold enter to say #[b.hello(ref="hello") hello] louder.
6 | transition(name="slide")
7 | p(:class="{next: true, show: show}") Press → to play next case.
8 |
9 |
10 |
41 |
42 |
59 |
--------------------------------------------------------------------------------
/tests/unit/keycodes.spec.js:
--------------------------------------------------------------------------------
1 | import { getKeyMap } from '../../src/keycodes'
2 |
3 | describe('keycodes functions', () => {
4 | it('should create a keymap', () => {
5 | const combinations = {
6 | 'ctrl+1': () => {}
7 | }
8 | const result = getKeyMap(combinations, {})
9 | expect(result.length).toEqual(1)
10 | expect(result[0].code).toEqual(49)
11 | })
12 |
13 | it('should create a keymap for ctrl, alt, shift, command', () => {
14 | const combinations = {
15 | ctrl: () => {},
16 | alt: () => {},
17 | shift: () => {},
18 | command: () => {}
19 | }
20 | const result = getKeyMap(combinations, {})
21 |
22 | expect(result.length).toEqual(4)
23 | expect(result[0].code).toEqual(17)
24 | expect(result[1].code).toEqual(18)
25 | expect(result[2].code).toEqual(16)
26 | expect(result[3].code).toEqual(91)
27 | })
28 |
29 | it('should create a keymap with key modifers', () => {
30 | const combinations = {
31 | 'ctrl+alt+shift+command+1': () => {}
32 | }
33 | const result = getKeyMap(combinations, {})
34 | expect(result.length).toEqual(1)
35 | expect(result[0].code).toEqual(49)
36 | expect(result[0].modifiers.ctrlKey).toEqual(true)
37 | expect(result[0].modifiers.altKey).toEqual(true)
38 | expect(result[0].modifiers.shiftKey).toEqual(true)
39 | expect(result[0].modifiers.metaKey).toEqual(true)
40 | })
41 | })
42 |
--------------------------------------------------------------------------------
/src/docs/pages/step-4.vue:
--------------------------------------------------------------------------------
1 |
2 | section(v-hotkey="keymap")
3 | h1.title Key Combination
4 | section.hero-section
5 | p Press ctrl + enter to say
6 | b(ref="hello") hello.
7 | p Press alt + enter to say
8 | b(ref="bye") bye.
9 | p Press ctrl + alt + enter to leave.
10 | p(:class="{next: true, show: show}") Press → to play next case.
11 |
12 |
13 |
50 |
51 |
73 |
--------------------------------------------------------------------------------
/src/helpers.js:
--------------------------------------------------------------------------------
1 |
2 | const FORBIDDEN_NODES = ['INPUT', 'TEXTAREA', 'SELECT']
3 |
4 | /**
5 | *
6 | * @param {Object} a
7 | * @param {Object} b
8 | * @returns {Boolean}
9 | */
10 | const areObjectsEqual = (a, b) =>
11 | Object.entries(a).every(([key, value]) => b[key] === value)
12 |
13 | /**
14 | *
15 | * @param {String} combination
16 | */
17 | export const splitCombination = combination => {
18 | combination = combination.replace(/\s/g, '')
19 | combination = combination.includes('numpad+')
20 | ? combination.replace('numpad+', 'numpadadd')
21 | : combination
22 | combination = combination.includes('++')
23 | ? combination.replace('++', '+=')
24 | : combination
25 | return combination.split(/\+{1}/)
26 | }
27 |
28 | /**
29 | *
30 | * @param {String} key
31 | * @returns {String|undefined}
32 | */
33 | export const returnCharCode = key => key.length === 1 ? key.charCodeAt(0) : undefined
34 |
35 | /**
36 | *
37 | * @param {Array} keyMap
38 | * @param {Number} keyCode
39 | * @param {Object} eventKeyModifiers
40 | * @returns {Function|Boolean}
41 | */
42 | const getHotkeyCallback = (keyMap, keyCode, eventKeyModifiers) => {
43 | const key = keyMap.find(({ code, modifiers }) =>
44 | code === keyCode && areObjectsEqual(eventKeyModifiers, modifiers)
45 | )
46 | if (!key) return false
47 | return key.callback
48 | }
49 |
50 | /**
51 | *
52 | * @param {Event} e
53 | * @param {Array} keyMap
54 | * @param {Object} modifiers Vue event modifiers
55 | */
56 | export const assignKeyHandler = (e, keyMap, modifiers) => {
57 | const { keyCode, ctrlKey, altKey, shiftKey, metaKey } = e
58 | const eventKeyModifiers = { ctrlKey, altKey, shiftKey, metaKey }
59 |
60 | if (modifiers.prevent) {
61 | e.preventDefault()
62 | }
63 |
64 | if (modifiers.stop) {
65 | e.stopPropagation()
66 | }
67 |
68 | const { nodeName, isContentEditable } = document.activeElement
69 | if (isContentEditable) return
70 | if (FORBIDDEN_NODES.includes(nodeName)) return
71 |
72 | const callback = getHotkeyCallback(keyMap, keyCode, eventKeyModifiers)
73 | if (!callback) return e
74 | e.preventDefault()
75 | callback[e.type](e)
76 | }
77 |
--------------------------------------------------------------------------------
/src/keycodes/index.js:
--------------------------------------------------------------------------------
1 | import codes from './codes'
2 | import { splitCombination, returnCharCode } from '../helpers'
3 |
4 | const noop = () => {}
5 |
6 | const defaultModifiers = {
7 | ctrlKey: false,
8 | altKey: false,
9 | shiftKey: false,
10 | metaKey: false
11 | }
12 |
13 | function isApplePlatform() {
14 | return typeof navigator !== 'undefined' && /Mac|iPod|iPhone|iPad/.test(navigator.platform);
15 | }
16 |
17 | const alternativeKeyNames = {
18 | option: 'alt',
19 | command: 'meta',
20 | return: 'enter',
21 | escape: 'esc',
22 | plus: '+',
23 | mod: isApplePlatform() ? 'meta' : 'ctrl'
24 | }
25 |
26 | /**
27 | *
28 | * @param {Object} combinations
29 | * @param {Object} alias
30 | * @returns {Object}
31 | */
32 | export const getKeyMap = (combinations, alias) => {
33 | const result = []
34 |
35 | Object.keys(combinations).forEach(combination => {
36 | const { keyup, keydown } = combinations[combination]
37 | const callback = {
38 | keydown: keydown || (keyup ? noop : combinations[combination]),
39 | keyup: keyup || noop
40 | }
41 | const keys = splitCombination(combination)
42 | const { code, modifiers } = resolveCodesAndModifiers(keys, alias)
43 |
44 | result.push({
45 | code,
46 | modifiers,
47 | callback
48 | })
49 | })
50 |
51 | return result
52 | }
53 |
54 | /**
55 | *
56 | * @param {Array} keys
57 | * @param {Object} alias
58 | * @returns {Object}
59 | */
60 | const resolveCodesAndModifiers = (keys, alias) => {
61 | let modifiers = { ...defaultModifiers }
62 | if (keys.length > 1) {
63 | return keys.reduce((acc, key) => {
64 | key = alternativeKeyNames[key] || key
65 | if (defaultModifiers.hasOwnProperty(`${key}Key`)) {
66 | acc.modifiers = { ...acc.modifiers, [`${key}Key`]: true }
67 | } else {
68 | acc.code = alias[key] || searchKeyCode(key)
69 | }
70 | return acc
71 | }, { modifiers })
72 | }
73 |
74 | const key = alternativeKeyNames[keys[0]] || keys[0]
75 | if (defaultModifiers.hasOwnProperty(`${key}Key`)) {
76 | modifiers = { ...modifiers, [`${key}Key`]: true }
77 | }
78 | const code = alias[key] || searchKeyCode(key)
79 |
80 | return {
81 | modifiers,
82 | code
83 | }
84 | }
85 |
86 | /**
87 | *
88 | * @param {String} key
89 | */
90 | const searchKeyCode = key => codes[key.toLowerCase()] || returnCharCode(key)
91 |
--------------------------------------------------------------------------------
/src/docs/pages/step-6.vue:
--------------------------------------------------------------------------------
1 |
2 | section(v-hotkey="keymap")
3 | h1.title Dynamic Keymap With Single Component
4 | section.hero-section
5 | p Press tab to switch keymap.
6 | section.hero-section(v-show="keymapType === 'keymap1'")
7 | p Press ctrl + enter to say
8 | b(ref="hello") hello.
9 | p You can't say bye now.
10 | section.hero-section(v-show="keymapType === 'keymap2'")
11 | p Press alt + enter to say
12 | b(ref="bye") bye.
13 | p You can't say hello now.
14 | section.hero-section
15 | p(:class="{next: true, show: show}") Press → to play next case.
16 |
17 |
67 |
68 |
90 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "v-hotkey",
3 | "version": "0.8.0",
4 | "description": "Vue 2.x directive - binding hotkeys for components.",
5 | "author": {
6 | "name": "Dafrok",
7 | "email": "o.o@mug.dog",
8 | "url": "http://dafrok.github.io"
9 | },
10 | "scripts": {
11 | "build": "vue-cli-service build --target lib --name v-hotkey ./src/index.js",
12 | "lint": "eslint --ext .js,.vue .",
13 | "build:docs": "vue-cli-service build ./src/docs/main.js --dest docs",
14 | "build:docs:dev": "npm run build:docs -- --mode development",
15 | "dev": "vue-cli-service serve",
16 | "prepare": "npm run build",
17 | "test": "vue-cli-service test:unit"
18 | },
19 | "main": "dist/v-hotkey.common.js",
20 | "unpkg": "dist/v-hotkey.umd.js",
21 | "files": [
22 | "dist",
23 | "!dist/demo.html"
24 | ],
25 | "dependencies": {
26 | "core-js": "^2.6.5"
27 | },
28 | "devDependencies": {
29 | "@babel/core": "^7.6.4",
30 | "@babel/preset-env": "^7.6.3",
31 | "@vue/cli-plugin-babel": "^4.0.0-rc.8",
32 | "@vue/cli-plugin-unit-jest": "^4.0.0-rc.8",
33 | "@vue/cli-service": "^4.0.0-rc.8",
34 | "@vue/test-utils": "1.0.0-beta.29",
35 | "babel-eslint": "^10.0.3",
36 | "bulma": "^0.7.5",
37 | "eslint": "^6.5.1",
38 | "eslint-config-standard": "^14.1.0",
39 | "eslint-loader": "^3.0.2",
40 | "eslint-plugin-import": "^2.18.2",
41 | "eslint-plugin-jest": "^22.19.0",
42 | "eslint-plugin-node": "^10.0.0",
43 | "eslint-plugin-promise": "^4.2.1",
44 | "eslint-plugin-standard": "^4.0.1",
45 | "eslint-plugin-vue": "^5.2.3",
46 | "html-webpack-template": "^6.2.0",
47 | "pug": "^2.0.4",
48 | "pug-plain-loader": "^1.0.0",
49 | "stylus": "^0.54.7",
50 | "stylus-loader": "^3.0.2",
51 | "vue": "^2.6.10",
52 | "vue-router": "^3.1.3",
53 | "vue-template-compiler": "^2.6.10"
54 | },
55 | "peerDependencies": {
56 | "vue": "^2.x"
57 | },
58 | "bugs": {
59 | "url": "https://github.com/Dafrok/v-hotkey/issues"
60 | },
61 | "contributors": [
62 | {
63 | "name": "Zdravko Ćurić",
64 | "url": "https://github.com/zcuric"
65 | },
66 | {
67 | "name": "Dario Vladović",
68 | "url": "https://github.com/vladimyr"
69 | }
70 | ],
71 | "homepage": "https://github.com/Dafrok/v-hotkey#readme",
72 | "jsdelivr": "dist/v-hotkey.umd.js",
73 | "keywords": [
74 | "vue",
75 | "hotkey",
76 | "hotkeys",
77 | "directive",
78 | "shortcut",
79 | "shortcuts"
80 | ],
81 | "license": "MIT",
82 | "repository": {
83 | "type": "git",
84 | "url": "git+https://github.com/Dafrok/v-hotkey.git"
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/src/docs/pages/step-5.vue:
--------------------------------------------------------------------------------
1 |
2 | section(v-hotkey="keymap")
3 | h1.title Private Hotkeys of Components
4 | section.hero-section
5 | p Press tab to switch between two components.
6 | section.hero-section
7 | .columns
8 | .column.is-2
9 | .column.is-4
10 | .box.content.component-a(:class="{active: flag}")
11 | h1 Component A
12 | p(v-if="flag", v-hotkey="keymapA") Press enter to say hello.
13 | .msg(ref="hello") HELLO!
14 | .column.is-4
15 | .box.content.component-b(:class="{active: !flag}")
16 | h1 Component B
17 | p(v-if="!flag", v-hotkey="keymapB") Press enter to say bye.
18 | .msg(ref="bye") BYE!
19 | .column.is-2
20 | section.hero-section
21 | p(:class="{next: true, show: show}") Press → to play next case.
22 |
23 |
24 |
78 |
79 |
120 |
--------------------------------------------------------------------------------
/docs/css/index.a639c980.css:
--------------------------------------------------------------------------------
1 | body,html{margin:0}.hero{background-image:url(../img/bg.b458a270.jpg);background-size:cover;background-attachment:fixed}.box{opacity:.5}.box.active{opacity:1;background-color:hsla(0,0%,100%,.5)!important}.slide-enter-active,.slide-leave-active{transition:all .3s}.slide-enter,.slide-leave-active{transform:translateX(-50%);opacity:0}kbd{display:inline-block;padding:3px 5px;font:11px SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;line-height:10px;color:#444d56;vertical-align:middle;background-color:#fcfcfc;border:1px solid #c6cbd1;border-bottom-color:#959da5;border-radius:3px;box-shadow:inset 0 -1px 0 #959da5}.hero-section{margin-top:1.5rem}.active[data-v-166b63fb]{-webkit-animation:active-helloworld-data-v-166b63fb 1s;animation:active-helloworld-data-v-166b63fb 1s}.next[data-v-166b63fb]{transition:all 1s 1s;opacity:0;transform:translateY(100%)}.show[data-v-166b63fb]{opacity:1;transform:translateY(0)}@-webkit-keyframes active-helloworld-data-v-166b63fb{0%{transform:scale(1)}50%{transform:scale(1.5)}to{transform:scale(1)}}@keyframes active-helloworld-data-v-166b63fb{0%{transform:scale(1)}50%{transform:scale(1.5)}to{transform:scale(1)}}.hello[data-v-23e92f66]{display:inline-block;transition:all 1s}.loud[data-v-23e92f66]{transform:scale(1.5) translateY(-15px)}.next[data-v-23e92f66]{transition:all 1s 1s;opacity:0;transform:translateY(100%)}.show[data-v-23e92f66]{opacity:1;transform:translateY(0)}b[data-v-887ef854]{display:inline-block}.active[data-v-887ef854]{-webkit-animation:active-data-v-887ef854 1s;animation:active-data-v-887ef854 1s}.next[data-v-887ef854]{transition:all 1s;opacity:0;transform:translateY(100%)}.show[data-v-887ef854]{opacity:1;transform:translateY(0)}@-webkit-keyframes active-data-v-887ef854{0%{transform:translateX(0)}50%{transform:translateX(15px)}to{transform:translateX(0)}}@keyframes active-data-v-887ef854{0%{transform:translateX(0)}50%{transform:translateX(15px)}to{transform:translateX(0)}}.next[data-v-334273d5]{transition:all 1s;opacity:0;transform:translateY(100%)}.msg[data-v-334273d5]{display:inline-block;margin:10px;opacity:0;transform:scale(0)}.msg.active[data-v-334273d5]{-webkit-animation:active-private-data-v-334273d5 1s;animation:active-private-data-v-334273d5 1s}.show[data-v-334273d5]{opacity:1;transform:translateY(0)}.component-a[data-v-334273d5],.component-b[data-v-334273d5]{transition:all .3s;height:180px}.component-a [data-v-334273d5],.component-b [data-v-334273d5]{color:#ccc}.component-a.active [data-v-334273d5],.component-b.active [data-v-334273d5]{color:#000}@-webkit-keyframes active-private-data-v-334273d5{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(2)}to{opacity:0;transform:scale(0)}}@keyframes active-private-data-v-334273d5{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(2)}to{opacity:0;transform:scale(0)}}b[data-v-31b96840]{display:inline-block}.active[data-v-31b96840]{-webkit-animation:active-data-v-31b96840 1s;animation:active-data-v-31b96840 1s}.next[data-v-31b96840]{transition:all 1s;opacity:0;transform:translateY(100%)}.show[data-v-31b96840]{opacity:1;transform:translateY(0)}@-webkit-keyframes active-data-v-31b96840{0%{transform:translateX(0)}50%{transform:translateX(15px)}to{transform:translateX(0)}}@keyframes active-data-v-31b96840{0%{transform:translateX(0)}50%{transform:translateX(15px)}to{transform:translateX(0)}}
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # v-hotkey
2 |
3 | [](https://bundlephobia.com/result?p=v-hotkey)
4 | [](https://npm.im/v-hotkey)
5 | [](https://github.com/dafrok/v-hotkey/blob/master/LICENSE)
6 | [](https://standardjs.com)
7 |
8 | Vue 2.x directive for binding hotkeys to components.
9 |
10 | ## Play with me
11 |
12 | [https://dafrok.github.io/v-hotkey](https://dafrok.github.io/v-hotkey)
13 |
14 | ## Install
15 |
16 | ```bash
17 | $ npm i v-hotkey
18 | # or
19 | $ yarn add v-hotkey
20 | ```
21 |
22 | ## Usage
23 |
24 | ```javascript
25 | import Vue from 'vue'
26 | import VueHotkey from 'v-hotkey'
27 |
28 | Vue.use(VueHotkey)
29 | ```
30 |
31 | ```vue
32 |
33 |
34 | Press `ctrl + esc` to toggle me! Hold `enter` to hide me!
35 |
36 |
37 |
38 |
70 | ```
71 |
72 | ## Event Handler
73 |
74 | - keydown (as default)
75 | - keyup
76 |
77 | ## Key Combination
78 |
79 | Use one or more of following keys to fire your hotkeys.
80 |
81 | - ctrl
82 | - alt
83 | - shift
84 | - command (MacOS)
85 | - windows (Windows)
86 |
87 | ## Modifiers
88 |
89 | ### prevent
90 |
91 | Add the prevent modifier to the directive to prevent default browser behavior.
92 |
93 | ```vue
94 |
95 |
96 | Press `ctrl + esc` to toggle me! Hold `enter` to hide me!
97 |
98 |
99 | ```
100 |
101 | ### stop
102 |
103 | Add the stop modifier to the directive to stop event propagation.
104 |
105 | ```vue
106 |
107 |
108 | Enter characters in editable areas doesn't trigger any hotkeys.
109 |
110 |
111 |
112 | ```
113 |
114 | ## Key Code Alias
115 |
116 | The default key code map is based on US standard keyboard.
117 | This ability to provide their own key code alias for developers who using keyboards with different layouts. The alias name must be a **single character**.
118 |
119 | ### Definition
120 |
121 | ```javascript
122 | import Vue from 'vue'
123 | import VueHotkey from 'v-hotkey'
124 |
125 | Vue.use(VueHotkey, {
126 | '①': 49 // the key code of character '1'
127 | })
128 | ```
129 |
130 | ### Template
131 |
132 | ```vue
133 |
134 |
148 | ```
149 |
--------------------------------------------------------------------------------
/tests/unit/helpers.spec.js:
--------------------------------------------------------------------------------
1 | import { splitCombination, returnCharCode, assignKeyHandler } from '../../src/helpers'
2 |
3 | describe('helper functions', () => {
4 | it('should split combination', () => {
5 | const keys = splitCombination('ctrl+alt+1')
6 | expect(keys).toEqual(['ctrl', 'alt', '1'])
7 | })
8 |
9 | it('should split combination that contains `+`', () => {
10 | const keys = splitCombination('ctrl+alt++')
11 | expect(keys).toEqual(['ctrl', 'alt', '='])
12 | })
13 |
14 | it('should split combination that contains `numpad +`', () => {
15 | const keys = splitCombination('numpad + + 2')
16 | expect(keys).toEqual(['numpadadd', '2'])
17 | })
18 |
19 | it('sholud return charCode', () => {
20 | const charCode = returnCharCode('a')
21 | expect(charCode).toEqual(97)
22 | })
23 |
24 | it('sholud return undefined instead of charCode', () => {
25 | const charCode = returnCharCode('')
26 | expect(charCode).toEqual(undefined)
27 | })
28 |
29 | it('should assign handler to element and trigger callback', () => {
30 | const mockFn = jest.fn()
31 | const e = {
32 | type: 'keydown',
33 | keyCode: 65,
34 | ctrlKey: false,
35 | altKey: false,
36 | shiftKey: false,
37 | metaKey: false,
38 | preventDefault: () => {}
39 | }
40 |
41 | const keyMap = [{
42 | code: 65,
43 | modifiers: {
44 | ctrlKey: false,
45 | altKey: false,
46 | shiftKey: false,
47 | metaKey: false
48 | },
49 | callback: {
50 | keydown: mockFn
51 | }
52 | }]
53 |
54 | assignKeyHandler(e, keyMap, {})
55 |
56 | expect(mockFn).toHaveBeenCalled()
57 | })
58 |
59 | it('should not trigger callback if key is not present', () => {
60 | const mockFn = jest.fn()
61 | const e = {
62 | type: 'keydown',
63 | keyCode: 64,
64 | ctrlKey: false,
65 | altKey: false,
66 | shiftKey: false,
67 | metaKey: false,
68 | preventDefault: () => {}
69 | }
70 |
71 | const keyMap = [{
72 | code: 65,
73 | modifiers: {
74 | ctrlKey: false,
75 | altKey: false,
76 | shiftKey: false,
77 | metaKey: false
78 | },
79 | callback: {
80 | keydown: mockFn
81 | }
82 | }]
83 |
84 | assignKeyHandler(e, keyMap, {})
85 |
86 | expect(mockFn).not.toHaveBeenCalled()
87 | })
88 |
89 | it('should call preventDefault if prevent modifier is present', () => {
90 | const mockFn = jest.fn()
91 | const e = {
92 | type: 'keydown',
93 | keyCode: 65,
94 | ctrlKey: false,
95 | altKey: false,
96 | shiftKey: false,
97 | metaKey: false,
98 | preventDefault: mockFn
99 | }
100 |
101 | assignKeyHandler(e, [], { prevent: true })
102 |
103 | expect(mockFn).toHaveBeenCalled()
104 | })
105 |
106 | it('should call stopPropagation if stop modifier is present', () => {
107 | const mockFn = jest.fn()
108 | const e = {
109 | type: 'keydown',
110 | keyCode: 65,
111 | ctrlKey: false,
112 | altKey: false,
113 | shiftKey: false,
114 | metaKey: false,
115 | stopPropagation: mockFn
116 | }
117 |
118 | assignKeyHandler(e, [], { stop: true })
119 | expect(mockFn).toHaveBeenCalled()
120 | })
121 |
122 | it('should do nothing if active element is editable', () => {
123 | const mockFn = jest.fn()
124 | const e = {
125 | type: 'keydown',
126 | keyCode: 65,
127 | ctrlKey: false,
128 | altKey: false,
129 | shiftKey: false,
130 | metaKey: false,
131 | preventDefault: mockFn
132 | }
133 |
134 | document.activeElement.isContentEditable = true
135 |
136 | assignKeyHandler(e, [], {})
137 |
138 | expect(mockFn).not.toHaveBeenCalled()
139 | })
140 |
141 | it('should do nothing if active element is forbidden', () => {
142 | const mockFn = jest.fn()
143 | const e = {
144 | type: 'keydown',
145 | keyCode: 65,
146 | ctrlKey: false,
147 | altKey: false,
148 | shiftKey: false,
149 | metaKey: false,
150 | preventDefault: mockFn
151 | }
152 |
153 | document.body.innerHTML = `
154 |
155 |
156 |
157 | `
158 | const node = document.querySelector('.input')
159 | node.focus()
160 | document.activeElement.isContentEditable = false
161 |
162 | assignKeyHandler(e, [], {})
163 |
164 | expect(mockFn).not.toHaveBeenCalled()
165 | })
166 | })
167 |
--------------------------------------------------------------------------------
/docs/js/index.91841365.js:
--------------------------------------------------------------------------------
1 | (function(e){function t(t){for(var r,o,i=t[0],c=t[1],l=t[2],v=0,p=[];v":190,"?":191,"~":192,"{":219,"|":220,"}":221,'"':222},o,{},i,{},a,{},s);function p(e,t){return h(e)||d(e,t)||f()}function f(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function d(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,s=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done);r=!0)if(n.push(o.value),t&&n.length===t)break}catch(c){s=!0,a=c}finally{try{r||null==i["return"]||i["return"]()}finally{if(s)throw a}}return n}}function h(e){if(Array.isArray(e))return e}var m=["INPUT","TEXTAREA","SELECT"],y=function(e,t){return Object.entries(e).every((function(e){var n=p(e,2),r=n[0],s=n[1];return t[r]===s}))},b=function(e){return e=e.replace(/\s/g,""),e=e.includes("numpad+")?e.replace("numpad+","numpadadd"):e,e=e.includes("++")?e.replace("++","+="):e,e.split(/\+{1}/)},_=function(e){return 1===e.length?e.charCodeAt(0):void 0},k=function(e,t,n){var r=e.find((function(e){var r=e.code,s=e.modifiers;return r===t&&y(n,s)}));return!!r&&r.callback},w=function(e,t,n){var r=e.keyCode,s=e.ctrlKey,a=e.altKey,o=e.shiftKey,i=e.metaKey,c={ctrlKey:s,altKey:a,shiftKey:o,metaKey:i};n.prevent&&e.preventDefault(),n.stop&&e.stopPropagation();var l=document.activeElement,u=l.nodeName,v=l.isContentEditable;if(!v&&!m.includes(u)){var p=k(t,r,c);if(!p)return e;e.preventDefault(),p[e.type](e)}};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t1)return e.reduce((function(e,n){return n=C[n]||n,j.hasOwnProperty("".concat(n,"Key"))?e.modifiers=O({},e.modifiers,P({},"".concat(n,"Key"),!0)):e.code=t[n]||L(n),e}),{modifiers:n});var r=C[e[0]]||e[0];j.hasOwnProperty("".concat(r,"Key"))&&(n=O({},n,P({},"".concat(r,"Key"),!0)));var s=t[r]||L(r);return{modifiers:n,code:s}},L=function(e){return v[e.toLowerCase()]||_(e)};function K(e,t,n){var r=t.value,s=t.modifiers;e._keyMap=E(r,n),e._keyHandler=function(t){return w(t,e._keyMap,s)},document.addEventListener("keydown",e._keyHandler),document.addEventListener("keyup",e._keyHandler)}function D(e){document.removeEventListener("keydown",e._keyHandler),document.removeEventListener("keyup",e._keyHandler)}var S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{bind:function(t,n){K(t,n,e)},componentUpdated:function(t,n){n.value!==n.oldValue&&(D(t),K(t,n,e))},unbind:D}},T={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.directive("hotkey",S(t))},directive:S()},N=T,A=n("8c4f"),H=n("86c2"),M=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},B=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",[n("h1",{staticClass:"title"},[e._v("Get Start")]),n("section",{staticClass:"hero-section"},[n("p",[e._v("Press "),n("kbd",[e._v("←")]),e._v(" to previous page.")]),n("p",[e._v("Press "),n("kbd",[e._v("→")]),e._v(" to next page.")]),n("p",[e._v("Press "),n("kbd",[e._v("esc")]),e._v(" to return home.")])])])}],R=n("2877"),V={},Y=Object(R["a"])(V,M,B,!1,null,null,null),I=Y.exports,J=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymap,expression:"keymap"}]},[n("h1",{ref:"hello",staticClass:"title"},[e._v("Hello world.")]),n("section",{staticClass:"hero-section"},[e._m(0),n("transition",{attrs:{name:"slide"}},[n("p",{class:{next:!0,show:e.show}},[e._v("Press "),n("kbd",[e._v("→")]),e._v(" to play next case.")])])],1)])},U=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[e._v("Press "),n("kbd",[e._v("enter")]),e._v(" to say hello.")])}],W={data:function(){return{show:!1}},computed:{keymap:function(){return{enter:this.hello}}},mounted:function(){var e=this.$refs.hello;e.addEventListener("animationend",(function(t){return e.classList.remove("active")}))},methods:{hello:function(){var e=this.$refs.hello;e.classList.add("active"),this.show=!0}}},q=W,z=(n("9dd7"),Object(R["a"])(q,J,U,!1,null,"166b63fb",null)),G=z.exports,X=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymap,expression:"keymap"}]},[n("h1",{staticClass:"title"},[e._v("Keyup and Keydown Listeners.")]),n("section",{staticClass:"hero-section"},[n("p",[e._v("Press and hold "),n("kbd",[e._v("enter")]),e._v(" to say "),n("b",{ref:"hello",staticClass:"hello"},[e._v("hello")]),e._v(" louder.")]),n("transition",{attrs:{name:"slide"}},[n("p",{class:{next:!0,show:e.show}},[e._v("Press "),n("kbd",[e._v("→")]),e._v(" to play next case.")])])],1)])},F=[],Q={data:function(){return{show:!1}},computed:{keymap:function(){return{enter:{keydown:this.louder,keyup:this.softer}}}},methods:{louder:function(){var e=this.$refs.hello;e.classList.add("loud")},softer:function(){var e=this.$refs.hello;e.classList.remove("loud"),this.show=!0}}},Z=Q,ee=(n("ec5d"),Object(R["a"])(Z,X,F,!1,null,"23e92f66",null)),te=ee.exports,ne=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymap,expression:"keymap"}]},[n("h1",{staticClass:"title"},[e._v("Key Combination")]),n("section",{staticClass:"hero-section"},[n("p",[e._v("Press "),n("kbd",[e._v("ctrl")]),e._v(" + "),n("kbd",[e._v("enter")]),e._v(" to say"),n("b",{ref:"hello"},[e._v("hello.")])]),n("p",[e._v("Press "),n("kbd",[e._v("alt")]),e._v(" + "),n("kbd",[e._v("enter")]),e._v(" to say"),n("b",{ref:"bye"},[e._v("bye.")])]),e._m(0),n("p",{class:{next:!0,show:e.show}},[e._v("Press "),n("kbd",[e._v("→")]),e._v(" to play next case.")])])])},re=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[e._v("Press "),n("kbd",[e._v("ctrl")]),e._v(" + "),n("kbd",[e._v("alt")]),e._v(" + "),n("kbd",[e._v("enter")]),e._v(" to leave.")])}],se={data:function(){return{show:!1}},computed:{keymap:function(){return{"ctrl+enter":this.hello,"alt+enter":this.bye,"ctrl+alt+enter":this.leave}}},mounted:function(){var e=this.$refs.hello,t=this.$refs.bye;e.addEventListener("animationend",(function(t){return e.classList.remove("active")})),t.addEventListener("animationend",(function(e){return t.classList.remove("active")}))},methods:{hello:function(){var e=this.$refs.hello;e.classList.add("active")},bye:function(){var e=this.$refs.bye;e.classList.add("active")},leave:function(){this.show=!0}}},ae=se,oe=(n("ddc6"),Object(R["a"])(ae,ne,re,!1,null,"887ef854",null)),ie=oe.exports,ce=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymap,expression:"keymap"}]},[n("h1",{staticClass:"title"},[e._v("Private Hotkeys of Components")]),e._m(0),n("section",{staticClass:"hero-section"},[n("div",{staticClass:"columns"},[n("div",{staticClass:"column is-2"}),n("div",{staticClass:"column is-4"},[n("div",{staticClass:"box content component-a",class:{active:e.flag}},[n("h1",[e._v("Component A")]),e.flag?n("p",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymapA,expression:"keymapA"}]},[e._v("Press "),n("kbd",[e._v("enter")]),e._v(" to say hello.")]):e._e(),n("div",{ref:"hello",staticClass:"msg"},[e._v("HELLO!")])])]),n("div",{staticClass:"column is-4"},[n("div",{staticClass:"box content component-b",class:{active:!e.flag}},[n("h1",[e._v("Component B")]),e.flag?e._e():n("p",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymapB,expression:"keymapB"}]},[e._v("Press "),n("kbd",[e._v("enter")]),e._v(" to say bye.")]),n("div",{ref:"bye",staticClass:"msg"},[e._v("BYE!")])])]),n("div",{staticClass:"column is-2"})])]),n("section",{staticClass:"hero-section"},[n("p",{class:{next:!0,show:e.show}},[e._v("Press "),n("kbd",[e._v("→")]),e._v(" to play next case.")])])])},le=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"hero-section"},[n("p",[e._v("Press "),n("kbd",[e._v("tab")]),e._v(" to switch between two components.")])])}],ue={data:function(){return{flag:!0,show:!1}},computed:{keymap:function(){return{tab:this["switch"]}},keymapA:function(){return{enter:this.hello}},keymapB:function(){return{enter:this.bye}}},watch:{flag:function(e,t){e&&(this.show=!0)}},mounted:function(){var e=this.$refs.hello,t=this.$refs.bye;e.addEventListener("animationend",(function(t){return e.classList.remove("active")})),t.addEventListener("animationend",(function(e){return t.classList.remove("active")}))},methods:{hello:function(){var e=this.$refs.hello;e.classList.add("active")},bye:function(){var e=this.$refs.bye;e.classList.add("active")},switch:function(e){e.preventDefault(),this.flag=!this.flag}}},ve=ue,pe=(n("babe"),Object(R["a"])(ve,ce,le,!1,null,"334273d5",null)),fe=pe.exports,de=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymap,expression:"keymap"}]},[n("h1",{staticClass:"title"},[e._v("Dynamic Keymap With Single Component")]),e._m(0),n("section",{directives:[{name:"show",rawName:"v-show",value:"keymap1"===e.keymapType,expression:"keymapType === 'keymap1'"}],staticClass:"hero-section"},[n("p",[e._v("Press "),n("kbd",[e._v("ctrl")]),e._v(" + "),n("kbd",[e._v("enter")]),e._v(" to say"),n("b",{ref:"hello"},[e._v("hello.")])]),n("p",[e._v("You can't say bye now.")])]),n("section",{directives:[{name:"show",rawName:"v-show",value:"keymap2"===e.keymapType,expression:"keymapType === 'keymap2'"}],staticClass:"hero-section"},[n("p",[e._v("Press "),n("kbd",[e._v("alt")]),e._v(" + "),n("kbd",[e._v("enter")]),e._v(" to say"),n("b",{ref:"bye"},[e._v("bye.")])]),n("p",[e._v("You can't say hello now.")])]),n("section",{staticClass:"hero-section"},[n("p",{class:{next:!0,show:e.show}},[e._v("Press "),n("kbd",[e._v("→")]),e._v(" to play next case.")])])])},he=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"hero-section"},[n("p",[e._v("Press "),n("kbd",[e._v("tab")]),e._v(" to switch keymap.")])])}],me={data:function(){return{keymapType:"keymap1",show:!1}},computed:{keymap:function(){var e={keymap1:{tab:this.switchKeyMap,"ctrl+enter":this.hello},keymap2:{tab:this.switchKeyMap,"alt+enter":this.bye}};return e[this.keymapType]}},mounted:function(){var e=this.$refs.hello,t=this.$refs.bye;console.log(this.$refs),e.addEventListener("animationend",(function(t){return e.classList.remove("active")})),t.addEventListener("animationend",(function(e){return t.classList.remove("active")}))},methods:{switchKeyMap:function(e){e.preventDefault(),this.keymapType="keymap1"===this.keymapType?"keymap2":"keymap1";var t=this.$refs.hello,n=this.$refs.bye;t.classList.remove("active"),n.classList.remove("active")},hello:function(){console.log("hello");var e=this.$refs.hello;console.log(e),e.classList.add("active")},bye:function(){console.log("bye");var e=this.$refs.bye;e.classList.add("active"),this.show=!0}}},ye=me,be=(n("629f"),Object(R["a"])(ye,de,he,!1,null,"31b96840",null)),_e=be.exports,ke=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymap,expression:"keymap"}]},[n("h1",{staticClass:"title"},[e._v("Well done!")]),n("section",{staticClass:"hero-section"},[n("p",[e._v("Press "),n("kbd",[e._v("enter")]),e._v(" to give me a "),n("a",{ref:"star",attrs:{href:"https://github.com/Dafrok/v-hotkey",target:"_blank"}},[e._v("STAR")]),e._v(".")]),e._m(0)])])},we=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("p",[e._v("Press "),n("kbd",[e._v("esc")]),e._v(" to return home.")])}],ge={computed:{keymap:function(){return{enter:this.star}}},methods:{star:function(){var e=this.$refs.star;e.click()}}},Oe=ge,Pe=Object(R["a"])(Oe,ke,we,!1,null,null,null),xe=Pe.exports,je=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymap,expression:"keymap"}]},[n("h1",{staticClass:"title"},[e._v("V-Hotkey")]),n("h2",{staticClass:"subtitle"},[e._v("Vue 2.x directive for binding hotkeys to components.")]),n("section",{staticClass:"hero-section"},[n("p",[e._v("Press "),n("kbd",[e._v("enter")]),e._v(" to "),n("router-link",{attrs:{to:"/step/1"}},[e._v("get start")]),e._v(".")],1),n("p",[e._v("Press "),n("kbd",[e._v("space")]),e._v(" to see the "),n("a",{ref:"doc",attrs:{href:"https://github.com/Dafrok/v-hotkey/blob/master/README.md",target:"_blank"}},[e._v("documentation")]),e._v(".")])])])},Ce=[],Ee={computed:{keymap:function(){return{enter:this.start,space:this.doc}}},methods:{start:function(){this.$router.push("/step/1")},doc:function(){this.$refs.doc.click()}}},$e=Ee,Le=Object(R["a"])($e,je,Ce,!1,null,null,null),Ke=Le.exports,De=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{directives:[{name:"hotkey",rawName:"v-hotkey",value:e.keymap,expression:"keymap"}]},[n("transition",{attrs:{name:"slide",mode:"out-in"}},[n("router-view")],1)],1)},Se=[],Te={computed:{keymap:function(){return{left:this.prevPage,right:this.nextPage,esc:this.backHome}}},methods:{nextPage:function(){var e=7,t=0|this.$route.path.split("/")[2],n=t>=e?e:t+1;this.$router.push("/step/".concat(n))},prevPage:function(){var e=0|this.$route.path.split("/")[2],t=e<=1?1:e-1;this.$router.push("/step/".concat(t))},backHome:function(){this.$router.push("/")}}},Ne=Te,Ae=Object(R["a"])(Ne,De,Se,!1,null,null,null),He=Ae.exports,Me=[{path:"/",alias:"/start",component:Ke},{path:"/step",component:He,children:[{path:"1",component:I},{path:"2",component:G},{path:"3",component:te},{path:"4",component:ie},{path:"5",component:fe},{path:"6",component:_e},{path:"7",component:xe}]}];n("92c6");r["a"].use(N),r["a"].use(A["a"]);var Be=new A["a"]({routes:Me});new r["a"]({el:"#app",router:Be,render:function(e){return e(H["default"])}})},"629f":function(e,t,n){"use strict";var r=n("9c44"),s=n.n(r);s.a},"6be8":function(e,t,n){},"86c2":function(e,t,n){"use strict";var r=n("ec8e"),s=n("9088"),a=(n("26d1"),n("2877")),o=Object(a["a"])(s["default"],r["a"],r["b"],!1,null,null,null);t["default"]=o.exports},"8e68":function(e,t){},9088:function(e,t,n){"use strict";var r=n("8e68"),s=n.n(r);t["default"]=s.a},9836:function(e,t,n){},"9c44":function(e,t,n){},"9dd7":function(e,t,n){"use strict";var r=n("f98a"),s=n.n(r);s.a},babe:function(e,t,n){"use strict";var r=n("e6b9"),s=n.n(r);s.a},d36b:function(e,t,n){},ddc6:function(e,t,n){"use strict";var r=n("9836"),s=n.n(r);s.a},e6b9:function(e,t,n){},ec5d:function(e,t,n){"use strict";var r=n("d36b"),s=n.n(r);s.a},ec8e:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"hero is-fullheight"},[n("div",{staticClass:"hero-body"},[n("div",{staticClass:"container has-text-centered"},[n("transition",{attrs:{name:"slide",mode:"out-in"}},[n("router-view")],1)],1)])])},s=[];n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}))},f98a:function(e,t,n){}});
2 | //# sourceMappingURL=index.91841365.js.map
--------------------------------------------------------------------------------
/docs/js/index.91841365.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/docs/App.vue?f24d","webpack:///./src/keycodes/aliases.js","webpack:///./src/keycodes/functionkeys.js","webpack:///./src/keycodes/lowercase.js","webpack:///./src/keycodes/numpad.js","webpack:///./src/keycodes/codes.js","webpack:///./src/helpers.js","webpack:///./src/keycodes/index.js","webpack:///./src/main.js","webpack:///./src/index.js","webpack:///./src/docs/pages/step-1.vue?a892","webpack:///./src/docs/pages/step-1.vue","webpack:///./src/docs/pages/step-2.vue?cf0f","webpack:///src/docs/pages/step-2.vue","webpack:///./src/docs/pages/step-2.vue?3471","webpack:///./src/docs/pages/step-2.vue","webpack:///./src/docs/pages/step-3.vue?e13a","webpack:///src/docs/pages/step-3.vue","webpack:///./src/docs/pages/step-3.vue?f06a","webpack:///./src/docs/pages/step-3.vue","webpack:///./src/docs/pages/step-4.vue?5c62","webpack:///src/docs/pages/step-4.vue","webpack:///./src/docs/pages/step-4.vue?d323","webpack:///./src/docs/pages/step-4.vue","webpack:///./src/docs/pages/step-5.vue?b42f","webpack:///src/docs/pages/step-5.vue","webpack:///./src/docs/pages/step-5.vue?65f6","webpack:///./src/docs/pages/step-5.vue","webpack:///./src/docs/pages/step-6.vue?cffe","webpack:///src/docs/pages/step-6.vue","webpack:///./src/docs/pages/step-6.vue?b402","webpack:///./src/docs/pages/step-6.vue","webpack:///./src/docs/pages/step-7.vue?2502","webpack:///src/docs/pages/step-7.vue","webpack:///./src/docs/pages/step-7.vue?1891","webpack:///./src/docs/pages/step-7.vue","webpack:///./src/docs/pages/start.vue?7a9e","webpack:///src/docs/pages/start.vue","webpack:///./src/docs/pages/start.vue?8e41","webpack:///./src/docs/pages/start.vue","webpack:///./src/docs/pages/step.vue?e019","webpack:///src/docs/pages/step.vue","webpack:///./src/docs/pages/step.vue?2e07","webpack:///./src/docs/pages/step.vue","webpack:///./src/docs/routes.js","webpack:///./src/docs/main.js","webpack:///./src/docs/pages/step-6.vue?0a38","webpack:///./src/docs/App.vue","webpack:///./src/docs/App.vue?775a","webpack:///./src/docs/pages/step-2.vue?e38b","webpack:///./src/docs/pages/step-5.vue?74b2","webpack:///./src/docs/pages/step-4.vue?d0a6","webpack:///./src/docs/pages/step-3.vue?6fbf","webpack:///./src/docs/App.vue?5ae0","webpack:///./src/docs/App.vue?c73e"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","windows","ctl","control","option","pause","break","caps","return","escape","spc","pgup","pgdn","ins","del","cmd","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","a","b","e","f","g","h","k","q","u","v","w","x","y","z","numpadadd","numlock","numpad0","numpad1","numpad2","numpad3","numpad4","numpad5","numpad6","numpad7","numpad8","numpad9","backspace","tab","enter","ctrl","alt","capslock","esc","space","pageup","pagedown","end","home","left","up","right","down","insert","delete","command","meta","leftcommand","rightcommand","scrolllock","mycomputer","mycalculator","_","lowercase","numpad","functionKeys","aliases","FORBIDDEN_NODES","areObjectsEqual","entries","every","splitCombination","combination","replace","includes","split","returnCharCode","charCodeAt","undefined","getHotkeyCallback","keyMap","keyCode","eventKeyModifiers","find","code","modifiers","callback","assignKeyHandler","ctrlKey","altKey","shiftKey","metaKey","prevent","preventDefault","stop","stopPropagation","document","activeElement","nodeName","isContentEditable","type","noop","defaultModifiers","alternativeKeyNames","plus","mod","test","navigator","platform","getKeyMap","combinations","alias","keys","forEach","keyup","keydown","resolveCodesAndModifiers","reduce","acc","searchKeyCode","codes","toLowerCase","bindEvent","el","_keyMap","_keyHandler","addEventListener","unbindEvent","removeEventListener","buildDirective","binding","componentUpdated","oldValue","unbind","plugin","install","Vue","directive","_vm","this","_h","$createElement","_self","_c","_m","staticRenderFns","staticClass","_v","script","component","directives","rawName","expression","ref","attrs","class","next","show","computed","keymap","hello","mounted","$hello","methods","classList","add","louder","softer","remove","bye","leave","$bye","active","flag","_e","keymapA","keymapB","watch","val","keymapType","keymap1","switchKeyMap","keymap2","keymaps","console","log","$refs","star","$star","click","start","doc","$router","prevPage","nextPage","backHome","path","Start","Step","children","Step1","Step2","Step3","Step4","Step5","Step6","Step7","use","VueHotkey","VueRouter","router","routes","render","App"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,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ACA,MAIa,aAAAA,E,kECnBf,yBAA6U,eAAG,G,oFCAhV,yBAA6jB,EAAG,G,kCCAhkB,yBAA6jB,EAAG,G,yDCAhkB,yBAA6jB,EAAG,G,yDCAhkB,yBAA6jB,EAAG,G,kCCAhkB,IAAI+D,EAAS,WAAa,IAAI1E,EAAIC,KAASC,EAAGF,EAAIG,eAAmBE,EAAGL,EAAII,MAAMC,IAAIH,EAAG,OAAOG,EAAG,UAAU,CAACG,YAAY,sBAAsB,CAACH,EAAG,MAAM,CAACG,YAAY,aAAa,CAACH,EAAG,MAAM,CAACG,YAAY,+BAA+B,CAACH,EAAG,aAAa,CAACW,MAAM,CAAC,KAAO,QAAQ,KAAO,WAAW,CAACX,EAAG,gBAAgB,IAAI,QACxTE,EAAkB,GCDtB,qE","file":"js/index.91841365.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/v-hotkey/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=stylus&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=stylus&\"","export default {\n windows: 91,\n '⇧': 16,\n '⌥': 18,\n '⌃': 17,\n '⌘': 91,\n ctl: 17,\n control: 17,\n option: 18,\n pause: 19,\n break: 19,\n caps: 20,\n return: 13,\n escape: 27,\n spc: 32,\n pgup: 33,\n pgdn: 34,\n ins: 45,\n del: 46,\n cmd: 91\n}\n","export default {\n f1: 112,\n f2: 113,\n f3: 114,\n f4: 115,\n f5: 116,\n f6: 117,\n f7: 118,\n f8: 119,\n f9: 120,\n f10: 121,\n f11: 122,\n f12: 123\n}\n","export default {\n a: 65,\n b: 66,\n c: 67,\n d: 68,\n e: 69,\n f: 70,\n g: 71,\n h: 72,\n i: 73,\n j: 74,\n k: 75,\n l: 76,\n m: 77,\n n: 78,\n o: 79,\n p: 80,\n q: 81,\n r: 82,\n s: 83,\n t: 84,\n u: 85,\n v: 86,\n w: 87,\n x: 88,\n y: 89,\n z: 90\n}\n","export default {\n 'numpad*': 106,\n 'numpad+': 43,\n numpadadd: 43,\n 'numpad-': 109,\n 'numpad.': 110,\n 'numpad/': 111,\n numlock: 144,\n numpad0: 96,\n numpad1: 97,\n numpad2: 98,\n numpad3: 99,\n numpad4: 100,\n numpad5: 101,\n numpad6: 102,\n numpad7: 103,\n numpad8: 104,\n numpad9: 105\n}\n","import aliases from './aliases'\nimport functionKeys from './functionkeys'\nimport lowercase from './lowercase'\nimport numpad from './numpad'\n\nexport default {\n backspace: 8,\n tab: 9,\n enter: 13,\n shift: 16,\n ctrl: 17,\n alt: 18,\n 'pause/break': 19,\n capslock: 20,\n esc: 27,\n space: 32,\n pageup: 33,\n pagedown: 34,\n end: 35,\n home: 36,\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n insert: 45,\n delete: 46,\n command: 91,\n meta: 91,\n leftcommand: 91,\n rightcommand: 93,\n scrolllock: 145,\n mycomputer: 182,\n mycalculator: 183,\n ';': 186,\n '=': 187,\n ',': 188,\n '-': 189,\n '.': 190,\n '/': 191,\n '`': 192,\n '[': 219,\n '\\\\': 220,\n ']': 221,\n \"'\": 222,\n ':': 186,\n '+': 187,\n '<': 188,\n _: 189,\n '>': 190,\n '?': 191,\n '~': 192,\n '{': 219,\n '|': 220,\n '}': 221,\n '\"': 222,\n ...lowercase,\n ...numpad,\n ...functionKeys,\n ...aliases\n}\n","\nconst FORBIDDEN_NODES = ['INPUT', 'TEXTAREA', 'SELECT']\n\n/**\n *\n * @param {Object} a\n * @param {Object} b\n * @returns {Boolean}\n */\nconst areObjectsEqual = (a, b) =>\n Object.entries(a).every(([key, value]) => b[key] === value)\n\n/**\n *\n * @param {String} combination\n */\nexport const splitCombination = combination => {\n combination = combination.replace(/\\s/g, '')\n combination = combination.includes('numpad+')\n ? combination.replace('numpad+', 'numpadadd')\n : combination\n combination = combination.includes('++')\n ? combination.replace('++', '+=')\n : combination\n return combination.split(/\\+{1}/)\n}\n\n/**\n *\n * @param {String} key\n * @returns {String|undefined}\n */\nexport const returnCharCode = key => key.length === 1 ? key.charCodeAt(0) : undefined\n\n/**\n *\n * @param {Array} keyMap\n * @param {Number} keyCode\n * @param {Object} eventKeyModifiers\n * @returns {Function|Boolean}\n */\nconst getHotkeyCallback = (keyMap, keyCode, eventKeyModifiers) => {\n const key = keyMap.find(({ code, modifiers }) =>\n code === keyCode && areObjectsEqual(eventKeyModifiers, modifiers)\n )\n if (!key) return false\n return key.callback\n}\n\n/**\n *\n * @param {Event} e\n * @param {Array} keyMap\n * @param {Object} modifiers Vue event modifiers\n */\nexport const assignKeyHandler = (e, keyMap, modifiers) => {\n const { keyCode, ctrlKey, altKey, shiftKey, metaKey } = e\n const eventKeyModifiers = { ctrlKey, altKey, shiftKey, metaKey }\n\n if (modifiers.prevent) {\n e.preventDefault()\n }\n\n if (modifiers.stop) {\n e.stopPropagation()\n }\n\n const { nodeName, isContentEditable } = document.activeElement\n if (isContentEditable) return\n if (FORBIDDEN_NODES.includes(nodeName)) return\n\n const callback = getHotkeyCallback(keyMap, keyCode, eventKeyModifiers)\n if (!callback) return e\n e.preventDefault()\n callback[e.type](e)\n}\n","import codes from './codes'\nimport { splitCombination, returnCharCode } from '../helpers'\n\nconst noop = () => {}\n\nconst defaultModifiers = {\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false\n}\n\nconst alternativeKeyNames = {\n option: 'alt',\n command: 'meta',\n return: 'enter',\n escape: 'esc',\n plus: '+',\n mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? 'meta' : 'ctrl'\n}\n\n/**\n *\n * @param {Object} combinations\n * @param {Object} alias\n * @returns {Object}\n */\nexport const getKeyMap = (combinations, alias) => {\n const result = []\n\n Object.keys(combinations).forEach(combination => {\n const { keyup, keydown } = combinations[combination]\n const callback = {\n keydown: keydown || keyup ? noop : combinations[combination],\n keyup: keyup || noop\n }\n const keys = splitCombination(combination)\n const { code, modifiers } = resolveCodesAndModifiers(keys, alias)\n\n result.push({\n code,\n modifiers,\n callback\n })\n })\n\n return result\n}\n\n/**\n *\n * @param {Array} keys\n * @param {Object} alias\n * @returns {Object}\n */\nconst resolveCodesAndModifiers = (keys, alias) => {\n let modifiers = { ...defaultModifiers }\n if (keys.length > 1) {\n return keys.reduce((acc, key) => {\n key = alternativeKeyNames[key] || key\n if (defaultModifiers.hasOwnProperty(`${key}Key`)) {\n acc.modifiers = { ...acc.modifiers, [`${key}Key`]: true }\n } else {\n acc.code = alias[key] || searchKeyCode(key)\n }\n return acc\n }, { modifiers })\n }\n\n const key = alternativeKeyNames[keys[0]] || keys[0]\n if (defaultModifiers.hasOwnProperty(`${key}Key`)) {\n modifiers = { ...modifiers, [`${key}Key`]: true }\n }\n const code = alias[key] || searchKeyCode(key)\n\n return {\n modifiers,\n code\n }\n}\n\n/**\n *\n * @param {String} key\n */\nconst searchKeyCode = key => codes[key.toLowerCase()] || returnCharCode(key)\n","import { getKeyMap } from './keycodes'\nimport { assignKeyHandler } from './helpers'\n\n/**\n *\n * @param {Object} el\n * @param {Object} bindings\n * @param {Object} alias\n */\nfunction bindEvent (el, { value, modifiers }, alias) {\n el._keyMap = getKeyMap(value, alias)\n el._keyHandler = e => assignKeyHandler(e, el._keyMap, modifiers)\n\n document.addEventListener('keydown', el._keyHandler)\n document.addEventListener('keyup', el._keyHandler)\n}\n\n/**\n *\n * @param {Object} el\n */\nfunction unbindEvent (el) {\n document.removeEventListener('keydown', el._keyHandler)\n document.removeEventListener('keyup', el._keyHandler)\n}\n\nexport {\n bindEvent,\n unbindEvent\n}\n","import { bindEvent, unbindEvent } from './main'\n\nconst buildDirective = function (alias = {}) {\n return {\n bind (el, binding) {\n bindEvent(el, binding, alias)\n },\n componentUpdated (el, binding) {\n if (binding.value !== binding.oldValue) {\n unbindEvent(el)\n bindEvent(el, binding, alias)\n }\n },\n unbind: unbindEvent\n }\n}\n\nconst plugin = {\n install (Vue, alias = {}) {\n Vue.directive('hotkey', buildDirective(alias))\n },\n\n directive: buildDirective()\n}\n\nexport default plugin\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',[_c('h1',{staticClass:\"title\"},[_vm._v(\"Get Start\")]),_c('section',{staticClass:\"hero-section\"},[_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"←\")]),_vm._v(\" to previous page.\")]),_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"→\")]),_vm._v(\" to next page.\")]),_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"esc\")]),_vm._v(\" to return home.\")])])])}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./step-1.vue?vue&type=template&id=c4a0a1fc&lang=pug&\"\nvar script = {}\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymap),expression:\"keymap\"}]},[_c('h1',{ref:\"hello\",staticClass:\"title\"},[_vm._v(\"Hello world.\")]),_c('section',{staticClass:\"hero-section\"},[_vm._m(0),_c('transition',{attrs:{\"name\":\"slide\"}},[_c('p',{class:{next: true, show: _vm.show}},[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"→\")]),_vm._v(\" to play next case.\")])])],1)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to say hello.\")])}]\n\nexport { render, staticRenderFns }","\nsection(v-hotkey=\"keymap\")\n h1.title(ref=\"hello\") Hello world.\n section.hero-section\n p Press enter to say hello.\n transition(name=\"slide\")\n p(:class=\"{next: true, show: show}\") Press → to play next case.\n\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-2.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-2.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./step-2.vue?vue&type=template&id=166b63fb&scoped=true&lang=pug&\"\nimport script from \"./step-2.vue?vue&type=script&lang=js&\"\nexport * from \"./step-2.vue?vue&type=script&lang=js&\"\nimport style0 from \"./step-2.vue?vue&type=style&index=0&id=166b63fb&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"166b63fb\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymap),expression:\"keymap\"}]},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Keyup and Keydown Listeners.\")]),_c('section',{staticClass:\"hero-section\"},[_c('p',[_vm._v(\"Press and hold \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to say \"),_c('b',{ref:\"hello\",staticClass:\"hello\"},[_vm._v(\"hello\")]),_vm._v(\" louder.\")]),_c('transition',{attrs:{\"name\":\"slide\"}},[_c('p',{class:{next: true, show: _vm.show}},[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"→\")]),_vm._v(\" to play next case.\")])])],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nsection(v-hotkey=\"keymap\")\n h1.title Keyup and Keydown Listeners.\n section.hero-section\n p Press and hold enter to say #[b.hello(ref=\"hello\") hello] louder.\n transition(name=\"slide\")\n p(:class=\"{next: true, show: show}\") Press → to play next case.\n\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-3.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-3.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./step-3.vue?vue&type=template&id=23e92f66&scoped=true&lang=pug&\"\nimport script from \"./step-3.vue?vue&type=script&lang=js&\"\nexport * from \"./step-3.vue?vue&type=script&lang=js&\"\nimport style0 from \"./step-3.vue?vue&type=style&index=0&id=23e92f66&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"23e92f66\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymap),expression:\"keymap\"}]},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Key Combination\")]),_c('section',{staticClass:\"hero-section\"},[_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"ctrl\")]),_vm._v(\" + \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to say\"),_c('b',{ref:\"hello\"},[_vm._v(\"hello.\")])]),_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"alt\")]),_vm._v(\" + \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to say\"),_c('b',{ref:\"bye\"},[_vm._v(\"bye.\")])]),_vm._m(0),_c('p',{class:{next: true, show: _vm.show}},[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"→\")]),_vm._v(\" to play next case.\")])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"ctrl\")]),_vm._v(\" + \"),_c('kbd',[_vm._v(\"alt\")]),_vm._v(\" + \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to leave.\")])}]\n\nexport { render, staticRenderFns }","\nsection(v-hotkey=\"keymap\")\n h1.title Key Combination\n section.hero-section\n p Press ctrl + enter to say\n b(ref=\"hello\") hello.\n p Press alt + enter to say\n b(ref=\"bye\") bye.\n p Press ctrl + alt + enter to leave.\n p(:class=\"{next: true, show: show}\") Press → to play next case.\n\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-4.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-4.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./step-4.vue?vue&type=template&id=887ef854&scoped=true&lang=pug&\"\nimport script from \"./step-4.vue?vue&type=script&lang=js&\"\nexport * from \"./step-4.vue?vue&type=script&lang=js&\"\nimport style0 from \"./step-4.vue?vue&type=style&index=0&id=887ef854&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"887ef854\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymap),expression:\"keymap\"}]},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Private Hotkeys of Components\")]),_vm._m(0),_c('section',{staticClass:\"hero-section\"},[_c('div',{staticClass:\"columns\"},[_c('div',{staticClass:\"column is-2\"}),_c('div',{staticClass:\"column is-4\"},[_c('div',{staticClass:\"box content component-a\",class:{active: _vm.flag}},[_c('h1',[_vm._v(\"Component A\")]),(_vm.flag)?_c('p',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymapA),expression:\"keymapA\"}]},[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to say hello.\")]):_vm._e(),_c('div',{ref:\"hello\",staticClass:\"msg\"},[_vm._v(\"HELLO!\")])])]),_c('div',{staticClass:\"column is-4\"},[_c('div',{staticClass:\"box content component-b\",class:{active: !_vm.flag}},[_c('h1',[_vm._v(\"Component B\")]),(!_vm.flag)?_c('p',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymapB),expression:\"keymapB\"}]},[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to say bye.\")]):_vm._e(),_c('div',{ref:\"bye\",staticClass:\"msg\"},[_vm._v(\"BYE!\")])])]),_c('div',{staticClass:\"column is-2\"})])]),_c('section',{staticClass:\"hero-section\"},[_c('p',{class:{next: true, show: _vm.show}},[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"→\")]),_vm._v(\" to play next case.\")])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"hero-section\"},[_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"tab\")]),_vm._v(\" to switch between two components.\")])])}]\n\nexport { render, staticRenderFns }","\nsection(v-hotkey=\"keymap\")\n h1.title Private Hotkeys of Components\n section.hero-section\n p Press tab to switch between two components.\n section.hero-section\n .columns\n .column.is-2\n .column.is-4\n .box.content.component-a(:class=\"{active: flag}\")\n h1 Component A\n p(v-if=\"flag\", v-hotkey=\"keymapA\") Press enter to say hello.\n .msg(ref=\"hello\") HELLO!\n .column.is-4\n .box.content.component-b(:class=\"{active: !flag}\")\n h1 Component B\n p(v-if=\"!flag\", v-hotkey=\"keymapB\") Press enter to say bye.\n .msg(ref=\"bye\") BYE!\n .column.is-2\n section.hero-section\n p(:class=\"{next: true, show: show}\") Press → to play next case.\n\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-5.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-5.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./step-5.vue?vue&type=template&id=334273d5&scoped=true&lang=pug&\"\nimport script from \"./step-5.vue?vue&type=script&lang=js&\"\nexport * from \"./step-5.vue?vue&type=script&lang=js&\"\nimport style0 from \"./step-5.vue?vue&type=style&index=0&id=334273d5&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"334273d5\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymap),expression:\"keymap\"}]},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Dynamic Keymap With Single Component\")]),_vm._m(0),_c('section',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.keymapType === 'keymap1'),expression:\"keymapType === 'keymap1'\"}],staticClass:\"hero-section\"},[_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"ctrl\")]),_vm._v(\" + \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to say\"),_c('b',{ref:\"hello\"},[_vm._v(\"hello.\")])]),_c('p',[_vm._v(\"You can't say bye now.\")])]),_c('section',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.keymapType === 'keymap2'),expression:\"keymapType === 'keymap2'\"}],staticClass:\"hero-section\"},[_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"alt\")]),_vm._v(\" + \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to say\"),_c('b',{ref:\"bye\"},[_vm._v(\"bye.\")])]),_c('p',[_vm._v(\"You can't say hello now.\")])]),_c('section',{staticClass:\"hero-section\"},[_c('p',{class:{next: true, show: _vm.show}},[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"→\")]),_vm._v(\" to play next case.\")])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"hero-section\"},[_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"tab\")]),_vm._v(\" to switch keymap.\")])])}]\n\nexport { render, staticRenderFns }","\nsection(v-hotkey=\"keymap\")\n h1.title Dynamic Keymap With Single Component\n section.hero-section\n p Press tab to switch keymap.\n section.hero-section(v-show=\"keymapType === 'keymap1'\")\n p Press ctrl + enter to say\n b(ref=\"hello\") hello.\n p You can't say bye now.\n section.hero-section(v-show=\"keymapType === 'keymap2'\")\n p Press alt + enter to say\n b(ref=\"bye\") bye.\n p You can't say hello now.\n section.hero-section\n p(:class=\"{next: true, show: show}\") Press → to play next case.\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-6.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-6.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./step-6.vue?vue&type=template&id=31b96840&scoped=true&lang=pug&\"\nimport script from \"./step-6.vue?vue&type=script&lang=js&\"\nexport * from \"./step-6.vue?vue&type=script&lang=js&\"\nimport style0 from \"./step-6.vue?vue&type=style&index=0&id=31b96840&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"31b96840\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymap),expression:\"keymap\"}]},[_c('h1',{staticClass:\"title\"},[_vm._v(\"Well done!\")]),_c('section',{staticClass:\"hero-section\"},[_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to give me a \"),_c('a',{ref:\"star\",attrs:{\"href\":\"https://github.com/Dafrok/v-hotkey\",\"target\":\"_blank\"}},[_vm._v(\"STAR\")]),_vm._v(\".\")]),_vm._m(0)])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"esc\")]),_vm._v(\" to return home.\")])}]\n\nexport { render, staticRenderFns }","\nsection(v-hotkey=\"keymap\")\n h1.title Well done!\n section.hero-section\n p Press enter to give me a STAR.\n p Press esc to return home.\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-7.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-7.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./step-7.vue?vue&type=template&id=03d0ed34&lang=pug&\"\nimport script from \"./step-7.vue?vue&type=script&lang=js&\"\nexport * from \"./step-7.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymap),expression:\"keymap\"}]},[_c('h1',{staticClass:\"title\"},[_vm._v(\"V-Hotkey\")]),_c('h2',{staticClass:\"subtitle\"},[_vm._v(\"Vue 2.x directive for binding hotkeys to components.\")]),_c('section',{staticClass:\"hero-section\"},[_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"enter\")]),_vm._v(\" to \"),_c('router-link',{attrs:{\"to\":\"/step/1\"}},[_vm._v(\"get start\")]),_vm._v(\".\")],1),_c('p',[_vm._v(\"Press \"),_c('kbd',[_vm._v(\"space\")]),_vm._v(\" to see the \"),_c('a',{ref:\"doc\",attrs:{\"href\":\"https://github.com/Dafrok/v-hotkey/blob/master/README.md\",\"target\":\"_blank\"}},[_vm._v(\"documentation\")]),_vm._v(\".\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\ndiv(v-hotkey=\"keymap\")\n h1.title V-Hotkey\n h2.subtitle Vue 2.x directive for binding hotkeys to components.\n section.hero-section\n p Press enter to get start.\n p Press space to see the documentation.\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./start.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./start.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./start.vue?vue&type=template&id=005cbb00&lang=pug&\"\nimport script from \"./start.vue?vue&type=script&lang=js&\"\nexport * from \"./start.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{directives:[{name:\"hotkey\",rawName:\"v-hotkey\",value:(_vm.keymap),expression:\"keymap\"}]},[_c('transition',{attrs:{\"name\":\"slide\",\"mode\":\"out-in\"}},[_c('router-view')],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nsection(v-hotkey=\"keymap\")\n transition(name=\"slide\", mode=\"out-in\")\n router-view\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./step.vue?vue&type=template&id=917f9c7e&lang=pug&\"\nimport script from \"./step.vue?vue&type=script&lang=js&\"\nexport * from \"./step.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Step1 from './pages/step-1.vue'\nimport Step2 from './pages/step-2.vue'\nimport Step3 from './pages/step-3.vue'\nimport Step4 from './pages/step-4.vue'\nimport Step5 from './pages/step-5.vue'\nimport Step6 from './pages/step-6.vue'\nimport Step7 from './pages/step-7.vue'\nimport Start from './pages/start.vue'\nimport Step from './pages/step.vue'\n\nexport default [\n {\n path: '/',\n alias: '/start',\n component: Start\n },\n {\n path: '/step',\n component: Step,\n children: [\n {\n path: '1',\n component: Step1\n },\n {\n path: '2',\n component: Step2\n },\n {\n path: '3',\n component: Step3\n },\n {\n path: '4',\n component: Step4\n },\n {\n path: '5',\n component: Step5\n },\n {\n path: '6',\n component: Step6\n },\n {\n path: '7',\n component: Step7\n }\n ]\n }\n]\n","import Vue from 'vue'\nimport VueHotkey from '../../src/index.js'\nimport VueRouter from 'vue-router'\n\nimport App from './App.vue'\nimport routes from './routes'\n\nimport 'bulma/css/bulma.css'\n\nVue.use(VueHotkey)\nVue.use(VueRouter)\n\nconst router = new VueRouter({ routes })\n\n/* eslint-disable no-new */\nnew Vue({\n el: '#app',\n router,\n render (h) {\n return h(App)\n }\n})\n","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-6.vue?vue&type=style&index=0&id=31b96840&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-6.vue?vue&type=style&index=0&id=31b96840&lang=stylus&scoped=true&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=35045b27&lang=pug&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=stylus&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-2.vue?vue&type=style&index=0&id=166b63fb&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-2.vue?vue&type=style&index=0&id=166b63fb&lang=stylus&scoped=true&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-5.vue?vue&type=style&index=0&id=334273d5&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-5.vue?vue&type=style&index=0&id=334273d5&lang=stylus&scoped=true&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-4.vue?vue&type=style&index=0&id=887ef854&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-4.vue?vue&type=style&index=0&id=887ef854&lang=stylus&scoped=true&\"","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-3.vue?vue&type=style&index=0&id=23e92f66&lang=stylus&scoped=true&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./step-3.vue?vue&type=style&index=0&id=23e92f66&lang=stylus&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('section',{staticClass:\"hero is-fullheight\"},[_c('div',{staticClass:\"hero-body\"},[_c('div',{staticClass:\"container has-text-centered\"},[_c('transition',{attrs:{\"name\":\"slide\",\"mode\":\"out-in\"}},[_c('router-view')],1)],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!cache-loader?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"7c45587c-vue-loader-template\\\"}!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/pug-plain-loader/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=template&id=35045b27&lang=pug&\""],"sourceRoot":""}
--------------------------------------------------------------------------------
/docs/js/chunk-vendors.6c30874f.js:
--------------------------------------------------------------------------------
1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{2877:function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var f=u.render;u.render=function(t,e){return c.call(e),f(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},"2b0e":function(t,e,n){"use strict";(function(t){
2 | /*!
3 | * Vue.js v2.6.10
4 | * (c) 2014-2019 Evan You
5 | * Released under the MIT License.
6 | */
7 | var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function s(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function c(t){return null!==t&&"object"===typeof t}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return o(t)&&"function"===typeof t.then&&"function"===typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||f(t)&&t.toString===u?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function y(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function b(t,e){return _.call(t,e)}function w(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var C=/-(\w)/g,x=w((function(t){return t.replace(C,(function(t,e){return e?e.toUpperCase():""}))})),$=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),A=/\B([A-Z])/g,k=w((function(t){return t.replace(A,"-$1").toLowerCase()}));function O(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function S(t,e){return t.bind(e)}var E=Function.prototype.bind?S:O;function j(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function T(t,e){for(var n in e)t[n]=e[n];return t}function I(t){for(var e={},n=0;n0,nt=Z&&Z.indexOf("edge/")>0,rt=(Z&&Z.indexOf("android"),Z&&/iphone|ipad|ipod|ios/.test(Z)||"ios"===Y),ot=(Z&&/chrome\/\d+/.test(Z),Z&&/phantomjs/.test(Z),Z&&Z.match(/firefox\/(\d+)/)),it={}.watch,at=!1;if(G)try{var st={};Object.defineProperty(st,"passive",{get:function(){at=!0}}),window.addEventListener("test-passive",null,st)}catch(xa){}var ct=function(){return void 0===X&&(X=!G&&!Q&&"undefined"!==typeof t&&(t["process"]&&"server"===t["process"].env.VUE_ENV)),X},ut=G&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ft(t){return"function"===typeof t&&/native code/.test(t.toString())}var lt,pt="undefined"!==typeof Symbol&&ft(Symbol)&&"undefined"!==typeof Reflect&&ft(Reflect.ownKeys);lt="undefined"!==typeof Set&&ft(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var dt=R,ht=0,vt=function(){this.id=ht++,this.subs=[]};vt.prototype.addSub=function(t){this.subs.push(t)},vt.prototype.removeSub=function(t){g(this.subs,t)},vt.prototype.depend=function(){vt.target&&vt.target.addDep(this)},vt.prototype.notify=function(){var t=this.subs.slice();for(var e=0,n=t.length;e-1)if(i&&!b(o,"default"))a=!1;else if(""===a||a===k(t)){var c=te(String,o.type);(c<0||s0&&(a=Oe(a,(e||"")+"_"+n),ke(a[0])&&ke(u)&&(f[c]=Ct(u.text+a[0].text),a.shift()),f.push.apply(f,a)):s(a)?ke(u)?f[c]=Ct(u.text+a):""!==a&&f.push(Ct(a)):ke(a)&&ke(u)?f[c]=Ct(u.text+a.text):(i(t._isVList)&&o(a.tag)&&r(a.key)&&o(e)&&(a.key="__vlist"+e+"_"+n+"__"),f.push(a)));return f}function Se(t){var e=t.$options.provide;e&&(t._provided="function"===typeof e?e.call(t):e)}function Ee(t){var e=je(t.$options.inject,t);e&&(Et(!1),Object.keys(e).forEach((function(n){Pt(t,n,e[n])})),Et(!0))}function je(t,e){if(t){for(var n=Object.create(null),r=pt?Reflect.ownKeys(t):Object.keys(t),o=0;o0,a=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==n&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Pe(e,c,t[c]))}else o={};for(var u in e)u in o||(o[u]=Le(e,u));return t&&Object.isExtensible(t)&&(t._normalized=o),z(o,"$stable",a),z(o,"$key",s),z(o,"$hasNormal",i),o}function Pe(t,e,n){var r=function(){var t=arguments.length?n.apply(null,arguments):n({});return t=t&&"object"===typeof t&&!Array.isArray(t)?[t]:Ae(t),t&&(0===t.length||1===t.length&&t[0].isComment)?void 0:t};return n.proxy&&Object.defineProperty(t,e,{get:r,enumerable:!0,configurable:!0}),r}function Le(t,e){return function(){return t[e]}}function De(t,e){var n,r,i,a,s;if(Array.isArray(t)||"string"===typeof t)for(n=new Array(t.length),r=0,i=t.length;r1?j(n):n;for(var r=j(arguments,1),o='event handler for "'+t+'"',i=0,a=n.length;idocument.createEvent("Event").timeStamp&&(Xn=function(){return Jn.now()})}function Gn(){var t,e;for(Kn=Xn(),qn=!0,Un.sort((function(t,e){return t.id-e.id})),zn=0;znzn&&Un[n].id>t.id)n--;Un.splice(n+1,0,t)}else Un.push(t);Hn||(Hn=!0,he(Gn))}}var er=0,nr=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++er,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new lt,this.newDepIds=new lt,this.expression="","function"===typeof e?this.getter=e:(this.getter=K(e),this.getter||(this.getter=R)),this.value=this.lazy?void 0:this.get()};nr.prototype.get=function(){var t;mt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(xa){if(!this.user)throw xa;ee(xa,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ye(t),gt(),this.cleanupDeps()}return t},nr.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},nr.prototype.cleanupDeps=function(){var t=this.deps.length;while(t--){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},nr.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():tr(this)},nr.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(xa){ee(xa,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},nr.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},nr.prototype.depend=function(){var t=this.deps.length;while(t--)this.deps[t].depend()},nr.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||g(this.vm._watchers,this);var t=this.deps.length;while(t--)this.deps[t].removeSub(this);this.active=!1}};var rr={enumerable:!0,configurable:!0,get:R,set:R};function or(t,e,n){rr.get=function(){return this[e][n]},rr.set=function(t){this[e][n]=t},Object.defineProperty(t,n,rr)}function ir(t){t._watchers=[];var e=t.$options;e.props&&ar(t,e.props),e.methods&&hr(t,e.methods),e.data?sr(t):Rt(t._data={},!0),e.computed&&fr(t,e.computed),e.watch&&e.watch!==it&&vr(t,e.watch)}function ar(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||Et(!1);var a=function(i){o.push(i);var a=Gt(i,e,n,t);Pt(r,i,a),i in t||or(t,"_props",i)};for(var s in e)a(s);Et(!0)}function sr(t){var e=t.$options.data;e=t._data="function"===typeof e?cr(e,t):e||{},f(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&b(r,i)||q(i)||or(t,"_data",i)}Rt(e,!0)}function cr(t,e){mt();try{return t.call(e,e)}catch(xa){return ee(xa,e,"data()"),{}}finally{gt()}}var ur={lazy:!0};function fr(t,e){var n=t._computedWatchers=Object.create(null),r=ct();for(var o in e){var i=e[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new nr(t,a||R,R,ur)),o in t||lr(t,o,i)}}function lr(t,e,n){var r=!ct();"function"===typeof n?(rr.get=r?pr(e):dr(n),rr.set=R):(rr.get=n.get?r&&!1!==n.cache?pr(e):dr(n.get):R,rr.set=n.set||R),Object.defineProperty(t,e,rr)}function pr(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),vt.target&&e.depend(),e.value}}function dr(t){return function(){return t.call(this,this)}}function hr(t,e){t.$options.props;for(var n in e)t[n]="function"!==typeof e[n]?R:E(e[n],t)}function vr(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o-1)return this;var n=j(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function Ar(t){t.mixin=function(t){return this.options=Xt(this.options,t),this}}function kr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=Xt(n.options,t),a["super"]=n,a.options.props&&Or(a),a.options.computed&&Sr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,U.forEach((function(t){a[t]=n[t]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=T({},a.options),o[r]=a,a}}function Or(t){var e=t.options.props;for(var n in e)or(t.prototype,"_props",n)}function Sr(t){var e=t.options.computed;for(var n in e)lr(t.prototype,n,e[n])}function Er(t){U.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&f(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}function jr(t){return t&&(t.Ctor.options.name||t.tag)}function Tr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function Ir(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=jr(a.componentOptions);s&&!e(s)&&Rr(n,i,r,o)}}}function Rr(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,g(n,e)}_r(xr),mr(xr),En(xr),Rn(xr),gn(xr);var Pr=[String,RegExp,Array],Lr={name:"keep-alive",abstract:!0,props:{include:Pr,exclude:Pr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Rr(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",(function(e){Ir(t,(function(t){return Tr(e,t)}))})),this.$watch("exclude",(function(e){Ir(t,(function(t){return!Tr(e,t)}))}))},render:function(){var t=this.$slots.default,e=xn(t),n=e&&e.componentOptions;if(n){var r=jr(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Tr(i,r))||a&&r&&Tr(a,r))return e;var s=this,c=s.cache,u=s.keys,f=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[f]?(e.componentInstance=c[f].componentInstance,g(u,f),u.push(f)):(c[f]=e,u.push(f),this.max&&u.length>parseInt(this.max)&&Rr(c,u[0],u,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Dr={KeepAlive:Lr};function Nr(t){var e={get:function(){return B}};Object.defineProperty(t,"config",e),t.util={warn:dt,extend:T,mergeOptions:Xt,defineReactive:Pt},t.set=Lt,t.delete=Dt,t.nextTick=he,t.observable=function(t){return Rt(t),t},t.options=Object.create(null),U.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,T(t.options.components,Dr),$r(t),Ar(t),kr(t),Er(t)}Nr(xr),Object.defineProperty(xr.prototype,"$isServer",{get:ct}),Object.defineProperty(xr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(xr,"FunctionalRenderContext",{value:Qe}),xr.version="2.6.10";var Mr=y("style,class"),Fr=y("input,textarea,option,select,progress"),Ur=function(t,e,n){return"value"===n&&Fr(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Vr=y("contenteditable,draggable,spellcheck"),Br=y("events,caret,typing,plaintext-only"),Hr=function(t,e){return Xr(e)||"false"===e?"false":"contenteditable"===t&&Br(e)?e:"true"},qr=y("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),zr="http://www.w3.org/1999/xlink",Wr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Kr=function(t){return Wr(t)?t.slice(6,t.length):""},Xr=function(t){return null==t||!1===t};function Jr(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Gr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Gr(e,n.data));return Qr(e.staticClass,e.class)}function Gr(t,e){return{staticClass:Yr(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Qr(t,e){return o(t)||o(e)?Yr(t,Zr(e)):""}function Yr(t,e){return t?e?t+" "+e:t:e||""}function Zr(t){return Array.isArray(t)?to(t):c(t)?eo(t):"string"===typeof t?t:""}function to(t){for(var e,n="",r=0,i=t.length;r-1?so[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:so[t]=/HTMLUnknownElement/.test(e.toString())}var uo=y("text,number,password,search,email,tel,url");function fo(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function lo(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function po(t,e){return document.createElementNS(no[t],e)}function ho(t){return document.createTextNode(t)}function vo(t){return document.createComment(t)}function yo(t,e,n){t.insertBefore(e,n)}function mo(t,e){t.removeChild(e)}function go(t,e){t.appendChild(e)}function _o(t){return t.parentNode}function bo(t){return t.nextSibling}function wo(t){return t.tagName}function Co(t,e){t.textContent=e}function xo(t,e){t.setAttribute(e,"")}var $o=Object.freeze({createElement:lo,createElementNS:po,createTextNode:ho,createComment:vo,insertBefore:yo,removeChild:mo,appendChild:go,parentNode:_o,nextSibling:bo,tagName:wo,setTextContent:Co,setStyleScope:xo}),Ao={create:function(t,e){ko(e)},update:function(t,e){t.data.ref!==e.data.ref&&(ko(t,!0),ko(e))},destroy:function(t){ko(t,!0)}};function ko(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?g(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var Oo=new _t("",{},[]),So=["create","activate","update","remove","destroy"];function Eo(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&jo(t,e)||i(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function jo(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||uo(r)&&uo(i)}function To(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(a[i]=r);return a}function Io(t){var e,n,a={},c=t.modules,u=t.nodeOps;for(e=0;ev?(l=r(n[g+1])?null:n[g+1].elm,x(t,l,n,h,g,i)):h>g&&A(t,e,p,v)}function S(t,e,n,r){for(var i=n;i-1?Ho(t,e,n):qr(e)?Xr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Vr(e)?t.setAttribute(e,Hr(e,n)):Wr(e)?Xr(n)?t.removeAttributeNS(zr,Kr(e)):t.setAttributeNS(zr,e,n):Ho(t,e,n)}function Ho(t,e,n){if(Xr(n))t.removeAttribute(e);else{if(tt&&!et&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var qo={create:Vo,update:Vo};function zo(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Jr(e),c=n._transitionClasses;o(c)&&(s=Yr(s,Zr(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var Wo,Ko={create:zo,update:zo},Xo="__r",Jo="__c";function Go(t){if(o(t[Xo])){var e=tt?"change":"input";t[e]=[].concat(t[Xo],t[e]||[]),delete t[Xo]}o(t[Jo])&&(t.change=[].concat(t[Jo],t.change||[]),delete t[Jo])}function Qo(t,e,n){var r=Wo;return function o(){var i=e.apply(null,arguments);null!==i&&ti(t,o,n,r)}}var Yo=ae&&!(ot&&Number(ot[1])<=53);function Zo(t,e,n,r){if(Yo){var o=Kn,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}Wo.addEventListener(t,e,at?{capture:n,passive:r}:n)}function ti(t,e,n,r){(r||Wo).removeEventListener(t,e._wrapper||e,n)}function ei(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};Wo=e.elm,Go(n),be(n,o,Zo,ti,Qo,e.context),Wo=void 0}}var ni,ri={create:ei,update:ei};function oi(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=T({},c)),s)n in c||(a[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){a._value=i;var u=r(i)?"":String(i);ii(a,u)&&(a.value=u)}else if("innerHTML"===n&&oo(a.tagName)&&r(a.innerHTML)){ni=ni||document.createElement("div"),ni.innerHTML="";var f=ni.firstChild;while(a.firstChild)a.removeChild(a.firstChild);while(f.firstChild)a.appendChild(f.firstChild)}else if(i!==s[n])try{a[n]=i}catch(xa){}}}}function ii(t,e){return!t.composing&&("OPTION"===t.tagName||ai(t,e)||si(t,e))}function ai(t,e){var n=!0;try{n=document.activeElement!==t}catch(xa){}return n&&t.value!==e}function si(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var ci={create:oi,update:oi},ui=w((function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach((function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}));function fi(t){var e=li(t.style);return t.staticStyle?T(t.staticStyle,e):e}function li(t){return Array.isArray(t)?I(t):"string"===typeof t?ui(t):t}function pi(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=fi(o.data))&&T(r,n)}(n=fi(t.data))&&T(r,n);var i=t;while(i=i.parent)i.data&&(n=fi(i.data))&&T(r,n);return r}var di,hi=/^--/,vi=/\s*!important$/,yi=function(t,e,n){if(hi.test(e))t.style.setProperty(e,n);else if(vi.test(n))t.style.setProperty(k(e),n.replace(vi,""),"important");else{var r=gi(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(wi).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function xi(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(wi).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function $i(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&T(e,Ai(t.name||"v")),T(e,t),e}return"string"===typeof t?Ai(t):void 0}}var Ai=w((function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}})),ki=G&&!et,Oi="transition",Si="animation",Ei="transition",ji="transitionend",Ti="animation",Ii="animationend";ki&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ei="WebkitTransition",ji="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ti="WebkitAnimation",Ii="webkitAnimationEnd"));var Ri=G?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Pi(t){Ri((function(){Ri(t)}))}function Li(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),Ci(t,e))}function Di(t,e){t._transitionClasses&&g(t._transitionClasses,e),xi(t,e)}function Ni(t,e,n){var r=Fi(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Oi?ji:Ii,c=0,u=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++c>=a&&u()};setTimeout((function(){c0&&(n=Oi,f=a,l=i.length):e===Si?u>0&&(n=Si,f=u,l=c.length):(f=Math.max(a,u),n=f>0?a>u?Oi:Si:null,l=n?n===Oi?i.length:c.length:0);var p=n===Oi&&Mi.test(r[Ei+"Property"]);return{type:n,timeout:f,propCount:l,hasTransform:p}}function Ui(t,e){while(t.length1}function Wi(t,e){!0!==e.data.show&&Bi(e)}var Ki=G?{create:Wi,activate:Wi,remove:function(t,e){!0!==t.data.show?Hi(t,e):e()}}:{},Xi=[qo,Ko,ri,ci,bi,Ki],Ji=Xi.concat(Uo),Gi=Io({nodeOps:$o,modules:Ji});et&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&oa(t,"input")}));var Qi={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?we(n,"postpatch",(function(){Qi.componentUpdated(t,e,n)})):Yi(t,e,n.context),t._vOptions=[].map.call(t.options,ea)):("textarea"===n.tag||uo(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",na),t.addEventListener("compositionend",ra),t.addEventListener("change",ra),et&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Yi(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,ea);if(o.some((function(t,e){return!D(t,r[e])}))){var i=t.multiple?e.value.some((function(t){return ta(t,o)})):e.value!==e.oldValue&&ta(e.value,o);i&&oa(t,"change")}}}};function Yi(t,e,n){Zi(t,e,n),(tt||nt)&&setTimeout((function(){Zi(t,e,n)}),0)}function Zi(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(D(ea(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function ta(t,e){return e.every((function(e){return!D(e,t)}))}function ea(t){return"_value"in t?t._value:t.value}function na(t){t.target.composing=!0}function ra(t){t.target.composing&&(t.target.composing=!1,oa(t.target,"input"))}function oa(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function ia(t){return!t.componentInstance||t.data&&t.data.transition?t:ia(t.componentInstance._vnode)}var aa={bind:function(t,e,n){var r=e.value;n=ia(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,Bi(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=ia(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?Bi(n,(function(){t.style.display=t.__vOriginalDisplay})):Hi(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},sa={model:Qi,show:aa},ca={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ua(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?ua(xn(e.children)):t}function fa(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[x(i)]=o[i];return e}function la(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function pa(t){while(t=t.parent)if(t.data.transition)return!0}function da(t,e){return e.key===t.key&&e.tag===t.tag}var ha=function(t){return t.tag||Cn(t)},va=function(t){return"show"===t.name},ya={name:"transition",props:ca,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(ha),n.length)){0;var r=this.mode;0;var o=n[0];if(pa(this.$vnode))return o;var i=ua(o);if(!i)return o;if(this._leaving)return la(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=fa(this),u=this._vnode,f=ua(u);if(i.data.directives&&i.data.directives.some(va)&&(i.data.show=!0),f&&f.data&&!da(i,f)&&!Cn(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=T({},c);if("out-in"===r)return this._leaving=!0,we(l,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),la(t,o);if("in-out"===r){if(Cn(i))return u;var p,d=function(){p()};we(c,"afterEnter",d),we(c,"enterCancelled",d),we(l,"delayLeave",(function(t){p=t}))}}return o}}},ma=T({tag:String,moveClass:String},ca);delete ma.mode;var ga={props:ma,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Tn(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=fa(this),s=0;s-1}function i(t,e){return e instanceof t||e&&(e.name===t.name||e._name===t._name)}function a(t,e){for(var n in e)t[n]=e[n];return t}var s={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,o=e.parent,i=e.data;i.routerView=!0;var s=o.$createElement,u=n.name,f=o.$route,l=o._routerViewCache||(o._routerViewCache={}),p=0,d=!1;while(o&&o._routerRoot!==o){var h=o.$vnode&&o.$vnode.data;h&&(h.routerView&&p++,h.keepAlive&&o._inactive&&(d=!0)),o=o.$parent}if(i.routerViewDepth=p,d)return s(l[u],i,r);var v=f.matched[p];if(!v)return l[u]=null,s();var y=l[u]=v.components[u];i.registerRouteInstance=function(t,e){var n=v.instances[u];(e&&n!==t||!e&&n===t)&&(v.instances[u]=e)},(i.hook||(i.hook={})).prepatch=function(t,e){v.instances[u]=e.componentInstance},i.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==v.instances[u]&&(v.instances[u]=t.componentInstance)};var m=i.props=c(f,v.props&&v.props[u]);if(m){m=i.props=a({},m);var g=i.attrs=i.attrs||{};for(var _ in m)y.props&&_ in y.props||(g[_]=m[_],delete m[_])}return s(y,i,r)}};function c(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}var u=/[!'()*]/g,f=function(t){return"%"+t.charCodeAt(0).toString(16)},l=/%2C/g,p=function(t){return encodeURIComponent(t).replace(u,f).replace(l,",")},d=decodeURIComponent;function h(t,e,n){void 0===e&&(e={});var r,o=n||v;try{r=o(t||"")}catch(a){r={}}for(var i in e)r[i]=e[i];return r}function v(t){var e={};return t=t.trim().replace(/^(\?|#|&)/,""),t?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),r=d(n.shift()),o=n.length>0?d(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]})),e):e}function y(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return p(e);if(Array.isArray(n)){var r=[];return n.forEach((function(t){void 0!==t&&(null===t?r.push(p(e)):r.push(p(e)+"="+p(t)))})),r.join("&")}return p(e)+"="+p(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var m=/\/?$/;function g(t,e,n,r){var o=r&&r.options.stringifyQuery,i=e.query||{};try{i=_(i)}catch(s){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:i,params:e.params||{},fullPath:C(e,o),matched:t?w(t):[]};return n&&(a.redirectedFrom=C(n,o)),Object.freeze(a)}function _(t){if(Array.isArray(t))return t.map(_);if(t&&"object"===typeof t){var e={};for(var n in t)e[n]=_(t[n]);return e}return t}var b=g(null,{path:"/"});function w(t){var e=[];while(t)e.unshift(t),t=t.parent;return e}function C(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var o=t.hash;void 0===o&&(o="");var i=e||y;return(n||"/")+i(r)+o}function x(t,e){return e===b?t===e:!!e&&(t.path&&e.path?t.path.replace(m,"")===e.path.replace(m,"")&&t.hash===e.hash&&$(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&$(t.query,e.query)&&$(t.params,e.params)))}function $(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every((function(n){var r=t[n],o=e[n];return"object"===typeof r&&"object"===typeof o?$(r,o):String(r)===String(o)}))}function A(t,e){return 0===t.path.replace(m,"/").indexOf(e.path.replace(m,"/"))&&(!e.hash||t.hash===e.hash)&&k(t.query,e.query)}function k(t,e){for(var n in e)if(!(n in t))return!1;return!0}function O(t,e,n){var r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;var o=e.split("/");n&&o[o.length-1]||o.pop();for(var i=t.replace(/^\//,"").split("/"),a=0;a=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function E(t){return t.replace(/\/\//g,"/")}var j=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},T=G,I=N,R=M,P=V,L=J,D=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function N(t,e){var n,r=[],o=0,i=0,a="",s=e&&e.delimiter||"/";while(null!=(n=D.exec(t))){var c=n[0],u=n[1],f=n.index;if(a+=t.slice(i,f),i=f+c.length,u)a+=u[1];else{var l=t[i],p=n[2],d=n[3],h=n[4],v=n[5],y=n[6],m=n[7];a&&(r.push(a),a="");var g=null!=p&&null!=l&&l!==p,_="+"===y||"*"===y,b="?"===y||"*"===y,w=n[2]||s,C=h||v;r.push({name:d||o++,prefix:p||"",delimiter:w,optional:b,repeat:_,partial:g,asterisk:!!m,pattern:C?H(C):m?".*":"[^"+B(w)+"]+?"})}}return i1||!w.length)return 0===w.length?t():t("span",{},w)}if("a"===this.tag)b.on=_,b.attrs={href:c};else{var C=at(this.$slots.default);if(C){C.isStatic=!1;var $=C.data=a({},C.data);for(var k in $.on=$.on||{},$.on){var O=$.on[k];k in _&&($.on[k]=Array.isArray(O)?O:[O])}for(var S in _)S in $.on?$.on[S].push(_[S]):$.on[S]=m;var E=C.data.attrs=a({},C.data.attrs);E.href=c}else b.on=_}return t(this.tag,b,this.$slots.default)}};function it(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function at(t){if(t)for(var e,n=0;n-1&&(s.params[p]=n.params[p]);return s.path=Y(u.path,s.params,'named route "'+c+'"'),f(u,s,a)}if(s.path){s.params={};for(var d=0;d=t.length?n():t[o]?e(t[o],(function(){r(o+1)})):r(o+1)};r(0)}function Nt(t){return function(e,n,r){var i=!1,a=0,s=null;Mt(t,(function(t,e,n,c){if("function"===typeof t&&void 0===t.cid){i=!0,a++;var u,f=Bt((function(e){Vt(e)&&(e=e.default),t.resolved="function"===typeof e?e:tt.extend(e),n.components[c]=e,a--,a<=0&&r()})),l=Bt((function(t){var e="Failed to resolve async component "+c+": "+t;s||(s=o(t)?t:new Error(e),r(s))}));try{u=t(f,l)}catch(d){l(d)}if(u)if("function"===typeof u.then)u.then(f,l);else{var p=u.component;p&&"function"===typeof p.then&&p.then(f,l)}}})),i||r()}}function Mt(t,e){return Ft(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Ft(t){return Array.prototype.concat.apply([],t)}var Ut="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;function Vt(t){return t.__esModule||Ut&&"Module"===t[Symbol.toStringTag]}function Bt(t){var e=!1;return function(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Ht=function(t){function e(e){t.call(this),this.name=this._name="NavigationDuplicated",this.message='Navigating to current location ("'+e.fullPath+'") is not allowed',Object.defineProperty(this,"stack",{value:(new t).stack,writable:!0,configurable:!0})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error);Ht._name="NavigationDuplicated";var qt=function(t,e){this.router=t,this.base=zt(e),this.current=b,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[]};function zt(t){if(!t)if(ct){var e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^https?:\/\/[^\/]+/,"")}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function Wt(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n-1?decodeURI(t.slice(0,r))+t.slice(r):decodeURI(t)}else n>-1&&(t=decodeURI(t.slice(0,n))+t.slice(n));return t}function se(t){var e=window.location.href,n=e.indexOf("#"),r=n>=0?e.slice(0,n):e;return r+"#"+t}function ce(t){Rt?Pt(se(t)):window.location.hash=t}function ue(t){Rt?Lt(se(t)):window.location.replace(se(t))}var fe=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){e.index=n,e.updateRoute(r)}),(function(t){i(Ht,t)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(qt),le=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=dt(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!Rt&&!1!==t.fallback,this.fallback&&(e="hash"),ct||(e="abstract"),this.mode=e,e){case"history":this.history=new ee(this,t.base);break;case"hash":this.history=new re(this,t.base,this.fallback);break;case"abstract":this.history=new fe(this,t.base);break;default:0}},pe={currentRoute:{configurable:!0}};function de(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function he(t,e,n){var r="hash"===n?"#"+e:e;return t?E(t+"/"+r):r}le.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},pe.currentRoute.get=function(){return this.history&&this.history.current},le.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null)})),!this.app){this.app=t;var n=this.history;if(n instanceof ee)n.transitionTo(n.getCurrentLocation());else if(n instanceof re){var r=function(){n.setupListeners()};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},le.prototype.beforeEach=function(t){return de(this.beforeHooks,t)},le.prototype.beforeResolve=function(t){return de(this.resolveHooks,t)},le.prototype.afterEach=function(t){return de(this.afterHooks,t)},le.prototype.onReady=function(t,e){this.history.onReady(t,e)},le.prototype.onError=function(t){this.history.onError(t)},le.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},le.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!==typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},le.prototype.go=function(t){this.history.go(t)},le.prototype.back=function(){this.go(-1)},le.prototype.forward=function(){this.go(1)},le.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},le.prototype.resolve=function(t,e,n){e=e||this.history.current;var r=Z(t,e,n,this),o=this.match(r,e),i=o.redirectedFrom||o.fullPath,a=this.history.base,s=he(a,i,this.mode);return{location:r,route:o,href:s,normalizedTo:r,resolved:o}},le.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==b&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(le.prototype,pe),le.install=st,le.version="3.1.3",ct&&window.Vue&&window.Vue.use(le),e["a"]=le},"92c6":function(t,e,n){},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n}}]);
13 | //# sourceMappingURL=chunk-vendors.6c30874f.js.map
--------------------------------------------------------------------------------