src/vs/editor/common/modelLineProjectionData.ts/ModelLineProjectionData/offsetInInputWithInjectionsToOutputPosition
class ModelLineProjectionData:	private offsetInInputWithInjectionsToOutputPosition(offsetInInputWithInjections: number, affinity: PositionAffinity = PositionAffinity.None): OutputPosition {
		let low = 0;
		let high = this.breakOffsets.length - 1;
		let mid = 0;
		let midStart = 0;

		while (low <= high) {
			mid = low + ((high - low) / 2) | 0;

			const midStop = this.breakOffsets[mid];
			midStart = mid > 0 ? this.breakOffsets[mid - 1] : 0;

			if (affinity === PositionAffinity.Left) {
				if (offsetInInputWithInjections <= midStart) {
					high = mid - 1;
				} else if (offsetInInputWithInjections > midStop) {
					low = mid + 1;
				} else {
					break;
				}
			} else {
				if (offsetInInputWithInjections < midStart) {
					high = mid - 1;
				} else if (offsetInInputWithInjections >= midStop) {
					low = mid + 1;
				} else {
					break;
				}
			}
		}

		let outputOffset = offsetInInputWithInjections - midStart;
		if (mid > 0) {
			outputOffset += this.wrappedTextIndentLength;
		}

		return new OutputPosition(mid, outputOffset);
	}