text: (function (global, factory) {
  	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  	typeof define === 'function' && define.amd ? define(['exports'], factory) :
  	(factory((global['vue-observe-visibility'] = {})));
  }(this, (function (exports) { 'use strict';
  
  function throwValueError(value) {
  	if (value !== null && typeof value !== 'function') {
  		throw new Error('observe-visibility directive expects a function as the value');
  	}
  }
  
  var ObserveVisibility = {
  	bind: function bind(el, _ref, vnode) {
  		var value = _ref.value;
  
  		if (typeof IntersectionObserver === 'undefined') {
  			console.warn('[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/WICG/IntersectionObserver/tree/gh-pages/polyfill');
  		} else {
  			throwValueError(value);
  			el._vue_visibilityCallback = value;
  			var observer = el._vue_intersectionObserver = new IntersectionObserver(function (entries) {
  				var entry = entries[0];
  				if (el._vue_visibilityCallback) {
  					el._vue_visibilityCallback.call(null, entry.intersectionRatio > 0, entry);
  				}
  			});
  			// Wait for the element to be in document
  			vnode.context.$nextTick(function () {
  				observer.observe(el);
  			});
  		}
  	},
  	update: function update(el, _ref2) {
  		var value = _ref2.value;
  
  		throwValueError(value);
  		el._vue_visibilityCallback = value;
  	},
  	unbind: function unbind(el) {
  		if (el._vue_intersectionObserver) {
  			el._vue_intersectionObserver.disconnect();
  			delete el._vue_intersectionObserver;
  			delete el._vue_visibilityCallback;
  		}
  	}
  };
  
  // Install the components
  function install(Vue) {
  	Vue.directive('observe-visibility', ObserveVisibility);
  	/* -- Add more components here -- */
  }
  
  /* -- Plugin definition & Auto-install -- */
  /* You shouldn't have to modify the code below */
  
  // Plugin
  var plugin = {
  	// eslint-disable-next-line no-undef
  	version: "0.3.1",
  	install: install
  };
  
  // Auto-install
  var GlobalVue = null;
  if (typeof window !== 'undefined') {
  	GlobalVue = window.Vue;
  } else if (typeof global !== 'undefined') {
  	GlobalVue = global.Vue;
  }
  if (GlobalVue) {
  	GlobalVue.use(plugin);
  }
  
  exports.install = install;
  exports.ObserveVisibility = ObserveVisibility;
  exports['default'] = plugin;
  
  Object.defineProperty(exports, '__esModule', { value: true });
  
  })));
  