bootstrap-table-addrbar.js 80 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  8. function _classCallCheck(instance, Constructor) {
  9. if (!(instance instanceof Constructor)) {
  10. throw new TypeError("Cannot call a class as a function");
  11. }
  12. }
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. Object.defineProperty(Constructor, "prototype", {
  26. writable: false
  27. });
  28. return Constructor;
  29. }
  30. function _inherits(subClass, superClass) {
  31. if (typeof superClass !== "function" && superClass !== null) {
  32. throw new TypeError("Super expression must either be null or a function");
  33. }
  34. subClass.prototype = Object.create(superClass && superClass.prototype, {
  35. constructor: {
  36. value: subClass,
  37. writable: true,
  38. configurable: true
  39. }
  40. });
  41. Object.defineProperty(subClass, "prototype", {
  42. writable: false
  43. });
  44. if (superClass) _setPrototypeOf(subClass, superClass);
  45. }
  46. function _getPrototypeOf(o) {
  47. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  48. return o.__proto__ || Object.getPrototypeOf(o);
  49. };
  50. return _getPrototypeOf(o);
  51. }
  52. function _setPrototypeOf(o, p) {
  53. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  54. o.__proto__ = p;
  55. return o;
  56. };
  57. return _setPrototypeOf(o, p);
  58. }
  59. function _isNativeReflectConstruct() {
  60. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  61. if (Reflect.construct.sham) return false;
  62. if (typeof Proxy === "function") return true;
  63. try {
  64. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  65. return true;
  66. } catch (e) {
  67. return false;
  68. }
  69. }
  70. function _assertThisInitialized(self) {
  71. if (self === void 0) {
  72. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  73. }
  74. return self;
  75. }
  76. function _possibleConstructorReturn(self, call) {
  77. if (call && (typeof call === "object" || typeof call === "function")) {
  78. return call;
  79. } else if (call !== void 0) {
  80. throw new TypeError("Derived constructors may only return object or undefined");
  81. }
  82. return _assertThisInitialized(self);
  83. }
  84. function _createSuper(Derived) {
  85. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  86. return function _createSuperInternal() {
  87. var Super = _getPrototypeOf(Derived),
  88. result;
  89. if (hasNativeReflectConstruct) {
  90. var NewTarget = _getPrototypeOf(this).constructor;
  91. result = Reflect.construct(Super, arguments, NewTarget);
  92. } else {
  93. result = Super.apply(this, arguments);
  94. }
  95. return _possibleConstructorReturn(this, result);
  96. };
  97. }
  98. function _superPropBase(object, property) {
  99. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  100. object = _getPrototypeOf(object);
  101. if (object === null) break;
  102. }
  103. return object;
  104. }
  105. function _get() {
  106. if (typeof Reflect !== "undefined" && Reflect.get) {
  107. _get = Reflect.get;
  108. } else {
  109. _get = function _get(target, property, receiver) {
  110. var base = _superPropBase(target, property);
  111. if (!base) return;
  112. var desc = Object.getOwnPropertyDescriptor(base, property);
  113. if (desc.get) {
  114. return desc.get.call(arguments.length < 3 ? target : receiver);
  115. }
  116. return desc.value;
  117. };
  118. }
  119. return _get.apply(this, arguments);
  120. }
  121. function _slicedToArray(arr, i) {
  122. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  123. }
  124. function _arrayWithHoles(arr) {
  125. if (Array.isArray(arr)) return arr;
  126. }
  127. function _iterableToArrayLimit(arr, i) {
  128. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  129. if (_i == null) return;
  130. var _arr = [];
  131. var _n = true;
  132. var _d = false;
  133. var _s, _e;
  134. try {
  135. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  136. _arr.push(_s.value);
  137. if (i && _arr.length === i) break;
  138. }
  139. } catch (err) {
  140. _d = true;
  141. _e = err;
  142. } finally {
  143. try {
  144. if (!_n && _i["return"] != null) _i["return"]();
  145. } finally {
  146. if (_d) throw _e;
  147. }
  148. }
  149. return _arr;
  150. }
  151. function _unsupportedIterableToArray(o, minLen) {
  152. if (!o) return;
  153. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  154. var n = Object.prototype.toString.call(o).slice(8, -1);
  155. if (n === "Object" && o.constructor) n = o.constructor.name;
  156. if (n === "Map" || n === "Set") return Array.from(o);
  157. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  158. }
  159. function _arrayLikeToArray(arr, len) {
  160. if (len == null || len > arr.length) len = arr.length;
  161. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  162. return arr2;
  163. }
  164. function _nonIterableRest() {
  165. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  166. }
  167. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  168. function createCommonjsModule(fn, module) {
  169. return module = { exports: {} }, fn(module, module.exports), module.exports;
  170. }
  171. var check = function (it) {
  172. return it && it.Math == Math && it;
  173. };
  174. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  175. var global_1 =
  176. // eslint-disable-next-line es-x/no-global-this -- safe
  177. check(typeof globalThis == 'object' && globalThis) ||
  178. check(typeof window == 'object' && window) ||
  179. // eslint-disable-next-line no-restricted-globals -- safe
  180. check(typeof self == 'object' && self) ||
  181. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  182. // eslint-disable-next-line no-new-func -- fallback
  183. (function () { return this; })() || Function('return this')();
  184. var fails = function (exec) {
  185. try {
  186. return !!exec();
  187. } catch (error) {
  188. return true;
  189. }
  190. };
  191. // Detect IE8's incomplete defineProperty implementation
  192. var descriptors = !fails(function () {
  193. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  194. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  195. });
  196. var functionBindNative = !fails(function () {
  197. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  198. var test = (function () { /* empty */ }).bind();
  199. // eslint-disable-next-line no-prototype-builtins -- safe
  200. return typeof test != 'function' || test.hasOwnProperty('prototype');
  201. });
  202. var call$2 = Function.prototype.call;
  203. var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
  204. return call$2.apply(call$2, arguments);
  205. };
  206. var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
  207. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  208. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  209. // Nashorn ~ JDK8 bug
  210. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
  211. // `Object.prototype.propertyIsEnumerable` method implementation
  212. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  213. var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  214. var descriptor = getOwnPropertyDescriptor$1(this, V);
  215. return !!descriptor && descriptor.enumerable;
  216. } : $propertyIsEnumerable$1;
  217. var objectPropertyIsEnumerable = {
  218. f: f$5
  219. };
  220. var createPropertyDescriptor = function (bitmap, value) {
  221. return {
  222. enumerable: !(bitmap & 1),
  223. configurable: !(bitmap & 2),
  224. writable: !(bitmap & 4),
  225. value: value
  226. };
  227. };
  228. var FunctionPrototype$2 = Function.prototype;
  229. var bind = FunctionPrototype$2.bind;
  230. var call$1 = FunctionPrototype$2.call;
  231. var uncurryThis = functionBindNative && bind.bind(call$1, call$1);
  232. var functionUncurryThis = functionBindNative ? function (fn) {
  233. return fn && uncurryThis(fn);
  234. } : function (fn) {
  235. return fn && function () {
  236. return call$1.apply(fn, arguments);
  237. };
  238. };
  239. var toString$1 = functionUncurryThis({}.toString);
  240. var stringSlice$5 = functionUncurryThis(''.slice);
  241. var classofRaw = function (it) {
  242. return stringSlice$5(toString$1(it), 8, -1);
  243. };
  244. var Object$4 = global_1.Object;
  245. var split = functionUncurryThis(''.split);
  246. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  247. var indexedObject = fails(function () {
  248. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  249. // eslint-disable-next-line no-prototype-builtins -- safe
  250. return !Object$4('z').propertyIsEnumerable(0);
  251. }) ? function (it) {
  252. return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
  253. } : Object$4;
  254. var TypeError$a = global_1.TypeError;
  255. // `RequireObjectCoercible` abstract operation
  256. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  257. var requireObjectCoercible = function (it) {
  258. if (it == undefined) throw TypeError$a("Can't call method on " + it);
  259. return it;
  260. };
  261. // toObject with fallback for non-array-like ES3 strings
  262. var toIndexedObject = function (it) {
  263. return indexedObject(requireObjectCoercible(it));
  264. };
  265. // `IsCallable` abstract operation
  266. // https://tc39.es/ecma262/#sec-iscallable
  267. var isCallable = function (argument) {
  268. return typeof argument == 'function';
  269. };
  270. var isObject = function (it) {
  271. return typeof it == 'object' ? it !== null : isCallable(it);
  272. };
  273. var aFunction = function (argument) {
  274. return isCallable(argument) ? argument : undefined;
  275. };
  276. var getBuiltIn = function (namespace, method) {
  277. return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
  278. };
  279. var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
  280. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  281. var process = global_1.process;
  282. var Deno = global_1.Deno;
  283. var versions = process && process.versions || Deno && Deno.version;
  284. var v8 = versions && versions.v8;
  285. var match, version;
  286. if (v8) {
  287. match = v8.split('.');
  288. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  289. // but their correct versions are not interesting for us
  290. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  291. }
  292. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  293. // so check `userAgent` even if `.v8` exists, but 0
  294. if (!version && engineUserAgent) {
  295. match = engineUserAgent.match(/Edge\/(\d+)/);
  296. if (!match || match[1] >= 74) {
  297. match = engineUserAgent.match(/Chrome\/(\d+)/);
  298. if (match) version = +match[1];
  299. }
  300. }
  301. var engineV8Version = version;
  302. /* eslint-disable es-x/no-symbol -- required for testing */
  303. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  304. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  305. var symbol = Symbol();
  306. // Chrome 38 Symbol has incorrect toString conversion
  307. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  308. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  309. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  310. !Symbol.sham && engineV8Version && engineV8Version < 41;
  311. });
  312. /* eslint-disable es-x/no-symbol -- required for testing */
  313. var useSymbolAsUid = nativeSymbol
  314. && !Symbol.sham
  315. && typeof Symbol.iterator == 'symbol';
  316. var Object$3 = global_1.Object;
  317. var isSymbol = useSymbolAsUid ? function (it) {
  318. return typeof it == 'symbol';
  319. } : function (it) {
  320. var $Symbol = getBuiltIn('Symbol');
  321. return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
  322. };
  323. var String$4 = global_1.String;
  324. var tryToString = function (argument) {
  325. try {
  326. return String$4(argument);
  327. } catch (error) {
  328. return 'Object';
  329. }
  330. };
  331. var TypeError$9 = global_1.TypeError;
  332. // `Assert: IsCallable(argument) is true`
  333. var aCallable = function (argument) {
  334. if (isCallable(argument)) return argument;
  335. throw TypeError$9(tryToString(argument) + ' is not a function');
  336. };
  337. // `GetMethod` abstract operation
  338. // https://tc39.es/ecma262/#sec-getmethod
  339. var getMethod = function (V, P) {
  340. var func = V[P];
  341. return func == null ? undefined : aCallable(func);
  342. };
  343. var TypeError$8 = global_1.TypeError;
  344. // `OrdinaryToPrimitive` abstract operation
  345. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  346. var ordinaryToPrimitive = function (input, pref) {
  347. var fn, val;
  348. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  349. if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
  350. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  351. throw TypeError$8("Can't convert object to primitive value");
  352. };
  353. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  354. var defineProperty$1 = Object.defineProperty;
  355. var setGlobal = function (key, value) {
  356. try {
  357. defineProperty$1(global_1, key, { value: value, configurable: true, writable: true });
  358. } catch (error) {
  359. global_1[key] = value;
  360. } return value;
  361. };
  362. var SHARED = '__core-js_shared__';
  363. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  364. var sharedStore = store$1;
  365. var shared = createCommonjsModule(function (module) {
  366. (module.exports = function (key, value) {
  367. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  368. })('versions', []).push({
  369. version: '3.22.4',
  370. mode: 'global',
  371. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  372. license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE',
  373. source: 'https://github.com/zloirock/core-js'
  374. });
  375. });
  376. var Object$2 = global_1.Object;
  377. // `ToObject` abstract operation
  378. // https://tc39.es/ecma262/#sec-toobject
  379. var toObject = function (argument) {
  380. return Object$2(requireObjectCoercible(argument));
  381. };
  382. var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
  383. // `HasOwnProperty` abstract operation
  384. // https://tc39.es/ecma262/#sec-hasownproperty
  385. // eslint-disable-next-line es-x/no-object-hasown -- safe
  386. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  387. return hasOwnProperty(toObject(it), key);
  388. };
  389. var id = 0;
  390. var postfix = Math.random();
  391. var toString = functionUncurryThis(1.0.toString);
  392. var uid = function (key) {
  393. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  394. };
  395. var WellKnownSymbolsStore = shared('wks');
  396. var Symbol$1 = global_1.Symbol;
  397. var symbolFor = Symbol$1 && Symbol$1['for'];
  398. var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
  399. var wellKnownSymbol = function (name) {
  400. if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  401. var description = 'Symbol.' + name;
  402. if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
  403. WellKnownSymbolsStore[name] = Symbol$1[name];
  404. } else if (useSymbolAsUid && symbolFor) {
  405. WellKnownSymbolsStore[name] = symbolFor(description);
  406. } else {
  407. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  408. }
  409. } return WellKnownSymbolsStore[name];
  410. };
  411. var TypeError$7 = global_1.TypeError;
  412. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  413. // `ToPrimitive` abstract operation
  414. // https://tc39.es/ecma262/#sec-toprimitive
  415. var toPrimitive = function (input, pref) {
  416. if (!isObject(input) || isSymbol(input)) return input;
  417. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  418. var result;
  419. if (exoticToPrim) {
  420. if (pref === undefined) pref = 'default';
  421. result = functionCall(exoticToPrim, input, pref);
  422. if (!isObject(result) || isSymbol(result)) return result;
  423. throw TypeError$7("Can't convert object to primitive value");
  424. }
  425. if (pref === undefined) pref = 'number';
  426. return ordinaryToPrimitive(input, pref);
  427. };
  428. // `ToPropertyKey` abstract operation
  429. // https://tc39.es/ecma262/#sec-topropertykey
  430. var toPropertyKey = function (argument) {
  431. var key = toPrimitive(argument, 'string');
  432. return isSymbol(key) ? key : key + '';
  433. };
  434. var document$1 = global_1.document;
  435. // typeof document.createElement is 'object' in old IE
  436. var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
  437. var documentCreateElement = function (it) {
  438. return EXISTS$1 ? document$1.createElement(it) : {};
  439. };
  440. // Thanks to IE8 for its funny defineProperty
  441. var ie8DomDefine = !descriptors && !fails(function () {
  442. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  443. return Object.defineProperty(documentCreateElement('div'), 'a', {
  444. get: function () { return 7; }
  445. }).a != 7;
  446. });
  447. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  448. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  449. // `Object.getOwnPropertyDescriptor` method
  450. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  451. var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  452. O = toIndexedObject(O);
  453. P = toPropertyKey(P);
  454. if (ie8DomDefine) try {
  455. return $getOwnPropertyDescriptor$1(O, P);
  456. } catch (error) { /* empty */ }
  457. if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
  458. };
  459. var objectGetOwnPropertyDescriptor = {
  460. f: f$4
  461. };
  462. // V8 ~ Chrome 36-
  463. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  464. var v8PrototypeDefineBug = descriptors && fails(function () {
  465. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  466. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  467. value: 42,
  468. writable: false
  469. }).prototype != 42;
  470. });
  471. var String$3 = global_1.String;
  472. var TypeError$6 = global_1.TypeError;
  473. // `Assert: Type(argument) is Object`
  474. var anObject = function (argument) {
  475. if (isObject(argument)) return argument;
  476. throw TypeError$6(String$3(argument) + ' is not an object');
  477. };
  478. var TypeError$5 = global_1.TypeError;
  479. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  480. var $defineProperty = Object.defineProperty;
  481. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  482. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  483. var ENUMERABLE = 'enumerable';
  484. var CONFIGURABLE$1 = 'configurable';
  485. var WRITABLE = 'writable';
  486. // `Object.defineProperty` method
  487. // https://tc39.es/ecma262/#sec-object.defineproperty
  488. var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
  489. anObject(O);
  490. P = toPropertyKey(P);
  491. anObject(Attributes);
  492. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  493. var current = $getOwnPropertyDescriptor(O, P);
  494. if (current && current[WRITABLE]) {
  495. O[P] = Attributes.value;
  496. Attributes = {
  497. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  498. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  499. writable: false
  500. };
  501. }
  502. } return $defineProperty(O, P, Attributes);
  503. } : $defineProperty : function defineProperty(O, P, Attributes) {
  504. anObject(O);
  505. P = toPropertyKey(P);
  506. anObject(Attributes);
  507. if (ie8DomDefine) try {
  508. return $defineProperty(O, P, Attributes);
  509. } catch (error) { /* empty */ }
  510. if ('get' in Attributes || 'set' in Attributes) throw TypeError$5('Accessors not supported');
  511. if ('value' in Attributes) O[P] = Attributes.value;
  512. return O;
  513. };
  514. var objectDefineProperty = {
  515. f: f$3
  516. };
  517. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  518. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  519. } : function (object, key, value) {
  520. object[key] = value;
  521. return object;
  522. };
  523. var FunctionPrototype$1 = Function.prototype;
  524. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  525. var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
  526. var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name');
  527. // additional protection from minified / mangled / dropped function names
  528. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  529. var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
  530. var functionName = {
  531. EXISTS: EXISTS,
  532. PROPER: PROPER,
  533. CONFIGURABLE: CONFIGURABLE
  534. };
  535. var functionToString = functionUncurryThis(Function.toString);
  536. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  537. if (!isCallable(sharedStore.inspectSource)) {
  538. sharedStore.inspectSource = function (it) {
  539. return functionToString(it);
  540. };
  541. }
  542. var inspectSource = sharedStore.inspectSource;
  543. var WeakMap$1 = global_1.WeakMap;
  544. var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
  545. var keys$1 = shared('keys');
  546. var sharedKey = function (key) {
  547. return keys$1[key] || (keys$1[key] = uid(key));
  548. };
  549. var hiddenKeys$1 = {};
  550. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  551. var TypeError$4 = global_1.TypeError;
  552. var WeakMap = global_1.WeakMap;
  553. var set, get, has;
  554. var enforce = function (it) {
  555. return has(it) ? get(it) : set(it, {});
  556. };
  557. var getterFor = function (TYPE) {
  558. return function (it) {
  559. var state;
  560. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  561. throw TypeError$4('Incompatible receiver, ' + TYPE + ' required');
  562. } return state;
  563. };
  564. };
  565. if (nativeWeakMap || sharedStore.state) {
  566. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  567. var wmget = functionUncurryThis(store.get);
  568. var wmhas = functionUncurryThis(store.has);
  569. var wmset = functionUncurryThis(store.set);
  570. set = function (it, metadata) {
  571. if (wmhas(store, it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
  572. metadata.facade = it;
  573. wmset(store, it, metadata);
  574. return metadata;
  575. };
  576. get = function (it) {
  577. return wmget(store, it) || {};
  578. };
  579. has = function (it) {
  580. return wmhas(store, it);
  581. };
  582. } else {
  583. var STATE = sharedKey('state');
  584. hiddenKeys$1[STATE] = true;
  585. set = function (it, metadata) {
  586. if (hasOwnProperty_1(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
  587. metadata.facade = it;
  588. createNonEnumerableProperty(it, STATE, metadata);
  589. return metadata;
  590. };
  591. get = function (it) {
  592. return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
  593. };
  594. has = function (it) {
  595. return hasOwnProperty_1(it, STATE);
  596. };
  597. }
  598. var internalState = {
  599. set: set,
  600. get: get,
  601. has: has,
  602. enforce: enforce,
  603. getterFor: getterFor
  604. };
  605. var makeBuiltIn_1 = createCommonjsModule(function (module) {
  606. var defineProperty = objectDefineProperty.f;
  607. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  608. var enforceInternalState = internalState.enforce;
  609. var getInternalState = internalState.get;
  610. var CONFIGURABLE_LENGTH = !fails(function () {
  611. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  612. });
  613. var TEMPLATE = String(String).split('String');
  614. var makeBuiltIn = module.exports = function (value, name, options) {
  615. if (String(name).slice(0, 7) === 'Symbol(') {
  616. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  617. }
  618. if (options && options.getter) name = 'get ' + name;
  619. if (options && options.setter) name = 'set ' + name;
  620. if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  621. defineProperty(value, 'name', { value: name, configurable: true });
  622. }
  623. if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
  624. defineProperty(value, 'length', { value: options.arity });
  625. }
  626. var state = enforceInternalState(value);
  627. if (!hasOwnProperty_1(state, 'source')) {
  628. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  629. } return value;
  630. };
  631. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  632. // eslint-disable-next-line no-extend-native -- required
  633. Function.prototype.toString = makeBuiltIn(function toString() {
  634. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  635. }, 'toString');
  636. });
  637. var defineBuiltIn = function (O, key, value, options) {
  638. var unsafe = options ? !!options.unsafe : false;
  639. var simple = options ? !!options.enumerable : false;
  640. var noTargetGet = options ? !!options.noTargetGet : false;
  641. var name = options && options.name !== undefined ? options.name : key;
  642. if (isCallable(value)) makeBuiltIn_1(value, name, options);
  643. if (O === global_1) {
  644. if (simple) O[key] = value;
  645. else setGlobal(key, value);
  646. return O;
  647. } else if (!unsafe) {
  648. delete O[key];
  649. } else if (!noTargetGet && O[key]) {
  650. simple = true;
  651. }
  652. if (simple) O[key] = value;
  653. else createNonEnumerableProperty(O, key, value);
  654. return O;
  655. };
  656. var ceil = Math.ceil;
  657. var floor$1 = Math.floor;
  658. // `ToIntegerOrInfinity` abstract operation
  659. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  660. var toIntegerOrInfinity = function (argument) {
  661. var number = +argument;
  662. // eslint-disable-next-line no-self-compare -- safe
  663. return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
  664. };
  665. var max$1 = Math.max;
  666. var min$2 = Math.min;
  667. // Helper for a popular repeating case of the spec:
  668. // Let integer be ? ToInteger(index).
  669. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  670. var toAbsoluteIndex = function (index, length) {
  671. var integer = toIntegerOrInfinity(index);
  672. return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
  673. };
  674. var min$1 = Math.min;
  675. // `ToLength` abstract operation
  676. // https://tc39.es/ecma262/#sec-tolength
  677. var toLength = function (argument) {
  678. return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  679. };
  680. // `LengthOfArrayLike` abstract operation
  681. // https://tc39.es/ecma262/#sec-lengthofarraylike
  682. var lengthOfArrayLike = function (obj) {
  683. return toLength(obj.length);
  684. };
  685. // `Array.prototype.{ indexOf, includes }` methods implementation
  686. var createMethod$2 = function (IS_INCLUDES) {
  687. return function ($this, el, fromIndex) {
  688. var O = toIndexedObject($this);
  689. var length = lengthOfArrayLike(O);
  690. var index = toAbsoluteIndex(fromIndex, length);
  691. var value;
  692. // Array#includes uses SameValueZero equality algorithm
  693. // eslint-disable-next-line no-self-compare -- NaN check
  694. if (IS_INCLUDES && el != el) while (length > index) {
  695. value = O[index++];
  696. // eslint-disable-next-line no-self-compare -- NaN check
  697. if (value != value) return true;
  698. // Array#indexOf ignores holes, Array#includes - not
  699. } else for (;length > index; index++) {
  700. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  701. } return !IS_INCLUDES && -1;
  702. };
  703. };
  704. var arrayIncludes = {
  705. // `Array.prototype.includes` method
  706. // https://tc39.es/ecma262/#sec-array.prototype.includes
  707. includes: createMethod$2(true),
  708. // `Array.prototype.indexOf` method
  709. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  710. indexOf: createMethod$2(false)
  711. };
  712. var indexOf$1 = arrayIncludes.indexOf;
  713. var push$2 = functionUncurryThis([].push);
  714. var objectKeysInternal = function (object, names) {
  715. var O = toIndexedObject(object);
  716. var i = 0;
  717. var result = [];
  718. var key;
  719. for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$2(result, key);
  720. // Don't enum bug & hidden keys
  721. while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
  722. ~indexOf$1(result, key) || push$2(result, key);
  723. }
  724. return result;
  725. };
  726. // IE8- don't enum bug keys
  727. var enumBugKeys = [
  728. 'constructor',
  729. 'hasOwnProperty',
  730. 'isPrototypeOf',
  731. 'propertyIsEnumerable',
  732. 'toLocaleString',
  733. 'toString',
  734. 'valueOf'
  735. ];
  736. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  737. // `Object.getOwnPropertyNames` method
  738. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  739. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  740. var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  741. return objectKeysInternal(O, hiddenKeys);
  742. };
  743. var objectGetOwnPropertyNames = {
  744. f: f$2
  745. };
  746. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  747. var f$1 = Object.getOwnPropertySymbols;
  748. var objectGetOwnPropertySymbols = {
  749. f: f$1
  750. };
  751. var concat$1 = functionUncurryThis([].concat);
  752. // all object keys, includes non-enumerable and symbols
  753. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  754. var keys = objectGetOwnPropertyNames.f(anObject(it));
  755. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  756. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  757. };
  758. var copyConstructorProperties = function (target, source, exceptions) {
  759. var keys = ownKeys(source);
  760. var defineProperty = objectDefineProperty.f;
  761. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  762. for (var i = 0; i < keys.length; i++) {
  763. var key = keys[i];
  764. if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
  765. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  766. }
  767. }
  768. };
  769. var replacement = /#|\.prototype\./;
  770. var isForced = function (feature, detection) {
  771. var value = data[normalize(feature)];
  772. return value == POLYFILL ? true
  773. : value == NATIVE ? false
  774. : isCallable(detection) ? fails(detection)
  775. : !!detection;
  776. };
  777. var normalize = isForced.normalize = function (string) {
  778. return String(string).replace(replacement, '.').toLowerCase();
  779. };
  780. var data = isForced.data = {};
  781. var NATIVE = isForced.NATIVE = 'N';
  782. var POLYFILL = isForced.POLYFILL = 'P';
  783. var isForced_1 = isForced;
  784. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  785. /*
  786. options.target - name of the target object
  787. options.global - target is the global object
  788. options.stat - export as static methods of target
  789. options.proto - export as prototype methods of target
  790. options.real - real prototype method for the `pure` version
  791. options.forced - export even if the native feature is available
  792. options.bind - bind methods to the target, required for the `pure` version
  793. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  794. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  795. options.sham - add a flag to not completely full polyfills
  796. options.enumerable - export as enumerable property
  797. options.noTargetGet - prevent calling a getter on target
  798. options.name - the .name of the function if it does not match the key
  799. */
  800. var _export = function (options, source) {
  801. var TARGET = options.target;
  802. var GLOBAL = options.global;
  803. var STATIC = options.stat;
  804. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  805. if (GLOBAL) {
  806. target = global_1;
  807. } else if (STATIC) {
  808. target = global_1[TARGET] || setGlobal(TARGET, {});
  809. } else {
  810. target = (global_1[TARGET] || {}).prototype;
  811. }
  812. if (target) for (key in source) {
  813. sourceProperty = source[key];
  814. if (options.noTargetGet) {
  815. descriptor = getOwnPropertyDescriptor(target, key);
  816. targetProperty = descriptor && descriptor.value;
  817. } else targetProperty = target[key];
  818. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  819. // contained in target
  820. if (!FORCED && targetProperty !== undefined) {
  821. if (typeof sourceProperty == typeof targetProperty) continue;
  822. copyConstructorProperties(sourceProperty, targetProperty);
  823. }
  824. // add a flag to not completely full polyfills
  825. if (options.sham || (targetProperty && targetProperty.sham)) {
  826. createNonEnumerableProperty(sourceProperty, 'sham', true);
  827. }
  828. defineBuiltIn(target, key, sourceProperty, options);
  829. }
  830. };
  831. var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
  832. var test = {};
  833. test[TO_STRING_TAG$1] = 'z';
  834. var toStringTagSupport = String(test) === '[object z]';
  835. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  836. var Object$1 = global_1.Object;
  837. // ES3 wrong here
  838. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  839. // fallback for IE11 Script Access Denied error
  840. var tryGet = function (it, key) {
  841. try {
  842. return it[key];
  843. } catch (error) { /* empty */ }
  844. };
  845. // getting tag from ES6+ `Object.prototype.toString`
  846. var classof = toStringTagSupport ? classofRaw : function (it) {
  847. var O, tag, result;
  848. return it === undefined ? 'Undefined' : it === null ? 'Null'
  849. // @@toStringTag case
  850. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  851. // builtinTag case
  852. : CORRECT_ARGUMENTS ? classofRaw(O)
  853. // ES3 arguments fallback
  854. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  855. };
  856. var String$2 = global_1.String;
  857. var toString_1 = function (argument) {
  858. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  859. return String$2(argument);
  860. };
  861. // `RegExp.prototype.flags` getter implementation
  862. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  863. var regexpFlags = function () {
  864. var that = anObject(this);
  865. var result = '';
  866. if (that.hasIndices) result += 'd';
  867. if (that.global) result += 'g';
  868. if (that.ignoreCase) result += 'i';
  869. if (that.multiline) result += 'm';
  870. if (that.dotAll) result += 's';
  871. if (that.unicode) result += 'u';
  872. if (that.sticky) result += 'y';
  873. return result;
  874. };
  875. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  876. var $RegExp$2 = global_1.RegExp;
  877. var UNSUPPORTED_Y$2 = fails(function () {
  878. var re = $RegExp$2('a', 'y');
  879. re.lastIndex = 2;
  880. return re.exec('abcd') != null;
  881. });
  882. // UC Browser bug
  883. // https://github.com/zloirock/core-js/issues/1008
  884. var MISSED_STICKY$1 = UNSUPPORTED_Y$2 || fails(function () {
  885. return !$RegExp$2('a', 'y').sticky;
  886. });
  887. var BROKEN_CARET = UNSUPPORTED_Y$2 || fails(function () {
  888. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  889. var re = $RegExp$2('^r', 'gy');
  890. re.lastIndex = 2;
  891. return re.exec('str') != null;
  892. });
  893. var regexpStickyHelpers = {
  894. BROKEN_CARET: BROKEN_CARET,
  895. MISSED_STICKY: MISSED_STICKY$1,
  896. UNSUPPORTED_Y: UNSUPPORTED_Y$2
  897. };
  898. // `Object.keys` method
  899. // https://tc39.es/ecma262/#sec-object.keys
  900. // eslint-disable-next-line es-x/no-object-keys -- safe
  901. var objectKeys = Object.keys || function keys(O) {
  902. return objectKeysInternal(O, enumBugKeys);
  903. };
  904. // `Object.defineProperties` method
  905. // https://tc39.es/ecma262/#sec-object.defineproperties
  906. // eslint-disable-next-line es-x/no-object-defineproperties -- safe
  907. var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
  908. anObject(O);
  909. var props = toIndexedObject(Properties);
  910. var keys = objectKeys(Properties);
  911. var length = keys.length;
  912. var index = 0;
  913. var key;
  914. while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
  915. return O;
  916. };
  917. var objectDefineProperties = {
  918. f: f
  919. };
  920. var html = getBuiltIn('document', 'documentElement');
  921. /* global ActiveXObject -- old IE, WSH */
  922. var GT = '>';
  923. var LT = '<';
  924. var PROTOTYPE = 'prototype';
  925. var SCRIPT = 'script';
  926. var IE_PROTO = sharedKey('IE_PROTO');
  927. var EmptyConstructor = function () { /* empty */ };
  928. var scriptTag = function (content) {
  929. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  930. };
  931. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  932. var NullProtoObjectViaActiveX = function (activeXDocument) {
  933. activeXDocument.write(scriptTag(''));
  934. activeXDocument.close();
  935. var temp = activeXDocument.parentWindow.Object;
  936. activeXDocument = null; // avoid memory leak
  937. return temp;
  938. };
  939. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  940. var NullProtoObjectViaIFrame = function () {
  941. // Thrash, waste and sodomy: IE GC bug
  942. var iframe = documentCreateElement('iframe');
  943. var JS = 'java' + SCRIPT + ':';
  944. var iframeDocument;
  945. iframe.style.display = 'none';
  946. html.appendChild(iframe);
  947. // https://github.com/zloirock/core-js/issues/475
  948. iframe.src = String(JS);
  949. iframeDocument = iframe.contentWindow.document;
  950. iframeDocument.open();
  951. iframeDocument.write(scriptTag('document.F=Object'));
  952. iframeDocument.close();
  953. return iframeDocument.F;
  954. };
  955. // Check for document.domain and active x support
  956. // No need to use active x approach when document.domain is not set
  957. // see https://github.com/es-shims/es5-shim/issues/150
  958. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  959. // avoid IE GC bug
  960. var activeXDocument;
  961. var NullProtoObject = function () {
  962. try {
  963. activeXDocument = new ActiveXObject('htmlfile');
  964. } catch (error) { /* ignore */ }
  965. NullProtoObject = typeof document != 'undefined'
  966. ? document.domain && activeXDocument
  967. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  968. : NullProtoObjectViaIFrame()
  969. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  970. var length = enumBugKeys.length;
  971. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  972. return NullProtoObject();
  973. };
  974. hiddenKeys$1[IE_PROTO] = true;
  975. // `Object.create` method
  976. // https://tc39.es/ecma262/#sec-object.create
  977. // eslint-disable-next-line es-x/no-object-create -- safe
  978. var objectCreate = Object.create || function create(O, Properties) {
  979. var result;
  980. if (O !== null) {
  981. EmptyConstructor[PROTOTYPE] = anObject(O);
  982. result = new EmptyConstructor();
  983. EmptyConstructor[PROTOTYPE] = null;
  984. // add "__proto__" for Object.getPrototypeOf polyfill
  985. result[IE_PROTO] = O;
  986. } else result = NullProtoObject();
  987. return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
  988. };
  989. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  990. var $RegExp$1 = global_1.RegExp;
  991. var regexpUnsupportedDotAll = fails(function () {
  992. var re = $RegExp$1('.', 's');
  993. return !(re.dotAll && re.exec('\n') && re.flags === 's');
  994. });
  995. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  996. var $RegExp = global_1.RegExp;
  997. var regexpUnsupportedNcg = fails(function () {
  998. var re = $RegExp('(?<a>b)', 'g');
  999. return re.exec('b').groups.a !== 'b' ||
  1000. 'b'.replace(re, '$<a>c') !== 'bc';
  1001. });
  1002. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  1003. /* eslint-disable regexp/no-useless-quantifier -- testing */
  1004. var getInternalState = internalState.get;
  1005. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  1006. var nativeExec = RegExp.prototype.exec;
  1007. var patchedExec = nativeExec;
  1008. var charAt$4 = functionUncurryThis(''.charAt);
  1009. var indexOf = functionUncurryThis(''.indexOf);
  1010. var replace$2 = functionUncurryThis(''.replace);
  1011. var stringSlice$4 = functionUncurryThis(''.slice);
  1012. var UPDATES_LAST_INDEX_WRONG = (function () {
  1013. var re1 = /a/;
  1014. var re2 = /b*/g;
  1015. functionCall(nativeExec, re1, 'a');
  1016. functionCall(nativeExec, re2, 'a');
  1017. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  1018. })();
  1019. var UNSUPPORTED_Y$1 = regexpStickyHelpers.BROKEN_CARET;
  1020. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1021. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1022. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || regexpUnsupportedDotAll || regexpUnsupportedNcg;
  1023. if (PATCH) {
  1024. patchedExec = function exec(string) {
  1025. var re = this;
  1026. var state = getInternalState(re);
  1027. var str = toString_1(string);
  1028. var raw = state.raw;
  1029. var result, reCopy, lastIndex, match, i, object, group;
  1030. if (raw) {
  1031. raw.lastIndex = re.lastIndex;
  1032. result = functionCall(patchedExec, raw, str);
  1033. re.lastIndex = raw.lastIndex;
  1034. return result;
  1035. }
  1036. var groups = state.groups;
  1037. var sticky = UNSUPPORTED_Y$1 && re.sticky;
  1038. var flags = functionCall(regexpFlags, re);
  1039. var source = re.source;
  1040. var charsAdded = 0;
  1041. var strCopy = str;
  1042. if (sticky) {
  1043. flags = replace$2(flags, 'y', '');
  1044. if (indexOf(flags, 'g') === -1) {
  1045. flags += 'g';
  1046. }
  1047. strCopy = stringSlice$4(str, re.lastIndex);
  1048. // Support anchored sticky behavior.
  1049. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$4(str, re.lastIndex - 1) !== '\n')) {
  1050. source = '(?: ' + source + ')';
  1051. strCopy = ' ' + strCopy;
  1052. charsAdded++;
  1053. }
  1054. // ^(? + rx + ) is needed, in combination with some str slicing, to
  1055. // simulate the 'y' flag.
  1056. reCopy = new RegExp('^(?:' + source + ')', flags);
  1057. }
  1058. if (NPCG_INCLUDED) {
  1059. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  1060. }
  1061. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  1062. match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
  1063. if (sticky) {
  1064. if (match) {
  1065. match.input = stringSlice$4(match.input, charsAdded);
  1066. match[0] = stringSlice$4(match[0], charsAdded);
  1067. match.index = re.lastIndex;
  1068. re.lastIndex += match[0].length;
  1069. } else re.lastIndex = 0;
  1070. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1071. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1072. }
  1073. if (NPCG_INCLUDED && match && match.length > 1) {
  1074. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1075. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  1076. functionCall(nativeReplace, match[0], reCopy, function () {
  1077. for (i = 1; i < arguments.length - 2; i++) {
  1078. if (arguments[i] === undefined) match[i] = undefined;
  1079. }
  1080. });
  1081. }
  1082. if (match && groups) {
  1083. match.groups = object = objectCreate(null);
  1084. for (i = 0; i < groups.length; i++) {
  1085. group = groups[i];
  1086. object[group[0]] = match[group[1]];
  1087. }
  1088. }
  1089. return match;
  1090. };
  1091. }
  1092. var regexpExec = patchedExec;
  1093. // `RegExp.prototype.exec` method
  1094. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1095. _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
  1096. exec: regexpExec
  1097. });
  1098. // TODO: Remove from `core-js@4` since it's moved to entry points
  1099. var SPECIES$3 = wellKnownSymbol('species');
  1100. var RegExpPrototype$3 = RegExp.prototype;
  1101. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  1102. var SYMBOL = wellKnownSymbol(KEY);
  1103. var DELEGATES_TO_SYMBOL = !fails(function () {
  1104. // String methods call symbol-named RegEp methods
  1105. var O = {};
  1106. O[SYMBOL] = function () { return 7; };
  1107. return ''[KEY](O) != 7;
  1108. });
  1109. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  1110. // Symbol-named RegExp methods call .exec
  1111. var execCalled = false;
  1112. var re = /a/;
  1113. if (KEY === 'split') {
  1114. // We can't use real regex here since it causes deoptimization
  1115. // and serious performance degradation in V8
  1116. // https://github.com/zloirock/core-js/issues/306
  1117. re = {};
  1118. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1119. // a new one. We need to return the patched regex when creating the new one.
  1120. re.constructor = {};
  1121. re.constructor[SPECIES$3] = function () { return re; };
  1122. re.flags = '';
  1123. re[SYMBOL] = /./[SYMBOL];
  1124. }
  1125. re.exec = function () { execCalled = true; return null; };
  1126. re[SYMBOL]('');
  1127. return !execCalled;
  1128. });
  1129. if (
  1130. !DELEGATES_TO_SYMBOL ||
  1131. !DELEGATES_TO_EXEC ||
  1132. FORCED
  1133. ) {
  1134. var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]);
  1135. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1136. var uncurriedNativeMethod = functionUncurryThis(nativeMethod);
  1137. var $exec = regexp.exec;
  1138. if ($exec === regexpExec || $exec === RegExpPrototype$3.exec) {
  1139. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1140. // The native String method already delegates to @@method (this
  1141. // polyfilled function), leasing to infinite recursion.
  1142. // We avoid it by directly calling the native @@method method.
  1143. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
  1144. }
  1145. return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
  1146. }
  1147. return { done: false };
  1148. });
  1149. defineBuiltIn(String.prototype, KEY, methods[0]);
  1150. defineBuiltIn(RegExpPrototype$3, SYMBOL, methods[1]);
  1151. }
  1152. if (SHAM) createNonEnumerableProperty(RegExpPrototype$3[SYMBOL], 'sham', true);
  1153. };
  1154. // `SameValue` abstract operation
  1155. // https://tc39.es/ecma262/#sec-samevalue
  1156. // eslint-disable-next-line es-x/no-object-is -- safe
  1157. var sameValue = Object.is || function is(x, y) {
  1158. // eslint-disable-next-line no-self-compare -- NaN check
  1159. return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
  1160. };
  1161. var TypeError$3 = global_1.TypeError;
  1162. // `RegExpExec` abstract operation
  1163. // https://tc39.es/ecma262/#sec-regexpexec
  1164. var regexpExecAbstract = function (R, S) {
  1165. var exec = R.exec;
  1166. if (isCallable(exec)) {
  1167. var result = functionCall(exec, R, S);
  1168. if (result !== null) anObject(result);
  1169. return result;
  1170. }
  1171. if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
  1172. throw TypeError$3('RegExp#exec called on incompatible receiver');
  1173. };
  1174. // @@search logic
  1175. fixRegexpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
  1176. return [
  1177. // `String.prototype.search` method
  1178. // https://tc39.es/ecma262/#sec-string.prototype.search
  1179. function search(regexp) {
  1180. var O = requireObjectCoercible(this);
  1181. var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
  1182. return searcher ? functionCall(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString_1(O));
  1183. },
  1184. // `RegExp.prototype[@@search]` method
  1185. // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
  1186. function (string) {
  1187. var rx = anObject(this);
  1188. var S = toString_1(string);
  1189. var res = maybeCallNative(nativeSearch, rx, S);
  1190. if (res.done) return res.value;
  1191. var previousLastIndex = rx.lastIndex;
  1192. if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
  1193. var result = regexpExecAbstract(rx, S);
  1194. if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
  1195. return result === null ? -1 : result.index;
  1196. }
  1197. ];
  1198. });
  1199. var String$1 = global_1.String;
  1200. var TypeError$2 = global_1.TypeError;
  1201. var aPossiblePrototype = function (argument) {
  1202. if (typeof argument == 'object' || isCallable(argument)) return argument;
  1203. throw TypeError$2("Can't set " + String$1(argument) + ' as a prototype');
  1204. };
  1205. /* eslint-disable no-proto -- safe */
  1206. // `Object.setPrototypeOf` method
  1207. // https://tc39.es/ecma262/#sec-object.setprototypeof
  1208. // Works with __proto__ only. Old v8 can't work with null proto objects.
  1209. // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
  1210. var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  1211. var CORRECT_SETTER = false;
  1212. var test = {};
  1213. var setter;
  1214. try {
  1215. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  1216. setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
  1217. setter(test, []);
  1218. CORRECT_SETTER = test instanceof Array;
  1219. } catch (error) { /* empty */ }
  1220. return function setPrototypeOf(O, proto) {
  1221. anObject(O);
  1222. aPossiblePrototype(proto);
  1223. if (CORRECT_SETTER) setter(O, proto);
  1224. else O.__proto__ = proto;
  1225. return O;
  1226. };
  1227. }() : undefined);
  1228. // makes subclassing work correct for wrapped built-ins
  1229. var inheritIfRequired = function ($this, dummy, Wrapper) {
  1230. var NewTarget, NewTargetPrototype;
  1231. if (
  1232. // it can work only with native `setPrototypeOf`
  1233. objectSetPrototypeOf &&
  1234. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  1235. isCallable(NewTarget = dummy.constructor) &&
  1236. NewTarget !== Wrapper &&
  1237. isObject(NewTargetPrototype = NewTarget.prototype) &&
  1238. NewTargetPrototype !== Wrapper.prototype
  1239. ) objectSetPrototypeOf($this, NewTargetPrototype);
  1240. return $this;
  1241. };
  1242. var MATCH$1 = wellKnownSymbol('match');
  1243. // `IsRegExp` abstract operation
  1244. // https://tc39.es/ecma262/#sec-isregexp
  1245. var isRegexp = function (it) {
  1246. var isRegExp;
  1247. return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
  1248. };
  1249. var RegExpPrototype$2 = RegExp.prototype;
  1250. var regexpGetFlags = function (R) {
  1251. var flags = R.flags;
  1252. return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwnProperty_1(R, 'flags') && objectIsPrototypeOf(RegExpPrototype$2, R)
  1253. ? functionCall(regexpFlags, R) : flags;
  1254. };
  1255. var defineProperty = objectDefineProperty.f;
  1256. var proxyAccessor = function (Target, Source, key) {
  1257. key in Target || defineProperty(Target, key, {
  1258. configurable: true,
  1259. get: function () { return Source[key]; },
  1260. set: function (it) { Source[key] = it; }
  1261. });
  1262. };
  1263. var SPECIES$2 = wellKnownSymbol('species');
  1264. var setSpecies = function (CONSTRUCTOR_NAME) {
  1265. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  1266. var defineProperty = objectDefineProperty.f;
  1267. if (descriptors && Constructor && !Constructor[SPECIES$2]) {
  1268. defineProperty(Constructor, SPECIES$2, {
  1269. configurable: true,
  1270. get: function () { return this; }
  1271. });
  1272. }
  1273. };
  1274. var getOwnPropertyNames = objectGetOwnPropertyNames.f;
  1275. var enforceInternalState = internalState.enforce;
  1276. var MATCH = wellKnownSymbol('match');
  1277. var NativeRegExp = global_1.RegExp;
  1278. var RegExpPrototype$1 = NativeRegExp.prototype;
  1279. var SyntaxError = global_1.SyntaxError;
  1280. var exec$1 = functionUncurryThis(RegExpPrototype$1.exec);
  1281. var charAt$3 = functionUncurryThis(''.charAt);
  1282. var replace$1 = functionUncurryThis(''.replace);
  1283. var stringIndexOf$1 = functionUncurryThis(''.indexOf);
  1284. var stringSlice$3 = functionUncurryThis(''.slice);
  1285. // TODO: Use only propper RegExpIdentifierName
  1286. var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
  1287. var re1 = /a/g;
  1288. var re2 = /a/g;
  1289. // "new" should create a new object, old webkit bug
  1290. var CORRECT_NEW = new NativeRegExp(re1) !== re1;
  1291. var MISSED_STICKY = regexpStickyHelpers.MISSED_STICKY;
  1292. var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y;
  1293. var BASE_FORCED = descriptors &&
  1294. (!CORRECT_NEW || MISSED_STICKY || regexpUnsupportedDotAll || regexpUnsupportedNcg || fails(function () {
  1295. re2[MATCH] = false;
  1296. // RegExp constructor can alter flags and IsRegExp works correct with @@match
  1297. return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
  1298. }));
  1299. var handleDotAll = function (string) {
  1300. var length = string.length;
  1301. var index = 0;
  1302. var result = '';
  1303. var brackets = false;
  1304. var chr;
  1305. for (; index <= length; index++) {
  1306. chr = charAt$3(string, index);
  1307. if (chr === '\\') {
  1308. result += chr + charAt$3(string, ++index);
  1309. continue;
  1310. }
  1311. if (!brackets && chr === '.') {
  1312. result += '[\\s\\S]';
  1313. } else {
  1314. if (chr === '[') {
  1315. brackets = true;
  1316. } else if (chr === ']') {
  1317. brackets = false;
  1318. } result += chr;
  1319. }
  1320. } return result;
  1321. };
  1322. var handleNCG = function (string) {
  1323. var length = string.length;
  1324. var index = 0;
  1325. var result = '';
  1326. var named = [];
  1327. var names = {};
  1328. var brackets = false;
  1329. var ncg = false;
  1330. var groupid = 0;
  1331. var groupname = '';
  1332. var chr;
  1333. for (; index <= length; index++) {
  1334. chr = charAt$3(string, index);
  1335. if (chr === '\\') {
  1336. chr = chr + charAt$3(string, ++index);
  1337. } else if (chr === ']') {
  1338. brackets = false;
  1339. } else if (!brackets) switch (true) {
  1340. case chr === '[':
  1341. brackets = true;
  1342. break;
  1343. case chr === '(':
  1344. if (exec$1(IS_NCG, stringSlice$3(string, index + 1))) {
  1345. index += 2;
  1346. ncg = true;
  1347. }
  1348. result += chr;
  1349. groupid++;
  1350. continue;
  1351. case chr === '>' && ncg:
  1352. if (groupname === '' || hasOwnProperty_1(names, groupname)) {
  1353. throw new SyntaxError('Invalid capture group name');
  1354. }
  1355. names[groupname] = true;
  1356. named[named.length] = [groupname, groupid];
  1357. ncg = false;
  1358. groupname = '';
  1359. continue;
  1360. }
  1361. if (ncg) groupname += chr;
  1362. else result += chr;
  1363. } return [result, named];
  1364. };
  1365. // `RegExp` constructor
  1366. // https://tc39.es/ecma262/#sec-regexp-constructor
  1367. if (isForced_1('RegExp', BASE_FORCED)) {
  1368. var RegExpWrapper = function RegExp(pattern, flags) {
  1369. var thisIsRegExp = objectIsPrototypeOf(RegExpPrototype$1, this);
  1370. var patternIsRegExp = isRegexp(pattern);
  1371. var flagsAreUndefined = flags === undefined;
  1372. var groups = [];
  1373. var rawPattern = pattern;
  1374. var rawFlags, dotAll, sticky, handled, result, state;
  1375. if (!thisIsRegExp && patternIsRegExp && flagsAreUndefined && pattern.constructor === RegExpWrapper) {
  1376. return pattern;
  1377. }
  1378. if (patternIsRegExp || objectIsPrototypeOf(RegExpPrototype$1, pattern)) {
  1379. pattern = pattern.source;
  1380. if (flagsAreUndefined) flags = regexpGetFlags(rawPattern);
  1381. }
  1382. pattern = pattern === undefined ? '' : toString_1(pattern);
  1383. flags = flags === undefined ? '' : toString_1(flags);
  1384. rawPattern = pattern;
  1385. if (regexpUnsupportedDotAll && 'dotAll' in re1) {
  1386. dotAll = !!flags && stringIndexOf$1(flags, 's') > -1;
  1387. if (dotAll) flags = replace$1(flags, /s/g, '');
  1388. }
  1389. rawFlags = flags;
  1390. if (MISSED_STICKY && 'sticky' in re1) {
  1391. sticky = !!flags && stringIndexOf$1(flags, 'y') > -1;
  1392. if (sticky && UNSUPPORTED_Y) flags = replace$1(flags, /y/g, '');
  1393. }
  1394. if (regexpUnsupportedNcg) {
  1395. handled = handleNCG(pattern);
  1396. pattern = handled[0];
  1397. groups = handled[1];
  1398. }
  1399. result = inheritIfRequired(NativeRegExp(pattern, flags), thisIsRegExp ? this : RegExpPrototype$1, RegExpWrapper);
  1400. if (dotAll || sticky || groups.length) {
  1401. state = enforceInternalState(result);
  1402. if (dotAll) {
  1403. state.dotAll = true;
  1404. state.raw = RegExpWrapper(handleDotAll(pattern), rawFlags);
  1405. }
  1406. if (sticky) state.sticky = true;
  1407. if (groups.length) state.groups = groups;
  1408. }
  1409. if (pattern !== rawPattern) try {
  1410. // fails in old engines, but we have no alternatives for unsupported regex syntax
  1411. createNonEnumerableProperty(result, 'source', rawPattern === '' ? '(?:)' : rawPattern);
  1412. } catch (error) { /* empty */ }
  1413. return result;
  1414. };
  1415. for (var keys = getOwnPropertyNames(NativeRegExp), index = 0; keys.length > index;) {
  1416. proxyAccessor(RegExpWrapper, NativeRegExp, keys[index++]);
  1417. }
  1418. RegExpPrototype$1.constructor = RegExpWrapper;
  1419. RegExpWrapper.prototype = RegExpPrototype$1;
  1420. defineBuiltIn(global_1, 'RegExp', RegExpWrapper);
  1421. }
  1422. // https://tc39.es/ecma262/#sec-get-regexp-@@species
  1423. setSpecies('RegExp');
  1424. var PROPER_FUNCTION_NAME = functionName.PROPER;
  1425. var TO_STRING = 'toString';
  1426. var RegExpPrototype = RegExp.prototype;
  1427. var n$ToString = RegExpPrototype[TO_STRING];
  1428. var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  1429. // FF44- RegExp#toString has a wrong name
  1430. var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
  1431. // `RegExp.prototype.toString` method
  1432. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  1433. if (NOT_GENERIC || INCORRECT_NAME) {
  1434. defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
  1435. var R = anObject(this);
  1436. var pattern = toString_1(R.source);
  1437. var flags = toString_1(regexpGetFlags(R));
  1438. return '/' + pattern + '/' + flags;
  1439. }, { unsafe: true });
  1440. }
  1441. var charAt$2 = functionUncurryThis(''.charAt);
  1442. var charCodeAt = functionUncurryThis(''.charCodeAt);
  1443. var stringSlice$2 = functionUncurryThis(''.slice);
  1444. var createMethod$1 = function (CONVERT_TO_STRING) {
  1445. return function ($this, pos) {
  1446. var S = toString_1(requireObjectCoercible($this));
  1447. var position = toIntegerOrInfinity(pos);
  1448. var size = S.length;
  1449. var first, second;
  1450. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  1451. first = charCodeAt(S, position);
  1452. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  1453. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  1454. ? CONVERT_TO_STRING
  1455. ? charAt$2(S, position)
  1456. : first
  1457. : CONVERT_TO_STRING
  1458. ? stringSlice$2(S, position, position + 2)
  1459. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  1460. };
  1461. };
  1462. var stringMultibyte = {
  1463. // `String.prototype.codePointAt` method
  1464. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  1465. codeAt: createMethod$1(false),
  1466. // `String.prototype.at` method
  1467. // https://github.com/mathiasbynens/String.prototype.at
  1468. charAt: createMethod$1(true)
  1469. };
  1470. var charAt$1 = stringMultibyte.charAt;
  1471. // `AdvanceStringIndex` abstract operation
  1472. // https://tc39.es/ecma262/#sec-advancestringindex
  1473. var advanceStringIndex = function (S, index, unicode) {
  1474. return index + (unicode ? charAt$1(S, index).length : 1);
  1475. };
  1476. // @@match logic
  1477. fixRegexpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
  1478. return [
  1479. // `String.prototype.match` method
  1480. // https://tc39.es/ecma262/#sec-string.prototype.match
  1481. function match(regexp) {
  1482. var O = requireObjectCoercible(this);
  1483. var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);
  1484. return matcher ? functionCall(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString_1(O));
  1485. },
  1486. // `RegExp.prototype[@@match]` method
  1487. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  1488. function (string) {
  1489. var rx = anObject(this);
  1490. var S = toString_1(string);
  1491. var res = maybeCallNative(nativeMatch, rx, S);
  1492. if (res.done) return res.value;
  1493. if (!rx.global) return regexpExecAbstract(rx, S);
  1494. var fullUnicode = rx.unicode;
  1495. rx.lastIndex = 0;
  1496. var A = [];
  1497. var n = 0;
  1498. var result;
  1499. while ((result = regexpExecAbstract(rx, S)) !== null) {
  1500. var matchStr = toString_1(result[0]);
  1501. A[n] = matchStr;
  1502. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  1503. n++;
  1504. }
  1505. return n === 0 ? null : A;
  1506. }
  1507. ];
  1508. });
  1509. var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1510. var propertyIsEnumerable = functionUncurryThis($propertyIsEnumerable);
  1511. var push$1 = functionUncurryThis([].push);
  1512. // `Object.{ entries, values }` methods implementation
  1513. var createMethod = function (TO_ENTRIES) {
  1514. return function (it) {
  1515. var O = toIndexedObject(it);
  1516. var keys = objectKeys(O);
  1517. var length = keys.length;
  1518. var i = 0;
  1519. var result = [];
  1520. var key;
  1521. while (length > i) {
  1522. key = keys[i++];
  1523. if (!descriptors || propertyIsEnumerable(O, key)) {
  1524. push$1(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  1525. }
  1526. }
  1527. return result;
  1528. };
  1529. };
  1530. var objectToArray = {
  1531. // `Object.entries` method
  1532. // https://tc39.es/ecma262/#sec-object.entries
  1533. entries: createMethod(true),
  1534. // `Object.values` method
  1535. // https://tc39.es/ecma262/#sec-object.values
  1536. values: createMethod(false)
  1537. };
  1538. var $entries = objectToArray.entries;
  1539. // `Object.entries` method
  1540. // https://tc39.es/ecma262/#sec-object.entries
  1541. _export({ target: 'Object', stat: true }, {
  1542. entries: function entries(O) {
  1543. return $entries(O);
  1544. }
  1545. });
  1546. // `IsArray` abstract operation
  1547. // https://tc39.es/ecma262/#sec-isarray
  1548. // eslint-disable-next-line es-x/no-array-isarray -- safe
  1549. var isArray = Array.isArray || function isArray(argument) {
  1550. return classofRaw(argument) == 'Array';
  1551. };
  1552. var createProperty = function (object, key, value) {
  1553. var propertyKey = toPropertyKey(key);
  1554. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  1555. else object[propertyKey] = value;
  1556. };
  1557. var noop = function () { /* empty */ };
  1558. var empty = [];
  1559. var construct = getBuiltIn('Reflect', 'construct');
  1560. var constructorRegExp = /^\s*(?:class|function)\b/;
  1561. var exec = functionUncurryThis(constructorRegExp.exec);
  1562. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  1563. var isConstructorModern = function isConstructor(argument) {
  1564. if (!isCallable(argument)) return false;
  1565. try {
  1566. construct(noop, empty, argument);
  1567. return true;
  1568. } catch (error) {
  1569. return false;
  1570. }
  1571. };
  1572. var isConstructorLegacy = function isConstructor(argument) {
  1573. if (!isCallable(argument)) return false;
  1574. switch (classof(argument)) {
  1575. case 'AsyncFunction':
  1576. case 'GeneratorFunction':
  1577. case 'AsyncGeneratorFunction': return false;
  1578. }
  1579. try {
  1580. // we can't check .prototype since constructors produced by .bind haven't it
  1581. // `Function#toString` throws on some built-it function in some legacy engines
  1582. // (for example, `DOMQuad` and similar in FF41-)
  1583. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1584. } catch (error) {
  1585. return true;
  1586. }
  1587. };
  1588. isConstructorLegacy.sham = true;
  1589. // `IsConstructor` abstract operation
  1590. // https://tc39.es/ecma262/#sec-isconstructor
  1591. var isConstructor = !construct || fails(function () {
  1592. var called;
  1593. return isConstructorModern(isConstructorModern.call)
  1594. || !isConstructorModern(Object)
  1595. || !isConstructorModern(function () { called = true; })
  1596. || called;
  1597. }) ? isConstructorLegacy : isConstructorModern;
  1598. var SPECIES$1 = wellKnownSymbol('species');
  1599. var Array$1 = global_1.Array;
  1600. // a part of `ArraySpeciesCreate` abstract operation
  1601. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1602. var arraySpeciesConstructor = function (originalArray) {
  1603. var C;
  1604. if (isArray(originalArray)) {
  1605. C = originalArray.constructor;
  1606. // cross-realm fallback
  1607. if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined;
  1608. else if (isObject(C)) {
  1609. C = C[SPECIES$1];
  1610. if (C === null) C = undefined;
  1611. }
  1612. } return C === undefined ? Array$1 : C;
  1613. };
  1614. // `ArraySpeciesCreate` abstract operation
  1615. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1616. var arraySpeciesCreate = function (originalArray, length) {
  1617. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1618. };
  1619. var SPECIES = wellKnownSymbol('species');
  1620. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1621. // We can't use this feature detection in V8 since it causes
  1622. // deoptimization and serious performance degradation
  1623. // https://github.com/zloirock/core-js/issues/677
  1624. return engineV8Version >= 51 || !fails(function () {
  1625. var array = [];
  1626. var constructor = array.constructor = {};
  1627. constructor[SPECIES] = function () {
  1628. return { foo: 1 };
  1629. };
  1630. return array[METHOD_NAME](Boolean).foo !== 1;
  1631. });
  1632. };
  1633. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1634. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1635. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1636. var TypeError$1 = global_1.TypeError;
  1637. // We can't use this feature detection in V8 since it causes
  1638. // deoptimization and serious performance degradation
  1639. // https://github.com/zloirock/core-js/issues/679
  1640. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  1641. var array = [];
  1642. array[IS_CONCAT_SPREADABLE] = false;
  1643. return array.concat()[0] !== array;
  1644. });
  1645. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1646. var isConcatSpreadable = function (O) {
  1647. if (!isObject(O)) return false;
  1648. var spreadable = O[IS_CONCAT_SPREADABLE];
  1649. return spreadable !== undefined ? !!spreadable : isArray(O);
  1650. };
  1651. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1652. // `Array.prototype.concat` method
  1653. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1654. // with adding support of @@isConcatSpreadable and @@species
  1655. _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  1656. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1657. concat: function concat(arg) {
  1658. var O = toObject(this);
  1659. var A = arraySpeciesCreate(O, 0);
  1660. var n = 0;
  1661. var i, k, length, len, E;
  1662. for (i = -1, length = arguments.length; i < length; i++) {
  1663. E = i === -1 ? O : arguments[i];
  1664. if (isConcatSpreadable(E)) {
  1665. len = lengthOfArrayLike(E);
  1666. if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1667. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1668. } else {
  1669. if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1670. createProperty(A, n++, E);
  1671. }
  1672. }
  1673. A.length = n;
  1674. return A;
  1675. }
  1676. });
  1677. var FunctionPrototype = Function.prototype;
  1678. var apply = FunctionPrototype.apply;
  1679. var call = FunctionPrototype.call;
  1680. // eslint-disable-next-line es-x/no-reflect -- safe
  1681. var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
  1682. return call.apply(apply, arguments);
  1683. });
  1684. var floor = Math.floor;
  1685. var charAt = functionUncurryThis(''.charAt);
  1686. var replace = functionUncurryThis(''.replace);
  1687. var stringSlice$1 = functionUncurryThis(''.slice);
  1688. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  1689. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  1690. // `GetSubstitution` abstract operation
  1691. // https://tc39.es/ecma262/#sec-getsubstitution
  1692. var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
  1693. var tailPos = position + matched.length;
  1694. var m = captures.length;
  1695. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  1696. if (namedCaptures !== undefined) {
  1697. namedCaptures = toObject(namedCaptures);
  1698. symbols = SUBSTITUTION_SYMBOLS;
  1699. }
  1700. return replace(replacement, symbols, function (match, ch) {
  1701. var capture;
  1702. switch (charAt(ch, 0)) {
  1703. case '$': return '$';
  1704. case '&': return matched;
  1705. case '`': return stringSlice$1(str, 0, position);
  1706. case "'": return stringSlice$1(str, tailPos);
  1707. case '<':
  1708. capture = namedCaptures[stringSlice$1(ch, 1, -1)];
  1709. break;
  1710. default: // \d\d?
  1711. var n = +ch;
  1712. if (n === 0) return match;
  1713. if (n > m) {
  1714. var f = floor(n / 10);
  1715. if (f === 0) return match;
  1716. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  1717. return match;
  1718. }
  1719. capture = captures[n - 1];
  1720. }
  1721. return capture === undefined ? '' : capture;
  1722. });
  1723. };
  1724. var REPLACE = wellKnownSymbol('replace');
  1725. var max = Math.max;
  1726. var min = Math.min;
  1727. var concat = functionUncurryThis([].concat);
  1728. var push = functionUncurryThis([].push);
  1729. var stringIndexOf = functionUncurryThis(''.indexOf);
  1730. var stringSlice = functionUncurryThis(''.slice);
  1731. var maybeToString = function (it) {
  1732. return it === undefined ? it : String(it);
  1733. };
  1734. // IE <= 11 replaces $0 with the whole match, as if it was $&
  1735. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  1736. var REPLACE_KEEPS_$0 = (function () {
  1737. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  1738. return 'a'.replace(/./, '$0') === '$0';
  1739. })();
  1740. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  1741. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  1742. if (/./[REPLACE]) {
  1743. return /./[REPLACE]('a', '$0') === '';
  1744. }
  1745. return false;
  1746. })();
  1747. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  1748. var re = /./;
  1749. re.exec = function () {
  1750. var result = [];
  1751. result.groups = { a: '7' };
  1752. return result;
  1753. };
  1754. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  1755. return ''.replace(re, '$<a>') !== '7';
  1756. });
  1757. // @@replace logic
  1758. fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  1759. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  1760. return [
  1761. // `String.prototype.replace` method
  1762. // https://tc39.es/ecma262/#sec-string.prototype.replace
  1763. function replace(searchValue, replaceValue) {
  1764. var O = requireObjectCoercible(this);
  1765. var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
  1766. return replacer
  1767. ? functionCall(replacer, searchValue, O, replaceValue)
  1768. : functionCall(nativeReplace, toString_1(O), searchValue, replaceValue);
  1769. },
  1770. // `RegExp.prototype[@@replace]` method
  1771. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  1772. function (string, replaceValue) {
  1773. var rx = anObject(this);
  1774. var S = toString_1(string);
  1775. if (
  1776. typeof replaceValue == 'string' &&
  1777. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  1778. stringIndexOf(replaceValue, '$<') === -1
  1779. ) {
  1780. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  1781. if (res.done) return res.value;
  1782. }
  1783. var functionalReplace = isCallable(replaceValue);
  1784. if (!functionalReplace) replaceValue = toString_1(replaceValue);
  1785. var global = rx.global;
  1786. if (global) {
  1787. var fullUnicode = rx.unicode;
  1788. rx.lastIndex = 0;
  1789. }
  1790. var results = [];
  1791. while (true) {
  1792. var result = regexpExecAbstract(rx, S);
  1793. if (result === null) break;
  1794. push(results, result);
  1795. if (!global) break;
  1796. var matchStr = toString_1(result[0]);
  1797. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  1798. }
  1799. var accumulatedResult = '';
  1800. var nextSourcePosition = 0;
  1801. for (var i = 0; i < results.length; i++) {
  1802. result = results[i];
  1803. var matched = toString_1(result[0]);
  1804. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  1805. var captures = [];
  1806. // NOTE: This is equivalent to
  1807. // captures = result.slice(1).map(maybeToString)
  1808. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  1809. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  1810. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  1811. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  1812. var namedCaptures = result.groups;
  1813. if (functionalReplace) {
  1814. var replacerArgs = concat([matched], captures, position, S);
  1815. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  1816. var replacement = toString_1(functionApply(replaceValue, undefined, replacerArgs));
  1817. } else {
  1818. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  1819. }
  1820. if (position >= nextSourcePosition) {
  1821. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  1822. nextSourcePosition = position + matched.length;
  1823. }
  1824. }
  1825. return accumulatedResult + stringSlice(S, nextSourcePosition);
  1826. }
  1827. ];
  1828. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  1829. /**
  1830. * @author: general
  1831. * @website: note.generals.space
  1832. * @email: generals.space@gmail.com
  1833. * @github: https://github.com/generals-space/bootstrap-table-addrbar
  1834. * @update: zhixin wen <wenzhixin2010@gmail.com>
  1835. */
  1836. /*
  1837. * function: 获取浏览器地址栏中的指定参数.
  1838. * key: 参数名
  1839. * url: 默认为当前地址栏
  1840. */
  1841. function _GET(key) {
  1842. var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.search;
  1843. /*
  1844. * 注意这里正则表达式的书写方法
  1845. * (^|&)key匹配: 直接以key开始或以&key开始的字符串
  1846. * 同理(&|$)表示以&结束或是直接结束的字符串
  1847. * ...当然, 我并不知道这种用法.
  1848. */
  1849. var reg = new RegExp("(^|&)".concat(key, "=([^&]*)(&|$)"));
  1850. var result = url.substr(1).match(reg);
  1851. if (result) {
  1852. return decodeURIComponent(result[2]);
  1853. }
  1854. return null;
  1855. }
  1856. /*
  1857. * function: 根据给定参数生成url地址
  1858. * var dic = {name: 'genreal', age: 24}
  1859. * var url = 'https://www.baidu.com?age=22';
  1860. * _buildUrl(dic, url);
  1861. * 将得到"https://www.baidu.com?age=24&name=genreal"
  1862. * 哦, 忽略先后顺序吧...
  1863. *
  1864. * 补充: 可以参考浏览器URLSearchParams对象, 更加方便和强大.
  1865. * 考虑到兼容性, 暂时不使用这个工具.
  1866. */
  1867. function _buildUrl(dict) {
  1868. var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window.location.search;
  1869. for (var _i = 0, _Object$entries = Object.entries(dict); _i < _Object$entries.length; _i++) {
  1870. var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
  1871. key = _Object$entries$_i[0],
  1872. val = _Object$entries$_i[1];
  1873. // 搜索name=general这种形式的字符串(&是分隔符)
  1874. var pattern = "".concat(key, "=([^&]*)");
  1875. var targetStr = "".concat(key, "=").concat(val);
  1876. if (val === undefined) continue;
  1877. /*
  1878. * 如果目标url中包含了key键, 我们需要将它替换成我们自己的val
  1879. * 不然就直接添加好了.
  1880. */
  1881. if (url.match(pattern)) {
  1882. var tmp = new RegExp("(".concat(key, "=)([^&]*)"), 'gi');
  1883. url = url.replace(tmp, targetStr);
  1884. } else {
  1885. var seperator = url.match('[?]') ? '&' : '?';
  1886. url = url + seperator + targetStr;
  1887. }
  1888. }
  1889. if (location.hash) {
  1890. url += location.hash;
  1891. }
  1892. return url;
  1893. }
  1894. /*
  1895. * function: _updateHistoryState
  1896. * var _prefix = this.options.addrPrefix || ''
  1897. * var table = this
  1898. * _updateHistoryState( table,_prefix)
  1899. * returns void
  1900. */
  1901. function _updateHistoryState(table, _prefix) {
  1902. var params = {};
  1903. params["".concat(_prefix, "page")] = table.options.pageNumber;
  1904. params["".concat(_prefix, "size")] = table.options.pageSize;
  1905. params["".concat(_prefix, "order")] = table.options.sortOrder;
  1906. params["".concat(_prefix, "sort")] = table.options.sortName;
  1907. params["".concat(_prefix, "search")] = table.options.searchText;
  1908. window.history.pushState({}, '', _buildUrl(params));
  1909. }
  1910. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1911. addrbar: false,
  1912. addrPrefix: ''
  1913. });
  1914. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1915. _inherits(_class, _$$BootstrapTable);
  1916. var _super = _createSuper(_class);
  1917. function _class() {
  1918. _classCallCheck(this, _class);
  1919. return _super.apply(this, arguments);
  1920. }
  1921. _createClass(_class, [{
  1922. key: "init",
  1923. value: function init() {
  1924. var _this = this,
  1925. _get2;
  1926. if (this.options.pagination && this.options.addrbar) {
  1927. // 标志位, 初始加载后关闭
  1928. this.addrbarInit = true;
  1929. this.options.pageNumber = +this.getDefaultOptionValue('pageNumber', 'page');
  1930. this.options.pageSize = +this.getDefaultOptionValue('pageSize', 'size');
  1931. this.options.sortOrder = this.getDefaultOptionValue('sortOrder', 'order');
  1932. this.options.sortName = this.getDefaultOptionValue('sortName', 'sort');
  1933. this.options.searchText = this.getDefaultOptionValue('searchText', 'search');
  1934. var _prefix = this.options.addrPrefix || '';
  1935. var _onLoadSuccess = this.options.onLoadSuccess;
  1936. var _onPageChange = this.options.onPageChange;
  1937. this.options.onLoadSuccess = function (data) {
  1938. if (_this.addrbarInit) {
  1939. _this.addrbarInit = false;
  1940. } else {
  1941. _updateHistoryState(_this, _prefix);
  1942. }
  1943. if (_onLoadSuccess) {
  1944. _onLoadSuccess.call(_this, data);
  1945. }
  1946. };
  1947. this.options.onPageChange = function (number, size) {
  1948. _updateHistoryState(_this, _prefix);
  1949. if (_onPageChange) {
  1950. _onPageChange.call(_this, number, size);
  1951. }
  1952. };
  1953. }
  1954. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1955. args[_key] = arguments[_key];
  1956. }
  1957. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  1958. }
  1959. /*
  1960. * Priority order:
  1961. * The value specified by the user has the highest priority.
  1962. * If it is not specified, it will be obtained from the address bar.
  1963. * If it is not obtained, the default value will be used.
  1964. */
  1965. }, {
  1966. key: "getDefaultOptionValue",
  1967. value: function getDefaultOptionValue(optionName, prefixName) {
  1968. if (this.options[optionName] !== $__default["default"].BootstrapTable.DEFAULTS[optionName]) {
  1969. return this.options[optionName];
  1970. }
  1971. return _GET("".concat(this.options.addrPrefix || '').concat(prefixName)) || $__default["default"].BootstrapTable.DEFAULTS[optionName];
  1972. }
  1973. }]);
  1974. return _class;
  1975. }($__default["default"].BootstrapTable);
  1976. }));