{"version":3,"sources":["../../../../src/server/lib/squoosh/main.ts"],"names":["getMetadata","processBuffer","decodeBuffer","getWorker","execOnce","Worker","path","resolve","__dirname","enableWorkerThreads","numWorkers","Math","max","min","cpus","length","computeWorkerKey","method","buffer","worker","width","height","operations","encoding","quality","imageData","operation","type","rotate","numRotations","opt","image","resize","Buffer","from","encodeJpeg","encodeWebp","avifQuality","encodeAvif","encodePng","Error"],"mappings":";;;;;;;;;;;;;;;;IA8BsBA,WAAW;eAAXA;;IAQAC,aAAa;eAAbA;;IAsDAC,YAAY;eAAZA;;;4BA5FC;8DACD;uBACG;oBACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBrB,MAAMC,YAAYC,IAAAA,eAAQ,EACxB,IACE,IAAIC,kBAAM,CAACC,MAAKC,OAAO,CAACC,WAAW,SAAS;QAC1CC,qBAAqB;QACrB,qEAAqE;QACrE,6BAA6B;QAC7BC,YAAYC,KAAKC,GAAG,CAAC,GAAGD,KAAKE,GAAG,CAACC,IAAAA,QAAI,IAAGC,MAAM,GAAG,GAAG;QACpDC,kBAAkB,CAACC,SAAWA;IAChC;AAGG,eAAejB,YACpBkB,MAAc;IAEd,MAAMC,SAAkChB;IACxC,MAAM,EAAEiB,KAAK,EAAEC,MAAM,EAAE,GAAG,MAAMF,OAAOjB,YAAY,CAACgB;IACpD,OAAO;QAAEE;QAAOC;IAAO;AACzB;AAEO,eAAepB,cACpBiB,MAAc,EACdI,UAAuB,EACvBC,QAAkB,EAClBC,OAAe;IAEf,MAAML,SAAkChB;IAExC,IAAIsB,YAAY,MAAMN,OAAOjB,YAAY,CAACgB;IAC1C,KAAK,MAAMQ,aAAaJ,WAAY;QAClC,IAAII,UAAUC,IAAI,KAAK,UAAU;YAC/BF,YAAY,MAAMN,OAAOS,MAAM,CAACH,WAAWC,UAAUG,YAAY;QACnE,OAAO,IAAIH,UAAUC,IAAI,KAAK,UAAU;YACtC,MAAMG,MAAM;gBAAEC,OAAON;gBAAW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