{"version":3,"sources":["jsdelivr-header.js","/npm/ncnbb-io-spin@0.4.2/spin.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,IAAI,SAAW,QAAQ,cACnB,OAAS,QAAQ,UACrB,SAAS,KAAK,EAAa,EAAM,GAC/B,KAAM,gBAAgB,MAAO,OAAO,IAAI,KAAK,EAAa,EAAM,GAEhE,KAAK,IAAM,EACX,KAAK,YAAc,GAAe,GAClC,KAAK,KAAO,GAAQ,QACpB,KAAK,MAAQ,GAAS,MACxB,CAEA,KAAK,UAAY,CACf,aAAc,KACd,MAAO,WAML,OALA,KAAK,QAAU,SAAS,KAAK,MAC7B,KAAK,KAAO,YAAY,WACtB,QAAQ,OAAO,OAAS,QAAQ,OAAO,MAAM,OAAO,KAAK,OAAO,KAAK,KAAK,QAAQ,KAAK,QAAQ,KAAK,gBACpG,KAAK,MAAQ,KAAK,IAAM,KAAK,QAAQ,MACvC,EAAE,KAAK,MAAO,KACP,IACT,EACA,KAAM,WAIJ,OAHA,QAAQ,OAAO,WAAa,QAAQ,OAAO,YAC3C,QAAQ,OAAO,OAAS,QAAQ,OAAO,MAAM,MAC7C,cAAc,KAAK,MACZ,IACT,EACA,OAAQ,SAAU,GAGhB,OAFA,QAAQ,OAAO,WAAa,QAAQ,OAAO,YAC3C,KAAK,YAAc,EAAc,IAC1B,IACT,GAGF,OAAO,QAAU","file":"/npm/ncnbb-io-spin@0.4.2/spin.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/ncnbb-io-spin@0.4.2/spin.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var spinners = require('./spinners')\nvar colors = require('colors');\nfunction Spin(placeholder, type, color) {\n  if (!(this instanceof Spin)) return new Spin(placeholder, type, color)\n\n  this.pos = 0\n  this.placeholder = placeholder || ''\n  this.type = type || 'Spin1'\n  this.color = color || 'blue'\n}\n\nSpin.prototype = {\n  counstructor: Spin,\n  start: function () {\n    this.spinner = spinners[this.type]\n    this.loop = setInterval(function () {\n      process.stdout.write && process.stdout.write(colors[this.color](`\\r${this.spinner[this.pos]} ${this.placeholder}`))\n      this.pos = ++this.pos % this.spinner.length\n    }.bind(this), 100)\n    return this\n  },\n  stop: function () {\n    process.stdout.clearLine && process.stdout.clearLine()\n    process.stdout.write && process.stdout.write('\\r')\n    clearInterval(this.loop)\n    return this\n  },\n  update: function (placeholder) {\n    process.stdout.clearLine && process.stdout.clearLine()\n    this.placeholder = placeholder + ' '\n    return this\n  }\n}\n\nmodule.exports = Spin\n"]}