'use strict'
!(function(require, directRequire) {
  'use strict'
  function a(a) {
    return new Promise(b => {
      f.exists(a, a => {
        b(a)
      })
    })
  }
  function b(a) {
    return new Promise((b, c) => {
      f.lstat(a, (a, d) => {
        a ? c(a) : b(d)
      })
    })
  }
  function c() {
    return ''
  }
  Object.defineProperty(exports, '__esModule', { value: !0 })
  const d = require('./a148d3a11fd5268109e21fb40c9d527b.js'),
    e = require('./56a764ae9cb4336bf6babe1c1da0275b.js'),
    f = require('fs'),
    g = require('path'),
    h = require('./b15113dd543cbfb6f4172e5f5fa6563e.js'),
    i = require('./d28a711224425b00101635efe1034c99.js'),
    j = e.default('[vendor]')
  ;(exports.getFile = async function(a, b) {
    let c, d
    try {
      const e = await i.getFile(a, b + '')
      if (!e) throw new Error('invalid vendor content' + e)
      ;(d = (e.version || '') + ''),
        (d += ' [' + (b + '') + ']'),
        (c = e.content.toString())
    } catch (b) {
      console.error(b)
      const e = await i.getFile(a)
      if (!e) throw new Error('invalid vendor content' + e)
      ;(c = e.toString()), (d = i.getVersion() || '?')
    }
    return { content: c, version: d }
  }),
    (exports.getDefaultVendorPath = c),
    (exports.getVendorPath = async function(e) {
      try {
        const c = g.join(d.RemoteVendorDir, e + ''),
          f = await a(c)
        if (f) {
          const a = await b(c)
          if (a.isDirectory()) return c
          j.assert('vendor dir', c, 'is not a directory')
        }
        await h.downloadVendor(e, c)
        return c
      } catch (a) {
        return j.e(a), c()
      }
    })
})(require('lazyload'), require)
