bootstrap-table-editable.js 89 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564
  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 ($$6) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($$6);
  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.bind() : 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 ? Object.setPrototypeOf.bind() : 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.bind();
  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. function _createForOfIteratorHelper(o, allowArrayLike) {
  168. var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
  169. if (!it) {
  170. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  171. if (it) o = it;
  172. var i = 0;
  173. var F = function () {};
  174. return {
  175. s: F,
  176. n: function () {
  177. if (i >= o.length) return {
  178. done: true
  179. };
  180. return {
  181. done: false,
  182. value: o[i++]
  183. };
  184. },
  185. e: function (e) {
  186. throw e;
  187. },
  188. f: F
  189. };
  190. }
  191. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  192. }
  193. var normalCompletion = true,
  194. didErr = false,
  195. err;
  196. return {
  197. s: function () {
  198. it = it.call(o);
  199. },
  200. n: function () {
  201. var step = it.next();
  202. normalCompletion = step.done;
  203. return step;
  204. },
  205. e: function (e) {
  206. didErr = true;
  207. err = e;
  208. },
  209. f: function () {
  210. try {
  211. if (!normalCompletion && it.return != null) it.return();
  212. } finally {
  213. if (didErr) throw err;
  214. }
  215. }
  216. };
  217. }
  218. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  219. var check = function (it) {
  220. return it && it.Math == Math && it;
  221. };
  222. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  223. var global$d =
  224. // eslint-disable-next-line es/no-global-this -- safe
  225. check(typeof globalThis == 'object' && globalThis) ||
  226. check(typeof window == 'object' && window) ||
  227. // eslint-disable-next-line no-restricted-globals -- safe
  228. check(typeof self == 'object' && self) ||
  229. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  230. // eslint-disable-next-line no-new-func -- fallback
  231. (function () { return this; })() || Function('return this')();
  232. var objectGetOwnPropertyDescriptor = {};
  233. var fails$h = function (exec) {
  234. try {
  235. return !!exec();
  236. } catch (error) {
  237. return true;
  238. }
  239. };
  240. var fails$g = fails$h;
  241. // Detect IE8's incomplete defineProperty implementation
  242. var descriptors = !fails$g(function () {
  243. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  244. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  245. });
  246. var fails$f = fails$h;
  247. var functionBindNative = !fails$f(function () {
  248. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  249. var test = (function () { /* empty */ }).bind();
  250. // eslint-disable-next-line no-prototype-builtins -- safe
  251. return typeof test != 'function' || test.hasOwnProperty('prototype');
  252. });
  253. var NATIVE_BIND$3 = functionBindNative;
  254. var call$8 = Function.prototype.call;
  255. var functionCall = NATIVE_BIND$3 ? call$8.bind(call$8) : function () {
  256. return call$8.apply(call$8, arguments);
  257. };
  258. var objectPropertyIsEnumerable = {};
  259. var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
  260. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  261. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  262. // Nashorn ~ JDK8 bug
  263. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
  264. // `Object.prototype.propertyIsEnumerable` method implementation
  265. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  266. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  267. var descriptor = getOwnPropertyDescriptor$1(this, V);
  268. return !!descriptor && descriptor.enumerable;
  269. } : $propertyIsEnumerable$1;
  270. var createPropertyDescriptor$3 = function (bitmap, value) {
  271. return {
  272. enumerable: !(bitmap & 1),
  273. configurable: !(bitmap & 2),
  274. writable: !(bitmap & 4),
  275. value: value
  276. };
  277. };
  278. var NATIVE_BIND$2 = functionBindNative;
  279. var FunctionPrototype$2 = Function.prototype;
  280. var call$7 = FunctionPrototype$2.call;
  281. var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$7, call$7);
  282. var functionUncurryThisRaw = function (fn) {
  283. return NATIVE_BIND$2 ? uncurryThisWithBind(fn) : function () {
  284. return call$7.apply(fn, arguments);
  285. };
  286. };
  287. var uncurryThisRaw$1 = functionUncurryThisRaw;
  288. var toString$6 = uncurryThisRaw$1({}.toString);
  289. var stringSlice$4 = uncurryThisRaw$1(''.slice);
  290. var classofRaw$2 = function (it) {
  291. return stringSlice$4(toString$6(it), 8, -1);
  292. };
  293. var classofRaw$1 = classofRaw$2;
  294. var uncurryThisRaw = functionUncurryThisRaw;
  295. var functionUncurryThis = function (fn) {
  296. // Nashorn bug:
  297. // https://github.com/zloirock/core-js/issues/1128
  298. // https://github.com/zloirock/core-js/issues/1130
  299. if (classofRaw$1(fn) === 'Function') return uncurryThisRaw(fn);
  300. };
  301. var uncurryThis$h = functionUncurryThis;
  302. var fails$e = fails$h;
  303. var classof$6 = classofRaw$2;
  304. var $Object$3 = Object;
  305. var split = uncurryThis$h(''.split);
  306. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  307. var indexedObject = fails$e(function () {
  308. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  309. // eslint-disable-next-line no-prototype-builtins -- safe
  310. return !$Object$3('z').propertyIsEnumerable(0);
  311. }) ? function (it) {
  312. return classof$6(it) == 'String' ? split(it, '') : $Object$3(it);
  313. } : $Object$3;
  314. // we can't use just `it == null` since of `document.all` special case
  315. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  316. var isNullOrUndefined$3 = function (it) {
  317. return it === null || it === undefined;
  318. };
  319. var isNullOrUndefined$2 = isNullOrUndefined$3;
  320. var $TypeError$7 = TypeError;
  321. // `RequireObjectCoercible` abstract operation
  322. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  323. var requireObjectCoercible$4 = function (it) {
  324. if (isNullOrUndefined$2(it)) throw $TypeError$7("Can't call method on " + it);
  325. return it;
  326. };
  327. // toObject with fallback for non-array-like ES3 strings
  328. var IndexedObject$2 = indexedObject;
  329. var requireObjectCoercible$3 = requireObjectCoercible$4;
  330. var toIndexedObject$6 = function (it) {
  331. return IndexedObject$2(requireObjectCoercible$3(it));
  332. };
  333. var documentAll$2 = typeof document == 'object' && document.all;
  334. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  335. var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
  336. var documentAll_1 = {
  337. all: documentAll$2,
  338. IS_HTMLDDA: IS_HTMLDDA
  339. };
  340. var $documentAll$1 = documentAll_1;
  341. var documentAll$1 = $documentAll$1.all;
  342. // `IsCallable` abstract operation
  343. // https://tc39.es/ecma262/#sec-iscallable
  344. var isCallable$e = $documentAll$1.IS_HTMLDDA ? function (argument) {
  345. return typeof argument == 'function' || argument === documentAll$1;
  346. } : function (argument) {
  347. return typeof argument == 'function';
  348. };
  349. var isCallable$d = isCallable$e;
  350. var $documentAll = documentAll_1;
  351. var documentAll = $documentAll.all;
  352. var isObject$7 = $documentAll.IS_HTMLDDA ? function (it) {
  353. return typeof it == 'object' ? it !== null : isCallable$d(it) || it === documentAll;
  354. } : function (it) {
  355. return typeof it == 'object' ? it !== null : isCallable$d(it);
  356. };
  357. var global$c = global$d;
  358. var isCallable$c = isCallable$e;
  359. var aFunction = function (argument) {
  360. return isCallable$c(argument) ? argument : undefined;
  361. };
  362. var getBuiltIn$5 = function (namespace, method) {
  363. return arguments.length < 2 ? aFunction(global$c[namespace]) : global$c[namespace] && global$c[namespace][method];
  364. };
  365. var uncurryThis$g = functionUncurryThis;
  366. var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
  367. var getBuiltIn$4 = getBuiltIn$5;
  368. var engineUserAgent = getBuiltIn$4('navigator', 'userAgent') || '';
  369. var global$b = global$d;
  370. var userAgent = engineUserAgent;
  371. var process = global$b.process;
  372. var Deno = global$b.Deno;
  373. var versions = process && process.versions || Deno && Deno.version;
  374. var v8 = versions && versions.v8;
  375. var match, version;
  376. if (v8) {
  377. match = v8.split('.');
  378. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  379. // but their correct versions are not interesting for us
  380. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  381. }
  382. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  383. // so check `userAgent` even if `.v8` exists, but 0
  384. if (!version && userAgent) {
  385. match = userAgent.match(/Edge\/(\d+)/);
  386. if (!match || match[1] >= 74) {
  387. match = userAgent.match(/Chrome\/(\d+)/);
  388. if (match) version = +match[1];
  389. }
  390. }
  391. var engineV8Version = version;
  392. /* eslint-disable es/no-symbol -- required for testing */
  393. var V8_VERSION$2 = engineV8Version;
  394. var fails$d = fails$h;
  395. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  396. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
  397. var symbol = Symbol();
  398. // Chrome 38 Symbol has incorrect toString conversion
  399. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  400. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  401. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  402. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  403. });
  404. /* eslint-disable es/no-symbol -- required for testing */
  405. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  406. var useSymbolAsUid = NATIVE_SYMBOL$1
  407. && !Symbol.sham
  408. && typeof Symbol.iterator == 'symbol';
  409. var getBuiltIn$3 = getBuiltIn$5;
  410. var isCallable$b = isCallable$e;
  411. var isPrototypeOf = objectIsPrototypeOf;
  412. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  413. var $Object$2 = Object;
  414. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  415. return typeof it == 'symbol';
  416. } : function (it) {
  417. var $Symbol = getBuiltIn$3('Symbol');
  418. return isCallable$b($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
  419. };
  420. var $String$2 = String;
  421. var tryToString$1 = function (argument) {
  422. try {
  423. return $String$2(argument);
  424. } catch (error) {
  425. return 'Object';
  426. }
  427. };
  428. var isCallable$a = isCallable$e;
  429. var tryToString = tryToString$1;
  430. var $TypeError$6 = TypeError;
  431. // `Assert: IsCallable(argument) is true`
  432. var aCallable$2 = function (argument) {
  433. if (isCallable$a(argument)) return argument;
  434. throw $TypeError$6(tryToString(argument) + ' is not a function');
  435. };
  436. var aCallable$1 = aCallable$2;
  437. var isNullOrUndefined$1 = isNullOrUndefined$3;
  438. // `GetMethod` abstract operation
  439. // https://tc39.es/ecma262/#sec-getmethod
  440. var getMethod$2 = function (V, P) {
  441. var func = V[P];
  442. return isNullOrUndefined$1(func) ? undefined : aCallable$1(func);
  443. };
  444. var call$6 = functionCall;
  445. var isCallable$9 = isCallable$e;
  446. var isObject$6 = isObject$7;
  447. var $TypeError$5 = TypeError;
  448. // `OrdinaryToPrimitive` abstract operation
  449. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  450. var ordinaryToPrimitive$1 = function (input, pref) {
  451. var fn, val;
  452. if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$6(fn, input))) return val;
  453. if (isCallable$9(fn = input.valueOf) && !isObject$6(val = call$6(fn, input))) return val;
  454. if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$6(val = call$6(fn, input))) return val;
  455. throw $TypeError$5("Can't convert object to primitive value");
  456. };
  457. var shared$4 = {exports: {}};
  458. var global$a = global$d;
  459. // eslint-disable-next-line es/no-object-defineproperty -- safe
  460. var defineProperty$2 = Object.defineProperty;
  461. var defineGlobalProperty$3 = function (key, value) {
  462. try {
  463. defineProperty$2(global$a, key, { value: value, configurable: true, writable: true });
  464. } catch (error) {
  465. global$a[key] = value;
  466. } return value;
  467. };
  468. var global$9 = global$d;
  469. var defineGlobalProperty$2 = defineGlobalProperty$3;
  470. var SHARED = '__core-js_shared__';
  471. var store$3 = global$9[SHARED] || defineGlobalProperty$2(SHARED, {});
  472. var sharedStore = store$3;
  473. var store$2 = sharedStore;
  474. (shared$4.exports = function (key, value) {
  475. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  476. })('versions', []).push({
  477. version: '3.25.5',
  478. mode: 'global',
  479. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  480. license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
  481. source: 'https://github.com/zloirock/core-js'
  482. });
  483. var requireObjectCoercible$2 = requireObjectCoercible$4;
  484. var $Object$1 = Object;
  485. // `ToObject` abstract operation
  486. // https://tc39.es/ecma262/#sec-toobject
  487. var toObject$4 = function (argument) {
  488. return $Object$1(requireObjectCoercible$2(argument));
  489. };
  490. var uncurryThis$f = functionUncurryThis;
  491. var toObject$3 = toObject$4;
  492. var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
  493. // `HasOwnProperty` abstract operation
  494. // https://tc39.es/ecma262/#sec-hasownproperty
  495. // eslint-disable-next-line es/no-object-hasown -- safe
  496. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  497. return hasOwnProperty(toObject$3(it), key);
  498. };
  499. var uncurryThis$e = functionUncurryThis;
  500. var id = 0;
  501. var postfix = Math.random();
  502. var toString$5 = uncurryThis$e(1.0.toString);
  503. var uid$2 = function (key) {
  504. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
  505. };
  506. var global$8 = global$d;
  507. var shared$3 = shared$4.exports;
  508. var hasOwn$6 = hasOwnProperty_1;
  509. var uid$1 = uid$2;
  510. var NATIVE_SYMBOL = symbolConstructorDetection;
  511. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  512. var WellKnownSymbolsStore = shared$3('wks');
  513. var Symbol$1 = global$8.Symbol;
  514. var symbolFor = Symbol$1 && Symbol$1['for'];
  515. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
  516. var wellKnownSymbol$9 = function (name) {
  517. if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  518. var description = 'Symbol.' + name;
  519. if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
  520. WellKnownSymbolsStore[name] = Symbol$1[name];
  521. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  522. WellKnownSymbolsStore[name] = symbolFor(description);
  523. } else {
  524. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  525. }
  526. } return WellKnownSymbolsStore[name];
  527. };
  528. var call$5 = functionCall;
  529. var isObject$5 = isObject$7;
  530. var isSymbol$1 = isSymbol$2;
  531. var getMethod$1 = getMethod$2;
  532. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  533. var wellKnownSymbol$8 = wellKnownSymbol$9;
  534. var $TypeError$4 = TypeError;
  535. var TO_PRIMITIVE = wellKnownSymbol$8('toPrimitive');
  536. // `ToPrimitive` abstract operation
  537. // https://tc39.es/ecma262/#sec-toprimitive
  538. var toPrimitive$1 = function (input, pref) {
  539. if (!isObject$5(input) || isSymbol$1(input)) return input;
  540. var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
  541. var result;
  542. if (exoticToPrim) {
  543. if (pref === undefined) pref = 'default';
  544. result = call$5(exoticToPrim, input, pref);
  545. if (!isObject$5(result) || isSymbol$1(result)) return result;
  546. throw $TypeError$4("Can't convert object to primitive value");
  547. }
  548. if (pref === undefined) pref = 'number';
  549. return ordinaryToPrimitive(input, pref);
  550. };
  551. var toPrimitive = toPrimitive$1;
  552. var isSymbol = isSymbol$2;
  553. // `ToPropertyKey` abstract operation
  554. // https://tc39.es/ecma262/#sec-topropertykey
  555. var toPropertyKey$3 = function (argument) {
  556. var key = toPrimitive(argument, 'string');
  557. return isSymbol(key) ? key : key + '';
  558. };
  559. var global$7 = global$d;
  560. var isObject$4 = isObject$7;
  561. var document$1 = global$7.document;
  562. // typeof document.createElement is 'object' in old IE
  563. var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
  564. var documentCreateElement$1 = function (it) {
  565. return EXISTS$1 ? document$1.createElement(it) : {};
  566. };
  567. var DESCRIPTORS$8 = descriptors;
  568. var fails$c = fails$h;
  569. var createElement = documentCreateElement$1;
  570. // Thanks to IE8 for its funny defineProperty
  571. var ie8DomDefine = !DESCRIPTORS$8 && !fails$c(function () {
  572. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  573. return Object.defineProperty(createElement('div'), 'a', {
  574. get: function () { return 7; }
  575. }).a != 7;
  576. });
  577. var DESCRIPTORS$7 = descriptors;
  578. var call$4 = functionCall;
  579. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  580. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  581. var toIndexedObject$5 = toIndexedObject$6;
  582. var toPropertyKey$2 = toPropertyKey$3;
  583. var hasOwn$5 = hasOwnProperty_1;
  584. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  585. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  586. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  587. // `Object.getOwnPropertyDescriptor` method
  588. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  589. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  590. O = toIndexedObject$5(O);
  591. P = toPropertyKey$2(P);
  592. if (IE8_DOM_DEFINE$1) try {
  593. return $getOwnPropertyDescriptor$1(O, P);
  594. } catch (error) { /* empty */ }
  595. if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call$4(propertyIsEnumerableModule.f, O, P), O[P]);
  596. };
  597. var objectDefineProperty = {};
  598. var DESCRIPTORS$6 = descriptors;
  599. var fails$b = fails$h;
  600. // V8 ~ Chrome 36-
  601. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  602. var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$b(function () {
  603. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  604. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  605. value: 42,
  606. writable: false
  607. }).prototype != 42;
  608. });
  609. var isObject$3 = isObject$7;
  610. var $String$1 = String;
  611. var $TypeError$3 = TypeError;
  612. // `Assert: Type(argument) is Object`
  613. var anObject$7 = function (argument) {
  614. if (isObject$3(argument)) return argument;
  615. throw $TypeError$3($String$1(argument) + ' is not an object');
  616. };
  617. var DESCRIPTORS$5 = descriptors;
  618. var IE8_DOM_DEFINE = ie8DomDefine;
  619. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  620. var anObject$6 = anObject$7;
  621. var toPropertyKey$1 = toPropertyKey$3;
  622. var $TypeError$2 = TypeError;
  623. // eslint-disable-next-line es/no-object-defineproperty -- safe
  624. var $defineProperty = Object.defineProperty;
  625. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  626. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  627. var ENUMERABLE = 'enumerable';
  628. var CONFIGURABLE$1 = 'configurable';
  629. var WRITABLE = 'writable';
  630. // `Object.defineProperty` method
  631. // https://tc39.es/ecma262/#sec-object.defineproperty
  632. objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  633. anObject$6(O);
  634. P = toPropertyKey$1(P);
  635. anObject$6(Attributes);
  636. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  637. var current = $getOwnPropertyDescriptor(O, P);
  638. if (current && current[WRITABLE]) {
  639. O[P] = Attributes.value;
  640. Attributes = {
  641. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  642. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  643. writable: false
  644. };
  645. }
  646. } return $defineProperty(O, P, Attributes);
  647. } : $defineProperty : function defineProperty(O, P, Attributes) {
  648. anObject$6(O);
  649. P = toPropertyKey$1(P);
  650. anObject$6(Attributes);
  651. if (IE8_DOM_DEFINE) try {
  652. return $defineProperty(O, P, Attributes);
  653. } catch (error) { /* empty */ }
  654. if ('get' in Attributes || 'set' in Attributes) throw $TypeError$2('Accessors not supported');
  655. if ('value' in Attributes) O[P] = Attributes.value;
  656. return O;
  657. };
  658. var DESCRIPTORS$4 = descriptors;
  659. var definePropertyModule$4 = objectDefineProperty;
  660. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  661. var createNonEnumerableProperty$3 = DESCRIPTORS$4 ? function (object, key, value) {
  662. return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
  663. } : function (object, key, value) {
  664. object[key] = value;
  665. return object;
  666. };
  667. var makeBuiltIn$2 = {exports: {}};
  668. var DESCRIPTORS$3 = descriptors;
  669. var hasOwn$4 = hasOwnProperty_1;
  670. var FunctionPrototype$1 = Function.prototype;
  671. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  672. var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
  673. var EXISTS = hasOwn$4(FunctionPrototype$1, 'name');
  674. // additional protection from minified / mangled / dropped function names
  675. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  676. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  677. var functionName = {
  678. EXISTS: EXISTS,
  679. PROPER: PROPER,
  680. CONFIGURABLE: CONFIGURABLE
  681. };
  682. var uncurryThis$d = functionUncurryThis;
  683. var isCallable$8 = isCallable$e;
  684. var store$1 = sharedStore;
  685. var functionToString = uncurryThis$d(Function.toString);
  686. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  687. if (!isCallable$8(store$1.inspectSource)) {
  688. store$1.inspectSource = function (it) {
  689. return functionToString(it);
  690. };
  691. }
  692. var inspectSource$2 = store$1.inspectSource;
  693. var global$6 = global$d;
  694. var isCallable$7 = isCallable$e;
  695. var WeakMap$1 = global$6.WeakMap;
  696. var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
  697. var shared$2 = shared$4.exports;
  698. var uid = uid$2;
  699. var keys = shared$2('keys');
  700. var sharedKey$2 = function (key) {
  701. return keys[key] || (keys[key] = uid(key));
  702. };
  703. var hiddenKeys$4 = {};
  704. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  705. var global$5 = global$d;
  706. var isObject$2 = isObject$7;
  707. var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
  708. var hasOwn$3 = hasOwnProperty_1;
  709. var shared$1 = sharedStore;
  710. var sharedKey$1 = sharedKey$2;
  711. var hiddenKeys$3 = hiddenKeys$4;
  712. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  713. var TypeError$1 = global$5.TypeError;
  714. var WeakMap = global$5.WeakMap;
  715. var set, get, has;
  716. var enforce = function (it) {
  717. return has(it) ? get(it) : set(it, {});
  718. };
  719. var getterFor = function (TYPE) {
  720. return function (it) {
  721. var state;
  722. if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
  723. throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  724. } return state;
  725. };
  726. };
  727. if (NATIVE_WEAK_MAP || shared$1.state) {
  728. var store = shared$1.state || (shared$1.state = new WeakMap());
  729. /* eslint-disable no-self-assign -- prototype methods protection */
  730. store.get = store.get;
  731. store.has = store.has;
  732. store.set = store.set;
  733. /* eslint-enable no-self-assign -- prototype methods protection */
  734. set = function (it, metadata) {
  735. if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
  736. metadata.facade = it;
  737. store.set(it, metadata);
  738. return metadata;
  739. };
  740. get = function (it) {
  741. return store.get(it) || {};
  742. };
  743. has = function (it) {
  744. return store.has(it);
  745. };
  746. } else {
  747. var STATE = sharedKey$1('state');
  748. hiddenKeys$3[STATE] = true;
  749. set = function (it, metadata) {
  750. if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
  751. metadata.facade = it;
  752. createNonEnumerableProperty$2(it, STATE, metadata);
  753. return metadata;
  754. };
  755. get = function (it) {
  756. return hasOwn$3(it, STATE) ? it[STATE] : {};
  757. };
  758. has = function (it) {
  759. return hasOwn$3(it, STATE);
  760. };
  761. }
  762. var internalState = {
  763. set: set,
  764. get: get,
  765. has: has,
  766. enforce: enforce,
  767. getterFor: getterFor
  768. };
  769. var fails$a = fails$h;
  770. var isCallable$6 = isCallable$e;
  771. var hasOwn$2 = hasOwnProperty_1;
  772. var DESCRIPTORS$2 = descriptors;
  773. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  774. var inspectSource$1 = inspectSource$2;
  775. var InternalStateModule = internalState;
  776. var enforceInternalState = InternalStateModule.enforce;
  777. var getInternalState$1 = InternalStateModule.get;
  778. // eslint-disable-next-line es/no-object-defineproperty -- safe
  779. var defineProperty$1 = Object.defineProperty;
  780. var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$a(function () {
  781. return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  782. });
  783. var TEMPLATE = String(String).split('String');
  784. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  785. if (String(name).slice(0, 7) === 'Symbol(') {
  786. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  787. }
  788. if (options && options.getter) name = 'get ' + name;
  789. if (options && options.setter) name = 'set ' + name;
  790. if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  791. if (DESCRIPTORS$2) defineProperty$1(value, 'name', { value: name, configurable: true });
  792. else value.name = name;
  793. }
  794. if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
  795. defineProperty$1(value, 'length', { value: options.arity });
  796. }
  797. try {
  798. if (options && hasOwn$2(options, 'constructor') && options.constructor) {
  799. if (DESCRIPTORS$2) defineProperty$1(value, 'prototype', { writable: false });
  800. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  801. } else if (value.prototype) value.prototype = undefined;
  802. } catch (error) { /* empty */ }
  803. var state = enforceInternalState(value);
  804. if (!hasOwn$2(state, 'source')) {
  805. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  806. } return value;
  807. };
  808. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  809. // eslint-disable-next-line no-extend-native -- required
  810. Function.prototype.toString = makeBuiltIn$1(function toString() {
  811. return isCallable$6(this) && getInternalState$1(this).source || inspectSource$1(this);
  812. }, 'toString');
  813. var isCallable$5 = isCallable$e;
  814. var definePropertyModule$3 = objectDefineProperty;
  815. var makeBuiltIn = makeBuiltIn$2.exports;
  816. var defineGlobalProperty$1 = defineGlobalProperty$3;
  817. var defineBuiltIn$3 = function (O, key, value, options) {
  818. if (!options) options = {};
  819. var simple = options.enumerable;
  820. var name = options.name !== undefined ? options.name : key;
  821. if (isCallable$5(value)) makeBuiltIn(value, name, options);
  822. if (options.global) {
  823. if (simple) O[key] = value;
  824. else defineGlobalProperty$1(key, value);
  825. } else {
  826. try {
  827. if (!options.unsafe) delete O[key];
  828. else if (O[key]) simple = true;
  829. } catch (error) { /* empty */ }
  830. if (simple) O[key] = value;
  831. else definePropertyModule$3.f(O, key, {
  832. value: value,
  833. enumerable: false,
  834. configurable: !options.nonConfigurable,
  835. writable: !options.nonWritable
  836. });
  837. } return O;
  838. };
  839. var objectGetOwnPropertyNames = {};
  840. var ceil = Math.ceil;
  841. var floor$1 = Math.floor;
  842. // `Math.trunc` method
  843. // https://tc39.es/ecma262/#sec-math.trunc
  844. // eslint-disable-next-line es/no-math-trunc -- safe
  845. var mathTrunc = Math.trunc || function trunc(x) {
  846. var n = +x;
  847. return (n > 0 ? floor$1 : ceil)(n);
  848. };
  849. var trunc = mathTrunc;
  850. // `ToIntegerOrInfinity` abstract operation
  851. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  852. var toIntegerOrInfinity$4 = function (argument) {
  853. var number = +argument;
  854. // eslint-disable-next-line no-self-compare -- NaN check
  855. return number !== number || number === 0 ? 0 : trunc(number);
  856. };
  857. var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
  858. var max$1 = Math.max;
  859. var min$2 = Math.min;
  860. // Helper for a popular repeating case of the spec:
  861. // Let integer be ? ToInteger(index).
  862. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  863. var toAbsoluteIndex$1 = function (index, length) {
  864. var integer = toIntegerOrInfinity$3(index);
  865. return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
  866. };
  867. var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
  868. var min$1 = Math.min;
  869. // `ToLength` abstract operation
  870. // https://tc39.es/ecma262/#sec-tolength
  871. var toLength$2 = function (argument) {
  872. return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  873. };
  874. var toLength$1 = toLength$2;
  875. // `LengthOfArrayLike` abstract operation
  876. // https://tc39.es/ecma262/#sec-lengthofarraylike
  877. var lengthOfArrayLike$3 = function (obj) {
  878. return toLength$1(obj.length);
  879. };
  880. var toIndexedObject$4 = toIndexedObject$6;
  881. var toAbsoluteIndex = toAbsoluteIndex$1;
  882. var lengthOfArrayLike$2 = lengthOfArrayLike$3;
  883. // `Array.prototype.{ indexOf, includes }` methods implementation
  884. var createMethod$3 = function (IS_INCLUDES) {
  885. return function ($this, el, fromIndex) {
  886. var O = toIndexedObject$4($this);
  887. var length = lengthOfArrayLike$2(O);
  888. var index = toAbsoluteIndex(fromIndex, length);
  889. var value;
  890. // Array#includes uses SameValueZero equality algorithm
  891. // eslint-disable-next-line no-self-compare -- NaN check
  892. if (IS_INCLUDES && el != el) while (length > index) {
  893. value = O[index++];
  894. // eslint-disable-next-line no-self-compare -- NaN check
  895. if (value != value) return true;
  896. // Array#indexOf ignores holes, Array#includes - not
  897. } else for (;length > index; index++) {
  898. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  899. } return !IS_INCLUDES && -1;
  900. };
  901. };
  902. var arrayIncludes = {
  903. // `Array.prototype.includes` method
  904. // https://tc39.es/ecma262/#sec-array.prototype.includes
  905. includes: createMethod$3(true),
  906. // `Array.prototype.indexOf` method
  907. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  908. indexOf: createMethod$3(false)
  909. };
  910. var uncurryThis$c = functionUncurryThis;
  911. var hasOwn$1 = hasOwnProperty_1;
  912. var toIndexedObject$3 = toIndexedObject$6;
  913. var indexOf$1 = arrayIncludes.indexOf;
  914. var hiddenKeys$2 = hiddenKeys$4;
  915. var push$3 = uncurryThis$c([].push);
  916. var objectKeysInternal = function (object, names) {
  917. var O = toIndexedObject$3(object);
  918. var i = 0;
  919. var result = [];
  920. var key;
  921. for (key in O) !hasOwn$1(hiddenKeys$2, key) && hasOwn$1(O, key) && push$3(result, key);
  922. // Don't enum bug & hidden keys
  923. while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
  924. ~indexOf$1(result, key) || push$3(result, key);
  925. }
  926. return result;
  927. };
  928. // IE8- don't enum bug keys
  929. var enumBugKeys$3 = [
  930. 'constructor',
  931. 'hasOwnProperty',
  932. 'isPrototypeOf',
  933. 'propertyIsEnumerable',
  934. 'toLocaleString',
  935. 'toString',
  936. 'valueOf'
  937. ];
  938. var internalObjectKeys$1 = objectKeysInternal;
  939. var enumBugKeys$2 = enumBugKeys$3;
  940. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  941. // `Object.getOwnPropertyNames` method
  942. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  943. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  944. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  945. return internalObjectKeys$1(O, hiddenKeys$1);
  946. };
  947. var objectGetOwnPropertySymbols = {};
  948. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  949. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  950. var getBuiltIn$2 = getBuiltIn$5;
  951. var uncurryThis$b = functionUncurryThis;
  952. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  953. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  954. var anObject$5 = anObject$7;
  955. var concat$1 = uncurryThis$b([].concat);
  956. // all object keys, includes non-enumerable and symbols
  957. var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
  958. var keys = getOwnPropertyNamesModule.f(anObject$5(it));
  959. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  960. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  961. };
  962. var hasOwn = hasOwnProperty_1;
  963. var ownKeys = ownKeys$1;
  964. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  965. var definePropertyModule$2 = objectDefineProperty;
  966. var copyConstructorProperties$1 = function (target, source, exceptions) {
  967. var keys = ownKeys(source);
  968. var defineProperty = definePropertyModule$2.f;
  969. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  970. for (var i = 0; i < keys.length; i++) {
  971. var key = keys[i];
  972. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  973. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  974. }
  975. }
  976. };
  977. var fails$9 = fails$h;
  978. var isCallable$4 = isCallable$e;
  979. var replacement = /#|\.prototype\./;
  980. var isForced$1 = function (feature, detection) {
  981. var value = data[normalize(feature)];
  982. return value == POLYFILL ? true
  983. : value == NATIVE ? false
  984. : isCallable$4(detection) ? fails$9(detection)
  985. : !!detection;
  986. };
  987. var normalize = isForced$1.normalize = function (string) {
  988. return String(string).replace(replacement, '.').toLowerCase();
  989. };
  990. var data = isForced$1.data = {};
  991. var NATIVE = isForced$1.NATIVE = 'N';
  992. var POLYFILL = isForced$1.POLYFILL = 'P';
  993. var isForced_1 = isForced$1;
  994. var global$4 = global$d;
  995. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  996. var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
  997. var defineBuiltIn$2 = defineBuiltIn$3;
  998. var defineGlobalProperty = defineGlobalProperty$3;
  999. var copyConstructorProperties = copyConstructorProperties$1;
  1000. var isForced = isForced_1;
  1001. /*
  1002. options.target - name of the target object
  1003. options.global - target is the global object
  1004. options.stat - export as static methods of target
  1005. options.proto - export as prototype methods of target
  1006. options.real - real prototype method for the `pure` version
  1007. options.forced - export even if the native feature is available
  1008. options.bind - bind methods to the target, required for the `pure` version
  1009. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  1010. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  1011. options.sham - add a flag to not completely full polyfills
  1012. options.enumerable - export as enumerable property
  1013. options.dontCallGetSet - prevent calling a getter on target
  1014. options.name - the .name of the function if it does not match the key
  1015. */
  1016. var _export = function (options, source) {
  1017. var TARGET = options.target;
  1018. var GLOBAL = options.global;
  1019. var STATIC = options.stat;
  1020. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  1021. if (GLOBAL) {
  1022. target = global$4;
  1023. } else if (STATIC) {
  1024. target = global$4[TARGET] || defineGlobalProperty(TARGET, {});
  1025. } else {
  1026. target = (global$4[TARGET] || {}).prototype;
  1027. }
  1028. if (target) for (key in source) {
  1029. sourceProperty = source[key];
  1030. if (options.dontCallGetSet) {
  1031. descriptor = getOwnPropertyDescriptor(target, key);
  1032. targetProperty = descriptor && descriptor.value;
  1033. } else targetProperty = target[key];
  1034. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  1035. // contained in target
  1036. if (!FORCED && targetProperty !== undefined) {
  1037. if (typeof sourceProperty == typeof targetProperty) continue;
  1038. copyConstructorProperties(sourceProperty, targetProperty);
  1039. }
  1040. // add a flag to not completely full polyfills
  1041. if (options.sham || (targetProperty && targetProperty.sham)) {
  1042. createNonEnumerableProperty$1(sourceProperty, 'sham', true);
  1043. }
  1044. defineBuiltIn$2(target, key, sourceProperty, options);
  1045. }
  1046. };
  1047. var wellKnownSymbol$7 = wellKnownSymbol$9;
  1048. var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
  1049. var test = {};
  1050. test[TO_STRING_TAG$1] = 'z';
  1051. var toStringTagSupport = String(test) === '[object z]';
  1052. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  1053. var isCallable$3 = isCallable$e;
  1054. var classofRaw = classofRaw$2;
  1055. var wellKnownSymbol$6 = wellKnownSymbol$9;
  1056. var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
  1057. var $Object = Object;
  1058. // ES3 wrong here
  1059. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  1060. // fallback for IE11 Script Access Denied error
  1061. var tryGet = function (it, key) {
  1062. try {
  1063. return it[key];
  1064. } catch (error) { /* empty */ }
  1065. };
  1066. // getting tag from ES6+ `Object.prototype.toString`
  1067. var classof$5 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
  1068. var O, tag, result;
  1069. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1070. // @@toStringTag case
  1071. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  1072. // builtinTag case
  1073. : CORRECT_ARGUMENTS ? classofRaw(O)
  1074. // ES3 arguments fallback
  1075. : (result = classofRaw(O)) == 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
  1076. };
  1077. var classof$4 = classof$5;
  1078. var $String = String;
  1079. var toString$4 = function (argument) {
  1080. if (classof$4(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1081. return $String(argument);
  1082. };
  1083. var anObject$4 = anObject$7;
  1084. // `RegExp.prototype.flags` getter implementation
  1085. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1086. var regexpFlags$1 = function () {
  1087. var that = anObject$4(this);
  1088. var result = '';
  1089. if (that.hasIndices) result += 'd';
  1090. if (that.global) result += 'g';
  1091. if (that.ignoreCase) result += 'i';
  1092. if (that.multiline) result += 'm';
  1093. if (that.dotAll) result += 's';
  1094. if (that.unicode) result += 'u';
  1095. if (that.unicodeSets) result += 'v';
  1096. if (that.sticky) result += 'y';
  1097. return result;
  1098. };
  1099. var fails$8 = fails$h;
  1100. var global$3 = global$d;
  1101. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  1102. var $RegExp$2 = global$3.RegExp;
  1103. var UNSUPPORTED_Y$1 = fails$8(function () {
  1104. var re = $RegExp$2('a', 'y');
  1105. re.lastIndex = 2;
  1106. return re.exec('abcd') != null;
  1107. });
  1108. // UC Browser bug
  1109. // https://github.com/zloirock/core-js/issues/1008
  1110. var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$8(function () {
  1111. return !$RegExp$2('a', 'y').sticky;
  1112. });
  1113. var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$8(function () {
  1114. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  1115. var re = $RegExp$2('^r', 'gy');
  1116. re.lastIndex = 2;
  1117. return re.exec('str') != null;
  1118. });
  1119. var regexpStickyHelpers = {
  1120. BROKEN_CARET: BROKEN_CARET,
  1121. MISSED_STICKY: MISSED_STICKY,
  1122. UNSUPPORTED_Y: UNSUPPORTED_Y$1
  1123. };
  1124. var objectDefineProperties = {};
  1125. var internalObjectKeys = objectKeysInternal;
  1126. var enumBugKeys$1 = enumBugKeys$3;
  1127. // `Object.keys` method
  1128. // https://tc39.es/ecma262/#sec-object.keys
  1129. // eslint-disable-next-line es/no-object-keys -- safe
  1130. var objectKeys$2 = Object.keys || function keys(O) {
  1131. return internalObjectKeys(O, enumBugKeys$1);
  1132. };
  1133. var DESCRIPTORS$1 = descriptors;
  1134. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1135. var definePropertyModule$1 = objectDefineProperty;
  1136. var anObject$3 = anObject$7;
  1137. var toIndexedObject$2 = toIndexedObject$6;
  1138. var objectKeys$1 = objectKeys$2;
  1139. // `Object.defineProperties` method
  1140. // https://tc39.es/ecma262/#sec-object.defineproperties
  1141. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1142. objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1143. anObject$3(O);
  1144. var props = toIndexedObject$2(Properties);
  1145. var keys = objectKeys$1(Properties);
  1146. var length = keys.length;
  1147. var index = 0;
  1148. var key;
  1149. while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
  1150. return O;
  1151. };
  1152. var getBuiltIn$1 = getBuiltIn$5;
  1153. var html$1 = getBuiltIn$1('document', 'documentElement');
  1154. /* global ActiveXObject -- old IE, WSH */
  1155. var anObject$2 = anObject$7;
  1156. var definePropertiesModule = objectDefineProperties;
  1157. var enumBugKeys = enumBugKeys$3;
  1158. var hiddenKeys = hiddenKeys$4;
  1159. var html = html$1;
  1160. var documentCreateElement = documentCreateElement$1;
  1161. var sharedKey = sharedKey$2;
  1162. var GT = '>';
  1163. var LT = '<';
  1164. var PROTOTYPE = 'prototype';
  1165. var SCRIPT = 'script';
  1166. var IE_PROTO = sharedKey('IE_PROTO');
  1167. var EmptyConstructor = function () { /* empty */ };
  1168. var scriptTag = function (content) {
  1169. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1170. };
  1171. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1172. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1173. activeXDocument.write(scriptTag(''));
  1174. activeXDocument.close();
  1175. var temp = activeXDocument.parentWindow.Object;
  1176. activeXDocument = null; // avoid memory leak
  1177. return temp;
  1178. };
  1179. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1180. var NullProtoObjectViaIFrame = function () {
  1181. // Thrash, waste and sodomy: IE GC bug
  1182. var iframe = documentCreateElement('iframe');
  1183. var JS = 'java' + SCRIPT + ':';
  1184. var iframeDocument;
  1185. iframe.style.display = 'none';
  1186. html.appendChild(iframe);
  1187. // https://github.com/zloirock/core-js/issues/475
  1188. iframe.src = String(JS);
  1189. iframeDocument = iframe.contentWindow.document;
  1190. iframeDocument.open();
  1191. iframeDocument.write(scriptTag('document.F=Object'));
  1192. iframeDocument.close();
  1193. return iframeDocument.F;
  1194. };
  1195. // Check for document.domain and active x support
  1196. // No need to use active x approach when document.domain is not set
  1197. // see https://github.com/es-shims/es5-shim/issues/150
  1198. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1199. // avoid IE GC bug
  1200. var activeXDocument;
  1201. var NullProtoObject = function () {
  1202. try {
  1203. activeXDocument = new ActiveXObject('htmlfile');
  1204. } catch (error) { /* ignore */ }
  1205. NullProtoObject = typeof document != 'undefined'
  1206. ? document.domain && activeXDocument
  1207. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1208. : NullProtoObjectViaIFrame()
  1209. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1210. var length = enumBugKeys.length;
  1211. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1212. return NullProtoObject();
  1213. };
  1214. hiddenKeys[IE_PROTO] = true;
  1215. // `Object.create` method
  1216. // https://tc39.es/ecma262/#sec-object.create
  1217. // eslint-disable-next-line es/no-object-create -- safe
  1218. var objectCreate = Object.create || function create(O, Properties) {
  1219. var result;
  1220. if (O !== null) {
  1221. EmptyConstructor[PROTOTYPE] = anObject$2(O);
  1222. result = new EmptyConstructor();
  1223. EmptyConstructor[PROTOTYPE] = null;
  1224. // add "__proto__" for Object.getPrototypeOf polyfill
  1225. result[IE_PROTO] = O;
  1226. } else result = NullProtoObject();
  1227. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1228. };
  1229. var fails$7 = fails$h;
  1230. var global$2 = global$d;
  1231. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  1232. var $RegExp$1 = global$2.RegExp;
  1233. var regexpUnsupportedDotAll = fails$7(function () {
  1234. var re = $RegExp$1('.', 's');
  1235. return !(re.dotAll && re.exec('\n') && re.flags === 's');
  1236. });
  1237. var fails$6 = fails$h;
  1238. var global$1 = global$d;
  1239. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  1240. var $RegExp = global$1.RegExp;
  1241. var regexpUnsupportedNcg = fails$6(function () {
  1242. var re = $RegExp('(?<a>b)', 'g');
  1243. return re.exec('b').groups.a !== 'b' ||
  1244. 'b'.replace(re, '$<a>c') !== 'bc';
  1245. });
  1246. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  1247. /* eslint-disable regexp/no-useless-quantifier -- testing */
  1248. var call$3 = functionCall;
  1249. var uncurryThis$a = functionUncurryThis;
  1250. var toString$3 = toString$4;
  1251. var regexpFlags = regexpFlags$1;
  1252. var stickyHelpers = regexpStickyHelpers;
  1253. var shared = shared$4.exports;
  1254. var create$1 = objectCreate;
  1255. var getInternalState = internalState.get;
  1256. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  1257. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  1258. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  1259. var nativeExec = RegExp.prototype.exec;
  1260. var patchedExec = nativeExec;
  1261. var charAt$3 = uncurryThis$a(''.charAt);
  1262. var indexOf = uncurryThis$a(''.indexOf);
  1263. var replace$1 = uncurryThis$a(''.replace);
  1264. var stringSlice$3 = uncurryThis$a(''.slice);
  1265. var UPDATES_LAST_INDEX_WRONG = (function () {
  1266. var re1 = /a/;
  1267. var re2 = /b*/g;
  1268. call$3(nativeExec, re1, 'a');
  1269. call$3(nativeExec, re2, 'a');
  1270. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  1271. })();
  1272. var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
  1273. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1274. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1275. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  1276. if (PATCH) {
  1277. patchedExec = function exec(string) {
  1278. var re = this;
  1279. var state = getInternalState(re);
  1280. var str = toString$3(string);
  1281. var raw = state.raw;
  1282. var result, reCopy, lastIndex, match, i, object, group;
  1283. if (raw) {
  1284. raw.lastIndex = re.lastIndex;
  1285. result = call$3(patchedExec, raw, str);
  1286. re.lastIndex = raw.lastIndex;
  1287. return result;
  1288. }
  1289. var groups = state.groups;
  1290. var sticky = UNSUPPORTED_Y && re.sticky;
  1291. var flags = call$3(regexpFlags, re);
  1292. var source = re.source;
  1293. var charsAdded = 0;
  1294. var strCopy = str;
  1295. if (sticky) {
  1296. flags = replace$1(flags, 'y', '');
  1297. if (indexOf(flags, 'g') === -1) {
  1298. flags += 'g';
  1299. }
  1300. strCopy = stringSlice$3(str, re.lastIndex);
  1301. // Support anchored sticky behavior.
  1302. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  1303. source = '(?: ' + source + ')';
  1304. strCopy = ' ' + strCopy;
  1305. charsAdded++;
  1306. }
  1307. // ^(? + rx + ) is needed, in combination with some str slicing, to
  1308. // simulate the 'y' flag.
  1309. reCopy = new RegExp('^(?:' + source + ')', flags);
  1310. }
  1311. if (NPCG_INCLUDED) {
  1312. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  1313. }
  1314. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  1315. match = call$3(nativeExec, sticky ? reCopy : re, strCopy);
  1316. if (sticky) {
  1317. if (match) {
  1318. match.input = stringSlice$3(match.input, charsAdded);
  1319. match[0] = stringSlice$3(match[0], charsAdded);
  1320. match.index = re.lastIndex;
  1321. re.lastIndex += match[0].length;
  1322. } else re.lastIndex = 0;
  1323. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1324. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1325. }
  1326. if (NPCG_INCLUDED && match && match.length > 1) {
  1327. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1328. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  1329. call$3(nativeReplace, match[0], reCopy, function () {
  1330. for (i = 1; i < arguments.length - 2; i++) {
  1331. if (arguments[i] === undefined) match[i] = undefined;
  1332. }
  1333. });
  1334. }
  1335. if (match && groups) {
  1336. match.groups = object = create$1(null);
  1337. for (i = 0; i < groups.length; i++) {
  1338. group = groups[i];
  1339. object[group[0]] = match[group[1]];
  1340. }
  1341. }
  1342. return match;
  1343. };
  1344. }
  1345. var regexpExec$2 = patchedExec;
  1346. var $$5 = _export;
  1347. var exec$1 = regexpExec$2;
  1348. // `RegExp.prototype.exec` method
  1349. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1350. $$5({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
  1351. exec: exec$1
  1352. });
  1353. var NATIVE_BIND$1 = functionBindNative;
  1354. var FunctionPrototype = Function.prototype;
  1355. var apply$1 = FunctionPrototype.apply;
  1356. var call$2 = FunctionPrototype.call;
  1357. // eslint-disable-next-line es/no-reflect -- safe
  1358. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$2.bind(apply$1) : function () {
  1359. return call$2.apply(apply$1, arguments);
  1360. });
  1361. // TODO: Remove from `core-js@4` since it's moved to entry points
  1362. var uncurryThis$9 = functionUncurryThis;
  1363. var defineBuiltIn$1 = defineBuiltIn$3;
  1364. var regexpExec$1 = regexpExec$2;
  1365. var fails$5 = fails$h;
  1366. var wellKnownSymbol$5 = wellKnownSymbol$9;
  1367. var createNonEnumerableProperty = createNonEnumerableProperty$3;
  1368. var SPECIES$2 = wellKnownSymbol$5('species');
  1369. var RegExpPrototype = RegExp.prototype;
  1370. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  1371. var SYMBOL = wellKnownSymbol$5(KEY);
  1372. var DELEGATES_TO_SYMBOL = !fails$5(function () {
  1373. // String methods call symbol-named RegEp methods
  1374. var O = {};
  1375. O[SYMBOL] = function () { return 7; };
  1376. return ''[KEY](O) != 7;
  1377. });
  1378. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$5(function () {
  1379. // Symbol-named RegExp methods call .exec
  1380. var execCalled = false;
  1381. var re = /a/;
  1382. if (KEY === 'split') {
  1383. // We can't use real regex here since it causes deoptimization
  1384. // and serious performance degradation in V8
  1385. // https://github.com/zloirock/core-js/issues/306
  1386. re = {};
  1387. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1388. // a new one. We need to return the patched regex when creating the new one.
  1389. re.constructor = {};
  1390. re.constructor[SPECIES$2] = function () { return re; };
  1391. re.flags = '';
  1392. re[SYMBOL] = /./[SYMBOL];
  1393. }
  1394. re.exec = function () { execCalled = true; return null; };
  1395. re[SYMBOL]('');
  1396. return !execCalled;
  1397. });
  1398. if (
  1399. !DELEGATES_TO_SYMBOL ||
  1400. !DELEGATES_TO_EXEC ||
  1401. FORCED
  1402. ) {
  1403. var uncurriedNativeRegExpMethod = uncurryThis$9(/./[SYMBOL]);
  1404. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1405. var uncurriedNativeMethod = uncurryThis$9(nativeMethod);
  1406. var $exec = regexp.exec;
  1407. if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
  1408. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1409. // The native String method already delegates to @@method (this
  1410. // polyfilled function), leasing to infinite recursion.
  1411. // We avoid it by directly calling the native @@method method.
  1412. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
  1413. }
  1414. return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
  1415. }
  1416. return { done: false };
  1417. });
  1418. defineBuiltIn$1(String.prototype, KEY, methods[0]);
  1419. defineBuiltIn$1(RegExpPrototype, SYMBOL, methods[1]);
  1420. }
  1421. if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
  1422. };
  1423. var uncurryThis$8 = functionUncurryThis;
  1424. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  1425. var toString$2 = toString$4;
  1426. var requireObjectCoercible$1 = requireObjectCoercible$4;
  1427. var charAt$2 = uncurryThis$8(''.charAt);
  1428. var charCodeAt = uncurryThis$8(''.charCodeAt);
  1429. var stringSlice$2 = uncurryThis$8(''.slice);
  1430. var createMethod$2 = function (CONVERT_TO_STRING) {
  1431. return function ($this, pos) {
  1432. var S = toString$2(requireObjectCoercible$1($this));
  1433. var position = toIntegerOrInfinity$1(pos);
  1434. var size = S.length;
  1435. var first, second;
  1436. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  1437. first = charCodeAt(S, position);
  1438. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  1439. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  1440. ? CONVERT_TO_STRING
  1441. ? charAt$2(S, position)
  1442. : first
  1443. : CONVERT_TO_STRING
  1444. ? stringSlice$2(S, position, position + 2)
  1445. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  1446. };
  1447. };
  1448. var stringMultibyte = {
  1449. // `String.prototype.codePointAt` method
  1450. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  1451. codeAt: createMethod$2(false),
  1452. // `String.prototype.at` method
  1453. // https://github.com/mathiasbynens/String.prototype.at
  1454. charAt: createMethod$2(true)
  1455. };
  1456. var charAt$1 = stringMultibyte.charAt;
  1457. // `AdvanceStringIndex` abstract operation
  1458. // https://tc39.es/ecma262/#sec-advancestringindex
  1459. var advanceStringIndex$1 = function (S, index, unicode) {
  1460. return index + (unicode ? charAt$1(S, index).length : 1);
  1461. };
  1462. var uncurryThis$7 = functionUncurryThis;
  1463. var toObject$2 = toObject$4;
  1464. var floor = Math.floor;
  1465. var charAt = uncurryThis$7(''.charAt);
  1466. var replace = uncurryThis$7(''.replace);
  1467. var stringSlice$1 = uncurryThis$7(''.slice);
  1468. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  1469. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  1470. // `GetSubstitution` abstract operation
  1471. // https://tc39.es/ecma262/#sec-getsubstitution
  1472. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  1473. var tailPos = position + matched.length;
  1474. var m = captures.length;
  1475. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  1476. if (namedCaptures !== undefined) {
  1477. namedCaptures = toObject$2(namedCaptures);
  1478. symbols = SUBSTITUTION_SYMBOLS;
  1479. }
  1480. return replace(replacement, symbols, function (match, ch) {
  1481. var capture;
  1482. switch (charAt(ch, 0)) {
  1483. case '$': return '$';
  1484. case '&': return matched;
  1485. case '`': return stringSlice$1(str, 0, position);
  1486. case "'": return stringSlice$1(str, tailPos);
  1487. case '<':
  1488. capture = namedCaptures[stringSlice$1(ch, 1, -1)];
  1489. break;
  1490. default: // \d\d?
  1491. var n = +ch;
  1492. if (n === 0) return match;
  1493. if (n > m) {
  1494. var f = floor(n / 10);
  1495. if (f === 0) return match;
  1496. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  1497. return match;
  1498. }
  1499. capture = captures[n - 1];
  1500. }
  1501. return capture === undefined ? '' : capture;
  1502. });
  1503. };
  1504. var call$1 = functionCall;
  1505. var anObject$1 = anObject$7;
  1506. var isCallable$2 = isCallable$e;
  1507. var classof$3 = classofRaw$2;
  1508. var regexpExec = regexpExec$2;
  1509. var $TypeError$1 = TypeError;
  1510. // `RegExpExec` abstract operation
  1511. // https://tc39.es/ecma262/#sec-regexpexec
  1512. var regexpExecAbstract = function (R, S) {
  1513. var exec = R.exec;
  1514. if (isCallable$2(exec)) {
  1515. var result = call$1(exec, R, S);
  1516. if (result !== null) anObject$1(result);
  1517. return result;
  1518. }
  1519. if (classof$3(R) === 'RegExp') return call$1(regexpExec, R, S);
  1520. throw $TypeError$1('RegExp#exec called on incompatible receiver');
  1521. };
  1522. var apply = functionApply;
  1523. var call = functionCall;
  1524. var uncurryThis$6 = functionUncurryThis;
  1525. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  1526. var fails$4 = fails$h;
  1527. var anObject = anObject$7;
  1528. var isCallable$1 = isCallable$e;
  1529. var isNullOrUndefined = isNullOrUndefined$3;
  1530. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  1531. var toLength = toLength$2;
  1532. var toString$1 = toString$4;
  1533. var requireObjectCoercible = requireObjectCoercible$4;
  1534. var advanceStringIndex = advanceStringIndex$1;
  1535. var getMethod = getMethod$2;
  1536. var getSubstitution = getSubstitution$1;
  1537. var regExpExec = regexpExecAbstract;
  1538. var wellKnownSymbol$4 = wellKnownSymbol$9;
  1539. var REPLACE = wellKnownSymbol$4('replace');
  1540. var max = Math.max;
  1541. var min = Math.min;
  1542. var concat = uncurryThis$6([].concat);
  1543. var push$2 = uncurryThis$6([].push);
  1544. var stringIndexOf = uncurryThis$6(''.indexOf);
  1545. var stringSlice = uncurryThis$6(''.slice);
  1546. var maybeToString = function (it) {
  1547. return it === undefined ? it : String(it);
  1548. };
  1549. // IE <= 11 replaces $0 with the whole match, as if it was $&
  1550. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  1551. var REPLACE_KEEPS_$0 = (function () {
  1552. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  1553. return 'a'.replace(/./, '$0') === '$0';
  1554. })();
  1555. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  1556. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  1557. if (/./[REPLACE]) {
  1558. return /./[REPLACE]('a', '$0') === '';
  1559. }
  1560. return false;
  1561. })();
  1562. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$4(function () {
  1563. var re = /./;
  1564. re.exec = function () {
  1565. var result = [];
  1566. result.groups = { a: '7' };
  1567. return result;
  1568. };
  1569. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  1570. return ''.replace(re, '$<a>') !== '7';
  1571. });
  1572. // @@replace logic
  1573. fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  1574. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  1575. return [
  1576. // `String.prototype.replace` method
  1577. // https://tc39.es/ecma262/#sec-string.prototype.replace
  1578. function replace(searchValue, replaceValue) {
  1579. var O = requireObjectCoercible(this);
  1580. var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
  1581. return replacer
  1582. ? call(replacer, searchValue, O, replaceValue)
  1583. : call(nativeReplace, toString$1(O), searchValue, replaceValue);
  1584. },
  1585. // `RegExp.prototype[@@replace]` method
  1586. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  1587. function (string, replaceValue) {
  1588. var rx = anObject(this);
  1589. var S = toString$1(string);
  1590. if (
  1591. typeof replaceValue == 'string' &&
  1592. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  1593. stringIndexOf(replaceValue, '$<') === -1
  1594. ) {
  1595. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  1596. if (res.done) return res.value;
  1597. }
  1598. var functionalReplace = isCallable$1(replaceValue);
  1599. if (!functionalReplace) replaceValue = toString$1(replaceValue);
  1600. var global = rx.global;
  1601. if (global) {
  1602. var fullUnicode = rx.unicode;
  1603. rx.lastIndex = 0;
  1604. }
  1605. var results = [];
  1606. while (true) {
  1607. var result = regExpExec(rx, S);
  1608. if (result === null) break;
  1609. push$2(results, result);
  1610. if (!global) break;
  1611. var matchStr = toString$1(result[0]);
  1612. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  1613. }
  1614. var accumulatedResult = '';
  1615. var nextSourcePosition = 0;
  1616. for (var i = 0; i < results.length; i++) {
  1617. result = results[i];
  1618. var matched = toString$1(result[0]);
  1619. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  1620. var captures = [];
  1621. // NOTE: This is equivalent to
  1622. // captures = result.slice(1).map(maybeToString)
  1623. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  1624. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  1625. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  1626. for (var j = 1; j < result.length; j++) push$2(captures, maybeToString(result[j]));
  1627. var namedCaptures = result.groups;
  1628. if (functionalReplace) {
  1629. var replacerArgs = concat([matched], captures, position, S);
  1630. if (namedCaptures !== undefined) push$2(replacerArgs, namedCaptures);
  1631. var replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
  1632. } else {
  1633. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  1634. }
  1635. if (position >= nextSourcePosition) {
  1636. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  1637. nextSourcePosition = position + matched.length;
  1638. }
  1639. }
  1640. return accumulatedResult + stringSlice(S, nextSourcePosition);
  1641. }
  1642. ];
  1643. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  1644. var fails$3 = fails$h;
  1645. var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
  1646. var method = [][METHOD_NAME];
  1647. return !!method && fails$3(function () {
  1648. // eslint-disable-next-line no-useless-call -- required for testing
  1649. method.call(null, argument || function () { return 1; }, 1);
  1650. });
  1651. };
  1652. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  1653. var $$4 = _export;
  1654. var uncurryThis$5 = functionUncurryThis;
  1655. var $indexOf = arrayIncludes.indexOf;
  1656. var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
  1657. var nativeIndexOf = uncurryThis$5([].indexOf);
  1658. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  1659. var STRICT_METHOD$1 = arrayMethodIsStrict$1('indexOf');
  1660. // `Array.prototype.indexOf` method
  1661. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1662. $$4({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 }, {
  1663. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1664. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1665. return NEGATIVE_ZERO
  1666. // convert -0 to +0
  1667. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  1668. : $indexOf(this, searchElement, fromIndex);
  1669. }
  1670. });
  1671. var classof$2 = classofRaw$2;
  1672. // `IsArray` abstract operation
  1673. // https://tc39.es/ecma262/#sec-isarray
  1674. // eslint-disable-next-line es/no-array-isarray -- safe
  1675. var isArray$2 = Array.isArray || function isArray(argument) {
  1676. return classof$2(argument) == 'Array';
  1677. };
  1678. var $TypeError = TypeError;
  1679. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1680. var doesNotExceedSafeInteger$1 = function (it) {
  1681. if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
  1682. return it;
  1683. };
  1684. var toPropertyKey = toPropertyKey$3;
  1685. var definePropertyModule = objectDefineProperty;
  1686. var createPropertyDescriptor = createPropertyDescriptor$3;
  1687. var createProperty$1 = function (object, key, value) {
  1688. var propertyKey = toPropertyKey(key);
  1689. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  1690. else object[propertyKey] = value;
  1691. };
  1692. var uncurryThis$4 = functionUncurryThis;
  1693. var fails$2 = fails$h;
  1694. var isCallable = isCallable$e;
  1695. var classof$1 = classof$5;
  1696. var getBuiltIn = getBuiltIn$5;
  1697. var inspectSource = inspectSource$2;
  1698. var noop = function () { /* empty */ };
  1699. var empty = [];
  1700. var construct = getBuiltIn('Reflect', 'construct');
  1701. var constructorRegExp = /^\s*(?:class|function)\b/;
  1702. var exec = uncurryThis$4(constructorRegExp.exec);
  1703. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  1704. var isConstructorModern = function isConstructor(argument) {
  1705. if (!isCallable(argument)) return false;
  1706. try {
  1707. construct(noop, empty, argument);
  1708. return true;
  1709. } catch (error) {
  1710. return false;
  1711. }
  1712. };
  1713. var isConstructorLegacy = function isConstructor(argument) {
  1714. if (!isCallable(argument)) return false;
  1715. switch (classof$1(argument)) {
  1716. case 'AsyncFunction':
  1717. case 'GeneratorFunction':
  1718. case 'AsyncGeneratorFunction': return false;
  1719. }
  1720. try {
  1721. // we can't check .prototype since constructors produced by .bind haven't it
  1722. // `Function#toString` throws on some built-it function in some legacy engines
  1723. // (for example, `DOMQuad` and similar in FF41-)
  1724. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1725. } catch (error) {
  1726. return true;
  1727. }
  1728. };
  1729. isConstructorLegacy.sham = true;
  1730. // `IsConstructor` abstract operation
  1731. // https://tc39.es/ecma262/#sec-isconstructor
  1732. var isConstructor$1 = !construct || fails$2(function () {
  1733. var called;
  1734. return isConstructorModern(isConstructorModern.call)
  1735. || !isConstructorModern(Object)
  1736. || !isConstructorModern(function () { called = true; })
  1737. || called;
  1738. }) ? isConstructorLegacy : isConstructorModern;
  1739. var isArray$1 = isArray$2;
  1740. var isConstructor = isConstructor$1;
  1741. var isObject$1 = isObject$7;
  1742. var wellKnownSymbol$3 = wellKnownSymbol$9;
  1743. var SPECIES$1 = wellKnownSymbol$3('species');
  1744. var $Array = Array;
  1745. // a part of `ArraySpeciesCreate` abstract operation
  1746. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1747. var arraySpeciesConstructor$1 = function (originalArray) {
  1748. var C;
  1749. if (isArray$1(originalArray)) {
  1750. C = originalArray.constructor;
  1751. // cross-realm fallback
  1752. if (isConstructor(C) && (C === $Array || isArray$1(C.prototype))) C = undefined;
  1753. else if (isObject$1(C)) {
  1754. C = C[SPECIES$1];
  1755. if (C === null) C = undefined;
  1756. }
  1757. } return C === undefined ? $Array : C;
  1758. };
  1759. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1760. // `ArraySpeciesCreate` abstract operation
  1761. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1762. var arraySpeciesCreate$2 = function (originalArray, length) {
  1763. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1764. };
  1765. var fails$1 = fails$h;
  1766. var wellKnownSymbol$2 = wellKnownSymbol$9;
  1767. var V8_VERSION$1 = engineV8Version;
  1768. var SPECIES = wellKnownSymbol$2('species');
  1769. var arrayMethodHasSpeciesSupport$1 = function (METHOD_NAME) {
  1770. // We can't use this feature detection in V8 since it causes
  1771. // deoptimization and serious performance degradation
  1772. // https://github.com/zloirock/core-js/issues/677
  1773. return V8_VERSION$1 >= 51 || !fails$1(function () {
  1774. var array = [];
  1775. var constructor = array.constructor = {};
  1776. constructor[SPECIES] = function () {
  1777. return { foo: 1 };
  1778. };
  1779. return array[METHOD_NAME](Boolean).foo !== 1;
  1780. });
  1781. };
  1782. var $$3 = _export;
  1783. var fails = fails$h;
  1784. var isArray = isArray$2;
  1785. var isObject = isObject$7;
  1786. var toObject$1 = toObject$4;
  1787. var lengthOfArrayLike$1 = lengthOfArrayLike$3;
  1788. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1789. var createProperty = createProperty$1;
  1790. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1791. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$1;
  1792. var wellKnownSymbol$1 = wellKnownSymbol$9;
  1793. var V8_VERSION = engineV8Version;
  1794. var IS_CONCAT_SPREADABLE = wellKnownSymbol$1('isConcatSpreadable');
  1795. // We can't use this feature detection in V8 since it causes
  1796. // deoptimization and serious performance degradation
  1797. // https://github.com/zloirock/core-js/issues/679
  1798. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  1799. var array = [];
  1800. array[IS_CONCAT_SPREADABLE] = false;
  1801. return array.concat()[0] !== array;
  1802. });
  1803. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1804. var isConcatSpreadable = function (O) {
  1805. if (!isObject(O)) return false;
  1806. var spreadable = O[IS_CONCAT_SPREADABLE];
  1807. return spreadable !== undefined ? !!spreadable : isArray(O);
  1808. };
  1809. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1810. // `Array.prototype.concat` method
  1811. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1812. // with adding support of @@isConcatSpreadable and @@species
  1813. $$3({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  1814. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1815. concat: function concat(arg) {
  1816. var O = toObject$1(this);
  1817. var A = arraySpeciesCreate$1(O, 0);
  1818. var n = 0;
  1819. var i, k, length, len, E;
  1820. for (i = -1, length = arguments.length; i < length; i++) {
  1821. E = i === -1 ? O : arguments[i];
  1822. if (isConcatSpreadable(E)) {
  1823. len = lengthOfArrayLike$1(E);
  1824. doesNotExceedSafeInteger(n + len);
  1825. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1826. } else {
  1827. doesNotExceedSafeInteger(n + 1);
  1828. createProperty(A, n++, E);
  1829. }
  1830. }
  1831. A.length = n;
  1832. return A;
  1833. }
  1834. });
  1835. var $$2 = _export;
  1836. var uncurryThis$3 = functionUncurryThis;
  1837. var IndexedObject$1 = indexedObject;
  1838. var toIndexedObject$1 = toIndexedObject$6;
  1839. var arrayMethodIsStrict = arrayMethodIsStrict$2;
  1840. var nativeJoin = uncurryThis$3([].join);
  1841. var ES3_STRINGS = IndexedObject$1 != Object;
  1842. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  1843. // `Array.prototype.join` method
  1844. // https://tc39.es/ecma262/#sec-array.prototype.join
  1845. $$2({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  1846. join: function join(separator) {
  1847. return nativeJoin(toIndexedObject$1(this), separator === undefined ? ',' : separator);
  1848. }
  1849. });
  1850. var uncurryThis$2 = functionUncurryThis;
  1851. var aCallable = aCallable$2;
  1852. var NATIVE_BIND = functionBindNative;
  1853. var bind$1 = uncurryThis$2(uncurryThis$2.bind);
  1854. // optional / simple context binding
  1855. var functionBindContext = function (fn, that) {
  1856. aCallable(fn);
  1857. return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
  1858. return fn.apply(that, arguments);
  1859. };
  1860. };
  1861. var bind = functionBindContext;
  1862. var uncurryThis$1 = functionUncurryThis;
  1863. var IndexedObject = indexedObject;
  1864. var toObject = toObject$4;
  1865. var lengthOfArrayLike = lengthOfArrayLike$3;
  1866. var arraySpeciesCreate = arraySpeciesCreate$2;
  1867. var push$1 = uncurryThis$1([].push);
  1868. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1869. var createMethod$1 = function (TYPE) {
  1870. var IS_MAP = TYPE == 1;
  1871. var IS_FILTER = TYPE == 2;
  1872. var IS_SOME = TYPE == 3;
  1873. var IS_EVERY = TYPE == 4;
  1874. var IS_FIND_INDEX = TYPE == 6;
  1875. var IS_FILTER_REJECT = TYPE == 7;
  1876. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  1877. return function ($this, callbackfn, that, specificCreate) {
  1878. var O = toObject($this);
  1879. var self = IndexedObject(O);
  1880. var boundFunction = bind(callbackfn, that);
  1881. var length = lengthOfArrayLike(self);
  1882. var index = 0;
  1883. var create = specificCreate || arraySpeciesCreate;
  1884. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1885. var value, result;
  1886. for (;length > index; index++) if (NO_HOLES || index in self) {
  1887. value = self[index];
  1888. result = boundFunction(value, index, O);
  1889. if (TYPE) {
  1890. if (IS_MAP) target[index] = result; // map
  1891. else if (result) switch (TYPE) {
  1892. case 3: return true; // some
  1893. case 5: return value; // find
  1894. case 6: return index; // findIndex
  1895. case 2: push$1(target, value); // filter
  1896. } else switch (TYPE) {
  1897. case 4: return false; // every
  1898. case 7: push$1(target, value); // filterReject
  1899. }
  1900. }
  1901. }
  1902. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1903. };
  1904. };
  1905. var arrayIteration = {
  1906. // `Array.prototype.forEach` method
  1907. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1908. forEach: createMethod$1(0),
  1909. // `Array.prototype.map` method
  1910. // https://tc39.es/ecma262/#sec-array.prototype.map
  1911. map: createMethod$1(1),
  1912. // `Array.prototype.filter` method
  1913. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1914. filter: createMethod$1(2),
  1915. // `Array.prototype.some` method
  1916. // https://tc39.es/ecma262/#sec-array.prototype.some
  1917. some: createMethod$1(3),
  1918. // `Array.prototype.every` method
  1919. // https://tc39.es/ecma262/#sec-array.prototype.every
  1920. every: createMethod$1(4),
  1921. // `Array.prototype.find` method
  1922. // https://tc39.es/ecma262/#sec-array.prototype.find
  1923. find: createMethod$1(5),
  1924. // `Array.prototype.findIndex` method
  1925. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1926. findIndex: createMethod$1(6),
  1927. // `Array.prototype.filterReject` method
  1928. // https://github.com/tc39/proposal-array-filtering
  1929. filterReject: createMethod$1(7)
  1930. };
  1931. var wellKnownSymbol = wellKnownSymbol$9;
  1932. var create = objectCreate;
  1933. var defineProperty = objectDefineProperty.f;
  1934. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1935. var ArrayPrototype = Array.prototype;
  1936. // Array.prototype[@@unscopables]
  1937. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1938. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1939. defineProperty(ArrayPrototype, UNSCOPABLES, {
  1940. configurable: true,
  1941. value: create(null)
  1942. });
  1943. }
  1944. // add a key to Array.prototype[@@unscopables]
  1945. var addToUnscopables$1 = function (key) {
  1946. ArrayPrototype[UNSCOPABLES][key] = true;
  1947. };
  1948. var $$1 = _export;
  1949. var $find = arrayIteration.find;
  1950. var addToUnscopables = addToUnscopables$1;
  1951. var FIND = 'find';
  1952. var SKIPS_HOLES = true;
  1953. // Shouldn't skip holes
  1954. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1955. // `Array.prototype.find` method
  1956. // https://tc39.es/ecma262/#sec-array.prototype.find
  1957. $$1({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1958. find: function find(callbackfn /* , that = undefined */) {
  1959. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1960. }
  1961. });
  1962. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1963. addToUnscopables(FIND);
  1964. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1965. var classof = classof$5;
  1966. // `Object.prototype.toString` method implementation
  1967. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1968. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1969. return '[object ' + classof(this) + ']';
  1970. };
  1971. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1972. var defineBuiltIn = defineBuiltIn$3;
  1973. var toString = objectToString;
  1974. // `Object.prototype.toString` method
  1975. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1976. if (!TO_STRING_TAG_SUPPORT) {
  1977. defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
  1978. }
  1979. var DESCRIPTORS = descriptors;
  1980. var uncurryThis = functionUncurryThis;
  1981. var objectKeys = objectKeys$2;
  1982. var toIndexedObject = toIndexedObject$6;
  1983. var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1984. var propertyIsEnumerable = uncurryThis($propertyIsEnumerable);
  1985. var push = uncurryThis([].push);
  1986. // `Object.{ entries, values }` methods implementation
  1987. var createMethod = function (TO_ENTRIES) {
  1988. return function (it) {
  1989. var O = toIndexedObject(it);
  1990. var keys = objectKeys(O);
  1991. var length = keys.length;
  1992. var i = 0;
  1993. var result = [];
  1994. var key;
  1995. while (length > i) {
  1996. key = keys[i++];
  1997. if (!DESCRIPTORS || propertyIsEnumerable(O, key)) {
  1998. push(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  1999. }
  2000. }
  2001. return result;
  2002. };
  2003. };
  2004. var objectToArray = {
  2005. // `Object.entries` method
  2006. // https://tc39.es/ecma262/#sec-object.entries
  2007. entries: createMethod(true),
  2008. // `Object.values` method
  2009. // https://tc39.es/ecma262/#sec-object.values
  2010. values: createMethod(false)
  2011. };
  2012. var $ = _export;
  2013. var $entries = objectToArray.entries;
  2014. // `Object.entries` method
  2015. // https://tc39.es/ecma262/#sec-object.entries
  2016. $({ target: 'Object', stat: true }, {
  2017. entries: function entries(O) {
  2018. return $entries(O);
  2019. }
  2020. });
  2021. /* eslint-disable no-unused-vars */
  2022. /**
  2023. * @author zhixin wen <wenzhixin2010@gmail.com>
  2024. * extensions: https://github.com/vitalets/x-editable
  2025. */
  2026. var Utils = $__default["default"].fn.bootstrapTable.utils;
  2027. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  2028. editable: true,
  2029. onEditableInit: function onEditableInit() {
  2030. return false;
  2031. },
  2032. onEditableSave: function onEditableSave(field, row, rowIndex, oldValue, $el) {
  2033. return false;
  2034. },
  2035. onEditableShown: function onEditableShown(field, row, $el, editable) {
  2036. return false;
  2037. },
  2038. onEditableHidden: function onEditableHidden(field, row, $el, reason) {
  2039. return false;
  2040. }
  2041. });
  2042. $__default["default"].extend($__default["default"].fn.bootstrapTable.columnDefaults, {
  2043. alwaysUseFormatter: false
  2044. });
  2045. $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
  2046. 'editable-init.bs.table': 'onEditableInit',
  2047. 'editable-save.bs.table': 'onEditableSave',
  2048. 'editable-shown.bs.table': 'onEditableShown',
  2049. 'editable-hidden.bs.table': 'onEditableHidden'
  2050. });
  2051. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  2052. _inherits(_class, _$$BootstrapTable);
  2053. var _super = _createSuper(_class);
  2054. function _class() {
  2055. _classCallCheck(this, _class);
  2056. return _super.apply(this, arguments);
  2057. }
  2058. _createClass(_class, [{
  2059. key: "initTable",
  2060. value: function initTable() {
  2061. var _this = this;
  2062. _get(_getPrototypeOf(_class.prototype), "initTable", this).call(this);
  2063. if (!this.options.editable) {
  2064. return;
  2065. }
  2066. this.editedCells = [];
  2067. $__default["default"].each(this.columns, function (i, column) {
  2068. if (!column.editable) {
  2069. return;
  2070. }
  2071. var editableOptions = {};
  2072. var editableDataMarkup = [];
  2073. var editableDataPrefix = 'editable-';
  2074. var processDataOptions = function processDataOptions(key, value) {
  2075. // Replace camel case with dashes.
  2076. var dashKey = key.replace(/([A-Z])/g, function ($1) {
  2077. return "-".concat($1.toLowerCase());
  2078. });
  2079. if (dashKey.indexOf(editableDataPrefix) === 0) {
  2080. editableOptions[dashKey.replace(editableDataPrefix, 'data-')] = value;
  2081. }
  2082. };
  2083. $__default["default"].each(_this.options, processDataOptions);
  2084. column.formatter = column.formatter || function (value) {
  2085. return value;
  2086. };
  2087. column._formatter = column._formatter ? column._formatter : column.formatter;
  2088. column.formatter = function (value, row, index, field) {
  2089. var result = Utils.calculateObjectValue(column, column._formatter, [value, row, index], value);
  2090. result = typeof result === 'undefined' || result === null ? _this.options.undefinedText : result;
  2091. if (_this.options.uniqueId !== undefined && !column.alwaysUseFormatter) {
  2092. var uniqueId = Utils.getItemField(row, _this.options.uniqueId, false);
  2093. if ($__default["default"].inArray(column.field + uniqueId, _this.editedCells) !== -1) {
  2094. result = value;
  2095. }
  2096. }
  2097. $__default["default"].each(column, processDataOptions);
  2098. $__default["default"].each(editableOptions, function (key, value) {
  2099. editableDataMarkup.push(" ".concat(key, "=\"").concat(value, "\""));
  2100. });
  2101. var noEditFormatter = false;
  2102. var editableOpts = Utils.calculateObjectValue(column, column.editable, [index, row], {});
  2103. if (editableOpts.hasOwnProperty('noEditFormatter')) {
  2104. noEditFormatter = editableOpts.noEditFormatter(value, row, index, field);
  2105. }
  2106. if (noEditFormatter === false) {
  2107. return "<a href=\"javascript:void(0)\"\n data-name=\"".concat(column.field, "\"\n data-pk=\"").concat(row[_this.options.idField], "\"\n data-value=\"").concat(result, "\"\n ").concat(editableDataMarkup.join(''), "></a>");
  2108. }
  2109. return noEditFormatter;
  2110. };
  2111. });
  2112. }
  2113. }, {
  2114. key: "initBody",
  2115. value: function initBody(fixedScroll) {
  2116. var _this2 = this;
  2117. _get(_getPrototypeOf(_class.prototype), "initBody", this).call(this, fixedScroll);
  2118. if (!this.options.editable) {
  2119. return;
  2120. }
  2121. $__default["default"].each(this.columns, function (i, column) {
  2122. if (!column.editable) {
  2123. return;
  2124. }
  2125. var data = _this2.getData({
  2126. escape: true
  2127. });
  2128. var $field = _this2.$body.find("a[data-name=\"".concat(column.field, "\"]"));
  2129. $field.each(function (i, element) {
  2130. var $element = $__default["default"](element);
  2131. var $tr = $element.closest('tr');
  2132. var index = $tr.data('index');
  2133. var row = data[index];
  2134. var editableOpts = Utils.calculateObjectValue(column, column.editable, [index, row, $element], {});
  2135. $element.editable(editableOpts);
  2136. });
  2137. $field.off('save').on('save', function (_ref, _ref2) {
  2138. var currentTarget = _ref.currentTarget;
  2139. var submitValue = _ref2.submitValue;
  2140. var $this = $__default["default"](currentTarget);
  2141. var data = _this2.getData();
  2142. var rowIndex = $this.parents('tr[data-index]').data('index');
  2143. var row = data[rowIndex];
  2144. var oldValue = row[column.field];
  2145. if (_this2.options.uniqueId !== undefined && !column.alwaysUseFormatter) {
  2146. var uniqueId = Utils.getItemField(row, _this2.options.uniqueId, false);
  2147. if ($__default["default"].inArray(column.field + uniqueId, _this2.editedCells) === -1) {
  2148. _this2.editedCells.push(column.field + uniqueId);
  2149. }
  2150. }
  2151. submitValue = Utils.escapeHTML(submitValue);
  2152. $this.data('value', submitValue);
  2153. row[column.field] = submitValue;
  2154. _this2.trigger('editable-save', column.field, row, rowIndex, oldValue, $this);
  2155. _this2.initBody();
  2156. });
  2157. $field.off('shown').on('shown', function (_ref3, editable) {
  2158. var currentTarget = _ref3.currentTarget;
  2159. var $this = $__default["default"](currentTarget);
  2160. var data = _this2.getData();
  2161. var rowIndex = $this.parents('tr[data-index]').data('index');
  2162. var row = data[rowIndex];
  2163. _this2.trigger('editable-shown', column.field, row, $this, editable);
  2164. });
  2165. $field.off('hidden').on('hidden', function (_ref4, reason) {
  2166. var currentTarget = _ref4.currentTarget;
  2167. var $this = $__default["default"](currentTarget);
  2168. var data = _this2.getData();
  2169. var rowIndex = $this.parents('tr[data-index]').data('index');
  2170. var row = data[rowIndex];
  2171. _this2.trigger('editable-hidden', column.field, row, $this, reason);
  2172. });
  2173. });
  2174. this.trigger('editable-init');
  2175. }
  2176. }, {
  2177. key: "getData",
  2178. value: function getData(params) {
  2179. var data = _get(_getPrototypeOf(_class.prototype), "getData", this).call(this, params);
  2180. if (params && params.escape) {
  2181. var _iterator = _createForOfIteratorHelper(data),
  2182. _step;
  2183. try {
  2184. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  2185. var row = _step.value;
  2186. for (var _i = 0, _Object$entries = Object.entries(row); _i < _Object$entries.length; _i++) {
  2187. var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
  2188. key = _Object$entries$_i[0],
  2189. value = _Object$entries$_i[1];
  2190. row[key] = Utils.unescapeHTML(value);
  2191. }
  2192. }
  2193. } catch (err) {
  2194. _iterator.e(err);
  2195. } finally {
  2196. _iterator.f();
  2197. }
  2198. }
  2199. return data;
  2200. }
  2201. }]);
  2202. return _class;
  2203. }($__default["default"].BootstrapTable);
  2204. }));