bootstrap-table-cookie.js 120 KB

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