{"version":3,"sources":["jsdelivr-header.js","/npm/gitclone@2.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACCA,aAEA,IAAI,MAAQ,QAAQ,WAiDpB,OAAO,QAAU,SAAS,IACxB,IAAI,EAAO,GAAG,MAAM,KAAK,WACrB,EAAK,EAAK,EAAK,OAAS,GACxB,EAAO,MAAM,iBAAiB,MAAM,KAAM,GAC1C,EAAO,CAAC,SACR,EAAQ,EAAK,IAAM,kBAAoB,sBAE3C,EAAK,KAAK,EAAQ,EAAK,WAAa,QAEhB,WAAhB,EAAK,SACP,EAAK,KAAK,MACV,EAAK,KAAK,EAAK,SAEb,EAAK,MACP,EAAK,KAAK,EAAK,MAGjB,EAAS,QAAU,EAAS,SAAuC,iBAArB,EAAS,QACnD,EAAS,QACT,CAAE,MAAO,CAAC,KAAM,KAAM,OAE1B,IAAI,EAAK,MAAM,MAAM,MAAO,EAAM,EAAS,SAC3C,GAAkB,mBAAP,EAIX,OAAO,EAHL,MAAM,QAAQ,EAAI,EAItB","file":"/npm/gitclone@2.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/gitclone@2.0.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*!\n * gitclone <https://github.com/tunnckoCore/gitclone>\n *\n * Copyright (c) 2014-2016 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)\n * Released under the MIT license.\n */\n\n'use strict'\n\nvar utils = require('./utils')\n\n/**\n * > Clones github repository, optionally\n * pass destination folder. By defaults uses HTTPS\n * to clone the repository. If you want SSH clone\n * you should pass second, third or fourth argument\n * boolean `true`, or object `{ssh: true}`.\n * Pattern can be `user/repo#branch` as first\n * argument. Or first argument `user`, second\n * argument `repo`, third `branch`, fourth `ssh`.\n *\n * **Hint:** All arguments are super flexible and they are handled\n * absolutely directly with [gitclone-defaults][],\n * so read its [API docs](https://github.com/tunnckoCore/gitclone-defaults#api).\n * In addition, you also can pass `callback` as last argument, otherwise\n * it will return Spawn stream.\n *\n * **Example**\n *\n * ```js\n * const gitclone = require('gitclone')\n *\n * // clones with SSH\n * gitclone('node-minibase/minibase', true)\n *\n * // clone with HTTPS\n * gitclone('node-minibase/minibase', (err) => {\n *   if (err) return console.error(err)\n * })\n *\n * // clone `dev` branch from `verbose/verb` repo\n * gitclone('verbose/verb#dev', console.log)\n *\n * // clone `jonschlinkert/nanomatch` with SSH\n * gitclone('jonchlinkert', 'nanomatch', true)\n *\n * // clone to different destination folder\n * gitclone('hybridables/always-done', { dest: 'foobar' })\n *\n * // clone SSH + dest + branch\n * gitclone('verbose/verb', { dest: 'verb0.9.0', branch: 'dev', ssh: true })\n * ```\n *\n * @param  {Function} `[callback]` optional, if not given, returns a stream\n * @return {Stream} if not `callback` given as last argument - a Spawn stream\n * @api public\n */\n\nmodule.exports = function gitclone () {\n  var argz = [].slice.call(arguments)\n  var cb = argz[argz.length - 1]\n  var opts = utils.gitcloneDefaults.apply(this, argz)\n  var args = ['clone']\n  var param = opts.ssh ? 'git@github.com:' : 'https://github.com/'\n\n  args.push(param + opts.repository + '.git')\n\n  if (opts.branch !== 'master') {\n    args.push('-b')\n    args.push(opts.branch)\n  }\n  if (opts.dest) {\n    args.push(opts.dest)\n  }\n\n  gitclone.options = gitclone.options && typeof gitclone.options === 'object'\n    ? gitclone.options\n    : { stdio: [null, null, null] }\n\n  var cp = utils.spawn('git', args, gitclone.options)\n  if (typeof cb === 'function') {\n    utils.capture(cp, cb)\n    return\n  }\n  return cp\n}\n"]}