bootstrap-table-fixed-columns.js 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($) { 'use strict';
  6. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  7. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  8. function _classCallCheck(instance, Constructor) {
  9. if (!(instance instanceof Constructor)) {
  10. throw new TypeError("Cannot call a class as a function");
  11. }
  12. }
  13. function _defineProperties(target, props) {
  14. for (var i = 0; i < props.length; i++) {
  15. var descriptor = props[i];
  16. descriptor.enumerable = descriptor.enumerable || false;
  17. descriptor.configurable = true;
  18. if ("value" in descriptor) descriptor.writable = true;
  19. Object.defineProperty(target, descriptor.key, descriptor);
  20. }
  21. }
  22. function _createClass(Constructor, protoProps, staticProps) {
  23. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  24. if (staticProps) _defineProperties(Constructor, staticProps);
  25. Object.defineProperty(Constructor, "prototype", {
  26. writable: false
  27. });
  28. return Constructor;
  29. }
  30. function _inherits(subClass, superClass) {
  31. if (typeof superClass !== "function" && superClass !== null) {
  32. throw new TypeError("Super expression must either be null or a function");
  33. }
  34. subClass.prototype = Object.create(superClass && superClass.prototype, {
  35. constructor: {
  36. value: subClass,
  37. writable: true,
  38. configurable: true
  39. }
  40. });
  41. Object.defineProperty(subClass, "prototype", {
  42. writable: false
  43. });
  44. if (superClass) _setPrototypeOf(subClass, superClass);
  45. }
  46. function _getPrototypeOf(o) {
  47. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  48. return o.__proto__ || Object.getPrototypeOf(o);
  49. };
  50. return _getPrototypeOf(o);
  51. }
  52. function _setPrototypeOf(o, p) {
  53. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  54. o.__proto__ = p;
  55. return o;
  56. };
  57. return _setPrototypeOf(o, p);
  58. }
  59. function _isNativeReflectConstruct() {
  60. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  61. if (Reflect.construct.sham) return false;
  62. if (typeof Proxy === "function") return true;
  63. try {
  64. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  65. return true;
  66. } catch (e) {
  67. return false;
  68. }
  69. }
  70. function _assertThisInitialized(self) {
  71. if (self === void 0) {
  72. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  73. }
  74. return self;
  75. }
  76. function _possibleConstructorReturn(self, call) {
  77. if (call && (typeof call === "object" || typeof call === "function")) {
  78. return call;
  79. } else if (call !== void 0) {
  80. throw new TypeError("Derived constructors may only return object or undefined");
  81. }
  82. return _assertThisInitialized(self);
  83. }
  84. function _createSuper(Derived) {
  85. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  86. return function _createSuperInternal() {
  87. var Super = _getPrototypeOf(Derived),
  88. result;
  89. if (hasNativeReflectConstruct) {
  90. var NewTarget = _getPrototypeOf(this).constructor;
  91. result = Reflect.construct(Super, arguments, NewTarget);
  92. } else {
  93. result = Super.apply(this, arguments);
  94. }
  95. return _possibleConstructorReturn(this, result);
  96. };
  97. }
  98. function _superPropBase(object, property) {
  99. while (!Object.prototype.hasOwnProperty.call(object, property)) {
  100. object = _getPrototypeOf(object);
  101. if (object === null) break;
  102. }
  103. return object;
  104. }
  105. function _get() {
  106. if (typeof Reflect !== "undefined" && Reflect.get) {
  107. _get = Reflect.get;
  108. } else {
  109. _get = function _get(target, property, receiver) {
  110. var base = _superPropBase(target, property);
  111. if (!base) return;
  112. var desc = Object.getOwnPropertyDescriptor(base, property);
  113. if (desc.get) {
  114. return desc.get.call(arguments.length < 3 ? target : receiver);
  115. }
  116. return desc.value;
  117. };
  118. }
  119. return _get.apply(this, arguments);
  120. }
  121. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  122. function createCommonjsModule(fn, module) {
  123. return module = { exports: {} }, fn(module, module.exports), module.exports;
  124. }
  125. var check = function (it) {
  126. return it && it.Math == Math && it;
  127. };
  128. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  129. var global_1 =
  130. // eslint-disable-next-line es/no-global-this -- safe
  131. check(typeof globalThis == 'object' && globalThis) ||
  132. check(typeof window == 'object' && window) ||
  133. // eslint-disable-next-line no-restricted-globals -- safe
  134. check(typeof self == 'object' && self) ||
  135. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  136. // eslint-disable-next-line no-new-func -- fallback
  137. (function () { return this; })() || Function('return this')();
  138. var fails = function (exec) {
  139. try {
  140. return !!exec();
  141. } catch (error) {
  142. return true;
  143. }
  144. };
  145. // Detect IE8's incomplete defineProperty implementation
  146. var descriptors = !fails(function () {
  147. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  148. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  149. });
  150. var functionBindNative = !fails(function () {
  151. var test = (function () { /* empty */ }).bind();
  152. // eslint-disable-next-line no-prototype-builtins -- safe
  153. return typeof test != 'function' || test.hasOwnProperty('prototype');
  154. });
  155. var call$1 = Function.prototype.call;
  156. var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
  157. return call$1.apply(call$1, arguments);
  158. };
  159. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  160. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  161. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  162. // Nashorn ~ JDK8 bug
  163. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  164. // `Object.prototype.propertyIsEnumerable` method implementation
  165. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  166. var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
  167. var descriptor = getOwnPropertyDescriptor$1(this, V);
  168. return !!descriptor && descriptor.enumerable;
  169. } : $propertyIsEnumerable;
  170. var objectPropertyIsEnumerable = {
  171. f: f$5
  172. };
  173. var createPropertyDescriptor = function (bitmap, value) {
  174. return {
  175. enumerable: !(bitmap & 1),
  176. configurable: !(bitmap & 2),
  177. writable: !(bitmap & 4),
  178. value: value
  179. };
  180. };
  181. var FunctionPrototype$1 = Function.prototype;
  182. var bind$1 = FunctionPrototype$1.bind;
  183. var call = FunctionPrototype$1.call;
  184. var uncurryThis = functionBindNative && bind$1.bind(call, call);
  185. var functionUncurryThis = functionBindNative ? function (fn) {
  186. return fn && uncurryThis(fn);
  187. } : function (fn) {
  188. return fn && function () {
  189. return call.apply(fn, arguments);
  190. };
  191. };
  192. var toString$1 = functionUncurryThis({}.toString);
  193. var stringSlice = functionUncurryThis(''.slice);
  194. var classofRaw = function (it) {
  195. return stringSlice(toString$1(it), 8, -1);
  196. };
  197. var Object$4 = global_1.Object;
  198. var split = functionUncurryThis(''.split);
  199. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  200. var indexedObject = fails(function () {
  201. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  202. // eslint-disable-next-line no-prototype-builtins -- safe
  203. return !Object$4('z').propertyIsEnumerable(0);
  204. }) ? function (it) {
  205. return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
  206. } : Object$4;
  207. var TypeError$8 = global_1.TypeError;
  208. // `RequireObjectCoercible` abstract operation
  209. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  210. var requireObjectCoercible = function (it) {
  211. if (it == undefined) throw TypeError$8("Can't call method on " + it);
  212. return it;
  213. };
  214. // toObject with fallback for non-array-like ES3 strings
  215. var toIndexedObject = function (it) {
  216. return indexedObject(requireObjectCoercible(it));
  217. };
  218. // `IsCallable` abstract operation
  219. // https://tc39.es/ecma262/#sec-iscallable
  220. var isCallable = function (argument) {
  221. return typeof argument == 'function';
  222. };
  223. var isObject = function (it) {
  224. return typeof it == 'object' ? it !== null : isCallable(it);
  225. };
  226. var aFunction = function (argument) {
  227. return isCallable(argument) ? argument : undefined;
  228. };
  229. var getBuiltIn = function (namespace, method) {
  230. return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
  231. };
  232. var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
  233. var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
  234. var process = global_1.process;
  235. var Deno = global_1.Deno;
  236. var versions = process && process.versions || Deno && Deno.version;
  237. var v8 = versions && versions.v8;
  238. var match, version;
  239. if (v8) {
  240. match = v8.split('.');
  241. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  242. // but their correct versions are not interesting for us
  243. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  244. }
  245. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  246. // so check `userAgent` even if `.v8` exists, but 0
  247. if (!version && engineUserAgent) {
  248. match = engineUserAgent.match(/Edge\/(\d+)/);
  249. if (!match || match[1] >= 74) {
  250. match = engineUserAgent.match(/Chrome\/(\d+)/);
  251. if (match) version = +match[1];
  252. }
  253. }
  254. var engineV8Version = version;
  255. /* eslint-disable es/no-symbol -- required for testing */
  256. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  257. var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
  258. var symbol = Symbol();
  259. // Chrome 38 Symbol has incorrect toString conversion
  260. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  261. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  262. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  263. !Symbol.sham && engineV8Version && engineV8Version < 41;
  264. });
  265. /* eslint-disable es/no-symbol -- required for testing */
  266. var useSymbolAsUid = nativeSymbol
  267. && !Symbol.sham
  268. && typeof Symbol.iterator == 'symbol';
  269. var Object$3 = global_1.Object;
  270. var isSymbol = useSymbolAsUid ? function (it) {
  271. return typeof it == 'symbol';
  272. } : function (it) {
  273. var $Symbol = getBuiltIn('Symbol');
  274. return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
  275. };
  276. var String$3 = global_1.String;
  277. var tryToString = function (argument) {
  278. try {
  279. return String$3(argument);
  280. } catch (error) {
  281. return 'Object';
  282. }
  283. };
  284. var TypeError$7 = global_1.TypeError;
  285. // `Assert: IsCallable(argument) is true`
  286. var aCallable = function (argument) {
  287. if (isCallable(argument)) return argument;
  288. throw TypeError$7(tryToString(argument) + ' is not a function');
  289. };
  290. // `GetMethod` abstract operation
  291. // https://tc39.es/ecma262/#sec-getmethod
  292. var getMethod = function (V, P) {
  293. var func = V[P];
  294. return func == null ? undefined : aCallable(func);
  295. };
  296. var TypeError$6 = global_1.TypeError;
  297. // `OrdinaryToPrimitive` abstract operation
  298. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  299. var ordinaryToPrimitive = function (input, pref) {
  300. var fn, val;
  301. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  302. if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
  303. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
  304. throw TypeError$6("Can't convert object to primitive value");
  305. };
  306. // eslint-disable-next-line es/no-object-defineproperty -- safe
  307. var defineProperty = Object.defineProperty;
  308. var setGlobal = function (key, value) {
  309. try {
  310. defineProperty(global_1, key, { value: value, configurable: true, writable: true });
  311. } catch (error) {
  312. global_1[key] = value;
  313. } return value;
  314. };
  315. var SHARED = '__core-js_shared__';
  316. var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
  317. var sharedStore = store$1;
  318. var shared = createCommonjsModule(function (module) {
  319. (module.exports = function (key, value) {
  320. return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
  321. })('versions', []).push({
  322. version: '3.21.1',
  323. mode: 'global',
  324. copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  325. license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
  326. source: 'https://github.com/zloirock/core-js'
  327. });
  328. });
  329. var Object$2 = global_1.Object;
  330. // `ToObject` abstract operation
  331. // https://tc39.es/ecma262/#sec-toobject
  332. var toObject = function (argument) {
  333. return Object$2(requireObjectCoercible(argument));
  334. };
  335. var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
  336. // `HasOwnProperty` abstract operation
  337. // https://tc39.es/ecma262/#sec-hasownproperty
  338. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  339. return hasOwnProperty(toObject(it), key);
  340. };
  341. var id = 0;
  342. var postfix = Math.random();
  343. var toString = functionUncurryThis(1.0.toString);
  344. var uid = function (key) {
  345. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  346. };
  347. var WellKnownSymbolsStore = shared('wks');
  348. var Symbol$2 = global_1.Symbol;
  349. var symbolFor = Symbol$2 && Symbol$2['for'];
  350. var createWellKnownSymbol = useSymbolAsUid ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid;
  351. var wellKnownSymbol = function (name) {
  352. if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
  353. var description = 'Symbol.' + name;
  354. if (nativeSymbol && hasOwnProperty_1(Symbol$2, name)) {
  355. WellKnownSymbolsStore[name] = Symbol$2[name];
  356. } else if (useSymbolAsUid && symbolFor) {
  357. WellKnownSymbolsStore[name] = symbolFor(description);
  358. } else {
  359. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  360. }
  361. } return WellKnownSymbolsStore[name];
  362. };
  363. var TypeError$5 = global_1.TypeError;
  364. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  365. // `ToPrimitive` abstract operation
  366. // https://tc39.es/ecma262/#sec-toprimitive
  367. var toPrimitive = function (input, pref) {
  368. if (!isObject(input) || isSymbol(input)) return input;
  369. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  370. var result;
  371. if (exoticToPrim) {
  372. if (pref === undefined) pref = 'default';
  373. result = functionCall(exoticToPrim, input, pref);
  374. if (!isObject(result) || isSymbol(result)) return result;
  375. throw TypeError$5("Can't convert object to primitive value");
  376. }
  377. if (pref === undefined) pref = 'number';
  378. return ordinaryToPrimitive(input, pref);
  379. };
  380. // `ToPropertyKey` abstract operation
  381. // https://tc39.es/ecma262/#sec-topropertykey
  382. var toPropertyKey = function (argument) {
  383. var key = toPrimitive(argument, 'string');
  384. return isSymbol(key) ? key : key + '';
  385. };
  386. var document$1 = global_1.document;
  387. // typeof document.createElement is 'object' in old IE
  388. var EXISTS$1 = isObject(document$1) && isObject(document$1.createElement);
  389. var documentCreateElement = function (it) {
  390. return EXISTS$1 ? document$1.createElement(it) : {};
  391. };
  392. // Thanks to IE8 for its funny defineProperty
  393. var ie8DomDefine = !descriptors && !fails(function () {
  394. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  395. return Object.defineProperty(documentCreateElement('div'), 'a', {
  396. get: function () { return 7; }
  397. }).a != 7;
  398. });
  399. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  400. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  401. // `Object.getOwnPropertyDescriptor` method
  402. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  403. var f$4 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  404. O = toIndexedObject(O);
  405. P = toPropertyKey(P);
  406. if (ie8DomDefine) try {
  407. return $getOwnPropertyDescriptor$1(O, P);
  408. } catch (error) { /* empty */ }
  409. if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
  410. };
  411. var objectGetOwnPropertyDescriptor = {
  412. f: f$4
  413. };
  414. // V8 ~ Chrome 36-
  415. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  416. var v8PrototypeDefineBug = descriptors && fails(function () {
  417. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  418. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  419. value: 42,
  420. writable: false
  421. }).prototype != 42;
  422. });
  423. var String$2 = global_1.String;
  424. var TypeError$4 = global_1.TypeError;
  425. // `Assert: Type(argument) is Object`
  426. var anObject = function (argument) {
  427. if (isObject(argument)) return argument;
  428. throw TypeError$4(String$2(argument) + ' is not an object');
  429. };
  430. var TypeError$3 = global_1.TypeError;
  431. // eslint-disable-next-line es/no-object-defineproperty -- safe
  432. var $defineProperty = Object.defineProperty;
  433. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  434. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  435. var ENUMERABLE = 'enumerable';
  436. var CONFIGURABLE$1 = 'configurable';
  437. var WRITABLE = 'writable';
  438. // `Object.defineProperty` method
  439. // https://tc39.es/ecma262/#sec-object.defineproperty
  440. var f$3 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
  441. anObject(O);
  442. P = toPropertyKey(P);
  443. anObject(Attributes);
  444. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  445. var current = $getOwnPropertyDescriptor(O, P);
  446. if (current && current[WRITABLE]) {
  447. O[P] = Attributes.value;
  448. Attributes = {
  449. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  450. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  451. writable: false
  452. };
  453. }
  454. } return $defineProperty(O, P, Attributes);
  455. } : $defineProperty : function defineProperty(O, P, Attributes) {
  456. anObject(O);
  457. P = toPropertyKey(P);
  458. anObject(Attributes);
  459. if (ie8DomDefine) try {
  460. return $defineProperty(O, P, Attributes);
  461. } catch (error) { /* empty */ }
  462. if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
  463. if ('value' in Attributes) O[P] = Attributes.value;
  464. return O;
  465. };
  466. var objectDefineProperty = {
  467. f: f$3
  468. };
  469. var createNonEnumerableProperty = descriptors ? function (object, key, value) {
  470. return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
  471. } : function (object, key, value) {
  472. object[key] = value;
  473. return object;
  474. };
  475. var functionToString = functionUncurryThis(Function.toString);
  476. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  477. if (!isCallable(sharedStore.inspectSource)) {
  478. sharedStore.inspectSource = function (it) {
  479. return functionToString(it);
  480. };
  481. }
  482. var inspectSource = sharedStore.inspectSource;
  483. var WeakMap$1 = global_1.WeakMap;
  484. var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
  485. var keys = shared('keys');
  486. var sharedKey = function (key) {
  487. return keys[key] || (keys[key] = uid(key));
  488. };
  489. var hiddenKeys$1 = {};
  490. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  491. var TypeError$2 = global_1.TypeError;
  492. var WeakMap = global_1.WeakMap;
  493. var set, get, has;
  494. var enforce = function (it) {
  495. return has(it) ? get(it) : set(it, {});
  496. };
  497. var getterFor = function (TYPE) {
  498. return function (it) {
  499. var state;
  500. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  501. throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
  502. } return state;
  503. };
  504. };
  505. if (nativeWeakMap || sharedStore.state) {
  506. var store = sharedStore.state || (sharedStore.state = new WeakMap());
  507. var wmget = functionUncurryThis(store.get);
  508. var wmhas = functionUncurryThis(store.has);
  509. var wmset = functionUncurryThis(store.set);
  510. set = function (it, metadata) {
  511. if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  512. metadata.facade = it;
  513. wmset(store, it, metadata);
  514. return metadata;
  515. };
  516. get = function (it) {
  517. return wmget(store, it) || {};
  518. };
  519. has = function (it) {
  520. return wmhas(store, it);
  521. };
  522. } else {
  523. var STATE = sharedKey('state');
  524. hiddenKeys$1[STATE] = true;
  525. set = function (it, metadata) {
  526. if (hasOwnProperty_1(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
  527. metadata.facade = it;
  528. createNonEnumerableProperty(it, STATE, metadata);
  529. return metadata;
  530. };
  531. get = function (it) {
  532. return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
  533. };
  534. has = function (it) {
  535. return hasOwnProperty_1(it, STATE);
  536. };
  537. }
  538. var internalState = {
  539. set: set,
  540. get: get,
  541. has: has,
  542. enforce: enforce,
  543. getterFor: getterFor
  544. };
  545. var FunctionPrototype = Function.prototype;
  546. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  547. var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
  548. var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name');
  549. // additional protection from minified / mangled / dropped function names
  550. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  551. var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable));
  552. var functionName = {
  553. EXISTS: EXISTS,
  554. PROPER: PROPER,
  555. CONFIGURABLE: CONFIGURABLE
  556. };
  557. var redefine = createCommonjsModule(function (module) {
  558. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  559. var getInternalState = internalState.get;
  560. var enforceInternalState = internalState.enforce;
  561. var TEMPLATE = String(String).split('String');
  562. (module.exports = function (O, key, value, options) {
  563. var unsafe = options ? !!options.unsafe : false;
  564. var simple = options ? !!options.enumerable : false;
  565. var noTargetGet = options ? !!options.noTargetGet : false;
  566. var name = options && options.name !== undefined ? options.name : key;
  567. var state;
  568. if (isCallable(value)) {
  569. if (String(name).slice(0, 7) === 'Symbol(') {
  570. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  571. }
  572. if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  573. createNonEnumerableProperty(value, 'name', name);
  574. }
  575. state = enforceInternalState(value);
  576. if (!state.source) {
  577. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  578. }
  579. }
  580. if (O === global_1) {
  581. if (simple) O[key] = value;
  582. else setGlobal(key, value);
  583. return;
  584. } else if (!unsafe) {
  585. delete O[key];
  586. } else if (!noTargetGet && O[key]) {
  587. simple = true;
  588. }
  589. if (simple) O[key] = value;
  590. else createNonEnumerableProperty(O, key, value);
  591. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  592. })(Function.prototype, 'toString', function toString() {
  593. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  594. });
  595. });
  596. var ceil = Math.ceil;
  597. var floor = Math.floor;
  598. // `ToIntegerOrInfinity` abstract operation
  599. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  600. var toIntegerOrInfinity = function (argument) {
  601. var number = +argument;
  602. // eslint-disable-next-line no-self-compare -- safe
  603. return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
  604. };
  605. var max = Math.max;
  606. var min$1 = Math.min;
  607. // Helper for a popular repeating case of the spec:
  608. // Let integer be ? ToInteger(index).
  609. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  610. var toAbsoluteIndex = function (index, length) {
  611. var integer = toIntegerOrInfinity(index);
  612. return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
  613. };
  614. var min = Math.min;
  615. // `ToLength` abstract operation
  616. // https://tc39.es/ecma262/#sec-tolength
  617. var toLength = function (argument) {
  618. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  619. };
  620. // `LengthOfArrayLike` abstract operation
  621. // https://tc39.es/ecma262/#sec-lengthofarraylike
  622. var lengthOfArrayLike = function (obj) {
  623. return toLength(obj.length);
  624. };
  625. // `Array.prototype.{ indexOf, includes }` methods implementation
  626. var createMethod$2 = function (IS_INCLUDES) {
  627. return function ($this, el, fromIndex) {
  628. var O = toIndexedObject($this);
  629. var length = lengthOfArrayLike(O);
  630. var index = toAbsoluteIndex(fromIndex, length);
  631. var value;
  632. // Array#includes uses SameValueZero equality algorithm
  633. // eslint-disable-next-line no-self-compare -- NaN check
  634. if (IS_INCLUDES && el != el) while (length > index) {
  635. value = O[index++];
  636. // eslint-disable-next-line no-self-compare -- NaN check
  637. if (value != value) return true;
  638. // Array#indexOf ignores holes, Array#includes - not
  639. } else for (;length > index; index++) {
  640. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  641. } return !IS_INCLUDES && -1;
  642. };
  643. };
  644. var arrayIncludes = {
  645. // `Array.prototype.includes` method
  646. // https://tc39.es/ecma262/#sec-array.prototype.includes
  647. includes: createMethod$2(true),
  648. // `Array.prototype.indexOf` method
  649. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  650. indexOf: createMethod$2(false)
  651. };
  652. var indexOf = arrayIncludes.indexOf;
  653. var push$1 = functionUncurryThis([].push);
  654. var objectKeysInternal = function (object, names) {
  655. var O = toIndexedObject(object);
  656. var i = 0;
  657. var result = [];
  658. var key;
  659. for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$1(result, key);
  660. // Don't enum bug & hidden keys
  661. while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
  662. ~indexOf(result, key) || push$1(result, key);
  663. }
  664. return result;
  665. };
  666. // IE8- don't enum bug keys
  667. var enumBugKeys = [
  668. 'constructor',
  669. 'hasOwnProperty',
  670. 'isPrototypeOf',
  671. 'propertyIsEnumerable',
  672. 'toLocaleString',
  673. 'toString',
  674. 'valueOf'
  675. ];
  676. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  677. // `Object.getOwnPropertyNames` method
  678. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  679. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  680. var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  681. return objectKeysInternal(O, hiddenKeys);
  682. };
  683. var objectGetOwnPropertyNames = {
  684. f: f$2
  685. };
  686. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  687. var f$1 = Object.getOwnPropertySymbols;
  688. var objectGetOwnPropertySymbols = {
  689. f: f$1
  690. };
  691. var concat = functionUncurryThis([].concat);
  692. // all object keys, includes non-enumerable and symbols
  693. var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  694. var keys = objectGetOwnPropertyNames.f(anObject(it));
  695. var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
  696. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  697. };
  698. var copyConstructorProperties = function (target, source, exceptions) {
  699. var keys = ownKeys(source);
  700. var defineProperty = objectDefineProperty.f;
  701. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  702. for (var i = 0; i < keys.length; i++) {
  703. var key = keys[i];
  704. if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
  705. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  706. }
  707. }
  708. };
  709. var replacement = /#|\.prototype\./;
  710. var isForced = function (feature, detection) {
  711. var value = data[normalize(feature)];
  712. return value == POLYFILL ? true
  713. : value == NATIVE ? false
  714. : isCallable(detection) ? fails(detection)
  715. : !!detection;
  716. };
  717. var normalize = isForced.normalize = function (string) {
  718. return String(string).replace(replacement, '.').toLowerCase();
  719. };
  720. var data = isForced.data = {};
  721. var NATIVE = isForced.NATIVE = 'N';
  722. var POLYFILL = isForced.POLYFILL = 'P';
  723. var isForced_1 = isForced;
  724. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  725. /*
  726. options.target - name of the target object
  727. options.global - target is the global object
  728. options.stat - export as static methods of target
  729. options.proto - export as prototype methods of target
  730. options.real - real prototype method for the `pure` version
  731. options.forced - export even if the native feature is available
  732. options.bind - bind methods to the target, required for the `pure` version
  733. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  734. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  735. options.sham - add a flag to not completely full polyfills
  736. options.enumerable - export as enumerable property
  737. options.noTargetGet - prevent calling a getter on target
  738. options.name - the .name of the function if it does not match the key
  739. */
  740. var _export = function (options, source) {
  741. var TARGET = options.target;
  742. var GLOBAL = options.global;
  743. var STATIC = options.stat;
  744. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  745. if (GLOBAL) {
  746. target = global_1;
  747. } else if (STATIC) {
  748. target = global_1[TARGET] || setGlobal(TARGET, {});
  749. } else {
  750. target = (global_1[TARGET] || {}).prototype;
  751. }
  752. if (target) for (key in source) {
  753. sourceProperty = source[key];
  754. if (options.noTargetGet) {
  755. descriptor = getOwnPropertyDescriptor(target, key);
  756. targetProperty = descriptor && descriptor.value;
  757. } else targetProperty = target[key];
  758. FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  759. // contained in target
  760. if (!FORCED && targetProperty !== undefined) {
  761. if (typeof sourceProperty == typeof targetProperty) continue;
  762. copyConstructorProperties(sourceProperty, targetProperty);
  763. }
  764. // add a flag to not completely full polyfills
  765. if (options.sham || (targetProperty && targetProperty.sham)) {
  766. createNonEnumerableProperty(sourceProperty, 'sham', true);
  767. }
  768. // extend global
  769. redefine(target, key, sourceProperty, options);
  770. }
  771. };
  772. var bind = functionUncurryThis(functionUncurryThis.bind);
  773. // optional / simple context binding
  774. var functionBindContext = function (fn, that) {
  775. aCallable(fn);
  776. return that === undefined ? fn : functionBindNative ? bind(fn, that) : function (/* ...args */) {
  777. return fn.apply(that, arguments);
  778. };
  779. };
  780. // `IsArray` abstract operation
  781. // https://tc39.es/ecma262/#sec-isarray
  782. // eslint-disable-next-line es/no-array-isarray -- safe
  783. var isArray = Array.isArray || function isArray(argument) {
  784. return classofRaw(argument) == 'Array';
  785. };
  786. var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
  787. var test$1 = {};
  788. test$1[TO_STRING_TAG$1] = 'z';
  789. var toStringTagSupport = String(test$1) === '[object z]';
  790. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  791. var Object$1 = global_1.Object;
  792. // ES3 wrong here
  793. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  794. // fallback for IE11 Script Access Denied error
  795. var tryGet = function (it, key) {
  796. try {
  797. return it[key];
  798. } catch (error) { /* empty */ }
  799. };
  800. // getting tag from ES6+ `Object.prototype.toString`
  801. var classof = toStringTagSupport ? classofRaw : function (it) {
  802. var O, tag, result;
  803. return it === undefined ? 'Undefined' : it === null ? 'Null'
  804. // @@toStringTag case
  805. : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  806. // builtinTag case
  807. : CORRECT_ARGUMENTS ? classofRaw(O)
  808. // ES3 arguments fallback
  809. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  810. };
  811. var noop = function () { /* empty */ };
  812. var empty = [];
  813. var construct = getBuiltIn('Reflect', 'construct');
  814. var constructorRegExp = /^\s*(?:class|function)\b/;
  815. var exec$1 = functionUncurryThis(constructorRegExp.exec);
  816. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  817. var isConstructorModern = function isConstructor(argument) {
  818. if (!isCallable(argument)) return false;
  819. try {
  820. construct(noop, empty, argument);
  821. return true;
  822. } catch (error) {
  823. return false;
  824. }
  825. };
  826. var isConstructorLegacy = function isConstructor(argument) {
  827. if (!isCallable(argument)) return false;
  828. switch (classof(argument)) {
  829. case 'AsyncFunction':
  830. case 'GeneratorFunction':
  831. case 'AsyncGeneratorFunction': return false;
  832. }
  833. try {
  834. // we can't check .prototype since constructors produced by .bind haven't it
  835. // `Function#toString` throws on some built-it function in some legacy engines
  836. // (for example, `DOMQuad` and similar in FF41-)
  837. return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
  838. } catch (error) {
  839. return true;
  840. }
  841. };
  842. isConstructorLegacy.sham = true;
  843. // `IsConstructor` abstract operation
  844. // https://tc39.es/ecma262/#sec-isconstructor
  845. var isConstructor = !construct || fails(function () {
  846. var called;
  847. return isConstructorModern(isConstructorModern.call)
  848. || !isConstructorModern(Object)
  849. || !isConstructorModern(function () { called = true; })
  850. || called;
  851. }) ? isConstructorLegacy : isConstructorModern;
  852. var SPECIES$1 = wellKnownSymbol('species');
  853. var Array$1 = global_1.Array;
  854. // a part of `ArraySpeciesCreate` abstract operation
  855. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  856. var arraySpeciesConstructor = function (originalArray) {
  857. var C;
  858. if (isArray(originalArray)) {
  859. C = originalArray.constructor;
  860. // cross-realm fallback
  861. if (isConstructor(C) && (C === Array$1 || isArray(C.prototype))) C = undefined;
  862. else if (isObject(C)) {
  863. C = C[SPECIES$1];
  864. if (C === null) C = undefined;
  865. }
  866. } return C === undefined ? Array$1 : C;
  867. };
  868. // `ArraySpeciesCreate` abstract operation
  869. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  870. var arraySpeciesCreate = function (originalArray, length) {
  871. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  872. };
  873. var push = functionUncurryThis([].push);
  874. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  875. var createMethod$1 = function (TYPE) {
  876. var IS_MAP = TYPE == 1;
  877. var IS_FILTER = TYPE == 2;
  878. var IS_SOME = TYPE == 3;
  879. var IS_EVERY = TYPE == 4;
  880. var IS_FIND_INDEX = TYPE == 6;
  881. var IS_FILTER_REJECT = TYPE == 7;
  882. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  883. return function ($this, callbackfn, that, specificCreate) {
  884. var O = toObject($this);
  885. var self = indexedObject(O);
  886. var boundFunction = functionBindContext(callbackfn, that);
  887. var length = lengthOfArrayLike(self);
  888. var index = 0;
  889. var create = specificCreate || arraySpeciesCreate;
  890. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  891. var value, result;
  892. for (;length > index; index++) if (NO_HOLES || index in self) {
  893. value = self[index];
  894. result = boundFunction(value, index, O);
  895. if (TYPE) {
  896. if (IS_MAP) target[index] = result; // map
  897. else if (result) switch (TYPE) {
  898. case 3: return true; // some
  899. case 5: return value; // find
  900. case 6: return index; // findIndex
  901. case 2: push(target, value); // filter
  902. } else switch (TYPE) {
  903. case 4: return false; // every
  904. case 7: push(target, value); // filterReject
  905. }
  906. }
  907. }
  908. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  909. };
  910. };
  911. var arrayIteration = {
  912. // `Array.prototype.forEach` method
  913. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  914. forEach: createMethod$1(0),
  915. // `Array.prototype.map` method
  916. // https://tc39.es/ecma262/#sec-array.prototype.map
  917. map: createMethod$1(1),
  918. // `Array.prototype.filter` method
  919. // https://tc39.es/ecma262/#sec-array.prototype.filter
  920. filter: createMethod$1(2),
  921. // `Array.prototype.some` method
  922. // https://tc39.es/ecma262/#sec-array.prototype.some
  923. some: createMethod$1(3),
  924. // `Array.prototype.every` method
  925. // https://tc39.es/ecma262/#sec-array.prototype.every
  926. every: createMethod$1(4),
  927. // `Array.prototype.find` method
  928. // https://tc39.es/ecma262/#sec-array.prototype.find
  929. find: createMethod$1(5),
  930. // `Array.prototype.findIndex` method
  931. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  932. findIndex: createMethod$1(6),
  933. // `Array.prototype.filterReject` method
  934. // https://github.com/tc39/proposal-array-filtering
  935. filterReject: createMethod$1(7)
  936. };
  937. // `Object.keys` method
  938. // https://tc39.es/ecma262/#sec-object.keys
  939. // eslint-disable-next-line es/no-object-keys -- safe
  940. var objectKeys = Object.keys || function keys(O) {
  941. return objectKeysInternal(O, enumBugKeys);
  942. };
  943. // `Object.defineProperties` method
  944. // https://tc39.es/ecma262/#sec-object.defineproperties
  945. // eslint-disable-next-line es/no-object-defineproperties -- safe
  946. var f = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
  947. anObject(O);
  948. var props = toIndexedObject(Properties);
  949. var keys = objectKeys(Properties);
  950. var length = keys.length;
  951. var index = 0;
  952. var key;
  953. while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
  954. return O;
  955. };
  956. var objectDefineProperties = {
  957. f: f
  958. };
  959. var html = getBuiltIn('document', 'documentElement');
  960. /* global ActiveXObject -- old IE, WSH */
  961. var GT = '>';
  962. var LT = '<';
  963. var PROTOTYPE = 'prototype';
  964. var SCRIPT = 'script';
  965. var IE_PROTO = sharedKey('IE_PROTO');
  966. var EmptyConstructor = function () { /* empty */ };
  967. var scriptTag = function (content) {
  968. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  969. };
  970. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  971. var NullProtoObjectViaActiveX = function (activeXDocument) {
  972. activeXDocument.write(scriptTag(''));
  973. activeXDocument.close();
  974. var temp = activeXDocument.parentWindow.Object;
  975. activeXDocument = null; // avoid memory leak
  976. return temp;
  977. };
  978. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  979. var NullProtoObjectViaIFrame = function () {
  980. // Thrash, waste and sodomy: IE GC bug
  981. var iframe = documentCreateElement('iframe');
  982. var JS = 'java' + SCRIPT + ':';
  983. var iframeDocument;
  984. iframe.style.display = 'none';
  985. html.appendChild(iframe);
  986. // https://github.com/zloirock/core-js/issues/475
  987. iframe.src = String(JS);
  988. iframeDocument = iframe.contentWindow.document;
  989. iframeDocument.open();
  990. iframeDocument.write(scriptTag('document.F=Object'));
  991. iframeDocument.close();
  992. return iframeDocument.F;
  993. };
  994. // Check for document.domain and active x support
  995. // No need to use active x approach when document.domain is not set
  996. // see https://github.com/es-shims/es5-shim/issues/150
  997. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  998. // avoid IE GC bug
  999. var activeXDocument;
  1000. var NullProtoObject = function () {
  1001. try {
  1002. activeXDocument = new ActiveXObject('htmlfile');
  1003. } catch (error) { /* ignore */ }
  1004. NullProtoObject = typeof document != 'undefined'
  1005. ? document.domain && activeXDocument
  1006. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1007. : NullProtoObjectViaIFrame()
  1008. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1009. var length = enumBugKeys.length;
  1010. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1011. return NullProtoObject();
  1012. };
  1013. hiddenKeys$1[IE_PROTO] = true;
  1014. // `Object.create` method
  1015. // https://tc39.es/ecma262/#sec-object.create
  1016. var objectCreate = Object.create || function create(O, Properties) {
  1017. var result;
  1018. if (O !== null) {
  1019. EmptyConstructor[PROTOTYPE] = anObject(O);
  1020. result = new EmptyConstructor();
  1021. EmptyConstructor[PROTOTYPE] = null;
  1022. // add "__proto__" for Object.getPrototypeOf polyfill
  1023. result[IE_PROTO] = O;
  1024. } else result = NullProtoObject();
  1025. return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
  1026. };
  1027. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1028. var ArrayPrototype = Array.prototype;
  1029. // Array.prototype[@@unscopables]
  1030. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1031. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  1032. objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
  1033. configurable: true,
  1034. value: objectCreate(null)
  1035. });
  1036. }
  1037. // add a key to Array.prototype[@@unscopables]
  1038. var addToUnscopables = function (key) {
  1039. ArrayPrototype[UNSCOPABLES][key] = true;
  1040. };
  1041. var $find = arrayIteration.find;
  1042. var FIND = 'find';
  1043. var SKIPS_HOLES = true;
  1044. // Shouldn't skip holes
  1045. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1046. // `Array.prototype.find` method
  1047. // https://tc39.es/ecma262/#sec-array.prototype.find
  1048. _export({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1049. find: function find(callbackfn /* , that = undefined */) {
  1050. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1051. }
  1052. });
  1053. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1054. addToUnscopables(FIND);
  1055. // `Object.prototype.toString` method implementation
  1056. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1057. var objectToString = toStringTagSupport ? {}.toString : function toString() {
  1058. return '[object ' + classof(this) + ']';
  1059. };
  1060. // `Object.prototype.toString` method
  1061. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1062. if (!toStringTagSupport) {
  1063. redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
  1064. }
  1065. var createProperty = function (object, key, value) {
  1066. var propertyKey = toPropertyKey(key);
  1067. if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
  1068. else object[propertyKey] = value;
  1069. };
  1070. var SPECIES = wellKnownSymbol('species');
  1071. var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1072. // We can't use this feature detection in V8 since it causes
  1073. // deoptimization and serious performance degradation
  1074. // https://github.com/zloirock/core-js/issues/677
  1075. return engineV8Version >= 51 || !fails(function () {
  1076. var array = [];
  1077. var constructor = array.constructor = {};
  1078. constructor[SPECIES] = function () {
  1079. return { foo: 1 };
  1080. };
  1081. return array[METHOD_NAME](Boolean).foo !== 1;
  1082. });
  1083. };
  1084. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1085. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  1086. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  1087. var TypeError$1 = global_1.TypeError;
  1088. // We can't use this feature detection in V8 since it causes
  1089. // deoptimization and serious performance degradation
  1090. // https://github.com/zloirock/core-js/issues/679
  1091. var IS_CONCAT_SPREADABLE_SUPPORT = engineV8Version >= 51 || !fails(function () {
  1092. var array = [];
  1093. array[IS_CONCAT_SPREADABLE] = false;
  1094. return array.concat()[0] !== array;
  1095. });
  1096. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  1097. var isConcatSpreadable = function (O) {
  1098. if (!isObject(O)) return false;
  1099. var spreadable = O[IS_CONCAT_SPREADABLE];
  1100. return spreadable !== undefined ? !!spreadable : isArray(O);
  1101. };
  1102. var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  1103. // `Array.prototype.concat` method
  1104. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1105. // with adding support of @@isConcatSpreadable and @@species
  1106. _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
  1107. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1108. concat: function concat(arg) {
  1109. var O = toObject(this);
  1110. var A = arraySpeciesCreate(O, 0);
  1111. var n = 0;
  1112. var i, k, length, len, E;
  1113. for (i = -1, length = arguments.length; i < length; i++) {
  1114. E = i === -1 ? O : arguments[i];
  1115. if (isConcatSpreadable(E)) {
  1116. len = lengthOfArrayLike(E);
  1117. if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1118. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1119. } else {
  1120. if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  1121. createProperty(A, n++, E);
  1122. }
  1123. }
  1124. A.length = n;
  1125. return A;
  1126. }
  1127. });
  1128. var un$Reverse = functionUncurryThis([].reverse);
  1129. var test = [1, 2];
  1130. // `Array.prototype.reverse` method
  1131. // https://tc39.es/ecma262/#sec-array.prototype.reverse
  1132. // fix for Safari 12.0 bug
  1133. // https://bugs.webkit.org/show_bug.cgi?id=188794
  1134. _export({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
  1135. reverse: function reverse() {
  1136. // eslint-disable-next-line no-self-assign -- dirty hack
  1137. if (isArray(this)) this.length = this.length;
  1138. return un$Reverse(this);
  1139. }
  1140. });
  1141. var String$1 = global_1.String;
  1142. var toString_1 = function (argument) {
  1143. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  1144. return String$1(argument);
  1145. };
  1146. // a string of all valid unicode whitespaces
  1147. var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  1148. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  1149. var replace = functionUncurryThis(''.replace);
  1150. var whitespace = '[' + whitespaces + ']';
  1151. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  1152. var rtrim = RegExp(whitespace + whitespace + '*$');
  1153. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  1154. var createMethod = function (TYPE) {
  1155. return function ($this) {
  1156. var string = toString_1(requireObjectCoercible($this));
  1157. if (TYPE & 1) string = replace(string, ltrim, '');
  1158. if (TYPE & 2) string = replace(string, rtrim, '');
  1159. return string;
  1160. };
  1161. };
  1162. var stringTrim = {
  1163. // `String.prototype.{ trimLeft, trimStart }` methods
  1164. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  1165. start: createMethod(1),
  1166. // `String.prototype.{ trimRight, trimEnd }` methods
  1167. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  1168. end: createMethod(2),
  1169. // `String.prototype.trim` method
  1170. // https://tc39.es/ecma262/#sec-string.prototype.trim
  1171. trim: createMethod(3)
  1172. };
  1173. var trim = stringTrim.trim;
  1174. var $parseInt = global_1.parseInt;
  1175. var Symbol$1 = global_1.Symbol;
  1176. var ITERATOR = Symbol$1 && Symbol$1.iterator;
  1177. var hex = /^[+-]?0x/i;
  1178. var exec = functionUncurryThis(hex.exec);
  1179. var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22
  1180. // MS Edge 18- broken with boxed symbols
  1181. || (ITERATOR && !fails(function () { $parseInt(Object(ITERATOR)); }));
  1182. // `parseInt` method
  1183. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1184. var numberParseInt = FORCED ? function parseInt(string, radix) {
  1185. var S = trim(toString_1(string));
  1186. return $parseInt(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
  1187. } : $parseInt;
  1188. // `parseInt` method
  1189. // https://tc39.es/ecma262/#sec-parseint-string-radix
  1190. _export({ global: true, forced: parseInt != numberParseInt }, {
  1191. parseInt: numberParseInt
  1192. });
  1193. var arrayMethodIsStrict = function (METHOD_NAME, argument) {
  1194. var method = [][METHOD_NAME];
  1195. return !!method && fails(function () {
  1196. // eslint-disable-next-line no-useless-call -- required for testing
  1197. method.call(null, argument || function () { return 1; }, 1);
  1198. });
  1199. };
  1200. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  1201. var $IndexOf = arrayIncludes.indexOf;
  1202. var un$IndexOf = functionUncurryThis([].indexOf);
  1203. var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
  1204. var STRICT_METHOD = arrayMethodIsStrict('indexOf');
  1205. // `Array.prototype.indexOf` method
  1206. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1207. _export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
  1208. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1209. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1210. return NEGATIVE_ZERO
  1211. // convert -0 to +0
  1212. ? un$IndexOf(this, searchElement, fromIndex) || 0
  1213. : $IndexOf(this, searchElement, fromIndex);
  1214. }
  1215. });
  1216. /**
  1217. * @author zhixin wen <wenzhixin2010@gmail.com>
  1218. */
  1219. var Utils = $__default["default"].fn.bootstrapTable.utils; // Reasonable defaults
  1220. var PIXEL_STEP = 10;
  1221. var LINE_HEIGHT = 40;
  1222. var PAGE_HEIGHT = 800;
  1223. function normalizeWheel(event) {
  1224. var sX = 0; // spinX
  1225. var sY = 0; // spinY
  1226. var pX = 0; // pixelX
  1227. var pY = 0; // pixelY
  1228. // Legacy
  1229. if ('detail' in event) {
  1230. sY = event.detail;
  1231. }
  1232. if ('wheelDelta' in event) {
  1233. sY = -event.wheelDelta / 120;
  1234. }
  1235. if ('wheelDeltaY' in event) {
  1236. sY = -event.wheelDeltaY / 120;
  1237. }
  1238. if ('wheelDeltaX' in event) {
  1239. sX = -event.wheelDeltaX / 120;
  1240. } // side scrolling on FF with DOMMouseScroll
  1241. if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {
  1242. sX = sY;
  1243. sY = 0;
  1244. }
  1245. pX = sX * PIXEL_STEP;
  1246. pY = sY * PIXEL_STEP;
  1247. if ('deltaY' in event) {
  1248. pY = event.deltaY;
  1249. }
  1250. if ('deltaX' in event) {
  1251. pX = event.deltaX;
  1252. }
  1253. if ((pX || pY) && event.deltaMode) {
  1254. if (event.deltaMode === 1) {
  1255. // delta in LINE units
  1256. pX *= LINE_HEIGHT;
  1257. pY *= LINE_HEIGHT;
  1258. } else {
  1259. // delta in PAGE units
  1260. pX *= PAGE_HEIGHT;
  1261. pY *= PAGE_HEIGHT;
  1262. }
  1263. } // Fall-back if spin cannot be determined
  1264. if (pX && !sX) {
  1265. sX = pX < 1 ? -1 : 1;
  1266. }
  1267. if (pY && !sY) {
  1268. sY = pY < 1 ? -1 : 1;
  1269. }
  1270. return {
  1271. spinX: sX,
  1272. spinY: sY,
  1273. pixelX: pX,
  1274. pixelY: pY
  1275. };
  1276. }
  1277. $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
  1278. fixedColumns: false,
  1279. fixedNumber: 0,
  1280. fixedRightNumber: 0
  1281. });
  1282. $__default["default"].BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  1283. _inherits(_class, _$$BootstrapTable);
  1284. var _super = _createSuper(_class);
  1285. function _class() {
  1286. _classCallCheck(this, _class);
  1287. return _super.apply(this, arguments);
  1288. }
  1289. _createClass(_class, [{
  1290. key: "fixedColumnsSupported",
  1291. value: function fixedColumnsSupported() {
  1292. return this.options.fixedColumns && !this.options.detailView && !this.options.cardView;
  1293. }
  1294. }, {
  1295. key: "initContainer",
  1296. value: function initContainer() {
  1297. _get(_getPrototypeOf(_class.prototype), "initContainer", this).call(this);
  1298. if (!this.fixedColumnsSupported()) {
  1299. return;
  1300. }
  1301. if (this.options.fixedNumber) {
  1302. this.$tableContainer.append('<div class="fixed-columns"></div>');
  1303. this.$fixedColumns = this.$tableContainer.find('.fixed-columns');
  1304. }
  1305. if (this.options.fixedRightNumber) {
  1306. this.$tableContainer.append('<div class="fixed-columns-right"></div>');
  1307. this.$fixedColumnsRight = this.$tableContainer.find('.fixed-columns-right');
  1308. }
  1309. }
  1310. }, {
  1311. key: "initBody",
  1312. value: function initBody() {
  1313. var _get2;
  1314. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1315. args[_key] = arguments[_key];
  1316. }
  1317. (_get2 = _get(_getPrototypeOf(_class.prototype), "initBody", this)).call.apply(_get2, [this].concat(args));
  1318. if (this.$fixedColumns && this.$fixedColumns.length) {
  1319. this.$fixedColumns.toggle(this.fixedColumnsSupported());
  1320. }
  1321. if (this.$fixedColumnsRight && this.$fixedColumnsRight.length) {
  1322. this.$fixedColumnsRight.toggle(this.fixedColumnsSupported());
  1323. }
  1324. if (!this.fixedColumnsSupported()) {
  1325. return;
  1326. }
  1327. if (this.options.showHeader && this.options.height) {
  1328. return;
  1329. }
  1330. this.initFixedColumnsBody();
  1331. this.initFixedColumnsEvents();
  1332. }
  1333. }, {
  1334. key: "trigger",
  1335. value: function trigger() {
  1336. var _get3;
  1337. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  1338. args[_key2] = arguments[_key2];
  1339. }
  1340. (_get3 = _get(_getPrototypeOf(_class.prototype), "trigger", this)).call.apply(_get3, [this].concat(args));
  1341. if (!this.fixedColumnsSupported()) {
  1342. return;
  1343. }
  1344. if (args[0] === 'post-header') {
  1345. this.initFixedColumnsHeader();
  1346. } else if (args[0] === 'scroll-body') {
  1347. if (this.needFixedColumns && this.options.fixedNumber) {
  1348. this.$fixedBody.scrollTop(this.$tableBody.scrollTop());
  1349. }
  1350. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1351. this.$fixedBodyRight.scrollTop(this.$tableBody.scrollTop());
  1352. }
  1353. }
  1354. }
  1355. }, {
  1356. key: "updateSelected",
  1357. value: function updateSelected() {
  1358. var _this = this;
  1359. _get(_getPrototypeOf(_class.prototype), "updateSelected", this).call(this);
  1360. if (!this.fixedColumnsSupported()) {
  1361. return;
  1362. }
  1363. this.$tableBody.find('tr').each(function (i, el) {
  1364. var $el = $__default["default"](el);
  1365. var index = $el.data('index');
  1366. var classes = $el.attr('class');
  1367. var inputSelector = "[name=\"".concat(_this.options.selectItemName, "\"]");
  1368. var $input = $el.find(inputSelector);
  1369. if (typeof index === 'undefined') {
  1370. return;
  1371. }
  1372. var updateFixedBody = function updateFixedBody($fixedHeader, $fixedBody) {
  1373. var $tr = $fixedBody.find("tr[data-index=\"".concat(index, "\"]"));
  1374. $tr.attr('class', classes);
  1375. if ($input.length) {
  1376. $tr.find(inputSelector).prop('checked', $input.prop('checked'));
  1377. }
  1378. if (_this.$selectAll.length) {
  1379. $fixedHeader.add($fixedBody).find('[name="btSelectAll"]').prop('checked', _this.$selectAll.prop('checked'));
  1380. }
  1381. };
  1382. if (_this.$fixedBody && _this.options.fixedNumber) {
  1383. updateFixedBody(_this.$fixedHeader, _this.$fixedBody);
  1384. }
  1385. if (_this.$fixedBodyRight && _this.options.fixedRightNumber) {
  1386. updateFixedBody(_this.$fixedHeaderRight, _this.$fixedBodyRight);
  1387. }
  1388. });
  1389. }
  1390. }, {
  1391. key: "hideLoading",
  1392. value: function hideLoading() {
  1393. _get(_getPrototypeOf(_class.prototype), "hideLoading", this).call(this);
  1394. if (this.needFixedColumns && this.options.fixedNumber) {
  1395. this.$fixedColumns.find('.fixed-table-loading').hide();
  1396. }
  1397. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1398. this.$fixedColumnsRight.find('.fixed-table-loading').hide();
  1399. }
  1400. }
  1401. }, {
  1402. key: "initFixedColumnsHeader",
  1403. value: function initFixedColumnsHeader() {
  1404. var _this2 = this;
  1405. if (this.options.height) {
  1406. this.needFixedColumns = this.$tableHeader.outerWidth(true) < this.$tableHeader.find('table').outerWidth(true);
  1407. } else {
  1408. this.needFixedColumns = this.$tableBody.outerWidth(true) < this.$tableBody.find('table').outerWidth(true);
  1409. }
  1410. var initFixedHeader = function initFixedHeader($fixedColumns, isRight) {
  1411. $fixedColumns.find('.fixed-table-header').remove();
  1412. $fixedColumns.append(_this2.$tableHeader.clone(true));
  1413. $fixedColumns.css({
  1414. width: _this2.getFixedColumnsWidth(isRight)
  1415. });
  1416. return $fixedColumns.find('.fixed-table-header');
  1417. };
  1418. if (this.needFixedColumns && this.options.fixedNumber) {
  1419. this.$fixedHeader = initFixedHeader(this.$fixedColumns);
  1420. this.$fixedHeader.css('margin-right', '');
  1421. } else if (this.$fixedColumns) {
  1422. this.$fixedColumns.html('').css('width', '');
  1423. }
  1424. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1425. this.$fixedHeaderRight = initFixedHeader(this.$fixedColumnsRight, true);
  1426. this.$fixedHeaderRight.scrollLeft(this.$fixedHeaderRight.find('table').width());
  1427. } else if (this.$fixedColumnsRight) {
  1428. this.$fixedColumnsRight.html('').css('width', '');
  1429. }
  1430. this.initFixedColumnsBody();
  1431. this.initFixedColumnsEvents();
  1432. }
  1433. }, {
  1434. key: "initFixedColumnsBody",
  1435. value: function initFixedColumnsBody() {
  1436. var _this3 = this;
  1437. var initFixedBody = function initFixedBody($fixedColumns, $fixedHeader) {
  1438. $fixedColumns.find('.fixed-table-body').remove();
  1439. $fixedColumns.append(_this3.$tableBody.clone(true));
  1440. $fixedColumns.find('.fixed-table-body table').removeAttr('id');
  1441. var $fixedBody = $fixedColumns.find('.fixed-table-body');
  1442. var tableBody = _this3.$tableBody.get(0);
  1443. var scrollHeight = tableBody.scrollWidth > tableBody.clientWidth ? Utils.getScrollBarWidth() : 0;
  1444. var height = _this3.$tableContainer.outerHeight(true) - scrollHeight - 1;
  1445. $fixedColumns.css({
  1446. height: height
  1447. });
  1448. $fixedBody.css({
  1449. height: height - $fixedHeader.height()
  1450. });
  1451. return $fixedBody;
  1452. };
  1453. if (this.needFixedColumns && this.options.fixedNumber) {
  1454. this.$fixedBody = initFixedBody(this.$fixedColumns, this.$fixedHeader);
  1455. }
  1456. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1457. this.$fixedBodyRight = initFixedBody(this.$fixedColumnsRight, this.$fixedHeaderRight);
  1458. this.$fixedBodyRight.scrollLeft(this.$fixedBodyRight.find('table').width());
  1459. this.$fixedBodyRight.css('overflow-y', this.options.height ? 'auto' : 'hidden');
  1460. }
  1461. }
  1462. }, {
  1463. key: "getFixedColumnsWidth",
  1464. value: function getFixedColumnsWidth(isRight) {
  1465. var visibleFields = this.getVisibleFields();
  1466. var width = 0;
  1467. var fixedNumber = this.options.fixedNumber;
  1468. var marginRight = 0;
  1469. if (isRight) {
  1470. visibleFields = visibleFields.reverse();
  1471. fixedNumber = this.options.fixedRightNumber;
  1472. marginRight = parseInt(this.$tableHeader.css('margin-right'), 10);
  1473. }
  1474. for (var i = 0; i < fixedNumber; i++) {
  1475. width += this.$header.find("th[data-field=\"".concat(visibleFields[i], "\"]")).outerWidth(true);
  1476. }
  1477. return width + marginRight + 1;
  1478. }
  1479. }, {
  1480. key: "initFixedColumnsEvents",
  1481. value: function initFixedColumnsEvents() {
  1482. var _this4 = this;
  1483. var toggleHover = function toggleHover(e, toggle) {
  1484. var tr = "tr[data-index=\"".concat($__default["default"](e.currentTarget).data('index'), "\"]");
  1485. var $trs = _this4.$tableBody.find(tr);
  1486. if (_this4.$fixedBody) {
  1487. $trs = $trs.add(_this4.$fixedBody.find(tr));
  1488. }
  1489. if (_this4.$fixedBodyRight) {
  1490. $trs = $trs.add(_this4.$fixedBodyRight.find(tr));
  1491. }
  1492. $trs.css('background-color', toggle ? $__default["default"](e.currentTarget).css('background-color') : '');
  1493. };
  1494. this.$tableBody.find('tr').hover(function (e) {
  1495. toggleHover(e, true);
  1496. }, function (e) {
  1497. toggleHover(e, false);
  1498. });
  1499. var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
  1500. var mousewheel = isFirefox ? 'DOMMouseScroll' : 'mousewheel';
  1501. var updateScroll = function updateScroll(e, fixedBody) {
  1502. var normalized = normalizeWheel(e);
  1503. var deltaY = Math.ceil(normalized.pixelY);
  1504. var top = _this4.$tableBody.scrollTop() + deltaY;
  1505. if (deltaY < 0 && top > 0 || deltaY > 0 && top < fixedBody.scrollHeight - fixedBody.clientHeight) {
  1506. e.preventDefault();
  1507. }
  1508. _this4.$tableBody.scrollTop(top);
  1509. if (_this4.$fixedBody) {
  1510. _this4.$fixedBody.scrollTop(top);
  1511. }
  1512. if (_this4.$fixedBodyRight) {
  1513. _this4.$fixedBodyRight.scrollTop(top);
  1514. }
  1515. };
  1516. if (this.needFixedColumns && this.options.fixedNumber) {
  1517. this.$fixedBody.find('tr').hover(function (e) {
  1518. toggleHover(e, true);
  1519. }, function (e) {
  1520. toggleHover(e, false);
  1521. });
  1522. this.$fixedBody[0].addEventListener(mousewheel, function (e) {
  1523. updateScroll(e, _this4.$fixedBody[0]);
  1524. });
  1525. }
  1526. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1527. this.$fixedBodyRight.find('tr').hover(function (e) {
  1528. toggleHover(e, true);
  1529. }, function (e) {
  1530. toggleHover(e, false);
  1531. });
  1532. this.$fixedBodyRight.off('scroll').on('scroll', function () {
  1533. var top = _this4.$fixedBodyRight.scrollTop();
  1534. _this4.$tableBody.scrollTop(top);
  1535. if (_this4.$fixedBody) {
  1536. _this4.$fixedBody.scrollTop(top);
  1537. }
  1538. });
  1539. }
  1540. if (this.options.filterControl) {
  1541. $__default["default"](this.$fixedColumns).off('keyup change').on('keyup change', function (e) {
  1542. var $target = $__default["default"](e.target);
  1543. var value = $target.val();
  1544. var field = $target.parents('th').data('field');
  1545. var $coreTh = _this4.$header.find("th[data-field=\"".concat(field, "\"]"));
  1546. if ($target.is('input')) {
  1547. $coreTh.find('input').val(value);
  1548. } else if ($target.is('select')) {
  1549. var $select = $coreTh.find('select');
  1550. $select.find('option[selected]').removeAttr('selected');
  1551. $select.find("option[value=\"".concat(value, "\"]")).attr('selected', true);
  1552. }
  1553. _this4.triggerSearch();
  1554. });
  1555. }
  1556. }
  1557. }, {
  1558. key: "renderStickyHeader",
  1559. value: function renderStickyHeader() {
  1560. if (!this.options.stickyHeader) {
  1561. return;
  1562. }
  1563. this.$stickyContainer = this.$container.find('.sticky-header-container');
  1564. _get(_getPrototypeOf(_class.prototype), "renderStickyHeader", this).call(this);
  1565. if (this.needFixedColumns && this.options.fixedNumber) {
  1566. this.$fixedColumns.css('z-index', 101).find('.sticky-header-container').css('right', '').width(this.$fixedColumns.outerWidth());
  1567. }
  1568. if (this.needFixedColumns && this.options.fixedRightNumber) {
  1569. var $stickyHeaderContainerRight = this.$fixedColumnsRight.find('.sticky-header-container');
  1570. this.$fixedColumnsRight.css('z-index', 101);
  1571. $stickyHeaderContainerRight.css('left', '').scrollLeft($stickyHeaderContainerRight.find('.table').outerWidth()).width(this.$fixedColumnsRight.outerWidth());
  1572. }
  1573. }
  1574. }, {
  1575. key: "matchPositionX",
  1576. value: function matchPositionX() {
  1577. if (!this.options.stickyHeader) {
  1578. return;
  1579. }
  1580. this.$stickyContainer.eq(0).scrollLeft(this.$tableBody.scrollLeft());
  1581. }
  1582. }]);
  1583. return _class;
  1584. }($__default["default"].BootstrapTable);
  1585. }));