// Generated by IcedCoffeeScript 1.8.0-c
(function() {
  var base64_extract;

  exports.base64_extract = base64_extract = function(text) {
    var b64x, curr, hit_b64, hit_non_b64, out, state, tok, tokens, _i, _len;
    b64x = /^[a-zA-Z0-9/+_-]+(=*)$/;
    tokens = text.split(/\s+/);
    state = 0;
    out = [];
    curr = [];
    hit_non_b64 = function() {
      if (curr.length) {
        out.push(curr.join(''));
        return curr = [];
      }
    };
    hit_b64 = function(tok) {
      return curr.push(tok);
    };
    for (_i = 0, _len = tokens.length; _i < _len; _i++) {
      tok = tokens[_i];
      if (tok.match(b64x)) {
        hit_b64(tok);
      } else {
        hit_non_b64();
      }
    }
    hit_non_b64();
    return out;
  };

}).call(this);
