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ClB,oBAAQ,IAAR,GAAe,QAAQ,IAAR,IAAgB,EAA/B;AACA,iBAAK,EAAL,CAAQ,QAAQ,IAAhB,EAAsB;AACpB,4BAAY,KAAK,YADG;AAEpB,4BAAY,KAAK;AAFG,aAAtB;AAID;AAED,eAAO,OAAP;AACD;AAzDM,CAJM,C","sourcesContent":["// Mixins\nimport Delayable from '../../mixins/delayable'\nimport Toggleable from '../../mixins/toggleable'\n\n// Utilities\nimport mixins from '../../util/mixins'\nimport { consoleWarn } from '../../util/console'\n\n// Types\nimport { VNode, ScopedSlotChildren } from 'vue/types/vnode'\n\nexport default mixins(\n Delayable,\n Toggleable\n /* @vue/component */\n).extend({\n name: 'v-hover',\n\n props: {\n disabled: {\n type: Boolean,\n default: false\n },\n value: {\n type: Boolean,\n default: undefined\n }\n },\n\n methods: {\n onMouseEnter () {\n this.runDelay('open')\n },\n onMouseLeave () {\n this.runDelay('close')\n }\n },\n\n render (): VNode {\n if (!this.$scopedSlots.default && this.value === undefined) {\n consoleWarn('v-hover is missing a default scopedSlot or bound value', this)\n\n return null as any\n }\n\n let element: VNode | ScopedSlotChildren\n\n if (this.$scopedSlots.default) {\n element = this.$scopedSlots.default({ hover: this.isActive })\n } else if (this.$slots.default && this.$slots.default.length === 1) {\n element = this.$slots.default[0]\n }\n\n if (Array.isArray(element) && element.length === 1) {\n element = element[0]\n }\n\n if (!element || Array.isArray(element) || !element.tag) {\n consoleWarn('v-hover should only contain a single element', this)\n\n return element as any\n }\n\n if (!this.disabled) {\n element.data = element.data || {}\n this._g(element.data, {\n mouseenter: this.onMouseEnter,\n mouseleave: this.onMouseLeave\n })\n }\n\n return element\n }\n})\n"],"sourceRoot":""}