first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1,926 @@
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["login"],{
/***/ "14c3":
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__("c6b6");
var regexpExec = __webpack_require__("9263");
// `RegExpExec` abstract operation
// https://tc39.github.io/ecma262/#sec-regexpexec
module.exports = function (R, S) {
var exec = R.exec;
if (typeof exec === 'function') {
var result = exec.call(R, S);
if (typeof result !== 'object') {
throw TypeError('RegExp exec method returned something other than an Object or null');
}
return result;
}
if (classof(R) !== 'RegExp') {
throw TypeError('RegExp#exec called on incompatible receiver');
}
return regexpExec.call(R, S);
};
/***/ }),
/***/ "2638":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var normalMerge=["attrs","props","domProps"],toArrayMerge=["class","style","directives"],functionalMerge=["on","nativeOn"],mergeJsxProps=function(a){return a.reduce(function(c,a){for(var b in a)if(!c[b])c[b]=a[b];else if(-1!==normalMerge.indexOf(b))c[b]=_extends({},c[b],a[b]);else if(-1!==toArrayMerge.indexOf(b)){var d=c[b]instanceof Array?c[b]:[c[b]],e=a[b]instanceof Array?a[b]:[a[b]];c[b]=d.concat(e)}else if(-1!==functionalMerge.indexOf(b)){for(var f in a[b])if(c[b][f]){var g=c[b][f]instanceof Array?c[b][f]:[c[b][f]],h=a[b][f]instanceof Array?a[b][f]:[a[b][f]];c[b][f]=g.concat(h)}else c[b][f]=a[b][f];}else if("hook"==b)for(var i in a[b])c[b][i]=c[b][i]?mergeFn(c[b][i],a[b][i]):a[b][i];else c[b]=a[b];return c},{})},mergeFn=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments)}};module.exports=mergeJsxProps;
/***/ }),
/***/ "463b":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return BaseLogic; });
/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("96cf");
/* harmony import */ var regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(regenerator_runtime_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Users_bmy_Desktop_TsxVueClassApi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("1da1");
/* harmony import */ var _Users_bmy_Desktop_TsxVueClassApi_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d4ec");
/* harmony import */ var _Users_bmy_Desktop_TsxVueClassApi_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("bee2");
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("9ab4");
/* harmony import */ var _ann_Ioc_annotation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("4771");
/* harmony import */ var _impl_User_service_impl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("32f6");
/*
* Copyright (c) 2020. bmy
*/
var _a;
/**
* logic 层的父类
* 主要实现 页面公共参数和ajax方法的地方
*/
var BaseLogic = /*#__PURE__*/function () {
function BaseLogic() {
Object(_Users_bmy_Desktop_TsxVueClassApi_node_modules_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(this, BaseLogic);
this.page = 1;
this.total_page = 1;
this.count = 10; // 请求参数
this.PageParams = {
limit: 10,
page: 1
};
}
/**
* 【页面中公共的多次被用到的接口】可以在这个父类中定义,
* 子类logic中直接使用避免方法的冗余
* @constructor
*/
Object(_Users_bmy_Desktop_TsxVueClassApi_node_modules_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(BaseLogic, [{
key: "DepartmentListRequest",
value: function () {
var _DepartmentListRequest = Object(_Users_bmy_Desktop_TsxVueClassApi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
case "end":
return _context.stop();
}
}
}, _callee);
}));
function DepartmentListRequest() {
return _DepartmentListRequest.apply(this, arguments);
}
return DepartmentListRequest;
}()
}]);
return BaseLogic;
}();
Object(tslib__WEBPACK_IMPORTED_MODULE_4__[/* __decorate */ "a"])([Object(_ann_Ioc_annotation__WEBPACK_IMPORTED_MODULE_5__[/* Inject */ "a"])(), Object(tslib__WEBPACK_IMPORTED_MODULE_4__[/* __metadata */ "b"])("design:type", typeof (_a = typeof _impl_User_service_impl__WEBPACK_IMPORTED_MODULE_6__["UserServiceImpl"] !== "undefined" && _impl_User_service_impl__WEBPACK_IMPORTED_MODULE_6__["UserServiceImpl"]) === "function" ? _a : Object)], BaseLogic.prototype, "UserServiceImpl", void 0);
/***/ }),
/***/ "5319":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var anObject = __webpack_require__("825a");
var toObject = __webpack_require__("7b0b");
var toLength = __webpack_require__("50c4");
var toInteger = __webpack_require__("a691");
var requireObjectCoercible = __webpack_require__("1d80");
var advanceStringIndex = __webpack_require__("8aa5");
var regExpExec = __webpack_require__("14c3");
var max = Math.max;
var min = Math.min;
var floor = Math.floor;
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
var maybeToString = function (it) {
return it === undefined ? it : String(it);
};
// @@replace logic
fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
return [
// `String.prototype.replace` method
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
function replace(searchValue, replaceValue) {
var O = requireObjectCoercible(this);
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
return replacer !== undefined
? replacer.call(searchValue, O, replaceValue)
: nativeReplace.call(String(O), searchValue, replaceValue);
},
// `RegExp.prototype[@@replace]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
function (regexp, replaceValue) {
if (
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
(typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
) {
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
if (res.done) return res.value;
}
var rx = anObject(regexp);
var S = String(this);
var functionalReplace = typeof replaceValue === 'function';
if (!functionalReplace) replaceValue = String(replaceValue);
var global = rx.global;
if (global) {
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
}
var results = [];
while (true) {
var result = regExpExec(rx, S);
if (result === null) break;
results.push(result);
if (!global) break;
var matchStr = String(result[0]);
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
}
var accumulatedResult = '';
var nextSourcePosition = 0;
for (var i = 0; i < results.length; i++) {
result = results[i];
var matched = String(result[0]);
var position = max(min(toInteger(result.index), S.length), 0);
var captures = [];
// NOTE: This is equivalent to
// captures = result.slice(1).map(maybeToString)
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
var namedCaptures = result.groups;
if (functionalReplace) {
var replacerArgs = [matched].concat(captures, position, S);
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
var replacement = String(replaceValue.apply(undefined, replacerArgs));
} else {
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
}
if (position >= nextSourcePosition) {
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
nextSourcePosition = position + matched.length;
}
}
return accumulatedResult + S.slice(nextSourcePosition);
}
];
// https://tc39.github.io/ecma262/#sec-getsubstitution
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
var tailPos = position + matched.length;
var m = captures.length;
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
if (namedCaptures !== undefined) {
namedCaptures = toObject(namedCaptures);
symbols = SUBSTITUTION_SYMBOLS;
}
return nativeReplace.call(replacement, symbols, function (match, ch) {
var capture;
switch (ch.charAt(0)) {
case '$': return '$';
case '&': return matched;
case '`': return str.slice(0, position);
case "'": return str.slice(tailPos);
case '<':
capture = namedCaptures[ch.slice(1, -1)];
break;
default: // \d\d?
var n = +ch;
if (n === 0) return match;
if (n > m) {
var f = floor(n / 10);
if (f === 0) return match;
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
return match;
}
capture = captures[n - 1];
}
return capture === undefined ? '' : capture;
});
}
});
/***/ }),
/***/ "7698":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");
// EXTERNAL MODULE: ./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js
var helper = __webpack_require__("2638");
var helper_default = /*#__PURE__*/__webpack_require__.n(helper);
// EXTERNAL MODULE: ./node_modules/regenerator-runtime/runtime.js
var runtime = __webpack_require__("96cf");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("1da1");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("d4ec");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("bee2");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("257e");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
var inherits = __webpack_require__("262e");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 4 modules
var createSuper = __webpack_require__("2caf");
// EXTERNAL MODULE: ./node_modules/tslib/tslib.es6.js
var tslib_es6 = __webpack_require__("9ab4");
// EXTERNAL MODULE: ./src/application/assets/less/page/Login.less
var page_Login = __webpack_require__("ce7c");
// EXTERNAL MODULE: ./node_modules/vue-property-decorator/lib/vue-property-decorator.js
var vue_property_decorator = __webpack_require__("60a3");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
var es_regexp_exec = __webpack_require__("ac1f");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
var es_string_replace = __webpack_require__("5319");
// EXTERNAL MODULE: ./src/application/logic/Base.logic.ts
var Base_logic = __webpack_require__("463b");
// EXTERNAL MODULE: ./src/core/annotation/Ioc.annotation.ts + 1 modules
var Ioc_annotation = __webpack_require__("4771");
// EXTERNAL MODULE: ./src/core/service/impl/User.service.impl.ts
var User_service_impl = __webpack_require__("32f6");
// CONCATENATED MODULE: ./src/application/logic/page/Login.logic.ts
var _a;
var Login_logic_LoginLogic = /*#__PURE__*/function (_BaseLogic) {
Object(inherits["a" /* default */])(LoginLogic, _BaseLogic);
var _super = Object(createSuper["a" /* default */])(LoginLogic);
function LoginLogic(point) {
var _this;
Object(classCallCheck["a" /* default */])(this, LoginLogic);
_this = _super.call(this);
_this.Banner = [{
img: './img/Main.svg',
title: '欢迎登录萌弧App管理后台'
}, {
img: './img/Normal.svg',
title: '您可以输入账号密码进行登录'
}, {
img: './img/Engineer.svg',
title: '或者注册一个新的管理员账号'
}];
_this.UserLoginParams = {
admin_user_name: "moehu",
admin_user_pwd: "111"
};
_this._ = point;
return _this;
}
Object(createClass["a" /* default */])(LoginLogic, [{
key: "StartUp",
value: function () {
var _StartUp = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
case "end":
return _context.stop();
}
}
}, _callee);
}));
function StartUp() {
return _StartUp.apply(this, arguments);
}
return StartUp;
}()
}, {
key: "UserLogin",
value: function () {
var _UserLogin = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
var res;
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return this.UserServiceImpl.Login(this.UserLoginParams);
case 2:
res = _context2.sent;
this._.$setStorage('token', res.user_token);
this._.$setStorage('user_info', res.user_info);
this._.$router.replace("/home");
case 6:
case "end":
return _context2.stop();
}
}
}, _callee2, this);
}));
function UserLogin() {
return _UserLogin.apply(this, arguments);
}
return UserLogin;
}()
}]);
return LoginLogic;
}(Base_logic["a" /* BaseLogic */]);
Object(tslib_es6["a" /* __decorate */])([Object(Ioc_annotation["a" /* Inject */])(), Object(tslib_es6["b" /* __metadata */])("design:type", typeof (_a = typeof User_service_impl["UserServiceImpl"] !== "undefined" && User_service_impl["UserServiceImpl"]) === "function" ? _a : Object)], Login_logic_LoginLogic.prototype, "UserServiceImpl", void 0);
// EXTERNAL MODULE: ./src/application/layout/base.layout.ts
var base_layout = __webpack_require__("cb9f");
// CONCATENATED MODULE: ./src/application/page/login.tsx
var login_Login = /*#__PURE__*/function (_VueType) {
Object(inherits["a" /* default */])(Login, _VueType);
var _super = Object(createSuper["a" /* default */])(Login);
function Login() {
var _this;
Object(classCallCheck["a" /* default */])(this, Login);
_this = _super.apply(this, arguments);
_this.service = new Login_logic_LoginLogic(Object(assertThisInitialized["a" /* default */])(_this));
_this.RouterMeta = {
title: '用户登录',
isLogin: false
};
return _this;
}
Object(createClass["a" /* default */])(Login, [{
key: "created",
value: function () {
var _created = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return this.service.StartUp();
case 2:
case "end":
return _context.stop();
}
}
}, _callee, this);
}));
function created() {
return _created.apply(this, arguments);
}
return created;
}()
}, {
key: "beforeRouteEnter",
// 路由拦截器
value: function beforeRouteEnter(to, from, next) {
next();
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var h = arguments[0];
return h("div", {
"class": "login"
}, [h("div", {
"class": "login_img"
}, [h("div", {
"class": "circular"
}), h("el-carousel", {
"attrs": {
"autoplay": false,
"height": "340px"
},
"class": "banner"
}, [this.service.Banner.map(function (v, i) {
return h("el-carousel-item", [h("img", {
"attrs": {
"src": v.img,
"alt": ""
}
}), h("div", {
"class": "banner_title"
}, [v.title])]);
})])]), h("div", {
"class": "login_input"
}, [h("div", {
"class": "center"
}, [h("div", {
"class": "login_text"
}, ["\u767B\u5F55", h("small", ["\u6B64\u9875\u9762\u5DF2\u52A0\u5BC6"])]), h("div", {
"class": "login_form"
}, [h("input", helper_default()([{
"on": {
"input": function input($event) {
if ($event.target.composing) return;
_this2.$set(_this2.service.UserLoginParams, "admin_user_name", $event.target.value);
}
},
"attrs": {
"type": "text",
"placeholder": "账户名"
},
"domProps": {
"value": _this2.service.UserLoginParams.admin_user_name
}
}, {
directives: [{
name: "model",
value: _this2.service.UserLoginParams.admin_user_name,
modifiers: {}
}]
}])), h("input", helper_default()([{
"on": {
"input": function input($event) {
if ($event.target.composing) return;
_this2.$set(_this2.service.UserLoginParams, "admin_user_pwd", $event.target.value);
}
},
"attrs": {
"type": "password",
"placeholder": "密码"
},
"domProps": {
"value": _this2.service.UserLoginParams.admin_user_pwd
}
}, {
directives: [{
name: "model",
value: _this2.service.UserLoginParams.admin_user_pwd,
modifiers: {}
}]
}])), h("div", {
"class": "LoginSubmit"
}, [h("div", {
"class": "login_button",
"on": {
"click": function click() {
return _this2.service.UserLogin();
}
}
}, ["\u767B \u5F55", h("i", {
"class": "el-icon-right"
})]), h("div", {
"class": "reg_text"
}, ["\u8FD8\u6CA1\u6709\u8D26\u6237\uFF1F", h("span", [" \u6CE8\u518C"])])]), h("i")])])])]);
}
}]);
return Login;
}(base_layout["a" /* VueType */]);
login_Login = Object(tslib_es6["a" /* __decorate */])([vue_property_decorator["a" /* Component */]], login_Login);
/* harmony default export */ var login = __webpack_exports__["default"] = (login_Login);
/***/ }),
/***/ "8aa5":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var charAt = __webpack_require__("6547").charAt;
// `AdvanceStringIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
return index + (unicode ? charAt(S, index).length : 1);
};
/***/ }),
/***/ "9263":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var regexpFlags = __webpack_require__("ad6d");
var stickyHelpers = __webpack_require__("9f7f");
var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;
var patchedExec = nativeExec;
var UPDATES_LAST_INDEX_WRONG = (function () {
var re1 = /a/;
var re2 = /b*/g;
nativeExec.call(re1, 'a');
nativeExec.call(re2, 'a');
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
})();
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
if (PATCH) {
patchedExec = function exec(str) {
var re = this;
var lastIndex, reCopy, match, i;
var sticky = UNSUPPORTED_Y && re.sticky;
var flags = regexpFlags.call(re);
var source = re.source;
var charsAdded = 0;
var strCopy = str;
if (sticky) {
flags = flags.replace('y', '');
if (flags.indexOf('g') === -1) {
flags += 'g';
}
strCopy = String(str).slice(re.lastIndex);
// Support anchored sticky behavior.
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
source = '(?: ' + source + ')';
strCopy = ' ' + strCopy;
charsAdded++;
}
// ^(? + rx + ) is needed, in combination with some str slicing, to
// simulate the 'y' flag.
reCopy = new RegExp('^(?:' + source + ')', flags);
}
if (NPCG_INCLUDED) {
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
}
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
match = nativeExec.call(sticky ? reCopy : re, strCopy);
if (sticky) {
if (match) {
match.input = match.input.slice(charsAdded);
match[0] = match[0].slice(charsAdded);
match.index = re.lastIndex;
re.lastIndex += match[0].length;
} else re.lastIndex = 0;
} else if (UPDATES_LAST_INDEX_WRONG && match) {
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
}
if (NPCG_INCLUDED && match && match.length > 1) {
// Fix browsers whose `exec` methods don't consistently return `undefined`
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
nativeReplace.call(match[0], reCopy, function () {
for (i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined) match[i] = undefined;
}
});
}
return match;
};
}
module.exports = patchedExec;
/***/ }),
/***/ "9f7f":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__("d039");
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
// so we use an intermediate function.
function RE(s, f) {
return RegExp(s, f);
}
exports.UNSUPPORTED_Y = fails(function () {
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
var re = RE('a', 'y');
re.lastIndex = 2;
return re.exec('abcd') != null;
});
exports.BROKEN_CARET = fails(function () {
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
var re = RE('^r', 'gy');
re.lastIndex = 2;
return re.exec('str') != null;
});
/***/ }),
/***/ "ac1f":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__("23e7");
var exec = __webpack_require__("9263");
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
exec: exec
});
/***/ }),
/***/ "ce7c":
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "d784":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4` since it's moved to entry points
__webpack_require__("ac1f");
var redefine = __webpack_require__("6eeb");
var fails = __webpack_require__("d039");
var wellKnownSymbol = __webpack_require__("b622");
var regexpExec = __webpack_require__("9263");
var createNonEnumerableProperty = __webpack_require__("9112");
var SPECIES = wellKnownSymbol('species');
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
// #replace needs built-in support for named groups.
// #match works fine because it just return the exec results, even if it has
// a "grops" property.
var re = /./;
re.exec = function () {
var result = [];
result.groups = { a: '7' };
return result;
};
return ''.replace(re, '$<a>') !== '7';
});
// IE <= 11 replaces $0 with the whole match, as if it was $&
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
var REPLACE_KEEPS_$0 = (function () {
return 'a'.replace(/./, '$0') === '$0';
})();
var REPLACE = wellKnownSymbol('replace');
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
if (/./[REPLACE]) {
return /./[REPLACE]('a', '$0') === '';
}
return false;
})();
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
var re = /(?:)/;
var originalExec = re.exec;
re.exec = function () { return originalExec.apply(this, arguments); };
var result = 'ab'.split(re);
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
});
module.exports = function (KEY, length, exec, sham) {
var SYMBOL = wellKnownSymbol(KEY);
var DELEGATES_TO_SYMBOL = !fails(function () {
// String methods call symbol-named RegEp methods
var O = {};
O[SYMBOL] = function () { return 7; };
return ''[KEY](O) != 7;
});
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
// Symbol-named RegExp methods call .exec
var execCalled = false;
var re = /a/;
if (KEY === 'split') {
// We can't use real regex here since it causes deoptimization
// and serious performance degradation in V8
// https://github.com/zloirock/core-js/issues/306
re = {};
// RegExp[@@split] doesn't call the regex's exec method, but first creates
// a new one. We need to return the patched regex when creating the new one.
re.constructor = {};
re.constructor[SPECIES] = function () { return re; };
re.flags = '';
re[SYMBOL] = /./[SYMBOL];
}
re.exec = function () { execCalled = true; return null; };
re[SYMBOL]('');
return !execCalled;
});
if (
!DELEGATES_TO_SYMBOL ||
!DELEGATES_TO_EXEC ||
(KEY === 'replace' && !(
REPLACE_SUPPORTS_NAMED_GROUPS &&
REPLACE_KEEPS_$0 &&
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
)) ||
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
) {
var nativeRegExpMethod = /./[SYMBOL];
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
if (regexp.exec === regexpExec) {
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
// The native String method already delegates to @@method (this
// polyfilled function), leasing to infinite recursion.
// We avoid it by directly calling the native @@method method.
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
}
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
}
return { done: false };
}, {
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
});
var stringMethod = methods[0];
var regexMethod = methods[1];
redefine(String.prototype, KEY, stringMethod);
redefine(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
? function (string, arg) { return regexMethod.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
: function (string) { return regexMethod.call(string, this); }
);
}
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
};
/***/ }),
/***/ "d81d":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__("23e7");
var $map = __webpack_require__("b727").map;
var arrayMethodHasSpeciesSupport = __webpack_require__("1dde");
var arrayMethodUsesToLength = __webpack_require__("ae40");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
// FF49- issue
var USES_TO_LENGTH = arrayMethodUsesToLength('map');
// `Array.prototype.map` method
// https://tc39.github.io/ecma262/#sec-array.prototype.map
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
map: function map(callbackfn /* , thisArg */) {
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ })
}]);