bootstrap-table-cookie.js 116 KB

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