bootstrap-table-cookie.js 120 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346
  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 ($$c) { 'use strict';
  6. function _arrayLikeToArray(r, a) {
  7. (null == a || a > r.length) && (a = r.length);
  8. for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
  9. return n;
  10. }
  11. function _arrayWithHoles(r) {
  12. if (Array.isArray(r)) return r;
  13. }
  14. function _assertThisInitialized(e) {
  15. if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  16. return e;
  17. }
  18. function _callSuper(t, o, e) {
  19. return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
  20. }
  21. function _classCallCheck(a, n) {
  22. if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
  23. }
  24. function _defineProperties(e, r) {
  25. for (var t = 0; t < r.length; t++) {
  26. var o = r[t];
  27. o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
  28. }
  29. }
  30. function _createClass(e, r, t) {
  31. return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
  32. writable: !1
  33. }), e;
  34. }
  35. function _createForOfIteratorHelper(r, e) {
  36. var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  37. if (!t) {
  38. if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
  39. t && (r = t);
  40. var n = 0,
  41. F = function () {};
  42. return {
  43. s: F,
  44. n: function () {
  45. return n >= r.length ? {
  46. done: !0
  47. } : {
  48. done: !1,
  49. value: r[n++]
  50. };
  51. },
  52. e: function (r) {
  53. throw r;
  54. },
  55. f: F
  56. };
  57. }
  58. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  59. }
  60. var o,
  61. a = !0,
  62. u = !1;
  63. return {
  64. s: function () {
  65. t = t.call(r);
  66. },
  67. n: function () {
  68. var r = t.next();
  69. return a = r.done, r;
  70. },
  71. e: function (r) {
  72. u = !0, o = r;
  73. },
  74. f: function () {
  75. try {
  76. a || null == t.return || t.return();
  77. } finally {
  78. if (u) throw o;
  79. }
  80. }
  81. };
  82. }
  83. function _get() {
  84. return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {
  85. var p = _superPropBase(e, t);
  86. if (p) {
  87. var n = Object.getOwnPropertyDescriptor(p, t);
  88. return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;
  89. }
  90. }, _get.apply(null, arguments);
  91. }
  92. function _getPrototypeOf(t) {
  93. return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
  94. return t.__proto__ || Object.getPrototypeOf(t);
  95. }, _getPrototypeOf(t);
  96. }
  97. function _inherits(t, e) {
  98. if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
  99. t.prototype = Object.create(e && e.prototype, {
  100. constructor: {
  101. value: t,
  102. writable: !0,
  103. configurable: !0
  104. }
  105. }), Object.defineProperty(t, "prototype", {
  106. writable: !1
  107. }), e && _setPrototypeOf(t, e);
  108. }
  109. function _isNativeReflectConstruct() {
  110. try {
  111. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  112. } catch (t) {}
  113. return (_isNativeReflectConstruct = function () {
  114. return !!t;
  115. })();
  116. }
  117. function _iterableToArrayLimit(r, l) {
  118. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  119. if (null != t) {
  120. var e,
  121. n,
  122. i,
  123. u,
  124. a = [],
  125. f = !0,
  126. o = !1;
  127. try {
  128. if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
  129. } catch (r) {
  130. o = !0, n = r;
  131. } finally {
  132. try {
  133. if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
  134. } finally {
  135. if (o) throw n;
  136. }
  137. }
  138. return a;
  139. }
  140. }
  141. function _nonIterableRest() {
  142. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  143. }
  144. function _possibleConstructorReturn(t, e) {
  145. if (e && ("object" == typeof e || "function" == typeof e)) return e;
  146. if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
  147. return _assertThisInitialized(t);
  148. }
  149. function _setPrototypeOf(t, e) {
  150. return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
  151. return t.__proto__ = e, t;
  152. }, _setPrototypeOf(t, e);
  153. }
  154. function _slicedToArray(r, e) {
  155. return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
  156. }
  157. function _superPropBase(t, o) {
  158. for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
  159. return t;
  160. }
  161. function _toPrimitive(t, r) {
  162. if ("object" != typeof t || !t) return t;
  163. var e = t[Symbol.toPrimitive];
  164. if (void 0 !== e) {
  165. var i = e.call(t, r);
  166. if ("object" != typeof i) return i;
  167. throw new TypeError("@@toPrimitive must return a primitive value.");
  168. }
  169. return (String )(t);
  170. }
  171. function _toPropertyKey(t) {
  172. var i = _toPrimitive(t, "string");
  173. return "symbol" == typeof i ? i : i + "";
  174. }
  175. function _unsupportedIterableToArray(r, a) {
  176. if (r) {
  177. if ("string" == typeof r) return _arrayLikeToArray(r, a);
  178. var t = {}.toString.call(r).slice(8, -1);
  179. return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
  180. }
  181. }
  182. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  183. var check = function (it) {
  184. return it && it.Math === Math && it;
  185. };
  186. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  187. var global$e =
  188. // eslint-disable-next-line es/no-global-this -- safe
  189. check(typeof globalThis == 'object' && globalThis) ||
  190. check(typeof window == 'object' && window) ||
  191. // eslint-disable-next-line no-restricted-globals -- safe
  192. check(typeof self == 'object' && self) ||
  193. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  194. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  195. // eslint-disable-next-line no-new-func -- fallback
  196. (function () { return this; })() || Function('return this')();
  197. var objectGetOwnPropertyDescriptor = {};
  198. var fails$o = function (exec) {
  199. try {
  200. return !!exec();
  201. } catch (error) {
  202. return true;
  203. }
  204. };
  205. var fails$n = fails$o;
  206. // Detect IE8's incomplete defineProperty implementation
  207. var descriptors = !fails$n(function () {
  208. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  209. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  210. });
  211. var fails$m = fails$o;
  212. var functionBindNative = !fails$m(function () {
  213. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  214. var test = (function () { /* empty */ }).bind();
  215. // eslint-disable-next-line no-prototype-builtins -- safe
  216. return typeof test != 'function' || test.hasOwnProperty('prototype');
  217. });
  218. var NATIVE_BIND$3 = functionBindNative;
  219. var call$c = Function.prototype.call;
  220. var functionCall = NATIVE_BIND$3 ? call$c.bind(call$c) : function () {
  221. return call$c.apply(call$c, arguments);
  222. };
  223. var objectPropertyIsEnumerable = {};
  224. var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
  225. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  226. var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  227. // Nashorn ~ JDK8 bug
  228. var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable$1.call({ 1: 2 }, 1);
  229. // `Object.prototype.propertyIsEnumerable` method implementation
  230. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  231. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  232. var descriptor = getOwnPropertyDescriptor$1(this, V);
  233. return !!descriptor && descriptor.enumerable;
  234. } : $propertyIsEnumerable$1;
  235. var createPropertyDescriptor$3 = function (bitmap, value) {
  236. return {
  237. enumerable: !(bitmap & 1),
  238. configurable: !(bitmap & 2),
  239. writable: !(bitmap & 4),
  240. value: value
  241. };
  242. };
  243. var NATIVE_BIND$2 = functionBindNative;
  244. var FunctionPrototype$2 = Function.prototype;
  245. var call$b = FunctionPrototype$2.call;
  246. var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$b, call$b);
  247. var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
  248. return function () {
  249. return call$b.apply(fn, arguments);
  250. };
  251. };
  252. var uncurryThis$k = functionUncurryThis;
  253. var toString$8 = uncurryThis$k({}.toString);
  254. var stringSlice$5 = uncurryThis$k(''.slice);
  255. var classofRaw$2 = function (it) {
  256. return stringSlice$5(toString$8(it), 8, -1);
  257. };
  258. var uncurryThis$j = functionUncurryThis;
  259. var fails$l = fails$o;
  260. var classof$7 = classofRaw$2;
  261. var $Object$4 = Object;
  262. var split = uncurryThis$j(''.split);
  263. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  264. var indexedObject = fails$l(function () {
  265. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  266. // eslint-disable-next-line no-prototype-builtins -- safe
  267. return !$Object$4('z').propertyIsEnumerable(0);
  268. }) ? function (it) {
  269. return classof$7(it) === 'String' ? split(it, '') : $Object$4(it);
  270. } : $Object$4;
  271. // we can't use just `it == null` since of `document.all` special case
  272. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  273. var isNullOrUndefined$4 = function (it) {
  274. return it === null || it === undefined;
  275. };
  276. var isNullOrUndefined$3 = isNullOrUndefined$4;
  277. var $TypeError$8 = TypeError;
  278. // `RequireObjectCoercible` abstract operation
  279. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  280. var requireObjectCoercible$6 = function (it) {
  281. if (isNullOrUndefined$3(it)) throw new $TypeError$8("Can't call method on " + it);
  282. return it;
  283. };
  284. // toObject with fallback for non-array-like ES3 strings
  285. var IndexedObject$3 = indexedObject;
  286. var requireObjectCoercible$5 = requireObjectCoercible$6;
  287. var toIndexedObject$6 = function (it) {
  288. return IndexedObject$3(requireObjectCoercible$5(it));
  289. };
  290. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  291. var documentAll = typeof document == 'object' && document.all;
  292. // `IsCallable` abstract operation
  293. // https://tc39.es/ecma262/#sec-iscallable
  294. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  295. var isCallable$f = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  296. return typeof argument == 'function' || argument === documentAll;
  297. } : function (argument) {
  298. return typeof argument == 'function';
  299. };
  300. var isCallable$e = isCallable$f;
  301. var isObject$8 = function (it) {
  302. return typeof it == 'object' ? it !== null : isCallable$e(it);
  303. };
  304. var global$d = global$e;
  305. var isCallable$d = isCallable$f;
  306. var aFunction = function (argument) {
  307. return isCallable$d(argument) ? argument : undefined;
  308. };
  309. var getBuiltIn$4 = function (namespace, method) {
  310. return arguments.length < 2 ? aFunction(global$d[namespace]) : global$d[namespace] && global$d[namespace][method];
  311. };
  312. var uncurryThis$i = functionUncurryThis;
  313. var objectIsPrototypeOf = uncurryThis$i({}.isPrototypeOf);
  314. var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
  315. var global$c = global$e;
  316. var userAgent = engineUserAgent;
  317. var process = global$c.process;
  318. var Deno = global$c.Deno;
  319. var versions = process && process.versions || Deno && Deno.version;
  320. var v8 = versions && versions.v8;
  321. var match, version;
  322. if (v8) {
  323. match = v8.split('.');
  324. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  325. // but their correct versions are not interesting for us
  326. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  327. }
  328. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  329. // so check `userAgent` even if `.v8` exists, but 0
  330. if (!version && userAgent) {
  331. match = userAgent.match(/Edge\/(\d+)/);
  332. if (!match || match[1] >= 74) {
  333. match = userAgent.match(/Chrome\/(\d+)/);
  334. if (match) version = +match[1];
  335. }
  336. }
  337. var engineV8Version = version;
  338. /* eslint-disable es/no-symbol -- required for testing */
  339. var V8_VERSION$2 = engineV8Version;
  340. var fails$k = fails$o;
  341. var global$b = global$e;
  342. var $String$4 = global$b.String;
  343. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  344. var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$k(function () {
  345. var symbol = Symbol('symbol detection');
  346. // Chrome 38 Symbol has incorrect toString conversion
  347. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  348. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  349. // of course, fail.
  350. return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
  351. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  352. !Symbol.sham && V8_VERSION$2 && V8_VERSION$2 < 41;
  353. });
  354. /* eslint-disable es/no-symbol -- required for testing */
  355. var NATIVE_SYMBOL$1 = symbolConstructorDetection;
  356. var useSymbolAsUid = NATIVE_SYMBOL$1
  357. && !Symbol.sham
  358. && typeof Symbol.iterator == 'symbol';
  359. var getBuiltIn$3 = getBuiltIn$4;
  360. var isCallable$c = isCallable$f;
  361. var isPrototypeOf$1 = objectIsPrototypeOf;
  362. var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
  363. var $Object$3 = Object;
  364. var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
  365. return typeof it == 'symbol';
  366. } : function (it) {
  367. var $Symbol = getBuiltIn$3('Symbol');
  368. return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
  369. };
  370. var $String$3 = String;
  371. var tryToString$1 = function (argument) {
  372. try {
  373. return $String$3(argument);
  374. } catch (error) {
  375. return 'Object';
  376. }
  377. };
  378. var isCallable$b = isCallable$f;
  379. var tryToString = tryToString$1;
  380. var $TypeError$7 = TypeError;
  381. // `Assert: IsCallable(argument) is true`
  382. var aCallable$2 = function (argument) {
  383. if (isCallable$b(argument)) return argument;
  384. throw new $TypeError$7(tryToString(argument) + ' is not a function');
  385. };
  386. var aCallable$1 = aCallable$2;
  387. var isNullOrUndefined$2 = isNullOrUndefined$4;
  388. // `GetMethod` abstract operation
  389. // https://tc39.es/ecma262/#sec-getmethod
  390. var getMethod$3 = function (V, P) {
  391. var func = V[P];
  392. return isNullOrUndefined$2(func) ? undefined : aCallable$1(func);
  393. };
  394. var call$a = functionCall;
  395. var isCallable$a = isCallable$f;
  396. var isObject$7 = isObject$8;
  397. var $TypeError$6 = TypeError;
  398. // `OrdinaryToPrimitive` abstract operation
  399. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  400. var ordinaryToPrimitive$1 = function (input, pref) {
  401. var fn, val;
  402. if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$7(val = call$a(fn, input))) return val;
  403. if (isCallable$a(fn = input.valueOf) && !isObject$7(val = call$a(fn, input))) return val;
  404. if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$7(val = call$a(fn, input))) return val;
  405. throw new $TypeError$6("Can't convert object to primitive value");
  406. };
  407. var sharedStore = {exports: {}};
  408. var global$a = global$e;
  409. // eslint-disable-next-line es/no-object-defineproperty -- safe
  410. var defineProperty$3 = Object.defineProperty;
  411. var defineGlobalProperty$3 = function (key, value) {
  412. try {
  413. defineProperty$3(global$a, key, { value: value, configurable: true, writable: true });
  414. } catch (error) {
  415. global$a[key] = value;
  416. } return value;
  417. };
  418. var globalThis$1 = global$e;
  419. var defineGlobalProperty$2 = defineGlobalProperty$3;
  420. var SHARED = '__core-js_shared__';
  421. var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
  422. (store$3.versions || (store$3.versions = [])).push({
  423. version: '3.37.1',
  424. mode: 'global',
  425. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  426. license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
  427. source: 'https://github.com/zloirock/core-js'
  428. });
  429. var sharedStoreExports = sharedStore.exports;
  430. var store$2 = sharedStoreExports;
  431. var shared$4 = function (key, value) {
  432. return store$2[key] || (store$2[key] = value || {});
  433. };
  434. var requireObjectCoercible$4 = requireObjectCoercible$6;
  435. var $Object$2 = Object;
  436. // `ToObject` abstract operation
  437. // https://tc39.es/ecma262/#sec-toobject
  438. var toObject$8 = function (argument) {
  439. return $Object$2(requireObjectCoercible$4(argument));
  440. };
  441. var uncurryThis$h = functionUncurryThis;
  442. var toObject$7 = toObject$8;
  443. var hasOwnProperty = uncurryThis$h({}.hasOwnProperty);
  444. // `HasOwnProperty` abstract operation
  445. // https://tc39.es/ecma262/#sec-hasownproperty
  446. // eslint-disable-next-line es/no-object-hasown -- safe
  447. var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  448. return hasOwnProperty(toObject$7(it), key);
  449. };
  450. var uncurryThis$g = functionUncurryThis;
  451. var id = 0;
  452. var postfix = Math.random();
  453. var toString$7 = uncurryThis$g(1.0.toString);
  454. var uid$2 = function (key) {
  455. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$7(++id + postfix, 36);
  456. };
  457. var global$9 = global$e;
  458. var shared$3 = shared$4;
  459. var hasOwn$8 = hasOwnProperty_1;
  460. var uid$1 = uid$2;
  461. var NATIVE_SYMBOL = symbolConstructorDetection;
  462. var USE_SYMBOL_AS_UID = useSymbolAsUid;
  463. var Symbol$1 = global$9.Symbol;
  464. var WellKnownSymbolsStore = shared$3('wks');
  465. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
  466. var wellKnownSymbol$b = function (name) {
  467. if (!hasOwn$8(WellKnownSymbolsStore, name)) {
  468. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
  469. ? Symbol$1[name]
  470. : createWellKnownSymbol('Symbol.' + name);
  471. } return WellKnownSymbolsStore[name];
  472. };
  473. var call$9 = functionCall;
  474. var isObject$6 = isObject$8;
  475. var isSymbol$1 = isSymbol$2;
  476. var getMethod$2 = getMethod$3;
  477. var ordinaryToPrimitive = ordinaryToPrimitive$1;
  478. var wellKnownSymbol$a = wellKnownSymbol$b;
  479. var $TypeError$5 = TypeError;
  480. var TO_PRIMITIVE = wellKnownSymbol$a('toPrimitive');
  481. // `ToPrimitive` abstract operation
  482. // https://tc39.es/ecma262/#sec-toprimitive
  483. var toPrimitive$2 = function (input, pref) {
  484. if (!isObject$6(input) || isSymbol$1(input)) return input;
  485. var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
  486. var result;
  487. if (exoticToPrim) {
  488. if (pref === undefined) pref = 'default';
  489. result = call$9(exoticToPrim, input, pref);
  490. if (!isObject$6(result) || isSymbol$1(result)) return result;
  491. throw new $TypeError$5("Can't convert object to primitive value");
  492. }
  493. if (pref === undefined) pref = 'number';
  494. return ordinaryToPrimitive(input, pref);
  495. };
  496. var toPrimitive$1 = toPrimitive$2;
  497. var isSymbol = isSymbol$2;
  498. // `ToPropertyKey` abstract operation
  499. // https://tc39.es/ecma262/#sec-topropertykey
  500. var toPropertyKey$2 = function (argument) {
  501. var key = toPrimitive$1(argument, 'string');
  502. return isSymbol(key) ? key : key + '';
  503. };
  504. var global$8 = global$e;
  505. var isObject$5 = isObject$8;
  506. var document$1 = global$8.document;
  507. // typeof document.createElement is 'object' in old IE
  508. var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
  509. var documentCreateElement$2 = function (it) {
  510. return EXISTS$1 ? document$1.createElement(it) : {};
  511. };
  512. var DESCRIPTORS$a = descriptors;
  513. var fails$j = fails$o;
  514. var createElement = documentCreateElement$2;
  515. // Thanks to IE8 for its funny defineProperty
  516. var ie8DomDefine = !DESCRIPTORS$a && !fails$j(function () {
  517. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  518. return Object.defineProperty(createElement('div'), 'a', {
  519. get: function () { return 7; }
  520. }).a !== 7;
  521. });
  522. var DESCRIPTORS$9 = descriptors;
  523. var call$8 = functionCall;
  524. var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
  525. var createPropertyDescriptor$2 = createPropertyDescriptor$3;
  526. var toIndexedObject$5 = toIndexedObject$6;
  527. var toPropertyKey$1 = toPropertyKey$2;
  528. var hasOwn$7 = hasOwnProperty_1;
  529. var IE8_DOM_DEFINE$1 = ie8DomDefine;
  530. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  531. var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
  532. // `Object.getOwnPropertyDescriptor` method
  533. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  534. objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
  535. O = toIndexedObject$5(O);
  536. P = toPropertyKey$1(P);
  537. if (IE8_DOM_DEFINE$1) try {
  538. return $getOwnPropertyDescriptor$1(O, P);
  539. } catch (error) { /* empty */ }
  540. if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$8(propertyIsEnumerableModule$1.f, O, P), O[P]);
  541. };
  542. var objectDefineProperty = {};
  543. var DESCRIPTORS$8 = descriptors;
  544. var fails$i = fails$o;
  545. // V8 ~ Chrome 36-
  546. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  547. var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$i(function () {
  548. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  549. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  550. value: 42,
  551. writable: false
  552. }).prototype !== 42;
  553. });
  554. var isObject$4 = isObject$8;
  555. var $String$2 = String;
  556. var $TypeError$4 = TypeError;
  557. // `Assert: Type(argument) is Object`
  558. var anObject$9 = function (argument) {
  559. if (isObject$4(argument)) return argument;
  560. throw new $TypeError$4($String$2(argument) + ' is not an object');
  561. };
  562. var DESCRIPTORS$7 = descriptors;
  563. var IE8_DOM_DEFINE = ie8DomDefine;
  564. var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
  565. var anObject$8 = anObject$9;
  566. var toPropertyKey = toPropertyKey$2;
  567. var $TypeError$3 = TypeError;
  568. // eslint-disable-next-line es/no-object-defineproperty -- safe
  569. var $defineProperty = Object.defineProperty;
  570. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  571. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  572. var ENUMERABLE = 'enumerable';
  573. var CONFIGURABLE$1 = 'configurable';
  574. var WRITABLE = 'writable';
  575. // `Object.defineProperty` method
  576. // https://tc39.es/ecma262/#sec-object.defineproperty
  577. objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
  578. anObject$8(O);
  579. P = toPropertyKey(P);
  580. anObject$8(Attributes);
  581. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  582. var current = $getOwnPropertyDescriptor(O, P);
  583. if (current && current[WRITABLE]) {
  584. O[P] = Attributes.value;
  585. Attributes = {
  586. configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
  587. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  588. writable: false
  589. };
  590. }
  591. } return $defineProperty(O, P, Attributes);
  592. } : $defineProperty : function defineProperty(O, P, Attributes) {
  593. anObject$8(O);
  594. P = toPropertyKey(P);
  595. anObject$8(Attributes);
  596. if (IE8_DOM_DEFINE) try {
  597. return $defineProperty(O, P, Attributes);
  598. } catch (error) { /* empty */ }
  599. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$3('Accessors not supported');
  600. if ('value' in Attributes) O[P] = Attributes.value;
  601. return O;
  602. };
  603. var DESCRIPTORS$6 = descriptors;
  604. var definePropertyModule$4 = objectDefineProperty;
  605. var createPropertyDescriptor$1 = createPropertyDescriptor$3;
  606. var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value) {
  607. return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
  608. } : function (object, key, value) {
  609. object[key] = value;
  610. return object;
  611. };
  612. var makeBuiltIn$2 = {exports: {}};
  613. var DESCRIPTORS$5 = descriptors;
  614. var hasOwn$6 = hasOwnProperty_1;
  615. var FunctionPrototype$1 = Function.prototype;
  616. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  617. var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
  618. var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
  619. // additional protection from minified / mangled / dropped function names
  620. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  621. var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
  622. var functionName = {
  623. EXISTS: EXISTS,
  624. PROPER: PROPER,
  625. CONFIGURABLE: CONFIGURABLE
  626. };
  627. var uncurryThis$f = functionUncurryThis;
  628. var isCallable$9 = isCallable$f;
  629. var store$1 = sharedStoreExports;
  630. var functionToString = uncurryThis$f(Function.toString);
  631. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  632. if (!isCallable$9(store$1.inspectSource)) {
  633. store$1.inspectSource = function (it) {
  634. return functionToString(it);
  635. };
  636. }
  637. var inspectSource$2 = store$1.inspectSource;
  638. var global$7 = global$e;
  639. var isCallable$8 = isCallable$f;
  640. var WeakMap$1 = global$7.WeakMap;
  641. var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
  642. var shared$2 = shared$4;
  643. var uid = uid$2;
  644. var keys = shared$2('keys');
  645. var sharedKey$3 = function (key) {
  646. return keys[key] || (keys[key] = uid(key));
  647. };
  648. var hiddenKeys$4 = {};
  649. var NATIVE_WEAK_MAP = weakMapBasicDetection;
  650. var global$6 = global$e;
  651. var isObject$3 = isObject$8;
  652. var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
  653. var hasOwn$5 = hasOwnProperty_1;
  654. var shared$1 = sharedStoreExports;
  655. var sharedKey$2 = sharedKey$3;
  656. var hiddenKeys$3 = hiddenKeys$4;
  657. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  658. var TypeError$1 = global$6.TypeError;
  659. var WeakMap = global$6.WeakMap;
  660. var set, get, has;
  661. var enforce = function (it) {
  662. return has(it) ? get(it) : set(it, {});
  663. };
  664. var getterFor = function (TYPE) {
  665. return function (it) {
  666. var state;
  667. if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
  668. throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
  669. } return state;
  670. };
  671. };
  672. if (NATIVE_WEAK_MAP || shared$1.state) {
  673. var store = shared$1.state || (shared$1.state = new WeakMap());
  674. /* eslint-disable no-self-assign -- prototype methods protection */
  675. store.get = store.get;
  676. store.has = store.has;
  677. store.set = store.set;
  678. /* eslint-enable no-self-assign -- prototype methods protection */
  679. set = function (it, metadata) {
  680. if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  681. metadata.facade = it;
  682. store.set(it, metadata);
  683. return metadata;
  684. };
  685. get = function (it) {
  686. return store.get(it) || {};
  687. };
  688. has = function (it) {
  689. return store.has(it);
  690. };
  691. } else {
  692. var STATE = sharedKey$2('state');
  693. hiddenKeys$3[STATE] = true;
  694. set = function (it, metadata) {
  695. if (hasOwn$5(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
  696. metadata.facade = it;
  697. createNonEnumerableProperty$3(it, STATE, metadata);
  698. return metadata;
  699. };
  700. get = function (it) {
  701. return hasOwn$5(it, STATE) ? it[STATE] : {};
  702. };
  703. has = function (it) {
  704. return hasOwn$5(it, STATE);
  705. };
  706. }
  707. var internalState = {
  708. set: set,
  709. get: get,
  710. has: has,
  711. enforce: enforce,
  712. getterFor: getterFor
  713. };
  714. var uncurryThis$e = functionUncurryThis;
  715. var fails$h = fails$o;
  716. var isCallable$7 = isCallable$f;
  717. var hasOwn$4 = hasOwnProperty_1;
  718. var DESCRIPTORS$4 = descriptors;
  719. var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
  720. var inspectSource$1 = inspectSource$2;
  721. var InternalStateModule = internalState;
  722. var enforceInternalState = InternalStateModule.enforce;
  723. var getInternalState$1 = InternalStateModule.get;
  724. var $String$1 = String;
  725. // eslint-disable-next-line es/no-object-defineproperty -- safe
  726. var defineProperty$2 = Object.defineProperty;
  727. var stringSlice$4 = uncurryThis$e(''.slice);
  728. var replace$2 = uncurryThis$e(''.replace);
  729. var join = uncurryThis$e([].join);
  730. var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$h(function () {
  731. return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  732. });
  733. var TEMPLATE = String(String).split('String');
  734. var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
  735. if (stringSlice$4($String$1(name), 0, 7) === 'Symbol(') {
  736. name = '[' + replace$2($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  737. }
  738. if (options && options.getter) name = 'get ' + name;
  739. if (options && options.setter) name = 'set ' + name;
  740. if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  741. if (DESCRIPTORS$4) defineProperty$2(value, 'name', { value: name, configurable: true });
  742. else value.name = name;
  743. }
  744. if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
  745. defineProperty$2(value, 'length', { value: options.arity });
  746. }
  747. try {
  748. if (options && hasOwn$4(options, 'constructor') && options.constructor) {
  749. if (DESCRIPTORS$4) defineProperty$2(value, 'prototype', { writable: false });
  750. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  751. } else if (value.prototype) value.prototype = undefined;
  752. } catch (error) { /* empty */ }
  753. var state = enforceInternalState(value);
  754. if (!hasOwn$4(state, 'source')) {
  755. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  756. } return value;
  757. };
  758. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  759. // eslint-disable-next-line no-extend-native -- required
  760. Function.prototype.toString = makeBuiltIn$1(function toString() {
  761. return isCallable$7(this) && getInternalState$1(this).source || inspectSource$1(this);
  762. }, 'toString');
  763. var makeBuiltInExports = makeBuiltIn$2.exports;
  764. var isCallable$6 = isCallable$f;
  765. var definePropertyModule$3 = objectDefineProperty;
  766. var makeBuiltIn = makeBuiltInExports;
  767. var defineGlobalProperty$1 = defineGlobalProperty$3;
  768. var defineBuiltIn$4 = function (O, key, value, options) {
  769. if (!options) options = {};
  770. var simple = options.enumerable;
  771. var name = options.name !== undefined ? options.name : key;
  772. if (isCallable$6(value)) makeBuiltIn(value, name, options);
  773. if (options.global) {
  774. if (simple) O[key] = value;
  775. else defineGlobalProperty$1(key, value);
  776. } else {
  777. try {
  778. if (!options.unsafe) delete O[key];
  779. else if (O[key]) simple = true;
  780. } catch (error) { /* empty */ }
  781. if (simple) O[key] = value;
  782. else definePropertyModule$3.f(O, key, {
  783. value: value,
  784. enumerable: false,
  785. configurable: !options.nonConfigurable,
  786. writable: !options.nonWritable
  787. });
  788. } return O;
  789. };
  790. var objectGetOwnPropertyNames = {};
  791. var ceil = Math.ceil;
  792. var floor$1 = Math.floor;
  793. // `Math.trunc` method
  794. // https://tc39.es/ecma262/#sec-math.trunc
  795. // eslint-disable-next-line es/no-math-trunc -- safe
  796. var mathTrunc = Math.trunc || function trunc(x) {
  797. var n = +x;
  798. return (n > 0 ? floor$1 : ceil)(n);
  799. };
  800. var trunc = mathTrunc;
  801. // `ToIntegerOrInfinity` abstract operation
  802. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  803. var toIntegerOrInfinity$4 = function (argument) {
  804. var number = +argument;
  805. // eslint-disable-next-line no-self-compare -- NaN check
  806. return number !== number || number === 0 ? 0 : trunc(number);
  807. };
  808. var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
  809. var max$1 = Math.max;
  810. var min$2 = Math.min;
  811. // Helper for a popular repeating case of the spec:
  812. // Let integer be ? ToInteger(index).
  813. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  814. var toAbsoluteIndex$1 = function (index, length) {
  815. var integer = toIntegerOrInfinity$3(index);
  816. return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
  817. };
  818. var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
  819. var min$1 = Math.min;
  820. // `ToLength` abstract operation
  821. // https://tc39.es/ecma262/#sec-tolength
  822. var toLength$2 = function (argument) {
  823. var len = toIntegerOrInfinity$2(argument);
  824. return len > 0 ? min$1(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  825. };
  826. var toLength$1 = toLength$2;
  827. // `LengthOfArrayLike` abstract operation
  828. // https://tc39.es/ecma262/#sec-lengthofarraylike
  829. var lengthOfArrayLike$3 = function (obj) {
  830. return toLength$1(obj.length);
  831. };
  832. var toIndexedObject$4 = toIndexedObject$6;
  833. var toAbsoluteIndex = toAbsoluteIndex$1;
  834. var lengthOfArrayLike$2 = lengthOfArrayLike$3;
  835. // `Array.prototype.{ indexOf, includes }` methods implementation
  836. var createMethod$3 = function (IS_INCLUDES) {
  837. return function ($this, el, fromIndex) {
  838. var O = toIndexedObject$4($this);
  839. var length = lengthOfArrayLike$2(O);
  840. if (length === 0) return !IS_INCLUDES && -1;
  841. var index = toAbsoluteIndex(fromIndex, length);
  842. var value;
  843. // Array#includes uses SameValueZero equality algorithm
  844. // eslint-disable-next-line no-self-compare -- NaN check
  845. if (IS_INCLUDES && el !== el) while (length > index) {
  846. value = O[index++];
  847. // eslint-disable-next-line no-self-compare -- NaN check
  848. if (value !== value) return true;
  849. // Array#indexOf ignores holes, Array#includes - not
  850. } else for (;length > index; index++) {
  851. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  852. } return !IS_INCLUDES && -1;
  853. };
  854. };
  855. var arrayIncludes = {
  856. // `Array.prototype.includes` method
  857. // https://tc39.es/ecma262/#sec-array.prototype.includes
  858. includes: createMethod$3(true),
  859. // `Array.prototype.indexOf` method
  860. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  861. indexOf: createMethod$3(false)
  862. };
  863. var uncurryThis$d = functionUncurryThis;
  864. var hasOwn$3 = hasOwnProperty_1;
  865. var toIndexedObject$3 = toIndexedObject$6;
  866. var indexOf$1 = arrayIncludes.indexOf;
  867. var hiddenKeys$2 = hiddenKeys$4;
  868. var push$3 = uncurryThis$d([].push);
  869. var objectKeysInternal = function (object, names) {
  870. var O = toIndexedObject$3(object);
  871. var i = 0;
  872. var result = [];
  873. var key;
  874. for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$3(result, key);
  875. // Don't enum bug & hidden keys
  876. while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
  877. ~indexOf$1(result, key) || push$3(result, key);
  878. }
  879. return result;
  880. };
  881. // IE8- don't enum bug keys
  882. var enumBugKeys$3 = [
  883. 'constructor',
  884. 'hasOwnProperty',
  885. 'isPrototypeOf',
  886. 'propertyIsEnumerable',
  887. 'toLocaleString',
  888. 'toString',
  889. 'valueOf'
  890. ];
  891. var internalObjectKeys$1 = objectKeysInternal;
  892. var enumBugKeys$2 = enumBugKeys$3;
  893. var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
  894. // `Object.getOwnPropertyNames` method
  895. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  896. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  897. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  898. return internalObjectKeys$1(O, hiddenKeys$1);
  899. };
  900. var objectGetOwnPropertySymbols = {};
  901. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  902. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  903. var getBuiltIn$2 = getBuiltIn$4;
  904. var uncurryThis$c = functionUncurryThis;
  905. var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
  906. var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
  907. var anObject$7 = anObject$9;
  908. var concat$2 = uncurryThis$c([].concat);
  909. // all object keys, includes non-enumerable and symbols
  910. var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
  911. var keys = getOwnPropertyNamesModule.f(anObject$7(it));
  912. var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
  913. return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
  914. };
  915. var hasOwn$2 = hasOwnProperty_1;
  916. var ownKeys = ownKeys$1;
  917. var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
  918. var definePropertyModule$2 = objectDefineProperty;
  919. var copyConstructorProperties$1 = function (target, source, exceptions) {
  920. var keys = ownKeys(source);
  921. var defineProperty = definePropertyModule$2.f;
  922. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  923. for (var i = 0; i < keys.length; i++) {
  924. var key = keys[i];
  925. if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
  926. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  927. }
  928. }
  929. };
  930. var fails$g = fails$o;
  931. var isCallable$5 = isCallable$f;
  932. var replacement = /#|\.prototype\./;
  933. var isForced$1 = function (feature, detection) {
  934. var value = data[normalize(feature)];
  935. return value === POLYFILL ? true
  936. : value === NATIVE ? false
  937. : isCallable$5(detection) ? fails$g(detection)
  938. : !!detection;
  939. };
  940. var normalize = isForced$1.normalize = function (string) {
  941. return String(string).replace(replacement, '.').toLowerCase();
  942. };
  943. var data = isForced$1.data = {};
  944. var NATIVE = isForced$1.NATIVE = 'N';
  945. var POLYFILL = isForced$1.POLYFILL = 'P';
  946. var isForced_1 = isForced$1;
  947. var global$5 = global$e;
  948. var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
  949. var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
  950. var defineBuiltIn$3 = defineBuiltIn$4;
  951. var defineGlobalProperty = defineGlobalProperty$3;
  952. var copyConstructorProperties = copyConstructorProperties$1;
  953. var isForced = isForced_1;
  954. /*
  955. options.target - name of the target object
  956. options.global - target is the global object
  957. options.stat - export as static methods of target
  958. options.proto - export as prototype methods of target
  959. options.real - real prototype method for the `pure` version
  960. options.forced - export even if the native feature is available
  961. options.bind - bind methods to the target, required for the `pure` version
  962. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  963. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  964. options.sham - add a flag to not completely full polyfills
  965. options.enumerable - export as enumerable property
  966. options.dontCallGetSet - prevent calling a getter on target
  967. options.name - the .name of the function if it does not match the key
  968. */
  969. var _export = function (options, source) {
  970. var TARGET = options.target;
  971. var GLOBAL = options.global;
  972. var STATIC = options.stat;
  973. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  974. if (GLOBAL) {
  975. target = global$5;
  976. } else if (STATIC) {
  977. target = global$5[TARGET] || defineGlobalProperty(TARGET, {});
  978. } else {
  979. target = global$5[TARGET] && global$5[TARGET].prototype;
  980. }
  981. if (target) for (key in source) {
  982. sourceProperty = source[key];
  983. if (options.dontCallGetSet) {
  984. descriptor = getOwnPropertyDescriptor(target, key);
  985. targetProperty = descriptor && descriptor.value;
  986. } else targetProperty = target[key];
  987. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  988. // contained in target
  989. if (!FORCED && targetProperty !== undefined) {
  990. if (typeof sourceProperty == typeof targetProperty) continue;
  991. copyConstructorProperties(sourceProperty, targetProperty);
  992. }
  993. // add a flag to not completely full polyfills
  994. if (options.sham || (targetProperty && targetProperty.sham)) {
  995. createNonEnumerableProperty$2(sourceProperty, 'sham', true);
  996. }
  997. defineBuiltIn$3(target, key, sourceProperty, options);
  998. }
  999. };
  1000. var classof$6 = classofRaw$2;
  1001. // `IsArray` abstract operation
  1002. // https://tc39.es/ecma262/#sec-isarray
  1003. // eslint-disable-next-line es/no-array-isarray -- safe
  1004. var isArray$2 = Array.isArray || function isArray(argument) {
  1005. return classof$6(argument) === 'Array';
  1006. };
  1007. var $TypeError$2 = TypeError;
  1008. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1009. var doesNotExceedSafeInteger$1 = function (it) {
  1010. if (it > MAX_SAFE_INTEGER) throw $TypeError$2('Maximum allowed index exceeded');
  1011. return it;
  1012. };
  1013. var DESCRIPTORS$3 = descriptors;
  1014. var definePropertyModule$1 = objectDefineProperty;
  1015. var createPropertyDescriptor = createPropertyDescriptor$3;
  1016. var createProperty$1 = function (object, key, value) {
  1017. if (DESCRIPTORS$3) definePropertyModule$1.f(object, key, createPropertyDescriptor(0, value));
  1018. else object[key] = value;
  1019. };
  1020. var wellKnownSymbol$9 = wellKnownSymbol$b;
  1021. var TO_STRING_TAG$1 = wellKnownSymbol$9('toStringTag');
  1022. var test = {};
  1023. test[TO_STRING_TAG$1] = 'z';
  1024. var toStringTagSupport = String(test) === '[object z]';
  1025. var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
  1026. var isCallable$4 = isCallable$f;
  1027. var classofRaw$1 = classofRaw$2;
  1028. var wellKnownSymbol$8 = wellKnownSymbol$b;
  1029. var TO_STRING_TAG = wellKnownSymbol$8('toStringTag');
  1030. var $Object$1 = Object;
  1031. // ES3 wrong here
  1032. var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
  1033. // fallback for IE11 Script Access Denied error
  1034. var tryGet = function (it, key) {
  1035. try {
  1036. return it[key];
  1037. } catch (error) { /* empty */ }
  1038. };
  1039. // getting tag from ES6+ `Object.prototype.toString`
  1040. var classof$5 = TO_STRING_TAG_SUPPORT$2 ? classofRaw$1 : function (it) {
  1041. var O, tag, result;
  1042. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1043. // @@toStringTag case
  1044. : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG)) == 'string' ? tag
  1045. // builtinTag case
  1046. : CORRECT_ARGUMENTS ? classofRaw$1(O)
  1047. // ES3 arguments fallback
  1048. : (result = classofRaw$1(O)) === 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
  1049. };
  1050. var uncurryThis$b = functionUncurryThis;
  1051. var fails$f = fails$o;
  1052. var isCallable$3 = isCallable$f;
  1053. var classof$4 = classof$5;
  1054. var getBuiltIn$1 = getBuiltIn$4;
  1055. var inspectSource = inspectSource$2;
  1056. var noop = function () { /* empty */ };
  1057. var construct = getBuiltIn$1('Reflect', 'construct');
  1058. var constructorRegExp = /^\s*(?:class|function)\b/;
  1059. var exec$1 = uncurryThis$b(constructorRegExp.exec);
  1060. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  1061. var isConstructorModern = function isConstructor(argument) {
  1062. if (!isCallable$3(argument)) return false;
  1063. try {
  1064. construct(noop, [], argument);
  1065. return true;
  1066. } catch (error) {
  1067. return false;
  1068. }
  1069. };
  1070. var isConstructorLegacy = function isConstructor(argument) {
  1071. if (!isCallable$3(argument)) return false;
  1072. switch (classof$4(argument)) {
  1073. case 'AsyncFunction':
  1074. case 'GeneratorFunction':
  1075. case 'AsyncGeneratorFunction': return false;
  1076. }
  1077. try {
  1078. // we can't check .prototype since constructors produced by .bind haven't it
  1079. // `Function#toString` throws on some built-it function in some legacy engines
  1080. // (for example, `DOMQuad` and similar in FF41-)
  1081. return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
  1082. } catch (error) {
  1083. return true;
  1084. }
  1085. };
  1086. isConstructorLegacy.sham = true;
  1087. // `IsConstructor` abstract operation
  1088. // https://tc39.es/ecma262/#sec-isconstructor
  1089. var isConstructor$1 = !construct || fails$f(function () {
  1090. var called;
  1091. return isConstructorModern(isConstructorModern.call)
  1092. || !isConstructorModern(Object)
  1093. || !isConstructorModern(function () { called = true; })
  1094. || called;
  1095. }) ? isConstructorLegacy : isConstructorModern;
  1096. var isArray$1 = isArray$2;
  1097. var isConstructor = isConstructor$1;
  1098. var isObject$2 = isObject$8;
  1099. var wellKnownSymbol$7 = wellKnownSymbol$b;
  1100. var SPECIES$2 = wellKnownSymbol$7('species');
  1101. var $Array = Array;
  1102. // a part of `ArraySpeciesCreate` abstract operation
  1103. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1104. var arraySpeciesConstructor$1 = function (originalArray) {
  1105. var C;
  1106. if (isArray$1(originalArray)) {
  1107. C = originalArray.constructor;
  1108. // cross-realm fallback
  1109. if (isConstructor(C) && (C === $Array || isArray$1(C.prototype))) C = undefined;
  1110. else if (isObject$2(C)) {
  1111. C = C[SPECIES$2];
  1112. if (C === null) C = undefined;
  1113. }
  1114. } return C === undefined ? $Array : C;
  1115. };
  1116. var arraySpeciesConstructor = arraySpeciesConstructor$1;
  1117. // `ArraySpeciesCreate` abstract operation
  1118. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1119. var arraySpeciesCreate$2 = function (originalArray, length) {
  1120. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1121. };
  1122. var fails$e = fails$o;
  1123. var wellKnownSymbol$6 = wellKnownSymbol$b;
  1124. var V8_VERSION$1 = engineV8Version;
  1125. var SPECIES$1 = wellKnownSymbol$6('species');
  1126. var arrayMethodHasSpeciesSupport$3 = function (METHOD_NAME) {
  1127. // We can't use this feature detection in V8 since it causes
  1128. // deoptimization and serious performance degradation
  1129. // https://github.com/zloirock/core-js/issues/677
  1130. return V8_VERSION$1 >= 51 || !fails$e(function () {
  1131. var array = [];
  1132. var constructor = array.constructor = {};
  1133. constructor[SPECIES$1] = function () {
  1134. return { foo: 1 };
  1135. };
  1136. return array[METHOD_NAME](Boolean).foo !== 1;
  1137. });
  1138. };
  1139. var $$b = _export;
  1140. var fails$d = fails$o;
  1141. var isArray = isArray$2;
  1142. var isObject$1 = isObject$8;
  1143. var toObject$6 = toObject$8;
  1144. var lengthOfArrayLike$1 = lengthOfArrayLike$3;
  1145. var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
  1146. var createProperty = createProperty$1;
  1147. var arraySpeciesCreate$1 = arraySpeciesCreate$2;
  1148. var arrayMethodHasSpeciesSupport$2 = arrayMethodHasSpeciesSupport$3;
  1149. var wellKnownSymbol$5 = wellKnownSymbol$b;
  1150. var V8_VERSION = engineV8Version;
  1151. var IS_CONCAT_SPREADABLE = wellKnownSymbol$5('isConcatSpreadable');
  1152. // We can't use this feature detection in V8 since it causes
  1153. // deoptimization and serious performance degradation
  1154. // https://github.com/zloirock/core-js/issues/679
  1155. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails$d(function () {
  1156. var array = [];
  1157. array[IS_CONCAT_SPREADABLE] = false;
  1158. return array.concat()[0] !== array;
  1159. });
  1160. var isConcatSpreadable = function (O) {
  1161. if (!isObject$1(O)) return false;
  1162. var spreadable = O[IS_CONCAT_SPREADABLE];
  1163. return spreadable !== undefined ? !!spreadable : isArray(O);
  1164. };
  1165. var FORCED$2 = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport$2('concat');
  1166. // `Array.prototype.concat` method
  1167. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1168. // with adding support of @@isConcatSpreadable and @@species
  1169. $$b({ target: 'Array', proto: true, arity: 1, forced: FORCED$2 }, {
  1170. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1171. concat: function concat(arg) {
  1172. var O = toObject$6(this);
  1173. var A = arraySpeciesCreate$1(O, 0);
  1174. var n = 0;
  1175. var i, k, length, len, E;
  1176. for (i = -1, length = arguments.length; i < length; i++) {
  1177. E = i === -1 ? O : arguments[i];
  1178. if (isConcatSpreadable(E)) {
  1179. len = lengthOfArrayLike$1(E);
  1180. doesNotExceedSafeInteger(n + len);
  1181. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1182. } else {
  1183. doesNotExceedSafeInteger(n + 1);
  1184. createProperty(A, n++, E);
  1185. }
  1186. }
  1187. A.length = n;
  1188. return A;
  1189. }
  1190. });
  1191. var classofRaw = classofRaw$2;
  1192. var uncurryThis$a = functionUncurryThis;
  1193. var functionUncurryThisClause = function (fn) {
  1194. // Nashorn bug:
  1195. // https://github.com/zloirock/core-js/issues/1128
  1196. // https://github.com/zloirock/core-js/issues/1130
  1197. if (classofRaw(fn) === 'Function') return uncurryThis$a(fn);
  1198. };
  1199. var uncurryThis$9 = functionUncurryThisClause;
  1200. var aCallable = aCallable$2;
  1201. var NATIVE_BIND$1 = functionBindNative;
  1202. var bind$1 = uncurryThis$9(uncurryThis$9.bind);
  1203. // optional / simple context binding
  1204. var functionBindContext = function (fn, that) {
  1205. aCallable(fn);
  1206. return that === undefined ? fn : NATIVE_BIND$1 ? bind$1(fn, that) : function (/* ...args */) {
  1207. return fn.apply(that, arguments);
  1208. };
  1209. };
  1210. var bind = functionBindContext;
  1211. var uncurryThis$8 = functionUncurryThis;
  1212. var IndexedObject$2 = indexedObject;
  1213. var toObject$5 = toObject$8;
  1214. var lengthOfArrayLike = lengthOfArrayLike$3;
  1215. var arraySpeciesCreate = arraySpeciesCreate$2;
  1216. var push$2 = uncurryThis$8([].push);
  1217. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1218. var createMethod$2 = function (TYPE) {
  1219. var IS_MAP = TYPE === 1;
  1220. var IS_FILTER = TYPE === 2;
  1221. var IS_SOME = TYPE === 3;
  1222. var IS_EVERY = TYPE === 4;
  1223. var IS_FIND_INDEX = TYPE === 6;
  1224. var IS_FILTER_REJECT = TYPE === 7;
  1225. var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
  1226. return function ($this, callbackfn, that, specificCreate) {
  1227. var O = toObject$5($this);
  1228. var self = IndexedObject$2(O);
  1229. var length = lengthOfArrayLike(self);
  1230. var boundFunction = bind(callbackfn, that);
  1231. var index = 0;
  1232. var create = specificCreate || arraySpeciesCreate;
  1233. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1234. var value, result;
  1235. for (;length > index; index++) if (NO_HOLES || index in self) {
  1236. value = self[index];
  1237. result = boundFunction(value, index, O);
  1238. if (TYPE) {
  1239. if (IS_MAP) target[index] = result; // map
  1240. else if (result) switch (TYPE) {
  1241. case 3: return true; // some
  1242. case 5: return value; // find
  1243. case 6: return index; // findIndex
  1244. case 2: push$2(target, value); // filter
  1245. } else switch (TYPE) {
  1246. case 4: return false; // every
  1247. case 7: push$2(target, value); // filterReject
  1248. }
  1249. }
  1250. }
  1251. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1252. };
  1253. };
  1254. var arrayIteration = {
  1255. // `Array.prototype.forEach` method
  1256. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1257. forEach: createMethod$2(0),
  1258. // `Array.prototype.map` method
  1259. // https://tc39.es/ecma262/#sec-array.prototype.map
  1260. map: createMethod$2(1),
  1261. // `Array.prototype.filter` method
  1262. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1263. filter: createMethod$2(2),
  1264. // `Array.prototype.some` method
  1265. // https://tc39.es/ecma262/#sec-array.prototype.some
  1266. some: createMethod$2(3),
  1267. // `Array.prototype.every` method
  1268. // https://tc39.es/ecma262/#sec-array.prototype.every
  1269. every: createMethod$2(4),
  1270. // `Array.prototype.find` method
  1271. // https://tc39.es/ecma262/#sec-array.prototype.find
  1272. find: createMethod$2(5),
  1273. // `Array.prototype.findIndex` method
  1274. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1275. findIndex: createMethod$2(6),
  1276. // `Array.prototype.filterReject` method
  1277. // https://github.com/tc39/proposal-array-filtering
  1278. filterReject: createMethod$2(7)
  1279. };
  1280. var $$a = _export;
  1281. var $filter = arrayIteration.filter;
  1282. var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$3;
  1283. var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('filter');
  1284. // `Array.prototype.filter` method
  1285. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1286. // with adding support of @@species
  1287. $$a({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
  1288. filter: function filter(callbackfn /* , thisArg */) {
  1289. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1290. }
  1291. });
  1292. var objectDefineProperties = {};
  1293. var internalObjectKeys = objectKeysInternal;
  1294. var enumBugKeys$1 = enumBugKeys$3;
  1295. // `Object.keys` method
  1296. // https://tc39.es/ecma262/#sec-object.keys
  1297. // eslint-disable-next-line es/no-object-keys -- safe
  1298. var objectKeys$3 = Object.keys || function keys(O) {
  1299. return internalObjectKeys(O, enumBugKeys$1);
  1300. };
  1301. var DESCRIPTORS$2 = descriptors;
  1302. var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
  1303. var definePropertyModule = objectDefineProperty;
  1304. var anObject$6 = anObject$9;
  1305. var toIndexedObject$2 = toIndexedObject$6;
  1306. var objectKeys$2 = objectKeys$3;
  1307. // `Object.defineProperties` method
  1308. // https://tc39.es/ecma262/#sec-object.defineproperties
  1309. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1310. objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1311. anObject$6(O);
  1312. var props = toIndexedObject$2(Properties);
  1313. var keys = objectKeys$2(Properties);
  1314. var length = keys.length;
  1315. var index = 0;
  1316. var key;
  1317. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  1318. return O;
  1319. };
  1320. var getBuiltIn = getBuiltIn$4;
  1321. var html$1 = getBuiltIn('document', 'documentElement');
  1322. /* global ActiveXObject -- old IE, WSH */
  1323. var anObject$5 = anObject$9;
  1324. var definePropertiesModule = objectDefineProperties;
  1325. var enumBugKeys = enumBugKeys$3;
  1326. var hiddenKeys = hiddenKeys$4;
  1327. var html = html$1;
  1328. var documentCreateElement$1 = documentCreateElement$2;
  1329. var sharedKey$1 = sharedKey$3;
  1330. var GT = '>';
  1331. var LT = '<';
  1332. var PROTOTYPE = 'prototype';
  1333. var SCRIPT = 'script';
  1334. var IE_PROTO$1 = sharedKey$1('IE_PROTO');
  1335. var EmptyConstructor = function () { /* empty */ };
  1336. var scriptTag = function (content) {
  1337. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1338. };
  1339. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1340. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1341. activeXDocument.write(scriptTag(''));
  1342. activeXDocument.close();
  1343. var temp = activeXDocument.parentWindow.Object;
  1344. activeXDocument = null; // avoid memory leak
  1345. return temp;
  1346. };
  1347. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1348. var NullProtoObjectViaIFrame = function () {
  1349. // Thrash, waste and sodomy: IE GC bug
  1350. var iframe = documentCreateElement$1('iframe');
  1351. var JS = 'java' + SCRIPT + ':';
  1352. var iframeDocument;
  1353. iframe.style.display = 'none';
  1354. html.appendChild(iframe);
  1355. // https://github.com/zloirock/core-js/issues/475
  1356. iframe.src = String(JS);
  1357. iframeDocument = iframe.contentWindow.document;
  1358. iframeDocument.open();
  1359. iframeDocument.write(scriptTag('document.F=Object'));
  1360. iframeDocument.close();
  1361. return iframeDocument.F;
  1362. };
  1363. // Check for document.domain and active x support
  1364. // No need to use active x approach when document.domain is not set
  1365. // see https://github.com/es-shims/es5-shim/issues/150
  1366. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1367. // avoid IE GC bug
  1368. var activeXDocument;
  1369. var NullProtoObject = function () {
  1370. try {
  1371. activeXDocument = new ActiveXObject('htmlfile');
  1372. } catch (error) { /* ignore */ }
  1373. NullProtoObject = typeof document != 'undefined'
  1374. ? document.domain && activeXDocument
  1375. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1376. : NullProtoObjectViaIFrame()
  1377. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1378. var length = enumBugKeys.length;
  1379. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1380. return NullProtoObject();
  1381. };
  1382. hiddenKeys[IE_PROTO$1] = true;
  1383. // `Object.create` method
  1384. // https://tc39.es/ecma262/#sec-object.create
  1385. // eslint-disable-next-line es/no-object-create -- safe
  1386. var objectCreate = Object.create || function create(O, Properties) {
  1387. var result;
  1388. if (O !== null) {
  1389. EmptyConstructor[PROTOTYPE] = anObject$5(O);
  1390. result = new EmptyConstructor();
  1391. EmptyConstructor[PROTOTYPE] = null;
  1392. // add "__proto__" for Object.getPrototypeOf polyfill
  1393. result[IE_PROTO$1] = O;
  1394. } else result = NullProtoObject();
  1395. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1396. };
  1397. var wellKnownSymbol$4 = wellKnownSymbol$b;
  1398. var create$1 = objectCreate;
  1399. var defineProperty$1 = objectDefineProperty.f;
  1400. var UNSCOPABLES = wellKnownSymbol$4('unscopables');
  1401. var ArrayPrototype = Array.prototype;
  1402. // Array.prototype[@@unscopables]
  1403. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1404. if (ArrayPrototype[UNSCOPABLES] === undefined) {
  1405. defineProperty$1(ArrayPrototype, UNSCOPABLES, {
  1406. configurable: true,
  1407. value: create$1(null)
  1408. });
  1409. }
  1410. // add a key to Array.prototype[@@unscopables]
  1411. var addToUnscopables$2 = function (key) {
  1412. ArrayPrototype[UNSCOPABLES][key] = true;
  1413. };
  1414. var $$9 = _export;
  1415. var $find = arrayIteration.find;
  1416. var addToUnscopables$1 = addToUnscopables$2;
  1417. var FIND = 'find';
  1418. var SKIPS_HOLES = true;
  1419. // Shouldn't skip holes
  1420. // eslint-disable-next-line es/no-array-prototype-find -- testing
  1421. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1422. // `Array.prototype.find` method
  1423. // https://tc39.es/ecma262/#sec-array.prototype.find
  1424. $$9({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1425. find: function find(callbackfn /* , that = undefined */) {
  1426. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1427. }
  1428. });
  1429. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1430. addToUnscopables$1(FIND);
  1431. var $$8 = _export;
  1432. var $includes = arrayIncludes.includes;
  1433. var fails$c = fails$o;
  1434. var addToUnscopables = addToUnscopables$2;
  1435. // FF99+ bug
  1436. var BROKEN_ON_SPARSE = fails$c(function () {
  1437. // eslint-disable-next-line es/no-array-prototype-includes -- detection
  1438. return !Array(1).includes();
  1439. });
  1440. // `Array.prototype.includes` method
  1441. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1442. $$8({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1443. includes: function includes(el /* , fromIndex = 0 */) {
  1444. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1445. }
  1446. });
  1447. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1448. addToUnscopables('includes');
  1449. var fails$b = fails$o;
  1450. var arrayMethodIsStrict$2 = function (METHOD_NAME, argument) {
  1451. var method = [][METHOD_NAME];
  1452. return !!method && fails$b(function () {
  1453. // eslint-disable-next-line no-useless-call -- required for testing
  1454. method.call(null, argument || function () { return 1; }, 1);
  1455. });
  1456. };
  1457. var $$7 = _export;
  1458. var uncurryThis$7 = functionUncurryThis;
  1459. var IndexedObject$1 = indexedObject;
  1460. var toIndexedObject$1 = toIndexedObject$6;
  1461. var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
  1462. var nativeJoin = uncurryThis$7([].join);
  1463. var ES3_STRINGS = IndexedObject$1 !== Object;
  1464. var FORCED$1 = ES3_STRINGS || !arrayMethodIsStrict$1('join', ',');
  1465. // `Array.prototype.join` method
  1466. // https://tc39.es/ecma262/#sec-array.prototype.join
  1467. $$7({ target: 'Array', proto: true, forced: FORCED$1 }, {
  1468. join: function join(separator) {
  1469. return nativeJoin(toIndexedObject$1(this), separator === undefined ? ',' : separator);
  1470. }
  1471. });
  1472. var $$6 = _export;
  1473. var $map = arrayIteration.map;
  1474. var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$3;
  1475. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  1476. // `Array.prototype.map` method
  1477. // https://tc39.es/ecma262/#sec-array.prototype.map
  1478. // with adding support of @@species
  1479. $$6({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1480. map: function map(callbackfn /* , thisArg */) {
  1481. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1482. }
  1483. });
  1484. var $$5 = _export;
  1485. var fails$a = fails$o;
  1486. var toObject$4 = toObject$8;
  1487. var toPrimitive = toPrimitive$2;
  1488. var FORCED = fails$a(function () {
  1489. return new Date(NaN).toJSON() !== null
  1490. || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
  1491. });
  1492. // `Date.prototype.toJSON` method
  1493. // https://tc39.es/ecma262/#sec-date.prototype.tojson
  1494. $$5({ target: 'Date', proto: true, arity: 1, forced: FORCED }, {
  1495. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1496. toJSON: function toJSON(key) {
  1497. var O = toObject$4(this);
  1498. var pv = toPrimitive(O, 'number');
  1499. return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
  1500. }
  1501. });
  1502. var DESCRIPTORS$1 = descriptors;
  1503. var uncurryThis$6 = functionUncurryThis;
  1504. var call$7 = functionCall;
  1505. var fails$9 = fails$o;
  1506. var objectKeys$1 = objectKeys$3;
  1507. var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
  1508. var propertyIsEnumerableModule = objectPropertyIsEnumerable;
  1509. var toObject$3 = toObject$8;
  1510. var IndexedObject = indexedObject;
  1511. // eslint-disable-next-line es/no-object-assign -- safe
  1512. var $assign = Object.assign;
  1513. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  1514. var defineProperty = Object.defineProperty;
  1515. var concat$1 = uncurryThis$6([].concat);
  1516. // `Object.assign` method
  1517. // https://tc39.es/ecma262/#sec-object.assign
  1518. var objectAssign = !$assign || fails$9(function () {
  1519. // should have correct order of operations (Edge bug)
  1520. if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  1521. enumerable: true,
  1522. get: function () {
  1523. defineProperty(this, 'b', {
  1524. value: 3,
  1525. enumerable: false
  1526. });
  1527. }
  1528. }), { b: 2 })).b !== 1) return true;
  1529. // should work with symbols and should have deterministic property order (V8 bug)
  1530. var A = {};
  1531. var B = {};
  1532. // eslint-disable-next-line es/no-symbol -- safe
  1533. var symbol = Symbol('assign detection');
  1534. var alphabet = 'abcdefghijklmnopqrst';
  1535. A[symbol] = 7;
  1536. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  1537. return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
  1538. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  1539. var T = toObject$3(target);
  1540. var argumentsLength = arguments.length;
  1541. var index = 1;
  1542. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1543. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  1544. while (argumentsLength > index) {
  1545. var S = IndexedObject(arguments[index++]);
  1546. var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
  1547. var length = keys.length;
  1548. var j = 0;
  1549. var key;
  1550. while (length > j) {
  1551. key = keys[j++];
  1552. if (!DESCRIPTORS$1 || call$7(propertyIsEnumerable, S, key)) T[key] = S[key];
  1553. }
  1554. } return T;
  1555. } : $assign;
  1556. var $$4 = _export;
  1557. var assign = objectAssign;
  1558. // `Object.assign` method
  1559. // https://tc39.es/ecma262/#sec-object.assign
  1560. // eslint-disable-next-line es/no-object-assign -- required for testing
  1561. $$4({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  1562. assign: assign
  1563. });
  1564. var fails$8 = fails$o;
  1565. var correctPrototypeGetter = !fails$8(function () {
  1566. function F() { /* empty */ }
  1567. F.prototype.constructor = null;
  1568. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  1569. return Object.getPrototypeOf(new F()) !== F.prototype;
  1570. });
  1571. var hasOwn$1 = hasOwnProperty_1;
  1572. var isCallable$2 = isCallable$f;
  1573. var toObject$2 = toObject$8;
  1574. var sharedKey = sharedKey$3;
  1575. var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
  1576. var IE_PROTO = sharedKey('IE_PROTO');
  1577. var $Object = Object;
  1578. var ObjectPrototype = $Object.prototype;
  1579. // `Object.getPrototypeOf` method
  1580. // https://tc39.es/ecma262/#sec-object.getprototypeof
  1581. // eslint-disable-next-line es/no-object-getprototypeof -- safe
  1582. var objectGetPrototypeOf$1 = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
  1583. var object = toObject$2(O);
  1584. if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
  1585. var constructor = object.constructor;
  1586. if (isCallable$2(constructor) && object instanceof constructor) {
  1587. return constructor.prototype;
  1588. } return object instanceof $Object ? ObjectPrototype : null;
  1589. };
  1590. var DESCRIPTORS = descriptors;
  1591. var fails$7 = fails$o;
  1592. var uncurryThis$5 = functionUncurryThis;
  1593. var objectGetPrototypeOf = objectGetPrototypeOf$1;
  1594. var objectKeys = objectKeys$3;
  1595. var toIndexedObject = toIndexedObject$6;
  1596. var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
  1597. var propertyIsEnumerable = uncurryThis$5($propertyIsEnumerable);
  1598. var push$1 = uncurryThis$5([].push);
  1599. // in some IE versions, `propertyIsEnumerable` returns incorrect result on integer keys
  1600. // of `null` prototype objects
  1601. var IE_BUG = DESCRIPTORS && fails$7(function () {
  1602. // eslint-disable-next-line es/no-object-create -- safe
  1603. var O = Object.create(null);
  1604. O[2] = 2;
  1605. return !propertyIsEnumerable(O, 2);
  1606. });
  1607. // `Object.{ entries, values }` methods implementation
  1608. var createMethod$1 = function (TO_ENTRIES) {
  1609. return function (it) {
  1610. var O = toIndexedObject(it);
  1611. var keys = objectKeys(O);
  1612. var IE_WORKAROUND = IE_BUG && objectGetPrototypeOf(O) === null;
  1613. var length = keys.length;
  1614. var i = 0;
  1615. var result = [];
  1616. var key;
  1617. while (length > i) {
  1618. key = keys[i++];
  1619. if (!DESCRIPTORS || (IE_WORKAROUND ? key in O : propertyIsEnumerable(O, key))) {
  1620. push$1(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  1621. }
  1622. }
  1623. return result;
  1624. };
  1625. };
  1626. var objectToArray = {
  1627. // `Object.entries` method
  1628. // https://tc39.es/ecma262/#sec-object.entries
  1629. entries: createMethod$1(true),
  1630. // `Object.values` method
  1631. // https://tc39.es/ecma262/#sec-object.values
  1632. values: createMethod$1(false)
  1633. };
  1634. var $$3 = _export;
  1635. var $entries = objectToArray.entries;
  1636. // `Object.entries` method
  1637. // https://tc39.es/ecma262/#sec-object.entries
  1638. $$3({ target: 'Object', stat: true }, {
  1639. entries: function entries(O) {
  1640. return $entries(O);
  1641. }
  1642. });
  1643. var $$2 = _export;
  1644. var toObject$1 = toObject$8;
  1645. var nativeKeys = objectKeys$3;
  1646. var fails$6 = fails$o;
  1647. var FAILS_ON_PRIMITIVES = fails$6(function () { nativeKeys(1); });
  1648. // `Object.keys` method
  1649. // https://tc39.es/ecma262/#sec-object.keys
  1650. $$2({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  1651. keys: function keys(it) {
  1652. return nativeKeys(toObject$1(it));
  1653. }
  1654. });
  1655. var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
  1656. var classof$3 = classof$5;
  1657. // `Object.prototype.toString` method implementation
  1658. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1659. var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
  1660. return '[object ' + classof$3(this) + ']';
  1661. };
  1662. var TO_STRING_TAG_SUPPORT = toStringTagSupport;
  1663. var defineBuiltIn$2 = defineBuiltIn$4;
  1664. var toString$6 = objectToString;
  1665. // `Object.prototype.toString` method
  1666. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  1667. if (!TO_STRING_TAG_SUPPORT) {
  1668. defineBuiltIn$2(Object.prototype, 'toString', toString$6, { unsafe: true });
  1669. }
  1670. var classof$2 = classof$5;
  1671. var $String = String;
  1672. var toString$5 = function (argument) {
  1673. if (classof$2(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  1674. return $String(argument);
  1675. };
  1676. var anObject$4 = anObject$9;
  1677. // `RegExp.prototype.flags` getter implementation
  1678. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  1679. var regexpFlags$1 = function () {
  1680. var that = anObject$4(this);
  1681. var result = '';
  1682. if (that.hasIndices) result += 'd';
  1683. if (that.global) result += 'g';
  1684. if (that.ignoreCase) result += 'i';
  1685. if (that.multiline) result += 'm';
  1686. if (that.dotAll) result += 's';
  1687. if (that.unicode) result += 'u';
  1688. if (that.unicodeSets) result += 'v';
  1689. if (that.sticky) result += 'y';
  1690. return result;
  1691. };
  1692. var fails$5 = fails$o;
  1693. var global$4 = global$e;
  1694. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  1695. var $RegExp$2 = global$4.RegExp;
  1696. var UNSUPPORTED_Y$1 = fails$5(function () {
  1697. var re = $RegExp$2('a', 'y');
  1698. re.lastIndex = 2;
  1699. return re.exec('abcd') !== null;
  1700. });
  1701. // UC Browser bug
  1702. // https://github.com/zloirock/core-js/issues/1008
  1703. var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$5(function () {
  1704. return !$RegExp$2('a', 'y').sticky;
  1705. });
  1706. var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () {
  1707. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  1708. var re = $RegExp$2('^r', 'gy');
  1709. re.lastIndex = 2;
  1710. return re.exec('str') !== null;
  1711. });
  1712. var regexpStickyHelpers = {
  1713. BROKEN_CARET: BROKEN_CARET,
  1714. MISSED_STICKY: MISSED_STICKY,
  1715. UNSUPPORTED_Y: UNSUPPORTED_Y$1
  1716. };
  1717. var fails$4 = fails$o;
  1718. var global$3 = global$e;
  1719. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  1720. var $RegExp$1 = global$3.RegExp;
  1721. var regexpUnsupportedDotAll = fails$4(function () {
  1722. var re = $RegExp$1('.', 's');
  1723. return !(re.dotAll && re.test('\n') && re.flags === 's');
  1724. });
  1725. var fails$3 = fails$o;
  1726. var global$2 = global$e;
  1727. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  1728. var $RegExp = global$2.RegExp;
  1729. var regexpUnsupportedNcg = fails$3(function () {
  1730. var re = $RegExp('(?<a>b)', 'g');
  1731. return re.exec('b').groups.a !== 'b' ||
  1732. 'b'.replace(re, '$<a>c') !== 'bc';
  1733. });
  1734. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  1735. /* eslint-disable regexp/no-useless-quantifier -- testing */
  1736. var call$6 = functionCall;
  1737. var uncurryThis$4 = functionUncurryThis;
  1738. var toString$4 = toString$5;
  1739. var regexpFlags = regexpFlags$1;
  1740. var stickyHelpers = regexpStickyHelpers;
  1741. var shared = shared$4;
  1742. var create = objectCreate;
  1743. var getInternalState = internalState.get;
  1744. var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
  1745. var UNSUPPORTED_NCG = regexpUnsupportedNcg;
  1746. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  1747. var nativeExec = RegExp.prototype.exec;
  1748. var patchedExec = nativeExec;
  1749. var charAt$3 = uncurryThis$4(''.charAt);
  1750. var indexOf = uncurryThis$4(''.indexOf);
  1751. var replace$1 = uncurryThis$4(''.replace);
  1752. var stringSlice$3 = uncurryThis$4(''.slice);
  1753. var UPDATES_LAST_INDEX_WRONG = (function () {
  1754. var re1 = /a/;
  1755. var re2 = /b*/g;
  1756. call$6(nativeExec, re1, 'a');
  1757. call$6(nativeExec, re2, 'a');
  1758. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  1759. })();
  1760. var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
  1761. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  1762. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  1763. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  1764. if (PATCH) {
  1765. patchedExec = function exec(string) {
  1766. var re = this;
  1767. var state = getInternalState(re);
  1768. var str = toString$4(string);
  1769. var raw = state.raw;
  1770. var result, reCopy, lastIndex, match, i, object, group;
  1771. if (raw) {
  1772. raw.lastIndex = re.lastIndex;
  1773. result = call$6(patchedExec, raw, str);
  1774. re.lastIndex = raw.lastIndex;
  1775. return result;
  1776. }
  1777. var groups = state.groups;
  1778. var sticky = UNSUPPORTED_Y && re.sticky;
  1779. var flags = call$6(regexpFlags, re);
  1780. var source = re.source;
  1781. var charsAdded = 0;
  1782. var strCopy = str;
  1783. if (sticky) {
  1784. flags = replace$1(flags, 'y', '');
  1785. if (indexOf(flags, 'g') === -1) {
  1786. flags += 'g';
  1787. }
  1788. strCopy = stringSlice$3(str, re.lastIndex);
  1789. // Support anchored sticky behavior.
  1790. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
  1791. source = '(?: ' + source + ')';
  1792. strCopy = ' ' + strCopy;
  1793. charsAdded++;
  1794. }
  1795. // ^(? + rx + ) is needed, in combination with some str slicing, to
  1796. // simulate the 'y' flag.
  1797. reCopy = new RegExp('^(?:' + source + ')', flags);
  1798. }
  1799. if (NPCG_INCLUDED) {
  1800. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  1801. }
  1802. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  1803. match = call$6(nativeExec, sticky ? reCopy : re, strCopy);
  1804. if (sticky) {
  1805. if (match) {
  1806. match.input = stringSlice$3(match.input, charsAdded);
  1807. match[0] = stringSlice$3(match[0], charsAdded);
  1808. match.index = re.lastIndex;
  1809. re.lastIndex += match[0].length;
  1810. } else re.lastIndex = 0;
  1811. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  1812. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  1813. }
  1814. if (NPCG_INCLUDED && match && match.length > 1) {
  1815. // Fix browsers whose `exec` methods don't consistently return `undefined`
  1816. // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
  1817. call$6(nativeReplace, match[0], reCopy, function () {
  1818. for (i = 1; i < arguments.length - 2; i++) {
  1819. if (arguments[i] === undefined) match[i] = undefined;
  1820. }
  1821. });
  1822. }
  1823. if (match && groups) {
  1824. match.groups = object = create(null);
  1825. for (i = 0; i < groups.length; i++) {
  1826. group = groups[i];
  1827. object[group[0]] = match[group[1]];
  1828. }
  1829. }
  1830. return match;
  1831. };
  1832. }
  1833. var regexpExec$2 = patchedExec;
  1834. var $$1 = _export;
  1835. var exec = regexpExec$2;
  1836. // `RegExp.prototype.exec` method
  1837. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  1838. $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  1839. exec: exec
  1840. });
  1841. var call$5 = functionCall;
  1842. var hasOwn = hasOwnProperty_1;
  1843. var isPrototypeOf = objectIsPrototypeOf;
  1844. var regExpFlags = regexpFlags$1;
  1845. var RegExpPrototype$2 = RegExp.prototype;
  1846. var regexpGetFlags = function (R) {
  1847. var flags = R.flags;
  1848. return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$2, R)
  1849. ? call$5(regExpFlags, R) : flags;
  1850. };
  1851. var PROPER_FUNCTION_NAME = functionName.PROPER;
  1852. var defineBuiltIn$1 = defineBuiltIn$4;
  1853. var anObject$3 = anObject$9;
  1854. var $toString = toString$5;
  1855. var fails$2 = fails$o;
  1856. var getRegExpFlags = regexpGetFlags;
  1857. var TO_STRING = 'toString';
  1858. var RegExpPrototype$1 = RegExp.prototype;
  1859. var nativeToString = RegExpPrototype$1[TO_STRING];
  1860. var NOT_GENERIC = fails$2(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
  1861. // FF44- RegExp#toString has a wrong name
  1862. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
  1863. // `RegExp.prototype.toString` method
  1864. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  1865. if (NOT_GENERIC || INCORRECT_NAME) {
  1866. defineBuiltIn$1(RegExpPrototype$1, TO_STRING, function toString() {
  1867. var R = anObject$3(this);
  1868. var pattern = $toString(R.source);
  1869. var flags = $toString(getRegExpFlags(R));
  1870. return '/' + pattern + '/' + flags;
  1871. }, { unsafe: true });
  1872. }
  1873. var isObject = isObject$8;
  1874. var classof$1 = classofRaw$2;
  1875. var wellKnownSymbol$3 = wellKnownSymbol$b;
  1876. var MATCH$1 = wellKnownSymbol$3('match');
  1877. // `IsRegExp` abstract operation
  1878. // https://tc39.es/ecma262/#sec-isregexp
  1879. var isRegexp = function (it) {
  1880. var isRegExp;
  1881. return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) === 'RegExp');
  1882. };
  1883. var isRegExp = isRegexp;
  1884. var $TypeError$1 = TypeError;
  1885. var notARegexp = function (it) {
  1886. if (isRegExp(it)) {
  1887. throw new $TypeError$1("The method doesn't accept regular expressions");
  1888. } return it;
  1889. };
  1890. var wellKnownSymbol$2 = wellKnownSymbol$b;
  1891. var MATCH = wellKnownSymbol$2('match');
  1892. var correctIsRegexpLogic = function (METHOD_NAME) {
  1893. var regexp = /./;
  1894. try {
  1895. '/./'[METHOD_NAME](regexp);
  1896. } catch (error1) {
  1897. try {
  1898. regexp[MATCH] = false;
  1899. return '/./'[METHOD_NAME](regexp);
  1900. } catch (error2) { /* empty */ }
  1901. } return false;
  1902. };
  1903. var $ = _export;
  1904. var uncurryThis$3 = functionUncurryThis;
  1905. var notARegExp = notARegexp;
  1906. var requireObjectCoercible$3 = requireObjectCoercible$6;
  1907. var toString$3 = toString$5;
  1908. var correctIsRegExpLogic = correctIsRegexpLogic;
  1909. var stringIndexOf$1 = uncurryThis$3(''.indexOf);
  1910. // `String.prototype.includes` method
  1911. // https://tc39.es/ecma262/#sec-string.prototype.includes
  1912. $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  1913. includes: function includes(searchString /* , position = 0 */) {
  1914. return !!~stringIndexOf$1(
  1915. toString$3(requireObjectCoercible$3(this)),
  1916. toString$3(notARegExp(searchString)),
  1917. arguments.length > 1 ? arguments[1] : undefined
  1918. );
  1919. }
  1920. });
  1921. var NATIVE_BIND = functionBindNative;
  1922. var FunctionPrototype = Function.prototype;
  1923. var apply$1 = FunctionPrototype.apply;
  1924. var call$4 = FunctionPrototype.call;
  1925. // eslint-disable-next-line es/no-reflect -- safe
  1926. var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$4.bind(apply$1) : function () {
  1927. return call$4.apply(apply$1, arguments);
  1928. });
  1929. // TODO: Remove from `core-js@4` since it's moved to entry points
  1930. var call$3 = functionCall;
  1931. var defineBuiltIn = defineBuiltIn$4;
  1932. var regexpExec$1 = regexpExec$2;
  1933. var fails$1 = fails$o;
  1934. var wellKnownSymbol$1 = wellKnownSymbol$b;
  1935. var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
  1936. var SPECIES = wellKnownSymbol$1('species');
  1937. var RegExpPrototype = RegExp.prototype;
  1938. var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
  1939. var SYMBOL = wellKnownSymbol$1(KEY);
  1940. var DELEGATES_TO_SYMBOL = !fails$1(function () {
  1941. // String methods call symbol-named RegExp methods
  1942. var O = {};
  1943. O[SYMBOL] = function () { return 7; };
  1944. return ''[KEY](O) !== 7;
  1945. });
  1946. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
  1947. // Symbol-named RegExp methods call .exec
  1948. var execCalled = false;
  1949. var re = /a/;
  1950. if (KEY === 'split') {
  1951. // We can't use real regex here since it causes deoptimization
  1952. // and serious performance degradation in V8
  1953. // https://github.com/zloirock/core-js/issues/306
  1954. re = {};
  1955. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  1956. // a new one. We need to return the patched regex when creating the new one.
  1957. re.constructor = {};
  1958. re.constructor[SPECIES] = function () { return re; };
  1959. re.flags = '';
  1960. re[SYMBOL] = /./[SYMBOL];
  1961. }
  1962. re.exec = function () {
  1963. execCalled = true;
  1964. return null;
  1965. };
  1966. re[SYMBOL]('');
  1967. return !execCalled;
  1968. });
  1969. if (
  1970. !DELEGATES_TO_SYMBOL ||
  1971. !DELEGATES_TO_EXEC ||
  1972. FORCED
  1973. ) {
  1974. var nativeRegExpMethod = /./[SYMBOL];
  1975. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  1976. var $exec = regexp.exec;
  1977. if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
  1978. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  1979. // The native String method already delegates to @@method (this
  1980. // polyfilled function), leasing to infinite recursion.
  1981. // We avoid it by directly calling the native @@method method.
  1982. return { done: true, value: call$3(nativeRegExpMethod, regexp, str, arg2) };
  1983. }
  1984. return { done: true, value: call$3(nativeMethod, str, regexp, arg2) };
  1985. }
  1986. return { done: false };
  1987. });
  1988. defineBuiltIn(String.prototype, KEY, methods[0]);
  1989. defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
  1990. }
  1991. if (SHAM) createNonEnumerableProperty$1(RegExpPrototype[SYMBOL], 'sham', true);
  1992. };
  1993. var uncurryThis$2 = functionUncurryThis;
  1994. var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
  1995. var toString$2 = toString$5;
  1996. var requireObjectCoercible$2 = requireObjectCoercible$6;
  1997. var charAt$2 = uncurryThis$2(''.charAt);
  1998. var charCodeAt = uncurryThis$2(''.charCodeAt);
  1999. var stringSlice$2 = uncurryThis$2(''.slice);
  2000. var createMethod = function (CONVERT_TO_STRING) {
  2001. return function ($this, pos) {
  2002. var S = toString$2(requireObjectCoercible$2($this));
  2003. var position = toIntegerOrInfinity$1(pos);
  2004. var size = S.length;
  2005. var first, second;
  2006. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  2007. first = charCodeAt(S, position);
  2008. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  2009. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  2010. ? CONVERT_TO_STRING
  2011. ? charAt$2(S, position)
  2012. : first
  2013. : CONVERT_TO_STRING
  2014. ? stringSlice$2(S, position, position + 2)
  2015. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  2016. };
  2017. };
  2018. var stringMultibyte = {
  2019. // `String.prototype.codePointAt` method
  2020. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  2021. codeAt: createMethod(false),
  2022. // `String.prototype.at` method
  2023. // https://github.com/mathiasbynens/String.prototype.at
  2024. charAt: createMethod(true)
  2025. };
  2026. var charAt$1 = stringMultibyte.charAt;
  2027. // `AdvanceStringIndex` abstract operation
  2028. // https://tc39.es/ecma262/#sec-advancestringindex
  2029. var advanceStringIndex$1 = function (S, index, unicode) {
  2030. return index + (unicode ? charAt$1(S, index).length : 1);
  2031. };
  2032. var uncurryThis$1 = functionUncurryThis;
  2033. var toObject = toObject$8;
  2034. var floor = Math.floor;
  2035. var charAt = uncurryThis$1(''.charAt);
  2036. var replace = uncurryThis$1(''.replace);
  2037. var stringSlice$1 = uncurryThis$1(''.slice);
  2038. // eslint-disable-next-line redos/no-vulnerable -- safe
  2039. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  2040. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  2041. // `GetSubstitution` abstract operation
  2042. // https://tc39.es/ecma262/#sec-getsubstitution
  2043. var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
  2044. var tailPos = position + matched.length;
  2045. var m = captures.length;
  2046. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  2047. if (namedCaptures !== undefined) {
  2048. namedCaptures = toObject(namedCaptures);
  2049. symbols = SUBSTITUTION_SYMBOLS;
  2050. }
  2051. return replace(replacement, symbols, function (match, ch) {
  2052. var capture;
  2053. switch (charAt(ch, 0)) {
  2054. case '$': return '$';
  2055. case '&': return matched;
  2056. case '`': return stringSlice$1(str, 0, position);
  2057. case "'": return stringSlice$1(str, tailPos);
  2058. case '<':
  2059. capture = namedCaptures[stringSlice$1(ch, 1, -1)];
  2060. break;
  2061. default: // \d\d?
  2062. var n = +ch;
  2063. if (n === 0) return match;
  2064. if (n > m) {
  2065. var f = floor(n / 10);
  2066. if (f === 0) return match;
  2067. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  2068. return match;
  2069. }
  2070. capture = captures[n - 1];
  2071. }
  2072. return capture === undefined ? '' : capture;
  2073. });
  2074. };
  2075. var call$2 = functionCall;
  2076. var anObject$2 = anObject$9;
  2077. var isCallable$1 = isCallable$f;
  2078. var classof = classofRaw$2;
  2079. var regexpExec = regexpExec$2;
  2080. var $TypeError = TypeError;
  2081. // `RegExpExec` abstract operation
  2082. // https://tc39.es/ecma262/#sec-regexpexec
  2083. var regexpExecAbstract = function (R, S) {
  2084. var exec = R.exec;
  2085. if (isCallable$1(exec)) {
  2086. var result = call$2(exec, R, S);
  2087. if (result !== null) anObject$2(result);
  2088. return result;
  2089. }
  2090. if (classof(R) === 'RegExp') return call$2(regexpExec, R, S);
  2091. throw new $TypeError('RegExp#exec called on incompatible receiver');
  2092. };
  2093. var apply = functionApply;
  2094. var call$1 = functionCall;
  2095. var uncurryThis = functionUncurryThis;
  2096. var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
  2097. var fails = fails$o;
  2098. var anObject$1 = anObject$9;
  2099. var isCallable = isCallable$f;
  2100. var isNullOrUndefined$1 = isNullOrUndefined$4;
  2101. var toIntegerOrInfinity = toIntegerOrInfinity$4;
  2102. var toLength = toLength$2;
  2103. var toString$1 = toString$5;
  2104. var requireObjectCoercible$1 = requireObjectCoercible$6;
  2105. var advanceStringIndex = advanceStringIndex$1;
  2106. var getMethod$1 = getMethod$3;
  2107. var getSubstitution = getSubstitution$1;
  2108. var regExpExec$1 = regexpExecAbstract;
  2109. var wellKnownSymbol = wellKnownSymbol$b;
  2110. var REPLACE = wellKnownSymbol('replace');
  2111. var max = Math.max;
  2112. var min = Math.min;
  2113. var concat = uncurryThis([].concat);
  2114. var push = uncurryThis([].push);
  2115. var stringIndexOf = uncurryThis(''.indexOf);
  2116. var stringSlice = uncurryThis(''.slice);
  2117. var maybeToString = function (it) {
  2118. return it === undefined ? it : String(it);
  2119. };
  2120. // IE <= 11 replaces $0 with the whole match, as if it was $&
  2121. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  2122. var REPLACE_KEEPS_$0 = (function () {
  2123. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  2124. return 'a'.replace(/./, '$0') === '$0';
  2125. })();
  2126. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  2127. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  2128. if (/./[REPLACE]) {
  2129. return /./[REPLACE]('a', '$0') === '';
  2130. }
  2131. return false;
  2132. })();
  2133. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  2134. var re = /./;
  2135. re.exec = function () {
  2136. var result = [];
  2137. result.groups = { a: '7' };
  2138. return result;
  2139. };
  2140. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  2141. return ''.replace(re, '$<a>') !== '7';
  2142. });
  2143. // @@replace logic
  2144. fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCallNative) {
  2145. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  2146. return [
  2147. // `String.prototype.replace` method
  2148. // https://tc39.es/ecma262/#sec-string.prototype.replace
  2149. function replace(searchValue, replaceValue) {
  2150. var O = requireObjectCoercible$1(this);
  2151. var replacer = isNullOrUndefined$1(searchValue) ? undefined : getMethod$1(searchValue, REPLACE);
  2152. return replacer
  2153. ? call$1(replacer, searchValue, O, replaceValue)
  2154. : call$1(nativeReplace, toString$1(O), searchValue, replaceValue);
  2155. },
  2156. // `RegExp.prototype[@@replace]` method
  2157. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  2158. function (string, replaceValue) {
  2159. var rx = anObject$1(this);
  2160. var S = toString$1(string);
  2161. if (
  2162. typeof replaceValue == 'string' &&
  2163. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  2164. stringIndexOf(replaceValue, '$<') === -1
  2165. ) {
  2166. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  2167. if (res.done) return res.value;
  2168. }
  2169. var functionalReplace = isCallable(replaceValue);
  2170. if (!functionalReplace) replaceValue = toString$1(replaceValue);
  2171. var global = rx.global;
  2172. var fullUnicode;
  2173. if (global) {
  2174. fullUnicode = rx.unicode;
  2175. rx.lastIndex = 0;
  2176. }
  2177. var results = [];
  2178. var result;
  2179. while (true) {
  2180. result = regExpExec$1(rx, S);
  2181. if (result === null) break;
  2182. push(results, result);
  2183. if (!global) break;
  2184. var matchStr = toString$1(result[0]);
  2185. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  2186. }
  2187. var accumulatedResult = '';
  2188. var nextSourcePosition = 0;
  2189. for (var i = 0; i < results.length; i++) {
  2190. result = results[i];
  2191. var matched = toString$1(result[0]);
  2192. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  2193. var captures = [];
  2194. var replacement;
  2195. // NOTE: This is equivalent to
  2196. // captures = result.slice(1).map(maybeToString)
  2197. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  2198. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  2199. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  2200. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  2201. var namedCaptures = result.groups;
  2202. if (functionalReplace) {
  2203. var replacerArgs = concat([matched], captures, position, S);
  2204. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  2205. replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
  2206. } else {
  2207. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  2208. }
  2209. if (position >= nextSourcePosition) {
  2210. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  2211. nextSourcePosition = position + matched.length;
  2212. }
  2213. }
  2214. return accumulatedResult + stringSlice(S, nextSourcePosition);
  2215. }
  2216. ];
  2217. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  2218. // `SameValue` abstract operation
  2219. // https://tc39.es/ecma262/#sec-samevalue
  2220. // eslint-disable-next-line es/no-object-is -- safe
  2221. var sameValue$1 = Object.is || function is(x, y) {
  2222. // eslint-disable-next-line no-self-compare -- NaN check
  2223. return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
  2224. };
  2225. var call = functionCall;
  2226. var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
  2227. var anObject = anObject$9;
  2228. var isNullOrUndefined = isNullOrUndefined$4;
  2229. var requireObjectCoercible = requireObjectCoercible$6;
  2230. var sameValue = sameValue$1;
  2231. var toString = toString$5;
  2232. var getMethod = getMethod$3;
  2233. var regExpExec = regexpExecAbstract;
  2234. // @@search logic
  2235. fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
  2236. return [
  2237. // `String.prototype.search` method
  2238. // https://tc39.es/ecma262/#sec-string.prototype.search
  2239. function search(regexp) {
  2240. var O = requireObjectCoercible(this);
  2241. var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
  2242. return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
  2243. },
  2244. // `RegExp.prototype[@@search]` method
  2245. // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
  2246. function (string) {
  2247. var rx = anObject(this);
  2248. var S = toString(string);
  2249. var res = maybeCallNative(nativeSearch, rx, S);
  2250. if (res.done) return res.value;
  2251. var previousLastIndex = rx.lastIndex;
  2252. if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
  2253. var result = regExpExec(rx, S);
  2254. if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
  2255. return result === null ? -1 : result.index;
  2256. }
  2257. ];
  2258. });
  2259. // iterable DOM collections
  2260. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  2261. var domIterables = {
  2262. CSSRuleList: 0,
  2263. CSSStyleDeclaration: 0,
  2264. CSSValueList: 0,
  2265. ClientRectList: 0,
  2266. DOMRectList: 0,
  2267. DOMStringList: 0,
  2268. DOMTokenList: 1,
  2269. DataTransferItemList: 0,
  2270. FileList: 0,
  2271. HTMLAllCollection: 0,
  2272. HTMLCollection: 0,
  2273. HTMLFormElement: 0,
  2274. HTMLSelectElement: 0,
  2275. MediaList: 0,
  2276. MimeTypeArray: 0,
  2277. NamedNodeMap: 0,
  2278. NodeList: 1,
  2279. PaintRequestList: 0,
  2280. Plugin: 0,
  2281. PluginArray: 0,
  2282. SVGLengthList: 0,
  2283. SVGNumberList: 0,
  2284. SVGPathSegList: 0,
  2285. SVGPointList: 0,
  2286. SVGStringList: 0,
  2287. SVGTransformList: 0,
  2288. SourceBufferList: 0,
  2289. StyleSheetList: 0,
  2290. TextTrackCueList: 0,
  2291. TextTrackList: 0,
  2292. TouchList: 0
  2293. };
  2294. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  2295. var documentCreateElement = documentCreateElement$2;
  2296. var classList = documentCreateElement('span').classList;
  2297. var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
  2298. var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
  2299. var $forEach = arrayIteration.forEach;
  2300. var arrayMethodIsStrict = arrayMethodIsStrict$2;
  2301. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  2302. // `Array.prototype.forEach` method implementation
  2303. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  2304. var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  2305. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  2306. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  2307. } : [].forEach;
  2308. var global$1 = global$e;
  2309. var DOMIterables = domIterables;
  2310. var DOMTokenListPrototype = domTokenListPrototype;
  2311. var forEach = arrayForEach;
  2312. var createNonEnumerableProperty = createNonEnumerableProperty$4;
  2313. var handlePrototype = function (CollectionPrototype) {
  2314. // some Chrome versions have non-configurable methods on DOMTokenList
  2315. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  2316. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  2317. } catch (error) {
  2318. CollectionPrototype.forEach = forEach;
  2319. }
  2320. };
  2321. for (var COLLECTION_NAME in DOMIterables) {
  2322. if (DOMIterables[COLLECTION_NAME]) {
  2323. handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype);
  2324. }
  2325. }
  2326. handlePrototype(DOMTokenListPrototype);
  2327. /**
  2328. * @author: Dennis Hernández
  2329. * @update zhixin wen <wenzhixin2010@gmail.com>
  2330. */
  2331. var Utils = $$c.fn.bootstrapTable.utils;
  2332. var UtilsCookie = {
  2333. cookieIds: {
  2334. sortOrder: 'bs.table.sortOrder',
  2335. sortName: 'bs.table.sortName',
  2336. sortPriority: 'bs.table.sortPriority',
  2337. pageNumber: 'bs.table.pageNumber',
  2338. pageList: 'bs.table.pageList',
  2339. hiddenColumns: 'bs.table.hiddenColumns',
  2340. cardView: 'bs.table.cardView',
  2341. customView: 'bs.table.customView',
  2342. searchText: 'bs.table.searchText',
  2343. reorderColumns: 'bs.table.reorderColumns',
  2344. filterControl: 'bs.table.filterControl',
  2345. filterBy: 'bs.table.filterBy'
  2346. },
  2347. getCurrentHeader: function getCurrentHeader(that) {
  2348. return that.options.height ? that.$tableHeader : that.$header;
  2349. },
  2350. getCurrentSearchControls: function getCurrentSearchControls(that) {
  2351. return that.options.height ? 'table select, table input' : 'select, input';
  2352. },
  2353. isCookieSupportedByBrowser: function isCookieSupportedByBrowser() {
  2354. return navigator.cookieEnabled;
  2355. },
  2356. isCookieEnabled: function isCookieEnabled(that, cookieName) {
  2357. return that.options.cookiesEnabled.includes(cookieName);
  2358. },
  2359. setCookie: function setCookie(that, cookieName, cookieValue) {
  2360. if (!that.options.cookie || !UtilsCookie.isCookieEnabled(that, cookieName)) {
  2361. return;
  2362. }
  2363. return that._storage.setItem("".concat(that.options.cookieIdTable, ".").concat(cookieName), cookieValue);
  2364. },
  2365. getCookie: function getCookie(that, cookieName) {
  2366. if (!cookieName || !UtilsCookie.isCookieEnabled(that, cookieName)) {
  2367. return null;
  2368. }
  2369. return that._storage.getItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
  2370. },
  2371. deleteCookie: function deleteCookie(that, cookieName) {
  2372. return that._storage.removeItem("".concat(that.options.cookieIdTable, ".").concat(cookieName));
  2373. },
  2374. calculateExpiration: function calculateExpiration(cookieExpire) {
  2375. var time = cookieExpire.replace(/[0-9]*/, ''); // s,mi,h,d,m,y
  2376. cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); // number
  2377. switch (time.toLowerCase()) {
  2378. case 's':
  2379. cookieExpire = +cookieExpire;
  2380. break;
  2381. case 'mi':
  2382. cookieExpire *= 60;
  2383. break;
  2384. case 'h':
  2385. cookieExpire = cookieExpire * 60 * 60;
  2386. break;
  2387. case 'd':
  2388. cookieExpire = cookieExpire * 24 * 60 * 60;
  2389. break;
  2390. case 'm':
  2391. cookieExpire = cookieExpire * 30 * 24 * 60 * 60;
  2392. break;
  2393. case 'y':
  2394. cookieExpire = cookieExpire * 365 * 24 * 60 * 60;
  2395. break;
  2396. default:
  2397. cookieExpire = undefined;
  2398. break;
  2399. }
  2400. if (!cookieExpire) {
  2401. return '';
  2402. }
  2403. var d = new Date();
  2404. d.setTime(d.getTime() + cookieExpire * 1000);
  2405. return d.toGMTString();
  2406. },
  2407. initCookieFilters: function initCookieFilters(that) {
  2408. setTimeout(function () {
  2409. var parsedCookieFilters = JSON.parse(UtilsCookie.getCookie(that, UtilsCookie.cookieIds.filterControl));
  2410. if (!that._filterControlValuesLoaded && parsedCookieFilters) {
  2411. var cachedFilters = {};
  2412. var header = UtilsCookie.getCurrentHeader(that);
  2413. var searchControls = UtilsCookie.getCurrentSearchControls(that);
  2414. var applyCookieFilters = function applyCookieFilters(element, filteredCookies) {
  2415. filteredCookies.forEach(function (cookie) {
  2416. var value = element.value.toString();
  2417. var text = cookie.text;
  2418. if (text === '' || element.type === 'radio' && value !== text) {
  2419. return;
  2420. }
  2421. if (element.tagName === 'INPUT' && element.type === 'radio' && value === text) {
  2422. element.checked = true;
  2423. cachedFilters[cookie.field] = text;
  2424. } else if (element.tagName === 'INPUT') {
  2425. element.value = text;
  2426. cachedFilters[cookie.field] = text;
  2427. } else if (element.tagName === 'SELECT' && that.options.filterControlContainer) {
  2428. element.value = text;
  2429. cachedFilters[cookie.field] = text;
  2430. } else if (text !== '' && element.tagName === 'SELECT') {
  2431. cachedFilters[cookie.field] = text;
  2432. var _iterator = _createForOfIteratorHelper(element),
  2433. _step;
  2434. try {
  2435. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  2436. var currentElement = _step.value;
  2437. if (currentElement.value === text) {
  2438. currentElement.selected = true;
  2439. return;
  2440. }
  2441. }
  2442. } catch (err) {
  2443. _iterator.e(err);
  2444. } finally {
  2445. _iterator.f();
  2446. }
  2447. var option = document.createElement('option');
  2448. option.value = text;
  2449. option.text = text;
  2450. element.add(option, element[1]);
  2451. element.selectedIndex = 1;
  2452. }
  2453. });
  2454. };
  2455. var filterContainer = header;
  2456. if (that.options.filterControlContainer) {
  2457. filterContainer = $$c("".concat(that.options.filterControlContainer));
  2458. }
  2459. filterContainer.find(searchControls).each(function () {
  2460. var field = $$c(this).closest('[data-field]').data('field');
  2461. var filteredCookies = parsedCookieFilters.filter(function (cookie) {
  2462. return cookie.field === field;
  2463. });
  2464. applyCookieFilters(this, filteredCookies);
  2465. });
  2466. that.initColumnSearch(cachedFilters);
  2467. that._filterControlValuesLoaded = true;
  2468. that.initServer();
  2469. }
  2470. }, 250);
  2471. }
  2472. };
  2473. Object.assign($$c.fn.bootstrapTable.defaults, {
  2474. cookie: false,
  2475. cookieExpire: '2h',
  2476. cookiePath: null,
  2477. cookieDomain: null,
  2478. cookieSecure: null,
  2479. cookieSameSite: 'Lax',
  2480. cookieIdTable: '',
  2481. cookiesEnabled: ['bs.table.sortOrder', 'bs.table.sortName', 'bs.table.sortPriority', 'bs.table.pageNumber', 'bs.table.pageList', 'bs.table.hiddenColumns', 'bs.table.searchText', 'bs.table.filterControl', 'bs.table.filterBy', 'bs.table.reorderColumns', 'bs.table.cardView', 'bs.table.customView'],
  2482. cookieStorage: 'cookieStorage',
  2483. // localStorage, sessionStorage, customStorage
  2484. cookieCustomStorageGet: null,
  2485. cookieCustomStorageSet: null,
  2486. cookieCustomStorageDelete: null,
  2487. // internal variable
  2488. _filterControls: [],
  2489. _filterControlValuesLoaded: false,
  2490. _storage: {
  2491. setItem: undefined,
  2492. getItem: undefined,
  2493. removeItem: undefined
  2494. }
  2495. });
  2496. $$c.fn.bootstrapTable.methods.push('getCookies');
  2497. $$c.fn.bootstrapTable.methods.push('deleteCookie');
  2498. Object.assign($$c.fn.bootstrapTable.utils, {
  2499. setCookie: UtilsCookie.setCookie,
  2500. getCookie: UtilsCookie.getCookie
  2501. });
  2502. $$c.BootstrapTable = /*#__PURE__*/function (_$$BootstrapTable) {
  2503. function _class() {
  2504. _classCallCheck(this, _class);
  2505. return _callSuper(this, _class, arguments);
  2506. }
  2507. _inherits(_class, _$$BootstrapTable);
  2508. return _createClass(_class, [{
  2509. key: "init",
  2510. value: function init() {
  2511. if (this.options.cookie) {
  2512. if (this.options.cookieStorage === 'cookieStorage' && !UtilsCookie.isCookieSupportedByBrowser()) {
  2513. throw new Error('Cookies are not enabled in this browser.');
  2514. }
  2515. this.configureStorage();
  2516. // FilterBy logic
  2517. var filterByCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterBy);
  2518. if (typeof filterByCookieValue === 'boolean' && !filterByCookieValue) {
  2519. throw new Error('The cookie value of filterBy must be a json!');
  2520. }
  2521. var filterByCookie = {};
  2522. try {
  2523. filterByCookie = JSON.parse(filterByCookieValue);
  2524. } catch (e) {
  2525. throw new Error('Could not parse the json of the filterBy cookie!');
  2526. }
  2527. this.filterColumns = filterByCookie ? filterByCookie : {};
  2528. // FilterControl logic
  2529. this._filterControls = [];
  2530. this._filterControlValuesLoaded = false;
  2531. this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? this.options.cookiesEnabled.replace('[', '').replace(']', '').replace(/'/g, '').replace(/ /g, '').split(',') : this.options.cookiesEnabled;
  2532. if (this.options.filterControl) {
  2533. var that = this;
  2534. this.$el.on('column-search.bs.table', function (e, field, text) {
  2535. var isNewField = true;
  2536. for (var i = 0; i < that._filterControls.length; i++) {
  2537. if (that._filterControls[i].field === field) {
  2538. that._filterControls[i].text = text;
  2539. isNewField = false;
  2540. break;
  2541. }
  2542. }
  2543. if (isNewField) {
  2544. that._filterControls.push({
  2545. field: field,
  2546. text: text
  2547. });
  2548. }
  2549. UtilsCookie.setCookie(that, UtilsCookie.cookieIds.filterControl, JSON.stringify(that._filterControls));
  2550. }).on('created-controls.bs.table', UtilsCookie.initCookieFilters(that));
  2551. }
  2552. }
  2553. _get(_getPrototypeOf(_class.prototype), "init", this).call(this);
  2554. }
  2555. }, {
  2556. key: "initServer",
  2557. value: function initServer() {
  2558. var _get2;
  2559. if (this.options.cookie && this.options.filterControl && !this._filterControlValuesLoaded) {
  2560. var cookie = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.filterControl));
  2561. if (cookie) {
  2562. return;
  2563. }
  2564. }
  2565. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2566. args[_key] = arguments[_key];
  2567. }
  2568. (_get2 = _get(_getPrototypeOf(_class.prototype), "initServer", this)).call.apply(_get2, [this].concat(args));
  2569. }
  2570. }, {
  2571. key: "initTable",
  2572. value: function initTable() {
  2573. var _get3;
  2574. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2575. args[_key2] = arguments[_key2];
  2576. }
  2577. (_get3 = _get(_getPrototypeOf(_class.prototype), "initTable", this)).call.apply(_get3, [this].concat(args));
  2578. this.initCookie();
  2579. }
  2580. }, {
  2581. key: "onSort",
  2582. value: function onSort() {
  2583. var _get4;
  2584. for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  2585. args[_key3] = arguments[_key3];
  2586. }
  2587. (_get4 = _get(_getPrototypeOf(_class.prototype), "onSort", this)).call.apply(_get4, [this].concat(args));
  2588. if (!this.options.cookie) {
  2589. return;
  2590. }
  2591. if (this.options.sortName === undefined || this.options.sortOrder === undefined) {
  2592. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
  2593. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
  2594. } else {
  2595. this.options.sortPriority = null;
  2596. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
  2597. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortOrder, this.options.sortOrder);
  2598. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortName, this.options.sortName);
  2599. }
  2600. }
  2601. }, {
  2602. key: "onMultipleSort",
  2603. value: function onMultipleSort() {
  2604. var _get5;
  2605. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  2606. args[_key4] = arguments[_key4];
  2607. }
  2608. (_get5 = _get(_getPrototypeOf(_class.prototype), "onMultipleSort", this)).call.apply(_get5, [this].concat(args));
  2609. if (!this.options.cookie) {
  2610. return;
  2611. }
  2612. if (this.options.sortPriority === undefined) {
  2613. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortPriority);
  2614. } else {
  2615. this.options.sortName = undefined;
  2616. this.options.sortOrder = undefined;
  2617. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortName);
  2618. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds.sortOrder);
  2619. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.sortPriority, JSON.stringify(this.options.sortPriority));
  2620. }
  2621. }
  2622. }, {
  2623. key: "onPageNumber",
  2624. value: function onPageNumber() {
  2625. var _get6;
  2626. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2627. args[_key5] = arguments[_key5];
  2628. }
  2629. (_get6 = _get(_getPrototypeOf(_class.prototype), "onPageNumber", this)).call.apply(_get6, [this].concat(args));
  2630. if (!this.options.cookie) {
  2631. return;
  2632. }
  2633. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2634. }
  2635. }, {
  2636. key: "onPageListChange",
  2637. value: function onPageListChange() {
  2638. var _get7;
  2639. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2640. args[_key6] = arguments[_key6];
  2641. }
  2642. (_get7 = _get(_getPrototypeOf(_class.prototype), "onPageListChange", this)).call.apply(_get7, [this].concat(args));
  2643. if (!this.options.cookie) {
  2644. return;
  2645. }
  2646. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageList, this.options.pageSize === this.options.formatAllRows() ? 'all' : this.options.pageSize);
  2647. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2648. }
  2649. }, {
  2650. key: "onPagePre",
  2651. value: function onPagePre() {
  2652. var _get8;
  2653. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2654. args[_key7] = arguments[_key7];
  2655. }
  2656. (_get8 = _get(_getPrototypeOf(_class.prototype), "onPagePre", this)).call.apply(_get8, [this].concat(args));
  2657. if (!this.options.cookie) {
  2658. return;
  2659. }
  2660. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2661. }
  2662. }, {
  2663. key: "onPageNext",
  2664. value: function onPageNext() {
  2665. var _get9;
  2666. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2667. args[_key8] = arguments[_key8];
  2668. }
  2669. (_get9 = _get(_getPrototypeOf(_class.prototype), "onPageNext", this)).call.apply(_get9, [this].concat(args));
  2670. if (!this.options.cookie) {
  2671. return;
  2672. }
  2673. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2674. }
  2675. }, {
  2676. key: "_toggleColumn",
  2677. value: function _toggleColumn() {
  2678. var _get10;
  2679. for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
  2680. args[_key9] = arguments[_key9];
  2681. }
  2682. (_get10 = _get(_getPrototypeOf(_class.prototype), "_toggleColumn", this)).call.apply(_get10, [this].concat(args));
  2683. if (!this.options.cookie) {
  2684. return;
  2685. }
  2686. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.hiddenColumns, JSON.stringify(this.getHiddenColumns().map(function (column) {
  2687. return column.field;
  2688. })));
  2689. }
  2690. }, {
  2691. key: "_toggleAllColumns",
  2692. value: function _toggleAllColumns() {
  2693. var _get11;
  2694. for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
  2695. args[_key10] = arguments[_key10];
  2696. }
  2697. (_get11 = _get(_getPrototypeOf(_class.prototype), "_toggleAllColumns", this)).call.apply(_get11, [this].concat(args));
  2698. if (!this.options.cookie) {
  2699. return;
  2700. }
  2701. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.hiddenColumns, JSON.stringify(this.getHiddenColumns().map(function (column) {
  2702. return column.field;
  2703. })));
  2704. }
  2705. }, {
  2706. key: "toggleView",
  2707. value: function toggleView() {
  2708. _get(_getPrototypeOf(_class.prototype), "toggleView", this).call(this);
  2709. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.cardView, this.options.cardView);
  2710. }
  2711. }, {
  2712. key: "toggleCustomView",
  2713. value: function toggleCustomView() {
  2714. _get(_getPrototypeOf(_class.prototype), "toggleCustomView", this).call(this);
  2715. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.customView, this.customViewDefaultView);
  2716. }
  2717. }, {
  2718. key: "selectPage",
  2719. value: function selectPage(page) {
  2720. _get(_getPrototypeOf(_class.prototype), "selectPage", this).call(this, page);
  2721. if (!this.options.cookie) {
  2722. return;
  2723. }
  2724. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, page);
  2725. }
  2726. }, {
  2727. key: "onSearch",
  2728. value: function onSearch(event) {
  2729. _get(_getPrototypeOf(_class.prototype), "onSearch", this).call(this, event, arguments.length > 1 ? arguments[1] : true);
  2730. if (!this.options.cookie) {
  2731. return;
  2732. }
  2733. if (this.options.search) {
  2734. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.searchText, this.searchText);
  2735. }
  2736. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.pageNumber, this.options.pageNumber);
  2737. }
  2738. }, {
  2739. key: "initHeader",
  2740. value: function initHeader() {
  2741. var _get12;
  2742. if (this.options.reorderableColumns && this.options.cookie) {
  2743. this.columnsSortOrder = JSON.parse(UtilsCookie.getCookie(this, UtilsCookie.cookieIds.reorderColumns));
  2744. }
  2745. for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
  2746. args[_key11] = arguments[_key11];
  2747. }
  2748. (_get12 = _get(_getPrototypeOf(_class.prototype), "initHeader", this)).call.apply(_get12, [this].concat(args));
  2749. }
  2750. }, {
  2751. key: "persistReorderColumnsState",
  2752. value: function persistReorderColumnsState(that) {
  2753. UtilsCookie.setCookie(that, UtilsCookie.cookieIds.reorderColumns, JSON.stringify(that.columnsSortOrder));
  2754. }
  2755. }, {
  2756. key: "filterBy",
  2757. value: function filterBy() {
  2758. var _get13;
  2759. for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
  2760. args[_key12] = arguments[_key12];
  2761. }
  2762. (_get13 = _get(_getPrototypeOf(_class.prototype), "filterBy", this)).call.apply(_get13, [this].concat(args));
  2763. if (!this.options.cookie) {
  2764. return;
  2765. }
  2766. UtilsCookie.setCookie(this, UtilsCookie.cookieIds.filterBy, JSON.stringify(this.filterColumns));
  2767. }
  2768. }, {
  2769. key: "initCookie",
  2770. value: function initCookie() {
  2771. if (!this.options.cookie) {
  2772. return;
  2773. }
  2774. if (this.options.cookieIdTable === '' || this.options.cookieExpire === '') {
  2775. console.error('Configuration error. Please review the cookieIdTable and the cookieExpire property. If the properties are correct, then this browser does not support cookies.');
  2776. this.options.cookie = false; // Make sure that the cookie extension is disabled
  2777. return;
  2778. }
  2779. var sortOrderCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortOrder);
  2780. var sortOrderNameCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortName);
  2781. var sortPriorityCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.sortPriority);
  2782. var pageNumberCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageNumber);
  2783. var pageListCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.pageList);
  2784. var searchTextCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.searchText);
  2785. var cardViewCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.cardView);
  2786. var customViewCookie = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.customView);
  2787. var hiddenColumnsCookieValue = UtilsCookie.getCookie(this, UtilsCookie.cookieIds.hiddenColumns);
  2788. var hiddenColumnsCookie = {};
  2789. try {
  2790. hiddenColumnsCookie = JSON.parse(hiddenColumnsCookieValue);
  2791. } catch (e) {
  2792. throw new Error('Could not parse the json of the hidden columns cookie!', hiddenColumnsCookieValue);
  2793. }
  2794. try {
  2795. sortPriorityCookie = JSON.parse(sortPriorityCookie);
  2796. } catch (e) {
  2797. throw new Error('Could not parse the json of the sortPriority cookie!', sortPriorityCookie);
  2798. }
  2799. if (!sortPriorityCookie) {
  2800. // sortOrder
  2801. this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder;
  2802. // sortName
  2803. this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName;
  2804. } else {
  2805. this.options.sortOrder = undefined;
  2806. this.options.sortName = undefined;
  2807. }
  2808. // sortPriority
  2809. this.options.sortPriority = sortPriorityCookie ? sortPriorityCookie : this.options.sortPriority;
  2810. if (this.options.sortOrder || this.options.sortName) {
  2811. // sortPriority
  2812. this.options.sortPriority = null;
  2813. }
  2814. // pageNumber
  2815. this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber;
  2816. // pageSize
  2817. this.options.pageSize = pageListCookie ? pageListCookie === 'all' ? this.options.formatAllRows() : +pageListCookie : this.options.pageSize;
  2818. // searchText
  2819. if (UtilsCookie.isCookieEnabled(this, UtilsCookie.cookieIds.searchText) && this.options.searchText === '') {
  2820. this.options.searchText = searchTextCookie ? searchTextCookie : '';
  2821. }
  2822. // cardView
  2823. if (cardViewCookie !== null) {
  2824. this.options.cardView = cardViewCookie === 'true' ? cardViewCookie : false;
  2825. }
  2826. this.customViewDefaultView = customViewCookie === 'true';
  2827. if (hiddenColumnsCookie) {
  2828. var _iterator2 = _createForOfIteratorHelper(this.columns),
  2829. _step2;
  2830. try {
  2831. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  2832. var column = _step2.value;
  2833. if (!column.switchable) {
  2834. continue;
  2835. }
  2836. column.visible = this.isSelectionColumn(column) || !hiddenColumnsCookie.includes(column.field);
  2837. }
  2838. } catch (err) {
  2839. _iterator2.e(err);
  2840. } finally {
  2841. _iterator2.f();
  2842. }
  2843. }
  2844. }
  2845. }, {
  2846. key: "getCookies",
  2847. value: function getCookies() {
  2848. var bootstrapTable = this;
  2849. var cookies = {};
  2850. for (var _i = 0, _Object$entries = Object.entries(UtilsCookie.cookieIds); _i < _Object$entries.length; _i++) {
  2851. var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
  2852. key = _Object$entries$_i[0],
  2853. value = _Object$entries$_i[1];
  2854. cookies[key] = UtilsCookie.getCookie(bootstrapTable, value);
  2855. if (key === 'columns' || key === 'hiddenColumns' || key === 'sortPriority') {
  2856. cookies[key] = JSON.parse(cookies[key]);
  2857. }
  2858. }
  2859. return cookies;
  2860. }
  2861. }, {
  2862. key: "deleteCookie",
  2863. value: function deleteCookie(cookieName) {
  2864. if (!cookieName || !this.options.cookie) {
  2865. return;
  2866. }
  2867. UtilsCookie.deleteCookie(this, UtilsCookie.cookieIds[cookieName]);
  2868. }
  2869. }, {
  2870. key: "configureStorage",
  2871. value: function configureStorage() {
  2872. var that = this;
  2873. this._storage = {};
  2874. switch (this.options.cookieStorage) {
  2875. case 'cookieStorage':
  2876. this._storage.setItem = function (cookieName, cookieValue) {
  2877. document.cookie = [cookieName, '=', encodeURIComponent(cookieValue), "; expires=".concat(UtilsCookie.calculateExpiration(that.options.cookieExpire)), that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', that.options.cookieSecure ? '; secure' : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
  2878. };
  2879. this._storage.getItem = function (cookieName) {
  2880. var value = "; ".concat(document.cookie);
  2881. var parts = value.split("; ".concat(cookieName, "="));
  2882. return parts.length === 2 ? decodeURIComponent(parts.pop().split(';').shift()) : null;
  2883. };
  2884. this._storage.removeItem = function (cookieName) {
  2885. document.cookie = [encodeURIComponent(cookieName), '=', '; expires=Thu, 01 Jan 1970 00:00:00 GMT', that.options.cookiePath ? "; path=".concat(that.options.cookiePath) : '', that.options.cookieDomain ? "; domain=".concat(that.options.cookieDomain) : '', ";SameSite=".concat(that.options.cookieSameSite)].join('');
  2886. };
  2887. break;
  2888. case 'localStorage':
  2889. this._storage.setItem = function (cookieName, cookieValue) {
  2890. localStorage.setItem(cookieName, cookieValue);
  2891. };
  2892. this._storage.getItem = function (cookieName) {
  2893. return localStorage.getItem(cookieName);
  2894. };
  2895. this._storage.removeItem = function (cookieName) {
  2896. localStorage.removeItem(cookieName);
  2897. };
  2898. break;
  2899. case 'sessionStorage':
  2900. this._storage.setItem = function (cookieName, cookieValue) {
  2901. sessionStorage.setItem(cookieName, cookieValue);
  2902. };
  2903. this._storage.getItem = function (cookieName) {
  2904. return sessionStorage.getItem(cookieName);
  2905. };
  2906. this._storage.removeItem = function (cookieName) {
  2907. sessionStorage.removeItem(cookieName);
  2908. };
  2909. break;
  2910. case 'customStorage':
  2911. if (!this.options.cookieCustomStorageSet || !this.options.cookieCustomStorageGet || !this.options.cookieCustomStorageDelete) {
  2912. throw new Error('The following options must be set while using the customStorage: cookieCustomStorageSet, cookieCustomStorageGet and cookieCustomStorageDelete');
  2913. }
  2914. this._storage.setItem = function (cookieName, cookieValue) {
  2915. Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageSet, [cookieName, cookieValue], '');
  2916. };
  2917. this._storage.getItem = function (cookieName) {
  2918. return Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageGet, [cookieName], '');
  2919. };
  2920. this._storage.removeItem = function (cookieName) {
  2921. Utils.calculateObjectValue(that.options, that.options.cookieCustomStorageDelete, [cookieName], '');
  2922. };
  2923. break;
  2924. default:
  2925. throw new Error('Storage method not supported.');
  2926. }
  2927. }
  2928. }]);
  2929. }($$c.BootstrapTable);
  2930. }));