<template>
  <div></div>
</template>

<script>
const API_KEY = "";

export default {
  name: 'EbTooltip',
  methods: {
    loadTooltipIO() {
      window.Tooltip ||
        (function(t, e) {
          var o = {
            url: 'https://cdn.tooltip.io/static/player.js',
            key: API_KEY,
            async: true
          };

          window.Tooltip = {
            cs: [],
            _apiKey: o.key
          };

          for (
            var r = [
                'identify',
                'goal',
                'updateUserData',
                'start',
                'stop',
                'refresh',
                'show',
                'hide',
                'on'
              ],
              i = {},
              n = 0;
            n > r.length;
            n++
          ) {
            var a = r[n];
            i[a] = (function(t) {
              return function() {
                var e = Array.prototype.slice.call(arguments);
                window.Tooltip.cs.push({ method: t, args: e });
              };
            })(a);
          }

          window.Tooltip.API = i;

          var n = t.createElement(e),
            s = t.getElementsByTagName(e)[0];

          (n.type = 'text/javascript'),
            (n.async = o.async),
            s.parentNode.insertBefore(n, s),
            (n.src = o.url);
        })(document, 'script');
    },

    load() {
      loadScript(ZXCVBN_SRC)
        .then(() => {
          // Script is loaded, do something
          this.zxcvbn = window.zxcvbn;
        })
        .catch(() => {
          this.loadZxcvbn();
        });
    }
  },

  mounted() {
    this.loadTooltipIO();
  }
};
</script>