"use strict";exports.__esModule=true;exports.default=void 0;var _loaderUtils=require("next/dist/compiled/loader-utils");var _trace=require("../../../telemetry/trace");var _transform=_interopRequireDefault(require("./transform"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}async function nextBabelLoader(parentTrace,inputSource,inputSourceMap){const filename=this.resourcePath;const target=this.target;const loaderOptions=parentTrace.traceChild('get-options').traceFn(()=>(0,_loaderUtils.getOptions)(this));const loaderSpanInner=parentTrace.traceChild('next-babel-turbo-transform');const{code:transformedSource,map:outputSourceMap}=loaderSpanInner.traceFn(()=>_transform.default.call(this,inputSource,inputSourceMap,loaderOptions,filename,target,loaderSpanInner));return[transformedSource,outputSourceMap];}const nextBabelLoaderOuter=function nextBabelLoaderOuter(inputSource,inputSourceMap){var _this$currentTraceSpa;const callback=this.async();const loaderSpan=(0,_trace.trace)('next-babel-turbo-loader',(_this$currentTraceSpa=this.currentTraceSpan)==null?void 0:_this$currentTraceSpa.id);loaderSpan.traceAsyncFn(()=>nextBabelLoader.call(this,loaderSpan,inputSource,inputSourceMap)).then(([transformedSource,outputSourceMap])=>callback==null?void 0:callback(null,transformedSource,outputSourceMap||inputSourceMap),err=>{callback==null?void 0:callback(err);});};var _default=nextBabelLoaderOuter;exports.default=_default;
//# sourceMappingURL=index.js.map