bootstrap-table-toolbar.js 85 KB

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