{"version":3,"sources":["jsdelivr-header.js","/npm/pull-batch@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,MAAM,QAAU,QAAQ,gBAElB,mBAAqB,IAE3B,OAAO,QAAU,SAAgB,GAC/B,MAAM,EAAY,GAHO,IAKzB,IAAI,EAAW,GAEf,OAAO,SACL,SAAoB,GAGlB,IAFA,EAAW,EAAS,OAAO,GAEpB,EAAS,QAAU,GAAW,CACnC,MAAM,EAAM,EACN,EAAQ,EAAS,MAAM,EAAG,GAChC,EAAW,EAAS,MAAM,GAC1B,KAAK,MAAM,EACb,CACF,IACA,SAAgB,GACV,EAAS,SACX,KAAK,MAAM,GACX,EAAW,IAGb,KAAK,MAAM,KACb,GAEJ","file":"/npm/pull-batch@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/pull-batch@1.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","'use strict'\n\nconst through = require('pull-through')\n\nconst DEFAULT_MAX_LENGTH = 100\n\nmodule.exports = function block (_maxLength) {\n  const maxLength = _maxLength || DEFAULT_MAX_LENGTH\n\n  var buffered = []\n\n  return through(\n    function transform (data) {\n      buffered = buffered.concat(data)\n\n      while (buffered.length >= maxLength) {\n        const end = maxLength\n        const slice = buffered.slice(0, end)\n        buffered = buffered.slice(end)\n        this.queue(slice)\n      }\n    },\n    function flush (end) {\n      if (buffered.length) {\n        this.queue(buffered)\n        buffered = []\n      }\n\n      this.queue(null)\n    }\n  )\n}\n"]}