1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
|
{"version":3,"sources":["../../src/server/image-optimizer.ts"],"names":["createHash","promises","cpus","mediaType","bold","yellow","contentDisposition","getOrientation","Orientation","imageSizeOf","isAnimated","join","nodeUrl","getImageBlurSvg","hasMatch","createRequestResponseMocks","sendEtagResponse","getContentType","getExtension","AVIF","WEBP","PNG","JPEG","GIF","SVG","ICO","CACHE_VERSION","ANIMATABLE_TYPES","VECTOR_TYPES","BLUR_IMG_SIZE","BLUR_QUALITY","sharp","require","process","env","NEXT_SHARP_PATH","concurrency","divisor","NODE_ENV","Math","floor","max","length","e","showSharpMissingWarning","getSupportedMimeType","options","accept","mimeType","includes","getHash","items","hash","item","update","String","digest","replace","writeToCacheDir","dir","extension","maxAge","expireAt","buffer","etag","filename","rm","recursive","force","catch","mkdir","writeFile","detectContentType","every","b","i","ImageOptimizerCache","validateParams","req","query","nextConfig","isDev","imageData","images","deviceSizes","imageSizes","domains","minimumCacheTTL","formats","remotePatterns","url","w","q","href","errorMessage","Array","isArray","isAbsolute","startsWith","hrefParsed","URL","toString","_error","protocol","width","parseInt","isNaN","sizes","push","isValidSize","quality","headers","isStatic","basePath","getCacheKey","constructor","distDir","cacheDir","get","cacheKey","files","readdir","now","Date","file","maxAgeSt","expireAtSt","split","readFile","Number","value","kind","revalidateAfter","curRevalidate","isStale","_","set","revalidate","Error","err","console","error","ImageError","statusCode","message","parseCacheControl","str","map","Map","directive","key","trim","toLowerCase","getMaxAge","age","endsWith","slice","n","optimizeImage","contentType","height","nextConfigOutput","optimizedBuffer","transformer","sequentialRead","rotate","resize","undefined","withoutEnlargement","avif","avifQuality","chromaSubsampling","warn","webp","png","jpeg","toBuffer","orientation","operations","RIGHT_TOP","type","numRotations","BOTTOM_RIGHT","LEFT_BOTTOM","processBuffer","imageOptimizer","_req","_res","paramsResult","handleRequest","upstreamBuffer","upstreamType","upstreamRes","fetch","ok","status","Buffer","from","arrayBuffer","mocked","method","socket","res","parse","hasStreamed","concat","buffers","getHeader","cacheControl","dangerouslyAllowSVG","vector","animate","output","getMetadata","meta","opts","blurWidth","blurHeight","blurDataURL","unescape","getFileNameWithExtension","urlWithoutQueryParams","fileNameWithExtension","pop","fileName","setResponseHeaders","xCache","imagesConfig","setHeader","finished","contentDispositionType","contentSecurityPolicy","sendResponse","result","byteLength","end","getImageSize","metadata","decodeBuffer"],"mappings":"AAAA,SAASA,UAAU,QAAQ,SAAQ;AACnC,SAASC,QAAQ,QAAQ,KAAI;AAC7B,SAASC,IAAI,QAAQ,KAAI;AAEzB,SAASC,SAAS,QAAQ,kCAAiC;AAC3D,SAASC,IAAI,EAAEC,MAAM,QAAQ,oBAAmB;AAChD,OAAOC,wBAAwB,yCAAwC;AACvE,SAASC,cAAc,EAAEC,WAAW,QAAQ,qCAAoC;AAChF,OAAOC,iBAAiB,gCAA+B;AACvD,OAAOC,gBAAgB,iCAAgC;AACvD,SAASC,IAAI,QAAQ,OAAM;AAC3B,OAAOC,aAA0C,MAAK;AAEtD,SAASC,eAAe,QAAQ,+BAA8B;AAE9D,SAASC,QAAQ,QAAQ,qCAAoC;AAE7D,SAASC,0BAA0B,QAAQ,qBAAoB;AAW/D,SAASC,gBAAgB,QAAQ,iBAAgB;AACjD,SAASC,cAAc,EAAEC,YAAY,QAAQ,iBAAgB;AAI7D,MAAMC,OAAO;AACb,MAAMC,OAAO;AACb,MAAMC,MAAM;AACZ,MAAMC,OAAO;AACb,MAAMC,MAAM;AACZ,MAAMC,MAAM;AACZ,MAAMC,MAAM;AACZ,MAAMC,gBAAgB;AACtB,MAAMC,mBAAmB;IAACP;IAAMC;IAAKE;CAAI;AACzC,MAAMK,eAAe;IAACJ;CAAI;AAC1B,MAAMK,gBAAgB,EAAE,mCAAmC;;AAC3D,MAAMC,eAAe,GAAG,mCAAmC;;AAE3D,IAAIC;AAEJ,IAAI;IACFA,QAAQC,QAAQC,QAAQC,GAAG,CAACC,eAAe,IAAI;IAC/C,IAAIJ,SAASA,MAAMK,WAA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