'use strict';var wellKnownSymbol=require('./well-known-symbol-d17f132e.js'),normalizeComponent=require('./normalize-component-ebe0c011.js'),regexpFlags=require('./regexp-flags-cc8e8e8b.js');var TO_STRING = 'toString';
var RegExpPrototype = RegExp.prototype;
var nativeToString = RegExpPrototype[TO_STRING];

var NOT_GENERIC = normalizeComponent.f(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
// FF44- RegExp#toString has a wrong name
var INCORRECT_NAME = nativeToString.name != TO_STRING;

// `RegExp.prototype.toString` method
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
if (NOT_GENERIC || INCORRECT_NAME) {
  wellKnownSymbol.b(RegExp.prototype, TO_STRING, function toString() {
    var R = normalizeComponent.a(this);
    var p = String(R.source);
    var rf = R.flags;
    var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.r.call(R) : rf);
    return '/' + p + '/' + f;
  }, { unsafe: true });
}