bootstrap-table-cookie.js 121 KB

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