{"version":3,"sources":["jsdelivr-header.js","/npm/simple-replace-stream@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,OAAS,QAAQ,UAEvB,MAAM,sBAAsB,OAAO,UAE/B,WAAA,CAAY,GACR,QACA,KAAK,UAAY,GACjB,KAAK,SAAS,EAAQ,SACtB,KAAK,YAAY,EAAQ,WAC7B,CAEA,UAAA,CAAW,EAAM,EAAS,GAEtB,IAAI,GADJ,EAAM,KAAK,UAAU,GACF,MAAM,KAAK,UAC1B,EAAY,EAAO,EAAO,OAAO,GACjC,EAAe,KAAK,SAAS,OAAO,EACxC,KAAK,UAAY,EAAU,OAAO,GAClC,EAAO,EAAO,OAAO,GAAG,EAAU,MAAM,GAAG,GAC3C,KAAK,KAAK,EAAO,KAAK,KAAK,cAC3B,GACJ,CAEA,MAAA,CAAO,GACH,KAAK,KAAK,KAAK,WACf,GACJ,EAGJ,OAAO,QAAU","file":"/npm/simple-replace-stream@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/simple-replace-stream@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","const stream = require('stream')\n\nclass replaceStream extends stream.Transform{\n\n    constructor(options){\n        super()\n        this.tailPiece = ''\n        this.key_find=options.key_find\n        this.key_replace=options.key_replace\n    }\n\n    _transform(chunk,encoding,done){\n        chunk=this.tailPiece+chunk\n        let pieces = chunk.split(this.key_find)\n        let lastPiece = pieces[pieces.length-1]\n        let tailPieceLen = this.key_find.length-1\n        this.tailPiece = lastPiece.slice(-tailPieceLen)\n        pieces[pieces.length-1]=lastPiece.slice(0,-tailPieceLen)\n        this.push(pieces.join(this.key_replace))\n        done();\n    }\n\n    _flush(done){\n        this.push(this.tailPiece)\n        done()\n    }\n}\n\nmodule.exports = replaceStream\n"]}