bootstrap-table-reorder-rows.js 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636
  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 ($$3) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($$3);
  8. function _classCallCheck(instance, Constructor) {
  9. if (!(instance instanceof Constructor)) {
  10. throw new TypeError("Cannot call a class as a function");
  11. }
  12. }
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. Object.defineProperty(Constructor, "prototype", {
  26. writable: false
  27. });
  28. return Constructor;
  29. }
  30. function _inherits(subClass, superClass) {
  31. if (typeof superClass !== "function" && superClass !== null) {
  32. throw new TypeError("Super expression must either be null or a function");
  33. }
  34. subClass.prototype = Object.create(superClass && superClass.prototype, {
  35. constructor: {
  36. value: subClass,
  37. writable: true,
  38. configurable: true
  39. }
  40. });
  41. Object.defineProperty(subClass, "prototype", {
  42. writable: false
  43. });
  44. if (superClass) _setPrototypeOf(subClass, superClass);
  45. }
  46. function _getPrototypeOf(o) {
  47. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  48. return o.__proto__ || Object.getPrototypeOf(o);
  49. };
  50. return _getPrototypeOf(o);
  51. }
  52. function _setPrototypeOf(o, p) {
  53. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  54. o.__proto__ = p;
  55. return o;
  56. };
  57. return _setPrototypeOf(o, p);
  58. }
  59. function _isNativeReflectConstruct() {
  60. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  61. if (Reflect.construct.sham) return false;
  62. if (typeof Proxy === "function") return true;
  63. try {
  64. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  65. return true;
  66. } catch (e) {
  67. return false;
  68. }
  69. }
  70. function _assertThisInitialized(self) {
  71. if (self === void 0) {
  72. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  73. }
  74. return self;
  75. }
  76. function _possibleConstructorReturn(self, call) {
  77. if (call && (typeof call === "object" || typeof call === "function")) {
  78. return call;
  79. } else if (call !== void 0) {
  80. throw new TypeError("Derived constructors may only return object or undefined");
  81. }
  82. return _assertThisInitialized(self);
  83. }
  84. function _createSuper(Derived) {
  85. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  86. return function _createSuperInternal() {
  87. var Super = _getPrototypeOf(Derived),
  88. result;
  89. if (hasNativeReflectConstruct) {
  90. var NewTarget = _getPrototypeOf(this).constructor;
  91. result = Reflect.construct(Super, arguments, NewTarget);
  92. } else {
  93. result = Super.apply(this, arguments);
  94. }
  95. return _possibleConstructorReturn(this, result);
  96. };
  97. }
  98. function _superPropBase(object, property) {
  99. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  100. object = _getPrototypeOf(object);
  101. if (object === null) break;
  102. }
  103. return object;
  104. }
  105. function _get() {
  106. if (typeof Reflect !== "undefined" && Reflect.get) {
  107. _get = Reflect.get;
  108. } else {
  109. _get = function _get(target, property, receiver) {
  110. var base = _superPropBase(target, property);
  111. if (!base) return;
  112. var desc = Object.getOwnPropertyDescriptor(base, property);
  113. if (desc.get) {
  114. return desc.get.call(arguments.length < 3 ? target : receiver);
  115. }
  116. return desc.value;
  117. };
  118. }
  119. return _get.apply(this, arguments);
  120. }
  121. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  122. var check = function (it) {
  123. return it && it.Math == Math && it;
  124. };
  125. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  126. var global$p =
  127. // eslint-disable-next-line es-x/no-global-this -- safe
  128. check(typeof globalThis == 'object' && globalThis) ||
  129. check(typeof window == 'object' && window) ||
  130. // eslint-disable-next-line no-restricted-globals -- safe
  131. check(typeof self == 'object' && self) ||
  132. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  133. // eslint-disable-next-line no-new-func -- fallback
  134. (function () { return this; })() || Function('return this')();
  135. var objectGetOwnPropertyDescriptor = {};
  136. var fails$c = function (exec) {
  137. try {
  138. return !!exec();
  139. } catch (error) {
  140. return true;
  141. }
  142. };
  143. var fails$b = fails$c;
  144. // Detect IE8's incomplete defineProperty implementation
  145. var descriptors = !fails$b(function () {
  146. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  147. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  148. });
  149. var fails$a = fails$c;
  150. var functionBindNative = !fails$a(function () {
  151. // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  152. var test = (function () { /* empty */ }).bind();
  153. // eslint-disable-next-line no-prototype-builtins -- safe
  154. return typeof test != 'function' || test.hasOwnProperty('prototype');
  155. });
  156. var NATIVE_BIND$1 = functionBindNative;
  157. var call$4 = Function.prototype.call;
  158. var functionCall = NATIVE_BIND$1 ? call$4.bind(call$4) : function () {
  159. return call$4.apply(call$4, arguments);
  160. };
  161. var objectPropertyIsEnumerable = {};
  162. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  163. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  164. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  165. // Nashorn ~ JDK8 bug
  166. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  167. // `Object.prototype.propertyIsEnumerable` method implementation
  168. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  169. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  170. var descriptor = getOwnPropertyDescriptor$1(this, V);
  171. return !!descriptor && descriptor.enumerable;
  172. } : $propertyIsEnumerable;
  173. var createPropertyDescriptor$3 = function (bitmap, value) {
  174. return {
  175. enumerable: !(bitmap & 1),
  176. configurable: !(bitmap & 2),
  177. writable: !(bitmap & 4),
  178. value: value
  179. };
  180. };
  181. var NATIVE_BIND = functionBindNative;
  182. var FunctionPrototype$1 = Function.prototype;
  183. var bind = FunctionPrototype$1.bind;
  184. var call$3 = FunctionPrototype$1.call;
  185. var uncurryThis$b = NATIVE_BIND && bind.bind(call$3, call$3);
  186. var functionUncurryThis = NATIVE_BIND ? function (fn) {
  187. return fn && uncurryThis$b(fn);
  188. } : function (fn) {
  189. return fn && function () {
  190. return call$3.apply(fn, arguments);
  191. };
  192. };
  193. var uncurryThis$a = functionUncurryThis;
  194. var toString$1 = uncurryThis$a({}.toString);
  195. var stringSlice = uncurryThis$a(''.slice);
  196. var classofRaw$1 = function (it) {
  197. return stringSlice(toString$1(it), 8, -1);
  198. };
  199. var global$o = global$p;
  200. var uncurryThis$9 = functionUncurryThis;
  201. var fails$9 = fails$c;
  202. var classof$3 = classofRaw$1;
  203. var Object$4 = global$o.Object;
  204. var split = uncurryThis$9(''.split);
  205. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  206. var indexedObject = fails$9(function () {
  207. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  208. // eslint-disable-next-line no-prototype-builtins -- safe
  209. return !Object$4('z').propertyIsEnumerable(0);
  210. }) ? function (it) {
  211. return classof$3(it) == 'String' ? split(it, '') : Object$4(it);
  212. } : Object$4;
  213. var global$n = global$p;
  214. var TypeError$9 = global$n.TypeError;
  215. // `RequireObjectCoercible` abstract operation
  216. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  217. var requireObjectCoercible$2 = function (it) {
  218. if (it == undefined) throw TypeError$9("Can't call method on " + it);
  219. return it;
  220. };
  221. // toObject with fallback for non-array-like ES3 strings
  222. var IndexedObject = indexedObject;
  223. var requireObjectCoercible$1 = requireObjectCoercible$2;
  224. var toIndexedObject$3 = function (it) {
  225. return IndexedObject(requireObjectCoercible$1(it));
  226. };
  227. // `IsCallable` abstract operation
  228. // https://tc39.es/ecma262/#sec-iscallable
  229. var isCallable$c = function (argument) {
  230. return typeof argument == 'function';
  231. };
  232. var isCallable$b = isCallable$c;
  233. var isObject$7 = function (it) {
  234. return typeof it == 'object' ? it !== null : isCallable$b(it);
  235. };
  236. var global$m = global$p;
  237. var isCallable$a = isCallable$c;
  238. var aFunction = function (argument) {
  239. return isCallable$a(argument) ? argument : undefined;
  240. };
  241. var getBuiltIn$4 = function (namespace, method) {
  242. return arguments.length < 2 ? aFunction(global$m[namespace]) : global$m[namespace] && global$m[namespace][method];
  243. };
  244. var uncurryThis$8 = functionUncurryThis;
  245. var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
  246. var getBuiltIn$3 = getBuiltIn$4;
  247. var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
  248. var global$l = global$p;
  249. var userAgent = engineUserAgent;
  250. var process = global$l.process;
  251. var Deno = global$l.Deno;
  252. var versions = process && process.versions || Deno && Deno.version;
  253. var v8 = versions && versions.v8;
  254. var match, version;
  255. if (v8) {
  256. match = v8.split('.');
  257. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  258. // but their correct versions are not interesting for us
  259. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  260. }
  261. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  262. // so check `userAgent` even if `.v8` exists, but 0
  263. if (!version && userAgent) {
  264. match = userAgent.match(/Edge\/(\d+)/);
  265. if (!match || match[1] >= 74) {
  266. match = userAgent.match(/Chrome\/(\d+)/);
  267. if (match) version = +match[1];
  268. }
  269. }
  270. var engineV8Version = version;
  271. /* eslint-disable es-x/no-symbol -- required for testing */
  272. var V8_VERSION$2 = engineV8Version;
  273. var fails$8 = fails$c;
  274. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
  275. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$8(function () {
  276. var symbol = Symbol();
  277. // Chrome 38 Symbol has incorrect toString conversion
  278. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  279. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  280. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  281. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  282. });
  283. /* eslint-disable es-x/no-symbol -- required for testing */
  284. var NATIVE_SYMBOL$1 = nativeSymbol;
  285. var useSymbolAsUid = NATIVE_SYMBOL$1
  286. && !Symbol.sham
  287. && typeof Symbol.iterator == 'symbol';
  288. var global$k = global$p;
  289. var getBuiltIn$2 = getBuiltIn$4;
  290. var isCallable$9 = isCallable$c;
  291. var isPrototypeOf = objectIsPrototypeOf;
  292. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  293. var Object$3 = global$k.Object;
  294. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  295. return typeof it == 'symbol';
  296. } : function (it) {
  297. var $Symbol = getBuiltIn$2('Symbol');
  298. return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
  299. };
  300. var global$j = global$p;
  301. var String$2 = global$j.String;
  302. var tryToString$1 = function (argument) {
  303. try {
  304. return String$2(argument);
  305. } catch (error) {
  306. return 'Object';
  307. }
  308. };
  309. var global$i = global$p;
  310. var isCallable$8 = isCallable$c;
  311. var tryToString = tryToString$1;
  312. var TypeError$8 = global$i.TypeError;
  313. // `Assert: IsCallable(argument) is true`
  314. var aCallable$1 = function (argument) {
  315. if (isCallable$8(argument)) return argument;
  316. throw TypeError$8(tryToString(argument) + ' is not a function');
  317. };
  318. var aCallable = aCallable$1;
  319. // `GetMethod` abstract operation
  320. // https://tc39.es/ecma262/#sec-getmethod
  321. var getMethod$1 = function (V, P) {
  322. var func = V[P];
  323. return func == null ? undefined : aCallable(func);
  324. };
  325. var global$h = global$p;
  326. var call$2 = functionCall;
  327. var isCallable$7 = isCallable$c;
  328. var isObject$6 = isObject$7;
  329. var TypeError$7 = global$h.TypeError;
  330. // `OrdinaryToPrimitive` abstract operation
  331. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  332. var ordinaryToPrimitive$1 = function (input, pref) {
  333. var fn, val;
  334. if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$2(fn, input))) return val;
  335. if (isCallable$7(fn = input.valueOf) && !isObject$6(val = call$2(fn, input))) return val;
  336. if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$2(fn, input))) return val;
  337. throw TypeError$7("Can't convert object to primitive value");
  338. };
  339. var shared$3 = {exports: {}};
  340. var global$g = global$p;
  341. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  342. var defineProperty$1 = Object.defineProperty;
  343. var setGlobal$3 = function (key, value) {
  344. try {
  345. defineProperty$1(global$g, key, { value: value, configurable: true, writable: true });
  346. } catch (error) {
  347. global$g[key] = value;
  348. } return value;
  349. };
  350. var global$f = global$p;
  351. var setGlobal$2 = setGlobal$3;
  352. var SHARED = '__core-js_shared__';
  353. var store$3 = global$f[SHARED] || setGlobal$2(SHARED, {});
  354. var sharedStore = store$3;
  355. var store$2 = sharedStore;
  356. (shared$3.exports = function (key, value) {
  357. return store$2[key] || (store$2[key] = value !== undefined ? value : {});
  358. })('versions', []).push({
  359. version: '3.22.5',
  360. mode: 'global',
  361. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  362. license: 'https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE',
  363. source: 'https://github.com/zloirock/core-js'
  364. });
  365. var global$e = global$p;
  366. var requireObjectCoercible = requireObjectCoercible$2;
  367. var Object$2 = global$e.Object;
  368. // `ToObject` abstract operation
  369. // https://tc39.es/ecma262/#sec-toobject
  370. var toObject$3 = function (argument) {
  371. return Object$2(requireObjectCoercible(argument));
  372. };
  373. var uncurryThis$7 = functionUncurryThis;
  374. var toObject$2 = toObject$3;
  375. var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
  376. // `HasOwnProperty` abstract operation
  377. // https://tc39.es/ecma262/#sec-hasownproperty
  378. // eslint-disable-next-line es-x/no-object-hasown -- safe
  379. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  380. return hasOwnProperty(toObject$2(it), key);
  381. };
  382. var uncurryThis$6 = functionUncurryThis;
  383. var id = 0;
  384. var postfix = Math.random();
  385. var toString = uncurryThis$6(1.0.toString);
  386. var uid$2 = function (key) {
  387. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  388. };
  389. var global$d = global$p;
  390. var shared$2 = shared$3.exports;
  391. var hasOwn$6 = hasOwnProperty_1;
  392. var uid$1 = uid$2;
  393. var NATIVE_SYMBOL = nativeSymbol;
  394. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  395. var WellKnownSymbolsStore = shared$2('wks');
  396. var Symbol$1 = global$d.Symbol;
  397. var symbolFor = Symbol$1 && Symbol$1['for'];
  398. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
  399. var wellKnownSymbol$6 = function (name) {
  400. if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  401. var description = 'Symbol.' + name;
  402. if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
  403. WellKnownSymbolsStore[name] = Symbol$1[name];
  404. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  405. WellKnownSymbolsStore[name] = symbolFor(description);
  406. } else {
  407. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  408. }
  409. } return WellKnownSymbolsStore[name];
  410. };
  411. var global$c = global$p;
  412. var call$1 = functionCall;
  413. var isObject$5 = isObject$7;
  414. var isSymbol$1 = isSymbol$2;
  415. var getMethod = getMethod$1;
  416. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  417. var wellKnownSymbol$5 = wellKnownSymbol$6;
  418. var TypeError$6 = global$c.TypeError;
  419. var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
  420. // `ToPrimitive` abstract operation
  421. // https://tc39.es/ecma262/#sec-toprimitive
  422. var toPrimitive$1 = function (input, pref) {
  423. if (!isObject$5(input) || isSymbol$1(input)) return input;
  424. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  425. var result;
  426. if (exoticToPrim) {
  427. if (pref === undefined) pref = 'default';
  428. result = call$1(exoticToPrim, input, pref);
  429. if (!isObject$5(result) || isSymbol$1(result)) return result;
  430. throw TypeError$6("Can't convert object to primitive value");
  431. }
  432. if (pref === undefined) pref = 'number';
  433. return ordinaryToPrimitive(input, pref);
  434. };
  435. var toPrimitive = toPrimitive$1;
  436. var isSymbol = isSymbol$2;
  437. // `ToPropertyKey` abstract operation
  438. // https://tc39.es/ecma262/#sec-topropertykey
  439. var toPropertyKey$3 = function (argument) {
  440. var key = toPrimitive(argument, 'string');
  441. return isSymbol(key) ? key : key + '';
  442. };
  443. var global$b = global$p;
  444. var isObject$4 = isObject$7;
  445. var document = global$b.document;
  446. // typeof document.createElement is 'object' in old IE
  447. var EXISTS$1 = isObject$4(document) && isObject$4(document.createElement);
  448. var documentCreateElement = function (it) {
  449. return EXISTS$1 ? document.createElement(it) : {};
  450. };
  451. var DESCRIPTORS$6 = descriptors;
  452. var fails$7 = fails$c;
  453. var createElement = documentCreateElement;
  454. // Thanks to IE8 for its funny defineProperty
  455. var ie8DomDefine = !DESCRIPTORS$6 && !fails$7(function () {
  456. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  457. return Object.defineProperty(createElement('div'), 'a', {
  458. get: function () { return 7; }
  459. }).a != 7;
  460. });
  461. var DESCRIPTORS$5 = descriptors;
  462. var call = functionCall;
  463. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  464. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  465. var toIndexedObject$2 = toIndexedObject$3;
  466. var toPropertyKey$2 = toPropertyKey$3;
  467. var hasOwn$5 = hasOwnProperty_1;
  468. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  469. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  470. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  471. // `Object.getOwnPropertyDescriptor` method
  472. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  473. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  474. O = toIndexedObject$2(O);
  475. P = toPropertyKey$2(P);
  476. if (IE8_DOM_DEFINE$1) try {
  477. return $getOwnPropertyDescriptor$1(O, P);
  478. } catch (error) { /* empty */ }
  479. if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  480. };
  481. var objectDefineProperty = {};
  482. var DESCRIPTORS$4 = descriptors;
  483. var fails$6 = fails$c;
  484. // V8 ~ Chrome 36-
  485. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  486. var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$6(function () {
  487. // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  488. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  489. value: 42,
  490. writable: false
  491. }).prototype != 42;
  492. });
  493. var global$a = global$p;
  494. var isObject$3 = isObject$7;
  495. var String$1 = global$a.String;
  496. var TypeError$5 = global$a.TypeError;
  497. // `Assert: Type(argument) is Object`
  498. var anObject$2 = function (argument) {
  499. if (isObject$3(argument)) return argument;
  500. throw TypeError$5(String$1(argument) + ' is not an object');
  501. };
  502. var global$9 = global$p;
  503. var DESCRIPTORS$3 = descriptors;
  504. var IE8_DOM_DEFINE = ie8DomDefine;
  505. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  506. var anObject$1 = anObject$2;
  507. var toPropertyKey$1 = toPropertyKey$3;
  508. var TypeError$4 = global$9.TypeError;
  509. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  510. var $defineProperty = Object.defineProperty;
  511. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  512. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  513. var ENUMERABLE = 'enumerable';
  514. var CONFIGURABLE$1 = 'configurable';
  515. var WRITABLE = 'writable';
  516. // `Object.defineProperty` method
  517. // https://tc39.es/ecma262/#sec-object.defineproperty
  518. objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  519. anObject$1(O);
  520. P = toPropertyKey$1(P);
  521. anObject$1(Attributes);
  522. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  523. var current = $getOwnPropertyDescriptor(O, P);
  524. if (current && current[WRITABLE]) {
  525. O[P] = Attributes.value;
  526. Attributes = {
  527. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  528. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  529. writable: false
  530. };
  531. }
  532. } return $defineProperty(O, P, Attributes);
  533. } : $defineProperty : function defineProperty(O, P, Attributes) {
  534. anObject$1(O);
  535. P = toPropertyKey$1(P);
  536. anObject$1(Attributes);
  537. if (IE8_DOM_DEFINE) try {
  538. return $defineProperty(O, P, Attributes);
  539. } catch (error) { /* empty */ }
  540. if ('get' in Attributes || 'set' in Attributes) throw TypeError$4('Accessors not supported');
  541. if ('value' in Attributes) O[P] = Attributes.value;
  542. return O;
  543. };
  544. var DESCRIPTORS$2 = descriptors;
  545. var definePropertyModule$2 = objectDefineProperty;
  546. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  547. var createNonEnumerableProperty$3 = DESCRIPTORS$2 ? function (object, key, value) {
  548. return definePropertyModule$2.f(object, key, createPropertyDescriptor$1(1, value));
  549. } : function (object, key, value) {
  550. object[key] = value;
  551. return object;
  552. };
  553. var makeBuiltIn$2 = {exports: {}};
  554. var DESCRIPTORS$1 = descriptors;
  555. var hasOwn$4 = hasOwnProperty_1;
  556. var FunctionPrototype = Function.prototype;
  557. // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
  558. var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
  559. var EXISTS = hasOwn$4(FunctionPrototype, 'name');
  560. // additional protection from minified / mangled / dropped function names
  561. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  562. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype, 'name').configurable));
  563. var functionName = {
  564. EXISTS: EXISTS,
  565. PROPER: PROPER,
  566. CONFIGURABLE: CONFIGURABLE
  567. };
  568. var uncurryThis$5 = functionUncurryThis;
  569. var isCallable$6 = isCallable$c;
  570. var store$1 = sharedStore;
  571. var functionToString = uncurryThis$5(Function.toString);
  572. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  573. if (!isCallable$6(store$1.inspectSource)) {
  574. store$1.inspectSource = function (it) {
  575. return functionToString(it);
  576. };
  577. }
  578. var inspectSource$3 = store$1.inspectSource;
  579. var global$8 = global$p;
  580. var isCallable$5 = isCallable$c;
  581. var inspectSource$2 = inspectSource$3;
  582. var WeakMap$1 = global$8.WeakMap;
  583. var nativeWeakMap = isCallable$5(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
  584. var shared$1 = shared$3.exports;
  585. var uid = uid$2;
  586. var keys = shared$1('keys');
  587. var sharedKey$1 = function (key) {
  588. return keys[key] || (keys[key] = uid(key));
  589. };
  590. var hiddenKeys$3 = {};
  591. var NATIVE_WEAK_MAP = nativeWeakMap;
  592. var global$7 = global$p;
  593. var uncurryThis$4 = functionUncurryThis;
  594. var isObject$2 = isObject$7;
  595. var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
  596. var hasOwn$3 = hasOwnProperty_1;
  597. var shared = sharedStore;
  598. var sharedKey = sharedKey$1;
  599. var hiddenKeys$2 = hiddenKeys$3;
  600. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  601. var TypeError$3 = global$7.TypeError;
  602. var WeakMap = global$7.WeakMap;
  603. var set, get, has;
  604. var enforce = function (it) {
  605. return has(it) ? get(it) : set(it, {});
  606. };
  607. var getterFor = function (TYPE) {
  608. return function (it) {
  609. var state;
  610. if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
  611. throw TypeError$3('Incompatible receiver, ' + TYPE + ' required');
  612. } return state;
  613. };
  614. };
  615. if (NATIVE_WEAK_MAP || shared.state) {
  616. var store = shared.state || (shared.state = new WeakMap());
  617. var wmget = uncurryThis$4(store.get);
  618. var wmhas = uncurryThis$4(store.has);
  619. var wmset = uncurryThis$4(store.set);
  620. set = function (it, metadata) {
  621. if (wmhas(store, it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  622. metadata.facade = it;
  623. wmset(store, it, metadata);
  624. return metadata;
  625. };
  626. get = function (it) {
  627. return wmget(store, it) || {};
  628. };
  629. has = function (it) {
  630. return wmhas(store, it);
  631. };
  632. } else {
  633. var STATE = sharedKey('state');
  634. hiddenKeys$2[STATE] = true;
  635. set = function (it, metadata) {
  636. if (hasOwn$3(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
  637. metadata.facade = it;
  638. createNonEnumerableProperty$2(it, STATE, metadata);
  639. return metadata;
  640. };
  641. get = function (it) {
  642. return hasOwn$3(it, STATE) ? it[STATE] : {};
  643. };
  644. has = function (it) {
  645. return hasOwn$3(it, STATE);
  646. };
  647. }
  648. var internalState = {
  649. set: set,
  650. get: get,
  651. has: has,
  652. enforce: enforce,
  653. getterFor: getterFor
  654. };
  655. var fails$5 = fails$c;
  656. var isCallable$4 = isCallable$c;
  657. var hasOwn$2 = hasOwnProperty_1;
  658. var DESCRIPTORS = descriptors;
  659. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  660. var inspectSource$1 = inspectSource$3;
  661. var InternalStateModule = internalState;
  662. var enforceInternalState = InternalStateModule.enforce;
  663. var getInternalState = InternalStateModule.get;
  664. // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  665. var defineProperty = Object.defineProperty;
  666. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails$5(function () {
  667. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  668. });
  669. var TEMPLATE = String(String).split('String');
  670. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  671. if (String(name).slice(0, 7) === 'Symbol(') {
  672. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  673. }
  674. if (options && options.getter) name = 'get ' + name;
  675. if (options && options.setter) name = 'set ' + name;
  676. if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  677. defineProperty(value, 'name', { value: name, configurable: true });
  678. }
  679. if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
  680. defineProperty(value, 'length', { value: options.arity });
  681. }
  682. if (options && hasOwn$2(options, 'constructor') && options.constructor) {
  683. if (DESCRIPTORS) try {
  684. defineProperty(value, 'prototype', { writable: false });
  685. } catch (error) { /* empty */ }
  686. } else value.prototype = undefined;
  687. var state = enforceInternalState(value);
  688. if (!hasOwn$2(state, 'source')) {
  689. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  690. } return value;
  691. };
  692. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  693. // eslint-disable-next-line no-extend-native -- required
  694. Function.prototype.toString = makeBuiltIn$1(function toString() {
  695. return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
  696. }, 'toString');
  697. var global$6 = global$p;
  698. var isCallable$3 = isCallable$c;
  699. var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
  700. var makeBuiltIn = makeBuiltIn$2.exports;
  701. var setGlobal$1 = setGlobal$3;
  702. var defineBuiltIn$1 = function (O, key, value, options) {
  703. var unsafe = options ? !!options.unsafe : false;
  704. var simple = options ? !!options.enumerable : false;
  705. var noTargetGet = options ? !!options.noTargetGet : false;
  706. var name = options && options.name !== undefined ? options.name : key;
  707. if (isCallable$3(value)) makeBuiltIn(value, name, options);
  708. if (O === global$6) {
  709. if (simple) O[key] = value;
  710. else setGlobal$1(key, value);
  711. return O;
  712. } else if (!unsafe) {
  713. delete O[key];
  714. } else if (!noTargetGet && O[key]) {
  715. simple = true;
  716. }
  717. if (simple) O[key] = value;
  718. else createNonEnumerableProperty$1(O, key, value);
  719. return O;
  720. };
  721. var objectGetOwnPropertyNames = {};
  722. var ceil = Math.ceil;
  723. var floor = Math.floor;
  724. // `ToIntegerOrInfinity` abstract operation
  725. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  726. var toIntegerOrInfinity$3 = function (argument) {
  727. var number = +argument;
  728. // eslint-disable-next-line no-self-compare -- safe
  729. return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
  730. };
  731. var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
  732. var max$1 = Math.max;
  733. var min$2 = Math.min;
  734. // Helper for a popular repeating case of the spec:
  735. // Let integer be ? ToInteger(index).
  736. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  737. var toAbsoluteIndex$2 = function (index, length) {
  738. var integer = toIntegerOrInfinity$2(index);
  739. return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
  740. };
  741. var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
  742. var min$1 = Math.min;
  743. // `ToLength` abstract operation
  744. // https://tc39.es/ecma262/#sec-tolength
  745. var toLength$1 = function (argument) {
  746. return argument > 0 ? min$1(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  747. };
  748. var toLength = toLength$1;
  749. // `LengthOfArrayLike` abstract operation
  750. // https://tc39.es/ecma262/#sec-lengthofarraylike
  751. var lengthOfArrayLike$3 = function (obj) {
  752. return toLength(obj.length);
  753. };
  754. var toIndexedObject$1 = toIndexedObject$3;
  755. var toAbsoluteIndex$1 = toAbsoluteIndex$2;
  756. var lengthOfArrayLike$2 = lengthOfArrayLike$3;
  757. // `Array.prototype.{ indexOf, includes }` methods implementation
  758. var createMethod = function (IS_INCLUDES) {
  759. return function ($this, el, fromIndex) {
  760. var O = toIndexedObject$1($this);
  761. var length = lengthOfArrayLike$2(O);
  762. var index = toAbsoluteIndex$1(fromIndex, length);
  763. var value;
  764. // Array#includes uses SameValueZero equality algorithm
  765. // eslint-disable-next-line no-self-compare -- NaN check
  766. if (IS_INCLUDES && el != el) while (length > index) {
  767. value = O[index++];
  768. // eslint-disable-next-line no-self-compare -- NaN check
  769. if (value != value) return true;
  770. // Array#indexOf ignores holes, Array#includes - not
  771. } else for (;length > index; index++) {
  772. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  773. } return !IS_INCLUDES && -1;
  774. };
  775. };
  776. var arrayIncludes = {
  777. // `Array.prototype.includes` method
  778. // https://tc39.es/ecma262/#sec-array.prototype.includes
  779. includes: createMethod(true),
  780. // `Array.prototype.indexOf` method
  781. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  782. indexOf: createMethod(false)
  783. };
  784. var uncurryThis$3 = functionUncurryThis;
  785. var hasOwn$1 = hasOwnProperty_1;
  786. var toIndexedObject = toIndexedObject$3;
  787. var indexOf = arrayIncludes.indexOf;
  788. var hiddenKeys$1 = hiddenKeys$3;
  789. var push = uncurryThis$3([].push);
  790. var objectKeysInternal = function (object, names) {
  791. var O = toIndexedObject(object);
  792. var i = 0;
  793. var result = [];
  794. var key;
  795. for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
  796. // Don't enum bug & hidden keys
  797. while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
  798. ~indexOf(result, key) || push(result, key);
  799. }
  800. return result;
  801. };
  802. // IE8- don't enum bug keys
  803. var enumBugKeys$1 = [
  804. 'constructor',
  805. 'hasOwnProperty',
  806. 'isPrototypeOf',
  807. 'propertyIsEnumerable',
  808. 'toLocaleString',
  809. 'toString',
  810. 'valueOf'
  811. ];
  812. var internalObjectKeys = objectKeysInternal;
  813. var enumBugKeys = enumBugKeys$1;
  814. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  815. // `Object.getOwnPropertyNames` method
  816. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  817. // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
  818. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  819. return internalObjectKeys(O, hiddenKeys);
  820. };
  821. var objectGetOwnPropertySymbols = {};
  822. // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
  823. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  824. var getBuiltIn$1 = getBuiltIn$4;
  825. var uncurryThis$2 = functionUncurryThis;
  826. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  827. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  828. var anObject = anObject$2;
  829. var concat = uncurryThis$2([].concat);
  830. // all object keys, includes non-enumerable and symbols
  831. var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
  832. var keys = getOwnPropertyNamesModule.f(anObject(it));
  833. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  834. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  835. };
  836. var hasOwn = hasOwnProperty_1;
  837. var ownKeys = ownKeys$1;
  838. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  839. var definePropertyModule$1 = objectDefineProperty;
  840. var copyConstructorProperties$1 = function (target, source, exceptions) {
  841. var keys = ownKeys(source);
  842. var defineProperty = definePropertyModule$1.f;
  843. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  844. for (var i = 0; i < keys.length; i++) {
  845. var key = keys[i];
  846. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  847. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  848. }
  849. }
  850. };
  851. var fails$4 = fails$c;
  852. var isCallable$2 = isCallable$c;
  853. var replacement = /#|\.prototype\./;
  854. var isForced$1 = function (feature, detection) {
  855. var value = data[normalize(feature)];
  856. return value == POLYFILL ? true
  857. : value == NATIVE ? false
  858. : isCallable$2(detection) ? fails$4(detection)
  859. : !!detection;
  860. };
  861. var normalize = isForced$1.normalize = function (string) {
  862. return String(string).replace(replacement, '.').toLowerCase();
  863. };
  864. var data = isForced$1.data = {};
  865. var NATIVE = isForced$1.NATIVE = 'N';
  866. var POLYFILL = isForced$1.POLYFILL = 'P';
  867. var isForced_1 = isForced$1;
  868. var global$5 = global$p;
  869. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  870. var createNonEnumerableProperty = createNonEnumerableProperty$3;
  871. var defineBuiltIn = defineBuiltIn$1;
  872. var setGlobal = setGlobal$3;
  873. var copyConstructorProperties = copyConstructorProperties$1;
  874. var isForced = isForced_1;
  875. /*
  876. options.target - name of the target object
  877. options.global - target is the global object
  878. options.stat - export as static methods of target
  879. options.proto - export as prototype methods of target
  880. options.real - real prototype method for the `pure` version
  881. options.forced - export even if the native feature is available
  882. options.bind - bind methods to the target, required for the `pure` version
  883. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  884. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  885. options.sham - add a flag to not completely full polyfills
  886. options.enumerable - export as enumerable property
  887. options.noTargetGet - prevent calling a getter on target
  888. options.name - the .name of the function if it does not match the key
  889. */
  890. var _export = function (options, source) {
  891. var TARGET = options.target;
  892. var GLOBAL = options.global;
  893. var STATIC = options.stat;
  894. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  895. if (GLOBAL) {
  896. target = global$5;
  897. } else if (STATIC) {
  898. target = global$5[TARGET] || setGlobal(TARGET, {});
  899. } else {
  900. target = (global$5[TARGET] || {}).prototype;
  901. }
  902. if (target) for (key in source) {
  903. sourceProperty = source[key];
  904. if (options.noTargetGet) {
  905. descriptor = getOwnPropertyDescriptor(target, key);
  906. targetProperty = descriptor && descriptor.value;
  907. } else targetProperty = target[key];
  908. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  909. // contained in target
  910. if (!FORCED && targetProperty !== undefined) {
  911. if (typeof sourceProperty == typeof targetProperty) continue;
  912. copyConstructorProperties(sourceProperty, targetProperty);
  913. }
  914. // add a flag to not completely full polyfills
  915. if (options.sham || (targetProperty && targetProperty.sham)) {
  916. createNonEnumerableProperty(sourceProperty, 'sham', true);
  917. }
  918. defineBuiltIn(target, key, sourceProperty, options);
  919. }
  920. };
  921. var classof$2 = classofRaw$1;
  922. // `IsArray` abstract operation
  923. // https://tc39.es/ecma262/#sec-isarray
  924. // eslint-disable-next-line es-x/no-array-isarray -- safe
  925. var isArray$2 = Array.isArray || function isArray(argument) {
  926. return classof$2(argument) == 'Array';
  927. };
  928. var toPropertyKey = toPropertyKey$3;
  929. var definePropertyModule = objectDefineProperty;
  930. var createPropertyDescriptor = createPropertyDescriptor$3;
  931. var createProperty$2 = function (object, key, value) {
  932. var propertyKey = toPropertyKey(key);
  933. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  934. else object[propertyKey] = value;
  935. };
  936. var wellKnownSymbol$4 = wellKnownSymbol$6;
  937. var TO_STRING_TAG$1 = wellKnownSymbol$4('toStringTag');
  938. var test = {};
  939. test[TO_STRING_TAG$1] = 'z';
  940. var toStringTagSupport = String(test) === '[object z]';
  941. var global$4 = global$p;
  942. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  943. var isCallable$1 = isCallable$c;
  944. var classofRaw = classofRaw$1;
  945. var wellKnownSymbol$3 = wellKnownSymbol$6;
  946. var TO_STRING_TAG = wellKnownSymbol$3('toStringTag');
  947. var Object$1 = global$4.Object;
  948. // ES3 wrong here
  949. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  950. // fallback for IE11 Script Access Denied error
  951. var tryGet = function (it, key) {
  952. try {
  953. return it[key];
  954. } catch (error) { /* empty */ }
  955. };
  956. // getting tag from ES6+ `Object.prototype.toString`
  957. var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  958. var O, tag, result;
  959. return it === undefined ? 'Undefined' : it === null ? 'Null'
  960. // @@toStringTag case
  961. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  962. // builtinTag case
  963. : CORRECT_ARGUMENTS ? classofRaw(O)
  964. // ES3 arguments fallback
  965. : (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
  966. };
  967. var uncurryThis$1 = functionUncurryThis;
  968. var fails$3 = fails$c;
  969. var isCallable = isCallable$c;
  970. var classof = classof$1;
  971. var getBuiltIn = getBuiltIn$4;
  972. var inspectSource = inspectSource$3;
  973. var noop = function () { /* empty */ };
  974. var empty = [];
  975. var construct = getBuiltIn('Reflect', 'construct');
  976. var constructorRegExp = /^\s*(?:class|function)\b/;
  977. var exec = uncurryThis$1(constructorRegExp.exec);
  978. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  979. var isConstructorModern = function isConstructor(argument) {
  980. if (!isCallable(argument)) return false;
  981. try {
  982. construct(noop, empty, argument);
  983. return true;
  984. } catch (error) {
  985. return false;
  986. }
  987. };
  988. var isConstructorLegacy = function isConstructor(argument) {
  989. if (!isCallable(argument)) return false;
  990. switch (classof(argument)) {
  991. case 'AsyncFunction':
  992. case 'GeneratorFunction':
  993. case 'AsyncGeneratorFunction': return false;
  994. }
  995. try {
  996. // we can't check .prototype since constructors produced by .bind haven't it
  997. // `Function#toString` throws on some built-it function in some legacy engines
  998. // (for example, `DOMQuad` and similar in FF41-)
  999. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1000. } catch (error) {
  1001. return true;
  1002. }
  1003. };
  1004. isConstructorLegacy.sham = true;
  1005. // `IsConstructor` abstract operation
  1006. // https://tc39.es/ecma262/#sec-isconstructor
  1007. var isConstructor$1 = !construct || fails$3(function () {
  1008. var called;
  1009. return isConstructorModern(isConstructorModern.call)
  1010. || !isConstructorModern(Object)
  1011. || !isConstructorModern(function () { called = true; })
  1012. || called;
  1013. }) ? isConstructorLegacy : isConstructorModern;
  1014. var global$3 = global$p;
  1015. var isArray$1 = isArray$2;
  1016. var isConstructor = isConstructor$1;
  1017. var isObject$1 = isObject$7;
  1018. var wellKnownSymbol$2 = wellKnownSymbol$6;
  1019. var SPECIES$1 = wellKnownSymbol$2('species');
  1020. var Array$1 = global$3.Array;
  1021. // a part of `ArraySpeciesCreate` abstract operation
  1022. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1023. var arraySpeciesConstructor$1 = function (originalArray) {
  1024. var C;
  1025. if (isArray$1(originalArray)) {
  1026. C = originalArray.constructor;
  1027. // cross-realm fallback
  1028. if (isConstructor(C) && (C === Array$1 || isArray$1(C.prototype))) C = undefined;
  1029. else if (isObject$1(C)) {
  1030. C = C[SPECIES$1];
  1031. if (C === null) C = undefined;
  1032. }
  1033. } return C === undefined ? Array$1 : C;
  1034. };
  1035. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1036. // `ArraySpeciesCreate` abstract operation
  1037. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1038. var arraySpeciesCreate$2 = function (originalArray, length) {
  1039. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1040. };
  1041. var fails$2 = fails$c;
  1042. var wellKnownSymbol$1 = wellKnownSymbol$6;
  1043. var V8_VERSION$1 = engineV8Version;
  1044. var SPECIES = wellKnownSymbol$1('species');
  1045. var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
  1046. // We can't use this feature detection in V8 since it causes
  1047. // deoptimization and serious performance degradation
  1048. // https://github.com/zloirock/core-js/issues/677
  1049. return V8_VERSION$1 >= 51 || !fails$2(function () {
  1050. var array = [];
  1051. var constructor = array.constructor = {};
  1052. constructor[SPECIES] = function () {
  1053. return { foo: 1 };
  1054. };
  1055. return array[METHOD_NAME](Boolean).foo !== 1;
  1056. });
  1057. };
  1058. var $$2 = _export;
  1059. var global$2 = global$p;
  1060. var fails$1 = fails$c;
  1061. var isArray = isArray$2;
  1062. var isObject = isObject$7;
  1063. var toObject$1 = toObject$3;
  1064. var lengthOfArrayLike$1 = lengthOfArrayLike$3;
  1065. var createProperty$1 = createProperty$2;
  1066. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1067. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
  1068. var wellKnownSymbol = wellKnownSymbol$6;
  1069. var V8_VERSION = engineV8Version;
  1070. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1071. var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
  1072. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1073. var TypeError$2 = global$2.TypeError;
  1074. // We can't use this feature detection in V8 since it causes
  1075. // deoptimization and serious performance degradation
  1076. // https://github.com/zloirock/core-js/issues/679
  1077. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$1(function () {
  1078. var array = [];
  1079. array[IS_CONCAT_SPREADABLE] = false;
  1080. return array.concat()[0] !== array;
  1081. });
  1082. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport$1('concat');
  1083. var isConcatSpreadable = function (O) {
  1084. if (!isObject(O)) return false;
  1085. var spreadable = O[IS_CONCAT_SPREADABLE];
  1086. return spreadable !== undefined ? !!spreadable : isArray(O);
  1087. };
  1088. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1089. // `Array.prototype.concat` method
  1090. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1091. // with adding support of @@isConcatSpreadable and @@species
  1092. $$2({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  1093. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1094. concat: function concat(arg) {
  1095. var O = toObject$1(this);
  1096. var A = arraySpeciesCreate$1(O, 0);
  1097. var n = 0;
  1098. var i, k, length, len, E;
  1099. for (i = -1, length = arguments.length; i < length; i++) {
  1100. E = i === -1 ? O : arguments[i];
  1101. if (isConcatSpreadable(E)) {
  1102. len = lengthOfArrayLike$1(E);
  1103. if (n + len > MAX_SAFE_INTEGER$1) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1104. for (k = 0; k < len; k++, n++) if (k in E) createProperty$1(A, n, E[k]);
  1105. } else {
  1106. if (n >= MAX_SAFE_INTEGER$1) throw TypeError$2(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1107. createProperty$1(A, n++, E);
  1108. }
  1109. }
  1110. A.length = n;
  1111. return A;
  1112. }
  1113. });
  1114. var fails = fails$c;
  1115. var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
  1116. var method = [][METHOD_NAME];
  1117. return !!method && fails(function () {
  1118. // eslint-disable-next-line no-useless-call -- required for testing
  1119. method.call(null, argument || function () { return 1; }, 1);
  1120. });
  1121. };
  1122. /* eslint-disable es-x/no-array-prototype-indexof -- required for testing */
  1123. var $$1 = _export;
  1124. var uncurryThis = functionUncurryThis;
  1125. var $IndexOf = arrayIncludes.indexOf;
  1126. var arrayMethodIsStrict = arrayMethodIsStrict$1;
  1127. var un$IndexOf = uncurryThis([].indexOf);
  1128. var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
  1129. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  1130. // `Array.prototype.indexOf` method
  1131. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1132. $$1({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  1133. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1134. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1135. return NEGATIVE_ZERO
  1136. // convert -0 to +0
  1137. ? un$IndexOf(this, searchElement, fromIndex) || 0
  1138. : $IndexOf(this, searchElement, fromIndex);
  1139. }
  1140. });
  1141. var $ = _export;
  1142. var global$1 = global$p;
  1143. var toAbsoluteIndex = toAbsoluteIndex$2;
  1144. var toIntegerOrInfinity = toIntegerOrInfinity$3;
  1145. var lengthOfArrayLike = lengthOfArrayLike$3;
  1146. var toObject = toObject$3;
  1147. var arraySpeciesCreate = arraySpeciesCreate$2;
  1148. var createProperty = createProperty$2;
  1149. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
  1150. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  1151. var TypeError$1 = global$1.TypeError;
  1152. var max = Math.max;
  1153. var min = Math.min;
  1154. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1155. var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
  1156. // `Array.prototype.splice` method
  1157. // https://tc39.es/ecma262/#sec-array.prototype.splice
  1158. // with adding support of @@species
  1159. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1160. splice: function splice(start, deleteCount /* , ...items */) {
  1161. var O = toObject(this);
  1162. var len = lengthOfArrayLike(O);
  1163. var actualStart = toAbsoluteIndex(start, len);
  1164. var argumentsLength = arguments.length;
  1165. var insertCount, actualDeleteCount, A, k, from, to;
  1166. if (argumentsLength === 0) {
  1167. insertCount = actualDeleteCount = 0;
  1168. } else if (argumentsLength === 1) {
  1169. insertCount = 0;
  1170. actualDeleteCount = len - actualStart;
  1171. } else {
  1172. insertCount = argumentsLength - 2;
  1173. actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
  1174. }
  1175. if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
  1176. throw TypeError$1(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
  1177. }
  1178. A = arraySpeciesCreate(O, actualDeleteCount);
  1179. for (k = 0; k < actualDeleteCount; k++) {
  1180. from = actualStart + k;
  1181. if (from in O) createProperty(A, k, O[from]);
  1182. }
  1183. A.length = actualDeleteCount;
  1184. if (insertCount < actualDeleteCount) {
  1185. for (k = actualStart; k < len - actualDeleteCount; k++) {
  1186. from = k + actualDeleteCount;
  1187. to = k + insertCount;
  1188. if (from in O) O[to] = O[from];
  1189. else delete O[to];
  1190. }
  1191. for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
  1192. } else if (insertCount > actualDeleteCount) {
  1193. for (k = len - actualDeleteCount; k > actualStart; k--) {
  1194. from = k + actualDeleteCount - 1;
  1195. to = k + insertCount - 1;
  1196. if (from in O) O[to] = O[from];
  1197. else delete O[to];
  1198. }
  1199. }
  1200. for (k = 0; k < insertCount; k++) {
  1201. O[k + actualStart] = arguments[k + 2];
  1202. }
  1203. O.length = len - actualDeleteCount + insertCount;
  1204. return A;
  1205. }
  1206. });
  1207. /**
  1208. * @author: Dennis Hernández
  1209. * @webSite: http://djhvscf.github.io/Blog
  1210. * @update zhixin wen <wenzhixin2010@gmail.com>
  1211. */
  1212. var rowAttr = function rowAttr(row, index) {
  1213. return {
  1214. id: "customId_".concat(index)
  1215. };
  1216. };
  1217. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1218. reorderableRows: false,
  1219. onDragStyle: null,
  1220. onDropStyle: null,
  1221. onDragClass: 'reorder_rows_onDragClass',
  1222. dragHandle: '>tbody>tr>td:not(.bs-checkbox)',
  1223. useRowAttrFunc: false,
  1224. // eslint-disable-next-line no-unused-vars
  1225. onReorderRowsDrag: function onReorderRowsDrag(row) {
  1226. return false;
  1227. },
  1228. // eslint-disable-next-line no-unused-vars
  1229. onReorderRowsDrop: function onReorderRowsDrop(row) {
  1230. return false;
  1231. },
  1232. // eslint-disable-next-line no-unused-vars
  1233. onReorderRow: function onReorderRow(newData) {
  1234. return false;
  1235. },
  1236. onDragStop: function onDragStop() {},
  1237. onAllowDrop: function onAllowDrop() {
  1238. return true;
  1239. }
  1240. });
  1241. $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
  1242. 'reorder-row.bs.table': 'onReorderRow'
  1243. });
  1244. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1245. _inherits(_class, _$$BootstrapTable);
  1246. var _super = _createSuper(_class);
  1247. function _class() {
  1248. _classCallCheck(this, _class);
  1249. return _super.apply(this, arguments);
  1250. }
  1251. _createClass(_class, [{
  1252. key: "init",
  1253. value: function init() {
  1254. var _this = this,
  1255. _get3;
  1256. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1257. args[_key] = arguments[_key];
  1258. }
  1259. if (!this.options.reorderableRows) {
  1260. var _get2;
  1261. (_get2 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get2, [this].concat(args));
  1262. return;
  1263. }
  1264. if (this.options.useRowAttrFunc) {
  1265. this.options.rowAttributes = rowAttr;
  1266. }
  1267. var onPostBody = this.options.onPostBody;
  1268. this.options.onPostBody = function () {
  1269. setTimeout(function () {
  1270. _this.makeRowsReorderable();
  1271. onPostBody.call(_this.options, _this.options.data);
  1272. }, 1);
  1273. };
  1274. (_get3 = _get(_getPrototypeOf(_class.prototype), "init", this)).call.apply(_get3, [this].concat(args));
  1275. }
  1276. }, {
  1277. key: "makeRowsReorderable",
  1278. value: function makeRowsReorderable() {
  1279. var _this2 = this;
  1280. this.$el.tableDnD({
  1281. onDragStyle: this.options.onDragStyle,
  1282. onDropStyle: this.options.onDropStyle,
  1283. onDragClass: this.options.onDragClass,
  1284. onAllowDrop: function onAllowDrop(hoveredRow, draggedRow) {
  1285. return _this2.onAllowDrop(hoveredRow, draggedRow);
  1286. },
  1287. onDragStop: function onDragStop(table, draggedRow) {
  1288. return _this2.onDragStop(table, draggedRow);
  1289. },
  1290. onDragStart: function onDragStart(table, droppedRow) {
  1291. return _this2.onDropStart(table, droppedRow);
  1292. },
  1293. onDrop: function onDrop(table, droppedRow) {
  1294. return _this2.onDrop(table, droppedRow);
  1295. },
  1296. dragHandle: this.options.dragHandle
  1297. });
  1298. }
  1299. }, {
  1300. key: "onDropStart",
  1301. value: function onDropStart(table, draggingTd) {
  1302. this.$draggingTd = $__default["default"](draggingTd).css('cursor', 'move');
  1303. this.draggingIndex = $__default["default"](this.$draggingTd.parent()).data('index'); // Call the user defined function
  1304. this.options.onReorderRowsDrag(this.data[this.draggingIndex]);
  1305. }
  1306. }, {
  1307. key: "onDragStop",
  1308. value: function onDragStop(table, draggedRow) {
  1309. var rowIndexDraggedRow = $__default["default"](draggedRow).data('index');
  1310. var draggedRowItem = this.data[rowIndexDraggedRow];
  1311. this.options.onDragStop(table, draggedRowItem, draggedRow);
  1312. }
  1313. }, {
  1314. key: "onAllowDrop",
  1315. value: function onAllowDrop(hoveredRow, draggedRow) {
  1316. var rowIndexDraggedRow = $__default["default"](draggedRow).data('index');
  1317. var rowIndexHoveredRow = $__default["default"](hoveredRow).data('index');
  1318. var draggedRowItem = this.data[rowIndexDraggedRow];
  1319. var hoveredRowItem = this.data[rowIndexHoveredRow];
  1320. return this.options.onAllowDrop(hoveredRowItem, draggedRowItem, hoveredRow, draggedRow);
  1321. }
  1322. }, {
  1323. key: "onDrop",
  1324. value: function onDrop(table) {
  1325. this.$draggingTd.css('cursor', '');
  1326. var newData = [];
  1327. for (var i = 0; i < table.tBodies[0].rows.length; i++) {
  1328. var $tr = $__default["default"](table.tBodies[0].rows[i]);
  1329. newData.push(this.data[$tr.data('index')]);
  1330. $tr.data('index', i);
  1331. }
  1332. var draggingRow = this.data[this.draggingIndex];
  1333. var droppedIndex = newData.indexOf(this.data[this.draggingIndex]);
  1334. var droppedRow = this.data[droppedIndex];
  1335. var index = this.options.data.indexOf(this.data[droppedIndex]);
  1336. this.options.data.splice(this.options.data.indexOf(draggingRow), 1);
  1337. this.options.data.splice(index, 0, draggingRow);
  1338. this.initSearch(); // Call the user defined function
  1339. this.options.onReorderRowsDrop(droppedRow); // Call the event reorder-row
  1340. this.trigger('reorder-row', newData, draggingRow, droppedRow);
  1341. }
  1342. }, {
  1343. key: "initSearch",
  1344. value: function initSearch() {
  1345. this.ignoreInitSort = true;
  1346. _get(_getPrototypeOf(_class.prototype), "initSearch", this).call(this);
  1347. }
  1348. }, {
  1349. key: "initSort",
  1350. value: function initSort() {
  1351. if (this.ignoreInitSort) {
  1352. this.ignoreInitSort = false;
  1353. return;
  1354. }
  1355. _get(_getPrototypeOf(_class.prototype), "initSort", this).call(this);
  1356. }
  1357. }]);
  1358. return _class;
  1359. }($__default["default"].BootstrapTable);
  1360. }));