bootstrap-table-multiple-sort.js 105 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576
  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 ($$a) { 'use strict';
  6. function _typeof(o) {
  7. "@babel/helpers - typeof";
  8. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  9. return typeof o;
  10. } : function (o) {
  11. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  12. }, _typeof(o);
  13. }
  14. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  15. var check = function (it) {
  16. return it && it.Math === Math && it;
  17. };
  18. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  19. var global$b =
  20. // eslint-disable-next-line es/no-global-this -- safe
  21. check(typeof globalThis == 'object' && globalThis) ||
  22. check(typeof window == 'object' && window) ||
  23. // eslint-disable-next-line no-restricted-globals -- safe
  24. check(typeof self == 'object' && self) ||
  25. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  26. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  27. // eslint-disable-next-line no-new-func -- fallback
  28. (function () { return this; })() || Function('return this')();
  29. var objectGetOwnPropertyDescriptor = {};
  30. var fails$h = function (exec) {
  31. try {
  32. return !!exec();
  33. } catch (error) {
  34. return true;
  35. }
  36. };
  37. var fails$g = fails$h;
  38. // Detect IE8's incomplete defineProperty implementation
  39. var descriptors = !fails$g(function () {
  40. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  41. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  42. });
  43. var fails$f = fails$h;
  44. var functionBindNative = !fails$f(function () {
  45. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  46. var test = (function () { /* empty */ }).bind();
  47. // eslint-disable-next-line no-prototype-builtins -- safe
  48. return typeof test != 'function' || test.hasOwnProperty('prototype');
  49. });
  50. var NATIVE_BIND$2 = functionBindNative;
  51. var call$6 = Function.prototype.call;
  52. var functionCall = NATIVE_BIND$2 ? call$6.bind(call$6) : function () {
  53. return call$6.apply(call$6, arguments);
  54. };
  55. var objectPropertyIsEnumerable = {};
  56. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  57. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  58. var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
  59. // Nashorn ~ JDK8 bug
  60. var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  61. // `Object.prototype.propertyIsEnumerable` method implementation
  62. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  63. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  64. var descriptor = getOwnPropertyDescriptor$2(this, V);
  65. return !!descriptor && descriptor.enumerable;
  66. } : $propertyIsEnumerable;
  67. var createPropertyDescriptor$3 = function (bitmap, value) {
  68. return {
  69. enumerable: !(bitmap & 1),
  70. configurable: !(bitmap & 2),
  71. writable: !(bitmap & 4),
  72. value: value
  73. };
  74. };
  75. var NATIVE_BIND$1 = functionBindNative;
  76. var FunctionPrototype$1 = Function.prototype;
  77. var call$5 = FunctionPrototype$1.call;
  78. var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$5, call$5);
  79. var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
  80. return function () {
  81. return call$5.apply(fn, arguments);
  82. };
  83. };
  84. var uncurryThis$i = functionUncurryThis;
  85. var toString$6 = uncurryThis$i({}.toString);
  86. var stringSlice$1 = uncurryThis$i(''.slice);
  87. var classofRaw$2 = function (it) {
  88. return stringSlice$1(toString$6(it), 8, -1);
  89. };
  90. var uncurryThis$h = functionUncurryThis;
  91. var fails$e = fails$h;
  92. var classof$5 = classofRaw$2;
  93. var $Object$3 = Object;
  94. var split = uncurryThis$h(''.split);
  95. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  96. var indexedObject = fails$e(function () {
  97. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  98. // eslint-disable-next-line no-prototype-builtins -- safe
  99. return !$Object$3('z').propertyIsEnumerable(0);
  100. }) ? function (it) {
  101. return classof$5(it) === 'String' ? split(it, '') : $Object$3(it);
  102. } : $Object$3;
  103. // we can't use just `it == null` since of `document.all` special case
  104. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  105. var isNullOrUndefined$2 = function (it) {
  106. return it === null || it === undefined;
  107. };
  108. var isNullOrUndefined$1 = isNullOrUndefined$2;
  109. var $TypeError$8 = TypeError;
  110. // `RequireObjectCoercible` abstract operation
  111. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  112. var requireObjectCoercible$3 = function (it) {
  113. if (isNullOrUndefined$1(it)) throw new $TypeError$8("Can't call method on " + it);
  114. return it;
  115. };
  116. // toObject with fallback for non-array-like ES3 strings
  117. var IndexedObject$2 = indexedObject;
  118. var requireObjectCoercible$2 = requireObjectCoercible$3;
  119. var toIndexedObject$5 = function (it) {
  120. return IndexedObject$2(requireObjectCoercible$2(it));
  121. };
  122. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  123. var documentAll = typeof document == 'object' && document.all;
  124. // `IsCallable` abstract operation
  125. // https://tc39.es/ecma262/#sec-iscallable
  126. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  127. var isCallable$c = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  128. return typeof argument == 'function' || argument === documentAll;
  129. } : function (argument) {
  130. return typeof argument == 'function';
  131. };
  132. var isCallable$b = isCallable$c;
  133. var isObject$8 = function (it) {
  134. return typeof it == 'object' ? it !== null : isCallable$b(it);
  135. };
  136. var global$a = global$b;
  137. var isCallable$a = isCallable$c;
  138. var aFunction = function (argument) {
  139. return isCallable$a(argument) ? argument : undefined;
  140. };
  141. var getBuiltIn$4 = function (namespace, method) {
  142. return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
  143. };
  144. var uncurryThis$g = functionUncurryThis;
  145. var objectIsPrototypeOf = uncurryThis$g({}.isPrototypeOf);
  146. var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
  147. var global$9 = global$b;
  148. var userAgent$2 = engineUserAgent;
  149. var process = global$9.process;
  150. var Deno = global$9.Deno;
  151. var versions = process && process.versions || Deno && Deno.version;
  152. var v8 = versions && versions.v8;
  153. var match, version;
  154. if (v8) {
  155. match = v8.split('.');
  156. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  157. // but their correct versions are not interesting for us
  158. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  159. }
  160. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  161. // so check `userAgent` even if `.v8` exists, but 0
  162. if (!version && userAgent$2) {
  163. match = userAgent$2.match(/Edge\/(\d+)/);
  164. if (!match || match[1] >= 74) {
  165. match = userAgent$2.match(/Chrome\/(\d+)/);
  166. if (match) version = +match[1];
  167. }
  168. }
  169. var engineV8Version = version;
  170. /* eslint-disable es/no-symbol -- required for testing */
  171. var V8_VERSION$2 = engineV8Version;
  172. var fails$d = fails$h;
  173. var global$8 = global$b;
  174. var $String$4 = global$8.String;
  175. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  176. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
  177. var symbol = Symbol('symbol detection');
  178. // Chrome 38 Symbol has incorrect toString conversion
  179. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  180. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  181. // of course, fail.
  182. return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
  183. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  184. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  185. });
  186. /* eslint-disable es/no-symbol -- required for testing */
  187. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  188. var useSymbolAsUid = NATIVE_SYMBOL$1
  189. && !Symbol.sham
  190. && typeof Symbol.iterator == 'symbol';
  191. var getBuiltIn$3 = getBuiltIn$4;
  192. var isCallable$9 = isCallable$c;
  193. var isPrototypeOf$1 = objectIsPrototypeOf;
  194. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  195. var $Object$2 = Object;
  196. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  197. return typeof it == 'symbol';
  198. } : function (it) {
  199. var $Symbol = getBuiltIn$3('Symbol');
  200. return isCallable$9($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
  201. };
  202. var $String$3 = String;
  203. var tryToString$2 = function (argument) {
  204. try {
  205. return $String$3(argument);
  206. } catch (error) {
  207. return 'Object';
  208. }
  209. };
  210. var isCallable$8 = isCallable$c;
  211. var tryToString$1 = tryToString$2;
  212. var $TypeError$7 = TypeError;
  213. // `Assert: IsCallable(argument) is true`
  214. var aCallable$3 = function (argument) {
  215. if (isCallable$8(argument)) return argument;
  216. throw new $TypeError$7(tryToString$1(argument) + ' is not a function');
  217. };
  218. var aCallable$2 = aCallable$3;
  219. var isNullOrUndefined = isNullOrUndefined$2;
  220. // `GetMethod` abstract operation
  221. // https://tc39.es/ecma262/#sec-getmethod
  222. var getMethod$1 = function (V, P) {
  223. var func = V[P];
  224. return isNullOrUndefined(func) ? undefined : aCallable$2(func);
  225. };
  226. var call$4 = functionCall;
  227. var isCallable$7 = isCallable$c;
  228. var isObject$7 = isObject$8;
  229. var $TypeError$6 = TypeError;
  230. // `OrdinaryToPrimitive` abstract operation
  231. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  232. var ordinaryToPrimitive$1 = function (input, pref) {
  233. var fn, val;
  234. if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$7(val = call$4(fn, input))) return val;
  235. if (isCallable$7(fn = input.valueOf) && !isObject$7(val = call$4(fn, input))) return val;
  236. if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$7(val = call$4(fn, input))) return val;
  237. throw new $TypeError$6("Can't convert object to primitive value");
  238. };
  239. var sharedStore = {exports: {}};
  240. var global$7 = global$b;
  241. // eslint-disable-next-line es/no-object-defineproperty -- safe
  242. var defineProperty$3 = Object.defineProperty;
  243. var defineGlobalProperty$3 = function (key, value) {
  244. try {
  245. defineProperty$3(global$7, key, { value: value, configurable: true, writable: true });
  246. } catch (error) {
  247. global$7[key] = value;
  248. } return value;
  249. };
  250. var globalThis$1 = global$b;
  251. var defineGlobalProperty$2 = defineGlobalProperty$3;
  252. var SHARED = '__core-js_shared__';
  253. var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
  254. (store$3.versions || (store$3.versions = [])).push({
  255. version: '3.36.0',
  256. mode: 'global',
  257. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  258. license: 'https://github.com/zloirock/core-js/blob/v3.36.0/LICENSE',
  259. source: 'https://github.com/zloirock/core-js'
  260. });
  261. var sharedStoreExports = sharedStore.exports;
  262. var store$2 = sharedStoreExports;
  263. var shared$3 = function (key, value) {
  264. return store$2[key] || (store$2[key] = value || {});
  265. };
  266. var requireObjectCoercible$1 = requireObjectCoercible$3;
  267. var $Object$1 = Object;
  268. // `ToObject` abstract operation
  269. // https://tc39.es/ecma262/#sec-toobject
  270. var toObject$6 = function (argument) {
  271. return $Object$1(requireObjectCoercible$1(argument));
  272. };
  273. var uncurryThis$f = functionUncurryThis;
  274. var toObject$5 = toObject$6;
  275. var hasOwnProperty = uncurryThis$f({}.hasOwnProperty);
  276. // `HasOwnProperty` abstract operation
  277. // https://tc39.es/ecma262/#sec-hasownproperty
  278. // eslint-disable-next-line es/no-object-hasown -- safe
  279. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  280. return hasOwnProperty(toObject$5(it), key);
  281. };
  282. var uncurryThis$e = functionUncurryThis;
  283. var id = 0;
  284. var postfix = Math.random();
  285. var toString$5 = uncurryThis$e(1.0.toString);
  286. var uid$2 = function (key) {
  287. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
  288. };
  289. var global$6 = global$b;
  290. var shared$2 = shared$3;
  291. var hasOwn$7 = hasOwnProperty_1;
  292. var uid$1 = uid$2;
  293. var NATIVE_SYMBOL = symbolConstructorDetection;
  294. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  295. var Symbol$2 = global$6.Symbol;
  296. var WellKnownSymbolsStore = shared$2('wks');
  297. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2['for'] || Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
  298. var wellKnownSymbol$8 = function (name) {
  299. if (!hasOwn$7(WellKnownSymbolsStore, name)) {
  300. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$7(Symbol$2, name)
  301. ? Symbol$2[name]
  302. : createWellKnownSymbol('Symbol.' + name);
  303. } return WellKnownSymbolsStore[name];
  304. };
  305. var call$3 = functionCall;
  306. var isObject$6 = isObject$8;
  307. var isSymbol$1 = isSymbol$2;
  308. var getMethod = getMethod$1;
  309. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  310. var wellKnownSymbol$7 = wellKnownSymbol$8;
  311. var $TypeError$5 = TypeError;
  312. var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
  313. // `ToPrimitive` abstract operation
  314. // https://tc39.es/ecma262/#sec-toprimitive
  315. var toPrimitive$1 = function (input, pref) {
  316. if (!isObject$6(input) || isSymbol$1(input)) return input;
  317. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  318. var result;
  319. if (exoticToPrim) {
  320. if (pref === undefined) pref = 'default';
  321. result = call$3(exoticToPrim, input, pref);
  322. if (!isObject$6(result) || isSymbol$1(result)) return result;
  323. throw new $TypeError$5("Can't convert object to primitive value");
  324. }
  325. if (pref === undefined) pref = 'number';
  326. return ordinaryToPrimitive(input, pref);
  327. };
  328. var toPrimitive = toPrimitive$1;
  329. var isSymbol = isSymbol$2;
  330. // `ToPropertyKey` abstract operation
  331. // https://tc39.es/ecma262/#sec-topropertykey
  332. var toPropertyKey$2 = function (argument) {
  333. var key = toPrimitive(argument, 'string');
  334. return isSymbol(key) ? key : key + '';
  335. };
  336. var global$5 = global$b;
  337. var isObject$5 = isObject$8;
  338. var document$1 = global$5.document;
  339. // typeof document.createElement is 'object' in old IE
  340. var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
  341. var documentCreateElement$1 = function (it) {
  342. return EXISTS$1 ? document$1.createElement(it) : {};
  343. };
  344. var DESCRIPTORS$a = descriptors;
  345. var fails$c = fails$h;
  346. var createElement = documentCreateElement$1;
  347. // Thanks to IE8 for its funny defineProperty
  348. var ie8DomDefine = !DESCRIPTORS$a && !fails$c(function () {
  349. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  350. return Object.defineProperty(createElement('div'), 'a', {
  351. get: function () { return 7; }
  352. }).a !== 7;
  353. });
  354. var DESCRIPTORS$9 = descriptors;
  355. var call$2 = functionCall;
  356. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  357. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  358. var toIndexedObject$4 = toIndexedObject$5;
  359. var toPropertyKey$1 = toPropertyKey$2;
  360. var hasOwn$6 = hasOwnProperty_1;
  361. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  362. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  363. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  364. // `Object.getOwnPropertyDescriptor` method
  365. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  366. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  367. O = toIndexedObject$4(O);
  368. P = toPropertyKey$1(P);
  369. if (IE8_DOM_DEFINE$1) try {
  370. return $getOwnPropertyDescriptor$1(O, P);
  371. } catch (error) { /* empty */ }
  372. if (hasOwn$6(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
  373. };
  374. var objectDefineProperty = {};
  375. var DESCRIPTORS$8 = descriptors;
  376. var fails$b = fails$h;
  377. // V8 ~ Chrome 36-
  378. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  379. var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$b(function () {
  380. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  381. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  382. value: 42,
  383. writable: false
  384. }).prototype !== 42;
  385. });
  386. var isObject$4 = isObject$8;
  387. var $String$2 = String;
  388. var $TypeError$4 = TypeError;
  389. // `Assert: Type(argument) is Object`
  390. var anObject$6 = function (argument) {
  391. if (isObject$4(argument)) return argument;
  392. throw new $TypeError$4($String$2(argument) + ' is not an object');
  393. };
  394. var DESCRIPTORS$7 = descriptors;
  395. var IE8_DOM_DEFINE = ie8DomDefine;
  396. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  397. var anObject$5 = anObject$6;
  398. var toPropertyKey = toPropertyKey$2;
  399. var $TypeError$3 = TypeError;
  400. // eslint-disable-next-line es/no-object-defineproperty -- safe
  401. var $defineProperty = Object.defineProperty;
  402. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  403. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  404. var ENUMERABLE = 'enumerable';
  405. var CONFIGURABLE$1 = 'configurable';
  406. var WRITABLE = 'writable';
  407. // `Object.defineProperty` method
  408. // https://tc39.es/ecma262/#sec-object.defineproperty
  409. objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  410. anObject$5(O);
  411. P = toPropertyKey(P);
  412. anObject$5(Attributes);
  413. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  414. var current = $getOwnPropertyDescriptor(O, P);
  415. if (current && current[WRITABLE]) {
  416. O[P] = Attributes.value;
  417. Attributes = {
  418. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  419. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  420. writable: false
  421. };
  422. }
  423. } return $defineProperty(O, P, Attributes);
  424. } : $defineProperty : function defineProperty(O, P, Attributes) {
  425. anObject$5(O);
  426. P = toPropertyKey(P);
  427. anObject$5(Attributes);
  428. if (IE8_DOM_DEFINE) try {
  429. return $defineProperty(O, P, Attributes);
  430. } catch (error) { /* empty */ }
  431. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$3('Accessors not supported');
  432. if ('value' in Attributes) O[P] = Attributes.value;
  433. return O;
  434. };
  435. var DESCRIPTORS$6 = descriptors;
  436. var definePropertyModule$4 = objectDefineProperty;
  437. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  438. var createNonEnumerableProperty$2 = DESCRIPTORS$6 ? function (object, key, value) {
  439. return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
  440. } : function (object, key, value) {
  441. object[key] = value;
  442. return object;
  443. };
  444. var makeBuiltIn$2 = {exports: {}};
  445. var DESCRIPTORS$5 = descriptors;
  446. var hasOwn$5 = hasOwnProperty_1;
  447. var FunctionPrototype = Function.prototype;
  448. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  449. var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
  450. var EXISTS = hasOwn$5(FunctionPrototype, 'name');
  451. // additional protection from minified / mangled / dropped function names
  452. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  453. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype, 'name').configurable));
  454. var functionName = {
  455. EXISTS: EXISTS,
  456. PROPER: PROPER,
  457. CONFIGURABLE: CONFIGURABLE
  458. };
  459. var uncurryThis$d = functionUncurryThis;
  460. var isCallable$6 = isCallable$c;
  461. var store$1 = sharedStoreExports;
  462. var functionToString = uncurryThis$d(Function.toString);
  463. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  464. if (!isCallable$6(store$1.inspectSource)) {
  465. store$1.inspectSource = function (it) {
  466. return functionToString(it);
  467. };
  468. }
  469. var inspectSource$2 = store$1.inspectSource;
  470. var global$4 = global$b;
  471. var isCallable$5 = isCallable$c;
  472. var WeakMap$1 = global$4.WeakMap;
  473. var weakMapBasicDetection = isCallable$5(WeakMap$1) && /native code/.test(String(WeakMap$1));
  474. var shared$1 = shared$3;
  475. var uid = uid$2;
  476. var keys = shared$1('keys');
  477. var sharedKey$2 = function (key) {
  478. return keys[key] || (keys[key] = uid(key));
  479. };
  480. var hiddenKeys$4 = {};
  481. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  482. var global$3 = global$b;
  483. var isObject$3 = isObject$8;
  484. var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
  485. var hasOwn$4 = hasOwnProperty_1;
  486. var shared = sharedStoreExports;
  487. var sharedKey$1 = sharedKey$2;
  488. var hiddenKeys$3 = hiddenKeys$4;
  489. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  490. var TypeError$1 = global$3.TypeError;
  491. var WeakMap = global$3.WeakMap;
  492. var set, get, has;
  493. var enforce = function (it) {
  494. return has(it) ? get(it) : set(it, {});
  495. };
  496. var getterFor = function (TYPE) {
  497. return function (it) {
  498. var state;
  499. if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
  500. throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  501. } return state;
  502. };
  503. };
  504. if (NATIVE_WEAK_MAP || shared.state) {
  505. var store = shared.state || (shared.state = new WeakMap());
  506. /* eslint-disable no-self-assign -- prototype methods protection */
  507. store.get = store.get;
  508. store.has = store.has;
  509. store.set = store.set;
  510. /* eslint-enable no-self-assign -- prototype methods protection */
  511. set = function (it, metadata) {
  512. if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  513. metadata.facade = it;
  514. store.set(it, metadata);
  515. return metadata;
  516. };
  517. get = function (it) {
  518. return store.get(it) || {};
  519. };
  520. has = function (it) {
  521. return store.has(it);
  522. };
  523. } else {
  524. var STATE = sharedKey$1('state');
  525. hiddenKeys$3[STATE] = true;
  526. set = function (it, metadata) {
  527. if (hasOwn$4(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  528. metadata.facade = it;
  529. createNonEnumerableProperty$1(it, STATE, metadata);
  530. return metadata;
  531. };
  532. get = function (it) {
  533. return hasOwn$4(it, STATE) ? it[STATE] : {};
  534. };
  535. has = function (it) {
  536. return hasOwn$4(it, STATE);
  537. };
  538. }
  539. var internalState = {
  540. set: set,
  541. get: get,
  542. has: has,
  543. enforce: enforce,
  544. getterFor: getterFor
  545. };
  546. var uncurryThis$c = functionUncurryThis;
  547. var fails$a = fails$h;
  548. var isCallable$4 = isCallable$c;
  549. var hasOwn$3 = hasOwnProperty_1;
  550. var DESCRIPTORS$4 = descriptors;
  551. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  552. var inspectSource$1 = inspectSource$2;
  553. var InternalStateModule = internalState;
  554. var enforceInternalState = InternalStateModule.enforce;
  555. var getInternalState = InternalStateModule.get;
  556. var $String$1 = String;
  557. // eslint-disable-next-line es/no-object-defineproperty -- safe
  558. var defineProperty$2 = Object.defineProperty;
  559. var stringSlice = uncurryThis$c(''.slice);
  560. var replace$1 = uncurryThis$c(''.replace);
  561. var join = uncurryThis$c([].join);
  562. var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$a(function () {
  563. return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  564. });
  565. var TEMPLATE = String(String).split('String');
  566. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  567. if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
  568. name = '[' + replace$1($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  569. }
  570. if (options && options.getter) name = 'get ' + name;
  571. if (options && options.setter) name = 'set ' + name;
  572. if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  573. if (DESCRIPTORS$4) defineProperty$2(value, 'name', { value: name, configurable: true });
  574. else value.name = name;
  575. }
  576. if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
  577. defineProperty$2(value, 'length', { value: options.arity });
  578. }
  579. try {
  580. if (options && hasOwn$3(options, 'constructor') && options.constructor) {
  581. if (DESCRIPTORS$4) defineProperty$2(value, 'prototype', { writable: false });
  582. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  583. } else if (value.prototype) value.prototype = undefined;
  584. } catch (error) { /* empty */ }
  585. var state = enforceInternalState(value);
  586. if (!hasOwn$3(state, 'source')) {
  587. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  588. } return value;
  589. };
  590. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  591. // eslint-disable-next-line no-extend-native -- required
  592. Function.prototype.toString = makeBuiltIn$1(function toString() {
  593. return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
  594. }, 'toString');
  595. var makeBuiltInExports = makeBuiltIn$2.exports;
  596. var isCallable$3 = isCallable$c;
  597. var definePropertyModule$3 = objectDefineProperty;
  598. var makeBuiltIn = makeBuiltInExports;
  599. var defineGlobalProperty$1 = defineGlobalProperty$3;
  600. var defineBuiltIn$3 = function (O, key, value, options) {
  601. if (!options) options = {};
  602. var simple = options.enumerable;
  603. var name = options.name !== undefined ? options.name : key;
  604. if (isCallable$3(value)) makeBuiltIn(value, name, options);
  605. if (options.global) {
  606. if (simple) O[key] = value;
  607. else defineGlobalProperty$1(key, value);
  608. } else {
  609. try {
  610. if (!options.unsafe) delete O[key];
  611. else if (O[key]) simple = true;
  612. } catch (error) { /* empty */ }
  613. if (simple) O[key] = value;
  614. else definePropertyModule$3.f(O, key, {
  615. value: value,
  616. enumerable: false,
  617. configurable: !options.nonConfigurable,
  618. writable: !options.nonWritable
  619. });
  620. } return O;
  621. };
  622. var objectGetOwnPropertyNames = {};
  623. var ceil = Math.ceil;
  624. var floor$1 = Math.floor;
  625. // `Math.trunc` method
  626. // https://tc39.es/ecma262/#sec-math.trunc
  627. // eslint-disable-next-line es/no-math-trunc -- safe
  628. var mathTrunc = Math.trunc || function trunc(x) {
  629. var n = +x;
  630. return (n > 0 ? floor$1 : ceil)(n);
  631. };
  632. var trunc = mathTrunc;
  633. // `ToIntegerOrInfinity` abstract operation
  634. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  635. var toIntegerOrInfinity$3 = function (argument) {
  636. var number = +argument;
  637. // eslint-disable-next-line no-self-compare -- NaN check
  638. return number !== number || number === 0 ? 0 : trunc(number);
  639. };
  640. var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
  641. var max$2 = Math.max;
  642. var min$2 = Math.min;
  643. // Helper for a popular repeating case of the spec:
  644. // Let integer be ? ToInteger(index).
  645. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  646. var toAbsoluteIndex$3 = function (index, length) {
  647. var integer = toIntegerOrInfinity$2(index);
  648. return integer < 0 ? max$2(integer + length, 0) : min$2(integer, length);
  649. };
  650. var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
  651. var min$1 = Math.min;
  652. // `ToLength` abstract operation
  653. // https://tc39.es/ecma262/#sec-tolength
  654. var toLength$1 = function (argument) {
  655. var len = toIntegerOrInfinity$1(argument);
  656. return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  657. };
  658. var toLength = toLength$1;
  659. // `LengthOfArrayLike` abstract operation
  660. // https://tc39.es/ecma262/#sec-lengthofarraylike
  661. var lengthOfArrayLike$6 = function (obj) {
  662. return toLength(obj.length);
  663. };
  664. var toIndexedObject$3 = toIndexedObject$5;
  665. var toAbsoluteIndex$2 = toAbsoluteIndex$3;
  666. var lengthOfArrayLike$5 = lengthOfArrayLike$6;
  667. // `Array.prototype.{ indexOf, includes }` methods implementation
  668. var createMethod$2 = function (IS_INCLUDES) {
  669. return function ($this, el, fromIndex) {
  670. var O = toIndexedObject$3($this);
  671. var length = lengthOfArrayLike$5(O);
  672. if (length === 0) return !IS_INCLUDES && -1;
  673. var index = toAbsoluteIndex$2(fromIndex, length);
  674. var value;
  675. // Array#includes uses SameValueZero equality algorithm
  676. // eslint-disable-next-line no-self-compare -- NaN check
  677. if (IS_INCLUDES && el !== el) while (length > index) {
  678. value = O[index++];
  679. // eslint-disable-next-line no-self-compare -- NaN check
  680. if (value !== value) return true;
  681. // Array#indexOf ignores holes, Array#includes - not
  682. } else for (;length > index; index++) {
  683. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  684. } return !IS_INCLUDES && -1;
  685. };
  686. };
  687. var arrayIncludes = {
  688. // `Array.prototype.includes` method
  689. // https://tc39.es/ecma262/#sec-array.prototype.includes
  690. includes: createMethod$2(true),
  691. // `Array.prototype.indexOf` method
  692. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  693. indexOf: createMethod$2(false)
  694. };
  695. var uncurryThis$b = functionUncurryThis;
  696. var hasOwn$2 = hasOwnProperty_1;
  697. var toIndexedObject$2 = toIndexedObject$5;
  698. var indexOf = arrayIncludes.indexOf;
  699. var hiddenKeys$2 = hiddenKeys$4;
  700. var push$2 = uncurryThis$b([].push);
  701. var objectKeysInternal = function (object, names) {
  702. var O = toIndexedObject$2(object);
  703. var i = 0;
  704. var result = [];
  705. var key;
  706. for (key in O) !hasOwn$2(hiddenKeys$2, key) && hasOwn$2(O, key) && push$2(result, key);
  707. // Don't enum bug & hidden keys
  708. while (names.length > i) if (hasOwn$2(O, key = names[i++])) {
  709. ~indexOf(result, key) || push$2(result, key);
  710. }
  711. return result;
  712. };
  713. // IE8- don't enum bug keys
  714. var enumBugKeys$3 = [
  715. 'constructor',
  716. 'hasOwnProperty',
  717. 'isPrototypeOf',
  718. 'propertyIsEnumerable',
  719. 'toLocaleString',
  720. 'toString',
  721. 'valueOf'
  722. ];
  723. var internalObjectKeys$1 = objectKeysInternal;
  724. var enumBugKeys$2 = enumBugKeys$3;
  725. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  726. // `Object.getOwnPropertyNames` method
  727. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  728. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  729. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  730. return internalObjectKeys$1(O, hiddenKeys$1);
  731. };
  732. var objectGetOwnPropertySymbols = {};
  733. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  734. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  735. var getBuiltIn$2 = getBuiltIn$4;
  736. var uncurryThis$a = functionUncurryThis;
  737. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  738. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  739. var anObject$4 = anObject$6;
  740. var concat$1 = uncurryThis$a([].concat);
  741. // all object keys, includes non-enumerable and symbols
  742. var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
  743. var keys = getOwnPropertyNamesModule.f(anObject$4(it));
  744. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  745. return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
  746. };
  747. var hasOwn$1 = hasOwnProperty_1;
  748. var ownKeys = ownKeys$1;
  749. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  750. var definePropertyModule$2 = objectDefineProperty;
  751. var copyConstructorProperties$1 = function (target, source, exceptions) {
  752. var keys = ownKeys(source);
  753. var defineProperty = definePropertyModule$2.f;
  754. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  755. for (var i = 0; i < keys.length; i++) {
  756. var key = keys[i];
  757. if (!hasOwn$1(target, key) && !(exceptions && hasOwn$1(exceptions, key))) {
  758. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  759. }
  760. }
  761. };
  762. var fails$9 = fails$h;
  763. var isCallable$2 = isCallable$c;
  764. var replacement = /#|\.prototype\./;
  765. var isForced$1 = function (feature, detection) {
  766. var value = data[normalize(feature)];
  767. return value === POLYFILL ? true
  768. : value === NATIVE ? false
  769. : isCallable$2(detection) ? fails$9(detection)
  770. : !!detection;
  771. };
  772. var normalize = isForced$1.normalize = function (string) {
  773. return String(string).replace(replacement, '.').toLowerCase();
  774. };
  775. var data = isForced$1.data = {};
  776. var NATIVE = isForced$1.NATIVE = 'N';
  777. var POLYFILL = isForced$1.POLYFILL = 'P';
  778. var isForced_1 = isForced$1;
  779. var global$2 = global$b;
  780. var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
  781. var createNonEnumerableProperty = createNonEnumerableProperty$2;
  782. var defineBuiltIn$2 = defineBuiltIn$3;
  783. var defineGlobalProperty = defineGlobalProperty$3;
  784. var copyConstructorProperties = copyConstructorProperties$1;
  785. var isForced = isForced_1;
  786. /*
  787. options.target - name of the target object
  788. options.global - target is the global object
  789. options.stat - export as static methods of target
  790. options.proto - export as prototype methods of target
  791. options.real - real prototype method for the `pure` version
  792. options.forced - export even if the native feature is available
  793. options.bind - bind methods to the target, required for the `pure` version
  794. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  795. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  796. options.sham - add a flag to not completely full polyfills
  797. options.enumerable - export as enumerable property
  798. options.dontCallGetSet - prevent calling a getter on target
  799. options.name - the .name of the function if it does not match the key
  800. */
  801. var _export = function (options, source) {
  802. var TARGET = options.target;
  803. var GLOBAL = options.global;
  804. var STATIC = options.stat;
  805. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  806. if (GLOBAL) {
  807. target = global$2;
  808. } else if (STATIC) {
  809. target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
  810. } else {
  811. target = global$2[TARGET] && global$2[TARGET].prototype;
  812. }
  813. if (target) for (key in source) {
  814. sourceProperty = source[key];
  815. if (options.dontCallGetSet) {
  816. descriptor = getOwnPropertyDescriptor$1(target, key);
  817. targetProperty = descriptor && descriptor.value;
  818. } else targetProperty = target[key];
  819. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  820. // contained in target
  821. if (!FORCED && targetProperty !== undefined) {
  822. if (typeof sourceProperty == typeof targetProperty) continue;
  823. copyConstructorProperties(sourceProperty, targetProperty);
  824. }
  825. // add a flag to not completely full polyfills
  826. if (options.sham || (targetProperty && targetProperty.sham)) {
  827. createNonEnumerableProperty(sourceProperty, 'sham', true);
  828. }
  829. defineBuiltIn$2(target, key, sourceProperty, options);
  830. }
  831. };
  832. var classof$4 = classofRaw$2;
  833. // `IsArray` abstract operation
  834. // https://tc39.es/ecma262/#sec-isarray
  835. // eslint-disable-next-line es/no-array-isarray -- safe
  836. var isArray$4 = Array.isArray || function isArray(argument) {
  837. return classof$4(argument) === 'Array';
  838. };
  839. var $TypeError$2 = TypeError;
  840. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  841. var doesNotExceedSafeInteger$2 = function (it) {
  842. if (it > MAX_SAFE_INTEGER) throw $TypeError$2('Maximum allowed index exceeded');
  843. return it;
  844. };
  845. var DESCRIPTORS$3 = descriptors;
  846. var definePropertyModule$1 = objectDefineProperty;
  847. var createPropertyDescriptor = createPropertyDescriptor$3;
  848. var createProperty$3 = function (object, key, value) {
  849. if (DESCRIPTORS$3) definePropertyModule$1.f(object, key, createPropertyDescriptor(0, value));
  850. else object[key] = value;
  851. };
  852. var wellKnownSymbol$6 = wellKnownSymbol$8;
  853. var TO_STRING_TAG$1 = wellKnownSymbol$6('toStringTag');
  854. var test$1 = {};
  855. test$1[TO_STRING_TAG$1] = 'z';
  856. var toStringTagSupport = String(test$1) === '[object z]';
  857. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  858. var isCallable$1 = isCallable$c;
  859. var classofRaw$1 = classofRaw$2;
  860. var wellKnownSymbol$5 = wellKnownSymbol$8;
  861. var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
  862. var $Object = Object;
  863. // ES3 wrong here
  864. var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
  865. // fallback for IE11 Script Access Denied error
  866. var tryGet = function (it, key) {
  867. try {
  868. return it[key];
  869. } catch (error) { /* empty */ }
  870. };
  871. // getting tag from ES6+ `Object.prototype.toString`
  872. var classof$3 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) {
  873. var O, tag, result;
  874. return it === undefined ? 'Undefined' : it === null ? 'Null'
  875. // @@toStringTag case
  876. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  877. // builtinTag case
  878. : CORRECT_ARGUMENTS ? classofRaw$1(O)
  879. // ES3 arguments fallback
  880. : (result = classofRaw$1(O)) === 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
  881. };
  882. var uncurryThis$9 = functionUncurryThis;
  883. var fails$8 = fails$h;
  884. var isCallable = isCallable$c;
  885. var classof$2 = classof$3;
  886. var getBuiltIn$1 = getBuiltIn$4;
  887. var inspectSource = inspectSource$2;
  888. var noop = function () { /* empty */ };
  889. var construct = getBuiltIn$1('Reflect', 'construct');
  890. var constructorRegExp = /^\s*(?:class|function)\b/;
  891. var exec = uncurryThis$9(constructorRegExp.exec);
  892. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  893. var isConstructorModern = function isConstructor(argument) {
  894. if (!isCallable(argument)) return false;
  895. try {
  896. construct(noop, [], argument);
  897. return true;
  898. } catch (error) {
  899. return false;
  900. }
  901. };
  902. var isConstructorLegacy = function isConstructor(argument) {
  903. if (!isCallable(argument)) return false;
  904. switch (classof$2(argument)) {
  905. case 'AsyncFunction':
  906. case 'GeneratorFunction':
  907. case 'AsyncGeneratorFunction': return false;
  908. }
  909. try {
  910. // we can't check .prototype since constructors produced by .bind haven't it
  911. // `Function#toString` throws on some built-it function in some legacy engines
  912. // (for example, `DOMQuad` and similar in FF41-)
  913. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  914. } catch (error) {
  915. return true;
  916. }
  917. };
  918. isConstructorLegacy.sham = true;
  919. // `IsConstructor` abstract operation
  920. // https://tc39.es/ecma262/#sec-isconstructor
  921. var isConstructor$2 = !construct || fails$8(function () {
  922. var called;
  923. return isConstructorModern(isConstructorModern.call)
  924. || !isConstructorModern(Object)
  925. || !isConstructorModern(function () { called = true; })
  926. || called;
  927. }) ? isConstructorLegacy : isConstructorModern;
  928. var isArray$3 = isArray$4;
  929. var isConstructor$1 = isConstructor$2;
  930. var isObject$2 = isObject$8;
  931. var wellKnownSymbol$4 = wellKnownSymbol$8;
  932. var SPECIES$2 = wellKnownSymbol$4('species');
  933. var $Array$1 = Array;
  934. // a part of `ArraySpeciesCreate` abstract operation
  935. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  936. var arraySpeciesConstructor$1 = function (originalArray) {
  937. var C;
  938. if (isArray$3(originalArray)) {
  939. C = originalArray.constructor;
  940. // cross-realm fallback
  941. if (isConstructor$1(C) && (C === $Array$1 || isArray$3(C.prototype))) C = undefined;
  942. else if (isObject$2(C)) {
  943. C = C[SPECIES$2];
  944. if (C === null) C = undefined;
  945. }
  946. } return C === undefined ? $Array$1 : C;
  947. };
  948. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  949. // `ArraySpeciesCreate` abstract operation
  950. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  951. var arraySpeciesCreate$3 = function (originalArray, length) {
  952. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  953. };
  954. var fails$7 = fails$h;
  955. var wellKnownSymbol$3 = wellKnownSymbol$8;
  956. var V8_VERSION$1 = engineV8Version;
  957. var SPECIES$1 = wellKnownSymbol$3('species');
  958. var arrayMethodHasSpeciesSupport$4 = function (METHOD_NAME) {
  959. // We can't use this feature detection in V8 since it causes
  960. // deoptimization and serious performance degradation
  961. // https://github.com/zloirock/core-js/issues/677
  962. return V8_VERSION$1 >= 51 || !fails$7(function () {
  963. var array = [];
  964. var constructor = array.constructor = {};
  965. constructor[SPECIES$1] = function () {
  966. return { foo: 1 };
  967. };
  968. return array[METHOD_NAME](Boolean).foo !== 1;
  969. });
  970. };
  971. var $$9 = _export;
  972. var fails$6 = fails$h;
  973. var isArray$2 = isArray$4;
  974. var isObject$1 = isObject$8;
  975. var toObject$4 = toObject$6;
  976. var lengthOfArrayLike$4 = lengthOfArrayLike$6;
  977. var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$2;
  978. var createProperty$2 = createProperty$3;
  979. var arraySpeciesCreate$2 = arraySpeciesCreate$3;
  980. var arrayMethodHasSpeciesSupport$3 = arrayMethodHasSpeciesSupport$4;
  981. var wellKnownSymbol$2 = wellKnownSymbol$8;
  982. var V8_VERSION = engineV8Version;
  983. var IS_CONCAT_SPREADABLE = wellKnownSymbol$2('isConcatSpreadable');
  984. // We can't use this feature detection in V8 since it causes
  985. // deoptimization and serious performance degradation
  986. // https://github.com/zloirock/core-js/issues/679
  987. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$6(function () {
  988. var array = [];
  989. array[IS_CONCAT_SPREADABLE] = false;
  990. return array.concat()[0] !== array;
  991. });
  992. var isConcatSpreadable = function (O) {
  993. if (!isObject$1(O)) return false;
  994. var spreadable = O[IS_CONCAT_SPREADABLE];
  995. return spreadable !== undefined ? !!spreadable : isArray$2(O);
  996. };
  997. var FORCED$3 = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport$3('concat');
  998. // `Array.prototype.concat` method
  999. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1000. // with adding support of @@isConcatSpreadable and @@species
  1001. $$9({ target: 'Array', proto: true, arity: 1, forced: FORCED$3 }, {
  1002. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1003. concat: function concat(arg) {
  1004. var O = toObject$4(this);
  1005. var A = arraySpeciesCreate$2(O, 0);
  1006. var n = 0;
  1007. var i, k, length, len, E;
  1008. for (i = -1, length = arguments.length; i < length; i++) {
  1009. E = i === -1 ? O : arguments[i];
  1010. if (isConcatSpreadable(E)) {
  1011. len = lengthOfArrayLike$4(E);
  1012. doesNotExceedSafeInteger$1(n + len);
  1013. for (k = 0; k < len; k++, n++) if (k in E) createProperty$2(A, n, E[k]);
  1014. } else {
  1015. doesNotExceedSafeInteger$1(n + 1);
  1016. createProperty$2(A, n++, E);
  1017. }
  1018. }
  1019. A.length = n;
  1020. return A;
  1021. }
  1022. });
  1023. var classofRaw = classofRaw$2;
  1024. var uncurryThis$8 = functionUncurryThis;
  1025. var functionUncurryThisClause = function (fn) {
  1026. // Nashorn bug:
  1027. // https://github.com/zloirock/core-js/issues/1128
  1028. // https://github.com/zloirock/core-js/issues/1130
  1029. if (classofRaw(fn) === 'Function') return uncurryThis$8(fn);
  1030. };
  1031. var uncurryThis$7 = functionUncurryThisClause;
  1032. var aCallable$1 = aCallable$3;
  1033. var NATIVE_BIND = functionBindNative;
  1034. var bind$1 = uncurryThis$7(uncurryThis$7.bind);
  1035. // optional / simple context binding
  1036. var functionBindContext = function (fn, that) {
  1037. aCallable$1(fn);
  1038. return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
  1039. return fn.apply(that, arguments);
  1040. };
  1041. };
  1042. var bind = functionBindContext;
  1043. var uncurryThis$6 = functionUncurryThis;
  1044. var IndexedObject$1 = indexedObject;
  1045. var toObject$3 = toObject$6;
  1046. var lengthOfArrayLike$3 = lengthOfArrayLike$6;
  1047. var arraySpeciesCreate$1 = arraySpeciesCreate$3;
  1048. var push$1 = uncurryThis$6([].push);
  1049. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1050. var createMethod$1 = function (TYPE) {
  1051. var IS_MAP = TYPE === 1;
  1052. var IS_FILTER = TYPE === 2;
  1053. var IS_SOME = TYPE === 3;
  1054. var IS_EVERY = TYPE === 4;
  1055. var IS_FIND_INDEX = TYPE === 6;
  1056. var IS_FILTER_REJECT = TYPE === 7;
  1057. var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
  1058. return function ($this, callbackfn, that, specificCreate) {
  1059. var O = toObject$3($this);
  1060. var self = IndexedObject$1(O);
  1061. var length = lengthOfArrayLike$3(self);
  1062. var boundFunction = bind(callbackfn, that);
  1063. var index = 0;
  1064. var create = specificCreate || arraySpeciesCreate$1;
  1065. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1066. var value, result;
  1067. for (;length > index; index++) if (NO_HOLES || index in self) {
  1068. value = self[index];
  1069. result = boundFunction(value, index, O);
  1070. if (TYPE) {
  1071. if (IS_MAP) target[index] = result; // map
  1072. else if (result) switch (TYPE) {
  1073. case 3: return true; // some
  1074. case 5: return value; // find
  1075. case 6: return index; // findIndex
  1076. case 2: push$1(target, value); // filter
  1077. } else switch (TYPE) {
  1078. case 4: return false; // every
  1079. case 7: push$1(target, value); // filterReject
  1080. }
  1081. }
  1082. }
  1083. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1084. };
  1085. };
  1086. var arrayIteration = {
  1087. // `Array.prototype.forEach` method
  1088. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1089. forEach: createMethod$1(0),
  1090. // `Array.prototype.map` method
  1091. // https://tc39.es/ecma262/#sec-array.prototype.map
  1092. map: createMethod$1(1),
  1093. // `Array.prototype.filter` method
  1094. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1095. filter: createMethod$1(2),
  1096. // `Array.prototype.some` method
  1097. // https://tc39.es/ecma262/#sec-array.prototype.some
  1098. some: createMethod$1(3),
  1099. // `Array.prototype.every` method
  1100. // https://tc39.es/ecma262/#sec-array.prototype.every
  1101. every: createMethod$1(4),
  1102. // `Array.prototype.find` method
  1103. // https://tc39.es/ecma262/#sec-array.prototype.find
  1104. find: createMethod$1(5),
  1105. // `Array.prototype.findIndex` method
  1106. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1107. findIndex: createMethod$1(6),
  1108. // `Array.prototype.filterReject` method
  1109. // https://github.com/tc39/proposal-array-filtering
  1110. filterReject: createMethod$1(7)
  1111. };
  1112. var objectDefineProperties = {};
  1113. var internalObjectKeys = objectKeysInternal;
  1114. var enumBugKeys$1 = enumBugKeys$3;
  1115. // `Object.keys` method
  1116. // https://tc39.es/ecma262/#sec-object.keys
  1117. // eslint-disable-next-line es/no-object-keys -- safe
  1118. var objectKeys$2 = Object.keys || function keys(O) {
  1119. return internalObjectKeys(O, enumBugKeys$1);
  1120. };
  1121. var DESCRIPTORS$2 = descriptors;
  1122. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1123. var definePropertyModule = objectDefineProperty;
  1124. var anObject$3 = anObject$6;
  1125. var toIndexedObject$1 = toIndexedObject$5;
  1126. var objectKeys$1 = objectKeys$2;
  1127. // `Object.defineProperties` method
  1128. // https://tc39.es/ecma262/#sec-object.defineproperties
  1129. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1130. objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1131. anObject$3(O);
  1132. var props = toIndexedObject$1(Properties);
  1133. var keys = objectKeys$1(Properties);
  1134. var length = keys.length;
  1135. var index = 0;
  1136. var key;
  1137. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  1138. return O;
  1139. };
  1140. var getBuiltIn = getBuiltIn$4;
  1141. var html$1 = getBuiltIn('document', 'documentElement');
  1142. /* global ActiveXObject -- old IE, WSH */
  1143. var anObject$2 = anObject$6;
  1144. var definePropertiesModule = objectDefineProperties;
  1145. var enumBugKeys = enumBugKeys$3;
  1146. var hiddenKeys = hiddenKeys$4;
  1147. var html = html$1;
  1148. var documentCreateElement = documentCreateElement$1;
  1149. var sharedKey = sharedKey$2;
  1150. var GT = '>';
  1151. var LT = '<';
  1152. var PROTOTYPE = 'prototype';
  1153. var SCRIPT = 'script';
  1154. var IE_PROTO = sharedKey('IE_PROTO');
  1155. var EmptyConstructor = function () { /* empty */ };
  1156. var scriptTag = function (content) {
  1157. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1158. };
  1159. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1160. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1161. activeXDocument.write(scriptTag(''));
  1162. activeXDocument.close();
  1163. var temp = activeXDocument.parentWindow.Object;
  1164. activeXDocument = null; // avoid memory leak
  1165. return temp;
  1166. };
  1167. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1168. var NullProtoObjectViaIFrame = function () {
  1169. // Thrash, waste and sodomy: IE GC bug
  1170. var iframe = documentCreateElement('iframe');
  1171. var JS = 'java' + SCRIPT + ':';
  1172. var iframeDocument;
  1173. iframe.style.display = 'none';
  1174. html.appendChild(iframe);
  1175. // https://github.com/zloirock/core-js/issues/475
  1176. iframe.src = String(JS);
  1177. iframeDocument = iframe.contentWindow.document;
  1178. iframeDocument.open();
  1179. iframeDocument.write(scriptTag('document.F=Object'));
  1180. iframeDocument.close();
  1181. return iframeDocument.F;
  1182. };
  1183. // Check for document.domain and active x support
  1184. // No need to use active x approach when document.domain is not set
  1185. // see https://github.com/es-shims/es5-shim/issues/150
  1186. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1187. // avoid IE GC bug
  1188. var activeXDocument;
  1189. var NullProtoObject = function () {
  1190. try {
  1191. activeXDocument = new ActiveXObject('htmlfile');
  1192. } catch (error) { /* ignore */ }
  1193. NullProtoObject = typeof document != 'undefined'
  1194. ? document.domain && activeXDocument
  1195. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1196. : NullProtoObjectViaIFrame()
  1197. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1198. var length = enumBugKeys.length;
  1199. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1200. return NullProtoObject();
  1201. };
  1202. hiddenKeys[IE_PROTO] = true;
  1203. // `Object.create` method
  1204. // https://tc39.es/ecma262/#sec-object.create
  1205. // eslint-disable-next-line es/no-object-create -- safe
  1206. var objectCreate = Object.create || function create(O, Properties) {
  1207. var result;
  1208. if (O !== null) {
  1209. EmptyConstructor[PROTOTYPE] = anObject$2(O);
  1210. result = new EmptyConstructor();
  1211. EmptyConstructor[PROTOTYPE] = null;
  1212. // add "__proto__" for Object.getPrototypeOf polyfill
  1213. result[IE_PROTO] = O;
  1214. } else result = NullProtoObject();
  1215. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1216. };
  1217. var wellKnownSymbol$1 = wellKnownSymbol$8;
  1218. var create = objectCreate;
  1219. var defineProperty$1 = objectDefineProperty.f;
  1220. var UNSCOPABLES = wellKnownSymbol$1('unscopables');
  1221. var ArrayPrototype = Array.prototype;
  1222. // Array.prototype[@@unscopables]
  1223. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1224. if (ArrayPrototype[UNSCOPABLES] === undefined) {
  1225. defineProperty$1(ArrayPrototype, UNSCOPABLES, {
  1226. configurable: true,
  1227. value: create(null)
  1228. });
  1229. }
  1230. // add a key to Array.prototype[@@unscopables]
  1231. var addToUnscopables$2 = function (key) {
  1232. ArrayPrototype[UNSCOPABLES][key] = true;
  1233. };
  1234. var $$8 = _export;
  1235. var $find = arrayIteration.find;
  1236. var addToUnscopables$1 = addToUnscopables$2;
  1237. var FIND = 'find';
  1238. var SKIPS_HOLES = true;
  1239. // Shouldn't skip holes
  1240. // eslint-disable-next-line es/no-array-prototype-find -- testing
  1241. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1242. // `Array.prototype.find` method
  1243. // https://tc39.es/ecma262/#sec-array.prototype.find
  1244. $$8({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1245. find: function find(callbackfn /* , that = undefined */) {
  1246. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1247. }
  1248. });
  1249. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1250. addToUnscopables$1(FIND);
  1251. var $$7 = _export;
  1252. var $includes = arrayIncludes.includes;
  1253. var fails$5 = fails$h;
  1254. var addToUnscopables = addToUnscopables$2;
  1255. // FF99+ bug
  1256. var BROKEN_ON_SPARSE = fails$5(function () {
  1257. // eslint-disable-next-line es/no-array-prototype-includes -- detection
  1258. return !Array(1).includes();
  1259. });
  1260. // `Array.prototype.includes` method
  1261. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1262. $$7({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1263. includes: function includes(el /* , fromIndex = 0 */) {
  1264. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1265. }
  1266. });
  1267. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1268. addToUnscopables('includes');
  1269. var fails$4 = fails$h;
  1270. var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
  1271. var method = [][METHOD_NAME];
  1272. return !!method && fails$4(function () {
  1273. // eslint-disable-next-line no-useless-call -- required for testing
  1274. method.call(null, argument || function () { return 1; }, 1);
  1275. });
  1276. };
  1277. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  1278. var $$6 = _export;
  1279. var uncurryThis$5 = functionUncurryThisClause;
  1280. var $indexOf = arrayIncludes.indexOf;
  1281. var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
  1282. var nativeIndexOf = uncurryThis$5([].indexOf);
  1283. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  1284. var FORCED$2 = NEGATIVE_ZERO || !arrayMethodIsStrict$1('indexOf');
  1285. // `Array.prototype.indexOf` method
  1286. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1287. $$6({ target: 'Array', proto: true, forced: FORCED$2 }, {
  1288. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1289. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1290. return NEGATIVE_ZERO
  1291. // convert -0 to +0
  1292. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  1293. : $indexOf(this, searchElement, fromIndex);
  1294. }
  1295. });
  1296. var $$5 = _export;
  1297. var $map = arrayIteration.map;
  1298. var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$4;
  1299. var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport$2('map');
  1300. // `Array.prototype.map` method
  1301. // https://tc39.es/ecma262/#sec-array.prototype.map
  1302. // with adding support of @@species
  1303. $$5({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 }, {
  1304. map: function map(callbackfn /* , thisArg */) {
  1305. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1306. }
  1307. });
  1308. var uncurryThis$4 = functionUncurryThis;
  1309. var arraySlice$1 = uncurryThis$4([].slice);
  1310. var $$4 = _export;
  1311. var isArray$1 = isArray$4;
  1312. var isConstructor = isConstructor$2;
  1313. var isObject = isObject$8;
  1314. var toAbsoluteIndex$1 = toAbsoluteIndex$3;
  1315. var lengthOfArrayLike$2 = lengthOfArrayLike$6;
  1316. var toIndexedObject = toIndexedObject$5;
  1317. var createProperty$1 = createProperty$3;
  1318. var wellKnownSymbol = wellKnownSymbol$8;
  1319. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$4;
  1320. var nativeSlice = arraySlice$1;
  1321. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('slice');
  1322. var SPECIES = wellKnownSymbol('species');
  1323. var $Array = Array;
  1324. var max$1 = Math.max;
  1325. // `Array.prototype.slice` method
  1326. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1327. // fallback for not array-like ES3 strings and DOM objects
  1328. $$4({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1329. slice: function slice(start, end) {
  1330. var O = toIndexedObject(this);
  1331. var length = lengthOfArrayLike$2(O);
  1332. var k = toAbsoluteIndex$1(start, length);
  1333. var fin = toAbsoluteIndex$1(end === undefined ? length : end, length);
  1334. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1335. var Constructor, result, n;
  1336. if (isArray$1(O)) {
  1337. Constructor = O.constructor;
  1338. // cross-realm fallback
  1339. if (isConstructor(Constructor) && (Constructor === $Array || isArray$1(Constructor.prototype))) {
  1340. Constructor = undefined;
  1341. } else if (isObject(Constructor)) {
  1342. Constructor = Constructor[SPECIES];
  1343. if (Constructor === null) Constructor = undefined;
  1344. }
  1345. if (Constructor === $Array || Constructor === undefined) {
  1346. return nativeSlice(O, k, fin);
  1347. }
  1348. }
  1349. result = new (Constructor === undefined ? $Array : Constructor)(max$1(fin - k, 0));
  1350. for (n = 0; k < fin; k++, n++) if (k in O) createProperty$1(result, n, O[k]);
  1351. result.length = n;
  1352. return result;
  1353. }
  1354. });
  1355. var tryToString = tryToString$2;
  1356. var $TypeError$1 = TypeError;
  1357. var deletePropertyOrThrow$2 = function (O, P) {
  1358. if (!delete O[P]) throw new $TypeError$1('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  1359. };
  1360. var classof$1 = classof$3;
  1361. var $String = String;
  1362. var toString$4 = function (argument) {
  1363. if (classof$1(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  1364. return $String(argument);
  1365. };
  1366. var arraySlice = arraySlice$1;
  1367. var floor = Math.floor;
  1368. var sort = function (array, comparefn) {
  1369. var length = array.length;
  1370. if (length < 8) {
  1371. // insertion sort
  1372. var i = 1;
  1373. var element, j;
  1374. while (i < length) {
  1375. j = i;
  1376. element = array[i];
  1377. while (j && comparefn(array[j - 1], element) > 0) {
  1378. array[j] = array[--j];
  1379. }
  1380. if (j !== i++) array[j] = element;
  1381. }
  1382. } else {
  1383. // merge sort
  1384. var middle = floor(length / 2);
  1385. var left = sort(arraySlice(array, 0, middle), comparefn);
  1386. var right = sort(arraySlice(array, middle), comparefn);
  1387. var llength = left.length;
  1388. var rlength = right.length;
  1389. var lindex = 0;
  1390. var rindex = 0;
  1391. while (lindex < llength || rindex < rlength) {
  1392. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  1393. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  1394. : lindex < llength ? left[lindex++] : right[rindex++];
  1395. }
  1396. }
  1397. return array;
  1398. };
  1399. var arraySort = sort;
  1400. var userAgent$1 = engineUserAgent;
  1401. var firefox = userAgent$1.match(/firefox\/(\d+)/i);
  1402. var engineFfVersion = !!firefox && +firefox[1];
  1403. var UA = engineUserAgent;
  1404. var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
  1405. var userAgent = engineUserAgent;
  1406. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  1407. var engineWebkitVersion = !!webkit && +webkit[1];
  1408. var $$3 = _export;
  1409. var uncurryThis$3 = functionUncurryThis;
  1410. var aCallable = aCallable$3;
  1411. var toObject$2 = toObject$6;
  1412. var lengthOfArrayLike$1 = lengthOfArrayLike$6;
  1413. var deletePropertyOrThrow$1 = deletePropertyOrThrow$2;
  1414. var toString$3 = toString$4;
  1415. var fails$3 = fails$h;
  1416. var internalSort = arraySort;
  1417. var arrayMethodIsStrict = arrayMethodIsStrict$2;
  1418. var FF = engineFfVersion;
  1419. var IE_OR_EDGE = engineIsIeOrEdge;
  1420. var V8 = engineV8Version;
  1421. var WEBKIT = engineWebkitVersion;
  1422. var test = [];
  1423. var nativeSort = uncurryThis$3(test.sort);
  1424. var push = uncurryThis$3(test.push);
  1425. // IE8-
  1426. var FAILS_ON_UNDEFINED = fails$3(function () {
  1427. test.sort(undefined);
  1428. });
  1429. // V8 bug
  1430. var FAILS_ON_NULL = fails$3(function () {
  1431. test.sort(null);
  1432. });
  1433. // Old WebKit
  1434. var STRICT_METHOD = arrayMethodIsStrict('sort');
  1435. var STABLE_SORT = !fails$3(function () {
  1436. // feature detection can be too slow, so check engines versions
  1437. if (V8) return V8 < 70;
  1438. if (FF && FF > 3) return;
  1439. if (IE_OR_EDGE) return true;
  1440. if (WEBKIT) return WEBKIT < 603;
  1441. var result = '';
  1442. var code, chr, value, index;
  1443. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  1444. for (code = 65; code < 76; code++) {
  1445. chr = String.fromCharCode(code);
  1446. switch (code) {
  1447. case 66: case 69: case 70: case 72: value = 3; break;
  1448. case 68: case 71: value = 4; break;
  1449. default: value = 2;
  1450. }
  1451. for (index = 0; index < 47; index++) {
  1452. test.push({ k: chr + index, v: value });
  1453. }
  1454. }
  1455. test.sort(function (a, b) { return b.v - a.v; });
  1456. for (index = 0; index < test.length; index++) {
  1457. chr = test[index].k.charAt(0);
  1458. if (result.charAt(result.length - 1) !== chr) result += chr;
  1459. }
  1460. return result !== 'DGBEFHACIJK';
  1461. });
  1462. var FORCED$1 = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
  1463. var getSortCompare = function (comparefn) {
  1464. return function (x, y) {
  1465. if (y === undefined) return -1;
  1466. if (x === undefined) return 1;
  1467. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  1468. return toString$3(x) > toString$3(y) ? 1 : -1;
  1469. };
  1470. };
  1471. // `Array.prototype.sort` method
  1472. // https://tc39.es/ecma262/#sec-array.prototype.sort
  1473. $$3({ target: 'Array', proto: true, forced: FORCED$1 }, {
  1474. sort: function sort(comparefn) {
  1475. if (comparefn !== undefined) aCallable(comparefn);
  1476. var array = toObject$2(this);
  1477. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  1478. var items = [];
  1479. var arrayLength = lengthOfArrayLike$1(array);
  1480. var itemsLength, index;
  1481. for (index = 0; index < arrayLength; index++) {
  1482. if (index in array) push(items, array[index]);
  1483. }
  1484. internalSort(items, getSortCompare(comparefn));
  1485. itemsLength = lengthOfArrayLike$1(items);
  1486. index = 0;
  1487. while (index < itemsLength) array[index] = items[index++];
  1488. while (index < arrayLength) deletePropertyOrThrow$1(array, index++);
  1489. return array;
  1490. }
  1491. });
  1492. var DESCRIPTORS$1 = descriptors;
  1493. var isArray = isArray$4;
  1494. var $TypeError = TypeError;
  1495. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  1496. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  1497. // Safari < 13 does not throw an error in this case
  1498. var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$1 && !function () {
  1499. // makes no sense without proper strict mode support
  1500. if (this !== undefined) return true;
  1501. try {
  1502. // eslint-disable-next-line es/no-object-defineproperty -- safe
  1503. Object.defineProperty([], 'length', { writable: false }).length = 1;
  1504. } catch (error) {
  1505. return error instanceof TypeError;
  1506. }
  1507. }();
  1508. var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
  1509. if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
  1510. throw new $TypeError('Cannot set read only .length');
  1511. } return O.length = length;
  1512. } : function (O, length) {
  1513. return O.length = length;
  1514. };
  1515. var $$2 = _export;
  1516. var toObject$1 = toObject$6;
  1517. var toAbsoluteIndex = toAbsoluteIndex$3;
  1518. var toIntegerOrInfinity = toIntegerOrInfinity$3;
  1519. var lengthOfArrayLike = lengthOfArrayLike$6;
  1520. var setArrayLength = arraySetLength;
  1521. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$2;
  1522. var arraySpeciesCreate = arraySpeciesCreate$3;
  1523. var createProperty = createProperty$3;
  1524. var deletePropertyOrThrow = deletePropertyOrThrow$2;
  1525. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$4;
  1526. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  1527. var max = Math.max;
  1528. var min = Math.min;
  1529. // `Array.prototype.splice` method
  1530. // https://tc39.es/ecma262/#sec-array.prototype.splice
  1531. // with adding support of @@species
  1532. $$2({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1533. splice: function splice(start, deleteCount /* , ...items */) {
  1534. var O = toObject$1(this);
  1535. var len = lengthOfArrayLike(O);
  1536. var actualStart = toAbsoluteIndex(start, len);
  1537. var argumentsLength = arguments.length;
  1538. var insertCount, actualDeleteCount, A, k, from, to;
  1539. if (argumentsLength === 0) {
  1540. insertCount = actualDeleteCount = 0;
  1541. } else if (argumentsLength === 1) {
  1542. insertCount = 0;
  1543. actualDeleteCount = len - actualStart;
  1544. } else {
  1545. insertCount = argumentsLength - 2;
  1546. actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
  1547. }
  1548. doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
  1549. A = arraySpeciesCreate(O, actualDeleteCount);
  1550. for (k = 0; k < actualDeleteCount; k++) {
  1551. from = actualStart + k;
  1552. if (from in O) createProperty(A, k, O[from]);
  1553. }
  1554. A.length = actualDeleteCount;
  1555. if (insertCount < actualDeleteCount) {
  1556. for (k = actualStart; k < len - actualDeleteCount; k++) {
  1557. from = k + actualDeleteCount;
  1558. to = k + insertCount;
  1559. if (from in O) O[to] = O[from];
  1560. else deletePropertyOrThrow(O, to);
  1561. }
  1562. for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);
  1563. } else if (insertCount > actualDeleteCount) {
  1564. for (k = len - actualDeleteCount; k > actualStart; k--) {
  1565. from = k + actualDeleteCount - 1;
  1566. to = k + insertCount - 1;
  1567. if (from in O) O[to] = O[from];
  1568. else deletePropertyOrThrow(O, to);
  1569. }
  1570. }
  1571. for (k = 0; k < insertCount; k++) {
  1572. O[k + actualStart] = arguments[k + 2];
  1573. }
  1574. setArrayLength(O, len - actualDeleteCount + insertCount);
  1575. return A;
  1576. }
  1577. });
  1578. var DESCRIPTORS = descriptors;
  1579. var uncurryThis$2 = functionUncurryThis;
  1580. var call$1 = functionCall;
  1581. var fails$2 = fails$h;
  1582. var objectKeys = objectKeys$2;
  1583. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1584. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1585. var toObject = toObject$6;
  1586. var IndexedObject = indexedObject;
  1587. // eslint-disable-next-line es/no-object-assign -- safe
  1588. var $assign = Object.assign;
  1589. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1590. var defineProperty = Object.defineProperty;
  1591. var concat = uncurryThis$2([].concat);
  1592. // `Object.assign` method
  1593. // https://tc39.es/ecma262/#sec-object.assign
  1594. var objectAssign = !$assign || fails$2(function () {
  1595. // should have correct order of operations (Edge bug)
  1596. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1597. enumerable: true,
  1598. get: function () {
  1599. defineProperty(this, 'b', {
  1600. value: 3,
  1601. enumerable: false
  1602. });
  1603. }
  1604. }), { b: 2 })).b !== 1) return true;
  1605. // should work with symbols and should have deterministic property order (V8 bug)
  1606. var A = {};
  1607. var B = {};
  1608. // eslint-disable-next-line es/no-symbol -- safe
  1609. var symbol = Symbol('assign detection');
  1610. var alphabet = 'abcdefghijklmnopqrst';
  1611. A[symbol] = 7;
  1612. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1613. return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
  1614. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1615. var T = toObject(target);
  1616. var argumentsLength = arguments.length;
  1617. var index = 1;
  1618. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1619. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1620. while (argumentsLength > index) {
  1621. var S = IndexedObject(arguments[index++]);
  1622. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  1623. var length = keys.length;
  1624. var j = 0;
  1625. var key;
  1626. while (length > j) {
  1627. key = keys[j++];
  1628. if (!DESCRIPTORS || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
  1629. }
  1630. } return T;
  1631. } : $assign;
  1632. var $$1 = _export;
  1633. var assign = objectAssign;
  1634. // `Object.assign` method
  1635. // https://tc39.es/ecma262/#sec-object.assign
  1636. // eslint-disable-next-line es/no-object-assign -- required for testing
  1637. $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1638. assign: assign
  1639. });
  1640. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1641. var classof = classof$3;
  1642. // `Object.prototype.toString` method implementation
  1643. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1644. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1645. return '[object ' + classof(this) + ']';
  1646. };
  1647. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1648. var defineBuiltIn$1 = defineBuiltIn$3;
  1649. var toString$2 = objectToString;
  1650. // `Object.prototype.toString` method
  1651. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1652. if (!TO_STRING_TAG_SUPPORT) {
  1653. defineBuiltIn$1(Object.prototype, 'toString', toString$2, { unsafe: true });
  1654. }
  1655. // a string of all valid unicode whitespaces
  1656. var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1657. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1658. var uncurryThis$1 = functionUncurryThis;
  1659. var requireObjectCoercible = requireObjectCoercible$3;
  1660. var toString$1 = toString$4;
  1661. var whitespaces$1 = whitespaces$2;
  1662. var replace = uncurryThis$1(''.replace);
  1663. var ltrim = RegExp('^[' + whitespaces$1 + ']+');
  1664. var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
  1665. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1666. var createMethod = function (TYPE) {
  1667. return function ($this) {
  1668. var string = toString$1(requireObjectCoercible($this));
  1669. if (TYPE & 1) string = replace(string, ltrim, '');
  1670. if (TYPE & 2) string = replace(string, rtrim, '$1');
  1671. return string;
  1672. };
  1673. };
  1674. var stringTrim = {
  1675. // `String.prototype.{ trimLeft, trimStart }` methods
  1676. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1677. start: createMethod(1),
  1678. // `String.prototype.{ trimRight, trimEnd }` methods
  1679. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1680. end: createMethod(2),
  1681. // `String.prototype.trim` method
  1682. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1683. trim: createMethod(3)
  1684. };
  1685. var global$1 = global$b;
  1686. var fails$1 = fails$h;
  1687. var uncurryThis = functionUncurryThis;
  1688. var toString = toString$4;
  1689. var trim = stringTrim.trim;
  1690. var whitespaces = whitespaces$2;
  1691. var charAt = uncurryThis(''.charAt);
  1692. var $parseFloat$1 = global$1.parseFloat;
  1693. var Symbol$1 = global$1.Symbol;
  1694. var ITERATOR = Symbol$1 && Symbol$1.iterator;
  1695. var FORCED = 1 / $parseFloat$1(whitespaces + '-0') !== -Infinity
  1696. // MS Edge 18- broken with boxed symbols
  1697. || (ITERATOR && !fails$1(function () { $parseFloat$1(Object(ITERATOR)); }));
  1698. // `parseFloat` method
  1699. // https://tc39.es/ecma262/#sec-parsefloat-string
  1700. var numberParseFloat = FORCED ? function parseFloat(string) {
  1701. var trimmedString = trim(toString(string));
  1702. var result = $parseFloat$1(trimmedString);
  1703. return result === 0 && charAt(trimmedString, 0) === '-' ? -0 : result;
  1704. } : $parseFloat$1;
  1705. var $ = _export;
  1706. var $parseFloat = numberParseFloat;
  1707. // `parseFloat` method
  1708. // https://tc39.es/ecma262/#sec-parsefloat-string
  1709. $({ global: true, forced: parseFloat !== $parseFloat }, {
  1710. parseFloat: $parseFloat
  1711. });
  1712. var anObject$1 = anObject$6;
  1713. // `RegExp.prototype.flags` getter implementation
  1714. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1715. var regexpFlags = function () {
  1716. var that = anObject$1(this);
  1717. var result = '';
  1718. if (that.hasIndices) result += 'd';
  1719. if (that.global) result += 'g';
  1720. if (that.ignoreCase) result += 'i';
  1721. if (that.multiline) result += 'm';
  1722. if (that.dotAll) result += 's';
  1723. if (that.unicode) result += 'u';
  1724. if (that.unicodeSets) result += 'v';
  1725. if (that.sticky) result += 'y';
  1726. return result;
  1727. };
  1728. var call = functionCall;
  1729. var hasOwn = hasOwnProperty_1;
  1730. var isPrototypeOf = objectIsPrototypeOf;
  1731. var regExpFlags = regexpFlags;
  1732. var RegExpPrototype$1 = RegExp.prototype;
  1733. var regexpGetFlags = function (R) {
  1734. var flags = R.flags;
  1735. return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
  1736. ? call(regExpFlags, R) : flags;
  1737. };
  1738. var PROPER_FUNCTION_NAME = functionName.PROPER;
  1739. var defineBuiltIn = defineBuiltIn$3;
  1740. var anObject = anObject$6;
  1741. var $toString = toString$4;
  1742. var fails = fails$h;
  1743. var getRegExpFlags = regexpGetFlags;
  1744. var TO_STRING = 'toString';
  1745. var RegExpPrototype = RegExp.prototype;
  1746. var nativeToString = RegExpPrototype[TO_STRING];
  1747. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
  1748. // FF44- RegExp#toString has a wrong name
  1749. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
  1750. // `RegExp.prototype.toString` method
  1751. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  1752. if (NOT_GENERIC || INCORRECT_NAME) {
  1753. defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
  1754. var R = anObject(this);
  1755. var pattern = $toString(R.source);
  1756. var flags = $toString(getRegExpFlags(R));
  1757. return '/' + pattern + '/' + flags;
  1758. }, { unsafe: true });
  1759. }
  1760. /**
  1761. * @author Nadim Basalamah <dimbslmh@gmail.com>
  1762. * @version: v1.1.0
  1763. * @update: ErwannNevou <https://github.com/ErwannNevou>
  1764. */
  1765. var isSingleSort = false;
  1766. var Utils = $$a.fn.bootstrapTable.utils;
  1767. Object.assign($$a.fn.bootstrapTable.defaults.icons, {
  1768. plus: {
  1769. bootstrap3: 'glyphicon-plus',
  1770. bootstrap4: 'fa-plus',
  1771. bootstrap5: 'bi-plus',
  1772. semantic: 'fa-plus',
  1773. materialize: 'plus',
  1774. foundation: 'fa-plus',
  1775. bulma: 'fa-plus',
  1776. 'bootstrap-table': 'icon-plus'
  1777. }[$$a.fn.bootstrapTable.theme] || 'fa-clock',
  1778. minus: {
  1779. bootstrap3: 'glyphicon-minus',
  1780. bootstrap4: 'fa-minus',
  1781. bootstrap5: 'bi-dash',
  1782. semantic: 'fa-minus',
  1783. materialize: 'minus',
  1784. foundation: 'fa-minus',
  1785. bulma: 'fa-minus',
  1786. 'bootstrap-table': 'icon-minus'
  1787. }[$$a.fn.bootstrapTable.theme] || 'fa-clock',
  1788. sort: {
  1789. bootstrap3: 'glyphicon-sort',
  1790. bootstrap4: 'fa-sort',
  1791. bootstrap5: 'bi-arrow-down-up',
  1792. semantic: 'fa-sort',
  1793. materialize: 'sort',
  1794. foundation: 'fa-sort',
  1795. bulma: 'fa-sort',
  1796. 'bootstrap-table': 'icon-sort-amount-asc'
  1797. }[$$a.fn.bootstrapTable.theme] || 'fa-clock'
  1798. });
  1799. var theme = {
  1800. bootstrap3: {
  1801. html: {
  1802. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" id=\"%sLabel\">%s</h4>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\">\n <button id=\"add\" type=\"button\" class=\"btn btn-default\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-default\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1803. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  1804. multipleSortSelect: '<select class="%s %s form-control">'
  1805. }
  1806. },
  1807. bootstrap4: {
  1808. html: {
  1809. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\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\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1810. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  1811. multipleSortSelect: '<select class="%s %s form-control">'
  1812. }
  1813. },
  1814. bootstrap5: {
  1815. html: {
  1816. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"btn btn-secondary\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1817. multipleSortButton: '<button class="multi-sort %s" type="button" data-bs-toggle="modal" data-bs-target="#%s" title="%s">%s</button>',
  1818. multipleSortSelect: '<select class="%s %s form-control">'
  1819. }
  1820. },
  1821. semantic: {
  1822. html: {
  1823. multipleSortModal: "\n <div class=\"ui modal tiny\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <i class=\"close icon\"></i>\n <div class=\"header\" id=\"%sLabel\">\n %s\n </div>\n <div class=\"image content\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"ui button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"ui button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"actions\">\n <div class=\"ui button deny\">%s</div>\n <div class=\"ui button approve multi-sort-order-button\">%s</div>\n </div>\n </div>\n ",
  1824. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  1825. multipleSortSelect: '<select class="%s %s">'
  1826. }
  1827. },
  1828. materialize: {
  1829. html: {
  1830. multipleSortModal: "\n <div id=\"%s\" class=\"modal\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-content\" id=\"%sLabel\">\n <h4>%s</h4>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"pb-3\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn\">%s</a>\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn multi-sort-order-button\">%s</a>\n </div>\n </div>\n </div>\n ",
  1831. multipleSortButton: '<a class="multi-sort %s modal-trigger" href="#%s" type="button" data-toggle="modal" title="%s">%s</a>',
  1832. multipleSortSelect: '<select class="%s %s browser-default">'
  1833. }
  1834. },
  1835. foundation: {
  1836. html: {
  1837. multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
  1838. multipleSortButton: '<button class="multi-sort %s" data-open="%s" title="%s">%s</button>',
  1839. multipleSortSelect: '<select class="%s %s browser-default">'
  1840. }
  1841. },
  1842. bulma: {
  1843. html: {
  1844. multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"waves-effect waves-light button\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <button type=\"button\" class=\"waves-effect waves-light button\" data-close>%s</button>\n <button type=\"button\" class=\"waves-effect waves-light button multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n ",
  1845. multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
  1846. multipleSortSelect: '<select class="%s %s browser-default">'
  1847. }
  1848. },
  1849. 'bootstrap-table': {
  1850. html: {
  1851. multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <div id=\"toolbar\" class=\"padding-bottom-2\">\n <button id=\"add\" type=\"button\" class=\"btn\">%s %s</button>\n <button id=\"delete\" type=\"button\" class=\"btn\" disabled>%s %s</button>\n </div>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table id=\"multi-sort\" class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"mt-30\">\n <button type=\"button\" class=\"btn\" data-close>%s</button>\n <button type=\"button\" class=\"btn multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  1852. multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
  1853. multipleSortSelect: '<select class="%s %s browser-default">'
  1854. }
  1855. }
  1856. }[$$a.fn.bootstrapTable.theme];
  1857. var showSortModal = function showSortModal(that) {
  1858. var _selector = that.sortModalSelector;
  1859. var _id = "#".concat(_selector);
  1860. var o = that.options;
  1861. if (!$$a(_id).hasClass('modal')) {
  1862. var sModal = Utils.sprintf(theme.html.multipleSortModal, _selector, _selector, _selector, that.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.plus), that.options.formatAddLevel(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.minus), that.options.formatDeleteLevel(), that.options.formatColumn(), that.options.formatOrder(), that.options.formatCancel(), that.options.formatSort());
  1863. $$a('body').append($$a(sModal));
  1864. that.$sortModal = $$a(_id);
  1865. var $rows = that.$sortModal.find('tbody > tr');
  1866. that.$sortModal.off('click', '#add').on('click', '#add', function () {
  1867. var total = that.$sortModal.find('.multi-sort-name:first option').length;
  1868. var current = that.$sortModal.find('tbody tr').length;
  1869. if (current < total) {
  1870. current++;
  1871. that.addLevel();
  1872. that.setButtonStates();
  1873. }
  1874. });
  1875. that.$sortModal.off('click', '#delete').on('click', '#delete', function () {
  1876. var total = that.$sortModal.find('.multi-sort-name:first option').length;
  1877. var current = that.$sortModal.find('tbody tr').length;
  1878. if (current > 1 && current <= total) {
  1879. current--;
  1880. that.$sortModal.find('tbody tr:last').remove();
  1881. that.setButtonStates();
  1882. }
  1883. });
  1884. that.$sortModal.off('click', '.multi-sort-order-button').on('click', '.multi-sort-order-button', function () {
  1885. var $rows = that.$sortModal.find('tbody > tr');
  1886. var $alert = that.$sortModal.find('div.alert');
  1887. var fields = [];
  1888. var results = [];
  1889. var sortPriority = $$a.map($rows, function (row) {
  1890. var $row = $$a(row);
  1891. var name = $row.find('.multi-sort-name').val();
  1892. var order = $row.find('.multi-sort-order').val();
  1893. fields.push(name);
  1894. return {
  1895. sortName: name,
  1896. sortOrder: order
  1897. };
  1898. });
  1899. var sorted_fields = fields.sort();
  1900. for (var i = 0; i < fields.length - 1; i++) {
  1901. if (sorted_fields[i + 1] === sorted_fields[i]) {
  1902. results.push(sorted_fields[i]);
  1903. }
  1904. }
  1905. if (results.length > 0) {
  1906. if ($alert.length === 0) {
  1907. $alert = "<div class=\"alert alert-danger\" role=\"alert\"><strong>".concat(that.options.formatDuplicateAlertTitle(), "</strong> ").concat(that.options.formatDuplicateAlertDescription(), "</div>");
  1908. $$a($alert).insertBefore(that.$sortModal.find('.bars'));
  1909. }
  1910. } else {
  1911. if ($alert.length === 1) {
  1912. $$a($alert).remove();
  1913. }
  1914. if (['bootstrap3', 'bootstrap4', 'bootstrap5'].includes($$a.fn.bootstrapTable.theme)) {
  1915. that.$sortModal.modal('hide');
  1916. }
  1917. that.multiSort(sortPriority);
  1918. }
  1919. });
  1920. if (that.options.sortPriority === null || that.options.sortPriority.length === 0) {
  1921. if (that.options.sortName) {
  1922. that.options.sortPriority = [{
  1923. sortName: that.options.sortName,
  1924. sortOrder: that.options.sortOrder
  1925. }];
  1926. }
  1927. }
  1928. if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
  1929. if ($rows.length < that.options.sortPriority.length && _typeof(that.options.sortPriority) === 'object') {
  1930. for (var i = 0; i < that.options.sortPriority.length; i++) {
  1931. that.addLevel(i, that.options.sortPriority[i]);
  1932. }
  1933. }
  1934. } else {
  1935. that.addLevel(0);
  1936. }
  1937. that.setButtonStates();
  1938. }
  1939. };
  1940. $$a.fn.bootstrapTable.methods.push('multipleSort');
  1941. $$a.fn.bootstrapTable.methods.push('multiSort');
  1942. Object.assign($$a.fn.bootstrapTable.defaults, {
  1943. showMultiSort: false,
  1944. showMultiSortButton: true,
  1945. multiSortStrictSort: false,
  1946. sortPriority: null,
  1947. onMultipleSort: function onMultipleSort() {
  1948. return false;
  1949. }
  1950. });
  1951. Object.assign($$a.fn.bootstrapTable.events, {
  1952. 'multiple-sort.bs.table': 'onMultipleSort'
  1953. });
  1954. Object.assign($$a.fn.bootstrapTable.locales, {
  1955. formatMultipleSort: function formatMultipleSort() {
  1956. return 'Multiple Sort';
  1957. },
  1958. formatAddLevel: function formatAddLevel() {
  1959. return 'Add Level';
  1960. },
  1961. formatDeleteLevel: function formatDeleteLevel() {
  1962. return 'Delete Level';
  1963. },
  1964. formatColumn: function formatColumn() {
  1965. return 'Column';
  1966. },
  1967. formatOrder: function formatOrder() {
  1968. return 'Order';
  1969. },
  1970. formatSortBy: function formatSortBy() {
  1971. return 'Sort by';
  1972. },
  1973. formatThenBy: function formatThenBy() {
  1974. return 'Then by';
  1975. },
  1976. formatSort: function formatSort() {
  1977. return 'Sort';
  1978. },
  1979. formatCancel: function formatCancel() {
  1980. return 'Cancel';
  1981. },
  1982. formatDuplicateAlertTitle: function formatDuplicateAlertTitle() {
  1983. return 'Duplicate(s) detected!';
  1984. },
  1985. formatDuplicateAlertDescription: function formatDuplicateAlertDescription() {
  1986. return 'Please remove or change any duplicate column.';
  1987. },
  1988. formatSortOrders: function formatSortOrders() {
  1989. return {
  1990. asc: 'Ascending',
  1991. desc: 'Descending'
  1992. };
  1993. }
  1994. });
  1995. Object.assign($$a.fn.bootstrapTable.defaults, $$a.fn.bootstrapTable.locales);
  1996. var BootstrapTable = $$a.fn.bootstrapTable.Constructor;
  1997. var _initToolbar = BootstrapTable.prototype.initToolbar;
  1998. var _destroy = BootstrapTable.prototype.destroy;
  1999. BootstrapTable.prototype.initToolbar = function () {
  2000. var _this = this;
  2001. this.showToolbar = this.showToolbar || this.options.showMultiSort;
  2002. var that = this;
  2003. var sortModalSelector = "sortModal_".concat(this.$el.attr('id'));
  2004. var sortModalId = "#".concat(sortModalSelector);
  2005. var $multiSortBtn = this.$toolbar.find('div.multi-sort');
  2006. var o = this.options;
  2007. this.$sortModal = $$a(sortModalId);
  2008. this.sortModalSelector = sortModalSelector;
  2009. if (that.options.sortPriority !== null) {
  2010. that.onMultipleSort();
  2011. }
  2012. if (this.options.showMultiSort && this.options.showMultiSortButton) {
  2013. this.buttons = Object.assign(this.buttons, {
  2014. multipleSort: {
  2015. html: Utils.sprintf(theme.html.multipleSortButton, that.constants.buttonsClass, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.sort))
  2016. }
  2017. });
  2018. }
  2019. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2020. args[_key] = arguments[_key];
  2021. }
  2022. _initToolbar.apply(this, Array.prototype.slice.apply(args));
  2023. if (that.options.sidePagination === 'server' && !isSingleSort && that.options.sortPriority !== null) {
  2024. var t = that.options.queryParams;
  2025. that.options.queryParams = function (params) {
  2026. params.multiSort = that.options.sortPriority;
  2027. return t(params);
  2028. };
  2029. }
  2030. if (this.options.showMultiSort) {
  2031. if (!$multiSortBtn.length && this.options.showMultiSortButton) {
  2032. if ($$a.fn.bootstrapTable.theme === 'semantic') {
  2033. this.$toolbar.find('.multi-sort').on('click', function () {
  2034. $$a(sortModalId).modal('show');
  2035. });
  2036. } else if ($$a.fn.bootstrapTable.theme === 'materialize') {
  2037. this.$toolbar.find('.multi-sort').on('click', function () {
  2038. $$a(sortModalId).modal();
  2039. });
  2040. } else if ($$a.fn.bootstrapTable.theme === 'bootstrap-table') {
  2041. this.$toolbar.find('.multi-sort').on('click', function () {
  2042. $$a(sortModalId).addClass('show');
  2043. });
  2044. } else if ($$a.fn.bootstrapTable.theme === 'foundation') {
  2045. this.$toolbar.find('.multi-sort').on('click', function () {
  2046. if (!_this.foundationModal) {
  2047. // eslint-disable-next-line no-undef
  2048. _this.foundationModal = new Foundation.Reveal($$a(sortModalId));
  2049. }
  2050. _this.foundationModal.open();
  2051. });
  2052. } else if ($$a.fn.bootstrapTable.theme === 'bulma') {
  2053. this.$toolbar.find('.multi-sort').on('click', function () {
  2054. $$a('html').toggleClass('is-clipped');
  2055. $$a(sortModalId).toggleClass('is-active');
  2056. $$a('button[data-close]').one('click', function () {
  2057. $$a('html').toggleClass('is-clipped');
  2058. $$a(sortModalId).toggleClass('is-active');
  2059. });
  2060. });
  2061. }
  2062. showSortModal(that);
  2063. }
  2064. this.$el.on('sort.bs.table', function () {
  2065. isSingleSort = true;
  2066. });
  2067. this.$el.on('multiple-sort.bs.table', function () {
  2068. isSingleSort = false;
  2069. });
  2070. this.$el.on('load-success.bs.table', function () {
  2071. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
  2072. that.onMultipleSort();
  2073. }
  2074. });
  2075. this.$el.on('column-switch.bs.table', function (field, checked) {
  2076. if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
  2077. for (var i = 0; i < that.options.sortPriority.length; i++) {
  2078. if (that.options.sortPriority[i].sortName === checked) {
  2079. that.options.sortPriority.splice(i, 1);
  2080. }
  2081. }
  2082. that.assignSortableArrows();
  2083. }
  2084. that.$sortModal.remove();
  2085. showSortModal(that);
  2086. });
  2087. this.$el.on('reset-view.bs.table', function () {
  2088. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object') {
  2089. that.assignSortableArrows();
  2090. }
  2091. });
  2092. }
  2093. };
  2094. BootstrapTable.prototype.destroy = function () {
  2095. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2096. args[_key2] = arguments[_key2];
  2097. }
  2098. _destroy.apply(this, Array.prototype.slice.apply(args));
  2099. if (this.options.showMultiSort) {
  2100. this.enableCustomSort = false;
  2101. this.$sortModal.remove();
  2102. }
  2103. };
  2104. BootstrapTable.prototype.multipleSort = function () {
  2105. var that = this;
  2106. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
  2107. that.onMultipleSort();
  2108. }
  2109. };
  2110. BootstrapTable.prototype.onMultipleSort = function () {
  2111. var that = this;
  2112. var cmp = function cmp(x, y) {
  2113. return x > y ? 1 : x < y ? -1 : 0;
  2114. };
  2115. var arrayCmp = function arrayCmp(a, b) {
  2116. var arr1 = [];
  2117. var arr2 = [];
  2118. for (var i = 0; i < that.options.sortPriority.length; i++) {
  2119. var fieldName = that.options.sortPriority[i].sortName;
  2120. var fieldIndex = that.header.fields.indexOf(fieldName);
  2121. var sorterName = that.header.sorters[that.header.fields.indexOf(fieldName)];
  2122. if (that.header.sortNames[fieldIndex]) {
  2123. fieldName = that.header.sortNames[fieldIndex];
  2124. }
  2125. var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1;
  2126. var aa = Utils.getItemField(a, fieldName);
  2127. var bb = Utils.getItemField(b, fieldName);
  2128. var value1 = $$a.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb]);
  2129. var value2 = $$a.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa]);
  2130. if (value1 !== undefined && value2 !== undefined) {
  2131. arr1.push(order * value1);
  2132. arr2.push(order * value2);
  2133. continue;
  2134. }
  2135. if (aa === undefined || aa === null) aa = '';
  2136. if (bb === undefined || bb === null) bb = '';
  2137. if ($$a.isNumeric(aa) && $$a.isNumeric(bb)) {
  2138. aa = parseFloat(aa);
  2139. bb = parseFloat(bb);
  2140. } else {
  2141. aa = aa.toString();
  2142. bb = bb.toString();
  2143. if (that.options.multiSortStrictSort) {
  2144. aa = aa.toLowerCase();
  2145. bb = bb.toLowerCase();
  2146. }
  2147. }
  2148. arr1.push(order * cmp(aa, bb));
  2149. arr2.push(order * cmp(bb, aa));
  2150. }
  2151. return cmp(arr1, arr2);
  2152. };
  2153. this.enableCustomSort = true;
  2154. this.data.sort(function (a, b) {
  2155. return arrayCmp(a, b);
  2156. });
  2157. this.initBody();
  2158. this.assignSortableArrows();
  2159. this.trigger('multiple-sort');
  2160. };
  2161. BootstrapTable.prototype.addLevel = function (index, sortPriority) {
  2162. var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy();
  2163. this.$sortModal.find('tbody').append($$a('<tr>').append($$a('<td>').text(text)).append($$a('<td>').append($$a(Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-name')))).append($$a('<td>').append($$a(Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-order')))));
  2164. var $multiSortName = this.$sortModal.find('.multi-sort-name').last();
  2165. var $multiSortOrder = this.$sortModal.find('.multi-sort-order').last();
  2166. $$a.each(this.columns, function (i, column) {
  2167. if (column.sortable === false || column.visible === false) {
  2168. return true;
  2169. }
  2170. $multiSortName.append("<option value=\"".concat(column.field, "\">").concat(column.title, "</option>"));
  2171. });
  2172. $$a.each(this.options.formatSortOrders(), function (value, order) {
  2173. $multiSortOrder.append("<option value=\"".concat(value, "\">").concat(order, "</option>"));
  2174. });
  2175. if (sortPriority !== undefined) {
  2176. $multiSortName.find("option[value=\"".concat(sortPriority.sortName, "\"]")).attr('selected', true);
  2177. $multiSortOrder.find("option[value=\"".concat(sortPriority.sortOrder, "\"]")).attr('selected', true);
  2178. }
  2179. };
  2180. BootstrapTable.prototype.assignSortableArrows = function () {
  2181. var that = this;
  2182. var headers = that.$header.find('th');
  2183. for (var i = 0; i < headers.length; i++) {
  2184. for (var c = 0; c < that.options.sortPriority.length; c++) {
  2185. if ($$a(headers[i]).data('field') === that.options.sortPriority[c].sortName) {
  2186. $$a(headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder);
  2187. }
  2188. }
  2189. }
  2190. };
  2191. BootstrapTable.prototype.setButtonStates = function () {
  2192. var total = this.$sortModal.find('.multi-sort-name:first option').length;
  2193. var current = this.$sortModal.find('tbody tr').length;
  2194. if (current === total) {
  2195. this.$sortModal.find('#add').attr('disabled', 'disabled');
  2196. }
  2197. if (current > 1) {
  2198. this.$sortModal.find('#delete').removeAttr('disabled');
  2199. }
  2200. if (current < total) {
  2201. this.$sortModal.find('#add').removeAttr('disabled');
  2202. }
  2203. if (current === 1) {
  2204. this.$sortModal.find('#delete').attr('disabled', 'disabled');
  2205. }
  2206. };
  2207. BootstrapTable.prototype.multiSort = function (sortPriority) {
  2208. var _this2 = this;
  2209. this.options.sortPriority = sortPriority;
  2210. this.options.sortName = undefined;
  2211. if (this.options.sidePagination === 'server') {
  2212. var queryParams = this.options.queryParams;
  2213. this.options.queryParams = function (params) {
  2214. params.multiSort = _this2.options.sortPriority;
  2215. return $$a.fn.bootstrapTable.utils.calculateObjectValue(_this2.options, queryParams, [params]);
  2216. };
  2217. isSingleSort = false;
  2218. this.initServer(this.options.silentSort);
  2219. return;
  2220. }
  2221. this.onMultipleSort();
  2222. };
  2223. }));