Edit: /tmp/tsx-0/17887-662f2d72f6799baf62bdffa05ce27f078d141b6c (3579B)
{"code":"__filename=\"/opt/canhelp/node_modules/jose/dist/webapi/lib/deflate.js\";(()=>{\nvar __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __name=(target,value)=>__defProp(target,\"name\",{value,configurable:true});var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from===\"object\"||typeof from===\"function\"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},\"__esModule\",{value:true}),mod);var deflate_exports={};__export(deflate_exports,{compress:()=>compress,decompress:()=>decompress});module.exports=__toCommonJS(deflate_exports);var import_errors=require(\"../util/errors.js\");var import_buffer_utils=require(\"./buffer_utils.js\");function supported(name){if(typeof globalThis[name]===\"undefined\"){throw new import_errors.JOSENotSupported(`JWE \"zip\" (Compression Algorithm) Header Parameter requires the ${name} API.`)}}__name(supported,\"supported\");async function compress(input){supported(\"CompressionStream\");const cs=new CompressionStream(\"deflate-raw\");const writer=cs.writable.getWriter();writer.write(input).catch(()=>{});writer.close().catch(()=>{});const chunks=[];const reader=cs.readable.getReader();for(;;){const{value,done}=await reader.read();if(done)break;chunks.push(value)}return(0,import_buffer_utils.concat)(...chunks)}__name(compress,\"compress\");async function decompress(input,maxLength){supported(\"DecompressionStream\");const ds=new DecompressionStream(\"deflate-raw\");const writer=ds.writable.getWriter();writer.write(input).catch(()=>{});writer.close().catch(()=>{});const chunks=[];let length=0;const reader=ds.readable.getReader();for(;;){const{value,done}=await reader.read();if(done)break;chunks.push(value);length+=value.byteLength;if(maxLength!==Infinity&&length>maxLength){throw new import_errors.JWEInvalid(\"Decompressed plaintext exceeded the configured limit\")}}return(0,import_buffer_utils.concat)(...chunks)}__name(decompress,\"decompress\");0&&(module.exports={compress,decompress});\n})()\n","warnings":[],"map":{"version":3,"mappings":";suBAAA,kKAA6C,6BAC7C,wBAAuB,6BACvB,SAAS,UAAU,KAAM,CACrB,GAAI,OAAO,WAAW,IAAI,IAAM,YAAa,CACzC,MAAM,IAAI,+BAAiB,mEAAmE,IAAI,OAAO,CAC7G,CACJ,CAJS,8BAKT,eAAsB,SAAS,MAAO,CAClC,UAAU,mBAAmB,EAC7B,MAAM,GAAK,IAAI,kBAAkB,aAAa,EAC9C,MAAM,OAAS,GAAG,SAAS,UAAU,EACrC,OAAO,MAAM,KAAK,EAAE,MAAM,IAAM,CAAE,CAAC,EACnC,OAAO,MAAM,EAAE,MAAM,IAAM,CAAE,CAAC,EAC9B,MAAM,OAAS,CAAC,EAChB,MAAM,OAAS,GAAG,SAAS,UAAU,EACrC,OAAS,CACL,KAAM,CAAE,MAAO,IAAK,EAAI,MAAM,OAAO,KAAK,EAC1C,GAAI,KACA,MACJ,OAAO,KAAK,KAAK,CACrB,CACA,SAAO,4BAAO,GAAG,MAAM,CAC3B,CAfsB,4BAgBtB,eAAsB,WAAW,MAAO,UAAW,CAC/C,UAAU,qBAAqB,EAC/B,MAAM,GAAK,IAAI,oBAAoB,aAAa,EAChD,MAAM,OAAS,GAAG,SAAS,UAAU,EACrC,OAAO,MAAM,KAAK,EAAE,MAAM,IAAM,CAAE,CAAC,EACnC,OAAO,MAAM,EAAE,MAAM,IAAM,CAAE,CAAC,EAC9B,MAAM,OAAS,CAAC,EAChB,IAAI,OAAS,EACb,MAAM,OAAS,GAAG,SAAS,UAAU,EACrC,OAAS,CACL,KAAM,CAAE,MAAO,IAAK,EAAI,MAAM,OAAO,KAAK,EAC1C,GAAI,KACA,MACJ,OAAO,KAAK,KAAK,EACjB,QAAU,MAAM,WAChB,GAAI,YAAc,UAAY,OAAS,UAAW,CAC9C,MAAM,IAAI,yBAAW,sDAAsD,CAC/E,CACJ,CACA,SAAO,4BAAO,GAAG,MAAM,CAC3B,CApBsB","names":[],"ignoreList":[],"sources":["/opt/canhelp/node_modules/jose/dist/webapi/lib/deflate.js"],"sourcesContent":[null]}}