{"version":3,"file":"polyfills/withResolvers.mjs","sources":["webpack://@agent-infra/browser/./src/polyfills/withResolvers.ts"],"sourcesContent":["/*\n * Copyright (c) 2025 Bytedance, Inc. and its affiliates.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nif (typeof Promise.withResolvers !== 'function') {\n  Promise.withResolvers = function <T>(): {\n    promise: Promise<T>;\n    resolve: (value: T | PromiseLike<T>) => void;\n    reject: (reason?: any) => void;\n  } {\n    let resolveFn: (value: T | PromiseLike<T>) => void;\n    let rejectFn: (reason?: any) => void;\n    const newPromise = new Promise<T>((resolve, reject) => {\n      resolveFn = resolve;\n      rejectFn = reject;\n    });\n    return {\n      promise: newPromise,\n      resolve: resolveFn!,\n      reject: rejectFn!,\n    };\n  };\n}\n\nexport {};\n"],"names":["Promise","resolveFn","rejectFn","newPromise","resolve","reject"],"mappings":";;;;AAKA,IAAI,AAAiC,cAAjC,OAAOA,QAAQ,aAAa,EAC9BA,QAAQ,aAAa,GAAG;IAKtB,IAAIC;IACJ,IAAIC;IACJ,MAAMC,aAAa,IAAIH,QAAW,CAACI,SAASC;QAC1CJ,YAAYG;QACZF,WAAWG;IACb;IACA,OAAO;QACL,SAASF;QACT,SAASF;QACT,QAAQC;IACV;AACF"}